fluentglass 0.2.6

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 (414) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +169 -0
  3. package/lib/commonjs/assets/fonts/Inter-Black.ttf +0 -0
  4. package/lib/commonjs/assets/fonts/Inter-Bold.ttf +0 -0
  5. package/lib/commonjs/assets/fonts/Inter-ExtraBold.ttf +0 -0
  6. package/lib/commonjs/assets/fonts/Inter-Medium.ttf +0 -0
  7. package/lib/commonjs/assets/fonts/Inter-Regular.ttf +0 -0
  8. package/lib/commonjs/assets/fonts/Inter-SemiBold.ttf +0 -0
  9. package/lib/commonjs/components/FluentGlass.js +94 -0
  10. package/lib/commonjs/components/FluentGlass.js.map +1 -0
  11. package/lib/commonjs/components/FluentGlassAlert.js +126 -0
  12. package/lib/commonjs/components/FluentGlassAlert.js.map +1 -0
  13. package/lib/commonjs/components/FluentGlassBadge.js +124 -0
  14. package/lib/commonjs/components/FluentGlassBadge.js.map +1 -0
  15. package/lib/commonjs/components/FluentGlassBarChart.js +287 -0
  16. package/lib/commonjs/components/FluentGlassBarChart.js.map +1 -0
  17. package/lib/commonjs/components/FluentGlassBreadcrumb.js +155 -0
  18. package/lib/commonjs/components/FluentGlassBreadcrumb.js.map +1 -0
  19. package/lib/commonjs/components/FluentGlassButton.js +175 -0
  20. package/lib/commonjs/components/FluentGlassButton.js.map +1 -0
  21. package/lib/commonjs/components/FluentGlassCalendarWidget.js +73 -0
  22. package/lib/commonjs/components/FluentGlassCalendarWidget.js.map +1 -0
  23. package/lib/commonjs/components/FluentGlassCard.js +195 -0
  24. package/lib/commonjs/components/FluentGlassCard.js.map +1 -0
  25. package/lib/commonjs/components/FluentGlassCheckbox.js +121 -0
  26. package/lib/commonjs/components/FluentGlassCheckbox.js.map +1 -0
  27. package/lib/commonjs/components/FluentGlassClockWidget.js +80 -0
  28. package/lib/commonjs/components/FluentGlassClockWidget.js.map +1 -0
  29. package/lib/commonjs/components/FluentGlassCodeBlock.js +239 -0
  30. package/lib/commonjs/components/FluentGlassCodeBlock.js.map +1 -0
  31. package/lib/commonjs/components/FluentGlassContainer.js +52 -0
  32. package/lib/commonjs/components/FluentGlassContainer.js.map +1 -0
  33. package/lib/commonjs/components/FluentGlassCrossfade.js +118 -0
  34. package/lib/commonjs/components/FluentGlassCrossfade.js.map +1 -0
  35. package/lib/commonjs/components/FluentGlassDateInput.js +176 -0
  36. package/lib/commonjs/components/FluentGlassDateInput.js.map +1 -0
  37. package/lib/commonjs/components/FluentGlassDatePicker.js +271 -0
  38. package/lib/commonjs/components/FluentGlassDatePicker.js.map +1 -0
  39. package/lib/commonjs/components/FluentGlassDialog.js +169 -0
  40. package/lib/commonjs/components/FluentGlassDialog.js.map +1 -0
  41. package/lib/commonjs/components/FluentGlassDock.js +187 -0
  42. package/lib/commonjs/components/FluentGlassDock.js.map +1 -0
  43. package/lib/commonjs/components/FluentGlassDropdown.js +349 -0
  44. package/lib/commonjs/components/FluentGlassDropdown.js.map +1 -0
  45. package/lib/commonjs/components/FluentGlassEmailInput.js +43 -0
  46. package/lib/commonjs/components/FluentGlassEmailInput.js.map +1 -0
  47. package/lib/commonjs/components/FluentGlassInput.js +83 -0
  48. package/lib/commonjs/components/FluentGlassInput.js.map +1 -0
  49. package/lib/commonjs/components/FluentGlassLabeledInput.js +64 -0
  50. package/lib/commonjs/components/FluentGlassLabeledInput.js.map +1 -0
  51. package/lib/commonjs/components/FluentGlassLayout.js +106 -0
  52. package/lib/commonjs/components/FluentGlassLayout.js.map +1 -0
  53. package/lib/commonjs/components/FluentGlassPasswordInput.js +60 -0
  54. package/lib/commonjs/components/FluentGlassPasswordInput.js.map +1 -0
  55. package/lib/commonjs/components/FluentGlassPopover.js +75 -0
  56. package/lib/commonjs/components/FluentGlassPopover.js.map +1 -0
  57. package/lib/commonjs/components/FluentGlassResponsiveRow.js +74 -0
  58. package/lib/commonjs/components/FluentGlassResponsiveRow.js.map +1 -0
  59. package/lib/commonjs/components/FluentGlassScrollArea.js +101 -0
  60. package/lib/commonjs/components/FluentGlassScrollArea.js.map +1 -0
  61. package/lib/commonjs/components/FluentGlassSegmentedControl.js +126 -0
  62. package/lib/commonjs/components/FluentGlassSegmentedControl.js.map +1 -0
  63. package/lib/commonjs/components/FluentGlassSelect.js +155 -0
  64. package/lib/commonjs/components/FluentGlassSelect.js.map +1 -0
  65. package/lib/commonjs/components/FluentGlassSeparator.js +62 -0
  66. package/lib/commonjs/components/FluentGlassSeparator.js.map +1 -0
  67. package/lib/commonjs/components/FluentGlassSheet.js +189 -0
  68. package/lib/commonjs/components/FluentGlassSheet.js.map +1 -0
  69. package/lib/commonjs/components/FluentGlassSidebar.js +358 -0
  70. package/lib/commonjs/components/FluentGlassSidebar.js.map +1 -0
  71. package/lib/commonjs/components/FluentGlassSimpleCard.js +56 -0
  72. package/lib/commonjs/components/FluentGlassSimpleCard.js.map +1 -0
  73. package/lib/commonjs/components/FluentGlassSkeleton.js +52 -0
  74. package/lib/commonjs/components/FluentGlassSkeleton.js.map +1 -0
  75. package/lib/commonjs/components/FluentGlassSlider.js +197 -0
  76. package/lib/commonjs/components/FluentGlassSlider.js.map +1 -0
  77. package/lib/commonjs/components/FluentGlassStatWidget.js +133 -0
  78. package/lib/commonjs/components/FluentGlassStatWidget.js.map +1 -0
  79. package/lib/commonjs/components/FluentGlassStatusIndicator.js +89 -0
  80. package/lib/commonjs/components/FluentGlassStatusIndicator.js.map +1 -0
  81. package/lib/commonjs/components/FluentGlassSwitch.js +126 -0
  82. package/lib/commonjs/components/FluentGlassSwitch.js.map +1 -0
  83. package/lib/commonjs/components/FluentGlassTable.js +163 -0
  84. package/lib/commonjs/components/FluentGlassTable.js.map +1 -0
  85. package/lib/commonjs/components/FluentGlassTag.js +109 -0
  86. package/lib/commonjs/components/FluentGlassTag.js.map +1 -0
  87. package/lib/commonjs/components/FluentGlassTextInput.js +90 -0
  88. package/lib/commonjs/components/FluentGlassTextInput.js.map +1 -0
  89. package/lib/commonjs/components/FluentGlassTimeline.js +334 -0
  90. package/lib/commonjs/components/FluentGlassTimeline.js.map +1 -0
  91. package/lib/commonjs/components/FluentGlassWeatherWidget.js +72 -0
  92. package/lib/commonjs/components/FluentGlassWeatherWidget.js.map +1 -0
  93. package/lib/commonjs/components/index.js +308 -0
  94. package/lib/commonjs/components/index.js.map +1 -0
  95. package/lib/commonjs/fonts.js +33 -0
  96. package/lib/commonjs/fonts.js.map +1 -0
  97. package/lib/commonjs/hooks/useBreakpoint.js +57 -0
  98. package/lib/commonjs/hooks/useBreakpoint.js.map +1 -0
  99. package/lib/commonjs/index.js +462 -0
  100. package/lib/commonjs/index.js.map +1 -0
  101. package/lib/commonjs/package.json +1 -0
  102. package/lib/commonjs/theme/FluentGlassProvider.js +84 -0
  103. package/lib/commonjs/theme/FluentGlassProvider.js.map +1 -0
  104. package/lib/commonjs/theme/defaultTheme.js +55 -0
  105. package/lib/commonjs/theme/defaultTheme.js.map +1 -0
  106. package/lib/commonjs/theme/resolvers.js +118 -0
  107. package/lib/commonjs/theme/resolvers.js.map +1 -0
  108. package/lib/commonjs/theme/tokens.js +239 -0
  109. package/lib/commonjs/theme/tokens.js.map +1 -0
  110. package/lib/commonjs/theme/typography.js +50 -0
  111. package/lib/commonjs/theme/typography.js.map +1 -0
  112. package/lib/commonjs/theme/useTheme.js +22 -0
  113. package/lib/commonjs/theme/useTheme.js.map +1 -0
  114. package/lib/commonjs/types/components.js +6 -0
  115. package/lib/commonjs/types/components.js.map +1 -0
  116. package/lib/commonjs/types/theme.js +6 -0
  117. package/lib/commonjs/types/theme.js.map +1 -0
  118. package/lib/commonjs/utils/colors.js +59 -0
  119. package/lib/commonjs/utils/colors.js.map +1 -0
  120. package/lib/commonjs/utils/responsive.js +126 -0
  121. package/lib/commonjs/utils/responsive.js.map +1 -0
  122. package/lib/module/assets/fonts/Inter-Black.ttf +0 -0
  123. package/lib/module/assets/fonts/Inter-Bold.ttf +0 -0
  124. package/lib/module/assets/fonts/Inter-ExtraBold.ttf +0 -0
  125. package/lib/module/assets/fonts/Inter-Medium.ttf +0 -0
  126. package/lib/module/assets/fonts/Inter-Regular.ttf +0 -0
  127. package/lib/module/assets/fonts/Inter-SemiBold.ttf +0 -0
  128. package/lib/module/components/FluentGlass.js +89 -0
  129. package/lib/module/components/FluentGlass.js.map +1 -0
  130. package/lib/module/components/FluentGlassAlert.js +121 -0
  131. package/lib/module/components/FluentGlassAlert.js.map +1 -0
  132. package/lib/module/components/FluentGlassBadge.js +119 -0
  133. package/lib/module/components/FluentGlassBadge.js.map +1 -0
  134. package/lib/module/components/FluentGlassBarChart.js +281 -0
  135. package/lib/module/components/FluentGlassBarChart.js.map +1 -0
  136. package/lib/module/components/FluentGlassBreadcrumb.js +150 -0
  137. package/lib/module/components/FluentGlassBreadcrumb.js.map +1 -0
  138. package/lib/module/components/FluentGlassButton.js +169 -0
  139. package/lib/module/components/FluentGlassButton.js.map +1 -0
  140. package/lib/module/components/FluentGlassCalendarWidget.js +68 -0
  141. package/lib/module/components/FluentGlassCalendarWidget.js.map +1 -0
  142. package/lib/module/components/FluentGlassCard.js +190 -0
  143. package/lib/module/components/FluentGlassCard.js.map +1 -0
  144. package/lib/module/components/FluentGlassCheckbox.js +115 -0
  145. package/lib/module/components/FluentGlassCheckbox.js.map +1 -0
  146. package/lib/module/components/FluentGlassClockWidget.js +74 -0
  147. package/lib/module/components/FluentGlassClockWidget.js.map +1 -0
  148. package/lib/module/components/FluentGlassCodeBlock.js +233 -0
  149. package/lib/module/components/FluentGlassCodeBlock.js.map +1 -0
  150. package/lib/module/components/FluentGlassContainer.js +47 -0
  151. package/lib/module/components/FluentGlassContainer.js.map +1 -0
  152. package/lib/module/components/FluentGlassCrossfade.js +112 -0
  153. package/lib/module/components/FluentGlassCrossfade.js.map +1 -0
  154. package/lib/module/components/FluentGlassDateInput.js +170 -0
  155. package/lib/module/components/FluentGlassDateInput.js.map +1 -0
  156. package/lib/module/components/FluentGlassDatePicker.js +265 -0
  157. package/lib/module/components/FluentGlassDatePicker.js.map +1 -0
  158. package/lib/module/components/FluentGlassDialog.js +163 -0
  159. package/lib/module/components/FluentGlassDialog.js.map +1 -0
  160. package/lib/module/components/FluentGlassDock.js +181 -0
  161. package/lib/module/components/FluentGlassDock.js.map +1 -0
  162. package/lib/module/components/FluentGlassDropdown.js +343 -0
  163. package/lib/module/components/FluentGlassDropdown.js.map +1 -0
  164. package/lib/module/components/FluentGlassEmailInput.js +38 -0
  165. package/lib/module/components/FluentGlassEmailInput.js.map +1 -0
  166. package/lib/module/components/FluentGlassInput.js +78 -0
  167. package/lib/module/components/FluentGlassInput.js.map +1 -0
  168. package/lib/module/components/FluentGlassLabeledInput.js +59 -0
  169. package/lib/module/components/FluentGlassLabeledInput.js.map +1 -0
  170. package/lib/module/components/FluentGlassLayout.js +101 -0
  171. package/lib/module/components/FluentGlassLayout.js.map +1 -0
  172. package/lib/module/components/FluentGlassPasswordInput.js +54 -0
  173. package/lib/module/components/FluentGlassPasswordInput.js.map +1 -0
  174. package/lib/module/components/FluentGlassPopover.js +70 -0
  175. package/lib/module/components/FluentGlassPopover.js.map +1 -0
  176. package/lib/module/components/FluentGlassResponsiveRow.js +71 -0
  177. package/lib/module/components/FluentGlassResponsiveRow.js.map +1 -0
  178. package/lib/module/components/FluentGlassScrollArea.js +95 -0
  179. package/lib/module/components/FluentGlassScrollArea.js.map +1 -0
  180. package/lib/module/components/FluentGlassSegmentedControl.js +120 -0
  181. package/lib/module/components/FluentGlassSegmentedControl.js.map +1 -0
  182. package/lib/module/components/FluentGlassSelect.js +149 -0
  183. package/lib/module/components/FluentGlassSelect.js.map +1 -0
  184. package/lib/module/components/FluentGlassSeparator.js +57 -0
  185. package/lib/module/components/FluentGlassSeparator.js.map +1 -0
  186. package/lib/module/components/FluentGlassSheet.js +183 -0
  187. package/lib/module/components/FluentGlassSheet.js.map +1 -0
  188. package/lib/module/components/FluentGlassSidebar.js +351 -0
  189. package/lib/module/components/FluentGlassSidebar.js.map +1 -0
  190. package/lib/module/components/FluentGlassSimpleCard.js +51 -0
  191. package/lib/module/components/FluentGlassSimpleCard.js.map +1 -0
  192. package/lib/module/components/FluentGlassSkeleton.js +46 -0
  193. package/lib/module/components/FluentGlassSkeleton.js.map +1 -0
  194. package/lib/module/components/FluentGlassSlider.js +191 -0
  195. package/lib/module/components/FluentGlassSlider.js.map +1 -0
  196. package/lib/module/components/FluentGlassStatWidget.js +128 -0
  197. package/lib/module/components/FluentGlassStatWidget.js.map +1 -0
  198. package/lib/module/components/FluentGlassStatusIndicator.js +84 -0
  199. package/lib/module/components/FluentGlassStatusIndicator.js.map +1 -0
  200. package/lib/module/components/FluentGlassSwitch.js +122 -0
  201. package/lib/module/components/FluentGlassSwitch.js.map +1 -0
  202. package/lib/module/components/FluentGlassTable.js +158 -0
  203. package/lib/module/components/FluentGlassTable.js.map +1 -0
  204. package/lib/module/components/FluentGlassTag.js +103 -0
  205. package/lib/module/components/FluentGlassTag.js.map +1 -0
  206. package/lib/module/components/FluentGlassTextInput.js +85 -0
  207. package/lib/module/components/FluentGlassTextInput.js.map +1 -0
  208. package/lib/module/components/FluentGlassTimeline.js +327 -0
  209. package/lib/module/components/FluentGlassTimeline.js.map +1 -0
  210. package/lib/module/components/FluentGlassWeatherWidget.js +67 -0
  211. package/lib/module/components/FluentGlassWeatherWidget.js.map +1 -0
  212. package/lib/module/components/index.js +45 -0
  213. package/lib/module/components/index.js.map +1 -0
  214. package/lib/module/fonts.js +26 -0
  215. package/lib/module/fonts.js.map +1 -0
  216. package/lib/module/hooks/useBreakpoint.js +54 -0
  217. package/lib/module/hooks/useBreakpoint.js.map +1 -0
  218. package/lib/module/index.js +30 -0
  219. package/lib/module/index.js.map +1 -0
  220. package/lib/module/theme/FluentGlassProvider.js +77 -0
  221. package/lib/module/theme/FluentGlassProvider.js.map +1 -0
  222. package/lib/module/theme/defaultTheme.js +51 -0
  223. package/lib/module/theme/defaultTheme.js.map +1 -0
  224. package/lib/module/theme/resolvers.js +110 -0
  225. package/lib/module/theme/resolvers.js.map +1 -0
  226. package/lib/module/theme/tokens.js +235 -0
  227. package/lib/module/theme/tokens.js.map +1 -0
  228. package/lib/module/theme/typography.js +45 -0
  229. package/lib/module/theme/typography.js.map +1 -0
  230. package/lib/module/theme/useTheme.js +18 -0
  231. package/lib/module/theme/useTheme.js.map +1 -0
  232. package/lib/module/types/components.js +4 -0
  233. package/lib/module/types/components.js.map +1 -0
  234. package/lib/module/types/theme.js +4 -0
  235. package/lib/module/types/theme.js.map +1 -0
  236. package/lib/module/utils/colors.js +55 -0
  237. package/lib/module/utils/colors.js.map +1 -0
  238. package/lib/module/utils/responsive.js +116 -0
  239. package/lib/module/utils/responsive.js.map +1 -0
  240. package/lib/typescript/components/FluentGlass.d.ts +25 -0
  241. package/lib/typescript/components/FluentGlass.d.ts.map +1 -0
  242. package/lib/typescript/components/FluentGlassAlert.d.ts +13 -0
  243. package/lib/typescript/components/FluentGlassAlert.d.ts.map +1 -0
  244. package/lib/typescript/components/FluentGlassBadge.d.ts +22 -0
  245. package/lib/typescript/components/FluentGlassBadge.d.ts.map +1 -0
  246. package/lib/typescript/components/FluentGlassBarChart.d.ts +30 -0
  247. package/lib/typescript/components/FluentGlassBarChart.d.ts.map +1 -0
  248. package/lib/typescript/components/FluentGlassBreadcrumb.d.ts +22 -0
  249. package/lib/typescript/components/FluentGlassBreadcrumb.d.ts.map +1 -0
  250. package/lib/typescript/components/FluentGlassButton.d.ts +27 -0
  251. package/lib/typescript/components/FluentGlassButton.d.ts.map +1 -0
  252. package/lib/typescript/components/FluentGlassCalendarWidget.d.ts +13 -0
  253. package/lib/typescript/components/FluentGlassCalendarWidget.d.ts.map +1 -0
  254. package/lib/typescript/components/FluentGlassCard.d.ts +30 -0
  255. package/lib/typescript/components/FluentGlassCard.d.ts.map +1 -0
  256. package/lib/typescript/components/FluentGlassCheckbox.d.ts +14 -0
  257. package/lib/typescript/components/FluentGlassCheckbox.d.ts.map +1 -0
  258. package/lib/typescript/components/FluentGlassClockWidget.d.ts +11 -0
  259. package/lib/typescript/components/FluentGlassClockWidget.d.ts.map +1 -0
  260. package/lib/typescript/components/FluentGlassCodeBlock.d.ts +11 -0
  261. package/lib/typescript/components/FluentGlassCodeBlock.d.ts.map +1 -0
  262. package/lib/typescript/components/FluentGlassContainer.d.ts +22 -0
  263. package/lib/typescript/components/FluentGlassContainer.d.ts.map +1 -0
  264. package/lib/typescript/components/FluentGlassCrossfade.d.ts +24 -0
  265. package/lib/typescript/components/FluentGlassCrossfade.d.ts.map +1 -0
  266. package/lib/typescript/components/FluentGlassDateInput.d.ts +18 -0
  267. package/lib/typescript/components/FluentGlassDateInput.d.ts.map +1 -0
  268. package/lib/typescript/components/FluentGlassDatePicker.d.ts +9 -0
  269. package/lib/typescript/components/FluentGlassDatePicker.d.ts.map +1 -0
  270. package/lib/typescript/components/FluentGlassDialog.d.ts +18 -0
  271. package/lib/typescript/components/FluentGlassDialog.d.ts.map +1 -0
  272. package/lib/typescript/components/FluentGlassDock.d.ts +19 -0
  273. package/lib/typescript/components/FluentGlassDock.d.ts.map +1 -0
  274. package/lib/typescript/components/FluentGlassDropdown.d.ts +23 -0
  275. package/lib/typescript/components/FluentGlassDropdown.d.ts.map +1 -0
  276. package/lib/typescript/components/FluentGlassEmailInput.d.ts +17 -0
  277. package/lib/typescript/components/FluentGlassEmailInput.d.ts.map +1 -0
  278. package/lib/typescript/components/FluentGlassInput.d.ts +12 -0
  279. package/lib/typescript/components/FluentGlassInput.d.ts.map +1 -0
  280. package/lib/typescript/components/FluentGlassLabeledInput.d.ts +19 -0
  281. package/lib/typescript/components/FluentGlassLabeledInput.d.ts.map +1 -0
  282. package/lib/typescript/components/FluentGlassLayout.d.ts +11 -0
  283. package/lib/typescript/components/FluentGlassLayout.d.ts.map +1 -0
  284. package/lib/typescript/components/FluentGlassPasswordInput.d.ts +15 -0
  285. package/lib/typescript/components/FluentGlassPasswordInput.d.ts.map +1 -0
  286. package/lib/typescript/components/FluentGlassPopover.d.ts +17 -0
  287. package/lib/typescript/components/FluentGlassPopover.d.ts.map +1 -0
  288. package/lib/typescript/components/FluentGlassResponsiveRow.d.ts +25 -0
  289. package/lib/typescript/components/FluentGlassResponsiveRow.d.ts.map +1 -0
  290. package/lib/typescript/components/FluentGlassScrollArea.d.ts +16 -0
  291. package/lib/typescript/components/FluentGlassScrollArea.d.ts.map +1 -0
  292. package/lib/typescript/components/FluentGlassSegmentedControl.d.ts +15 -0
  293. package/lib/typescript/components/FluentGlassSegmentedControl.d.ts.map +1 -0
  294. package/lib/typescript/components/FluentGlassSelect.d.ts +23 -0
  295. package/lib/typescript/components/FluentGlassSelect.d.ts.map +1 -0
  296. package/lib/typescript/components/FluentGlassSeparator.d.ts +13 -0
  297. package/lib/typescript/components/FluentGlassSeparator.d.ts.map +1 -0
  298. package/lib/typescript/components/FluentGlassSheet.d.ts +11 -0
  299. package/lib/typescript/components/FluentGlassSheet.d.ts.map +1 -0
  300. package/lib/typescript/components/FluentGlassSidebar.d.ts +44 -0
  301. package/lib/typescript/components/FluentGlassSidebar.d.ts.map +1 -0
  302. package/lib/typescript/components/FluentGlassSimpleCard.d.ts +19 -0
  303. package/lib/typescript/components/FluentGlassSimpleCard.d.ts.map +1 -0
  304. package/lib/typescript/components/FluentGlassSkeleton.d.ts +14 -0
  305. package/lib/typescript/components/FluentGlassSkeleton.d.ts.map +1 -0
  306. package/lib/typescript/components/FluentGlassSlider.d.ts +31 -0
  307. package/lib/typescript/components/FluentGlassSlider.d.ts.map +1 -0
  308. package/lib/typescript/components/FluentGlassStatWidget.d.ts +17 -0
  309. package/lib/typescript/components/FluentGlassStatWidget.d.ts.map +1 -0
  310. package/lib/typescript/components/FluentGlassStatusIndicator.d.ts +16 -0
  311. package/lib/typescript/components/FluentGlassStatusIndicator.d.ts.map +1 -0
  312. package/lib/typescript/components/FluentGlassSwitch.d.ts +13 -0
  313. package/lib/typescript/components/FluentGlassSwitch.d.ts.map +1 -0
  314. package/lib/typescript/components/FluentGlassTable.d.ts +50 -0
  315. package/lib/typescript/components/FluentGlassTable.d.ts.map +1 -0
  316. package/lib/typescript/components/FluentGlassTag.d.ts +18 -0
  317. package/lib/typescript/components/FluentGlassTag.d.ts.map +1 -0
  318. package/lib/typescript/components/FluentGlassTextInput.d.ts +21 -0
  319. package/lib/typescript/components/FluentGlassTextInput.d.ts.map +1 -0
  320. package/lib/typescript/components/FluentGlassTimeline.d.ts +27 -0
  321. package/lib/typescript/components/FluentGlassTimeline.d.ts.map +1 -0
  322. package/lib/typescript/components/FluentGlassWeatherWidget.d.ts +13 -0
  323. package/lib/typescript/components/FluentGlassWeatherWidget.d.ts.map +1 -0
  324. package/lib/typescript/components/index.d.ts +43 -0
  325. package/lib/typescript/components/index.d.ts.map +1 -0
  326. package/lib/typescript/fonts.d.ts +13 -0
  327. package/lib/typescript/fonts.d.ts.map +1 -0
  328. package/lib/typescript/hooks/useBreakpoint.d.ts +26 -0
  329. package/lib/typescript/hooks/useBreakpoint.d.ts.map +1 -0
  330. package/lib/typescript/index.d.ts +18 -0
  331. package/lib/typescript/index.d.ts.map +1 -0
  332. package/lib/typescript/theme/FluentGlassProvider.d.ts +21 -0
  333. package/lib/typescript/theme/FluentGlassProvider.d.ts.map +1 -0
  334. package/lib/typescript/theme/defaultTheme.d.ts +10 -0
  335. package/lib/typescript/theme/defaultTheme.d.ts.map +1 -0
  336. package/lib/typescript/theme/resolvers.d.ts +55 -0
  337. package/lib/typescript/theme/resolvers.d.ts.map +1 -0
  338. package/lib/typescript/theme/tokens.d.ts +27 -0
  339. package/lib/typescript/theme/tokens.d.ts.map +1 -0
  340. package/lib/typescript/theme/typography.d.ts +27 -0
  341. package/lib/typescript/theme/typography.d.ts.map +1 -0
  342. package/lib/typescript/theme/useTheme.d.ts +12 -0
  343. package/lib/typescript/theme/useTheme.d.ts.map +1 -0
  344. package/lib/typescript/types/components.d.ts +32 -0
  345. package/lib/typescript/types/components.d.ts.map +1 -0
  346. package/lib/typescript/types/theme.d.ts +79 -0
  347. package/lib/typescript/types/theme.d.ts.map +1 -0
  348. package/lib/typescript/utils/colors.d.ts +3 -0
  349. package/lib/typescript/utils/colors.d.ts.map +1 -0
  350. package/lib/typescript/utils/responsive.d.ts +62 -0
  351. package/lib/typescript/utils/responsive.d.ts.map +1 -0
  352. package/package.json +90 -0
  353. package/src/assets/fonts/Inter-Black.ttf +0 -0
  354. package/src/assets/fonts/Inter-Bold.ttf +0 -0
  355. package/src/assets/fonts/Inter-ExtraBold.ttf +0 -0
  356. package/src/assets/fonts/Inter-Medium.ttf +0 -0
  357. package/src/assets/fonts/Inter-Regular.ttf +0 -0
  358. package/src/assets/fonts/Inter-SemiBold.ttf +0 -0
  359. package/src/components/FluentGlass.tsx +103 -0
  360. package/src/components/FluentGlassAlert.tsx +126 -0
  361. package/src/components/FluentGlassBadge.tsx +109 -0
  362. package/src/components/FluentGlassBarChart.tsx +295 -0
  363. package/src/components/FluentGlassBreadcrumb.tsx +173 -0
  364. package/src/components/FluentGlassButton.tsx +169 -0
  365. package/src/components/FluentGlassCalendarWidget.tsx +55 -0
  366. package/src/components/FluentGlassCard.tsx +186 -0
  367. package/src/components/FluentGlassCheckbox.tsx +138 -0
  368. package/src/components/FluentGlassClockWidget.tsx +61 -0
  369. package/src/components/FluentGlassCodeBlock.tsx +241 -0
  370. package/src/components/FluentGlassContainer.tsx +63 -0
  371. package/src/components/FluentGlassCrossfade.tsx +122 -0
  372. package/src/components/FluentGlassDateInput.tsx +182 -0
  373. package/src/components/FluentGlassDatePicker.tsx +224 -0
  374. package/src/components/FluentGlassDialog.tsx +153 -0
  375. package/src/components/FluentGlassDock.tsx +194 -0
  376. package/src/components/FluentGlassDropdown.tsx +382 -0
  377. package/src/components/FluentGlassEmailInput.tsx +46 -0
  378. package/src/components/FluentGlassInput.tsx +77 -0
  379. package/src/components/FluentGlassLabeledInput.tsx +63 -0
  380. package/src/components/FluentGlassLayout.tsx +89 -0
  381. package/src/components/FluentGlassPasswordInput.tsx +59 -0
  382. package/src/components/FluentGlassPopover.tsx +74 -0
  383. package/src/components/FluentGlassResponsiveRow.tsx +76 -0
  384. package/src/components/FluentGlassScrollArea.tsx +110 -0
  385. package/src/components/FluentGlassSegmentedControl.tsx +140 -0
  386. package/src/components/FluentGlassSelect.tsx +139 -0
  387. package/src/components/FluentGlassSeparator.tsx +54 -0
  388. package/src/components/FluentGlassSheet.tsx +183 -0
  389. package/src/components/FluentGlassSidebar.tsx +349 -0
  390. package/src/components/FluentGlassSimpleCard.tsx +59 -0
  391. package/src/components/FluentGlassSkeleton.tsx +69 -0
  392. package/src/components/FluentGlassSlider.tsx +202 -0
  393. package/src/components/FluentGlassStatWidget.tsx +107 -0
  394. package/src/components/FluentGlassStatusIndicator.tsx +82 -0
  395. package/src/components/FluentGlassSwitch.tsx +130 -0
  396. package/src/components/FluentGlassTable.tsx +145 -0
  397. package/src/components/FluentGlassTag.tsx +98 -0
  398. package/src/components/FluentGlassTextInput.tsx +87 -0
  399. package/src/components/FluentGlassTimeline.tsx +335 -0
  400. package/src/components/FluentGlassWeatherWidget.tsx +54 -0
  401. package/src/components/index.ts +42 -0
  402. package/src/fonts.ts +24 -0
  403. package/src/hooks/useBreakpoint.ts +55 -0
  404. package/src/index.ts +97 -0
  405. package/src/theme/FluentGlassProvider.tsx +82 -0
  406. package/src/theme/defaultTheme.ts +44 -0
  407. package/src/theme/resolvers.ts +115 -0
  408. package/src/theme/tokens.ts +200 -0
  409. package/src/theme/typography.ts +41 -0
  410. package/src/theme/useTheme.ts +17 -0
  411. package/src/types/components.ts +47 -0
  412. package/src/types/theme.ts +82 -0
  413. package/src/utils/colors.ts +55 -0
  414. package/src/utils/responsive.ts +110 -0
@@ -0,0 +1,107 @@
1
+ import React from 'react';
2
+ import { StyleSheet, View, Text, StyleProp, ViewStyle } from 'react-native';
3
+ import FluentGlass from './FluentGlass';
4
+ import useTheme from '../theme/useTheme';
5
+ import { resolveSize, resolveColorScheme, resolveBackwardCompat, resolveRadius } from '../theme/resolvers';
6
+ import { FluentGlassBaseProps } from '../types/components';
7
+
8
+ export interface FluentGlassStatWidgetProps extends FluentGlassBaseProps {
9
+ label?: string;
10
+ value?: string;
11
+ change?: string;
12
+ trend?: 'up' | 'down';
13
+ icon?: string;
14
+ style?: StyleProp<ViewStyle>;
15
+ }
16
+
17
+ /**
18
+ * FluentGlassStatWidget (Molecule)
19
+ * KPI card with value, label, and formatted change indicator.
20
+ */
21
+ export default function FluentGlassStatWidget({ label = 'Metric',
22
+ value = '0',
23
+ change = '0%',
24
+ trend = 'up',
25
+ icon = '📊',
26
+ style,
27
+ // New standardized props
28
+ size,
29
+ colorScheme,
30
+ blur,
31
+ radius, }: FluentGlassStatWidgetProps) {
32
+ const theme = useTheme();
33
+ const sizeConfig = resolveSize(theme, size || theme.defaults.size);
34
+ const compat = resolveBackwardCompat({ colorScheme, blur });
35
+ const resolvedScheme = compat.colorScheme || theme.defaults.colorScheme;
36
+ const resolvedRadius = resolveRadius(theme, radius || 'lg');
37
+
38
+ const isUp = trend === 'up';
39
+ const trendColor = isUp ? theme.colors.positive : theme.colors.negative;
40
+
41
+ return (
42
+ <FluentGlass
43
+ accessible={true}
44
+ accessibilityLabel={[label, value].filter(Boolean).join(': ')}
45
+ style={[styles.statCard, style]}
46
+ colorScheme={resolvedScheme}
47
+ blur={compat.blur || 'medium'}
48
+ radius={radius}
49
+ borderRadius={resolvedRadius}
50
+ borderOpacity={0.2}
51
+ >
52
+ <View style={[styles.statContent, { padding: sizeConfig.paddingHorizontal }]}>
53
+ {/* Header: Label + Icon */}
54
+ <View style={[styles.statHeader, { marginBottom: sizeConfig.gap }]}>
55
+ <Text style={[styles.statLabel, { color: theme.colors.textSecondary, fontSize: sizeConfig.fontSize - 1, fontFamily: theme.typography.semiBold }]}>{label}</Text>
56
+ <Text style={[styles.statIcon, { fontSize: sizeConfig.iconSize, color: theme.colors.textSecondary }]}>{icon}</Text>
57
+ </View>
58
+
59
+ {/* Value */}
60
+ <Text style={[styles.statValue, { color: theme.colors.textPrimary, fontSize: sizeConfig.fontSize * 1.8, marginBottom: (sizeConfig.gap ?? 0) / 2, fontFamily: theme.typography.bold }]}>{value}</Text>
61
+
62
+ {/* Change Indicator */}
63
+ <View style={[styles.statChange, { gap: (sizeConfig.gap ?? 0) / 2 }]}>
64
+ <Text style={[styles.statArrow, { color: trendColor, fontFamily: theme.typography.bold }]}>
65
+ {isUp ? '↑' : '↓'}
66
+ </Text>
67
+ <Text style={[styles.statChangeText, { color: trendColor, fontSize: sizeConfig.fontSize - 2, fontFamily: theme.typography.medium }]}>
68
+ {change} vs last period
69
+ </Text>
70
+ </View>
71
+ </View>
72
+ </FluentGlass>
73
+ );
74
+ }
75
+
76
+ const styles = StyleSheet.create({
77
+ statCard: {
78
+ flex: 1,
79
+ minWidth: 140,
80
+ },
81
+ statContent: {
82
+ padding: 16,
83
+ },
84
+ statHeader: {
85
+ flexDirection: 'row',
86
+ justifyContent: 'space-between',
87
+ alignItems: 'center',
88
+ },
89
+ statLabel: {
90
+ fontWeight: '600',
91
+ },
92
+ statIcon: {
93
+ },
94
+ statValue: {
95
+ fontWeight: '700',
96
+ },
97
+ statChange: {
98
+ flexDirection: 'row',
99
+ alignItems: 'center',
100
+ },
101
+ statArrow: {
102
+ fontWeight: '700',
103
+ },
104
+ statChangeText: {
105
+ fontWeight: '500',
106
+ },
107
+ });
@@ -0,0 +1,82 @@
1
+ import React from 'react';
2
+ import { StyleSheet, Text, View, StyleProp, ViewStyle, TextStyle } from 'react-native';
3
+ import FluentGlass from './FluentGlass';
4
+ import useTheme from '../theme/useTheme';
5
+
6
+ export interface FluentGlassStatusIndicatorProps {
7
+ label?: string;
8
+ status?: 'online' | 'away' | 'offline';
9
+ color?: string;
10
+ style?: StyleProp<ViewStyle>;
11
+ textStyle?: StyleProp<TextStyle>;
12
+ }
13
+
14
+ /**
15
+ * FluentGlassStatusIndicator (Atom)
16
+ * Status pill with a colored dot and label.
17
+ * Presets: 'online' (green), 'away' (amber), 'offline' (red), or custom via `color` prop.
18
+ */
19
+ export default function FluentGlassStatusIndicator({ label,
20
+ status,
21
+ color,
22
+ style,
23
+ textStyle, }: FluentGlassStatusIndicatorProps) {
24
+ const { colors, typography } = useTheme();
25
+
26
+ const STATUS_COLORS: Record<string, string> = {
27
+ online: colors.positive, // Emerald
28
+ away: colors.warning, // Amber
29
+ offline: colors.negative, // Red
30
+ };
31
+
32
+ const dotColor = color || (status && STATUS_COLORS[status]) || STATUS_COLORS.offline;
33
+
34
+ return (
35
+ <FluentGlass
36
+ accessible={true}
37
+ accessibilityLabel={label || (status && STATUS_LABELS[status]) || 'Status'}
38
+ style={[styles.container, style]}
39
+ intensity={15}
40
+ tint="dark"
41
+ borderRadius={20}
42
+ borderOpacity={0.2}
43
+ >
44
+ <View style={styles.content}>
45
+ <View style={[styles.dot, { backgroundColor: dotColor }]} />
46
+ <Text style={[styles.text, { color: colors.textPrimary, fontFamily: typography.medium }, textStyle]}>
47
+ {label || (status && STATUS_LABELS[status]) || 'Unknown'}
48
+ </Text>
49
+ </View>
50
+ </FluentGlass>
51
+ );
52
+ }
53
+
54
+ const STATUS_LABELS: Record<string, string> = {
55
+ online: 'Online',
56
+ away: 'Away',
57
+ offline: 'Offline',
58
+ };
59
+
60
+ const styles = StyleSheet.create({
61
+ container: {
62
+ height: 36,
63
+ alignSelf: 'flex-start',
64
+ },
65
+ content: {
66
+ flex: 1,
67
+ flexDirection: 'row',
68
+ alignItems: 'center',
69
+ justifyContent: 'center',
70
+ paddingHorizontal: 16,
71
+ },
72
+ dot: {
73
+ width: 8,
74
+ height: 8,
75
+ borderRadius: 4,
76
+ marginRight: 8,
77
+ },
78
+ text: {
79
+ fontSize: 13,
80
+ fontWeight: '500',
81
+ },
82
+ });
@@ -0,0 +1,130 @@
1
+ import React, { useEffect } from 'react';
2
+ import { StyleSheet, Text, View, Pressable } from 'react-native';
3
+ import Animated, {
4
+ useSharedValue,
5
+ useAnimatedStyle,
6
+ withTiming,
7
+ interpolateColor,
8
+ } from 'react-native-reanimated';
9
+ import useTheme from '../theme/useTheme';
10
+
11
+ /**
12
+ * FluentGlassSwitch (Atom)
13
+ * Glassmorphism toggle switch with animated thumb.
14
+ *
15
+ * @level Atom
16
+ * @composition None — self-contained primitive
17
+ *
18
+ * Props:
19
+ * value - Boolean on/off
20
+ * onToggle - Callback with new boolean value
21
+ * label - Optional text label shown to the right
22
+ * disabled - Grays out and disables interaction
23
+ */
24
+ const TRACK_W = 50;
25
+ const TRACK_H = 28;
26
+ const THUMB_SIZE = 22;
27
+ const THUMB_PADDING = 3;
28
+ const TRAVEL = TRACK_W - THUMB_SIZE - THUMB_PADDING * 2;
29
+
30
+ import { ViewStyle, StyleProp } from 'react-native';
31
+
32
+ export interface FluentGlassSwitchProps {
33
+ value?: boolean;
34
+ onToggle?: (value: boolean) => void;
35
+ label?: string;
36
+ disabled?: boolean;
37
+ style?: StyleProp<ViewStyle>;
38
+ }
39
+
40
+ export default function FluentGlassSwitch({
41
+ value = false,
42
+ onToggle,
43
+ label,
44
+ disabled = false,
45
+ style,
46
+ accessibilityLabel,
47
+ }: FluentGlassSwitchProps & { accessibilityLabel?: string }) {
48
+ const theme = useTheme();
49
+ const COLORS = theme.colors;
50
+
51
+ const progress = useSharedValue(value ? 1 : 0);
52
+
53
+ useEffect(() => {
54
+ progress.value = withTiming(value ? 1 : 0, { duration: 200 });
55
+ }, [value, progress]);
56
+
57
+ const trackAnimStyle = useAnimatedStyle(() => {
58
+ const backgroundColor = interpolateColor(
59
+ progress.value,
60
+ [0, 1],
61
+ [`${theme.colors.textSecondary}40`, theme.colors.accent] // Off: translucent text secondary → On: Accent Color
62
+ );
63
+ return { backgroundColor };
64
+ });
65
+
66
+ const thumbAnimStyle = useAnimatedStyle(() => ({
67
+ transform: [{ translateX: progress.value * TRAVEL }],
68
+ }));
69
+
70
+ const handlePress = () => {
71
+ if (!disabled && onToggle) {
72
+ onToggle(!value);
73
+ }
74
+ };
75
+
76
+ return (
77
+ <Pressable
78
+ onPress={handlePress}
79
+ style={[styles.wrapper, disabled && styles.wrapperDisabled, style]}
80
+ hitSlop={4}
81
+ accessibilityRole="switch"
82
+ accessibilityLabel={accessibilityLabel ?? label}
83
+ accessibilityState={{ checked: !!value, disabled: !!disabled }}
84
+ >
85
+ {/* Track */}
86
+ <Animated.View style={[styles.track, trackAnimStyle]}>
87
+ {/* Thumb */}
88
+ <Animated.View style={[styles.thumb, { backgroundColor: theme.colors.white, shadowColor: theme.colors.shadow }, thumbAnimStyle]} />
89
+ </Animated.View>
90
+
91
+ {/* Label */}
92
+ {label ? (
93
+ <Text style={[styles.label, { color: theme.colors.textPrimary, fontFamily: theme.typography.medium }, disabled ? { color: theme.colors.textSecondary } : undefined]}>
94
+ {label}
95
+ </Text>
96
+ ) : null}
97
+ </Pressable>
98
+ );
99
+ }
100
+
101
+ const styles = StyleSheet.create({
102
+ wrapper: {
103
+ flexDirection: 'row',
104
+ alignItems: 'center',
105
+ },
106
+ wrapperDisabled: {
107
+ opacity: 0.4,
108
+ },
109
+ track: {
110
+ width: TRACK_W,
111
+ height: TRACK_H,
112
+ borderRadius: TRACK_H / 2,
113
+ justifyContent: 'center',
114
+ paddingHorizontal: THUMB_PADDING,
115
+ },
116
+ thumb: {
117
+ width: THUMB_SIZE,
118
+ height: THUMB_SIZE,
119
+ borderRadius: THUMB_SIZE / 2,
120
+ // Shadow
121
+ shadowOffset: { width: 0, height: 1 },
122
+ shadowOpacity: 0.25,
123
+ shadowRadius: 3,
124
+ elevation: 4,
125
+ },
126
+ label: {
127
+ fontSize: 14,
128
+ marginLeft: 8,
129
+ },
130
+ });
@@ -0,0 +1,145 @@
1
+ import React from 'react';
2
+ import { StyleSheet, View, Text, TextInput, FlexAlignType, ViewStyle, TextStyle, TextInputProps } from 'react-native';
3
+ import useTheme from '../theme/useTheme';
4
+
5
+ /**
6
+ * FluentGlassTable (Namespace)
7
+ * Simple flex-based table layout.
8
+ */
9
+
10
+ type CellAlign = 'left' | 'center' | 'right';
11
+
12
+ export interface FluentGlassTableRootProps {
13
+ children: React.ReactNode;
14
+ style?: ViewStyle;
15
+ }
16
+
17
+ export interface FluentGlassTableRowProps {
18
+ children: React.ReactNode;
19
+ style?: ViewStyle;
20
+ isHeader?: boolean;
21
+ }
22
+
23
+ export interface FluentGlassTableCellProps {
24
+ children?: React.ReactNode;
25
+ style?: ViewStyle;
26
+ flex?: number;
27
+ align?: CellAlign;
28
+ }
29
+
30
+ export interface FluentGlassTableHeaderCellProps {
31
+ children?: React.ReactNode;
32
+ style?: ViewStyle;
33
+ flex?: number;
34
+ align?: CellAlign;
35
+ }
36
+
37
+ export interface FluentGlassTableEditableCellProps extends Omit<TextInputProps, 'value' | 'onChangeText' | 'style'> {
38
+ value: string;
39
+ onChangeText?: (text: string) => void;
40
+ style?: ViewStyle;
41
+ flex?: number;
42
+ align?: CellAlign;
43
+ textStyle?: TextStyle;
44
+ }
45
+
46
+ function Root({ children, style }: FluentGlassTableRootProps) {
47
+ return <View accessible={true} accessibilityLabel="Data table" style={[styles.root, style]}>{children}</View>;
48
+ }
49
+
50
+ function Row({ children, style, isHeader = false }: FluentGlassTableRowProps) {
51
+ const { colors } = useTheme();
52
+ return (
53
+ <View
54
+ style={[
55
+ styles.row,
56
+ { borderBottomColor: `${colors.textSecondary}1A` },
57
+ isHeader && { borderBottomColor: `${colors.textSecondary}4D`, marginBottom: 4 },
58
+ style,
59
+ ]}
60
+ >
61
+ {children}
62
+ </View>
63
+ );
64
+ }
65
+
66
+ const alignMap: Record<string, FlexAlignType> = {
67
+ left: 'flex-start',
68
+ center: 'center',
69
+ right: 'flex-end',
70
+ };
71
+
72
+ function Cell({ children, style, flex = 1, align = 'left' }: FluentGlassTableCellProps) {
73
+ const { colors } = useTheme();
74
+ const isText = typeof children === 'string' || typeof children === 'number';
75
+
76
+ return (
77
+ <View style={[styles.cell, { flex, alignItems: alignMap[align] }, style]}>
78
+ {isText ? (
79
+ <Text style={[styles.cellText, { color: colors.textPrimary }]}>{children}</Text>
80
+ ) : (
81
+ children
82
+ )}
83
+ </View>
84
+ );
85
+ }
86
+
87
+ function HeaderCell({ children, style, flex = 1, align = 'left' }: FluentGlassTableHeaderCellProps) {
88
+ const { colors, typography } = useTheme();
89
+ return (
90
+ <View style={[styles.cell, { flex, alignItems: alignMap[align] }, style]}>
91
+ <Text style={[styles.headerText, { color: colors.textSecondary, fontFamily: typography.semiBold }]}>{children}</Text>
92
+ </View>
93
+ );
94
+ }
95
+
96
+ function EditableCell({ value, onChangeText, style, flex = 1, align = 'left', textStyle, ...props }: FluentGlassTableEditableCellProps) {
97
+ const { colors } = useTheme();
98
+ return (
99
+ <View style={[styles.cell, { flex, alignItems: alignMap[align] }, style]}>
100
+ <TextInput
101
+ value={value}
102
+ onChangeText={onChangeText}
103
+ style={[styles.cellText, styles.input, { color: colors.textPrimary }, textStyle, { textAlign: align }]}
104
+ placeholderTextColor={colors.textSecondary}
105
+ {...props}
106
+ />
107
+ </View>
108
+ );
109
+ }
110
+
111
+ const styles = StyleSheet.create({
112
+ root: {
113
+ width: '100%',
114
+ },
115
+ row: {
116
+ flexDirection: 'row',
117
+ paddingVertical: 12,
118
+ borderBottomWidth: 1,
119
+ alignItems: 'center',
120
+ },
121
+ cell: {
122
+ paddingHorizontal: 4,
123
+ },
124
+ cellText: {
125
+ fontSize: 14,
126
+ },
127
+ headerText: {
128
+ fontSize: 12,
129
+ fontWeight: '600',
130
+ textTransform: 'uppercase',
131
+ letterSpacing: 0.5,
132
+ },
133
+ input: {
134
+ padding: 0, // Remove default Android padding
135
+ width: '100%',
136
+ },
137
+ });
138
+
139
+ export const FluentGlassTable = {
140
+ Root,
141
+ Row,
142
+ Cell,
143
+ EditableCell,
144
+ Header: HeaderCell,
145
+ };
@@ -0,0 +1,98 @@
1
+ import React from 'react';
2
+ // removed static colors import
3
+ import { StyleSheet, Text, View, Pressable } from 'react-native';
4
+ import FluentGlass from './FluentGlass';
5
+ import useTheme from '../theme/useTheme';
6
+ import { resolveColorScheme } from '../theme/resolvers';
7
+
8
+ /**
9
+ * FluentGlassTag (Atom)
10
+ * Glassmorphism tag pill — dynamic glass for labels (tech stack, categories).
11
+ * Optionally removable via onRemove callback.
12
+ */
13
+ import { ViewStyle, TextStyle, StyleProp } from 'react-native';
14
+ import { FluentGlassBaseProps, FluentGlassColorScheme } from '../types/components';
15
+
16
+ export interface FluentGlassTagProps extends FluentGlassBaseProps {
17
+ label: string | number;
18
+ onRemove?: () => void;
19
+ style?: StyleProp<ViewStyle>;
20
+ textStyle?: StyleProp<TextStyle>;
21
+ color?: string;
22
+ }
23
+
24
+ export default function FluentGlassTag({
25
+ label,
26
+ onRemove,
27
+ style,
28
+ textStyle,
29
+ color, // Custom dot color override (optional)
30
+ colorScheme = 'info', // Default to bluish tint
31
+ }: FluentGlassTagProps) {
32
+ const theme = useTheme();
33
+ const { colors, typography } = theme;
34
+
35
+ const colorConfig = resolveColorScheme(theme, colorScheme);
36
+ const dotColor = color || colorConfig.solid;
37
+ const textColor = colorConfig.text || colors.textPrimary;
38
+
39
+ return (
40
+ <FluentGlass
41
+ accessible={true}
42
+ accessibilityLabel={String(label)}
43
+ style={[styles.container, style]}
44
+ colorScheme={colorScheme}
45
+ intensity={20}
46
+ tint="dark"
47
+ borderRadius={20}
48
+ borderOpacity={0.3}
49
+ >
50
+ <View style={styles.content}>
51
+ <View style={[styles.dot, { backgroundColor: dotColor }]} />
52
+ <Text style={[styles.text, { fontFamily: typography.medium, color: textColor }, textStyle]}>
53
+ {label}
54
+ </Text>
55
+ {onRemove ? (
56
+ <Pressable onPress={onRemove} hitSlop={8} style={styles.removeBtn}>
57
+ <Text style={[styles.removeText, { fontFamily: typography.bold, color: `${textColor}99` }]}>✕</Text>
58
+ </Pressable>
59
+ ) : null}
60
+ </View>
61
+ </FluentGlass>
62
+ );
63
+ }
64
+
65
+ const styles = StyleSheet.create({
66
+ container: {
67
+ height: 32,
68
+ alignSelf: 'flex-start',
69
+ },
70
+ content: {
71
+ flex: 1,
72
+ flexDirection: 'row',
73
+ alignItems: 'center',
74
+ justifyContent: 'center',
75
+ paddingHorizontal: 14,
76
+ },
77
+ dot: {
78
+ width: 6,
79
+ height: 6,
80
+ borderRadius: 3,
81
+ marginRight: 8,
82
+ },
83
+ text: {
84
+ fontSize: 13,
85
+ fontWeight: '500',
86
+ },
87
+ removeBtn: {
88
+ marginLeft: 8,
89
+ width: 16,
90
+ height: 16,
91
+ alignItems: 'center',
92
+ justifyContent: 'center',
93
+ },
94
+ removeText: {
95
+ fontSize: 11,
96
+ fontWeight: '700',
97
+ },
98
+ });
@@ -0,0 +1,87 @@
1
+ import React from 'react';
2
+ import { StyleSheet, TextInput, TextInputProps, View, StyleProp, ViewStyle, TextStyle, KeyboardTypeOptions } from 'react-native';
3
+ import FluentGlass from './FluentGlass';
4
+ import useTheme from '../theme/useTheme';
5
+ import { resolveSize, resolveBackwardCompat } from '../theme/resolvers';
6
+ import { FluentGlassBaseProps } from '../types/components';
7
+
8
+ export interface FluentGlassTextInputProps extends FluentGlassBaseProps {
9
+ value?: string;
10
+ onChangeText?: (text: string) => void;
11
+ placeholder?: string;
12
+ keyboardType?: KeyboardTypeOptions;
13
+ autoCapitalize?: 'none' | 'sentences' | 'words' | 'characters';
14
+ autoComplete?: TextInputProps['autoComplete'];
15
+ secureTextEntry?: boolean;
16
+ style?: StyleProp<ViewStyle>;
17
+ inputStyle?: StyleProp<TextStyle>;
18
+ children?: React.ReactNode;
19
+ }
20
+
21
+ /**
22
+ * FluentGlassTextInput (Átomo)
23
+ * Componente básico de input de texto con estilo glassmorphism.
24
+ */
25
+ export default function FluentGlassTextInput({ value,
26
+ onChangeText,
27
+ placeholder,
28
+ keyboardType = 'default',
29
+ autoCapitalize = 'sentences',
30
+ autoComplete,
31
+ secureTextEntry = false,
32
+ style,
33
+ inputStyle,
34
+ children,
35
+ size,
36
+ colorScheme,
37
+ blur,
38
+ radius,
39
+ accessibilityLabel,
40
+ accessibilityHint, }: FluentGlassTextInputProps) {
41
+ const theme = useTheme();
42
+ const sizeConfig = resolveSize(theme, size || theme.defaults.size);
43
+ const compat = resolveBackwardCompat({ colorScheme, blur });
44
+ const resolvedScheme = compat.colorScheme || theme.defaults.colorScheme;
45
+
46
+ return (
47
+ <FluentGlass
48
+ style={[styles.container, { minHeight: sizeConfig.minHeight }, style]}
49
+ colorScheme={resolvedScheme}
50
+ blur={compat.blur || 'subtle'}
51
+ radius={radius}
52
+ borderOpacity={0.15}
53
+ >
54
+ <View style={styles.innerContainer}>
55
+ <TextInput
56
+ style={[styles.input, { paddingHorizontal: sizeConfig.paddingHorizontal, color: theme.colors.textPrimary, fontSize: sizeConfig.fontSize, fontFamily: theme.typography.regular }, inputStyle, { outlineStyle: 'none' } as any]}
57
+ value={value}
58
+ onChangeText={onChangeText}
59
+ placeholder={placeholder}
60
+ placeholderTextColor={theme.colors.textSecondary}
61
+ keyboardType={keyboardType}
62
+ autoCapitalize={autoCapitalize}
63
+ autoComplete={autoComplete}
64
+ secureTextEntry={secureTextEntry}
65
+ accessibilityLabel={accessibilityLabel ?? placeholder}
66
+ accessibilityHint={accessibilityHint}
67
+ />
68
+ {children}
69
+ </View>
70
+ </FluentGlass>
71
+ );
72
+ }
73
+
74
+ const styles = StyleSheet.create({
75
+ container: {
76
+ // minHeight set inline by sizeConfig
77
+ },
78
+ innerContainer: {
79
+ flex: 1,
80
+ flexDirection: 'row',
81
+ alignItems: 'center',
82
+ },
83
+ input: {
84
+ flex: 1,
85
+ height: '100%',
86
+ },
87
+ });