@utilitywarehouse/hearth-react-native 0.27.3 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +1 -1
- package/.turbo/turbo-lint.log +18 -19
- package/CHANGELOG.md +110 -0
- package/build/components/Combobox/Combobox.context.d.ts +13 -0
- package/build/components/Combobox/Combobox.context.js +9 -0
- package/build/components/Combobox/Combobox.d.ts +6 -0
- package/build/components/Combobox/Combobox.js +246 -0
- package/build/components/Combobox/Combobox.props.d.ts +180 -0
- package/build/components/Combobox/Combobox.props.js +1 -0
- package/build/components/Combobox/ComboboxOption.d.ts +6 -0
- package/build/components/Combobox/ComboboxOption.js +56 -0
- package/build/components/Combobox/index.d.ts +4 -0
- package/build/components/Combobox/index.js +3 -0
- package/build/components/Modal/Modal.js +26 -42
- package/build/components/Modal/Modal.web.js +3 -3
- package/build/components/Pagination/Pagination.d.ts +6 -0
- package/build/components/Pagination/Pagination.js +125 -0
- package/build/components/Pagination/Pagination.props.d.ts +26 -0
- package/build/components/Pagination/Pagination.props.js +1 -0
- package/build/components/Pagination/Pagination.utils.d.ts +2 -0
- package/build/components/Pagination/Pagination.utils.js +20 -0
- package/build/components/Pagination/Pagination.utils.test.d.ts +1 -0
- package/build/components/Pagination/Pagination.utils.test.js +16 -0
- package/build/components/Pagination/index.d.ts +2 -0
- package/build/components/Pagination/index.js +1 -0
- package/build/components/SafeAreaView/SafeAreaView.d.ts +5 -0
- package/build/components/SafeAreaView/SafeAreaView.js +117 -0
- package/build/components/SafeAreaView/SafeAreaView.props.d.ts +17 -0
- package/build/components/SafeAreaView/SafeAreaView.props.js +1 -0
- package/build/components/SafeAreaView/index.d.ts +2 -0
- package/build/components/SafeAreaView/index.js +1 -0
- package/build/components/Select/Select.js +3 -2
- package/build/components/Table/Table.context.d.ts +12 -0
- package/build/components/Table/Table.context.js +9 -0
- package/build/components/Table/Table.d.ts +6 -0
- package/build/components/Table/Table.js +71 -0
- package/build/components/Table/Table.props.d.ts +56 -0
- package/build/components/Table/Table.props.js +1 -0
- package/build/components/Table/Table.utils.d.ts +5 -0
- package/build/components/Table/Table.utils.js +48 -0
- package/build/components/Table/Table.utils.test.d.ts +1 -0
- package/build/components/Table/Table.utils.test.js +71 -0
- package/build/components/Table/TableBody.d.ts +6 -0
- package/build/components/Table/TableBody.js +16 -0
- package/build/components/Table/TableCell.d.ts +10 -0
- package/build/components/Table/TableCell.js +44 -0
- package/build/components/Table/TableHeader.d.ts +6 -0
- package/build/components/Table/TableHeader.js +24 -0
- package/build/components/Table/TableHeaderCell.d.ts +10 -0
- package/build/components/Table/TableHeaderCell.js +97 -0
- package/build/components/Table/TablePagination.d.ts +6 -0
- package/build/components/Table/TablePagination.js +7 -0
- package/build/components/Table/TableRow.d.ts +8 -0
- package/build/components/Table/TableRow.js +25 -0
- package/build/components/Table/index.d.ts +8 -0
- package/build/components/Table/index.js +7 -0
- package/build/components/Timeline/Timeline.d.ts +6 -0
- package/build/components/Timeline/Timeline.js +34 -0
- package/build/components/Timeline/Timeline.props.d.ts +47 -0
- package/build/components/Timeline/Timeline.props.js +1 -0
- package/build/components/Timeline/TimelineItem.d.ts +6 -0
- package/build/components/Timeline/TimelineItem.js +235 -0
- package/build/components/Timeline/index.d.ts +3 -0
- package/build/components/Timeline/index.js +2 -0
- package/build/components/index.d.ts +5 -0
- package/build/components/index.js +5 -0
- package/build/tokens/components/dark/timeline.d.ts +2 -2
- package/build/tokens/components/dark/timeline.js +2 -2
- package/docs/components/AllComponents.web.tsx +106 -23
- package/docs/llm-docs/unistyles-llms-full.txt +1132 -534
- package/docs/llm-docs/unistyles-llms-small.txt +37 -37
- package/package.json +2 -2
- package/src/components/Combobox/Combobox.context.ts +26 -0
- package/src/components/Combobox/Combobox.docs.mdx +277 -0
- package/src/components/Combobox/Combobox.figma.tsx +60 -0
- package/src/components/Combobox/Combobox.props.ts +187 -0
- package/src/components/Combobox/Combobox.stories.tsx +233 -0
- package/src/components/Combobox/Combobox.tsx +446 -0
- package/src/components/Combobox/ComboboxOption.tsx +100 -0
- package/src/components/Combobox/index.ts +9 -0
- package/src/components/Modal/Modal.tsx +52 -74
- package/src/components/Modal/Modal.web.tsx +3 -3
- package/src/components/Pagination/Pagination.docs.mdx +99 -0
- package/src/components/Pagination/Pagination.figma.tsx +20 -0
- package/src/components/Pagination/Pagination.props.ts +28 -0
- package/src/components/Pagination/Pagination.stories.tsx +88 -0
- package/src/components/Pagination/Pagination.tsx +248 -0
- package/src/components/Pagination/Pagination.utils.test.ts +20 -0
- package/src/components/Pagination/Pagination.utils.ts +37 -0
- package/src/components/Pagination/index.ts +2 -0
- package/src/components/SafeAreaView/SafeAreaView.props.ts +20 -0
- package/src/components/SafeAreaView/SafeAreaView.tsx +173 -0
- package/src/components/SafeAreaView/index.ts +2 -0
- package/src/components/Select/Select.tsx +30 -27
- package/src/components/Table/Table.context.tsx +23 -0
- package/src/components/Table/Table.docs.mdx +239 -0
- package/src/components/Table/Table.figma.tsx +65 -0
- package/src/components/Table/Table.props.ts +65 -0
- package/src/components/Table/Table.stories.tsx +399 -0
- package/src/components/Table/Table.tsx +127 -0
- package/src/components/Table/Table.utils.test.ts +82 -0
- package/src/components/Table/Table.utils.ts +72 -0
- package/src/components/Table/TableBody.tsx +25 -0
- package/src/components/Table/TableCell.tsx +67 -0
- package/src/components/Table/TableHeader.tsx +41 -0
- package/src/components/Table/TableHeaderCell.tsx +136 -0
- package/src/components/Table/TablePagination.tsx +10 -0
- package/src/components/Table/TableRow.tsx +42 -0
- package/src/components/Table/index.ts +16 -0
- package/src/components/Timeline/Timeline.docs.mdx +177 -0
- package/src/components/Timeline/Timeline.figma.tsx +89 -0
- package/src/components/Timeline/Timeline.props.ts +51 -0
- package/src/components/Timeline/Timeline.stories.tsx +102 -0
- package/src/components/Timeline/Timeline.tsx +48 -0
- package/src/components/Timeline/TimelineItem.tsx +293 -0
- package/src/components/Timeline/index.ts +9 -0
- package/src/components/index.ts +5 -0
- package/src/tokens/components/dark/timeline.ts +2 -2
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ViewProps } from 'react-native';
|
|
2
|
+
export type TimelineVariant = 'static' | 'progress';
|
|
3
|
+
export type TimelineItemState = 'complete' | 'active' | 'incomplete';
|
|
4
|
+
export type TimelineItemPosition = 'single' | 'start' | 'middle' | 'end';
|
|
5
|
+
export interface TimelineProps extends ViewProps {
|
|
6
|
+
/**
|
|
7
|
+
* Child TimelineItem components.
|
|
8
|
+
*/
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Controls the indicator style used by all child timeline items.
|
|
12
|
+
* @default 'static'
|
|
13
|
+
*/
|
|
14
|
+
variant?: TimelineVariant;
|
|
15
|
+
}
|
|
16
|
+
export interface TimelineItemProps extends ViewProps {
|
|
17
|
+
/**
|
|
18
|
+
* The primary label for the timeline item.
|
|
19
|
+
*/
|
|
20
|
+
label: string;
|
|
21
|
+
/**
|
|
22
|
+
* Optional supporting text displayed beneath the label.
|
|
23
|
+
*/
|
|
24
|
+
helperText?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Visual state for progress timelines.
|
|
27
|
+
* @default 'incomplete'
|
|
28
|
+
*/
|
|
29
|
+
state?: TimelineItemState;
|
|
30
|
+
/**
|
|
31
|
+
* Optional custom content rendered beneath the text content.
|
|
32
|
+
*/
|
|
33
|
+
children?: React.ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* The timeline variant used when the item is rendered standalone.
|
|
36
|
+
* Items inside Timeline receive this automatically.
|
|
37
|
+
* @default 'static'
|
|
38
|
+
*/
|
|
39
|
+
variant?: TimelineVariant;
|
|
40
|
+
/**
|
|
41
|
+
* The item's position in the timeline used to draw connectors.
|
|
42
|
+
* Items inside Timeline receive this automatically.
|
|
43
|
+
* @default 'single'
|
|
44
|
+
*/
|
|
45
|
+
position?: TimelineItemPosition;
|
|
46
|
+
}
|
|
47
|
+
export default TimelineProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { TimelineItemProps } from './Timeline.props';
|
|
2
|
+
declare const TimelineItem: {
|
|
3
|
+
({ children, helperText, label, position, state, style, variant, accessibilityLabel: accessibilityLabelProp, accessible: accessibleProp, ...rest }: TimelineItemProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
6
|
+
export default TimelineItem;
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { TickSmallIcon } from '@utilitywarehouse/hearth-react-native-icons';
|
|
3
|
+
import { View } from 'react-native';
|
|
4
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
5
|
+
import { BodyText } from '../BodyText';
|
|
6
|
+
import { Icon } from '../Icon';
|
|
7
|
+
const TimelineItem = ({ children, helperText, label, position = 'single', state = 'incomplete', style, variant = 'static', accessibilityLabel: accessibilityLabelProp, accessible: accessibleProp, ...rest }) => {
|
|
8
|
+
styles.useVariants({ position, state, variant });
|
|
9
|
+
const hasCustomContent = Boolean(children);
|
|
10
|
+
const computedAccessibilityLabel = [
|
|
11
|
+
label,
|
|
12
|
+
helperText,
|
|
13
|
+
variant === 'progress' ? `Step ${state}` : undefined,
|
|
14
|
+
]
|
|
15
|
+
.filter(Boolean)
|
|
16
|
+
.join(', ');
|
|
17
|
+
return (_jsxs(View, { style: [styles.item, style], ...rest, accessible: accessibleProp ?? !hasCustomContent, accessibilityLabel: (accessibleProp ?? !hasCustomContent)
|
|
18
|
+
? (accessibilityLabelProp ?? computedAccessibilityLabel)
|
|
19
|
+
: undefined, children: [_jsxs(View, { style: styles.indicatorColumn, children: [(position === 'middle' || position === 'end') && _jsx(View, { style: styles.topConnector }), _jsx(View, { style: styles.circle, children: variant === 'progress' && state === 'complete' ? (_jsx(Icon, { as: TickSmallIcon, width: 20, height: 20, style: styles.completeIcon })) : variant === 'progress' && state === 'active' ? (_jsx(View, { style: styles.activeInnerDot })) : null }), (position === 'start' || position === 'middle') && _jsx(View, { style: styles.bottomConnector })] }), _jsxs(View, { style: styles.content, children: [_jsxs(View, { style: styles.textContent, accessible: hasCustomContent, accessibilityLabel: hasCustomContent ? (accessibilityLabelProp ?? computedAccessibilityLabel) : undefined, children: [_jsx(BodyText, { size: "md", weight: "semibold", style: styles.label, children: label }), helperText ? (_jsx(BodyText, { size: "md", style: styles.helperText, children: helperText })) : null] }), children ? _jsx(View, { style: styles.customContent, children: children }) : null] })] }));
|
|
20
|
+
};
|
|
21
|
+
TimelineItem.displayName = 'TimelineItem';
|
|
22
|
+
const styles = StyleSheet.create(theme => ({
|
|
23
|
+
item: {
|
|
24
|
+
flexDirection: 'row',
|
|
25
|
+
gap: theme.components.timeline.gap,
|
|
26
|
+
width: '100%',
|
|
27
|
+
},
|
|
28
|
+
indicatorColumn: {
|
|
29
|
+
alignItems: 'center',
|
|
30
|
+
variants: {
|
|
31
|
+
variant: {
|
|
32
|
+
static: {
|
|
33
|
+
width: theme.components.timeline.static.circle.width,
|
|
34
|
+
},
|
|
35
|
+
progress: {
|
|
36
|
+
width: theme.components.timeline.progress.circle.width,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
topConnector: {
|
|
42
|
+
width: theme.components.timeline.bar.width,
|
|
43
|
+
variants: {
|
|
44
|
+
variant: {
|
|
45
|
+
static: {
|
|
46
|
+
height: theme.components.timeline.static.circle.height / 2,
|
|
47
|
+
backgroundColor: theme.color.surface.brand.default,
|
|
48
|
+
},
|
|
49
|
+
progress: {
|
|
50
|
+
height: 0,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
state: {
|
|
54
|
+
complete: {},
|
|
55
|
+
active: {},
|
|
56
|
+
incomplete: {},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
compoundVariants: [
|
|
60
|
+
{
|
|
61
|
+
variant: 'progress',
|
|
62
|
+
state: 'complete',
|
|
63
|
+
styles: {
|
|
64
|
+
backgroundColor: theme.color.surface.brand.default,
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
variant: 'progress',
|
|
69
|
+
state: 'active',
|
|
70
|
+
styles: {
|
|
71
|
+
backgroundColor: theme.color.surface.brand.default,
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
variant: 'progress',
|
|
76
|
+
state: 'incomplete',
|
|
77
|
+
styles: {
|
|
78
|
+
backgroundColor: theme.color.border.subtle,
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
bottomConnector: {
|
|
84
|
+
flex: 1,
|
|
85
|
+
minHeight: theme.components.timeline.content.paddingBottom,
|
|
86
|
+
width: theme.components.timeline.bar.width,
|
|
87
|
+
variants: {
|
|
88
|
+
variant: {
|
|
89
|
+
static: {
|
|
90
|
+
backgroundColor: theme.color.surface.brand.default,
|
|
91
|
+
},
|
|
92
|
+
progress: {},
|
|
93
|
+
},
|
|
94
|
+
state: {
|
|
95
|
+
complete: {},
|
|
96
|
+
active: {},
|
|
97
|
+
incomplete: {},
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
compoundVariants: [
|
|
101
|
+
{
|
|
102
|
+
variant: 'progress',
|
|
103
|
+
state: 'complete',
|
|
104
|
+
styles: {
|
|
105
|
+
backgroundColor: theme.color.surface.brand.default,
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
variant: 'progress',
|
|
110
|
+
state: 'active',
|
|
111
|
+
styles: {
|
|
112
|
+
backgroundColor: theme.color.border.subtle,
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
variant: 'progress',
|
|
117
|
+
state: 'incomplete',
|
|
118
|
+
styles: {
|
|
119
|
+
backgroundColor: theme.color.border.subtle,
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
},
|
|
124
|
+
circle: {
|
|
125
|
+
borderRadius: theme.borderRadius.full,
|
|
126
|
+
alignItems: 'center',
|
|
127
|
+
justifyContent: 'center',
|
|
128
|
+
padding: 2,
|
|
129
|
+
variants: {
|
|
130
|
+
variant: {
|
|
131
|
+
static: {
|
|
132
|
+
width: theme.components.timeline.static.circle.width,
|
|
133
|
+
height: theme.components.timeline.static.circle.height,
|
|
134
|
+
backgroundColor: theme.color.surface.brand.default,
|
|
135
|
+
},
|
|
136
|
+
progress: {
|
|
137
|
+
width: theme.components.timeline.progress.circle.width,
|
|
138
|
+
height: theme.components.timeline.progress.circle.height,
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
state: {
|
|
142
|
+
complete: {},
|
|
143
|
+
active: {},
|
|
144
|
+
incomplete: {},
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
compoundVariants: [
|
|
148
|
+
{
|
|
149
|
+
variant: 'progress',
|
|
150
|
+
state: 'complete',
|
|
151
|
+
styles: {
|
|
152
|
+
backgroundColor: theme.color.surface.brand.default,
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
variant: 'progress',
|
|
157
|
+
state: 'active',
|
|
158
|
+
styles: {
|
|
159
|
+
backgroundColor: theme.color.surface.neutral.subtle,
|
|
160
|
+
borderWidth: theme.borderWidth[2],
|
|
161
|
+
borderColor: theme.color.surface.brand.default,
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
variant: 'progress',
|
|
166
|
+
state: 'incomplete',
|
|
167
|
+
styles: {
|
|
168
|
+
backgroundColor: theme.color.surface.neutral.subtle,
|
|
169
|
+
borderWidth: theme.borderWidth[2],
|
|
170
|
+
borderColor: theme.color.border.subtle,
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
],
|
|
174
|
+
},
|
|
175
|
+
activeInnerDot: {
|
|
176
|
+
width: '100%',
|
|
177
|
+
height: '100%',
|
|
178
|
+
borderRadius: theme.borderRadius.full,
|
|
179
|
+
backgroundColor: theme.color.surface.brand.default,
|
|
180
|
+
},
|
|
181
|
+
completeIcon: {
|
|
182
|
+
color: theme.color.text.inverted,
|
|
183
|
+
},
|
|
184
|
+
content: {
|
|
185
|
+
flex: 1,
|
|
186
|
+
minWidth: 0,
|
|
187
|
+
gap: theme.components.timeline.content.gap,
|
|
188
|
+
variants: {
|
|
189
|
+
position: {
|
|
190
|
+
single: {
|
|
191
|
+
paddingBottom: 0,
|
|
192
|
+
},
|
|
193
|
+
start: {
|
|
194
|
+
paddingBottom: theme.components.timeline.content.paddingBottom,
|
|
195
|
+
},
|
|
196
|
+
middle: {
|
|
197
|
+
paddingBottom: theme.components.timeline.content.paddingBottom,
|
|
198
|
+
},
|
|
199
|
+
end: {
|
|
200
|
+
paddingBottom: 0,
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
variant: {
|
|
204
|
+
static: {
|
|
205
|
+
paddingTop: 0,
|
|
206
|
+
},
|
|
207
|
+
progress: {
|
|
208
|
+
paddingTop: theme.components.timeline.content.paddingTop,
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
compoundVariants: [
|
|
213
|
+
{
|
|
214
|
+
position: 'start',
|
|
215
|
+
variant: 'static',
|
|
216
|
+
styles: {
|
|
217
|
+
marginTop: -6,
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
],
|
|
221
|
+
},
|
|
222
|
+
textContent: {
|
|
223
|
+
width: '100%',
|
|
224
|
+
},
|
|
225
|
+
label: {
|
|
226
|
+
color: theme.color.text.primary,
|
|
227
|
+
},
|
|
228
|
+
helperText: {
|
|
229
|
+
color: theme.color.text.secondary,
|
|
230
|
+
},
|
|
231
|
+
customContent: {
|
|
232
|
+
width: '100%',
|
|
233
|
+
},
|
|
234
|
+
}));
|
|
235
|
+
export default TimelineItem;
|
|
@@ -11,6 +11,7 @@ export * from './Card';
|
|
|
11
11
|
export * from './Carousel';
|
|
12
12
|
export * from './Center';
|
|
13
13
|
export * from './Checkbox';
|
|
14
|
+
export * from './Combobox';
|
|
14
15
|
export * from './Container';
|
|
15
16
|
export * from './CurrencyInput';
|
|
16
17
|
export * from './DateInput';
|
|
@@ -39,20 +40,24 @@ export * from './Link';
|
|
|
39
40
|
export * from './List';
|
|
40
41
|
export * from './Menu';
|
|
41
42
|
export * from './Modal';
|
|
43
|
+
export * from './Pagination';
|
|
42
44
|
export * from './PillGroup';
|
|
43
45
|
export * from './ProgressBar';
|
|
44
46
|
export * from './ProgressStepper';
|
|
45
47
|
export * from './Radio';
|
|
46
48
|
export * from './RadioCard';
|
|
49
|
+
export * from './SafeAreaView';
|
|
47
50
|
export * from './SectionHeader';
|
|
48
51
|
export * from './SegmentedControl';
|
|
49
52
|
export * from './Select';
|
|
50
53
|
export * from './Skeleton';
|
|
51
54
|
export * from './Spinner';
|
|
52
55
|
export * from './Switch';
|
|
56
|
+
export * from './Table';
|
|
53
57
|
export * from './Tabs';
|
|
54
58
|
export * from './Textarea';
|
|
55
59
|
export * from './ThemedImage';
|
|
60
|
+
export * from './Timeline';
|
|
56
61
|
export * from './TimePicker';
|
|
57
62
|
export * from './TimePickerInput';
|
|
58
63
|
export * from './Toast';
|
|
@@ -12,6 +12,7 @@ export * from './Card';
|
|
|
12
12
|
export * from './Carousel';
|
|
13
13
|
export * from './Center';
|
|
14
14
|
export * from './Checkbox';
|
|
15
|
+
export * from './Combobox';
|
|
15
16
|
export * from './Container';
|
|
16
17
|
export * from './CurrencyInput';
|
|
17
18
|
export * from './DateInput';
|
|
@@ -40,20 +41,24 @@ export * from './Link';
|
|
|
40
41
|
export * from './List';
|
|
41
42
|
export * from './Menu';
|
|
42
43
|
export * from './Modal';
|
|
44
|
+
export * from './Pagination';
|
|
43
45
|
export * from './PillGroup';
|
|
44
46
|
export * from './ProgressBar';
|
|
45
47
|
export * from './ProgressStepper';
|
|
46
48
|
export * from './Radio';
|
|
47
49
|
export * from './RadioCard';
|
|
50
|
+
export * from './SafeAreaView';
|
|
48
51
|
export * from './SectionHeader';
|
|
49
52
|
export * from './SegmentedControl';
|
|
50
53
|
export * from './Select';
|
|
51
54
|
export * from './Skeleton';
|
|
52
55
|
export * from './Spinner';
|
|
53
56
|
export * from './Switch';
|
|
57
|
+
export * from './Table';
|
|
54
58
|
export * from './Tabs';
|
|
55
59
|
export * from './Textarea';
|
|
56
60
|
export * from './ThemedImage';
|
|
61
|
+
export * from './Timeline';
|
|
57
62
|
export * from './TimePicker';
|
|
58
63
|
export * from './TimePickerInput';
|
|
59
64
|
export * from './Toast';
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
ChevronRightMediumIcon,
|
|
9
9
|
EditSmallIcon,
|
|
10
10
|
ElectricityMediumIcon,
|
|
11
|
+
ExpandSmallIcon,
|
|
11
12
|
InsuranceMediumIcon,
|
|
12
13
|
MobileMediumIcon,
|
|
13
14
|
ShareSmallIcon,
|
|
@@ -39,6 +40,7 @@ import {
|
|
|
39
40
|
CarouselItem,
|
|
40
41
|
Center,
|
|
41
42
|
Checkbox,
|
|
43
|
+
Combobox,
|
|
42
44
|
Container,
|
|
43
45
|
CurrencyInput,
|
|
44
46
|
DateInput,
|
|
@@ -72,6 +74,7 @@ import {
|
|
|
72
74
|
MenuTrigger,
|
|
73
75
|
Modal,
|
|
74
76
|
OL,
|
|
77
|
+
Pagination,
|
|
75
78
|
Pill,
|
|
76
79
|
PillGroup,
|
|
77
80
|
ProgressBar,
|
|
@@ -89,11 +92,19 @@ import {
|
|
|
89
92
|
Spinner,
|
|
90
93
|
Switch,
|
|
91
94
|
Tab,
|
|
95
|
+
Table,
|
|
96
|
+
TableBody,
|
|
97
|
+
TableCell,
|
|
98
|
+
TableHeader,
|
|
99
|
+
TableHeaderCell,
|
|
100
|
+
TableRow,
|
|
92
101
|
TabPanel,
|
|
93
102
|
Tabs,
|
|
94
103
|
TabsList,
|
|
95
104
|
Textarea,
|
|
96
105
|
ThemedImage,
|
|
106
|
+
Timeline,
|
|
107
|
+
TimelineItem,
|
|
97
108
|
TimePicker,
|
|
98
109
|
TimePickerInput,
|
|
99
110
|
ToastItem,
|
|
@@ -139,6 +150,7 @@ const ComponentWrapper = ({
|
|
|
139
150
|
};
|
|
140
151
|
|
|
141
152
|
const AllComponents: React.FC = () => {
|
|
153
|
+
const [comboboxValue, setComboboxValue] = React.useState<string | null>('uk');
|
|
142
154
|
const [selectValue, setSelectValue] = React.useState('1');
|
|
143
155
|
const [toggleButtonValue, setToggleButtonValue] = React.useState('');
|
|
144
156
|
const bottomSheetRef = useRef<BottomSheet>(null);
|
|
@@ -349,6 +361,24 @@ const AllComponents: React.FC = () => {
|
|
|
349
361
|
</View>
|
|
350
362
|
</Center>
|
|
351
363
|
</ComponentWrapper>
|
|
364
|
+
<ComponentWrapper name="Combobox" link="/?path=/docs/forms-combobox--docs">
|
|
365
|
+
<Center flex={1}>
|
|
366
|
+
<BottomSheetModalProvider>
|
|
367
|
+
<Combobox
|
|
368
|
+
label="Search a country"
|
|
369
|
+
placeholder="Search for a country"
|
|
370
|
+
searchPlaceholder="Search for a country"
|
|
371
|
+
options={[
|
|
372
|
+
{ label: 'United Kingdom', value: 'uk' },
|
|
373
|
+
{ label: 'United States', value: 'us' },
|
|
374
|
+
{ label: 'Canada', value: 'ca' },
|
|
375
|
+
]}
|
|
376
|
+
value={comboboxValue}
|
|
377
|
+
onValueChange={setComboboxValue}
|
|
378
|
+
/>
|
|
379
|
+
</BottomSheetModalProvider>
|
|
380
|
+
</Center>
|
|
381
|
+
</ComponentWrapper>
|
|
352
382
|
<ComponentWrapper name="Container" link="/?path=/docs/primitives-container--docs">
|
|
353
383
|
<Container spacing="md" backgroundColor="secondary">
|
|
354
384
|
<Box h={20} bg={color.blue[300]} />
|
|
@@ -390,29 +420,6 @@ const AllComponents: React.FC = () => {
|
|
|
390
420
|
</BottomSheetModalProvider>
|
|
391
421
|
</Center>
|
|
392
422
|
</ComponentWrapper>
|
|
393
|
-
<ComponentWrapper name="Time Picker" link="/?path=/docs/components-time-picker--docs">
|
|
394
|
-
<Center flex={1}>
|
|
395
|
-
<Button onPress={handleTimePickerOpenPress}>Open Time Picker</Button>
|
|
396
|
-
<BottomSheetModalProvider>
|
|
397
|
-
<TimePicker
|
|
398
|
-
ref={timePickerRef}
|
|
399
|
-
date={selectedTime}
|
|
400
|
-
onChange={({ date }) => setSelectedTime(date)}
|
|
401
|
-
onCancel={() => setSelectedTime(undefined)}
|
|
402
|
-
/>
|
|
403
|
-
</BottomSheetModalProvider>
|
|
404
|
-
</Center>
|
|
405
|
-
</ComponentWrapper>
|
|
406
|
-
<ComponentWrapper
|
|
407
|
-
name="Time Picker Input"
|
|
408
|
-
link="/?path=/docs/forms-time-picker-input--docs"
|
|
409
|
-
>
|
|
410
|
-
<Center flex={1} padding="200">
|
|
411
|
-
<BottomSheetModalProvider>
|
|
412
|
-
<TimePickerInput placeholder="HH:mm" />
|
|
413
|
-
</BottomSheetModalProvider>
|
|
414
|
-
</Center>
|
|
415
|
-
</ComponentWrapper>
|
|
416
423
|
<ComponentWrapper
|
|
417
424
|
name="Description List"
|
|
418
425
|
link="/?path=/docs/components-description-list--docs"
|
|
@@ -681,6 +688,19 @@ const AllComponents: React.FC = () => {
|
|
|
681
688
|
</OL>
|
|
682
689
|
</Center>
|
|
683
690
|
</ComponentWrapper>
|
|
691
|
+
<ComponentWrapper name="Pagination" link="/?path=/docs/components-pagination--docs">
|
|
692
|
+
<Center flex={1} p="200">
|
|
693
|
+
<Box style={{ width: 280 }}>
|
|
694
|
+
<Pagination
|
|
695
|
+
currentPage={3}
|
|
696
|
+
totalPages={10}
|
|
697
|
+
onPageChange={() => {}}
|
|
698
|
+
condensed
|
|
699
|
+
hideSkipButtons
|
|
700
|
+
/>
|
|
701
|
+
</Box>
|
|
702
|
+
</Center>
|
|
703
|
+
</ComponentWrapper>
|
|
684
704
|
<ComponentWrapper name="Pill Group" link="/?path=/docs/components-pill-group--docs">
|
|
685
705
|
<Center flex={1} p="200">
|
|
686
706
|
<PillGroup
|
|
@@ -733,6 +753,7 @@ const AllComponents: React.FC = () => {
|
|
|
733
753
|
</RadioCardGroup>
|
|
734
754
|
</Center>
|
|
735
755
|
</ComponentWrapper>
|
|
756
|
+
|
|
736
757
|
<ComponentWrapper
|
|
737
758
|
name="Section Header"
|
|
738
759
|
link="/?path=/docs/components-section-header--docs"
|
|
@@ -795,6 +816,36 @@ const AllComponents: React.FC = () => {
|
|
|
795
816
|
<Switch value={switchEnabled} onValueChange={toggleSwitch} />
|
|
796
817
|
</Center>
|
|
797
818
|
</ComponentWrapper>
|
|
819
|
+
<ComponentWrapper name="Table" link="/?path=/docs/components-table--docs">
|
|
820
|
+
<Center flex={1} px="300">
|
|
821
|
+
<Box style={{ width: 360 }}>
|
|
822
|
+
<Table container="subtle">
|
|
823
|
+
<TableHeader color="purple">
|
|
824
|
+
<TableHeaderCell
|
|
825
|
+
trailingContent={<Icon as={ExpandSmallIcon} color="#fcfbf2" />}
|
|
826
|
+
>
|
|
827
|
+
Name
|
|
828
|
+
</TableHeaderCell>
|
|
829
|
+
<TableHeaderCell
|
|
830
|
+
trailingContent={<Icon as={ExpandSmallIcon} color="#fcfbf2" />}
|
|
831
|
+
>
|
|
832
|
+
Plan
|
|
833
|
+
</TableHeaderCell>
|
|
834
|
+
</TableHeader>
|
|
835
|
+
<TableBody>
|
|
836
|
+
<TableRow>
|
|
837
|
+
<TableHeaderCell row>Alex Morgan</TableHeaderCell>
|
|
838
|
+
<TableCell>Full Fibre 900</TableCell>
|
|
839
|
+
</TableRow>
|
|
840
|
+
<TableRow>
|
|
841
|
+
<TableHeaderCell row>Priya Shah</TableHeaderCell>
|
|
842
|
+
<TableCell>Energy Saver</TableCell>
|
|
843
|
+
</TableRow>
|
|
844
|
+
</TableBody>
|
|
845
|
+
</Table>
|
|
846
|
+
</Box>
|
|
847
|
+
</Center>
|
|
848
|
+
</ComponentWrapper>
|
|
798
849
|
<ComponentWrapper name="Tabs" link="/?path=/docs/components-tabs--docs">
|
|
799
850
|
<Center flex={1}>
|
|
800
851
|
<Tabs defaultValue="tab-1">
|
|
@@ -831,6 +882,38 @@ const AllComponents: React.FC = () => {
|
|
|
831
882
|
/>
|
|
832
883
|
</Center>
|
|
833
884
|
</ComponentWrapper>
|
|
885
|
+
<ComponentWrapper name="Timeline" link="/?path=/docs/components-timeline--docs">
|
|
886
|
+
<Center flex={1} px="300">
|
|
887
|
+
<Timeline variant="progress">
|
|
888
|
+
<TimelineItem label="Order placed" helperText="Received" state="complete" />
|
|
889
|
+
<TimelineItem label="Checking details" helperText="In progress" state="active" />
|
|
890
|
+
<TimelineItem label="Service live" helperText="Pending" state="incomplete" />
|
|
891
|
+
</Timeline>
|
|
892
|
+
</Center>
|
|
893
|
+
</ComponentWrapper>
|
|
894
|
+
<ComponentWrapper name="Time Picker" link="/?path=/docs/components-time-picker--docs">
|
|
895
|
+
<Center flex={1}>
|
|
896
|
+
<Button onPress={handleTimePickerOpenPress}>Open Time Picker</Button>
|
|
897
|
+
<BottomSheetModalProvider>
|
|
898
|
+
<TimePicker
|
|
899
|
+
ref={timePickerRef}
|
|
900
|
+
date={selectedTime}
|
|
901
|
+
onChange={({ date }) => setSelectedTime(date)}
|
|
902
|
+
onCancel={() => setSelectedTime(undefined)}
|
|
903
|
+
/>
|
|
904
|
+
</BottomSheetModalProvider>
|
|
905
|
+
</Center>
|
|
906
|
+
</ComponentWrapper>
|
|
907
|
+
<ComponentWrapper
|
|
908
|
+
name="Time Picker Input"
|
|
909
|
+
link="/?path=/docs/forms-time-picker-input--docs"
|
|
910
|
+
>
|
|
911
|
+
<Center flex={1} padding="200">
|
|
912
|
+
<BottomSheetModalProvider>
|
|
913
|
+
<TimePickerInput placeholder="HH:mm" />
|
|
914
|
+
</BottomSheetModalProvider>
|
|
915
|
+
</Center>
|
|
916
|
+
</ComponentWrapper>
|
|
834
917
|
<ComponentWrapper name="Toast" link="/?path=/docs/components-toast--docs">
|
|
835
918
|
<Center flex={1} p="200">
|
|
836
919
|
<ToastItem
|