glacia-native 0.5.1 → 0.6.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 (403) hide show
  1. package/LICENSE +29 -4
  2. package/README.md +111 -17
  3. package/lib/module/Accordion.js +58 -0
  4. package/lib/module/ActionSheet.js +38 -0
  5. package/lib/module/Alert.js +23 -0
  6. package/lib/module/AlertDialog.js +47 -0
  7. package/lib/module/Avatar.js +48 -0
  8. package/lib/module/Badge.js +36 -0
  9. package/lib/module/Bars.js +13 -267
  10. package/lib/module/Button.js +57 -36
  11. package/lib/module/Card.js +32 -20
  12. package/lib/module/Checkbox.js +42 -0
  13. package/lib/module/Chip.js +80 -0
  14. package/lib/module/Collapsible.js +26 -0
  15. package/lib/module/ContextMenu.js +33 -0
  16. package/lib/module/Dialog.js +39 -124
  17. package/lib/module/DropdownMenu.js +33 -0
  18. package/lib/module/Field.js +22 -0
  19. package/lib/module/Glass.js +12 -5
  20. package/lib/module/Group.js +36 -0
  21. package/lib/module/IconButton.js +40 -0
  22. package/lib/module/Input.js +47 -40
  23. package/lib/module/Label.js +17 -0
  24. package/lib/module/MorphGroup.js +47 -0
  25. package/lib/module/Popover.js +29 -0
  26. package/lib/module/Progress.js +32 -0
  27. package/lib/module/RadioGroup.js +51 -0
  28. package/lib/module/Scrim.js +44 -0
  29. package/lib/module/SegmentedControl.js +74 -58
  30. package/lib/module/Select.js +51 -0
  31. package/lib/module/Separator.js +25 -0
  32. package/lib/module/Sheet.js +51 -0
  33. package/lib/module/Skeleton.js +48 -0
  34. package/lib/module/Slider.js +60 -40
  35. package/lib/module/Stepper.js +167 -0
  36. package/lib/module/Switch.js +45 -43
  37. package/lib/module/TabBar.js +62 -50
  38. package/lib/module/Tabs.js +3 -2
  39. package/lib/module/Textarea.js +18 -0
  40. package/lib/module/Toast.js +55 -0
  41. package/lib/module/Toggle.js +47 -0
  42. package/lib/module/ToggleGroup.js +56 -0
  43. package/lib/module/Toolbar.js +37 -0
  44. package/lib/module/Tooltip.js +31 -0
  45. package/lib/module/glass-provider.js +28 -0
  46. package/lib/module/glass-stack.js +61 -0
  47. package/lib/module/index.js +78 -109
  48. package/lib/module/internal/GlassBackdrop.js +36 -0
  49. package/lib/module/internal/GlassView.js +45 -13
  50. package/lib/module/internal/blur-community.js +20 -0
  51. package/lib/module/internal/blur-community.web.js +9 -0
  52. package/lib/module/internal/blur.js +75 -0
  53. package/lib/module/internal/fallback.js +110 -20
  54. package/lib/module/internal/glass-routing.js +154 -30
  55. package/lib/module/internal/glow.js +36 -0
  56. package/lib/module/internal/initials.js +12 -0
  57. package/lib/module/internal/lens.js +70 -0
  58. package/lib/module/internal/material.js +64 -0
  59. package/lib/module/internal/overlay.js +147 -0
  60. package/lib/module/internal/primitives.js +17 -0
  61. package/lib/module/internal/rim.js +35 -0
  62. package/lib/module/internal/tokens.js +34 -2
  63. package/lib/typescript/Accordion.d.ts +22 -0
  64. package/lib/typescript/ActionSheet.d.ts +24 -0
  65. package/lib/typescript/Alert.d.ts +15 -0
  66. package/lib/typescript/AlertDialog.d.ts +17 -0
  67. package/lib/typescript/Avatar.d.ts +22 -0
  68. package/lib/typescript/Badge.d.ts +12 -0
  69. package/lib/typescript/Bars.d.ts +3 -188
  70. package/lib/typescript/Button.d.ts +44 -10
  71. package/lib/typescript/Card.d.ts +30 -3
  72. package/lib/typescript/Checkbox.d.ts +14 -0
  73. package/lib/typescript/Chip.d.ts +19 -0
  74. package/lib/typescript/Collapsible.d.ts +17 -0
  75. package/lib/typescript/ContextMenu.d.ts +23 -0
  76. package/lib/typescript/Dialog.d.ts +8 -68
  77. package/lib/typescript/DropdownMenu.d.ts +23 -0
  78. package/lib/typescript/Field.d.ts +19 -0
  79. package/lib/typescript/Glass.d.ts +11 -2
  80. package/lib/typescript/Group.d.ts +35 -0
  81. package/lib/typescript/IconButton.d.ts +21 -0
  82. package/lib/typescript/Input.d.ts +17 -18
  83. package/lib/typescript/Label.d.ts +14 -0
  84. package/lib/typescript/MorphGroup.d.ts +46 -0
  85. package/lib/typescript/Popover.d.ts +17 -0
  86. package/lib/typescript/Progress.d.ts +13 -0
  87. package/lib/typescript/RadioGroup.d.ts +21 -0
  88. package/lib/typescript/Scrim.d.ts +33 -0
  89. package/lib/typescript/SegmentedControl.d.ts +24 -13
  90. package/lib/typescript/Select.d.ts +19 -0
  91. package/lib/typescript/Separator.d.ts +10 -0
  92. package/lib/typescript/Sheet.d.ts +45 -0
  93. package/lib/typescript/Skeleton.d.ts +10 -0
  94. package/lib/typescript/Slider.d.ts +15 -7
  95. package/lib/typescript/Stepper.d.ts +49 -0
  96. package/lib/typescript/Switch.d.ts +19 -12
  97. package/lib/typescript/TabBar.d.ts +18 -6
  98. package/lib/typescript/Textarea.d.ts +6 -0
  99. package/lib/typescript/Toast.d.ts +40 -0
  100. package/lib/typescript/Toggle.d.ts +21 -0
  101. package/lib/typescript/ToggleGroup.d.ts +22 -0
  102. package/lib/typescript/Toolbar.d.ts +35 -0
  103. package/lib/typescript/Tooltip.d.ts +16 -0
  104. package/lib/typescript/glass-provider.d.ts +34 -0
  105. package/lib/typescript/glass-stack.d.ts +54 -0
  106. package/lib/typescript/index.d.ts +39 -17
  107. package/lib/typescript/internal/GlassBackdrop.d.ts +33 -0
  108. package/lib/typescript/internal/GlassView.d.ts +31 -2
  109. package/lib/typescript/internal/blur-community.d.ts +2 -0
  110. package/lib/typescript/internal/blur-community.web.d.ts +2 -0
  111. package/lib/typescript/internal/blur.d.ts +24 -0
  112. package/lib/typescript/internal/fallback.d.ts +27 -2
  113. package/lib/typescript/internal/glass-routing.d.ts +83 -15
  114. package/lib/typescript/internal/glow.d.ts +11 -0
  115. package/lib/typescript/internal/initials.d.ts +2 -0
  116. package/lib/typescript/internal/lens.d.ts +47 -0
  117. package/lib/typescript/internal/material.d.ts +27 -0
  118. package/lib/typescript/internal/overlay.d.ts +74 -0
  119. package/lib/typescript/internal/primitives.d.ts +13 -0
  120. package/lib/typescript/internal/rim.d.ts +16 -0
  121. package/lib/typescript/internal/tokens.d.ts +36 -0
  122. package/package.json +15 -4
  123. package/src/Accordion.tsx +165 -0
  124. package/src/ActionSheet.tsx +149 -0
  125. package/src/Alert.tsx +85 -0
  126. package/src/AlertDialog.tsx +124 -0
  127. package/src/Avatar.tsx +102 -0
  128. package/src/Badge.tsx +80 -0
  129. package/src/Bars.tsx +10 -797
  130. package/src/Button.tsx +196 -60
  131. package/src/Card.tsx +106 -33
  132. package/src/Checkbox.tsx +98 -0
  133. package/src/Chip.tsx +149 -0
  134. package/src/Collapsible.tsx +66 -0
  135. package/src/ContextMenu.tsx +103 -0
  136. package/src/Dialog.tsx +86 -325
  137. package/src/DropdownMenu.tsx +103 -0
  138. package/src/Field.tsx +65 -0
  139. package/src/Glass.tsx +19 -5
  140. package/src/Group.tsx +98 -0
  141. package/src/IconButton.tsx +110 -0
  142. package/src/Input.tsx +143 -87
  143. package/src/Label.tsx +56 -0
  144. package/src/MorphGroup.tsx +134 -0
  145. package/src/Popover.tsx +81 -0
  146. package/src/Progress.tsx +83 -0
  147. package/src/RadioGroup.tsx +122 -0
  148. package/src/Scrim.tsx +94 -0
  149. package/src/SegmentedControl.tsx +147 -90
  150. package/src/Select.tsx +136 -0
  151. package/src/Separator.tsx +52 -0
  152. package/src/Sheet.tsx +139 -0
  153. package/src/Skeleton.tsx +77 -0
  154. package/src/Slider.tsx +100 -54
  155. package/src/Stepper.tsx +315 -0
  156. package/src/Switch.tsx +80 -58
  157. package/src/TabBar.tsx +118 -84
  158. package/src/Tabs.tsx +5 -0
  159. package/src/Textarea.tsx +34 -0
  160. package/src/Toast.tsx +131 -0
  161. package/src/Toggle.tsx +113 -0
  162. package/src/ToggleGroup.tsx +129 -0
  163. package/src/Toolbar.tsx +111 -0
  164. package/src/Tooltip.tsx +79 -0
  165. package/src/engine/CHANGELOG.md +430 -0
  166. package/src/engine/NOTICE +54 -0
  167. package/src/engine/README.md +975 -0
  168. package/src/engine/android/build.gradle +18 -0
  169. package/src/engine/android/src/main/AndroidManifest.xml +2 -0
  170. package/src/engine/android/src/main/java/expo/modules/liquidglass/ExpoLiquidGlassModule.kt +174 -0
  171. package/src/engine/android/src/main/java/expo/modules/liquidglass/GlassConstants.kt +7 -0
  172. package/src/engine/android/src/main/java/expo/modules/liquidglass/LiquidGlassContainerView.kt +16 -0
  173. package/src/engine/android/src/main/java/expo/modules/liquidglass/LiquidGlassProviderView.kt +165 -0
  174. package/src/engine/android/src/main/java/expo/modules/liquidglass/LiquidGlassView.kt +1731 -0
  175. package/src/engine/android/src/main/java/expo/modules/liquidglass/enums/GlassEnums.kt +171 -0
  176. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/BackdropGraph.kt +146 -0
  177. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/BackdropSource.kt +53 -0
  178. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/ContinuousCorners.kt +188 -0
  179. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/CornerRadii.kt +62 -0
  180. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassAppearance.kt +352 -0
  181. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassDebug.kt +109 -0
  182. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassEnvironment.kt +139 -0
  183. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassHdr.kt +85 -0
  184. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassLuminanceProbe.kt +189 -0
  185. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassPressAnimator.kt +264 -0
  186. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassProgressiveBlur.kt +249 -0
  187. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassShaderCache.kt +256 -0
  188. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassShaderSource.kt +845 -0
  189. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassTier.kt +63 -0
  190. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/ProviderRegistry.kt +71 -0
  191. package/src/engine/android/src/main/java/expo/modules/liquidglass/records/GlassRecords.kt +288 -0
  192. package/src/engine/index.ts +24 -0
  193. package/src/engine/ios/Enums/GlassBlurDirection.swift +21 -0
  194. package/src/engine/ios/Enums/GlassVariant.swift +86 -0
  195. package/src/engine/ios/ExpoLiquidGlass.podspec +93 -0
  196. package/src/engine/ios/ExpoLiquidGlassModule.swift +77 -0
  197. package/src/engine/ios/Glass/BackdropCapturer.swift +811 -0
  198. package/src/engine/ios/Glass/ContinuousCorners.swift +165 -0
  199. package/src/engine/ios/Glass/GlassBackdrop.swift +176 -0
  200. package/src/engine/ios/Glass/GlassFramePhase.swift +126 -0
  201. package/src/engine/ios/Glass/GlassFrameScheduler.swift +261 -0
  202. package/src/engine/ios/Glass/GlassPressAnimator.swift +250 -0
  203. package/src/engine/ios/Glass/GlassRenderContext.swift +168 -0
  204. package/src/engine/ios/Glass/GlassRenderer.swift +186 -0
  205. package/src/engine/ios/Glass/GlassSurfaceView.swift +452 -0
  206. package/src/engine/ios/Glass/NonRenderableView.swift +54 -0
  207. package/src/engine/ios/Glass/StripCache.swift +545 -0
  208. package/src/engine/ios/Records/GlassCornerRadii.swift +79 -0
  209. package/src/engine/ios/Records/GlassMetalOptions.swift +180 -0
  210. package/src/engine/ios/Records/GlassRefractionCurve.swift +14 -0
  211. package/src/engine/ios/Shaders/LiquidGlass.metal +480 -0
  212. package/src/engine/ios/Shaders/bundle-marker.txt +6 -0
  213. package/src/engine/ios/Views/LiquidGlassContainerView.swift +99 -0
  214. package/src/engine/ios/Views/LiquidGlassView.swift +859 -0
  215. package/src/engine/package.json +70 -0
  216. package/src/engine/src/components/LiquidGlassButton/LiquidGlassButton.tsx +424 -0
  217. package/src/engine/src/components/LiquidGlassCard/LiquidGlassCard.tsx +98 -0
  218. package/src/engine/src/components/LiquidGlassChip/LiquidGlassChip.tsx +65 -0
  219. package/src/engine/src/components/LiquidGlassGroup/LiquidGlassGroup.tsx +350 -0
  220. package/src/engine/src/components/LiquidGlassIconButton/LiquidGlassIconButton.tsx +24 -0
  221. package/src/engine/src/components/LiquidGlassMorphGroup/LiquidGlassMorphGroup.tsx +434 -0
  222. package/src/engine/src/components/LiquidGlassScrim/LiquidGlassScrim.tsx +100 -0
  223. package/src/engine/src/components/LiquidGlassSegmentedControl/LiquidGlassSegmentedControl.tsx +213 -0
  224. package/src/engine/src/components/LiquidGlassSheet/LiquidGlassSheet.tsx +218 -0
  225. package/src/engine/src/components/LiquidGlassSlider/LiquidGlassSlider.tsx +327 -0
  226. package/src/engine/src/components/LiquidGlassStepper/LiquidGlassStepper.tsx +321 -0
  227. package/src/engine/src/components/LiquidGlassSwitch/LiquidGlassSwitch.tsx +296 -0
  228. package/src/engine/src/components/LiquidGlassTabBar/LiquidGlassTabBar.tsx +952 -0
  229. package/src/engine/src/components/LiquidGlassTextInput/LiquidGlassTextInput.tsx +151 -0
  230. package/src/engine/src/components/LiquidGlassToast/LiquidGlassToast.tsx +169 -0
  231. package/src/engine/src/components/LiquidGlassToolbar/LiquidGlassToolbar.tsx +124 -0
  232. package/src/engine/src/components/index.ts +16 -0
  233. package/src/engine/src/constants/index.ts +4 -0
  234. package/src/engine/src/constants/metal.constants.ts +327 -0
  235. package/src/engine/src/constants/metrics.constants.ts +325 -0
  236. package/src/engine/src/constants/springs.constants.ts +107 -0
  237. package/src/engine/src/constants/styles.constants.ts +12 -0
  238. package/src/engine/src/context/glass-group.context.ts +65 -0
  239. package/src/engine/src/context/index.ts +6 -0
  240. package/src/engine/src/core/components/LiquidGlassContainer/LiquidGlassContainer.tsx +32 -0
  241. package/src/engine/src/core/components/LiquidGlassContainer/index.ts +1 -0
  242. package/src/engine/src/core/components/LiquidGlassProvider/LiquidGlassProvider.tsx +66 -0
  243. package/src/engine/src/core/components/LiquidGlassProvider/index.ts +1 -0
  244. package/src/engine/src/core/components/LiquidGlassStack/LiquidGlassStack.tsx +184 -0
  245. package/src/engine/src/core/components/LiquidGlassStack/index.ts +1 -0
  246. package/src/engine/src/core/components/LiquidGlassView/LiquidGlassView.tsx +126 -0
  247. package/src/engine/src/core/components/LiquidGlassView/index.ts +1 -0
  248. package/src/engine/src/core/components/index.ts +4 -0
  249. package/src/engine/src/core/constants/glass.constants.ts +57 -0
  250. package/src/engine/src/core/constants/index.ts +20 -0
  251. package/src/engine/src/core/constants/native.constants.ts +16 -0
  252. package/src/engine/src/core/context/glass-stack.context.ts +30 -0
  253. package/src/engine/src/core/context/index.ts +4 -0
  254. package/src/engine/src/core/enum/index.ts +12 -0
  255. package/src/engine/src/core/index.ts +1 -0
  256. package/src/engine/src/core/interfaces/glass-hdr.interface.ts +15 -0
  257. package/src/engine/src/core/interfaces/glass-metal.interface.ts +248 -0
  258. package/src/engine/src/core/interfaces/glass-surface.interface.ts +9 -0
  259. package/src/engine/src/core/interfaces/index.ts +31 -0
  260. package/src/engine/src/core/interfaces/liquid-glass-container.interface.ts +6 -0
  261. package/src/engine/src/core/interfaces/liquid-glass-provider.interface.ts +14 -0
  262. package/src/engine/src/core/interfaces/liquid-glass-stack.interface.ts +21 -0
  263. package/src/engine/src/core/interfaces/liquid-glass-view.interface.ts +129 -0
  264. package/src/engine/src/core/interfaces/native-liquid-glass-view.interface.ts +19 -0
  265. package/src/engine/src/core/modules/ExpoLiquidGlassModule.ts +26 -0
  266. package/src/engine/src/core/modules/index.ts +2 -0
  267. package/src/engine/src/core/root/index.ts +51 -0
  268. package/src/engine/src/core/types/glass.types.ts +25 -0
  269. package/src/engine/src/core/types/index.ts +8 -0
  270. package/src/engine/src/core/utils/debug.utils.ts +17 -0
  271. package/src/engine/src/core/utils/dev-warn.utils.ts +17 -0
  272. package/src/engine/src/core/utils/hdr.utils.ts +37 -0
  273. package/src/engine/src/core/utils/index.ts +5 -0
  274. package/src/engine/src/core/utils/native-view.utils.ts +33 -0
  275. package/src/engine/src/core/utils/platform.utils.ts +34 -0
  276. package/src/engine/src/core/views/NativeGlassBackdropView.ts +24 -0
  277. package/src/engine/src/core/views/NativeLiquidGlassContainerView.ts +13 -0
  278. package/src/engine/src/core/views/NativeLiquidGlassContainerView.web.ts +10 -0
  279. package/src/engine/src/core/views/NativeLiquidGlassProviderView.ts +13 -0
  280. package/src/engine/src/core/views/NativeLiquidGlassProviderView.web.ts +10 -0
  281. package/src/engine/src/core/views/NativeLiquidGlassView.ts +19 -0
  282. package/src/engine/src/core/views/NativeLiquidGlassView.web.ts +14 -0
  283. package/src/engine/src/core/views/index.ts +4 -0
  284. package/src/engine/src/hooks/index.ts +18 -0
  285. package/src/engine/src/hooks/use-adaptive-glass.ts +91 -0
  286. package/src/engine/src/hooks/use-damped-drag.ts +332 -0
  287. package/src/engine/src/hooks/use-echo-filter.ts +55 -0
  288. package/src/engine/src/hooks/use-glass-group-member.ts +169 -0
  289. package/src/engine/src/hooks/use-gravity-highlight.ts +79 -0
  290. package/src/engine/src/hooks/use-press-progress.ts +44 -0
  291. package/src/engine/src/index.ts +120 -0
  292. package/src/engine/src/interfaces/index.ts +28 -0
  293. package/src/engine/src/interfaces/liquid-glass-button.interface.ts +94 -0
  294. package/src/engine/src/interfaces/liquid-glass-card.interface.ts +40 -0
  295. package/src/engine/src/interfaces/liquid-glass-chip.interface.ts +29 -0
  296. package/src/engine/src/interfaces/liquid-glass-group.interface.ts +32 -0
  297. package/src/engine/src/interfaces/liquid-glass-icon-button.interface.ts +19 -0
  298. package/src/engine/src/interfaces/liquid-glass-morph-group.interface.ts +59 -0
  299. package/src/engine/src/interfaces/liquid-glass-scrim.interface.ts +36 -0
  300. package/src/engine/src/interfaces/liquid-glass-segmented-control.interface.ts +32 -0
  301. package/src/engine/src/interfaces/liquid-glass-sheet.interface.ts +38 -0
  302. package/src/engine/src/interfaces/liquid-glass-slider.interface.ts +37 -0
  303. package/src/engine/src/interfaces/liquid-glass-stepper.interface.ts +35 -0
  304. package/src/engine/src/interfaces/liquid-glass-switch.interface.ts +27 -0
  305. package/src/engine/src/interfaces/liquid-glass-tab-bar.interface.ts +116 -0
  306. package/src/engine/src/interfaces/liquid-glass-text-input.interface.ts +42 -0
  307. package/src/engine/src/interfaces/liquid-glass-toast.interface.ts +36 -0
  308. package/src/engine/src/interfaces/liquid-glass-toolbar.interface.ts +33 -0
  309. package/src/engine/src/theme/glass-ui-theme.ts +100 -0
  310. package/src/engine/src/theme/index.ts +2 -0
  311. package/src/engine/src/utils/button-press.utils.ts +63 -0
  312. package/src/engine/src/utils/index.ts +3 -0
  313. package/src/engine/src/utils/metal.utils.ts +164 -0
  314. package/src/glass-provider.tsx +60 -0
  315. package/src/glass-stack.tsx +115 -0
  316. package/src/index.ts +48 -190
  317. package/src/internal/GlassBackdrop.tsx +60 -0
  318. package/src/internal/GlassView.tsx +70 -18
  319. package/src/internal/blur-community.ts +19 -0
  320. package/src/internal/blur-community.web.ts +7 -0
  321. package/src/internal/blur.ts +89 -0
  322. package/src/internal/fallback.tsx +158 -20
  323. package/src/internal/glass-routing.ts +211 -34
  324. package/src/internal/glow.tsx +62 -0
  325. package/src/internal/initials.ts +7 -0
  326. package/src/internal/lens.tsx +105 -0
  327. package/src/internal/material.ts +92 -0
  328. package/src/internal/overlay.tsx +258 -0
  329. package/src/internal/primitives.ts +26 -0
  330. package/src/internal/rim.tsx +79 -0
  331. package/src/internal/tokens.ts +34 -1
  332. package/lib/module/Carousel.js +0 -103
  333. package/lib/module/Display.js +0 -317
  334. package/lib/module/Feedback.js +0 -386
  335. package/lib/module/Form.js +0 -164
  336. package/lib/module/Forms2.js +0 -454
  337. package/lib/module/Message.js +0 -88
  338. package/lib/module/Overlays.js +0 -328
  339. package/lib/module/Pickers.js +0 -243
  340. package/lib/module/Table.js +0 -99
  341. package/lib/module/ai.js +0 -280
  342. package/lib/module/charts/AreaChart.js +0 -32
  343. package/lib/module/charts/BarChart.js +0 -67
  344. package/lib/module/charts/FunnelChart.js +0 -50
  345. package/lib/module/charts/HeatmapChart.js +0 -71
  346. package/lib/module/charts/LineChart.js +0 -81
  347. package/lib/module/charts/PlotChart.js +0 -52
  348. package/lib/module/charts/RadarChart.js +0 -78
  349. package/lib/module/charts/RingChart.js +0 -52
  350. package/lib/module/charts/ScatterChart.js +0 -95
  351. package/lib/module/charts/WaterfallChart.js +0 -85
  352. package/lib/module/charts/advanced.js +0 -313
  353. package/lib/module/charts/extra.js +0 -108
  354. package/lib/module/charts/index.js +0 -50
  355. package/lib/module/charts/scales.js +0 -140
  356. package/lib/typescript/Carousel.d.ts +0 -47
  357. package/lib/typescript/Display.d.ts +0 -178
  358. package/lib/typescript/Feedback.d.ts +0 -196
  359. package/lib/typescript/Form.d.ts +0 -97
  360. package/lib/typescript/Forms2.d.ts +0 -209
  361. package/lib/typescript/Message.d.ts +0 -71
  362. package/lib/typescript/Overlays.d.ts +0 -146
  363. package/lib/typescript/Pickers.d.ts +0 -105
  364. package/lib/typescript/Table.d.ts +0 -64
  365. package/lib/typescript/ai.d.ts +0 -166
  366. package/lib/typescript/charts/AreaChart.d.ts +0 -44
  367. package/lib/typescript/charts/BarChart.d.ts +0 -19
  368. package/lib/typescript/charts/FunnelChart.d.ts +0 -25
  369. package/lib/typescript/charts/HeatmapChart.d.ts +0 -23
  370. package/lib/typescript/charts/LineChart.d.ts +0 -30
  371. package/lib/typescript/charts/PlotChart.d.ts +0 -31
  372. package/lib/typescript/charts/RadarChart.d.ts +0 -27
  373. package/lib/typescript/charts/RingChart.d.ts +0 -28
  374. package/lib/typescript/charts/ScatterChart.d.ts +0 -34
  375. package/lib/typescript/charts/WaterfallChart.d.ts +0 -22
  376. package/lib/typescript/charts/advanced.d.ts +0 -107
  377. package/lib/typescript/charts/extra.d.ts +0 -63
  378. package/lib/typescript/charts/index.d.ts +0 -13
  379. package/lib/typescript/charts/scales.d.ts +0 -35
  380. package/src/Carousel.tsx +0 -233
  381. package/src/Display.tsx +0 -778
  382. package/src/Feedback.tsx +0 -969
  383. package/src/Form.tsx +0 -425
  384. package/src/Forms2.tsx +0 -1014
  385. package/src/Message.tsx +0 -219
  386. package/src/Overlays.tsx +0 -685
  387. package/src/Pickers.tsx +0 -590
  388. package/src/Table.tsx +0 -231
  389. package/src/ai.tsx +0 -707
  390. package/src/charts/AreaChart.tsx +0 -73
  391. package/src/charts/BarChart.tsx +0 -183
  392. package/src/charts/FunnelChart.tsx +0 -125
  393. package/src/charts/HeatmapChart.tsx +0 -155
  394. package/src/charts/LineChart.tsx +0 -247
  395. package/src/charts/PlotChart.tsx +0 -168
  396. package/src/charts/RadarChart.tsx +0 -208
  397. package/src/charts/RingChart.tsx +0 -133
  398. package/src/charts/ScatterChart.tsx +0 -223
  399. package/src/charts/WaterfallChart.tsx +0 -201
  400. package/src/charts/advanced.tsx +0 -676
  401. package/src/charts/extra.tsx +0 -242
  402. package/src/charts/index.ts +0 -86
  403. package/src/charts/scales.ts +0 -163
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
- MIT License
1
+ MIT License with Anti-Plagiarism & Brand Protection Terms
2
2
 
3
- Copyright (c) 2026 Kelvin Zhang
3
+ Copyright (c) 2026 Binyam Feyissa. All rights reserved.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -9,8 +9,28 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
9
  copies of the Software, and to permit persons to whom the Software is
10
10
  furnished to do so, subject to the following conditions:
11
11
 
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
12
+ 1. COPYRIGHT & ATTRIBUTION:
13
+ The above copyright notice, this permission notice, and the third-party
14
+ attribution notices below shall be included in all copies or substantial
15
+ portions of the Software.
16
+
17
+ 2. ACCEPTABLE USE & ANTI-PLAGIARISM RESTRICTIONS:
18
+ You are granted full permission to use, customize, and integrate the Software
19
+ in your own commercial, private, open-source, or enterprise end-user software,
20
+ websites, web applications, and mobile applications ("Applications").
21
+
22
+ However, the following are strictly prohibited:
23
+ a) You may NOT republish, re-upload, rebrand, or redistribute this repository,
24
+ source code, component registry, or design token suite as a competing standalone
25
+ UI component library, design system kit, template product, or under an alternate
26
+ package name on public registries (including npm, PyPI, GitHub, or any other registry).
27
+ b) You may NOT misrepresent yourself as the creator or original author of Glacia,
28
+ or remove or alter the original author attributions.
29
+
30
+ 3. TRADEMARKS & BRAND ASSETS:
31
+ This license does not grant permission to use the trade names, trademarks,
32
+ service marks, product names, logos, or brand marks of "Glacia" or "Binyam Feyissa"
33
+ in connection with derivative works, forks, or any competing distributions.
14
34
 
15
35
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
36
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
@@ -19,3 +39,8 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
39
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
40
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
41
  SOFTWARE.
42
+
43
+ ---
44
+
45
+ Attribution and Third-Party Acknowledgements:
46
+ - React Native glass effect architecture powered by @callstack/liquid-glass (MIT License): https://github.com/callstack/liquid-glass
package/README.md CHANGED
@@ -14,7 +14,7 @@
14
14
 
15
15
  **`glacia-native`** brings the physical material of Apple's iOS 26 Liquid Glass to React Native applications:
16
16
 
17
- - **Native iOS 26 Material:** Uses `@callstack/liquid-glass` to render Apple's authentic native `UIGlassEffect` on supported devices.
17
+ - **Native iOS 26 Material:** Uses the vendored glass engine (`expo-liquid-glass-ui`) to render Apple's authentic native `UIGlassEffect` on supported devices, the engine's Metal renderer on iOS 16.4–25 and its AGSL renderer on Android 13+.
18
18
  - **Graceful Fallback Ladder:** On older iOS versions and Android, falls back to a tuned visual hierarchy with frosted translucency, matching layout geometry, and zero runtime crashes.
19
19
  - **Physical Spring Animations:** Native spring interactions for presses, toggles, slider scrubbing, and tab transitions.
20
20
  - **Human Interface Guidelines (HIG):** Designed to match Apple's native tactile controls, radii, and typography scales.
@@ -26,18 +26,63 @@
26
26
  Install `glacia-native` and its peer dependencies:
27
27
 
28
28
  ```bash
29
- npm install glacia-native glacia-tokens @callstack/liquid-glass
29
+ npm install glacia-native glacia-tokens react-native-reanimated react-native-gesture-handler
30
30
  # or
31
- pnpm add glacia-native glacia-tokens @callstack/liquid-glass
32
- # or
33
- yarn add glacia-native glacia-tokens @callstack/liquid-glass
34
- # or
35
- bun add glacia-native glacia-tokens @callstack/liquid-glass
31
+ pnpm add glacia-native glacia-tokens react-native-reanimated react-native-gesture-handler
36
32
  ```
37
33
 
34
+ The glass engine is vendored inside this package (see `NOTICE`); there is no
35
+ second glass dependency to install.
36
+
38
37
  ### Expo Projects
39
38
 
40
- If using Expo, ensure you are running in Expo Prebuild / Development Build (`npx expo run:ios` or `npx expo run:android`) to support the native iOS glass module.
39
+ Use a development build (`npx expo run:ios` / `npx expo run:android`): the
40
+ renderers are native. **In Expo Go every component renders the fallback floor** —
41
+ the solid, fully designed surface described under
42
+ [The fallback material](#the-fallback-material). That is expected, not a bug.
43
+
44
+ Wrap the app root in `GestureHandlerRootView`, as the engine requires:
45
+
46
+ ```tsx
47
+ import { GestureHandlerRootView } from "react-native-gesture-handler";
48
+
49
+ export default function App() {
50
+ return (
51
+ <GestureHandlerRootView style={{ flex: 1 }}>
52
+ {/* your app */}
53
+ </GestureHandlerRootView>
54
+ );
55
+ }
56
+ ```
57
+
58
+ ### The Android provider rule
59
+
60
+ On Android the backdrop is recorded by `GlassProvider`, so the glass views must
61
+ be its **siblings**, never its descendants — a glass view inside the provider it
62
+ reads would refract its own output. The provider takes **one direct child**: the
63
+ content whose pixels the glass samples. Put the page background inside it.
64
+
65
+ ```tsx
66
+ <View style={{ flex: 1 }}>
67
+ {/* One direct child: the content and its background. */}
68
+ <GlassProvider style={StyleSheet.absoluteFill}>
69
+ <ScrollView>{content}</ScrollView>
70
+ </GlassProvider>
71
+
72
+ {/* Glass views are siblings, drawn after the provider. */}
73
+ <TabBar items={items} />
74
+ </View>
75
+ ```
76
+
77
+ On iOS the provider is a plain view and the whole-window backdrop is the
78
+ default, so the same tree works unchanged there.
79
+
80
+ ### Name clash
81
+
82
+ The vendored engine registers the native views `LiquidGlassView`,
83
+ `LiquidGlassContainer` and `LiquidGlassProvider`. An app that also installs
84
+ `expo-liquid-glass-view` (which registers the same names) will collide at
85
+ runtime. Use one or the other.
41
86
 
42
87
  ---
43
88
 
@@ -74,7 +119,7 @@ export function App() {
74
119
 
75
120
  <View style={styles.sliderContainer}>
76
121
  <Text style={styles.label}>Transmission: {sliderVal}%</Text>
77
- <Slider value={sliderVal} onValueChange={setSliderVal} minimumValue={0} maximumValue={100} />
122
+ <Slider value={sliderVal} onValueChange={setSliderVal} min={0} max={100} accessibilityLabel="Transmission" />
78
123
  </View>
79
124
 
80
125
  <Button variant="glass" onPress={() => console.log("Pressed!")}>
@@ -134,16 +179,65 @@ const styles = StyleSheet.create({
134
179
 
135
180
  ## Component Catalog
136
181
 
182
+ The package exports 49 components. Everything below is part of this rebuild; the old charts, AI
183
+ surfaces, forms, pickers, overlays and bar pieces are not — they survive in published 0.5.2 and in
184
+ git history.
185
+
186
+ **Surfaces** — the material and its containers
187
+
137
188
  | Component | Description |
138
189
  | :--- | :--- |
139
- | **`<Glass />`** | Core material view rendering native `UIGlassEffect` on iOS 26 and calibrated fallback on other platforms. |
140
- | **`<Button />`** | Interactive button with `filled`, `glass`, and `ghost` variants with haptic and spring feedback. |
141
- | **`<Card />`** | Liquid glass content container with `CardHeader`, `CardTitle`, `CardDescription`, `CardContent`, and `CardFooter`. |
142
- | **`<SegmentedControl />`** | Apple-style segmented picker with animated sliding thumb indicator. |
143
- | **`<Switch />`** | Physical toggle switch with specular lighting and smooth spring state transitions. |
144
- | **`<Slider />`** | Continuous slider control with custom track lighting and glass thumb. |
145
- | **`<TabBar />`** | Bottom navigation bar floating with real optical material. |
146
- | **`<Tabs />`** | Tab switching layout with animated glass selector indicator. |
190
+ | **`<Glass />`** / **`<GlassView />`** | The one surface every component is built on. Routes to Apple's `UIGlassEffect` on iOS 26+, the Metal renderer below it, AGSL on Android 13+, and the fallback floor elsewhere. |
191
+ | **`<GlassContainer />`** | Groups several glass views so their optics agree. |
192
+ | **`<GlassProvider />`** | The Android backdrop provider. One direct child; glass views are its siblings. |
193
+ | **`<GlassStack />`** | Stacked glass layers with `GlassStack.Layer` markers. |
194
+ | **`<GlassBackdrop />`** | A bounded backdrop scope for iOS 16.4–25: glass inside it photographs scroll content in content coordinates, so a pane dragged over a list keeps refracting the right rows. A plain wrapper on every other tier, and a hint rather than a guarantee — sticky headers, parallax and nested scrollers fall back to fresh window captures. |
195
+
196
+ **Wave 1 — the engine's controls** (Apple geometry and behaviour)
197
+
198
+ `TabBar` · `Button` · `IconButton` · `Chip` · `Switch` · `Slider` · `Stepper` ·
199
+ `SegmentedControl` · `Input` · `Card` (with `CardHeader`, `CardTitle`,
200
+ `CardDescription`, `CardContent`, `CardBody`, `CardFooter`) · `Toolbar` ·
201
+ `Toast` · `Sheet` · `Group` · `MorphGroup` · `Scrim`
202
+
203
+ **Wave 2 — donor behaviour, Apple dress**
204
+
205
+ `Accordion` · `Alert` · `AlertDialog` · `Avatar` · `Badge` · `Checkbox` ·
206
+ `Collapsible` · `ContextMenu` · `Dialog` (with `DialogTrigger`) ·
207
+ `DropdownMenu` · `Label` · `Popover` · `Progress` · `RadioGroup` · `Select` ·
208
+ `Separator` · `Skeleton` · `Tabs` · `Text` · `Textarea` · `Toggle` ·
209
+ `ToggleGroup` · `Tooltip`
210
+
211
+ **Supporting components**
212
+
213
+ `ActionSheet` · `Field`
214
+
215
+ ---
216
+
217
+ ## The fallback material
218
+
219
+ On iOS 26+ every glass surface is Apple's `UIGlassEffect`. On iOS below 26, on
220
+ Android and in Expo Go, the fallback renders the same design in layers, so it
221
+ reads as glass rather than as a translucent rectangle:
222
+
223
+ 1. **Backdrop blur** — a real native blur view, when one is installed:
224
+ `expo-blur` (Expo apps) or `@react-native-community/blur` (bare React Native).
225
+ Both are optional peer dependencies; without either, the surface degrades to
226
+ tint + rim + edge + shadow instead of failing.
227
+ 2. **Tint** — the `glass` token (or your `tintColor`, or 0.35 alpha for `clear`).
228
+ 3. **Rim light** — a gradient stroke painted on the edge, brightest along the
229
+ top, so rounded corners read as lit curves.
230
+ 4. **Top highlight** — a soft white falloff just inside the top edge.
231
+ 5. **Edge** — the 0.5px hairline in the `edge` token.
232
+ 6. **Drop shadow** — the surface lifts off the page behind it.
233
+
234
+ `Glass` accepts two optional props for this branch: `surface` picks one of the
235
+ web's six lenses (`"panel"`, `"control"`, `"field"`, `"overlay"`, `"hint"`,
236
+ `"rail"`), and `pressed` fades the specular press glow in. Neither is forwarded
237
+ to Apple's view — on iOS 26 the real material replaces the whole stack.
238
+
239
+ Reduce Transparency is honoured exactly as before: the layered material is
240
+ replaced by one solid colour.
147
241
 
148
242
  ---
149
243
 
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Accordion = Accordion;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ // Wave 2 — Accordion.
6
+ //
7
+ // The donor's disclosure behaviour: one section open at a time unless `multiple`,
8
+ // a controlled list when `openSections` is passed, and headers that announce
9
+ // their expanded state. Dressed on the family's glass surface with the same
10
+ // hairlines and type steps as the rest of the library.
11
+ const react_1 = require("react");
12
+ const Glass_1 = require("./Glass");
13
+ const tokens_1 = require("./internal/tokens");
14
+ const primitives_1 = require("./internal/primitives");
15
+ const motion_1 = require("./internal/motion");
16
+ function Accordion({ sections, multiple = false, openSections, defaultOpenSections, onOpenSectionsChange, style, isDark: isDarkProp, testID, }) {
17
+ const isDark = (0, motion_1.useIsDark)(isDarkProp);
18
+ const theme = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
19
+ const { View, Pressable, Text: RNText } = (0, primitives_1.primitives)();
20
+ const [internal, setInternal] = (0, react_1.useState)(defaultOpenSections ?? []);
21
+ const open = openSections !== undefined ? openSections : internal;
22
+ const toggle = (value) => {
23
+ const isOpen = open.includes(value);
24
+ let next;
25
+ if (multiple) {
26
+ next = isOpen ? open.filter((entry) => entry !== value) : [...open, value];
27
+ }
28
+ else {
29
+ next = isOpen ? [] : [value];
30
+ }
31
+ if (openSections === undefined)
32
+ setInternal(next);
33
+ onOpenSectionsChange?.(next);
34
+ };
35
+ return ((0, jsx_runtime_1.jsx)(Glass_1.Glass, { effect: "regular", surface: "panel", isDark: isDark, testID: testID, style: [{ borderRadius: tokens_1.radii.lg, overflow: "hidden" }, style], children: sections.map((section, index) => ((0, jsx_runtime_1.jsx)(AccordionRow, { section: section, open: open.includes(section.value), onPress: () => toggle(section.value), first: index === 0, isDark: isDark, borderColor: theme.separator, foreground: theme.foreground, muted: theme.muted }, section.value))) }));
36
+ }
37
+ function AccordionRow({ section, open, onPress, first, isDark, borderColor, foreground, muted, }) {
38
+ const { View, Pressable, Text: RNText } = (0, primitives_1.primitives)();
39
+ const { value: progress, animated } = (0, motion_1.useSpring)(open ? 1 : 0, "snappy");
40
+ const rotation = animated
41
+ ? progress.interpolate({ inputRange: [0, 1], outputRange: ["0deg", "90deg"] })
42
+ : open
43
+ ? "90deg"
44
+ : "0deg";
45
+ return ((0, jsx_runtime_1.jsxs)(View, { style: first
46
+ ? null
47
+ : { borderTopWidth: 0.5, borderTopColor: borderColor }, children: [(0, jsx_runtime_1.jsxs)(Pressable, { accessibilityRole: "button", accessibilityLabel: section.title, accessibilityState: { expanded: open }, onPress: onPress, style: {
48
+ flexDirection: "row",
49
+ alignItems: "center",
50
+ gap: 12,
51
+ paddingHorizontal: 16,
52
+ paddingVertical: 14,
53
+ }, children: [(0, jsx_runtime_1.jsxs)(View, { style: { flex: 1 }, children: [(0, jsx_runtime_1.jsx)(RNText, { style: { ...tokens_1.typeScale.body, fontWeight: "600", color: foreground }, children: section.title }), section.description ? ((0, jsx_runtime_1.jsx)(RNText, { style: { ...tokens_1.typeScale.caption, color: muted, marginTop: 2 }, children: section.description })) : null] }), (0, jsx_runtime_1.jsx)(AnimatedChevron, { rotation: rotation, color: muted })] }), open ? ((0, jsx_runtime_1.jsx)(View, { style: { paddingHorizontal: 16, paddingBottom: 16 }, children: section.content })) : null] }));
54
+ }
55
+ function AnimatedChevron({ rotation, color }) {
56
+ const { Animated, Text: RNText } = (0, primitives_1.primitives)();
57
+ return ((0, jsx_runtime_1.jsx)(Animated.View, { style: { transform: [{ rotate: rotation }] }, children: (0, jsx_runtime_1.jsx)(RNText, { style: { fontSize: 13, color }, children: "\u25B8" }) }));
58
+ }
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ActionSheet = ActionSheet;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const tokens_1 = require("./internal/tokens");
7
+ const primitives_1 = require("./internal/primitives");
8
+ const motion_1 = require("./internal/motion");
9
+ const Glass_1 = require("./Glass");
10
+ /**
11
+ * A list of choices attached to the bottom of the screen.
12
+ *
13
+ * Anchored to the bottom because that is where a thumb reaches, and it keeps a
14
+ * separate Cancel row so a mis-tap is always reversible.
15
+ */
16
+ function ActionSheet({ open: controlledOpen, onOpenChange, title, message, options, cancelLabel = "Cancel", isDark: isDarkProp, testID, }) {
17
+ const isDark = (0, motion_1.useIsDark)(isDarkProp);
18
+ const theme = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
19
+ // Android's back button is handled by Modal's onRequestClose, so no
20
+ // BackHandler subscription is needed here.
21
+ const { View, Text, Pressable, Modal } = (0, primitives_1.primitives)();
22
+ const [uncontrolled, setUncontrolled] = (0, react_1.useState)(false);
23
+ const open = controlledOpen ?? uncontrolled;
24
+ const close = () => {
25
+ if (controlledOpen === undefined)
26
+ setUncontrolled(false);
27
+ onOpenChange?.(false);
28
+ };
29
+ return ((0, jsx_runtime_1.jsx)(Modal, { visible: open, transparent: true, animationType: "slide", onRequestClose: close, testID: testID, children: (0, jsx_runtime_1.jsx)(Pressable, { accessibilityRole: "button", accessibilityLabel: "Dismiss actions", onPress: close, style: { flex: 1, justifyContent: "flex-end", backgroundColor: theme.scrim }, children: (0, jsx_runtime_1.jsxs)(Pressable, { accessibilityRole: "none", onPress: () => { }, style: { padding: 10, gap: 8 }, children: [(title || message) && ((0, jsx_runtime_1.jsx)(Glass_1.Glass, { effect: "regular", surface: "overlay", isDark: isDark, style: { borderRadius: tokens_1.radii.lg }, children: (0, jsx_runtime_1.jsxs)(View, { style: { paddingVertical: 12, paddingHorizontal: 16, alignItems: "center" }, children: [title && ((0, jsx_runtime_1.jsx)(Text, { style: { fontSize: 13, fontWeight: "600", color: theme.foreground }, children: title })), message && ((0, jsx_runtime_1.jsx)(Text, { style: { fontSize: 12, color: theme.muted, marginTop: 4, textAlign: "center" }, children: message }))] }) })), options.map((option) => ((0, jsx_runtime_1.jsx)(Glass_1.Glass, { effect: "regular", surface: "overlay", isDark: isDark, style: { borderRadius: tokens_1.radii.pill }, children: (0, jsx_runtime_1.jsx)(Pressable, { accessibilityRole: "button", accessibilityLabel: option.label, onPress: () => {
30
+ option.onPress?.();
31
+ close();
32
+ }, style: { minHeight: 44, paddingVertical: 12, paddingHorizontal: 20, alignItems: "center", justifyContent: "center" }, children: (0, jsx_runtime_1.jsx)(Text, { style: {
33
+ fontSize: 17,
34
+ // The web's iOS-style action sheet: every row is the tint
35
+ // colour, and only a destructive one is red.
36
+ color: option.destructive ? theme.destructive : theme.fill,
37
+ }, children: option.label }) }) }, option.label))), (0, jsx_runtime_1.jsx)(Glass_1.Glass, { effect: "regular", surface: "overlay", isDark: isDark, style: { borderRadius: tokens_1.radii.pill }, children: (0, jsx_runtime_1.jsx)(Pressable, { accessibilityRole: "button", accessibilityLabel: cancelLabel, onPress: close, style: { minHeight: 44, paddingVertical: 12, alignItems: "center", justifyContent: "center" }, children: (0, jsx_runtime_1.jsx)(Text, { style: { fontSize: 17, fontWeight: "600", color: theme.foreground }, children: cancelLabel }) }) })] }) }) }));
38
+ }
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Alert = Alert;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const Glass_1 = require("./Glass");
6
+ const tokens_1 = require("./internal/tokens");
7
+ const primitives_1 = require("./internal/primitives");
8
+ const motion_1 = require("./internal/motion");
9
+ function Alert({ title, description, icon, tone = "default", onDismiss, isDark: isDarkProp, style, testID, }) {
10
+ const isDark = (0, motion_1.useIsDark)(isDarkProp);
11
+ const theme = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
12
+ const { View, Pressable, Text: RNText } = (0, primitives_1.primitives)();
13
+ const accent = tone === "destructive"
14
+ ? theme.destructive
15
+ : tone === "success"
16
+ ? theme.on
17
+ : tone === "warning"
18
+ ? theme.warning
19
+ : tone === "info"
20
+ ? theme.info
21
+ : theme.foreground;
22
+ return ((0, jsx_runtime_1.jsx)(Glass_1.Glass, { effect: "regular", surface: "panel", isDark: isDark, testID: testID, accessibilityRole: "alert", role: "alert", style: [{ borderRadius: tokens_1.radii.lg, padding: 14 }, style], children: (0, jsx_runtime_1.jsxs)(View, { style: { flexDirection: "row", gap: 12, alignItems: "flex-start" }, children: [icon ? (0, jsx_runtime_1.jsx)(View, { style: { marginTop: 1 }, children: icon }) : null, (0, jsx_runtime_1.jsxs)(View, { style: { flex: 1, gap: 3 }, children: [(0, jsx_runtime_1.jsx)(RNText, { style: { ...tokens_1.typeScale.label, color: accent }, children: title }), description ? ((0, jsx_runtime_1.jsx)(RNText, { style: { ...tokens_1.typeScale.caption, color: theme.muted }, children: description })) : null] }), onDismiss ? ((0, jsx_runtime_1.jsx)(Pressable, { accessibilityRole: "button", accessibilityLabel: "Dismiss", onPress: onDismiss, hitSlop: 8, children: (0, jsx_runtime_1.jsx)(RNText, { style: { fontSize: 13, color: theme.muted }, children: "\u2715" }) })) : null] }) }));
23
+ }
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AlertDialog = AlertDialog;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ // Wave 2 — AlertDialog.
6
+ //
7
+ // The donor's deliberate modal: it is announced as an alert dialog, it does not
8
+ // dismiss on a backdrop press, and it always offers a cancel path. Dressed with
9
+ // the family's glass, buttons and destructive tone.
10
+ const react_1 = require("react");
11
+ const Button_1 = require("./Button");
12
+ const Glass_1 = require("./Glass");
13
+ const tokens_1 = require("./internal/tokens");
14
+ const primitives_1 = require("./internal/primitives");
15
+ const motion_1 = require("./internal/motion");
16
+ const overlay_1 = require("./internal/overlay");
17
+ function AlertDialog({ open: openProp, onOpenChange, title, description, children, confirmLabel = "Confirm", cancelLabel = "Cancel", destructive = false, onConfirm, onCancel, isDark: isDarkProp, testID, }) {
18
+ const isDark = (0, motion_1.useIsDark)(isDarkProp);
19
+ const theme = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
20
+ const { View, Pressable, Text: RNText, Modal } = (0, primitives_1.primitives)();
21
+ const [internalOpen, setInternalOpen] = (0, react_1.useState)(false);
22
+ const open = openProp !== undefined ? openProp : internalOpen;
23
+ const close = (next) => {
24
+ if (openProp === undefined)
25
+ setInternalOpen(next);
26
+ onOpenChange?.(next);
27
+ };
28
+ (0, overlay_1.useBackDismiss)(open, () => {
29
+ onCancel?.();
30
+ close(false);
31
+ });
32
+ return ((0, jsx_runtime_1.jsx)(Modal, { visible: open, transparent: true, animationType: "fade", onRequestClose: () => close(false), children: (0, jsx_runtime_1.jsxs)(View, { style: { flex: 1, backgroundColor: theme.scrim }, children: [(0, jsx_runtime_1.jsx)(Pressable, { accessibilityRole: "button", accessibilityLabel: "Close dialog",
33
+ // Deliberately inert: an alert dialog is a decision, not a dismissible
34
+ // surface. The backdrop exists only to block what is behind it.
35
+ onPress: undefined, style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0 } }), (0, jsx_runtime_1.jsx)(View, { style: { flex: 1, justifyContent: "center", padding: 24 }, pointerEvents: "box-none", children: (0, jsx_runtime_1.jsx)(Pressable, { accessibilityRole: "none", onPress: () => { }, children: (0, jsx_runtime_1.jsxs)(Glass_1.Glass, { effect: "regular", surface: "overlay", isDark: isDark, testID: testID, accessibilityViewIsModal: true, style: {
36
+ borderRadius: tokens_1.radii.lg,
37
+ backgroundColor: theme.surface,
38
+ padding: 20,
39
+ gap: 10,
40
+ }, children: [(0, jsx_runtime_1.jsx)(RNText, { accessibilityRole: "heading", as: true, any: true, style: { ...tokens_1.typeScale.heading, color: theme.foreground }, children: title }), description ? ((0, jsx_runtime_1.jsx)(RNText, { style: { ...tokens_1.typeScale.body, color: theme.muted }, children: description })) : null, children ? (0, jsx_runtime_1.jsx)(View, { children: children }) : null, (0, jsx_runtime_1.jsxs)(View, { style: { flexDirection: "row", justifyContent: "flex-end", gap: 8, marginTop: 8 }, children: [(0, jsx_runtime_1.jsx)(Button_1.Button, { accessibilityLabel: cancelLabel, variant: "ghost", onPress: () => {
41
+ onCancel?.();
42
+ close(false);
43
+ }, children: cancelLabel }), (0, jsx_runtime_1.jsx)(Button_1.Button, { accessibilityLabel: confirmLabel, variant: "filled", tint: destructive ? theme.destructive : theme.fill, onPress: () => {
44
+ onConfirm?.();
45
+ close(false);
46
+ }, children: confirmLabel })] })] }) }) })] }) }));
47
+ }
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.initialsOf = void 0;
4
+ exports.Avatar = Avatar;
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ // Wave 2 — Avatar.
7
+ //
8
+ // The donor's behaviour: a decorative image with an accessible name, an
9
+ // initials fallback when the image is missing or fails, and a status dot that is
10
+ // announced rather than colour-only. Dressed as the family's glass ring.
11
+ const react_1 = require("react");
12
+ const Glass_1 = require("./Glass");
13
+ const tokens_1 = require("./internal/tokens");
14
+ const primitives_1 = require("./internal/primitives");
15
+ const motion_1 = require("./internal/motion");
16
+ const initials_1 = require("./internal/initials");
17
+ Object.defineProperty(exports, "initialsOf", { enumerable: true, get: function () { return initials_1.initialsOf; } });
18
+ const STATUS_COLOR = { online: "on", offline: "muted", busy: "destructive" };
19
+ function Avatar({ source, name, size = "md", status, style, isDark: isDarkProp, testID, }) {
20
+ const isDark = (0, motion_1.useIsDark)(isDarkProp);
21
+ const theme = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
22
+ const { View, Text: RNText, Image } = (0, primitives_1.primitives)();
23
+ const [failed, setFailed] = (0, react_1.useState)(false);
24
+ const dimension = tokens_1.controlSizes.swatch[size === "sm" ? "sm" : size === "lg" ? "lg" : "md"];
25
+ const label = name ? `Avatar of ${name}` : "Avatar";
26
+ return ((0, jsx_runtime_1.jsx)(View, { testID: testID, style: { alignSelf: "flex-start" }, children: (0, jsx_runtime_1.jsxs)(Glass_1.Glass, { effect: "regular", surface: "control", isDark: isDark, accessible: true, accessibilityRole: "image", accessibilityLabel: label, style: [
27
+ {
28
+ width: dimension,
29
+ height: dimension,
30
+ borderRadius: tokens_1.radii.pill,
31
+ alignItems: "center",
32
+ justifyContent: "center",
33
+ backgroundColor: theme.wash,
34
+ overflow: "visible",
35
+ },
36
+ style,
37
+ ], children: [source && !failed ? ((0, jsx_runtime_1.jsx)(Image, { source: source, onError: () => setFailed(true), accessibilityLabel: name, style: { width: dimension, height: dimension, borderRadius: dimension / 2 } })) : ((0, jsx_runtime_1.jsx)(RNText, { style: { fontSize: dimension * 0.36, fontWeight: "600", color: theme.foreground }, children: (0, initials_1.initialsOf)(name ?? "?") })), status ? ((0, jsx_runtime_1.jsx)(View, { style: {
38
+ position: "absolute",
39
+ right: 0,
40
+ bottom: 0,
41
+ width: Math.max(9, dimension * 0.26),
42
+ height: Math.max(9, dimension * 0.26),
43
+ borderRadius: dimension,
44
+ borderWidth: 2,
45
+ borderColor: theme.glassSolid,
46
+ backgroundColor: status === "online" ? theme.on : status === "busy" ? theme.destructive : theme.muted,
47
+ } })) : null] }) }));
48
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Badge = Badge;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const tokens_1 = require("./internal/tokens");
6
+ const primitives_1 = require("./internal/primitives");
7
+ const motion_1 = require("./internal/motion");
8
+ function Badge({ children, tone = "fill", overlay, isDark: isDarkProp, style, testID, }) {
9
+ const isDark = (0, motion_1.useIsDark)(isDarkProp);
10
+ const theme = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
11
+ const { View, Text: RNText } = (0, primitives_1.primitives)();
12
+ const background = tone === "destructive"
13
+ ? theme.destructive
14
+ : tone === "success"
15
+ ? theme.on
16
+ : tone === "muted"
17
+ ? theme.wash
18
+ : theme.fill;
19
+ const color = tone === "muted" ? theme.foreground : theme.onTint;
20
+ const badge = ((0, jsx_runtime_1.jsx)(View, { testID: testID, accessible: true, accessibilityRole: "text", style: [
21
+ {
22
+ minHeight: 20,
23
+ minWidth: 20,
24
+ paddingHorizontal: 7,
25
+ borderRadius: tokens_1.radii.pill,
26
+ backgroundColor: background,
27
+ alignItems: "center",
28
+ justifyContent: "center",
29
+ alignSelf: "flex-start",
30
+ },
31
+ style,
32
+ ], children: typeof children === "string" || typeof children === "number" ? ((0, jsx_runtime_1.jsx)(RNText, { style: { ...tokens_1.typeScale.caption, fontWeight: "700", color }, children: children })) : (children) }));
33
+ if (!overlay)
34
+ return badge;
35
+ return ((0, jsx_runtime_1.jsxs)(View, { style: { alignSelf: "flex-start" }, children: [overlay, (0, jsx_runtime_1.jsx)(View, { style: { position: "absolute", top: -6, right: -6 }, children: badge })] }));
36
+ }