@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,128 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/cn.js";
|
|
2
|
+
import { mergeRefs as t } from "../../lib/mergeRefs.js";
|
|
3
|
+
import { handleAppShellNavigate as n, isAppShellPathActive as r } from "./navigation.js";
|
|
4
|
+
import { useFocusTrap as i } from "../../hooks/useFocusTrap.js";
|
|
5
|
+
import { OverlayContext as a, useBodyScrollLock as o, useOverlayEscape as s } from "../../hooks/useOverlayStack.js";
|
|
6
|
+
import { PortalContainerContext as c, usePortalContainerRef as l } from "../../hooks/usePortalContainer.js";
|
|
7
|
+
import { useMemo as u, useRef as d } from "react";
|
|
8
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
9
|
+
import { X as h } from "lucide-react";
|
|
10
|
+
//#region src/components/app-shell/MobileDrawer.tsx
|
|
11
|
+
function g({ brand: e }) {
|
|
12
|
+
let t = e.icon;
|
|
13
|
+
return e.logo ? /* @__PURE__ */ p(f, { children: e.logo }) : /* @__PURE__ */ m("div", {
|
|
14
|
+
className: "flex items-center gap-2",
|
|
15
|
+
children: [t && /* @__PURE__ */ p(t, { className: "text-accent h-4.5 w-4.5" }), /* @__PURE__ */ p("span", {
|
|
16
|
+
className: "text-text-primary text-sm font-semibold",
|
|
17
|
+
children: e.name
|
|
18
|
+
})]
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function _({ open: f, onClose: _, items: v, topBarNavItems: y = [], topBarNavLabel: b = "Primary", brand: x, currentPath: S, onNavigate: C, headerActions: w, className: T, ref: E, ...D }) {
|
|
22
|
+
let O = d(null), [k, A] = l(O), j = u(() => t(A, E), [A, E]);
|
|
23
|
+
i(O, f);
|
|
24
|
+
let M = s(f, () => _(), O);
|
|
25
|
+
if (o(f, O), !f) return null;
|
|
26
|
+
let N = y.length > 0;
|
|
27
|
+
return /* @__PURE__ */ p(a.Provider, {
|
|
28
|
+
value: M,
|
|
29
|
+
children: /* @__PURE__ */ p(c.Provider, {
|
|
30
|
+
value: k,
|
|
31
|
+
children: /* @__PURE__ */ m("div", {
|
|
32
|
+
className: "fixed inset-0 z-40 md:hidden",
|
|
33
|
+
children: [/* @__PURE__ */ p("div", {
|
|
34
|
+
className: "bg-bg-overlay fixed inset-0",
|
|
35
|
+
onClick: _
|
|
36
|
+
}), /* @__PURE__ */ m("div", {
|
|
37
|
+
...D,
|
|
38
|
+
ref: j,
|
|
39
|
+
role: "dialog",
|
|
40
|
+
"aria-modal": "true",
|
|
41
|
+
"aria-label": "Navigation",
|
|
42
|
+
className: e("ui-glass ui-glass-chrome bg-bg-sidebar border-border animate-slide-in-left fixed inset-y-0 left-0 z-50 flex w-64 flex-col border-r", T),
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ m("div", {
|
|
45
|
+
className: "border-border flex h-11 items-center justify-between border-b px-4",
|
|
46
|
+
children: [/* @__PURE__ */ p(g, { brand: x }), /* @__PURE__ */ p("button", {
|
|
47
|
+
type: "button",
|
|
48
|
+
onClick: _,
|
|
49
|
+
className: "text-text-tertiary hover:text-text-primary flex h-7 w-7 cursor-pointer items-center justify-center rounded",
|
|
50
|
+
"aria-label": "Close menu",
|
|
51
|
+
children: /* @__PURE__ */ p(h, { className: "h-4 w-4" })
|
|
52
|
+
})]
|
|
53
|
+
}),
|
|
54
|
+
w && /* @__PURE__ */ p("div", {
|
|
55
|
+
className: "border-border border-b px-4 py-2",
|
|
56
|
+
children: w
|
|
57
|
+
}),
|
|
58
|
+
/* @__PURE__ */ m("nav", {
|
|
59
|
+
className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-2 py-2",
|
|
60
|
+
children: [N && /* @__PURE__ */ m("div", {
|
|
61
|
+
className: "border-border mb-2 border-b pb-2",
|
|
62
|
+
children: [/* @__PURE__ */ p("div", {
|
|
63
|
+
className: "text-text-tertiary px-3 py-1 text-2xs font-medium uppercase",
|
|
64
|
+
children: b
|
|
65
|
+
}), /* @__PURE__ */ p("ul", {
|
|
66
|
+
className: "space-y-0.5",
|
|
67
|
+
"aria-label": b,
|
|
68
|
+
children: y.map((t) => {
|
|
69
|
+
let i = t.icon, a = r(t, S), o = t.rel ?? (t.target === "_blank" ? "noreferrer" : void 0);
|
|
70
|
+
return /* @__PURE__ */ p("li", { children: /* @__PURE__ */ m("a", {
|
|
71
|
+
href: t.href ?? t.path,
|
|
72
|
+
target: t.target,
|
|
73
|
+
rel: o,
|
|
74
|
+
onClick: (e) => {
|
|
75
|
+
if (t.reloadDocument) {
|
|
76
|
+
_();
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
n(e, t.path, C, _);
|
|
80
|
+
},
|
|
81
|
+
"aria-current": a ? "page" : void 0,
|
|
82
|
+
className: e("flex h-10 items-center gap-3 rounded-md px-3", "cursor-pointer transition-colors duration-[100ms]", a ? "bg-accent-muted text-accent-fg" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
|
|
83
|
+
children: [
|
|
84
|
+
i && /* @__PURE__ */ p(i, { className: "h-4 w-4" }),
|
|
85
|
+
/* @__PURE__ */ p("span", {
|
|
86
|
+
className: "min-w-0 flex-1 text-sm",
|
|
87
|
+
children: t.label
|
|
88
|
+
}),
|
|
89
|
+
t.badge && /* @__PURE__ */ p("span", {
|
|
90
|
+
className: "shrink-0",
|
|
91
|
+
children: t.badge
|
|
92
|
+
})
|
|
93
|
+
]
|
|
94
|
+
}) }, `${t.label}-${t.path}`);
|
|
95
|
+
})
|
|
96
|
+
})]
|
|
97
|
+
}), /* @__PURE__ */ p("ul", {
|
|
98
|
+
className: "space-y-0.5",
|
|
99
|
+
children: v.map((t) => {
|
|
100
|
+
let i = r(t, S);
|
|
101
|
+
return /* @__PURE__ */ p("li", { children: /* @__PURE__ */ m("a", {
|
|
102
|
+
href: t.path,
|
|
103
|
+
onClick: (e) => n(e, t.path, C, _),
|
|
104
|
+
"aria-current": i ? "page" : void 0,
|
|
105
|
+
className: e("flex h-10 items-center gap-3 rounded-md px-3", "cursor-pointer transition-colors duration-[100ms]", i ? "bg-accent-muted text-accent-fg" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
|
|
106
|
+
children: [
|
|
107
|
+
/* @__PURE__ */ p(t.icon, { className: "h-4 w-4" }),
|
|
108
|
+
/* @__PURE__ */ p("span", {
|
|
109
|
+
className: "min-w-0 flex-1 text-sm",
|
|
110
|
+
children: t.label
|
|
111
|
+
}),
|
|
112
|
+
t.badge && /* @__PURE__ */ p("span", {
|
|
113
|
+
className: "shrink-0",
|
|
114
|
+
children: t.badge
|
|
115
|
+
})
|
|
116
|
+
]
|
|
117
|
+
}) }, t.path);
|
|
118
|
+
})
|
|
119
|
+
})]
|
|
120
|
+
})
|
|
121
|
+
]
|
|
122
|
+
})]
|
|
123
|
+
})
|
|
124
|
+
})
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
//#endregion
|
|
128
|
+
export { _ as MobileDrawer };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from "react";
|
|
2
2
|
import { type AppShellNavigate } from "./navigation";
|
|
3
3
|
import type { AppShellAccount, AppShellBrand, AppShellNavSection } from "./types";
|
|
4
|
-
export interface SidebarProps {
|
|
4
|
+
export interface SidebarProps extends Omit<ComponentPropsWithRef<"aside">, "children"> {
|
|
5
5
|
navSections: AppShellNavSection[];
|
|
6
6
|
brand: AppShellBrand;
|
|
7
7
|
accounts?: AppShellAccount[];
|
|
@@ -18,5 +18,4 @@ export interface SidebarProps {
|
|
|
18
18
|
headerActions?: ReactNode;
|
|
19
19
|
className?: string;
|
|
20
20
|
}
|
|
21
|
-
export declare function Sidebar({ navSections, brand, accounts, initialAccountIndex, onAccountChange, onSignOut, signOutPath, signOutLabel, settingsPath, settingsLabel, onOpenSettings, currentPath, onNavigate, headerActions, className, }: SidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
//# sourceMappingURL=Sidebar.d.ts.map
|
|
21
|
+
export declare function Sidebar({ navSections, brand, accounts, initialAccountIndex, onAccountChange, onSignOut, signOutPath, signOutLabel, settingsPath, settingsLabel, onOpenSettings, currentPath, onNavigate, headerActions, className, style, ref, ...rest }: SidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/cn.js";
|
|
2
|
+
import { mergeRefs as t } from "../../lib/mergeRefs.js";
|
|
3
|
+
import { handleAppShellNavigate as n, isAppShellPathActive as r, navigateToPath as i } from "./navigation.js";
|
|
4
|
+
import { usePortalContainer as a } from "../../hooks/usePortalContainer.js";
|
|
5
|
+
import { accentItems as o } from "../../config/theme.js";
|
|
6
|
+
import { useAnchoredPopup as s } from "../../hooks/useAnchoredPopup.js";
|
|
7
|
+
import { useDismiss as c } from "../../hooks/useDismiss.js";
|
|
8
|
+
import { useSettings as l } from "../../hooks/useSettings.js";
|
|
9
|
+
import { Avatar as u } from "../ui/Avatar.js";
|
|
10
|
+
import { useToast as d } from "../ui/Toast.js";
|
|
11
|
+
import { useCallback as f, useMemo as p, useRef as m, useState as h } from "react";
|
|
12
|
+
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
13
|
+
import { Accessibility as y, Check as b, ChevronDown as x, ChevronsUpDown as S, LogOut as C, Monitor as w, Moon as T, Settings as E, Sun as D } from "lucide-react";
|
|
14
|
+
import { createPortal as O } from "react-dom";
|
|
15
|
+
//#region src/components/app-shell/Sidebar.tsx
|
|
16
|
+
var k = 140, A = 400, j = 48, M = {
|
|
17
|
+
side: "right",
|
|
18
|
+
align: "end",
|
|
19
|
+
gap: 6
|
|
20
|
+
};
|
|
21
|
+
function N({ item: t, collapsed: i, currentPath: a, onNavigate: o }) {
|
|
22
|
+
let s = r(t, a);
|
|
23
|
+
return /* @__PURE__ */ v("a", {
|
|
24
|
+
href: t.path,
|
|
25
|
+
onClick: (e) => n(e, t.path, o),
|
|
26
|
+
"aria-current": s ? "page" : void 0,
|
|
27
|
+
className: e("font-navigation relative flex items-center gap-2 rounded px-2", "cursor-pointer transition-colors duration-[100ms]", i ? "mx-auto w-[2em] justify-center" : "", s ? "bg-accent-muted text-accent-fg" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
|
|
28
|
+
style: { height: "2em" },
|
|
29
|
+
title: i ? t.label : void 0,
|
|
30
|
+
children: [
|
|
31
|
+
s && /* @__PURE__ */ _("div", {
|
|
32
|
+
className: "bg-accent absolute left-0 w-0.5 rounded-md",
|
|
33
|
+
style: {
|
|
34
|
+
top: "0.3em",
|
|
35
|
+
bottom: "0.3em"
|
|
36
|
+
}
|
|
37
|
+
}),
|
|
38
|
+
/* @__PURE__ */ _("span", {
|
|
39
|
+
className: "shrink-0",
|
|
40
|
+
children: /* @__PURE__ */ _(t.icon, { className: "h-3.5 w-3.5" })
|
|
41
|
+
}),
|
|
42
|
+
!i && /* @__PURE__ */ _("span", {
|
|
43
|
+
className: "min-w-0 flex-1 truncate text-xs",
|
|
44
|
+
children: t.label
|
|
45
|
+
}),
|
|
46
|
+
!i && t.badge && /* @__PURE__ */ _("span", {
|
|
47
|
+
className: "ml-auto shrink-0",
|
|
48
|
+
children: t.badge
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function P({ brand: t, collapsed: n }) {
|
|
54
|
+
let r = t.icon, i = t.name.trim().charAt(0).toUpperCase();
|
|
55
|
+
return t.logo && !n ? /* @__PURE__ */ _("div", {
|
|
56
|
+
className: "flex min-w-0 items-center gap-2 px-2",
|
|
57
|
+
children: t.logo
|
|
58
|
+
}) : /* @__PURE__ */ v("div", {
|
|
59
|
+
className: e("flex min-w-0 items-center gap-2 px-2", n && "mx-auto justify-center px-0"),
|
|
60
|
+
children: [r ? /* @__PURE__ */ _(r, { className: "text-accent h-3.5 w-3.5 shrink-0" }) : n && i && /* @__PURE__ */ _("span", {
|
|
61
|
+
className: "text-accent-fg shrink-0 text-xs font-bold",
|
|
62
|
+
children: i
|
|
63
|
+
}), !n && /* @__PURE__ */ _("span", {
|
|
64
|
+
className: "text-text-primary truncate text-xs font-semibold",
|
|
65
|
+
children: t.name
|
|
66
|
+
})]
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function F(e) {
|
|
70
|
+
return e.role ?? e.email;
|
|
71
|
+
}
|
|
72
|
+
function I({ collapsed: t, accounts: n, initialAccountIndex: r = 0, onAccountChange: o, onSignOut: l, signOutPath: d, signOutLabel: p = "Sign out", onNavigate: y }) {
|
|
73
|
+
let [x, w] = h(!1), T = a(), [E, D] = h(() => Math.min(r, Math.max(n.length - 1, 0))), k = m(null), A = m(null), j = f(() => w(!1), []);
|
|
74
|
+
c(x, j, [A], [k]), s(x, k, A, {
|
|
75
|
+
...M,
|
|
76
|
+
onAnchorHidden: j
|
|
77
|
+
});
|
|
78
|
+
let N = n[E] ?? n[0], P = !!(l || d);
|
|
79
|
+
function I() {
|
|
80
|
+
w(!x);
|
|
81
|
+
}
|
|
82
|
+
function L(e, t) {
|
|
83
|
+
D(t), o?.(e, t), w(!1);
|
|
84
|
+
}
|
|
85
|
+
function R() {
|
|
86
|
+
w(!1), l ? l() : d && i(d, y);
|
|
87
|
+
}
|
|
88
|
+
return N ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ v("button", {
|
|
89
|
+
type: "button",
|
|
90
|
+
ref: k,
|
|
91
|
+
onClick: I,
|
|
92
|
+
className: e("font-navigation flex w-full cursor-pointer items-center gap-2 rounded px-2 transition-colors duration-[100ms]", "text-text-secondary hover:text-text-primary hover:bg-bg-hover", t && "justify-center px-0"),
|
|
93
|
+
style: { height: "2.5em" },
|
|
94
|
+
title: t ? N.name : void 0,
|
|
95
|
+
children: [/* @__PURE__ */ _(u, {
|
|
96
|
+
name: N.name,
|
|
97
|
+
src: N.avatarSrc,
|
|
98
|
+
size: "sm"
|
|
99
|
+
}), !t && /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ v("div", {
|
|
100
|
+
className: "min-w-0 flex-1 text-left",
|
|
101
|
+
children: [/* @__PURE__ */ _("p", {
|
|
102
|
+
className: "text-text-primary truncate text-xs leading-tight font-medium",
|
|
103
|
+
children: N.name
|
|
104
|
+
}), F(N) && /* @__PURE__ */ _("p", {
|
|
105
|
+
className: "text-2xs text-text-tertiary truncate leading-tight",
|
|
106
|
+
children: F(N)
|
|
107
|
+
})]
|
|
108
|
+
}), /* @__PURE__ */ _(S, { className: "text-text-tertiary h-3 w-3 shrink-0" })] })]
|
|
109
|
+
}), x && O(/* @__PURE__ */ v("div", {
|
|
110
|
+
ref: A,
|
|
111
|
+
className: "ui-glass ui-glass-popover bg-bg-tertiary border-border-strong animate-scale-in fixed top-0 left-0 z-[100] w-56 rounded-md border py-1 shadow-lg",
|
|
112
|
+
children: [
|
|
113
|
+
/* @__PURE__ */ _("p", {
|
|
114
|
+
className: "text-2xs-f text-text-tertiary font-label px-3 py-1.5 font-semibold tracking-wider uppercase",
|
|
115
|
+
children: "Accounts"
|
|
116
|
+
}),
|
|
117
|
+
n.map((e, t) => /* @__PURE__ */ v("button", {
|
|
118
|
+
type: "button",
|
|
119
|
+
onClick: () => L(e, t),
|
|
120
|
+
className: "text-text-secondary hover:text-text-primary hover:bg-bg-hover font-navigation flex h-8 w-full cursor-pointer items-center gap-2.5 px-3 text-xs transition-colors duration-[100ms]",
|
|
121
|
+
children: [
|
|
122
|
+
/* @__PURE__ */ _(u, {
|
|
123
|
+
name: e.name,
|
|
124
|
+
src: e.avatarSrc,
|
|
125
|
+
size: "sm"
|
|
126
|
+
}),
|
|
127
|
+
/* @__PURE__ */ v("div", {
|
|
128
|
+
className: "min-w-0 flex-1 text-left",
|
|
129
|
+
children: [/* @__PURE__ */ _("p", {
|
|
130
|
+
className: "text-text-primary truncate text-xs leading-tight",
|
|
131
|
+
children: e.name
|
|
132
|
+
}), e.email && /* @__PURE__ */ _("p", {
|
|
133
|
+
className: "text-2xs text-text-tertiary truncate leading-tight",
|
|
134
|
+
children: e.email
|
|
135
|
+
})]
|
|
136
|
+
}),
|
|
137
|
+
t === E && /* @__PURE__ */ _(b, { className: "text-accent h-3.5 w-3.5 shrink-0" })
|
|
138
|
+
]
|
|
139
|
+
}, `${e.name}-${e.email ?? t}`)),
|
|
140
|
+
P && /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("div", { className: "border-border my-1 border-t" }), /* @__PURE__ */ v("button", {
|
|
141
|
+
type: "button",
|
|
142
|
+
onClick: R,
|
|
143
|
+
className: "text-text-secondary hover:text-text-primary hover:bg-bg-hover font-navigation flex h-7 w-full cursor-pointer items-center gap-2.5 px-3 text-xs transition-colors duration-[100ms]",
|
|
144
|
+
children: [/* @__PURE__ */ _(C, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ _("span", { children: p })]
|
|
145
|
+
})] })
|
|
146
|
+
]
|
|
147
|
+
}), T ?? document.body)] }) : null;
|
|
148
|
+
}
|
|
149
|
+
function L({ collapsed: t, settingsPath: n, settingsLabel: r = "All Settings", onOpenSettings: u, onNavigate: p }) {
|
|
150
|
+
let [x, S] = h(!1), C = a(), k = m(null), A = m(null), { accentColor: j, setAccentColor: N, reducedMotion: P, setReducedMotion: F, colorMode: I, setColorMode: L } = l(), { toast: R } = d(), z = !!(n || u), B = f(() => S(!1), []);
|
|
151
|
+
c(x, B, [A], [k]), s(x, k, A, {
|
|
152
|
+
...M,
|
|
153
|
+
onAnchorHidden: B
|
|
154
|
+
});
|
|
155
|
+
function V() {
|
|
156
|
+
S(!x);
|
|
157
|
+
}
|
|
158
|
+
function H() {
|
|
159
|
+
S(!1), u ? u() : n && i(n, p);
|
|
160
|
+
}
|
|
161
|
+
return /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ v("button", {
|
|
162
|
+
type: "button",
|
|
163
|
+
ref: k,
|
|
164
|
+
onClick: V,
|
|
165
|
+
className: e("font-navigation relative flex w-full items-center gap-2 rounded px-2", "cursor-pointer transition-colors duration-[100ms]", t ? "mx-auto w-[2em] justify-center" : "", x ? "bg-accent-muted text-accent-fg" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
|
|
166
|
+
style: { height: "2em" },
|
|
167
|
+
title: t ? "Settings" : void 0,
|
|
168
|
+
children: [/* @__PURE__ */ _(E, { className: "h-3.5 w-3.5 shrink-0" }), !t && /* @__PURE__ */ _("span", {
|
|
169
|
+
className: "truncate text-xs",
|
|
170
|
+
children: "Settings"
|
|
171
|
+
})]
|
|
172
|
+
}), x && O(/* @__PURE__ */ v("div", {
|
|
173
|
+
ref: A,
|
|
174
|
+
className: "ui-glass ui-glass-popover bg-bg-tertiary border-border-strong animate-scale-in fixed top-0 left-0 z-[100] w-64 rounded-md border py-1 shadow-lg",
|
|
175
|
+
children: [
|
|
176
|
+
/* @__PURE__ */ _("p", {
|
|
177
|
+
className: "text-2xs-f text-text-tertiary font-label px-3 py-1.5 font-semibold tracking-wider uppercase",
|
|
178
|
+
children: "Mode"
|
|
179
|
+
}),
|
|
180
|
+
[
|
|
181
|
+
{
|
|
182
|
+
value: "dark",
|
|
183
|
+
label: "Dark",
|
|
184
|
+
Icon: T
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
value: "light",
|
|
188
|
+
label: "Light",
|
|
189
|
+
Icon: D
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
value: "system",
|
|
193
|
+
label: "System",
|
|
194
|
+
Icon: w
|
|
195
|
+
}
|
|
196
|
+
].map(({ value: e, label: t, Icon: n }) => /* @__PURE__ */ v("button", {
|
|
197
|
+
type: "button",
|
|
198
|
+
onClick: () => L(e),
|
|
199
|
+
className: "text-text-secondary hover:text-text-primary hover:bg-bg-hover font-navigation flex h-7 w-full cursor-pointer items-center gap-2.5 px-3 text-xs transition-colors duration-[100ms]",
|
|
200
|
+
children: [
|
|
201
|
+
/* @__PURE__ */ _(n, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
202
|
+
/* @__PURE__ */ _("span", {
|
|
203
|
+
className: "flex-1 text-left",
|
|
204
|
+
children: t
|
|
205
|
+
}),
|
|
206
|
+
I === e && /* @__PURE__ */ _(b, { className: "text-accent h-3.5 w-3.5 shrink-0" })
|
|
207
|
+
]
|
|
208
|
+
}, e)),
|
|
209
|
+
/* @__PURE__ */ _("div", { className: "border-border my-1 border-t" }),
|
|
210
|
+
/* @__PURE__ */ _("p", {
|
|
211
|
+
className: "text-2xs-f text-text-tertiary font-label px-3 py-1.5 font-semibold tracking-wider uppercase",
|
|
212
|
+
children: "Accent"
|
|
213
|
+
}),
|
|
214
|
+
/* @__PURE__ */ _("div", {
|
|
215
|
+
className: "flex flex-wrap gap-1.5 px-3 pb-2",
|
|
216
|
+
children: o.map((t) => /* @__PURE__ */ _("button", {
|
|
217
|
+
type: "button",
|
|
218
|
+
onClick: () => N(t.value),
|
|
219
|
+
className: e("h-5 w-5 cursor-pointer rounded-full transition-transform duration-[100ms] hover:scale-110", j === t.value && "ring-offset-bg-tertiary scale-110 ring-2 ring-offset-1"),
|
|
220
|
+
style: {
|
|
221
|
+
backgroundColor: t.color,
|
|
222
|
+
...j === t.value ? { "--utility-ring-color": t.color } : {}
|
|
223
|
+
},
|
|
224
|
+
title: t.value.charAt(0).toUpperCase() + t.value.slice(1)
|
|
225
|
+
}, t.value))
|
|
226
|
+
}),
|
|
227
|
+
/* @__PURE__ */ _("div", { className: "border-border my-1 border-t" }),
|
|
228
|
+
/* @__PURE__ */ v("button", {
|
|
229
|
+
type: "button",
|
|
230
|
+
onClick: () => {
|
|
231
|
+
F(!P), R("info", P ? "Animations enabled" : "Animations disabled");
|
|
232
|
+
},
|
|
233
|
+
className: "text-text-secondary hover:text-text-primary hover:bg-bg-hover font-navigation flex h-7 w-full cursor-pointer items-center gap-2.5 px-3 text-xs transition-colors duration-[100ms]",
|
|
234
|
+
children: [
|
|
235
|
+
/* @__PURE__ */ _(y, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
236
|
+
/* @__PURE__ */ _("span", {
|
|
237
|
+
className: "flex-1 text-left",
|
|
238
|
+
children: "Reduced Motion"
|
|
239
|
+
}),
|
|
240
|
+
P && /* @__PURE__ */ _(b, { className: "text-accent h-3.5 w-3.5 shrink-0" })
|
|
241
|
+
]
|
|
242
|
+
}),
|
|
243
|
+
z && /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("div", { className: "border-border my-1 border-t" }), /* @__PURE__ */ v("button", {
|
|
244
|
+
type: "button",
|
|
245
|
+
onClick: H,
|
|
246
|
+
className: "text-text-secondary hover:text-text-primary hover:bg-bg-hover font-navigation flex h-7 w-full cursor-pointer items-center gap-2.5 px-3 text-xs transition-colors duration-[100ms]",
|
|
247
|
+
children: [/* @__PURE__ */ _(E, { className: "h-3.5 w-3.5 shrink-0" }), /* @__PURE__ */ _("span", {
|
|
248
|
+
className: "flex-1 text-left",
|
|
249
|
+
children: r
|
|
250
|
+
})]
|
|
251
|
+
})] })
|
|
252
|
+
]
|
|
253
|
+
}), C ?? document.body)] });
|
|
254
|
+
}
|
|
255
|
+
function R({ navSections: n, brand: r, accounts: i = [], initialAccountIndex: a, onAccountChange: o, onSignOut: s, signOutPath: c, signOutLabel: u, settingsPath: d, settingsLabel: g, onOpenSettings: y, currentPath: b, onNavigate: S, headerActions: C, className: w, style: T, ref: E, ...D }) {
|
|
256
|
+
let { sidebarCollapsed: O, sidebarWidth: M, setSidebarWidth: F } = l(), [R, z] = h(/* @__PURE__ */ new Set()), B = m(null), V = p(() => t(B, E), [E]), H = m(!1), [U, W] = h(!1), G = f((e) => {
|
|
257
|
+
if (O) return;
|
|
258
|
+
e.preventDefault(), H.current = !0, W(!0), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
|
|
259
|
+
let t = (e) => {
|
|
260
|
+
if (!H.current || !B.current) return;
|
|
261
|
+
let t = B.current.getBoundingClientRect(), n = e.clientX - t.left;
|
|
262
|
+
F(Math.max(k, Math.min(n, A)));
|
|
263
|
+
}, n = () => {
|
|
264
|
+
H.current = !1, W(!1), document.body.style.cursor = "", document.body.style.userSelect = "", document.removeEventListener("mousemove", t), document.removeEventListener("mouseup", n);
|
|
265
|
+
};
|
|
266
|
+
document.addEventListener("mousemove", t), document.addEventListener("mouseup", n);
|
|
267
|
+
}, [O, F]);
|
|
268
|
+
function K(e) {
|
|
269
|
+
z((t) => {
|
|
270
|
+
let n = new Set(t);
|
|
271
|
+
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
return /* @__PURE__ */ v("aside", {
|
|
275
|
+
...D,
|
|
276
|
+
ref: V,
|
|
277
|
+
className: e("ui-glass ui-glass-chrome bg-bg-secondary relative hidden shrink-0 flex-col border-r md:flex", !U && "transition-[width] duration-[200ms] ease-out", "border-border", w),
|
|
278
|
+
style: {
|
|
279
|
+
width: O ? j : M,
|
|
280
|
+
...T
|
|
281
|
+
},
|
|
282
|
+
children: [
|
|
283
|
+
!O && /* @__PURE__ */ _("div", {
|
|
284
|
+
onMouseDown: G,
|
|
285
|
+
className: "hover:bg-accent/30 active:bg-accent/50 absolute top-0 right-0 bottom-0 z-10 w-1 cursor-col-resize"
|
|
286
|
+
}),
|
|
287
|
+
/* @__PURE__ */ _("div", {
|
|
288
|
+
className: "border-border flex shrink-0 items-center border-b px-2",
|
|
289
|
+
style: { height: "var(--topbar-height)" },
|
|
290
|
+
children: /* @__PURE__ */ _(P, {
|
|
291
|
+
brand: r,
|
|
292
|
+
collapsed: O
|
|
293
|
+
})
|
|
294
|
+
}),
|
|
295
|
+
!O && C && /* @__PURE__ */ _("div", {
|
|
296
|
+
className: "border-border shrink-0 border-b px-2 py-2",
|
|
297
|
+
children: C
|
|
298
|
+
}),
|
|
299
|
+
/* @__PURE__ */ _("nav", {
|
|
300
|
+
className: "flex-1 overflow-y-auto px-2 py-2",
|
|
301
|
+
children: n.map((t, n) => {
|
|
302
|
+
let r = R.has(t.title);
|
|
303
|
+
return /* @__PURE__ */ v("div", {
|
|
304
|
+
className: "mb-4",
|
|
305
|
+
children: [O ? n > 0 && /* @__PURE__ */ _("hr", { className: "border-border mx-auto my-1.5 w-4/5" }) : /* @__PURE__ */ v("button", {
|
|
306
|
+
type: "button",
|
|
307
|
+
onClick: () => K(t.title),
|
|
308
|
+
className: "text-2xs-f text-text-tertiary hover:text-text-secondary font-label flex w-full cursor-pointer items-center gap-1 px-2 text-left font-semibold tracking-wider uppercase",
|
|
309
|
+
style: {
|
|
310
|
+
paddingTop: "0.35em",
|
|
311
|
+
paddingBottom: "0.35em"
|
|
312
|
+
},
|
|
313
|
+
children: [/* @__PURE__ */ _("span", {
|
|
314
|
+
className: "min-w-0 flex-1",
|
|
315
|
+
children: t.title
|
|
316
|
+
}), /* @__PURE__ */ _(x, { className: e("h-3 w-3 shrink-0 transition-transform", r && "-rotate-90") })]
|
|
317
|
+
}), (!r || O) && /* @__PURE__ */ _("ul", {
|
|
318
|
+
className: "flex flex-col gap-1",
|
|
319
|
+
children: t.items.map((e) => /* @__PURE__ */ _("li", { children: /* @__PURE__ */ _(N, {
|
|
320
|
+
item: e,
|
|
321
|
+
collapsed: O,
|
|
322
|
+
currentPath: b,
|
|
323
|
+
onNavigate: S
|
|
324
|
+
}) }, e.path))
|
|
325
|
+
})]
|
|
326
|
+
}, t.title);
|
|
327
|
+
})
|
|
328
|
+
}),
|
|
329
|
+
/* @__PURE__ */ v("div", {
|
|
330
|
+
className: "shrink-0 px-2 py-1.5",
|
|
331
|
+
children: [/* @__PURE__ */ _(L, {
|
|
332
|
+
collapsed: O,
|
|
333
|
+
settingsPath: d,
|
|
334
|
+
settingsLabel: g,
|
|
335
|
+
onOpenSettings: y,
|
|
336
|
+
onNavigate: S
|
|
337
|
+
}), i.length > 0 && /* @__PURE__ */ _("div", {
|
|
338
|
+
className: "border-border mt-2 border-t pt-2",
|
|
339
|
+
children: /* @__PURE__ */ _(I, {
|
|
340
|
+
collapsed: O,
|
|
341
|
+
accounts: i,
|
|
342
|
+
initialAccountIndex: a,
|
|
343
|
+
onAccountChange: o,
|
|
344
|
+
onSignOut: s,
|
|
345
|
+
signOutPath: c,
|
|
346
|
+
signOutLabel: u,
|
|
347
|
+
onNavigate: S
|
|
348
|
+
})
|
|
349
|
+
})]
|
|
350
|
+
})
|
|
351
|
+
]
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
//#endregion
|
|
355
|
+
export { R as Sidebar };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { type ComponentPropsWithRef } from "react";
|
|
2
|
+
export interface ThemeMenuProps extends Omit<ComponentPropsWithRef<"button">, "children"> {
|
|
2
3
|
/** Extra classes for the trigger button. */
|
|
3
4
|
className?: string;
|
|
4
5
|
/**
|
|
@@ -16,5 +17,4 @@ export interface ThemeMenuProps {
|
|
|
16
17
|
* apply immediately; "Save for theme" persists them as overrides for the
|
|
17
18
|
* active theme.
|
|
18
19
|
*/
|
|
19
|
-
export declare function ThemeMenu({ className, respondToOpenEvent, }: ThemeMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
//# sourceMappingURL=ThemeMenu.d.ts.map
|
|
20
|
+
export declare function ThemeMenu({ className, respondToOpenEvent, onClick, ref, ...rest }: ThemeMenuProps): import("react/jsx-runtime").JSX.Element;
|