@utilitywarehouse/hearth-react-native 0.33.0 → 0.34.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 (51) hide show
  1. package/.storybook/manager.ts +2 -2
  2. package/.storybook/preview.tsx +5 -7
  3. package/CHANGELOG.md +60 -0
  4. package/build/components/Accordion/AccordionItemRoot.js +2 -2
  5. package/build/components/Divider/Divider.js +3 -3
  6. package/build/core/themes.d.ts +60 -500
  7. package/build/tokens/border-radius.d.ts +0 -1
  8. package/build/tokens/border-radius.js +0 -1
  9. package/build/tokens/color.d.ts +0 -182
  10. package/build/tokens/color.js +0 -91
  11. package/build/tokens/components/dark/divider.d.ts +2 -1
  12. package/build/tokens/components/dark/divider.js +2 -1
  13. package/build/tokens/components/light/divider.d.ts +2 -1
  14. package/build/tokens/components/light/divider.js +2 -1
  15. package/build/tokens/font.d.ts +0 -8
  16. package/build/tokens/font.js +0 -8
  17. package/build/tokens/letter-spacing.d.ts +0 -9
  18. package/build/tokens/letter-spacing.js +0 -9
  19. package/build/tokens/line-height.d.ts +0 -7
  20. package/build/tokens/line-height.js +0 -7
  21. package/build/tokens/primitive.d.ts +0 -26
  22. package/build/tokens/primitive.js +0 -26
  23. package/build/tokens/space.d.ts +0 -1
  24. package/build/tokens/space.js +0 -1
  25. package/build/tokens/typography.d.ts +30 -0
  26. package/build/tokens/typography.js +15 -0
  27. package/docs/changelog.mdx +60 -0
  28. package/docs/components/AllComponents.web.tsx +7 -7
  29. package/docs/components/NextPrevPage.tsx +1 -1
  30. package/docs/components/index.ts +1 -1
  31. package/docs/introduction.mdx +0 -1
  32. package/docs/styling.mdx +14 -14
  33. package/docs/theme-tokens.mdx +1 -4
  34. package/eslint.config.js +2 -1
  35. package/package.json +6 -5
  36. package/src/components/Accordion/AccordionItemRoot.tsx +2 -2
  37. package/src/components/Carousel/Carousel.stories.tsx +2 -2
  38. package/src/components/Container/Container.stories.tsx +3 -3
  39. package/src/components/Divider/Divider.tsx +3 -3
  40. package/src/components/IndicatorIconButton/IndicatorIconButton.docs.mdx +1 -1
  41. package/src/components/IndicatorIconButton/IndicatorIconButton.stories.tsx +1 -1
  42. package/src/tokens/border-radius.ts +0 -1
  43. package/src/tokens/color.ts +0 -91
  44. package/src/tokens/components/dark/divider.ts +2 -1
  45. package/src/tokens/components/light/divider.ts +2 -1
  46. package/src/tokens/font.ts +0 -8
  47. package/src/tokens/letter-spacing.ts +0 -9
  48. package/src/tokens/line-height.ts +0 -7
  49. package/src/tokens/primitive.ts +0 -26
  50. package/src/tokens/space.ts +0 -1
  51. package/src/tokens/typography.ts +15 -0
@@ -1,7 +1,7 @@
1
1
  import '@utilitywarehouse/hearth-fonts';
2
2
  import { addons } from 'storybook/manager-api';
3
- import '../../../shared/storybook/styles/manager.css';
4
- import { config } from '../../../shared/storybook/theme';
3
+ import '@utilitywarehouse/hearth-storybook-utils/styles/manager.css';
4
+ import { config } from '@utilitywarehouse/hearth-storybook-utils';
5
5
  import { create } from 'storybook/theming';
6
6
 
7
7
  const theme = create(config);
@@ -4,11 +4,11 @@ import { color } from '@utilitywarehouse/hearth-tokens';
4
4
  import '@utilitywarehouse/hearth-tokens/index.css';
5
5
  import { useEffect } from 'react';
6
6
  import { SafeAreaProvider } from 'react-native-safe-area-context';
7
- import '../../../shared/storybook/styles/diff-highlighting.css';
8
- import '../../../shared/storybook/styles/preview.css';
7
+ import '@utilitywarehouse/hearth-storybook-utils/styles/diff-highlighting.css';
8
+ import '@utilitywarehouse/hearth-storybook-utils/styles/preview.css';
9
9
  import { breakpoints, StyleSheet, themes, UnistylesRuntime } from '../src/core';
10
10
  import { initializePrism } from './prism-setup';
11
- import { config } from '../../../shared/storybook/theme';
11
+ import { config } from '@utilitywarehouse/hearth-storybook-utils';
12
12
  import { create } from 'storybook/theming';
13
13
 
14
14
  const theme = create(config);
@@ -48,8 +48,7 @@ const preview = {
48
48
  try {
49
49
  canAccessParent = window.parent.location.hostname === window.location.hostname;
50
50
  } catch {
51
- // CORS error, can't access parent domain
52
- canAccessParent = false;
51
+ // CORS error, can't access parent domain — canAccessParent stays false
53
52
  }
54
53
 
55
54
  if (canAccessParent) {
@@ -116,8 +115,7 @@ const preview = {
116
115
  try {
117
116
  canAccessParent = window.parent.location.hostname === window.location.hostname;
118
117
  } catch {
119
- // CORS error, can't access parent domain
120
- canAccessParent = false;
118
+ // CORS error, can't access parent domain — canAccessParent stays false
121
119
  }
122
120
 
123
121
  if (canAccessParent) {
package/CHANGELOG.md CHANGED
@@ -1,5 +1,65 @@
1
1
  # @utilitywarehouse/hearth-react-native
2
2
 
3
+ ## 0.34.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1338](https://github.com/utilitywarehouse/hearth/pull/1338) [`fe9767f`](https://github.com/utilitywarehouse/hearth/commit/fe9767f916975ba2e0ba8aea585858d8ea00a147) Thanks [@robphoenix](https://github.com/robphoenix)! - 💔 [BREAKING_CHANGE]: Remove pruned design tokens from React Native token exports
8
+
9
+ Several unused design tokens have been removed from the React Native token exports
10
+ to align with the updated design token set.
11
+
12
+ **Tokens removed**:
13
+
14
+ - `borderRadius.lg`
15
+ - `color`: multiple shades pruned across all colour palettes (`blue`, `broadbandGreen`, `cashbackLilac`, `energyBlue`, `green`, `insuranceOrange`, `mobileRose`, `orange`, `piggyPink`, `purple`, `red`, `warmWhite`, `yellow`)
16
+ - `font.size`: `50`, `75`, `600`, `700`, `800`, `900`, `1000`
17
+ - `font.weight.heavy`
18
+ - `letterSpacing`: `0`, `50`, `75`, `550`, `600`, `700`, `800`, `900`, `1000`
19
+ - `lineHeight`: `50`, `75`, `100`, `900`, `1000`, `1100`, `1200`
20
+ - `space['1000']`
21
+
22
+ **Developer changes**:
23
+
24
+ If you are referencing any of the removed tokens directly, replace them with the
25
+ nearest available equivalent or remove the usage.
26
+
27
+ For example:
28
+
29
+ ```diff
30
+ - borderRadius: tokens.borderRadius.lg,
31
+ + borderRadius: tokens.borderRadius.md,
32
+ ```
33
+
34
+ ```diff
35
+ - fontSize: tokens.font.size['50'],
36
+ + fontSize: tokens.font.size['90'],
37
+ ```
38
+
39
+ ```diff
40
+ - fontWeight: tokens.font.weight.heavy,
41
+ + fontWeight: tokens.font.weight.bold,
42
+ ```
43
+
44
+ ### Patch Changes
45
+
46
+ - [#1338](https://github.com/utilitywarehouse/hearth/pull/1338) [`fe9767f`](https://github.com/utilitywarehouse/hearth/commit/fe9767f916975ba2e0ba8aea585858d8ea00a147) Thanks [@robphoenix](https://github.com/robphoenix)! - 🌟 [FEATURE]: Add `xl` variant to `bodyText` typography tokens
47
+
48
+ The `bodyText` typography scale now includes an `xl` variant across mobile,
49
+ tablet, and desktop breakpoints.
50
+
51
+ | Property | Value |
52
+ | ------------------ | ----- |
53
+ | `fontSize` | `20` |
54
+ | `lineHeight` | `28` |
55
+ | `paragraphSpacing` | `20` |
56
+
57
+ ## 0.33.1
58
+
59
+ ### Patch Changes
60
+
61
+ - [#1311](https://github.com/utilitywarehouse/hearth/pull/1311) [`3d286c9`](https://github.com/utilitywarehouse/hearth/commit/3d286c97710a1483a054e4b19c2453920cda4598) Thanks [@robphoenix](https://github.com/robphoenix)! - 🧹 [HOUSEKEEPING]: Update token usage for Divider
62
+
3
63
  ## 0.33.0
4
64
 
5
65
  ### Minor Changes
@@ -10,8 +10,8 @@ const AccordionItem = ({ children, style, noPadding, disabled, ...props }) => {
10
10
  AccordionItem.displayName = 'AccordionItemRoot';
11
11
  const styles = StyleSheet.create(theme => ({
12
12
  item: {
13
- borderBottomWidth: theme.components.divider.borderWidth,
14
- borderBottomColor: theme.color.border.subtle,
13
+ borderBottomWidth: theme.components.divider.size,
14
+ borderBottomColor: theme.components.divider.color,
15
15
  },
16
16
  }));
17
17
  export default AccordionItem;
@@ -14,16 +14,16 @@ const Divider = ({ orientation = 'horizontal', color, spacing, space, height, wi
14
14
  Divider.displayName = 'Divider';
15
15
  const styles = StyleSheet.create(theme => ({
16
16
  divider: {
17
- backgroundColor: theme.color.border.subtle,
17
+ backgroundColor: theme.components.divider.color,
18
18
  variants: {
19
19
  orientation: {
20
20
  horizontal: {
21
21
  width: '100%',
22
- height: theme.components.divider.borderWidth,
22
+ height: theme.components.divider.size,
23
23
  },
24
24
  vertical: {
25
25
  height: '100%',
26
- width: theme.components.divider.borderWidth,
26
+ width: theme.components.divider.size,
27
27
  },
28
28
  },
29
29
  spacing: {