@hero-design/rn 8.48.0 → 8.49.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 +2 -2
- package/CHANGELOG.md +10 -0
- package/es/index.js +9 -2
- package/lib/index.js +9 -2
- package/package.json +1 -1
- package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +6 -6
- package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +2 -2
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +3 -3
- package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +2 -2
- package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Tabs/ScrollableTabs.tsx +12 -2
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +3 -3
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +1 -1
- package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +1 -1
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +7 -7
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +12 -12
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +1 -1
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +1 -1
- package/src/components/Typography/Caption/StyledCaption.tsx +1 -1
- package/src/components/Typography/Caption/__tests__/__snapshots__/StyledCaption.spec.tsx.snap +9 -9
- package/src/components/Typography/Caption/__tests__/__snapshots__/index.spec.tsx.snap +12 -12
package/.turbo/turbo-build.log
CHANGED
|
@@ -3,6 +3,6 @@ $ rollup -c
|
|
|
3
3
|
[36m
|
|
4
4
|
[1msrc/index.ts[22m → [1mlib/index.js, es/index.js[22m...[39m
|
|
5
5
|
[1m[33m(!) Plugin replace: @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.[39m[22m
|
|
6
|
-
[1m[33m(!) Plugin node-resolve: preferring built-in module 'events' over local alternative at '/
|
|
7
|
-
[32mcreated [1mlib/index.js, es/index.js[22m in [
|
|
6
|
+
[1m[33m(!) Plugin node-resolve: preferring built-in module 'events' over local alternative at '/runner/_work/hero-design/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning[39m[22m
|
|
7
|
+
[32mcreated [1mlib/index.js, es/index.js[22m in [1m28.5s[22m[39m
|
|
8
8
|
$ tsc --noEmit false --emitDeclarationOnly --project tsconfig.prod.json
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @hero-design/rn
|
|
2
2
|
|
|
3
|
+
## 8.49.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#2462](https://github.com/Thinkei/hero-design/pull/2462) [`8d1d76caa`](https://github.com/Thinkei/hero-design/commit/8d1d76caa2d0619b77375291c6f82eae0dd79872) Thanks [@vinhphan-eh](https://github.com/vinhphan-eh)! - [Typography.Caption] Update letter spacing
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- [#2461](https://github.com/Thinkei/hero-design/pull/2461) [`f6d24b44c`](https://github.com/Thinkei/hero-design/commit/f6d24b44ca58f4bfb38bd6012143b4dc0ff7d485) Thanks [@vinhphan-eh](https://github.com/vinhphan-eh)! - [Tabs.Scroll] Prevent onTabPress from running on the first render
|
|
12
|
+
|
|
3
13
|
## 8.48.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
package/es/index.js
CHANGED
|
@@ -6738,7 +6738,7 @@ var StyledCaption = index$a(Text$1)(function (_ref) {
|
|
|
6738
6738
|
return {
|
|
6739
6739
|
fontSize: theme.__hd__.typography.fontSizes.caption,
|
|
6740
6740
|
lineHeight: theme.__hd__.typography.lineHeights.caption,
|
|
6741
|
-
letterSpacing: themeFontWeight === 'regular' ? 0.
|
|
6741
|
+
letterSpacing: themeFontWeight === 'regular' ? 0.36 : 0.24,
|
|
6742
6742
|
color: theme.__hd__.typography.colors[themeIntent],
|
|
6743
6743
|
fontFamily: theme.__hd__.typography.fonts.neutral[FONTWEIGHT_MAP$1[themeFontWeight]]
|
|
6744
6744
|
};
|
|
@@ -17505,6 +17505,8 @@ var ScrollableTab = function ScrollableTab(_ref) {
|
|
|
17505
17505
|
var selectedTabIndex = tabs.findIndex(function (item) {
|
|
17506
17506
|
return item.key === selectedTabKey;
|
|
17507
17507
|
});
|
|
17508
|
+
// Used as a flag to prevent calling onTabPress on initial render
|
|
17509
|
+
var hasScrolled = useRef(false);
|
|
17508
17510
|
React.useEffect(function () {
|
|
17509
17511
|
var timeoutHandle;
|
|
17510
17512
|
if (selectedTabIndex !== -1) {
|
|
@@ -17542,10 +17544,15 @@ var ScrollableTab = function ScrollableTab(_ref) {
|
|
|
17542
17544
|
}), /*#__PURE__*/React.createElement(ContentWrapper, {
|
|
17543
17545
|
initialPage: selectedTabIndex,
|
|
17544
17546
|
ref: pagerViewRef,
|
|
17547
|
+
onPageScrollStateChanged: function onPageScrollStateChanged(e) {
|
|
17548
|
+
if (!hasScrolled.current && e.nativeEvent.pageScrollState === 'dragging') {
|
|
17549
|
+
hasScrolled.current = true;
|
|
17550
|
+
}
|
|
17551
|
+
},
|
|
17545
17552
|
onPageSelected: function onPageSelected(e) {
|
|
17546
17553
|
var index = e.nativeEvent.position;
|
|
17547
17554
|
var selectedItem = tabs[index];
|
|
17548
|
-
if (selectedItem) {
|
|
17555
|
+
if (hasScrolled.current && selectedItem) {
|
|
17549
17556
|
setTimeout(function () {
|
|
17550
17557
|
onTabPress(selectedItem.key);
|
|
17551
17558
|
});
|
package/lib/index.js
CHANGED
|
@@ -6768,7 +6768,7 @@ var StyledCaption = index$a(reactNative.Text)(function (_ref) {
|
|
|
6768
6768
|
return {
|
|
6769
6769
|
fontSize: theme.__hd__.typography.fontSizes.caption,
|
|
6770
6770
|
lineHeight: theme.__hd__.typography.lineHeights.caption,
|
|
6771
|
-
letterSpacing: themeFontWeight === 'regular' ? 0.
|
|
6771
|
+
letterSpacing: themeFontWeight === 'regular' ? 0.36 : 0.24,
|
|
6772
6772
|
color: theme.__hd__.typography.colors[themeIntent],
|
|
6773
6773
|
fontFamily: theme.__hd__.typography.fonts.neutral[FONTWEIGHT_MAP$1[themeFontWeight]]
|
|
6774
6774
|
};
|
|
@@ -17535,6 +17535,8 @@ var ScrollableTab = function ScrollableTab(_ref) {
|
|
|
17535
17535
|
var selectedTabIndex = tabs.findIndex(function (item) {
|
|
17536
17536
|
return item.key === selectedTabKey;
|
|
17537
17537
|
});
|
|
17538
|
+
// Used as a flag to prevent calling onTabPress on initial render
|
|
17539
|
+
var hasScrolled = React.useRef(false);
|
|
17538
17540
|
React__default["default"].useEffect(function () {
|
|
17539
17541
|
var timeoutHandle;
|
|
17540
17542
|
if (selectedTabIndex !== -1) {
|
|
@@ -17572,10 +17574,15 @@ var ScrollableTab = function ScrollableTab(_ref) {
|
|
|
17572
17574
|
}), /*#__PURE__*/React__default["default"].createElement(ContentWrapper, {
|
|
17573
17575
|
initialPage: selectedTabIndex,
|
|
17574
17576
|
ref: pagerViewRef,
|
|
17577
|
+
onPageScrollStateChanged: function onPageScrollStateChanged(e) {
|
|
17578
|
+
if (!hasScrolled.current && e.nativeEvent.pageScrollState === 'dragging') {
|
|
17579
|
+
hasScrolled.current = true;
|
|
17580
|
+
}
|
|
17581
|
+
},
|
|
17575
17582
|
onPageSelected: function onPageSelected(e) {
|
|
17576
17583
|
var index = e.nativeEvent.position;
|
|
17577
17584
|
var selectedItem = tabs[index];
|
|
17578
|
-
if (selectedItem) {
|
|
17585
|
+
if (hasScrolled.current && selectedItem) {
|
|
17579
17586
|
setTimeout(function () {
|
|
17580
17587
|
onTabPress(selectedItem.key);
|
|
17581
17588
|
});
|
package/package.json
CHANGED
|
@@ -38,7 +38,7 @@ exports[`Badge has danger style when intent is danger 1`] = `
|
|
|
38
38
|
"color": "#001f23",
|
|
39
39
|
"fontFamily": "BeVietnamPro-Regular",
|
|
40
40
|
"fontSize": 12,
|
|
41
|
-
"letterSpacing": 0.
|
|
41
|
+
"letterSpacing": 0.36,
|
|
42
42
|
"lineHeight": 16,
|
|
43
43
|
},
|
|
44
44
|
[
|
|
@@ -119,7 +119,7 @@ exports[`Badge has info style when intent is info 1`] = `
|
|
|
119
119
|
"color": "#001f23",
|
|
120
120
|
"fontFamily": "BeVietnamPro-Regular",
|
|
121
121
|
"fontSize": 12,
|
|
122
|
-
"letterSpacing": 0.
|
|
122
|
+
"letterSpacing": 0.36,
|
|
123
123
|
"lineHeight": 16,
|
|
124
124
|
},
|
|
125
125
|
[
|
|
@@ -200,7 +200,7 @@ exports[`Badge has info style when intent is primary 1`] = `
|
|
|
200
200
|
"color": "#001f23",
|
|
201
201
|
"fontFamily": "BeVietnamPro-Regular",
|
|
202
202
|
"fontSize": 12,
|
|
203
|
-
"letterSpacing": 0.
|
|
203
|
+
"letterSpacing": 0.36,
|
|
204
204
|
"lineHeight": 16,
|
|
205
205
|
},
|
|
206
206
|
[
|
|
@@ -281,7 +281,7 @@ exports[`Badge has success style when intent is success 1`] = `
|
|
|
281
281
|
"color": "#001f23",
|
|
282
282
|
"fontFamily": "BeVietnamPro-Regular",
|
|
283
283
|
"fontSize": 12,
|
|
284
|
-
"letterSpacing": 0.
|
|
284
|
+
"letterSpacing": 0.36,
|
|
285
285
|
"lineHeight": 16,
|
|
286
286
|
},
|
|
287
287
|
[
|
|
@@ -362,7 +362,7 @@ exports[`Badge has warning style when intent is warning 1`] = `
|
|
|
362
362
|
"color": "#001f23",
|
|
363
363
|
"fontFamily": "BeVietnamPro-Regular",
|
|
364
364
|
"fontSize": 12,
|
|
365
|
-
"letterSpacing": 0.
|
|
365
|
+
"letterSpacing": 0.36,
|
|
366
366
|
"lineHeight": 16,
|
|
367
367
|
},
|
|
368
368
|
[
|
|
@@ -444,7 +444,7 @@ exports[`Badge renders correctly with custom props 1`] = `
|
|
|
444
444
|
"color": "#001f23",
|
|
445
445
|
"fontFamily": "BeVietnamPro-Regular",
|
|
446
446
|
"fontSize": 12,
|
|
447
|
-
"letterSpacing": 0.
|
|
447
|
+
"letterSpacing": 0.36,
|
|
448
448
|
"lineHeight": 16,
|
|
449
449
|
},
|
|
450
450
|
[
|
|
@@ -109,7 +109,7 @@ exports[`BasicListItem when suffix and prefix are icon name renders correctly 1`
|
|
|
109
109
|
"color": "#4d6265",
|
|
110
110
|
"fontFamily": "BeVietnamPro-Regular",
|
|
111
111
|
"fontSize": 12,
|
|
112
|
-
"letterSpacing": 0.
|
|
112
|
+
"letterSpacing": 0.36,
|
|
113
113
|
"lineHeight": 16,
|
|
114
114
|
},
|
|
115
115
|
undefined,
|
|
@@ -280,7 +280,7 @@ exports[`BasicListItem when suffix and prefix are react element renders correctl
|
|
|
280
280
|
"color": "#4d6265",
|
|
281
281
|
"fontFamily": "BeVietnamPro-Regular",
|
|
282
282
|
"fontSize": 12,
|
|
283
|
-
"letterSpacing": 0.
|
|
283
|
+
"letterSpacing": 0.36,
|
|
284
284
|
"lineHeight": 16,
|
|
285
285
|
},
|
|
286
286
|
undefined,
|
|
@@ -199,7 +199,7 @@ exports[`ListItem renders correctly ListItem with children 1`] = `
|
|
|
199
199
|
"color": "#4d6265",
|
|
200
200
|
"fontFamily": "BeVietnamPro-Regular",
|
|
201
201
|
"fontSize": 12,
|
|
202
|
-
"letterSpacing": 0.
|
|
202
|
+
"letterSpacing": 0.36,
|
|
203
203
|
"lineHeight": 16,
|
|
204
204
|
},
|
|
205
205
|
undefined,
|
|
@@ -477,7 +477,7 @@ exports[`ListItem renders correctly ListItem with icon 1`] = `
|
|
|
477
477
|
"color": "#4d6265",
|
|
478
478
|
"fontFamily": "BeVietnamPro-Regular",
|
|
479
479
|
"fontSize": 12,
|
|
480
|
-
"letterSpacing": 0.
|
|
480
|
+
"letterSpacing": 0.36,
|
|
481
481
|
"lineHeight": 16,
|
|
482
482
|
},
|
|
483
483
|
undefined,
|
|
@@ -900,7 +900,7 @@ exports[`ListItem renders correctly ListItem with prefix suffix is React.Element
|
|
|
900
900
|
"color": "#4d6265",
|
|
901
901
|
"fontFamily": "BeVietnamPro-Regular",
|
|
902
902
|
"fontSize": 12,
|
|
903
|
-
"letterSpacing": 0.
|
|
903
|
+
"letterSpacing": 0.36,
|
|
904
904
|
"lineHeight": 16,
|
|
905
905
|
},
|
|
906
906
|
undefined,
|
|
@@ -1116,7 +1116,7 @@ exports[`rendering renders correctly when there is error 1`] = `
|
|
|
1116
1116
|
"color": "#001f23",
|
|
1117
1117
|
"fontFamily": "BeVietnamPro-Regular",
|
|
1118
1118
|
"fontSize": 12,
|
|
1119
|
-
"letterSpacing": 0.
|
|
1119
|
+
"letterSpacing": 0.36,
|
|
1120
1120
|
"lineHeight": 16,
|
|
1121
1121
|
},
|
|
1122
1122
|
[
|
|
@@ -273,7 +273,7 @@ exports[`RichTextEditor onMessage recevied event editor-layout should update hei
|
|
|
273
273
|
"color": "#001f23",
|
|
274
274
|
"fontFamily": "BeVietnamPro-Regular",
|
|
275
275
|
"fontSize": 12,
|
|
276
|
-
"letterSpacing": 0.
|
|
276
|
+
"letterSpacing": 0.36,
|
|
277
277
|
"lineHeight": 16,
|
|
278
278
|
},
|
|
279
279
|
[
|
|
@@ -590,7 +590,7 @@ exports[`RichTextEditor should render correctly 1`] = `
|
|
|
590
590
|
"color": "#001f23",
|
|
591
591
|
"fontFamily": "BeVietnamPro-Regular",
|
|
592
592
|
"fontSize": 12,
|
|
593
|
-
"letterSpacing": 0.
|
|
593
|
+
"letterSpacing": 0.36,
|
|
594
594
|
"lineHeight": 16,
|
|
595
595
|
},
|
|
596
596
|
[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
2
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
3
3
|
import PagerView from 'react-native-pager-view';
|
|
4
4
|
import { TabContainer, ContentWrapper } from './StyledScrollableTabs';
|
|
@@ -23,6 +23,8 @@ const ScrollableTab = ({
|
|
|
23
23
|
const selectedTabIndex = tabs.findIndex(
|
|
24
24
|
(item) => item.key === selectedTabKey
|
|
25
25
|
);
|
|
26
|
+
// Used as a flag to prevent calling onTabPress on initial render
|
|
27
|
+
const hasScrolled = useRef(false);
|
|
26
28
|
|
|
27
29
|
React.useEffect(() => {
|
|
28
30
|
let timeoutHandle: ReturnType<typeof setTimeout>;
|
|
@@ -63,10 +65,18 @@ const ScrollableTab = ({
|
|
|
63
65
|
<ContentWrapper
|
|
64
66
|
initialPage={selectedTabIndex}
|
|
65
67
|
ref={pagerViewRef}
|
|
68
|
+
onPageScrollStateChanged={(e) => {
|
|
69
|
+
if (
|
|
70
|
+
!hasScrolled.current &&
|
|
71
|
+
e.nativeEvent.pageScrollState === 'dragging'
|
|
72
|
+
) {
|
|
73
|
+
hasScrolled.current = true;
|
|
74
|
+
}
|
|
75
|
+
}}
|
|
66
76
|
onPageSelected={(e) => {
|
|
67
77
|
const index = e.nativeEvent.position;
|
|
68
78
|
const selectedItem = tabs[index];
|
|
69
|
-
if (selectedItem) {
|
|
79
|
+
if (hasScrolled.current && selectedItem) {
|
|
70
80
|
setTimeout(() => {
|
|
71
81
|
onTabPress(selectedItem.key);
|
|
72
82
|
});
|
|
@@ -702,7 +702,7 @@ exports[`Tabs.Scroll lazy not render lazy screen: xxx 1`] = `
|
|
|
702
702
|
"color": "#001f23",
|
|
703
703
|
"fontFamily": "BeVietnamPro-Regular",
|
|
704
704
|
"fontSize": 12,
|
|
705
|
-
"letterSpacing": 0.
|
|
705
|
+
"letterSpacing": 0.36,
|
|
706
706
|
"lineHeight": 16,
|
|
707
707
|
},
|
|
708
708
|
[
|
|
@@ -1606,7 +1606,7 @@ exports[`Tabs.Scroll renders correctly 1`] = `
|
|
|
1606
1606
|
"color": "#001f23",
|
|
1607
1607
|
"fontFamily": "BeVietnamPro-Regular",
|
|
1608
1608
|
"fontSize": 12,
|
|
1609
|
-
"letterSpacing": 0.
|
|
1609
|
+
"letterSpacing": 0.36,
|
|
1610
1610
|
"lineHeight": 16,
|
|
1611
1611
|
},
|
|
1612
1612
|
[
|
|
@@ -2510,7 +2510,7 @@ exports[`useIsFocused renders correctly 1`] = `
|
|
|
2510
2510
|
"color": "#001f23",
|
|
2511
2511
|
"fontFamily": "BeVietnamPro-Regular",
|
|
2512
2512
|
"fontSize": 12,
|
|
2513
|
-
"letterSpacing": 0.
|
|
2513
|
+
"letterSpacing": 0.36,
|
|
2514
2514
|
"lineHeight": 16,
|
|
2515
2515
|
},
|
|
2516
2516
|
[
|
|
@@ -446,7 +446,7 @@ exports[`Tabs renders correctly 1`] = `
|
|
|
446
446
|
"color": "#001f23",
|
|
447
447
|
"fontFamily": "BeVietnamPro-Regular",
|
|
448
448
|
"fontSize": 12,
|
|
449
|
-
"letterSpacing": 0.
|
|
449
|
+
"letterSpacing": 0.36,
|
|
450
450
|
"lineHeight": 16,
|
|
451
451
|
},
|
|
452
452
|
[
|
|
@@ -1110,7 +1110,7 @@ exports[`useIsFocused renders correctly 1`] = `
|
|
|
1110
1110
|
"color": "#001f23",
|
|
1111
1111
|
"fontFamily": "BeVietnamPro-Regular",
|
|
1112
1112
|
"fontSize": 12,
|
|
1113
|
-
"letterSpacing": 0.
|
|
1113
|
+
"letterSpacing": 0.36,
|
|
1114
1114
|
"lineHeight": 16,
|
|
1115
1115
|
},
|
|
1116
1116
|
[
|
|
@@ -1774,7 +1774,7 @@ exports[`useIsFocused renders correctly: xxxxxx 1`] = `
|
|
|
1774
1774
|
"color": "#001f23",
|
|
1775
1775
|
"fontFamily": "BeVietnamPro-Regular",
|
|
1776
1776
|
"fontSize": 12,
|
|
1777
|
-
"letterSpacing": 0.
|
|
1777
|
+
"letterSpacing": 0.36,
|
|
1778
1778
|
"lineHeight": 16,
|
|
1779
1779
|
},
|
|
1780
1780
|
[
|
|
@@ -621,7 +621,7 @@ exports[`StyledErrorMessage renders correctly 1`] = `
|
|
|
621
621
|
"color": "#001f23",
|
|
622
622
|
"fontFamily": "BeVietnamPro-Regular",
|
|
623
623
|
"fontSize": 12,
|
|
624
|
-
"letterSpacing": 0.
|
|
624
|
+
"letterSpacing": 0.36,
|
|
625
625
|
"lineHeight": 16,
|
|
626
626
|
},
|
|
627
627
|
[
|
|
@@ -722,7 +722,7 @@ exports[`StyledHelperText renders correctly 1`] = `
|
|
|
722
722
|
"color": "#001f23",
|
|
723
723
|
"fontFamily": "BeVietnamPro-Regular",
|
|
724
724
|
"fontSize": 12,
|
|
725
|
-
"letterSpacing": 0.
|
|
725
|
+
"letterSpacing": 0.36,
|
|
726
726
|
"lineHeight": 16,
|
|
727
727
|
},
|
|
728
728
|
undefined,
|
|
@@ -772,7 +772,7 @@ exports[`StyledMaxLengthMessage renders correctly with themeState default 1`] =
|
|
|
772
772
|
"color": "#001f23",
|
|
773
773
|
"fontFamily": "BeVietnamPro-Regular",
|
|
774
774
|
"fontSize": 12,
|
|
775
|
-
"letterSpacing": 0.
|
|
775
|
+
"letterSpacing": 0.36,
|
|
776
776
|
"lineHeight": 16,
|
|
777
777
|
},
|
|
778
778
|
[
|
|
@@ -833,7 +833,7 @@ exports[`StyledMaxLengthMessage renders correctly with themeState disabled 1`] =
|
|
|
833
833
|
"color": "#001f23",
|
|
834
834
|
"fontFamily": "BeVietnamPro-Regular",
|
|
835
835
|
"fontSize": 12,
|
|
836
|
-
"letterSpacing": 0.
|
|
836
|
+
"letterSpacing": 0.36,
|
|
837
837
|
"lineHeight": 16,
|
|
838
838
|
},
|
|
839
839
|
[
|
|
@@ -894,7 +894,7 @@ exports[`StyledMaxLengthMessage renders correctly with themeState error 1`] = `
|
|
|
894
894
|
"color": "#001f23",
|
|
895
895
|
"fontFamily": "BeVietnamPro-Regular",
|
|
896
896
|
"fontSize": 12,
|
|
897
|
-
"letterSpacing": 0.
|
|
897
|
+
"letterSpacing": 0.36,
|
|
898
898
|
"lineHeight": 16,
|
|
899
899
|
},
|
|
900
900
|
[
|
|
@@ -955,7 +955,7 @@ exports[`StyledMaxLengthMessage renders correctly with themeState filled 1`] = `
|
|
|
955
955
|
"color": "#001f23",
|
|
956
956
|
"fontFamily": "BeVietnamPro-Regular",
|
|
957
957
|
"fontSize": 12,
|
|
958
|
-
"letterSpacing": 0.
|
|
958
|
+
"letterSpacing": 0.36,
|
|
959
959
|
"lineHeight": 16,
|
|
960
960
|
},
|
|
961
961
|
[
|
|
@@ -1016,7 +1016,7 @@ exports[`StyledMaxLengthMessage renders correctly with themeState readonly 1`] =
|
|
|
1016
1016
|
"color": "#001f23",
|
|
1017
1017
|
"fontFamily": "BeVietnamPro-Regular",
|
|
1018
1018
|
"fontSize": 12,
|
|
1019
|
-
"letterSpacing": 0.
|
|
1019
|
+
"letterSpacing": 0.36,
|
|
1020
1020
|
"lineHeight": 16,
|
|
1021
1021
|
},
|
|
1022
1022
|
[
|
|
@@ -255,7 +255,7 @@ exports[`TextInput backgroundColor renders correctly 1`] = `
|
|
|
255
255
|
"color": "#001f23",
|
|
256
256
|
"fontFamily": "BeVietnamPro-Regular",
|
|
257
257
|
"fontSize": 12,
|
|
258
|
-
"letterSpacing": 0.
|
|
258
|
+
"letterSpacing": 0.36,
|
|
259
259
|
"lineHeight": 16,
|
|
260
260
|
},
|
|
261
261
|
undefined,
|
|
@@ -274,7 +274,7 @@ exports[`TextInput backgroundColor renders correctly 1`] = `
|
|
|
274
274
|
"color": "#001f23",
|
|
275
275
|
"fontFamily": "BeVietnamPro-Regular",
|
|
276
276
|
"fontSize": 12,
|
|
277
|
-
"letterSpacing": 0.
|
|
277
|
+
"letterSpacing": 0.36,
|
|
278
278
|
"lineHeight": 16,
|
|
279
279
|
},
|
|
280
280
|
[
|
|
@@ -578,7 +578,7 @@ exports[`TextInput defaultValue TextInput is idle renders correctly 1`] = `
|
|
|
578
578
|
"color": "#001f23",
|
|
579
579
|
"fontFamily": "BeVietnamPro-Regular",
|
|
580
580
|
"fontSize": 12,
|
|
581
|
-
"letterSpacing": 0.
|
|
581
|
+
"letterSpacing": 0.36,
|
|
582
582
|
"lineHeight": 16,
|
|
583
583
|
},
|
|
584
584
|
undefined,
|
|
@@ -597,7 +597,7 @@ exports[`TextInput defaultValue TextInput is idle renders correctly 1`] = `
|
|
|
597
597
|
"color": "#001f23",
|
|
598
598
|
"fontFamily": "BeVietnamPro-Regular",
|
|
599
599
|
"fontSize": 12,
|
|
600
|
-
"letterSpacing": 0.
|
|
600
|
+
"letterSpacing": 0.36,
|
|
601
601
|
"lineHeight": 16,
|
|
602
602
|
},
|
|
603
603
|
[
|
|
@@ -902,7 +902,7 @@ exports[`TextInput defaultValue default Value and Value renders correctly with 2
|
|
|
902
902
|
"color": "#001f23",
|
|
903
903
|
"fontFamily": "BeVietnamPro-Regular",
|
|
904
904
|
"fontSize": 12,
|
|
905
|
-
"letterSpacing": 0.
|
|
905
|
+
"letterSpacing": 0.36,
|
|
906
906
|
"lineHeight": 16,
|
|
907
907
|
},
|
|
908
908
|
undefined,
|
|
@@ -921,7 +921,7 @@ exports[`TextInput defaultValue default Value and Value renders correctly with 2
|
|
|
921
921
|
"color": "#001f23",
|
|
922
922
|
"fontFamily": "BeVietnamPro-Regular",
|
|
923
923
|
"fontSize": 12,
|
|
924
|
-
"letterSpacing": 0.
|
|
924
|
+
"letterSpacing": 0.36,
|
|
925
925
|
"lineHeight": 16,
|
|
926
926
|
},
|
|
927
927
|
[
|
|
@@ -1507,7 +1507,7 @@ exports[`TextInput error renders correctly 1`] = `
|
|
|
1507
1507
|
"color": "#001f23",
|
|
1508
1508
|
"fontFamily": "BeVietnamPro-Regular",
|
|
1509
1509
|
"fontSize": 12,
|
|
1510
|
-
"letterSpacing": 0.
|
|
1510
|
+
"letterSpacing": 0.36,
|
|
1511
1511
|
"lineHeight": 16,
|
|
1512
1512
|
},
|
|
1513
1513
|
[
|
|
@@ -2060,7 +2060,7 @@ exports[`TextInput helper text renders correctly 1`] = `
|
|
|
2060
2060
|
"color": "#001f23",
|
|
2061
2061
|
"fontFamily": "BeVietnamPro-Regular",
|
|
2062
2062
|
"fontSize": 12,
|
|
2063
|
-
"letterSpacing": 0.
|
|
2063
|
+
"letterSpacing": 0.36,
|
|
2064
2064
|
"lineHeight": 16,
|
|
2065
2065
|
},
|
|
2066
2066
|
undefined,
|
|
@@ -3123,7 +3123,7 @@ exports[`TextInput max length renders correctly 1`] = `
|
|
|
3123
3123
|
"color": "#001f23",
|
|
3124
3124
|
"fontFamily": "BeVietnamPro-Regular",
|
|
3125
3125
|
"fontSize": 12,
|
|
3126
|
-
"letterSpacing": 0.
|
|
3126
|
+
"letterSpacing": 0.36,
|
|
3127
3127
|
"lineHeight": 16,
|
|
3128
3128
|
},
|
|
3129
3129
|
[
|
|
@@ -3150,7 +3150,7 @@ exports[`TextInput max length renders correctly 1`] = `
|
|
|
3150
3150
|
"color": "#001f23",
|
|
3151
3151
|
"fontFamily": "BeVietnamPro-Regular",
|
|
3152
3152
|
"fontSize": 12,
|
|
3153
|
-
"letterSpacing": 0.
|
|
3153
|
+
"letterSpacing": 0.36,
|
|
3154
3154
|
"lineHeight": 16,
|
|
3155
3155
|
},
|
|
3156
3156
|
[
|
|
@@ -3468,7 +3468,7 @@ exports[`TextInput max length renders correctly with hide character count 1`] =
|
|
|
3468
3468
|
"color": "#001f23",
|
|
3469
3469
|
"fontFamily": "BeVietnamPro-Regular",
|
|
3470
3470
|
"fontSize": 12,
|
|
3471
|
-
"letterSpacing": 0.
|
|
3471
|
+
"letterSpacing": 0.36,
|
|
3472
3472
|
"lineHeight": 16,
|
|
3473
3473
|
},
|
|
3474
3474
|
[
|
|
@@ -3765,7 +3765,7 @@ exports[`TextInput placeholder TextInput is idle renders correctly 1`] = `
|
|
|
3765
3765
|
"color": "#001f23",
|
|
3766
3766
|
"fontFamily": "BeVietnamPro-Regular",
|
|
3767
3767
|
"fontSize": 12,
|
|
3768
|
-
"letterSpacing": 0.
|
|
3768
|
+
"letterSpacing": 0.36,
|
|
3769
3769
|
"lineHeight": 16,
|
|
3770
3770
|
},
|
|
3771
3771
|
undefined,
|
|
@@ -8,7 +8,7 @@ const StyledCaption = styled(Text)<{
|
|
|
8
8
|
}>(({ themeFontWeight, themeIntent, theme }) => ({
|
|
9
9
|
fontSize: theme.__hd__.typography.fontSizes.caption,
|
|
10
10
|
lineHeight: theme.__hd__.typography.lineHeights.caption,
|
|
11
|
-
letterSpacing: themeFontWeight === 'regular' ? 0.
|
|
11
|
+
letterSpacing: themeFontWeight === 'regular' ? 0.36 : 0.24,
|
|
12
12
|
color: theme.__hd__.typography.colors[themeIntent],
|
|
13
13
|
fontFamily:
|
|
14
14
|
theme.__hd__.typography.fonts.neutral[FONTWEIGHT_MAP[themeFontWeight]],
|
package/src/components/Typography/Caption/__tests__/__snapshots__/StyledCaption.spec.tsx.snap
CHANGED
|
@@ -15,7 +15,7 @@ exports[`StyledCaption has body intent style 1`] = `
|
|
|
15
15
|
"color": "#001f23",
|
|
16
16
|
"fontFamily": "BeVietnamPro-Regular",
|
|
17
17
|
"fontSize": 12,
|
|
18
|
-
"letterSpacing": 0.
|
|
18
|
+
"letterSpacing": 0.36,
|
|
19
19
|
"lineHeight": 16,
|
|
20
20
|
},
|
|
21
21
|
undefined,
|
|
@@ -64,7 +64,7 @@ exports[`StyledCaption has danger intent style 1`] = `
|
|
|
64
64
|
"color": "#f46363",
|
|
65
65
|
"fontFamily": "BeVietnamPro-Regular",
|
|
66
66
|
"fontSize": 12,
|
|
67
|
-
"letterSpacing": 0.
|
|
67
|
+
"letterSpacing": 0.36,
|
|
68
68
|
"lineHeight": 16,
|
|
69
69
|
},
|
|
70
70
|
undefined,
|
|
@@ -113,7 +113,7 @@ exports[`StyledCaption has info intent style 1`] = `
|
|
|
113
113
|
"color": "#355bfb",
|
|
114
114
|
"fontFamily": "BeVietnamPro-Regular",
|
|
115
115
|
"fontSize": 12,
|
|
116
|
-
"letterSpacing": 0.
|
|
116
|
+
"letterSpacing": 0.36,
|
|
117
117
|
"lineHeight": 16,
|
|
118
118
|
},
|
|
119
119
|
undefined,
|
|
@@ -162,7 +162,7 @@ exports[`StyledCaption has inverted intent style 1`] = `
|
|
|
162
162
|
"color": "#ffffff",
|
|
163
163
|
"fontFamily": "BeVietnamPro-Regular",
|
|
164
164
|
"fontSize": 12,
|
|
165
|
-
"letterSpacing": 0.
|
|
165
|
+
"letterSpacing": 0.36,
|
|
166
166
|
"lineHeight": 16,
|
|
167
167
|
},
|
|
168
168
|
undefined,
|
|
@@ -211,7 +211,7 @@ exports[`StyledCaption has primary intent style 1`] = `
|
|
|
211
211
|
"color": "#401960",
|
|
212
212
|
"fontFamily": "BeVietnamPro-Regular",
|
|
213
213
|
"fontSize": 12,
|
|
214
|
-
"letterSpacing": 0.
|
|
214
|
+
"letterSpacing": 0.36,
|
|
215
215
|
"lineHeight": 16,
|
|
216
216
|
},
|
|
217
217
|
undefined,
|
|
@@ -260,7 +260,7 @@ exports[`StyledCaption has regular fontWeight style 1`] = `
|
|
|
260
260
|
"color": "#001f23",
|
|
261
261
|
"fontFamily": "BeVietnamPro-Regular",
|
|
262
262
|
"fontSize": 12,
|
|
263
|
-
"letterSpacing": 0.
|
|
263
|
+
"letterSpacing": 0.36,
|
|
264
264
|
"lineHeight": 16,
|
|
265
265
|
},
|
|
266
266
|
undefined,
|
|
@@ -358,7 +358,7 @@ exports[`StyledCaption has subdued intent style 1`] = `
|
|
|
358
358
|
"color": "#4d6265",
|
|
359
359
|
"fontFamily": "BeVietnamPro-Regular",
|
|
360
360
|
"fontSize": 12,
|
|
361
|
-
"letterSpacing": 0.
|
|
361
|
+
"letterSpacing": 0.36,
|
|
362
362
|
"lineHeight": 16,
|
|
363
363
|
},
|
|
364
364
|
undefined,
|
|
@@ -407,7 +407,7 @@ exports[`StyledCaption has success intent style 1`] = `
|
|
|
407
407
|
"color": "#5ace7d",
|
|
408
408
|
"fontFamily": "BeVietnamPro-Regular",
|
|
409
409
|
"fontSize": 12,
|
|
410
|
-
"letterSpacing": 0.
|
|
410
|
+
"letterSpacing": 0.36,
|
|
411
411
|
"lineHeight": 16,
|
|
412
412
|
},
|
|
413
413
|
undefined,
|
|
@@ -456,7 +456,7 @@ exports[`StyledCaption has warning intent style 1`] = `
|
|
|
456
456
|
"color": "#ffbe71",
|
|
457
457
|
"fontFamily": "BeVietnamPro-Regular",
|
|
458
458
|
"fontSize": 12,
|
|
459
|
-
"letterSpacing": 0.
|
|
459
|
+
"letterSpacing": 0.36,
|
|
460
460
|
"lineHeight": 16,
|
|
461
461
|
},
|
|
462
462
|
undefined,
|
|
@@ -16,7 +16,7 @@ exports[`Caption has archived intent style 1`] = `
|
|
|
16
16
|
"color": "#606065",
|
|
17
17
|
"fontFamily": "BeVietnamPro-Regular",
|
|
18
18
|
"fontSize": 12,
|
|
19
|
-
"letterSpacing": 0.
|
|
19
|
+
"letterSpacing": 0.36,
|
|
20
20
|
"lineHeight": 16,
|
|
21
21
|
},
|
|
22
22
|
undefined,
|
|
@@ -66,7 +66,7 @@ exports[`Caption has body intent style 1`] = `
|
|
|
66
66
|
"color": "#001f23",
|
|
67
67
|
"fontFamily": "BeVietnamPro-Regular",
|
|
68
68
|
"fontSize": 12,
|
|
69
|
-
"letterSpacing": 0.
|
|
69
|
+
"letterSpacing": 0.36,
|
|
70
70
|
"lineHeight": 16,
|
|
71
71
|
},
|
|
72
72
|
undefined,
|
|
@@ -116,7 +116,7 @@ exports[`Caption has danger intent style 1`] = `
|
|
|
116
116
|
"color": "#f46363",
|
|
117
117
|
"fontFamily": "BeVietnamPro-Regular",
|
|
118
118
|
"fontSize": 12,
|
|
119
|
-
"letterSpacing": 0.
|
|
119
|
+
"letterSpacing": 0.36,
|
|
120
120
|
"lineHeight": 16,
|
|
121
121
|
},
|
|
122
122
|
undefined,
|
|
@@ -166,7 +166,7 @@ exports[`Caption has disabled intent style 1`] = `
|
|
|
166
166
|
"color": "#bfc1c5",
|
|
167
167
|
"fontFamily": "BeVietnamPro-Regular",
|
|
168
168
|
"fontSize": 12,
|
|
169
|
-
"letterSpacing": 0.
|
|
169
|
+
"letterSpacing": 0.36,
|
|
170
170
|
"lineHeight": 16,
|
|
171
171
|
},
|
|
172
172
|
undefined,
|
|
@@ -216,7 +216,7 @@ exports[`Caption has info intent style 1`] = `
|
|
|
216
216
|
"color": "#355bfb",
|
|
217
217
|
"fontFamily": "BeVietnamPro-Regular",
|
|
218
218
|
"fontSize": 12,
|
|
219
|
-
"letterSpacing": 0.
|
|
219
|
+
"letterSpacing": 0.36,
|
|
220
220
|
"lineHeight": 16,
|
|
221
221
|
},
|
|
222
222
|
undefined,
|
|
@@ -266,7 +266,7 @@ exports[`Caption has inverted intent style 1`] = `
|
|
|
266
266
|
"color": "#ffffff",
|
|
267
267
|
"fontFamily": "BeVietnamPro-Regular",
|
|
268
268
|
"fontSize": 12,
|
|
269
|
-
"letterSpacing": 0.
|
|
269
|
+
"letterSpacing": 0.36,
|
|
270
270
|
"lineHeight": 16,
|
|
271
271
|
},
|
|
272
272
|
undefined,
|
|
@@ -316,7 +316,7 @@ exports[`Caption has primary intent style 1`] = `
|
|
|
316
316
|
"color": "#401960",
|
|
317
317
|
"fontFamily": "BeVietnamPro-Regular",
|
|
318
318
|
"fontSize": 12,
|
|
319
|
-
"letterSpacing": 0.
|
|
319
|
+
"letterSpacing": 0.36,
|
|
320
320
|
"lineHeight": 16,
|
|
321
321
|
},
|
|
322
322
|
undefined,
|
|
@@ -366,7 +366,7 @@ exports[`Caption has regular fontWeight style 1`] = `
|
|
|
366
366
|
"color": "#001f23",
|
|
367
367
|
"fontFamily": "BeVietnamPro-Regular",
|
|
368
368
|
"fontSize": 12,
|
|
369
|
-
"letterSpacing": 0.
|
|
369
|
+
"letterSpacing": 0.36,
|
|
370
370
|
"lineHeight": 16,
|
|
371
371
|
},
|
|
372
372
|
undefined,
|
|
@@ -416,7 +416,7 @@ exports[`Caption has secondary intent style 1`] = `
|
|
|
416
416
|
"color": "#795e90",
|
|
417
417
|
"fontFamily": "BeVietnamPro-Regular",
|
|
418
418
|
"fontSize": 12,
|
|
419
|
-
"letterSpacing": 0.
|
|
419
|
+
"letterSpacing": 0.36,
|
|
420
420
|
"lineHeight": 16,
|
|
421
421
|
},
|
|
422
422
|
undefined,
|
|
@@ -516,7 +516,7 @@ exports[`Caption has subdued intent style 1`] = `
|
|
|
516
516
|
"color": "#4d6265",
|
|
517
517
|
"fontFamily": "BeVietnamPro-Regular",
|
|
518
518
|
"fontSize": 12,
|
|
519
|
-
"letterSpacing": 0.
|
|
519
|
+
"letterSpacing": 0.36,
|
|
520
520
|
"lineHeight": 16,
|
|
521
521
|
},
|
|
522
522
|
undefined,
|
|
@@ -566,7 +566,7 @@ exports[`Caption has success intent style 1`] = `
|
|
|
566
566
|
"color": "#5ace7d",
|
|
567
567
|
"fontFamily": "BeVietnamPro-Regular",
|
|
568
568
|
"fontSize": 12,
|
|
569
|
-
"letterSpacing": 0.
|
|
569
|
+
"letterSpacing": 0.36,
|
|
570
570
|
"lineHeight": 16,
|
|
571
571
|
},
|
|
572
572
|
undefined,
|
|
@@ -616,7 +616,7 @@ exports[`Caption has warning intent style 1`] = `
|
|
|
616
616
|
"color": "#ffbe71",
|
|
617
617
|
"fontFamily": "BeVietnamPro-Regular",
|
|
618
618
|
"fontSize": 12,
|
|
619
|
-
"letterSpacing": 0.
|
|
619
|
+
"letterSpacing": 0.36,
|
|
620
620
|
"lineHeight": 16,
|
|
621
621
|
},
|
|
622
622
|
undefined,
|