@refraction-ui/astro 0.4.0 → 0.4.4
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/dist/accordion/index.ts +1 -0
- package/dist/ai/ai-manager.ts +121 -0
- package/dist/ai/index.ts +23 -0
- package/dist/ai/mock-providers.ts +68 -0
- package/dist/ai/sanitizer.ts +174 -0
- package/dist/ai/tts-manager.ts +80 -0
- package/dist/ai/types.ts +72 -0
- package/dist/animated-text/animated-text.styles.ts +28 -0
- package/dist/animated-text/animated-text.ts +83 -0
- package/dist/animated-text/index.ts +15 -0
- package/dist/app-shell/app-shell.ts +252 -0
- package/dist/app-shell/auth-shell.ts +84 -0
- package/dist/app-shell/index.ts +22 -0
- package/dist/app-shell/page-shell.ts +125 -0
- package/dist/astro-accordion/Button.astro +55 -0
- package/dist/astro-accordion/index.ts +1 -0
- package/dist/astro-ai/AIScript.astro +69 -0
- package/dist/astro-ai/TTSScript.astro +60 -0
- package/dist/astro-ai/index.ts +16 -0
- package/dist/astro-animated-text/AnimatedText.astro +81 -0
- package/dist/astro-animated-text/TypewriterText.astro +90 -0
- package/dist/astro-animated-text/index.ts +1 -0
- package/dist/astro-app-shell/AppShell.astro +195 -0
- package/dist/astro-app-shell/AppShellContent.astro +29 -0
- package/dist/astro-app-shell/AppShellHeader.astro +54 -0
- package/dist/astro-app-shell/AppShellMain.astro +18 -0
- package/dist/astro-app-shell/AppShellMobileNav.astro +27 -0
- package/dist/astro-app-shell/AppShellOverlay.astro +21 -0
- package/dist/astro-app-shell/AppShellSidebar.astro +26 -0
- package/dist/astro-app-shell/AuthShell.astro +31 -0
- package/dist/astro-app-shell/AuthShellCard.astro +24 -0
- package/dist/astro-app-shell/PageShell.astro +36 -0
- package/dist/astro-app-shell/PageShellFooter.astro +30 -0
- package/dist/astro-app-shell/PageShellNav.astro +33 -0
- package/dist/astro-app-shell/PageShellSection.astro +32 -0
- package/dist/astro-app-shell/index.ts +21 -0
- package/dist/astro-auth/AuthGuard.astro +133 -0
- package/dist/astro-auth/index.ts +5 -0
- package/dist/astro-avatar/Avatar.astro +22 -0
- package/dist/astro-avatar/AvatarFallback.astro +18 -0
- package/dist/astro-avatar/AvatarImage.astro +48 -0
- package/dist/astro-avatar/index.ts +1 -0
- package/dist/astro-avatar-group/AvatarGroup.astro +42 -0
- package/dist/astro-avatar-group/index.ts +1 -0
- package/dist/astro-badge/Badge.astro +27 -0
- package/dist/astro-badge/index.ts +1 -0
- package/dist/astro-bottom-nav/BottomNav.astro +40 -0
- package/dist/astro-bottom-nav/index.ts +1 -0
- package/dist/astro-breadcrumbs/Breadcrumbs.astro +56 -0
- package/dist/astro-breadcrumbs/index.ts +1 -0
- package/dist/astro-button/Button.astro +55 -0
- package/dist/astro-button/index.ts +1 -0
- package/dist/astro-calendar/Calendar.astro +259 -0
- package/dist/astro-calendar/index.ts +1 -0
- package/dist/astro-callout/Callout.astro +3 -0
- package/dist/astro-callout/index.ts +1 -0
- package/dist/astro-card/Card.astro +20 -0
- package/dist/astro-card/CardContent.astro +13 -0
- package/dist/astro-card/CardDescription.astro +13 -0
- package/dist/astro-card/CardFooter.astro +13 -0
- package/dist/astro-card/CardHeader.astro +13 -0
- package/dist/astro-card/CardTitle.astro +15 -0
- package/dist/astro-card/index.ts +1 -0
- package/dist/astro-card-grid/CardGrid.astro +17 -0
- package/dist/astro-card-grid/index.ts +1 -0
- package/dist/astro-carousel/Button.astro +55 -0
- package/dist/astro-carousel/index.ts +1 -0
- package/dist/astro-charts/Bars.astro +53 -0
- package/dist/astro-charts/Chart.astro +31 -0
- package/dist/astro-charts/Circles.astro +48 -0
- package/dist/astro-charts/Gradient.astro +34 -0
- package/dist/astro-charts/Histogram.astro +107 -0
- package/dist/astro-charts/Line.astro +55 -0
- package/dist/astro-charts/PieChart.astro +63 -0
- package/dist/astro-charts/ScatterPlot.astro +95 -0
- package/dist/astro-charts/XAxis.astro +46 -0
- package/dist/astro-charts/YAxis.astro +44 -0
- package/dist/astro-charts/index.ts +26 -0
- package/dist/astro-checkbox/Checkbox.astro +129 -0
- package/dist/astro-checkbox/index.ts +1 -0
- package/dist/astro-code-block/CodeBlock.astro +3 -0
- package/dist/astro-code-block/index.ts +1 -0
- package/dist/astro-code-editor/CodeEditor.astro +123 -0
- package/dist/astro-code-editor/index.ts +1 -0
- package/dist/astro-collapsible/Collapsible.astro +58 -0
- package/dist/astro-collapsible/CollapsibleContent.astro +21 -0
- package/dist/astro-collapsible/CollapsibleTrigger.astro +17 -0
- package/dist/astro-collapsible/index.ts +1 -0
- package/dist/astro-command/Command.astro +170 -0
- package/dist/astro-command/CommandEmpty.astro +17 -0
- package/dist/astro-command/CommandGroup.astro +25 -0
- package/dist/astro-command/CommandInput.astro +21 -0
- package/dist/astro-command/CommandItem.astro +26 -0
- package/dist/astro-command/CommandList.astro +17 -0
- package/dist/astro-command/CommandSeparator.astro +14 -0
- package/dist/astro-command/index.ts +1 -0
- package/dist/astro-command-input/CommandInput.astro +6 -0
- package/dist/astro-command-input/index.ts +1 -0
- package/dist/astro-content-protection/ContentProtection.astro +104 -0
- package/dist/astro-content-protection/index.ts +1 -0
- package/dist/astro-data-table/DataTable.astro +263 -0
- package/dist/astro-data-table/index.ts +1 -0
- package/dist/astro-date-picker/DatePicker.astro +398 -0
- package/dist/astro-date-picker/index.ts +1 -0
- package/dist/astro-device-frame/DeviceFrame.astro +44 -0
- package/dist/astro-device-frame/index.ts +1 -0
- package/dist/astro-dialog/Dialog.astro +138 -0
- package/dist/astro-dialog/DialogClose.astro +16 -0
- package/dist/astro-dialog/DialogContent.astro +24 -0
- package/dist/astro-dialog/DialogDescription.astro +15 -0
- package/dist/astro-dialog/DialogFooter.astro +14 -0
- package/dist/astro-dialog/DialogHeader.astro +14 -0
- package/dist/astro-dialog/DialogOverlay.astro +17 -0
- package/dist/astro-dialog/DialogTitle.astro +15 -0
- package/dist/astro-dialog/DialogTrigger.astro +18 -0
- package/dist/astro-dialog/index.ts +1 -0
- package/dist/astro-diff-viewer/DiffViewer.astro +371 -0
- package/dist/astro-diff-viewer/index.ts +1 -0
- package/dist/astro-dropdown-menu/DropdownMenu.astro +138 -0
- package/dist/astro-dropdown-menu/DropdownMenuContent.astro +20 -0
- package/dist/astro-dropdown-menu/DropdownMenuItem.astro +21 -0
- package/dist/astro-dropdown-menu/DropdownMenuLabel.astro +14 -0
- package/dist/astro-dropdown-menu/DropdownMenuSeparator.astro +14 -0
- package/dist/astro-dropdown-menu/DropdownMenuTrigger.astro +18 -0
- package/dist/astro-dropdown-menu/index.ts +1 -0
- package/dist/astro-emoji-picker/EmojiPicker.astro +255 -0
- package/dist/astro-emoji-picker/index.ts +1 -0
- package/dist/astro-feedback-dialog/FeedbackDialog.astro +152 -0
- package/dist/astro-feedback-dialog/index.ts +1 -0
- package/dist/astro-file-tree/astro-file-tree.astro +4 -0
- package/dist/astro-file-tree/index.ts +1 -0
- package/dist/astro-file-upload/FileUpload.astro +306 -0
- package/dist/astro-file-upload/index.ts +1 -0
- package/dist/astro-footer/Footer.astro +61 -0
- package/dist/astro-footer/index.ts +1 -0
- package/dist/astro-icon-system/astro-icon-system.astro +4 -0
- package/dist/astro-icon-system/index.ts +1 -0
- package/dist/astro-inline-editor/InlineEditor.astro +169 -0
- package/dist/astro-inline-editor/index.ts +1 -0
- package/dist/astro-input/Input.astro +49 -0
- package/dist/astro-input/index.ts +1 -0
- package/dist/astro-input-group/InputGroup.astro +29 -0
- package/dist/astro-input-group/InputGroupAddon.astro +14 -0
- package/dist/astro-input-group/InputGroupButton.astro +19 -0
- package/dist/astro-input-group/InputGroupText.astro +11 -0
- package/dist/astro-input-group/index.ts +1 -0
- package/dist/astro-install-prompt/InstallPrompt.astro +115 -0
- package/dist/astro-install-prompt/index.ts +1 -0
- package/dist/astro-keyboard-shortcut/KeyboardShortcut.astro +83 -0
- package/dist/astro-keyboard-shortcut/ShortcutBadge.astro +41 -0
- package/dist/astro-keyboard-shortcut/index.ts +1 -0
- package/dist/astro-language-selector/LanguageSelector.astro +247 -0
- package/dist/astro-language-selector/index.ts +1 -0
- package/dist/astro-link-card/LinkCard.astro +17 -0
- package/dist/astro-link-card/index.ts +1 -0
- package/dist/astro-markdown-renderer/MarkdownRenderer.astro +62 -0
- package/dist/astro-markdown-renderer/index.ts +1 -0
- package/dist/astro-mobile-nav/MobileNav.astro +84 -0
- package/dist/astro-mobile-nav/MobileNavContent.astro +29 -0
- package/dist/astro-mobile-nav/MobileNavLink.astro +16 -0
- package/dist/astro-mobile-nav/MobileNavTrigger.astro +57 -0
- package/dist/astro-mobile-nav/index.ts +1 -0
- package/dist/astro-navbar/Navbar.astro +49 -0
- package/dist/astro-navbar/index.ts +1 -0
- package/dist/astro-otp-input/OtpInput.astro +253 -0
- package/dist/astro-otp-input/index.ts +1 -0
- package/dist/astro-pagination/Pagination.astro +3 -0
- package/dist/astro-pagination/index.ts +1 -0
- package/dist/astro-payment/Payment.astro +19 -0
- package/dist/astro-payment/index.ts +1 -0
- package/dist/astro-popover/Popover.astro +87 -0
- package/dist/astro-popover/PopoverClose.astro +16 -0
- package/dist/astro-popover/PopoverContent.astro +23 -0
- package/dist/astro-popover/PopoverTrigger.astro +18 -0
- package/dist/astro-popover/index.ts +1 -0
- package/dist/astro-presence-indicator/PresenceIndicator.astro +26 -0
- package/dist/astro-presence-indicator/index.ts +1 -0
- package/dist/astro-progress-display/BadgeDisplay.astro +33 -0
- package/dist/astro-progress-display/ProgressBar.astro +27 -0
- package/dist/astro-progress-display/StatsGrid.astro +32 -0
- package/dist/astro-progress-display/index.ts +1 -0
- package/dist/astro-radio/RadioGroup.astro +111 -0
- package/dist/astro-radio/RadioItem.astro +36 -0
- package/dist/astro-radio/index.ts +1 -0
- package/dist/astro-reaction-bar/ReactionBar.astro +117 -0
- package/dist/astro-reaction-bar/index.ts +1 -0
- package/dist/astro-resizable-layout/ResizableDivider.astro +27 -0
- package/dist/astro-resizable-layout/ResizableLayout.astro +162 -0
- package/dist/astro-resizable-layout/ResizablePane.astro +28 -0
- package/dist/astro-resizable-layout/index.ts +11 -0
- package/dist/astro-rich-editor/RichEditor.astro +260 -0
- package/dist/astro-rich-editor/index.ts +25 -0
- package/dist/astro-search-bar/SearchBar.astro +140 -0
- package/dist/astro-search-bar/SearchResultItem.astro +16 -0
- package/dist/astro-search-bar/SearchResults.astro +17 -0
- package/dist/astro-search-bar/index.ts +1 -0
- package/dist/astro-select/Select.astro +165 -0
- package/dist/astro-select/SelectContent.astro +19 -0
- package/dist/astro-select/SelectItem.astro +42 -0
- package/dist/astro-select/SelectTrigger.astro +36 -0
- package/dist/astro-select/index.ts +1 -0
- package/dist/astro-sidebar/Sidebar.astro +64 -0
- package/dist/astro-sidebar/index.ts +1 -0
- package/dist/astro-skeleton/Skeleton.astro +39 -0
- package/dist/astro-skeleton/SkeletonText.astro +22 -0
- package/dist/astro-skeleton/index.ts +1 -0
- package/dist/astro-skip-to-content/SkipToContent.astro +3 -0
- package/dist/astro-skip-to-content/index.ts +1 -0
- package/dist/astro-slide-viewer/SlideViewer.astro +231 -0
- package/dist/astro-slide-viewer/index.ts +1 -0
- package/dist/astro-slider/index.ts +1 -0
- package/dist/astro-status-indicator/StatusIndicator.astro +31 -0
- package/dist/astro-status-indicator/index.ts +1 -0
- package/dist/astro-steps/Steps.astro +3 -0
- package/dist/astro-steps/index.ts +1 -0
- package/dist/astro-switch/Switch.astro +89 -0
- package/dist/astro-switch/index.ts +1 -0
- package/dist/astro-table-of-contents/TableOfContents.astro +53 -0
- package/dist/astro-table-of-contents/index.ts +1 -0
- package/dist/astro-tabs/Tabs.astro +96 -0
- package/dist/astro-tabs/TabsContent.astro +20 -0
- package/dist/astro-tabs/TabsList.astro +16 -0
- package/dist/astro-tabs/TabsTrigger.astro +24 -0
- package/dist/astro-tabs/index.ts +1 -0
- package/dist/astro-textarea/Textarea.astro +51 -0
- package/dist/astro-textarea/index.ts +1 -0
- package/dist/astro-theme/ThemeScript.astro +13 -0
- package/dist/astro-theme/ThemeToggle.astro +279 -0
- package/dist/astro-theme/index.ts +1 -0
- package/dist/astro-thread-view/ThreadView.astro +159 -0
- package/dist/astro-thread-view/index.ts +1 -0
- package/dist/astro-toast/Toast.astro +49 -0
- package/dist/astro-toast/Toaster.astro +142 -0
- package/dist/astro-toast/index.ts +1 -0
- package/dist/astro-tooltip/Tooltip.astro +95 -0
- package/dist/astro-tooltip/TooltipContent.astro +22 -0
- package/dist/astro-tooltip/TooltipTrigger.astro +16 -0
- package/dist/astro-tooltip/index.ts +1 -0
- package/dist/astro-version-selector/VersionSelector.astro +174 -0
- package/dist/astro-version-selector/index.ts +1 -0
- package/dist/astro-video-player/VideoPlayer.astro +153 -0
- package/dist/astro-video-player/index.ts +1 -0
- package/dist/auth/adapters/mock.ts +74 -0
- package/dist/auth/auth-machine.ts +120 -0
- package/dist/auth/index.ts +22 -0
- package/dist/auth/rbac.ts +44 -0
- package/dist/auth/types.ts +44 -0
- package/dist/avatar/avatar.styles.ts +47 -0
- package/dist/avatar/avatar.ts +73 -0
- package/dist/avatar/index.ts +15 -0
- package/dist/avatar-group/avatar-group.styles.ts +63 -0
- package/dist/avatar-group/avatar-group.ts +106 -0
- package/dist/avatar-group/index.ts +18 -0
- package/dist/badge/badge.styles.ts +24 -0
- package/dist/badge/badge.ts +48 -0
- package/dist/badge/index.ts +10 -0
- package/dist/bottom-nav/bottom-nav.styles.ts +18 -0
- package/dist/bottom-nav/bottom-nav.ts +33 -0
- package/dist/bottom-nav/index.ts +2 -0
- package/dist/breadcrumbs/breadcrumbs.styles.ts +20 -0
- package/dist/breadcrumbs/breadcrumbs.ts +72 -0
- package/dist/breadcrumbs/index.ts +8 -0
- package/dist/button/button.styles.ts +38 -0
- package/dist/button/button.ts +64 -0
- package/dist/button/index.ts +10 -0
- package/dist/calendar/calendar.styles.ts +21 -0
- package/dist/calendar/calendar.ts +202 -0
- package/dist/calendar/index.ts +9 -0
- package/dist/callout/callout.ts +1 -0
- package/dist/callout/index.ts +1 -0
- package/dist/card/card.styles.ts +55 -0
- package/dist/card/card.ts +45 -0
- package/dist/card/index.ts +20 -0
- package/dist/card-grid/card-grid.ts +9 -0
- package/dist/card-grid/index.ts +1 -0
- package/dist/carousel/index.ts +1 -0
- package/dist/charts/axis.ts +50 -0
- package/dist/charts/chart.ts +73 -0
- package/dist/charts/colorblind.ts +100 -0
- package/dist/charts/data.ts +72 -0
- package/dist/charts/geometry.ts +54 -0
- package/dist/charts/index.ts +61 -0
- package/dist/charts/scales.ts +151 -0
- package/dist/checkbox/checkbox.styles.ts +33 -0
- package/dist/checkbox/checkbox.ts +73 -0
- package/dist/checkbox/index.ts +10 -0
- package/dist/code-block/code-block.ts +1 -0
- package/dist/code-block/index.ts +1 -0
- package/dist/code-editor/code-editor.styles.ts +32 -0
- package/dist/code-editor/code-editor.ts +140 -0
- package/dist/code-editor/index.ts +9 -0
- package/dist/collapsible/collapsible.styles.ts +14 -0
- package/dist/collapsible/collapsible.ts +93 -0
- package/dist/collapsible/index.ts +7 -0
- package/dist/command/command.styles.ts +27 -0
- package/dist/command/command.ts +179 -0
- package/dist/command/index.ts +14 -0
- package/dist/command-input/command-input.ts +176 -0
- package/dist/command-input/index.ts +1 -0
- package/dist/content-protection/content-protection.styles.ts +9 -0
- package/dist/content-protection/content-protection.ts +68 -0
- package/dist/content-protection/index.ts +8 -0
- package/dist/data-table/data-table.styles.ts +55 -0
- package/dist/data-table/data-table.ts +183 -0
- package/dist/data-table/index.ts +15 -0
- package/dist/date-picker/date-picker.styles.ts +31 -0
- package/dist/date-picker/date-picker.ts +333 -0
- package/dist/date-picker/index.ts +18 -0
- package/dist/device-frame/device-frame.styles.ts +21 -0
- package/dist/device-frame/device-frame.ts +112 -0
- package/dist/device-frame/index.ts +10 -0
- package/dist/dialog/dialog.styles.ts +8 -0
- package/dist/dialog/dialog.ts +133 -0
- package/dist/dialog/index.ts +8 -0
- package/dist/diff-viewer/diff-viewer.styles.ts +124 -0
- package/dist/diff-viewer/diff-viewer.ts +255 -0
- package/dist/diff-viewer/index.ts +20 -0
- package/dist/dropdown-menu/dropdown-menu.styles.ts +9 -0
- package/dist/dropdown-menu/dropdown-menu.ts +139 -0
- package/dist/dropdown-menu/index.ts +9 -0
- package/dist/emoji-picker/emoji-data.ts +282 -0
- package/dist/emoji-picker/emoji-picker.styles.ts +32 -0
- package/dist/emoji-picker/emoji-picker.ts +165 -0
- package/dist/emoji-picker/index.ts +25 -0
- package/dist/feedback-dialog/feedback-dialog.styles.ts +15 -0
- package/dist/feedback-dialog/feedback-dialog.ts +147 -0
- package/dist/feedback-dialog/index.ts +11 -0
- package/dist/file-upload/file-upload.styles.ts +30 -0
- package/dist/file-upload/file-upload.ts +260 -0
- package/dist/file-upload/index.ts +19 -0
- package/dist/footer/footer.styles.ts +5 -0
- package/dist/footer/footer.ts +32 -0
- package/dist/footer/index.ts +9 -0
- package/dist/index.ts +77 -0
- package/dist/inline-editor/index.ts +13 -0
- package/dist/inline-editor/inline-editor.styles.ts +42 -0
- package/dist/inline-editor/inline-editor.ts +96 -0
- package/dist/input/index.ts +9 -0
- package/dist/input/input.styles.ts +15 -0
- package/dist/input/input.ts +84 -0
- package/dist/input-group/index.ts +13 -0
- package/dist/input-group/input-group.styles.ts +50 -0
- package/dist/input-group/input-group.ts +44 -0
- package/dist/install-prompt/index.ts +9 -0
- package/dist/install-prompt/install-prompt.styles.ts +5 -0
- package/dist/install-prompt/install-prompt.ts +68 -0
- package/dist/keyboard-shortcut/index.ts +12 -0
- package/dist/keyboard-shortcut/keyboard-shortcut.styles.ts +8 -0
- package/dist/keyboard-shortcut/keyboard-shortcut.ts +153 -0
- package/dist/language-selector/index.ts +8 -0
- package/dist/language-selector/language-selector.styles.ts +28 -0
- package/dist/language-selector/language-selector.ts +149 -0
- package/dist/link-card/index.ts +1 -0
- package/dist/link-card/link-card.ts +9 -0
- package/dist/markdown-renderer/index.ts +8 -0
- package/dist/markdown-renderer/markdown-renderer.styles.ts +31 -0
- package/dist/markdown-renderer/markdown-renderer.ts +251 -0
- package/dist/mobile-nav/index.ts +14 -0
- package/dist/mobile-nav/mobile-nav.styles.ts +39 -0
- package/dist/mobile-nav/mobile-nav.ts +74 -0
- package/dist/navbar/index.ts +9 -0
- package/dist/navbar/navbar.styles.ts +29 -0
- package/dist/navbar/navbar.ts +39 -0
- package/dist/otp-input/index.ts +13 -0
- package/dist/otp-input/otp-input.styles.ts +51 -0
- package/dist/otp-input/otp-input.ts +198 -0
- package/dist/pagination/index.ts +1 -0
- package/dist/payment/index.ts +1 -0
- package/dist/payment/payment.ts +16 -0
- package/dist/popover/index.ts +7 -0
- package/dist/popover/popover.styles.ts +16 -0
- package/dist/popover/popover.ts +89 -0
- package/dist/presence-indicator/index.ts +14 -0
- package/dist/presence-indicator/presence-indicator.styles.ts +29 -0
- package/dist/presence-indicator/presence-indicator.ts +63 -0
- package/dist/progress-display/index.ts +15 -0
- package/dist/progress-display/progress-display.styles.ts +72 -0
- package/dist/progress-display/progress-display.ts +60 -0
- package/dist/radio/index.ts +8 -0
- package/dist/radio/radio.styles.ts +34 -0
- package/dist/radio/radio.ts +70 -0
- package/dist/reaction-bar/index.ts +14 -0
- package/dist/reaction-bar/reaction-bar.styles.ts +23 -0
- package/dist/reaction-bar/reaction-bar.ts +87 -0
- package/dist/resizable-layout/index.ts +12 -0
- package/dist/resizable-layout/resizable-layout.styles.ts +50 -0
- package/dist/resizable-layout/resizable-layout.ts +139 -0
- package/dist/rich-editor/editor.ts +342 -0
- package/dist/rich-editor/emoji.ts +175 -0
- package/dist/rich-editor/history.ts +79 -0
- package/dist/rich-editor/index.ts +106 -0
- package/dist/rich-editor/markdown-shortcuts.ts +248 -0
- package/dist/rich-editor/mentions.ts +162 -0
- package/dist/rich-editor/model.ts +206 -0
- package/dist/rich-editor/operations.ts +772 -0
- package/dist/rich-editor/selection.ts +157 -0
- package/dist/rich-editor/serialization.ts +711 -0
- package/dist/rich-editor/slash-commands.ts +212 -0
- package/dist/search-bar/index.ts +7 -0
- package/dist/search-bar/search-bar.styles.ts +29 -0
- package/dist/search-bar/search-bar.ts +130 -0
- package/dist/select/index.ts +13 -0
- package/dist/select/select.styles.ts +52 -0
- package/dist/select/select.ts +152 -0
- package/dist/shared/a11y.ts +33 -0
- package/dist/shared/aria.ts +30 -0
- package/dist/shared/cn.ts +35 -0
- package/dist/shared/cva.ts +79 -0
- package/dist/shared/engine-adapter.ts +10 -0
- package/dist/shared/focus-trap.ts +123 -0
- package/dist/shared/index.ts +60 -0
- package/dist/shared/keyboard.ts +36 -0
- package/dist/shared/live-region.ts +90 -0
- package/dist/shared/motion.ts +15 -0
- package/dist/shared/skip-link.ts +35 -0
- package/dist/shared/state-machine.ts +57 -0
- package/dist/shared/tokens.ts +16 -0
- package/dist/shared/types.ts +45 -0
- package/dist/shared/variants.ts +17 -0
- package/dist/sidebar/index.ts +9 -0
- package/dist/sidebar/sidebar.styles.ts +27 -0
- package/dist/sidebar/sidebar.ts +59 -0
- package/dist/skeleton/index.ts +8 -0
- package/dist/skeleton/skeleton.styles.ts +16 -0
- package/dist/skeleton/skeleton.ts +39 -0
- package/dist/skip-to-content/index.ts +1 -0
- package/dist/skip-to-content/skip-to-content.ts +1 -0
- package/dist/slide-viewer/index.ts +16 -0
- package/dist/slide-viewer/slide-viewer.styles.ts +57 -0
- package/dist/slide-viewer/slide-viewer.ts +152 -0
- package/dist/slider/index.ts +1 -0
- package/dist/slider/slider.ts +2 -0
- package/dist/status-indicator/index.ts +15 -0
- package/dist/status-indicator/status-indicator.styles.ts +41 -0
- package/dist/status-indicator/status-indicator.ts +66 -0
- package/dist/steps/index.ts +1 -0
- package/dist/steps/steps.ts +1 -0
- package/dist/switch/index.ts +7 -0
- package/dist/switch/switch.styles.ts +55 -0
- package/dist/switch/switch.ts +63 -0
- package/dist/table-of-contents/index.ts +1 -0
- package/dist/table-of-contents/table-of-contents.ts +37 -0
- package/dist/tabs/index.ts +8 -0
- package/dist/tabs/tabs.styles.ts +9 -0
- package/dist/tabs/tabs.ts +133 -0
- package/dist/textarea/index.ts +7 -0
- package/dist/textarea/textarea.styles.ts +15 -0
- package/dist/textarea/textarea.ts +59 -0
- package/dist/theme/dom-adapters.ts +60 -0
- package/dist/theme/index.ts +18 -0
- package/dist/theme/theme-machine.ts +130 -0
- package/dist/theme/theme-script.ts +18 -0
- package/dist/thread-view/index.ts +26 -0
- package/dist/thread-view/thread-view.styles.ts +35 -0
- package/dist/thread-view/thread-view.ts +176 -0
- package/dist/toast/index.ts +13 -0
- package/dist/toast/toast.styles.ts +19 -0
- package/dist/toast/toast.ts +203 -0
- package/dist/tooltip/index.ts +7 -0
- package/dist/tooltip/tooltip.styles.ts +16 -0
- package/dist/tooltip/tooltip.ts +109 -0
- package/dist/version-selector/index.ts +12 -0
- package/dist/version-selector/version-selector.styles.ts +41 -0
- package/dist/version-selector/version-selector.ts +136 -0
- package/dist/video-player/index.ts +12 -0
- package/dist/video-player/video-player.styles.ts +42 -0
- package/dist/video-player/video-player.ts +100 -0
- package/package.json +20 -19
- package/src/index.ts +0 -94
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import type { AccessibilityProps } from '../shared/index.ts'
|
|
2
|
+
import { createDialog, type DialogAPI } from '../dialog/index.ts'
|
|
3
|
+
import { generateId } from '../shared/index.ts'
|
|
4
|
+
|
|
5
|
+
export type FeedbackType = 'text' | 'video' | 'general'
|
|
6
|
+
|
|
7
|
+
export interface FeedbackDialogProps {
|
|
8
|
+
/** Whether the dialog is open (controlled) */
|
|
9
|
+
open?: boolean
|
|
10
|
+
/** Callback when open state changes */
|
|
11
|
+
onOpenChange?: (open: boolean) => void
|
|
12
|
+
/** Callback when feedback is submitted */
|
|
13
|
+
onSubmit?: (data: FeedbackData) => void | Promise<void>
|
|
14
|
+
/** Feedback type */
|
|
15
|
+
type?: FeedbackType
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface FeedbackData {
|
|
19
|
+
comment: string
|
|
20
|
+
email?: string
|
|
21
|
+
type: FeedbackType
|
|
22
|
+
selectedText?: string
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface FeedbackFormState {
|
|
26
|
+
comment: string
|
|
27
|
+
email: string
|
|
28
|
+
honeypot: string
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface FeedbackDialogState {
|
|
32
|
+
open: boolean
|
|
33
|
+
isSubmitting: boolean
|
|
34
|
+
isSubmitted: boolean
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface FeedbackDialogAPI {
|
|
38
|
+
/** Current state */
|
|
39
|
+
state: FeedbackDialogState
|
|
40
|
+
/** Dialog props from the underlying createDialog */
|
|
41
|
+
dialogProps: DialogAPI
|
|
42
|
+
/** Form field values */
|
|
43
|
+
formState: FeedbackFormState
|
|
44
|
+
/** Set a form field value */
|
|
45
|
+
setField(field: keyof FeedbackFormState, value: string): void
|
|
46
|
+
/** Submit the feedback form */
|
|
47
|
+
submit(): Promise<void>
|
|
48
|
+
/** Reset form to initial state */
|
|
49
|
+
reset(): void
|
|
50
|
+
/** ARIA props for the feedback dialog */
|
|
51
|
+
ariaProps: Partial<AccessibilityProps> & Record<string, unknown>
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function createFeedbackDialog(props: FeedbackDialogProps = {}): FeedbackDialogAPI {
|
|
55
|
+
const {
|
|
56
|
+
open: controlledOpen,
|
|
57
|
+
onOpenChange,
|
|
58
|
+
onSubmit,
|
|
59
|
+
type = 'general',
|
|
60
|
+
} = props
|
|
61
|
+
|
|
62
|
+
const dialog = createDialog({
|
|
63
|
+
open: controlledOpen,
|
|
64
|
+
onOpenChange,
|
|
65
|
+
modal: true,
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
let isSubmitting = false
|
|
69
|
+
let isSubmitted = false
|
|
70
|
+
|
|
71
|
+
const formState: FeedbackFormState = {
|
|
72
|
+
comment: '',
|
|
73
|
+
email: '',
|
|
74
|
+
honeypot: '',
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const feedbackId = generateId('rfr-feedback')
|
|
78
|
+
|
|
79
|
+
function setField(field: keyof FeedbackFormState, value: string): void {
|
|
80
|
+
formState[field] = value
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
async function submit(): Promise<void> {
|
|
84
|
+
// Honeypot check — bots fill this hidden field
|
|
85
|
+
if (formState.honeypot) {
|
|
86
|
+
return
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (!formState.comment.trim()) {
|
|
90
|
+
return
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
isSubmitting = true
|
|
94
|
+
|
|
95
|
+
const data: FeedbackData = {
|
|
96
|
+
comment: formState.comment,
|
|
97
|
+
type,
|
|
98
|
+
...(formState.email ? { email: formState.email } : {}),
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
try {
|
|
102
|
+
await onSubmit?.(data)
|
|
103
|
+
isSubmitting = false
|
|
104
|
+
isSubmitted = true
|
|
105
|
+
} catch {
|
|
106
|
+
isSubmitting = false
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function reset(): void {
|
|
111
|
+
formState.comment = ''
|
|
112
|
+
formState.email = ''
|
|
113
|
+
formState.honeypot = ''
|
|
114
|
+
isSubmitting = false
|
|
115
|
+
isSubmitted = false
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const ariaProps: Partial<AccessibilityProps> & Record<string, unknown> = {
|
|
119
|
+
role: 'dialog',
|
|
120
|
+
'aria-modal': true,
|
|
121
|
+
'aria-labelledby': `${feedbackId}-title`,
|
|
122
|
+
'aria-describedby': `${feedbackId}-desc`,
|
|
123
|
+
id: feedbackId,
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return {
|
|
127
|
+
get state() {
|
|
128
|
+
return {
|
|
129
|
+
get open() {
|
|
130
|
+
return dialog.state.open
|
|
131
|
+
},
|
|
132
|
+
get isSubmitting() {
|
|
133
|
+
return isSubmitting
|
|
134
|
+
},
|
|
135
|
+
get isSubmitted() {
|
|
136
|
+
return isSubmitted
|
|
137
|
+
},
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
dialogProps: dialog,
|
|
141
|
+
formState,
|
|
142
|
+
setField,
|
|
143
|
+
submit,
|
|
144
|
+
reset,
|
|
145
|
+
ariaProps,
|
|
146
|
+
}
|
|
147
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export {
|
|
2
|
+
createFeedbackDialog,
|
|
3
|
+
type FeedbackType,
|
|
4
|
+
type FeedbackDialogProps,
|
|
5
|
+
type FeedbackData,
|
|
6
|
+
type FeedbackFormState,
|
|
7
|
+
type FeedbackDialogState,
|
|
8
|
+
type FeedbackDialogAPI,
|
|
9
|
+
} from './feedback-dialog.js'
|
|
10
|
+
|
|
11
|
+
export { feedbackDialogVariants } from './feedback-dialog.styles.js'
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { cva } from '../shared/index.ts'
|
|
2
|
+
|
|
3
|
+
export const fileUploadDropZoneVariants = cva({
|
|
4
|
+
base: 'flex flex-col items-center justify-center rounded-lg border-2 border-dashed p-8 text-center transition-colors cursor-pointer',
|
|
5
|
+
variants: {
|
|
6
|
+
state: {
|
|
7
|
+
idle: 'border-muted-foreground/25 hover:border-muted-foreground/50',
|
|
8
|
+
dragging: 'border-primary bg-primary/5',
|
|
9
|
+
disabled: 'opacity-50 cursor-not-allowed',
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
defaultVariants: {
|
|
13
|
+
state: 'idle',
|
|
14
|
+
},
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
export const fileUploadFileListStyles =
|
|
18
|
+
'mt-4 space-y-2'
|
|
19
|
+
|
|
20
|
+
export const fileUploadFileItemStyles =
|
|
21
|
+
'flex items-center gap-3 rounded-md border p-3 text-sm'
|
|
22
|
+
|
|
23
|
+
export const fileUploadProgressStyles =
|
|
24
|
+
'h-1.5 w-full rounded-full bg-secondary overflow-hidden'
|
|
25
|
+
|
|
26
|
+
export const fileUploadProgressBarStyles =
|
|
27
|
+
'h-full rounded-full bg-primary transition-all duration-300'
|
|
28
|
+
|
|
29
|
+
export const fileUploadRemoveButtonStyles =
|
|
30
|
+
'ml-auto text-muted-foreground hover:text-foreground cursor-pointer'
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import type { AccessibilityProps } from '../shared/index.ts'
|
|
2
|
+
import { generateId } from '../shared/index.ts'
|
|
3
|
+
|
|
4
|
+
export type FileStatus = 'pending' | 'uploading' | 'complete' | 'error'
|
|
5
|
+
|
|
6
|
+
export interface FileEntry {
|
|
7
|
+
/** Unique ID for this file entry */
|
|
8
|
+
id: string
|
|
9
|
+
/** Original file name */
|
|
10
|
+
name: string
|
|
11
|
+
/** File size in bytes */
|
|
12
|
+
size: number
|
|
13
|
+
/** MIME type */
|
|
14
|
+
type: string
|
|
15
|
+
/** Upload progress 0-100 */
|
|
16
|
+
progress: number
|
|
17
|
+
/** Current status */
|
|
18
|
+
status: FileStatus
|
|
19
|
+
/** Error message if status is 'error' */
|
|
20
|
+
error?: string
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface FileUploadProps {
|
|
24
|
+
/** Accepted file types (e.g., 'image/*,.pdf') */
|
|
25
|
+
accept?: string
|
|
26
|
+
/** Max file size in bytes */
|
|
27
|
+
maxSize?: number
|
|
28
|
+
/** Max number of files */
|
|
29
|
+
maxFiles?: number
|
|
30
|
+
/** Allow multiple file selection */
|
|
31
|
+
multiple?: boolean
|
|
32
|
+
/** Callback when files are selected/added */
|
|
33
|
+
onFilesSelected?: (files: FileEntry[]) => void
|
|
34
|
+
/** Callback when a validation error occurs */
|
|
35
|
+
onError?: (errors: FileUploadError[]) => void
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface FileUploadError {
|
|
39
|
+
file: string
|
|
40
|
+
code: 'type' | 'size' | 'count'
|
|
41
|
+
message: string
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface FileUploadState {
|
|
45
|
+
files: FileEntry[]
|
|
46
|
+
isDragging: boolean
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface FileUploadAPI {
|
|
50
|
+
/** Current state */
|
|
51
|
+
state: FileUploadState
|
|
52
|
+
/** Add files (validates type, size, count) */
|
|
53
|
+
addFiles(files: Array<{ name: string; size: number; type: string }>): void
|
|
54
|
+
/** Remove a file by ID */
|
|
55
|
+
removeFile(id: string): void
|
|
56
|
+
/** Update a file's progress */
|
|
57
|
+
updateProgress(id: string, progress: number): void
|
|
58
|
+
/** Set a file's status */
|
|
59
|
+
setStatus(id: string, status: FileStatus, error?: string): void
|
|
60
|
+
/** ARIA props for the drop zone */
|
|
61
|
+
dropZoneProps: Partial<AccessibilityProps> & Record<string, unknown>
|
|
62
|
+
/** ARIA props for the file input */
|
|
63
|
+
inputProps: Record<string, unknown>
|
|
64
|
+
/** Drag event handlers (for headless use) */
|
|
65
|
+
dragHandlers: {
|
|
66
|
+
onDragEnter(): void
|
|
67
|
+
onDragLeave(): void
|
|
68
|
+
onDragOver(): void
|
|
69
|
+
onDrop(): void
|
|
70
|
+
}
|
|
71
|
+
/** Generated IDs */
|
|
72
|
+
ids: {
|
|
73
|
+
dropZone: string
|
|
74
|
+
input: string
|
|
75
|
+
label: string
|
|
76
|
+
fileList: string
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function matchesAccept(fileType: string, fileName: string, accept: string): boolean {
|
|
81
|
+
if (!accept) return true
|
|
82
|
+
const acceptedTypes = accept.split(',').map((t) => t.trim())
|
|
83
|
+
for (const accepted of acceptedTypes) {
|
|
84
|
+
if (accepted.startsWith('.')) {
|
|
85
|
+
// Extension match
|
|
86
|
+
if (fileName.toLowerCase().endsWith(accepted.toLowerCase())) return true
|
|
87
|
+
} else if (accepted.endsWith('/*')) {
|
|
88
|
+
// Wildcard MIME match (e.g., 'image/*')
|
|
89
|
+
const prefix = accepted.slice(0, -2)
|
|
90
|
+
if (fileType.startsWith(prefix)) return true
|
|
91
|
+
} else {
|
|
92
|
+
// Exact MIME match
|
|
93
|
+
if (fileType === accepted) return true
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return false
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function formatFileSize(bytes: number): string {
|
|
100
|
+
if (bytes === 0) return '0 B'
|
|
101
|
+
const units = ['B', 'KB', 'MB', 'GB']
|
|
102
|
+
const i = Math.floor(Math.log(bytes) / Math.log(1024))
|
|
103
|
+
const size = bytes / Math.pow(1024, i)
|
|
104
|
+
return `${size.toFixed(i === 0 ? 0 : 1)} ${units[i]}`
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function createFileUpload(props: FileUploadProps = {}): FileUploadAPI {
|
|
108
|
+
const {
|
|
109
|
+
accept,
|
|
110
|
+
maxSize,
|
|
111
|
+
maxFiles,
|
|
112
|
+
multiple = false,
|
|
113
|
+
onFilesSelected,
|
|
114
|
+
onError,
|
|
115
|
+
} = props
|
|
116
|
+
|
|
117
|
+
let files: FileEntry[] = []
|
|
118
|
+
let isDragging = false
|
|
119
|
+
|
|
120
|
+
const dropZoneId = generateId('rfr-file-upload-zone')
|
|
121
|
+
const inputId = generateId('rfr-file-upload-input')
|
|
122
|
+
const labelId = generateId('rfr-file-upload-label')
|
|
123
|
+
const fileListId = generateId('rfr-file-upload-list')
|
|
124
|
+
|
|
125
|
+
function addFiles(incoming: Array<{ name: string; size: number; type: string }>): void {
|
|
126
|
+
const errors: FileUploadError[] = []
|
|
127
|
+
const validFiles: FileEntry[] = []
|
|
128
|
+
|
|
129
|
+
// Check count limit
|
|
130
|
+
const availableSlots = maxFiles ? maxFiles - files.length : Infinity
|
|
131
|
+
if (!multiple && incoming.length > 1) {
|
|
132
|
+
// Only take the first file if not multiple
|
|
133
|
+
incoming = [incoming[0]]
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
for (let i = 0; i < incoming.length; i++) {
|
|
137
|
+
const file = incoming[i]
|
|
138
|
+
|
|
139
|
+
if (validFiles.length >= availableSlots) {
|
|
140
|
+
errors.push({
|
|
141
|
+
file: file.name,
|
|
142
|
+
code: 'count',
|
|
143
|
+
message: `Maximum of ${maxFiles} files allowed`,
|
|
144
|
+
})
|
|
145
|
+
continue
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// Validate type
|
|
149
|
+
if (accept && !matchesAccept(file.type, file.name, accept)) {
|
|
150
|
+
errors.push({
|
|
151
|
+
file: file.name,
|
|
152
|
+
code: 'type',
|
|
153
|
+
message: `File type "${file.type || 'unknown'}" is not accepted`,
|
|
154
|
+
})
|
|
155
|
+
continue
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// Validate size
|
|
159
|
+
if (maxSize && file.size > maxSize) {
|
|
160
|
+
errors.push({
|
|
161
|
+
file: file.name,
|
|
162
|
+
code: 'size',
|
|
163
|
+
message: `File size ${formatFileSize(file.size)} exceeds limit of ${formatFileSize(maxSize)}`,
|
|
164
|
+
})
|
|
165
|
+
continue
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
validFiles.push({
|
|
169
|
+
id: generateId('rfr-file'),
|
|
170
|
+
name: file.name,
|
|
171
|
+
size: file.size,
|
|
172
|
+
type: file.type,
|
|
173
|
+
progress: 0,
|
|
174
|
+
status: 'pending',
|
|
175
|
+
})
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
if (errors.length > 0) {
|
|
179
|
+
onError?.(errors)
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
if (validFiles.length > 0) {
|
|
183
|
+
if (!multiple) {
|
|
184
|
+
files = validFiles.slice(0, 1)
|
|
185
|
+
} else {
|
|
186
|
+
files = [...files, ...validFiles]
|
|
187
|
+
}
|
|
188
|
+
onFilesSelected?.(files)
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
function removeFile(id: string): void {
|
|
193
|
+
files = files.filter((f) => f.id !== id)
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
function updateProgress(id: string, progress: number): void {
|
|
197
|
+
files = files.map((f) =>
|
|
198
|
+
f.id === id ? { ...f, progress: Math.min(100, Math.max(0, progress)) } : f,
|
|
199
|
+
)
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
function setStatus(id: string, status: FileStatus, error?: string): void {
|
|
203
|
+
files = files.map((f) =>
|
|
204
|
+
f.id === id ? { ...f, status, error, progress: status === 'complete' ? 100 : f.progress } : f,
|
|
205
|
+
)
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
const dropZoneProps: Partial<AccessibilityProps> & Record<string, unknown> = {
|
|
209
|
+
role: 'button',
|
|
210
|
+
'aria-label': 'Drop files here or click to upload',
|
|
211
|
+
'aria-describedby': labelId,
|
|
212
|
+
id: dropZoneId,
|
|
213
|
+
tabIndex: 0,
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
const inputProps: Record<string, unknown> = {
|
|
217
|
+
type: 'file',
|
|
218
|
+
id: inputId,
|
|
219
|
+
accept: accept ?? undefined,
|
|
220
|
+
multiple,
|
|
221
|
+
'aria-hidden': true,
|
|
222
|
+
tabIndex: -1,
|
|
223
|
+
style: { display: 'none' },
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
const dragHandlers = {
|
|
227
|
+
onDragEnter() {
|
|
228
|
+
isDragging = true
|
|
229
|
+
},
|
|
230
|
+
onDragLeave() {
|
|
231
|
+
isDragging = false
|
|
232
|
+
},
|
|
233
|
+
onDragOver() {
|
|
234
|
+
isDragging = true
|
|
235
|
+
},
|
|
236
|
+
onDrop() {
|
|
237
|
+
isDragging = false
|
|
238
|
+
},
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
return {
|
|
242
|
+
state: {
|
|
243
|
+
get files() { return files },
|
|
244
|
+
get isDragging() { return isDragging },
|
|
245
|
+
},
|
|
246
|
+
addFiles,
|
|
247
|
+
removeFile,
|
|
248
|
+
updateProgress,
|
|
249
|
+
setStatus,
|
|
250
|
+
dropZoneProps,
|
|
251
|
+
inputProps,
|
|
252
|
+
dragHandlers,
|
|
253
|
+
ids: {
|
|
254
|
+
dropZone: dropZoneId,
|
|
255
|
+
input: inputId,
|
|
256
|
+
label: labelId,
|
|
257
|
+
fileList: fileListId,
|
|
258
|
+
},
|
|
259
|
+
}
|
|
260
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export {
|
|
2
|
+
createFileUpload,
|
|
3
|
+
formatFileSize,
|
|
4
|
+
type FileUploadProps,
|
|
5
|
+
type FileUploadState,
|
|
6
|
+
type FileUploadAPI,
|
|
7
|
+
type FileUploadError,
|
|
8
|
+
type FileEntry,
|
|
9
|
+
type FileStatus,
|
|
10
|
+
} from './file-upload.js'
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
fileUploadDropZoneVariants,
|
|
14
|
+
fileUploadFileListStyles,
|
|
15
|
+
fileUploadFileItemStyles,
|
|
16
|
+
fileUploadProgressStyles,
|
|
17
|
+
fileUploadProgressBarStyles,
|
|
18
|
+
fileUploadRemoveButtonStyles,
|
|
19
|
+
} from './file-upload.styles.js'
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface SocialLink {
|
|
2
|
+
label: string
|
|
3
|
+
href: string
|
|
4
|
+
icon?: string
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface FooterColumn {
|
|
8
|
+
title: string
|
|
9
|
+
links: { label: string; href: string }[]
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface FooterProps {
|
|
13
|
+
copyright?: string
|
|
14
|
+
socialLinks?: SocialLink[]
|
|
15
|
+
columns?: FooterColumn[]
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface FooterAPI {
|
|
19
|
+
ariaProps: Record<string, string>
|
|
20
|
+
copyrightText: string
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function createFooter(props: FooterProps = {}): FooterAPI {
|
|
24
|
+
const { copyright } = props
|
|
25
|
+
const year = new Date().getFullYear()
|
|
26
|
+
const copyrightText = copyright ?? `© ${year} All rights reserved.`
|
|
27
|
+
|
|
28
|
+
return {
|
|
29
|
+
ariaProps: { role: 'contentinfo' },
|
|
30
|
+
copyrightText,
|
|
31
|
+
}
|
|
32
|
+
}
|
package/dist/index.ts
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// Auto-generated meta-package index
|
|
2
|
+
export * from './astro-accordion/index.ts';
|
|
3
|
+
export * from './shared/index.ts';
|
|
4
|
+
export * from './astro-ai/index.ts';
|
|
5
|
+
export * from './astro-animated-text/index.ts';
|
|
6
|
+
export * from './astro-app-shell/index.ts';
|
|
7
|
+
export * from './astro-auth/index.ts';
|
|
8
|
+
export * from './astro-avatar/index.ts';
|
|
9
|
+
export * from './astro-avatar-group/index.ts';
|
|
10
|
+
export * from './astro-badge/index.ts';
|
|
11
|
+
export * from './astro-bottom-nav/index.ts';
|
|
12
|
+
export * from './astro-breadcrumbs/index.ts';
|
|
13
|
+
export * from './astro-button/index.ts';
|
|
14
|
+
export * from './astro-calendar/index.ts';
|
|
15
|
+
export * from './astro-card/index.ts';
|
|
16
|
+
export * from './astro-charts/index.ts';
|
|
17
|
+
export * from './astro-checkbox/index.ts';
|
|
18
|
+
export * from './astro-code-editor/index.ts';
|
|
19
|
+
export * from './astro-collapsible/index.ts';
|
|
20
|
+
export * from './astro-command/index.ts';
|
|
21
|
+
export * from './astro-content-protection/index.ts';
|
|
22
|
+
export * from './astro-data-table/index.ts';
|
|
23
|
+
export * from './astro-date-picker/index.ts';
|
|
24
|
+
export * from './astro-device-frame/index.ts';
|
|
25
|
+
export * from './astro-dialog/index.ts';
|
|
26
|
+
export * from './astro-diff-viewer/index.ts';
|
|
27
|
+
export * from './astro-dropdown-menu/index.ts';
|
|
28
|
+
export * from './astro-emoji-picker/index.ts';
|
|
29
|
+
export * from './astro-feedback-dialog/index.ts';
|
|
30
|
+
export * from './astro-file-upload/index.ts';
|
|
31
|
+
export * from './astro-footer/index.ts';
|
|
32
|
+
export * from './astro-inline-editor/index.ts';
|
|
33
|
+
export * from './astro-input/index.ts';
|
|
34
|
+
export * from './astro-input-group/index.ts';
|
|
35
|
+
export * from './astro-install-prompt/index.ts';
|
|
36
|
+
export * from './astro-keyboard-shortcut/index.ts';
|
|
37
|
+
export * from './astro-language-selector/index.ts';
|
|
38
|
+
export * from './astro-markdown-renderer/index.ts';
|
|
39
|
+
export * from './astro-mobile-nav/index.ts';
|
|
40
|
+
export * from './astro-navbar/index.ts';
|
|
41
|
+
export * from './astro-otp-input/index.ts';
|
|
42
|
+
export * from './astro-popover/index.ts';
|
|
43
|
+
export * from './astro-presence-indicator/index.ts';
|
|
44
|
+
export * from './astro-progress-display/index.ts';
|
|
45
|
+
export * from './astro-radio/index.ts';
|
|
46
|
+
export * from './astro-reaction-bar/index.ts';
|
|
47
|
+
export * from './astro-resizable-layout/index.ts';
|
|
48
|
+
export * from './astro-rich-editor/index.ts';
|
|
49
|
+
export * from './astro-search-bar/index.ts';
|
|
50
|
+
export * from './astro-select/index.ts';
|
|
51
|
+
export * from './astro-sidebar/index.ts';
|
|
52
|
+
export * from './astro-skeleton/index.ts';
|
|
53
|
+
export * from './astro-slide-viewer/index.ts';
|
|
54
|
+
export * from './astro-status-indicator/index.ts';
|
|
55
|
+
export * from './astro-switch/index.ts';
|
|
56
|
+
export * from './astro-tabs/index.ts';
|
|
57
|
+
export * from './astro-textarea/index.ts';
|
|
58
|
+
export * from './astro-theme/index.ts';
|
|
59
|
+
export * from './astro-thread-view/index.ts';
|
|
60
|
+
export * from './astro-toast/index.ts';
|
|
61
|
+
export * from './astro-tooltip/index.ts';
|
|
62
|
+
export * from './astro-version-selector/index.ts';
|
|
63
|
+
export * from './astro-video-player/index.ts';
|
|
64
|
+
export * from './astro-table-of-contents/index.ts';
|
|
65
|
+
export * from './astro-carousel/index.ts';
|
|
66
|
+
export * from './astro-slider/index.ts';
|
|
67
|
+
export * from './astro-pagination/index.ts';
|
|
68
|
+
export * from './astro-callout/index.ts';
|
|
69
|
+
export * from './astro-steps/index.ts';
|
|
70
|
+
export * from './astro-file-tree/index.ts';
|
|
71
|
+
export * from './astro-icon-system/index.ts';
|
|
72
|
+
export * from './astro-skip-to-content/index.ts';
|
|
73
|
+
export * from './astro-code-block/index.ts';
|
|
74
|
+
export * from './astro-link-card/index.ts';
|
|
75
|
+
export * from './astro-card-grid/index.ts';
|
|
76
|
+
export * from './astro-payment/index.ts';
|
|
77
|
+
export * from './astro-command-input/index.ts';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export {
|
|
2
|
+
createInlineEditor,
|
|
3
|
+
type InlineEditorProps,
|
|
4
|
+
type InlineEditorState,
|
|
5
|
+
type InlineEditorAPI,
|
|
6
|
+
type ToolbarAction,
|
|
7
|
+
} from './inline-editor.js'
|
|
8
|
+
|
|
9
|
+
export {
|
|
10
|
+
editorVariants,
|
|
11
|
+
toolbarVariants,
|
|
12
|
+
previewVariants,
|
|
13
|
+
} from './inline-editor.styles.js'
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { cva } from '../shared/index.ts'
|
|
2
|
+
|
|
3
|
+
export const editorVariants = cva({
|
|
4
|
+
base: 'w-full rounded-md border bg-background',
|
|
5
|
+
variants: {
|
|
6
|
+
state: {
|
|
7
|
+
viewing: 'cursor-pointer hover:bg-muted/50 p-3',
|
|
8
|
+
editing: 'p-0',
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
defaultVariants: {
|
|
12
|
+
state: 'viewing',
|
|
13
|
+
},
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
export const toolbarVariants = cva({
|
|
17
|
+
base: 'flex items-center gap-1 border-b px-2 py-1',
|
|
18
|
+
variants: {
|
|
19
|
+
size: {
|
|
20
|
+
sm: 'gap-0.5 px-1 py-0.5',
|
|
21
|
+
md: 'gap-1 px-2 py-1',
|
|
22
|
+
lg: 'gap-2 px-3 py-2',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: {
|
|
26
|
+
size: 'md',
|
|
27
|
+
},
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
export const previewVariants = cva({
|
|
31
|
+
base: 'prose prose-sm max-w-none p-3',
|
|
32
|
+
variants: {
|
|
33
|
+
size: {
|
|
34
|
+
sm: 'prose-xs p-2',
|
|
35
|
+
md: 'prose-sm p-3',
|
|
36
|
+
lg: 'prose-base p-4',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
defaultVariants: {
|
|
40
|
+
size: 'md',
|
|
41
|
+
},
|
|
42
|
+
})
|