@apple-pie/slice-native 0.1.6 → 0.1.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 (124) hide show
  1. package/README.md +138 -261
  2. package/SliceNative.podspec +24 -0
  3. package/dist/cjs/components.js +4 -0
  4. package/dist/cjs/hooks.js +2 -0
  5. package/dist/cjs/index.js +9 -0
  6. package/dist/cjs/src/components/SliceBackgroundBlur/SliceBackgroundBlur.js +11 -0
  7. package/dist/cjs/src/components/SliceButton/SliceButton.js +50 -23
  8. package/dist/cjs/src/components/SliceLiquidGlassView/SliceLiquidGlassView.js +12 -0
  9. package/dist/cjs/src/components/SliceTextInput/SliceTextInput.js +39 -9
  10. package/dist/cjs/src/hooks/useDeviceCapabilities/useDeviceCapabilities.js +19 -0
  11. package/dist/cjs/src/utils/sizes/sizes.js +40 -0
  12. package/dist/cjs/utils.js +3 -0
  13. package/dist/esm/components.mjs +2 -0
  14. package/dist/esm/hooks.mjs +1 -0
  15. package/dist/esm/index.mjs +4 -0
  16. package/dist/esm/src/components/SliceBackgroundBlur/SliceBackgroundBlur.mjs +9 -0
  17. package/dist/esm/src/components/SliceButton/SliceButton.mjs +50 -23
  18. package/dist/esm/src/components/SliceLiquidGlassView/SliceLiquidGlassView.mjs +10 -0
  19. package/dist/esm/src/components/SliceTextInput/SliceTextInput.mjs +39 -9
  20. package/dist/esm/src/hooks/useDeviceCapabilities/useDeviceCapabilities.mjs +17 -0
  21. package/dist/esm/src/utils/sizes/sizes.mjs +37 -0
  22. package/dist/esm/utils.mjs +1 -0
  23. package/dist/react-native/native/src/components/SliceBackgroundBlur/SliceBackgroundBlur.js +6 -0
  24. package/dist/react-native/native/src/components/SliceBackgroundBlur/SliceBackgroundBlur.native.js +6 -0
  25. package/dist/react-native/native/src/components/SliceBackgroundBlur/_types.js +1 -0
  26. package/dist/react-native/native/src/components/SliceBackgroundBlur/index.js +1 -0
  27. package/dist/react-native/native/src/components/SliceButton/SliceButton.js +141 -0
  28. package/dist/react-native/native/src/components/SliceButton/_types.js +1 -0
  29. package/dist/react-native/native/src/components/SliceButton/index.js +1 -0
  30. package/dist/react-native/native/src/components/SliceIcon/SliceIcon.js +15 -0
  31. package/dist/react-native/native/src/components/SliceIcon/_types.js +1 -0
  32. package/dist/react-native/native/src/components/SliceIcon/iconRegistry.js +663 -0
  33. package/dist/react-native/native/src/components/SliceIcon/icons.js +140 -0
  34. package/dist/react-native/native/src/components/SliceIcon/index.js +2 -0
  35. package/dist/react-native/native/src/components/SliceLiquidGlassView/SliceLiquidGlassView.ios.js +6 -0
  36. package/dist/react-native/native/src/components/SliceLiquidGlassView/SliceLiquidGlassView.js +7 -0
  37. package/dist/react-native/native/src/components/SliceLiquidGlassView/_types.js +1 -0
  38. package/dist/react-native/native/src/components/SliceLiquidGlassView/index.js +1 -0
  39. package/dist/react-native/native/src/components/SliceText/SliceText.js +16 -0
  40. package/dist/react-native/native/src/components/SliceText/_types.js +1 -0
  41. package/dist/react-native/native/src/components/SliceText/index.js +1 -0
  42. package/dist/react-native/native/src/components/SliceTextInput/SliceTextInput.js +111 -0
  43. package/dist/react-native/native/src/components/SliceTextInput/_types.js +1 -0
  44. package/dist/react-native/native/src/components/SliceTextInput/index.js +1 -0
  45. package/dist/react-native/native/src/components/index.js +6 -0
  46. package/dist/react-native/native/src/hooks/index.js +2 -0
  47. package/dist/react-native/native/src/hooks/useCreateThemedStyles/index.js +1 -0
  48. package/dist/react-native/native/src/hooks/useCreateThemedStyles/useCreateThemedStyles.js +8 -0
  49. package/dist/react-native/native/src/hooks/useDeviceCapabilities/_types.js +1 -0
  50. package/dist/react-native/native/src/hooks/useDeviceCapabilities/index.js +1 -0
  51. package/dist/react-native/native/src/hooks/useDeviceCapabilities/useDeviceCapabilities.js +14 -0
  52. package/dist/react-native/native/src/hooks/useDeviceCapabilities/useDeviceCapabilities.native.js +23 -0
  53. package/dist/react-native/native/src/index.js +6 -0
  54. package/dist/react-native/native/src/providers/SliceThemeProvider.js +30 -0
  55. package/dist/react-native/native/src/providers/index.js +1 -0
  56. package/dist/react-native/native/src/specs/BackgroundBlurNativeComponent.ts +16 -0
  57. package/dist/react-native/native/src/specs/LiquidGlassNativeComponent.ts +18 -0
  58. package/dist/react-native/native/src/specs/NativeDeviceCapabilities.ts +13 -0
  59. package/dist/react-native/native/src/theme/index.js +69 -0
  60. package/dist/react-native/native/src/theme/motion.js +43 -0
  61. package/dist/react-native/native/src/types/index.js +1 -0
  62. package/dist/react-native/native/src/types/sharedTypes.js +1 -0
  63. package/dist/react-native/native/src/utils/index.js +2 -0
  64. package/dist/react-native/native/src/utils/sizes/index.js +1 -0
  65. package/dist/react-native/native/src/utils/sizes/sizes.js +35 -0
  66. package/dist/react-native/native/src/utils/typography/index.js +1 -0
  67. package/dist/react-native/native/src/utils/typography/typography.js +13 -0
  68. package/dist/react-native/src/theme/colors/colors.js +385 -0
  69. package/dist/react-native/src/theme/colors/types.js +1 -0
  70. package/dist/react-native/src/theme/corners/corners.js +10 -0
  71. package/dist/react-native/src/theme/corners/types.js +1 -0
  72. package/dist/react-native/src/theme/elevations/_types.js +1 -0
  73. package/dist/react-native/src/theme/elevations/elevations.js +13 -0
  74. package/dist/react-native/src/theme/motion/_types.js +1 -0
  75. package/dist/react-native/src/theme/motion/motion.js +11 -0
  76. package/dist/react-native/src/theme/spacing/_types.js +1 -0
  77. package/dist/react-native/src/theme/spacing/spacing.js +10 -0
  78. package/dist/react-native/src/theme/type/type.js +371 -0
  79. package/dist/react-native/src/theme/type/types.js +1 -0
  80. package/dist/types/native/src/components/SliceBackgroundBlur/SliceBackgroundBlur.d.ts +3 -0
  81. package/dist/types/native/src/components/SliceBackgroundBlur/SliceBackgroundBlur.native.d.ts +2 -0
  82. package/dist/types/native/src/components/SliceBackgroundBlur/_types.d.ts +24 -0
  83. package/dist/types/native/src/components/SliceBackgroundBlur/index.d.ts +2 -0
  84. package/dist/types/native/src/components/SliceButton/_types.d.ts +33 -2
  85. package/dist/types/native/src/components/SliceLiquidGlassView/SliceLiquidGlassView.d.ts +3 -0
  86. package/dist/types/native/src/components/SliceLiquidGlassView/SliceLiquidGlassView.ios.d.ts +2 -0
  87. package/dist/types/native/src/components/SliceLiquidGlassView/_types.d.ts +17 -0
  88. package/dist/types/native/src/components/SliceLiquidGlassView/index.d.ts +2 -0
  89. package/dist/types/native/src/components/SliceTextInput/_types.d.ts +23 -1
  90. package/dist/types/native/src/components/index.d.ts +4 -0
  91. package/dist/types/native/src/hooks/index.d.ts +2 -0
  92. package/dist/types/native/src/hooks/useDeviceCapabilities/_types.d.ts +17 -0
  93. package/dist/types/native/src/hooks/useDeviceCapabilities/index.d.ts +2 -0
  94. package/dist/types/native/src/hooks/useDeviceCapabilities/useDeviceCapabilities.d.ts +3 -0
  95. package/dist/types/native/src/hooks/useDeviceCapabilities/useDeviceCapabilities.native.d.ts +7 -0
  96. package/dist/types/native/src/index.d.ts +12 -0
  97. package/dist/types/native/src/specs/BackgroundBlurNativeComponent.d.ts +9 -0
  98. package/dist/types/native/src/specs/LiquidGlassNativeComponent.d.ts +9 -0
  99. package/dist/types/native/src/specs/NativeDeviceCapabilities.d.ts +11 -0
  100. package/dist/types/native/src/types/index.d.ts +1 -0
  101. package/dist/types/native/src/types/sharedTypes.d.ts +14 -0
  102. package/dist/types/native/src/utils/index.d.ts +1 -0
  103. package/dist/types/native/src/utils/sizes/index.d.ts +1 -0
  104. package/dist/types/native/src/utils/sizes/sizes.d.ts +7 -0
  105. package/package.json +30 -13
  106. package/platform/android/build.gradle +22 -0
  107. package/platform/android/src/main/AndroidManifest.xml +1 -0
  108. package/platform/android/src/main/java/com/slice/SliceBackgroundBlurManager.java +28 -0
  109. package/platform/android/src/main/java/com/slice/SliceBackgroundBlurView.java +98 -0
  110. package/platform/android/src/main/java/com/slice/SliceDeviceCapabilitiesModule.java +25 -0
  111. package/platform/android/src/main/java/com/slice/SlicePackage.java +25 -0
  112. package/platform/ios/BackgroundBlurSurface.swift +89 -0
  113. package/platform/ios/LiquidGlassSurface.swift +82 -0
  114. package/platform/ios/RCTBackgroundBlurView.h +3 -0
  115. package/platform/ios/RCTBackgroundBlurView.mm +42 -0
  116. package/platform/ios/RCTLiquidGlassView.h +8 -0
  117. package/platform/ios/RCTLiquidGlassView.mm +73 -0
  118. package/platform/ios/SliceDeviceCapabilities.h +4 -0
  119. package/platform/ios/SliceDeviceCapabilities.mm +35 -0
  120. package/react-native.config.js +1 -0
  121. package/src/specs/BackgroundBlurNativeComponent.ts +16 -0
  122. package/src/specs/LiquidGlassNativeComponent.ts +18 -0
  123. package/src/specs/NativeDeviceCapabilities.ts +13 -0
  124. package/dist/types/native/index.d.ts +0 -8
@@ -0,0 +1,371 @@
1
+ // base family
2
+ const fontFamily = `var(--slice-font-family, "Funnel Sans")`;
3
+ // base weights
4
+ export const fontWeights = {
5
+ regular: 360,
6
+ medium: 420,
7
+ semi: 480,
8
+ bold: 500,
9
+ extra: 560,
10
+ };
11
+ // base sizes
12
+ export const fontSizes = {
13
+ xs: '0.75rem',
14
+ s: '0.875rem',
15
+ m: '0.9375rem',
16
+ l: '1rem',
17
+ xl: '1.0625rem',
18
+ h1: '4.25rem',
19
+ h2: '3.5rem',
20
+ h3: '2.75rem',
21
+ h4: '2rem',
22
+ h5: '1.5rem',
23
+ h6: '1.0625rem',
24
+ };
25
+ // base line heights
26
+ export const lineHeights = {
27
+ xs: '116.67%',
28
+ s: '128.57%',
29
+ m: '133.33%',
30
+ l: '140%',
31
+ xl: '142.86%',
32
+ xxl: '162.5%',
33
+ };
34
+ // base letter spacing
35
+ export const letterSpacings = {
36
+ xs: '0.00625em',
37
+ s: '0.009375em',
38
+ m: '0.0125em',
39
+ l: '0.015625em',
40
+ };
41
+ // ** new styles aligned to lyra */
42
+ export const type = {
43
+ 'body-xs-regular': `
44
+ font-family: ${fontFamily};
45
+ font-weight: ${fontWeights.regular};
46
+ font-size: ${fontSizes.xs};
47
+ line-height: ${lineHeights.m};
48
+ text-decoration: none;
49
+ letter-spacing: ${letterSpacings.m}`,
50
+ 'body-xs-medium': `
51
+ font-family: ${fontFamily};
52
+ font-weight: ${fontWeights.medium};
53
+ font-size: ${fontSizes.xs};
54
+ line-height: ${lineHeights.m};
55
+ text-decoration: none;
56
+ letter-spacing: ${letterSpacings.m}`,
57
+ 'body-xs-bold': `
58
+ font-family: ${fontFamily};
59
+ font-weight: ${fontWeights.bold};
60
+ font-size: ${fontSizes.xs};
61
+ line-height: ${lineHeights.m};
62
+ text-decoration: none;
63
+ letter-spacing: ${letterSpacings.l}`,
64
+ 'body-s-regular': `
65
+ font-family: ${fontFamily};
66
+ font-weight: ${fontWeights.regular};
67
+ font-size: ${fontSizes.s};
68
+ line-height: ${lineHeights.xl};
69
+ text-decoration: none;
70
+ letter-spacing: ${letterSpacings.s}`,
71
+ 'body-s-medium': `
72
+ font-family: ${fontFamily};
73
+ font-weight: ${fontWeights.medium};
74
+ font-size: ${fontSizes.s};
75
+ line-height: ${lineHeights.xl};
76
+ text-decoration: none;
77
+ letter-spacing: ${letterSpacings.s}`,
78
+ 'body-s-bold': `
79
+ font-family: ${fontFamily};
80
+ font-weight: ${fontWeights.bold};
81
+ font-size: ${fontSizes.s};
82
+ line-height: ${lineHeights.xl};
83
+ text-decoration: none;
84
+ letter-spacing: ${letterSpacings.m}`,
85
+ 'body-m-regular': `
86
+ font-family: ${fontFamily};
87
+ font-weight: ${fontWeights.regular};
88
+ font-size: ${fontSizes.m};
89
+ line-height: ${lineHeights.l};
90
+ text-decoration: none;
91
+ letter-spacing: ${letterSpacings.s}`,
92
+ 'body-m-medium': `
93
+ font-family: ${fontFamily};
94
+ font-weight: ${fontWeights.medium};
95
+ font-size: ${fontSizes.m};
96
+ line-height: ${lineHeights.l};
97
+ text-decoration: none;
98
+ letter-spacing: ${letterSpacings.s}`,
99
+ 'body-m-bold': `
100
+ font-family: ${fontFamily};
101
+ font-weight: ${fontWeights.bold};
102
+ font-size: ${fontSizes.m};
103
+ line-height: ${lineHeights.l};
104
+ text-decoration: none;
105
+ letter-spacing: ${letterSpacings.m}`,
106
+ 'body-l-regular': `
107
+ font-family: ${fontFamily};
108
+ font-weight: ${fontWeights.regular};
109
+ font-size: ${fontSizes.l};
110
+ line-height: ${lineHeights.xxl};
111
+ text-decoration: none;
112
+ letter-spacing: ${letterSpacings.xs}`,
113
+ 'body-l-medium': `
114
+ font-family: ${fontFamily};
115
+ font-weight: ${fontWeights.medium};
116
+ font-size: ${fontSizes.l};
117
+ line-height: ${lineHeights.xxl};
118
+ text-decoration: none;
119
+ letter-spacing: ${letterSpacings.xs}`,
120
+ 'body-l-bold': `
121
+ font-family: ${fontFamily};
122
+ font-weight: ${fontWeights.bold};
123
+ font-size: ${fontSizes.l};
124
+ line-height: ${lineHeights.xxl};
125
+ text-decoration: none;
126
+ letter-spacing: ${letterSpacings.s}`,
127
+ 'body-xl-regular': `
128
+ font-family: ${fontFamily};
129
+ font-weight: ${fontWeights.regular};
130
+ font-size: ${fontSizes.xl};
131
+ line-height: ${lineHeights.xxl};
132
+ text-decoration: none;
133
+ letter-spacing: ${letterSpacings.xs}`,
134
+ 'body-xl-medium': `
135
+ font-family: ${fontFamily};
136
+ font-weight: ${fontWeights.medium};
137
+ font-size: ${fontSizes.xl};
138
+ line-height: ${lineHeights.xxl};
139
+ text-decoration: none;
140
+ letter-spacing: ${letterSpacings.xs}`,
141
+ 'body-xl-bold': `
142
+ font-family: ${fontFamily};
143
+ font-weight: ${fontWeights.bold};
144
+ font-size: ${fontSizes.xl};
145
+ line-height: ${lineHeights.xxl};
146
+ text-decoration: none;
147
+ letter-spacing: ${letterSpacings.s}`,
148
+ h1: `
149
+ font-family: ${fontFamily};
150
+ font-weight: ${fontWeights.extra};
151
+ font-size: ${fontSizes.h1};
152
+ line-height: ${lineHeights.xs};
153
+ letter-spacing: ${letterSpacings.m}`,
154
+ h2: `
155
+ font-family: ${fontFamily};
156
+ font-weight: ${fontWeights.extra};
157
+ font-size: ${fontSizes.h2};
158
+ line-height: ${lineHeights.xs};
159
+ letter-spacing: ${letterSpacings.m}`,
160
+ h3: `
161
+ font-family: ${fontFamily};
162
+ font-weight: ${fontWeights.extra};
163
+ font-size: ${fontSizes.h3};
164
+ line-height: ${lineHeights.xs};
165
+ letter-spacing: ${letterSpacings.m}`,
166
+ h4: `
167
+ font-family: ${fontFamily};
168
+ font-weight: ${fontWeights.extra};
169
+ font-size: ${fontSizes.h4};
170
+ line-height: ${lineHeights.xs};
171
+ letter-spacing: ${letterSpacings.m}`,
172
+ h5: `
173
+ font-family: ${fontFamily};
174
+ font-weight: ${fontWeights.extra};
175
+ font-size: ${fontSizes.h5};
176
+ line-height: ${lineHeights.xs};
177
+ letter-spacing: ${letterSpacings.m}`,
178
+ h6: `
179
+ font-family: ${fontFamily};
180
+ font-weight: ${fontWeights.extra};
181
+ font-size: ${fontSizes.h6};
182
+ line-height: ${lineHeights.xs};
183
+ letter-spacing: ${letterSpacings.m}`,
184
+ };
185
+ export const typeCssClasses = {
186
+ 'body-xs-regular': 'body-xs-regular',
187
+ 'body-xs-medium': 'body-xs-medium',
188
+ 'body-xs-bold': 'body-xs-bold',
189
+ 'body-s-regular': 'body-s-regular',
190
+ 'body-s-medium': 'body-s-medium',
191
+ 'body-s-bold': 'body-s-bold',
192
+ 'body-m-regular': 'body-m-regular',
193
+ 'body-m-medium': 'body-m-medium',
194
+ 'body-m-bold': 'body-m-bold',
195
+ 'body-l-regular': 'body-l-regular',
196
+ 'body-l-medium': 'body-l-medium',
197
+ 'body-l-bold': 'body-l-bold',
198
+ 'body-xl-regular': 'body-xl-regular',
199
+ 'body-xl-medium': 'body-xl-medium',
200
+ 'body-xl-bold': 'body-xl-bold',
201
+ h1: 'h1',
202
+ h2: 'h2',
203
+ h3: 'h3',
204
+ h4: 'h4',
205
+ h5: 'h5',
206
+ h6: 'h6',
207
+ };
208
+ export const typeStyles = {
209
+ 'body-xs-regular': {
210
+ fontFamily: `${fontFamily}`,
211
+ fontWeight: `${fontWeights.regular}`,
212
+ fontSize: `${fontSizes.xs}`,
213
+ lineHeight: `${lineHeights.m}`,
214
+ textDecoration: 'none',
215
+ letterSpacing: `${letterSpacings.m}`,
216
+ },
217
+ 'body-xs-medium': {
218
+ fontFamily: `${fontFamily}`,
219
+ fontWeight: `${fontWeights.medium}`,
220
+ fontSize: `${fontSizes.xs}`,
221
+ lineHeight: `${lineHeights.m}`,
222
+ textDecoration: 'none',
223
+ letterSpacing: `${letterSpacings.m}`,
224
+ },
225
+ 'body-xs-bold': {
226
+ fontFamily: `${fontFamily}`,
227
+ fontWeight: `${fontWeights.bold}`,
228
+ fontSize: `${fontSizes.xs}`,
229
+ lineHeight: `${lineHeights.m}`,
230
+ textDecoration: 'none',
231
+ letterSpacing: `${letterSpacings.l}`,
232
+ },
233
+ 'body-s-regular': {
234
+ fontFamily: `${fontFamily}`,
235
+ fontWeight: `${fontWeights.regular}`,
236
+ fontSize: `${fontSizes.s}`,
237
+ lineHeight: `${lineHeights.xl}`,
238
+ textDecoration: 'none',
239
+ letterSpacing: `${letterSpacings.s}`,
240
+ },
241
+ 'body-s-medium': {
242
+ fontFamily: `${fontFamily}`,
243
+ fontWeight: `${fontWeights.medium}`,
244
+ fontSize: `${fontSizes.s}`,
245
+ lineHeight: `${lineHeights.xl}`,
246
+ textDecoration: 'none',
247
+ letterSpacing: `${letterSpacings.s}`,
248
+ },
249
+ 'body-s-bold': {
250
+ fontFamily: `${fontFamily}`,
251
+ fontWeight: `${fontWeights.bold}`,
252
+ fontSize: `${fontSizes.s}`,
253
+ lineHeight: `${lineHeights.xl}`,
254
+ textDecoration: 'none',
255
+ letterSpacing: `${letterSpacings.m}`,
256
+ },
257
+ 'body-m-regular': {
258
+ fontFamily: `${fontFamily}`,
259
+ fontWeight: `${fontWeights.regular}`,
260
+ fontSize: `${fontSizes.m}`,
261
+ lineHeight: `${lineHeights.l}`,
262
+ textDecoration: 'none',
263
+ letterSpacing: `${letterSpacings.s}`,
264
+ },
265
+ 'body-m-medium': {
266
+ fontFamily: `${fontFamily}`,
267
+ fontWeight: `${fontWeights.medium}`,
268
+ fontSize: `${fontSizes.m}`,
269
+ lineHeight: `${lineHeights.l}`,
270
+ textDecoration: 'none',
271
+ letterSpacing: `${letterSpacings.s}`,
272
+ },
273
+ 'body-m-bold': {
274
+ fontFamily: `${fontFamily}`,
275
+ fontWeight: `${fontWeights.bold}`,
276
+ fontSize: `${fontSizes.m}`,
277
+ lineHeight: `${lineHeights.l}`,
278
+ textDecoration: 'none',
279
+ letterSpacing: `${letterSpacings.m}`,
280
+ },
281
+ 'body-l-regular': {
282
+ fontFamily: `${fontFamily}`,
283
+ fontWeight: `${fontWeights.regular}`,
284
+ fontSize: `${fontSizes.l}`,
285
+ lineHeight: `${lineHeights.xxl}`,
286
+ textDecoration: 'none',
287
+ letterSpacing: `${letterSpacings.xs}`,
288
+ },
289
+ 'body-l-medium': {
290
+ fontFamily: `${fontFamily}`,
291
+ fontWeight: `${fontWeights.medium}`,
292
+ fontSize: `${fontSizes.l}`,
293
+ lineHeight: `${lineHeights.xxl}`,
294
+ textDecoration: 'none',
295
+ letterSpacing: `${letterSpacings.xs}`,
296
+ },
297
+ 'body-l-bold': {
298
+ fontFamily: `${fontFamily}`,
299
+ fontWeight: `${fontWeights.bold}`,
300
+ fontSize: `${fontSizes.l}`,
301
+ lineHeight: `${lineHeights.xxl}`,
302
+ textDecoration: 'none',
303
+ letterSpacing: `${letterSpacings.s}`,
304
+ },
305
+ 'body-xl-regular': {
306
+ fontFamily: `${fontFamily}`,
307
+ fontWeight: `${fontWeights.regular}`,
308
+ fontSize: `${fontSizes.xl}`,
309
+ lineHeight: `${lineHeights.xxl}`,
310
+ textDecoration: 'none',
311
+ letterSpacing: `${letterSpacings.xs}`,
312
+ },
313
+ 'body-xl-medium': {
314
+ fontFamily: `${fontFamily}`,
315
+ fontWeight: `${fontWeights.medium}`,
316
+ fontSize: `${fontSizes.xl}`,
317
+ lineHeight: `${lineHeights.xxl}`,
318
+ textDecoration: 'none',
319
+ letterSpacing: `${letterSpacings.xs}`,
320
+ },
321
+ 'body-xl-bold': {
322
+ fontFamily: `${fontFamily}`,
323
+ fontWeight: `${fontWeights.bold}`,
324
+ fontSize: `${fontSizes.xl}`,
325
+ lineHeight: `${lineHeights.xxl}`,
326
+ textDecoration: 'none',
327
+ letterSpacing: `${letterSpacings.s}`,
328
+ },
329
+ h1: {
330
+ fontFamily: `${fontFamily}`,
331
+ fontWeight: `${fontWeights.extra}`,
332
+ fontSize: `${fontSizes.h1}`,
333
+ lineHeight: `${lineHeights.xs}`,
334
+ letterSpacing: `${letterSpacings.m}`,
335
+ },
336
+ h2: {
337
+ fontFamily: `${fontFamily}`,
338
+ fontWeight: `${fontWeights.extra}`,
339
+ fontSize: `${fontSizes.h2}`,
340
+ lineHeight: `${lineHeights.xs}`,
341
+ letterSpacing: `${letterSpacings.m}`,
342
+ },
343
+ h3: {
344
+ fontFamily: `${fontFamily}`,
345
+ fontWeight: `${fontWeights.extra}`,
346
+ fontSize: `${fontSizes.h3}`,
347
+ lineHeight: `${lineHeights.xs}`,
348
+ letterSpacing: `${letterSpacings.m}`,
349
+ },
350
+ h4: {
351
+ fontFamily: `${fontFamily}`,
352
+ fontWeight: `${fontWeights.extra}`,
353
+ fontSize: `${fontSizes.h4}`,
354
+ lineHeight: `${lineHeights.xs}`,
355
+ letterSpacing: `${letterSpacings.m}`,
356
+ },
357
+ h5: {
358
+ fontFamily: `${fontFamily}`,
359
+ fontWeight: `${fontWeights.extra}`,
360
+ fontSize: `${fontSizes.h5}`,
361
+ lineHeight: `${lineHeights.xs}`,
362
+ letterSpacing: `${letterSpacings.m}`,
363
+ },
364
+ h6: {
365
+ fontFamily: `${fontFamily}`,
366
+ fontWeight: `${fontWeights.extra}`,
367
+ fontSize: `${fontSizes.h6}`,
368
+ lineHeight: `${lineHeights.xs}`,
369
+ letterSpacing: `${letterSpacings.m}`,
370
+ },
371
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { SliceBackgroundBlurProps } from './_types';
2
+ /** Web/other-platform fallback. Metro selects the native implementation on iOS/Android. */
3
+ export declare function SliceBackgroundBlur({ style, fallbackColor, }: Readonly<SliceBackgroundBlurProps>): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { SliceBackgroundBlurProps } from './_types';
2
+ export declare function SliceBackgroundBlur({ fadeStop, blurIntensity, direction, fallbackColor, style, }: Readonly<SliceBackgroundBlurProps>): import("react").JSX.Element;
@@ -0,0 +1,24 @@
1
+ import type { ColorValue, StyleProp, ViewStyle } from 'react-native';
2
+ export interface SliceBackgroundBlurProps {
3
+ /**
4
+ * iOS only: direction from transparent to fully blurred. Defaults to 'down'.
5
+ * down: top to bottom; up: bottom to top;
6
+ * left: right to left; right: left to right.
7
+ */
8
+ direction?: 'down' | 'up' | 'left' | 'right';
9
+ /**
10
+ * iOS only: fraction of the view over which blur fades in (0–1).
11
+ * Defaults to 0, which renders uniform blur without a mask.
12
+ */
13
+ fadeStop?: number;
14
+ /**
15
+ * The intensity of the background blur effect. Defaults to 12
16
+ */
17
+ blurIntensity?: number;
18
+ /**
19
+ * Attach styles to the background view as View Style
20
+ */
21
+ style?: StyleProp<ViewStyle>;
22
+ /** Color used when native blur is unavailable or Reduce Transparency is enabled. */
23
+ fallbackColor?: ColorValue;
24
+ }
@@ -0,0 +1,2 @@
1
+ export { SliceBackgroundBlur } from './SliceBackgroundBlur';
2
+ export type { SliceBackgroundBlurProps } from './_types';
@@ -1,6 +1,7 @@
1
1
  import type { ComponentProps, ReactNode } from 'react';
2
- import type { PressableProps } from 'react-native';
2
+ import type { ColorValue, PressableProps } from 'react-native';
3
3
  import type Reanimated from 'react-native-reanimated';
4
+ import type { BorderRadius, LiquidGlassBackground, Size } from '../../types/sharedTypes';
4
5
  type AnimatedViewProps = ComponentProps<typeof Reanimated.View>;
5
6
  export interface SliceButtonProps extends Omit<PressableProps, 'children' | 'style'> {
6
7
  /**
@@ -32,9 +33,13 @@ export interface SliceButtonProps extends Omit<PressableProps, 'children' | 'sty
32
33
  */
33
34
  animatedStyle?: AnimatedViewProps['style'];
34
35
  /**
35
- * Primary or secondary variant
36
+ * Primary or secondary type button
36
37
  */
37
38
  variant?: 'primary' | 'secondary';
39
+ /**
40
+ * Predefined sizes that can be overriden with a numeric value
41
+ */
42
+ size?: Size;
38
43
  /**
39
44
  * Button transitions and animations
40
45
  */
@@ -42,6 +47,32 @@ export interface SliceButtonProps extends Omit<PressableProps, 'children' | 'sty
42
47
  entering?: AnimatedViewProps['entering'];
43
48
  exiting?: AnimatedViewProps['exiting'];
44
49
  };
50
+ /**
51
+ * Enable layout animation definition for button layout changes
52
+ */
45
53
  layout?: AnimatedViewProps['layout'];
54
+ /**
55
+ * Enable liquid glass background. Will only work on ios26+ with a fallback for
56
+ * non-supported devices
57
+ */
58
+ liquidGlassBackground?: LiquidGlassBackground;
59
+ /**
60
+ * Define a default border radius name or amount
61
+ */
62
+ borderRadius?: BorderRadius;
63
+ /**
64
+ * Border width in points. Negative/non-finite values become 0.
65
+ * Defaults to 0 for primary buttons and 1 for secondary buttons.
66
+ */
67
+ borderWidth?: number;
68
+ /**
69
+ * Border color. Defaults to the theme’s core-outline-secondary color.
70
+ */
71
+ borderColor?: ColorValue;
72
+ /**
73
+ * Solid background override, ignored while supported Liquid Glass is active.
74
+ * Disabled solid buttons use the disabled theme background.
75
+ */
76
+ backgroundColor?: ColorValue;
46
77
  }
47
78
  export {};
@@ -0,0 +1,3 @@
1
+ import type { SliceLiquidGlassViewComponent } from './_types';
2
+ /** Android/web fallback. Metro selects SliceLiquidGlassView.ios on iOS. */
3
+ export declare const SliceLiquidGlassView: SliceLiquidGlassViewComponent;
@@ -0,0 +1,2 @@
1
+ import type { SliceLiquidGlassViewComponent } from './_types';
2
+ export declare const SliceLiquidGlassView: SliceLiquidGlassViewComponent;
@@ -0,0 +1,17 @@
1
+ import type { ComponentRef, ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from 'react';
2
+ import type { ColorValue, View, ViewProps } from 'react-native';
3
+ export type SliceLiquidGlassViewComponent = ForwardRefExoticComponent<PropsWithoutRef<SliceLiquidGlassViewProps> & RefAttributes<ComponentRef<typeof View>>>;
4
+ export interface SliceLiquidGlassViewProps extends ViewProps {
5
+ /** Custom glass child mounting does not support React Native's subview culling. */
6
+ removeClippedSubviews?: false;
7
+ /** Native iOS 26+ material. Defaults to regular. */
8
+ glassStyle?: 'regular' | 'clear';
9
+ /** Tint for the native glass material; does not change content opacity. */
10
+ glassTintColor?: ColorValue;
11
+ /** Enables native glass interaction feedback; use Pressable for actions. */
12
+ interactive?: boolean;
13
+ /** Uniform radius in points. Defaults to 24. Use this instead of style.borderRadius. */
14
+ cornerRadius?: number;
15
+ /** Background used on Android/web. Older iOS uses system blur. */
16
+ fallbackColor?: ColorValue;
17
+ }
@@ -0,0 +1,2 @@
1
+ export { SliceLiquidGlassView } from './SliceLiquidGlassView';
2
+ export type { SliceLiquidGlassViewProps } from './_types';
@@ -1,5 +1,6 @@
1
- import type { TextInputProps } from 'react-native';
1
+ import type { ColorValue, TextInputProps } from 'react-native';
2
2
  import type { BaseAnimationBuilder, LayoutAnimationFunction } from 'react-native-reanimated';
3
+ import type { BorderRadius, Size } from '../../types/sharedTypes';
3
4
  export interface SliceTextInputProps extends TextInputProps {
4
5
  /**
5
6
  * emits directive focus event
@@ -33,4 +34,25 @@ export interface SliceTextInputProps extends TextInputProps {
33
34
  * Expose a way to set focus on input from external events
34
35
  */
35
36
  focused?: boolean;
37
+ /**
38
+ * Element size in terms of height
39
+ */
40
+ size?: Size;
41
+ /**
42
+ * Define a default border radius name or amount
43
+ */
44
+ borderRadius?: BorderRadius;
45
+ /**
46
+ * Border width in points. Negative/non-finite values become 0.
47
+ * Defaults to 1.
48
+ */
49
+ borderWidth?: number;
50
+ /**
51
+ * Border color. Defaults to the theme’s core-outline-secondary color.
52
+ */
53
+ borderColor?: ColorValue;
54
+ /**
55
+ * Optional background color override
56
+ */
57
+ backgroundColor?: ColorValue;
36
58
  }
@@ -6,3 +6,7 @@ export { SliceButton } from './SliceButton';
6
6
  export type { SliceButtonProps } from './SliceButton';
7
7
  export { SliceTextInput } from './SliceTextInput';
8
8
  export type { SliceTextInputProps } from './SliceTextInput';
9
+ export { SliceLiquidGlassView } from './SliceLiquidGlassView';
10
+ export type { SliceLiquidGlassViewProps } from './SliceLiquidGlassView';
11
+ export { SliceBackgroundBlur } from './SliceBackgroundBlur';
12
+ export type { SliceBackgroundBlurProps } from './SliceBackgroundBlur';
@@ -1 +1,3 @@
1
1
  export { useCreateThemedStyles } from './useCreateThemedStyles';
2
+ export { useDeviceCapabilities } from './useDeviceCapabilities';
3
+ export type { DeviceCapabilities } from './useDeviceCapabilities';
@@ -0,0 +1,17 @@
1
+ import type { Platform } from 'react-native';
2
+ export interface DeviceCapabilities {
3
+ /** Current React Native platform, including ios, android, and web. */
4
+ readonly platform: typeof Platform.OS;
5
+ /** Full iOS system version (e.g. '26.1.0'), or null on other platforms. */
6
+ readonly iosVersion: string | null;
7
+ /** Android API level (e.g. 37), or null on other platforms. */
8
+ readonly androidSdkVersion: number | null;
9
+ /** System-provided iOS name or Android model; null when unavailable. */
10
+ readonly deviceName: string | null;
11
+ /** iOS hardware identifier (e.g. 'iPhone17,1') or Android model; null when unavailable. */
12
+ readonly deviceModel: string | null;
13
+ /** Native Liquid Glass API availability (iOS 26+). */
14
+ readonly supportsLiquidGlass: boolean;
15
+ /** Native backdrop blur API availability, rather than content/window blur. */
16
+ readonly supportsNativeBlur: boolean;
17
+ }
@@ -0,0 +1,2 @@
1
+ export { useDeviceCapabilities } from './useDeviceCapabilities';
2
+ export type { DeviceCapabilities } from './_types';
@@ -0,0 +1,3 @@
1
+ import type { DeviceCapabilities } from './_types';
2
+ /** Unsupported-platform fallback. Metro selects the native hook on iOS/Android. */
3
+ export declare function useDeviceCapabilities(): DeviceCapabilities;
@@ -0,0 +1,7 @@
1
+ import type { DeviceCapabilities } from './_types';
2
+ /**
3
+ * Reports native API availability. Both values are false on unsupported platforms
4
+ * or when the package's native module is absent. Accessibility preferences and
5
+ * per-view hardware acceleration can still cause components to use their fallback.
6
+ */
7
+ export declare function useDeviceCapabilities(): DeviceCapabilities;
@@ -0,0 +1,12 @@
1
+ export { SliceIcon, SliceIcons, StyledText, SliceButton, SliceTextInput, SliceLiquidGlassView } from './components';
2
+ export type { IconProps, SliceIconProps, StyledTextProps, SliceButtonProps, SliceTextInputProps, SliceLiquidGlassViewProps, } from './components';
3
+ export { lightTheme, darkTheme, createTypography } from './theme';
4
+ export type { SliceNativeTheme, SliceTheme } from './theme';
5
+ export { SliceThemeProvider, useSliceTheme, useSliceContext } from './providers';
6
+ export type { ThemePreference, ThemeContextValue } from './providers';
7
+ export { useCreateThemedStyles, useDeviceCapabilities } from './hooks';
8
+ export type { DeviceCapabilities } from './hooks';
9
+ export { lineHeightTextStyle, sizeToNumber, borderRadiusToNumber } from './utils';
10
+ export { Size, BorderRadius, LiquidGlassBackground } from './types';
11
+ export { SliceBackgroundBlur } from './components/SliceBackgroundBlur';
12
+ export type { SliceBackgroundBlurProps } from './components/SliceBackgroundBlur';
@@ -0,0 +1,9 @@
1
+ import { type CodegenTypes, type ColorValue, type HostComponent, type ViewProps } from 'react-native';
2
+ export interface NativeProps extends ViewProps {
3
+ blurIntensity?: CodegenTypes.WithDefault<CodegenTypes.Double, 12>;
4
+ fadeStop?: CodegenTypes.WithDefault<CodegenTypes.Double, 0>;
5
+ direction?: CodegenTypes.WithDefault<'down' | 'up' | 'left' | 'right', 'down'>;
6
+ fallbackColor?: ColorValue;
7
+ }
8
+ declare const _default: HostComponent<NativeProps>;
9
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { type CodegenTypes, type ColorValue, type HostComponent, type ViewProps } from 'react-native';
2
+ export interface NativeProps extends ViewProps {
3
+ glassStyle?: CodegenTypes.WithDefault<'regular' | 'clear', 'regular'>;
4
+ glassTintColor?: ColorValue;
5
+ interactive?: CodegenTypes.WithDefault<boolean, false>;
6
+ cornerRadius?: CodegenTypes.WithDefault<CodegenTypes.Double, 24>;
7
+ }
8
+ declare const _default: HostComponent<NativeProps>;
9
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import type { TurboModule } from 'react-native';
2
+ export interface Spec extends TurboModule {
3
+ readonly getConstants: () => {
4
+ supportsLiquidGlass: boolean;
5
+ supportsNativeBlur: boolean;
6
+ deviceName: string;
7
+ deviceModel: string;
8
+ };
9
+ }
10
+ declare const _default: Spec | null | undefined;
11
+ export default _default;
@@ -0,0 +1 @@
1
+ export type { BorderRadius, LiquidGlassBackground, Size } from './sharedTypes';
@@ -0,0 +1,14 @@
1
+ import type { SliceLiquidGlassViewProps } from '../components';
2
+ /**
3
+ * Size type exposed in components
4
+ */
5
+ export type Size = 's' | 'm' | 'l' | number;
6
+ /**
7
+ * Used for props in components that implement an optional liquid glass background
8
+ * Other props of the liquid glass components are inferred by the parent component
9
+ */
10
+ export type LiquidGlassBackground = Omit<SliceLiquidGlassViewProps, 'cornerRadius' | 'removeClippedSubviews' | 'interactive'>;
11
+ /**
12
+ * Border radius exposed for components that apply it
13
+ */
14
+ export type BorderRadius = 'pill' | 'rectangular' | number;
@@ -1 +1,2 @@
1
1
  export { lineHeightTextStyle } from './typography';
2
+ export { sizeToNumber, borderRadiusToNumber } from './sizes';
@@ -0,0 +1 @@
1
+ export { sizeToNumber, borderRadiusToNumber } from './sizes';
@@ -0,0 +1,7 @@
1
+ import type { BorderRadius, Size } from '../../types/sharedTypes';
2
+ /**
3
+ * Internal utility converting size props to an absolute number
4
+ */
5
+ export declare function sizeToNumber(size?: Size): number;
6
+ /** Resolve radius presets; invalid or negative values produce square corners. */
7
+ export declare function borderRadiusToNumber(borderRadius?: BorderRadius): number;