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,239 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = FluentGlassCodeBlock;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var Clipboard = _interopRequireWildcard(require("expo-clipboard"));
|
|
10
|
+
var _FluentGlass = _interopRequireDefault(require("./FluentGlass"));
|
|
11
|
+
var _useTheme = _interopRequireDefault(require("../theme/useTheme"));
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
15
|
+
// Simple regex-based tokenizer (good enough for display, not a full parser)
|
|
16
|
+
function tokenize(line, TOKEN_COLORS) {
|
|
17
|
+
const tokens = [];
|
|
18
|
+
// Pattern priority: comments, strings, tags, keywords, rest
|
|
19
|
+
const regex = /(\/\/.*$|\/\*.*?\*\/)|("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')|(<\/?[\w.-]+|>|\/>)|(className|import|export|from|const|let|var|function|return|default|if|else|true|false|null|undefined)/g;
|
|
20
|
+
let lastIndex = 0;
|
|
21
|
+
let match;
|
|
22
|
+
while ((match = regex.exec(line)) !== null) {
|
|
23
|
+
// Text before the match
|
|
24
|
+
if (match.index > lastIndex) {
|
|
25
|
+
tokens.push({
|
|
26
|
+
text: line.slice(lastIndex, match.index),
|
|
27
|
+
color: TOKEN_COLORS.text
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
if (match[1]) {
|
|
31
|
+
tokens.push({
|
|
32
|
+
text: match[0],
|
|
33
|
+
color: TOKEN_COLORS.comment
|
|
34
|
+
});
|
|
35
|
+
} else if (match[2]) {
|
|
36
|
+
tokens.push({
|
|
37
|
+
text: match[0],
|
|
38
|
+
color: TOKEN_COLORS.string
|
|
39
|
+
});
|
|
40
|
+
} else if (match[3]) {
|
|
41
|
+
tokens.push({
|
|
42
|
+
text: match[0],
|
|
43
|
+
color: TOKEN_COLORS.tag
|
|
44
|
+
});
|
|
45
|
+
} else if (match[4]) {
|
|
46
|
+
tokens.push({
|
|
47
|
+
text: match[0],
|
|
48
|
+
color: TOKEN_COLORS.keyword
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
lastIndex = match.index + match[0].length;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Remaining text
|
|
55
|
+
if (lastIndex < line.length) {
|
|
56
|
+
tokens.push({
|
|
57
|
+
text: line.slice(lastIndex),
|
|
58
|
+
color: TOKEN_COLORS.text
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
if (tokens.length === 0) {
|
|
62
|
+
tokens.push({
|
|
63
|
+
text: line || ' ',
|
|
64
|
+
color: TOKEN_COLORS.text
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
return tokens;
|
|
68
|
+
}
|
|
69
|
+
function FluentGlassCodeBlock({
|
|
70
|
+
code = '',
|
|
71
|
+
language = 'CODE',
|
|
72
|
+
showLineNumbers = true,
|
|
73
|
+
onCopy,
|
|
74
|
+
style
|
|
75
|
+
}) {
|
|
76
|
+
const theme = (0, _useTheme.default)();
|
|
77
|
+
const colors = theme.colors;
|
|
78
|
+
|
|
79
|
+
// Basic token colors matching a dark IDE theme — uses theme colors
|
|
80
|
+
const TOKEN_COLORS = {
|
|
81
|
+
tag: '#06B6D4',
|
|
82
|
+
// Cyan — HTML tags, JSX
|
|
83
|
+
attribute: '#94A3B8',
|
|
84
|
+
// Slate — attribute names
|
|
85
|
+
string: '#FBBF24',
|
|
86
|
+
// Amber — string values
|
|
87
|
+
keyword: '#C084FC',
|
|
88
|
+
// Purple — keywords
|
|
89
|
+
comment: '#4B5563',
|
|
90
|
+
// Gray — comments
|
|
91
|
+
punctuation: '#94A3B8',
|
|
92
|
+
text: colors.textPrimary
|
|
93
|
+
};
|
|
94
|
+
const lines = code.split('\n');
|
|
95
|
+
const lineNumWidth = String(lines.length).length * 10 + 12;
|
|
96
|
+
const [copied, setCopied] = (0, _react.useState)(false);
|
|
97
|
+
const handleCopy = (0, _react.useCallback)(async () => {
|
|
98
|
+
if (onCopy) {
|
|
99
|
+
onCopy(code);
|
|
100
|
+
} else {
|
|
101
|
+
await Clipboard.setStringAsync(code);
|
|
102
|
+
}
|
|
103
|
+
setCopied(true);
|
|
104
|
+
setTimeout(() => setCopied(false), 2000);
|
|
105
|
+
}, [code, onCopy]);
|
|
106
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_FluentGlass.default, {
|
|
107
|
+
accessibilityLabel: "Code block",
|
|
108
|
+
style: [styles.container, style],
|
|
109
|
+
intensity: 15,
|
|
110
|
+
tint: "dark",
|
|
111
|
+
borderRadius: 16,
|
|
112
|
+
borderOpacity: 0.2,
|
|
113
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
114
|
+
style: styles.inner,
|
|
115
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
116
|
+
style: styles.header,
|
|
117
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
118
|
+
style: [styles.badge, {
|
|
119
|
+
backgroundColor: colors.borderSubtle,
|
|
120
|
+
borderColor: colors.border
|
|
121
|
+
}],
|
|
122
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
123
|
+
style: [styles.badgeText, {
|
|
124
|
+
color: colors.textPrimary,
|
|
125
|
+
fontFamily: theme.typography.bold
|
|
126
|
+
}],
|
|
127
|
+
children: language.toUpperCase()
|
|
128
|
+
})
|
|
129
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
130
|
+
style: styles.actions,
|
|
131
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
132
|
+
onPress: handleCopy,
|
|
133
|
+
hitSlop: 8,
|
|
134
|
+
style: styles.actionBtn,
|
|
135
|
+
accessibilityRole: "button",
|
|
136
|
+
accessibilityLabel: "Copy code",
|
|
137
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
138
|
+
style: styles.actionIcon,
|
|
139
|
+
children: copied ? '✅' : '📋'
|
|
140
|
+
})
|
|
141
|
+
})
|
|
142
|
+
})]
|
|
143
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
144
|
+
style: [styles.separator, {
|
|
145
|
+
backgroundColor: colors.borderSubtle
|
|
146
|
+
}]
|
|
147
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
|
|
148
|
+
horizontal: true,
|
|
149
|
+
showsHorizontalScrollIndicator: false,
|
|
150
|
+
bounces: false,
|
|
151
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
152
|
+
style: styles.codeArea,
|
|
153
|
+
children: lines.map((line, i) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
154
|
+
style: styles.lineRow,
|
|
155
|
+
children: [showLineNumbers ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
156
|
+
style: [styles.lineNum, {
|
|
157
|
+
width: lineNumWidth,
|
|
158
|
+
color: colors.textSecondary
|
|
159
|
+
}],
|
|
160
|
+
children: i + 1
|
|
161
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
162
|
+
style: [styles.codeLine, {
|
|
163
|
+
color: colors.textPrimary
|
|
164
|
+
}],
|
|
165
|
+
children: tokenize(line, TOKEN_COLORS).map((token, j) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
166
|
+
style: {
|
|
167
|
+
color: token.color
|
|
168
|
+
},
|
|
169
|
+
children: token.text
|
|
170
|
+
}, j))
|
|
171
|
+
})]
|
|
172
|
+
}, i))
|
|
173
|
+
})
|
|
174
|
+
})]
|
|
175
|
+
})
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
const styles = _reactNative.StyleSheet.create({
|
|
179
|
+
container: {
|
|
180
|
+
overflow: 'hidden'
|
|
181
|
+
},
|
|
182
|
+
inner: {
|
|
183
|
+
flex: 1
|
|
184
|
+
},
|
|
185
|
+
header: {
|
|
186
|
+
flexDirection: 'row',
|
|
187
|
+
alignItems: 'center',
|
|
188
|
+
justifyContent: 'space-between',
|
|
189
|
+
paddingHorizontal: 12,
|
|
190
|
+
paddingTop: 10,
|
|
191
|
+
paddingBottom: 8
|
|
192
|
+
},
|
|
193
|
+
badge: {
|
|
194
|
+
borderRadius: 6,
|
|
195
|
+
paddingHorizontal: 10,
|
|
196
|
+
paddingVertical: 4,
|
|
197
|
+
borderWidth: 1
|
|
198
|
+
},
|
|
199
|
+
badgeText: {
|
|
200
|
+
fontSize: 11,
|
|
201
|
+
fontWeight: '700',
|
|
202
|
+
letterSpacing: 0.5
|
|
203
|
+
},
|
|
204
|
+
actions: {
|
|
205
|
+
flexDirection: 'row',
|
|
206
|
+
gap: 8
|
|
207
|
+
},
|
|
208
|
+
actionBtn: {
|
|
209
|
+
padding: 4
|
|
210
|
+
},
|
|
211
|
+
actionIcon: {
|
|
212
|
+
fontSize: 16
|
|
213
|
+
},
|
|
214
|
+
separator: {
|
|
215
|
+
height: 1,
|
|
216
|
+
marginHorizontal: 0
|
|
217
|
+
},
|
|
218
|
+
codeArea: {
|
|
219
|
+
paddingVertical: 12,
|
|
220
|
+
paddingRight: 16
|
|
221
|
+
},
|
|
222
|
+
lineRow: {
|
|
223
|
+
flexDirection: 'row',
|
|
224
|
+
minHeight: 22
|
|
225
|
+
},
|
|
226
|
+
lineNum: {
|
|
227
|
+
fontSize: 13,
|
|
228
|
+
fontFamily: 'monospace',
|
|
229
|
+
textAlign: 'right',
|
|
230
|
+
marginRight: 16,
|
|
231
|
+
paddingLeft: 12
|
|
232
|
+
},
|
|
233
|
+
codeLine: {
|
|
234
|
+
fontSize: 13,
|
|
235
|
+
fontFamily: 'monospace',
|
|
236
|
+
flex: 1
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
//# sourceMappingURL=FluentGlassCodeBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","Clipboard","_FluentGlass","_interopRequireDefault","_useTheme","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","tokenize","line","TOKEN_COLORS","tokens","regex","lastIndex","match","exec","index","push","text","slice","color","comment","string","tag","keyword","length","FluentGlassCodeBlock","code","language","showLineNumbers","onCopy","style","theme","useTheme","colors","attribute","punctuation","textPrimary","lines","split","lineNumWidth","String","copied","setCopied","useState","handleCopy","useCallback","setStringAsync","setTimeout","jsx","accessibilityLabel","styles","container","intensity","tint","borderRadius","borderOpacity","children","jsxs","View","inner","header","badge","backgroundColor","borderSubtle","borderColor","border","Text","badgeText","fontFamily","typography","bold","toUpperCase","actions","Pressable","onPress","hitSlop","actionBtn","accessibilityRole","actionIcon","separator","ScrollView","horizontal","showsHorizontalScrollIndicator","bounces","codeArea","map","lineRow","lineNum","width","textSecondary","codeLine","token","j","StyleSheet","create","overflow","flex","flexDirection","alignItems","justifyContent","paddingHorizontal","paddingTop","paddingBottom","paddingVertical","borderWidth","fontSize","fontWeight","letterSpacing","gap","padding","height","marginHorizontal","paddingRight","minHeight","textAlign","marginRight","paddingLeft"],"sourceRoot":"..\\..\\..\\src","sources":["components/FluentGlassCodeBlock.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAH,uBAAA,CAAAC,OAAA;AACA,IAAAG,YAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAD,sBAAA,CAAAJ,OAAA;AAAyC,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAI,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAR,wBAAAQ,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAZ,uBAAA,YAAAA,CAAAQ,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,CAAA,MAAAF,CAAA,GAAAJ,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAE,CAAA,CAAAI,GAAA,CAAAX,CAAA,UAAAO,CAAA,CAAAK,GAAA,CAAAZ,CAAA,GAAAO,CAAA,CAAAM,GAAA,CAAAb,CAAA,EAAAS,CAAA,gBAAAN,CAAA,IAAAH,CAAA,gBAAAG,CAAA,OAAAW,cAAA,CAAAC,IAAA,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U,EAAE,WAAW;IACvB4B,IAAI,EAAE;EACV;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = FluentGlassContainer;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _useTheme = _interopRequireDefault(require("../theme/useTheme"));
|
|
10
|
+
var _resolvers = require("../theme/resolvers");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
/**
|
|
14
|
+
* FluentGlassContainer (Atom)
|
|
15
|
+
* Section-level glass wrapper for layout depth.
|
|
16
|
+
* Uses plain View (no BlurView) to avoid nested-blur artifacts.
|
|
17
|
+
*/
|
|
18
|
+
function FluentGlassContainer({
|
|
19
|
+
children,
|
|
20
|
+
colorScheme,
|
|
21
|
+
radius,
|
|
22
|
+
tint = 'light',
|
|
23
|
+
padding = 16,
|
|
24
|
+
borderRadius,
|
|
25
|
+
borderOpacity = 0.15,
|
|
26
|
+
style
|
|
27
|
+
}) {
|
|
28
|
+
const theme = (0, _useTheme.default)();
|
|
29
|
+
const compat = (0, _resolvers.resolveBackwardCompat)({
|
|
30
|
+
tint,
|
|
31
|
+
colorScheme
|
|
32
|
+
});
|
|
33
|
+
const resolvedScheme = compat.colorScheme || 'light';
|
|
34
|
+
const colorConfig = (0, _resolvers.resolveColorScheme)(theme, resolvedScheme);
|
|
35
|
+
const resolvedRadius = borderRadius ?? (0, _resolvers.resolveRadius)(theme, radius || 'lg');
|
|
36
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
37
|
+
style: [styles.container, {
|
|
38
|
+
padding,
|
|
39
|
+
borderRadius: resolvedRadius,
|
|
40
|
+
backgroundColor: colorConfig.bg,
|
|
41
|
+
borderColor: colorConfig.border || theme.colors.border
|
|
42
|
+
}, style],
|
|
43
|
+
children: children
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
const styles = _reactNative.StyleSheet.create({
|
|
47
|
+
container: {
|
|
48
|
+
minHeight: 40,
|
|
49
|
+
borderWidth: 1
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=FluentGlassContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_useTheme","_resolvers","_jsxRuntime","e","__esModule","default","FluentGlassContainer","children","colorScheme","radius","tint","padding","borderRadius","borderOpacity","style","theme","useTheme","compat","resolveBackwardCompat","resolvedScheme","colorConfig","resolveColorScheme","resolvedRadius","resolveRadius","jsx","View","styles","container","backgroundColor","bg","borderColor","border","colors","StyleSheet","create","minHeight","borderWidth"],"sourceRoot":"..\\..\\..\\src","sources":["components/FluentGlassContainer.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAA8F,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAgB9F;AACA;AACA;AACA;AACA;AACe,SAASG,oBAAoBA,CAAC;EAAEC,QAAQ;EACnDC,WAAW;EACXC,MAAM;EACNC,IAAI,GAAG,OAAO;EACdC,OAAO,GAAG,EAAE;EACZC,YAAY;EACZC,aAAa,GAAG,IAAI;EACpBC;AAAkC,CAAC,EAAE;EACrC,MAAMC,KAAK,GAAG,IAAAC,iBAAQ,EAAC,CAAC;EAExB,MAAMC,MAAM,GAAG,IAAAC,gCAAqB,EAAC;IAAER,IAAI;IAAEF;EAAY,CAAC,CAAC;EAC3D,MAAMW,cAAc,GAAGF,MAAM,CAACT,WAAW,IAAI,OAAO;EACpD,MAAMY,WAAW,GAAG,IAAAC,6BAAkB,EAACN,KAAK,EAAEI,cAAc,CAAC;EAC7D,MAAMG,cAAc,GAAGV,YAAY,IAAI,IAAAW,wBAAa,EAACR,KAAK,EAAEN,MAAM,IAAI,IAAI,CAAC;EAE3E,oBACI,IAAAP,WAAA,CAAAsB,GAAA,EAACzB,YAAA,CAAA0B,IAAI;IACDX,KAAK,EAAE,CACHY,MAAM,CAACC,SAAS,EAChB;MACIhB,OAAO;MACPC,YAAY,EAAEU,cAAc;MAC5BM,eAAe,EAAER,WAAW,CAACS,EAAE;MAC/BC,WAAW,EAAEV,WAAW,CAACW,MAAM,IAAIhB,KAAK,CAACiB,MAAM,CAACD;IACpD,CAAC,EACDjB,KAAK,CACP;IAAAP,QAAA,EAEDA;EAAQ,CACP,CAAC;AAEf;AAEA,MAAMmB,MAAM,GAAGO,uBAAU,CAACC,MAAM,CAAC;EAC7BP,SAAS,EAAE;IACPQ,SAAS,EAAE,EAAE;IACbC,WAAW,EAAE;EACjB;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = FluentGlassCrossfade;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
10
|
+
var _useTheme = _interopRequireDefault(require("../theme/useTheme"));
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
14
|
+
/**
|
|
15
|
+
* FluentGlassCrossfade
|
|
16
|
+
*
|
|
17
|
+
* Universal animated content switcher. Crossfades between children
|
|
18
|
+
* with a fade + translateY spring animation.
|
|
19
|
+
*
|
|
20
|
+
* Usage:
|
|
21
|
+
* <FluentGlassCrossfade activeKey="home">
|
|
22
|
+
* <HomeScreen key="home" />
|
|
23
|
+
* <SettingsScreen key="settings" />
|
|
24
|
+
* </FluentGlassCrossfade>
|
|
25
|
+
*/
|
|
26
|
+
function FluentGlassCrossfade({
|
|
27
|
+
activeKey,
|
|
28
|
+
children,
|
|
29
|
+
fadeOutDuration,
|
|
30
|
+
fadeInDuration,
|
|
31
|
+
translateY: translateYAmount,
|
|
32
|
+
style
|
|
33
|
+
}) {
|
|
34
|
+
const theme = (0, _useTheme.default)();
|
|
35
|
+
const crossfadeConfig = theme.animations?.crossfade || {};
|
|
36
|
+
const springConfig = theme.animations?.spring?.snappy || {
|
|
37
|
+
mass: 0.4,
|
|
38
|
+
damping: 14,
|
|
39
|
+
stiffness: 160
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
// Merge props with theme defaults
|
|
43
|
+
const outDuration = fadeOutDuration ?? crossfadeConfig.fadeOutDuration ?? 120;
|
|
44
|
+
const inDuration = fadeInDuration ?? crossfadeConfig.fadeInDuration ?? 200;
|
|
45
|
+
const shiftY = translateYAmount ?? crossfadeConfig.translateY ?? 6;
|
|
46
|
+
const [currentKey, setCurrentKey] = (0, _react.useState)(activeKey);
|
|
47
|
+
const [containerHeight, setContainerHeight] = (0, _react.useState)(0);
|
|
48
|
+
const isTransitioning = (0, _react.useRef)(false);
|
|
49
|
+
const opacity = (0, _reactNativeReanimated.useSharedValue)(1);
|
|
50
|
+
const translateY = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
51
|
+
const commitSwitch = (0, _react.useCallback)(newKey => {
|
|
52
|
+
setCurrentKey(newKey);
|
|
53
|
+
isTransitioning.current = false;
|
|
54
|
+
// Delay fade-in to next frame so React commit doesn't block animation
|
|
55
|
+
requestAnimationFrame(() => {
|
|
56
|
+
opacity.value = (0, _reactNativeReanimated.withTiming)(1, {
|
|
57
|
+
duration: inDuration,
|
|
58
|
+
easing: _reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.quad)
|
|
59
|
+
});
|
|
60
|
+
translateY.value = (0, _reactNativeReanimated.withSpring)(0, springConfig);
|
|
61
|
+
});
|
|
62
|
+
}, [inDuration, springConfig]);
|
|
63
|
+
(0, _react.useEffect)(() => {
|
|
64
|
+
if (activeKey !== currentKey && !isTransitioning.current) {
|
|
65
|
+
isTransitioning.current = true;
|
|
66
|
+
|
|
67
|
+
// Fade out
|
|
68
|
+
opacity.value = (0, _reactNativeReanimated.withTiming)(0, {
|
|
69
|
+
duration: outDuration,
|
|
70
|
+
easing: _reactNativeReanimated.Easing.in(_reactNativeReanimated.Easing.quad)
|
|
71
|
+
}, finished => {
|
|
72
|
+
if (finished) {
|
|
73
|
+
(0, _reactNativeReanimated.runOnJS)(commitSwitch)(activeKey);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
translateY.value = (0, _reactNativeReanimated.withTiming)(shiftY, {
|
|
77
|
+
duration: outDuration
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}, [activeKey]);
|
|
81
|
+
const animatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
|
82
|
+
opacity: opacity.value,
|
|
83
|
+
transform: [{
|
|
84
|
+
translateY: translateY.value
|
|
85
|
+
}]
|
|
86
|
+
}));
|
|
87
|
+
|
|
88
|
+
// Find active child by key
|
|
89
|
+
// React.Children.toArray prefixes keys with ".$/", ".$", or "."
|
|
90
|
+
// We strip all prefixes to compare raw keys
|
|
91
|
+
const childArray = _react.default.Children.toArray(children);
|
|
92
|
+
const stripKeyPrefix = key => key?.replace(/^\.\$/, '').replace(/^\./, '');
|
|
93
|
+
const activeChild = childArray.find(child => stripKeyPrefix(child.key) === String(currentKey)) || childArray[0];
|
|
94
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
95
|
+
style: [styles.container, containerHeight > 0 && {
|
|
96
|
+
minHeight: containerHeight
|
|
97
|
+
}, style],
|
|
98
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
99
|
+
style: [styles.content, animatedStyle],
|
|
100
|
+
onLayout: e => {
|
|
101
|
+
const h = e.nativeEvent.layout.height;
|
|
102
|
+
if (h > containerHeight) setContainerHeight(h);
|
|
103
|
+
},
|
|
104
|
+
children: activeChild
|
|
105
|
+
})
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
const styles = _reactNative.StyleSheet.create({
|
|
109
|
+
container: {
|
|
110
|
+
width: '100%',
|
|
111
|
+
flex: 1
|
|
112
|
+
},
|
|
113
|
+
content: {
|
|
114
|
+
width: '100%',
|
|
115
|
+
flex: 1
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
//# sourceMappingURL=FluentGlassCrossfade.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_useTheme","_interopRequireDefault","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","FluentGlassCrossfade","activeKey","children","fadeOutDuration","fadeInDuration","translateY","translateYAmount","style","theme","useTheme","crossfadeConfig","animations","crossfade","springConfig","spring","snappy","mass","damping","stiffness","outDuration","inDuration","shiftY","currentKey","setCurrentKey","useState","containerHeight","setContainerHeight","isTransitioning","useRef","opacity","useSharedValue","commitSwitch","useCallback","newKey","current","requestAnimationFrame","value","withTiming","duration","easing","Easing","out","quad","withSpring","useEffect","in","finished","runOnJS","animatedStyle","useAnimatedStyle","transform","childArray","React","Children","toArray","stripKeyPrefix","key","replace","activeChild","find","child","String","jsx","View","styles","container","minHeight","content","onLayout","h","nativeEvent","layout","height","StyleSheet","create","width","flex"],"sourceRoot":"..\\..\\..\\src","sources":["components/FluentGlassCrossfade.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAH,uBAAA,CAAAC,OAAA;AAQA,IAAAG,SAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAAyC,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAI,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAP,wBAAAO,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAX,uBAAA,YAAAA,CAAAO,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,CAAA,MAAAF,CAAA,GAAAJ,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAE,CAAA,CAAAI,GAAA,CAAAX,CAAA,UAAAO,CAAA,CAAAK,GAAA,CAAAZ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GAAG5C,eAAe,EAAEC,kBAAkB,CAAC2C,CAAC,CAAC;MAClD,CAAE;MAAAnE,QAAA,EAEDwD;IAAW,CACD;EAAC,CACd,CAAC;AAEf;AAEA,MAAMM,MAAM,GAAGS,uBAAU,CAACC,MAAM,CAAC;EAC7BT,SAAS,EAAE;IACPU,KAAK,EAAE,MAAM;IACbC,IAAI,EAAE;EACV,CAAC;EACDT,OAAO,EAAE;IACLQ,KAAK,EAAE,MAAM;IACbC,IAAI,EAAE;EACV;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = FluentGlassDateInput;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _vectorIcons = require("@expo/vector-icons");
|
|
10
|
+
var _FluentGlass = _interopRequireDefault(require("./FluentGlass"));
|
|
11
|
+
var _FluentGlassDatePicker = _interopRequireDefault(require("./FluentGlassDatePicker"));
|
|
12
|
+
var _useTheme = _interopRequireDefault(require("../theme/useTheme"));
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
16
|
+
/**
|
|
17
|
+
* FluentGlassDateInput (Molécula)
|
|
18
|
+
* Hybrid date input: type manually OR tap the calendar icon to open FluentGlassDatePicker.
|
|
19
|
+
*/
|
|
20
|
+
function FluentGlassDateInput({
|
|
21
|
+
value,
|
|
22
|
+
onChange,
|
|
23
|
+
placeholder = 'dd/mm/yyyy',
|
|
24
|
+
format = 'dd/mm/yyyy',
|
|
25
|
+
style,
|
|
26
|
+
accessibilityLabel
|
|
27
|
+
}) {
|
|
28
|
+
const theme = (0, _useTheme.default)();
|
|
29
|
+
const COLORS = theme.colors;
|
|
30
|
+
const typography = theme.typography;
|
|
31
|
+
const [pickerVisible, setPickerVisible] = (0, _react.useState)(false);
|
|
32
|
+
const [textValue, setTextValue] = (0, _react.useState)(value ? formatDate(value, format) : '');
|
|
33
|
+
|
|
34
|
+
// Format a Date into string
|
|
35
|
+
function formatDate(date, fmt) {
|
|
36
|
+
if (!date || !(date instanceof Date) || isNaN(date.getTime())) return '';
|
|
37
|
+
const dd = String(date.getDate()).padStart(2, '0');
|
|
38
|
+
const mm = String(date.getMonth() + 1).padStart(2, '0');
|
|
39
|
+
const yyyy = date.getFullYear();
|
|
40
|
+
return fmt === 'dd/mm/yyyy' ? `${dd}/${mm}/${yyyy}` : `${mm}/${dd}/${yyyy}`;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Parse text into a Date (returns null if invalid)
|
|
44
|
+
function parseDate(text, fmt) {
|
|
45
|
+
const parts = text.split('/');
|
|
46
|
+
if (parts.length !== 3) return null;
|
|
47
|
+
let day, month, year;
|
|
48
|
+
if (fmt === 'dd/mm/yyyy') {
|
|
49
|
+
[day, month, year] = parts;
|
|
50
|
+
} else {
|
|
51
|
+
[month, day, year] = parts;
|
|
52
|
+
}
|
|
53
|
+
const d = parseInt(day, 10);
|
|
54
|
+
const m = parseInt(month, 10);
|
|
55
|
+
const y = parseInt(year, 10);
|
|
56
|
+
if (isNaN(d) || isNaN(m) || isNaN(y)) return null;
|
|
57
|
+
if (m < 1 || m > 12 || d < 1 || d > 31 || y < 1900) return null;
|
|
58
|
+
const date = new Date(y, m - 1, d);
|
|
59
|
+
if (date.getMonth() !== m - 1) return null; // overflow check
|
|
60
|
+
return date;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// When user finishes typing (blur), try to parse the manual entry
|
|
64
|
+
const handleBlur = (0, _react.useCallback)(() => {
|
|
65
|
+
const parsed = parseDate(textValue, format);
|
|
66
|
+
if (parsed && onChange) {
|
|
67
|
+
onChange(parsed);
|
|
68
|
+
}
|
|
69
|
+
}, [textValue, format, onChange]);
|
|
70
|
+
|
|
71
|
+
// When text changes, auto-insert slashes
|
|
72
|
+
const handleChangeText = (0, _react.useCallback)(raw => {
|
|
73
|
+
// Strip non-digit characters
|
|
74
|
+
const digits = raw.replace(/\D/g, '');
|
|
75
|
+
// Auto-format with slashes
|
|
76
|
+
let formatted = '';
|
|
77
|
+
for (let i = 0; i < digits.length && i < 8; i++) {
|
|
78
|
+
if (i === 2 || i === 4) formatted += '/';
|
|
79
|
+
formatted += digits[i];
|
|
80
|
+
}
|
|
81
|
+
setTextValue(formatted);
|
|
82
|
+
}, []);
|
|
83
|
+
|
|
84
|
+
// When user picks from the calendar popup
|
|
85
|
+
const handlePickerSelect = (0, _react.useCallback)(date => {
|
|
86
|
+
setTextValue(formatDate(date, format));
|
|
87
|
+
setPickerVisible(false);
|
|
88
|
+
if (onChange) onChange(date);
|
|
89
|
+
}, [format, onChange]);
|
|
90
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
91
|
+
style: style,
|
|
92
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_FluentGlass.default, {
|
|
93
|
+
style: styles.container,
|
|
94
|
+
intensity: 15,
|
|
95
|
+
borderRadius: 12,
|
|
96
|
+
borderOpacity: 0.15,
|
|
97
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
98
|
+
style: styles.innerContainer,
|
|
99
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
|
|
100
|
+
style: [styles.input, {
|
|
101
|
+
outlineStyle: 'none',
|
|
102
|
+
color: COLORS.textPrimary,
|
|
103
|
+
fontFamily: typography.regular
|
|
104
|
+
}],
|
|
105
|
+
value: textValue,
|
|
106
|
+
onChangeText: handleChangeText,
|
|
107
|
+
onBlur: handleBlur,
|
|
108
|
+
placeholder: placeholder,
|
|
109
|
+
placeholderTextColor: COLORS.textSecondary,
|
|
110
|
+
keyboardType: "numeric",
|
|
111
|
+
maxLength: 10,
|
|
112
|
+
accessibilityLabel: accessibilityLabel ?? placeholder ?? 'Date'
|
|
113
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
114
|
+
onPress: () => setPickerVisible(true),
|
|
115
|
+
style: styles.iconButton,
|
|
116
|
+
hitSlop: 10,
|
|
117
|
+
accessibilityRole: "button",
|
|
118
|
+
accessibilityLabel: "Open date picker",
|
|
119
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
120
|
+
name: "calendar-outline",
|
|
121
|
+
size: 20,
|
|
122
|
+
color: COLORS.textSecondary
|
|
123
|
+
})
|
|
124
|
+
})]
|
|
125
|
+
})
|
|
126
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Modal, {
|
|
127
|
+
visible: pickerVisible,
|
|
128
|
+
transparent: true,
|
|
129
|
+
animationType: "fade",
|
|
130
|
+
onRequestClose: () => setPickerVisible(false),
|
|
131
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
132
|
+
style: [styles.overlay, {
|
|
133
|
+
backgroundColor: COLORS.overlay
|
|
134
|
+
}],
|
|
135
|
+
onPress: () => setPickerVisible(false),
|
|
136
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
137
|
+
style: styles.pickerPopup,
|
|
138
|
+
onPress: e => e.stopPropagation(),
|
|
139
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_FluentGlassDatePicker.default, {
|
|
140
|
+
value: value || new Date(),
|
|
141
|
+
onChange: handlePickerSelect
|
|
142
|
+
})
|
|
143
|
+
})
|
|
144
|
+
})
|
|
145
|
+
})]
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
const styles = _reactNative.StyleSheet.create({
|
|
149
|
+
container: {
|
|
150
|
+
minHeight: 50
|
|
151
|
+
},
|
|
152
|
+
innerContainer: {
|
|
153
|
+
flex: 1,
|
|
154
|
+
flexDirection: 'row',
|
|
155
|
+
alignItems: 'center'
|
|
156
|
+
},
|
|
157
|
+
input: {
|
|
158
|
+
flex: 1,
|
|
159
|
+
height: '100%',
|
|
160
|
+
paddingHorizontal: 16,
|
|
161
|
+
fontSize: 16
|
|
162
|
+
},
|
|
163
|
+
iconButton: {
|
|
164
|
+
padding: 12,
|
|
165
|
+
marginRight: 4
|
|
166
|
+
},
|
|
167
|
+
overlay: {
|
|
168
|
+
flex: 1,
|
|
169
|
+
justifyContent: 'center',
|
|
170
|
+
alignItems: 'center'
|
|
171
|
+
},
|
|
172
|
+
pickerPopup: {
|
|
173
|
+
// Let the DatePicker define its own width (300)
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
//# sourceMappingURL=FluentGlassDateInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_vectorIcons","_FluentGlass","_interopRequireDefault","_FluentGlassDatePicker","_useTheme","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","FluentGlassDateInput","value","onChange","placeholder","format","style","accessibilityLabel","theme","useTheme","COLORS","colors","typography","pickerVisible","setPickerVisible","useState","textValue","setTextValue","formatDate","date","fmt","Date","isNaN","getTime","dd","String","getDate","padStart","mm","getMonth","yyyy","getFullYear","parseDate","text","parts","split","length","day","month","year","d","parseInt","m","y","handleBlur","useCallback","parsed","handleChangeText","raw","digits","replace","formatted","handlePickerSelect","jsxs","View","children","jsx","styles","container","intensity","borderRadius","borderOpacity","innerContainer","TextInput","input","outlineStyle","color","textPrimary","fontFamily","regular","onChangeText","onBlur","placeholderTextColor","textSecondary","keyboardType","maxLength","TouchableOpacity","onPress","iconButton","hitSlop","accessibilityRole","Ionicons","name","size","Modal","visible","transparent","animationType","onRequestClose","Pressable","overlay","backgroundColor","pickerPopup","stopPropagation","StyleSheet","create","minHeight","flex","flexDirection","alignItems","height","paddingHorizontal","fontSize","padding","marginRight","justifyContent"],"sourceRoot":"..\\..\\..\\src","sources":["components/FluentGlassDateInput.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,sBAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,SAAA,GAAAF,sBAAA,CAAAJ,OAAA;AAAyC,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAI,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAT,wBAAAS,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAb,uBAAA,YAAAA,CAAAS,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAA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