@hero-design/rn 8.82.2-alpha.2 → 8.83.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 +7 -0
- package/CHANGELOG.md +20 -0
- package/es/index.js +491 -21
- package/lib/index.js +490 -18
- package/package.json +6 -4
- package/rollup.config.mjs +1 -0
- package/src/components/AppCue/StyledAppCue.tsx +46 -0
- package/src/components/AppCue/__tests__/StyledAppCue.tsx +18 -0
- package/src/components/AppCue/__tests__/__snapshots__/StyledAppCue.tsx.snap +200 -0
- package/src/components/AppCue/__tests__/__snapshots__/index.spec.tsx.snap +391 -0
- package/src/components/AppCue/__tests__/index.spec.tsx +61 -0
- package/src/components/AppCue/__tests__/utils.spec.ts +90 -0
- package/src/components/AppCue/index.tsx +188 -0
- package/src/components/AppCue/utils.ts +122 -0
- package/src/components/Chip/StyledChip.tsx +9 -9
- package/src/components/Chip/__tests__/__snapshots__/index.spec.tsx.snap +434 -0
- package/src/components/Chip/__tests__/index.spec.tsx +4 -0
- package/src/components/Chip/index.tsx +32 -5
- package/src/components/Slider/RangeSlider.tsx +187 -0
- package/src/components/Slider/SingleSlider.tsx +89 -0
- package/src/components/Slider/StyledRangeSlider.tsx +16 -0
- package/src/components/Slider/__tests__/RangeSlider.spec.tsx +119 -0
- package/src/components/Slider/__tests__/{index.spec.tsx → SingleSlider.spec.tsx} +1 -1
- package/src/components/Slider/__tests__/__snapshots__/RangeSlider.spec.tsx.snap +252 -0
- package/src/components/Slider/index.tsx +8 -83
- package/src/components/Tabs/StyledScrollableTabs.tsx +2 -1
- package/src/components/Tabs/StyledTabs.tsx +1 -0
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +3 -0
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +2 -0
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +3 -0
- package/src/index.ts +2 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +39 -0
- package/src/theme/components/appCue.ts +22 -0
- package/src/theme/components/slider.ts +19 -1
- package/src/theme/components/tabs.ts +1 -0
- package/src/theme/getTheme.ts +3 -0
- package/src/types.ts +2 -0
- package/stats/8.83.0/rn-stats.html +4844 -0
- package/testUtils/setup.tsx +17 -0
- package/types/components/AppCue/StyledAppCue.d.ts +20 -0
- package/types/components/AppCue/__tests__/StyledAppCue.d.ts +1 -0
- package/types/components/AppCue/index.d.ts +21 -0
- package/types/components/AppCue/utils.d.ts +63 -0
- package/types/components/Chip/StyledChip.d.ts +1 -1
- package/types/components/Chip/index.d.ts +2 -2
- package/types/components/Slider/RangeSlider.d.ts +60 -0
- package/types/components/Slider/SingleSlider.d.ts +53 -0
- package/types/components/Slider/StyledRangeSlider.d.ts +10 -0
- package/types/components/Slider/index.d.ts +6 -51
- package/types/index.d.ts +2 -1
- package/types/theme/components/appCue.d.ts +16 -0
- package/types/theme/components/slider.d.ts +24 -0
- package/types/theme/components/tabs.d.ts +1 -0
- package/types/theme/getTheme.d.ts +2 -0
- package/types/types.d.ts +2 -1
- /package/src/components/Slider/__tests__/__snapshots__/{index.spec.tsx.snap → SingleSlider.spec.tsx.snap} +0 -0
|
@@ -48,6 +48,20 @@ exports[`theme returns correct theme object 1`] = `
|
|
|
48
48
|
"textPaddingHorizontal": 12,
|
|
49
49
|
},
|
|
50
50
|
},
|
|
51
|
+
"appCue": {
|
|
52
|
+
"colors": {
|
|
53
|
+
"backdropColor": "rgba(0, 0, 0, 0.5)",
|
|
54
|
+
"background": "#001f23",
|
|
55
|
+
},
|
|
56
|
+
"radii": {
|
|
57
|
+
"container": 12,
|
|
58
|
+
},
|
|
59
|
+
"space": {
|
|
60
|
+
"arrowOffset": 12,
|
|
61
|
+
"offset": 8,
|
|
62
|
+
"padding": 16,
|
|
63
|
+
},
|
|
64
|
+
},
|
|
51
65
|
"attachment": {
|
|
52
66
|
"colors": {
|
|
53
67
|
"highlightedBackground": "#ece8ef",
|
|
@@ -1008,9 +1022,33 @@ exports[`theme returns correct theme object 1`] = `
|
|
|
1008
1022
|
},
|
|
1009
1023
|
"slider": {
|
|
1010
1024
|
"colors": {
|
|
1025
|
+
"disabledThumbTint": "#bfc1c5",
|
|
1026
|
+
"disabledTrackBackground": "#f6f6f7",
|
|
1011
1027
|
"maximumTrackTint": "#ece8ef",
|
|
1012
1028
|
"minimumTrackTint": "#401960",
|
|
1013
1029
|
"thumbTint": "#401960",
|
|
1030
|
+
"trackBackground": "#ece8ef",
|
|
1031
|
+
},
|
|
1032
|
+
"radii": {
|
|
1033
|
+
"marker": 999,
|
|
1034
|
+
},
|
|
1035
|
+
"shadows": {
|
|
1036
|
+
"marker": {
|
|
1037
|
+
"elevation": 3,
|
|
1038
|
+
"shadowColor": "#001f23",
|
|
1039
|
+
"shadowOffset": {
|
|
1040
|
+
"height": 2,
|
|
1041
|
+
"width": 0,
|
|
1042
|
+
},
|
|
1043
|
+
"shadowOpacity": 0.12,
|
|
1044
|
+
"shadowRadius": 4,
|
|
1045
|
+
},
|
|
1046
|
+
},
|
|
1047
|
+
"sizes": {
|
|
1048
|
+
"markerBorderRadius": 999,
|
|
1049
|
+
"markerHeight": 24,
|
|
1050
|
+
"markerWidth": 24,
|
|
1051
|
+
"trackHeight": 4,
|
|
1014
1052
|
},
|
|
1015
1053
|
},
|
|
1016
1054
|
"spinner": {
|
|
@@ -1125,6 +1163,7 @@ exports[`theme returns correct theme object 1`] = `
|
|
|
1125
1163
|
"colors": {
|
|
1126
1164
|
"active": "#001f23",
|
|
1127
1165
|
"activeBackground": "#ccd2d3",
|
|
1166
|
+
"headerBackground": "#ffffff",
|
|
1128
1167
|
"headerBottom": "#e8e9ea",
|
|
1129
1168
|
"inactive": "#001f23",
|
|
1130
1169
|
"indicator": "#401960",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { GlobalTheme } from '../global';
|
|
2
|
+
|
|
3
|
+
const getAppCueTheme = (theme: GlobalTheme) => {
|
|
4
|
+
const colors = {
|
|
5
|
+
background: theme.colors.darkGlobalSurface,
|
|
6
|
+
backdropColor: 'rgba(0, 0, 0, 0.5)',
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const space = {
|
|
10
|
+
padding: theme.space.medium,
|
|
11
|
+
offset: theme.space.small,
|
|
12
|
+
arrowOffset: theme.space.smallMedium,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const radii = {
|
|
16
|
+
container: theme.radii.large,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
return { colors, space, radii };
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default getAppCueTheme;
|
|
@@ -5,9 +5,27 @@ const getSliderTheme = (theme: GlobalTheme) => {
|
|
|
5
5
|
minimumTrackTint: theme.colors.primary,
|
|
6
6
|
thumbTint: theme.colors.primary,
|
|
7
7
|
maximumTrackTint: theme.colors.highlightedSurface,
|
|
8
|
+
trackBackground: theme.colors.highlightedSurface,
|
|
9
|
+
disabledThumbTint: theme.colors.disabledOnDefaultGlobalSurface,
|
|
10
|
+
disabledTrackBackground: theme.colors.neutralGlobalSurface,
|
|
8
11
|
};
|
|
9
12
|
|
|
10
|
-
|
|
13
|
+
const shadows = {
|
|
14
|
+
marker: theme.shadows.default,
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const sizes = {
|
|
18
|
+
trackHeight: theme.sizes.xsmall,
|
|
19
|
+
markerWidth: theme.sizes.large,
|
|
20
|
+
markerHeight: theme.sizes.large,
|
|
21
|
+
markerBorderRadius: theme.radii.rounded,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const radii = {
|
|
25
|
+
marker: theme.radii.rounded,
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
return { colors, shadows, sizes, radii };
|
|
11
29
|
};
|
|
12
30
|
|
|
13
31
|
export default getSliderTheme;
|
package/src/theme/getTheme.ts
CHANGED
|
@@ -51,11 +51,13 @@ import type { GlobalTheme, Scale, SystemPalette } from './global';
|
|
|
51
51
|
import getSearchTheme from './components/search';
|
|
52
52
|
import getMapPinTheme from './components/mapPin';
|
|
53
53
|
import getFloatingIslandTheme from './components/floatingIsland';
|
|
54
|
+
import getAppCueTheme from './components/appCue';
|
|
54
55
|
|
|
55
56
|
type Theme = GlobalTheme & {
|
|
56
57
|
__hd__: {
|
|
57
58
|
accordion: ReturnType<typeof getAccordionTheme>;
|
|
58
59
|
alert: ReturnType<typeof getAlertTheme>;
|
|
60
|
+
appCue: ReturnType<typeof getAppCueTheme>;
|
|
59
61
|
attachment: ReturnType<typeof getAttachmentTheme>;
|
|
60
62
|
avatar: ReturnType<typeof getAvatarTheme>;
|
|
61
63
|
badge: BadgeThemeType;
|
|
@@ -116,6 +118,7 @@ const getTheme = (
|
|
|
116
118
|
__hd__: {
|
|
117
119
|
accordion: getAccordionTheme(globalTheme),
|
|
118
120
|
alert: getAlertTheme(globalTheme),
|
|
121
|
+
appCue: getAppCueTheme(globalTheme),
|
|
119
122
|
attachment: getAttachmentTheme(globalTheme),
|
|
120
123
|
avatar: getAvatarTheme(globalTheme),
|
|
121
124
|
badge: getBadgeTheme(globalTheme),
|
package/src/types.ts
CHANGED
|
@@ -17,6 +17,7 @@ import { TextProps } from './components/Typography/Text';
|
|
|
17
17
|
import { CardCarouselHandles } from './components/Carousel/CardCarousel';
|
|
18
18
|
import { FABHandles } from './components/FAB/FAB';
|
|
19
19
|
import { ActionGroupHandles } from './components/FAB/ActionGroup';
|
|
20
|
+
import type { SliderRangeValue } from './components/Slider/RangeSlider';
|
|
20
21
|
|
|
21
22
|
export type {
|
|
22
23
|
BottomNavigationTabType,
|
|
@@ -36,4 +37,5 @@ export type {
|
|
|
36
37
|
CardCarouselHandles,
|
|
37
38
|
FABHandles,
|
|
38
39
|
ActionGroupHandles,
|
|
40
|
+
SliderRangeValue,
|
|
39
41
|
};
|