@hero-design/rn 8.45.0-test.0 → 8.45.1

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.
Files changed (37) hide show
  1. package/.turbo/turbo-build.log +2 -2
  2. package/CHANGELOG.md +23 -2
  3. package/es/index.js +764 -578
  4. package/lib/index.js +764 -578
  5. package/package.json +6 -6
  6. package/src/components/Accordion/index.tsx +1 -1
  7. package/src/components/Avatar/AvatarStack/StyledAvatarStack.tsx +63 -9
  8. package/src/components/Avatar/AvatarStack/__tests__/StyledAvatarStack.spec.tsx +71 -9
  9. package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/StyledAvatarStack.spec.tsx.snap +271 -2
  10. package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/index.spec.tsx.snap +2156 -7
  11. package/src/components/Avatar/AvatarStack/__tests__/index.spec.tsx +140 -6
  12. package/src/components/Avatar/AvatarStack/index.tsx +94 -9
  13. package/src/components/Carousel/index.tsx +18 -11
  14. package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +108 -57
  15. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +36 -19
  16. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerCalendar.spec.tsx.snap +36 -19
  17. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +36 -19
  18. package/src/components/RichTextEditor/RichTextEditor.tsx +89 -38
  19. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +130 -102
  20. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +247 -146
  21. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +211 -127
  22. package/src/components/TextInput/StyledTextInput.tsx +9 -31
  23. package/src/components/TextInput/__tests__/StyledTextInput.spec.tsx +0 -44
  24. package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +21 -638
  25. package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +1159 -833
  26. package/src/components/TextInput/__tests__/index.spec.tsx +2 -2
  27. package/src/components/TextInput/index.tsx +128 -57
  28. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +72 -38
  29. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +72 -38
  30. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +2 -2
  31. package/src/theme/components/textInput.ts +2 -2
  32. package/types/components/Accordion/index.d.ts +1 -1
  33. package/types/components/Avatar/AvatarStack/StyledAvatarStack.d.ts +13 -0
  34. package/types/components/Avatar/AvatarStack/index.d.ts +14 -2
  35. package/types/components/Avatar/index.d.ts +1 -1
  36. package/types/components/TextInput/StyledTextInput.d.ts +4 -24
  37. package/types/components/TextInput/index.d.ts +1 -0
@@ -1,6 +1,9 @@
1
1
  import React from 'react';
2
2
  import renderWithTheme from '../../../../testHelpers/renderWithTheme';
3
3
  import Avatar from '../..';
4
+ import Typography from '../../../Typography';
5
+ import HeroDesignProvider from '../../../HeroDesignProvider';
6
+ import { theme } from '../../../..';
4
7
 
5
8
  beforeEach(() => {
6
9
  jest.spyOn(Math, 'random').mockReturnValue(0.123);
@@ -11,9 +14,13 @@ afterEach(() => {
11
14
  });
12
15
 
13
16
  describe('AvatarStack', () => {
14
- it('renders correctly by default', () => {
17
+ it.each`
18
+ variant
19
+ ${'horizontal'}
20
+ ${'vertical'}
21
+ `('renders correctly when variant is $variant', ({ variant }) => {
15
22
  const wrapper = renderWithTheme(
16
- <Avatar.Stack testID="group-avatar">
23
+ <Avatar.Stack variant={variant} testID="group-avatar">
17
24
  <Avatar title="TT" />
18
25
  <Avatar title="SS" />
19
26
  <Avatar title="AA" />
@@ -27,10 +34,14 @@ describe('AvatarStack', () => {
27
34
  expect(wrapper.queryAllByText('AA')).toHaveLength(1);
28
35
  expect(wrapper.queryAllByText('OO')).toHaveLength(1);
29
36
  expect(wrapper.queryAllByText('NA')).toHaveLength(1);
30
- expect(wrapper.getByTestId('group-avatar')).toHaveStyle({
31
- width: 121.6,
32
- height: 32,
33
- });
37
+ expect(wrapper.getByTestId('group-avatar')).toHaveStyle(
38
+ variant === 'horizontal'
39
+ ? {
40
+ width: 121.6,
41
+ height: 32,
42
+ }
43
+ : { width: 32, height: 121.6 }
44
+ );
34
45
 
35
46
  expect(wrapper.toJSON()).toMatchSnapshot();
36
47
  });
@@ -59,4 +70,127 @@ describe('AvatarStack', () => {
59
70
 
60
71
  expect(wrapper.toJSON()).toMatchSnapshot();
61
72
  });
73
+
74
+ it('does not render surplus when max is equal or larger than the number of avatars', () => {
75
+ const { toJSON, getByText, queryByTestId, rerender } = renderWithTheme(
76
+ <Avatar.Stack
77
+ max={4}
78
+ renderSurplus={(surplus) => (
79
+ <Typography.Body>Custom surplus {surplus}</Typography.Body>
80
+ )}
81
+ >
82
+ <Avatar title="TT" />
83
+ <Avatar title="SS" />
84
+ <Avatar title="AA" />
85
+ <Avatar title="OO" />
86
+ </Avatar.Stack>
87
+ );
88
+
89
+ expect(toJSON()).toMatchSnapshot();
90
+ expect(getByText('TT')).toBeDefined();
91
+ expect(getByText('OO')).toBeDefined();
92
+ expect(queryByTestId('surplus-container')).toBeNull();
93
+
94
+ rerender(
95
+ <HeroDesignProvider theme={theme}>
96
+ <Avatar.Stack
97
+ max={10}
98
+ renderSurplus={(surplus) => (
99
+ <Typography.Body>Custom surplus {surplus}</Typography.Body>
100
+ )}
101
+ >
102
+ <Avatar title="TT" />
103
+ <Avatar title="SS" />
104
+ <Avatar title="AA" />
105
+ <Avatar title="OO" />
106
+ </Avatar.Stack>
107
+ </HeroDesignProvider>
108
+ );
109
+
110
+ expect(queryByTestId('surplus-container')).toBeNull();
111
+ });
112
+
113
+ it('does not render surplus when total is equal to the number of avatars', () => {
114
+ const { toJSON, getByText, queryByTestId, rerender } = renderWithTheme(
115
+ <Avatar.Stack
116
+ total={4}
117
+ renderSurplus={(surplus) => (
118
+ <Typography.Body>Custom surplus {surplus}</Typography.Body>
119
+ )}
120
+ >
121
+ <Avatar title="TT" />
122
+ <Avatar title="SS" />
123
+ <Avatar title="AA" />
124
+ <Avatar title="OO" />
125
+ </Avatar.Stack>
126
+ );
127
+
128
+ expect(toJSON()).toMatchSnapshot();
129
+ expect(getByText('TT')).toBeDefined();
130
+ expect(getByText('OO')).toBeDefined();
131
+ expect(queryByTestId('surplus-container')).toBeNull();
132
+
133
+ rerender(
134
+ <HeroDesignProvider theme={theme}>
135
+ <Avatar.Stack
136
+ total={10}
137
+ renderSurplus={(surplus) => (
138
+ <Typography.Body>Custom surplus {surplus}</Typography.Body>
139
+ )}
140
+ >
141
+ <Avatar title="TT" />
142
+ <Avatar title="SS" />
143
+ <Avatar title="AA" />
144
+ <Avatar title="OO" />
145
+ </Avatar.Stack>
146
+ </HeroDesignProvider>
147
+ );
148
+
149
+ expect(getByText('Custom surplus 6')).toBeDefined();
150
+ });
151
+
152
+ it('render correctly surplus when both max and total are set', () => {
153
+ const { toJSON, getByText, queryByText } = renderWithTheme(
154
+ <Avatar.Stack
155
+ total={25}
156
+ max={2}
157
+ renderSurplus={(surplus) => (
158
+ <Typography.Body>Custom surplus {surplus}</Typography.Body>
159
+ )}
160
+ >
161
+ <Avatar title="TT" />
162
+ <Avatar title="SS" />
163
+ <Avatar title="AA" />
164
+ <Avatar title="OO" />
165
+ <Avatar title="NA" />
166
+ </Avatar.Stack>
167
+ );
168
+
169
+ expect(toJSON()).toMatchSnapshot();
170
+ expect(getByText('TT')).toBeDefined();
171
+ expect(queryByText('AA')).toBeNull();
172
+ expect(getByText('Custom surplus 23')).toBeDefined();
173
+ });
174
+
175
+ it('allow rendering custom surplus', () => {
176
+ const { toJSON, getByText } = renderWithTheme(
177
+ <Avatar.Stack
178
+ total={25}
179
+ renderSurplus={(surplus) => (
180
+ <Typography.Body>Custom surplus {surplus}</Typography.Body>
181
+ )}
182
+ >
183
+ <Avatar title="TT" />
184
+ <Avatar title="SS" />
185
+ <Avatar title="AA" />
186
+ <Avatar title="OO" />
187
+ <Avatar title="NA" />
188
+ </Avatar.Stack>
189
+ );
190
+
191
+ expect(toJSON()).toMatchSnapshot();
192
+ expect(getByText('TT')).toBeDefined();
193
+ expect(getByText('NA')).toBeDefined();
194
+ expect(getByText('Custom surplus 20')).toBeDefined();
195
+ });
62
196
  });
@@ -1,7 +1,11 @@
1
- import React, { ReactElement } from 'react';
1
+ import React, { ReactElement, ReactNode } from 'react';
2
2
  import { StyleProp, ViewStyle } from 'react-native';
3
- import Avatar, { AvatarProps } from '../Avatar';
4
- import { StyledAvatar, StyledWrapper } from './StyledAvatarStack';
3
+ import { AvatarProps } from '../Avatar';
4
+ import {
5
+ StyledAvatar,
6
+ StyledSurplusContainer,
7
+ StyledWrapper,
8
+ } from './StyledAvatarStack';
5
9
  import { useAvatarColors } from './utils';
6
10
 
7
11
  export interface AvatarStackProps extends Pick<AvatarProps, 'size'> {
@@ -13,6 +17,14 @@ export interface AvatarStackProps extends Pick<AvatarProps, 'size'> {
13
17
  * Max avatars to show.
14
18
  */
15
19
  max?: number;
20
+ /**
21
+ * The total number of avatars. Used for calculating the number of extra avatars.
22
+ */
23
+ total?: number;
24
+ /**
25
+ * Custom renderer of extraAvatars.
26
+ */
27
+ renderSurplus?: (value: number) => ReactNode;
16
28
  /**
17
29
  * Additional style.
18
30
  */
@@ -21,39 +33,112 @@ export interface AvatarStackProps extends Pick<AvatarProps, 'size'> {
21
33
  * Testing id of the component.
22
34
  */
23
35
  testID?: string;
36
+ /**
37
+ * Variant of the avatar stack.
38
+ */
39
+ variant?: 'horizontal' | 'vertical';
24
40
  }
25
41
 
42
+ type SurplusProps = {
43
+ value: number;
44
+ renderSurplus?: AvatarStackProps['renderSurplus'];
45
+ size?: AvatarStackProps['size'];
46
+ variant?: AvatarStackProps['variant'];
47
+ index: number;
48
+ backgroundColor: string;
49
+ };
50
+
51
+ const Surplus = ({
52
+ value,
53
+ renderSurplus,
54
+ size,
55
+ variant = 'horizontal',
56
+ index,
57
+ backgroundColor,
58
+ }: SurplusProps) => {
59
+ if (value > 0) {
60
+ if (renderSurplus) {
61
+ return (
62
+ <StyledSurplusContainer
63
+ testID="surplus-container"
64
+ themeSize={size}
65
+ themeVariant={variant}
66
+ themeIndex={index}
67
+ style={{ backgroundColor }}
68
+ >
69
+ {renderSurplus(value)}
70
+ </StyledSurplusContainer>
71
+ );
72
+ }
73
+
74
+ return (
75
+ <StyledAvatar
76
+ testID="surplus-container"
77
+ themeVariant={variant}
78
+ title={`+${value}`}
79
+ size={size}
80
+ themeIndex={index}
81
+ style={{ backgroundColor }}
82
+ />
83
+ );
84
+ }
85
+
86
+ return null;
87
+ };
88
+
26
89
  const AvatarStack = ({
27
90
  children,
28
91
  max,
29
92
  size = 'small',
30
93
  style,
31
94
  testID,
95
+ variant = 'horizontal',
96
+ total,
97
+ renderSurplus,
32
98
  }: AvatarStackProps) => {
33
99
  const colors = useAvatarColors();
34
100
  const avatars = children.slice(0, max);
35
- if (max !== undefined && children.length - max > 0) {
36
- const remainingAvatar = (
37
- <Avatar title={`+${children.length - max}`} size={size} />
38
- );
39
- avatars.push(remainingAvatar);
40
- }
101
+
102
+ const remainingAvatar = (() => {
103
+ let remain = 0;
104
+
105
+ // Remaining value will prioritize total prop if it exists
106
+ if (total && total > children.length) {
107
+ remain = total - avatars.length;
108
+ } else if (max && children.length > max) {
109
+ remain = children.length - max;
110
+ }
111
+
112
+ return remain;
113
+ })();
41
114
 
42
115
  return (
43
116
  <StyledWrapper
44
117
  themeSize={size}
45
118
  themeAvatarCount={avatars.length}
119
+ themeHasSurplus={remainingAvatar > 0}
46
120
  style={style}
47
121
  testID={testID}
122
+ themeVariant={variant}
48
123
  >
49
124
  {avatars.map((avt, index) => (
50
125
  <StyledAvatar
126
+ themeVariant={variant}
51
127
  {...avt.props}
52
128
  size={size}
53
129
  themeIndex={index}
54
130
  style={{ backgroundColor: colors[index % colors.length] }}
55
131
  />
56
132
  ))}
133
+
134
+ <Surplus
135
+ value={remainingAvatar}
136
+ index={avatars.length}
137
+ size={size}
138
+ variant={variant}
139
+ renderSurplus={renderSurplus}
140
+ backgroundColor={colors[avatars.length % colors.length]}
141
+ />
57
142
  </StyledWrapper>
58
143
  );
59
144
  };
@@ -2,22 +2,25 @@ import React, {
2
2
  Dispatch,
3
3
  SetStateAction,
4
4
  useCallback,
5
- useRef,
6
5
  useEffect,
6
+ useRef,
7
7
  useState,
8
8
  } from 'react';
9
9
  import {
10
10
  Animated,
11
11
  FlatList,
12
12
  StyleProp,
13
- useWindowDimensions,
14
13
  View,
15
14
  ViewProps,
16
15
  ViewStyle,
17
16
  ViewToken,
17
+ useWindowDimensions,
18
18
  } from 'react-native';
19
19
 
20
- import { CarouselData } from './types';
20
+ import { useTheme } from '../../theme';
21
+ import { useDeprecation } from '../../utils/hooks';
22
+ import { CardCarousel } from './CardCarousel';
23
+ import CarouselItem from './CarouselItem';
21
24
  import {
22
25
  StyledBackDrop,
23
26
  StyledCarouselFooterWrapper,
@@ -25,9 +28,7 @@ import {
25
28
  StyledPageControl,
26
29
  StyledPageControlWrapper,
27
30
  } from './StyledCarousel';
28
- import CarouselItem from './CarouselItem';
29
- import { CardCarousel } from './CardCarousel';
30
- import { useDeprecation } from '../../utils/hooks';
31
+ import { CarouselData } from './types';
31
32
 
32
33
  interface CarouselProps extends ViewProps {
33
34
  /**
@@ -98,6 +99,8 @@ const Carousel = ({
98
99
  `The use of 'pageControlPosition == bottom' has been deprecated`,
99
100
  pageControlPosition === 'bottom'
100
101
  );
102
+
103
+ const theme = useTheme();
101
104
  const carouselRef = useRef<FlatList>(null);
102
105
 
103
106
  const [currentSlideIndex, setCurrentSlideIndex] =
@@ -130,7 +133,8 @@ const Carousel = ({
130
133
  }, [currentSlideIndex, carouselRef]);
131
134
 
132
135
  const viewConfig = useRef({ viewAreaCoveragePercentThreshold: 50 }).current;
133
- const onViewCallBack = React.useCallback(
136
+
137
+ const onViewCallBack = useRef(
134
138
  (info: { viewableItems: Array<ViewToken>; changed: Array<ViewToken> }) => {
135
139
  const firstVisibleItem = info.viewableItems.find(
136
140
  (view) => view.index != null && view.isViewable
@@ -138,13 +142,16 @@ const Carousel = ({
138
142
  if (firstVisibleItem) {
139
143
  internalOnItemIndexChange(firstVisibleItem.index || 0);
140
144
  }
141
- },
142
- [internalOnItemIndexChange]
145
+ }
143
146
  );
147
+
144
148
  return (
145
149
  <View style={style} testID={testID} {...nativeProps}>
146
150
  <StyledBackDrop
147
- themeSlideBackground={items[currentSlideIndex].background}
151
+ themeSlideBackground={
152
+ items[currentSlideIndex]?.background ||
153
+ theme.colors.defaultGlobalSurface
154
+ }
148
155
  />
149
156
 
150
157
  <StyledPageControlWrapper>
@@ -165,7 +172,7 @@ const Carousel = ({
165
172
  pagingEnabled
166
173
  bounces={false}
167
174
  data={items}
168
- onViewableItemsChanged={onViewCallBack}
175
+ onViewableItemsChanged={onViewCallBack.current}
169
176
  viewabilityConfig={viewConfig}
170
177
  scrollEventThrottle={32}
171
178
  ref={carouselRef}
@@ -59,6 +59,7 @@ exports[`DatePicker renders DatePickerAndroid when OS is android 1`] = `
59
59
  }
60
60
  >
61
61
  <View
62
+ onLayout={[Function]}
62
63
  style={
63
64
  [
64
65
  {
@@ -98,40 +99,55 @@ exports[`DatePicker renders DatePickerAndroid when OS is android 1`] = `
98
99
  themeState="filled"
99
100
  />
100
101
  <View
102
+ onLayout={[Function]}
103
+ />
104
+ <View
105
+ collapsable={false}
101
106
  pointerEvents="none"
102
107
  style={
103
- [
104
- {
105
- "backgroundColor": "#ffffff",
106
- "flexDirection": "row",
107
- "left": 16,
108
- "paddingHorizontal": 4,
109
- "position": "absolute",
110
- "top": -4,
111
- "zIndex": 1,
112
- },
113
- {
114
- "backgroundColor": "#ffffff",
115
- },
116
- ]
108
+ {
109
+ "alignItems": "center",
110
+ "flexDirection": "row",
111
+ "justifyContent": "center",
112
+ "left": 0,
113
+ "position": "absolute",
114
+ "right": 0,
115
+ "top": -10.666666666666666,
116
+ "transform": [
117
+ {
118
+ "translateY": 0,
119
+ },
120
+ {
121
+ "translateX": 24,
122
+ },
123
+ {
124
+ "scale": 1,
125
+ },
126
+ ],
127
+ "zIndex": 1,
128
+ }
117
129
  }
118
- testID="label-container"
130
+ themeVariant="text"
119
131
  >
120
132
  <Text
121
133
  allowFontScaling={false}
134
+ onLayout={[Function]}
122
135
  style={
123
136
  [
124
137
  {
125
138
  "color": "#001f23",
126
139
  "fontFamily": "BeVietnamPro-Regular",
127
- "fontSize": 12,
140
+ "fontSize": 16,
128
141
  "letterSpacing": 0.48,
129
- "lineHeight": 16,
142
+ "lineHeight": 24,
130
143
  },
131
144
  [
132
145
  {
146
+ "alignContent": "center",
147
+ "alignItems": "center",
133
148
  "color": "#001f23",
134
- "lineHeight": 12,
149
+ "marginTop": -2,
150
+ "textAlignVertical": "center",
135
151
  },
136
152
  {
137
153
  "backgroundColor": "#ffffff",
@@ -140,9 +156,10 @@ exports[`DatePicker renders DatePickerAndroid when OS is android 1`] = `
140
156
  ]
141
157
  }
142
158
  testID="input-label"
143
- themeFontWeight="regular"
144
159
  themeIntent="body"
145
160
  themeState="filled"
161
+ themeTypeface="neutral"
162
+ themeVariant="regular"
146
163
  >
147
164
  Start date
148
165
  </Text>
@@ -322,6 +339,7 @@ exports[`DatePicker renders DatePickerIOS when OS is iOS 1`] = `
322
339
  }
323
340
  >
324
341
  <View
342
+ onLayout={[Function]}
325
343
  style={
326
344
  [
327
345
  {
@@ -361,40 +379,55 @@ exports[`DatePicker renders DatePickerIOS when OS is iOS 1`] = `
361
379
  themeState="filled"
362
380
  />
363
381
  <View
382
+ onLayout={[Function]}
383
+ />
384
+ <View
385
+ collapsable={false}
364
386
  pointerEvents="none"
365
387
  style={
366
- [
367
- {
368
- "backgroundColor": "#ffffff",
369
- "flexDirection": "row",
370
- "left": 16,
371
- "paddingHorizontal": 4,
372
- "position": "absolute",
373
- "top": -4,
374
- "zIndex": 1,
375
- },
376
- {
377
- "backgroundColor": "#ffffff",
378
- },
379
- ]
388
+ {
389
+ "alignItems": "center",
390
+ "flexDirection": "row",
391
+ "justifyContent": "center",
392
+ "left": 0,
393
+ "position": "absolute",
394
+ "right": 0,
395
+ "top": -10.666666666666666,
396
+ "transform": [
397
+ {
398
+ "translateY": 0,
399
+ },
400
+ {
401
+ "translateX": 24,
402
+ },
403
+ {
404
+ "scale": 1,
405
+ },
406
+ ],
407
+ "zIndex": 1,
408
+ }
380
409
  }
381
- testID="label-container"
410
+ themeVariant="text"
382
411
  >
383
412
  <Text
384
413
  allowFontScaling={false}
414
+ onLayout={[Function]}
385
415
  style={
386
416
  [
387
417
  {
388
418
  "color": "#001f23",
389
419
  "fontFamily": "BeVietnamPro-Regular",
390
- "fontSize": 12,
420
+ "fontSize": 16,
391
421
  "letterSpacing": 0.48,
392
- "lineHeight": 16,
422
+ "lineHeight": 24,
393
423
  },
394
424
  [
395
425
  {
426
+ "alignContent": "center",
427
+ "alignItems": "center",
396
428
  "color": "#001f23",
397
- "lineHeight": 12,
429
+ "marginTop": -2,
430
+ "textAlignVertical": "center",
398
431
  },
399
432
  {
400
433
  "backgroundColor": "#ffffff",
@@ -403,9 +436,10 @@ exports[`DatePicker renders DatePickerIOS when OS is iOS 1`] = `
403
436
  ]
404
437
  }
405
438
  testID="input-label"
406
- themeFontWeight="regular"
407
439
  themeIntent="body"
408
440
  themeState="filled"
441
+ themeTypeface="neutral"
442
+ themeVariant="regular"
409
443
  >
410
444
  Start date
411
445
  </Text>
@@ -591,6 +625,7 @@ exports[`DatePicker renders variant Calendar 1`] = `
591
625
  }
592
626
  >
593
627
  <View
628
+ onLayout={[Function]}
594
629
  style={
595
630
  [
596
631
  {
@@ -630,40 +665,55 @@ exports[`DatePicker renders variant Calendar 1`] = `
630
665
  themeState="filled"
631
666
  />
632
667
  <View
668
+ onLayout={[Function]}
669
+ />
670
+ <View
671
+ collapsable={false}
633
672
  pointerEvents="none"
634
673
  style={
635
- [
636
- {
637
- "backgroundColor": "#ffffff",
638
- "flexDirection": "row",
639
- "left": 16,
640
- "paddingHorizontal": 4,
641
- "position": "absolute",
642
- "top": -4,
643
- "zIndex": 1,
644
- },
645
- {
646
- "backgroundColor": "#ffffff",
647
- },
648
- ]
674
+ {
675
+ "alignItems": "center",
676
+ "flexDirection": "row",
677
+ "justifyContent": "center",
678
+ "left": 0,
679
+ "position": "absolute",
680
+ "right": 0,
681
+ "top": -10.666666666666666,
682
+ "transform": [
683
+ {
684
+ "translateY": 0,
685
+ },
686
+ {
687
+ "translateX": 24,
688
+ },
689
+ {
690
+ "scale": 1,
691
+ },
692
+ ],
693
+ "zIndex": 1,
694
+ }
649
695
  }
650
- testID="label-container"
696
+ themeVariant="text"
651
697
  >
652
698
  <Text
653
699
  allowFontScaling={false}
700
+ onLayout={[Function]}
654
701
  style={
655
702
  [
656
703
  {
657
704
  "color": "#001f23",
658
705
  "fontFamily": "BeVietnamPro-Regular",
659
- "fontSize": 12,
706
+ "fontSize": 16,
660
707
  "letterSpacing": 0.48,
661
- "lineHeight": 16,
708
+ "lineHeight": 24,
662
709
  },
663
710
  [
664
711
  {
712
+ "alignContent": "center",
713
+ "alignItems": "center",
665
714
  "color": "#001f23",
666
- "lineHeight": 12,
715
+ "marginTop": -2,
716
+ "textAlignVertical": "center",
667
717
  },
668
718
  {
669
719
  "backgroundColor": "#ffffff",
@@ -672,9 +722,10 @@ exports[`DatePicker renders variant Calendar 1`] = `
672
722
  ]
673
723
  }
674
724
  testID="input-label"
675
- themeFontWeight="regular"
676
725
  themeIntent="body"
677
726
  themeState="filled"
727
+ themeTypeface="neutral"
728
+ themeVariant="regular"
678
729
  >
679
730
  Start date
680
731
  </Text>