@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,34 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/cn.js";
|
|
2
|
+
import { useControlSize as t } from "../../providers/ControlSizeContext.js";
|
|
3
|
+
import { useControllableState as n } from "../../hooks/useControllableState.js";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/ui/Toggle.tsx
|
|
6
|
+
function a({ checked: a, defaultChecked: o = !1, onCheckedChange: s, disabled: c, label: l, controlSize: u, onClick: d, className: f, ...p }) {
|
|
7
|
+
let m = t(u), [h, g] = n({
|
|
8
|
+
value: a,
|
|
9
|
+
defaultValue: o,
|
|
10
|
+
onChange: s
|
|
11
|
+
});
|
|
12
|
+
return /* @__PURE__ */ i("label", {
|
|
13
|
+
className: e("flex w-fit items-center", c ? "cursor-not-allowed opacity-40" : "cursor-pointer", f),
|
|
14
|
+
style: { gap: 10 },
|
|
15
|
+
children: [/* @__PURE__ */ r("button", {
|
|
16
|
+
...p,
|
|
17
|
+
type: "button",
|
|
18
|
+
role: "switch",
|
|
19
|
+
"aria-checked": h,
|
|
20
|
+
"data-control-size": m,
|
|
21
|
+
disabled: c,
|
|
22
|
+
onClick: (e) => {
|
|
23
|
+
d?.(e), e.defaultPrevented || g(!h);
|
|
24
|
+
},
|
|
25
|
+
className: e("ui-switch relative shrink-0 rounded-full border transition-colors duration-[100ms]", "focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-2", h ? "bg-accent border-accent" : "bg-bg-tertiary ui-switch-off", !c && "cursor-pointer"),
|
|
26
|
+
children: /* @__PURE__ */ r("span", { className: "ui-switch-knob absolute top-1/2 rounded-full transition-[left] duration-[100ms]" })
|
|
27
|
+
}), l && /* @__PURE__ */ r("span", {
|
|
28
|
+
className: "text-text-secondary text-xs",
|
|
29
|
+
children: l
|
|
30
|
+
})]
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { a as Toggle };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
2
|
-
export interface ToolbarProps {
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from "react";
|
|
2
|
+
export interface ToolbarProps extends Omit<ComponentPropsWithRef<"div">, "children"> {
|
|
3
3
|
/** Left-hand content (search, toggles, counts); takes precedence over `children`. */
|
|
4
4
|
start?: ReactNode;
|
|
5
5
|
/** Right-hand content (filters, action buttons); the right group is omitted when empty. */
|
|
@@ -23,5 +23,4 @@ export interface ToolbarProps {
|
|
|
23
23
|
/** Called when the more-filters toggle or Escape requests a state change. */
|
|
24
24
|
onMoreFiltersOpenChange?: (open: boolean) => void;
|
|
25
25
|
}
|
|
26
|
-
export declare function Toolbar({ start, end, children, className, startClassName, endClassName, moreFilters, moreFiltersActiveCount, moreFiltersOpen, defaultMoreFiltersOpen, onMoreFiltersOpenChange, }: ToolbarProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
-
//# sourceMappingURL=Toolbar.d.ts.map
|
|
26
|
+
export declare function Toolbar({ start, end, children, className, startClassName, endClassName, moreFilters, moreFiltersActiveCount, moreFiltersOpen, defaultMoreFiltersOpen, onMoreFiltersOpenChange, ref, ...rest }: ToolbarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/cn.js";
|
|
2
|
+
import { OverlayContext as t, useOverlayEscape as n } from "../../hooks/useOverlayStack.js";
|
|
3
|
+
import { Button as r } from "./Button.js";
|
|
4
|
+
import { Badge as i } from "./Badge.js";
|
|
5
|
+
import { useId as a, useRef as o, useState as s } from "react";
|
|
6
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
|
+
import { SlidersHorizontal as u } from "lucide-react";
|
|
8
|
+
//#region src/components/ui/Toolbar.tsx
|
|
9
|
+
function d({ start: d, end: f, children: p, className: m, startClassName: h, endClassName: g, moreFilters: _, moreFiltersActiveCount: v = 0, moreFiltersOpen: y, defaultMoreFiltersOpen: b, onMoreFiltersOpenChange: x, ref: S, ...C }) {
|
|
10
|
+
let w = a(), T = o(null), E = o(null), [D, O] = s(!1), k = v > 0, [A, j] = s(b ?? k), [M, N] = s(k);
|
|
11
|
+
M !== k && (N(k), y === void 0 && k && j(!0));
|
|
12
|
+
let P = y ?? A, F = (e) => {
|
|
13
|
+
y === void 0 && j(e), x?.(e);
|
|
14
|
+
}, I = n(!!_ && P && D, (e) => {
|
|
15
|
+
e.defaultPrevented || !E.current?.contains(E.current.ownerDocument.activeElement) || (F(!1), T.current?.focus());
|
|
16
|
+
}, E), L = /* @__PURE__ */ l("div", {
|
|
17
|
+
...!_ && {
|
|
18
|
+
...C,
|
|
19
|
+
ref: S
|
|
20
|
+
},
|
|
21
|
+
className: e("flex items-center justify-between gap-3", !_ && m),
|
|
22
|
+
children: [/* @__PURE__ */ c("div", {
|
|
23
|
+
className: e("flex flex-1 items-center gap-3", h),
|
|
24
|
+
children: d ?? p
|
|
25
|
+
}), (f || _) && /* @__PURE__ */ l("div", {
|
|
26
|
+
className: e("flex items-center gap-1.5", g),
|
|
27
|
+
children: [f, _ && /* @__PURE__ */ l("span", {
|
|
28
|
+
className: "relative inline-flex",
|
|
29
|
+
children: [/* @__PURE__ */ c(r, {
|
|
30
|
+
ref: T,
|
|
31
|
+
size: "sm",
|
|
32
|
+
icon: u,
|
|
33
|
+
hideLabel: !0,
|
|
34
|
+
"aria-label": v > 0 ? `More filters (${v} active)` : "More filters",
|
|
35
|
+
"aria-expanded": P,
|
|
36
|
+
"aria-controls": w,
|
|
37
|
+
onClick: () => F(!P),
|
|
38
|
+
children: "More filters"
|
|
39
|
+
}), v > 0 && /* @__PURE__ */ c(i, {
|
|
40
|
+
size: "xs",
|
|
41
|
+
color: "accent",
|
|
42
|
+
"aria-hidden": "true",
|
|
43
|
+
className: "pointer-events-none absolute top-0 right-0 -translate-y-1/2",
|
|
44
|
+
children: v
|
|
45
|
+
})]
|
|
46
|
+
})]
|
|
47
|
+
})]
|
|
48
|
+
});
|
|
49
|
+
return _ ? /* @__PURE__ */ l("div", {
|
|
50
|
+
ref: S,
|
|
51
|
+
...C,
|
|
52
|
+
className: e("space-y-3", m),
|
|
53
|
+
children: [L, /* @__PURE__ */ c(t.Provider, {
|
|
54
|
+
value: I,
|
|
55
|
+
children: /* @__PURE__ */ c("div", {
|
|
56
|
+
ref: E,
|
|
57
|
+
id: w,
|
|
58
|
+
hidden: !P,
|
|
59
|
+
className: e("flex-wrap items-center gap-3", P ? "flex" : "hidden"),
|
|
60
|
+
onFocus: (e) => O(e.currentTarget.contains(e.target)),
|
|
61
|
+
onBlur: (e) => {
|
|
62
|
+
e.currentTarget.contains(e.relatedTarget) || O(!1);
|
|
63
|
+
},
|
|
64
|
+
children: _
|
|
65
|
+
})
|
|
66
|
+
})]
|
|
67
|
+
}) : L;
|
|
68
|
+
}
|
|
69
|
+
//#endregion
|
|
70
|
+
export { d as Toolbar };
|
|
@@ -24,4 +24,3 @@ export interface TooltipProps extends Omit<HTMLAttributes<HTMLElement>, "content
|
|
|
24
24
|
}
|
|
25
25
|
export declare function Tooltip({ content, placement, children, ref: outer, ...passed }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
26
26
|
export {};
|
|
27
|
-
//# sourceMappingURL=Tooltip.d.ts.map
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/cn.js";
|
|
2
|
+
import { Fragment as t, cloneElement as n, isValidElement as r, useCallback as i, useEffect as a, useId as o, useState as s } from "react";
|
|
3
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/ui/Tooltip.tsx
|
|
5
|
+
var u = {
|
|
6
|
+
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
7
|
+
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
8
|
+
left: "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
9
|
+
right: "left-full top-1/2 -translate-y-1/2 ml-2"
|
|
10
|
+
};
|
|
11
|
+
function d(e, t) {
|
|
12
|
+
if (typeof e == "function") {
|
|
13
|
+
let n = e(t);
|
|
14
|
+
return typeof n == "function" ? n : () => e(null);
|
|
15
|
+
}
|
|
16
|
+
return e && (e.current = t), () => {
|
|
17
|
+
e && (e.current = null);
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function f(t, n) {
|
|
21
|
+
let r = { ...t };
|
|
22
|
+
for (let [i, a] of Object.entries(n)) {
|
|
23
|
+
if (a === void 0) continue;
|
|
24
|
+
let n = t[i];
|
|
25
|
+
if (/^on[A-Z]/.test(i) && typeof n == "function" && typeof a == "function") r[i] = (...e) => {
|
|
26
|
+
n(...e), a(...e);
|
|
27
|
+
};
|
|
28
|
+
else if (i === "className") r[i] = e(n, a);
|
|
29
|
+
else if (i === "style") r[i] = {
|
|
30
|
+
...n,
|
|
31
|
+
...a
|
|
32
|
+
};
|
|
33
|
+
else if (i === "id" && typeof n == "string" && n) continue;
|
|
34
|
+
else i === "aria-describedby" ? r[i] = [n, a].filter(Boolean).join(" ") : r[i] = a;
|
|
35
|
+
}
|
|
36
|
+
return r;
|
|
37
|
+
}
|
|
38
|
+
function p({ element: e, merged: t, ...r }) {
|
|
39
|
+
return n(e, {
|
|
40
|
+
...t,
|
|
41
|
+
...r
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
var m = (e, t) => t instanceof Node && e.contains(t);
|
|
45
|
+
function h({ content: n, placement: h = "top", children: g, ref: _, ...v }) {
|
|
46
|
+
let [y, b] = s(!1), x = o();
|
|
47
|
+
a(() => {
|
|
48
|
+
if (!y) return;
|
|
49
|
+
let e = (e) => {
|
|
50
|
+
e.key === "Escape" && (e.preventDefault(), b(!1));
|
|
51
|
+
};
|
|
52
|
+
return document.addEventListener("keydown", e, !0), () => document.removeEventListener("keydown", e, !0);
|
|
53
|
+
}, [y]);
|
|
54
|
+
let S = r(g) && g.type !== t ? g : null, C = S?.props.ref, w = i((e) => {
|
|
55
|
+
if (!e) return;
|
|
56
|
+
let t = [d(C, e), d(_, e)];
|
|
57
|
+
return () => t.forEach((e) => e());
|
|
58
|
+
}, [C, _]), T = {
|
|
59
|
+
onMouseOver: (e) => {
|
|
60
|
+
let { currentTarget: t, target: n, relatedTarget: r } = e;
|
|
61
|
+
m(t, n) && !m(t, r) && b(!0);
|
|
62
|
+
},
|
|
63
|
+
onMouseOut: (e) => {
|
|
64
|
+
m(e.currentTarget, e.relatedTarget) || b(!1);
|
|
65
|
+
},
|
|
66
|
+
onFocus: (e) => {
|
|
67
|
+
b(m(e.currentTarget, e.target));
|
|
68
|
+
},
|
|
69
|
+
onBlur: () => b(!1)
|
|
70
|
+
}, E = S ? /* @__PURE__ */ c(p, {
|
|
71
|
+
element: S,
|
|
72
|
+
merged: f(S.props, {
|
|
73
|
+
...v,
|
|
74
|
+
"aria-describedby": [v["aria-describedby"], x].filter(Boolean).join(" ")
|
|
75
|
+
}),
|
|
76
|
+
ref: w
|
|
77
|
+
}) : g;
|
|
78
|
+
return /* @__PURE__ */ l("div", {
|
|
79
|
+
...S ? T : f(T, v),
|
|
80
|
+
ref: S ? void 0 : w,
|
|
81
|
+
className: e("relative inline-flex", !S && v.className),
|
|
82
|
+
children: [E, y && /* @__PURE__ */ c("div", {
|
|
83
|
+
id: x,
|
|
84
|
+
className: e("text-2xs absolute z-50 px-2 py-1 font-medium whitespace-nowrap", "ui-glass ui-glass-popover bg-bg-tertiary text-text-primary border-border rounded border shadow-md", "animate-fade-in pointer-events-none", u[h]),
|
|
85
|
+
role: "tooltip",
|
|
86
|
+
children: n
|
|
87
|
+
})]
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
//#endregion
|
|
91
|
+
export { h as Tooltip };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface TranscriptLineProps extends Omit<
|
|
1
|
+
import type { ComponentPropsWithRef, ReactNode } from "react";
|
|
2
|
+
export interface TranscriptLineProps extends Omit<ComponentPropsWithRef<"div">, "role"> {
|
|
3
|
+
/** Speaker label shown before the line. */
|
|
3
4
|
speaker: ReactNode;
|
|
4
5
|
/** Changes presentation only; the caller decides the speaker's label. */
|
|
5
6
|
role?: "patient" | "staff" | "agent" | "system";
|
|
@@ -7,8 +8,8 @@ export interface TranscriptLineProps extends Omit<HTMLAttributes<HTMLDivElement>
|
|
|
7
8
|
time?: number;
|
|
8
9
|
/** When supplied with time, turns the timestamp into a seek button. */
|
|
9
10
|
onSeek?: (seconds: number) => void;
|
|
11
|
+
/** Marks the currently active line. */
|
|
10
12
|
highlighted?: boolean;
|
|
11
13
|
children: ReactNode;
|
|
12
14
|
}
|
|
13
|
-
export declare function TranscriptLine({ speaker, role, time, onSeek, highlighted, children, className, ...props }: TranscriptLineProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
//# sourceMappingURL=TranscriptLine.d.ts.map
|
|
15
|
+
export declare function TranscriptLine({ speaker, role, time, onSeek, highlighted, children, className, ref, ...props }: TranscriptLineProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/cn.js";
|
|
2
|
+
import { formatMediaTime as t } from "../../lib/formatMediaTime.js";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/ui/TranscriptLine.tsx
|
|
5
|
+
function i({ speaker: i, role: a = "patient", time: o, onSeek: s, highlighted: c = !1, children: l, className: u, ref: d, ...f }) {
|
|
6
|
+
let p = o != null && Number.isFinite(o) && o >= 0 ? o : null, m = p == null ? null : t(p);
|
|
7
|
+
return /* @__PURE__ */ r("div", {
|
|
8
|
+
...f,
|
|
9
|
+
ref: d,
|
|
10
|
+
"data-role": a,
|
|
11
|
+
"data-highlighted": c || void 0,
|
|
12
|
+
className: e("flex gap-3 rounded-md p-2 text-xs", c && "bg-accent-subtle", a === "system" ? "text-text-tertiary italic" : "text-text-secondary", a === "agent" && "border-l-2 border-accent", a === "staff" && "border-l-2 border-border-strong", u),
|
|
13
|
+
children: [m != null && /* @__PURE__ */ n("div", {
|
|
14
|
+
className: "font-mono text-2xs shrink-0 pt-1",
|
|
15
|
+
children: s ? /* @__PURE__ */ n("button", {
|
|
16
|
+
type: "button",
|
|
17
|
+
onClick: () => s(p),
|
|
18
|
+
"aria-label": `Seek to ${m}`,
|
|
19
|
+
className: "cursor-pointer rounded-md text-accent-fg hover:underline focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-2",
|
|
20
|
+
children: m
|
|
21
|
+
}) : /* @__PURE__ */ n("span", { children: m })
|
|
22
|
+
}), /* @__PURE__ */ r("div", {
|
|
23
|
+
className: "min-w-0 flex-1",
|
|
24
|
+
style: { overflowWrap: "anywhere" },
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ n("span", {
|
|
27
|
+
className: "text-text-primary font-medium",
|
|
28
|
+
children: i
|
|
29
|
+
}),
|
|
30
|
+
": ",
|
|
31
|
+
/* @__PURE__ */ n("span", {
|
|
32
|
+
className: "whitespace-pre-wrap",
|
|
33
|
+
children: l
|
|
34
|
+
})
|
|
35
|
+
]
|
|
36
|
+
})]
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { i as TranscriptLine };
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import { type ChangeEvent, type
|
|
2
|
-
export interface UploadDropzoneProps extends Omit<
|
|
1
|
+
import { type ChangeEvent, type ComponentPropsWithRef, type DragEvent, type ReactNode } from "react";
|
|
2
|
+
export interface UploadDropzoneProps extends Omit<ComponentPropsWithRef<"input">, "type" | "title" | "children"> {
|
|
3
3
|
/** Primary prompt text; defaults to a drag-and-drop or click-to-browse message. */
|
|
4
4
|
title?: ReactNode;
|
|
5
5
|
/** Secondary hint text (e.g. accepted types or size limits), linked via `aria-describedby`. */
|
|
6
6
|
description?: ReactNode;
|
|
7
7
|
/** Replaces the default upload icon. */
|
|
8
8
|
icon?: ReactNode;
|
|
9
|
-
/** Existing picker callback; receives the genuine native-input change event. */
|
|
10
|
-
onChange?: (files: FileList | null, event: ChangeEvent<HTMLInputElement>) => void;
|
|
11
9
|
/** Receives both picker selections and drops. The caller owns upload and file validation. */
|
|
12
10
|
onFilesChange?: (files: FileList, event: ChangeEvent<HTMLInputElement> | DragEvent<HTMLLabelElement>) => void;
|
|
13
11
|
}
|
|
14
|
-
export declare
|
|
15
|
-
//# sourceMappingURL=UploadDropzone.d.ts.map
|
|
12
|
+
export declare function UploadDropzone({ title, description, icon, multiple, disabled, onChange, onFilesChange, className, id, "aria-describedby": describedBy, ref, ...inputProps }: UploadDropzoneProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/cn.js";
|
|
2
|
+
import { useId as t, useImperativeHandle as n, useRef as r } from "react";
|
|
3
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
4
|
+
import { UploadCloud as o } from "lucide-react";
|
|
5
|
+
//#region src/components/ui/UploadDropzone.tsx
|
|
6
|
+
function s({ title: s = "Drag and drop files here, or click to browse", description: c, icon: l, multiple: u, disabled: d, onChange: f, onFilesChange: p, className: m, id: h, "aria-describedby": g, ref: _, ...v }) {
|
|
7
|
+
let y = r(null);
|
|
8
|
+
n(_, () => y.current, []);
|
|
9
|
+
let b = t(), x = `${h ?? b}-description`;
|
|
10
|
+
return /* @__PURE__ */ a("label", {
|
|
11
|
+
className: e("ui-upload-dropzone border-border hover:border-border-strong relative block rounded-md border-2 border-dashed p-8 text-center transition-colors duration-[100ms]", d ? "cursor-not-allowed opacity-60" : "cursor-pointer hover:bg-bg-hover", m),
|
|
12
|
+
onDragOver: (e) => {
|
|
13
|
+
e.preventDefault(), e.dataTransfer.dropEffect = d || y.current?.matches(":disabled") ? "none" : "copy";
|
|
14
|
+
},
|
|
15
|
+
onDrop: (e) => {
|
|
16
|
+
e.preventDefault();
|
|
17
|
+
let t = y.current;
|
|
18
|
+
if (d || !t || t.matches(":disabled") || !e.dataTransfer.files.length) return;
|
|
19
|
+
let n = new DataTransfer(), r = Array.from(e.dataTransfer.files);
|
|
20
|
+
for (let e of u ? r : r.slice(0, 1)) n.items.add(e);
|
|
21
|
+
t.files = n.files, p?.(t.files, e);
|
|
22
|
+
},
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ i("input", {
|
|
25
|
+
...v,
|
|
26
|
+
id: h,
|
|
27
|
+
ref: y,
|
|
28
|
+
type: "file",
|
|
29
|
+
multiple: u,
|
|
30
|
+
disabled: d,
|
|
31
|
+
className: "sr-only",
|
|
32
|
+
"aria-describedby": [g, c && x].filter(Boolean).join(" ") || void 0,
|
|
33
|
+
onChange: (e) => {
|
|
34
|
+
f?.(e), e.target.files && p?.(e.target.files, e);
|
|
35
|
+
}
|
|
36
|
+
}),
|
|
37
|
+
/* @__PURE__ */ i("div", {
|
|
38
|
+
"aria-hidden": "true",
|
|
39
|
+
className: "text-text-tertiary mx-auto mb-3 flex h-9 w-9 items-center justify-center rounded-md bg-bg-tertiary",
|
|
40
|
+
children: l ?? /* @__PURE__ */ i(o, { className: "h-4.5 w-4.5" })
|
|
41
|
+
}),
|
|
42
|
+
/* @__PURE__ */ i("span", {
|
|
43
|
+
className: "text-text-secondary mb-1 block text-xs",
|
|
44
|
+
children: s
|
|
45
|
+
}),
|
|
46
|
+
c && /* @__PURE__ */ i("span", {
|
|
47
|
+
id: x,
|
|
48
|
+
className: "text-2xs text-text-tertiary block",
|
|
49
|
+
children: c
|
|
50
|
+
})
|
|
51
|
+
]
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
export { s as UploadDropzone };
|
|
@@ -5,4 +5,3 @@ export type BadgeColor = ToneColor;
|
|
|
5
5
|
export type BadgeColorClasses = Pick<ToneClasses, "soft" | "outline" | "fill" | "dot" | "text">;
|
|
6
6
|
/** The shared tone table (`tones`), typed as Badge's colour table. */
|
|
7
7
|
export declare const badgeColors: Record<BadgeColor, BadgeColorClasses>;
|
|
8
|
-
//# sourceMappingURL=badgeColors.d.ts.map
|
|
@@ -8,4 +8,3 @@ interface AgendaViewProps {
|
|
|
8
8
|
/** A printable list of days, each with its events (and availability). */
|
|
9
9
|
export declare function AgendaView({ days, events, availability, label, }: AgendaViewProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export {};
|
|
11
|
-
//# sourceMappingURL=AgendaView.d.ts.map
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { cn as e } from "../../../lib/cn.js";
|
|
2
|
+
import { formatTimeRange as t, resourceIdsOf as n } from "../../../lib/calendar.js";
|
|
3
|
+
import { useCalendarContext as r } from "./context.js";
|
|
4
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/ui/calendar/AgendaView.tsx
|
|
6
|
+
function o({ days: t, events: o, availability: l, label: u }) {
|
|
7
|
+
let d = r(), { daySegment: f, eventsOnDay: p, getFormatter: m, isAllDayLike: h, isSameDay: g, toDateKey: _ } = d.dates, v = m(d.locale, {
|
|
8
|
+
weekday: "long",
|
|
9
|
+
day: "numeric",
|
|
10
|
+
month: "long"
|
|
11
|
+
}), y = (e) => n(e).map((e) => d.resourceById.get(e)?.title).filter(Boolean).join(", ");
|
|
12
|
+
return /* @__PURE__ */ i("div", {
|
|
13
|
+
className: "ui-cal-scroll min-h-0 flex-1 overflow-y-auto",
|
|
14
|
+
"aria-label": u,
|
|
15
|
+
role: "region",
|
|
16
|
+
children: t.map((t) => {
|
|
17
|
+
let n = p(o, t).map((e) => ({
|
|
18
|
+
type: "event",
|
|
19
|
+
value: e
|
|
20
|
+
}));
|
|
21
|
+
if (d.agendaShowAvailability) {
|
|
22
|
+
for (let e of l) f(e.start, e.end, t) && n.push({
|
|
23
|
+
type: "availability",
|
|
24
|
+
value: e
|
|
25
|
+
});
|
|
26
|
+
n.sort((e, t) => {
|
|
27
|
+
let n = Number(e.type === "event" && h(e.value)) - Number(t.type === "event" && h(t.value));
|
|
28
|
+
return n ? -n : e.value.start.getTime() - t.value.start.getTime() || (e.type === "availability" ? -1 : 1);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
let r = g(t, d.now);
|
|
32
|
+
return /* @__PURE__ */ a("section", {
|
|
33
|
+
"aria-label": v.format(t),
|
|
34
|
+
children: [/* @__PURE__ */ i("h3", {
|
|
35
|
+
className: e("ui-cal-agenda-day border-border border-b px-3 py-1.5 text-xs font-semibold", r ? "text-accent-fg" : "text-text-primary"),
|
|
36
|
+
children: /* @__PURE__ */ i("button", {
|
|
37
|
+
type: "button",
|
|
38
|
+
className: "cursor-pointer hover:underline",
|
|
39
|
+
onClick: () => d.openDay(t),
|
|
40
|
+
"aria-current": r ? "date" : void 0,
|
|
41
|
+
children: v.format(t)
|
|
42
|
+
})
|
|
43
|
+
}), n.length === 0 ? /* @__PURE__ */ i("p", {
|
|
44
|
+
className: "text-text-tertiary border-border border-b px-3 py-2 text-xs",
|
|
45
|
+
children: d.labels.noEvents
|
|
46
|
+
}) : /* @__PURE__ */ i("ul", {
|
|
47
|
+
className: "divide-border divide-y border-border border-b",
|
|
48
|
+
children: n.map((e) => /* @__PURE__ */ i("li", { children: e.type === "event" ? /* @__PURE__ */ i(s, {
|
|
49
|
+
event: e.value,
|
|
50
|
+
resources: y(e.value.resourceId)
|
|
51
|
+
}) : /* @__PURE__ */ i(c, {
|
|
52
|
+
block: e.value,
|
|
53
|
+
resources: y(e.value.resourceId)
|
|
54
|
+
}) }, `${e.type}:${e.value.id}`))
|
|
55
|
+
})]
|
|
56
|
+
}, _(t));
|
|
57
|
+
})
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function s({ event: n, resources: o }) {
|
|
61
|
+
let s = r(), { isAllDayLike: c } = s.dates, l = s.statusLabel(n), u = c(n) ? s.labels.allDay : t(n.start, n.end, s);
|
|
62
|
+
return /* @__PURE__ */ a("div", {
|
|
63
|
+
role: "button",
|
|
64
|
+
tabIndex: 0,
|
|
65
|
+
"aria-label": s.describeEvent(n),
|
|
66
|
+
"data-status": n.status ?? "confirmed",
|
|
67
|
+
className: e("ui-cal-agenda-row hover:bg-bg-hover flex cursor-pointer items-start gap-3 px-3 py-2 transition-colors duration-[100ms]", `ui-cal-c-${s.eventColor(n)}`),
|
|
68
|
+
onClick: () => s.clickEvent(n),
|
|
69
|
+
onKeyDown: (e) => {
|
|
70
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), s.clickEvent(n));
|
|
71
|
+
},
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ i("span", {
|
|
74
|
+
className: "text-text-secondary font-mono w-24 shrink-0 text-xs",
|
|
75
|
+
children: u
|
|
76
|
+
}),
|
|
77
|
+
/* @__PURE__ */ i("span", {
|
|
78
|
+
className: "ui-cal-dot mt-1",
|
|
79
|
+
"aria-hidden": "true"
|
|
80
|
+
}),
|
|
81
|
+
/* @__PURE__ */ a("span", {
|
|
82
|
+
className: "min-w-0 flex-1",
|
|
83
|
+
children: [/* @__PURE__ */ i("span", {
|
|
84
|
+
className: "ui-cal-title block text-xs",
|
|
85
|
+
children: n.title
|
|
86
|
+
}), n.description && /* @__PURE__ */ i("span", {
|
|
87
|
+
className: "ui-cal-meta block text-2xs",
|
|
88
|
+
children: n.description
|
|
89
|
+
})]
|
|
90
|
+
}),
|
|
91
|
+
o && /* @__PURE__ */ i("span", {
|
|
92
|
+
className: "text-text-tertiary hidden max-w-40 truncate text-2xs sm:block",
|
|
93
|
+
children: o
|
|
94
|
+
}),
|
|
95
|
+
(l || n.badge) && /* @__PURE__ */ a("span", {
|
|
96
|
+
className: "flex shrink-0 gap-1",
|
|
97
|
+
children: [l && /* @__PURE__ */ i("span", {
|
|
98
|
+
className: "ui-cal-badge",
|
|
99
|
+
children: l
|
|
100
|
+
}), n.badge && /* @__PURE__ */ i("span", {
|
|
101
|
+
className: "ui-cal-badge",
|
|
102
|
+
children: n.badge
|
|
103
|
+
})]
|
|
104
|
+
})
|
|
105
|
+
]
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
function c({ block: n, resources: o }) {
|
|
109
|
+
let s = r(), c = n.kind ?? "available", l = c === "available" ? s.labels.available : s.labels.unavailable, u = s.hasBlockClick;
|
|
110
|
+
return /* @__PURE__ */ a("div", {
|
|
111
|
+
role: u ? "button" : void 0,
|
|
112
|
+
tabIndex: u ? 0 : void 0,
|
|
113
|
+
"aria-label": s.describeBlock(n),
|
|
114
|
+
className: e("text-text-tertiary flex items-start gap-3 px-3 py-1.5 text-2xs", u && "hover:bg-bg-hover cursor-pointer transition-colors duration-[100ms]", `ui-cal-c-${s.blockColor(n)}`),
|
|
115
|
+
onClick: u ? () => s.clickBlock(n) : void 0,
|
|
116
|
+
onKeyDown: u ? (e) => {
|
|
117
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), s.clickBlock(n));
|
|
118
|
+
} : void 0,
|
|
119
|
+
children: [
|
|
120
|
+
/* @__PURE__ */ i("span", {
|
|
121
|
+
className: "font-mono w-24 shrink-0",
|
|
122
|
+
children: t(n.start, n.end, s)
|
|
123
|
+
}),
|
|
124
|
+
/* @__PURE__ */ i("span", {
|
|
125
|
+
className: e("ui-cal-agenda-swatch mt-0.5", c === "unavailable" && "ui-cal-agenda-swatch-off"),
|
|
126
|
+
"aria-hidden": "true"
|
|
127
|
+
}),
|
|
128
|
+
/* @__PURE__ */ a("span", {
|
|
129
|
+
className: "min-w-0 flex-1 truncate",
|
|
130
|
+
children: [l, n.label ? ` · ${n.label}` : ""]
|
|
131
|
+
}),
|
|
132
|
+
o && /* @__PURE__ */ i("span", {
|
|
133
|
+
className: "hidden max-w-40 truncate sm:block",
|
|
134
|
+
children: o
|
|
135
|
+
})
|
|
136
|
+
]
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
//#endregion
|
|
140
|
+
export { o as AgendaView };
|