@coinbase/cds-mobile 8.53.1 → 8.54.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/CHANGELOG.md +10 -0
- package/README.md +5 -2
- package/dts/buttons/IconButton.d.ts +23 -1
- package/dts/buttons/IconButton.d.ts.map +1 -1
- package/dts/controls/InputIconButton.d.ts +22 -1
- package/dts/controls/InputIconButton.d.ts.map +1 -1
- package/dts/dates/Calendar.d.ts +170 -0
- package/dts/dates/Calendar.d.ts.map +1 -0
- package/dts/dates/DateInput.d.ts +2 -2
- package/dts/dates/DateInput.d.ts.map +1 -1
- package/dts/dates/DatePicker.d.ts +136 -67
- package/dts/dates/DatePicker.d.ts.map +1 -1
- package/dts/overlays/drawer/Drawer.d.ts +4 -0
- package/dts/overlays/drawer/Drawer.d.ts.map +1 -1
- package/dts/overlays/tooltip/Tooltip.d.ts +9 -1
- package/dts/overlays/tooltip/Tooltip.d.ts.map +1 -1
- package/esm/buttons/IconButton.js +4 -3
- package/esm/controls/InputIconButton.js +4 -3
- package/esm/dates/Calendar.js +346 -0
- package/esm/dates/DateInput.js +3 -1
- package/esm/dates/DatePicker.js +116 -39
- package/esm/dates/__stories__/Calendar.stories.js +360 -0
- package/esm/dates/__stories__/DatePicker.stories.js +51 -25
- package/esm/overlays/drawer/Drawer.js +4 -2
- package/esm/overlays/tooltip/Tooltip.js +7 -2
- package/package.json +2 -4
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,16 @@ All notable changes to this project will be documented in this file.
|
|
|
8
8
|
|
|
9
9
|
<!-- template-start -->
|
|
10
10
|
|
|
11
|
+
## 8.54.0 (3/18/2026 PST)
|
|
12
|
+
|
|
13
|
+
#### 🚀 Updates
|
|
14
|
+
|
|
15
|
+
- Added Calendar component and included new Calendar in DatePicker. [[#139](https://github.com/coinbase/cds/pull/139)]
|
|
16
|
+
|
|
17
|
+
#### 🐞 Fixes
|
|
18
|
+
|
|
19
|
+
- Removed react-native-date-picker dependency. [[#139](https://github.com/coinbase/cds/pull/139)]
|
|
20
|
+
|
|
11
21
|
## 8.53.1 (3/17/2026 PST)
|
|
12
22
|
|
|
13
23
|
#### 🐞 Fixes
|
package/README.md
CHANGED
|
@@ -6,9 +6,12 @@ Components for React Native.
|
|
|
6
6
|
|
|
7
7
|
Add the relative path to the CDS icon font to your react-native.config.js. If your project lives in the monorepo this lives in the root `react-native.config.js` file. There is an example for CDS playground in there.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
In this monorepo, run the `mobile-app` targets from the repo root:
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
- `yarn nx run mobile-app:go` for Expo Go development
|
|
12
|
+
- `yarn nx run mobile-app:launch:ios-debug` or `yarn nx run mobile-app:launch:android-debug` for local debug launch
|
|
13
|
+
|
|
14
|
+
### Outside monorepo
|
|
12
15
|
|
|
13
16
|
- Install package with `yarn add @coinbase/cds-mobile`.
|
|
14
17
|
- Update `react-native.config.js` to include icon font in assets, i.e. `assets: ['./node_modules/@coinbase/cds-mobile/icons/font']`.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { type View } from 'react-native';
|
|
2
3
|
import type {
|
|
3
4
|
IconButtonVariant,
|
|
4
5
|
IconName,
|
|
@@ -26,5 +27,26 @@ export type IconButtonBaseProps = SharedProps &
|
|
|
26
27
|
variant?: IconButtonVariant;
|
|
27
28
|
};
|
|
28
29
|
export type IconButtonProps = IconButtonBaseProps;
|
|
29
|
-
export declare const IconButton: React.
|
|
30
|
+
export declare const IconButton: React.MemoExoticComponent<
|
|
31
|
+
React.ForwardRefExoticComponent<
|
|
32
|
+
SharedProps &
|
|
33
|
+
Omit<PressableBaseProps, 'children'> &
|
|
34
|
+
Pick<ButtonBaseProps, 'transparent' | 'disabled' | 'loading' | 'compact' | 'flush'> & {
|
|
35
|
+
/** Name of the icon, as defined in Figma. */
|
|
36
|
+
name: IconName;
|
|
37
|
+
/**
|
|
38
|
+
* Size for the icon rendered inside the button.
|
|
39
|
+
* @default compact ? 's' : 'm'
|
|
40
|
+
*/
|
|
41
|
+
iconSize?: IconSize;
|
|
42
|
+
/** Whether the icon is active */
|
|
43
|
+
active?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Toggle design and visual variants.
|
|
46
|
+
* @default primary
|
|
47
|
+
*/
|
|
48
|
+
variant?: IconButtonVariant;
|
|
49
|
+
} & React.RefAttributes<View>
|
|
50
|
+
>
|
|
51
|
+
>;
|
|
30
52
|
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../src/buttons/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../src/buttons/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AACtE,OAAO,EAGL,KAAK,IAAI,EAEV,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EACV,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,WAAW,EACZ,MAAM,4BAA4B,CAAC;AAKpC,OAAO,EAAa,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAC3C,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC,GACpC,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,aAAa,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC,GAAG;IACpF,6CAA6C;IAC7C,IAAI,EAAE,QAAQ,CAAC;IACf;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,iCAAiC;IACjC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B,CAAC;AAEJ,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAAC;AAElD,eAAO,MAAM,UAAU;IAlBnB,6CAA6C;UACvC,QAAQ;IACd;;;OAGG;eACQ,QAAQ;IACnB,iCAAiC;aACxB,OAAO;IAChB;;;OAGG;cACO,iBAAiB;+BAkG9B,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { View } from 'react-native';
|
|
2
3
|
import type { IconButtonVariant, InputVariant } from '@coinbase/cds-common/types';
|
|
3
4
|
import { type IconButtonProps } from '../buttons/IconButton';
|
|
4
5
|
export declare const variantTransformMap: Record<InputVariant, IconButtonVariant>;
|
|
@@ -9,5 +10,25 @@ export type InputIconButtonProps = IconButtonProps & {
|
|
|
9
10
|
* */
|
|
10
11
|
disableInheritFocusStyle?: boolean;
|
|
11
12
|
};
|
|
12
|
-
export declare const InputIconButton: React.
|
|
13
|
+
export declare const InputIconButton: React.MemoExoticComponent<
|
|
14
|
+
React.ForwardRefExoticComponent<
|
|
15
|
+
import('@coinbase/cds-common').SharedProps &
|
|
16
|
+
Omit<import('../system').PressableBaseProps, 'children'> &
|
|
17
|
+
Pick<
|
|
18
|
+
import('../buttons').ButtonBaseProps,
|
|
19
|
+
'transparent' | 'disabled' | 'loading' | 'compact' | 'flush'
|
|
20
|
+
> & {
|
|
21
|
+
name: import('@coinbase/cds-common').IconName;
|
|
22
|
+
iconSize?: import('@coinbase/cds-common').IconSize;
|
|
23
|
+
active?: boolean;
|
|
24
|
+
variant?: IconButtonVariant;
|
|
25
|
+
} & {
|
|
26
|
+
/**
|
|
27
|
+
* If set to true, when parent input is focused, the icon will match the color of the focus state
|
|
28
|
+
* @default false
|
|
29
|
+
* */
|
|
30
|
+
disableInheritFocusStyle?: boolean;
|
|
31
|
+
} & React.RefAttributes<View>
|
|
32
|
+
>
|
|
33
|
+
>;
|
|
13
34
|
//# sourceMappingURL=InputIconButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputIconButton.d.ts","sourceRoot":"","sources":["../../src/controls/InputIconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"InputIconButton.d.ts","sourceRoot":"","sources":["../../src/controls/InputIconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAC5D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAElF,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAKzE,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,YAAY,EAAE,iBAAiB,CAOvE,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,eAAe,GAAG;IACnD;;;SAGK;IACL,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;IAP1B;;;SAGK;+BACsB,OAAO;+BA+BnC,CAAC"}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
|
|
2
|
+
import type { SharedProps } from '@coinbase/cds-common/types';
|
|
3
|
+
import { type BoxBaseProps } from '../layout/Box';
|
|
4
|
+
import { type VStackProps } from '../layout/VStack';
|
|
5
|
+
import { type PressableBaseProps } from '../system/Pressable';
|
|
6
|
+
export type CalendarPressableBaseProps = PressableBaseProps & {
|
|
7
|
+
borderRadius?: number;
|
|
8
|
+
width?: number;
|
|
9
|
+
height?: number;
|
|
10
|
+
background?: 'transparent' | 'bg' | 'bgPrimary';
|
|
11
|
+
};
|
|
12
|
+
export type CalendarDayProps = {
|
|
13
|
+
/** Date of this CalendarDay. */
|
|
14
|
+
date: Date;
|
|
15
|
+
/** Callback function fired when pressing this CalendarDay. */
|
|
16
|
+
onPress?: (date: Date) => void;
|
|
17
|
+
/** Toggle active styles. */
|
|
18
|
+
active?: boolean;
|
|
19
|
+
/** Disables user interaction. */
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/** Toggle highlighted styles. */
|
|
22
|
+
highlighted?: boolean;
|
|
23
|
+
/** Toggle today's date styles. */
|
|
24
|
+
isToday?: boolean;
|
|
25
|
+
/** Toggle current month styles. */
|
|
26
|
+
isCurrentMonth?: boolean;
|
|
27
|
+
/** Tooltip content shown when hovering or focusing a disabled Calendar Day. */
|
|
28
|
+
disabledError?: string;
|
|
29
|
+
/** Accessibility hint for the current day when it is not disabled. */
|
|
30
|
+
todayAccessibilityHint?: string;
|
|
31
|
+
/** Accessibility hint announced for highlighted dates. */
|
|
32
|
+
highlightedDateAccessibilityHint?: string;
|
|
33
|
+
/** Custom style for the date cell pressable wrapper */
|
|
34
|
+
style?: StyleProp<ViewStyle>;
|
|
35
|
+
};
|
|
36
|
+
export type CalendarRefHandle = {
|
|
37
|
+
/** Sets accessibility focus on the selected date, seed date, or today. */
|
|
38
|
+
focusInitialDate: () => void;
|
|
39
|
+
};
|
|
40
|
+
export type CalendarBaseProps = SharedProps &
|
|
41
|
+
Omit<BoxBaseProps, 'children'> & {
|
|
42
|
+
/** Currently selected Calendar date. Date used to generate the Calendar month. Will be rendered with active styles. */
|
|
43
|
+
selectedDate?: Date | null;
|
|
44
|
+
/** Date used to generate the Calendar month when there is no value for the `selectedDate` prop, defaults to today. */
|
|
45
|
+
seedDate?: Date;
|
|
46
|
+
/** Callback function fired when pressing a Calendar date. */
|
|
47
|
+
onPressDate?: (date: Date) => void;
|
|
48
|
+
/** Disables user interaction. */
|
|
49
|
+
disabled?: boolean;
|
|
50
|
+
/** Hides the Calendar next and previous month arrows. This probably only makes sense to be used when `minDate` and `maxDate` are set to the first and last days of the same month. */
|
|
51
|
+
hideControls?: boolean;
|
|
52
|
+
/** Array of disabled dates, and date tuples for date ranges. Make sure to set `disabledDateError` as well. A number is created for every individual date within a tuple range, so do not abuse this with massive ranges. */
|
|
53
|
+
disabledDates?: (Date | [Date, Date])[];
|
|
54
|
+
/** Array of highlighted dates, and date tuples for date ranges. A number is created for every individual date within a tuple range, so do not abuse this with massive ranges. */
|
|
55
|
+
highlightedDates?: (Date | [Date, Date])[];
|
|
56
|
+
/** Minimum date allowed to be selected, inclusive. Dates before the `minDate` are disabled. All navigation to months before the `minDate` is disabled. */
|
|
57
|
+
minDate?: Date;
|
|
58
|
+
/** Maximum date allowed to be selected, inclusive. Dates after the `maxDate` are disabled. All navigation to months after the `maxDate` is disabled. */
|
|
59
|
+
maxDate?: Date;
|
|
60
|
+
/**
|
|
61
|
+
* Tooltip content shown when hovering or focusing a disabled date, including dates before the `minDate` or after the `maxDate`.
|
|
62
|
+
* @default 'Date unavailable'
|
|
63
|
+
*/
|
|
64
|
+
disabledDateError?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Accessibility label describing the Calendar next month arrow.
|
|
67
|
+
* @default 'Go to next month'
|
|
68
|
+
*/
|
|
69
|
+
nextArrowAccessibilityLabel?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Accessibility label describing the Calendar previous month arrow.
|
|
72
|
+
* @default 'Go to previous month'
|
|
73
|
+
*/
|
|
74
|
+
previousArrowAccessibilityLabel?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Accessibility hint for the current day when it is not disabled. Omit or leave default for non-localized usage.
|
|
77
|
+
* @default 'Today'
|
|
78
|
+
*/
|
|
79
|
+
todayAccessibilityHint?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Accessibility hint announced for highlighted dates. Applied to all highlighted dates.
|
|
82
|
+
* @default 'Highlighted'
|
|
83
|
+
*/
|
|
84
|
+
highlightedDateAccessibilityHint?: string;
|
|
85
|
+
};
|
|
86
|
+
export type CalendarProps = CalendarBaseProps &
|
|
87
|
+
Omit<VStackProps, 'children' | 'ref'> & {
|
|
88
|
+
/** Custom styles for individual elements of the Calendar component. */
|
|
89
|
+
styles?: {
|
|
90
|
+
/** Root container element */
|
|
91
|
+
root?: StyleProp<ViewStyle>;
|
|
92
|
+
/** Header row containing month label and navigation arrows */
|
|
93
|
+
header?: StyleProp<ViewStyle>;
|
|
94
|
+
/** Month and year title text element */
|
|
95
|
+
title?: StyleProp<TextStyle>;
|
|
96
|
+
/** Navigation controls element */
|
|
97
|
+
navigation?: StyleProp<ViewStyle>;
|
|
98
|
+
/** Container for the days-of-week header and the date grid */
|
|
99
|
+
content?: StyleProp<ViewStyle>;
|
|
100
|
+
/** Individual date cell element, basic ViewStyle applied to the pressable wrapper */
|
|
101
|
+
day?: StyleProp<ViewStyle>;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
export declare const Calendar: import('react').MemoExoticComponent<
|
|
105
|
+
import('react').ForwardRefExoticComponent<
|
|
106
|
+
SharedProps &
|
|
107
|
+
Omit<BoxBaseProps, 'children'> & {
|
|
108
|
+
/** Currently selected Calendar date. Date used to generate the Calendar month. Will be rendered with active styles. */
|
|
109
|
+
selectedDate?: Date | null;
|
|
110
|
+
/** Date used to generate the Calendar month when there is no value for the `selectedDate` prop, defaults to today. */
|
|
111
|
+
seedDate?: Date;
|
|
112
|
+
/** Callback function fired when pressing a Calendar date. */
|
|
113
|
+
onPressDate?: (date: Date) => void;
|
|
114
|
+
/** Disables user interaction. */
|
|
115
|
+
disabled?: boolean;
|
|
116
|
+
/** Hides the Calendar next and previous month arrows. This probably only makes sense to be used when `minDate` and `maxDate` are set to the first and last days of the same month. */
|
|
117
|
+
hideControls?: boolean;
|
|
118
|
+
/** Array of disabled dates, and date tuples for date ranges. Make sure to set `disabledDateError` as well. A number is created for every individual date within a tuple range, so do not abuse this with massive ranges. */
|
|
119
|
+
disabledDates?: (Date | [Date, Date])[];
|
|
120
|
+
/** Array of highlighted dates, and date tuples for date ranges. A number is created for every individual date within a tuple range, so do not abuse this with massive ranges. */
|
|
121
|
+
highlightedDates?: (Date | [Date, Date])[];
|
|
122
|
+
/** Minimum date allowed to be selected, inclusive. Dates before the `minDate` are disabled. All navigation to months before the `minDate` is disabled. */
|
|
123
|
+
minDate?: Date;
|
|
124
|
+
/** Maximum date allowed to be selected, inclusive. Dates after the `maxDate` are disabled. All navigation to months after the `maxDate` is disabled. */
|
|
125
|
+
maxDate?: Date;
|
|
126
|
+
/**
|
|
127
|
+
* Tooltip content shown when hovering or focusing a disabled date, including dates before the `minDate` or after the `maxDate`.
|
|
128
|
+
* @default 'Date unavailable'
|
|
129
|
+
*/
|
|
130
|
+
disabledDateError?: string;
|
|
131
|
+
/**
|
|
132
|
+
* Accessibility label describing the Calendar next month arrow.
|
|
133
|
+
* @default 'Go to next month'
|
|
134
|
+
*/
|
|
135
|
+
nextArrowAccessibilityLabel?: string;
|
|
136
|
+
/**
|
|
137
|
+
* Accessibility label describing the Calendar previous month arrow.
|
|
138
|
+
* @default 'Go to previous month'
|
|
139
|
+
*/
|
|
140
|
+
previousArrowAccessibilityLabel?: string;
|
|
141
|
+
/**
|
|
142
|
+
* Accessibility hint for the current day when it is not disabled. Omit or leave default for non-localized usage.
|
|
143
|
+
* @default 'Today'
|
|
144
|
+
*/
|
|
145
|
+
todayAccessibilityHint?: string;
|
|
146
|
+
/**
|
|
147
|
+
* Accessibility hint announced for highlighted dates. Applied to all highlighted dates.
|
|
148
|
+
* @default 'Highlighted'
|
|
149
|
+
*/
|
|
150
|
+
highlightedDateAccessibilityHint?: string;
|
|
151
|
+
} & Omit<import('../layout').BoxProps, 'children' | 'ref'> & {
|
|
152
|
+
/** Custom styles for individual elements of the Calendar component. */
|
|
153
|
+
styles?: {
|
|
154
|
+
/** Root container element */
|
|
155
|
+
root?: StyleProp<ViewStyle>;
|
|
156
|
+
/** Header row containing month label and navigation arrows */
|
|
157
|
+
header?: StyleProp<ViewStyle>;
|
|
158
|
+
/** Month and year title text element */
|
|
159
|
+
title?: StyleProp<TextStyle>;
|
|
160
|
+
/** Navigation controls element */
|
|
161
|
+
navigation?: StyleProp<ViewStyle>;
|
|
162
|
+
/** Container for the days-of-week header and the date grid */
|
|
163
|
+
content?: StyleProp<ViewStyle>;
|
|
164
|
+
/** Individual date cell element, basic ViewStyle applied to the pressable wrapper */
|
|
165
|
+
day?: StyleProp<ViewStyle>;
|
|
166
|
+
};
|
|
167
|
+
} & import('react').RefAttributes<CalendarRefHandle>
|
|
168
|
+
>
|
|
169
|
+
>;
|
|
170
|
+
//# sourceMappingURL=Calendar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../src/dates/Calendar.tsx"],"names":[],"mappings":"AASA,OAAO,EACL,KAAK,SAAS,EAEd,KAAK,SAAS,EAEd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAMtB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAK9D,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAEvD,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,EAAa,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAiBzE,MAAM,MAAM,0BAA0B,GAAG,kBAAkB,GAAG;IAC5D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,aAAa,GAAG,IAAI,GAAG,WAAW,CAAC;CACjD,CAAC;AAwBF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,gCAAgC;IAChC,IAAI,EAAE,IAAI,CAAC;IACX,8DAA8D;IAC9D,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAC/B,4BAA4B;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iCAAiC;IACjC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,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;;OAGG;kCAC2B,MAAM;IACpC;;;OAGG;sCAC+B,MAAM;IACxC;;;OAGG;6BACsB,MAAM;IAC/B;;;OAGG;uCACgC,MAAM;;IAKzC,uEAAuE;aAC9D;QACP,6BAA6B;QAC7B,IAAI,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAC5B,8DAA8D;QAC9D,MAAM,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAC9B,wCAAwC;QACxC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAC7B,kCAAkC;QAClC,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAClC,8DAA8D;QAC9D,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAC/B,qFAAqF;QACrF,GAAG,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;KAC5B;sDA4PJ,CAAC"}
|
package/dts/dates/DateInput.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type DateInputProps = {
|
|
|
6
6
|
/** Date format separator character, e.g. the / in "MM/DD/YYYY". Defaults to forward slash (/). */
|
|
7
7
|
separator?: string;
|
|
8
8
|
style?: StyleProp<ViewStyle>;
|
|
9
|
-
} & Omit<DateInputOptions, '
|
|
9
|
+
} & Omit<DateInputOptions, 'intlDateFormat'> &
|
|
10
10
|
Omit<TextInputProps, 'inputNode' | 'value' | 'defaultValue' | 'style'>;
|
|
11
11
|
export declare const DateInput: React.MemoExoticComponent<
|
|
12
12
|
React.ForwardRefExoticComponent<
|
|
@@ -14,7 +14,7 @@ export declare const DateInput: React.MemoExoticComponent<
|
|
|
14
14
|
/** Date format separator character, e.g. the / in "MM/DD/YYYY". Defaults to forward slash (/). */
|
|
15
15
|
separator?: string;
|
|
16
16
|
style?: StyleProp<ViewStyle>;
|
|
17
|
-
} & Omit<DateInputOptions, '
|
|
17
|
+
} & Omit<DateInputOptions, 'intlDateFormat'> &
|
|
18
18
|
Omit<TextInputProps, 'value' | 'style' | 'defaultValue' | 'inputNode'> &
|
|
19
19
|
React.RefAttributes<NativeTextInput>
|
|
20
20
|
>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../src/dates/DateInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAC9E,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,SAAS,IAAI,eAAe,EAIjC,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,KAAK,gBAAgB,EAAgB,MAAM,yCAAyC,CAAC;AAG9F,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGvE,MAAM,MAAM,cAAc,GAAG;IAC3B,kGAAkG;IAClG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,GAAG,IAAI,CAAC,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../src/dates/DateInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAC9E,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,SAAS,IAAI,eAAe,EAIjC,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,KAAK,gBAAgB,EAAgB,MAAM,yCAAyC,CAAC;AAG9F,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGvE,MAAM,MAAM,cAAc,GAAG;IAC3B,kGAAkG;IAClG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,GAAG,IAAI,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,GAC1C,IAAI,CAAC,cAAc,EAAE,WAAW,GAAG,OAAO,GAAG,cAAc,GAAG,OAAO,CAAC,CAAC;AAEzE,eAAO,MAAM,SAAS;IANpB,kGAAkG;gBACtF,MAAM;YACV,SAAS,CAAC,SAAS,CAAC;8JAsH7B,CAAC"}
|
|
@@ -2,12 +2,26 @@ import {
|
|
|
2
2
|
type NativeSyntheticEvent,
|
|
3
3
|
type StyleProp,
|
|
4
4
|
type TextInputChangeEventData,
|
|
5
|
+
type TextStyle,
|
|
5
6
|
type View,
|
|
6
7
|
type ViewStyle,
|
|
7
8
|
} from 'react-native';
|
|
8
|
-
import {
|
|
9
|
+
import type { DateInputValidationError } from '@coinbase/cds-common/dates/DateInputValidationError';
|
|
10
|
+
import { type CalendarBaseProps } from './Calendar';
|
|
9
11
|
import { type DateInputProps } from './DateInput';
|
|
10
|
-
export type
|
|
12
|
+
export type DatePickerBaseProps = Pick<
|
|
13
|
+
CalendarBaseProps,
|
|
14
|
+
| 'disabled'
|
|
15
|
+
| 'disabledDates'
|
|
16
|
+
| 'disabledDateError'
|
|
17
|
+
| 'highlightedDateAccessibilityHint'
|
|
18
|
+
| 'highlightedDates'
|
|
19
|
+
| 'maxDate'
|
|
20
|
+
| 'minDate'
|
|
21
|
+
| 'nextArrowAccessibilityLabel'
|
|
22
|
+
| 'previousArrowAccessibilityLabel'
|
|
23
|
+
| 'seedDate'
|
|
24
|
+
> & {
|
|
11
25
|
/** Control the date value of the DatePicker. */
|
|
12
26
|
date: Date | null;
|
|
13
27
|
/** Callback function fired when the date changes, e.g. when a valid date is selected or unselected. */
|
|
@@ -16,49 +30,84 @@ export type DatePickerProps = {
|
|
|
16
30
|
error: DateInputValidationError | null;
|
|
17
31
|
/** Callback function fired when validation finds an error, e.g. required input fields and impossible or disabled dates. Will always be called after `onChangeDate`. */
|
|
18
32
|
onErrorDate: (error: DateInputValidationError | null) => void;
|
|
19
|
-
/**
|
|
20
|
-
seedDate?: Date;
|
|
21
|
-
/** Disables user interaction. */
|
|
22
|
-
disabled?: boolean;
|
|
23
|
-
/** Minimum date allowed to be selected, inclusive. Dates before the `minDate` are disabled. All navigation to months before the `minDate` is disabled. */
|
|
24
|
-
minDate?: Date;
|
|
25
|
-
/** Maximum date allowed to be selected, inclusive. Dates after the `maxDate` are disabled. All navigation to months after the `maxDate` is disabled. */
|
|
26
|
-
maxDate?: Date;
|
|
27
|
-
/**
|
|
28
|
-
* Error text to display when a disabled date is selected with the DateInput, including dates before the `minDate` or after the `maxDate`.
|
|
29
|
-
* @default 'Date unavailable'
|
|
30
|
-
*/
|
|
31
|
-
disabledDateError?: string;
|
|
32
|
-
/** Callback function fired when the DateInput text value changes. Prefer to use `onChangeDate` instead. Will always be called before `onChangeDate`. This prop should only be used for edge cases, such as custom error handling. */
|
|
33
|
-
onChange?: (event: NativeSyntheticEvent<TextInputChangeEventData>) => void;
|
|
34
|
-
/** Callback function fired when the react-native-date-picker keyboard control is opened. */
|
|
33
|
+
/** Callback function fired when the picker is opened. */
|
|
35
34
|
onOpen?: () => void;
|
|
36
|
-
/** Callback function fired when the
|
|
35
|
+
/** Callback function fired when the picker is closed. Will always be called after `onCancel`, `onConfirm`, and `onChangeDate`. */
|
|
37
36
|
onClose?: () => void;
|
|
38
|
-
/** Callback function fired when the user selects a date using the
|
|
37
|
+
/** Callback function fired when the user selects a date using the picker. Interacting with the DateInput does not fire this callback. Will always be called before `onClose`. */
|
|
39
38
|
onConfirm?: () => void;
|
|
40
|
-
/** Callback function fired when the user closes the
|
|
39
|
+
/** Callback function fired when the user closes the picker without selecting a date. Interacting with the DateInput does not fire this callback. Will always be called before `onClose`. */
|
|
41
40
|
onCancel?: () => void;
|
|
42
41
|
/**
|
|
43
42
|
* Accessibility label describing the calendar IconButton, which opens the calendar when pressed.
|
|
44
|
-
* @
|
|
43
|
+
* @deprecated Use openCalendarAccessibilityLabel/closeCalendarAccessibilityLabel instead
|
|
45
44
|
*/
|
|
46
45
|
calendarIconButtonAccessibilityLabel?: string;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
46
|
+
/**
|
|
47
|
+
* Accessibility label for the calendar IconButton, which opens the calendar when pressed.
|
|
48
|
+
* @default 'Open calendar'
|
|
49
|
+
*/
|
|
50
|
+
openCalendarAccessibilityLabel?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Accessibility label for the handle bar that closes the picker.
|
|
53
|
+
* @default 'Close calendar without selecting a date'
|
|
54
|
+
*/
|
|
55
|
+
closeCalendarAccessibilityLabel?: string;
|
|
56
|
+
};
|
|
57
|
+
export type DatePickerProps = DatePickerBaseProps &
|
|
58
|
+
Omit<
|
|
59
|
+
DateInputProps,
|
|
60
|
+
| 'date'
|
|
61
|
+
| 'separator'
|
|
62
|
+
| 'onChangeDate'
|
|
63
|
+
| 'disabledDates'
|
|
64
|
+
| 'minDate'
|
|
65
|
+
| 'maxDate'
|
|
66
|
+
| 'disabledDateError'
|
|
67
|
+
| 'style'
|
|
68
|
+
> & {
|
|
69
|
+
/** Callback function fired when the DateInput text value changes. Prefer to use `onChangeDate` instead. Will always be called before `onChangeDate`. This prop should only be used for edge cases, such as custom error handling. */
|
|
70
|
+
onChange?: (event: NativeSyntheticEvent<TextInputChangeEventData>) => void;
|
|
71
|
+
/**
|
|
72
|
+
* Custom style to apply to the DateInput.
|
|
73
|
+
* @deprecated Use `styles.dateInput` instead.
|
|
74
|
+
*/
|
|
75
|
+
dateInputStyle?: StyleProp<ViewStyle>;
|
|
76
|
+
/**
|
|
77
|
+
* Text to display on the confirm button.
|
|
78
|
+
* @default 'Confirm'
|
|
79
|
+
*/
|
|
80
|
+
confirmText?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Accessibility hint for the confirm button.
|
|
83
|
+
*/
|
|
84
|
+
confirmButtonAccessibilityHint?: string;
|
|
85
|
+
/** Custom styles for the DateInput and Calendar subcomponents. */
|
|
86
|
+
styles?: {
|
|
87
|
+
dateInput?: DateInputProps['style'];
|
|
88
|
+
calendar?: StyleProp<ViewStyle>;
|
|
89
|
+
calendarHeader?: StyleProp<ViewStyle>;
|
|
90
|
+
calendarTitle?: StyleProp<TextStyle>;
|
|
91
|
+
calendarNavigation?: StyleProp<ViewStyle>;
|
|
92
|
+
calendarContent?: StyleProp<ViewStyle>;
|
|
93
|
+
calendarDay?: StyleProp<ViewStyle>;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
59
96
|
export declare const DatePicker: import('react').MemoExoticComponent<
|
|
60
97
|
import('react').ForwardRefExoticComponent<
|
|
61
|
-
|
|
98
|
+
Pick<
|
|
99
|
+
CalendarBaseProps,
|
|
100
|
+
| 'disabled'
|
|
101
|
+
| 'previousArrowAccessibilityLabel'
|
|
102
|
+
| 'nextArrowAccessibilityLabel'
|
|
103
|
+
| 'highlightedDateAccessibilityHint'
|
|
104
|
+
| 'seedDate'
|
|
105
|
+
| 'disabledDates'
|
|
106
|
+
| 'highlightedDates'
|
|
107
|
+
| 'minDate'
|
|
108
|
+
| 'maxDate'
|
|
109
|
+
| 'disabledDateError'
|
|
110
|
+
> & {
|
|
62
111
|
/** Control the date value of the DatePicker. */
|
|
63
112
|
date: Date | null;
|
|
64
113
|
/** Callback function fired when the date changes, e.g. when a valid date is selected or unselected. */
|
|
@@ -67,47 +116,67 @@ export declare const DatePicker: import('react').MemoExoticComponent<
|
|
|
67
116
|
error: DateInputValidationError | null;
|
|
68
117
|
/** Callback function fired when validation finds an error, e.g. required input fields and impossible or disabled dates. Will always be called after `onChangeDate`. */
|
|
69
118
|
onErrorDate: (error: DateInputValidationError | null) => void;
|
|
70
|
-
/**
|
|
71
|
-
seedDate?: Date;
|
|
72
|
-
/** Disables user interaction. */
|
|
73
|
-
disabled?: boolean;
|
|
74
|
-
/** Minimum date allowed to be selected, inclusive. Dates before the `minDate` are disabled. All navigation to months before the `minDate` is disabled. */
|
|
75
|
-
minDate?: Date;
|
|
76
|
-
/** Maximum date allowed to be selected, inclusive. Dates after the `maxDate` are disabled. All navigation to months after the `maxDate` is disabled. */
|
|
77
|
-
maxDate?: Date;
|
|
78
|
-
/**
|
|
79
|
-
* Error text to display when a disabled date is selected with the DateInput, including dates before the `minDate` or after the `maxDate`.
|
|
80
|
-
* @default 'Date unavailable'
|
|
81
|
-
*/
|
|
82
|
-
disabledDateError?: string;
|
|
83
|
-
/** Callback function fired when the DateInput text value changes. Prefer to use `onChangeDate` instead. Will always be called before `onChangeDate`. This prop should only be used for edge cases, such as custom error handling. */
|
|
84
|
-
onChange?: (event: NativeSyntheticEvent<TextInputChangeEventData>) => void;
|
|
85
|
-
/** Callback function fired when the react-native-date-picker keyboard control is opened. */
|
|
119
|
+
/** Callback function fired when the picker is opened. */
|
|
86
120
|
onOpen?: () => void;
|
|
87
|
-
/** Callback function fired when the
|
|
121
|
+
/** Callback function fired when the picker is closed. Will always be called after `onCancel`, `onConfirm`, and `onChangeDate`. */
|
|
88
122
|
onClose?: () => void;
|
|
89
|
-
/** Callback function fired when the user selects a date using the
|
|
123
|
+
/** Callback function fired when the user selects a date using the picker. Interacting with the DateInput does not fire this callback. Will always be called before `onClose`. */
|
|
90
124
|
onConfirm?: () => void;
|
|
91
|
-
/** Callback function fired when the user closes the
|
|
125
|
+
/** Callback function fired when the user closes the picker without selecting a date. Interacting with the DateInput does not fire this callback. Will always be called before `onClose`. */
|
|
92
126
|
onCancel?: () => void;
|
|
93
127
|
/**
|
|
94
128
|
* Accessibility label describing the calendar IconButton, which opens the calendar when pressed.
|
|
95
|
-
* @
|
|
129
|
+
* @deprecated Use openCalendarAccessibilityLabel/closeCalendarAccessibilityLabel instead
|
|
96
130
|
*/
|
|
97
131
|
calendarIconButtonAccessibilityLabel?: string;
|
|
98
|
-
|
|
132
|
+
/**
|
|
133
|
+
* Accessibility label for the calendar IconButton, which opens the calendar when pressed.
|
|
134
|
+
* @default 'Open calendar'
|
|
135
|
+
*/
|
|
136
|
+
openCalendarAccessibilityLabel?: string;
|
|
137
|
+
/**
|
|
138
|
+
* Accessibility label for the handle bar that closes the picker.
|
|
139
|
+
* @default 'Close calendar without selecting a date'
|
|
140
|
+
*/
|
|
141
|
+
closeCalendarAccessibilityLabel?: string;
|
|
99
142
|
} & Omit<
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
143
|
+
DateInputProps,
|
|
144
|
+
| 'style'
|
|
145
|
+
| 'separator'
|
|
146
|
+
| 'date'
|
|
147
|
+
| 'disabledDates'
|
|
148
|
+
| 'minDate'
|
|
149
|
+
| 'maxDate'
|
|
150
|
+
| 'disabledDateError'
|
|
151
|
+
| 'onChangeDate'
|
|
152
|
+
> & {
|
|
153
|
+
/** Callback function fired when the DateInput text value changes. Prefer to use `onChangeDate` instead. Will always be called before `onChangeDate`. This prop should only be used for edge cases, such as custom error handling. */
|
|
154
|
+
onChange?: (event: NativeSyntheticEvent<TextInputChangeEventData>) => void;
|
|
155
|
+
/**
|
|
156
|
+
* Custom style to apply to the DateInput.
|
|
157
|
+
* @deprecated Use `styles.dateInput` instead.
|
|
158
|
+
*/
|
|
159
|
+
dateInputStyle?: StyleProp<ViewStyle>;
|
|
160
|
+
/**
|
|
161
|
+
* Text to display on the confirm button.
|
|
162
|
+
* @default 'Confirm'
|
|
163
|
+
*/
|
|
164
|
+
confirmText?: string;
|
|
165
|
+
/**
|
|
166
|
+
* Accessibility hint for the confirm button.
|
|
167
|
+
*/
|
|
168
|
+
confirmButtonAccessibilityHint?: string;
|
|
169
|
+
/** Custom styles for the DateInput and Calendar subcomponents. */
|
|
170
|
+
styles?: {
|
|
171
|
+
dateInput?: DateInputProps['style'];
|
|
172
|
+
calendar?: StyleProp<ViewStyle>;
|
|
173
|
+
calendarHeader?: StyleProp<ViewStyle>;
|
|
174
|
+
calendarTitle?: StyleProp<TextStyle>;
|
|
175
|
+
calendarNavigation?: StyleProp<ViewStyle>;
|
|
176
|
+
calendarContent?: StyleProp<ViewStyle>;
|
|
177
|
+
calendarDay?: StyleProp<ViewStyle>;
|
|
178
|
+
};
|
|
179
|
+
} & import('react').RefAttributes<View>
|
|
111
180
|
>
|
|
112
181
|
>;
|
|
113
182
|
//# sourceMappingURL=DatePicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../src/dates/DatePicker.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,SAAS,EAEd,KAAK,wBAAwB,EAC7B,KAAK,IAAI,EACT,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../src/dates/DatePicker.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,SAAS,EAEd,KAAK,wBAAwB,EAC7B,KAAK,SAAS,EACd,KAAK,IAAI,EACT,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qDAAqD,CAAC;AAQpG,OAAO,EAAY,KAAK,iBAAiB,EAA0B,MAAM,YAAY,CAAC;AACtF,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7D,MAAM,MAAM,mBAAmB,GAAG,IAAI,CACpC,iBAAiB,EACf,UAAU,GACV,eAAe,GACf,mBAAmB,GACnB,kCAAkC,GAClC,kBAAkB,GAClB,SAAS,GACT,SAAS,GACT,6BAA6B,GAC7B,iCAAiC,GACjC,UAAU,CACb,GAAG;IACF,gDAAgD;IAChD,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,uGAAuG;IACvG,YAAY,EAAE,CAAC,YAAY,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IAClD,iDAAiD;IACjD,KAAK,EAAE,wBAAwB,GAAG,IAAI,CA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6 +71,8 @@ export type DrawerBaseProps = SharedProps &
|
|
|
71
71
|
* the slide transform so the drawer follows the user's finger naturally.
|
|
72
72
|
*/
|
|
73
73
|
reduceMotion?: boolean;
|
|
74
|
+
/** Callback fired when the open animation completes. */
|
|
75
|
+
onOpenComplete?: () => void;
|
|
74
76
|
};
|
|
75
77
|
export type DrawerProps = DrawerBaseProps & {
|
|
76
78
|
styles?: {
|
|
@@ -148,6 +150,8 @@ export declare const Drawer: React.MemoExoticComponent<
|
|
|
148
150
|
* the slide transform so the drawer follows the user's finger naturally.
|
|
149
151
|
*/
|
|
150
152
|
reduceMotion?: boolean;
|
|
153
|
+
/** Callback fired when the open animation completes. */
|
|
154
|
+
onOpenComplete?: () => void;
|
|
151
155
|
} & {
|
|
152
156
|
styles?: {
|
|
153
157
|
/** Root container element */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../src/overlays/drawer/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KASN,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAarF,OAAO,KAAK,EACV,gBAAgB,EAChB,wBAAwB,EACxB,WAAW,EACZ,MAAM,4BAA4B,CAAC;AAIpC,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;AASxE,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,EAAE,CAAC;IAAE,WAAW,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC,CAAC;AAEzE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,gDAAgD;IAChD,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,WAAW,GACvC,IAAI,CAAC,wBAAwB,EAAE,oBAAoB,GAAG,yBAAyB,CAAC,GAChF,IAAI,CAAC,UAAU,EAAE,gBAAgB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;QACrC,MAAM,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;KAC/B;6CAsOF,CAAC"}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type
|
|
2
|
+
import { type AccessibilityState } from 'react-native';
|
|
3
|
+
import type { TooltipBaseProps } from './TooltipProps';
|
|
4
|
+
export type TooltipProps = TooltipBaseProps & {
|
|
5
|
+
/**
|
|
6
|
+
* Accessibility state for the trigger.
|
|
7
|
+
*/
|
|
8
|
+
accessibilityState?: AccessibilityState;
|
|
9
|
+
};
|
|
3
10
|
export declare const Tooltip: React.MemoExoticComponent<
|
|
4
11
|
({
|
|
5
12
|
children,
|
|
@@ -14,6 +21,7 @@ export declare const Tooltip: React.MemoExoticComponent<
|
|
|
14
21
|
accessibilityHint,
|
|
15
22
|
accessibilityLabelForContent,
|
|
16
23
|
accessibilityHintForContent,
|
|
24
|
+
accessibilityState,
|
|
17
25
|
visible,
|
|
18
26
|
invertColorScheme,
|
|
19
27
|
elevation,
|