@leonardaustin/ui 0.24.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +183 -2
- package/dist/components/app-shell/AppShell.d.ts +3 -4
- package/dist/components/app-shell/AppShell.js +82 -0
- package/dist/components/app-shell/AuthLayout.d.ts +3 -4
- package/dist/components/app-shell/AuthLayout.js +16 -0
- package/dist/components/app-shell/BackLink.d.ts +3 -4
- package/dist/components/app-shell/BackLink.js +19 -0
- package/dist/components/app-shell/BottomNav.d.ts +3 -3
- package/dist/components/app-shell/BottomNav.js +37 -0
- package/dist/components/app-shell/Breadcrumbs.d.ts +3 -3
- package/dist/components/app-shell/Breadcrumbs.js +46 -0
- package/dist/components/app-shell/CommandPalette.d.ts +3 -3
- package/dist/components/app-shell/CommandPalette.js +119 -0
- package/dist/components/app-shell/MobileDrawer.d.ts +3 -4
- package/dist/components/app-shell/MobileDrawer.js +128 -0
- package/dist/components/app-shell/Sidebar.d.ts +3 -4
- package/dist/components/app-shell/Sidebar.js +355 -0
- package/dist/components/app-shell/ThemeMenu.d.ts +3 -3
- package/dist/components/app-shell/ThemeMenu.js +273 -0
- package/dist/components/app-shell/TopBar.d.ts +3 -4
- package/dist/components/app-shell/TopBar.js +129 -0
- package/dist/components/app-shell/commandPaletteEvents.d.ts +0 -1
- package/dist/components/app-shell/commandPaletteEvents.js +16 -0
- package/dist/components/app-shell/navigation.d.ts +0 -1
- package/dist/components/app-shell/navigation.js +21 -0
- package/dist/components/app-shell/themeMenuEvents.d.ts +0 -1
- package/dist/components/app-shell/themeMenuEvents.js +7 -0
- package/dist/components/app-shell/types.d.ts +0 -1
- package/dist/components/charts/AreaChart.d.ts +4 -4
- package/dist/components/charts/AreaChart.js +217 -0
- package/dist/components/charts/BarChart.d.ts +4 -4
- package/dist/components/charts/BarChart.js +91 -0
- package/dist/components/charts/DonutChart.d.ts +4 -4
- package/dist/components/charts/DonutChart.js +172 -0
- package/dist/components/charts/RadarChart.d.ts +4 -4
- package/dist/components/charts/RadarChart.js +142 -0
- package/dist/components/charts/RadialBarChart.d.ts +4 -4
- package/dist/components/charts/RadialBarChart.js +219 -0
- package/dist/components/charts/SparkLine.d.ts +4 -4
- package/dist/components/charts/SparkLine.js +39 -0
- package/dist/components/charts/StackedBarChart.d.ts +4 -4
- package/dist/components/charts/StackedBarChart.js +249 -0
- package/dist/components/charts/VerticalBarChart.d.ts +4 -4
- package/dist/components/charts/VerticalBarChart.js +143 -0
- package/dist/components/charts/chartUtils.d.ts +0 -1
- package/dist/components/charts/chartUtils.js +68 -0
- package/dist/components/tables/ColumnPicker.d.ts +3 -4
- package/dist/components/tables/ColumnPicker.js +59 -0
- package/dist/components/tables/Pagination.d.ts +3 -5
- package/dist/components/tables/Pagination.js +56 -0
- package/dist/components/tables/ResourceTable.d.ts +3 -4
- package/dist/components/tables/ResourceTable.js +88 -0
- package/dist/components/tables/Table.d.ts +0 -1
- package/dist/components/tables/Table.js +95 -0
- package/dist/components/tables/sortRows.d.ts +0 -1
- package/dist/components/tables/sortRows.js +11 -0
- package/dist/components/ui/Accordion.d.ts +9 -2
- package/dist/components/ui/Accordion.js +35 -0
- package/dist/components/ui/Alert.d.ts +8 -6
- package/dist/components/ui/Alert.js +51 -0
- package/dist/components/ui/AttachmentList.d.ts +5 -6
- package/dist/components/ui/AttachmentList.js +90 -0
- package/dist/components/ui/AudioPlayer.d.ts +7 -4
- package/dist/components/ui/AudioPlayer.js +447 -0
- package/dist/components/ui/AuthCard.d.ts +3 -4
- package/dist/components/ui/AuthCard.js +39 -0
- package/dist/components/ui/AuthorByline.d.ts +5 -6
- package/dist/components/ui/AuthorByline.js +23 -0
- package/dist/components/ui/Avatar.d.ts +5 -4
- package/dist/components/ui/Avatar.js +36 -0
- package/dist/components/ui/Badge.d.ts +3 -3
- package/dist/components/ui/Badge.js +47 -0
- package/dist/components/ui/Button.d.ts +9 -9
- package/dist/components/ui/Button.js +83 -0
- package/dist/components/ui/Calendar.d.ts +3 -4
- package/dist/components/ui/Calendar.js +344 -0
- package/dist/components/ui/CalendarGrid.d.ts +3 -4
- package/dist/components/ui/CalendarGrid.js +136 -0
- package/dist/components/ui/Card.d.ts +6 -6
- package/dist/components/ui/Card.js +53 -0
- package/dist/components/ui/CharacterCount.d.ts +3 -4
- package/dist/components/ui/CharacterCount.js +27 -0
- package/dist/components/ui/Checkbox.d.ts +10 -9
- package/dist/components/ui/Checkbox.js +52 -0
- package/dist/components/ui/CodeInput.d.ts +7 -5
- package/dist/components/ui/CodeInput.js +96 -0
- package/dist/components/ui/Combobox.d.ts +8 -7
- package/dist/components/ui/Combobox.js +213 -0
- package/dist/components/ui/CopyButton.d.ts +6 -2
- package/dist/components/ui/CopyButton.js +57 -0
- package/dist/components/ui/DangerZone.d.ts +3 -5
- package/dist/components/ui/DangerZone.js +23 -0
- package/dist/components/ui/DatePartsInput.d.ts +6 -5
- package/dist/components/ui/DatePartsInput.js +138 -0
- package/dist/components/ui/DatePicker.d.ts +9 -5
- package/dist/components/ui/DatePicker.js +84 -0
- package/dist/components/ui/DateRangePicker.d.ts +7 -6
- package/dist/components/ui/DateRangePicker.js +143 -0
- package/dist/components/ui/DateTimePicker.d.ts +7 -5
- package/dist/components/ui/DateTimePicker.js +267 -0
- package/dist/components/ui/DetailPanel.d.ts +3 -4
- package/dist/components/ui/DetailPanel.js +183 -0
- package/dist/components/ui/Dialog.d.ts +3 -4
- package/dist/components/ui/Dialog.js +411 -0
- package/dist/components/ui/DialogActions.d.ts +3 -4
- package/dist/components/ui/DialogActions.js +35 -0
- package/dist/components/ui/Disclosure.d.ts +7 -4
- package/dist/components/ui/Disclosure.js +45 -0
- package/dist/components/ui/DividerLabel.d.ts +3 -4
- package/dist/components/ui/DividerLabel.js +20 -0
- package/dist/components/ui/DropdownMenu.d.ts +4 -5
- package/dist/components/ui/DropdownMenu.js +229 -0
- package/dist/components/ui/EmptyState.d.ts +3 -5
- package/dist/components/ui/EmptyState.js +31 -0
- package/dist/components/ui/ErrorBoundary.d.ts +3 -3
- package/dist/components/ui/ErrorBoundary.js +46 -0
- package/dist/components/ui/FieldContext.d.ts +0 -1
- package/dist/components/ui/FieldContext.js +8 -0
- package/dist/components/ui/Fieldset.d.ts +2 -3
- package/dist/components/ui/Fieldset.js +39 -0
- package/dist/components/ui/FilterButton.d.ts +4 -9
- package/dist/components/ui/FilterButton.js +17 -0
- package/dist/components/ui/FilterDropdown.d.ts +4 -6
- package/dist/components/ui/FilterDropdown.js +18 -0
- package/dist/components/ui/FormField.d.ts +4 -5
- package/dist/components/ui/FormField.js +68 -0
- package/dist/components/ui/Grid.d.ts +1 -2
- package/dist/components/ui/Grid.js +19 -0
- package/dist/components/ui/GridItem.d.ts +1 -2
- package/dist/components/ui/GridItem.js +16 -0
- package/dist/components/ui/Inline.d.ts +1 -2
- package/dist/components/ui/Inline.js +24 -0
- package/dist/components/ui/Kbd.d.ts +3 -4
- package/dist/components/ui/Kbd.js +13 -0
- package/dist/components/ui/ListItemLink.d.ts +3 -4
- package/dist/components/ui/ListItemLink.js +44 -0
- package/dist/components/ui/LoadingSpinner.d.ts +5 -5
- package/dist/components/ui/LoadingSpinner.js +19 -0
- package/dist/components/ui/MessageBubble.d.ts +5 -3
- package/dist/components/ui/MessageBubble.js +41 -0
- package/dist/components/ui/MetadataGrid.d.ts +5 -4
- package/dist/components/ui/MetadataGrid.js +76 -0
- package/dist/components/ui/MetricCard.d.ts +3 -4
- package/dist/components/ui/MetricCard.js +51 -0
- package/dist/components/ui/NavTabs.d.ts +2 -3
- package/dist/components/ui/NavTabs.js +29 -0
- package/dist/components/ui/OAuthButton.d.ts +2 -3
- package/dist/components/ui/OAuthButton.js +55 -0
- package/dist/components/ui/OverlineLabel.d.ts +3 -4
- package/dist/components/ui/OverlineLabel.js +13 -0
- package/dist/components/ui/PageHeader.d.ts +3 -4
- package/dist/components/ui/PageHeader.js +33 -0
- package/dist/components/ui/PageSection.d.ts +3 -4
- package/dist/components/ui/PageSection.js +31 -0
- package/dist/components/ui/PaginationBar.d.ts +3 -4
- package/dist/components/ui/PaginationBar.js +62 -0
- package/dist/components/ui/PasswordInput.d.ts +3 -5
- package/dist/components/ui/PasswordInput.js +62 -0
- package/dist/components/ui/PasswordRequirements.d.ts +3 -3
- package/dist/components/ui/PasswordRequirements.js +34 -0
- package/dist/components/ui/Popover.d.ts +5 -4
- package/dist/components/ui/Popover.js +53 -0
- package/dist/components/ui/ProfileHeader.d.ts +3 -4
- package/dist/components/ui/ProfileHeader.js +54 -0
- package/dist/components/ui/ProgressBar.d.ts +3 -4
- package/dist/components/ui/ProgressBar.js +42 -0
- package/dist/components/ui/ProseContent.d.ts +3 -4
- package/dist/components/ui/ProseContent.js +13 -0
- package/dist/components/ui/QrCode.d.ts +3 -4
- package/dist/components/ui/QrCode.js +47 -0
- package/dist/components/ui/Radio.d.ts +9 -7
- package/dist/components/ui/Radio.js +58 -0
- package/dist/components/ui/RadioPill.d.ts +10 -8
- package/dist/components/ui/RadioPill.js +53 -0
- package/dist/components/ui/ReorderList.d.ts +3 -4
- package/dist/components/ui/ReorderList.js +123 -0
- package/dist/components/ui/SearchInput.d.ts +7 -6
- package/dist/components/ui/SearchInput.js +49 -0
- package/dist/components/ui/SectionHeader.d.ts +3 -5
- package/dist/components/ui/SectionHeader.js +13 -0
- package/dist/components/ui/Select.d.ts +4 -6
- package/dist/components/ui/Select.js +117 -0
- package/dist/components/ui/SelectDropdown.d.ts +10 -6
- package/dist/components/ui/SelectDropdown.js +206 -0
- package/dist/components/ui/SettingRow.d.ts +5 -7
- package/dist/components/ui/SettingRow.js +25 -0
- package/dist/components/ui/SideSheet.d.ts +3 -4
- package/dist/components/ui/SideSheet.js +164 -0
- package/dist/components/ui/Skeleton.d.ts +3 -4
- package/dist/components/ui/Skeleton.js +18 -0
- package/dist/components/ui/Slider.d.ts +11 -7
- package/dist/components/ui/Slider.js +58 -0
- package/dist/components/ui/SplitPaneLayout.d.ts +6 -6
- package/dist/components/ui/SplitPaneLayout.js +22 -0
- package/dist/components/ui/Stack.d.ts +1 -2
- package/dist/components/ui/Stack.js +18 -0
- package/dist/components/ui/StatusDot.d.ts +3 -3
- package/dist/components/ui/StatusDot.js +24 -0
- package/dist/components/ui/StepProgress.d.ts +3 -3
- package/dist/components/ui/StepProgress.js +33 -0
- package/dist/components/ui/Tabs.d.ts +5 -6
- package/dist/components/ui/Tabs.js +63 -0
- package/dist/components/ui/TextInput.d.ts +3 -5
- package/dist/components/ui/TextInput.js +57 -0
- package/dist/components/ui/Textarea.d.ts +3 -5
- package/dist/components/ui/Textarea.js +59 -0
- package/dist/components/ui/ThemePreview.d.ts +3 -4
- package/dist/components/ui/ThemePreview.js +28 -0
- package/dist/components/ui/TimeInput.d.ts +7 -7
- package/dist/components/ui/TimeInput.js +22 -0
- package/dist/components/ui/Timeline.d.ts +3 -3
- package/dist/components/ui/Timeline.js +29 -0
- package/dist/components/ui/Toast.d.ts +0 -1
- package/dist/components/ui/Toast.js +121 -0
- package/dist/components/ui/Toggle.d.ts +10 -5
- package/dist/components/ui/Toggle.js +34 -0
- package/dist/components/ui/Toolbar.d.ts +3 -4
- package/dist/components/ui/Toolbar.js +70 -0
- package/dist/components/ui/Tooltip.d.ts +0 -1
- package/dist/components/ui/Tooltip.js +91 -0
- package/dist/components/ui/TranscriptLine.d.ts +5 -4
- package/dist/components/ui/TranscriptLine.js +40 -0
- package/dist/components/ui/UploadDropzone.d.ts +3 -6
- package/dist/components/ui/UploadDropzone.js +55 -0
- package/dist/components/ui/badgeColors.d.ts +0 -1
- package/dist/components/ui/badgeColors.js +5 -0
- package/dist/components/ui/calendar/AgendaView.d.ts +0 -1
- package/dist/components/ui/calendar/AgendaView.js +140 -0
- package/dist/components/ui/calendar/MonthView.d.ts +0 -1
- package/dist/components/ui/calendar/MonthView.js +321 -0
- package/dist/components/ui/calendar/TimeGrid.d.ts +0 -1
- package/dist/components/ui/calendar/TimeGrid.js +501 -0
- package/dist/components/ui/calendar/TimelineView.d.ts +0 -1
- package/dist/components/ui/calendar/TimelineView.js +311 -0
- package/dist/components/ui/calendar/context.d.ts +0 -1
- package/dist/components/ui/calendar/context.js +10 -0
- package/dist/components/ui/calendar/items.d.ts +0 -1
- package/dist/components/ui/calendar/items.js +152 -0
- package/dist/components/ui/calendar/types.d.ts +0 -1
- package/dist/components/ui/calendar/types.js +38 -0
- package/dist/components/ui/calendar/useGridInteraction.d.ts +0 -1
- package/dist/components/ui/calendar/useGridInteraction.js +393 -0
- package/dist/components/ui/useFieldControl.d.ts +1 -2
- package/dist/components/ui/useFieldControl.js +17 -0
- package/dist/config/theme.d.ts +0 -1
- package/dist/config/theme.js +219 -0
- package/dist/core.css +2933 -0
- package/dist/hooks/useAnchoredPopup.d.ts +0 -1
- package/dist/hooks/useAnchoredPopup.js +162 -0
- package/dist/hooks/useApplyTheme.d.ts +0 -1
- package/dist/hooks/useApplyTheme.js +16 -0
- package/dist/hooks/useControllableState.d.ts +14 -0
- package/dist/hooks/useControllableState.js +10 -0
- package/dist/hooks/useDismiss.d.ts +0 -1
- package/dist/hooks/useDismiss.js +24 -0
- package/dist/hooks/useFocusTrap.d.ts +0 -1
- package/dist/hooks/useFocusTrap.js +42 -0
- package/dist/hooks/useOverlayStack.d.ts +0 -1
- package/dist/hooks/useOverlayStack.js +23 -0
- package/dist/hooks/usePopover.d.ts +0 -1
- package/dist/hooks/usePopover.js +47 -0
- package/dist/hooks/usePortalContainer.d.ts +0 -1
- package/dist/hooks/usePortalContainer.js +14 -0
- package/dist/hooks/useSettings.d.ts +0 -1
- package/dist/hooks/useSettings.js +8 -0
- package/dist/hooks/useTheme.d.ts +0 -1
- package/dist/hooks/useTheme.js +8 -0
- package/dist/hooks/useTypeahead.d.ts +0 -1
- package/dist/hooks/useTypeahead.js +19 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +133 -12866
- package/dist/lib/anchorPlacement.d.ts +0 -1
- package/dist/lib/anchorPlacement.js +75 -0
- package/dist/lib/calendar.d.ts +0 -1
- package/dist/lib/calendar.js +666 -0
- package/dist/lib/cn.d.ts +0 -1
- package/dist/lib/cn.js +228 -0
- package/dist/lib/codeInput.d.ts +0 -1
- package/dist/lib/codeInput.js +51 -0
- package/dist/lib/dateParts.d.ts +0 -1
- package/dist/lib/dateParts.js +31 -0
- package/dist/lib/dialogDrag.d.ts +0 -1
- package/dist/lib/dialogDrag.js +45 -0
- package/dist/lib/dialogResize.d.ts +0 -1
- package/dist/lib/dialogResize.js +47 -0
- package/dist/lib/formatDate.d.ts +0 -1
- package/dist/lib/formatDate.js +29 -0
- package/dist/lib/formatMediaTime.d.ts +0 -1
- package/dist/lib/formatMediaTime.js +7 -0
- package/dist/lib/keyboardStep.d.ts +0 -1
- package/dist/lib/layout.d.ts +0 -1
- package/dist/lib/layout.js +29 -0
- package/dist/lib/math.d.ts +0 -1
- package/dist/lib/math.js +6 -0
- package/dist/lib/mergeRefs.d.ts +6 -0
- package/dist/lib/mergeRefs.js +17 -0
- package/dist/lib/months.d.ts +0 -1
- package/dist/lib/months.js +30 -0
- package/dist/lib/overlayStack.d.ts +0 -1
- package/dist/lib/overlayStack.js +47 -0
- package/dist/lib/panelResize.d.ts +0 -1
- package/dist/lib/panelResize.js +8 -0
- package/dist/lib/passwordRequirements.d.ts +0 -1
- package/dist/lib/passwordRequirements.js +23 -0
- package/dist/lib/qrCode.d.ts +0 -1
- package/dist/lib/qrCode.js +570 -0
- package/dist/lib/rect.d.ts +0 -1
- package/dist/lib/tones.d.ts +0 -1
- package/dist/lib/tones.js +104 -0
- package/dist/lib/typeahead.d.ts +0 -1
- package/dist/lib/typeahead.js +31 -0
- package/dist/providers/ControlSizeContext.d.ts +0 -1
- package/dist/providers/ControlSizeContext.js +9 -0
- package/dist/providers/ControlSizeProvider.d.ts +0 -1
- package/dist/providers/ControlSizeProvider.js +11 -0
- package/dist/providers/SettingsContext.d.ts +0 -1
- package/dist/providers/SettingsContext.js +53 -0
- package/dist/providers/SettingsProvider.d.ts +0 -1
- package/dist/providers/SettingsProvider.js +249 -0
- package/dist/providers/ThemeContext.d.ts +0 -1
- package/dist/providers/ThemeContext.js +5 -0
- package/dist/providers/ThemeProvider.d.ts +0 -1
- package/dist/providers/ThemeProvider.js +17 -0
- package/dist/providers/accentColors.d.ts +0 -1
- package/dist/providers/accentColors.js +75 -0
- package/dist/providers/themeClasses.d.ts +1 -1
- package/dist/providers/themeClasses.js +20 -0
- package/dist/styles.css +263 -176
- package/dist/themes/cyber-brutal-dark.css +53 -0
- package/dist/themes/cyber-brutal-light.css +75 -0
- package/dist/themes/glass-dark.css +217 -0
- package/dist/themes/glass-light.css +215 -0
- package/dist/themes/hashi.css +66 -0
- package/dist/themes/light-inverted.css +32 -0
- package/dist/themes/light.css +1 -0
- package/dist/themes/monokai.css +51 -0
- package/dist/themes/solarized.css +55 -0
- package/package.json +3 -1
- package/dist/components/app-shell/AppShell.d.ts.map +0 -1
- package/dist/components/app-shell/AuthLayout.d.ts.map +0 -1
- package/dist/components/app-shell/BackLink.d.ts.map +0 -1
- package/dist/components/app-shell/BottomNav.d.ts.map +0 -1
- package/dist/components/app-shell/Breadcrumbs.d.ts.map +0 -1
- package/dist/components/app-shell/CommandPalette.d.ts.map +0 -1
- package/dist/components/app-shell/MobileDrawer.d.ts.map +0 -1
- package/dist/components/app-shell/Sidebar.d.ts.map +0 -1
- package/dist/components/app-shell/ThemeMenu.d.ts.map +0 -1
- package/dist/components/app-shell/TopBar.d.ts.map +0 -1
- package/dist/components/app-shell/commandPaletteEvents.d.ts.map +0 -1
- package/dist/components/app-shell/navigation.d.ts.map +0 -1
- package/dist/components/app-shell/themeMenuEvents.d.ts.map +0 -1
- package/dist/components/app-shell/types.d.ts.map +0 -1
- package/dist/components/charts/AreaChart.d.ts.map +0 -1
- package/dist/components/charts/BarChart.d.ts.map +0 -1
- package/dist/components/charts/DonutChart.d.ts.map +0 -1
- package/dist/components/charts/RadarChart.d.ts.map +0 -1
- package/dist/components/charts/RadialBarChart.d.ts.map +0 -1
- package/dist/components/charts/SparkLine.d.ts.map +0 -1
- package/dist/components/charts/StackedBarChart.d.ts.map +0 -1
- package/dist/components/charts/VerticalBarChart.d.ts.map +0 -1
- package/dist/components/charts/chartUtils.d.ts.map +0 -1
- package/dist/components/tables/ColumnPicker.d.ts.map +0 -1
- package/dist/components/tables/Pagination.d.ts.map +0 -1
- package/dist/components/tables/ResourceTable.d.ts.map +0 -1
- package/dist/components/tables/Table.d.ts.map +0 -1
- package/dist/components/tables/sortRows.d.ts.map +0 -1
- package/dist/components/ui/Accordion.d.ts.map +0 -1
- package/dist/components/ui/Alert.d.ts.map +0 -1
- package/dist/components/ui/AttachmentList.d.ts.map +0 -1
- package/dist/components/ui/AudioPlayer.d.ts.map +0 -1
- package/dist/components/ui/AuthCard.d.ts.map +0 -1
- package/dist/components/ui/AuthorByline.d.ts.map +0 -1
- package/dist/components/ui/Avatar.d.ts.map +0 -1
- package/dist/components/ui/Badge.d.ts.map +0 -1
- package/dist/components/ui/Button.d.ts.map +0 -1
- package/dist/components/ui/Calendar.d.ts.map +0 -1
- package/dist/components/ui/CalendarGrid.d.ts.map +0 -1
- package/dist/components/ui/Card.d.ts.map +0 -1
- package/dist/components/ui/CharacterCount.d.ts.map +0 -1
- package/dist/components/ui/Checkbox.d.ts.map +0 -1
- package/dist/components/ui/CodeInput.d.ts.map +0 -1
- package/dist/components/ui/Combobox.d.ts.map +0 -1
- package/dist/components/ui/CopyButton.d.ts.map +0 -1
- package/dist/components/ui/DangerZone.d.ts.map +0 -1
- package/dist/components/ui/DatePartsInput.d.ts.map +0 -1
- package/dist/components/ui/DatePicker.d.ts.map +0 -1
- package/dist/components/ui/DateRangePicker.d.ts.map +0 -1
- package/dist/components/ui/DateTimePicker.d.ts.map +0 -1
- package/dist/components/ui/DetailPanel.d.ts.map +0 -1
- package/dist/components/ui/Dialog.d.ts.map +0 -1
- package/dist/components/ui/DialogActions.d.ts.map +0 -1
- package/dist/components/ui/Disclosure.d.ts.map +0 -1
- package/dist/components/ui/DividerLabel.d.ts.map +0 -1
- package/dist/components/ui/DropdownMenu.d.ts.map +0 -1
- package/dist/components/ui/EmptyState.d.ts.map +0 -1
- package/dist/components/ui/ErrorBoundary.d.ts.map +0 -1
- package/dist/components/ui/FieldContext.d.ts.map +0 -1
- package/dist/components/ui/Fieldset.d.ts.map +0 -1
- package/dist/components/ui/FilterButton.d.ts.map +0 -1
- package/dist/components/ui/FilterDropdown.d.ts.map +0 -1
- package/dist/components/ui/FormField.d.ts.map +0 -1
- package/dist/components/ui/Grid.d.ts.map +0 -1
- package/dist/components/ui/GridItem.d.ts.map +0 -1
- package/dist/components/ui/Inline.d.ts.map +0 -1
- package/dist/components/ui/Kbd.d.ts.map +0 -1
- package/dist/components/ui/ListItemLink.d.ts.map +0 -1
- package/dist/components/ui/LoadingSpinner.d.ts.map +0 -1
- package/dist/components/ui/MessageBubble.d.ts.map +0 -1
- package/dist/components/ui/MetadataGrid.d.ts.map +0 -1
- package/dist/components/ui/MetricCard.d.ts.map +0 -1
- package/dist/components/ui/NavTabs.d.ts.map +0 -1
- package/dist/components/ui/OAuthButton.d.ts.map +0 -1
- package/dist/components/ui/OverlineLabel.d.ts.map +0 -1
- package/dist/components/ui/PageHeader.d.ts.map +0 -1
- package/dist/components/ui/PageSection.d.ts.map +0 -1
- package/dist/components/ui/PaginationBar.d.ts.map +0 -1
- package/dist/components/ui/PasswordInput.d.ts.map +0 -1
- package/dist/components/ui/PasswordRequirements.d.ts.map +0 -1
- package/dist/components/ui/Popover.d.ts.map +0 -1
- package/dist/components/ui/ProfileHeader.d.ts.map +0 -1
- package/dist/components/ui/ProgressBar.d.ts.map +0 -1
- package/dist/components/ui/ProseContent.d.ts.map +0 -1
- package/dist/components/ui/QrCode.d.ts.map +0 -1
- package/dist/components/ui/Radio.d.ts.map +0 -1
- package/dist/components/ui/RadioPill.d.ts.map +0 -1
- package/dist/components/ui/ReorderList.d.ts.map +0 -1
- package/dist/components/ui/SearchInput.d.ts.map +0 -1
- package/dist/components/ui/SectionHeader.d.ts.map +0 -1
- package/dist/components/ui/Select.d.ts.map +0 -1
- package/dist/components/ui/SelectDropdown.d.ts.map +0 -1
- package/dist/components/ui/SettingRow.d.ts.map +0 -1
- package/dist/components/ui/SideSheet.d.ts.map +0 -1
- package/dist/components/ui/Skeleton.d.ts.map +0 -1
- package/dist/components/ui/Slider.d.ts.map +0 -1
- package/dist/components/ui/SplitPaneLayout.d.ts.map +0 -1
- package/dist/components/ui/Stack.d.ts.map +0 -1
- package/dist/components/ui/StatusDot.d.ts.map +0 -1
- package/dist/components/ui/StepProgress.d.ts.map +0 -1
- package/dist/components/ui/Tabs.d.ts.map +0 -1
- package/dist/components/ui/TextInput.d.ts.map +0 -1
- package/dist/components/ui/Textarea.d.ts.map +0 -1
- package/dist/components/ui/ThemePreview.d.ts.map +0 -1
- package/dist/components/ui/TimeInput.d.ts.map +0 -1
- package/dist/components/ui/Timeline.d.ts.map +0 -1
- package/dist/components/ui/Toast.d.ts.map +0 -1
- package/dist/components/ui/Toggle.d.ts.map +0 -1
- package/dist/components/ui/Toolbar.d.ts.map +0 -1
- package/dist/components/ui/Tooltip.d.ts.map +0 -1
- package/dist/components/ui/TranscriptLine.d.ts.map +0 -1
- package/dist/components/ui/UploadDropzone.d.ts.map +0 -1
- package/dist/components/ui/badgeColors.d.ts.map +0 -1
- package/dist/components/ui/calendar/AgendaView.d.ts.map +0 -1
- package/dist/components/ui/calendar/MonthView.d.ts.map +0 -1
- package/dist/components/ui/calendar/TimeGrid.d.ts.map +0 -1
- package/dist/components/ui/calendar/TimelineView.d.ts.map +0 -1
- package/dist/components/ui/calendar/context.d.ts.map +0 -1
- package/dist/components/ui/calendar/items.d.ts.map +0 -1
- package/dist/components/ui/calendar/types.d.ts.map +0 -1
- package/dist/components/ui/calendar/useGridInteraction.d.ts.map +0 -1
- package/dist/components/ui/useFieldControl.d.ts.map +0 -1
- package/dist/config/theme.d.ts.map +0 -1
- package/dist/hooks/useAnchoredPopup.d.ts.map +0 -1
- package/dist/hooks/useApplyTheme.d.ts.map +0 -1
- package/dist/hooks/useDismiss.d.ts.map +0 -1
- package/dist/hooks/useFocusTrap.d.ts.map +0 -1
- package/dist/hooks/useOverlayStack.d.ts.map +0 -1
- package/dist/hooks/usePopover.d.ts.map +0 -1
- package/dist/hooks/usePortalContainer.d.ts.map +0 -1
- package/dist/hooks/useSettings.d.ts.map +0 -1
- package/dist/hooks/useTheme.d.ts.map +0 -1
- package/dist/hooks/useTypeahead.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/lib/anchorPlacement.d.ts.map +0 -1
- package/dist/lib/calendar.d.ts.map +0 -1
- package/dist/lib/cn.d.ts.map +0 -1
- package/dist/lib/codeInput.d.ts.map +0 -1
- package/dist/lib/dateParts.d.ts.map +0 -1
- package/dist/lib/dialogDrag.d.ts.map +0 -1
- package/dist/lib/dialogResize.d.ts.map +0 -1
- package/dist/lib/formatDate.d.ts.map +0 -1
- package/dist/lib/formatMediaTime.d.ts.map +0 -1
- package/dist/lib/keyboardStep.d.ts.map +0 -1
- package/dist/lib/layout.d.ts.map +0 -1
- package/dist/lib/math.d.ts.map +0 -1
- package/dist/lib/months.d.ts.map +0 -1
- package/dist/lib/overlayStack.d.ts.map +0 -1
- package/dist/lib/panelResize.d.ts.map +0 -1
- package/dist/lib/passwordRequirements.d.ts.map +0 -1
- package/dist/lib/qrCode.d.ts.map +0 -1
- package/dist/lib/rect.d.ts.map +0 -1
- package/dist/lib/tones.d.ts.map +0 -1
- package/dist/lib/typeahead.d.ts.map +0 -1
- package/dist/providers/ControlSizeContext.d.ts.map +0 -1
- package/dist/providers/ControlSizeProvider.d.ts.map +0 -1
- package/dist/providers/SettingsContext.d.ts.map +0 -1
- package/dist/providers/SettingsProvider.d.ts.map +0 -1
- package/dist/providers/ThemeContext.d.ts.map +0 -1
- package/dist/providers/ThemeProvider.d.ts.map +0 -1
- package/dist/providers/accentColors.d.ts.map +0 -1
- package/dist/providers/themeClasses.d.ts.map +0 -1
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/cn.js";
|
|
2
|
+
import { mergeRefs as t } from "../../lib/mergeRefs.js";
|
|
3
|
+
import { usePortalContainer as n } from "../../hooks/usePortalContainer.js";
|
|
4
|
+
import { accentItems as r, darkThemes as i, fontOptions as a, lightThemes as o, themeItems as s } from "../../config/theme.js";
|
|
5
|
+
import { useAnchoredPopup as ee } from "../../hooks/useAnchoredPopup.js";
|
|
6
|
+
import { useDismiss as te } from "../../hooks/useDismiss.js";
|
|
7
|
+
import { useSettings as c } from "../../hooks/useSettings.js";
|
|
8
|
+
import { useToast as l } from "../ui/Toast.js";
|
|
9
|
+
import { useApplyTheme as u } from "../../hooks/useApplyTheme.js";
|
|
10
|
+
import { Button as d } from "../ui/Button.js";
|
|
11
|
+
import { SectionHeader as f } from "../ui/SectionHeader.js";
|
|
12
|
+
import { SelectDropdown as p } from "../ui/SelectDropdown.js";
|
|
13
|
+
import { Slider as m } from "../ui/Slider.js";
|
|
14
|
+
import { ThemePreview as h } from "../ui/ThemePreview.js";
|
|
15
|
+
import { Toggle as g } from "../ui/Toggle.js";
|
|
16
|
+
import { THEME_MENU_EVENT as _ } from "./themeMenuEvents.js";
|
|
17
|
+
import { useCallback as v, useEffect as y, useMemo as b, useRef as x, useState as S } from "react";
|
|
18
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
19
|
+
import { Monitor as E, Moon as D, Palette as ne, Sun as O } from "lucide-react";
|
|
20
|
+
import { createPortal as re } from "react-dom";
|
|
21
|
+
//#region src/components/app-shell/ThemeMenu.tsx
|
|
22
|
+
var k = [
|
|
23
|
+
{
|
|
24
|
+
value: "dark",
|
|
25
|
+
label: "Dark",
|
|
26
|
+
Icon: D
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
value: "light",
|
|
30
|
+
label: "Light",
|
|
31
|
+
Icon: O
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
value: "system",
|
|
35
|
+
label: "System",
|
|
36
|
+
Icon: E
|
|
37
|
+
}
|
|
38
|
+
];
|
|
39
|
+
function A({ className: E, respondToOpenEvent: D = !0, onClick: O, ref: A, ...j }) {
|
|
40
|
+
let [M, N] = S(!1), P = n(), [F, I] = S(!1), L = x(null), R = b(() => t(L, A), [A]), z = x(null), B = c(), V = u(), { toast: H } = l(), U = v(() => {
|
|
41
|
+
N(!1), I(!1);
|
|
42
|
+
}, []);
|
|
43
|
+
te(M, U, [z], [L], { outsideClick: !F }), ee(M, L, z, {
|
|
44
|
+
side: "bottom",
|
|
45
|
+
align: "end",
|
|
46
|
+
gap: 6,
|
|
47
|
+
onAnchorHidden: F ? void 0 : U
|
|
48
|
+
});
|
|
49
|
+
function W() {
|
|
50
|
+
if (M) {
|
|
51
|
+
U();
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
N(!0);
|
|
55
|
+
}
|
|
56
|
+
y(() => {
|
|
57
|
+
if (!D) return;
|
|
58
|
+
let e = () => {
|
|
59
|
+
N(!0), I(!0);
|
|
60
|
+
};
|
|
61
|
+
return document.addEventListener(_, e), () => document.removeEventListener(_, e);
|
|
62
|
+
}, [D]);
|
|
63
|
+
let { colorMode: G, setColorMode: K, preferredDarkTheme: q, preferredLightTheme: J, accentColor: Y, setAccentColor: X, fontSize: ie, setFontSize: ae, uiFont: oe, setUiFont: se, headingFont: ce, setHeadingFont: le, proseFont: ue, setProseFont: de, codeFont: fe, setCodeFont: pe, borderRadius: me, setBorderRadius: he, borderWidth: ge, setBorderWidth: _e, tracking: ve, setTracking: ye, lineHeight: be, setLineHeight: xe, density: Se, setDensity: Z, reducedMotion: Ce, setReducedMotion: we, saveThemeCustomization: Te, resetThemeCustomization: Ee, hasThemeOverrides: De, isCustomized: Q, resolvedTheme: $ } = B;
|
|
64
|
+
return /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("button", {
|
|
65
|
+
type: "button",
|
|
66
|
+
...j,
|
|
67
|
+
ref: R,
|
|
68
|
+
onClick: (e) => {
|
|
69
|
+
O?.(e), !e.defaultPrevented && W();
|
|
70
|
+
},
|
|
71
|
+
"aria-label": "Theme settings",
|
|
72
|
+
"aria-haspopup": "dialog",
|
|
73
|
+
"aria-expanded": M,
|
|
74
|
+
title: "Theme",
|
|
75
|
+
className: e("flex h-7 w-7 cursor-pointer items-center justify-center rounded transition-colors duration-[100ms]", M ? "text-accent-fg bg-accent-muted" : "text-text-tertiary hover:text-text-primary hover:bg-bg-hover", E),
|
|
76
|
+
children: /* @__PURE__ */ w(ne, { className: "h-4 w-4" })
|
|
77
|
+
}), M && re(/* @__PURE__ */ w("div", {
|
|
78
|
+
ref: z,
|
|
79
|
+
role: "dialog",
|
|
80
|
+
"aria-label": "Theme settings",
|
|
81
|
+
className: "ui-theme-menu ui-glass ui-glass-popover bg-bg-tertiary border-border-strong animate-scale-in fixed top-0 left-0 z-[100] flex w-80 flex-col overflow-y-auto rounded-md border p-3 shadow-lg",
|
|
82
|
+
style: { maxHeight: "80vh" },
|
|
83
|
+
children: /* @__PURE__ */ T("div", {
|
|
84
|
+
className: "space-y-4",
|
|
85
|
+
children: [
|
|
86
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w(f, {
|
|
87
|
+
as: "h3",
|
|
88
|
+
border: !1,
|
|
89
|
+
className: "mb-2",
|
|
90
|
+
children: "Mode"
|
|
91
|
+
}), /* @__PURE__ */ w("div", {
|
|
92
|
+
className: "bg-bg-secondary border-border flex gap-1 rounded-md border p-1.5",
|
|
93
|
+
children: k.map(({ value: t, label: n, Icon: r }) => /* @__PURE__ */ T("button", {
|
|
94
|
+
type: "button",
|
|
95
|
+
onClick: () => K(t),
|
|
96
|
+
className: e("font-navigation flex flex-1 cursor-pointer items-center justify-center gap-1.5 rounded px-2 py-1 text-xs transition-colors duration-[100ms]", G === t ? "bg-accent-muted text-accent-fg" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
|
|
97
|
+
children: [/* @__PURE__ */ w(r, { className: "h-3.5 w-3.5" }), n]
|
|
98
|
+
}, t))
|
|
99
|
+
})] }),
|
|
100
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w(f, {
|
|
101
|
+
as: "h3",
|
|
102
|
+
border: !1,
|
|
103
|
+
className: "mb-2",
|
|
104
|
+
children: "Dark themes"
|
|
105
|
+
}), /* @__PURE__ */ w("div", {
|
|
106
|
+
className: "grid grid-cols-2 gap-2",
|
|
107
|
+
children: i.map((e) => /* @__PURE__ */ w(h, {
|
|
108
|
+
label: e.label,
|
|
109
|
+
icon: e.icon,
|
|
110
|
+
preview: e.preview,
|
|
111
|
+
active: q === e.value,
|
|
112
|
+
onClick: () => V(e.value)
|
|
113
|
+
}, e.value))
|
|
114
|
+
})] }),
|
|
115
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w(f, {
|
|
116
|
+
as: "h3",
|
|
117
|
+
border: !1,
|
|
118
|
+
className: "mb-2",
|
|
119
|
+
children: "Light themes"
|
|
120
|
+
}), /* @__PURE__ */ w("div", {
|
|
121
|
+
className: "grid grid-cols-2 gap-2",
|
|
122
|
+
children: o.map((e) => /* @__PURE__ */ w(h, {
|
|
123
|
+
label: e.label,
|
|
124
|
+
icon: e.icon,
|
|
125
|
+
preview: e.preview,
|
|
126
|
+
active: J === e.value,
|
|
127
|
+
onClick: () => V(e.value)
|
|
128
|
+
}, e.value))
|
|
129
|
+
})] }),
|
|
130
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w(f, {
|
|
131
|
+
as: "h3",
|
|
132
|
+
border: !1,
|
|
133
|
+
className: "mb-2",
|
|
134
|
+
children: "Accent"
|
|
135
|
+
}), /* @__PURE__ */ w("div", {
|
|
136
|
+
className: "flex flex-wrap gap-1.5",
|
|
137
|
+
children: r.map((t) => /* @__PURE__ */ w("button", {
|
|
138
|
+
type: "button",
|
|
139
|
+
onClick: () => X(t.value),
|
|
140
|
+
className: e("h-6 w-6 cursor-pointer rounded-full transition-transform duration-[100ms] hover:scale-110", Y === t.value && "ring-offset-bg-tertiary scale-110 ring-2 ring-offset-1"),
|
|
141
|
+
style: {
|
|
142
|
+
backgroundColor: t.color,
|
|
143
|
+
...Y === t.value ? { "--utility-ring-color": t.color } : {}
|
|
144
|
+
},
|
|
145
|
+
title: t.value.charAt(0).toUpperCase() + t.value.slice(1),
|
|
146
|
+
"aria-label": t.value
|
|
147
|
+
}, t.value))
|
|
148
|
+
})] }),
|
|
149
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w(f, {
|
|
150
|
+
as: "h3",
|
|
151
|
+
border: !1,
|
|
152
|
+
className: "mb-2",
|
|
153
|
+
children: "Fonts"
|
|
154
|
+
}), /* @__PURE__ */ T("div", {
|
|
155
|
+
className: "grid grid-cols-2 gap-2",
|
|
156
|
+
children: [
|
|
157
|
+
/* @__PURE__ */ w(p, {
|
|
158
|
+
label: "UI / Body",
|
|
159
|
+
size: "sm",
|
|
160
|
+
options: a,
|
|
161
|
+
value: oe,
|
|
162
|
+
onValueChange: (e) => se(e)
|
|
163
|
+
}),
|
|
164
|
+
/* @__PURE__ */ w(p, {
|
|
165
|
+
label: "Headings",
|
|
166
|
+
size: "sm",
|
|
167
|
+
options: a,
|
|
168
|
+
value: ce,
|
|
169
|
+
onValueChange: (e) => le(e)
|
|
170
|
+
}),
|
|
171
|
+
/* @__PURE__ */ w(p, {
|
|
172
|
+
label: "Prose",
|
|
173
|
+
size: "sm",
|
|
174
|
+
options: a,
|
|
175
|
+
value: ue,
|
|
176
|
+
onValueChange: (e) => de(e)
|
|
177
|
+
}),
|
|
178
|
+
/* @__PURE__ */ w(p, {
|
|
179
|
+
label: "Code",
|
|
180
|
+
size: "sm",
|
|
181
|
+
options: a,
|
|
182
|
+
value: fe,
|
|
183
|
+
onValueChange: (e) => pe(e)
|
|
184
|
+
})
|
|
185
|
+
]
|
|
186
|
+
})] }),
|
|
187
|
+
/* @__PURE__ */ T("div", {
|
|
188
|
+
className: "space-y-3",
|
|
189
|
+
children: [
|
|
190
|
+
/* @__PURE__ */ w(m, {
|
|
191
|
+
label: "Font size",
|
|
192
|
+
min: 11,
|
|
193
|
+
max: 18,
|
|
194
|
+
value: ie,
|
|
195
|
+
onValueChange: ae,
|
|
196
|
+
showValue: !0
|
|
197
|
+
}),
|
|
198
|
+
/* @__PURE__ */ w(m, {
|
|
199
|
+
label: "Corner radius",
|
|
200
|
+
min: 0,
|
|
201
|
+
max: 16,
|
|
202
|
+
value: me,
|
|
203
|
+
onValueChange: he,
|
|
204
|
+
showValue: !0
|
|
205
|
+
}),
|
|
206
|
+
/* @__PURE__ */ w(m, {
|
|
207
|
+
label: "Border width",
|
|
208
|
+
min: 1,
|
|
209
|
+
max: 3,
|
|
210
|
+
value: ge,
|
|
211
|
+
onValueChange: _e,
|
|
212
|
+
showValue: !0
|
|
213
|
+
}),
|
|
214
|
+
/* @__PURE__ */ w(m, {
|
|
215
|
+
label: "Letter spacing",
|
|
216
|
+
min: 0,
|
|
217
|
+
max: .3,
|
|
218
|
+
step: .01,
|
|
219
|
+
value: ve,
|
|
220
|
+
onValueChange: ye,
|
|
221
|
+
showValue: !0
|
|
222
|
+
}),
|
|
223
|
+
/* @__PURE__ */ w(m, {
|
|
224
|
+
label: "Line height",
|
|
225
|
+
min: 1.2,
|
|
226
|
+
max: 2,
|
|
227
|
+
step: .05,
|
|
228
|
+
value: be,
|
|
229
|
+
onValueChange: xe,
|
|
230
|
+
showValue: !0
|
|
231
|
+
}),
|
|
232
|
+
/* @__PURE__ */ w(m, {
|
|
233
|
+
label: "Density",
|
|
234
|
+
min: .18,
|
|
235
|
+
max: .32,
|
|
236
|
+
step: .01,
|
|
237
|
+
value: Se,
|
|
238
|
+
onValueChange: Z,
|
|
239
|
+
showValue: !0
|
|
240
|
+
})
|
|
241
|
+
]
|
|
242
|
+
}),
|
|
243
|
+
/* @__PURE__ */ w(g, {
|
|
244
|
+
label: "Reduced motion",
|
|
245
|
+
checked: Ce,
|
|
246
|
+
onCheckedChange: we
|
|
247
|
+
}),
|
|
248
|
+
/* @__PURE__ */ T("div", {
|
|
249
|
+
className: "border-border flex items-center gap-2 border-t pt-3",
|
|
250
|
+
children: [/* @__PURE__ */ w(d, {
|
|
251
|
+
variant: "primary",
|
|
252
|
+
size: "sm",
|
|
253
|
+
disabled: !Q,
|
|
254
|
+
onClick: () => {
|
|
255
|
+
Te(), H("success", `Saved customization for ${s.find((e) => e.value === $)?.label ?? $}`);
|
|
256
|
+
},
|
|
257
|
+
children: "Save for theme"
|
|
258
|
+
}), /* @__PURE__ */ w(d, {
|
|
259
|
+
variant: "secondary",
|
|
260
|
+
size: "sm",
|
|
261
|
+
disabled: !De && !Q,
|
|
262
|
+
onClick: () => {
|
|
263
|
+
Ee(), H("info", "Reset to theme defaults");
|
|
264
|
+
},
|
|
265
|
+
children: "Reset"
|
|
266
|
+
})]
|
|
267
|
+
})
|
|
268
|
+
]
|
|
269
|
+
})
|
|
270
|
+
}), P ?? document.body)] });
|
|
271
|
+
}
|
|
272
|
+
//#endregion
|
|
273
|
+
export { A as ThemeMenu };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
1
|
+
import type { ComponentPropsWithRef, ReactNode } from "react";
|
|
2
2
|
import { type CommandPaletteShortcut } from "./commandPaletteEvents";
|
|
3
3
|
import { type AppShellNavigate } from "./navigation";
|
|
4
4
|
import type { AppShellBreadcrumbOptions, AppShellTopBarNavItem } from "./types";
|
|
5
|
-
export interface TopBarProps {
|
|
5
|
+
export interface TopBarProps extends Omit<ComponentPropsWithRef<"header">, "children"> {
|
|
6
6
|
/** Called when the menu button (shown below the `md` breakpoint) is clicked. */
|
|
7
7
|
onMobileMenuToggle?: () => void;
|
|
8
8
|
/** Breadcrumb label options. Pass `false` to hide breadcrumbs; ignored when `navItems` is non-empty. */
|
|
@@ -26,5 +26,4 @@ export interface TopBarProps {
|
|
|
26
26
|
/** Extra content rendered at the right of the bar, before the search button. */
|
|
27
27
|
actions?: ReactNode;
|
|
28
28
|
}
|
|
29
|
-
export declare function TopBar({ onMobileMenuToggle, breadcrumbs, navItems, navLabel, showCommandTrigger, commandTriggerLabel, commandShortcut, currentPath, onNavigate, onCommandTrigger, actions, }: TopBarProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
-
//# sourceMappingURL=TopBar.d.ts.map
|
|
29
|
+
export declare function TopBar({ onMobileMenuToggle, breadcrumbs, navItems, navLabel, showCommandTrigger, commandTriggerLabel, commandShortcut, currentPath, onNavigate, onCommandTrigger, actions, className, style, ref, ...rest }: TopBarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/cn.js";
|
|
2
|
+
import { handleAppShellNavigate as t, isAppShellPathActive as n } from "./navigation.js";
|
|
3
|
+
import { DEFAULT_COMMAND_PALETTE_SHORTCUT as r, openCommandPalette as i } from "./commandPaletteEvents.js";
|
|
4
|
+
import { useSettings as a } from "../../hooks/useSettings.js";
|
|
5
|
+
import { Breadcrumbs as o } from "./Breadcrumbs.js";
|
|
6
|
+
import { ThemeMenu as s } from "./ThemeMenu.js";
|
|
7
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
|
+
import { Menu as d, Monitor as f, Moon as p, PanelLeft as m, PanelLeftDashed as h, Search as g, Sun as _ } from "lucide-react";
|
|
9
|
+
//#region src/components/app-shell/TopBar.tsx
|
|
10
|
+
var v = [
|
|
11
|
+
"dark",
|
|
12
|
+
"light",
|
|
13
|
+
"system"
|
|
14
|
+
], y = {
|
|
15
|
+
dark: p,
|
|
16
|
+
light: _,
|
|
17
|
+
system: f
|
|
18
|
+
}, b = {
|
|
19
|
+
dark: "Dark",
|
|
20
|
+
light: "Light",
|
|
21
|
+
system: "System"
|
|
22
|
+
};
|
|
23
|
+
function x({ onMobileMenuToggle: t, breadcrumbs: n, navItems: f = [], navLabel: p = "Primary", showCommandTrigger: _ = !0, commandTriggerLabel: x = "Search", commandShortcut: C = r, currentPath: w, onNavigate: T, onCommandTrigger: E, actions: D, className: O, style: k, ref: A, ...j }) {
|
|
24
|
+
let { sidebarCollapsed: M, setSidebarCollapsed: N, colorMode: P, setColorMode: F } = a();
|
|
25
|
+
function I() {
|
|
26
|
+
F(v[(v.indexOf(P) + 1) % v.length]);
|
|
27
|
+
}
|
|
28
|
+
let L = y[P], R = f.length > 0, z = R || n !== !1;
|
|
29
|
+
return /* @__PURE__ */ u("header", {
|
|
30
|
+
ref: A,
|
|
31
|
+
...j,
|
|
32
|
+
className: e("ui-glass ui-glass-chrome border-border bg-bg-secondary font-navigation flex h-9 shrink-0 items-center justify-between border-b px-3", O),
|
|
33
|
+
style: {
|
|
34
|
+
height: "var(--topbar-height)",
|
|
35
|
+
...k
|
|
36
|
+
},
|
|
37
|
+
children: [/* @__PURE__ */ u("div", {
|
|
38
|
+
className: "flex min-w-0 items-center gap-2",
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ l("button", {
|
|
41
|
+
type: "button",
|
|
42
|
+
onClick: t,
|
|
43
|
+
className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover flex h-7 w-7 cursor-pointer items-center justify-center rounded md:hidden",
|
|
44
|
+
"aria-label": "Toggle menu",
|
|
45
|
+
children: /* @__PURE__ */ l(d, { className: "h-4 w-4" })
|
|
46
|
+
}),
|
|
47
|
+
/* @__PURE__ */ l("button", {
|
|
48
|
+
type: "button",
|
|
49
|
+
onClick: () => N(!M),
|
|
50
|
+
className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover hidden h-7 w-7 cursor-pointer items-center justify-center rounded md:flex",
|
|
51
|
+
"aria-label": M ? "Expand sidebar" : "Collapse sidebar",
|
|
52
|
+
children: l(M ? h : m, { className: "h-4 w-4" })
|
|
53
|
+
}),
|
|
54
|
+
z && /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("div", { className: "bg-border hidden h-4 w-px md:block" }), R ? /* @__PURE__ */ l(S, {
|
|
55
|
+
items: f,
|
|
56
|
+
label: p,
|
|
57
|
+
currentPath: w,
|
|
58
|
+
onNavigate: T
|
|
59
|
+
}) : n === !1 ? null : /* @__PURE__ */ l(o, {
|
|
60
|
+
...n,
|
|
61
|
+
currentPath: w,
|
|
62
|
+
onNavigate: T
|
|
63
|
+
})] })
|
|
64
|
+
]
|
|
65
|
+
}), /* @__PURE__ */ u("div", {
|
|
66
|
+
className: "flex shrink-0 items-center gap-1",
|
|
67
|
+
children: [
|
|
68
|
+
D,
|
|
69
|
+
_ && /* @__PURE__ */ u("button", {
|
|
70
|
+
type: "button",
|
|
71
|
+
onClick: E ?? (() => i()),
|
|
72
|
+
className: "text-text-tertiary bg-bg-primary border-border hover:border-border-strong hover:text-text-secondary font-navigation hidden h-6 cursor-pointer items-center gap-2 rounded-md border px-2 transition-colors duration-[100ms] sm:flex",
|
|
73
|
+
children: [
|
|
74
|
+
/* @__PURE__ */ l(g, { className: "h-3 w-3" }),
|
|
75
|
+
/* @__PURE__ */ l("span", {
|
|
76
|
+
className: "text-2xs",
|
|
77
|
+
children: x
|
|
78
|
+
}),
|
|
79
|
+
/* @__PURE__ */ l("kbd", {
|
|
80
|
+
className: "text-2xs font-mono opacity-60",
|
|
81
|
+
children: C.label
|
|
82
|
+
})
|
|
83
|
+
]
|
|
84
|
+
}),
|
|
85
|
+
/* @__PURE__ */ l("button", {
|
|
86
|
+
type: "button",
|
|
87
|
+
onClick: I,
|
|
88
|
+
className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover flex h-7 w-7 cursor-pointer items-center justify-center rounded",
|
|
89
|
+
"aria-label": `Color mode: ${b[P]}. Click to cycle.`,
|
|
90
|
+
title: b[P],
|
|
91
|
+
children: /* @__PURE__ */ l(L, { className: "h-4 w-4" })
|
|
92
|
+
}),
|
|
93
|
+
/* @__PURE__ */ l(s, {})
|
|
94
|
+
]
|
|
95
|
+
})]
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
function S({ items: r, label: i, currentPath: a, onNavigate: o }) {
|
|
99
|
+
return /* @__PURE__ */ l("nav", {
|
|
100
|
+
className: "hidden min-w-0 items-center gap-1 md:flex",
|
|
101
|
+
"aria-label": i,
|
|
102
|
+
children: r.map((r) => {
|
|
103
|
+
let i = r.icon, s = n(r, a), c = r.rel ?? (r.target === "_blank" ? "noreferrer" : void 0);
|
|
104
|
+
return /* @__PURE__ */ u("a", {
|
|
105
|
+
href: r.href ?? r.path,
|
|
106
|
+
target: r.target,
|
|
107
|
+
rel: c,
|
|
108
|
+
"aria-current": s ? "page" : void 0,
|
|
109
|
+
onClick: (e) => {
|
|
110
|
+
r.reloadDocument || t(e, r.path, o);
|
|
111
|
+
},
|
|
112
|
+
className: e("font-navigation flex h-6 max-w-40 items-center gap-1 rounded px-2 text-xs transition-colors duration-[100ms]", s ? "bg-accent-muted text-accent-fg" : "text-text-tertiary hover:bg-bg-hover hover:text-text-primary"),
|
|
113
|
+
children: [
|
|
114
|
+
i && /* @__PURE__ */ l(i, { className: "h-3 w-3 shrink-0" }),
|
|
115
|
+
/* @__PURE__ */ l("span", {
|
|
116
|
+
className: "truncate",
|
|
117
|
+
children: r.label
|
|
118
|
+
}),
|
|
119
|
+
r.badge && /* @__PURE__ */ l("span", {
|
|
120
|
+
className: "shrink-0",
|
|
121
|
+
children: r.badge
|
|
122
|
+
})
|
|
123
|
+
]
|
|
124
|
+
}, `${r.label}-${r.path}`);
|
|
125
|
+
})
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
//#endregion
|
|
129
|
+
export { x as TopBar };
|
|
@@ -9,4 +9,3 @@ export interface CommandPaletteShortcut {
|
|
|
9
9
|
export declare const DEFAULT_COMMAND_PALETTE_SHORTCUT: CommandPaletteShortcut;
|
|
10
10
|
export declare function openCommandPalette(eventName?: string): void;
|
|
11
11
|
export declare function matchesCommandPaletteShortcut(event: KeyboardEvent, shortcut: CommandPaletteShortcut): boolean;
|
|
12
|
-
//# sourceMappingURL=commandPaletteEvents.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region src/components/app-shell/commandPaletteEvents.ts
|
|
2
|
+
var e = "open-command-palette", t = {
|
|
3
|
+
key: "k",
|
|
4
|
+
label: "⌘K",
|
|
5
|
+
modifier: "primary"
|
|
6
|
+
};
|
|
7
|
+
function n(t = e) {
|
|
8
|
+
typeof document > "u" || document.dispatchEvent(new CustomEvent(t));
|
|
9
|
+
}
|
|
10
|
+
function r(e, t) {
|
|
11
|
+
if (e.key.toLowerCase() !== t.key.toLowerCase()) return !1;
|
|
12
|
+
let n = t.modifier ?? "primary";
|
|
13
|
+
return (n === "primary" ? e.metaKey || e.ctrlKey : n === "meta" ? e.metaKey && !e.ctrlKey : n === "ctrl" ? e.ctrlKey && !e.metaKey : !e.metaKey && !e.ctrlKey) && !!e.altKey == !!t.altKey && !!e.shiftKey == !!t.shiftKey;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { e as COMMAND_PALETTE_EVENT, t as DEFAULT_COMMAND_PALETTE_SHORTCUT, r as matchesCommandPaletteShortcut, n as openCommandPalette };
|
|
@@ -9,4 +9,3 @@ export declare function isAppShellPathActive(item: AppShellPathMatchItem, curren
|
|
|
9
9
|
export declare function handleAppShellNavigate(event: MouseEvent<HTMLAnchorElement>, path: string, onNavigate?: AppShellNavigate, onAfterNavigate?: () => void): void;
|
|
10
10
|
export declare function navigateToPath(path: string, onNavigate?: AppShellNavigate): void;
|
|
11
11
|
export {};
|
|
12
|
-
//# sourceMappingURL=navigation.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//#region src/components/app-shell/navigation.ts
|
|
2
|
+
function e(e, t) {
|
|
3
|
+
if (e.active !== void 0) return e.active;
|
|
4
|
+
if (!t) return !1;
|
|
5
|
+
if (e.end ?? e.path === "/") return t === e.path;
|
|
6
|
+
let n = e.path.endsWith("/") ? e.path : `${e.path}/`;
|
|
7
|
+
return t === e.path || t.startsWith(n);
|
|
8
|
+
}
|
|
9
|
+
function t(e, t, n, r) {
|
|
10
|
+
let i = e.currentTarget.getAttribute("target");
|
|
11
|
+
e.defaultPrevented || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || i && i !== "_self" || (n && (e.preventDefault(), n(t)), r?.());
|
|
12
|
+
}
|
|
13
|
+
function n(e, t) {
|
|
14
|
+
if (t) {
|
|
15
|
+
t(e);
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
typeof window < "u" && window.location.assign(e);
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { t as handleAppShellNavigate, e as isAppShellPathActive, n as navigateToPath };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from "react";
|
|
1
2
|
export interface AreaChartDatum {
|
|
2
3
|
date: string;
|
|
3
4
|
value: number;
|
|
4
5
|
}
|
|
5
|
-
export interface AreaChartProps {
|
|
6
|
+
export interface AreaChartProps extends Omit<ComponentPropsWithRef<"svg">, "children" | "viewBox" | "width"> {
|
|
6
7
|
/** Points to plot in order, each with an X-axis `date` label and a numeric `value`. */
|
|
7
8
|
data: AreaChartDatum[];
|
|
8
9
|
/** Chart height in SVG units; the width scales to the container. Defaults to 240. */
|
|
@@ -29,9 +30,8 @@ export interface AreaChartProps {
|
|
|
29
30
|
/** Maximum number of X-axis labels to show. */
|
|
30
31
|
xLabelCount?: number;
|
|
31
32
|
/** Accessible label for the chart. Defaults to "Area chart". */
|
|
32
|
-
|
|
33
|
+
"aria-label"?: string;
|
|
33
34
|
/** Extra classes for the `<svg>`. */
|
|
34
35
|
className?: string;
|
|
35
36
|
}
|
|
36
|
-
export declare function AreaChart({ data, height, minValue, maxValue, startAtZero, valueFormatter, tooltipValueFormatter, xLabelCount, ariaLabel, className, }: AreaChartProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
-
//# sourceMappingURL=AreaChart.d.ts.map
|
|
37
|
+
export declare function AreaChart({ data, height, minValue, maxValue, startAtZero, valueFormatter, tooltipValueFormatter, xLabelCount, "aria-label": ariaLabel, className, onPointerMove, onPointerLeave, ref, ...rest }: AreaChartProps): import("react/jsx-runtime").JSX.Element;
|