@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
package/README.md
CHANGED
|
@@ -15,6 +15,17 @@ Import the stylesheet once:
|
|
|
15
15
|
import "@leonardaustin/ui/styles.css";
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
+
### Per-theme stylesheets
|
|
19
|
+
|
|
20
|
+
To load selected themes, import the core sheet first. It includes the default
|
|
21
|
+
dark theme. Add one stylesheet for each additional theme your app offers.
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
import "@leonardaustin/ui/core.css";
|
|
25
|
+
import "@leonardaustin/ui/themes/light.css";
|
|
26
|
+
import "@leonardaustin/ui/themes/glass-dark.css";
|
|
27
|
+
```
|
|
28
|
+
|
|
18
29
|
Wrap applications with the providers when using the built-in theme controls:
|
|
19
30
|
|
|
20
31
|
```tsx
|
|
@@ -39,5 +50,175 @@ export function Root() {
|
|
|
39
50
|
router when you want single-page navigation; otherwise links render as normal
|
|
40
51
|
anchors.
|
|
41
52
|
|
|
42
|
-
|
|
43
|
-
|
|
53
|
+
## Components
|
|
54
|
+
|
|
55
|
+
### App shell & navigation
|
|
56
|
+
|
|
57
|
+
| Component | Purpose |
|
|
58
|
+
| ----------------------------------- | ------------------------------------------------------------------ |
|
|
59
|
+
| `SettingsProvider`, `ThemeProvider` | Provide application appearance preferences and the resolved theme. |
|
|
60
|
+
| `AppShell` | Wrap an application in responsive navigation and content chrome. |
|
|
61
|
+
| `AuthLayout` | Centre and frame sign-in or registration screens. |
|
|
62
|
+
| `BackLink` | Link to the parent view. |
|
|
63
|
+
| `BottomNav` | Show primary navigation at the bottom of mobile screens. |
|
|
64
|
+
| `Breadcrumbs` | Show the current page’s location in a hierarchy. |
|
|
65
|
+
| `CommandPalette` | Search and invoke application commands from the keyboard. |
|
|
66
|
+
| `ListItemLink` | Render a link as a structured list row. |
|
|
67
|
+
| `MobileDrawer` | Show navigation in a mobile overlay. |
|
|
68
|
+
| `Sidebar` | Show desktop navigation, account and settings controls. |
|
|
69
|
+
| `ThemeMenu` | Change appearance, theme and accent settings. |
|
|
70
|
+
| `TopBar` | Show navigation and actions across the top of the app. |
|
|
71
|
+
|
|
72
|
+
### Buttons & display
|
|
73
|
+
|
|
74
|
+
| Component | Purpose |
|
|
75
|
+
| ------------------ | ------------------------------------------------------------------ |
|
|
76
|
+
| `Accordion` | Group related expandable sections. |
|
|
77
|
+
| `AudioPlayer` | Play and seek through audio recordings. |
|
|
78
|
+
| `AuthorByline` | Show an author’s name, avatar and metadata. |
|
|
79
|
+
| `Avatar` | Represent a person with an image or initials. |
|
|
80
|
+
| `Badge` | Show compact labels and status. |
|
|
81
|
+
| `Button` | Trigger an action with a themed button. |
|
|
82
|
+
| `Card` | Group content in a surface with optional button or link behaviour. |
|
|
83
|
+
| `CopyButton` | Copy text and announce the result. |
|
|
84
|
+
| `Disclosure` | Toggle a section of supporting content. |
|
|
85
|
+
| `DividerLabel` | Separate sections with a centred label. |
|
|
86
|
+
| `Grid`, `GridItem` | Arrange responsive columns and spans. |
|
|
87
|
+
| `Inline` | Arrange items horizontally with optional wrapping. |
|
|
88
|
+
| `Kbd` | Display a keyboard key or shortcut. |
|
|
89
|
+
| `LoadingSpinner` | Indicate an ongoing operation. |
|
|
90
|
+
| `MessageBubble` | Show incoming and outgoing conversation messages. |
|
|
91
|
+
| `MetadataGrid` | Show labelled values in a grid. |
|
|
92
|
+
| `MetricCard` | Highlight a metric and its context. |
|
|
93
|
+
| `PageHeader` | Display a page title, description and actions. |
|
|
94
|
+
| `PageSection` | Group page content under a heading. |
|
|
95
|
+
| `ProfileHeader` | Display identity, metadata and actions for a profile. |
|
|
96
|
+
| `ProseContent` | Theme long-form content and rich text. |
|
|
97
|
+
| `OverlineLabel` | Add a compact heading above a group. |
|
|
98
|
+
| `QrCode` | Render a QR code from text. |
|
|
99
|
+
| `SectionHeader` | Label a section with an optional icon and actions. |
|
|
100
|
+
| `Stack` | Arrange items vertically with consistent spacing. |
|
|
101
|
+
| `StatusDot` | Display a compact visual status indicator. |
|
|
102
|
+
| `StepProgress` | Show progress through ordered steps. |
|
|
103
|
+
| `Tabs`, `NavTabs` | Switch panels or navigate between related routes. |
|
|
104
|
+
| `ThemePreview` | Preview the palette of a theme. |
|
|
105
|
+
| `Timeline` | Display a chronological sequence of events. |
|
|
106
|
+
| `TranscriptLine` | Display a speaker’s line with an optional seek control. |
|
|
107
|
+
|
|
108
|
+
### Forms & inputs
|
|
109
|
+
|
|
110
|
+
| Component | Purpose |
|
|
111
|
+
| --------------------------------------- | -------------------------------------------------------------- |
|
|
112
|
+
| `ControlSizeProvider`, `useControlSize` | Provide and read the inherited control density. |
|
|
113
|
+
| `CharacterCount` | Display text length against a limit. |
|
|
114
|
+
| `AttachmentList`, `AttachmentItem` | List attachments with metadata, status and actions. |
|
|
115
|
+
| `CalendarGrid` | Display dates in a selectable month grid. |
|
|
116
|
+
| `Checkbox` | Toggle a boolean form value. |
|
|
117
|
+
| `CodeInput` | Enter a one-time verification code. |
|
|
118
|
+
| `Combobox` | Search and choose from options in an anchored popup. |
|
|
119
|
+
| `DatePartsInput` | Enter the day, month and year in separate fields. |
|
|
120
|
+
| `DatePicker` | Choose a single date. |
|
|
121
|
+
| `DateRangePicker` | Choose a start and end date. |
|
|
122
|
+
| `DateTimePicker` | Choose a date and time together. |
|
|
123
|
+
| `Fieldset` | Group related inputs under a legend. |
|
|
124
|
+
| `FilterButton` | Show and toggle the active state of a filter. |
|
|
125
|
+
| `FilterDropdown` | Open a menu for choosing filter values. |
|
|
126
|
+
| `FormField`, `FieldHint`, `FieldError` | Associate controls with labels, hints and validation messages. |
|
|
127
|
+
| `OAuthButton` | Start sign-in with an identity provider. |
|
|
128
|
+
| `PasswordInput` | Enter a password with a visibility toggle. |
|
|
129
|
+
| `PasswordRequirements` | Show password rules and completion status. |
|
|
130
|
+
| `Radio`, `Radio.Group` | Select one option from a labelled group. |
|
|
131
|
+
| `RadioPill` | Select one option with a segmented control. |
|
|
132
|
+
| `ReorderList` | Move items up or down in a controlled list. |
|
|
133
|
+
| `SearchInput` | Enter and clear a search query. |
|
|
134
|
+
| `Select` | Choose an option with a native select. |
|
|
135
|
+
| `SelectDropdown` | Choose an option with a themed popup. |
|
|
136
|
+
| `SettingRow` | Pair a setting’s label and description with its control. |
|
|
137
|
+
| `Slider` | Adjust a numeric value within a range. |
|
|
138
|
+
| `Textarea` | Enter multi-line text. |
|
|
139
|
+
| `TextInput` | Enter single-line text with a label, hint or error. |
|
|
140
|
+
| `TimeInput` | Enter a native time value. |
|
|
141
|
+
| `Toggle` | Switch a setting on or off. |
|
|
142
|
+
| `UploadDropzone` | Choose files with a picker or drag and drop. |
|
|
143
|
+
|
|
144
|
+
### Feedback & overlays
|
|
145
|
+
|
|
146
|
+
| Component | Purpose |
|
|
147
|
+
| --------------------------- | -------------------------------------------------------- |
|
|
148
|
+
| `Skeleton` | Reserve space with a loading placeholder. |
|
|
149
|
+
| `ProgressBar` | Show progress toward a known total. |
|
|
150
|
+
| `Alert` | Display a contextual notice. |
|
|
151
|
+
| `AuthCard` | Frame an authentication form and supporting links. |
|
|
152
|
+
| `DangerZone` | Group destructive actions in a clearly labelled section. |
|
|
153
|
+
| `DetailPanel` | Show details in a panel beside the current view. |
|
|
154
|
+
| `Dialog`, `DialogActions` | Open a modal and present its actions. |
|
|
155
|
+
| `DropdownMenu` | Open an anchored menu of actions or links. |
|
|
156
|
+
| `EmptyState` | Explain an empty view and offer an action. |
|
|
157
|
+
| `ErrorBoundary` | Show a fallback after a render error. |
|
|
158
|
+
| `Popover` | Open a non-modal dialog beside its trigger. |
|
|
159
|
+
| `SideSheet` | Show a panel that slides in from the side. |
|
|
160
|
+
| `SplitPaneLayout` | Lay out independent full-height scroll areas. |
|
|
161
|
+
| `ToastProvider`, `useToast` | Provide and trigger transient notifications. |
|
|
162
|
+
| `Toolbar` | Arrange actions and filters above content. |
|
|
163
|
+
| `Tooltip` | Show contextual information about a control. |
|
|
164
|
+
|
|
165
|
+
### Tables & data
|
|
166
|
+
|
|
167
|
+
| Component | Purpose |
|
|
168
|
+
| ---------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
|
|
169
|
+
| `Calendar` | Display and edit events and availability in calendar views. |
|
|
170
|
+
| `ColumnPicker` | Control which table columns are visible. |
|
|
171
|
+
| `Pagination` | Navigate between pages of results. |
|
|
172
|
+
| `PaginationBar` | Combine paging, result count and page-size selection. |
|
|
173
|
+
| `ResourceTable` | Display typed rows with sorting and selection controls. |
|
|
174
|
+
| `Table`, `TableHead`, `TableBody`, `TableRow`, `TableHeaderCell`, `TableCell`, `TableEmptyRow` | Compose a styled semantic table. |
|
|
175
|
+
|
|
176
|
+
### Charts
|
|
177
|
+
|
|
178
|
+
| Component | Purpose |
|
|
179
|
+
| ------------------ | ----------------------------------------------------- |
|
|
180
|
+
| `AreaChart` | Show how values change across a continuous series. |
|
|
181
|
+
| `BarChart` | Compare values across categories. |
|
|
182
|
+
| `DonutChart` | Show parts of a whole in a ring. |
|
|
183
|
+
| `RadarChart` | Compare values across several axes. |
|
|
184
|
+
| `RadialBarChart` | Show values as concentric arcs. |
|
|
185
|
+
| `SparkLine` | Show a compact trend without axes. |
|
|
186
|
+
| `StackedBarChart` | Compare totals and their breakdown across categories. |
|
|
187
|
+
| `VerticalBarChart` | Compare values using vertical bars. |
|
|
188
|
+
|
|
189
|
+
### Hooks & providers
|
|
190
|
+
|
|
191
|
+
| Component | Purpose |
|
|
192
|
+
| -------------------------------------------------- | ---------------------------------------------------------------- |
|
|
193
|
+
| `useTheme`, `useApplyTheme`, `useSettings` | Read and change the active theme and its settings. |
|
|
194
|
+
| `useAnchoredPopup`, `usePopover` | Position an anchored popup or manage its trigger and open state. |
|
|
195
|
+
| `useDismiss`, `useFocusTrap`, `usePortalContainer` | Coordinate overlay dismissal, focus and portal placement. |
|
|
196
|
+
|
|
197
|
+
### Sizes
|
|
198
|
+
|
|
199
|
+
Visual sizes follow the scale `xs`, `sm`, `md`, `lg`, `xl` from smallest to
|
|
200
|
+
largest. Each component supports a subset. `controlSize` is the separate
|
|
201
|
+
`compact` or `comfortable` density setting for interactive controls.
|
|
202
|
+
|
|
203
|
+
### TypeScript
|
|
204
|
+
|
|
205
|
+
Import `ButtonVariant`, `ButtonSize`, and `SplitPaneLayoutMainProps` from
|
|
206
|
+
`@leonardaustin/ui` to type button options and props for `SplitPaneLayout.Main`.
|
|
207
|
+
|
|
208
|
+
## Themes
|
|
209
|
+
|
|
210
|
+
Use a React value with `SettingsProvider` or apply the CSS classes to a theme
|
|
211
|
+
root when using the stylesheet directly.
|
|
212
|
+
|
|
213
|
+
| Theme | React value | CSS classes |
|
|
214
|
+
| ------------------ | ------------------ | ---------------------------------- |
|
|
215
|
+
| Dark | `dark` | None (uses `:root`) |
|
|
216
|
+
| Light | `light` | `theme-light` |
|
|
217
|
+
| Light Inverted | `lightInverted` | `theme-light-inverted` |
|
|
218
|
+
| Monokai | `monokai` | `theme-monokai` |
|
|
219
|
+
| Solarized | `solarized` | `theme-solarized` |
|
|
220
|
+
| Cyber Brutal Dark | `cyberBrutalDark` | `theme-cyber-brutal-dark` |
|
|
221
|
+
| Cyber Brutal Light | `cyberBrutalLight` | `theme-cyber-brutal-light` |
|
|
222
|
+
| HashiTheme | `hashiTheme` | `theme-hashi` |
|
|
223
|
+
| Glass Dark | `glassDark` | `theme-glass`, `theme-glass-dark` |
|
|
224
|
+
| Glass Light | `glassLight` | `theme-glass`, `theme-glass-light` |
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from "react";
|
|
2
2
|
import type { CommandPaletteShortcut } from "./commandPaletteEvents";
|
|
3
3
|
import type { AppShellNavigate } from "./navigation";
|
|
4
4
|
import type { AppShellAccount, AppShellBrand, AppShellBreadcrumbOptions, AppShellNavItem, AppShellNavSection, AppShellTopBarNavItem } from "./types";
|
|
5
|
-
export interface AppShellProps {
|
|
5
|
+
export interface AppShellProps extends Omit<ComponentPropsWithRef<"div">, "children"> {
|
|
6
6
|
/** Routed page content, rendered inside the `#main-content` <main>. */
|
|
7
7
|
children?: ReactNode;
|
|
8
8
|
/** Titled groups of nav items for the sidebar; also the mobile drawer items and the default command palette items. */
|
|
@@ -65,5 +65,4 @@ export interface AppShellProps {
|
|
|
65
65
|
* `commandShortcut` (default ⌘K) whose searchable items default to the
|
|
66
66
|
* flattened `navSections` (override via `commandItems`).
|
|
67
67
|
*/
|
|
68
|
-
export declare function AppShell({ children, navSections, brand, accounts, bottomNavItems, commandItems, breadcrumbs, initialAccountIndex, onAccountChange, onSignOut, signOutPath, signOutLabel, settingsPath, settingsLabel, onOpenSettings, showCommandPalette, showCommandTrigger, commandTriggerLabel, commandShortcut, sidebarHeaderActions, topBarActions, topBarNavItems, topBarNavLabel, currentPath, onNavigate, mainClassName, className, }: AppShellProps): import("react/jsx-runtime").JSX.Element;
|
|
69
|
-
//# sourceMappingURL=AppShell.d.ts.map
|
|
68
|
+
export declare function AppShell({ children, navSections, brand, accounts, bottomNavItems, commandItems, breadcrumbs, initialAccountIndex, onAccountChange, onSignOut, signOutPath, signOutLabel, settingsPath, settingsLabel, onOpenSettings, showCommandPalette, showCommandTrigger, commandTriggerLabel, commandShortcut, sidebarHeaderActions, topBarActions, topBarNavItems, topBarNavLabel, currentPath, onNavigate, mainClassName, className, ref, ...rest }: AppShellProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/cn.js";
|
|
2
|
+
import { BottomNav as t } from "./BottomNav.js";
|
|
3
|
+
import { CommandPalette as n } from "./CommandPalette.js";
|
|
4
|
+
import { MobileDrawer as r } from "./MobileDrawer.js";
|
|
5
|
+
import { Sidebar as i } from "./Sidebar.js";
|
|
6
|
+
import { TopBar as a } from "./TopBar.js";
|
|
7
|
+
import { useMemo as o, useState as s } from "react";
|
|
8
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
9
|
+
//#region src/components/app-shell/AppShell.tsx
|
|
10
|
+
function u({ children: u, navSections: d, brand: f, accounts: p, bottomNavItems: m = [], commandItems: h, breadcrumbs: g, initialAccountIndex: _, onAccountChange: v, onSignOut: y, signOutPath: b, signOutLabel: x, settingsPath: S, settingsLabel: C, onOpenSettings: w, showCommandPalette: T = !0, showCommandTrigger: E = !0, commandTriggerLabel: D, commandShortcut: O, sidebarHeaderActions: k, topBarActions: A, topBarNavItems: j, topBarNavLabel: M, currentPath: N, onNavigate: P, mainClassName: F, className: I, ref: L, ...R }) {
|
|
11
|
+
let [z, B] = s(!1), V = o(() => d.flatMap((e) => e.items), [d]), H = h ?? V;
|
|
12
|
+
return /* @__PURE__ */ l("div", {
|
|
13
|
+
ref: L,
|
|
14
|
+
...R,
|
|
15
|
+
className: e("ui-glass-shell bg-bg-primary flex h-svh overflow-hidden", I),
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ c("a", {
|
|
18
|
+
href: "#main-content",
|
|
19
|
+
className: "skip-link",
|
|
20
|
+
children: "Skip to content"
|
|
21
|
+
}),
|
|
22
|
+
/* @__PURE__ */ c(i, {
|
|
23
|
+
navSections: d,
|
|
24
|
+
brand: f,
|
|
25
|
+
accounts: p,
|
|
26
|
+
initialAccountIndex: _,
|
|
27
|
+
onAccountChange: v,
|
|
28
|
+
onSignOut: y,
|
|
29
|
+
signOutPath: b,
|
|
30
|
+
signOutLabel: x,
|
|
31
|
+
settingsPath: S,
|
|
32
|
+
settingsLabel: C,
|
|
33
|
+
onOpenSettings: w,
|
|
34
|
+
currentPath: N,
|
|
35
|
+
onNavigate: P,
|
|
36
|
+
headerActions: k
|
|
37
|
+
}),
|
|
38
|
+
/* @__PURE__ */ l("div", {
|
|
39
|
+
className: "flex min-w-0 flex-1 flex-col",
|
|
40
|
+
children: [/* @__PURE__ */ c(a, {
|
|
41
|
+
onMobileMenuToggle: () => B(!0),
|
|
42
|
+
breadcrumbs: g,
|
|
43
|
+
showCommandTrigger: T && E,
|
|
44
|
+
commandTriggerLabel: D,
|
|
45
|
+
commandShortcut: O,
|
|
46
|
+
actions: A,
|
|
47
|
+
navItems: j,
|
|
48
|
+
navLabel: M,
|
|
49
|
+
currentPath: N,
|
|
50
|
+
onNavigate: P
|
|
51
|
+
}), /* @__PURE__ */ c("main", {
|
|
52
|
+
id: "main-content",
|
|
53
|
+
className: e("flex-1 overflow-y-auto p-4 pb-20 md:p-6 md:pb-6", F),
|
|
54
|
+
children: u
|
|
55
|
+
})]
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ c(t, {
|
|
58
|
+
items: m,
|
|
59
|
+
currentPath: N,
|
|
60
|
+
onNavigate: P
|
|
61
|
+
}),
|
|
62
|
+
/* @__PURE__ */ c(r, {
|
|
63
|
+
open: z,
|
|
64
|
+
onClose: () => B(!1),
|
|
65
|
+
items: V,
|
|
66
|
+
topBarNavItems: j,
|
|
67
|
+
topBarNavLabel: M,
|
|
68
|
+
brand: f,
|
|
69
|
+
currentPath: N,
|
|
70
|
+
onNavigate: P,
|
|
71
|
+
headerActions: k
|
|
72
|
+
}),
|
|
73
|
+
T && H.length > 0 && /* @__PURE__ */ c(n, {
|
|
74
|
+
items: H,
|
|
75
|
+
shortcut: O,
|
|
76
|
+
onNavigate: P
|
|
77
|
+
})
|
|
78
|
+
]
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
//#endregion
|
|
82
|
+
export { u as AppShell };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
export interface AuthLayoutProps {
|
|
1
|
+
import type { ComponentPropsWithRef, ReactNode } from "react";
|
|
2
|
+
export interface AuthLayoutProps extends Omit<ComponentPropsWithRef<"div">, "children"> {
|
|
3
3
|
/** Content centered on the page, typically an auth card. */
|
|
4
4
|
children?: ReactNode;
|
|
5
5
|
/** Extra classes for the full-page wrapper. */
|
|
6
6
|
className?: string;
|
|
7
7
|
}
|
|
8
|
-
export declare function AuthLayout({ children, className }: AuthLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
//# sourceMappingURL=AuthLayout.d.ts.map
|
|
8
|
+
export declare function AuthLayout({ children, className, ref, ...rest }: AuthLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/cn.js";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/app-shell/AuthLayout.tsx
|
|
4
|
+
function r({ children: r, className: i, ref: a, ...o }) {
|
|
5
|
+
return /* @__PURE__ */ n("div", {
|
|
6
|
+
ref: a,
|
|
7
|
+
...o,
|
|
8
|
+
className: e("ui-glass-shell bg-bg-primary relative flex min-h-svh items-center justify-center p-4", i),
|
|
9
|
+
children: [/* @__PURE__ */ t("div", {
|
|
10
|
+
className: "pointer-events-none absolute inset-0 opacity-30",
|
|
11
|
+
style: { background: "radial-gradient(ellipse at 50% 30%, var(--accent-muted) 0%, transparent 60%)" }
|
|
12
|
+
}), r]
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { r as AuthLayout };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
1
|
+
import type { ComponentPropsWithRef, ReactNode } from "react";
|
|
2
2
|
import { type AppShellNavigate } from "./navigation";
|
|
3
|
-
export interface BackLinkProps {
|
|
3
|
+
export interface BackLinkProps extends Omit<ComponentPropsWithRef<"a">, "children" | "href"> {
|
|
4
4
|
/** Destination path, used as the link `href`. */
|
|
5
5
|
to: string;
|
|
6
6
|
/** Link text shown after the arrow icon. */
|
|
@@ -10,5 +10,4 @@ export interface BackLinkProps {
|
|
|
10
10
|
/** Extra classes for the link. */
|
|
11
11
|
className?: string;
|
|
12
12
|
}
|
|
13
|
-
export declare function BackLink({ to, children, onNavigate, className, }: BackLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
//# sourceMappingURL=BackLink.d.ts.map
|
|
13
|
+
export declare function BackLink({ to, children, onNavigate, className, onClick, ref, ...rest }: BackLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/cn.js";
|
|
2
|
+
import { handleAppShellNavigate as t } from "./navigation.js";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { ArrowLeft as i } from "lucide-react";
|
|
5
|
+
//#region src/components/app-shell/BackLink.tsx
|
|
6
|
+
function a({ to: a, children: o, onNavigate: s, className: c, onClick: l, ref: u, ...d }) {
|
|
7
|
+
return /* @__PURE__ */ r("a", {
|
|
8
|
+
ref: u,
|
|
9
|
+
...d,
|
|
10
|
+
href: a,
|
|
11
|
+
onClick: (e) => {
|
|
12
|
+
l?.(e), !e.defaultPrevented && t(e, a, s);
|
|
13
|
+
},
|
|
14
|
+
className: e("inline-flex items-center gap-1.5", "text-text-tertiary text-xs", "hover:text-text-primary transition-colors duration-[100ms]", c),
|
|
15
|
+
children: [/* @__PURE__ */ n(i, { className: "h-3.5 w-3.5" }), o]
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { a as BackLink };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
1
2
|
import { type AppShellNavigate } from "./navigation";
|
|
2
3
|
import type { AppShellNavItem } from "./types";
|
|
3
|
-
export interface BottomNavProps {
|
|
4
|
+
export interface BottomNavProps extends ComponentPropsWithRef<"nav"> {
|
|
4
5
|
/**
|
|
5
6
|
* Destinations, shown as icon-over-label links in order. Each item's
|
|
6
7
|
* `shortLabel` is shown instead of `label` when set. Renders nothing when
|
|
@@ -23,5 +24,4 @@ export interface BottomNavProps {
|
|
|
23
24
|
/** Additional utility classes for the `<nav>` element. */
|
|
24
25
|
className?: string;
|
|
25
26
|
}
|
|
26
|
-
export declare function BottomNav({ items, currentPath, onNavigate, className, }: BottomNavProps): import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
-
//# sourceMappingURL=BottomNav.d.ts.map
|
|
27
|
+
export declare function BottomNav({ items, currentPath, onNavigate, className, style, ref, ...rest }: BottomNavProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/cn.js";
|
|
2
|
+
import { handleAppShellNavigate as t, isAppShellPathActive as n } from "./navigation.js";
|
|
3
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/app-shell/BottomNav.tsx
|
|
5
|
+
function a({ items: a, currentPath: o, onNavigate: s, className: c, style: l, ref: u, ...d }) {
|
|
6
|
+
return a.length === 0 ? null : /* @__PURE__ */ r("nav", {
|
|
7
|
+
ref: u,
|
|
8
|
+
...d,
|
|
9
|
+
className: e("ui-glass ui-glass-chrome bg-bg-secondary border-border font-navigation fixed right-0 bottom-0 left-0 z-30 border-t md:hidden", c),
|
|
10
|
+
style: {
|
|
11
|
+
height: "var(--bottomnav-height)",
|
|
12
|
+
...l
|
|
13
|
+
},
|
|
14
|
+
children: /* @__PURE__ */ r("ul", {
|
|
15
|
+
className: "flex h-full items-center justify-around",
|
|
16
|
+
children: a.map((a) => {
|
|
17
|
+
let c = n(a, o);
|
|
18
|
+
return /* @__PURE__ */ r("li", { children: /* @__PURE__ */ i("a", {
|
|
19
|
+
href: a.path,
|
|
20
|
+
onClick: (e) => t(e, a.path, s),
|
|
21
|
+
"aria-current": c ? "page" : void 0,
|
|
22
|
+
"aria-label": a.shortLabel && a.shortLabel !== a.label ? `${a.shortLabel}, ${a.label}` : void 0,
|
|
23
|
+
className: e("font-navigation flex h-full w-14 flex-col items-center justify-center gap-0.5", "cursor-pointer transition-colors duration-[100ms]", c ? "text-accent-fg" : "text-text-tertiary"),
|
|
24
|
+
children: [/* @__PURE__ */ r(a.icon, {
|
|
25
|
+
className: "h-5 w-5",
|
|
26
|
+
"aria-hidden": "true"
|
|
27
|
+
}), /* @__PURE__ */ r("span", {
|
|
28
|
+
className: "text-2xs",
|
|
29
|
+
children: a.shortLabel ?? a.label
|
|
30
|
+
})]
|
|
31
|
+
}) }, a.path);
|
|
32
|
+
})
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
export { a as BottomNav };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
1
2
|
import { type AppShellNavigate } from "./navigation";
|
|
2
3
|
import type { AppShellBreadcrumbOptions } from "./types";
|
|
3
|
-
export interface BreadcrumbsProps extends AppShellBreadcrumbOptions {
|
|
4
|
+
export interface BreadcrumbsProps extends AppShellBreadcrumbOptions, ComponentPropsWithRef<"nav"> {
|
|
4
5
|
/** Pathname to build the trail from, one crumb per segment after the home crumb. Defaults to "/". Any query string is ignored. */
|
|
5
6
|
currentPath?: string;
|
|
6
7
|
/** Called with the crumb path on a plain left-click, for client-side routing. */
|
|
@@ -8,5 +9,4 @@ export interface BreadcrumbsProps extends AppShellBreadcrumbOptions {
|
|
|
8
9
|
/** Extra classes for the `<nav>`. */
|
|
9
10
|
className?: string;
|
|
10
11
|
}
|
|
11
|
-
export declare function Breadcrumbs({ homeLabel, labels, parents, currentPath, onNavigate, className, }: BreadcrumbsProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
//# sourceMappingURL=Breadcrumbs.d.ts.map
|
|
12
|
+
export declare function Breadcrumbs({ homeLabel, labels, parents, currentPath, onNavigate, className, ref, ...rest }: BreadcrumbsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/cn.js";
|
|
2
|
+
import { handleAppShellNavigate as t } from "./navigation.js";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { ChevronRight as i } from "lucide-react";
|
|
5
|
+
//#region src/components/app-shell/Breadcrumbs.tsx
|
|
6
|
+
function a(e) {
|
|
7
|
+
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
8
|
+
}
|
|
9
|
+
function o({ homeLabel: o = "Dashboard", labels: s = {}, parents: c = {}, currentPath: l = "/", onNavigate: u, className: d, ref: f, ...p }) {
|
|
10
|
+
let m = l.split("?")[0].split("/").filter(Boolean), h = [{
|
|
11
|
+
label: o,
|
|
12
|
+
path: "/"
|
|
13
|
+
}, ...m.map((e, t) => {
|
|
14
|
+
let n = m[t - 1];
|
|
15
|
+
return {
|
|
16
|
+
label: s[e] || c[n] || a(e),
|
|
17
|
+
path: "/" + m.slice(0, t + 1).join("/")
|
|
18
|
+
};
|
|
19
|
+
})];
|
|
20
|
+
return /* @__PURE__ */ n("nav", {
|
|
21
|
+
ref: f,
|
|
22
|
+
...p,
|
|
23
|
+
"aria-label": "Breadcrumb",
|
|
24
|
+
className: e("font-navigation flex items-center gap-1 text-xs", d),
|
|
25
|
+
children: /* @__PURE__ */ n("ol", {
|
|
26
|
+
className: "flex items-center gap-1",
|
|
27
|
+
children: h.map((a, o) => {
|
|
28
|
+
let s = o === h.length - 1;
|
|
29
|
+
return /* @__PURE__ */ r("li", {
|
|
30
|
+
className: "flex items-center gap-1",
|
|
31
|
+
children: [o > 0 && /* @__PURE__ */ n(i, { className: "text-text-tertiary h-3 w-3" }), s ? /* @__PURE__ */ n("span", {
|
|
32
|
+
className: "text-text-primary font-medium",
|
|
33
|
+
children: a.label
|
|
34
|
+
}) : /* @__PURE__ */ n("a", {
|
|
35
|
+
href: a.path,
|
|
36
|
+
onClick: (e) => t(e, a.path, u),
|
|
37
|
+
className: e("text-text-tertiary hover:text-text-primary cursor-pointer transition-colors duration-[100ms]"),
|
|
38
|
+
children: a.label
|
|
39
|
+
})]
|
|
40
|
+
}, a.path);
|
|
41
|
+
})
|
|
42
|
+
})
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { o as Breadcrumbs };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from "react";
|
|
1
2
|
import { type CommandPaletteShortcut } from "./commandPaletteEvents";
|
|
2
3
|
import { type AppShellNavigate } from "./navigation";
|
|
3
4
|
import type { AppShellNavItem } from "./types";
|
|
4
|
-
export interface CommandPaletteProps {
|
|
5
|
+
export interface CommandPaletteProps extends Omit<ComponentPropsWithRef<"div">, "children" | "onSelect"> {
|
|
5
6
|
/** Pages to search. Matches on label, path, and `keywords`. */
|
|
6
7
|
items: AppShellNavItem[];
|
|
7
8
|
/** Name of the `document` CustomEvent that opens the palette. Defaults to the one fired by `openCommandPalette()`. */
|
|
@@ -22,5 +23,4 @@ export interface CommandPaletteProps {
|
|
|
22
23
|
* `shortcut` (default ⌘K), or when the `eventName` CustomEvent is dispatched on
|
|
23
24
|
* `document` (see openCommandPalette()); the shortcut also toggles it closed.
|
|
24
25
|
*/
|
|
25
|
-
export declare function CommandPalette({ items, eventName, shortcut, placeholder, emptyLabel, onNavigate, onSelect, }: CommandPaletteProps): import("react/jsx-runtime").JSX.Element | null;
|
|
26
|
-
//# sourceMappingURL=CommandPalette.d.ts.map
|
|
26
|
+
export declare function CommandPalette({ items, eventName, shortcut, placeholder, emptyLabel, onNavigate, onSelect, className, onKeyDown, ref, ...rest }: CommandPaletteProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/cn.js";
|
|
2
|
+
import { mergeRefs as t } from "../../lib/mergeRefs.js";
|
|
3
|
+
import { navigateToPath as n } from "./navigation.js";
|
|
4
|
+
import { useFocusTrap as r } from "../../hooks/useFocusTrap.js";
|
|
5
|
+
import { useOverlayEscape as i } from "../../hooks/useOverlayStack.js";
|
|
6
|
+
import { COMMAND_PALETTE_EVENT as a, DEFAULT_COMMAND_PALETTE_SHORTCUT as o, matchesCommandPaletteShortcut as s } from "./commandPaletteEvents.js";
|
|
7
|
+
import { useCallback as c, useEffect as l, useId as u, useMemo as d, useRef as f, useState as p } from "react";
|
|
8
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
9
|
+
import { Search as g } from "lucide-react";
|
|
10
|
+
//#region src/components/app-shell/CommandPalette.tsx
|
|
11
|
+
function _(e, t) {
|
|
12
|
+
let n = t.toLowerCase();
|
|
13
|
+
return [
|
|
14
|
+
e.label,
|
|
15
|
+
e.path,
|
|
16
|
+
...e.keywords ?? []
|
|
17
|
+
].some((e) => e.toLowerCase().includes(n));
|
|
18
|
+
}
|
|
19
|
+
function v({ items: v, eventName: y = a, shortcut: b = o, placeholder: x = "Search pages...", emptyLabel: S = "No results found", onNavigate: C, onSelect: w, className: T, onKeyDown: E, ref: D, ...O }) {
|
|
20
|
+
let [k, A] = p(!1), [j, M] = p(""), [N, P] = p(0), F = f(null), I = f(null), L = d(() => t(I, D), [D]), R = u();
|
|
21
|
+
r(I, k), i(k, () => A(!1), I);
|
|
22
|
+
let z = v.filter((e) => _(e, j)), B = c(() => {
|
|
23
|
+
A(!0), M(""), P(0), setTimeout(() => F.current?.focus(), 0);
|
|
24
|
+
}, []);
|
|
25
|
+
l(() => {
|
|
26
|
+
let e = (e) => {
|
|
27
|
+
s(e, b) && (e.preventDefault(), k ? A(!1) : B());
|
|
28
|
+
}, t = () => {
|
|
29
|
+
k || B();
|
|
30
|
+
};
|
|
31
|
+
return document.addEventListener("keydown", e), document.addEventListener(y, t), () => {
|
|
32
|
+
document.removeEventListener("keydown", e), document.removeEventListener(y, t);
|
|
33
|
+
};
|
|
34
|
+
}, [
|
|
35
|
+
y,
|
|
36
|
+
k,
|
|
37
|
+
B,
|
|
38
|
+
b
|
|
39
|
+
]);
|
|
40
|
+
function V(e) {
|
|
41
|
+
M(e), P(0);
|
|
42
|
+
}
|
|
43
|
+
function H(e) {
|
|
44
|
+
w?.(e), n(e.path, C), A(!1);
|
|
45
|
+
}
|
|
46
|
+
function U(e) {
|
|
47
|
+
E?.(e), !e.defaultPrevented && (e.key === "ArrowDown" ? (e.preventDefault(), P((e) => Math.min(e + 1, z.length - 1))) : e.key === "ArrowUp" ? (e.preventDefault(), P((e) => Math.max(e - 1, 0))) : e.key === "Enter" && z[N] && H(z[N]));
|
|
48
|
+
}
|
|
49
|
+
return k ? /* @__PURE__ */ h("div", {
|
|
50
|
+
className: "fixed inset-0 z-50 flex items-start justify-center pt-[20vh]",
|
|
51
|
+
children: [/* @__PURE__ */ m("div", {
|
|
52
|
+
className: "bg-bg-overlay fixed inset-0",
|
|
53
|
+
onClick: () => A(!1)
|
|
54
|
+
}), /* @__PURE__ */ h("div", {
|
|
55
|
+
...O,
|
|
56
|
+
ref: L,
|
|
57
|
+
role: "dialog",
|
|
58
|
+
"aria-modal": "true",
|
|
59
|
+
"aria-label": "Command palette",
|
|
60
|
+
className: e("ui-glass ui-glass-popover bg-bg-secondary border-border animate-scale-in relative z-50 mx-4 w-full max-w-[520px] overflow-hidden rounded-xl border shadow-lg", T),
|
|
61
|
+
onKeyDown: U,
|
|
62
|
+
children: [/* @__PURE__ */ h("div", {
|
|
63
|
+
className: "border-border flex items-center gap-3 border-b px-4",
|
|
64
|
+
children: [
|
|
65
|
+
/* @__PURE__ */ m(g, { className: "text-text-tertiary h-4 w-4 shrink-0" }),
|
|
66
|
+
/* @__PURE__ */ m("input", {
|
|
67
|
+
ref: F,
|
|
68
|
+
type: "text",
|
|
69
|
+
role: "combobox",
|
|
70
|
+
"aria-expanded": z.length > 0,
|
|
71
|
+
"aria-controls": R,
|
|
72
|
+
"aria-activedescendant": z[N] ? `${R}-${N}` : void 0,
|
|
73
|
+
"aria-autocomplete": "list",
|
|
74
|
+
"aria-label": "Search pages",
|
|
75
|
+
value: j,
|
|
76
|
+
onChange: (e) => V(e.target.value),
|
|
77
|
+
placeholder: x,
|
|
78
|
+
className: "text-text-primary placeholder:text-text-placeholder h-11 flex-1 bg-transparent text-sm focus:outline-none"
|
|
79
|
+
}),
|
|
80
|
+
/* @__PURE__ */ m("kbd", {
|
|
81
|
+
className: "text-2xs bg-bg-tertiary text-text-tertiary border-border hidden items-center rounded border px-1.5 py-0.5 font-mono font-medium sm:inline-flex",
|
|
82
|
+
children: "Esc"
|
|
83
|
+
})
|
|
84
|
+
]
|
|
85
|
+
}), /* @__PURE__ */ m("ul", {
|
|
86
|
+
id: R,
|
|
87
|
+
role: "listbox",
|
|
88
|
+
"aria-label": "Pages",
|
|
89
|
+
className: "max-h-[320px] overflow-y-auto px-2 py-2",
|
|
90
|
+
children: z.length === 0 ? /* @__PURE__ */ m("li", {
|
|
91
|
+
className: "text-text-tertiary px-3 py-6 text-center text-xs",
|
|
92
|
+
children: S
|
|
93
|
+
}) : z.map((t, n) => /* @__PURE__ */ h("li", {
|
|
94
|
+
id: `${R}-${n}`,
|
|
95
|
+
role: "option",
|
|
96
|
+
"aria-selected": n === N,
|
|
97
|
+
onClick: () => H(t),
|
|
98
|
+
className: e("flex h-9 w-full cursor-pointer items-center gap-3 rounded-md px-3 text-left", "transition-colors duration-[100ms]", n === N ? "bg-accent-muted text-accent-fg" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
|
|
99
|
+
children: [
|
|
100
|
+
/* @__PURE__ */ m("span", {
|
|
101
|
+
className: "shrink-0 opacity-60",
|
|
102
|
+
children: /* @__PURE__ */ m(t.icon, { className: "h-4 w-4" })
|
|
103
|
+
}),
|
|
104
|
+
/* @__PURE__ */ m("span", {
|
|
105
|
+
className: "min-w-0 flex-1 text-xs font-medium",
|
|
106
|
+
children: t.label
|
|
107
|
+
}),
|
|
108
|
+
t.badge && /* @__PURE__ */ m("span", {
|
|
109
|
+
className: "shrink-0",
|
|
110
|
+
children: t.badge
|
|
111
|
+
})
|
|
112
|
+
]
|
|
113
|
+
}, t.path))
|
|
114
|
+
})]
|
|
115
|
+
})]
|
|
116
|
+
}) : null;
|
|
117
|
+
}
|
|
118
|
+
//#endregion
|
|
119
|
+
export { v as CommandPalette };
|
|
@@ -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 { AppShellBrand, AppShellNavItem, AppShellTopBarNavItem } from "./types";
|
|
4
|
-
export interface MobileDrawerProps {
|
|
4
|
+
export interface MobileDrawerProps extends Omit<ComponentPropsWithRef<"div">, "children"> {
|
|
5
5
|
/** Whether the drawer is shown. It renders nothing when `false`. Hidden at the `md` breakpoint and above. */
|
|
6
6
|
open: boolean;
|
|
7
7
|
/**
|
|
@@ -43,5 +43,4 @@ export interface MobileDrawerProps {
|
|
|
43
43
|
/** Additional utility classes for the drawer panel. */
|
|
44
44
|
className?: string;
|
|
45
45
|
}
|
|
46
|
-
export declare function MobileDrawer({ open, onClose, items, topBarNavItems, topBarNavLabel, brand, currentPath, onNavigate, headerActions, className, }: MobileDrawerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
47
|
-
//# sourceMappingURL=MobileDrawer.d.ts.map
|
|
46
|
+
export declare function MobileDrawer({ open, onClose, items, topBarNavItems, topBarNavLabel, brand, currentPath, onNavigate, headerActions, className, ref, ...rest }: MobileDrawerProps): import("react/jsx-runtime").JSX.Element | null;
|