@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,321 @@
|
|
|
1
|
+
import { cn as e } from "../../../lib/cn.js";
|
|
2
|
+
import { usePortalContainer as t } from "../../../hooks/usePortalContainer.js";
|
|
3
|
+
import { useFixedPopupAt as n } from "../../../hooks/useAnchoredPopup.js";
|
|
4
|
+
import { useDismiss as r } from "../../../hooks/useDismiss.js";
|
|
5
|
+
import { formatTime as i, formatTimeRange as a, replaceResource as o } from "../../../lib/calendar.js";
|
|
6
|
+
import { useCalendarContext as s } from "./context.js";
|
|
7
|
+
import { useCallback as c, useEffect as l, useLayoutEffect as u, useMemo as d, useRef as f, useState as p } from "react";
|
|
8
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
9
|
+
import { X as ee } from "lucide-react";
|
|
10
|
+
import { createPortal as te } from "react-dom";
|
|
11
|
+
//#region src/components/ui/calendar/MonthView.tsx
|
|
12
|
+
var ne = 96, re = 224;
|
|
13
|
+
function g(e) {
|
|
14
|
+
return `${e.type}:${e.value.id}`;
|
|
15
|
+
}
|
|
16
|
+
function _({ date: _, events: v, availability: y, label: ie }) {
|
|
17
|
+
let b = s(), { addDays: x, daySegment: S, differenceInDays: ae, eventsOnDay: C, formatLongDate: w, fromDateKey: T, getFormatter: E, getMonthWeeks: D, isAllDayLike: oe, isSameDay: se, shiftRangeDays: ce, toDateKey: O } = b.dates, k = d(() => D(_, b.weekStartsOn), [
|
|
18
|
+
_,
|
|
19
|
+
b.weekStartsOn,
|
|
20
|
+
D
|
|
21
|
+
]), A = f(null), j = f(null), [M, N] = p(null), [P, F] = p(null), le = t(), I = f(null), [ue, L] = p(null), [R, z] = p(null), B = f(null), V = f(b);
|
|
22
|
+
u(() => {
|
|
23
|
+
V.current = b;
|
|
24
|
+
}), l(() => {
|
|
25
|
+
let e = B;
|
|
26
|
+
return () => {
|
|
27
|
+
e.current?.cleanup(), e.current = null;
|
|
28
|
+
};
|
|
29
|
+
}, []);
|
|
30
|
+
let H = f(!1), [U, de] = p(null);
|
|
31
|
+
l(() => {
|
|
32
|
+
let e = A.current;
|
|
33
|
+
if (!e || typeof ResizeObserver > "u") return;
|
|
34
|
+
let t = new ResizeObserver((e) => {
|
|
35
|
+
de(e[0]?.contentRect.height ?? null);
|
|
36
|
+
});
|
|
37
|
+
return t.observe(e), () => t.disconnect();
|
|
38
|
+
}, []);
|
|
39
|
+
let W = c(() => F(null), []);
|
|
40
|
+
r(P !== null, W, [j]), n(P !== null, I, j, (e, t) => {
|
|
41
|
+
let n = Math.max(e.width, re);
|
|
42
|
+
return {
|
|
43
|
+
top: Math.max(8, e.top),
|
|
44
|
+
left: Math.max(8, Math.min(e.left, t - n - 8)),
|
|
45
|
+
width: n
|
|
46
|
+
};
|
|
47
|
+
}), l(() => {
|
|
48
|
+
P && j.current?.querySelector("[data-cal-close]")?.focus();
|
|
49
|
+
}, [P]);
|
|
50
|
+
let G = b.editLayer === "availability", K = b.dates.parts(_).month, q = d(() => k.flat(), [k]), J = O(b.now), fe = q.find((e) => O(e) === J && b.dates.parts(e).month === K) ?? q.find((e) => b.dates.parts(e).month === K && b.dates.parts(e).day === b.dates.parts(_).day) ?? q.find((e) => b.dates.parts(e).month === K) ?? q[0], pe = M && q.some((e) => O(e) === M) ? M : O(fe), me = d(() => {
|
|
51
|
+
let e = /* @__PURE__ */ new Map();
|
|
52
|
+
for (let t of q) {
|
|
53
|
+
let n = C(v, t).map((e) => ({
|
|
54
|
+
type: "event",
|
|
55
|
+
value: e
|
|
56
|
+
})), r = y.filter((e) => S(e.start, e.end, t)).sort((e, t) => e.start.getTime() - t.start.getTime()), i = r.some((e) => (e.kind ?? "available") === "available"), a = G ? r.map((e) => ({
|
|
57
|
+
type: "availability",
|
|
58
|
+
value: e
|
|
59
|
+
})) : n;
|
|
60
|
+
e.set(O(t), {
|
|
61
|
+
items: a,
|
|
62
|
+
hasAvailable: i
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
return e;
|
|
66
|
+
}, [
|
|
67
|
+
q,
|
|
68
|
+
v,
|
|
69
|
+
y,
|
|
70
|
+
G,
|
|
71
|
+
C,
|
|
72
|
+
S,
|
|
73
|
+
O
|
|
74
|
+
]), he = E(b.locale, { weekday: "short" }), ge = b.monthMaxEvents ?? (U ? Math.max(1, Math.floor((Math.max(U / k.length, ne) - 28) / 20)) : 3);
|
|
75
|
+
function Y(e) {
|
|
76
|
+
let t = O(e);
|
|
77
|
+
N(t), requestAnimationFrame(() => {
|
|
78
|
+
A.current?.querySelector(`[data-cal-date="${t}"]`)?.focus();
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
function _e(e, t) {
|
|
82
|
+
if (e.target !== e.currentTarget) return;
|
|
83
|
+
let n = {
|
|
84
|
+
ArrowLeft: -1,
|
|
85
|
+
ArrowRight: 1,
|
|
86
|
+
ArrowUp: -7,
|
|
87
|
+
ArrowDown: 7
|
|
88
|
+
};
|
|
89
|
+
if (e.key in n) {
|
|
90
|
+
e.preventDefault();
|
|
91
|
+
let r = x(t, n[e.key]);
|
|
92
|
+
q.some((e) => se(e, r)) && Y(r);
|
|
93
|
+
} else if (e.key === "Home" || e.key === "End") {
|
|
94
|
+
e.preventDefault();
|
|
95
|
+
let n = (b.dates.weekday(t) - b.weekStartsOn + 7) % 7;
|
|
96
|
+
Y(x(t, e.key === "Home" ? -n : 6 - n));
|
|
97
|
+
} else (e.key === "Enter" || e.key === " ") && (e.preventDefault(), b.openDay(t));
|
|
98
|
+
}
|
|
99
|
+
function X(e) {
|
|
100
|
+
return e.type === "event" ? b.canEditEvent(e.value) : b.canEditBlock(e.value);
|
|
101
|
+
}
|
|
102
|
+
function Z(e, t) {
|
|
103
|
+
let n = {
|
|
104
|
+
action: "move",
|
|
105
|
+
...ce(e.value, t),
|
|
106
|
+
resourceIds: o(e.value.resourceId, void 0, void 0)
|
|
107
|
+
};
|
|
108
|
+
return e.type === "event" ? {
|
|
109
|
+
target: "event",
|
|
110
|
+
event: e.value,
|
|
111
|
+
...n
|
|
112
|
+
} : {
|
|
113
|
+
target: "availability",
|
|
114
|
+
availability: e.value,
|
|
115
|
+
...n
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
function Q(e) {
|
|
119
|
+
e.type === "event" ? b.clickEvent(e.value) : b.clickBlock(e.value);
|
|
120
|
+
}
|
|
121
|
+
function ve(e, t, n) {
|
|
122
|
+
if (e.button !== 0 || B.current || (e.stopPropagation(), e.pointerType === "touch" || !X(t))) return;
|
|
123
|
+
let r = (e) => {
|
|
124
|
+
let t = B.current;
|
|
125
|
+
if (!t || e.pointerId !== t.pointerId) return;
|
|
126
|
+
if (!t.started) {
|
|
127
|
+
if (Math.hypot(e.clientX - t.startX, e.clientY - t.startY) < 4) return;
|
|
128
|
+
t.started = !0, z(g(t.item));
|
|
129
|
+
}
|
|
130
|
+
let n = document.elementFromPoint(e.clientX, e.clientY)?.closest("[data-cal-date]"), r = n && A.current?.contains(n) ? n.dataset.calDate ?? null : null;
|
|
131
|
+
t.overKey = r ?? void 0, L(r);
|
|
132
|
+
}, i = (e) => {
|
|
133
|
+
let t = B.current;
|
|
134
|
+
if (!t || (B.current = null, t.cleanup(), L(null), z(null), t.started && (H.current = !0, setTimeout(() => {
|
|
135
|
+
H.current = !1;
|
|
136
|
+
}, 0)), !e || !t.started || !t.overKey || t.overKey === t.originKey)) return;
|
|
137
|
+
let n = ae(T(t.overKey), T(t.originKey));
|
|
138
|
+
V.current.commit(Z(t.item, n), "pointer");
|
|
139
|
+
}, a = (e) => {
|
|
140
|
+
e.pointerId === B.current?.pointerId && i(!0);
|
|
141
|
+
}, o = (e) => {
|
|
142
|
+
e.pointerId === B.current?.pointerId && i(!1);
|
|
143
|
+
}, s = (e) => {
|
|
144
|
+
e.key === "Escape" && i(!1);
|
|
145
|
+
};
|
|
146
|
+
window.addEventListener("pointermove", r), window.addEventListener("pointerup", a), window.addEventListener("pointercancel", o), window.addEventListener("keydown", s), B.current = {
|
|
147
|
+
item: t,
|
|
148
|
+
originKey: n,
|
|
149
|
+
pointerId: e.pointerId,
|
|
150
|
+
startX: e.clientX,
|
|
151
|
+
startY: e.clientY,
|
|
152
|
+
started: !1,
|
|
153
|
+
cleanup: () => {
|
|
154
|
+
window.removeEventListener("pointermove", r), window.removeEventListener("pointerup", a), window.removeEventListener("pointercancel", o), window.removeEventListener("keydown", s);
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
function ye(e) {
|
|
159
|
+
H.current || Q(e);
|
|
160
|
+
}
|
|
161
|
+
function be(e, t) {
|
|
162
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
163
|
+
e.preventDefault(), e.stopPropagation(), Q(t);
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
if (e.altKey && (e.key === "ArrowLeft" || e.key === "ArrowRight")) {
|
|
167
|
+
if (e.preventDefault(), e.stopPropagation(), !X(t)) return;
|
|
168
|
+
b.commit(Z(t, e.key === "ArrowLeft" ? -1 : 1), "keyboard");
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
function xe(e, t) {
|
|
172
|
+
e.target !== e.currentTarget || !b.selectable || b.commit({
|
|
173
|
+
target: "selection",
|
|
174
|
+
action: "create",
|
|
175
|
+
start: t,
|
|
176
|
+
end: x(t, 1),
|
|
177
|
+
allDay: !0
|
|
178
|
+
}, "pointer");
|
|
179
|
+
}
|
|
180
|
+
let $ = (t, n) => {
|
|
181
|
+
let r = g(t), o = t.value.placeholder ? {
|
|
182
|
+
"aria-hidden": !0,
|
|
183
|
+
"data-placeholder": !0
|
|
184
|
+
} : {
|
|
185
|
+
role: "button",
|
|
186
|
+
tabIndex: 0,
|
|
187
|
+
onPointerDown: (e) => ve(e, t, n),
|
|
188
|
+
onClick: () => ye(t),
|
|
189
|
+
onKeyDown: (e) => be(e, t)
|
|
190
|
+
};
|
|
191
|
+
if (t.type === "availability") {
|
|
192
|
+
let n = t.value;
|
|
193
|
+
return /* @__PURE__ */ h("div", {
|
|
194
|
+
className: e("ui-cal-chip", `ui-cal-c-${b.blockColor(n)}`),
|
|
195
|
+
"data-all-day": !0,
|
|
196
|
+
"data-dragging": R === r || void 0,
|
|
197
|
+
"aria-label": n.placeholder ? void 0 : b.describeBlock(n),
|
|
198
|
+
...o,
|
|
199
|
+
children: [b.display.time && /* @__PURE__ */ m("span", {
|
|
200
|
+
className: "ui-cal-meta font-mono shrink-0",
|
|
201
|
+
children: a(n.start, n.end, b)
|
|
202
|
+
}), b.display.blockLabels && /* @__PURE__ */ m("span", {
|
|
203
|
+
className: "ui-cal-title",
|
|
204
|
+
children: n.label ?? ((n.kind ?? "available") === "available" ? b.labels.available : b.labels.unavailable)
|
|
205
|
+
})]
|
|
206
|
+
}, r);
|
|
207
|
+
}
|
|
208
|
+
let s = t.value, c = oe(s), l = b.statusLabel(s);
|
|
209
|
+
return /* @__PURE__ */ h("div", {
|
|
210
|
+
className: e("ui-cal-chip", `ui-cal-c-${b.eventColor(s)}`),
|
|
211
|
+
"data-all-day": c || void 0,
|
|
212
|
+
"data-status": s.status ?? "confirmed",
|
|
213
|
+
"data-dragging": R === r || void 0,
|
|
214
|
+
"aria-label": s.placeholder ? void 0 : b.describeEvent(s),
|
|
215
|
+
title: l ? `${s.title} (${l})` : s.title,
|
|
216
|
+
...o,
|
|
217
|
+
children: [
|
|
218
|
+
!c && /* @__PURE__ */ m("span", {
|
|
219
|
+
className: "ui-cal-dot",
|
|
220
|
+
"aria-hidden": "true"
|
|
221
|
+
}),
|
|
222
|
+
!c && b.display.time && /* @__PURE__ */ m("span", {
|
|
223
|
+
className: "ui-cal-meta font-mono shrink-0",
|
|
224
|
+
children: i(s.start, b)
|
|
225
|
+
}),
|
|
226
|
+
/* @__PURE__ */ m("span", {
|
|
227
|
+
className: "ui-cal-title font-medium",
|
|
228
|
+
children: s.title
|
|
229
|
+
})
|
|
230
|
+
]
|
|
231
|
+
}, r);
|
|
232
|
+
};
|
|
233
|
+
return /* @__PURE__ */ h("div", {
|
|
234
|
+
className: "flex min-h-0 flex-1 flex-col",
|
|
235
|
+
children: [/* @__PURE__ */ m("div", {
|
|
236
|
+
className: "border-border grid grid-cols-7 border-b",
|
|
237
|
+
"aria-hidden": "true",
|
|
238
|
+
children: k[0].map((e) => /* @__PURE__ */ m("div", {
|
|
239
|
+
className: "text-text-tertiary py-1.5 text-center text-2xs font-medium uppercase",
|
|
240
|
+
children: he.format(e)
|
|
241
|
+
}, b.dates.weekday(e)))
|
|
242
|
+
}), /* @__PURE__ */ m("div", {
|
|
243
|
+
ref: A,
|
|
244
|
+
role: "grid",
|
|
245
|
+
"aria-label": ie,
|
|
246
|
+
"data-cal-drag": R ? "move" : void 0,
|
|
247
|
+
className: "ui-cal-scroll flex min-h-0 flex-1 flex-col overflow-y-auto",
|
|
248
|
+
children: k.map((t) => /* @__PURE__ */ m("div", {
|
|
249
|
+
role: "row",
|
|
250
|
+
className: "grid min-h-24 flex-1 grid-cols-7",
|
|
251
|
+
children: t.map((t) => {
|
|
252
|
+
let n = O(t), r = me.get(n), i = r?.items ?? [], a = Math.max(1, ge), o = i.length > a, s = o ? i.slice(0, a - 1) : i, c = n === J, l = b.dates.parts(t).month !== K, u = b.hasAvailability && b.shadeOutsideAvailability && !r?.hasAvailable;
|
|
253
|
+
return /* @__PURE__ */ h("div", {
|
|
254
|
+
role: "gridcell",
|
|
255
|
+
tabIndex: n === pe ? 0 : -1,
|
|
256
|
+
"data-cal-date": n,
|
|
257
|
+
"data-outside-month": l || void 0,
|
|
258
|
+
"data-unavailable": u || void 0,
|
|
259
|
+
"data-drop-target": ue === n || void 0,
|
|
260
|
+
"aria-label": `${w(t, b.locale)}${i.length ? `, ${b.labels.eventCount(i.length)}` : ""}`,
|
|
261
|
+
"aria-current": c ? "date" : void 0,
|
|
262
|
+
className: "ui-cal-month-cell flex flex-col gap-0.5 p-1",
|
|
263
|
+
onFocus: (e) => {
|
|
264
|
+
e.target === e.currentTarget && N(n);
|
|
265
|
+
},
|
|
266
|
+
onKeyDown: (e) => _e(e, t),
|
|
267
|
+
onClick: (e) => xe(e, t),
|
|
268
|
+
children: [
|
|
269
|
+
/* @__PURE__ */ m("button", {
|
|
270
|
+
type: "button",
|
|
271
|
+
tabIndex: -1,
|
|
272
|
+
onClick: () => b.openDay(t),
|
|
273
|
+
"aria-label": w(t, b.locale),
|
|
274
|
+
className: e("flex h-5 min-w-5 cursor-pointer items-center justify-center self-start rounded-full px-1 text-2xs font-semibold transition-colors duration-[100ms]", c ? "bg-accent text-text-on-accent" : l ? "text-text-tertiary hover:bg-bg-hover" : "text-text-primary hover:bg-bg-hover"),
|
|
275
|
+
children: b.dates.parts(t).day
|
|
276
|
+
}),
|
|
277
|
+
s.map((e) => $(e, n)),
|
|
278
|
+
o && /* @__PURE__ */ m("button", {
|
|
279
|
+
type: "button",
|
|
280
|
+
className: "text-text-secondary hover:bg-bg-hover hover:text-text-primary cursor-pointer self-start rounded-md px-1 text-2xs font-medium transition-colors duration-[100ms]",
|
|
281
|
+
"aria-haspopup": "dialog",
|
|
282
|
+
"aria-expanded": P === n,
|
|
283
|
+
onClick: (e) => {
|
|
284
|
+
I.current = e.currentTarget.closest("[data-cal-date]"), F(n);
|
|
285
|
+
},
|
|
286
|
+
children: b.labels.more(i.length - s.length)
|
|
287
|
+
}),
|
|
288
|
+
P === n && te(/* @__PURE__ */ m("div", {
|
|
289
|
+
ref: j,
|
|
290
|
+
role: "dialog",
|
|
291
|
+
"aria-label": w(t, b.locale),
|
|
292
|
+
className: "ui-cal ui-cal-popover ui-glass ui-glass-popover flex flex-col gap-0.5",
|
|
293
|
+
children: /* @__PURE__ */ h("div", {
|
|
294
|
+
className: "ui-cal-popover-scroll",
|
|
295
|
+
children: [/* @__PURE__ */ h("div", {
|
|
296
|
+
className: "mb-1 flex items-center justify-between gap-2 pl-1",
|
|
297
|
+
children: [/* @__PURE__ */ m("button", {
|
|
298
|
+
type: "button",
|
|
299
|
+
className: "text-text-primary cursor-pointer text-xs font-semibold hover:underline",
|
|
300
|
+
onClick: () => b.openDay(t),
|
|
301
|
+
children: w(t, b.locale)
|
|
302
|
+
}), /* @__PURE__ */ m("button", {
|
|
303
|
+
type: "button",
|
|
304
|
+
"aria-label": b.labels.close,
|
|
305
|
+
className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover flex h-6 w-6 cursor-pointer items-center justify-center rounded-md transition-colors duration-[100ms]",
|
|
306
|
+
onClick: W,
|
|
307
|
+
"data-cal-close": !0,
|
|
308
|
+
children: /* @__PURE__ */ m(ee, { className: "h-3.5 w-3.5" })
|
|
309
|
+
})]
|
|
310
|
+
}), i.map((e) => $(e, n))]
|
|
311
|
+
})
|
|
312
|
+
}), le ?? document.body)
|
|
313
|
+
]
|
|
314
|
+
}, n);
|
|
315
|
+
})
|
|
316
|
+
}, O(t[0])))
|
|
317
|
+
})]
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
//#endregion
|
|
321
|
+
export { _ as MonthView };
|