@hero-design/rn 7.27.0 → 7.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.
Files changed (38) hide show
  1. package/.turbo/turbo-build.log +9 -9
  2. package/assets/fonts/hero-icons-mobile.ttf +0 -0
  3. package/es/index.js +238 -211
  4. package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
  5. package/lib/index.js +238 -211
  6. package/package.json +4 -4
  7. package/src/components/Alert/index.tsx +42 -31
  8. package/src/components/Avatar/AvatarStack/__tests__/StyledAvatarStack.spec.tsx +6 -3
  9. package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/index.spec.tsx.snap +9 -9
  10. package/src/components/Avatar/AvatarStack/__tests__/index.spec.tsx +6 -3
  11. package/src/components/Avatar/AvatarStack/utils.ts +3 -6
  12. package/src/components/Button/Button.tsx +7 -0
  13. package/src/components/FAB/__tests__/index.spec.tsx +4 -4
  14. package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
  15. package/src/components/Icon/IconList.ts +1 -0
  16. package/src/components/Icon/index.tsx +12 -2
  17. package/src/components/List/StyledListItem.tsx +1 -1
  18. package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +2 -2
  19. package/src/components/RichTextEditor/MentionList.tsx +1 -1
  20. package/src/components/RichTextEditor/StyledToolbar.ts +1 -1
  21. package/src/components/RichTextEditor/__tests__/EditorToolbar.spec.tsx +1 -1
  22. package/src/components/Switch/index.tsx +9 -1
  23. package/src/components/Tabs/index.tsx +6 -0
  24. package/src/components/Tag/index.tsx +25 -17
  25. package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
  26. package/src/components/TextInput/__tests__/index.spec.tsx +1 -1
  27. package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +1 -1
  28. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +6 -28
  29. package/src/theme/components/avatar.ts +1 -24
  30. package/src/theme/global/colors/work.ts +4 -4
  31. package/src/theme/global/scale.ts +1 -1
  32. package/src/utils/hooks.ts +3 -1
  33. package/types/components/Alert/index.d.ts +1 -1
  34. package/types/components/Icon/IconList.d.ts +1 -1
  35. package/types/components/Icon/index.d.ts +1 -1
  36. package/types/components/Icon/utils.d.ts +1 -1
  37. package/types/components/Switch/index.d.ts +1 -1
  38. package/types/theme/components/avatar.d.ts +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "7.27.0",
3
+ "version": "7.28.0",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -20,7 +20,7 @@
20
20
  "dependencies": {
21
21
  "@emotion/native": "^11.9.3",
22
22
  "@emotion/react": "^11.9.3",
23
- "@hero-design/colors": "7.27.0",
23
+ "@hero-design/colors": "7.28.0",
24
24
  "date-fns": "^2.16.1",
25
25
  "events": "^3.2.0",
26
26
  "hero-editor": "^1.9.12"
@@ -58,7 +58,7 @@
58
58
  "@types/react-native": "^0.67.7",
59
59
  "@types/react-native-vector-icons": "^6.4.10",
60
60
  "babel-plugin-inline-import": "^3.0.0",
61
- "eslint-config-hd": "7.27.0",
61
+ "eslint-config-hd": "7.28.0",
62
62
  "jest": "^27.3.1",
63
63
  "react": "17.0.2",
64
64
  "react-native": "0.65.1",
@@ -72,7 +72,7 @@
72
72
  "rollup-plugin-copy": "^3.4.0",
73
73
  "rollup-plugin-flow": "^1.1.1",
74
74
  "ts-jest": "^27.0.7",
75
- "prettier-config-hd": "7.27.0",
75
+ "prettier-config-hd": "7.28.0",
76
76
  "rn-7-23-0": "npm:@hero-design/rn@7.23.0"
77
77
  },
78
78
  "prettier": "prettier-config-hd"
@@ -11,6 +11,7 @@ import {
11
11
  TextContainer,
12
12
  } from './StyledAlert';
13
13
  import type { IconName } from '../Icon';
14
+ import { useDeprecation } from '../../utils/hooks';
14
15
 
15
16
  const getIntentIcon = (
16
17
  intent: 'success' | 'info' | 'warning' | 'error' | 'notification'
@@ -80,39 +81,49 @@ const Alert = ({
80
81
  title,
81
82
  intent = 'info',
82
83
  onClose,
83
- variant = 'default',
84
+ variant: _variant,
84
85
  style,
85
86
  testID,
86
- }: AlertProps): JSX.Element => (
87
- <Container
88
- themeVariant={variant}
89
- themeIntent={intent}
90
- style={style}
91
- testID={testID}
92
- >
93
- <ContentContainer showDivider={!!onClose}>
94
- {icon !== null ? (
95
- <AlertIcon icon={icon || getIntentIcon(intent)} />
87
+ }: AlertProps): JSX.Element => {
88
+ const variant: AlertProps['variant'] =
89
+ _variant === undefined ? 'default' : _variant;
90
+
91
+ useDeprecation(
92
+ "Alert's variant prop will be removed in the next major release. Rounded will be the only variant available.",
93
+ _variant !== undefined
94
+ );
95
+
96
+ return (
97
+ <Container
98
+ themeVariant={variant}
99
+ themeIntent={intent}
100
+ style={style}
101
+ testID={testID}
102
+ >
103
+ <ContentContainer showDivider={!!onClose}>
104
+ {icon !== null ? (
105
+ <AlertIcon icon={icon || getIntentIcon(intent)} />
106
+ ) : null}
107
+ <TextContainer>
108
+ {typeof title === 'string' ? (
109
+ <Typography.Text fontWeight="semi-bold">{title}</Typography.Text>
110
+ ) : (
111
+ title
112
+ )}
113
+ {typeof content === 'string' ? (
114
+ <Typography.Text>{content}</Typography.Text>
115
+ ) : (
116
+ content
117
+ )}
118
+ </TextContainer>
119
+ </ContentContainer>
120
+ {onClose ? (
121
+ <CTAWrapper onPress={onClose} testID="alert-close-icon">
122
+ <Icon icon="cancel" size="small" />
123
+ </CTAWrapper>
96
124
  ) : null}
97
- <TextContainer>
98
- {typeof title === 'string' ? (
99
- <Typography.Text fontWeight="semi-bold">{title}</Typography.Text>
100
- ) : (
101
- title
102
- )}
103
- {typeof content === 'string' ? (
104
- <Typography.Text>{content}</Typography.Text>
105
- ) : (
106
- content
107
- )}
108
- </TextContainer>
109
- </ContentContainer>
110
- {onClose ? (
111
- <CTAWrapper onPress={onClose} testID="alert-close-icon">
112
- <Icon icon="cancel" size="small" />
113
- </CTAWrapper>
114
- ) : null}
115
- </Container>
116
- );
125
+ </Container>
126
+ );
127
+ };
117
128
 
118
129
  export default Alert;
@@ -1,10 +1,13 @@
1
1
  import React from 'react';
2
2
  import renderWithTheme from '../../../../testHelpers/renderWithTheme';
3
3
  import { StyledWrapper, StyledAvatar } from '../StyledAvatarStack';
4
- import theme from '../../../../theme';
5
4
 
6
- beforeAll(() => {
7
- theme.__hd__.avatar.colors.visualisation = [theme.colors.primary];
5
+ beforeEach(() => {
6
+ jest.spyOn(Math, 'random').mockReturnValue(0.123);
7
+ });
8
+
9
+ afterEach(() => {
10
+ jest.spyOn(Math, 'random').mockRestore();
8
11
  });
9
12
 
10
13
  describe('StyledWrapper', () => {
@@ -30,7 +30,7 @@ exports[`AvatarStack renders correctly by default 1`] = `
30
30
  onStartShouldSetResponder={[Function]}
31
31
  style={
32
32
  Object {
33
- "backgroundColor": "#401960",
33
+ "backgroundColor": "#48000a",
34
34
  "borderRadius": 999,
35
35
  "height": 32,
36
36
  "left": 0,
@@ -87,7 +87,7 @@ exports[`AvatarStack renders correctly by default 1`] = `
87
87
  onStartShouldSetResponder={[Function]}
88
88
  style={
89
89
  Object {
90
- "backgroundColor": "#401960",
90
+ "backgroundColor": "#737479",
91
91
  "borderRadius": 999,
92
92
  "height": 32,
93
93
  "left": 22.4,
@@ -144,7 +144,7 @@ exports[`AvatarStack renders correctly by default 1`] = `
144
144
  onStartShouldSetResponder={[Function]}
145
145
  style={
146
146
  Object {
147
- "backgroundColor": "#401960",
147
+ "backgroundColor": "#001f23",
148
148
  "borderRadius": 999,
149
149
  "height": 32,
150
150
  "left": 44.8,
@@ -201,7 +201,7 @@ exports[`AvatarStack renders correctly by default 1`] = `
201
201
  onStartShouldSetResponder={[Function]}
202
202
  style={
203
203
  Object {
204
- "backgroundColor": "#401960",
204
+ "backgroundColor": "#353957",
205
205
  "borderRadius": 999,
206
206
  "height": 32,
207
207
  "left": 67.19999999999999,
@@ -258,7 +258,7 @@ exports[`AvatarStack renders correctly by default 1`] = `
258
258
  onStartShouldSetResponder={[Function]}
259
259
  style={
260
260
  Object {
261
- "backgroundColor": "#401960",
261
+ "backgroundColor": "#25006e",
262
262
  "borderRadius": 999,
263
263
  "height": 32,
264
264
  "left": 89.6,
@@ -334,7 +334,7 @@ exports[`AvatarStack renders correctly with custom props 1`] = `
334
334
  onStartShouldSetResponder={[Function]}
335
335
  style={
336
336
  Object {
337
- "backgroundColor": "#401960",
337
+ "backgroundColor": "#48000a",
338
338
  "borderRadius": 999,
339
339
  "height": 40,
340
340
  "left": 0,
@@ -391,7 +391,7 @@ exports[`AvatarStack renders correctly with custom props 1`] = `
391
391
  onStartShouldSetResponder={[Function]}
392
392
  style={
393
393
  Object {
394
- "backgroundColor": "#401960",
394
+ "backgroundColor": "#737479",
395
395
  "borderRadius": 999,
396
396
  "height": 40,
397
397
  "left": 28,
@@ -448,7 +448,7 @@ exports[`AvatarStack renders correctly with custom props 1`] = `
448
448
  onStartShouldSetResponder={[Function]}
449
449
  style={
450
450
  Object {
451
- "backgroundColor": "#401960",
451
+ "backgroundColor": "#001f23",
452
452
  "borderRadius": 999,
453
453
  "height": 40,
454
454
  "left": 56,
@@ -505,7 +505,7 @@ exports[`AvatarStack renders correctly with custom props 1`] = `
505
505
  onStartShouldSetResponder={[Function]}
506
506
  style={
507
507
  Object {
508
- "backgroundColor": "#401960",
508
+ "backgroundColor": "#353957",
509
509
  "borderRadius": 999,
510
510
  "height": 40,
511
511
  "left": 84,
@@ -1,10 +1,13 @@
1
1
  import React from 'react';
2
2
  import renderWithTheme from '../../../../testHelpers/renderWithTheme';
3
3
  import Avatar from '../..';
4
- import theme from '../../../../theme';
5
4
 
6
- beforeAll(() => {
7
- theme.__hd__.avatar.colors.visualisation = [theme.colors.primary];
5
+ beforeEach(() => {
6
+ jest.spyOn(Math, 'random').mockReturnValue(0.123);
7
+ });
8
+
9
+ afterEach(() => {
10
+ jest.spyOn(Math, 'random').mockRestore();
8
11
  });
9
12
 
10
13
  describe('AvatarStack', () => {
@@ -1,5 +1,5 @@
1
1
  import { useMemo } from 'react';
2
- import { useTheme } from '../../../theme';
2
+ import { mobileVisualisationPalette } from '@hero-design/colors';
3
3
 
4
4
  const shuffleArray = <T>(array: Array<T>): Array<T> =>
5
5
  array
@@ -11,12 +11,9 @@ const shuffleArray = <T>(array: Array<T>): Array<T> =>
11
11
  * Hook that returns a memoized and shuffled array of visualisation colors for Avatar.
12
12
  */
13
13
  export const useAvatarColors = () => {
14
- const theme = useTheme();
15
- const visualisationColors = theme.__hd__.avatar.colors.visualisation;
16
14
  const shuffledColors = useMemo(
17
- () => shuffleArray(visualisationColors),
18
- [visualisationColors]
15
+ () => shuffleArray(Object.values(mobileVisualisationPalette)),
16
+ []
19
17
  );
20
-
21
18
  return shuffledColors;
22
19
  };
@@ -10,6 +10,7 @@ import {
10
10
  } from './StyledButton';
11
11
  import type { IconName } from '../Icon';
12
12
  import type { Intent, ThemeVariant } from './StyledButton';
13
+ import { useDeprecation } from '../../utils/hooks';
13
14
 
14
15
  export interface ButtonProps {
15
16
  /**
@@ -112,6 +113,12 @@ const Button = ({
112
113
  variant = 'filled',
113
114
  }: ButtonProps): JSX.Element => {
114
115
  const themeVariant = getThemeVariant(variant, intent);
116
+
117
+ useDeprecation(
118
+ "Button's basic-transparent variant is deprecated and will be removed in the next major release.\nPlease use other variants instead.",
119
+ variant === 'basic-transparent'
120
+ );
121
+
115
122
  return (
116
123
  <StyledButtonContainer
117
124
  accessibilityHint={accessibilityHint}
@@ -11,7 +11,7 @@ describe('FAB', () => {
11
11
  <FAB
12
12
  icon="add"
13
13
  animated
14
- style={{ backgroundColor: theme.colors.backgroundDark }}
14
+ style={{ backgroundColor: theme.colors.darkGlobalSurface }}
15
15
  />
16
16
  );
17
17
 
@@ -26,7 +26,7 @@ describe('FAB', () => {
26
26
  <FAB
27
27
  icon="pencil"
28
28
  title="Shout out"
29
- style={{ backgroundColor: theme.colors.backgroundDark }}
29
+ style={{ backgroundColor: theme.colors.darkGlobalSurface }}
30
30
  />
31
31
  );
32
32
 
@@ -41,7 +41,7 @@ describe('FAB', () => {
41
41
  const { queryAllByTestId, toJSON } = renderWithTheme(
42
42
  <FAB
43
43
  icon="add"
44
- style={{ backgroundColor: theme.colors.backgroundDark }}
44
+ style={{ backgroundColor: theme.colors.darkGlobalSurface }}
45
45
  />
46
46
  );
47
47
 
@@ -57,7 +57,7 @@ describe('FAB', () => {
57
57
  <FAB
58
58
  onPress={onPressSpy}
59
59
  icon="add"
60
- style={{ backgroundColor: theme.colors.backgroundDark }}
60
+ style={{ backgroundColor: theme.colors.darkGlobalSurface }}
61
61
  testID="fab"
62
62
  />
63
63
  );
@@ -1 +1 @@
1
- {"activate":59000,"add-emoji":59001,"add-person":59002,"adjustment":59003,"alignment":59004,"antenna":59005,"archive":59006,"assignment-warning":59007,"bank":59008,"bell":59009,"billing":59010,"bookmark":59011,"box-check":59012,"box":59013,"buildings":59014,"cake":59015,"calendar-clock":59016,"calendar":59017,"candy-box-menu":59018,"carat-down-small":59019,"carat-down":59020,"carat-left-small":59021,"carat-left":59022,"carat-right-small":59023,"carat-right":59024,"carat-up-small":59025,"carat-up":59026,"caret-down-small":59027,"caret-down":59028,"caret-left-small":59029,"caret-left":59030,"caret-right-small":59031,"caret-right":59032,"caret-up-small":59033,"caret-up":59034,"check-radio":59035,"circle-add":59036,"circle-cancel":59037,"circle-check":59038,"circle-down":59039,"circle-info":59040,"circle-left":59041,"circle-ok":59042,"circle-pencil":59043,"circle-question":59044,"circle-remove":59045,"circle-right":59046,"circle-up":59047,"circle-warning":59048,"clock-3":59049,"clock":59050,"cloud-download":59051,"cloud-upload":59052,"cog":59053,"coin":59054,"contacts":59055,"credit-card":59056,"diamond":59057,"direction-arrows":59058,"directory":59059,"document":59060,"dollar-coin-shine":59061,"double-buildings":59062,"edit-template":59063,"envelope":59064,"expense":59065,"eye-circle":59066,"eye-invisible":59067,"eye":59068,"face-meh":59069,"face-sad":59070,"face-smiley":59071,"feed":59072,"feedbacks":59073,"file-certified":59074,"file-clone":59075,"file-copy":59076,"file-csv":59077,"file-dispose":59078,"file-doc":59079,"file-excel":59080,"file-export":59081,"file-lock":59082,"file-pdf":59083,"file-powerpoint":59084,"file-search":59085,"file-secured":59086,"file-sheets":59087,"file-slide":59088,"file-verified":59089,"file-word":59090,"file":59091,"filter":59092,"folder-user":59093,"folder":59094,"format-bold":59095,"format-heading1":59096,"format-heading2":59097,"format-italic":59098,"format-list-bulleted":59099,"format-list-numbered":59100,"format-underlined":59101,"funnel-filter":59102,"global-dollar":59103,"globe":59104,"graduation-cap":59105,"graph":59106,"happy-sun":59107,"health-bag":59108,"heart":59109,"home":59110,"image":59111,"import":59112,"incident-siren":59113,"instapay":59114,"list":59115,"loading-2":59116,"loading":59117,"location":59118,"lock":59119,"looks-one":59120,"looks-two":59121,"media-content":59122,"menu":59123,"moneybag":59124,"moon":59125,"multiple-stars":59126,"multiple-users":59127,"node":59128,"open-folder":59129,"paperclip":59130,"payment-summary":59131,"pencil":59132,"phone":59133,"piggy-bank":59134,"plane":59135,"play-circle":59136,"print":59137,"raising-hands":59138,"reply-arrow":59139,"reply":59140,"reschedule":59141,"rostering":59142,"save":59143,"schedule-send":59144,"schedule":59145,"search-person":59146,"send":59147,"speaker-active":59148,"speaker":59149,"star-award":59150,"star-badge":59151,"star-medal":59152,"star":59153,"steps-circle":59154,"stopwatch":59155,"suitcase":59156,"survey":59157,"swag":59158,"switch":59159,"tag":59160,"target":59161,"teams":59162,"timesheet":59163,"touch-id":59164,"trash-bin":59165,"unlock":59166,"user":59167,"video-1":59168,"video-2":59169,"wallet":59170,"warning":59171,"activate-outlined":59172,"add-credit-card-outlined":59173,"add-person-outlined":59174,"add-section-outlined":59175,"add-time-outlined":59176,"add":59177,"adjustment-outlined":59178,"alignment-2-outlined":59179,"alignment-outlined":59180,"all-caps":59181,"arrow-down":59182,"arrow-downwards":59183,"arrow-left":59184,"arrow-leftwards":59185,"arrow-right":59186,"arrow-rightwards":59187,"arrow-up":59188,"arrow-upwards":59189,"at-sign":59190,"bell-active-outlined":59191,"bell-outlined":59192,"bell-slash-outlined":59193,"billing-outlined":59194,"body-outlined":59195,"bold":59196,"bookmark-added-outlined":59197,"bookmark-outlined":59198,"box-check-outlined":59199,"box-outlined":59200,"bullet-points":59201,"cake-outlined":59202,"calendar-dates-outlined":59203,"calendar-star-outlined":59204,"camera-outlined":59205,"cancel":59206,"chat-bubble-outlined":59207,"chat-unread-outlined":59208,"checkmark":59209,"circle-add-outlined":59210,"circle-cancel-outlined":59211,"circle-down-outlined":59212,"circle-info-outlined":59213,"circle-left-outlined":59214,"circle-ok-outlined":59215,"circle-question-outlined":59216,"circle-remove-outlined":59217,"circle-right-outlined":59218,"circle-up-outlined":59219,"circle-warning-outlined":59220,"clock-2-outlined":59221,"clock-outlined":59222,"cog-outlined":59223,"coin-outlined":59224,"comment-outlined":59225,"contacts-outlined":59226,"credit-card-outlined":59227,"cup-outlined":59228,"direction-arrows-outlined":59229,"directory-outlined":59230,"document-outlined":59231,"dollar-card-outlined":59232,"dollar-coin-shine-outlined":59233,"dollar-sign":59234,"double-buildings-outlined":59235,"double-left-arrows":59236,"double-right-arrows":59237,"download-outlined":59238,"edit-template-outlined":59239,"email-outlined":59240,"enter-arrow":59241,"envelope-outlined":59242,"expense-outlined":59243,"explore-outlined":59244,"external-link":59245,"eye-invisible-outlined":59246,"eye-outlined":59247,"face-id":59248,"face-meh-outlined":59249,"face-open-smiley-outlined":59250,"face-sad-outlined":59251,"face-smiley-outlined":59252,"feed-outlined":59253,"file-certified-outlined":59254,"file-clone-outlined":59255,"file-copy-outlined":59256,"file-dispose-outlined":59257,"file-dollar-outlined":59258,"file-download-outlined":59259,"file-export-outlined":59260,"file-lock-outlined":59261,"file-outlined":59262,"file-search-outlined":59263,"file-secured-outlined":59264,"file-verified-outlined":59265,"filter-outlined":59266,"folder-outlined":59267,"folder-user-outlined":59268,"funnel-filter-outline":59269,"graph-outlined":59270,"hand-holding-user-outlined":59271,"happy-sun-outlined":59272,"health-bag-outlined":59273,"heart-outlined":59274,"home-active-outlined":59275,"home-outlined":59276,"id-card-outlined":59277,"image-outlined":59278,"import-outlined":59279,"instapay-outlined":59280,"italic":59281,"link-1":59282,"link-2":59283,"list-outlined":59284,"live-help-outlined":59285,"location-outlined":59286,"lock-outlined":59287,"locked-file-outlined":59288,"log-out":59289,"media-content-outlined":59290,"menu-close":59291,"menu-expand":59292,"menu-fold-outlined":59293,"menu-unfold-outlined":59294,"moneybag-outlined":59295,"moon-outlined":59296,"more-horizontal":59297,"more-vertical":59298,"multiple-folders-outlined":59299,"multiple-users-outlined":59300,"near-me-outlined":59301,"node-outlined":59302,"number-points":59303,"number":59304,"payment-summary-outlined":59305,"payslip-outlined":59306,"pencil-outlined":59307,"percentage":59308,"phone-outlined":59309,"piggy-bank-outlined":59310,"plane-outlined":59311,"play-circle-outlined":59312,"print-outlined":59313,"qr-code-outlined":59314,"re-assign":59315,"redeem":59316,"refresh":59317,"remove":59318,"reply-outlined":59319,"restart":59320,"return-arrow":59321,"rostering-outlined":59322,"save-outlined":59323,"schedule-outlined":59324,"search-outlined":59325,"search-secured-outlined":59326,"send-outlined":59327,"share-1":59328,"share-2":59329,"single-down-arrow":59330,"single-left-arrow":59331,"single-right-arrow":59332,"single-up-arrow":59333,"speaker-active-outlined":59334,"speaker-outlined":59335,"star-outlined":59336,"stopwatch-outlined":59337,"strikethrough":59338,"suitcase-clock-outlined":59339,"suitcase-outlined":59340,"survey-outlined":59341,"switch-outlined":59342,"sync":59343,"target-outlined":59344,"timesheet-outlined":59345,"transfer":59346,"trash-bin-outlined":59347,"umbrela-outlined":59348,"unavailable":59349,"underline":59350,"unlock-outlined":59351,"upload-outlined":59352,"user-circle-outlined":59353,"user-gear-outlined":59354,"user-outlined":59355,"user-rectangle-outlined":59356,"video-1-outlined":59357,"video-2-outlined":59358,"wallet-outlined":59359}
1
+ {"activate":59000,"add-emoji":59001,"add-person":59002,"adjustment":59003,"alignment":59004,"antenna":59005,"archive":59006,"assignment-warning":59007,"bank":59008,"bell":59009,"billing":59010,"bookmark":59011,"box-check":59012,"box":59013,"buildings":59014,"cake":59015,"calendar-clock":59016,"calendar":59017,"candy-box-menu":59018,"carat-down-small":59019,"carat-down":59020,"carat-left-small":59021,"carat-left":59022,"carat-right-small":59023,"carat-right":59024,"carat-up-small":59025,"carat-up":59026,"caret-down-small":59027,"caret-down":59028,"caret-left-small":59029,"caret-left":59030,"caret-right-small":59031,"caret-right":59032,"caret-up-small":59033,"caret-up":59034,"check-radio":59035,"circle-add":59036,"circle-cancel":59037,"circle-check":59038,"circle-down":59039,"circle-info":59040,"circle-left":59041,"circle-ok":59042,"circle-pencil":59043,"circle-question":59044,"circle-remove":59045,"circle-right":59046,"circle-up":59047,"circle-warning":59048,"clock-3":59049,"clock":59050,"cloud-download":59051,"cloud-upload":59052,"cog":59053,"coin":59054,"contacts":59055,"credit-card":59056,"diamond":59057,"direction-arrows":59058,"directory":59059,"document":59060,"dollar-coin-shine":59061,"double-buildings":59062,"edit-template":59063,"envelope":59064,"expense":59065,"eye-circle":59066,"eye-invisible":59067,"eye":59068,"face-meh":59069,"face-sad":59070,"face-smiley":59071,"feed":59072,"feedbacks":59073,"file-certified":59074,"file-clone":59075,"file-copy":59076,"file-csv":59077,"file-dispose":59078,"file-doc":59079,"file-excel":59080,"file-export":59081,"file-lock":59082,"file-pdf":59083,"file-powerpoint":59084,"file-search":59085,"file-secured":59086,"file-sheets":59087,"file-slide":59088,"file-verified":59089,"file-word":59090,"file":59091,"filter":59092,"folder-user":59093,"folder":59094,"format-bold":59095,"format-heading1":59096,"format-heading2":59097,"format-italic":59098,"format-list-bulleted":59099,"format-list-numbered":59100,"format-underlined":59101,"funnel-filter":59102,"global-dollar":59103,"globe":59104,"graduation-cap":59105,"graph":59106,"happy-sun":59107,"health-bag":59108,"heart":59109,"home":59110,"image":59111,"import":59112,"incident-siren":59113,"instapay":59114,"list":59115,"loading-2":59116,"loading":59117,"location":59118,"lock":59119,"looks-one":59120,"looks-two":59121,"media-content":59122,"menu":59123,"moneybag":59124,"moon":59125,"multiple-stars":59126,"multiple-users":59127,"node":59128,"open-folder":59129,"paperclip":59130,"payment-summary":59131,"pencil":59132,"phone":59133,"piggy-bank":59134,"plane":59135,"play-circle":59136,"print":59137,"raising-hands":59138,"reply-arrow":59139,"reply":59140,"reschedule":59141,"rostering":59142,"save":59143,"schedule-send":59144,"schedule":59145,"search-person":59146,"send":59147,"speaker-active":59148,"speaker":59149,"star-award":59150,"star-badge":59151,"star-medal":59152,"star":59153,"steps-circle":59154,"stopwatch":59155,"suitcase":59156,"survey":59157,"swag":59158,"switch":59159,"tag":59160,"target":59161,"teams":59162,"timesheet":59163,"touch-id":59164,"trash-bin":59165,"unlock":59166,"user":59167,"video-1":59168,"video-2":59169,"wallet":59170,"warning":59171,"activate-outlined":59172,"add-credit-card-outlined":59173,"add-person-outlined":59174,"add-section-outlined":59175,"add-time-outlined":59176,"add":59177,"adjustment-outlined":59178,"alignment-2-outlined":59179,"alignment-outlined":59180,"all-caps":59181,"arrow-down":59182,"arrow-downwards":59183,"arrow-left":59184,"arrow-leftwards":59185,"arrow-right":59186,"arrow-rightwards":59187,"arrow-up":59188,"arrow-upwards":59189,"at-sign":59190,"bell-active-outlined":59191,"bell-outlined":59192,"bell-slash-outlined":59193,"billing-outlined":59194,"body-outlined":59195,"bold":59196,"bookmark-added-outlined":59197,"bookmark-outlined":59198,"box-check-outlined":59199,"box-outlined":59200,"bullet-points":59201,"cake-outlined":59202,"calendar-dates-outlined":59203,"calendar-star-outlined":59204,"camera-outlined":59205,"cancel":59206,"chat-bubble-outlined":59207,"chat-unread-outlined":59208,"checkmark":59209,"circle-add-outlined":59210,"circle-cancel-outlined":59211,"circle-down-outlined":59212,"circle-info-outlined":59213,"circle-left-outlined":59214,"circle-ok-outlined":59215,"circle-question-outlined":59216,"circle-remove-outlined":59217,"circle-right-outlined":59218,"circle-up-outlined":59219,"circle-warning-outlined":59220,"clock-2-outlined":59221,"clock-outlined":59222,"cog-outlined":59223,"coin-outlined":59224,"comment-outlined":59225,"contacts-outlined":59226,"credit-card-outlined":59227,"cup-outlined":59228,"direction-arrows-outlined":59229,"directory-outlined":59230,"document-outlined":59231,"dollar-card-outlined":59232,"dollar-coin-shine-outlined":59233,"dollar-sign":59234,"double-buildings-outlined":59235,"double-left-arrows":59236,"double-right-arrows":59237,"download-outlined":59238,"edit-template-outlined":59239,"email-outlined":59240,"enter-arrow":59241,"envelope-outlined":59242,"expense-outlined":59243,"explore-outlined":59244,"external-link":59245,"eye-invisible-outlined":59246,"eye-outlined":59247,"face-id":59248,"face-meh-outlined":59249,"face-open-smiley-outlined":59250,"face-sad-outlined":59251,"face-smiley-outlined":59252,"feed-outlined":59253,"file-certified-outlined":59254,"file-clone-outlined":59255,"file-copy-outlined":59256,"file-dispose-outlined":59257,"file-dollar-outlined":59258,"file-download-outlined":59259,"file-export-outlined":59260,"file-lock-outlined":59261,"file-outlined":59262,"file-search-outlined":59263,"file-secured-outlined":59264,"file-verified-outlined":59265,"filter-outlined":59266,"folder-outlined":59267,"folder-user-outlined":59268,"funnel-filter-outline":59269,"graph-outlined":59270,"hand-holding-user-outlined":59271,"happy-sun-outlined":59272,"health-bag-outlined":59273,"heart-outlined":59274,"home-active-outlined":59275,"home-outlined":59276,"id-card-outlined":59277,"image-outlined":59278,"import-outlined":59279,"instapay-outlined":59280,"italic":59281,"link-1":59282,"link-2":59283,"list-outlined":59284,"live-help-outlined":59285,"location-outlined":59286,"lock-outlined":59287,"locked-file-outlined":59288,"log-out":59289,"media-content-outlined":59290,"menu-close":59291,"menu-expand":59292,"menu-fold-outlined":59293,"menu-unfold-outlined":59294,"moneybag-outlined":59295,"moon-outlined":59296,"more-horizontal":59297,"more-vertical":59298,"multiple-folders-outlined":59299,"multiple-users-outlined":59300,"near-me-outlined":59301,"node-outlined":59302,"number-points":59303,"number":59304,"payment-summary-outlined":59305,"payslip-outlined":59306,"pencil-outlined":59307,"percentage":59308,"phone-outlined":59309,"piggy-bank-outlined":59310,"plane-outlined":59311,"play-circle-outlined":59312,"print-outlined":59313,"qr-code-outlined":59314,"re-assign":59315,"redeem":59316,"refresh":59317,"remove":59318,"reply-outlined":59319,"restart":59320,"return-arrow":59321,"rostering-outlined":59322,"save-outlined":59323,"schedule-outlined":59324,"search-outlined":59325,"search-secured-outlined":59326,"send-outlined":59327,"share-1":59328,"share-2":59329,"share-outlined":59330,"single-down-arrow":59331,"single-left-arrow":59332,"single-right-arrow":59333,"single-up-arrow":59334,"speaker-active-outlined":59335,"speaker-outlined":59336,"star-outlined":59337,"stopwatch-outlined":59338,"strikethrough":59339,"suitcase-clock-outlined":59340,"suitcase-outlined":59341,"survey-outlined":59342,"switch-outlined":59343,"sync":59344,"target-outlined":59345,"timesheet-outlined":59346,"transfer":59347,"trash-bin-outlined":59348,"umbrela-outlined":59349,"unavailable":59350,"underline":59351,"unlock-outlined":59352,"upload-outlined":59353,"user-circle-outlined":59354,"user-gear-outlined":59355,"user-outlined":59356,"user-rectangle-outlined":59357,"video-1-outlined":59358,"video-2-outlined":59359,"wallet-outlined":59360}
@@ -330,6 +330,7 @@ const IconList = [
330
330
  'send-outlined',
331
331
  'share-1',
332
332
  'share-2',
333
+ 'share-outlined',
333
334
  'single-down-arrow',
334
335
  'single-left-arrow',
335
336
  'single-right-arrow',
@@ -3,6 +3,7 @@ import type { StyleProp, TextStyle } from 'react-native';
3
3
  import IconList from './IconList';
4
4
  import HeroIcon from './HeroIcon';
5
5
  import AnimatedIcon from './AnimatedIcon';
6
+ import { useDeprecation } from '../../utils/hooks';
6
7
 
7
8
  export type IconName = typeof IconList[number];
8
9
 
@@ -49,8 +50,16 @@ const Icon = ({
49
50
  intent = 'text',
50
51
  testID,
51
52
  spin = false,
52
- }: IconProps) =>
53
- spin ? (
53
+ }: IconProps) => {
54
+ useDeprecation(
55
+ `${icon} icon is deprecated and will be removed in the next major release, please use ${icon.replace(
56
+ 'carat',
57
+ 'caret'
58
+ )} instead.`,
59
+ icon.startsWith('carat')
60
+ );
61
+
62
+ return spin ? (
54
63
  <AnimatedIcon
55
64
  name={icon}
56
65
  themeIntent={intent}
@@ -67,6 +76,7 @@ const Icon = ({
67
76
  testID={testID}
68
77
  />
69
78
  );
79
+ };
70
80
 
71
81
  Icon.List = IconList;
72
82
  export default Icon;
@@ -29,7 +29,7 @@ const StyledListItemContainer = styled(TouchableOpacity)<{
29
29
  ...sharedStyles,
30
30
  alignItems: 'center',
31
31
  borderRadius: theme.__hd__.list.radii.card,
32
- shadowColor: theme.colors.shadow,
32
+ shadowColor: theme.colors.secondaryOutline,
33
33
  shadowRadius: theme.__hd__.list.radii.cardShadow,
34
34
  shadowOffset: theme.__hd__.list.shadows.cardOffset,
35
35
  shadowOpacity: theme.__hd__.list.opacity.cardShadow,
@@ -107,7 +107,7 @@ exports[`ListItemContainer renders correctly themeSelected false themeVariant ca
107
107
  "flexDirection": "row",
108
108
  "opacity": 1,
109
109
  "padding": 16,
110
- "shadowColor": "#ccced1",
110
+ "shadowColor": "#e8e9ea",
111
111
  "shadowOffset": Object {
112
112
  "height": 2,
113
113
  "width": 0,
@@ -207,7 +207,7 @@ exports[`ListItemContainer renders correctly themeSelected true themeVariant car
207
207
  "flexDirection": "row",
208
208
  "opacity": 1,
209
209
  "padding": 16,
210
- "shadowColor": "#ccced1",
210
+ "shadowColor": "#e8e9ea",
211
211
  "shadowOffset": Object {
212
212
  "height": 2,
213
213
  "width": 0,
@@ -76,7 +76,7 @@ const MentionList = <TMetaData,>({
76
76
  borderRadius: theme.__hd__.richTextEditor.radii.mention,
77
77
  padding: highlighted ? theme.__hd__.richTextEditor.space.mention : 0,
78
78
  background: highlighted
79
- ? theme.colors.lightHighlightedSurface
79
+ ? theme.colors.highlightedSurface
80
80
  : 'transparent',
81
81
  marginTop: theme.space.xxsmall,
82
82
  marginBottom: theme.space.xxsmall,
@@ -28,5 +28,5 @@ export const StyledSeparator = styled(View)(({ theme }) => ({
28
28
  flexDirection: 'row',
29
29
  alignItems: 'center',
30
30
  marginHorizontal: theme.space.small,
31
- backgroundColor: theme.colors.outline,
31
+ backgroundColor: theme.colors.secondaryOutline,
32
32
  }));
@@ -96,7 +96,7 @@ describe('EditorToolbar', () => {
96
96
 
97
97
  fireEvent(wrapper.getByTestId(testID), 'press');
98
98
  expect(wrapper.getByTestId(testID)).toHaveStyle({
99
- backgroundColor: theme.colors.lightHighlightedSurface,
99
+ backgroundColor: theme.colors.highlightedSurface,
100
100
  });
101
101
  });
102
102
 
@@ -7,6 +7,7 @@ import type { ReactElement } from 'react';
7
7
  import type { StyleProp, ViewStyle } from 'react-native';
8
8
  import { StyledKnot, StyledWrapper, Variant } from './StyledSwitch';
9
9
  import SelectorSwitch from './SelectorSwitch';
10
+ import { useDeprecation } from '../../utils/hooks';
10
11
 
11
12
  export interface SwitchProps {
12
13
  /**
@@ -50,16 +51,23 @@ const getVariant = ({
50
51
  };
51
52
 
52
53
  const Switch = ({
53
- size = 'medium',
54
+ size: _size,
54
55
  disabled = false,
55
56
  checked = false,
56
57
  onPress,
57
58
  style,
58
59
  testID,
59
60
  }: SwitchProps): ReactElement => {
61
+ const size: SwitchProps['size'] = _size === undefined ? 'medium' : _size;
62
+
60
63
  const theme = useTheme();
61
64
  const variant = getVariant({ disabled, checked });
62
65
 
66
+ useDeprecation(
67
+ "Switch's size prop will be removed in the next major release.",
68
+ _size !== undefined
69
+ );
70
+
63
71
  const offset = checked
64
72
  ? (theme.__hd__.switch.sizes.widths[size] -
65
73
  theme.__hd__.switch.sizes.thumbs[size]) /
@@ -20,6 +20,7 @@ import ScrollableTabs from './ScrollableTabs';
20
20
  import TabWithBadge from './TabWithBadge';
21
21
  import type { BadgeConfigType } from './TabWithBadge';
22
22
  import { IconName } from '../Icon';
23
+ import { useDeprecation } from '../../utils/hooks';
23
24
 
24
25
  export type ItemType =
25
26
  | string
@@ -113,6 +114,11 @@ const Tabs = ({
113
114
  swipeEnabled = true,
114
115
  testID: componentTestID,
115
116
  }: TabsProps): JSX.Element => {
117
+ useDeprecation(
118
+ "Tabs' showBadge will be removed in the next major release. Please use badge prop instead.",
119
+ tabs.some((item) => item.showBadge !== undefined)
120
+ );
121
+
116
122
  const theme = useTheme();
117
123
  const insets = useSafeAreaInsets();
118
124
  const pagerViewRef = React.useRef<PagerView>(null);
@@ -1,5 +1,6 @@
1
1
  import React, { ReactElement } from 'react';
2
2
  import type { StyleProp, ViewStyle, ViewProps } from 'react-native';
3
+ import { useDeprecation } from '../../utils/hooks';
3
4
  import { StyledView, StyledText } from './StyledTag';
4
5
 
5
6
  interface TagProps extends ViewProps {
@@ -39,22 +40,29 @@ const Tag = ({
39
40
  style,
40
41
  testID,
41
42
  ...nativeProps
42
- }: TagProps): JSX.Element => (
43
- <StyledView
44
- {...nativeProps}
45
- themeIntent={intent}
46
- themeVariant={variant}
47
- style={style}
48
- testID={testID}
49
- >
50
- {typeof content === 'string' ? (
51
- <StyledText themeIntent={intent} themeVariant={variant}>
52
- {content}
53
- </StyledText>
54
- ) : (
55
- content
56
- )}
57
- </StyledView>
58
- );
43
+ }: TagProps): JSX.Element => {
44
+ useDeprecation(
45
+ "Tag's default intent is deprecated and will be removed in the next major release.\nPlease use other intents instead.",
46
+ intent !== 'default'
47
+ );
48
+
49
+ return (
50
+ <StyledView
51
+ {...nativeProps}
52
+ themeIntent={intent}
53
+ themeVariant={variant}
54
+ style={style}
55
+ testID={testID}
56
+ >
57
+ {typeof content === 'string' ? (
58
+ <StyledText themeIntent={intent} themeVariant={variant}>
59
+ {content}
60
+ </StyledText>
61
+ ) : (
62
+ content
63
+ )}
64
+ </StyledView>
65
+ );
66
+ };
59
67
 
60
68
  export default Tag;
@@ -1396,7 +1396,7 @@ exports[`TextInput idle renders correctly 1`] = `
1396
1396
  "width": "100%",
1397
1397
  },
1398
1398
  Object {
1399
- "borderColor": "#de350b",
1399
+ "borderColor": "#f46363",
1400
1400
  },
1401
1401
  ]
1402
1402
  }
@@ -38,7 +38,7 @@ describe('TextInput', () => {
38
38
  prefix="dollar-sign"
39
39
  suffix="arrow-down"
40
40
  testID="idle-text-input"
41
- style={{ borderColor: theme.colors.danger }}
41
+ style={{ borderColor: theme.colors.error }}
42
42
  />
43
43
  );
44
44
 
@@ -190,7 +190,7 @@ exports[`StyledText has playful typeface style 1`] = `
190
190
  Array [
191
191
  Object {
192
192
  "color": "#001f23",
193
- "fontFamily": "DarkerGrotesque-Regular",
193
+ "fontFamily": "RebondGrotesque-Regular",
194
194
  "fontSize": 14,
195
195
  "letterSpacing": 0.42,
196
196
  "lineHeight": 22,