@utilitywarehouse/hearth-react-native 0.9.0 → 0.11.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 (106) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/.turbo/turbo-lint.log +1 -1
  3. package/CHANGELOG.md +16 -0
  4. package/build/components/Avatar/Avatar.d.ts +6 -0
  5. package/build/components/Avatar/Avatar.js +80 -0
  6. package/build/components/Avatar/Avatar.props.d.ts +28 -0
  7. package/build/components/Avatar/Avatar.props.js +1 -0
  8. package/build/components/Avatar/index.d.ts +2 -0
  9. package/build/components/Avatar/index.js +1 -0
  10. package/build/components/DateInput/DateInput.d.ts +6 -0
  11. package/build/components/DateInput/DateInput.js +19 -0
  12. package/build/components/DateInput/DateInput.props.d.ts +79 -0
  13. package/build/components/DateInput/DateInput.props.js +1 -0
  14. package/build/components/DateInput/DateInputSegment.d.ts +20 -0
  15. package/build/components/DateInput/DateInputSegment.js +31 -0
  16. package/build/components/DateInput/index.d.ts +2 -0
  17. package/build/components/DateInput/index.js +1 -0
  18. package/build/components/PillGroup/Pill.d.ts +16 -0
  19. package/build/components/PillGroup/Pill.js +94 -0
  20. package/build/components/PillGroup/Pill.props.d.ts +10 -0
  21. package/build/components/PillGroup/Pill.props.js +1 -0
  22. package/build/components/PillGroup/PillGroup.context.d.ts +6 -0
  23. package/build/components/PillGroup/PillGroup.context.js +5 -0
  24. package/build/components/PillGroup/PillGroup.d.ts +5 -0
  25. package/build/components/PillGroup/PillGroup.js +34 -0
  26. package/build/components/PillGroup/PillGroup.props.d.ts +15 -0
  27. package/build/components/PillGroup/PillGroup.props.js +1 -0
  28. package/build/components/PillGroup/index.d.ts +4 -0
  29. package/build/components/PillGroup/index.js +2 -0
  30. package/build/components/Select/Select.js +2 -1
  31. package/build/components/Toast/Toast.context.d.ts +9 -0
  32. package/build/components/Toast/Toast.context.js +90 -0
  33. package/build/components/Toast/Toast.props.d.ts +29 -0
  34. package/build/components/Toast/Toast.props.js +1 -0
  35. package/build/components/Toast/ToastItem.d.ts +10 -0
  36. package/build/components/Toast/ToastItem.js +129 -0
  37. package/build/components/Toast/index.d.ts +3 -0
  38. package/build/components/Toast/index.js +2 -0
  39. package/build/components/index.d.ts +4 -0
  40. package/build/components/index.js +4 -0
  41. package/build/tokens/components/dark/checkbox.d.ts +3 -0
  42. package/build/tokens/components/dark/checkbox.js +3 -0
  43. package/build/tokens/components/dark/input.d.ts +6 -0
  44. package/build/tokens/components/dark/input.js +6 -0
  45. package/build/tokens/components/dark/radio.d.ts +3 -0
  46. package/build/tokens/components/dark/radio.js +3 -0
  47. package/build/tokens/components/dark/table.d.ts +2 -0
  48. package/build/tokens/components/dark/table.js +2 -0
  49. package/build/tokens/components/dark/toast.d.ts +6 -2
  50. package/build/tokens/components/dark/toast.js +6 -2
  51. package/build/tokens/components/light/checkbox.d.ts +3 -0
  52. package/build/tokens/components/light/checkbox.js +3 -0
  53. package/build/tokens/components/light/input.d.ts +6 -0
  54. package/build/tokens/components/light/input.js +6 -0
  55. package/build/tokens/components/light/radio.d.ts +3 -0
  56. package/build/tokens/components/light/radio.js +3 -0
  57. package/build/tokens/components/light/table.d.ts +2 -0
  58. package/build/tokens/components/light/table.js +2 -0
  59. package/build/tokens/components/light/toast.d.ts +6 -2
  60. package/build/tokens/components/light/toast.js +6 -2
  61. package/build/utils/getInitials.d.ts +1 -0
  62. package/build/utils/getInitials.js +8 -0
  63. package/build/utils/index.d.ts +1 -0
  64. package/build/utils/index.js +1 -0
  65. package/docs/assets/toast-ios.MP4 +0 -0
  66. package/docs/components/AllComponents.web.tsx +43 -0
  67. package/package.json +3 -3
  68. package/src/components/Avatar/Avatar.docs.mdx +105 -0
  69. package/src/components/Avatar/Avatar.props.ts +31 -0
  70. package/src/components/Avatar/Avatar.stories.tsx +77 -0
  71. package/src/components/Avatar/Avatar.tsx +136 -0
  72. package/src/components/Avatar/index.ts +2 -0
  73. package/src/components/DateInput/DateInput.docs.mdx +163 -0
  74. package/src/components/DateInput/DateInput.props.ts +80 -0
  75. package/src/components/DateInput/DateInput.stories.tsx +269 -0
  76. package/src/components/DateInput/DateInput.tsx +117 -0
  77. package/src/components/DateInput/DateInputSegment.tsx +83 -0
  78. package/src/components/DateInput/index.ts +2 -0
  79. package/src/components/PillGroup/Pill.props.ts +13 -0
  80. package/src/components/PillGroup/Pill.tsx +120 -0
  81. package/src/components/PillGroup/PillGroup.context.tsx +12 -0
  82. package/src/components/PillGroup/PillGroup.docs.mdx +96 -0
  83. package/src/components/PillGroup/PillGroup.props.ts +22 -0
  84. package/src/components/PillGroup/PillGroup.stories.tsx +159 -0
  85. package/src/components/PillGroup/PillGroup.tsx +66 -0
  86. package/src/components/PillGroup/index.ts +4 -0
  87. package/src/components/Select/Select.tsx +2 -0
  88. package/src/components/Toast/Toast.context.tsx +118 -0
  89. package/src/components/Toast/Toast.docs.mdx +164 -0
  90. package/src/components/Toast/Toast.props.ts +33 -0
  91. package/src/components/Toast/Toast.stories.tsx +356 -0
  92. package/src/components/Toast/ToastItem.tsx +200 -0
  93. package/src/components/Toast/index.ts +3 -0
  94. package/src/components/index.ts +4 -0
  95. package/src/tokens/components/dark/checkbox.ts +3 -0
  96. package/src/tokens/components/dark/input.ts +6 -0
  97. package/src/tokens/components/dark/radio.ts +3 -0
  98. package/src/tokens/components/dark/table.ts +2 -0
  99. package/src/tokens/components/dark/toast.ts +6 -2
  100. package/src/tokens/components/light/checkbox.ts +3 -0
  101. package/src/tokens/components/light/input.ts +6 -0
  102. package/src/tokens/components/light/radio.ts +3 -0
  103. package/src/tokens/components/light/table.ts +2 -0
  104. package/src/tokens/components/light/toast.ts +6 -2
  105. package/src/utils/getInitials.ts +7 -0
  106. package/src/utils/index.ts +1 -0
@@ -5,9 +5,13 @@
5
5
  export default {
6
6
  backgroundColor: '#101010',
7
7
  borderRadius: 8,
8
- gapHorizontal: 16,
8
+ bottomPosition: 32,
9
+ gap: 16,
9
10
  padding: 14,
10
11
  stack: {
11
- gapHorizontal: 8,
12
+ gap: 12,
13
+ },
14
+ text: {
15
+ gap: 8,
12
16
  },
13
17
  } as const;
@@ -0,0 +1,7 @@
1
+ export function getInitials(name?: string) {
2
+ if (!name) return undefined;
3
+ const regex = new RegExp(/(\p{L}{1})\p{L}+/gu);
4
+ const names = [...name.matchAll(regex)];
5
+ const initials = (names.shift()?.[1] || '') + (names.pop()?.[1] || '');
6
+ return initials.toUpperCase();
7
+ }
@@ -3,6 +3,7 @@ export { default as formatThousands } from './formatThousands';
3
3
  export { default as getFlattenedColorValue } from './getFlattenedColorValue';
4
4
  export { default as getStyleValue } from './getStyleValue';
5
5
  export { default as hexWithOpacity } from './hexWithOpacity';
6
+ export { getInitials } from './getInitials';
6
7
  export { default as isEqual } from './isEqual';
7
8
  export * from './styleUtils';
8
9
  export * from './themeValueHelpers';