@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,206 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/cn.js";
|
|
2
|
+
import { mergeRefs as t } from "../../lib/mergeRefs.js";
|
|
3
|
+
import { useControllableState as n } from "../../hooks/useControllableState.js";
|
|
4
|
+
import { usePopover as r } from "../../hooks/usePopover.js";
|
|
5
|
+
import { findTypeaheadMatch as i, isTypeaheadKey as a } from "../../lib/typeahead.js";
|
|
6
|
+
import { useTypeahead as o } from "../../hooks/useTypeahead.js";
|
|
7
|
+
import { FieldContext as s } from "./FieldContext.js";
|
|
8
|
+
import { useContext as ee, useEffect as c, useMemo as te, useRef as l, useState as ne } from "react";
|
|
9
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
10
|
+
import { Check as f, ChevronDown as re } from "lucide-react";
|
|
11
|
+
//#region src/components/ui/SelectDropdown.tsx
|
|
12
|
+
function ie(e) {
|
|
13
|
+
let t = 0;
|
|
14
|
+
return e.map((e) => {
|
|
15
|
+
let n = t;
|
|
16
|
+
return t += "options" in e ? e.options.length : 1, {
|
|
17
|
+
entry: e,
|
|
18
|
+
firstIndex: n
|
|
19
|
+
};
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function p({ options: p, value: m, defaultValue: h = null, onValueChange: g, label: _, labelPlacement: v = "above", placeholder: y = "Select...", className: b, size: x = "md", disabled: S = !1, ref: C, ...w }) {
|
|
23
|
+
let T = ee(s), [E, D] = n({
|
|
24
|
+
value: m,
|
|
25
|
+
defaultValue: h,
|
|
26
|
+
onChange: (e) => g?.(e)
|
|
27
|
+
}), O = v === "placeholder" && _ ? _ : _ ? void 0 : T?.placeholderLabel, k = p.flatMap((e) => "options" in e ? e.options : [e]), [A, j] = ne(-1), { open: M, show: ae, close: N, rootRef: P, anchorRef: oe, triggerRef: se, popupRef: F, labelId: I, popupId: L, triggerAria: R } = r({
|
|
28
|
+
haspopup: "listbox",
|
|
29
|
+
matchWidth: !0,
|
|
30
|
+
labelled: !!_,
|
|
31
|
+
disabled: S
|
|
32
|
+
}), z = te(() => t(C, P), [C, P]), B = o(), V = l(!1), H = l(!1), U = (e) => `${L}-option-${e}`, W = !_ && T?.id ? T.labelId : void 0, G = T?.claimLabel;
|
|
33
|
+
c(() => {
|
|
34
|
+
if (W && G) return G();
|
|
35
|
+
}, [W, G]), c(() => {
|
|
36
|
+
S && N("disabled");
|
|
37
|
+
}, [
|
|
38
|
+
S,
|
|
39
|
+
M,
|
|
40
|
+
N
|
|
41
|
+
]);
|
|
42
|
+
let K = O && !E ? void 0 : k.find((e) => e.value === E), q = l(!1);
|
|
43
|
+
c(() => {
|
|
44
|
+
q.current && !M && B.clear(), q.current = M;
|
|
45
|
+
}), c(() => {
|
|
46
|
+
!M || !V.current || (V.current = !1, document.getElementById(U(A))?.scrollIntoView({ block: "nearest" }));
|
|
47
|
+
});
|
|
48
|
+
function J() {
|
|
49
|
+
let e = k.findIndex((e) => e.value === E);
|
|
50
|
+
B.clear(), X(e >= 0 && !k[e].disabled ? e : Q(1)), ae();
|
|
51
|
+
}
|
|
52
|
+
function Y(e) {
|
|
53
|
+
S || e.disabled || (D(e.value), N("select"));
|
|
54
|
+
}
|
|
55
|
+
function ce(e) {
|
|
56
|
+
S || H.current && (H.current = !1, e.detail === 0) || (M ? N("toggle") : J());
|
|
57
|
+
}
|
|
58
|
+
function X(e) {
|
|
59
|
+
V.current = !0, j(e);
|
|
60
|
+
}
|
|
61
|
+
function Z(e, t) {
|
|
62
|
+
for (let n = e + t; n >= 0 && n < k.length; n += t) if (!k[n].disabled) return n;
|
|
63
|
+
return e;
|
|
64
|
+
}
|
|
65
|
+
function Q(e) {
|
|
66
|
+
let t = Z(e === 1 ? -1 : k.length, e);
|
|
67
|
+
return t >= 0 && t < k.length ? t : -1;
|
|
68
|
+
}
|
|
69
|
+
function le(e) {
|
|
70
|
+
e.preventDefault();
|
|
71
|
+
let t = B.push(e.key), n = k.map((e) => e.label), r = (e) => !!k[e].disabled;
|
|
72
|
+
if (M) {
|
|
73
|
+
let e = i(n, r, A, t);
|
|
74
|
+
e !== -1 && X(e);
|
|
75
|
+
} else {
|
|
76
|
+
let e = i(n, r, k.findIndex((e) => e.value === E), t);
|
|
77
|
+
e !== -1 && k[e].value !== E && D(k[e].value);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
function ue(e) {
|
|
81
|
+
e.key === " " && H.current && e.preventDefault();
|
|
82
|
+
}
|
|
83
|
+
function de(e) {
|
|
84
|
+
if (!S) {
|
|
85
|
+
if (H.current = !1, e.key === " " && (M || B.active()) && (H.current = !0), a(e) && (e.key !== " " || B.active())) {
|
|
86
|
+
le(e);
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (!M) {
|
|
90
|
+
(e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), J());
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
switch (e.key) {
|
|
94
|
+
case "ArrowDown":
|
|
95
|
+
e.preventDefault(), X(Z(A, 1));
|
|
96
|
+
break;
|
|
97
|
+
case "ArrowUp":
|
|
98
|
+
e.preventDefault(), X(Z(A, -1));
|
|
99
|
+
break;
|
|
100
|
+
case "Home":
|
|
101
|
+
e.preventDefault();
|
|
102
|
+
{
|
|
103
|
+
let e = Q(1);
|
|
104
|
+
e !== -1 && X(e);
|
|
105
|
+
}
|
|
106
|
+
break;
|
|
107
|
+
case "End":
|
|
108
|
+
e.preventDefault();
|
|
109
|
+
{
|
|
110
|
+
let e = Q(-1);
|
|
111
|
+
e !== -1 && X(e);
|
|
112
|
+
}
|
|
113
|
+
break;
|
|
114
|
+
case "Enter":
|
|
115
|
+
case " ": {
|
|
116
|
+
e.preventDefault();
|
|
117
|
+
let t = k[A];
|
|
118
|
+
t && !t.disabled && Y(t);
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
case "Escape":
|
|
122
|
+
e.preventDefault(), N("escape");
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
function $(t, n) {
|
|
128
|
+
return /* @__PURE__ */ d("li", {
|
|
129
|
+
id: U(n),
|
|
130
|
+
role: "option",
|
|
131
|
+
"aria-selected": t.value === E,
|
|
132
|
+
"aria-disabled": t.disabled || void 0,
|
|
133
|
+
onClick: () => {
|
|
134
|
+
t.disabled || Y(t);
|
|
135
|
+
},
|
|
136
|
+
onMouseEnter: () => {
|
|
137
|
+
t.disabled || j(n);
|
|
138
|
+
},
|
|
139
|
+
className: e("font-control flex h-7 w-full items-center gap-2 px-3 text-xs", !t.disabled && "cursor-pointer", "transition-colors duration-[100ms]", t.disabled ? "text-text-disabled cursor-not-allowed" : n === A ? "bg-accent-muted text-accent-fg" : t.value === E ? "text-accent-fg" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
|
|
140
|
+
children: [/* @__PURE__ */ u("span", {
|
|
141
|
+
className: "flex-1 truncate",
|
|
142
|
+
children: t.label
|
|
143
|
+
}), t.value === E && /* @__PURE__ */ u(f, { className: "h-3 w-3 shrink-0" })]
|
|
144
|
+
}, t.value);
|
|
145
|
+
}
|
|
146
|
+
let fe = ie(p);
|
|
147
|
+
return /* @__PURE__ */ d("div", {
|
|
148
|
+
...w,
|
|
149
|
+
className: e("flex flex-col gap-1.5", b),
|
|
150
|
+
ref: z,
|
|
151
|
+
children: [_ && /* @__PURE__ */ u("span", {
|
|
152
|
+
id: I,
|
|
153
|
+
className: e("ui-field-label font-label text-xs font-medium", v === "placeholder" && "sr-only"),
|
|
154
|
+
children: _
|
|
155
|
+
}), /* @__PURE__ */ d("div", {
|
|
156
|
+
className: "relative",
|
|
157
|
+
ref: oe,
|
|
158
|
+
children: [
|
|
159
|
+
/* @__PURE__ */ u("button", {
|
|
160
|
+
type: "button",
|
|
161
|
+
disabled: S,
|
|
162
|
+
onClick: ce,
|
|
163
|
+
onKeyDown: de,
|
|
164
|
+
onKeyUp: ue,
|
|
165
|
+
ref: se,
|
|
166
|
+
...R,
|
|
167
|
+
id: T?.id ?? R.id,
|
|
168
|
+
"aria-labelledby": _ && T?.id ? `${I} ${T.id}` : W && G ? `${W} ${T?.id}` : R["aria-labelledby"],
|
|
169
|
+
"aria-describedby": T?.describedBy,
|
|
170
|
+
"aria-invalid": T?.invalid || void 0,
|
|
171
|
+
"aria-activedescendant": M && A >= 0 && k[A] && !k[A].disabled ? U(A) : void 0,
|
|
172
|
+
className: e("font-control flex w-full cursor-pointer items-center rounded-md text-xs", "bg-bg-secondary border-border text-text-primary border", "transition-colors duration-[100ms]", "focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-2", x === "sm" ? "h-6 px-2 pr-6" : "h-7 px-2 pr-7", S ? "cursor-not-allowed opacity-40" : "hover:bg-bg-hover hover:border-border-strong"),
|
|
173
|
+
children: K ? K.label : /* @__PURE__ */ u("span", {
|
|
174
|
+
className: "text-text-placeholder",
|
|
175
|
+
"aria-hidden": O ? !0 : void 0,
|
|
176
|
+
children: O ?? y
|
|
177
|
+
})
|
|
178
|
+
}),
|
|
179
|
+
/* @__PURE__ */ u(re, { className: e("text-text-tertiary pointer-events-none absolute top-1/2 h-3 w-3 -translate-y-1/2 transition-transform", x === "sm" ? "right-1.5" : "right-2", M && "rotate-180") }),
|
|
180
|
+
M && !S && /* @__PURE__ */ u("div", {
|
|
181
|
+
ref: F,
|
|
182
|
+
className: e("ui-glass ui-glass-popover bg-bg-tertiary border-border-strong animate-scale-in fixed top-0 left-0 z-[100] rounded-md border shadow-lg", "overflow-hidden"),
|
|
183
|
+
children: /* @__PURE__ */ u("ul", {
|
|
184
|
+
id: L,
|
|
185
|
+
className: "max-h-48 overflow-y-auto py-1",
|
|
186
|
+
role: "listbox",
|
|
187
|
+
children: fe.map(({ entry: e, firstIndex: t }, n) => "options" in e ? /* @__PURE__ */ d("li", {
|
|
188
|
+
role: "group",
|
|
189
|
+
"aria-label": e.label,
|
|
190
|
+
children: [/* @__PURE__ */ u("div", {
|
|
191
|
+
"aria-hidden": "true",
|
|
192
|
+
className: "text-text-tertiary px-3 py-1 text-2xs font-medium",
|
|
193
|
+
children: e.label
|
|
194
|
+
}), /* @__PURE__ */ u("ul", {
|
|
195
|
+
role: "presentation",
|
|
196
|
+
children: e.options.map((e, n) => $(e, t + n))
|
|
197
|
+
})]
|
|
198
|
+
}, `group-${n}`) : $(e, t))
|
|
199
|
+
})
|
|
200
|
+
})
|
|
201
|
+
]
|
|
202
|
+
})]
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
//#endregion
|
|
206
|
+
export { p as SelectDropdown };
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* <SettingRow
|
|
11
11
|
* label="Reduced Motion"
|
|
12
12
|
* description="Disable animations and transitions"
|
|
13
|
-
* action={<Toggle checked={reducedMotion}
|
|
13
|
+
* action={<Toggle checked={reducedMotion} onCheckedChange={setReducedMotion} />}
|
|
14
14
|
* />
|
|
15
15
|
* ```
|
|
16
16
|
*
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
* <SettingRow
|
|
20
20
|
* label="Language"
|
|
21
21
|
* description="Choose your preferred language"
|
|
22
|
-
* action={<SelectDropdown value={lang}
|
|
22
|
+
* action={<SelectDropdown value={lang} onValueChange={setLang} options={langs} />}
|
|
23
23
|
* />
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
|
-
import type { ReactNode } from "react";
|
|
27
|
-
interface SettingRowProps {
|
|
26
|
+
import type { ComponentPropsWithRef, ReactNode } from "react";
|
|
27
|
+
export interface SettingRowProps extends Omit<ComponentPropsWithRef<"div">, "children"> {
|
|
28
28
|
/** The setting name displayed as a small, medium-weight label. */
|
|
29
29
|
label: string;
|
|
30
30
|
/** A brief description shown below the label in a muted style. */
|
|
@@ -37,6 +37,4 @@ interface SettingRowProps {
|
|
|
37
37
|
/** Additional utility classes appended to the root container. */
|
|
38
38
|
className?: string;
|
|
39
39
|
}
|
|
40
|
-
export declare function SettingRow({ label, description, action, className, }: SettingRowProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
-
export {};
|
|
42
|
-
//# sourceMappingURL=SettingRow.d.ts.map
|
|
40
|
+
export declare function SettingRow({ label, description, action, className, ref, ...rest }: SettingRowProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
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/ui/SettingRow.tsx
|
|
4
|
+
function r({ label: r, description: i, action: a, className: o, ref: s, ...c }) {
|
|
5
|
+
return /* @__PURE__ */ n("div", {
|
|
6
|
+
ref: s,
|
|
7
|
+
...c,
|
|
8
|
+
className: e("border-border flex items-center justify-between border-b py-3", o),
|
|
9
|
+
children: [/* @__PURE__ */ n("div", {
|
|
10
|
+
className: "min-w-0 flex-1 pr-4",
|
|
11
|
+
children: [/* @__PURE__ */ t("p", {
|
|
12
|
+
className: "text-text-primary font-label text-xs font-medium",
|
|
13
|
+
children: r
|
|
14
|
+
}), i && /* @__PURE__ */ t("p", {
|
|
15
|
+
className: "text-2xs text-text-tertiary font-label mt-0.5",
|
|
16
|
+
children: i
|
|
17
|
+
})]
|
|
18
|
+
}), /* @__PURE__ */ t("div", {
|
|
19
|
+
className: "shrink-0",
|
|
20
|
+
children: a
|
|
21
|
+
})]
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { r as SettingRow };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
2
|
-
export interface SideSheetProps {
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from "react";
|
|
2
|
+
export interface SideSheetProps extends Omit<ComponentPropsWithRef<"div">, "title" | "children"> {
|
|
3
3
|
/** Whether the sheet is shown. It renders nothing when `false`. */
|
|
4
4
|
open: boolean;
|
|
5
5
|
/**
|
|
@@ -31,5 +31,4 @@ export interface SideSheetProps {
|
|
|
31
31
|
/** Additional utility classes for the scrolling body. */
|
|
32
32
|
contentClassName?: string;
|
|
33
33
|
}
|
|
34
|
-
export declare function SideSheet({ open, onClose, title, children, footer, side, widthClassName, resizable, className, contentClassName, }: SideSheetProps): import("react").ReactPortal | null;
|
|
35
|
-
//# sourceMappingURL=SideSheet.d.ts.map
|
|
34
|
+
export declare function SideSheet({ open, onClose, title, children, footer, side, widthClassName, resizable, className, contentClassName, ref, style, id, ...rest }: SideSheetProps): import("react").ReactPortal | null;
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/cn.js";
|
|
2
|
+
import { mergeRefs as t } from "../../lib/mergeRefs.js";
|
|
3
|
+
import { useFocusTrap as n } from "../../hooks/useFocusTrap.js";
|
|
4
|
+
import { OverlayContext as r, useBodyScrollLock as i, useOverlayEscape as a } from "../../hooks/useOverlayStack.js";
|
|
5
|
+
import { PortalContainerContext as o, usePortalContainerRef as s } from "../../hooks/usePortalContainer.js";
|
|
6
|
+
import { useControlSize as c } from "../../providers/ControlSizeContext.js";
|
|
7
|
+
import { Button as l } from "./Button.js";
|
|
8
|
+
import { panelResizeKey as u } from "../../lib/panelResize.js";
|
|
9
|
+
import { useCallback as d, useEffect as f, useId as p, useMemo as m, useRef as h, useState as g } from "react";
|
|
10
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
11
|
+
import { X as y } from "lucide-react";
|
|
12
|
+
import { createPortal as b } from "react-dom";
|
|
13
|
+
//#region src/components/ui/SideSheet.tsx
|
|
14
|
+
function x({ open: u, onClose: d, title: f, children: g, footer: x, side: S = "right", widthClassName: C = "w-[360px]", resizable: w = !1, className: T, contentClassName: D, ref: O, style: k, id: A, ...j }) {
|
|
15
|
+
let M = p(), N = c(), P = h(null), [F, I] = s(P), L = m(() => t(O, I), [O, I]);
|
|
16
|
+
n(P, u);
|
|
17
|
+
let R = a(u, () => d());
|
|
18
|
+
return i(u), u ? b(/* @__PURE__ */ _(r.Provider, {
|
|
19
|
+
value: R,
|
|
20
|
+
children: /* @__PURE__ */ _(o.Provider, {
|
|
21
|
+
value: F,
|
|
22
|
+
children: /* @__PURE__ */ v("div", {
|
|
23
|
+
className: "fixed inset-0 z-50",
|
|
24
|
+
children: [/* @__PURE__ */ _("div", {
|
|
25
|
+
className: "bg-bg-overlay animate-fade-in absolute inset-0",
|
|
26
|
+
onClick: d
|
|
27
|
+
}), /* @__PURE__ */ v("div", {
|
|
28
|
+
...j,
|
|
29
|
+
ref: L,
|
|
30
|
+
id: A ?? (w ? M : void 0),
|
|
31
|
+
className: e("ui-glass bg-bg-secondary border-border absolute inset-y-0 flex flex-col shadow-lg", C, S === "right" ? "animate-slide-in-right right-0 border-l" : "animate-slide-in-left left-0 border-r", T),
|
|
32
|
+
style: {
|
|
33
|
+
maxWidth: "calc(100vw - 2rem)",
|
|
34
|
+
...k
|
|
35
|
+
},
|
|
36
|
+
role: "dialog",
|
|
37
|
+
"aria-modal": "true",
|
|
38
|
+
"aria-label": typeof f == "string" ? f : "Panel",
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ v("div", {
|
|
41
|
+
"data-control-size": N,
|
|
42
|
+
className: "ui-bar border-border flex shrink-0 items-center justify-between gap-2 border-b px-3 py-2.5",
|
|
43
|
+
children: [f && /* @__PURE__ */ _("h3", {
|
|
44
|
+
className: "text-text-primary truncate text-sm font-medium",
|
|
45
|
+
children: f
|
|
46
|
+
}), /* @__PURE__ */ _(l, {
|
|
47
|
+
type: "button",
|
|
48
|
+
variant: "icon",
|
|
49
|
+
size: "sm",
|
|
50
|
+
onClick: d,
|
|
51
|
+
className: "ml-auto shrink-0",
|
|
52
|
+
"aria-label": "Close",
|
|
53
|
+
children: /* @__PURE__ */ _(y, { className: "h-4 w-4" })
|
|
54
|
+
})]
|
|
55
|
+
}),
|
|
56
|
+
/* @__PURE__ */ _("div", {
|
|
57
|
+
className: e("ui-surface-body flex-1 overflow-y-auto p-3", D),
|
|
58
|
+
children: g
|
|
59
|
+
}),
|
|
60
|
+
x && /* @__PURE__ */ _("div", {
|
|
61
|
+
"data-control-size": N,
|
|
62
|
+
className: "ui-bar border-border bg-bg-primary/50 flex shrink-0 items-center gap-2 border-t px-3 py-2.5",
|
|
63
|
+
children: x
|
|
64
|
+
}),
|
|
65
|
+
w && F && /* @__PURE__ */ _(E, {
|
|
66
|
+
sheet: F,
|
|
67
|
+
side: S
|
|
68
|
+
})
|
|
69
|
+
]
|
|
70
|
+
})]
|
|
71
|
+
})
|
|
72
|
+
})
|
|
73
|
+
}), document.body) : null;
|
|
74
|
+
}
|
|
75
|
+
function S(e, t) {
|
|
76
|
+
e.style.width = t === null ? "" : `${t}px`;
|
|
77
|
+
}
|
|
78
|
+
function C(e) {
|
|
79
|
+
let t = e.ownerDocument.body, n = t.style.userSelect, r = t.style.cursor;
|
|
80
|
+
return t.style.userSelect = "none", t.style.cursor = "col-resize", () => {
|
|
81
|
+
t.style.userSelect = n, t.style.cursor = r;
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
function w(e) {
|
|
85
|
+
let t = e.style.width;
|
|
86
|
+
S(e, null);
|
|
87
|
+
let n = e.getBoundingClientRect().width;
|
|
88
|
+
return e.style.width = t, n;
|
|
89
|
+
}
|
|
90
|
+
function T(e) {
|
|
91
|
+
let t = e.ownerDocument.defaultView, n = parseFloat(t.getComputedStyle(e.ownerDocument.documentElement).fontSize);
|
|
92
|
+
return Math.max(0, t.innerWidth - 2 * n);
|
|
93
|
+
}
|
|
94
|
+
function E({ sheet: t, side: n }) {
|
|
95
|
+
let r = t.ownerDocument.defaultView, [i, a] = g(() => ({
|
|
96
|
+
width: t.getBoundingClientRect().width,
|
|
97
|
+
min: t.getBoundingClientRect().width,
|
|
98
|
+
max: T(t),
|
|
99
|
+
desktop: r.innerWidth >= 640
|
|
100
|
+
})), o = h(null), s = h(null), c = h(null);
|
|
101
|
+
function l() {
|
|
102
|
+
s.current = null, c.current?.(), c.current = null;
|
|
103
|
+
}
|
|
104
|
+
let p = d((e) => {
|
|
105
|
+
let n = T(t), i = Math.min(w(t), n), s = r.innerWidth >= 640;
|
|
106
|
+
o.current = s && e !== null ? Math.min(n, Math.max(i, e)) : null, o.current !== null && o.current <= i && (o.current = null), S(t, o.current), a({
|
|
107
|
+
width: t.getBoundingClientRect().width,
|
|
108
|
+
min: i,
|
|
109
|
+
max: n,
|
|
110
|
+
desktop: s
|
|
111
|
+
});
|
|
112
|
+
}, [t, r]);
|
|
113
|
+
return f(() => {
|
|
114
|
+
let e = () => {
|
|
115
|
+
l(), p(o.current);
|
|
116
|
+
}, n = new ResizeObserver(() => p(o.current));
|
|
117
|
+
return n.observe(t), r.addEventListener("resize", e), () => {
|
|
118
|
+
n.disconnect(), r.removeEventListener("resize", e), l(), S(t, null);
|
|
119
|
+
};
|
|
120
|
+
}, [
|
|
121
|
+
p,
|
|
122
|
+
t,
|
|
123
|
+
r
|
|
124
|
+
]), i.desktop ? /* @__PURE__ */ _("div", {
|
|
125
|
+
role: "separator",
|
|
126
|
+
tabIndex: 0,
|
|
127
|
+
"aria-orientation": "vertical",
|
|
128
|
+
"aria-label": "Resize panel",
|
|
129
|
+
"aria-controls": t.id,
|
|
130
|
+
"aria-valuenow": Math.round(i.width),
|
|
131
|
+
"aria-valuemin": Math.round(i.min),
|
|
132
|
+
"aria-valuemax": Math.round(i.max),
|
|
133
|
+
className: e("hover:bg-accent/30 active:bg-accent/50 focus-visible:outline-accent absolute inset-y-0 z-10 w-1 cursor-col-resize select-none focus-visible:outline-2 focus-visible:outline-offset-0", n === "right" ? "left-0" : "right-0"),
|
|
134
|
+
style: { touchAction: "none" },
|
|
135
|
+
onPointerDown: (e) => {
|
|
136
|
+
if (!e.isPrimary || e.button !== 0 || s.current) return;
|
|
137
|
+
e.preventDefault(), e.currentTarget.focus(), e.currentTarget.setPointerCapture(e.pointerId);
|
|
138
|
+
let n = w(t);
|
|
139
|
+
s.current = {
|
|
140
|
+
pointerId: e.pointerId,
|
|
141
|
+
x: e.clientX,
|
|
142
|
+
width: o.current ?? n
|
|
143
|
+
}, c.current = C(t);
|
|
144
|
+
},
|
|
145
|
+
onPointerMove: (e) => {
|
|
146
|
+
let t = s.current;
|
|
147
|
+
!t || t.pointerId !== e.pointerId || p(t.width + (e.clientX - t.x) * (n === "right" ? -1 : 1));
|
|
148
|
+
},
|
|
149
|
+
onPointerUp: (e) => {
|
|
150
|
+
s.current?.pointerId === e.pointerId && (l(), e.currentTarget.releasePointerCapture(e.pointerId));
|
|
151
|
+
},
|
|
152
|
+
onPointerCancel: (e) => {
|
|
153
|
+
s.current?.pointerId === e.pointerId && l();
|
|
154
|
+
},
|
|
155
|
+
onLostPointerCapture: l,
|
|
156
|
+
onDoubleClick: () => p(null),
|
|
157
|
+
onKeyDown: (e) => {
|
|
158
|
+
let r = u(e.key, o.current ?? w(t), 16, n);
|
|
159
|
+
r !== void 0 && (e.preventDefault(), p(r));
|
|
160
|
+
}
|
|
161
|
+
}) : null;
|
|
162
|
+
}
|
|
163
|
+
//#endregion
|
|
164
|
+
export { x as SideSheet };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface SkeletonProps extends
|
|
1
|
+
import type { ComponentPropsWithRef, CSSProperties } from "react";
|
|
2
|
+
export interface SkeletonProps extends ComponentPropsWithRef<"div"> {
|
|
3
3
|
/** CSS width of the placeholder. */
|
|
4
4
|
width?: CSSProperties["width"];
|
|
5
5
|
/** CSS height of the placeholder. */
|
|
6
6
|
height?: CSSProperties["height"];
|
|
7
7
|
}
|
|
8
8
|
/** Decorative placeholder. Label the surrounding loading region and set aria-busy there. */
|
|
9
|
-
export declare function Skeleton({ className, width, height, style, ...props }: SkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
//# sourceMappingURL=Skeleton.d.ts.map
|
|
9
|
+
export declare function Skeleton({ className, width, height, style, ref, ...props }: SkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/cn.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/ui/Skeleton.tsx
|
|
4
|
+
function n({ className: n, width: r, height: i, style: a, ref: o, ...s }) {
|
|
5
|
+
return /* @__PURE__ */ t("div", {
|
|
6
|
+
ref: o,
|
|
7
|
+
...s,
|
|
8
|
+
"aria-hidden": "true",
|
|
9
|
+
className: e("ui-skeleton rounded-md bg-bg-tertiary", n),
|
|
10
|
+
style: {
|
|
11
|
+
width: r,
|
|
12
|
+
height: i,
|
|
13
|
+
...a
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { n as Skeleton };
|
|
@@ -1,19 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
import { type ChangeEventHandler, type ComponentPropsWithRef } from "react";
|
|
2
|
+
export interface SliderProps extends Omit<ComponentPropsWithRef<"div">, "defaultValue" | "children" | "onChange" | "id" | "aria-label" | "aria-labelledby"> {
|
|
2
3
|
/** Lowest selectable value. */
|
|
3
4
|
min: number;
|
|
4
5
|
/** Highest selectable value. Must be greater than `min`. */
|
|
5
6
|
max: number;
|
|
6
7
|
/** Increment between selectable values. Defaults to 1. */
|
|
7
8
|
step?: number;
|
|
8
|
-
/** Current value.
|
|
9
|
-
value
|
|
9
|
+
/** Current value (controlled). Omit to let the slider keep its own value. */
|
|
10
|
+
value?: number;
|
|
11
|
+
/** Initial value when uncontrolled. Defaults to `min`. */
|
|
12
|
+
defaultValue?: number;
|
|
10
13
|
/** Called with the new numeric value on every change while dragging or using the keyboard. */
|
|
11
|
-
|
|
14
|
+
onValueChange?: (value: number) => void;
|
|
15
|
+
/** Native change event of the range input. */
|
|
16
|
+
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
12
17
|
/**
|
|
13
18
|
* Called when the user finishes a change: pointer release, or the key
|
|
14
19
|
* release after a keyboard adjustment (arrows, Home/End, PageUp/PageDown).
|
|
15
20
|
*/
|
|
16
|
-
|
|
21
|
+
onValueCommit?: (value: number) => void;
|
|
17
22
|
/** Visible label, associated with the range input. */
|
|
18
23
|
label?: string;
|
|
19
24
|
/** Accessible name when no visible `label` is rendered. */
|
|
@@ -27,5 +32,4 @@ export interface SliderProps {
|
|
|
27
32
|
/** Additional utility classes for the root element. */
|
|
28
33
|
className?: string;
|
|
29
34
|
}
|
|
30
|
-
export declare function Slider({ min, max, step, value, onChange,
|
|
31
|
-
//# sourceMappingURL=Slider.d.ts.map
|
|
35
|
+
export declare function Slider({ min, max, step, value: valueProp, defaultValue, onValueChange, onChange, onValueCommit, label, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, id, showValue, className, ref, ...rest }: SliderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/cn.js";
|
|
2
|
+
import { useControllableState as t } from "../../hooks/useControllableState.js";
|
|
3
|
+
import { useId as n } from "react";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/ui/Slider.tsx
|
|
6
|
+
var a = new Set([
|
|
7
|
+
"ArrowLeft",
|
|
8
|
+
"ArrowRight",
|
|
9
|
+
"ArrowUp",
|
|
10
|
+
"ArrowDown",
|
|
11
|
+
"Home",
|
|
12
|
+
"End",
|
|
13
|
+
"PageUp",
|
|
14
|
+
"PageDown"
|
|
15
|
+
]);
|
|
16
|
+
function o({ min: o, max: s, step: c = 1, value: l, defaultValue: u, onValueChange: d, onChange: f, onValueCommit: p, label: m, "aria-label": h, "aria-labelledby": g, id: _, showValue: v, className: y, ref: b, ...x }) {
|
|
17
|
+
let [S, C] = t({
|
|
18
|
+
value: l,
|
|
19
|
+
defaultValue: u ?? o,
|
|
20
|
+
onChange: d
|
|
21
|
+
}), w = n(), T = _ ?? w, E = (S - o) / (s - o) * 100;
|
|
22
|
+
return /* @__PURE__ */ i("div", {
|
|
23
|
+
ref: b,
|
|
24
|
+
...x,
|
|
25
|
+
className: e("flex flex-col gap-1.5", y),
|
|
26
|
+
children: [(m || v) && /* @__PURE__ */ i("div", {
|
|
27
|
+
className: "flex items-center justify-between",
|
|
28
|
+
children: [m && /* @__PURE__ */ r("label", {
|
|
29
|
+
htmlFor: T,
|
|
30
|
+
className: "ui-field-label font-label text-xs font-medium",
|
|
31
|
+
children: m
|
|
32
|
+
}), v && /* @__PURE__ */ r("span", {
|
|
33
|
+
className: "text-text-primary font-data text-xs",
|
|
34
|
+
children: S
|
|
35
|
+
})]
|
|
36
|
+
}), /* @__PURE__ */ r("input", {
|
|
37
|
+
id: T,
|
|
38
|
+
type: "range",
|
|
39
|
+
"aria-label": h,
|
|
40
|
+
"aria-labelledby": g,
|
|
41
|
+
min: o,
|
|
42
|
+
max: s,
|
|
43
|
+
step: c,
|
|
44
|
+
value: S,
|
|
45
|
+
onChange: (e) => {
|
|
46
|
+
f?.(e), C(Number(e.target.value));
|
|
47
|
+
},
|
|
48
|
+
onPointerUp: p ? (e) => p(Number(e.target.value)) : void 0,
|
|
49
|
+
onKeyUp: p ? (e) => {
|
|
50
|
+
a.has(e.key) && p(Number(e.target.value));
|
|
51
|
+
} : void 0,
|
|
52
|
+
className: "bg-bg-tertiary [&::-webkit-slider-thumb]:bg-accent h-1.5 w-full cursor-pointer appearance-none rounded-md [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:cursor-pointer [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:shadow-sm [&::-webkit-slider-thumb]:transition-transform [&::-webkit-slider-thumb]:duration-[100ms] [&::-webkit-slider-thumb]:hover:scale-110",
|
|
53
|
+
style: { background: `linear-gradient(to right, var(--accent) ${E}%, var(--bg-tertiary) ${E}%)` }
|
|
54
|
+
})]
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
export { o as Slider };
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
* </SplitPaneLayout>
|
|
37
37
|
* ```
|
|
38
38
|
*/
|
|
39
|
-
import type { ReactNode } from "react";
|
|
40
|
-
interface SplitPaneLayoutProps {
|
|
39
|
+
import type { ComponentPropsWithRef, ReactNode } from "react";
|
|
40
|
+
export interface SplitPaneLayoutProps extends Omit<ComponentPropsWithRef<"div">, "children"> {
|
|
41
41
|
children: ReactNode;
|
|
42
42
|
/**
|
|
43
43
|
* Flex direction of the split.
|
|
@@ -48,8 +48,9 @@ interface SplitPaneLayoutProps {
|
|
|
48
48
|
/** Additional utility classes for the root container. */
|
|
49
49
|
className?: string;
|
|
50
50
|
}
|
|
51
|
-
declare function SplitPaneLayoutRoot({ children, direction, className, }: SplitPaneLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
52
|
-
|
|
51
|
+
declare function SplitPaneLayoutRoot({ children, direction, className, ref, ...rest }: SplitPaneLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
/** Props for SplitPaneLayout.Main. */
|
|
53
|
+
export interface SplitPaneLayoutMainProps extends Omit<ComponentPropsWithRef<"div">, "children"> {
|
|
53
54
|
children: ReactNode;
|
|
54
55
|
/** Additional utility classes. */
|
|
55
56
|
className?: string;
|
|
@@ -59,7 +60,7 @@ interface MainProps {
|
|
|
59
60
|
* Prevents flex children from expanding beyond available space
|
|
60
61
|
* via min-w-0 and min-h-0.
|
|
61
62
|
*/
|
|
62
|
-
declare function Main({ children, className }:
|
|
63
|
+
declare function Main({ children, className, ref, ...rest }: SplitPaneLayoutMainProps): import("react/jsx-runtime").JSX.Element;
|
|
63
64
|
/**
|
|
64
65
|
* Attach sub-components so consumers can write:
|
|
65
66
|
* <SplitPaneLayout>
|
|
@@ -70,4 +71,3 @@ export declare const SplitPaneLayout: typeof SplitPaneLayoutRoot & {
|
|
|
70
71
|
Main: typeof Main;
|
|
71
72
|
};
|
|
72
73
|
export {};
|
|
73
|
-
//# sourceMappingURL=SplitPaneLayout.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/cn.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/ui/SplitPaneLayout.tsx
|
|
4
|
+
function n({ children: n, direction: r = "row", className: i, ref: a, ...o }) {
|
|
5
|
+
return /* @__PURE__ */ t("div", {
|
|
6
|
+
ref: a,
|
|
7
|
+
...o,
|
|
8
|
+
className: e("-m-4 md:-m-6", "flex h-[calc(100vh-var(--topbar-height)-var(--bottomnav-height))] gap-0 md:h-[calc(100vh-var(--topbar-height))]", r === "column" && "flex-col", i),
|
|
9
|
+
children: n
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function r({ children: n, className: r, ref: i, ...a }) {
|
|
13
|
+
return /* @__PURE__ */ t("div", {
|
|
14
|
+
ref: i,
|
|
15
|
+
...a,
|
|
16
|
+
className: e("flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden", r),
|
|
17
|
+
children: n
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
var i = /*#__PURE__*/ Object.assign(n, { Main: r });
|
|
21
|
+
//#endregion
|
|
22
|
+
export { i as SplitPaneLayout };
|
|
@@ -8,8 +8,7 @@ export interface StackOptions {
|
|
|
8
8
|
justify?: LayoutJustify;
|
|
9
9
|
}
|
|
10
10
|
export type StackProps<E extends LayoutElement = "div"> = LayoutProps<E, StackOptions>;
|
|
11
|
-
export declare function Stack<E extends LayoutElement = "div">({ as, gap, align, justify, className, style, ...props }: StackProps<E>): import("react").DetailedReactHTMLElement<Omit<StackProps<E>, "
|
|
11
|
+
export declare function Stack<E extends LayoutElement = "div">({ as, gap, align, justify, className, style, ...props }: StackProps<E>): import("react").DetailedReactHTMLElement<Omit<StackProps<E>, "style" | "className" | "gap" | "justify" | "align" | "as"> & {
|
|
12
12
|
className: string;
|
|
13
13
|
style: LayoutStyle;
|
|
14
14
|
}, HTMLElement>;
|
|
15
|
-
//# sourceMappingURL=Stack.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/cn.js";
|
|
2
|
+
import { flexAlign as t, flexJustify as n, spacingStyle as r } from "../../lib/layout.js";
|
|
3
|
+
import { createElement as i } from "react";
|
|
4
|
+
//#region src/components/ui/Stack.tsx
|
|
5
|
+
function a({ as: a, gap: o = 0, align: s = "stretch", justify: c = "start", className: l, style: u, ...d }) {
|
|
6
|
+
return i(a ?? "div", {
|
|
7
|
+
...d,
|
|
8
|
+
className: e("ui-stack", l),
|
|
9
|
+
style: {
|
|
10
|
+
...r(o),
|
|
11
|
+
"--ui-align": t(s),
|
|
12
|
+
"--ui-justify": n(c),
|
|
13
|
+
...u
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { a as Stack };
|