@hero-design/rn 8.72.0 → 8.73.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.
- package/.turbo/turbo-build.log +3 -3
- package/CHANGELOG.md +18 -0
- package/es/index.js +502 -336
- package/lib/index.js +505 -338
- package/package.json +1 -1
- package/src/components/Chip/StyledChip.tsx +1 -7
- package/src/components/Chip/__tests__/__snapshots__/index.spec.tsx.snap +4 -17
- package/src/components/MapPin/Focussed.tsx +28 -0
- package/src/components/MapPin/StyledMapPin.tsx +69 -0
- package/src/components/MapPin/__tests__/Focussed.spec.tsx +10 -0
- package/src/components/MapPin/__tests__/__snapshots__/Focussed.spec.tsx.snap +72 -0
- package/src/components/MapPin/__tests__/__snapshots__/index.spec.tsx.snap +466 -0
- package/src/components/MapPin/__tests__/index.spec.tsx +44 -0
- package/src/components/MapPin/index.tsx +64 -0
- package/src/components/MapPin/types.ts +41 -0
- package/src/components/PinInput/__tests__/index.spec.tsx +4 -0
- package/src/components/PinInput/index.tsx +7 -3
- package/src/index.ts +2 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +38 -5
- package/src/theme/components/chip.ts +1 -7
- package/src/theme/components/mapPin.ts +46 -0
- package/src/theme/getTheme.ts +3 -0
- package/stats/8.72.0/rn-stats.html +1 -3
- package/stats/8.73.0/rn-stats.html +4844 -0
- package/stats/8.73.1/rn-stats.html +4842 -0
- package/types/components/MapPin/Focussed.d.ts +13 -0
- package/types/components/MapPin/StyledMapPin.d.ts +31 -0
- package/types/components/MapPin/index.d.ts +5 -0
- package/types/components/MapPin/types.d.ts +38 -0
- package/types/index.d.ts +2 -1
- package/types/theme/components/chip.d.ts +1 -5
- package/types/theme/components/mapPin.d.ts +39 -0
- package/types/theme/getTheme.d.ts +2 -0
|
@@ -384,6 +384,7 @@ exports[`theme returns correct theme object 1`] = `
|
|
|
384
384
|
"chip": {
|
|
385
385
|
"borderWidths": {
|
|
386
386
|
"icon": 2,
|
|
387
|
+
"outlinedDefaultBorder": 1,
|
|
387
388
|
"wrapper": 1,
|
|
388
389
|
},
|
|
389
390
|
"colors": {
|
|
@@ -412,15 +413,10 @@ exports[`theme returns correct theme object 1`] = `
|
|
|
412
413
|
"shadowRadius": 4,
|
|
413
414
|
},
|
|
414
415
|
},
|
|
415
|
-
"sizes": {
|
|
416
|
-
"outlinedDefaultBorder": 1,
|
|
417
|
-
"outlinedSelectedBorder": 2,
|
|
418
|
-
},
|
|
419
416
|
"space": {
|
|
420
417
|
"compactWrapperHorizontalPadding": 8,
|
|
421
418
|
"compactWrapperVerticalPadding": 4,
|
|
422
419
|
"iconWrapperHorizontalMargin": 8,
|
|
423
|
-
"outlinedSelectedMarginTop": -2,
|
|
424
420
|
"wrapperHorizontalPadding": 12,
|
|
425
421
|
"wrapperVerticalPadding": 8,
|
|
426
422
|
},
|
|
@@ -664,6 +660,43 @@ exports[`theme returns correct theme object 1`] = `
|
|
|
664
660
|
"leadingStatus": 8,
|
|
665
661
|
},
|
|
666
662
|
},
|
|
663
|
+
"mapPin": {
|
|
664
|
+
"borderWidths": {
|
|
665
|
+
"default": 4,
|
|
666
|
+
},
|
|
667
|
+
"colors": {
|
|
668
|
+
"background": "#ffffff",
|
|
669
|
+
"badge": "#795e90",
|
|
670
|
+
"border": {
|
|
671
|
+
"applied": "#795e90",
|
|
672
|
+
"idle": "#ffffff",
|
|
673
|
+
"selected": "#795e90",
|
|
674
|
+
},
|
|
675
|
+
},
|
|
676
|
+
"fontSizes": {
|
|
677
|
+
"icon": 42,
|
|
678
|
+
},
|
|
679
|
+
"radii": {
|
|
680
|
+
"default": 12,
|
|
681
|
+
},
|
|
682
|
+
"shadows": {
|
|
683
|
+
"color": "#001f23",
|
|
684
|
+
"elevation": 3,
|
|
685
|
+
"offset": {
|
|
686
|
+
"height": 2,
|
|
687
|
+
"width": 0,
|
|
688
|
+
},
|
|
689
|
+
"opacity": 0.12,
|
|
690
|
+
"radius": 4,
|
|
691
|
+
},
|
|
692
|
+
"sizes": {
|
|
693
|
+
"default": 42,
|
|
694
|
+
},
|
|
695
|
+
"space": {
|
|
696
|
+
"iconRight": -8,
|
|
697
|
+
"iconTop": -8,
|
|
698
|
+
},
|
|
699
|
+
},
|
|
667
700
|
"pageControl": {
|
|
668
701
|
"colors": {
|
|
669
702
|
"paginatorBackgroundColor": "#401960",
|
|
@@ -19,12 +19,6 @@ const getChipTheme = (theme: GlobalTheme) => {
|
|
|
19
19
|
compactWrapperHorizontalPadding: theme.space.small,
|
|
20
20
|
compactWrapperVerticalPadding: theme.space.xsmall,
|
|
21
21
|
iconWrapperHorizontalMargin: theme.space.small,
|
|
22
|
-
outlinedSelectedMarginTop: -theme.space.xxsmall,
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const sizes = {
|
|
26
|
-
outlinedDefaultBorder: theme.borderWidths.base,
|
|
27
|
-
outlinedSelectedBorder: theme.borderWidths.medium,
|
|
28
22
|
};
|
|
29
23
|
|
|
30
24
|
const radii = {
|
|
@@ -34,6 +28,7 @@ const getChipTheme = (theme: GlobalTheme) => {
|
|
|
34
28
|
const borderWidths = {
|
|
35
29
|
wrapper: theme.borderWidths.base,
|
|
36
30
|
icon: theme.borderWidths.medium,
|
|
31
|
+
outlinedDefaultBorder: theme.borderWidths.base,
|
|
37
32
|
};
|
|
38
33
|
|
|
39
34
|
const shadows = {
|
|
@@ -43,7 +38,6 @@ const getChipTheme = (theme: GlobalTheme) => {
|
|
|
43
38
|
return {
|
|
44
39
|
colors,
|
|
45
40
|
space,
|
|
46
|
-
sizes,
|
|
47
41
|
radii,
|
|
48
42
|
borderWidths,
|
|
49
43
|
shadows,
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { GlobalTheme } from '../global';
|
|
2
|
+
|
|
3
|
+
const getMapPinTheme = (theme: GlobalTheme) => {
|
|
4
|
+
const sizes = {
|
|
5
|
+
default: 42,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const fontSizes = {
|
|
9
|
+
icon: 42,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const borderWidths = {
|
|
13
|
+
default: theme.borderWidths.medium * 2,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const colors = {
|
|
17
|
+
border: {
|
|
18
|
+
idle: theme.colors.defaultGlobalSurface,
|
|
19
|
+
selected: theme.colors.secondary,
|
|
20
|
+
applied: theme.colors.secondary,
|
|
21
|
+
},
|
|
22
|
+
badge: theme.colors.secondary,
|
|
23
|
+
background: theme.colors.defaultGlobalSurface,
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const radii = {
|
|
27
|
+
default: theme.radii.large,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const space = {
|
|
31
|
+
iconTop: -theme.space.small,
|
|
32
|
+
iconRight: -theme.space.small,
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const shadows = {
|
|
36
|
+
offset: theme.shadows.default.shadowOffset,
|
|
37
|
+
opacity: theme.shadows.default.shadowOpacity,
|
|
38
|
+
radius: theme.shadows.default.shadowRadius,
|
|
39
|
+
elevation: theme.shadows.default.elevation,
|
|
40
|
+
color: theme.shadows.default.shadowColor,
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
return { sizes, colors, borderWidths, radii, shadows, space, fontSizes };
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export default getMapPinTheme;
|
package/src/theme/getTheme.ts
CHANGED
|
@@ -49,6 +49,7 @@ import getTypographyTheme from './components/typography';
|
|
|
49
49
|
|
|
50
50
|
import type { GlobalTheme, Scale, SystemPalette } from './global';
|
|
51
51
|
import getSearchTheme from './components/search';
|
|
52
|
+
import getMapPinTheme from './components/mapPin';
|
|
52
53
|
|
|
53
54
|
type Theme = GlobalTheme & {
|
|
54
55
|
__hd__: {
|
|
@@ -76,6 +77,7 @@ type Theme = GlobalTheme & {
|
|
|
76
77
|
icon: ReturnType<typeof getIconTheme>;
|
|
77
78
|
image: ReturnType<typeof getImageTheme>;
|
|
78
79
|
list: ReturnType<typeof getListTheme>;
|
|
80
|
+
mapPin: ReturnType<typeof getMapPinTheme>;
|
|
79
81
|
pageControl: ReturnType<typeof getPageControlTheme>;
|
|
80
82
|
pinInput: PinInputThemeType;
|
|
81
83
|
progress: ReturnType<typeof getProgressTheme>;
|
|
@@ -134,6 +136,7 @@ const getTheme = (
|
|
|
134
136
|
icon: getIconTheme(globalTheme),
|
|
135
137
|
image: getImageTheme(globalTheme),
|
|
136
138
|
list: getListTheme(globalTheme),
|
|
139
|
+
mapPin: getMapPinTheme(globalTheme),
|
|
137
140
|
pageControl: getPageControlTheme(globalTheme),
|
|
138
141
|
pinInput: getPinInputTheme(globalTheme),
|
|
139
142
|
progress: getProgressTheme(globalTheme),
|