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.
- package/LICENSE +21 -0
- package/README.md +169 -0
- package/lib/commonjs/assets/fonts/Inter-Black.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter-Bold.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter-ExtraBold.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter-Medium.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter-Regular.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter-SemiBold.ttf +0 -0
- package/lib/commonjs/components/FluentGlass.js +94 -0
- package/lib/commonjs/components/FluentGlass.js.map +1 -0
- package/lib/commonjs/components/FluentGlassAlert.js +126 -0
- package/lib/commonjs/components/FluentGlassAlert.js.map +1 -0
- package/lib/commonjs/components/FluentGlassBadge.js +124 -0
- package/lib/commonjs/components/FluentGlassBadge.js.map +1 -0
- package/lib/commonjs/components/FluentGlassBarChart.js +287 -0
- package/lib/commonjs/components/FluentGlassBarChart.js.map +1 -0
- package/lib/commonjs/components/FluentGlassBreadcrumb.js +155 -0
- package/lib/commonjs/components/FluentGlassBreadcrumb.js.map +1 -0
- package/lib/commonjs/components/FluentGlassButton.js +175 -0
- package/lib/commonjs/components/FluentGlassButton.js.map +1 -0
- package/lib/commonjs/components/FluentGlassCalendarWidget.js +73 -0
- package/lib/commonjs/components/FluentGlassCalendarWidget.js.map +1 -0
- package/lib/commonjs/components/FluentGlassCard.js +195 -0
- package/lib/commonjs/components/FluentGlassCard.js.map +1 -0
- package/lib/commonjs/components/FluentGlassCheckbox.js +121 -0
- package/lib/commonjs/components/FluentGlassCheckbox.js.map +1 -0
- package/lib/commonjs/components/FluentGlassClockWidget.js +80 -0
- package/lib/commonjs/components/FluentGlassClockWidget.js.map +1 -0
- package/lib/commonjs/components/FluentGlassCodeBlock.js +239 -0
- package/lib/commonjs/components/FluentGlassCodeBlock.js.map +1 -0
- package/lib/commonjs/components/FluentGlassContainer.js +52 -0
- package/lib/commonjs/components/FluentGlassContainer.js.map +1 -0
- package/lib/commonjs/components/FluentGlassCrossfade.js +118 -0
- package/lib/commonjs/components/FluentGlassCrossfade.js.map +1 -0
- package/lib/commonjs/components/FluentGlassDateInput.js +176 -0
- package/lib/commonjs/components/FluentGlassDateInput.js.map +1 -0
- package/lib/commonjs/components/FluentGlassDatePicker.js +271 -0
- package/lib/commonjs/components/FluentGlassDatePicker.js.map +1 -0
- package/lib/commonjs/components/FluentGlassDialog.js +169 -0
- package/lib/commonjs/components/FluentGlassDialog.js.map +1 -0
- package/lib/commonjs/components/FluentGlassDock.js +187 -0
- package/lib/commonjs/components/FluentGlassDock.js.map +1 -0
- package/lib/commonjs/components/FluentGlassDropdown.js +349 -0
- package/lib/commonjs/components/FluentGlassDropdown.js.map +1 -0
- package/lib/commonjs/components/FluentGlassEmailInput.js +43 -0
- package/lib/commonjs/components/FluentGlassEmailInput.js.map +1 -0
- package/lib/commonjs/components/FluentGlassInput.js +83 -0
- package/lib/commonjs/components/FluentGlassInput.js.map +1 -0
- package/lib/commonjs/components/FluentGlassLabeledInput.js +64 -0
- package/lib/commonjs/components/FluentGlassLabeledInput.js.map +1 -0
- package/lib/commonjs/components/FluentGlassLayout.js +106 -0
- package/lib/commonjs/components/FluentGlassLayout.js.map +1 -0
- package/lib/commonjs/components/FluentGlassPasswordInput.js +60 -0
- package/lib/commonjs/components/FluentGlassPasswordInput.js.map +1 -0
- package/lib/commonjs/components/FluentGlassPopover.js +75 -0
- package/lib/commonjs/components/FluentGlassPopover.js.map +1 -0
- package/lib/commonjs/components/FluentGlassResponsiveRow.js +74 -0
- package/lib/commonjs/components/FluentGlassResponsiveRow.js.map +1 -0
- package/lib/commonjs/components/FluentGlassScrollArea.js +101 -0
- package/lib/commonjs/components/FluentGlassScrollArea.js.map +1 -0
- package/lib/commonjs/components/FluentGlassSegmentedControl.js +126 -0
- package/lib/commonjs/components/FluentGlassSegmentedControl.js.map +1 -0
- package/lib/commonjs/components/FluentGlassSelect.js +155 -0
- package/lib/commonjs/components/FluentGlassSelect.js.map +1 -0
- package/lib/commonjs/components/FluentGlassSeparator.js +62 -0
- package/lib/commonjs/components/FluentGlassSeparator.js.map +1 -0
- package/lib/commonjs/components/FluentGlassSheet.js +189 -0
- package/lib/commonjs/components/FluentGlassSheet.js.map +1 -0
- package/lib/commonjs/components/FluentGlassSidebar.js +358 -0
- package/lib/commonjs/components/FluentGlassSidebar.js.map +1 -0
- package/lib/commonjs/components/FluentGlassSimpleCard.js +56 -0
- package/lib/commonjs/components/FluentGlassSimpleCard.js.map +1 -0
- package/lib/commonjs/components/FluentGlassSkeleton.js +52 -0
- package/lib/commonjs/components/FluentGlassSkeleton.js.map +1 -0
- package/lib/commonjs/components/FluentGlassSlider.js +197 -0
- package/lib/commonjs/components/FluentGlassSlider.js.map +1 -0
- package/lib/commonjs/components/FluentGlassStatWidget.js +133 -0
- package/lib/commonjs/components/FluentGlassStatWidget.js.map +1 -0
- package/lib/commonjs/components/FluentGlassStatusIndicator.js +89 -0
- package/lib/commonjs/components/FluentGlassStatusIndicator.js.map +1 -0
- package/lib/commonjs/components/FluentGlassSwitch.js +126 -0
- package/lib/commonjs/components/FluentGlassSwitch.js.map +1 -0
- package/lib/commonjs/components/FluentGlassTable.js +163 -0
- package/lib/commonjs/components/FluentGlassTable.js.map +1 -0
- package/lib/commonjs/components/FluentGlassTag.js +109 -0
- package/lib/commonjs/components/FluentGlassTag.js.map +1 -0
- package/lib/commonjs/components/FluentGlassTextInput.js +90 -0
- package/lib/commonjs/components/FluentGlassTextInput.js.map +1 -0
- package/lib/commonjs/components/FluentGlassTimeline.js +334 -0
- package/lib/commonjs/components/FluentGlassTimeline.js.map +1 -0
- package/lib/commonjs/components/FluentGlassWeatherWidget.js +72 -0
- package/lib/commonjs/components/FluentGlassWeatherWidget.js.map +1 -0
- package/lib/commonjs/components/index.js +308 -0
- package/lib/commonjs/components/index.js.map +1 -0
- package/lib/commonjs/fonts.js +33 -0
- package/lib/commonjs/fonts.js.map +1 -0
- package/lib/commonjs/hooks/useBreakpoint.js +57 -0
- package/lib/commonjs/hooks/useBreakpoint.js.map +1 -0
- package/lib/commonjs/index.js +462 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/theme/FluentGlassProvider.js +84 -0
- package/lib/commonjs/theme/FluentGlassProvider.js.map +1 -0
- package/lib/commonjs/theme/defaultTheme.js +55 -0
- package/lib/commonjs/theme/defaultTheme.js.map +1 -0
- package/lib/commonjs/theme/resolvers.js +118 -0
- package/lib/commonjs/theme/resolvers.js.map +1 -0
- package/lib/commonjs/theme/tokens.js +239 -0
- package/lib/commonjs/theme/tokens.js.map +1 -0
- package/lib/commonjs/theme/typography.js +50 -0
- package/lib/commonjs/theme/typography.js.map +1 -0
- package/lib/commonjs/theme/useTheme.js +22 -0
- package/lib/commonjs/theme/useTheme.js.map +1 -0
- package/lib/commonjs/types/components.js +6 -0
- package/lib/commonjs/types/components.js.map +1 -0
- package/lib/commonjs/types/theme.js +6 -0
- package/lib/commonjs/types/theme.js.map +1 -0
- package/lib/commonjs/utils/colors.js +59 -0
- package/lib/commonjs/utils/colors.js.map +1 -0
- package/lib/commonjs/utils/responsive.js +126 -0
- package/lib/commonjs/utils/responsive.js.map +1 -0
- package/lib/module/assets/fonts/Inter-Black.ttf +0 -0
- package/lib/module/assets/fonts/Inter-Bold.ttf +0 -0
- package/lib/module/assets/fonts/Inter-ExtraBold.ttf +0 -0
- package/lib/module/assets/fonts/Inter-Medium.ttf +0 -0
- package/lib/module/assets/fonts/Inter-Regular.ttf +0 -0
- package/lib/module/assets/fonts/Inter-SemiBold.ttf +0 -0
- package/lib/module/components/FluentGlass.js +89 -0
- package/lib/module/components/FluentGlass.js.map +1 -0
- package/lib/module/components/FluentGlassAlert.js +121 -0
- package/lib/module/components/FluentGlassAlert.js.map +1 -0
- package/lib/module/components/FluentGlassBadge.js +119 -0
- package/lib/module/components/FluentGlassBadge.js.map +1 -0
- package/lib/module/components/FluentGlassBarChart.js +281 -0
- package/lib/module/components/FluentGlassBarChart.js.map +1 -0
- package/lib/module/components/FluentGlassBreadcrumb.js +150 -0
- package/lib/module/components/FluentGlassBreadcrumb.js.map +1 -0
- package/lib/module/components/FluentGlassButton.js +169 -0
- package/lib/module/components/FluentGlassButton.js.map +1 -0
- package/lib/module/components/FluentGlassCalendarWidget.js +68 -0
- package/lib/module/components/FluentGlassCalendarWidget.js.map +1 -0
- package/lib/module/components/FluentGlassCard.js +190 -0
- package/lib/module/components/FluentGlassCard.js.map +1 -0
- package/lib/module/components/FluentGlassCheckbox.js +115 -0
- package/lib/module/components/FluentGlassCheckbox.js.map +1 -0
- package/lib/module/components/FluentGlassClockWidget.js +74 -0
- package/lib/module/components/FluentGlassClockWidget.js.map +1 -0
- package/lib/module/components/FluentGlassCodeBlock.js +233 -0
- package/lib/module/components/FluentGlassCodeBlock.js.map +1 -0
- package/lib/module/components/FluentGlassContainer.js +47 -0
- package/lib/module/components/FluentGlassContainer.js.map +1 -0
- package/lib/module/components/FluentGlassCrossfade.js +112 -0
- package/lib/module/components/FluentGlassCrossfade.js.map +1 -0
- package/lib/module/components/FluentGlassDateInput.js +170 -0
- package/lib/module/components/FluentGlassDateInput.js.map +1 -0
- package/lib/module/components/FluentGlassDatePicker.js +265 -0
- package/lib/module/components/FluentGlassDatePicker.js.map +1 -0
- package/lib/module/components/FluentGlassDialog.js +163 -0
- package/lib/module/components/FluentGlassDialog.js.map +1 -0
- package/lib/module/components/FluentGlassDock.js +181 -0
- package/lib/module/components/FluentGlassDock.js.map +1 -0
- package/lib/module/components/FluentGlassDropdown.js +343 -0
- package/lib/module/components/FluentGlassDropdown.js.map +1 -0
- package/lib/module/components/FluentGlassEmailInput.js +38 -0
- package/lib/module/components/FluentGlassEmailInput.js.map +1 -0
- package/lib/module/components/FluentGlassInput.js +78 -0
- package/lib/module/components/FluentGlassInput.js.map +1 -0
- package/lib/module/components/FluentGlassLabeledInput.js +59 -0
- package/lib/module/components/FluentGlassLabeledInput.js.map +1 -0
- package/lib/module/components/FluentGlassLayout.js +101 -0
- package/lib/module/components/FluentGlassLayout.js.map +1 -0
- package/lib/module/components/FluentGlassPasswordInput.js +54 -0
- package/lib/module/components/FluentGlassPasswordInput.js.map +1 -0
- package/lib/module/components/FluentGlassPopover.js +70 -0
- package/lib/module/components/FluentGlassPopover.js.map +1 -0
- package/lib/module/components/FluentGlassResponsiveRow.js +71 -0
- package/lib/module/components/FluentGlassResponsiveRow.js.map +1 -0
- package/lib/module/components/FluentGlassScrollArea.js +95 -0
- package/lib/module/components/FluentGlassScrollArea.js.map +1 -0
- package/lib/module/components/FluentGlassSegmentedControl.js +120 -0
- package/lib/module/components/FluentGlassSegmentedControl.js.map +1 -0
- package/lib/module/components/FluentGlassSelect.js +149 -0
- package/lib/module/components/FluentGlassSelect.js.map +1 -0
- package/lib/module/components/FluentGlassSeparator.js +57 -0
- package/lib/module/components/FluentGlassSeparator.js.map +1 -0
- package/lib/module/components/FluentGlassSheet.js +183 -0
- package/lib/module/components/FluentGlassSheet.js.map +1 -0
- package/lib/module/components/FluentGlassSidebar.js +351 -0
- package/lib/module/components/FluentGlassSidebar.js.map +1 -0
- package/lib/module/components/FluentGlassSimpleCard.js +51 -0
- package/lib/module/components/FluentGlassSimpleCard.js.map +1 -0
- package/lib/module/components/FluentGlassSkeleton.js +46 -0
- package/lib/module/components/FluentGlassSkeleton.js.map +1 -0
- package/lib/module/components/FluentGlassSlider.js +191 -0
- package/lib/module/components/FluentGlassSlider.js.map +1 -0
- package/lib/module/components/FluentGlassStatWidget.js +128 -0
- package/lib/module/components/FluentGlassStatWidget.js.map +1 -0
- package/lib/module/components/FluentGlassStatusIndicator.js +84 -0
- package/lib/module/components/FluentGlassStatusIndicator.js.map +1 -0
- package/lib/module/components/FluentGlassSwitch.js +122 -0
- package/lib/module/components/FluentGlassSwitch.js.map +1 -0
- package/lib/module/components/FluentGlassTable.js +158 -0
- package/lib/module/components/FluentGlassTable.js.map +1 -0
- package/lib/module/components/FluentGlassTag.js +103 -0
- package/lib/module/components/FluentGlassTag.js.map +1 -0
- package/lib/module/components/FluentGlassTextInput.js +85 -0
- package/lib/module/components/FluentGlassTextInput.js.map +1 -0
- package/lib/module/components/FluentGlassTimeline.js +327 -0
- package/lib/module/components/FluentGlassTimeline.js.map +1 -0
- package/lib/module/components/FluentGlassWeatherWidget.js +67 -0
- package/lib/module/components/FluentGlassWeatherWidget.js.map +1 -0
- package/lib/module/components/index.js +45 -0
- package/lib/module/components/index.js.map +1 -0
- package/lib/module/fonts.js +26 -0
- package/lib/module/fonts.js.map +1 -0
- package/lib/module/hooks/useBreakpoint.js +54 -0
- package/lib/module/hooks/useBreakpoint.js.map +1 -0
- package/lib/module/index.js +30 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/theme/FluentGlassProvider.js +77 -0
- package/lib/module/theme/FluentGlassProvider.js.map +1 -0
- package/lib/module/theme/defaultTheme.js +51 -0
- package/lib/module/theme/defaultTheme.js.map +1 -0
- package/lib/module/theme/resolvers.js +110 -0
- package/lib/module/theme/resolvers.js.map +1 -0
- package/lib/module/theme/tokens.js +235 -0
- package/lib/module/theme/tokens.js.map +1 -0
- package/lib/module/theme/typography.js +45 -0
- package/lib/module/theme/typography.js.map +1 -0
- package/lib/module/theme/useTheme.js +18 -0
- package/lib/module/theme/useTheme.js.map +1 -0
- package/lib/module/types/components.js +4 -0
- package/lib/module/types/components.js.map +1 -0
- package/lib/module/types/theme.js +4 -0
- package/lib/module/types/theme.js.map +1 -0
- package/lib/module/utils/colors.js +55 -0
- package/lib/module/utils/colors.js.map +1 -0
- package/lib/module/utils/responsive.js +116 -0
- package/lib/module/utils/responsive.js.map +1 -0
- package/lib/typescript/components/FluentGlass.d.ts +25 -0
- package/lib/typescript/components/FluentGlass.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassAlert.d.ts +13 -0
- package/lib/typescript/components/FluentGlassAlert.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassBadge.d.ts +22 -0
- package/lib/typescript/components/FluentGlassBadge.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassBarChart.d.ts +30 -0
- package/lib/typescript/components/FluentGlassBarChart.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassBreadcrumb.d.ts +22 -0
- package/lib/typescript/components/FluentGlassBreadcrumb.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassButton.d.ts +27 -0
- package/lib/typescript/components/FluentGlassButton.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassCalendarWidget.d.ts +13 -0
- package/lib/typescript/components/FluentGlassCalendarWidget.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassCard.d.ts +30 -0
- package/lib/typescript/components/FluentGlassCard.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassCheckbox.d.ts +14 -0
- package/lib/typescript/components/FluentGlassCheckbox.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassClockWidget.d.ts +11 -0
- package/lib/typescript/components/FluentGlassClockWidget.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassCodeBlock.d.ts +11 -0
- package/lib/typescript/components/FluentGlassCodeBlock.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassContainer.d.ts +22 -0
- package/lib/typescript/components/FluentGlassContainer.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassCrossfade.d.ts +24 -0
- package/lib/typescript/components/FluentGlassCrossfade.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassDateInput.d.ts +18 -0
- package/lib/typescript/components/FluentGlassDateInput.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassDatePicker.d.ts +9 -0
- package/lib/typescript/components/FluentGlassDatePicker.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassDialog.d.ts +18 -0
- package/lib/typescript/components/FluentGlassDialog.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassDock.d.ts +19 -0
- package/lib/typescript/components/FluentGlassDock.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassDropdown.d.ts +23 -0
- package/lib/typescript/components/FluentGlassDropdown.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassEmailInput.d.ts +17 -0
- package/lib/typescript/components/FluentGlassEmailInput.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassInput.d.ts +12 -0
- package/lib/typescript/components/FluentGlassInput.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassLabeledInput.d.ts +19 -0
- package/lib/typescript/components/FluentGlassLabeledInput.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassLayout.d.ts +11 -0
- package/lib/typescript/components/FluentGlassLayout.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassPasswordInput.d.ts +15 -0
- package/lib/typescript/components/FluentGlassPasswordInput.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassPopover.d.ts +17 -0
- package/lib/typescript/components/FluentGlassPopover.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassResponsiveRow.d.ts +25 -0
- package/lib/typescript/components/FluentGlassResponsiveRow.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassScrollArea.d.ts +16 -0
- package/lib/typescript/components/FluentGlassScrollArea.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassSegmentedControl.d.ts +15 -0
- package/lib/typescript/components/FluentGlassSegmentedControl.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassSelect.d.ts +23 -0
- package/lib/typescript/components/FluentGlassSelect.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassSeparator.d.ts +13 -0
- package/lib/typescript/components/FluentGlassSeparator.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassSheet.d.ts +11 -0
- package/lib/typescript/components/FluentGlassSheet.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassSidebar.d.ts +44 -0
- package/lib/typescript/components/FluentGlassSidebar.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassSimpleCard.d.ts +19 -0
- package/lib/typescript/components/FluentGlassSimpleCard.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassSkeleton.d.ts +14 -0
- package/lib/typescript/components/FluentGlassSkeleton.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassSlider.d.ts +31 -0
- package/lib/typescript/components/FluentGlassSlider.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassStatWidget.d.ts +17 -0
- package/lib/typescript/components/FluentGlassStatWidget.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassStatusIndicator.d.ts +16 -0
- package/lib/typescript/components/FluentGlassStatusIndicator.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassSwitch.d.ts +13 -0
- package/lib/typescript/components/FluentGlassSwitch.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassTable.d.ts +50 -0
- package/lib/typescript/components/FluentGlassTable.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassTag.d.ts +18 -0
- package/lib/typescript/components/FluentGlassTag.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassTextInput.d.ts +21 -0
- package/lib/typescript/components/FluentGlassTextInput.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassTimeline.d.ts +27 -0
- package/lib/typescript/components/FluentGlassTimeline.d.ts.map +1 -0
- package/lib/typescript/components/FluentGlassWeatherWidget.d.ts +13 -0
- package/lib/typescript/components/FluentGlassWeatherWidget.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +43 -0
- package/lib/typescript/components/index.d.ts.map +1 -0
- package/lib/typescript/fonts.d.ts +13 -0
- package/lib/typescript/fonts.d.ts.map +1 -0
- package/lib/typescript/hooks/useBreakpoint.d.ts +26 -0
- package/lib/typescript/hooks/useBreakpoint.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +18 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/theme/FluentGlassProvider.d.ts +21 -0
- package/lib/typescript/theme/FluentGlassProvider.d.ts.map +1 -0
- package/lib/typescript/theme/defaultTheme.d.ts +10 -0
- package/lib/typescript/theme/defaultTheme.d.ts.map +1 -0
- package/lib/typescript/theme/resolvers.d.ts +55 -0
- package/lib/typescript/theme/resolvers.d.ts.map +1 -0
- package/lib/typescript/theme/tokens.d.ts +27 -0
- package/lib/typescript/theme/tokens.d.ts.map +1 -0
- package/lib/typescript/theme/typography.d.ts +27 -0
- package/lib/typescript/theme/typography.d.ts.map +1 -0
- package/lib/typescript/theme/useTheme.d.ts +12 -0
- package/lib/typescript/theme/useTheme.d.ts.map +1 -0
- package/lib/typescript/types/components.d.ts +32 -0
- package/lib/typescript/types/components.d.ts.map +1 -0
- package/lib/typescript/types/theme.d.ts +79 -0
- package/lib/typescript/types/theme.d.ts.map +1 -0
- package/lib/typescript/utils/colors.d.ts +3 -0
- package/lib/typescript/utils/colors.d.ts.map +1 -0
- package/lib/typescript/utils/responsive.d.ts +62 -0
- package/lib/typescript/utils/responsive.d.ts.map +1 -0
- package/package.json +90 -0
- package/src/assets/fonts/Inter-Black.ttf +0 -0
- package/src/assets/fonts/Inter-Bold.ttf +0 -0
- package/src/assets/fonts/Inter-ExtraBold.ttf +0 -0
- package/src/assets/fonts/Inter-Medium.ttf +0 -0
- package/src/assets/fonts/Inter-Regular.ttf +0 -0
- package/src/assets/fonts/Inter-SemiBold.ttf +0 -0
- package/src/components/FluentGlass.tsx +103 -0
- package/src/components/FluentGlassAlert.tsx +126 -0
- package/src/components/FluentGlassBadge.tsx +109 -0
- package/src/components/FluentGlassBarChart.tsx +295 -0
- package/src/components/FluentGlassBreadcrumb.tsx +173 -0
- package/src/components/FluentGlassButton.tsx +169 -0
- package/src/components/FluentGlassCalendarWidget.tsx +55 -0
- package/src/components/FluentGlassCard.tsx +186 -0
- package/src/components/FluentGlassCheckbox.tsx +138 -0
- package/src/components/FluentGlassClockWidget.tsx +61 -0
- package/src/components/FluentGlassCodeBlock.tsx +241 -0
- package/src/components/FluentGlassContainer.tsx +63 -0
- package/src/components/FluentGlassCrossfade.tsx +122 -0
- package/src/components/FluentGlassDateInput.tsx +182 -0
- package/src/components/FluentGlassDatePicker.tsx +224 -0
- package/src/components/FluentGlassDialog.tsx +153 -0
- package/src/components/FluentGlassDock.tsx +194 -0
- package/src/components/FluentGlassDropdown.tsx +382 -0
- package/src/components/FluentGlassEmailInput.tsx +46 -0
- package/src/components/FluentGlassInput.tsx +77 -0
- package/src/components/FluentGlassLabeledInput.tsx +63 -0
- package/src/components/FluentGlassLayout.tsx +89 -0
- package/src/components/FluentGlassPasswordInput.tsx +59 -0
- package/src/components/FluentGlassPopover.tsx +74 -0
- package/src/components/FluentGlassResponsiveRow.tsx +76 -0
- package/src/components/FluentGlassScrollArea.tsx +110 -0
- package/src/components/FluentGlassSegmentedControl.tsx +140 -0
- package/src/components/FluentGlassSelect.tsx +139 -0
- package/src/components/FluentGlassSeparator.tsx +54 -0
- package/src/components/FluentGlassSheet.tsx +183 -0
- package/src/components/FluentGlassSidebar.tsx +349 -0
- package/src/components/FluentGlassSimpleCard.tsx +59 -0
- package/src/components/FluentGlassSkeleton.tsx +69 -0
- package/src/components/FluentGlassSlider.tsx +202 -0
- package/src/components/FluentGlassStatWidget.tsx +107 -0
- package/src/components/FluentGlassStatusIndicator.tsx +82 -0
- package/src/components/FluentGlassSwitch.tsx +130 -0
- package/src/components/FluentGlassTable.tsx +145 -0
- package/src/components/FluentGlassTag.tsx +98 -0
- package/src/components/FluentGlassTextInput.tsx +87 -0
- package/src/components/FluentGlassTimeline.tsx +335 -0
- package/src/components/FluentGlassWeatherWidget.tsx +54 -0
- package/src/components/index.ts +42 -0
- package/src/fonts.ts +24 -0
- package/src/hooks/useBreakpoint.ts +55 -0
- package/src/index.ts +97 -0
- package/src/theme/FluentGlassProvider.tsx +82 -0
- package/src/theme/defaultTheme.ts +44 -0
- package/src/theme/resolvers.ts +115 -0
- package/src/theme/tokens.ts +200 -0
- package/src/theme/typography.ts +41 -0
- package/src/theme/useTheme.ts +17 -0
- package/src/types/components.ts +47 -0
- package/src/types/theme.ts +82 -0
- package/src/utils/colors.ts +55 -0
- 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
|
+
});
|