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
@@ -1,178 +0,0 @@
1
- import { type ReactNode } from "react";
2
- import type { StyleProp, ViewStyle } from "react-native";
3
- export type AvatarSize = "sm" | "md" | "lg";
4
- export interface AvatarProps {
5
- /** Image to show. When absent, or when it fails to load, initials render. */
6
- source?: {
7
- uri: string;
8
- } | number;
9
- /** The person's name: initials are derived from it when no image loads. */
10
- name?: string;
11
- size?: AvatarSize;
12
- /** Draws a status dot in the corner. */
13
- status?: "online" | "offline" | "busy";
14
- style?: StyleProp<ViewStyle>;
15
- isDark?: boolean;
16
- testID?: string;
17
- }
18
- /** First letters of the first and last word, as an avatar fallback. */
19
- export declare function initialsOf(name: string): string;
20
- /**
21
- * A person or entity: their picture, or their initials when there is none.
22
- *
23
- * The frame is Glacia's glass so it belongs to the same family as the rest of
24
- * the library; the initials sit on it in the theme's foreground colour.
25
- */
26
- export declare const Avatar: import("react").ForwardRefExoticComponent<AvatarProps & import("react").RefAttributes<any>>;
27
- export interface BadgeProps {
28
- /** The count or short label. Omit to render a plain dot. */
29
- children?: ReactNode;
30
- /** Draws the badge in the destructive tone (unread, errors). */
31
- tone?: "fill" | "destructive" | "success" | "muted";
32
- /** The element to overlay. Supplying it puts the badge in the corner. */
33
- overlay?: ReactNode;
34
- style?: StyleProp<ViewStyle>;
35
- isDark?: boolean;
36
- testID?: string;
37
- }
38
- /**
39
- * A small count or dot.
40
- *
41
- * Deliberately not glass: a badge is a micro-element, and a translucent 16pt
42
- * chip loses its contrast against whatever it sits on. It uses the solid theme
43
- * tint instead, which is what makes it legible in both themes.
44
- */
45
- export declare const Badge: import("react").ForwardRefExoticComponent<BadgeProps & import("react").RefAttributes<any>>;
46
- export interface SeparatorProps {
47
- orientation?: "horizontal" | "vertical";
48
- /** Inset from the leading edge, matching a list row's leading accessory. */
49
- inset?: number;
50
- style?: StyleProp<ViewStyle>;
51
- isDark?: boolean;
52
- testID?: string;
53
- }
54
- /**
55
- * A hairline divider in the theme's separator colour.
56
- *
57
- * A plain View rather than a Glass: a 1pt rule is not a surface, and glass on
58
- * a line has nothing to refract.
59
- */
60
- export declare const Separator: import("react").ForwardRefExoticComponent<SeparatorProps & import("react").RefAttributes<any>>;
61
- export interface SkeletonProps {
62
- /** Rectangles for cards and rows, circles for avatars, lines for a run of text. */
63
- shape?: "rect" | "circle" | "line";
64
- width?: number | string;
65
- height?: number;
66
- style?: StyleProp<ViewStyle>;
67
- isDark?: boolean;
68
- testID?: string;
69
- }
70
- /**
71
- * A loading placeholder.
72
- *
73
- * The pulse is opacity only and slow, on the gentle spring, so it reads as
74
- * "loading" without motion that could bother someone sensitive to movement.
75
- * Nothing about it is essential to understanding the screen, so it is hidden
76
- * from screen readers rather than announced.
77
- */
78
- export declare const Skeleton: import("react").ForwardRefExoticComponent<SkeletonProps & import("react").RefAttributes<any>>;
79
- export type SpinnerSize = "sm" | "md" | "lg";
80
- export interface SpinnerProps {
81
- size?: SpinnerSize;
82
- /** Spinner colour; defaults to the theme's muted foreground. */
83
- tint?: string;
84
- /** Announced to screen readers, since a spinner alone has no text. */
85
- accessibilityLabel?: string;
86
- style?: StyleProp<ViewStyle>;
87
- isDark?: boolean;
88
- testID?: string;
89
- }
90
- /**
91
- * A loading spinner, drawn by Glacia.
92
- *
93
- * An SVG arc that rotates on the gentle spring through Animated — not the
94
- * platform's ActivityIndicator, so it looks the same on every platform and
95
- * wears the theme's colour instead of inheriting the system tint.
96
- */
97
- export declare const Spinner: import("react").ForwardRefExoticComponent<SpinnerProps & import("react").RefAttributes<any>>;
98
- export type ProgressVariant = "bar" | "ring";
99
- export interface ProgressProps {
100
- /** 0–100. Values outside the range are clamped rather than drawn wrong. */
101
- value: number;
102
- variant?: ProgressVariant;
103
- /** Overrides the fill colour; defaults to the theme accent. */
104
- tint?: string;
105
- /** Announced by screen readers, e.g. "Uploading photo". */
106
- accessibilityLabel?: string;
107
- style?: StyleProp<ViewStyle>;
108
- isDark?: boolean;
109
- testID?: string;
110
- }
111
- /**
112
- * Progress, linear or circular.
113
- *
114
- * The track is a glass surface, so it refracts what it sits on exactly like the
115
- * rest of the library; the fill is the theme accent. Both forms report
116
- * `progressbar` with a value, which is the contract NativeTask relies on
117
- * internally — this component generalises it.
118
- */
119
- export declare const Progress: import("react").ForwardRefExoticComponent<ProgressProps & import("react").RefAttributes<any>>;
120
- export interface RatingProps {
121
- /** How many stars are filled. Fractions render a partially filled star. */
122
- value: number;
123
- /** The number of stars. Defaults to five. */
124
- max?: number;
125
- size?: "sm" | "md" | "lg";
126
- /** Makes the stars tappable. Omit for a read-only rating. */
127
- onChange?: (value: number) => void;
128
- disabled?: boolean;
129
- /** The accessible name, e.g. "Rating". */
130
- accessibilityLabel?: string;
131
- style?: StyleProp<ViewStyle>;
132
- isDark?: boolean;
133
- testID?: string;
134
- }
135
- /**
136
- * A star rating.
137
- *
138
- * The stars are drawn as SVG paths from the resolver, so nothing is a
139
- * platform control. A fractional value fills part of a star: 3.5 draws three
140
- * full stars and one half, the half produced by clipping the filled star at the
141
- * fraction's width rather than by rounding — a 4.5-star average must look like
142
- * a 4.5-star average.
143
- *
144
- * Read-only unless `onChange` is given. With it, each star is tappable, the
145
- * value is exposed as an adjustable control (increment/decrement through
146
- * accessibility actions), and each star has its own label so a screen reader
147
- * can name the exact rating it sets.
148
- */
149
- export declare const Rating: import("react").ForwardRefExoticComponent<RatingProps & import("react").RefAttributes<any>>;
150
- export interface NativeImageProps {
151
- /** The image to show. */
152
- source: {
153
- uri: string;
154
- } | number;
155
- /** A description for screen readers. Required: an image with no name is a hole. */
156
- accessibilityLabel: string;
157
- /** Shown behind the image while it loads; a Skeleton when omitted. */
158
- placeholder?: ReactNode;
159
- /** Shown when the image fails to load. */
160
- fallback?: ReactNode;
161
- /** Fades the image in when it loads. Honours Reduce Motion. */
162
- fadeIn?: boolean;
163
- style?: StyleProp<ViewStyle>;
164
- isDark?: boolean;
165
- testID?: string;
166
- }
167
- /**
168
- * A plain image, with the loading and error states every app ends up writing.
169
- *
170
- * Three states, because an image on a phone is three states: loading (a
171
- * Skeleton behind it), loaded (a fade in), and failed (the caller's fallback).
172
- * Aspect ratio comes from `style`, so a caller sets `aspectRatio` and the height
173
- * follows.
174
- *
175
- * This is the plain one; `NativeImageGeneration` is the AI-specific cousin and
176
- * keeps its own state machine.
177
- */
178
- export declare const NativeImage: import("react").ForwardRefExoticComponent<NativeImageProps & import("react").RefAttributes<any>>;
@@ -1,196 +0,0 @@
1
- import { type ReactNode } from "react";
2
- import type { StyleProp, ViewStyle } from "react-native";
3
- import { type Tone } from "./internal/tokens";
4
- export interface ToastAction {
5
- label: string;
6
- onPress: () => void;
7
- }
8
- export interface ToastProps {
9
- /** Controlled visibility. Omit it and the toast keeps its own state. */
10
- visible?: boolean;
11
- defaultVisible?: boolean;
12
- onDismiss?: () => void;
13
- message: string;
14
- /** One optional action, e.g. Undo. */
15
- action?: ToastAction;
16
- /** A leading icon (an SVG node the caller supplies). */
17
- icon?: ReactNode;
18
- /**
19
- * Milliseconds before it dismisses itself. 0 keeps it until dismissed.
20
- * The timer is cleared on unmount as well as on dismiss.
21
- */
22
- duration?: number;
23
- tone?: Tone | "neutral";
24
- style?: StyleProp<ViewStyle>;
25
- isDark?: boolean;
26
- testID?: string;
27
- }
28
- /**
29
- * A transient message on a glass pill.
30
- *
31
- * A toast is not a dialog: it never blocks the screen, so it renders in place
32
- * and lets touches through to what is underneath. It dismisses itself after
33
- * `duration` unless it is controlled or `duration` is 0.
34
- */
35
- export declare const Toast: import("react").ForwardRefExoticComponent<ToastProps & import("react").RefAttributes<any>>;
36
- /** One message in a ToastViewport's queue. */
37
- export interface ToastItem {
38
- /** A stable identity. Required, because the queue reorders and dismisses. */
39
- id: string;
40
- message: string;
41
- action?: ToastAction;
42
- icon?: ReactNode;
43
- tone?: Tone | "neutral";
44
- /** Milliseconds before it dismisses itself. 0 keeps it until dismissed. */
45
- duration?: number;
46
- }
47
- export interface ToastViewportProps {
48
- /** The messages to show. The oldest are dropped when more than 3 arrive. */
49
- toasts: ToastItem[];
50
- /** Called when one leaves, by timer, by swipe or by its action. */
51
- onDismiss: (id: string) => void;
52
- /** How many are visible at once. Extras wait in order. Defaults to 3. */
53
- max?: number;
54
- /** Where the stack sits. */
55
- position?: "top" | "bottom";
56
- style?: StyleProp<ViewStyle>;
57
- isDark?: boolean;
58
- testID?: string;
59
- }
60
- /**
61
- * A queue of toasts, stacked the way Sonner stacks them.
62
- *
63
- * Three at a time is the practical limit: beyond that the messages stop being
64
- * read and start covering the screen. Extras wait in the order they arrived, so
65
- * no message is lost and the newest is never hidden behind a backlog.
66
- *
67
- * Each toast is independently dismissible — its own timer, its own action, and
68
- * a swipe up. Swiping one up removes only that one.
69
- *
70
- * The single `Toast` keeps working unchanged: this is the host for when an app
71
- * has several messages at once, not a replacement. A caller that shows one
72
- * message continues to use `Toast` directly.
73
- */
74
- export declare const ToastViewport: import("react").ForwardRefExoticComponent<ToastViewportProps & import("react").RefAttributes<any>>;
75
- export interface BannerProps {
76
- title?: string;
77
- message: string;
78
- tone?: Tone;
79
- /** A leading icon node. */
80
- icon?: ReactNode;
81
- /** Shows a dismiss button when provided. */
82
- onDismiss?: () => void;
83
- /** A single inline action, e.g. Retry. */
84
- action?: ToastAction;
85
- style?: StyleProp<ViewStyle>;
86
- isDark?: boolean;
87
- testID?: string;
88
- }
89
- /**
90
- * An inline alert.
91
- *
92
- * Unlike AlertDialog it is not modal and not an overlay: it sits in the layout
93
- * and pushes the content below it down. The surface is glass with the tone's
94
- * colour as its edge, so the tone reads at a glance without turning the whole
95
- * panel into a solid block of colour.
96
- */
97
- export declare const Banner: import("react").ForwardRefExoticComponent<BannerProps & import("react").RefAttributes<any>>;
98
- /** One action revealed by swiping a row. */
99
- export interface ListSwipeAction {
100
- label: string;
101
- /** A leading node, typically an SVG icon the caller supplies. */
102
- icon?: ReactNode;
103
- /** The action's tint. Defaults to the theme's fill. */
104
- color?: string;
105
- onPress: () => void;
106
- }
107
- export interface ListItemProps {
108
- /** An avatar, icon or other leading node. */
109
- leading?: ReactNode;
110
- /** The row's main text. */
111
- title: string;
112
- /** Secondary line under the title. */
113
- description?: string;
114
- /** A value text, a control, or any trailing node. */
115
- trailing?: ReactNode;
116
- /** Draws a chevron when the row is tappable and nothing else trails it. */
117
- chevron?: boolean;
118
- onPress?: () => void;
119
- disabled?: boolean;
120
- selected?: boolean;
121
- /** Actions revealed by swiping right (towards the trailing edge). */
122
- swipeActions?: ListSwipeAction[];
123
- /** Actions revealed by swiping left. */
124
- leadingSwipeActions?: ListSwipeAction[];
125
- /** Width allotted to each revealed action button. */
126
- swipeActionWidth?: number;
127
- /** Turns the swipe gesture off, leaving the row's `onPress` only. */
128
- swipeable?: boolean;
129
- /** Opt out of the selection tick when a swipe opens. */
130
- haptics?: boolean;
131
- style?: StyleProp<ViewStyle>;
132
- isDark?: boolean;
133
- testID?: string;
134
- }
135
- /**
136
- * One row of a List.
137
- *
138
- * The row is a Pressable when it has an `onPress`, and inert otherwise, which
139
- * is what the platform expects: a row that does nothing should not announce
140
- * itself as a button. The chevron is decoration and is hidden from screen
141
- * readers, since the row's own role already says it is tappable.
142
- */
143
- export declare const ListItem: import("react").ForwardRefExoticComponent<ListItemProps & import("react").RefAttributes<any>>;
144
- export interface ListProps {
145
- children?: ReactNode;
146
- /** Renders the rows on one glass panel with separators between them. */
147
- inset?: boolean;
148
- style?: StyleProp<ViewStyle>;
149
- isDark?: boolean;
150
- testID?: string;
151
- }
152
- /**
153
- * A grouped list of rows — the backbone of settings and profile screens.
154
- *
155
- * With `inset`, the rows sit on one glass panel with hairline separators, which
156
- * is the shape iOS settings screens use. The separators are drawn by the
157
- * caller's ListItem spacing rather than by nesting glass inside glass.
158
- */
159
- export declare const List: import("react").ForwardRefExoticComponent<ListProps & import("react").RefAttributes<any>>;
160
- /** A titled group of rows, e.g. "Account" above its settings. */
161
- export interface ListSectionProps {
162
- header?: string;
163
- children?: ReactNode;
164
- style?: StyleProp<ViewStyle>;
165
- isDark?: boolean;
166
- testID?: string;
167
- }
168
- export declare const ListSection: import("react").ForwardRefExoticComponent<ListSectionProps & import("react").RefAttributes<any>>;
169
- export interface AccordionSection {
170
- /** Stable identity for the section. */
171
- value: string;
172
- title: string;
173
- /** Optional second line in the header. */
174
- description?: string;
175
- content: ReactNode;
176
- }
177
- export interface AccordionProps {
178
- sections: AccordionSection[];
179
- /** Allow several sections open at once. */
180
- multiple?: boolean;
181
- /** Controlled open sections. Omit for uncontrolled. */
182
- openSections?: string[];
183
- defaultOpenSections?: string[];
184
- onOpenSectionsChange?: (open: string[]) => void;
185
- style?: StyleProp<ViewStyle>;
186
- isDark?: boolean;
187
- testID?: string;
188
- }
189
- /**
190
- * Expandable sections.
191
- *
192
- * The header is a Pressable reporting `expanded`; the panel is measured with
193
- * the height the content reports and animated on the springs token, so the
194
- * reveal is a real transition rather than an instant jump.
195
- */
196
- export declare const Accordion: import("react").ForwardRefExoticComponent<AccordionProps & import("react").RefAttributes<any>>;
@@ -1,97 +0,0 @@
1
- import { type ReactNode } from "react";
2
- import type { StyleProp, TextStyle, ViewStyle } from "react-native";
3
- export interface LabelProps {
4
- children?: ReactNode;
5
- /** Marks the field required with a visible asterisk. */
6
- required?: boolean;
7
- disabled?: boolean;
8
- /**
9
- * The id of the control this label describes. Same meaning and prop name as
10
- * React Native's `nativeID`.
11
- */
12
- nativeID?: string;
13
- isDark?: boolean;
14
- style?: StyleProp<TextStyle>;
15
- }
16
- /** The text above a control. */
17
- export declare const Label: import("react").ForwardRefExoticComponent<LabelProps & import("react").RefAttributes<any>>;
18
- export interface FieldProps {
19
- label?: string;
20
- /** Helper text shown under the control. */
21
- description?: string;
22
- /** Error text. Overrides `description` and tints the label. */
23
- error?: string;
24
- required?: boolean;
25
- disabled?: boolean;
26
- isDark?: boolean;
27
- children?: ReactNode;
28
- style?: StyleProp<ViewStyle>;
29
- }
30
- /**
31
- * Label, control and message stacked in the order assistive tech announces
32
- * them, so a caller never has to place these three by hand.
33
- */
34
- export declare function Field({ label, description, error, required, disabled, isDark: isDarkProp, children, style, }: FieldProps): import("react").JSX.Element;
35
- export interface CheckboxProps {
36
- checked?: boolean;
37
- /** Starting state for uncontrolled use. */
38
- defaultChecked?: boolean;
39
- onCheckedChange?: (checked: boolean) => void;
40
- label?: string;
41
- description?: string;
42
- indeterminate?: boolean;
43
- disabled?: boolean;
44
- isDark?: boolean;
45
- style?: StyleProp<ViewStyle>;
46
- /** Passed through to the pressable row so it is testable. */
47
- testID?: string;
48
- }
49
- /** A tick box for a single boolean, with an optional label and description. */
50
- export declare function Checkbox({ checked: checkedProp, defaultChecked, onCheckedChange, label, description, indeterminate, disabled, isDark: isDarkProp, style, testID, }: CheckboxProps): import("react").JSX.Element;
51
- export interface RadioOption {
52
- value: string;
53
- label: string;
54
- description?: string;
55
- disabled?: boolean;
56
- }
57
- export interface RadioGroupProps {
58
- value?: string;
59
- /** Starting selection for uncontrolled use. */
60
- defaultValue?: string;
61
- onValueChange?: (value: string) => void;
62
- options: RadioOption[];
63
- /** Lay the options out in a row instead of a column. */
64
- horizontal?: boolean;
65
- disabled?: boolean;
66
- isDark?: boolean;
67
- style?: StyleProp<ViewStyle>;
68
- /** Passed through to the group so it is testable. */
69
- testID?: string;
70
- }
71
- /** One choice from a small, always-visible set. */
72
- export declare function RadioGroup({ value: valueProp, defaultValue, onValueChange, options, horizontal, disabled, isDark: isDarkProp, style, testID, }: RadioGroupProps): import("react").JSX.Element;
73
- export interface SelectOption {
74
- value: string;
75
- label: string;
76
- }
77
- export interface SelectProps {
78
- value?: string;
79
- /** Starting selection for uncontrolled use. */
80
- defaultValue?: string;
81
- onValueChange?: (value: string) => void;
82
- options: SelectOption[];
83
- placeholder?: string;
84
- disabled?: boolean;
85
- isDark?: boolean;
86
- style?: StyleProp<ViewStyle>;
87
- /** Passed through to the trigger so it is testable. */
88
- testID?: string;
89
- }
90
- /**
91
- * A dropdown of mutually exclusive options.
92
- *
93
- * Native has no built-in picker that looks the same on iOS and Android, so the
94
- * list opens inline: predictable across platforms and reachable without a
95
- * modal. A long list scrolls naturally with the page.
96
- */
97
- export declare function Select({ value: valueProp, defaultValue, onValueChange, options, placeholder, disabled, isDark: isDarkProp, style, testID, }: SelectProps): import("react").JSX.Element;
@@ -1,209 +0,0 @@
1
- import { type ReactNode } from "react";
2
- import type { StyleProp, ViewStyle } from "react-native";
3
- export interface StepperProps {
4
- /** Controlled value. Omit and the stepper keeps its own. */
5
- value?: number;
6
- defaultValue?: number;
7
- onValueChange?: (value: number) => void;
8
- min?: number;
9
- max?: number;
10
- step?: number;
11
- disabled?: boolean;
12
- /** Announced by screen readers, e.g. "Guests". */
13
- accessibilityLabel: string;
14
- /** Formats the middle readout; defaults to the plain number. */
15
- formatValue?: (value: number) => string;
16
- style?: StyleProp<ViewStyle>;
17
- isDark?: boolean;
18
- testID?: string;
19
- }
20
- /**
21
- * Minus / value / plus.
22
- *
23
- * The same interaction contract Slider established: `adjustable` with
24
- * increment and decrement accessibility actions, and clamping at min and max
25
- * rather than wrapping or drifting past the range.
26
- */
27
- export declare const Stepper: import("react").ForwardRefExoticComponent<StepperProps & import("react").RefAttributes<any>>;
28
- export interface ToggleProps {
29
- /** Controlled pressed state. Omit and the toggle keeps its own. */
30
- pressed?: boolean;
31
- defaultPressed?: boolean;
32
- onPressedChange?: (pressed: boolean) => void;
33
- /** Equivalent to `pressed`, matching web's Toggle naming. */
34
- selected?: boolean;
35
- icon?: ReactNode;
36
- children?: ReactNode;
37
- variant?: "glass" | "ghost";
38
- size?: "sm" | "md" | "lg";
39
- disabled?: boolean;
40
- /** Required when the toggle has no visible text. */
41
- accessibilityLabel?: string;
42
- style?: StyleProp<ViewStyle>;
43
- isDark?: boolean;
44
- testID?: string;
45
- }
46
- /**
47
- * A button that stays pressed.
48
- *
49
- * Distinct from Switch: this is a button with an on-state (bold, favourite,
50
- * pinned), not a setting. It reports `selected`, which is what web's Toggle
51
- * announces.
52
- */
53
- export declare const Toggle: import("react").ForwardRefExoticComponent<ToggleProps & import("react").RefAttributes<any>>;
54
- export interface ToggleGroupItem {
55
- value: string;
56
- label: string;
57
- icon?: ReactNode;
58
- }
59
- export interface ToggleGroupProps {
60
- items: ToggleGroupItem[];
61
- /** Allow several items on at once. */
62
- multiple?: boolean;
63
- /** Controlled selection. A string for single mode, an array for multiple. */
64
- value?: string | string[];
65
- defaultValue?: string | string[];
66
- onValueChange?: (value: string | string[]) => void;
67
- size?: "sm" | "md" | "lg";
68
- disabled?: boolean;
69
- accessibilityLabel?: string;
70
- style?: StyleProp<ViewStyle>;
71
- isDark?: boolean;
72
- testID?: string;
73
- }
74
- /**
75
- * A row of toggles acting as one choice.
76
- *
77
- * Built from the same pieces as SegmentedControl — one glass container, toggles
78
- * inside it, `glassActive` marking the active ones — but each item carries the
79
- * button styling of Toggle.
80
- */
81
- export declare const ToggleGroup: import("react").ForwardRefExoticComponent<ToggleGroupProps & import("react").RefAttributes<any>>;
82
- export interface InputOTPProps {
83
- /** Controlled code. Omit and the field keeps its own. */
84
- value?: string;
85
- defaultValue?: string;
86
- onChange?: (value: string) => void;
87
- /** Fires once the code reaches `length` characters. */
88
- onComplete?: (value: string) => void;
89
- /** How many digits. */
90
- length?: number;
91
- disabled?: boolean;
92
- accessibilityLabel?: string;
93
- style?: StyleProp<ViewStyle>;
94
- isDark?: boolean;
95
- testID?: string;
96
- }
97
- /**
98
- * A verification-code row.
99
- *
100
- * One real text field drives the boxes. Keeping a single field — rather than N
101
- * inputs — is what makes paste and autofill fill every box in one go, and it is
102
- * what keeps the caret and keyboard behaviour sane across platforms.
103
- */
104
- export declare const InputOTP: import("react").ForwardRefExoticComponent<InputOTPProps & import("react").RefAttributes<any>>;
105
- export interface ButtonGroupItem {
106
- label: string;
107
- onPress: () => void;
108
- disabled?: boolean;
109
- }
110
- export interface ButtonGroupProps {
111
- items: ButtonGroupItem[];
112
- size?: "sm" | "md" | "lg";
113
- /** `attached` shares edges; `segmented` leaves a gap between buttons. */
114
- variant?: "attached" | "segmented";
115
- /** A single handler instead of per-item `onPress`. */
116
- onItemPress?: (item: ButtonGroupItem, index: number) => void;
117
- accessibilityLabel?: string;
118
- style?: StyleProp<ViewStyle>;
119
- isDark?: boolean;
120
- testID?: string;
121
- }
122
- /**
123
- * A connected row of buttons.
124
- *
125
- * Stateless by design: it reports presses and holds no selection, which is what
126
- * separates it from SegmentedControl (a stateful choice) and ToggleGroup.
127
- */
128
- export declare const ButtonGroup: import("react").ForwardRefExoticComponent<ButtonGroupProps & import("react").RefAttributes<any>>;
129
- export interface ColorPickerProps {
130
- /** A palette of hex colours the caller supplies. */
131
- colors?: string[];
132
- /** Controlled value. Omit and the picker keeps its own. */
133
- value?: string;
134
- defaultValue?: string;
135
- onChange?: (color: string) => void;
136
- /** The swatch size. */
137
- size?: "sm" | "md" | "lg";
138
- /** Rows in the palette grid. Defaults to a single row. */
139
- columns?: number;
140
- /** Whether a custom row (hue + picker) appears below the palette. */
141
- allowCustom?: boolean;
142
- disabled?: boolean;
143
- /** The accessible name. */
144
- accessibilityLabel?: string;
145
- style?: StyleProp<ViewStyle>;
146
- isDark?: boolean;
147
- testID?: string;
148
- }
149
- /**
150
- * A colour picker built from Glacia's own parts — no native widget.
151
- *
152
- * The palette is a grid of swatches from the caller's colours; the custom row
153
- * is a hue track drawn as an SVG gradient (the resolver's shapes, so it works
154
- * wherever the charts work) driven by the same Slider mechanics as the rest of
155
- * the library: a drag along the track picks a hue, and a second track saturates
156
- * it. The value is a hex string.
157
- *
158
- * The default palette is a small set of iOS-conventional colours, in case a
159
- * caller wants a picker with no colour knowledge of its own.
160
- */
161
- export declare const DEFAULT_PALETTE: string[];
162
- /** Parses a hex colour into its red, green and blue channels. */
163
- export declare function hexToRgb(hex: string): {
164
- r: number;
165
- g: number;
166
- b: number;
167
- } | null;
168
- /** Builds a hue gradient's colours, sweeping red → orange → … → red. */
169
- export declare function hueGradientColors(): string[];
170
- /** Converts an RGB triple to a hex string. */
171
- export declare function rgbToHex(r: number, g: number, b: number): string;
172
- export declare const ColorPicker: import("react").ForwardRefExoticComponent<ColorPickerProps & import("react").RefAttributes<any>>;
173
- export interface ComboboxOption {
174
- label: string;
175
- value: string;
176
- /** Extra text under the label, if any. */
177
- description?: string;
178
- }
179
- export interface ComboboxProps {
180
- /** The options the user can choose from. */
181
- options: ComboboxOption[];
182
- /** Controlled value. Omit and the combobox keeps its own. */
183
- value?: string;
184
- defaultValue?: string;
185
- onChange?: (value: string) => void;
186
- /** A description of the underlying field. */
187
- label?: string;
188
- placeholder?: string;
189
- disabled?: boolean;
190
- /** Called when the dropdown's empty result shows. */
191
- onEmpty?: () => void;
192
- style?: StyleProp<ViewStyle>;
193
- isDark?: boolean;
194
- testID?: string;
195
- }
196
- /**
197
- * A type-to-search select.
198
- *
199
- * The Input patterns (real TextInput, themed placeholder, `value`/`defaultValue`)
200
- * open a Menu-style glass dropdown whose list filters as the user types — every
201
- * keystroke re-filters the options, so the visible set genuinely shrinks, never
202
- * a list that stays put and pretends to search.
203
- *
204
- * The filter is a case-insensitive substring match on label and description. An
205
- * empty result shows an explicit empty row, so the user sees a search that found
206
- * nothing rather than a list that silently went blank. The dropdown stays open
207
- * until an option is picked or the field loses focus.
208
- */
209
- export declare const Combobox: import("react").ForwardRefExoticComponent<ComboboxProps & import("react").RefAttributes<any>>;