@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
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
1
2
|
type Status = "active" | "inactive" | "pending" | "error";
|
|
2
|
-
interface StatusDotProps {
|
|
3
|
+
export interface StatusDotProps extends Omit<ComponentPropsWithRef<"span">, "children"> {
|
|
3
4
|
/**
|
|
4
5
|
* Which state the dot shows: `active` (green), `inactive` (gray), `pending`
|
|
5
6
|
* (yellow, gently pulsing) or `error` (red). Resolved through the shared tone
|
|
@@ -13,6 +14,5 @@ interface StatusDotProps {
|
|
|
13
14
|
/** Show an animated ring around the dot. */
|
|
14
15
|
pulse?: boolean;
|
|
15
16
|
}
|
|
16
|
-
export declare function StatusDot({ status, label, className, pulse, }: StatusDotProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function StatusDot({ status, label, className, pulse, ref, ...rest }: StatusDotProps): import("react/jsx-runtime").JSX.Element;
|
|
17
18
|
export {};
|
|
18
|
-
//# sourceMappingURL=StatusDot.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/cn.js";
|
|
2
|
+
import { toneClasses as t } from "../../lib/tones.js";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/ui/StatusDot.tsx
|
|
5
|
+
var i = {
|
|
6
|
+
active: "success",
|
|
7
|
+
inactive: "neutral",
|
|
8
|
+
pending: "warning",
|
|
9
|
+
error: "danger"
|
|
10
|
+
};
|
|
11
|
+
function a({ status: a, label: o, className: s, pulse: c = !1, ref: l, ...u }) {
|
|
12
|
+
let d = t(i[a]);
|
|
13
|
+
return /* @__PURE__ */ r("span", {
|
|
14
|
+
ref: l,
|
|
15
|
+
...u,
|
|
16
|
+
className: e("inline-flex items-center gap-1.5", s),
|
|
17
|
+
children: [/* @__PURE__ */ n("span", { className: e("h-2 w-2 rounded-full", d.dot, c ? e("status-dot-pulse relative", d.text) : a === "pending" && "animate-pulse-subtle") }), o && /* @__PURE__ */ n("span", {
|
|
18
|
+
className: e("text-xs", d.text),
|
|
19
|
+
children: o
|
|
20
|
+
})]
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { a as StatusDot };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
export interface StepProgressProps extends Omit<ComponentPropsWithRef<"div">, "children"> {
|
|
2
3
|
/** Ordered steps; `label` shows under each circle (sm and up) with an optional `description` beneath. */
|
|
3
4
|
steps: {
|
|
4
5
|
label: string;
|
|
@@ -9,5 +10,4 @@ export interface StepProgressProps {
|
|
|
9
10
|
/** Extra classes for the root element. */
|
|
10
11
|
className?: string;
|
|
11
12
|
}
|
|
12
|
-
export declare function StepProgress({ steps, currentStep, className, }: StepProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
//# sourceMappingURL=StepProgress.d.ts.map
|
|
13
|
+
export declare function StepProgress({ steps, currentStep, className, ref, ...rest }: StepProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/cn.js";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
import { Check as r } from "lucide-react";
|
|
4
|
+
//#region src/components/ui/StepProgress.tsx
|
|
5
|
+
function i({ steps: i, currentStep: a, className: o, ref: s, ...c }) {
|
|
6
|
+
return /* @__PURE__ */ t("div", {
|
|
7
|
+
ref: s,
|
|
8
|
+
...c,
|
|
9
|
+
className: e("flex items-center justify-between", o),
|
|
10
|
+
children: i.map((o, s) => /* @__PURE__ */ n("div", {
|
|
11
|
+
className: e("flex items-center", s < i.length - 1 && "flex-1"),
|
|
12
|
+
children: [/* @__PURE__ */ n("div", {
|
|
13
|
+
className: "flex flex-col items-center",
|
|
14
|
+
children: [
|
|
15
|
+
/* @__PURE__ */ t("div", {
|
|
16
|
+
className: e("flex h-8 w-8 items-center justify-center rounded-full text-xs", s < a && "bg-accent text-text-on-accent", s === a && "border-accent text-accent-fg border-2 font-semibold", s > a && "bg-bg-tertiary border-border text-text-tertiary border"),
|
|
17
|
+
children: s < a ? /* @__PURE__ */ t(r, { className: "h-4 w-4" }) : s + 1
|
|
18
|
+
}),
|
|
19
|
+
/* @__PURE__ */ t("span", {
|
|
20
|
+
className: e("text-2xs mt-1.5 hidden sm:block", s === a && "text-accent-fg", s < a && "text-text-primary", s > a && "text-text-tertiary"),
|
|
21
|
+
children: o.label
|
|
22
|
+
}),
|
|
23
|
+
o.description && /* @__PURE__ */ t("span", {
|
|
24
|
+
className: "text-2xs text-text-secondary mt-0.5 hidden sm:block",
|
|
25
|
+
children: o.description
|
|
26
|
+
})
|
|
27
|
+
]
|
|
28
|
+
}), s < i.length - 1 && /* @__PURE__ */ t("div", { className: e("mx-2 h-0.5 flex-1", s < a ? "bg-accent" : "bg-border") })]
|
|
29
|
+
}, o.label))
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { i as StepProgress };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from "react";
|
|
2
2
|
export interface Tab {
|
|
3
3
|
key: string;
|
|
4
4
|
label: string;
|
|
@@ -10,19 +10,18 @@ export interface Tab {
|
|
|
10
10
|
/** Spoken description of the count, such as "12 messages". */
|
|
11
11
|
countLabel?: string;
|
|
12
12
|
}
|
|
13
|
-
export interface TabsProps {
|
|
13
|
+
export interface TabsProps extends Omit<ComponentPropsWithRef<"div">, "defaultValue" | "children" | "onChange"> {
|
|
14
14
|
/** Tabs to render; `key` identifies the tab, `label` is its button text, `content` shows when active. */
|
|
15
15
|
tabs: Tab[];
|
|
16
16
|
/** Key of the initially active tab when uncontrolled; falls back to the first tab. */
|
|
17
|
-
|
|
17
|
+
defaultValue?: string;
|
|
18
18
|
/** Controlled active tab key. When set, the parent owns the state. */
|
|
19
19
|
value?: string;
|
|
20
20
|
/** Called with the tab key whenever a tab is selected. */
|
|
21
|
-
|
|
21
|
+
onValueChange?: (key: string) => void;
|
|
22
22
|
/** Extra classes for the root element. */
|
|
23
23
|
className?: string;
|
|
24
24
|
/** Extra classes for the active panel. */
|
|
25
25
|
panelClassName?: string;
|
|
26
26
|
}
|
|
27
|
-
export declare function Tabs({ tabs,
|
|
28
|
-
//# sourceMappingURL=Tabs.d.ts.map
|
|
27
|
+
export declare function Tabs({ tabs, defaultValue, value, onValueChange, className, panelClassName, ref, ...rest }: TabsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/cn.js";
|
|
2
|
+
import { useControllableState as t } from "../../hooks/useControllableState.js";
|
|
3
|
+
import { useId as n, useRef as r } from "react";
|
|
4
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/ui/Tabs.tsx
|
|
6
|
+
function o({ tabs: o, defaultValue: s, value: c, onValueChange: l, className: u, panelClassName: d, ref: f, ...p }) {
|
|
7
|
+
let [m, h] = t({
|
|
8
|
+
value: c,
|
|
9
|
+
defaultValue: s || o[0]?.key || "",
|
|
10
|
+
onChange: l
|
|
11
|
+
}), g = o.some((e) => e.key === m) ? m : o[0]?.key ?? "", _ = o.find((e) => e.key === g), v = n(), y = r(null);
|
|
12
|
+
function b(e) {
|
|
13
|
+
let t = o.map((e) => e.key), n = t.indexOf(g), r = null;
|
|
14
|
+
e.key === "ArrowRight" ? r = (n + 1) % o.length : e.key === "ArrowLeft" ? r = (n - 1 + o.length) % o.length : e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || (e.key === "Home" && (r = 0), e.key === "End" && (r = o.length - 1)), r !== null && (e.preventDefault(), h(t[r]), (y.current?.querySelectorAll("[role=\"tab\"]"))?.[r]?.focus());
|
|
15
|
+
}
|
|
16
|
+
return /* @__PURE__ */ a("div", {
|
|
17
|
+
ref: f,
|
|
18
|
+
...p,
|
|
19
|
+
className: u,
|
|
20
|
+
children: [/* @__PURE__ */ i("div", {
|
|
21
|
+
className: "border-border flex shrink-0 overflow-x-auto border-b",
|
|
22
|
+
role: "tablist",
|
|
23
|
+
ref: y,
|
|
24
|
+
children: o.map((t) => /* @__PURE__ */ a("button", {
|
|
25
|
+
type: "button",
|
|
26
|
+
id: `${v}-tab-${t.key}`,
|
|
27
|
+
role: "tab",
|
|
28
|
+
tabIndex: t.key === g ? 0 : -1,
|
|
29
|
+
"aria-selected": t.key === g,
|
|
30
|
+
"aria-controls": `${v}-panel`,
|
|
31
|
+
onClick: () => h(t.key),
|
|
32
|
+
onKeyDown: b,
|
|
33
|
+
className: e("font-control relative flex shrink-0 cursor-pointer items-center gap-1.5 px-3 py-2 text-xs font-medium transition-colors duration-[100ms] focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-accent", "hover:text-text-primary", t.key === g ? "text-accent-fg" : "text-text-tertiary"),
|
|
34
|
+
children: [
|
|
35
|
+
t.icon && /* @__PURE__ */ i("span", {
|
|
36
|
+
"aria-hidden": "true",
|
|
37
|
+
children: t.icon
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ i("span", { children: t.label }),
|
|
40
|
+
t.count != null && /* @__PURE__ */ a("span", {
|
|
41
|
+
className: e("min-w-[18px] rounded-md px-1.5 py-0.5 text-center text-2xs leading-none font-medium", t.key === g ? "bg-accent/15 text-accent-fg" : "bg-bg-hover text-text-tertiary"),
|
|
42
|
+
children: [/* @__PURE__ */ i("span", {
|
|
43
|
+
"aria-hidden": "true",
|
|
44
|
+
children: t.count
|
|
45
|
+
}), /* @__PURE__ */ i("span", {
|
|
46
|
+
className: "sr-only",
|
|
47
|
+
children: t.countLabel ?? `${t.count} ${t.count === 1 ? "item" : "items"}`
|
|
48
|
+
})]
|
|
49
|
+
}),
|
|
50
|
+
t.key === g && /* @__PURE__ */ i("div", { className: "bg-accent absolute right-0 bottom-0 left-0 h-0.5 rounded-md" })
|
|
51
|
+
]
|
|
52
|
+
}, t.key))
|
|
53
|
+
}), /* @__PURE__ */ i("div", {
|
|
54
|
+
id: `${v}-panel`,
|
|
55
|
+
role: "tabpanel",
|
|
56
|
+
"aria-labelledby": `${v}-tab-${g}`,
|
|
57
|
+
className: e("pt-4", d),
|
|
58
|
+
children: _?.content
|
|
59
|
+
})]
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
//#endregion
|
|
63
|
+
export { o as Tabs };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ComponentPropsWithRef, ReactNode } from "react";
|
|
2
2
|
import { type ControlSize } from "../../providers/ControlSizeContext";
|
|
3
|
-
interface TextInputProps extends
|
|
3
|
+
export interface TextInputProps extends ComponentPropsWithRef<"input"> {
|
|
4
4
|
/** Label text rendered above the input and linked to it. */
|
|
5
5
|
label?: string;
|
|
6
6
|
/** Error message shown next to the label; also marks the input invalid and turns the border red. */
|
|
@@ -15,6 +15,4 @@ interface TextInputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
15
15
|
*/
|
|
16
16
|
icon?: ReactNode;
|
|
17
17
|
}
|
|
18
|
-
export declare
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=TextInput.d.ts.map
|
|
18
|
+
export declare function TextInput({ label, error, icon, className, id, readOnly, hint, controlSize, required, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, ref, ...props }: TextInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/cn.js";
|
|
2
|
+
import { useControlSize as t } from "../../providers/ControlSizeContext.js";
|
|
3
|
+
import { useFieldControl as n } from "./useFieldControl.js";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/ui/TextInput.tsx
|
|
6
|
+
function a({ label: a, error: o, icon: s, className: c, id: l, readOnly: u, hint: d, controlSize: f, required: p, "aria-describedby": m, "aria-invalid": h, ref: g, ..._ }) {
|
|
7
|
+
let v = n({
|
|
8
|
+
id: l,
|
|
9
|
+
error: o,
|
|
10
|
+
hint: d,
|
|
11
|
+
describedBy: m,
|
|
12
|
+
invalid: h,
|
|
13
|
+
required: p
|
|
14
|
+
}), { inputId: y, errorId: b, hintId: x } = v, S = t(f);
|
|
15
|
+
return /* @__PURE__ */ i("div", {
|
|
16
|
+
className: "flex flex-col gap-1.5",
|
|
17
|
+
children: [
|
|
18
|
+
d && /* @__PURE__ */ r("p", {
|
|
19
|
+
id: x,
|
|
20
|
+
className: "text-text-secondary text-xs",
|
|
21
|
+
children: d
|
|
22
|
+
}),
|
|
23
|
+
(a || o) && /* @__PURE__ */ i("div", {
|
|
24
|
+
className: "flex items-center justify-between",
|
|
25
|
+
children: [a && /* @__PURE__ */ r("label", {
|
|
26
|
+
htmlFor: y,
|
|
27
|
+
className: "ui-field-label font-label text-xs font-medium",
|
|
28
|
+
children: a
|
|
29
|
+
}), o && /* @__PURE__ */ r("p", {
|
|
30
|
+
id: b,
|
|
31
|
+
className: "text-2xs text-danger-fg",
|
|
32
|
+
children: o
|
|
33
|
+
})]
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ i("div", {
|
|
36
|
+
className: "relative",
|
|
37
|
+
children: [s && /* @__PURE__ */ r("span", {
|
|
38
|
+
className: "text-text-tertiary absolute top-1/2 left-2.5 -translate-y-1/2",
|
|
39
|
+
children: s
|
|
40
|
+
}), /* @__PURE__ */ r("input", {
|
|
41
|
+
ref: g,
|
|
42
|
+
"data-control-size": S,
|
|
43
|
+
"data-has-icon": s ? "true" : void 0,
|
|
44
|
+
required: v.required,
|
|
45
|
+
"aria-invalid": v.invalid,
|
|
46
|
+
id: y,
|
|
47
|
+
readOnly: u,
|
|
48
|
+
"aria-describedby": v.describedBy,
|
|
49
|
+
className: e("ui-sized-control bg-bg-secondary text-text-primary font-control h-7 w-full px-2 text-xs", "rounded-md border", "placeholder:text-text-placeholder", "transition-colors duration-[100ms]", "focus:border-accent focus:outline-none", "disabled:cursor-not-allowed disabled:opacity-40", u && "bg-bg-primary text-text-secondary focus:border-border cursor-default border-dashed", s && "pl-7", o ? "border-danger" : !u && "border-border", u && !o && "border-border", c),
|
|
50
|
+
..._
|
|
51
|
+
})]
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
export { a as TextInput };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
2
|
import { type ControlSize } from "../../providers/ControlSizeContext";
|
|
3
|
-
interface TextareaProps extends
|
|
3
|
+
export interface TextareaProps extends ComponentPropsWithRef<"textarea"> {
|
|
4
4
|
/** Label text rendered above the textarea and linked to it. */
|
|
5
5
|
label?: string;
|
|
6
6
|
/** Error message shown below the textarea; also marks it invalid and turns the border red. */
|
|
@@ -12,6 +12,4 @@ interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
|
12
12
|
/** Show a `length/maxLength` counter below the textarea; requires `maxLength` and a string `value`. */
|
|
13
13
|
showCount?: boolean;
|
|
14
14
|
}
|
|
15
|
-
export declare
|
|
16
|
-
export {};
|
|
17
|
-
//# sourceMappingURL=Textarea.d.ts.map
|
|
15
|
+
export declare function Textarea({ label, error, showCount, maxLength, value, className, id, hint, controlSize, required, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, ref, ...props }: TextareaProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/cn.js";
|
|
2
|
+
import { useControlSize as t } from "../../providers/ControlSizeContext.js";
|
|
3
|
+
import { useFieldControl as n } from "./useFieldControl.js";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/ui/Textarea.tsx
|
|
6
|
+
function a({ label: a, error: o, showCount: s, maxLength: c, value: l, className: u, id: d, hint: f, controlSize: p, required: m, "aria-describedby": h, "aria-invalid": g, ref: _, ...v }) {
|
|
7
|
+
let y = n({
|
|
8
|
+
id: d,
|
|
9
|
+
error: o,
|
|
10
|
+
hint: f,
|
|
11
|
+
describedBy: h,
|
|
12
|
+
invalid: g,
|
|
13
|
+
required: m
|
|
14
|
+
}), { inputId: b, errorId: x, hintId: S } = y, C = t(p), w = typeof l == "string" ? l.length : 0;
|
|
15
|
+
return /* @__PURE__ */ i("div", {
|
|
16
|
+
className: "flex flex-col gap-1.5",
|
|
17
|
+
children: [
|
|
18
|
+
f && /* @__PURE__ */ r("p", {
|
|
19
|
+
id: S,
|
|
20
|
+
className: "text-text-secondary text-xs",
|
|
21
|
+
children: f
|
|
22
|
+
}),
|
|
23
|
+
a && /* @__PURE__ */ r("label", {
|
|
24
|
+
htmlFor: b,
|
|
25
|
+
className: "ui-field-label font-label text-xs font-medium",
|
|
26
|
+
children: a
|
|
27
|
+
}),
|
|
28
|
+
/* @__PURE__ */ r("textarea", {
|
|
29
|
+
ref: _,
|
|
30
|
+
"data-control-size": C,
|
|
31
|
+
required: y.required,
|
|
32
|
+
"aria-invalid": y.invalid,
|
|
33
|
+
"aria-describedby": y.describedBy,
|
|
34
|
+
id: b,
|
|
35
|
+
value: l,
|
|
36
|
+
maxLength: c,
|
|
37
|
+
className: e("ui-sized-control bg-bg-secondary text-text-primary font-control min-h-[72px] w-full px-2 py-1.5 text-xs", "resize-y rounded-md border", "placeholder:text-text-placeholder", "transition-colors duration-[100ms]", "focus:border-accent focus:outline-none", o ? "border-danger" : "border-border", u),
|
|
38
|
+
...v
|
|
39
|
+
}),
|
|
40
|
+
/* @__PURE__ */ i("div", {
|
|
41
|
+
className: "flex justify-between",
|
|
42
|
+
children: [o && /* @__PURE__ */ r("p", {
|
|
43
|
+
id: x,
|
|
44
|
+
className: "text-2xs text-danger-fg",
|
|
45
|
+
children: o
|
|
46
|
+
}), s && c && /* @__PURE__ */ i("p", {
|
|
47
|
+
className: "text-2xs text-text-tertiary ml-auto",
|
|
48
|
+
children: [
|
|
49
|
+
w,
|
|
50
|
+
"/",
|
|
51
|
+
c
|
|
52
|
+
]
|
|
53
|
+
})]
|
|
54
|
+
})
|
|
55
|
+
]
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
export { a as Textarea };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ElementType } from "react";
|
|
2
|
-
export interface ThemePreviewProps {
|
|
1
|
+
import type { ComponentPropsWithRef, ElementType } from "react";
|
|
2
|
+
export interface ThemePreviewProps extends Omit<ComponentPropsWithRef<"button">, "type" | "children" | "onClick"> {
|
|
3
3
|
/** Text shown beneath the preview swatch. */
|
|
4
4
|
label: string;
|
|
5
5
|
/** Highlights the card with the accent border as the selected theme. */
|
|
@@ -16,5 +16,4 @@ export interface ThemePreviewProps {
|
|
|
16
16
|
/** Extra classes for the button element. */
|
|
17
17
|
className?: string;
|
|
18
18
|
}
|
|
19
|
-
export declare function ThemePreview({ label, active, icon: Icon, preview, onClick, className, }: ThemePreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
//# sourceMappingURL=ThemePreview.d.ts.map
|
|
19
|
+
export declare function ThemePreview({ label, active, icon: Icon, preview, onClick, className, ref, ...rest }: ThemePreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
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/ThemePreview.tsx
|
|
4
|
+
function r({ label: r, active: i, icon: a, preview: o, onClick: s, className: c, ref: l, ...u }) {
|
|
5
|
+
return /* @__PURE__ */ n("button", {
|
|
6
|
+
ref: l,
|
|
7
|
+
...u,
|
|
8
|
+
type: "button",
|
|
9
|
+
onClick: s,
|
|
10
|
+
className: e("flex cursor-pointer flex-col items-center gap-2 rounded-md border p-3 transition-colors duration-[100ms]", i ? "border-accent bg-accent-muted" : "border-border bg-bg-secondary hover:bg-bg-hover hover:border-border-strong", c),
|
|
11
|
+
children: [/* @__PURE__ */ t("div", {
|
|
12
|
+
className: "border-border-strong/20 flex h-10 w-full items-center justify-center rounded border",
|
|
13
|
+
style: { backgroundColor: o?.bg },
|
|
14
|
+
children: /* @__PURE__ */ t("div", {
|
|
15
|
+
className: "h-1.5 w-8 rounded-md",
|
|
16
|
+
style: { backgroundColor: o?.fg }
|
|
17
|
+
})
|
|
18
|
+
}), /* @__PURE__ */ n("div", {
|
|
19
|
+
className: "flex items-center gap-1.5",
|
|
20
|
+
children: [a && /* @__PURE__ */ t(a, { className: "h-3 w-3" }), /* @__PURE__ */ t("span", {
|
|
21
|
+
className: "text-xs font-medium",
|
|
22
|
+
children: r
|
|
23
|
+
})]
|
|
24
|
+
})]
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { r as ThemePreview };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
3
|
-
export interface TimeInputProps extends Omit<ComponentPropsWithoutRef<typeof TextInput>, "type" | "value" | "defaultValue" | "onChange"> {
|
|
1
|
+
import { type TextInputProps } from "./TextInput";
|
|
2
|
+
export interface TimeInputProps extends Omit<TextInputProps, "type" | "value" | "defaultValue"> {
|
|
4
3
|
/** Controlled time string: empty, HH:mm, or HH:mm:ss when seconds are enabled by step. */
|
|
5
|
-
value
|
|
4
|
+
value?: string;
|
|
5
|
+
/** Initial time string when uncontrolled. */
|
|
6
|
+
defaultValue?: string;
|
|
6
7
|
/** Called with the native time input's value after each change. */
|
|
7
|
-
|
|
8
|
+
onValueChange?: (value: string) => void;
|
|
8
9
|
}
|
|
9
10
|
/** Native time input. Set step (in seconds) to expose seconds where supported by the browser. */
|
|
10
|
-
export declare
|
|
11
|
-
//# sourceMappingURL=TimeInput.d.ts.map
|
|
11
|
+
export declare function TimeInput({ value, defaultValue, onValueChange, onChange, ref, ...props }: TimeInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useControllableState as e } from "../../hooks/useControllableState.js";
|
|
2
|
+
import { TextInput as t } from "./TextInput.js";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/ui/TimeInput.tsx
|
|
5
|
+
function r({ value: r, defaultValue: i = "", onValueChange: a, onChange: o, ref: s, ...c }) {
|
|
6
|
+
let [l, u] = e({
|
|
7
|
+
value: r,
|
|
8
|
+
defaultValue: i,
|
|
9
|
+
onChange: a
|
|
10
|
+
});
|
|
11
|
+
return /* @__PURE__ */ n(t, {
|
|
12
|
+
...c,
|
|
13
|
+
ref: s,
|
|
14
|
+
type: "time",
|
|
15
|
+
value: l,
|
|
16
|
+
onChange: (e) => {
|
|
17
|
+
o?.(e), u(e.currentTarget.value);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { r as TimeInput };
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* />
|
|
16
16
|
* ```
|
|
17
17
|
*/
|
|
18
|
+
import type { ComponentPropsWithRef } from "react";
|
|
18
19
|
import { type Tone } from "../../lib/tones";
|
|
19
20
|
interface TimelineItem {
|
|
20
21
|
/** Unique identifier for React keys. */
|
|
@@ -29,12 +30,11 @@ interface TimelineItem {
|
|
|
29
30
|
/** Timestamp or relative time string. */
|
|
30
31
|
time: string;
|
|
31
32
|
}
|
|
32
|
-
interface TimelineProps {
|
|
33
|
+
export interface TimelineProps extends Omit<ComponentPropsWithRef<"div">, "children"> {
|
|
33
34
|
/** List of timeline entries to render, in chronological order. */
|
|
34
35
|
items: TimelineItem[];
|
|
35
36
|
/** Additional utility classes for the root container. */
|
|
36
37
|
className?: string;
|
|
37
38
|
}
|
|
38
|
-
export declare function Timeline({ items, className }: TimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export declare function Timeline({ items, className, ref, ...rest }: TimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
39
40
|
export {};
|
|
40
|
-
//# sourceMappingURL=Timeline.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/cn.js";
|
|
2
|
+
import { isTone as t, toneClasses as n } from "../../lib/tones.js";
|
|
3
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/ui/Timeline.tsx
|
|
5
|
+
function a({ items: a, className: o, ref: s, ...c }) {
|
|
6
|
+
return /* @__PURE__ */ r("div", {
|
|
7
|
+
ref: s,
|
|
8
|
+
...c,
|
|
9
|
+
className: e("space-y-0", o),
|
|
10
|
+
children: a.map((o, s) => /* @__PURE__ */ i("div", {
|
|
11
|
+
className: "flex gap-3",
|
|
12
|
+
children: [/* @__PURE__ */ i("div", {
|
|
13
|
+
className: "flex flex-col items-center",
|
|
14
|
+
children: [/* @__PURE__ */ r("div", { className: e(t(o.dot) ? n(o.dot).dot : o.dot, "mt-1.5 h-2 w-2 shrink-0 rounded-full") }), s < a.length - 1 && /* @__PURE__ */ r("div", { className: "bg-border mt-1 w-px flex-1" })]
|
|
15
|
+
}), /* @__PURE__ */ i("div", {
|
|
16
|
+
className: e("pb-4", s === a.length - 1 && "pb-0"),
|
|
17
|
+
children: [/* @__PURE__ */ r("p", {
|
|
18
|
+
className: "text-text-primary text-xs",
|
|
19
|
+
children: o.text
|
|
20
|
+
}), /* @__PURE__ */ r("p", {
|
|
21
|
+
className: "text-2xs text-text-tertiary mt-0.5",
|
|
22
|
+
children: o.time
|
|
23
|
+
})]
|
|
24
|
+
})]
|
|
25
|
+
}, o.id))
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { a as Timeline };
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/cn.js";
|
|
2
|
+
import { toneClasses as t } from "../../lib/tones.js";
|
|
3
|
+
import { createContext as n, useCallback as r, useContext as i, useEffect as a, useRef as o, useState as s } from "react";
|
|
4
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
5
|
+
import { AlertTriangle as u, CheckCircle2 as d, Info as f, X as p, XCircle as m } from "lucide-react";
|
|
6
|
+
//#region src/components/ui/Toast.tsx
|
|
7
|
+
var h = n({ toast: () => {} });
|
|
8
|
+
function g() {
|
|
9
|
+
return i(h);
|
|
10
|
+
}
|
|
11
|
+
function _({ children: e }) {
|
|
12
|
+
let [t, n] = s([]), i = o(0), a = r((e, t, r = 4e3) => {
|
|
13
|
+
let a = typeof e == "string" ? {
|
|
14
|
+
type: e,
|
|
15
|
+
message: t ?? "",
|
|
16
|
+
duration: r
|
|
17
|
+
} : {
|
|
18
|
+
...e,
|
|
19
|
+
duration: e.duration ?? 4e3
|
|
20
|
+
}, o = i.current++;
|
|
21
|
+
n((e) => [...e, {
|
|
22
|
+
...a,
|
|
23
|
+
id: o
|
|
24
|
+
}]);
|
|
25
|
+
}, []), u = r((e) => {
|
|
26
|
+
n((t) => t.filter((t) => t.id !== e));
|
|
27
|
+
}, []);
|
|
28
|
+
return /* @__PURE__ */ l(h.Provider, {
|
|
29
|
+
value: { toast: a },
|
|
30
|
+
children: [e, /* @__PURE__ */ c("div", {
|
|
31
|
+
className: "pointer-events-none fixed top-3 right-3 z-[100] flex flex-col gap-2",
|
|
32
|
+
"aria-live": "polite",
|
|
33
|
+
children: t.map((e) => /* @__PURE__ */ c(b, {
|
|
34
|
+
toast: e,
|
|
35
|
+
onDismiss: () => u(e.id)
|
|
36
|
+
}, e.id))
|
|
37
|
+
})]
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
var v = {
|
|
41
|
+
success: d,
|
|
42
|
+
error: m,
|
|
43
|
+
warning: u,
|
|
44
|
+
info: f
|
|
45
|
+
}, y = {
|
|
46
|
+
success: "success",
|
|
47
|
+
error: "danger",
|
|
48
|
+
warning: "warning",
|
|
49
|
+
info: "info"
|
|
50
|
+
};
|
|
51
|
+
function b({ toast: n, onDismiss: r }) {
|
|
52
|
+
let [i, u] = s(100), d = v[n.type], f = t(y[n.type]), m = n.type === "error" || n.type === "warning", h = o(r);
|
|
53
|
+
a(() => {
|
|
54
|
+
h.current = r;
|
|
55
|
+
}, [r]);
|
|
56
|
+
let g = o(!1), _ = o(!1);
|
|
57
|
+
return a(() => {
|
|
58
|
+
if (!Number.isFinite(n.duration) || n.duration <= 0) return;
|
|
59
|
+
let e = n.duration, t = Date.now(), r = setInterval(() => {
|
|
60
|
+
let i = Date.now();
|
|
61
|
+
!g.current && !_.current && (e -= i - t), t = i;
|
|
62
|
+
let a = Math.max(0, e / n.duration * 100);
|
|
63
|
+
u(a), a <= 0 && (h.current(), clearInterval(r));
|
|
64
|
+
}, 50);
|
|
65
|
+
return () => clearInterval(r);
|
|
66
|
+
}, [n.duration]), /* @__PURE__ */ l("div", {
|
|
67
|
+
role: m ? "alert" : "status",
|
|
68
|
+
"aria-live": m ? "assertive" : "polite",
|
|
69
|
+
onMouseEnter: () => {
|
|
70
|
+
g.current = !0;
|
|
71
|
+
},
|
|
72
|
+
onMouseLeave: () => {
|
|
73
|
+
g.current = !1;
|
|
74
|
+
},
|
|
75
|
+
onFocus: () => {
|
|
76
|
+
_.current = !0;
|
|
77
|
+
},
|
|
78
|
+
onBlur: (e) => {
|
|
79
|
+
e.currentTarget.contains(e.relatedTarget) || (_.current = !1);
|
|
80
|
+
},
|
|
81
|
+
className: "ui-glass ui-glass-popover bg-bg-secondary border-border animate-slide-down pointer-events-auto relative w-80 overflow-hidden rounded-lg border shadow-lg",
|
|
82
|
+
children: [
|
|
83
|
+
/* @__PURE__ */ c("div", { className: e("absolute top-1.5 bottom-1.5 left-0 w-[3px] rounded-md", f.dot) }),
|
|
84
|
+
/* @__PURE__ */ l("div", {
|
|
85
|
+
className: "flex items-center gap-2.5 p-3 pl-3.5",
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ c(d, { className: e("h-4 w-4 shrink-0", f.text) }),
|
|
88
|
+
n.title ? /* @__PURE__ */ l("div", {
|
|
89
|
+
className: "text-text-primary flex-1 text-xs",
|
|
90
|
+
children: [/* @__PURE__ */ c("strong", {
|
|
91
|
+
className: "block font-semibold",
|
|
92
|
+
children: n.title
|
|
93
|
+
}), /* @__PURE__ */ c("p", { children: n.message })]
|
|
94
|
+
}) : /* @__PURE__ */ c("p", {
|
|
95
|
+
className: "text-text-primary flex-1 text-xs",
|
|
96
|
+
children: n.message
|
|
97
|
+
}),
|
|
98
|
+
/* @__PURE__ */ c("button", {
|
|
99
|
+
type: "button",
|
|
100
|
+
onClick: r,
|
|
101
|
+
"aria-label": "Dismiss notification",
|
|
102
|
+
className: "text-text-tertiary hover:text-text-primary flex h-5 w-5 cursor-pointer items-center justify-center rounded",
|
|
103
|
+
children: /* @__PURE__ */ c(p, {
|
|
104
|
+
className: "h-3 w-3",
|
|
105
|
+
"aria-hidden": "true"
|
|
106
|
+
})
|
|
107
|
+
})
|
|
108
|
+
]
|
|
109
|
+
}),
|
|
110
|
+
/* @__PURE__ */ c("div", {
|
|
111
|
+
className: "bg-bg-tertiary mx-3 mb-1 h-0.5 overflow-hidden rounded-md",
|
|
112
|
+
children: /* @__PURE__ */ c("div", {
|
|
113
|
+
className: "bg-border h-full rounded-md transition-all duration-[100ms]",
|
|
114
|
+
style: { width: `${i}%` }
|
|
115
|
+
})
|
|
116
|
+
})
|
|
117
|
+
]
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
//#endregion
|
|
121
|
+
export { _ as ToastProvider, g as useToast };
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
import { type ControlSize } from "../../providers/ControlSizeContext";
|
|
3
|
+
export interface ToggleProps extends Omit<ComponentPropsWithRef<"button">, "type" | "role" | "aria-checked" | "children" | "dangerouslySetInnerHTML" | "onChange"> {
|
|
4
|
+
/** Override the size inherited from ControlSizeProvider. */
|
|
5
|
+
controlSize?: ControlSize;
|
|
2
6
|
/** Whether the switch is on. */
|
|
3
|
-
checked
|
|
7
|
+
checked?: boolean;
|
|
8
|
+
/** Initial state when uncontrolled. */
|
|
9
|
+
defaultChecked?: boolean;
|
|
4
10
|
/** Called with the new checked value when the switch is clicked. */
|
|
5
|
-
|
|
11
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
6
12
|
/** Dims the toggle and blocks interaction. */
|
|
7
13
|
disabled?: boolean;
|
|
8
14
|
/** Text shown beside the switch. */
|
|
@@ -14,5 +20,4 @@ export interface ToggleProps {
|
|
|
14
20
|
/** Extra classes for the wrapping label element. */
|
|
15
21
|
className?: string;
|
|
16
22
|
}
|
|
17
|
-
export declare function Toggle({ checked,
|
|
18
|
-
//# sourceMappingURL=Toggle.d.ts.map
|
|
23
|
+
export declare function Toggle({ checked: checkedProp, defaultChecked, onCheckedChange, disabled, label, controlSize, onClick, className, ...rest }: ToggleProps): import("react/jsx-runtime").JSX.Element;
|