@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,136 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { scv } from "css-variants"
|
|
3
|
+
import { useUi, resolveClasses } from "../../utils"
|
|
4
|
+
import type { NavigationMenuProps } from "../../types"
|
|
5
|
+
import navigationMenuThemeDefault, { createNavigationMenuTheme } from "../../themes/navigation-menu.theme"
|
|
6
|
+
|
|
7
|
+
const navigationMenuTheme = navigationMenuThemeDefault
|
|
8
|
+
const navigationMenu = scv(navigationMenuTheme)
|
|
9
|
+
|
|
10
|
+
const {
|
|
11
|
+
items = [],
|
|
12
|
+
color = "primary",
|
|
13
|
+
ui: uiProp,
|
|
14
|
+
class: className,
|
|
15
|
+
...rest
|
|
16
|
+
} = Astro.props as NavigationMenuProps
|
|
17
|
+
|
|
18
|
+
const classes = resolveClasses(navigationMenu, {}, useUi("navigationMenu", uiProp), className)
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
<nav class={classes.root} data-slot="root" data-nav-menu {...rest}>
|
|
22
|
+
<ul class={classes.list} data-slot="list" role="list">
|
|
23
|
+
{items.map((item, i) => {
|
|
24
|
+
const hasChildren = item.children && item.children.length > 0
|
|
25
|
+
return (
|
|
26
|
+
<li class={classes.item} data-slot="item" data-nav-item>
|
|
27
|
+
{hasChildren ? (
|
|
28
|
+
<button
|
|
29
|
+
type="button"
|
|
30
|
+
class={classes.trigger}
|
|
31
|
+
data-slot="trigger"
|
|
32
|
+
data-nav-trigger
|
|
33
|
+
aria-expanded="false"
|
|
34
|
+
aria-haspopup="true"
|
|
35
|
+
>
|
|
36
|
+
{item.icon && <span class={item.icon + " mr-1.5 size-4"} />}
|
|
37
|
+
{item.label}
|
|
38
|
+
<span class="i-lucide-chevron-down ml-1 size-3.5 transition-transform duration-200" aria-hidden="true" />
|
|
39
|
+
</button>
|
|
40
|
+
) : (
|
|
41
|
+
<a
|
|
42
|
+
href={item.href ?? "#"}
|
|
43
|
+
class={classes.link}
|
|
44
|
+
data-slot="link"
|
|
45
|
+
>
|
|
46
|
+
{item.icon && <span class={item.icon + " mr-1.5 size-4"} />}
|
|
47
|
+
{item.label}
|
|
48
|
+
</a>
|
|
49
|
+
)}
|
|
50
|
+
|
|
51
|
+
{hasChildren && (
|
|
52
|
+
<div class={classes.content + " hidden"} data-slot="content" data-nav-content role="region">
|
|
53
|
+
<ul role="list" class="py-1">
|
|
54
|
+
{item.children!.map(child => (
|
|
55
|
+
<li>
|
|
56
|
+
<a
|
|
57
|
+
href={child.href ?? "#"}
|
|
58
|
+
class="flex items-start gap-3 rounded-sm px-3 py-2 text-sm hover:bg-accent hover:text-accent-foreground transition-colors"
|
|
59
|
+
>
|
|
60
|
+
{child.icon && <span class={child.icon + " mt-0.5 size-4 shrink-0 text-muted-foreground"} />}
|
|
61
|
+
<div>
|
|
62
|
+
<div class="font-medium leading-none">{child.label}</div>
|
|
63
|
+
{child.description && (
|
|
64
|
+
<p class="mt-1 text-xs text-muted-foreground line-clamp-2">{child.description}</p>
|
|
65
|
+
)}
|
|
66
|
+
</div>
|
|
67
|
+
</a>
|
|
68
|
+
</li>
|
|
69
|
+
))}
|
|
70
|
+
</ul>
|
|
71
|
+
</div>
|
|
72
|
+
)}
|
|
73
|
+
</li>
|
|
74
|
+
)
|
|
75
|
+
})}
|
|
76
|
+
</ul>
|
|
77
|
+
|
|
78
|
+
<slot />
|
|
79
|
+
|
|
80
|
+
<div class={classes.viewport} data-slot="viewport" />
|
|
81
|
+
</nav>
|
|
82
|
+
|
|
83
|
+
<script>
|
|
84
|
+
document.querySelectorAll("[data-nav-menu]").forEach(menu => {
|
|
85
|
+
const items = menu.querySelectorAll("[data-nav-item]");
|
|
86
|
+
|
|
87
|
+
items.forEach(item => {
|
|
88
|
+
const trigger = item.querySelector("[data-nav-trigger]");
|
|
89
|
+
const content = item.querySelector("[data-nav-content]");
|
|
90
|
+
|
|
91
|
+
if (!trigger || !content) return;
|
|
92
|
+
|
|
93
|
+
const open = () => {
|
|
94
|
+
content.classList.remove("hidden");
|
|
95
|
+
trigger.setAttribute("aria-expanded", "true");
|
|
96
|
+
const icon = trigger.querySelector(".i-lucide-chevron-down");
|
|
97
|
+
if (icon) (icon as HTMLElement).style.transform = "rotate(180deg)";
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const close = () => {
|
|
101
|
+
content.classList.add("hidden");
|
|
102
|
+
trigger.setAttribute("aria-expanded", "false");
|
|
103
|
+
const icon = trigger.querySelector(".i-lucide-chevron-down");
|
|
104
|
+
if (icon) (icon as HTMLElement).style.transform = "";
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
trigger.addEventListener("click", (e) => {
|
|
108
|
+
e.stopPropagation();
|
|
109
|
+
const isOpen = !content.classList.contains("hidden");
|
|
110
|
+
// Close all others
|
|
111
|
+
items.forEach(other => {
|
|
112
|
+
const otherContent = other.querySelector("[data-nav-content]");
|
|
113
|
+
const otherTrigger = other.querySelector("[data-nav-trigger]");
|
|
114
|
+
if (otherContent && !otherContent.classList.contains("hidden")) {
|
|
115
|
+
otherContent.classList.add("hidden");
|
|
116
|
+
otherTrigger?.setAttribute("aria-expanded", "false");
|
|
117
|
+
const icon = otherTrigger?.querySelector(".i-lucide-chevron-down");
|
|
118
|
+
if (icon) (icon as HTMLElement).style.transform = "";
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
if (!isOpen) open();
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
document.addEventListener("click", () => {
|
|
126
|
+
items.forEach(item => {
|
|
127
|
+
const content = item.querySelector("[data-nav-content]");
|
|
128
|
+
const trigger = item.querySelector("[data-nav-trigger]");
|
|
129
|
+
if (content) content.classList.add("hidden");
|
|
130
|
+
if (trigger) trigger.setAttribute("aria-expanded", "false");
|
|
131
|
+
const icon = trigger?.querySelector(".i-lucide-chevron-down");
|
|
132
|
+
if (icon) (icon as HTMLElement).style.transform = "";
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
</script>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { scv } from "css-variants"
|
|
3
|
+
import { useUi, resolveClasses } from "../../utils"
|
|
4
|
+
import type { PageProps } from "../../types"
|
|
5
|
+
import pageThemeDefault from "../../themes/page.theme"
|
|
6
|
+
|
|
7
|
+
const page = scv(pageThemeDefault)
|
|
8
|
+
|
|
9
|
+
const {
|
|
10
|
+
ui: uiProp,
|
|
11
|
+
class: className,
|
|
12
|
+
...rest
|
|
13
|
+
} = Astro.props as PageProps
|
|
14
|
+
|
|
15
|
+
const classes = resolveClasses(page, {}, useUi("page", 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 { PageAsideProps } from "../../types"
|
|
5
|
+
import pageAsideThemeDefault from "../../themes/page-aside.theme"
|
|
6
|
+
|
|
7
|
+
const pageAside = scv(pageAsideThemeDefault)
|
|
8
|
+
|
|
9
|
+
const {
|
|
10
|
+
ui: uiProp,
|
|
11
|
+
class: className,
|
|
12
|
+
...rest
|
|
13
|
+
} = Astro.props as PageAsideProps
|
|
14
|
+
|
|
15
|
+
const classes = resolveClasses(pageAside, {}, useUi("pageAside", 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 { PageBodyProps } from "../../types"
|
|
5
|
+
import pageBodyThemeDefault from "../../themes/page-body.theme"
|
|
6
|
+
|
|
7
|
+
const pageBody = scv(pageBodyThemeDefault)
|
|
8
|
+
|
|
9
|
+
const {
|
|
10
|
+
ui: uiProp,
|
|
11
|
+
class: className,
|
|
12
|
+
...rest
|
|
13
|
+
} = Astro.props as PageBodyProps
|
|
14
|
+
|
|
15
|
+
const classes = resolveClasses(pageBody, {}, useUi("pageBody", 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 { PageHeaderProps } from "../../types"
|
|
5
|
+
import pageHeaderThemeDefault from "../../themes/page-header.theme"
|
|
6
|
+
|
|
7
|
+
const pageHeader = scv(pageHeaderThemeDefault)
|
|
8
|
+
|
|
9
|
+
const {
|
|
10
|
+
ui: uiProp,
|
|
11
|
+
class: className,
|
|
12
|
+
...rest
|
|
13
|
+
} = Astro.props as PageHeaderProps
|
|
14
|
+
|
|
15
|
+
const classes = resolveClasses(pageHeader, {}, useUi("pageHeader", uiProp), className);
|
|
16
|
+
---
|
|
17
|
+
<div class={classes.root} data-slot="root" {...rest}>
|
|
18
|
+
<slot />
|
|
19
|
+
</div>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { scv } from "css-variants"
|
|
3
3
|
import { useUi, resolveClasses } from "../../utils"
|
|
4
|
-
import type {
|
|
5
|
-
import
|
|
4
|
+
import type { PageSectionProps } from "../../types"
|
|
5
|
+
import pageSectionTheme from "../../themes/page-section.theme"
|
|
6
6
|
import RLAIcon from "./RLAIcon.astro"
|
|
7
7
|
import RLAButton from "./RLAButton.astro"
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const pageSection = scv(pageSectionTheme)
|
|
10
10
|
|
|
11
11
|
const {
|
|
12
12
|
as = "section",
|
|
@@ -22,9 +22,9 @@ const {
|
|
|
22
22
|
ui: uiProp,
|
|
23
23
|
class: className,
|
|
24
24
|
...rest
|
|
25
|
-
} = Astro.props as
|
|
25
|
+
} = Astro.props as PageSectionProps;
|
|
26
26
|
|
|
27
|
-
const classes = resolveClasses(
|
|
27
|
+
const classes = resolveClasses(pageSection, {
|
|
28
28
|
variant,
|
|
29
29
|
orientation,
|
|
30
30
|
reverse,
|
|
@@ -33,7 +33,7 @@ const classes = resolveClasses(section, {
|
|
|
33
33
|
title: !!(Astro.slots.has("title") || title),
|
|
34
34
|
description: !!(Astro.slots.has("description") || description),
|
|
35
35
|
body: Astro.slots.has("body")
|
|
36
|
-
}, useUi("
|
|
36
|
+
}, useUi("pageSection", uiProp), className);
|
|
37
37
|
|
|
38
38
|
const hasDefaultSlot = Astro.slots.has("default");
|
|
39
39
|
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { scv } from "css-variants"
|
|
3
|
+
import { useUi, resolveClasses } from "../../utils"
|
|
4
|
+
import type { PaginationProps } from "../../types"
|
|
5
|
+
import paginationTheme from "../../themes/pagination.theme"
|
|
6
|
+
|
|
7
|
+
const pagination = scv(paginationTheme)
|
|
8
|
+
|
|
9
|
+
const {
|
|
10
|
+
currentPage = 1,
|
|
11
|
+
totalPages = 1,
|
|
12
|
+
baseUrl = "?page=",
|
|
13
|
+
ui: uiProp,
|
|
14
|
+
class: className,
|
|
15
|
+
...rest
|
|
16
|
+
} = Astro.props as PaginationProps
|
|
17
|
+
|
|
18
|
+
const classes = resolveClasses(pagination, {}, useUi("pagination", uiProp), className)
|
|
19
|
+
|
|
20
|
+
const getPageNumbers = () => {
|
|
21
|
+
const pages: (number | "ellipsis")[] = []
|
|
22
|
+
const maxVisible = 5
|
|
23
|
+
if (totalPages <= maxVisible) {
|
|
24
|
+
for (let i = 1; i <= totalPages; i++) pages.push(i)
|
|
25
|
+
} else {
|
|
26
|
+
pages.push(1)
|
|
27
|
+
if (currentPage > 3) pages.push("ellipsis")
|
|
28
|
+
const start = Math.max(2, currentPage - 1)
|
|
29
|
+
const end = Math.min(totalPages - 1, currentPage + 1)
|
|
30
|
+
for (let i = start; i <= end; i++) {
|
|
31
|
+
if (!pages.includes(i)) pages.push(i)
|
|
32
|
+
}
|
|
33
|
+
if (currentPage < totalPages - 2) pages.push("ellipsis")
|
|
34
|
+
if (!pages.includes(totalPages)) pages.push(totalPages)
|
|
35
|
+
}
|
|
36
|
+
return pages
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const pages = getPageNumbers()
|
|
40
|
+
---
|
|
41
|
+
<nav class={classes.root} data-slot="pagination-root" aria-label="pagination" {...rest}>
|
|
42
|
+
<ul class={classes.list} data-slot="list">
|
|
43
|
+
<li class={classes.item}>
|
|
44
|
+
<a
|
|
45
|
+
href={currentPage > 1 ? `${baseUrl}${currentPage - 1}` : undefined}
|
|
46
|
+
class={classes.link}
|
|
47
|
+
aria-label="Go to previous page"
|
|
48
|
+
aria-disabled={currentPage === 1}
|
|
49
|
+
style={currentPage === 1 ? "pointer-events: none; opacity: 0.5;" : ""}
|
|
50
|
+
>
|
|
51
|
+
<span class="i-lucide-chevron-left size-4" aria-hidden="true" />
|
|
52
|
+
</a>
|
|
53
|
+
</li>
|
|
54
|
+
|
|
55
|
+
{pages.map((p) => {
|
|
56
|
+
if (p === "ellipsis") {
|
|
57
|
+
return (
|
|
58
|
+
<li class={classes.item}>
|
|
59
|
+
<span class={classes.ellipsis} aria-hidden="true">
|
|
60
|
+
…
|
|
61
|
+
</span>
|
|
62
|
+
</li>
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const isActive = p === currentPage
|
|
67
|
+
const itemClasses = resolveClasses(pagination, { active: isActive }, useUi("pagination", uiProp))
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<li class={classes.item}>
|
|
71
|
+
<a
|
|
72
|
+
href={`${baseUrl}${p}`}
|
|
73
|
+
class={itemClasses.link}
|
|
74
|
+
aria-current={isActive ? "page" : undefined}
|
|
75
|
+
>
|
|
76
|
+
{p}
|
|
77
|
+
</a>
|
|
78
|
+
</li>
|
|
79
|
+
)
|
|
80
|
+
})}
|
|
81
|
+
|
|
82
|
+
<li class={classes.item}>
|
|
83
|
+
<a
|
|
84
|
+
href={currentPage < totalPages ? `${baseUrl}${currentPage + 1}` : undefined}
|
|
85
|
+
class={classes.link}
|
|
86
|
+
aria-label="Go to next page"
|
|
87
|
+
aria-disabled={currentPage === totalPages}
|
|
88
|
+
style={currentPage === totalPages ? "pointer-events: none; opacity: 0.5;" : ""}
|
|
89
|
+
>
|
|
90
|
+
<span class="i-lucide-chevron-right size-4" aria-hidden="true" />
|
|
91
|
+
</a>
|
|
92
|
+
</li>
|
|
93
|
+
</ul>
|
|
94
|
+
</nav>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { scv } from "css-variants"
|
|
3
|
+
import { useUi, resolveClasses } from "../../utils"
|
|
4
|
+
import type { PasswordProps } from "../../types"
|
|
5
|
+
import passwordThemeDefault from "../../themes/password.theme"
|
|
6
|
+
|
|
7
|
+
const password = scv(passwordThemeDefault)
|
|
8
|
+
|
|
9
|
+
const {
|
|
10
|
+
ui: uiProp,
|
|
11
|
+
class: className,
|
|
12
|
+
...rest
|
|
13
|
+
} = Astro.props as PasswordProps
|
|
14
|
+
|
|
15
|
+
const classes = resolveClasses(password, {}, useUi("password", 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 { PhoneMockupProps } from "../../types"
|
|
5
|
+
import phoneMockupThemeDefault from "../../themes/phone-mockup.theme"
|
|
6
|
+
|
|
7
|
+
const phoneMockup = scv(phoneMockupThemeDefault)
|
|
8
|
+
|
|
9
|
+
const {
|
|
10
|
+
ui: uiProp,
|
|
11
|
+
class: className,
|
|
12
|
+
...rest
|
|
13
|
+
} = Astro.props as PhoneMockupProps
|
|
14
|
+
|
|
15
|
+
const classes = resolveClasses(phoneMockup, {}, useUi("phoneMockup", uiProp), className);
|
|
16
|
+
---
|
|
17
|
+
<div class={classes.root} data-slot="root" {...rest}>
|
|
18
|
+
<slot />
|
|
19
|
+
</div>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { scv } from "css-variants"
|
|
3
|
+
import { useUi, resolveClasses } from "../../utils"
|
|
4
|
+
import type { PopoverProps } from "../../types"
|
|
5
|
+
import popoverTheme from "../../themes/popover.theme"
|
|
6
|
+
|
|
7
|
+
const popover = scv(popoverTheme)
|
|
8
|
+
|
|
9
|
+
const {
|
|
10
|
+
triggerLabel,
|
|
11
|
+
placement = "bottom",
|
|
12
|
+
ui: uiProp,
|
|
13
|
+
class: className,
|
|
14
|
+
...rest
|
|
15
|
+
} = Astro.props as PopoverProps
|
|
16
|
+
|
|
17
|
+
const classes = resolveClasses(popover, {
|
|
18
|
+
placement
|
|
19
|
+
}, useUi("popover", uiProp), className)
|
|
20
|
+
---
|
|
21
|
+
<div class={classes.root} data-slot="popover-container" {...rest}>
|
|
22
|
+
<div class={classes.trigger} data-slot="trigger" tabindex="0">
|
|
23
|
+
<slot name="trigger">
|
|
24
|
+
{triggerLabel && <button type="button" class="cursor-pointer">{triggerLabel}</button>}
|
|
25
|
+
</slot>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<div class={classes.content} data-slot="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 { PostProps } from "../../types"
|
|
5
|
+
import postThemeDefault from "../../themes/post.theme"
|
|
6
|
+
|
|
7
|
+
const post = scv(postThemeDefault)
|
|
8
|
+
|
|
9
|
+
const {
|
|
10
|
+
ui: uiProp,
|
|
11
|
+
class: className,
|
|
12
|
+
...rest
|
|
13
|
+
} = Astro.props as PostProps
|
|
14
|
+
|
|
15
|
+
const classes = resolveClasses(post, {}, useUi("post", 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 { PricingPlanProps } from "../../types"
|
|
5
|
+
import pricingPlanThemeDefault from "../../themes/pricing-plan.theme"
|
|
6
|
+
|
|
7
|
+
const pricingPlan = scv(pricingPlanThemeDefault)
|
|
8
|
+
|
|
9
|
+
const {
|
|
10
|
+
ui: uiProp,
|
|
11
|
+
class: className,
|
|
12
|
+
...rest
|
|
13
|
+
} = Astro.props as PricingPlanProps
|
|
14
|
+
|
|
15
|
+
const classes = resolveClasses(pricingPlan, {}, useUi("pricingPlan", 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 { PricingTableProps } from "../../types"
|
|
5
|
+
import pricingTableThemeDefault from "../../themes/pricing-table.theme"
|
|
6
|
+
|
|
7
|
+
const pricingTable = scv(pricingTableThemeDefault)
|
|
8
|
+
|
|
9
|
+
const {
|
|
10
|
+
ui: uiProp,
|
|
11
|
+
class: className,
|
|
12
|
+
...rest
|
|
13
|
+
} = Astro.props as PricingTableProps
|
|
14
|
+
|
|
15
|
+
const classes = resolveClasses(pricingTable, {}, useUi("pricingTable", uiProp), className);
|
|
16
|
+
---
|
|
17
|
+
<div class={classes.root} data-slot="root" {...rest}>
|
|
18
|
+
<slot />
|
|
19
|
+
</div>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { scv } from "css-variants"
|
|
3
|
+
import { useUi, resolveClasses } from "../../utils"
|
|
4
|
+
import type { ProgressProps } from "../../types"
|
|
5
|
+
import progressThemeDefault, { createProgressTheme } from "../../themes/progress.theme"
|
|
6
|
+
import { getUIConfig } from "virtual:rimelight-ui"
|
|
7
|
+
|
|
8
|
+
const uiConfig = getUIConfig()
|
|
9
|
+
const progressTheme = uiConfig.colors ? createProgressTheme(uiConfig.colors) : progressThemeDefault
|
|
10
|
+
const progress = scv(progressTheme)
|
|
11
|
+
|
|
12
|
+
const {
|
|
13
|
+
value = 0,
|
|
14
|
+
max = 100,
|
|
15
|
+
color = "primary",
|
|
16
|
+
size = "md",
|
|
17
|
+
theme,
|
|
18
|
+
ui: uiProp,
|
|
19
|
+
class: className,
|
|
20
|
+
...rest
|
|
21
|
+
} = Astro.props as ProgressProps
|
|
22
|
+
|
|
23
|
+
const classes = resolveClasses(progress, {
|
|
24
|
+
color,
|
|
25
|
+
size,
|
|
26
|
+
theme
|
|
27
|
+
}, useUi("progress", uiProp), className)
|
|
28
|
+
|
|
29
|
+
const percentage = Math.min(100, Math.max(0, (value / max) * 100))
|
|
30
|
+
---
|
|
31
|
+
<div
|
|
32
|
+
class={classes.root}
|
|
33
|
+
data-slot="progress-root"
|
|
34
|
+
role="progressbar"
|
|
35
|
+
aria-valuemin={0}
|
|
36
|
+
aria-valuemax={max}
|
|
37
|
+
aria-valuenow={value}
|
|
38
|
+
{...rest}
|
|
39
|
+
>
|
|
40
|
+
<div
|
|
41
|
+
class={classes.indicator}
|
|
42
|
+
data-slot="indicator"
|
|
43
|
+
style={{ transform: `translateX(-${100 - percentage}%)` }}
|
|
44
|
+
/>
|
|
45
|
+
</div>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { scv } from "css-variants"
|
|
3
|
+
import { useUi, resolveClasses } from "../../utils"
|
|
4
|
+
import type { ProseProps } from "../../types"
|
|
5
|
+
import proseThemeDefault from "../../themes/prose.theme"
|
|
6
|
+
|
|
7
|
+
const prose = scv(proseThemeDefault)
|
|
8
|
+
|
|
9
|
+
const {
|
|
10
|
+
ui: uiProp,
|
|
11
|
+
class: className,
|
|
12
|
+
...rest
|
|
13
|
+
} = Astro.props as ProseProps
|
|
14
|
+
|
|
15
|
+
const classes = resolveClasses(prose, {}, useUi("prose", 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 { QrCodeProps } from "../../types"
|
|
5
|
+
import qrCodeThemeDefault from "../../themes/qr-code.theme"
|
|
6
|
+
|
|
7
|
+
const qrCode = scv(qrCodeThemeDefault)
|
|
8
|
+
|
|
9
|
+
const {
|
|
10
|
+
ui: uiProp,
|
|
11
|
+
class: className,
|
|
12
|
+
...rest
|
|
13
|
+
} = Astro.props as QrCodeProps
|
|
14
|
+
|
|
15
|
+
const classes = resolveClasses(qrCode, {}, useUi("qrCode", 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 { RadioGroupProps } from "../../types"
|
|
5
|
+
import radioGroupThemeDefault from "../../themes/radio-group.theme"
|
|
6
|
+
|
|
7
|
+
const radioGroup = scv(radioGroupThemeDefault)
|
|
8
|
+
|
|
9
|
+
const {
|
|
10
|
+
ui: uiProp,
|
|
11
|
+
class: className,
|
|
12
|
+
...rest
|
|
13
|
+
} = Astro.props as RadioGroupProps
|
|
14
|
+
|
|
15
|
+
const classes = resolveClasses(radioGroup, {}, useUi("radioGroup", 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 { RatingProps } from "../../types"
|
|
5
|
+
import ratingThemeDefault from "../../themes/rating.theme"
|
|
6
|
+
|
|
7
|
+
const rating = scv(ratingThemeDefault)
|
|
8
|
+
|
|
9
|
+
const {
|
|
10
|
+
ui: uiProp,
|
|
11
|
+
class: className,
|
|
12
|
+
...rest
|
|
13
|
+
} = Astro.props as RatingProps
|
|
14
|
+
|
|
15
|
+
const classes = resolveClasses(rating, {}, useUi("rating", uiProp), className);
|
|
16
|
+
---
|
|
17
|
+
<div class={classes.root} data-slot="root" {...rest}>
|
|
18
|
+
<slot />
|
|
19
|
+
</div>
|