@rimelight/ui 0.0.30 → 0.0.32
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/package.json +1 -1
- package/src/components/astro/RLA3dHover.astro +19 -0
- package/src/components/astro/RLAAlert.astro +62 -0
- package/src/components/astro/RLAApp.astro +19 -0
- package/src/components/astro/RLAAspectRatio.astro +23 -0
- package/src/components/astro/RLAAudio.astro +19 -0
- package/src/components/astro/RLAAvatar.astro +56 -0
- package/src/components/astro/RLAAvatarGroup.astro +19 -0
- package/src/components/astro/RLABadge.astro +33 -0
- package/src/components/astro/RLABanner.astro +19 -0
- package/src/components/astro/RLABreadcrumb.astro +44 -0
- package/src/components/astro/RLABrowserMockup.astro +19 -0
- package/src/components/astro/RLAButton.astro +3 -1
- package/src/components/astro/RLACalendar.astro +19 -0
- package/src/components/astro/RLACard.astro +74 -0
- package/src/components/astro/RLACarousel.astro +71 -0
- package/src/components/astro/RLAChangelog.astro +19 -0
- package/src/components/astro/RLAChart.astro +239 -0
- package/src/components/astro/RLAChat.astro +19 -0
- package/src/components/astro/RLAChatMessage.astro +19 -0
- package/src/components/astro/RLAChatMessages.astro +19 -0
- package/src/components/astro/RLAChatPalette.astro +19 -0
- package/src/components/astro/RLAChatPrompt.astro +19 -0
- package/src/components/astro/RLAChatPromptSubmit.astro +19 -0
- package/src/components/astro/RLAChatReasoning.astro +19 -0
- package/src/components/astro/RLAChatShimmer.astro +19 -0
- package/src/components/astro/RLAChatTool.astro +19 -0
- package/src/components/astro/RLACheckbox.astro +53 -0
- package/src/components/astro/RLAChip.astro +20 -0
- package/src/components/astro/RLACollapsible.astro +38 -0
- package/src/components/astro/RLAColorPicker.astro +19 -0
- package/src/components/astro/RLACommandPalette.astro +19 -0
- package/src/components/astro/RLACompare.astro +19 -0
- package/src/components/astro/RLAConfirm.astro +86 -0
- package/src/components/astro/RLAContainer.astro +19 -0
- package/src/components/astro/RLAContextMenu.astro +19 -0
- package/src/components/astro/RLADashboardGroup.astro +19 -0
- package/src/components/astro/RLADashboardNavbar.astro +19 -0
- package/src/components/astro/RLADashboardPanel.astro +19 -0
- package/src/components/astro/RLADashboardResizeHandle.astro +19 -0
- package/src/components/astro/RLADashboardSearch.astro +19 -0
- package/src/components/astro/RLADashboardSearchButton.astro +19 -0
- package/src/components/astro/RLADashboardSidebar.astro +19 -0
- package/src/components/astro/RLADashboardSidebarCollapse.astro +19 -0
- package/src/components/astro/RLADashboardSidebarToggle.astro +19 -0
- package/src/components/astro/RLADashboardToolbar.astro +19 -0
- package/src/components/astro/RLADock.astro +19 -0
- package/src/components/astro/RLADrawer.astro +74 -0
- package/src/components/astro/RLADropdownMenu.astro +82 -0
- package/src/components/astro/RLAEditor.astro +19 -0
- package/src/components/astro/RLAEmpty.astro +19 -0
- package/src/components/astro/RLAError.astro +19 -0
- package/src/components/astro/RLAFieldGroup.astro +35 -0
- package/src/components/astro/RLAFieldset.astro +19 -0
- package/src/components/astro/RLAFileUpload.astro +134 -0
- package/src/components/astro/RLAFloatingAction.astro +19 -0
- package/src/components/astro/RLAForm.astro +19 -0
- package/src/components/astro/RLAFormField.astro +43 -0
- package/src/components/astro/RLAGallery.astro +19 -0
- package/src/components/{Head.astro → astro/RLAHead.astro} +181 -199
- package/src/components/astro/RLAHoverCard.astro +31 -0
- package/src/components/astro/RLAImage.astro +19 -0
- package/src/components/astro/RLAInput.astro +62 -0
- package/src/components/astro/RLAInputDate.astro +19 -0
- package/src/components/astro/RLAInputMenu.astro +131 -0
- package/src/components/astro/RLAInputNumber.astro +19 -0
- package/src/components/astro/RLAInputPin.astro +19 -0
- package/src/components/astro/RLAInputTags.astro +19 -0
- package/src/components/astro/RLAInputTime.astro +19 -0
- package/src/components/astro/RLAKbd.astro +22 -0
- package/src/components/astro/RLAKnob.astro +19 -0
- package/src/components/astro/RLALabel.astro +23 -0
- package/src/components/astro/RLALink.astro +19 -0
- package/src/components/astro/RLALinkGroup.astro +19 -0
- package/src/components/astro/RLAListbox.astro +19 -0
- package/src/components/astro/RLALocaleSelector.astro +110 -0
- package/src/components/astro/RLAMarquee.astro +32 -0
- package/src/components/astro/RLAMegamenu.astro +19 -0
- package/src/components/astro/RLAMeter.astro +19 -0
- package/src/components/astro/RLAModal.astro +95 -0
- package/src/components/astro/RLANavigationMenu.astro +136 -0
- package/src/components/astro/RLAPage.astro +19 -0
- package/src/components/astro/RLAPageAside.astro +19 -0
- package/src/components/astro/RLAPageBody.astro +19 -0
- package/src/components/astro/RLAPageHeader.astro +19 -0
- package/src/components/astro/{RLASection.astro → RLAPageSection.astro} +6 -6
- package/src/components/astro/RLAPagination.astro +94 -0
- package/src/components/astro/RLAPassword.astro +19 -0
- package/src/components/astro/RLAPhoneMockup.astro +19 -0
- package/src/components/astro/RLAPopover.astro +31 -0
- package/src/components/astro/RLAPost.astro +19 -0
- package/src/components/astro/RLAPricingPlan.astro +19 -0
- package/src/components/astro/RLAPricingTable.astro +19 -0
- package/src/components/astro/RLAProgress.astro +45 -0
- package/src/components/astro/RLAProse.astro +19 -0
- package/src/components/astro/RLAQrCode.astro +19 -0
- package/src/components/astro/RLARadioGroup.astro +19 -0
- package/src/components/astro/RLARating.astro +19 -0
- package/src/components/astro/RLAScrollArea.astro +157 -0
- package/src/components/astro/RLAScrollToTop.astro +172 -159
- package/src/components/astro/RLASelect.astro +109 -0
- package/src/components/astro/RLASeparator.astro +27 -0
- package/src/components/astro/RLASidebar.astro +135 -0
- package/src/components/astro/RLASkeleton.astro +20 -0
- package/src/components/astro/RLASlideover.astro +72 -0
- package/src/components/astro/RLASlider.astro +58 -0
- package/src/components/astro/RLASpeedDial.astro +19 -0
- package/src/components/astro/RLASpinner.astro +27 -0
- package/src/components/astro/RLASplitter.astro +177 -0
- package/src/components/astro/RLASpoiler.astro +19 -0
- package/src/components/astro/RLAStepper.astro +19 -0
- package/src/components/astro/RLAStickySurface.astro +27 -0
- package/src/components/astro/RLASwitch.astro +51 -0
- package/src/components/astro/RLATable.astro +60 -0
- package/src/components/astro/RLATableOfContents.astro +19 -0
- package/src/components/astro/RLATabs.astro +92 -0
- package/src/components/astro/RLATextarea.astro +42 -0
- package/src/components/astro/RLAThemeSelector.astro +73 -0
- package/src/components/astro/RLATimeline.astro +19 -0
- package/src/components/astro/RLAToast.astro +107 -0
- package/src/components/astro/RLATooltip.astro +31 -0
- package/src/components/astro/RLATour.astro +19 -0
- package/src/components/astro/RLATree.astro +19 -0
- package/src/components/astro/RLAUser.astro +19 -0
- package/src/components/astro/{RLAEmbedYoutube.astro → RLAVideo.astro} +6 -6
- package/src/components/astro/RLAWatermark.astro +19 -0
- package/src/components/astro/RLAWindowMockup.astro +19 -0
- package/src/integrations/ui.ts +208 -142
- package/src/presets/defaults.ts +285 -0
- package/src/presets/index.ts +537 -256
- package/src/styles/index.css +6 -0
- package/src/themes/3d-hover.theme.ts +10 -0
- package/src/themes/accordion.theme.ts +10 -0
- package/src/themes/alert.theme.ts +56 -0
- package/src/themes/app.theme.ts +10 -0
- package/src/themes/aspect-ratio.theme.ts +11 -0
- package/src/themes/audio.theme.ts +10 -0
- package/src/themes/avatar-group.theme.ts +10 -0
- package/src/themes/avatar.theme.ts +28 -0
- package/src/themes/badge.theme.ts +66 -0
- package/src/themes/banner.theme.ts +10 -0
- package/src/themes/breadcrumb.theme.ts +15 -0
- package/src/themes/browser-mockup.theme.ts +10 -0
- package/src/themes/button.theme.ts +195 -190
- package/src/themes/calendar.theme.ts +10 -0
- package/src/themes/card.theme.ts +34 -0
- package/src/themes/carousel.theme.ts +32 -0
- package/src/themes/changelog.theme.ts +10 -0
- package/src/themes/chart.theme.ts +21 -0
- package/src/themes/chat-message.theme.ts +10 -0
- package/src/themes/chat-messages.theme.ts +10 -0
- package/src/themes/chat-palette.theme.ts +10 -0
- package/src/themes/chat-prompt-submit.theme.ts +10 -0
- package/src/themes/chat-prompt.theme.ts +10 -0
- package/src/themes/chat-reasoning.theme.ts +10 -0
- package/src/themes/chat-shimmer.theme.ts +10 -0
- package/src/themes/chat-tool.theme.ts +10 -0
- package/src/themes/chat.theme.ts +10 -0
- package/src/themes/checkbox.theme.ts +48 -0
- package/src/themes/chip.theme.ts +16 -0
- package/src/themes/collapsible.theme.ts +22 -0
- package/src/themes/color-picker.theme.ts +10 -0
- package/src/themes/command-palette.theme.ts +10 -0
- package/src/themes/compare.theme.ts +10 -0
- package/src/themes/confirm.theme.ts +33 -0
- package/src/themes/container.theme.ts +10 -0
- package/src/themes/context-menu.theme.ts +10 -0
- package/src/themes/dashboard-group.theme.ts +10 -0
- package/src/themes/dashboard-navbar.theme.ts +10 -0
- package/src/themes/dashboard-panel.theme.ts +10 -0
- package/src/themes/dashboard-resize-handle.theme.ts +10 -0
- package/src/themes/dashboard-search-button.theme.ts +10 -0
- package/src/themes/dashboard-search.theme.ts +10 -0
- package/src/themes/dashboard-sidebar-collapse.theme.ts +10 -0
- package/src/themes/dashboard-sidebar-toggle.theme.ts +10 -0
- package/src/themes/dashboard-sidebar.theme.ts +10 -0
- package/src/themes/dashboard-toolbar.theme.ts +10 -0
- package/src/themes/dock.theme.ts +10 -0
- package/src/themes/drawer.theme.ts +44 -0
- package/src/themes/dropdown-menu.theme.ts +27 -0
- package/src/themes/editor.theme.ts +10 -0
- package/src/themes/empty.theme.ts +10 -0
- package/src/themes/error.theme.ts +10 -0
- package/src/themes/field-group.theme.ts +23 -0
- package/src/themes/fieldset.theme.ts +10 -0
- package/src/themes/file-upload.theme.ts +24 -0
- package/src/themes/floating-action.theme.ts +10 -0
- package/src/themes/form-field.theme.ts +24 -0
- package/src/themes/form.theme.ts +10 -0
- package/src/themes/gallery.theme.ts +10 -0
- package/src/themes/head.theme.ts +10 -0
- package/src/themes/hover-card.theme.ts +27 -0
- package/src/themes/image.theme.ts +10 -0
- package/src/themes/input-date.theme.ts +10 -0
- package/src/themes/input-menu.theme.ts +28 -0
- package/src/themes/input-number.theme.ts +10 -0
- package/src/themes/input-pin.theme.ts +10 -0
- package/src/themes/input-tags.theme.ts +10 -0
- package/src/themes/input-time.theme.ts +10 -0
- package/src/themes/input.theme.ts +41 -0
- package/src/themes/kbd.theme.ts +24 -0
- package/src/themes/knob.theme.ts +10 -0
- package/src/themes/label.theme.ts +20 -0
- package/src/themes/link-group.theme.ts +10 -0
- package/src/themes/link.theme.ts +10 -0
- package/src/themes/listbox.theme.ts +10 -0
- package/src/themes/locale-selector.theme.ts +50 -0
- package/src/themes/marquee.theme.ts +27 -0
- package/src/themes/megamenu.theme.ts +10 -0
- package/src/themes/meter.theme.ts +10 -0
- package/src/themes/modal.theme.ts +37 -0
- package/src/themes/navigation-menu.theme.ts +19 -0
- package/src/themes/page-aside.theme.ts +10 -0
- package/src/themes/page-body.theme.ts +10 -0
- package/src/themes/page-header.theme.ts +10 -0
- package/src/themes/{section.theme.ts → page-section.theme.ts} +1 -2
- package/src/themes/page.theme.ts +10 -0
- package/src/themes/pagination.theme.ts +26 -0
- package/src/themes/password.theme.ts +10 -0
- package/src/themes/phone-mockup.theme.ts +10 -0
- package/src/themes/popover.theme.ts +28 -0
- package/src/themes/post.theme.ts +10 -0
- package/src/themes/pricing-plan.theme.ts +10 -0
- package/src/themes/pricing-table.theme.ts +10 -0
- package/src/themes/progress.theme.ts +37 -0
- package/src/themes/prose.theme.ts +10 -0
- package/src/themes/qr-code.theme.ts +10 -0
- package/src/themes/quote.theme.ts +10 -0
- package/src/themes/radio-group.theme.ts +10 -0
- package/src/themes/rating.theme.ts +10 -0
- package/src/themes/scroll-area.theme.ts +24 -0
- package/src/themes/scroll-to-top.theme.ts +44 -40
- package/src/themes/select.theme.ts +27 -0
- package/src/themes/separator.theme.ts +19 -0
- package/src/themes/sidebar.theme.ts +33 -0
- package/src/themes/skeleton.theme.ts +20 -0
- package/src/themes/slideover.theme.ts +43 -0
- package/src/themes/slider.theme.ts +34 -0
- package/src/themes/speed-dial.theme.ts +10 -0
- package/src/themes/spinner.theme.ts +35 -0
- package/src/themes/splitter.theme.ts +22 -0
- package/src/themes/spoiler.theme.ts +10 -0
- package/src/themes/stepper.theme.ts +10 -0
- package/src/themes/sticky-surface.theme.ts +10 -0
- package/src/themes/switch.theme.ts +65 -0
- package/src/themes/table-of-contents.theme.ts +10 -0
- package/src/themes/table.theme.ts +36 -0
- package/src/themes/tabs.theme.ts +44 -0
- package/src/themes/textarea.theme.ts +26 -0
- package/src/themes/theme-selector.theme.ts +16 -0
- package/src/themes/timeline.theme.ts +10 -0
- package/src/themes/toast.theme.ts +25 -0
- package/src/themes/tooltip.theme.ts +27 -0
- package/src/themes/tour.theme.ts +10 -0
- package/src/themes/tree.theme.ts +10 -0
- package/src/themes/user.theme.ts +10 -0
- package/src/themes/watermark.theme.ts +10 -0
- package/src/themes/window-mockup.theme.ts +10 -0
- package/src/types/components/3d-hover.ts +11 -0
- package/src/types/components/accordion.ts +1 -1
- package/src/types/components/alert.ts +37 -0
- package/src/types/components/app.ts +11 -0
- package/src/types/components/aspect-ratio.ts +15 -0
- package/src/types/components/audio.ts +11 -0
- package/src/types/components/avatar-group.ts +12 -0
- package/src/types/components/avatar.ts +35 -0
- package/src/types/components/badge.ts +33 -0
- package/src/types/components/banner.ts +11 -0
- package/src/types/components/breadcrumb.ts +24 -0
- package/src/types/components/browser-mockup.ts +11 -0
- package/src/types/components/button.ts +7 -1
- package/src/types/components/calendar.ts +11 -0
- package/src/types/components/card.ts +31 -0
- package/src/types/components/carousel.ts +25 -0
- package/src/types/components/changelog.ts +11 -0
- package/src/types/components/chart.ts +38 -0
- package/src/types/components/chat-message.ts +11 -0
- package/src/types/components/chat-messages.ts +11 -0
- package/src/types/components/chat-palette.ts +11 -0
- package/src/types/components/chat-prompt-submit.ts +11 -0
- package/src/types/components/chat-prompt.ts +11 -0
- package/src/types/components/chat-reasoning.ts +11 -0
- package/src/types/components/chat-shimmer.ts +11 -0
- package/src/types/components/chat-tool.ts +11 -0
- package/src/types/components/chat.ts +11 -0
- package/src/types/components/checkbox.ts +41 -0
- package/src/types/components/chip.ts +17 -0
- package/src/types/components/collapsible.ts +31 -0
- package/src/types/components/color-picker.ts +11 -0
- package/src/types/components/command-palette.ts +11 -0
- package/src/types/components/compare.ts +11 -0
- package/src/types/components/confirm.ts +35 -0
- package/src/types/components/container.ts +11 -0
- package/src/types/components/context-menu.ts +11 -0
- package/src/types/components/dashboard-group.ts +11 -0
- package/src/types/components/dashboard-navbar.ts +11 -0
- package/src/types/components/dashboard-panel.ts +11 -0
- package/src/types/components/dashboard-resize-handle.ts +11 -0
- package/src/types/components/dashboard-search-button.ts +11 -0
- package/src/types/components/dashboard-search.ts +11 -0
- package/src/types/components/dashboard-sidebar-collapse.ts +11 -0
- package/src/types/components/dashboard-sidebar-toggle.ts +11 -0
- package/src/types/components/dashboard-sidebar.ts +11 -0
- package/src/types/components/dashboard-toolbar.ts +11 -0
- package/src/types/components/dock.ts +11 -0
- package/src/types/components/drawer.ts +31 -0
- package/src/types/components/dropdown-menu.ts +42 -0
- package/src/types/components/editor.ts +11 -0
- package/src/types/components/empty.ts +11 -0
- package/src/types/components/error.ts +11 -0
- package/src/types/components/field-group.ts +23 -0
- package/src/types/components/fieldset.ts +11 -0
- package/src/types/components/file-upload.ts +39 -0
- package/src/types/components/floating-action.ts +11 -0
- package/src/types/components/footer.ts +1 -1
- package/src/types/components/form-field.ts +31 -0
- package/src/types/components/form.ts +11 -0
- package/src/types/components/gallery.ts +11 -0
- package/src/types/components/header.ts +1 -1
- package/src/types/components/hover-card.ts +19 -0
- package/src/types/components/icon.ts +2 -1
- package/src/types/components/image.ts +11 -0
- package/src/types/components/index.ts +134 -13
- package/src/types/components/input-date.ts +11 -0
- package/src/types/components/input-menu.ts +44 -0
- package/src/types/components/input-number.ts +11 -0
- package/src/types/components/input-pin.ts +11 -0
- package/src/types/components/input-tags.ts +11 -0
- package/src/types/components/input-time.ts +11 -0
- package/src/types/components/input.ts +65 -0
- package/src/types/components/kbd.ts +15 -0
- package/src/types/components/knob.ts +11 -0
- package/src/types/components/label.ts +19 -0
- package/src/types/components/link-group.ts +11 -0
- package/src/types/components/link.ts +1 -1
- package/src/types/components/listbox.ts +11 -0
- package/src/types/components/locale-selector.ts +33 -0
- package/src/types/components/logo.ts +1 -1
- package/src/types/components/main.ts +1 -1
- package/src/types/components/marquee.ts +23 -0
- package/src/types/components/megamenu.ts +11 -0
- package/src/types/components/meter.ts +11 -0
- package/src/types/components/modal.ts +40 -0
- package/src/types/components/{navigation.ts → navigation-menu.ts} +22 -2
- package/src/types/components/page-aside.ts +11 -0
- package/src/types/components/page-body.ts +11 -0
- package/src/types/components/page-header.ts +11 -0
- package/src/types/components/{section.ts → page-section.ts} +2 -2
- package/src/types/components/page.ts +11 -0
- package/src/types/components/pagination.ts +23 -0
- package/src/types/components/password.ts +11 -0
- package/src/types/components/phone-mockup.ts +5 -0
- package/src/types/components/placeholder.ts +1 -1
- package/src/types/components/popover.ts +24 -0
- package/src/types/components/post.ts +11 -0
- package/src/types/components/pricing-plan.ts +11 -0
- package/src/types/components/pricing-table.ts +11 -0
- package/src/types/components/progress.ts +34 -0
- package/src/types/components/prose.ts +11 -0
- package/src/types/components/qr-code.ts +11 -0
- package/src/types/components/quote.ts +11 -0
- package/src/types/components/radio-group.ts +11 -0
- package/src/types/components/rating.ts +11 -0
- package/src/types/components/scroll-area.ts +24 -0
- package/src/types/components/scroll-to-top.ts +7 -1
- package/src/types/components/select.ts +43 -0
- package/src/types/components/separator.ts +20 -0
- package/src/types/components/sidebar.ts +37 -0
- package/src/types/components/skeleton.ts +15 -0
- package/src/types/components/slideover.ts +32 -0
- package/src/types/components/slider.ts +41 -0
- package/src/types/components/speed-dial.ts +11 -0
- package/src/types/components/spinner.ts +26 -0
- package/src/types/components/splitter.ts +20 -0
- package/src/types/components/spoiler.ts +11 -0
- package/src/types/components/stepper.ts +11 -0
- package/src/types/components/sticky-surface.ts +20 -0
- package/src/types/components/switch.ts +42 -0
- package/src/types/components/table-of-contents.ts +11 -0
- package/src/types/components/table.ts +31 -0
- package/src/types/components/tabs.ts +43 -0
- package/src/types/components/textarea.ts +51 -0
- package/src/types/components/theme-selector.ts +15 -0
- package/src/types/components/timeline.ts +11 -0
- package/src/types/components/toast.ts +35 -0
- package/src/types/components/tooltip.ts +24 -0
- package/src/types/components/tour.ts +11 -0
- package/src/types/components/tree.ts +11 -0
- package/src/types/components/user.ts +11 -0
- package/src/types/components/{embed-youtube.ts → video.ts} +2 -2
- package/src/types/components/watermark.ts +11 -0
- package/src/types/components/window-mockup.ts +11 -0
- package/src/types/index.ts +2 -1
- package/src/types/theme.ts +1 -0
- package/src/components/ThemeToggle.astro +0 -57
- package/src/preset.ts +0 -393
- /package/src/themes/{embedYoutube.theme.ts → video.theme.ts} +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { scv } from "css-variants"
|
|
3
|
+
import { useUi, resolveClasses } from "../../utils"
|
|
4
|
+
import type { TableOfContentsProps } from "../../types"
|
|
5
|
+
import tableOfContentsThemeDefault from "../../themes/table-of-contents.theme"
|
|
6
|
+
|
|
7
|
+
const tableOfContents = scv(tableOfContentsThemeDefault)
|
|
8
|
+
|
|
9
|
+
const {
|
|
10
|
+
ui: uiProp,
|
|
11
|
+
class: className,
|
|
12
|
+
...rest
|
|
13
|
+
} = Astro.props as TableOfContentsProps
|
|
14
|
+
|
|
15
|
+
const classes = resolveClasses(tableOfContents, {}, useUi("tableOfContents", uiProp), className);
|
|
16
|
+
---
|
|
17
|
+
<div class={classes.root} data-slot="root" {...rest}>
|
|
18
|
+
<slot />
|
|
19
|
+
</div>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { scv } from "css-variants"
|
|
3
|
+
import { useUi, resolveClasses } from "../../utils"
|
|
4
|
+
import type { TabsProps } from "../../types"
|
|
5
|
+
import tabsThemeDefault, { createTabsTheme } from "../../themes/tabs.theme"
|
|
6
|
+
|
|
7
|
+
const tabsTheme = tabsThemeDefault
|
|
8
|
+
const tabs = scv(tabsTheme)
|
|
9
|
+
|
|
10
|
+
const {
|
|
11
|
+
items = [],
|
|
12
|
+
value = "",
|
|
13
|
+
variant = "solid",
|
|
14
|
+
orientation = "horizontal",
|
|
15
|
+
size = "md",
|
|
16
|
+
color = "primary",
|
|
17
|
+
ui: uiProp,
|
|
18
|
+
class: className,
|
|
19
|
+
...rest
|
|
20
|
+
} = Astro.props as TabsProps
|
|
21
|
+
|
|
22
|
+
const classes = resolveClasses(tabs, {
|
|
23
|
+
variant,
|
|
24
|
+
orientation,
|
|
25
|
+
size
|
|
26
|
+
}, useUi("tabs", uiProp), className);
|
|
27
|
+
|
|
28
|
+
const initialValue = value || (items.length > 0 ? items[0].value : "")
|
|
29
|
+
---
|
|
30
|
+
<div class={classes.root} data-slot="root" data-tabs-container data-value={initialValue} {...rest}>
|
|
31
|
+
<div class={classes.list} data-slot="list" role="tablist">
|
|
32
|
+
{items.map((item) => {
|
|
33
|
+
const active = item.value === initialValue
|
|
34
|
+
return (
|
|
35
|
+
<button
|
|
36
|
+
type="button"
|
|
37
|
+
class={classes.trigger}
|
|
38
|
+
data-slot="trigger"
|
|
39
|
+
role="tab"
|
|
40
|
+
data-value={item.value}
|
|
41
|
+
data-state={active ? "active" : "inactive"}
|
|
42
|
+
disabled={item.disabled}
|
|
43
|
+
>
|
|
44
|
+
{item.icon && <span class={item.icon + " mr-2"} />}
|
|
45
|
+
{item.label}
|
|
46
|
+
</button>
|
|
47
|
+
)
|
|
48
|
+
})}
|
|
49
|
+
</div>
|
|
50
|
+
<div class="flex-1">
|
|
51
|
+
<slot>
|
|
52
|
+
{items.map(item => {
|
|
53
|
+
const active = item.value === initialValue
|
|
54
|
+
return (
|
|
55
|
+
<div
|
|
56
|
+
class={classes.content + (active ? "" : " hidden")}
|
|
57
|
+
data-slot="content"
|
|
58
|
+
role="tabpanel"
|
|
59
|
+
data-value={item.value}
|
|
60
|
+
>
|
|
61
|
+
{item.content}
|
|
62
|
+
</div>
|
|
63
|
+
)
|
|
64
|
+
})}
|
|
65
|
+
</slot>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<script>
|
|
70
|
+
document.querySelectorAll("[data-tabs-container]").forEach(container => {
|
|
71
|
+
const triggers = container.querySelectorAll("[role=tab]");
|
|
72
|
+
const panels = container.querySelectorAll("[role=tabpanel]");
|
|
73
|
+
|
|
74
|
+
triggers.forEach(trigger => {
|
|
75
|
+
trigger.addEventListener("click", () => {
|
|
76
|
+
const targetValue = (trigger as HTMLButtonElement).dataset.value;
|
|
77
|
+
|
|
78
|
+
triggers.forEach(t => {
|
|
79
|
+
t.setAttribute("data-state", t.dataset.value === targetValue ? "active" : "inactive");
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
panels.forEach(panel => {
|
|
83
|
+
if ((panel as HTMLElement).dataset.value === targetValue) {
|
|
84
|
+
panel.classList.remove("hidden");
|
|
85
|
+
} else {
|
|
86
|
+
panel.classList.add("hidden");
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
</script>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { scv } from "css-variants"
|
|
3
|
+
import { useUi, resolveClasses } from "../../utils"
|
|
4
|
+
import type { TextareaProps } from "../../types"
|
|
5
|
+
import textareaThemeDefault, { createTextareaTheme } from "../../themes/textarea.theme"
|
|
6
|
+
|
|
7
|
+
const textareaTheme = textareaThemeDefault
|
|
8
|
+
const textarea = scv(textareaTheme)
|
|
9
|
+
|
|
10
|
+
const {
|
|
11
|
+
value = "",
|
|
12
|
+
placeholder,
|
|
13
|
+
disabled = false,
|
|
14
|
+
readonly = false,
|
|
15
|
+
name,
|
|
16
|
+
required = false,
|
|
17
|
+
rows = 4,
|
|
18
|
+
error = false,
|
|
19
|
+
size = "md",
|
|
20
|
+
color = "primary",
|
|
21
|
+
ui: uiProp,
|
|
22
|
+
class: className,
|
|
23
|
+
...rest
|
|
24
|
+
} = Astro.props as TextareaProps
|
|
25
|
+
|
|
26
|
+
const classes = resolveClasses(textarea, {
|
|
27
|
+
size,
|
|
28
|
+
error: !!error
|
|
29
|
+
}, useUi("textarea", uiProp), className);
|
|
30
|
+
---
|
|
31
|
+
<div class={classes.root} data-slot="root">
|
|
32
|
+
<textarea
|
|
33
|
+
class={classes.textarea}
|
|
34
|
+
placeholder={placeholder}
|
|
35
|
+
disabled={disabled}
|
|
36
|
+
readonly={readonly}
|
|
37
|
+
name={name}
|
|
38
|
+
required={required}
|
|
39
|
+
rows={rows}
|
|
40
|
+
{...rest}
|
|
41
|
+
>{value}</textarea>
|
|
42
|
+
</div>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { scv } from "css-variants"
|
|
3
|
+
import { useUi, resolveClasses } from "../../utils"
|
|
4
|
+
import type { ThemeSelectorProps } from "../../types"
|
|
5
|
+
import themeSelectorTheme from "../../themes/theme-selector.theme"
|
|
6
|
+
import RLAButton from "./RLAButton.astro"
|
|
7
|
+
|
|
8
|
+
const themeSelector = scv(themeSelectorTheme)
|
|
9
|
+
|
|
10
|
+
const {
|
|
11
|
+
size = "md",
|
|
12
|
+
ui: uiProp,
|
|
13
|
+
class: className,
|
|
14
|
+
...rest
|
|
15
|
+
} = Astro.props as ThemeSelectorProps
|
|
16
|
+
|
|
17
|
+
const classes = resolveClasses(themeSelector, {
|
|
18
|
+
size
|
|
19
|
+
}, useUi("themeSelector", uiProp), className);
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
<RLAButton
|
|
23
|
+
size={size}
|
|
24
|
+
class:list={["theme-toggle-button", classes.root]}
|
|
25
|
+
variant="ghost"
|
|
26
|
+
aria-label="Toggle theme"
|
|
27
|
+
{...rest}
|
|
28
|
+
>
|
|
29
|
+
<span class:list={[classes.sun]} />
|
|
30
|
+
<span class:list={[classes.moon]} />
|
|
31
|
+
</RLAButton>
|
|
32
|
+
|
|
33
|
+
<script>
|
|
34
|
+
function applyStoredTheme() {
|
|
35
|
+
const stored = localStorage.getItem('theme');
|
|
36
|
+
if (stored === 'dark') {
|
|
37
|
+
document.documentElement.classList.add('dark');
|
|
38
|
+
} else if (stored === 'light') {
|
|
39
|
+
document.documentElement.classList.remove('dark');
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function setupThemeToggle() {
|
|
44
|
+
const buttons = document.querySelectorAll('.theme-toggle-button');
|
|
45
|
+
|
|
46
|
+
const updateButtons = (isDark: boolean) => {
|
|
47
|
+
buttons.forEach(btn => {
|
|
48
|
+
btn.setAttribute('data-state', isDark ? 'on' : 'off');
|
|
49
|
+
btn.setAttribute('aria-pressed', isDark.toString());
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const currentIsDark = document.documentElement.classList.contains('dark');
|
|
54
|
+
updateButtons(currentIsDark);
|
|
55
|
+
|
|
56
|
+
buttons.forEach(button => {
|
|
57
|
+
if (button.hasAttribute('data-initialized')) return;
|
|
58
|
+
button.setAttribute('data-initialized', '');
|
|
59
|
+
button.addEventListener('click', () => {
|
|
60
|
+
const isDark = document.documentElement.classList.toggle('dark');
|
|
61
|
+
localStorage.setItem('theme', isDark ? 'dark' : 'light');
|
|
62
|
+
updateButtons(isDark);
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
applyStoredTheme();
|
|
68
|
+
setupThemeToggle();
|
|
69
|
+
document.addEventListener('astro:page-load', () => {
|
|
70
|
+
applyStoredTheme();
|
|
71
|
+
setupThemeToggle();
|
|
72
|
+
});
|
|
73
|
+
</script>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { scv } from "css-variants"
|
|
3
|
+
import { useUi, resolveClasses } from "../../utils"
|
|
4
|
+
import type { TimelineProps } from "../../types"
|
|
5
|
+
import timelineThemeDefault from "../../themes/timeline.theme"
|
|
6
|
+
|
|
7
|
+
const timeline = scv(timelineThemeDefault)
|
|
8
|
+
|
|
9
|
+
const {
|
|
10
|
+
ui: uiProp,
|
|
11
|
+
class: className,
|
|
12
|
+
...rest
|
|
13
|
+
} = Astro.props as TimelineProps
|
|
14
|
+
|
|
15
|
+
const classes = resolveClasses(timeline, {}, useUi("timeline", uiProp), className);
|
|
16
|
+
---
|
|
17
|
+
<div class={classes.root} data-slot="root" {...rest}>
|
|
18
|
+
<slot />
|
|
19
|
+
</div>
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { scv } from "css-variants"
|
|
3
|
+
import { useUi, resolveClasses } from "../../utils"
|
|
4
|
+
import type { ToastProps } from "../../types"
|
|
5
|
+
import toastThemeDefault, { createToastTheme } from "../../themes/toast.theme"
|
|
6
|
+
|
|
7
|
+
const toastTheme = toastThemeDefault
|
|
8
|
+
const toast = scv(toastTheme)
|
|
9
|
+
|
|
10
|
+
const {
|
|
11
|
+
title,
|
|
12
|
+
description,
|
|
13
|
+
variant = "default",
|
|
14
|
+
actionLabel,
|
|
15
|
+
duration = 5000,
|
|
16
|
+
color = "primary",
|
|
17
|
+
ui: uiProp,
|
|
18
|
+
class: className,
|
|
19
|
+
...rest
|
|
20
|
+
} = Astro.props as ToastProps
|
|
21
|
+
|
|
22
|
+
const classes = resolveClasses(toast, {
|
|
23
|
+
variant
|
|
24
|
+
}, useUi("toast", uiProp), className)
|
|
25
|
+
|
|
26
|
+
const variantIcons: Record<string, string> = {
|
|
27
|
+
default: "i-lucide-bell",
|
|
28
|
+
destructive: "i-lucide-alert-circle",
|
|
29
|
+
success: "i-lucide-check-circle-2",
|
|
30
|
+
warning: "i-lucide-alert-triangle",
|
|
31
|
+
info: "i-lucide-info",
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const icon = variantIcons[variant] ?? variantIcons.default!
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
<div
|
|
38
|
+
class={classes.root}
|
|
39
|
+
data-slot="root"
|
|
40
|
+
data-toast
|
|
41
|
+
data-duration={duration}
|
|
42
|
+
role="alert"
|
|
43
|
+
aria-live="assertive"
|
|
44
|
+
aria-atomic="true"
|
|
45
|
+
{...rest}
|
|
46
|
+
>
|
|
47
|
+
{/* Icon */}
|
|
48
|
+
<span class={icon + " size-4 shrink-0 mt-0.5"} aria-hidden="true" />
|
|
49
|
+
|
|
50
|
+
{/* Text body */}
|
|
51
|
+
<div class="flex flex-col gap-0.5 flex-1 min-w-0">
|
|
52
|
+
{title && (
|
|
53
|
+
<div class={classes.title} data-slot="title">
|
|
54
|
+
<slot name="title">{title}</slot>
|
|
55
|
+
</div>
|
|
56
|
+
)}
|
|
57
|
+
{description && (
|
|
58
|
+
<div class={classes.description} data-slot="description">
|
|
59
|
+
<slot name="description">{description}</slot>
|
|
60
|
+
</div>
|
|
61
|
+
)}
|
|
62
|
+
<slot />
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
{/* Action */}
|
|
66
|
+
{actionLabel && (
|
|
67
|
+
<button
|
|
68
|
+
type="button"
|
|
69
|
+
class={classes.action}
|
|
70
|
+
data-slot="action"
|
|
71
|
+
data-toast-action
|
|
72
|
+
>
|
|
73
|
+
{actionLabel}
|
|
74
|
+
</button>
|
|
75
|
+
)}
|
|
76
|
+
|
|
77
|
+
{/* Close button */}
|
|
78
|
+
<button
|
|
79
|
+
type="button"
|
|
80
|
+
class={classes.close}
|
|
81
|
+
data-slot="close"
|
|
82
|
+
data-toast-close
|
|
83
|
+
aria-label="Dismiss notification"
|
|
84
|
+
>
|
|
85
|
+
<span class="i-lucide-x size-3.5" aria-hidden="true" />
|
|
86
|
+
</button>
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
<script>
|
|
90
|
+
document.querySelectorAll("[data-toast]").forEach(toast => {
|
|
91
|
+
const close = toast.querySelector("[data-toast-close]");
|
|
92
|
+
const duration = parseInt((toast as HTMLElement).dataset.duration ?? "5000", 10);
|
|
93
|
+
|
|
94
|
+
const dismiss = () => {
|
|
95
|
+
toast.classList.add("opacity-0", "translate-y-2", "pointer-events-none");
|
|
96
|
+
toast.addEventListener("transitionend", () => toast.remove(), { once: true });
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
// Auto-dismiss
|
|
100
|
+
if (duration > 0) {
|
|
101
|
+
setTimeout(dismiss, duration);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Manual close
|
|
105
|
+
close?.addEventListener("click", dismiss);
|
|
106
|
+
});
|
|
107
|
+
</script>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { scv } from "css-variants"
|
|
3
|
+
import { useUi, resolveClasses } from "../../utils"
|
|
4
|
+
import type { TooltipProps } from "../../types"
|
|
5
|
+
import tooltipTheme from "../../themes/tooltip.theme"
|
|
6
|
+
|
|
7
|
+
const tooltip = scv(tooltipTheme)
|
|
8
|
+
|
|
9
|
+
const {
|
|
10
|
+
content,
|
|
11
|
+
placement = "top",
|
|
12
|
+
ui: uiProp,
|
|
13
|
+
class: className,
|
|
14
|
+
...rest
|
|
15
|
+
} = Astro.props as TooltipProps
|
|
16
|
+
|
|
17
|
+
const classes = resolveClasses(tooltip, {
|
|
18
|
+
placement
|
|
19
|
+
}, useUi("tooltip", uiProp), className)
|
|
20
|
+
---
|
|
21
|
+
<div class={classes.root} data-slot="tooltip-container" {...rest}>
|
|
22
|
+
<div class={classes.trigger} data-slot="trigger" tabindex="0">
|
|
23
|
+
<slot />
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<div class={classes.content} data-slot="content" role="tooltip">
|
|
27
|
+
<slot name="content">
|
|
28
|
+
{content}
|
|
29
|
+
</slot>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { scv } from "css-variants"
|
|
3
|
+
import { useUi, resolveClasses } from "../../utils"
|
|
4
|
+
import type { TourProps } from "../../types"
|
|
5
|
+
import tourThemeDefault from "../../themes/tour.theme"
|
|
6
|
+
|
|
7
|
+
const tour = scv(tourThemeDefault)
|
|
8
|
+
|
|
9
|
+
const {
|
|
10
|
+
ui: uiProp,
|
|
11
|
+
class: className,
|
|
12
|
+
...rest
|
|
13
|
+
} = Astro.props as TourProps
|
|
14
|
+
|
|
15
|
+
const classes = resolveClasses(tour, {}, useUi("tour", uiProp), className);
|
|
16
|
+
---
|
|
17
|
+
<div class={classes.root} data-slot="root" {...rest}>
|
|
18
|
+
<slot />
|
|
19
|
+
</div>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { scv } from "css-variants"
|
|
3
|
+
import { useUi, resolveClasses } from "../../utils"
|
|
4
|
+
import type { TreeProps } from "../../types"
|
|
5
|
+
import treeThemeDefault from "../../themes/tree.theme"
|
|
6
|
+
|
|
7
|
+
const tree = scv(treeThemeDefault)
|
|
8
|
+
|
|
9
|
+
const {
|
|
10
|
+
ui: uiProp,
|
|
11
|
+
class: className,
|
|
12
|
+
...rest
|
|
13
|
+
} = Astro.props as TreeProps
|
|
14
|
+
|
|
15
|
+
const classes = resolveClasses(tree, {}, useUi("tree", uiProp), className);
|
|
16
|
+
---
|
|
17
|
+
<div class={classes.root} data-slot="root" {...rest}>
|
|
18
|
+
<slot />
|
|
19
|
+
</div>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { scv } from "css-variants"
|
|
3
|
+
import { useUi, resolveClasses } from "../../utils"
|
|
4
|
+
import type { UserProps } from "../../types"
|
|
5
|
+
import userThemeDefault from "../../themes/user.theme"
|
|
6
|
+
|
|
7
|
+
const user = scv(userThemeDefault)
|
|
8
|
+
|
|
9
|
+
const {
|
|
10
|
+
ui: uiProp,
|
|
11
|
+
class: className,
|
|
12
|
+
...rest
|
|
13
|
+
} = Astro.props as UserProps
|
|
14
|
+
|
|
15
|
+
const classes = resolveClasses(user, {}, useUi("user", uiProp), className);
|
|
16
|
+
---
|
|
17
|
+
<div class={classes.root} data-slot="root" {...rest}>
|
|
18
|
+
<slot />
|
|
19
|
+
</div>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { scv } from "css-variants"
|
|
3
3
|
import { useUi, resolveClasses } from "../../utils"
|
|
4
|
-
import type {
|
|
5
|
-
import
|
|
4
|
+
import type { VideoProps } from "../../types"
|
|
5
|
+
import videoTheme from "../../themes/video.theme"
|
|
6
6
|
import { Image } from "astro:assets"
|
|
7
7
|
|
|
8
8
|
const PLACEHOLDER_THUMBNAIL = "/assets/placeholder.webp";
|
|
@@ -109,7 +109,7 @@ function getYoutubeEmbedUrl(rawUrl: string): string | null {
|
|
|
109
109
|
return id ? `${YOUTUBE_EMBED_BASE}${id}?autoplay=1` : null;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
const
|
|
112
|
+
const video = scv(videoTheme)
|
|
113
113
|
|
|
114
114
|
const {
|
|
115
115
|
src,
|
|
@@ -118,12 +118,12 @@ const {
|
|
|
118
118
|
ui: uiProp,
|
|
119
119
|
class: className,
|
|
120
120
|
...rest
|
|
121
|
-
} = Astro.props as
|
|
121
|
+
} = Astro.props as VideoProps
|
|
122
122
|
|
|
123
|
-
const classes = resolveClasses(
|
|
123
|
+
const classes = resolveClasses(video, {
|
|
124
124
|
title: !!(Astro.slots.has("title") || title),
|
|
125
125
|
icon: !!(Astro.slots.has("icon") || icon),
|
|
126
|
-
}, useUi("
|
|
126
|
+
}, useUi("video", uiProp), className);
|
|
127
127
|
|
|
128
128
|
const embedUrl = getYoutubeEmbedUrl(src);
|
|
129
129
|
const thumbnail = await getYoutubeThumbnail(src);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { scv } from "css-variants"
|
|
3
|
+
import { useUi, resolveClasses } from "../../utils"
|
|
4
|
+
import type { WatermarkProps } from "../../types"
|
|
5
|
+
import watermarkThemeDefault from "../../themes/watermark.theme"
|
|
6
|
+
|
|
7
|
+
const watermark = scv(watermarkThemeDefault)
|
|
8
|
+
|
|
9
|
+
const {
|
|
10
|
+
ui: uiProp,
|
|
11
|
+
class: className,
|
|
12
|
+
...rest
|
|
13
|
+
} = Astro.props as WatermarkProps
|
|
14
|
+
|
|
15
|
+
const classes = resolveClasses(watermark, {}, useUi("watermark", uiProp), className);
|
|
16
|
+
---
|
|
17
|
+
<div class={classes.root} data-slot="root" {...rest}>
|
|
18
|
+
<slot />
|
|
19
|
+
</div>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { scv } from "css-variants"
|
|
3
|
+
import { useUi, resolveClasses } from "../../utils"
|
|
4
|
+
import type { WindowMockupProps } from "../../types"
|
|
5
|
+
import windowMockupThemeDefault from "../../themes/window-mockup.theme"
|
|
6
|
+
|
|
7
|
+
const windowMockup = scv(windowMockupThemeDefault)
|
|
8
|
+
|
|
9
|
+
const {
|
|
10
|
+
ui: uiProp,
|
|
11
|
+
class: className,
|
|
12
|
+
...rest
|
|
13
|
+
} = Astro.props as WindowMockupProps
|
|
14
|
+
|
|
15
|
+
const classes = resolveClasses(windowMockup, {}, useUi("windowMockup", uiProp), className);
|
|
16
|
+
---
|
|
17
|
+
<div class={classes.root} data-slot="root" {...rest}>
|
|
18
|
+
<slot />
|
|
19
|
+
</div>
|