@hero-design/rn 8.35.0-alpha.4 → 8.36.0-alpha.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 (114) hide show
  1. package/.eslintrc.js +1 -0
  2. package/.turbo/turbo-build.log +1 -1
  3. package/.turbo/turbo-build:types.log +0 -8
  4. package/.turbo/turbo-lint.log +20 -11
  5. package/.turbo/turbo-test.log +0 -724
  6. package/es/index.js +578 -639
  7. package/jest.config.js +1 -1
  8. package/lib/index.js +588 -649
  9. package/package.json +9 -9
  10. package/src/components/Attachment/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
  11. package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +3 -3
  12. package/src/components/Badge/__tests__/__snapshots__/Status.spec.tsx.snap +1 -1
  13. package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +2 -2
  14. package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +6 -6
  15. package/src/components/Button/UtilityButton/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  16. package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +4 -4
  17. package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +6 -6
  18. package/src/components/Calendar/__tests__/index.spec.tsx +29 -0
  19. package/src/components/Calendar/index.tsx +10 -1
  20. package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +75 -74
  21. package/src/components/Carousel/index.tsx +1 -1
  22. package/src/components/DatePicker/DatePickerCalendar.tsx +23 -14
  23. package/src/components/FAB/ActionGroup/StyledActionGroup.tsx +12 -0
  24. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +801 -1251
  25. package/src/components/FAB/ActionGroup/__tests__/index.spec.tsx +45 -35
  26. package/src/components/FAB/ActionGroup/index.tsx +65 -45
  27. package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +1 -1
  28. package/src/components/FAB/index.tsx +0 -4
  29. package/src/components/Icon/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
  30. package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +4 -4
  31. package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +12 -12
  32. package/src/components/Portal/PortalHost.tsx +24 -0
  33. package/src/components/Portal/PortalProvider.tsx +29 -0
  34. package/src/components/Portal/__tests__/PortalHost.spec.tsx +50 -0
  35. package/src/components/Portal/__tests__/PortalProvider.spec.tsx +24 -0
  36. package/src/components/Portal/__tests__/index.spec.tsx +29 -0
  37. package/src/components/Portal/__tests__/reducer.spec.tsx +110 -0
  38. package/src/components/Portal/constants.ts +10 -0
  39. package/src/components/Portal/contexts.ts +14 -0
  40. package/src/components/Portal/index.tsx +42 -0
  41. package/src/components/Portal/reducer.ts +106 -0
  42. package/src/components/Portal/types.tsx +31 -0
  43. package/src/components/Portal/usePortal.ts +50 -0
  44. package/src/components/Portal/usePortalState.ts +11 -0
  45. package/src/components/Progress/StyledProgressBar.tsx +1 -0
  46. package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +46 -44
  47. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +6 -6
  48. package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
  49. package/src/components/Skeleton/__tests__/__snapshots__/index.spec.tsx.snap +7 -7
  50. package/src/components/Swipeable/__tests__/__snapshots__/index.spec.tsx.snap +5 -0
  51. package/src/components/Swipeable/index.tsx +6 -1
  52. package/src/components/Switch/SelectorSwitch/StyledSelectorSwitch.tsx +4 -7
  53. package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/Option.spec.tsx.snap +3 -3
  54. package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +9 -9
  55. package/src/components/Switch/SelectorSwitch/index.tsx +7 -15
  56. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +21 -21
  57. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +6 -6
  58. package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +2 -2
  59. package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +9 -9
  60. package/src/components/Tag/StyledTag.tsx +6 -35
  61. package/src/components/Tag/__tests__/Tag.spec.tsx +13 -13
  62. package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +40 -79
  63. package/src/components/Tag/index.tsx +8 -6
  64. package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +7 -7
  65. package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +20 -20
  66. package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +1 -1
  67. package/src/components/Typography/Body/__tests__/__snapshots__/StyledBody.tsx.snap +1 -1
  68. package/src/components/Typography/Body/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  69. package/src/components/Typography/Caption/__tests__/__snapshots__/StyledCaption.spec.tsx.snap +1 -1
  70. package/src/components/Typography/Caption/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  71. package/src/components/Typography/Label/__tests__/__snapshots__/StyledLabel.tsx.snap +1 -1
  72. package/src/components/Typography/Label/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  73. package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +1 -1
  74. package/src/components/Typography/Title/__tests__/__snapshots__/StyledTitle.tsx.snap +3 -3
  75. package/src/components/Typography/Title/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
  76. package/src/index.ts +2 -2
  77. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +49 -46
  78. package/src/theme/components/button.ts +1 -1
  79. package/src/theme/components/progress.ts +2 -2
  80. package/src/theme/components/swipeable.ts +5 -1
  81. package/src/theme/components/switch.ts +4 -4
  82. package/src/theme/components/tabs.ts +1 -1
  83. package/src/theme/components/tag.ts +2 -2
  84. package/src/theme/components/typography.ts +2 -2
  85. package/src/theme/global/colors/__tests__/__snapshots__/eBens.spec.ts.snap +7 -7
  86. package/src/theme/global/colors/__tests__/__snapshots__/global.spec.ts.snap +5 -5
  87. package/src/theme/global/colors/__tests__/__snapshots__/jobs.spec.ts.snap +6 -6
  88. package/src/theme/global/colors/__tests__/__snapshots__/swag.spec.ts.snap +6 -6
  89. package/src/theme/global/colors/__tests__/__snapshots__/wallet.spec.ts.snap +7 -7
  90. package/src/theme/global/colors/__tests__/__snapshots__/work.spec.ts.snap +5 -5
  91. package/src/theme/global/colors/eBens.ts +2 -2
  92. package/src/theme/global/colors/global.ts +5 -5
  93. package/src/theme/global/colors/jobs.ts +1 -1
  94. package/src/theme/global/colors/swag.ts +1 -1
  95. package/src/theme/global/colors/wallet.ts +2 -2
  96. package/types/components/Calendar/index.d.ts +2 -1
  97. package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +7 -1
  98. package/types/components/FAB/index.d.ts +0 -3
  99. package/types/components/Portal/PortalHost.d.ts +5 -0
  100. package/types/components/Portal/PortalProvider.d.ts +7 -0
  101. package/types/components/Portal/constants.d.ts +8 -0
  102. package/types/components/Portal/contexts.d.ts +9 -0
  103. package/types/components/Portal/index.d.ts +13 -0
  104. package/types/components/Portal/reducer.d.ts +5 -0
  105. package/types/components/Portal/types.d.ts +22 -0
  106. package/types/components/Portal/usePortal.d.ts +8 -0
  107. package/types/components/Portal/usePortalState.d.ts +1 -0
  108. package/types/components/Swipeable/index.d.ts +1 -1
  109. package/types/components/Tag/StyledTag.d.ts +1 -4
  110. package/types/components/Tag/index.d.ts +1 -0
  111. package/types/index.d.ts +2 -2
  112. package/types/theme/components/swipeable.d.ts +3 -0
  113. package/types/theme/components/switch.d.ts +1 -1
  114. package/types/theme/components/tag.d.ts +1 -1
package/.eslintrc.js CHANGED
@@ -9,5 +9,6 @@ module.exports = {
9
9
  rules: {
10
10
  'no-underscore-dangle': [2, { allow: ['__hd__'] }],
11
11
  'import/no-cycle': 2,
12
+ '@hero-design/no-invalid-theme-access': 0,
12
13
  },
13
14
  };
@@ -4,5 +4,5 @@ $ rollup -c
4
4
  src/index.ts → lib/index.js, es/index.js...
5
5
  (!) 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`.
6
6
  (!) Plugin node-resolve: preferring built-in module 'events' over local alternative at '/Volumes/Data/Projects/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
7
- created lib/index.js, es/index.js in 31s
7
+ created lib/index.js, es/index.js in 35.5s
8
8
  $ tsc --noEmit false --emitDeclarationOnly --project tsconfig.prod.json
@@ -1,9 +1 @@
1
1
  $ tsc --noEmit false --emitDeclarationOnly --project tsconfig.prod.json
2
- src/components/Avatar/StyledAvatar.tsx(35,38): error TS2339: Property 'Text' does not exist on type 'TypographyProps'.
3
- src/components/Avatar/StyledAvatar.tsx(39,6): error TS7031: Binding element 'themeSize' implicitly has an 'any' type.
4
- src/components/Avatar/StyledAvatar.tsx(39,17): error TS7031: Binding element 'theme' implicitly has an 'any' type.
5
- src/components/SectionHeading/index.tsx(89,19): error TS2339: Property 'Text' does not exist on type 'TypographyProps'.
6
- src/components/SectionHeading/index.tsx(95,20): error TS2339: Property 'Text' does not exist on type 'TypographyProps'.
7
- src/components/Typography/index.tsx(1,1): error TS6133: 'Text' is declared but its value is never read.
8
- error Command failed with exit code 1.
9
- info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@@ -49,9 +49,6 @@ $ eslint src --ext .js,.jsx,.ts,.tsx --ignore-path ../../.gitignore
49
49
  /Volumes/Data/Projects/hero-design/packages/rn/src/components/Drawer/index.tsx
50
50
  69:6 warning React Hook useEffect has a missing dependency: 'animatedValue'. Either include it or remove the dependency array react-hooks/exhaustive-deps
51
51
 
52
- /Volumes/Data/Projects/hero-design/packages/rn/src/components/FAB/__tests__/StyledFAB.spec.tsx
53
- 19:18 error Value must be omitted for boolean attributes react/jsx-boolean-value
54
-
55
52
  /Volumes/Data/Projects/hero-design/packages/rn/src/components/FAB/__tests__/index.spec.tsx
56
53
  79:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion
57
54
  82:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion
@@ -69,6 +66,25 @@ $ eslint src --ext .js,.jsx,.ts,.tsx --ignore-path ../../.gitignore
69
66
  /Volumes/Data/Projects/hero-design/packages/rn/src/components/PinInput/index.tsx
70
67
  146:8 warning React Hook useEffect has missing dependencies: 'autoFocus' and 'focus'. Either include them or remove the dependency array react-hooks/exhaustive-deps
71
68
 
69
+ /Volumes/Data/Projects/hero-design/packages/rn/src/components/Portal/PortalHost.tsx
70
+ 18:6 warning React Hook useEffect has missing dependencies: 'deregisterHost' and 'registerHost'. Either include them or remove the dependency array react-hooks/exhaustive-deps
71
+
72
+ /Volumes/Data/Projects/hero-design/packages/rn/src/components/Portal/__tests__/PortalHost.spec.tsx
73
+ 16:26 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion
74
+
75
+ /Volumes/Data/Projects/hero-design/packages/rn/src/components/Portal/__tests__/PortalProvider.spec.tsx
76
+ 10:26 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion
77
+
78
+ /Volumes/Data/Projects/hero-design/packages/rn/src/components/Portal/index.tsx
79
+ 27:6 warning React Hook useLayoutEffect has missing dependencies: 'children', 'nameOrRandom', and 'removePortal'. Either include them or remove the dependency array react-hooks/exhaustive-deps
80
+ 31:6 warning React Hook useLayoutEffect has missing dependencies: 'addUpdatePortal' and 'nameOrRandom'. Either include them or remove the dependency array react-hooks/exhaustive-deps
81
+
82
+ /Volumes/Data/Projects/hero-design/packages/rn/src/components/Portal/usePortal.ts
83
+ 17:6 warning React Hook useCallback has missing dependencies: 'dispatch' and 'hostName'. Either include them or remove the dependency array react-hooks/exhaustive-deps
84
+ 24:6 warning React Hook useCallback has missing dependencies: 'dispatch' and 'hostName'. Either include them or remove the dependency array react-hooks/exhaustive-deps
85
+ 33:6 warning React Hook useCallback has missing dependencies: 'dispatch' and 'hostName'. Either include them or remove the dependency array react-hooks/exhaustive-deps
86
+ 41:6 warning React Hook useCallback has missing dependencies: 'dispatch' and 'hostName'. Either include them or remove the dependency array react-hooks/exhaustive-deps
87
+
72
88
  /Volumes/Data/Projects/hero-design/packages/rn/src/components/RichTextEditor/EditorToolbar.tsx
73
89
  147:6 warning React Hook useEffect has a missing dependency: 'normalizeEventName'. Either include it or remove the dependency array react-hooks/exhaustive-deps
74
90
  208:5 warning React Hook useMemo has missing dependencies: 'normalizeEventName' and 'toggleToolbarButton'. Either include them or remove the dependency array react-hooks/exhaustive-deps
@@ -101,10 +117,6 @@ $ eslint src --ext .js,.jsx,.ts,.tsx --ignore-path ../../.gitignore
101
117
  /Volumes/Data/Projects/hero-design/packages/rn/src/components/Switch/SelectorSwitch/Option.tsx
102
118
  63:6 warning React Hook useEffect has a missing dependency: 'animatedValue'. Either include it or remove the dependency array react-hooks/exhaustive-deps
103
119
 
104
- /Volumes/Data/Projects/hero-design/packages/rn/src/components/Switch/SelectorSwitch/index.tsx
105
- 84:6 warning React Hook useEffect has missing dependencies: 'animatedValue' and 'options'. Either include them or remove the dependency array react-hooks/exhaustive-deps
106
- 90:5 warning React Hook useCallback has an unnecessary dependency: 'options'. Either exclude it or remove the dependency array react-hooks/exhaustive-deps
107
-
108
120
  /Volumes/Data/Projects/hero-design/packages/rn/src/components/Switch/index.tsx
109
121
  71:6 warning React Hook useEffect has missing dependencies: 'animatedOffset' and 'offset'. Either include them or remove the dependency array react-hooks/exhaustive-deps
110
122
 
@@ -156,8 +168,5 @@ $ eslint src --ext .js,.jsx,.ts,.tsx --ignore-path ../../.gitignore
156
168
  /Volumes/Data/Projects/hero-design/packages/rn/src/utils/hooks.ts
157
169
  26:7 warning Unexpected console statement no-console
158
170
 
159
- 72 problems (1 error, 71 warnings)
160
- 1 error and 0 warnings potentially fixable with the `--fix` option.
171
+ 78 problems (0 errors, 78 warnings)
161
172
 
162
- error Command failed with exit code 1.
163
- info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.