@expokit/cli 0.4.0 → 0.4.1

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 (92) hide show
  1. package/bin/lib.mjs +1 -1
  2. package/package.json +1 -1
  3. package/registry/_docs/accordion.json +1 -1
  4. package/registry/_docs/avatar.json +6 -6
  5. package/registry/_docs/badge.json +3 -3
  6. package/registry/_docs/bottom-nav.json +6 -6
  7. package/registry/_docs/bottom-sheet.json +3 -3
  8. package/registry/_docs/bullet.json +6 -0
  9. package/registry/_docs/button-3d.json +2 -2
  10. package/registry/_docs/button.json +2 -2
  11. package/registry/_docs/calendar.json +5 -5
  12. package/registry/_docs/card.json +1 -1
  13. package/registry/_docs/chip-group.json +1 -1
  14. package/registry/_docs/confetti.json +3 -3
  15. package/registry/_docs/date-picker.json +4 -4
  16. package/registry/_docs/drawer.json +4 -4
  17. package/registry/_docs/flip-card.json +4 -4
  18. package/registry/_docs/floating-input.json +1 -1
  19. package/registry/_docs/grain.json +2 -2
  20. package/registry/_docs/isometric-bar.json +6 -0
  21. package/registry/_docs/liquidglass-tab.json +1 -1
  22. package/registry/_docs/otp-input.json +1 -1
  23. package/registry/_docs/payment-card.json +3 -3
  24. package/registry/_docs/pixel-bar.json +6 -0
  25. package/registry/_docs/polar-area.json +6 -0
  26. package/registry/_docs/progress-steps.json +4 -4
  27. package/registry/_docs/progress.json +2 -2
  28. package/registry/_docs/radio-group.json +1 -1
  29. package/registry/_docs/search-bar.json +3 -3
  30. package/registry/_docs/segmented-control.json +1 -1
  31. package/registry/_docs/select.json +6 -6
  32. package/registry/_docs/skeleton.json +1 -1
  33. package/registry/_docs/slider.json +6 -6
  34. package/registry/_docs/spinner.json +2 -2
  35. package/registry/_docs/stateful-button.json +1 -1
  36. package/registry/_docs/stepper.json +3 -3
  37. package/registry/_docs/tabs.json +2 -2
  38. package/registry/_docs/text-animation.json +4 -4
  39. package/registry/_docs/textarea.json +1 -1
  40. package/registry/_docs/tilt-card.json +3 -3
  41. package/registry/_docs/time-picker.json +6 -6
  42. package/registry/_docs/timeline-chart.json +6 -0
  43. package/registry/_docs/timeline.json +4 -4
  44. package/registry/_docs/treemap.json +6 -0
  45. package/registry/_docs/waterfall.json +6 -0
  46. package/registry/accordion/files/src/components/ui/accordion.tsx +31 -3
  47. package/registry/action-sheet/files/src/components/ui/action-sheet.tsx +4 -1
  48. package/registry/alert/files/src/components/ui/alert.tsx +5 -2
  49. package/registry/alert/files/src/components/ui/button.tsx +32 -4
  50. package/registry/badge/files/src/components/ui/badge.tsx +2 -2
  51. package/registry/bottom-nav/files/src/components/ui/bottom-nav.tsx +11 -5
  52. package/registry/button/files/src/components/ui/button.tsx +32 -4
  53. package/registry/button-3d/files/src/components/ui/button-3d.tsx +33 -6
  54. package/registry/calendar/files/src/components/ui/calendar.tsx +62 -17
  55. package/registry/card/files/src/components/ui/card.tsx +25 -5
  56. package/registry/checkbox/files/src/components/ui/checkbox.tsx +26 -4
  57. package/registry/chip-group/files/src/components/ui/chip-group.tsx +35 -5
  58. package/registry/coupon/files/src/components/ui/coupon.tsx +45 -21
  59. package/registry/coupon/files/src/components/ui/flip-card.tsx +22 -3
  60. package/registry/coupon/files/src/components/ui/tilt-card.tsx +57 -16
  61. package/registry/date-picker/files/src/components/ui/calendar.tsx +62 -17
  62. package/registry/date-picker/files/src/components/ui/date-picker.tsx +96 -42
  63. package/registry/dialog/files/src/components/ui/dialog.tsx +9 -5
  64. package/registry/drawer/files/src/components/ui/drawer.tsx +8 -4
  65. package/registry/flip-card/files/src/components/ui/flip-card.tsx +22 -3
  66. package/registry/floating-input/files/src/components/ui/floating-input.tsx +75 -26
  67. package/registry/liquidglass-tab/files/src/components/GlassTabBar.tsx +1 -1
  68. package/registry/list-item/files/src/components/ui/list-item.tsx +10 -3
  69. package/registry/otp-input/files/src/components/ui/otp-input.tsx +50 -19
  70. package/registry/password-input/files/src/components/ui/floating-input.tsx +75 -26
  71. package/registry/password-input/files/src/components/ui/password-input.tsx +53 -19
  72. package/registry/payment-card/files/src/components/ui/flip-card.tsx +22 -3
  73. package/registry/payment-card/files/src/components/ui/payment-card.tsx +19 -15
  74. package/registry/payment-card/files/src/components/ui/tilt-card.tsx +57 -16
  75. package/registry/progress/files/src/components/ui/progress.tsx +9 -2
  76. package/registry/progress-steps/files/src/components/ui/progress-steps.tsx +11 -4
  77. package/registry/radio-group/files/src/components/ui/radio-group.tsx +39 -9
  78. package/registry/search-bar/files/src/components/ui/search-bar.tsx +70 -17
  79. package/registry/segmented-control/files/src/components/ui/segmented-control.tsx +37 -9
  80. package/registry/select/files/src/components/ui/select.tsx +158 -83
  81. package/registry/slider/files/src/components/ui/slider.tsx +53 -25
  82. package/registry/stateful-button/files/src/components/ui/stateful-button.tsx +12 -4
  83. package/registry/stepper/files/src/components/ui/stepper.tsx +76 -26
  84. package/registry/switch/files/src/components/ui/switch.tsx +56 -19
  85. package/registry/tabs/files/src/components/ui/tabs.tsx +7 -4
  86. package/registry/text-animation/files/src/components/ui/text-animation.tsx +7 -2
  87. package/registry/textarea/files/src/components/ui/textarea.tsx +104 -36
  88. package/registry/tilt-card/files/src/components/ui/tilt-card.tsx +57 -16
  89. package/registry/time-picker/files/src/components/ui/time-picker.tsx +154 -73
  90. package/registry/timeline/files/src/components/ui/timeline.tsx +9 -4
  91. package/registry/toast/files/src/components/ui/button.tsx +32 -4
  92. package/registry/toast/files/src/components/ui/toast.tsx +15 -6
@@ -1,6 +1,7 @@
1
1
  import * as Haptics from 'expo-haptics';
2
- import React, { useId, useRef } from 'react';
2
+ import React, { useEffect, useId, useRef, useState } from 'react';
3
3
  import {
4
+ AccessibilityInfo,
4
5
  ActivityIndicator,
5
6
  Animated,
6
7
  Pressable,
@@ -55,6 +56,10 @@ export interface ButtonProps extends Omit<PressableProps, 'style' | 'children'>
55
56
  textStyle?: StyleProp<TextStyle>;
56
57
  }
57
58
 
59
+ // Controls stop growing at iOS's largest standard text size (xxxL ≈ 1.35×) so they keep their shape;
60
+ // content text scales all the way.
61
+ const FONT_CAP = 1.35;
62
+
58
63
  const SIZES: Record<ButtonSize, { h: number; px: number; font: number; gap: number }> = {
59
64
  sm: { h: 36, px: 14, font: 14, gap: 6 },
60
65
  md: { h: 46, px: 18, font: 15.5, gap: 8 },
@@ -119,6 +124,7 @@ export function Button({
119
124
  const { colors, radius, dark, font } = useKit();
120
125
  const ff = font.family ? { fontFamily: font.family } : null;
121
126
  const gid = 'btn' + useId().replace(/[^a-zA-Z0-9]/g, '');
127
+ const reduce = useReduceMotion();
122
128
  const scale = useRef(new Animated.Value(1)).current;
123
129
  const isDisabled = disabled || loading;
124
130
  const tint = color ?? colors.accent;
@@ -145,11 +151,16 @@ export function Button({
145
151
  const solid = bg !== 'transparent';
146
152
  const quiet = variant === 'ghost' || variant === 'outline' || variant === 'link';
147
153
 
148
- const spring = (to: number) => Animated.spring(scale, { toValue: to, useNativeDriver: true, ...motion.bouncy }).start();
154
+ // Reduce Motion: no squish; the pressed wash / opacity still marks the press.
155
+ const spring = (to: number) => {
156
+ if (reduce) return scale.setValue(1);
157
+ Animated.spring(scale, { toValue: to, useNativeDriver: true, ...motion.bouncy }).start();
158
+ };
149
159
 
150
160
  const label = isTextNode(children) ? (
151
161
  <Text
152
162
  numberOfLines={1}
163
+ maxFontSizeMultiplier={FONT_CAP}
153
164
  style={[styles.label, ff, { color: fg, fontSize: s.font }, variant === 'link' && styles.link, textStyle]}
154
165
  >
155
166
  {children}
@@ -185,7 +196,8 @@ export function Button({
185
196
  style={({ pressed }) => [
186
197
  styles.base,
187
198
  {
188
- height: s.h,
199
+ minHeight: s.h,
200
+ height: size === 'icon' ? s.h : undefined,
189
201
  width: size === 'icon' ? s.h : undefined,
190
202
  paddingHorizontal: variant === 'link' ? 0 : s.px,
191
203
  gap: s.gap,
@@ -236,7 +248,7 @@ export function Button({
236
248
  <View style={styles.row}>
237
249
  <ActivityIndicator size="small" color={fg} />
238
250
  {size !== 'icon' && isTextNode(children) ? (
239
- <Text style={[styles.label, ff, { color: fg, fontSize: s.font, opacity: 0.85 }]}>{children}</Text>
251
+ <Text maxFontSizeMultiplier={FONT_CAP} style={[styles.label, ff, { color: fg, fontSize: s.font, opacity: 0.85 }]}>{children}</Text>
240
252
  ) : null}
241
253
  </View>
242
254
  ) : (
@@ -253,6 +265,22 @@ export function Button({
253
265
  );
254
266
  }
255
267
 
268
+ function useReduceMotion() {
269
+ const [reduce, setReduce] = useState(false);
270
+ useEffect(() => {
271
+ let alive = true;
272
+ AccessibilityInfo.isReduceMotionEnabled()
273
+ .then((r) => alive && setReduce(r))
274
+ .catch(() => {});
275
+ const sub = AccessibilityInfo.addEventListener('reduceMotionChanged', setReduce);
276
+ return () => {
277
+ alive = false;
278
+ sub.remove();
279
+ };
280
+ }, []);
281
+ return reduce;
282
+ }
283
+
256
284
  const styles = StyleSheet.create({
257
285
  base: { flexDirection: 'row', alignItems: 'center', justifyContent: 'center' },
258
286
  row: { flexDirection: 'row', alignItems: 'center', gap: 8 },
@@ -271,6 +271,9 @@ export interface ToasterProps {
271
271
 
272
272
  const PEEK = 12;
273
273
  const GUESS_HEIGHT = 64;
274
+ // Controls stop growing at iOS's largest standard text size (xxxL ≈ 1.35×) so they keep their shape;
275
+ // content text scales all the way.
276
+ const FONT_CAP = 1.35;
274
277
 
275
278
  /**
276
279
  * Hosts the toasts. It fills its parent absolutely (touches pass through), so drop it at the
@@ -595,7 +598,9 @@ function ToastItem({
595
598
  { borderRadius: radius.capsule(32), backgroundColor: look.actionBg, opacity: pressed ? 0.7 : 1 },
596
599
  ]}
597
600
  >
598
- <Text style={[styles.actionText, ff, { color: look.actionFg }]}>{data.action.label}</Text>
601
+ <Text maxFontSizeMultiplier={FONT_CAP} style={[styles.actionText, ff, { color: look.actionFg }]}>
602
+ {data.action.label}
603
+ </Text>
599
604
  </Pressable>
600
605
  ) : null}
601
606
  {closeButton ? (
@@ -906,7 +911,9 @@ function IslandToaster({ store, toasts, duration, offset, haptics, reduceMotion,
906
911
  </View>
907
912
  {!expanded && shown.action ? (
908
913
  <View style={[styles.islandChip, { borderRadius: radius.capsule(24), backgroundColor: alpha(fg, 0.14) }]}>
909
- <Text style={[styles.islandChipText, ff, { color: fg }]}>{shown.action.label}</Text>
914
+ <Text maxFontSizeMultiplier={FONT_CAP} style={[styles.islandChipText, ff, { color: fg }]}>
915
+ {shown.action.label}
916
+ </Text>
910
917
  </View>
911
918
  ) : null}
912
919
  </Pressable>
@@ -923,7 +930,9 @@ function IslandToaster({ store, toasts, duration, offset, haptics, reduceMotion,
923
930
  { borderRadius: radius.capsule(44), backgroundColor: alpha(fg, pressed ? 0.24 : 0.16) },
924
931
  ]}
925
932
  >
926
- <Text style={[styles.title, ff, { color: fg }]}>{shown.action.label}</Text>
933
+ <Text maxFontSizeMultiplier={FONT_CAP} style={[styles.title, ff, { color: fg }]}>
934
+ {shown.action.label}
935
+ </Text>
927
936
  </Pressable>
928
937
  </View>
929
938
  ) : null}
@@ -1267,7 +1276,7 @@ const styles = StyleSheet.create({
1267
1276
  title: { fontSize: 14.5, fontWeight: '400', lineHeight: 20, letterSpacing: -0.1 },
1268
1277
  desc: { fontSize: 13.5, fontWeight: '400', lineHeight: 19 },
1269
1278
  descMinimal: { fontSize: 13, lineHeight: 17 },
1270
- action: { paddingHorizontal: 12, height: 32, alignItems: 'center', justifyContent: 'center' },
1279
+ action: { paddingHorizontal: 12, minHeight: 32, alignItems: 'center', justifyContent: 'center' },
1271
1280
  actionText: { fontSize: 13, fontWeight: '400' },
1272
1281
  close: { alignSelf: 'flex-start', padding: 2, marginRight: -4 },
1273
1282
  bar: { position: 'absolute', left: 0, right: 0, bottom: 0, height: 2, transformOrigin: 'left' },
@@ -1277,10 +1286,10 @@ const styles = StyleSheet.create({
1277
1286
  islandPlace: { position: 'absolute', top: 0 },
1278
1287
  islandPad: { paddingVertical: 14, paddingHorizontal: 20 },
1279
1288
  islandPadIcon: { paddingTop: 13, paddingBottom: 15, paddingLeft: 14, paddingRight: 18 },
1280
- islandChip: { paddingHorizontal: 10, height: 24, justifyContent: 'center' },
1289
+ islandChip: { paddingHorizontal: 10, minHeight: 24, justifyContent: 'center' },
1281
1290
  islandChipText: { fontSize: 12.5, fontWeight: '400' },
1282
1291
  islandActions: { paddingHorizontal: 14, paddingBottom: 16, marginTop: -2 },
1283
- islandAction: { height: 44, alignItems: 'center', justifyContent: 'center' },
1292
+ islandAction: { minHeight: 44, alignItems: 'center', justifyContent: 'center' },
1284
1293
  islandTrack: { position: 'absolute', left: 28, right: 28, bottom: 6, height: 2, borderRadius: 1, overflow: 'hidden' },
1285
1294
  islandFill: { flex: 1, transformOrigin: 'left' },
1286
1295
  });