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,63 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet, View, Text, StyleProp, ViewStyle, KeyboardTypeOptions } from 'react-native';
|
|
3
|
+
import FluentGlassTextInput from './FluentGlassTextInput';
|
|
4
|
+
import useTheme from '../theme/useTheme';
|
|
5
|
+
|
|
6
|
+
export interface FluentGlassLabeledInputProps {
|
|
7
|
+
label?: string;
|
|
8
|
+
accessibilityLabel?: string;
|
|
9
|
+
value?: string;
|
|
10
|
+
onChangeText?: (text: string) => void;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
keyboardType?: KeyboardTypeOptions;
|
|
13
|
+
autoCapitalize?: 'none' | 'sentences' | 'words' | 'characters';
|
|
14
|
+
secureTextEntry?: boolean;
|
|
15
|
+
style?: StyleProp<ViewStyle>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* FluentGlassLabeledInput (Molécula)
|
|
20
|
+
* Input con una etiqueta (label) en la parte superior.
|
|
21
|
+
*/
|
|
22
|
+
export default function FluentGlassLabeledInput({ label,
|
|
23
|
+
value,
|
|
24
|
+
onChangeText,
|
|
25
|
+
placeholder,
|
|
26
|
+
keyboardType,
|
|
27
|
+
autoCapitalize,
|
|
28
|
+
secureTextEntry,
|
|
29
|
+
style,
|
|
30
|
+
accessibilityLabel, }: FluentGlassLabeledInputProps) {
|
|
31
|
+
const theme = useTheme();
|
|
32
|
+
const COLORS = theme.colors;
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<View style={[styles.wrapper, style]}>
|
|
36
|
+
<Text style={[styles.label, { color: COLORS.textPrimary, fontFamily: theme.typography.semiBold }]}>{label}</Text>
|
|
37
|
+
<FluentGlassTextInput
|
|
38
|
+
value={value}
|
|
39
|
+
onChangeText={onChangeText}
|
|
40
|
+
placeholder={placeholder}
|
|
41
|
+
keyboardType={keyboardType}
|
|
42
|
+
autoCapitalize={autoCapitalize}
|
|
43
|
+
secureTextEntry={secureTextEntry}
|
|
44
|
+
accessibilityLabel={accessibilityLabel ?? label}
|
|
45
|
+
/>
|
|
46
|
+
</View>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const styles = StyleSheet.create({
|
|
51
|
+
wrapper: {
|
|
52
|
+
width: '100%',
|
|
53
|
+
marginBottom: 16,
|
|
54
|
+
},
|
|
55
|
+
label: {
|
|
56
|
+
color: undefined, // Applied inline from useTheme()
|
|
57
|
+
marginBottom: 8,
|
|
58
|
+
fontSize: 13,
|
|
59
|
+
marginLeft: 4,
|
|
60
|
+
fontWeight: '600',
|
|
61
|
+
letterSpacing: 0.3,
|
|
62
|
+
},
|
|
63
|
+
});
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
import { LinearGradient } from 'expo-linear-gradient';
|
|
4
|
+
import useTheme from '../theme/useTheme';
|
|
5
|
+
|
|
6
|
+
export interface FluentGlassLayoutProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* FluentGlassLayout (Wrapper)
|
|
12
|
+
* The "Deep Liquid" environment.
|
|
13
|
+
* Replaces LiquidBackground with the specific "Orbs" mesh requested.
|
|
14
|
+
*/
|
|
15
|
+
export default function FluentGlassLayout({ children }: FluentGlassLayoutProps) {
|
|
16
|
+
const theme = useTheme();
|
|
17
|
+
const COLORS = theme.colors;
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<View style={[styles.container, { backgroundColor: COLORS.background }]}>
|
|
21
|
+
{/* 1. Deepest Navy Base */}
|
|
22
|
+
<View style={[styles.baseLayer, { backgroundColor: COLORS.background }]} />
|
|
23
|
+
|
|
24
|
+
{/* 2. Cyan Orb (Top-Left) */}
|
|
25
|
+
<View style={[styles.orbCyan, { backgroundColor: COLORS.accent }]} />
|
|
26
|
+
<LinearGradient
|
|
27
|
+
colors={[COLORS.accent, 'transparent']}
|
|
28
|
+
start={{ x: 0.2, y: 0.2 }}
|
|
29
|
+
end={{ x: 0.8, y: 0.8 }}
|
|
30
|
+
style={styles.orbCyan}
|
|
31
|
+
/>
|
|
32
|
+
|
|
33
|
+
{/* 3. Blue Depth Orb (Bottom-Right) */}
|
|
34
|
+
<View style={[styles.orbBlue, { backgroundColor: COLORS.secondary }]} />
|
|
35
|
+
<LinearGradient
|
|
36
|
+
colors={[COLORS.secondary, 'transparent']}
|
|
37
|
+
start={{ x: 0.8, y: 0.8 }}
|
|
38
|
+
end={{ x: 0.2, y: 0.2 }}
|
|
39
|
+
style={styles.orbBlue}
|
|
40
|
+
/>
|
|
41
|
+
|
|
42
|
+
{/* 4. Mesh Texture / Noise (Simulated) */}
|
|
43
|
+
<View style={styles.noiseOverlay} />
|
|
44
|
+
|
|
45
|
+
{/* Content */}
|
|
46
|
+
<View style={styles.content}>
|
|
47
|
+
{children}
|
|
48
|
+
</View>
|
|
49
|
+
</View>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const styles = StyleSheet.create({
|
|
54
|
+
container: {
|
|
55
|
+
flex: 1,
|
|
56
|
+
overflow: 'hidden', // Contain decorative orbs
|
|
57
|
+
},
|
|
58
|
+
baseLayer: {
|
|
59
|
+
...StyleSheet.absoluteFillObject,
|
|
60
|
+
},
|
|
61
|
+
orbCyan: {
|
|
62
|
+
position: 'absolute',
|
|
63
|
+
top: -100,
|
|
64
|
+
left: -100,
|
|
65
|
+
width: 400,
|
|
66
|
+
height: 400,
|
|
67
|
+
borderRadius: 200,
|
|
68
|
+
opacity: 0.15,
|
|
69
|
+
// blurRadius removed: not valid on View, only on Image
|
|
70
|
+
},
|
|
71
|
+
orbBlue: {
|
|
72
|
+
position: 'absolute',
|
|
73
|
+
bottom: -100,
|
|
74
|
+
right: -100,
|
|
75
|
+
width: 500,
|
|
76
|
+
height: 500,
|
|
77
|
+
borderRadius: 250,
|
|
78
|
+
opacity: 0.1,
|
|
79
|
+
},
|
|
80
|
+
content: {
|
|
81
|
+
flex: 1,
|
|
82
|
+
zIndex: 1,
|
|
83
|
+
},
|
|
84
|
+
noiseOverlay: {
|
|
85
|
+
...StyleSheet.absoluteFillObject,
|
|
86
|
+
opacity: 0.02,
|
|
87
|
+
backgroundColor: '#fff', // Simple noise sim
|
|
88
|
+
}
|
|
89
|
+
});
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { StyleSheet, TouchableOpacity, StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
4
|
+
import FluentGlassTextInput from './FluentGlassTextInput';
|
|
5
|
+
import useTheme from '../theme/useTheme';
|
|
6
|
+
|
|
7
|
+
export interface FluentGlassPasswordInputProps {
|
|
8
|
+
value?: string;
|
|
9
|
+
onChangeText?: (text: string) => void;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
style?: StyleProp<ViewStyle>;
|
|
12
|
+
accessibilityLabel?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* FluentGlassPasswordInput (Molécula)
|
|
17
|
+
* Input específico para contraseñas con botón para revelar/ocultar.
|
|
18
|
+
*/
|
|
19
|
+
export default function FluentGlassPasswordInput({ value,
|
|
20
|
+
onChangeText,
|
|
21
|
+
placeholder = 'Password',
|
|
22
|
+
style,
|
|
23
|
+
accessibilityLabel, }: FluentGlassPasswordInputProps) {
|
|
24
|
+
const theme = useTheme();
|
|
25
|
+
const COLORS = theme.colors;
|
|
26
|
+
|
|
27
|
+
const [isPasswordVisible, setIsPasswordVisible] = useState(false);
|
|
28
|
+
|
|
29
|
+
const toggleVisibility = () => {
|
|
30
|
+
setIsPasswordVisible(!isPasswordVisible);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<FluentGlassTextInput
|
|
35
|
+
value={value}
|
|
36
|
+
onChangeText={onChangeText}
|
|
37
|
+
placeholder={placeholder}
|
|
38
|
+
secureTextEntry={!isPasswordVisible}
|
|
39
|
+
autoCapitalize="none"
|
|
40
|
+
style={style}
|
|
41
|
+
accessibilityLabel={accessibilityLabel ?? 'Password'}
|
|
42
|
+
>
|
|
43
|
+
<TouchableOpacity onPress={toggleVisibility} style={styles.iconButton} hitSlop={10} accessibilityRole="button" accessibilityLabel="Toggle password visibility">
|
|
44
|
+
<Ionicons
|
|
45
|
+
name={isPasswordVisible ? "eye-off-outline" : "eye-outline"}
|
|
46
|
+
size={20}
|
|
47
|
+
color={COLORS.textSecondary}
|
|
48
|
+
/>
|
|
49
|
+
</TouchableOpacity>
|
|
50
|
+
</FluentGlassTextInput>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const styles = StyleSheet.create({
|
|
55
|
+
iconButton: {
|
|
56
|
+
padding: 10,
|
|
57
|
+
marginRight: 6,
|
|
58
|
+
},
|
|
59
|
+
});
|
|
@@ -0,0 +1,74 @@
|
|
|
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 { FluentGlassBaseProps } from '../types/components';
|
|
6
|
+
|
|
7
|
+
export interface FluentGlassPopoverProps extends FluentGlassBaseProps {
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
content?: React.ReactNode;
|
|
10
|
+
visible?: boolean;
|
|
11
|
+
onClose?: () => void;
|
|
12
|
+
style?: StyleProp<ViewStyle>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* FluentGlassPopover (Component)
|
|
17
|
+
* Simple tooltip/popover container.
|
|
18
|
+
* Note: Full positioning logic is complex; this is a display atom.
|
|
19
|
+
*/
|
|
20
|
+
export default function FluentGlassPopover({ children,
|
|
21
|
+
content,
|
|
22
|
+
visible,
|
|
23
|
+
size,
|
|
24
|
+
colorScheme,
|
|
25
|
+
blur,
|
|
26
|
+
radius = 'md',
|
|
27
|
+
style }: FluentGlassPopoverProps) {
|
|
28
|
+
const { typography, colors } = useTheme();
|
|
29
|
+
|
|
30
|
+
if (!visible) return children;
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<View style={styles.container}>
|
|
34
|
+
{children}
|
|
35
|
+
<View style={styles.popover} accessibilityLabel="Popover">
|
|
36
|
+
<FluentGlass
|
|
37
|
+
style={[styles.glass, style]}
|
|
38
|
+
size={size}
|
|
39
|
+
colorScheme={colorScheme}
|
|
40
|
+
blur={blur}
|
|
41
|
+
radius={radius}
|
|
42
|
+
>
|
|
43
|
+
<Text style={[
|
|
44
|
+
styles.text,
|
|
45
|
+
{ fontFamily: typography.medium, color: colors.textPrimary }
|
|
46
|
+
]}>
|
|
47
|
+
{content}
|
|
48
|
+
</Text>
|
|
49
|
+
</FluentGlass>
|
|
50
|
+
</View>
|
|
51
|
+
</View>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const styles = StyleSheet.create({
|
|
56
|
+
container: {
|
|
57
|
+
position: 'relative',
|
|
58
|
+
zIndex: 10,
|
|
59
|
+
},
|
|
60
|
+
popover: {
|
|
61
|
+
position: 'absolute',
|
|
62
|
+
top: -40,
|
|
63
|
+
alignSelf: 'center',
|
|
64
|
+
},
|
|
65
|
+
glass: {
|
|
66
|
+
paddingVertical: 6,
|
|
67
|
+
paddingHorizontal: 12,
|
|
68
|
+
minWidth: 100,
|
|
69
|
+
alignItems: 'center',
|
|
70
|
+
},
|
|
71
|
+
text: {
|
|
72
|
+
fontSize: 12,
|
|
73
|
+
},
|
|
74
|
+
});
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet, View, StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import useBreakpoint from '../hooks/useBreakpoint';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* FluentGlassResponsiveRow (Layout Helper)
|
|
7
|
+
*
|
|
8
|
+
* Renders children in a responsive flex row:
|
|
9
|
+
* - Mobile (<600px): single column (children stack vertically)
|
|
10
|
+
* - Tablet (600–1023px): 2 columns
|
|
11
|
+
* - Desktop (≥1024px): configurable columns (default 2, max 3)
|
|
12
|
+
*
|
|
13
|
+
* Props:
|
|
14
|
+
* columns - Number of columns on desktop (default: 2, max: 3)
|
|
15
|
+
* gap - Gap between items (default: 16)
|
|
16
|
+
* style - Container style override (optional)
|
|
17
|
+
* mobileStack - If true, stack vertically on mobile (default: true)
|
|
18
|
+
* children - Elements to distribute across columns
|
|
19
|
+
*/
|
|
20
|
+
export default function FluentGlassResponsiveRow({
|
|
21
|
+
columns: desktopCols = 2,
|
|
22
|
+
gap = 16,
|
|
23
|
+
style,
|
|
24
|
+
mobileStack = true,
|
|
25
|
+
children,
|
|
26
|
+
}: {
|
|
27
|
+
columns?: number;
|
|
28
|
+
gap?: number;
|
|
29
|
+
style?: StyleProp<ViewStyle>;
|
|
30
|
+
mobileStack?: boolean;
|
|
31
|
+
children: React.ReactNode;
|
|
32
|
+
}) {
|
|
33
|
+
const { isMobile, isTablet } = useBreakpoint();
|
|
34
|
+
|
|
35
|
+
// Determine actual column count
|
|
36
|
+
let cols = desktopCols;
|
|
37
|
+
if (isMobile && mobileStack) cols = 1;
|
|
38
|
+
else if (isTablet) cols = Math.min(desktopCols, 2);
|
|
39
|
+
|
|
40
|
+
const childrenArray = React.Children.toArray(children).filter(Boolean);
|
|
41
|
+
|
|
42
|
+
if (cols <= 1) {
|
|
43
|
+
// Stack vertically
|
|
44
|
+
return (
|
|
45
|
+
<View style={[{ gap }, style]}>
|
|
46
|
+
{childrenArray}
|
|
47
|
+
</View>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Flex row with wrapping
|
|
52
|
+
return (
|
|
53
|
+
<View style={[styles.row, { gap }, style]}>
|
|
54
|
+
{childrenArray.map((child, index) => (
|
|
55
|
+
<View
|
|
56
|
+
key={index}
|
|
57
|
+
style={{
|
|
58
|
+
flexBasis: `${(100 / cols) - 1}%`,
|
|
59
|
+
flexGrow: 1,
|
|
60
|
+
flexShrink: 1,
|
|
61
|
+
minWidth: 280,
|
|
62
|
+
}}
|
|
63
|
+
>
|
|
64
|
+
{child}
|
|
65
|
+
</View>
|
|
66
|
+
))}
|
|
67
|
+
</View>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const styles = StyleSheet.create({
|
|
72
|
+
row: {
|
|
73
|
+
flexDirection: 'row',
|
|
74
|
+
flexWrap: 'wrap',
|
|
75
|
+
},
|
|
76
|
+
});
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import { StyleSheet, ScrollView, Platform } from 'react-native';
|
|
3
|
+
import useTheme from '../theme/useTheme';
|
|
4
|
+
import { ThemeColors } from '../types/theme';
|
|
5
|
+
|
|
6
|
+
// Inject global scrollbar CSS on web (once)
|
|
7
|
+
let scrollbarStyleInjected = false;
|
|
8
|
+
|
|
9
|
+
function injectScrollbarCSS(colors: ThemeColors) {
|
|
10
|
+
if (scrollbarStyleInjected || Platform.OS !== 'web') return;
|
|
11
|
+
scrollbarStyleInjected = true;
|
|
12
|
+
|
|
13
|
+
const css = `
|
|
14
|
+
/* FluentGlass Custom Scrollbar — Deep Liquid Theme */
|
|
15
|
+
/* !important is required to override React Native Web's inline scrollbar hiding */
|
|
16
|
+
|
|
17
|
+
/* Webkit (Chrome, Edge, Safari) */
|
|
18
|
+
::-webkit-scrollbar {
|
|
19
|
+
width: 8px !important;
|
|
20
|
+
height: 8px !important;
|
|
21
|
+
display: block !important;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
::-webkit-scrollbar-track {
|
|
25
|
+
background: ${colors.background}4D !important;
|
|
26
|
+
border-radius: 8px !important;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
::-webkit-scrollbar-thumb {
|
|
30
|
+
background: ${colors.border} !important;
|
|
31
|
+
border-radius: 8px !important;
|
|
32
|
+
border: 1px solid ${colors.borderSubtle} !important;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
::-webkit-scrollbar-thumb:hover {
|
|
36
|
+
background: ${colors.accent}73 !important;
|
|
37
|
+
border-color: ${colors.accent}4D !important;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
::-webkit-scrollbar-thumb:active {
|
|
41
|
+
background: ${colors.accent}99 !important;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
::-webkit-scrollbar-corner {
|
|
45
|
+
background: transparent !important;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Firefox */
|
|
49
|
+
* {
|
|
50
|
+
scrollbar-width: thin !important;
|
|
51
|
+
scrollbar-color: ${colors.border} ${colors.background}4D !important;
|
|
52
|
+
}
|
|
53
|
+
`;
|
|
54
|
+
|
|
55
|
+
const style = document.createElement('style');
|
|
56
|
+
style.textContent = css;
|
|
57
|
+
style.id = 'fluentglass-scrollbar';
|
|
58
|
+
document.head.appendChild(style);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* FluentGlassScrollArea (Component)
|
|
63
|
+
* Standard scroll view wrapper with custom glassmorphism scrollbar on web.
|
|
64
|
+
* On native platforms, uses the default system scrollbar.
|
|
65
|
+
*/
|
|
66
|
+
import { ViewStyle, StyleProp, ScrollViewProps } from 'react-native';
|
|
67
|
+
|
|
68
|
+
export interface FluentGlassScrollAreaProps extends ScrollViewProps {
|
|
69
|
+
children?: React.ReactNode;
|
|
70
|
+
style?: StyleProp<ViewStyle>;
|
|
71
|
+
contentContainerStyle?: StyleProp<ViewStyle>;
|
|
72
|
+
horizontal?: boolean;
|
|
73
|
+
showsIndicators?: boolean;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export default function FluentGlassScrollArea({
|
|
77
|
+
children,
|
|
78
|
+
style,
|
|
79
|
+
contentContainerStyle,
|
|
80
|
+
horizontal = false,
|
|
81
|
+
showsIndicators = true,
|
|
82
|
+
}: FluentGlassScrollAreaProps) {
|
|
83
|
+
const theme = useTheme();
|
|
84
|
+
|
|
85
|
+
// Inject custom scrollbar CSS on mount (web only, once globally)
|
|
86
|
+
useEffect(() => {
|
|
87
|
+
injectScrollbarCSS(theme.colors);
|
|
88
|
+
}, []);
|
|
89
|
+
|
|
90
|
+
return (
|
|
91
|
+
<ScrollView
|
|
92
|
+
style={[styles.container, style]}
|
|
93
|
+
contentContainerStyle={[styles.content, contentContainerStyle]}
|
|
94
|
+
horizontal={horizontal}
|
|
95
|
+
showsHorizontalScrollIndicator={showsIndicators && horizontal}
|
|
96
|
+
showsVerticalScrollIndicator={showsIndicators && !horizontal}
|
|
97
|
+
>
|
|
98
|
+
{children}
|
|
99
|
+
</ScrollView>
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const styles = StyleSheet.create({
|
|
104
|
+
container: {
|
|
105
|
+
flex: 1,
|
|
106
|
+
},
|
|
107
|
+
content: {
|
|
108
|
+
padding: 0,
|
|
109
|
+
},
|
|
110
|
+
});
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import { StyleSheet, Text, View, Pressable, useWindowDimensions } from 'react-native';
|
|
3
|
+
import Animated, {
|
|
4
|
+
useSharedValue,
|
|
5
|
+
useAnimatedStyle,
|
|
6
|
+
withSpring,
|
|
7
|
+
runOnJS,
|
|
8
|
+
} from 'react-native-reanimated';
|
|
9
|
+
import FluentGlass from './FluentGlass';
|
|
10
|
+
import useTheme from '../theme/useTheme';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* FluentGlassSegmentedControl
|
|
14
|
+
* A glass-style segmented control with a sliding indicator.
|
|
15
|
+
*/
|
|
16
|
+
import { ViewStyle, StyleProp } from 'react-native';
|
|
17
|
+
|
|
18
|
+
export interface FluentGlassSegmentedControlProps {
|
|
19
|
+
options?: string[];
|
|
20
|
+
selectedIndex?: number;
|
|
21
|
+
onChange?: (index: number) => void;
|
|
22
|
+
style?: StyleProp<ViewStyle>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export default function FluentGlassSegmentedControl({
|
|
26
|
+
options = ['Option 1', 'Option 2'],
|
|
27
|
+
selectedIndex = 0,
|
|
28
|
+
onChange, // (index: number) => void
|
|
29
|
+
style,
|
|
30
|
+
}: FluentGlassSegmentedControlProps) {
|
|
31
|
+
const theme = useTheme();
|
|
32
|
+
const [containerWidth, setContainerWidth] = useState(0);
|
|
33
|
+
const translateX = useSharedValue(0);
|
|
34
|
+
|
|
35
|
+
// Calculate width of the indicator based on container width and item count
|
|
36
|
+
const itemWidth = containerWidth / options.length;
|
|
37
|
+
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
if (itemWidth > 0) {
|
|
40
|
+
translateX.value = withSpring(selectedIndex * itemWidth, {
|
|
41
|
+
damping: 25,
|
|
42
|
+
stiffness: 120,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}, [selectedIndex, itemWidth]);
|
|
46
|
+
|
|
47
|
+
const handlePress = (index: number) => {
|
|
48
|
+
if (onChange) {
|
|
49
|
+
onChange(index);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const animatedStyle = useAnimatedStyle(() => {
|
|
54
|
+
return {
|
|
55
|
+
transform: [{ translateX: translateX.value }],
|
|
56
|
+
width: itemWidth - 8, // padding adjustment
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<FluentGlass
|
|
62
|
+
style={[styles.container, style]}
|
|
63
|
+
intensity={30}
|
|
64
|
+
tint="deep"
|
|
65
|
+
borderRadius={16}
|
|
66
|
+
accessibilityRole="tablist"
|
|
67
|
+
>
|
|
68
|
+
<View
|
|
69
|
+
style={styles.track}
|
|
70
|
+
onLayout={(e) => setContainerWidth(e.nativeEvent.layout.width)}
|
|
71
|
+
>
|
|
72
|
+
{/* Sliding Indicator */}
|
|
73
|
+
{containerWidth > 0 && (
|
|
74
|
+
<Animated.View style={[styles.indicatorContainer, animatedStyle]}>
|
|
75
|
+
<FluentGlass
|
|
76
|
+
style={styles.indicator}
|
|
77
|
+
intensity={40}
|
|
78
|
+
tint="dark"
|
|
79
|
+
borderRadius={12}
|
|
80
|
+
borderOpacity={0.4}
|
|
81
|
+
/>
|
|
82
|
+
</Animated.View>
|
|
83
|
+
)}
|
|
84
|
+
|
|
85
|
+
{/* Options */}
|
|
86
|
+
{options.map((option, index) => (
|
|
87
|
+
<Pressable
|
|
88
|
+
key={index}
|
|
89
|
+
onPress={() => handlePress(index)}
|
|
90
|
+
style={styles.option}
|
|
91
|
+
accessibilityRole="tab"
|
|
92
|
+
accessibilityLabel={option}
|
|
93
|
+
accessibilityState={{ selected: selectedIndex === index }}
|
|
94
|
+
>
|
|
95
|
+
<Text
|
|
96
|
+
style={[
|
|
97
|
+
{ fontSize: 14 },
|
|
98
|
+
{ color: theme.colors.textSecondary, fontFamily: theme.typography.medium },
|
|
99
|
+
selectedIndex === index && { color: theme.colors.textPrimary, fontFamily: theme.typography.bold },
|
|
100
|
+
]}
|
|
101
|
+
>
|
|
102
|
+
{option}
|
|
103
|
+
</Text>
|
|
104
|
+
</Pressable>
|
|
105
|
+
))}
|
|
106
|
+
</View>
|
|
107
|
+
</FluentGlass>
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const styles = StyleSheet.create({
|
|
112
|
+
container: {
|
|
113
|
+
height: 48,
|
|
114
|
+
justifyContent: 'center',
|
|
115
|
+
},
|
|
116
|
+
track: {
|
|
117
|
+
flex: 1,
|
|
118
|
+
flexDirection: 'row',
|
|
119
|
+
alignItems: 'center',
|
|
120
|
+
padding: 4,
|
|
121
|
+
},
|
|
122
|
+
indicatorContainer: {
|
|
123
|
+
position: 'absolute',
|
|
124
|
+
height: '100%',
|
|
125
|
+
left: 4,
|
|
126
|
+
top: 4,
|
|
127
|
+
paddingBottom: 8, // compensate parent padding
|
|
128
|
+
},
|
|
129
|
+
indicator: {
|
|
130
|
+
flex: 1,
|
|
131
|
+
width: '100%',
|
|
132
|
+
height: '100%',
|
|
133
|
+
},
|
|
134
|
+
option: {
|
|
135
|
+
flex: 1,
|
|
136
|
+
alignItems: 'center',
|
|
137
|
+
justifyContent: 'center',
|
|
138
|
+
zIndex: 1
|
|
139
|
+
}
|
|
140
|
+
});
|