@fadyshawky/react-native-magic 2.0.5 → 2.0.7

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 (77) hide show
  1. package/package.json +1 -1
  2. package/template/App.tsx +21 -16
  3. package/template/ios/reactnativemagic/AppDelegate.mm +5 -0
  4. package/template/src/common/ImageResources.g.ts +1 -33
  5. package/template/src/common/components/Background.tsx +7 -7
  6. package/template/src/common/components/Container.tsx +7 -10
  7. package/template/src/common/localization/LocalizationProvider.tsx +14 -17
  8. package/template/src/common/localization/RTLInitializer.tsx +90 -0
  9. package/template/src/common/localization/intlFormatter.ts +37 -0
  10. package/template/src/common/localization/localization.ts +1 -3
  11. package/template/src/common/localization/translations/commonLocalization.ts +11 -81
  12. package/template/src/common/localization/translations/emptyLocalization.ts +6 -2
  13. package/template/src/common/localization/translations/errorsLocalization.ts +33 -13
  14. package/template/src/common/localization/translations/homeLocalization.ts +4 -24
  15. package/template/src/common/localization/translations/loginLocalization.ts +26 -29
  16. package/template/src/common/localization/translations/mainNavigationLocalization.ts +2 -2
  17. package/template/src/common/localization/translations/onboardingLocalization.ts +40 -9
  18. package/template/src/common/localization/translations/otpLocalization.ts +8 -8
  19. package/template/src/common/localization/translations/pagesLocalization.ts +13 -1
  20. package/template/src/common/localization/translations/passwordLocalization.ts +3 -3
  21. package/template/src/common/localization/translations/profileLocalization.ts +4 -4
  22. package/template/src/core/store/app/appSlice.ts +2 -2
  23. package/template/src/core/store/app/appState.ts +1 -1
  24. package/template/src/core/theme/colors.ts +106 -70
  25. package/template/src/core/theme/commonConsts.ts +1 -1
  26. package/template/src/core/theme/commonSizes.ts +119 -94
  27. package/template/src/core/theme/commonStyles.ts +22 -22
  28. package/template/src/core/theme/fonts.ts +13 -14
  29. package/template/src/core/theme/shadows.ts +135 -0
  30. package/template/src/core/theme/themes.ts +386 -75
  31. package/template/src/core/theme/types.ts +201 -15
  32. package/template/src/navigation/HeaderComponents.tsx +6 -30
  33. package/template/src/navigation/MainNavigation.tsx +2 -3
  34. package/template/src/navigation/MainStack.tsx +6 -97
  35. package/template/src/screens/Login/Login.tsx +5 -7
  36. package/template/src/screens/OTP/OTPScreen.tsx +12 -13
  37. package/template/src/screens/home/HomeScreen.tsx +2 -295
  38. package/template/src/screens/profile/Profile.tsx +2 -290
  39. package/template/src/common/localization/translations/posLocalization.ts +0 -196
  40. package/template/src/components/PrinterExample.js +0 -226
  41. package/template/src/core/store/Categories/categoryActions.ts +0 -33
  42. package/template/src/core/store/Categories/categorySlice.ts +0 -75
  43. package/template/src/core/store/Categories/categoryState.ts +0 -41
  44. package/template/src/core/store/Providers/providersActions.ts +0 -102
  45. package/template/src/core/store/Providers/providersSlice.ts +0 -136
  46. package/template/src/core/store/Providers/providersState.ts +0 -37
  47. package/template/src/core/store/Services/servicesActions.ts +0 -191
  48. package/template/src/core/store/Services/servicesSlice.ts +0 -205
  49. package/template/src/core/store/Services/servicesState.ts +0 -466
  50. package/template/src/modules/SunmiCard.js +0 -212
  51. package/template/src/modules/SunmiPrepaid.ts +0 -122
  52. package/template/src/screens/Categories/Categories.tsx +0 -141
  53. package/template/src/screens/Categories/hooks/useCategoriesData.ts +0 -33
  54. package/template/src/screens/Categories/types.ts +0 -7
  55. package/template/src/screens/Favorites/Favorites.tsx +0 -130
  56. package/template/src/screens/ForceChangePassword/ForceChangePasswordScreen.tsx +0 -155
  57. package/template/src/screens/History/History.tsx +0 -430
  58. package/template/src/screens/History/hooks/useHistoryData.ts +0 -49
  59. package/template/src/screens/History/types.ts +0 -7
  60. package/template/src/screens/InquiredBill/InquiredBill.tsx +0 -443
  61. package/template/src/screens/InquiredBill/hooks/useInquiredData.ts +0 -91
  62. package/template/src/screens/PaymentConfirmation/PaymentConfirmation.tsx +0 -326
  63. package/template/src/screens/Providers/Providers.tsx +0 -166
  64. package/template/src/screens/Providers/hooks/useProvidersData.ts +0 -33
  65. package/template/src/screens/Providers/types.ts +0 -7
  66. package/template/src/screens/ReceiptScreen/ReceiptScreen.tsx +0 -181
  67. package/template/src/screens/ReceiptScreen/hooks/useReceiptData.ts +0 -46
  68. package/template/src/screens/ReceiptScreen/utils/utils.tsx +0 -156
  69. package/template/src/screens/Services/Services.tsx +0 -144
  70. package/template/src/screens/Services/hooks/useServicesData.ts +0 -41
  71. package/template/src/screens/SingleService/Components/FawryInputs.tsx +0 -446
  72. package/template/src/screens/SingleService/SingleService.tsx +0 -229
  73. package/template/src/screens/SingleService/hooks/useServiceData.ts +0 -164
  74. package/template/src/services/SunmiPrinterInternal.js +0 -268
  75. package/template/src/types/sunmiPrepaid.d.ts +0 -20
  76. package/template/src/utils/SunmiPrinter.ts +0 -442
  77. package/template/src/utils/feesCalculator.ts +0 -92
@@ -1,102 +1,127 @@
1
- import {ISize} from '../../../types';
2
- import {scale, scaleFontSize, scaleSpacing, scaleBorderRadius} from './scaling';
1
+ import {ISize} from './types';
3
2
 
4
- // Font sizes following design system
5
- export const FontSizes = {
6
- // Header sizes
7
- header1: scaleFontSize(48),
8
- header2: scaleFontSize(48),
9
-
10
- // Body sizes
11
- body1: scaleFontSize(32),
12
- body2: scaleFontSize(30),
3
+ export const CommonSizes = {
4
+ font: {
5
+ // Body Text Sizes
6
+ bodySmall: 12, // Body Small
7
+ bodyMedium: 14, // Body Medium
8
+ bodyLarge: 16, // Body Large
9
+ bodyXLarge: 18, // Body XLarge
13
10
 
14
- // Component specific sizes
15
- button: scaleFontSize(36),
16
- card: scaleFontSize(34),
17
- searchBar: scaleFontSize(24),
18
- balanceLabel: scaleFontSize(16),
19
- label: scaleFontSize(20),
20
- hyperlink: scaleFontSize(24),
21
- // Additional utility sizes
22
- small: scaleFontSize(24),
23
- medium: scaleFontSize(30),
24
- large: scaleFontSize(36),
25
- extraLarge: scaleFontSize(48),
26
- navBar: scaleFontSize(22),
27
- } as const;
11
+ // Heading Sizes
12
+ heading6: 18, // Heading 6 / Bold / 18px
13
+ heading4: 24, // Heading 4 / Bold / 24px
14
+ heading3: 32, // Heading 3 / Bold / 32px
15
+ heading2: 48, // Heading 2 / Bold / 48px
16
+ heading1: 64, // Heading 1 / Bold / 64px
28
17
 
29
- // Letter spacing for typography
30
- export const LetterSpacing = {
31
- none: 0,
32
- tiny: scale(-0.5),
33
- small: scale(-0.25),
34
- medium: scale(0),
35
- extraMedium: scale(0.25),
36
- large: scale(0.5),
37
- extraLarge: scale(1),
38
- huge: scale(2),
39
- } as const;
18
+ // Legacy support - keeping these for backward compatibility
19
+ extraSmall: 12, // Maps to bodySmall
20
+ extraSmallPlus: 14, // Maps to bodyMedium
21
+ small: 14, // Maps to bodyMedium
22
+ smallPlus: 16, // Maps to bodyLarge
23
+ medium: 16, // Maps to bodyLarge
24
+ mediumPlus: 18, // Maps to bodyXLarge
25
+ extraMedium: 24, // Maps to heading4
26
+ large: 32, // Maps to heading3
27
+ largePlus: 48, // Maps to heading2
28
+ extraLarge: 64, // Maps to heading1
29
+ extraLargePlus: 64, // Maps to heading1
30
+ } as Readonly<ISize['font']>,
31
+ letterSpacing: {
32
+ // Default letter spacing for Almarai
33
+ bodySmall: 0,
34
+ bodyMedium: 0,
35
+ bodyLarge: 0,
36
+ bodyXLarge: 0,
37
+ heading6: 0,
38
+ heading4: 0,
39
+ heading3: 0,
40
+ heading2: 0,
41
+ heading1: 0,
40
42
 
41
- // Line heights for consistent vertical rhythm
42
- export const LineHeight = {
43
- none: 0,
44
- tiny: scale(14),
45
- small: scale(16),
46
- medium: scale(18),
47
- extraMedium: scale(20),
48
- large: scale(22),
49
- extraLarge: scale(24),
50
- huge: scale(28),
51
- } as const;
43
+ // Legacy support
44
+ extraSmall: 0,
45
+ extraSmallPlus: 0,
46
+ small: 0,
47
+ smallPlus: 0,
48
+ medium: 0,
49
+ mediumPlus: 0,
50
+ large: 0,
51
+ largePlus: 0,
52
+ extraLarge: 0,
53
+ extraLargePlus: 0,
54
+ } as Readonly<ISize['letterSpacing']>,
55
+ lineHeight: {
56
+ // Line heights optimized for Almarai's large x-height
57
+ bodySmall: 16, // ~1.33 line height
58
+ bodyMedium: 20, // ~1.43 line height
59
+ bodyLarge: 24, // ~1.5 line height
60
+ bodyXLarge: 26, // ~1.44 line height
61
+ heading6: 24, // ~1.33 line height
62
+ heading4: 32, // ~1.33 line height
63
+ heading3: 40, // ~1.25 line height
64
+ heading2: 56, // ~1.17 line height
65
+ heading1: 72, // ~1.125 line height
52
66
 
53
- // Spacing system that aligns with theme spacing
54
- export const Spacing = {
55
- none: 0,
56
- tiny: scaleSpacing(2),
57
- small: scaleSpacing(4),
58
- medium: scaleSpacing(8),
59
- extraMedium: scaleSpacing(12),
60
- large: scaleSpacing(16),
61
- largePlus: scaleSpacing(16),
62
- extraLarge: scaleSpacing(24),
63
- extraLargePlus: scaleSpacing(30),
64
- huge: scaleSpacing(35),
65
- xl: scaleSpacing(40),
66
- xxl: scaleSpacing(50),
67
- } as const;
67
+ // Legacy support
68
+ extraSmall: 16,
69
+ extraSmallPlus: 20,
70
+ small: 20,
71
+ smallPlus: 24,
72
+ medium: 24,
73
+ mediumPlus: 26,
74
+ large: 40,
75
+ largePlus: 56,
76
+ extraLarge: 72,
77
+ extraLargePlus: 72,
78
+ } as Readonly<ISize['lineHeight']>,
79
+ spacing: {
80
+ none: 0, // space / 0
81
+ xSmall: 2, // space / 2
82
+ small: 4, // space / 4
83
+ medium: 8, // space / 8
84
+ large: 12, // space / 12
85
+ xLarge: 16, // space / 16
86
+ xxLarge: 24, // space / 24 (2X-Large)
87
+ xxxLarge: 32, // space / 32 (3X-Large)
88
+ xxxxLarge: 48, // space / 48 (4X-Large)
89
+ xxxxxLarge: 64, // space / 64 (5X-Large)
90
+ xxxxxxLarge: 80, // space / 80 (6X-Large)
91
+ full: 100, // space / 100 (Full)
68
92
 
69
- // Border radius system that aligns with theme borderRadius
70
- export const BorderRadius = {
71
- none: 0,
72
- tiny: scaleBorderRadius(2),
73
- small: scaleBorderRadius(4),
74
- medium: scaleBorderRadius(8),
75
- extraMedium: scaleBorderRadius(12),
76
- large: scaleBorderRadius(16),
77
- extraLarge: scaleBorderRadius(24),
78
- huge: scaleBorderRadius(32),
79
- circular: 999,
80
- } as const;
93
+ // Legacy support - keeping these for backward compatibility
94
+ xs: 4, // Maps to small
95
+ sm: 8, // Maps to medium
96
+ md: 16, // Maps to xLarge
97
+ lg: 24, // Maps to xxLarge
98
+ xl: 32, // Maps to xxxLarge
99
+ } as Readonly<ISize['spacing']>,
100
+ borderRadius: {
101
+ none: 0, // Border / 0
102
+ xSmall: 2, // Border / 2
103
+ small: 4, // Border / 4
104
+ medium: 8, // Border / 8
105
+ large: 12, // Border / 12
106
+ xLarge: 16, // Border / 16
107
+ xxLarge: 24, // Border / 24 (2X-Large)
108
+ full: 1000, // Border / 1000 (Full)
81
109
 
82
- // Border widths
83
- export const BorderWidth = {
84
- none: 0,
85
- tiny: scale(0.5),
86
- small: scale(1),
87
- medium: scale(2),
88
- extraMedium: scale(3),
89
- large: scale(4),
90
- extraLarge: scale(6),
91
- huge: scale(8),
92
- } as const;
110
+ // Legacy support - keeping these for backward compatibility
111
+ xs: 4, // Maps to small
112
+ sm: 8, // Maps to medium
113
+ md: 12, // Maps to large
114
+ lg: 16, // Maps to xLarge
115
+ xl: 24, // Maps to xxLarge
116
+ } as Readonly<ISize['borderRadius']>,
117
+ borderWidth: {
118
+ none: 0, // Stroke / 0
119
+ xSmall: 0.5, // Stroke / 0.5
120
+ small: 1, // Stroke / 1
121
+ medium: 1.5, // Stroke / 1.5
122
+ large: 2, // Stroke / 2
93
123
 
94
- // Legacy export for backward compatibility
95
- export const CommonSizes = {
96
- letterSpacing: LetterSpacing,
97
- lineHeight: LineHeight,
98
- spacing: Spacing,
99
- borderRadius: BorderRadius,
100
- borderWidth: BorderWidth,
101
- fontSize: FontSizes,
102
- } as const;
124
+ // Legacy support - keeping these for backward compatibility
125
+ extraSmall: 0.5, // Maps to xSmall
126
+ } as Readonly<ISize['borderWidth']>,
127
+ };
@@ -6,8 +6,8 @@ import {
6
6
  ViewStyle,
7
7
  } from 'react-native';
8
8
  import {Theme} from './types';
9
- import {FontSizes, LineHeight, Spacing} from './commonSizes';
10
9
  import {Fonts} from './fonts';
10
+ import {CommonSizes} from './commonSizes';
11
11
 
12
12
  export const screenComponentWidth = Dimensions.get('screen').width - 60;
13
13
  export const screenWidth = Dimensions.get('screen').width;
@@ -131,34 +131,34 @@ export const createThemedStyles = (theme: Theme) =>
131
131
  } as TextStyle,
132
132
  h4_semiBold: {
133
133
  fontFamily: Fonts.semiBold,
134
- fontSize: FontSizes.medium,
135
- lineHeight: LineHeight.medium,
134
+ fontSize: CommonSizes.font.medium,
135
+ lineHeight: CommonSizes.lineHeight.medium,
136
136
  } as TextStyle,
137
137
  h4_regular: {
138
138
  fontFamily: Fonts.regular,
139
- fontSize: FontSizes.medium,
140
- lineHeight: LineHeight.medium,
139
+ fontSize: CommonSizes.font.medium,
140
+ lineHeight: CommonSizes.lineHeight.medium,
141
141
  } as TextStyle,
142
142
  body_bold: {
143
143
  fontFamily: Fonts.bold,
144
- fontSize: FontSizes.small,
145
- lineHeight: LineHeight.small,
144
+ fontSize: CommonSizes.font.small,
145
+ lineHeight: CommonSizes.lineHeight.small,
146
146
  } as TextStyle,
147
147
  body_bold_underlined: {
148
148
  fontFamily: Fonts.bold,
149
- fontSize: FontSizes.small,
150
- lineHeight: LineHeight.small,
149
+ fontSize: CommonSizes.font.small,
150
+ lineHeight: CommonSizes.lineHeight.small,
151
151
  textDecorationLine: 'underline',
152
152
  } as TextStyle,
153
153
  body_semiBold: {
154
154
  fontFamily: Fonts.semiBold,
155
- fontSize: FontSizes.small,
156
- lineHeight: LineHeight.small,
155
+ fontSize: CommonSizes.font.small,
156
+ lineHeight: CommonSizes.lineHeight.small,
157
157
  } as TextStyle,
158
158
  body_regular: {
159
159
  fontFamily: Fonts.regular,
160
- fontSize: FontSizes.small,
161
- lineHeight: LineHeight.small,
160
+ fontSize: CommonSizes.font.small,
161
+ lineHeight: CommonSizes.lineHeight.small,
162
162
  } as TextStyle,
163
163
  tabBar_bold: {
164
164
  fontFamily: Fonts.bold,
@@ -204,47 +204,47 @@ export const CommonStyles = createThemedStyles({
204
204
  text: {
205
205
  header1: {
206
206
  fontFamily: Fonts.medium,
207
- fontSize: FontSizes.header1,
207
+ fontSize: CommonSizes.font.large,
208
208
  color: '#000000',
209
209
  },
210
210
  header2: {
211
211
  fontFamily: Fonts.normal,
212
- fontSize: FontSizes.header2,
212
+ fontSize: CommonSizes.font.largePlus,
213
213
  color: '#000000',
214
214
  },
215
215
  body1: {
216
216
  fontFamily: Fonts.light,
217
- fontSize: FontSizes.body1,
217
+ fontSize: CommonSizes.font.medium,
218
218
  color: '#000000',
219
219
  },
220
220
  body2: {
221
221
  fontFamily: Fonts.regular,
222
- fontSize: FontSizes.body2,
222
+ fontSize: CommonSizes.font.mediumPlus,
223
223
  color: '#000000',
224
224
  },
225
225
  button: {
226
226
  fontFamily: Fonts.regular,
227
- fontSize: FontSizes.button,
227
+ fontSize: CommonSizes.font.mediumPlus,
228
228
  color: '#FFFFFF',
229
229
  },
230
230
  cards: {
231
231
  fontFamily: Fonts.semiBold,
232
- fontSize: FontSizes.card,
232
+ fontSize: CommonSizes.font.mediumPlus,
233
233
  color: '#000000',
234
234
  },
235
235
  SearchBar: {
236
236
  fontFamily: Fonts.light,
237
- fontSize: FontSizes.searchBar,
237
+ fontSize: CommonSizes.font.mediumPlus,
238
238
  color: '#000000',
239
239
  },
240
240
  label: {
241
241
  fontFamily: Fonts.light,
242
- fontSize: FontSizes.label,
242
+ fontSize: CommonSizes.font.mediumPlus,
243
243
  color: '#000000',
244
244
  },
245
245
  hyperlink: {
246
246
  fontFamily: Fonts.light,
247
- fontSize: FontSizes.hyperlink,
247
+ fontSize: CommonSizes.font.mediumPlus,
248
248
  color: '#000000',
249
249
  textDecorationLine: 'underline',
250
250
  },
@@ -1,17 +1,16 @@
1
1
  export const Fonts = {
2
- // Inter Variable Font
3
- regular: 'Inter-VariableFont_opsz,wght',
4
- italic: 'Inter-Italic-VariableFont_opsz,wght',
2
+ // Almarai Font Family
3
+ light: 'Almarai-Light',
4
+ regular: 'Almarai-Regular',
5
+ bold: 'Almarai-Bold',
6
+ extraBold: 'Almarai-ExtraBold',
5
7
 
6
- // Kanit Font
7
- medium: 'Kanit-Medium',
8
-
9
- // Font weights for Inter Variable Font
10
- thin: 'Inter-Thin',
11
- light: 'Inter-Light',
12
- normal: 'Inter-Regular',
13
- semiBold: 'Inter-SemiBold',
14
- bold: 'Inter-Bold',
15
- extraBold: 'Inter-ExtraBold',
16
- black: 'Inter-Black',
8
+ // Legacy support - keeping these for backward compatibility
9
+ // but they now map to Almarai equivalents
10
+ thin: 'Almarai-Light',
11
+ normal: 'Almarai-Regular',
12
+ medium: 'Almarai-Regular',
13
+ semiBold: 'Almarai-Bold',
14
+ black: 'Almarai-ExtraBold',
15
+ italic: 'Almarai-Regular', // Almarai doesn't have italic variant
17
16
  };
@@ -0,0 +1,135 @@
1
+ export interface ShadowConfig {
2
+ shadowColor: string;
3
+ shadowOffset: {
4
+ width: number;
5
+ height: number;
6
+ };
7
+ shadowOpacity: number;
8
+ shadowRadius: number;
9
+ elevation?: number; // For Android
10
+ }
11
+
12
+ export interface ElevationShadow {
13
+ primary: ShadowConfig;
14
+ secondary: ShadowConfig;
15
+ }
16
+
17
+ export const Shadows: Record<number, ElevationShadow> = {
18
+ 1: {
19
+ primary: {
20
+ shadowColor: '#000000',
21
+ shadowOffset: {
22
+ width: 0,
23
+ height: 1,
24
+ },
25
+ shadowOpacity: 0.02, // 2%
26
+ shadowRadius: 1,
27
+ elevation: 1,
28
+ },
29
+ secondary: {
30
+ shadowColor: '#000000',
31
+ shadowOffset: {
32
+ width: 0,
33
+ height: 2,
34
+ },
35
+ shadowOpacity: 0.04, // 4%
36
+ shadowRadius: 4,
37
+ elevation: 1,
38
+ },
39
+ },
40
+ 2: {
41
+ primary: {
42
+ shadowColor: '#000000',
43
+ shadowOffset: {
44
+ width: 0,
45
+ height: 1,
46
+ },
47
+ shadowOpacity: 0.04, // 4%
48
+ shadowRadius: 4,
49
+ elevation: 2,
50
+ },
51
+ secondary: {
52
+ shadowColor: '#000000',
53
+ shadowOffset: {
54
+ width: 0,
55
+ height: 4,
56
+ },
57
+ shadowOpacity: 0.08, // 8%
58
+ shadowRadius: 10,
59
+ elevation: 2,
60
+ },
61
+ },
62
+ 3: {
63
+ primary: {
64
+ shadowColor: '#000000',
65
+ shadowOffset: {
66
+ width: 0,
67
+ height: 2,
68
+ },
69
+ shadowOpacity: 0.04, // 4%
70
+ shadowRadius: 20,
71
+ elevation: 3,
72
+ },
73
+ secondary: {
74
+ shadowColor: '#000000',
75
+ shadowOffset: {
76
+ width: 0,
77
+ height: 8,
78
+ },
79
+ shadowOpacity: 0.08, // 8%
80
+ shadowRadius: 32,
81
+ elevation: 3,
82
+ },
83
+ },
84
+ 4: {
85
+ primary: {
86
+ shadowColor: '#000000',
87
+ shadowOffset: {
88
+ width: 0,
89
+ height: 8,
90
+ },
91
+ shadowOpacity: 0.06, // 6%
92
+ shadowRadius: 20,
93
+ elevation: 4,
94
+ },
95
+ secondary: {
96
+ shadowColor: '#000000',
97
+ shadowOffset: {
98
+ width: 0,
99
+ height: 24,
100
+ },
101
+ shadowOpacity: 0.12, // 12%
102
+ shadowRadius: 60,
103
+ elevation: 4,
104
+ },
105
+ },
106
+ };
107
+
108
+ // Helper function to get shadow styles for a specific elevation
109
+ export const getShadowStyle = (
110
+ elevation: number,
111
+ useSecondary = false,
112
+ ): ShadowConfig => {
113
+ const shadow = Shadows[elevation];
114
+ if (!shadow) {
115
+ throw new Error(
116
+ `Elevation ${elevation} is not defined. Available elevations: ${Object.keys(
117
+ Shadows,
118
+ ).join(', ')}`,
119
+ );
120
+ }
121
+ return useSecondary ? shadow.secondary : shadow.primary;
122
+ };
123
+
124
+ // Helper function to get both primary and secondary shadows for an elevation
125
+ export const getElevationShadows = (elevation: number): ElevationShadow => {
126
+ const shadow = Shadows[elevation];
127
+ if (!shadow) {
128
+ throw new Error(
129
+ `Elevation ${elevation} is not defined. Available elevations: ${Object.keys(
130
+ Shadows,
131
+ ).join(', ')}`,
132
+ );
133
+ }
134
+ return shadow;
135
+ };