@rimelight/ui 0.0.41 → 0.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -14
- package/package.json +20 -30
- package/src/components/3d-hover/3d-hover.theme.ts +9 -12
- package/src/components/3d-hover/RLA3dHover.astro +9 -20
- package/src/components/accordion/RLAAccordion.astro +5 -14
- package/src/components/accordion/accordion.theme.ts +34 -37
- package/src/components/app/RLAApp.astro +9 -20
- package/src/components/app/app.theme.ts +9 -12
- package/src/components/aspect-ratio/RLAAspectRatio.astro +19 -27
- package/src/components/aspect-ratio/aspect-ratio.theme.ts +8 -12
- package/src/components/audio/RLAAudio.astro +3 -14
- package/src/components/audio/audio.theme.ts +9 -12
- package/src/components/avatar/RLAAvatar.astro +9 -29
- package/src/components/avatar/avatar.theme.ts +66 -77
- package/src/components/avatar/avatar.ts +6 -11
- package/src/components/avatar-group/RLAAvatarGroup.astro +188 -23
- package/src/components/avatar-group/avatar-group.theme.ts +12 -11
- package/src/components/avatar-group/avatar-group.ts +41 -0
- package/src/components/badge/RLABadge.astro +23 -36
- package/src/components/badge/RLSBadge.tsx +41 -0
- package/src/components/badge/RLVBadge.vue +8 -16
- package/src/components/badge/badge.theme.ts +118 -160
- package/src/components/badge/badge.ts +2 -1
- package/src/components/banner/RLABanner.astro +88 -103
- package/src/components/banner/banner.theme.ts +40 -43
- package/src/components/breadcrumb/RLABreadcrumb.astro +241 -62
- package/src/components/breadcrumb/breadcrumb.theme.ts +12 -16
- package/src/components/breadcrumb/breadcrumb.ts +19 -0
- package/src/components/browser-mockup/RLABrowserMockup.astro +9 -20
- package/src/components/browser-mockup/browser-mockup.theme.ts +9 -12
- package/src/components/button/RLAButton.astro +10 -30
- package/src/components/button/RLSButton.tsx +169 -0
- package/src/components/button/RLVButton.vue +13 -26
- package/src/components/button/button.theme.ts +163 -220
- package/src/components/button/button.ts +1 -1
- package/src/components/calendar/RLACalendar.astro +9 -20
- package/src/components/calendar/calendar.theme.ts +9 -12
- package/src/components/callout/RLACallout.astro +5 -14
- package/src/components/callout/callout.theme.ts +59 -101
- package/src/components/callout/callout.ts +1 -1
- package/src/components/card/RLACard.astro +71 -77
- package/src/components/card/RLSCard.tsx +116 -0
- package/src/components/card/RLVCard.vue +6 -14
- package/src/components/card/card.theme.ts +41 -44
- package/src/components/carousel/RLACarousel.astro +43 -11
- package/src/components/carousel/carousel.theme.ts +28 -32
- package/src/components/chart/RLAChart.astro +5 -11
- package/src/components/chart/chart.theme.ts +18 -21
- package/src/components/chart/chart.ts +1 -1
- package/src/components/chat/RLAChat.astro +9 -20
- package/src/components/chat/chat.theme.ts +9 -12
- package/src/components/chat-message/RLAChatMessage.astro +9 -20
- package/src/components/chat-message/chat-message.theme.ts +9 -12
- package/src/components/chat-messages/RLAChatMessages.astro +9 -20
- package/src/components/chat-messages/chat-messages.theme.ts +9 -12
- package/src/components/chat-palette/RLAChatPalette.astro +9 -20
- package/src/components/chat-palette/chat-palette.theme.ts +9 -12
- package/src/components/chat-prompt/RLAChatPrompt.astro +9 -20
- package/src/components/chat-prompt/chat-prompt.theme.ts +9 -12
- package/src/components/chat-prompt-submit/RLAChatPromptSubmit.astro +9 -20
- package/src/components/chat-prompt-submit/chat-prompt-submit.theme.ts +9 -12
- package/src/components/chat-reasoning/RLAChatReasoning.astro +9 -20
- package/src/components/chat-reasoning/chat-reasoning.theme.ts +9 -12
- package/src/components/chat-shimmer/RLAChatShimmer.astro +9 -20
- package/src/components/chat-shimmer/chat-shimmer.theme.ts +9 -12
- package/src/components/chat-tool/RLAChatTool.astro +9 -20
- package/src/components/chat-tool/chat-tool.theme.ts +9 -12
- package/src/components/checkbox/RLACheckbox.astro +2 -17
- package/src/components/checkbox/RLSCheckbox.tsx +65 -0
- package/src/components/checkbox/checkbox.theme.ts +34 -45
- package/src/components/checkbox/checkbox.ts +1 -1
- package/src/components/chip/RLAChip.astro +32 -56
- package/src/components/chip/chip.theme.ts +66 -72
- package/src/components/chip/chip.ts +3 -1
- package/src/components/collapsible/RLACollapsible.astro +2 -12
- package/src/components/collapsible/collapsible.theme.ts +17 -20
- package/src/components/collapsible/collapsible.ts +1 -1
- package/src/components/color-area/RLAColorArea.astro +2 -13
- package/src/components/color-area/color-area.theme.ts +19 -31
- package/src/components/color-area/color-area.ts +1 -1
- package/src/components/color-field/RLAColorField.astro +3 -14
- package/src/components/color-field/color-field.theme.ts +18 -30
- package/src/components/color-field/color-field.ts +1 -1
- package/src/components/color-picker/RLAColorPicker.astro +9 -20
- package/src/components/color-picker/color-picker.theme.ts +9 -12
- package/src/components/color-slider/RLAColorSlider.astro +2 -13
- package/src/components/color-slider/color-slider.theme.ts +20 -32
- package/src/components/color-slider/color-slider.ts +1 -1
- package/src/components/command-palette/RLACommandPalette.astro +9 -20
- package/src/components/command-palette/command-palette.theme.ts +9 -12
- package/src/components/compare/RLACompare.astro +9 -20
- package/src/components/compare/compare.theme.ts +9 -12
- package/src/components/confirm/RLAConfirm.astro +114 -122
- package/src/components/confirm/confirm.theme.ts +40 -44
- package/src/components/confirm/confirm.ts +1 -0
- package/src/components/container/RLAContainer.astro +9 -20
- package/src/components/container/container.theme.ts +9 -12
- package/src/components/context-menu/RLAContextMenu.astro +9 -20
- package/src/components/context-menu/context-menu.theme.ts +9 -12
- package/src/components/dashboard-group/RLADashboardGroup.astro +17 -21
- package/src/components/dashboard-group/dashboard-group.theme.ts +9 -12
- package/src/components/dashboard-group/dashboard-group.ts +1 -6
- package/src/components/dashboard-navbar/RLADashboardNavbar.astro +61 -21
- package/src/components/dashboard-navbar/dashboard-navbar.theme.ts +26 -12
- package/src/components/dashboard-navbar/dashboard-navbar.ts +5 -6
- package/src/components/dashboard-panel/RLADashboardPanel.astro +35 -21
- package/src/components/dashboard-panel/dashboard-panel.theme.ts +22 -12
- package/src/components/dashboard-panel/dashboard-panel.ts +4 -6
- package/src/components/dashboard-resize-handle/RLADashboardResizeHandle.astro +21 -21
- package/src/components/dashboard-resize-handle/dashboard-resize-handle.theme.ts +9 -12
- package/src/components/dashboard-resize-handle/dashboard-resize-handle.ts +1 -6
- package/src/components/dashboard-search/RLADashboardSearch.astro +100 -21
- package/src/components/dashboard-search/dashboard-search.theme.ts +24 -11
- package/src/components/dashboard-search/dashboard-search.ts +2 -6
- package/src/components/dashboard-search-button/RLADashboardSearchButton.astro +45 -21
- package/src/components/dashboard-search-button/dashboard-search-button.theme.ts +20 -12
- package/src/components/dashboard-search-button/dashboard-search-button.ts +4 -6
- package/src/components/dashboard-sidebar/RLADashboardSidebar.astro +119 -21
- package/src/components/dashboard-sidebar/dashboard-sidebar.theme.ts +40 -11
- package/src/components/dashboard-sidebar/dashboard-sidebar.ts +8 -6
- package/src/components/dashboard-sidebar-collapse/RLADashboardSidebarCollapse.astro +24 -21
- package/src/components/dashboard-sidebar-collapse/dashboard-sidebar-collapse.theme.ts +16 -12
- package/src/components/dashboard-sidebar-collapse/dashboard-sidebar-collapse.ts +2 -6
- package/src/components/dashboard-sidebar-toggle/RLADashboardSidebarToggle.astro +23 -21
- package/src/components/dashboard-sidebar-toggle/dashboard-sidebar-toggle.theme.ts +16 -12
- package/src/components/dashboard-sidebar-toggle/dashboard-sidebar-toggle.ts +2 -6
- package/src/components/dashboard-toolbar/RLADashboardToolbar.astro +25 -21
- package/src/components/dashboard-toolbar/dashboard-toolbar.theme.ts +11 -12
- package/src/components/dashboard-toolbar/dashboard-toolbar.ts +1 -6
- package/src/components/dock/RLADock.astro +9 -20
- package/src/components/dock/dock.theme.ts +9 -12
- package/src/components/drawer/RLADrawer.astro +115 -126
- package/src/components/drawer/drawer.theme.ts +53 -57
- package/src/components/dropdown-menu/RLADropdownMenu.astro +180 -47
- package/src/components/dropdown-menu/RLSDropdownMenu.tsx +196 -0
- package/src/components/dropdown-menu/dropdown-menu.theme.ts +51 -27
- package/src/components/dropdown-menu/dropdown-menu.ts +47 -9
- package/src/components/editor/RLAEditor.astro +9 -20
- package/src/components/editor/blocks/AddBlockModal.vue +3 -3
- package/src/components/editor/blocks/Block.vue +4 -3
- package/src/components/editor/blocks/BlockEditor.vue +3 -3
- package/src/components/editor/blocks/BlockViewRenderer.vue +8 -2
- package/src/components/editor/blocks/editor/CalloutBlockEditor.vue +2 -2
- package/src/components/editor/blocks/editor/ParagraphBlockEditor.vue +1 -1
- package/src/components/editor/blocks/editor/SectionBlockEditor.vue +3 -3
- package/src/components/editor/blocks/renderer/CalloutBlockRenderer.vue +2 -3
- package/src/components/editor/blocks/renderer/SectionBlockRenderer.vue +2 -2
- package/src/components/editor/editor.theme.ts +9 -12
- package/src/components/empty/RLAEmpty.astro +86 -20
- package/src/components/empty/empty.theme.ts +79 -11
- package/src/components/empty/empty.ts +59 -2
- package/src/components/error/RLAError.astro +9 -20
- package/src/components/error/error.theme.ts +9 -12
- package/src/components/field-group/RLAFieldGroup.astro +2 -11
- package/src/components/field-group/field-group.theme.ts +18 -22
- package/src/components/fieldset/RLAFieldset.astro +9 -20
- package/src/components/fieldset/fieldset.theme.ts +9 -12
- package/src/components/file-upload/RLAFileUpload.astro +4 -13
- package/src/components/file-upload/file-upload.theme.ts +19 -22
- package/src/components/file-upload/file-upload.ts +1 -1
- package/src/components/floating-action/RLAFloatingAction.astro +9 -20
- package/src/components/floating-action/floating-action.theme.ts +9 -12
- package/src/components/footer/RLAFooter.astro +32 -38
- package/src/components/footer/footer.theme.ts +31 -26
- package/src/components/footer/footer.ts +4 -0
- package/src/components/form/RLAForm.astro +9 -20
- package/src/components/form/form.theme.ts +9 -12
- package/src/components/form-field/RLAFormField.astro +5 -12
- package/src/components/form-field/RLSFormField.tsx +71 -0
- package/src/components/form-field/RLVFormField.vue +5 -14
- package/src/components/form-field/form-field.theme.ts +19 -22
- package/src/components/form-field/form-field.ts +1 -0
- package/src/components/gallery/RLAGallery.astro +9 -20
- package/src/components/gallery/gallery.theme.ts +9 -12
- package/src/components/grid/RLAGrid.astro +2 -15
- package/src/components/grid/grid.theme.ts +31 -34
- package/src/components/head/UIHead.astro +298 -0
- package/src/components/head/head.theme.ts +9 -12
- package/src/components/header/HeaderLayer.astro +63 -0
- package/src/components/header/RLAHeader.astro +29 -48
- package/src/components/header/header.theme.ts +37 -40
- package/src/components/header/header.ts +4 -0
- package/src/{utils → components/header}/headerStack.ts +30 -22
- package/src/components/hover-card/RLAHoverCard.astro +24 -35
- package/src/components/hover-card/hover-card.theme.ts +23 -27
- package/src/components/icon/RLAIcon.astro +29 -36
- package/src/components/icon/RLSIcon.tsx +6 -7
- package/src/components/icon/RLVIcon.vue +5 -6
- package/src/components/icon/icon.theme.ts +18 -28
- package/src/components/icon/resolver.ts +15 -29
- package/src/components/image/RLAImage.astro +20 -23
- package/src/components/image/image.theme.ts +29 -32
- package/src/components/input/RLAInput.astro +6 -21
- package/src/components/input/RLSInput.tsx +101 -0
- package/src/components/input/RLVInput.vue +11 -20
- package/src/components/input/input.theme.ts +41 -44
- package/src/components/input/input.ts +1 -1
- package/src/components/input-date/RLAInputDate.astro +9 -20
- package/src/components/input-date/input-date.theme.ts +9 -12
- package/src/components/input-menu/RLAInputMenu.astro +2 -12
- package/src/components/input-menu/input-menu.theme.ts +29 -32
- package/src/components/input-menu/input-menu.ts +1 -1
- package/src/components/input-number/RLAInputNumber.astro +9 -20
- package/src/components/input-number/input-number.theme.ts +9 -12
- package/src/components/input-pin/RLAInputPin.astro +9 -22
- package/src/components/input-pin/input-pin.theme.ts +9 -13
- package/src/components/input-rating/RLAInputRating.astro +2 -23
- package/src/components/input-rating/input-rating.theme.ts +64 -76
- package/src/components/input-rating/input-rating.ts +1 -1
- package/src/components/input-tags/RLAInputTags.astro +174 -21
- package/src/components/input-tags/input-tags.theme.ts +37 -12
- package/src/components/input-tags/input-tags.ts +50 -0
- package/src/components/input-time/RLAInputTime.astro +9 -20
- package/src/components/input-time/input-time.theme.ts +9 -12
- package/src/components/kbd/RLAKbd.astro +17 -32
- package/src/components/kbd/kbd.theme.ts +49 -91
- package/src/components/kbd/kbd.ts +3 -0
- package/src/components/knob/RLAKnob.astro +9 -20
- package/src/components/knob/knob.theme.ts +9 -12
- package/src/components/label/RLALabel.astro +16 -27
- package/src/components/label/label.theme.ts +16 -20
- package/src/components/layout-grid/RLALayoutGrid.astro +5 -11
- package/src/components/layout-grid/layout-grid.theme.ts +12 -15
- package/src/components/link/RLALink.astro +6 -20
- package/src/components/link/RLSLink.tsx +8 -16
- package/src/components/link/RLVLink.vue +7 -16
- package/src/components/link/link.theme.ts +37 -37
- package/src/components/link/link.ts +5 -5
- package/src/components/link-group/RLALinkGroup.astro +7 -44
- package/src/components/link-group/link-group.theme.ts +21 -26
- package/src/components/link-group/link-group.ts +5 -16
- package/src/components/listbox/RLAListbox.astro +9 -20
- package/src/components/listbox/listbox.theme.ts +9 -12
- package/src/components/locale-selector/RLALocaleSelector.astro +13 -21
- package/src/components/locale-selector/locale-selector.theme.ts +49 -44
- package/src/components/locale-selector/locale-selector.ts +4 -0
- package/src/components/logo/RLALogo.astro +13 -26
- package/src/components/logo/logo.theme.ts +9 -12
- package/src/components/main/RLAMain.astro +31 -36
- package/src/components/main/main.theme.ts +9 -12
- package/src/components/marquee/RLAMarquee.astro +62 -43
- package/src/components/marquee/marquee.theme.ts +22 -26
- package/src/components/meter/RLAMeter.astro +9 -20
- package/src/components/meter/meter.theme.ts +9 -12
- package/src/components/modal/RLAModal.astro +70 -72
- package/src/components/modal/RLSModal.tsx +156 -0
- package/src/components/modal/RLVModal.vue +5 -6
- package/src/components/modal/modal.theme.ts +42 -46
- package/src/components/modal/modal.ts +1 -0
- package/src/components/navigation-menu/RLANavigationMenu.astro +7 -12
- package/src/components/navigation-menu/navigation-menu.theme.ts +36 -39
- package/src/components/navigation-menu/navigation-menu.ts +19 -18
- package/src/components/page/RLAPage.astro +9 -20
- package/src/components/page/page.theme.ts +9 -12
- package/src/components/page-aside/RLAPageAside.astro +9 -20
- package/src/components/page-aside/page-aside.theme.ts +9 -12
- package/src/components/page-body/RLAPageBody.astro +9 -20
- package/src/components/page-body/page-body.theme.ts +9 -12
- package/src/components/page-header/RLAPageHeader.astro +9 -20
- package/src/components/page-header/page-header.theme.ts +9 -12
- package/src/components/page-section/RLAPageSection.astro +11 -15
- package/src/components/page-section/page-section.theme.ts +193 -176
- package/src/components/pagination/RLAPagination.astro +91 -97
- package/src/components/pagination/pagination.theme.ts +22 -26
- package/src/components/password/RLAPassword.astro +9 -20
- package/src/components/password/password.theme.ts +9 -12
- package/src/components/phone-mockup/RLAPhoneMockup.astro +9 -20
- package/src/components/phone-mockup/phone-mockup.theme.ts +9 -12
- package/src/components/placeholder/RLAPlaceholder.astro +32 -43
- package/src/components/placeholder/placeholder.theme.ts +11 -14
- package/src/components/popover/RLAPopover.astro +205 -132
- package/src/components/popover/popover.theme.ts +23 -27
- package/src/components/post/RLAPost.astro +2 -10
- package/src/components/post/post.theme.ts +45 -48
- package/src/components/pricing-plan/RLAPricingPlan.astro +9 -20
- package/src/components/pricing-plan/pricing-plan.theme.ts +9 -12
- package/src/components/pricing-table/RLAPricingTable.astro +9 -20
- package/src/components/pricing-table/pricing-table.theme.ts +9 -12
- package/src/components/progress/RLAProgress.astro +2 -17
- package/src/components/progress/progress.theme.ts +22 -34
- package/src/components/progress/progress.ts +1 -1
- package/src/components/prose/RLAProse.astro +9 -20
- package/src/components/prose/prose.theme.ts +9 -12
- package/src/components/qr-code/RLAQrCode.astro +9 -20
- package/src/components/qr-code/qr-code.theme.ts +9 -12
- package/src/components/quote/quote.theme.ts +9 -12
- package/src/components/radio-group/RLARadioGroup.astro +9 -20
- package/src/components/radio-group/radio-group.theme.ts +9 -12
- package/src/components/rating/RLARating.astro +9 -20
- package/src/components/rating/rating.theme.ts +9 -12
- package/src/components/scroll-area/RLAScrollArea.astro +2 -10
- package/src/components/scroll-area/scroll-area.theme.ts +21 -24
- package/src/components/scroll-to-top/RLAScrollToTop.astro +67 -43
- package/src/components/scroll-to-top/RLVScrollToTop.vue +6 -10
- package/src/components/scroll-to-top/scroll-to-top.theme.ts +32 -46
- package/src/components/scroll-to-top/scroll-to-top.ts +1 -1
- package/src/{utils → components/scroll-to-top}/scroll.ts +19 -6
- package/src/components/search/RLASearch.astro +3 -9
- package/src/components/search/search.theme.ts +60 -63
- package/src/components/select/RLASelect.astro +514 -113
- package/src/components/select/RLSSelect.tsx +126 -0
- package/src/components/select/RLVSelect.vue +7 -15
- package/src/components/select/select.theme.ts +104 -25
- package/src/components/select/select.ts +58 -36
- package/src/components/separator/RLASeparator.astro +62 -83
- package/src/components/separator/separator.theme.ts +135 -138
- package/src/components/separator/separator.ts +4 -0
- package/src/components/shortcuts/RLAShortcuts.astro +3 -4
- package/src/components/sidebar/RLASidebar.astro +11 -21
- package/src/components/sidebar/sidebar.theme.ts +39 -42
- package/src/components/sidebar/sidebar.ts +2 -0
- package/src/components/skeleton/RLASkeleton.astro +13 -22
- package/src/components/skeleton/skeleton.theme.ts +16 -19
- package/src/components/slideover/RLASlideover.astro +2 -12
- package/src/components/slideover/slideover.theme.ts +51 -55
- package/src/components/slider/RLASlider.astro +2 -15
- package/src/components/slider/slider.theme.ts +20 -33
- package/src/components/slider/slider.ts +1 -1
- package/src/components/speed-dial/RLASpeedDial.astro +9 -20
- package/src/components/speed-dial/speed-dial.theme.ts +9 -12
- package/src/components/spinner/RLASpinner.astro +2 -17
- package/src/components/spinner/spinner.theme.ts +29 -30
- package/src/components/spinner/spinner.ts +1 -1
- package/src/components/splitter/RLASplitter.astro +3 -11
- package/src/components/splitter/splitter.theme.ts +18 -21
- package/src/components/spoiler/RLASpoiler.astro +9 -20
- package/src/components/spoiler/spoiler.theme.ts +9 -12
- package/src/components/stepper/RLAStepper.astro +300 -21
- package/src/components/stepper/stepper.theme.ts +214 -12
- package/src/components/stepper/stepper.ts +23 -6
- package/src/components/steps/RLASteps.astro +2 -8
- package/src/components/steps/steps.theme.ts +9 -12
- package/src/components/sticky-surface/RLAStickySurface.astro +67 -38
- package/src/components/sticky-surface/sticky-surface.theme.ts +7 -11
- package/src/components/sticky-surface/sticky-surface.ts +1 -0
- package/src/components/surround/RLASurround.astro +5 -5
- package/src/components/switch/RLASwitch.astro +2 -18
- package/src/components/switch/switch.theme.ts +50 -61
- package/src/components/switch/switch.ts +1 -1
- package/src/components/table/RLATable.astro +566 -50
- package/src/components/table/table.theme.ts +112 -31
- package/src/components/table/table.ts +207 -6
- package/src/components/table-of-contents/RLATableOfContents.astro +8 -13
- package/src/components/table-of-contents/table-of-contents.theme.ts +60 -63
- package/src/components/tabs/RLATabs.astro +195 -51
- package/src/components/tabs/tabs.theme.ts +81 -84
- package/src/components/tabs/tabs.ts +18 -1
- package/src/components/textarea/RLATextarea.astro +16 -13
- package/src/components/textarea/RLSTextarea.tsx +69 -0
- package/src/components/textarea/RLVTextarea.vue +8 -16
- package/src/components/textarea/textarea.theme.ts +21 -24
- package/src/components/textarea/textarea.ts +2 -1
- package/src/components/theme-selector/RLAThemeSelector.astro +5 -13
- package/src/components/theme-selector/theme-selector.theme.ts +11 -14
- package/src/components/timeline/RLATimeline.astro +24 -44
- package/src/components/timeline/timeline.theme.ts +302 -307
- package/src/components/toast/RLAToast.astro +44 -18
- package/src/components/toast/store.ts +97 -0
- package/src/components/toast/toast.theme.ts +31 -34
- package/src/components/toast/toast.ts +1 -1
- package/src/components/toaster/RLAToaster.astro +76 -6
- package/src/components/tooltip/RLATooltip.astro +136 -33
- package/src/components/tooltip/tooltip.theme.ts +23 -26
- package/src/components/tour/RLATour.astro +9 -20
- package/src/components/tour/tour.theme.ts +9 -12
- package/src/components/tree/RLATree.astro +9 -20
- package/src/components/tree/tree.theme.ts +9 -12
- package/src/components/user/RLAUser.astro +9 -20
- package/src/components/user/user.theme.ts +9 -12
- package/src/components/video/RLAVideo.astro +5 -10
- package/src/components/video/video.theme.ts +13 -16
- package/src/components/watermark/RLAWatermark.astro +9 -20
- package/src/components/watermark/watermark.theme.ts +9 -12
- package/src/components/window-mockup/RLAWindowMockup.astro +9 -20
- package/src/components/window-mockup/window-mockup.theme.ts +9 -12
- package/src/icons.ts +68 -0
- package/src/index.ts +31 -0
- package/src/preset.ts +146 -0
- package/src/resolver.ts +20 -0
- package/src/shortcuts.ts +172 -0
- package/src/types.ts +57 -0
- package/LICENSE +0 -21
- package/src/components/head/RLAHead.astro +0 -528
- package/src/config/color.config.ts +0 -300
- package/src/config/site.config.ts +0 -28
- package/src/config/ui.config.ts +0 -89
- package/src/env.d.ts +0 -23
- package/src/icons/defaults.ts +0 -44
- package/src/presets/index.ts +0 -577
- package/src/stores/toast.ts +0 -24
- package/src/themes.ts +0 -26
- package/src/types/component.ts +0 -28
- package/src/ui.ts +0 -159
- package/src/utils/defineTheme.ts +0 -5
- package/src/utils/merge.ts +0 -62
- package/src/utils/resolveClasses.ts +0 -39
- package/src/utils/resolveTheme.ts +0 -13
- package/src/utils/shortcuts.ts +0 -322
- package/src/utils/toast.ts +0 -36
- package/src/utils/useUi.ts +0 -33
package/src/presets/index.ts
DELETED
|
@@ -1,577 +0,0 @@
|
|
|
1
|
-
import { dirname, join } from "node:path"
|
|
2
|
-
import { fileURLToPath } from "node:url"
|
|
3
|
-
import {
|
|
4
|
-
definePreset,
|
|
5
|
-
presetTypography,
|
|
6
|
-
presetWind4,
|
|
7
|
-
presetIcons,
|
|
8
|
-
transformerDirectives,
|
|
9
|
-
transformerVariantGroup,
|
|
10
|
-
type Preset
|
|
11
|
-
} from "unocss"
|
|
12
|
-
import { colorConfig } from "../config/color.config"
|
|
13
|
-
|
|
14
|
-
const pathDirname = dirname(fileURLToPath(import.meta.url))
|
|
15
|
-
export const uiSrcGlob = join(pathDirname, "../**/*.{js,ts,jsx,tsx,vue,svelte,astro}")
|
|
16
|
-
export const uiFilesystemGlob = join(pathDirname, "../**/*")
|
|
17
|
-
|
|
18
|
-
type ColorShades = Record<string, string>
|
|
19
|
-
type ColorModeShades = { light?: ColorShades; dark?: ColorShades }
|
|
20
|
-
export type ColorConfigValue = ColorShades | ColorModeShades
|
|
21
|
-
|
|
22
|
-
function generateLightShade(shade: string, value: string): string {
|
|
23
|
-
const num = Number(shade)
|
|
24
|
-
if (isNaN(num)) return value
|
|
25
|
-
const mixPct = Math.min(60, ((950 - num) / 950) * 60)
|
|
26
|
-
return `color-mix(in oklch, ${value}, white ${mixPct.toFixed(0)}%)`
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function generateDarkShade(shade: string, value: string): string {
|
|
30
|
-
const num = Number(shade)
|
|
31
|
-
if (isNaN(num)) return value
|
|
32
|
-
const mixPct = Math.min(60, ((num - 50) / 900) * 60)
|
|
33
|
-
return `color-mix(in oklch, ${value}, black ${mixPct.toFixed(0)}%)`
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function resolveColorModes(
|
|
37
|
-
entry: ColorConfigValue,
|
|
38
|
-
autogenerate?: boolean
|
|
39
|
-
): { light: Record<string, string>; dark: Record<string, string> } {
|
|
40
|
-
const raw = entry as Record<string, unknown>
|
|
41
|
-
|
|
42
|
-
const modeLight =
|
|
43
|
-
typeof raw.light === "object" && raw.light !== null ? { ...raw.light } : ({} as ColorShades)
|
|
44
|
-
const modeDark =
|
|
45
|
-
typeof raw.dark === "object" && raw.dark !== null ? { ...raw.dark } : ({} as ColorShades)
|
|
46
|
-
|
|
47
|
-
const modeKeys = new Set(["light", "dark"])
|
|
48
|
-
const flatShades: ColorShades = {}
|
|
49
|
-
for (const [k, v] of Object.entries(raw)) {
|
|
50
|
-
if (!modeKeys.has(k) && typeof v === "string") {
|
|
51
|
-
flatShades[k] = v
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
const allShades = [
|
|
56
|
-
...new Set([...Object.keys(modeLight), ...Object.keys(modeDark), ...Object.keys(flatShades)])
|
|
57
|
-
]
|
|
58
|
-
|
|
59
|
-
if (autogenerate) {
|
|
60
|
-
if (Object.keys(modeLight).length === 0) {
|
|
61
|
-
for (const shade of allShades) {
|
|
62
|
-
const value = flatShades[shade] ?? modeDark[shade]
|
|
63
|
-
if (value) modeLight[shade] = generateLightShade(shade, value)
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
if (Object.keys(modeDark).length === 0) {
|
|
67
|
-
for (const shade of allShades) {
|
|
68
|
-
const value = flatShades[shade] ?? modeLight[shade]
|
|
69
|
-
if (value) modeDark[shade] = generateDarkShade(shade, value)
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
const light: ColorShades = {}
|
|
75
|
-
const dark: ColorShades = {}
|
|
76
|
-
|
|
77
|
-
for (const shade of allShades) {
|
|
78
|
-
const lv = modeLight[shade] ?? flatShades[shade] ?? modeDark[shade]
|
|
79
|
-
if (lv !== undefined) light[shade] = lv
|
|
80
|
-
|
|
81
|
-
const dv = modeDark[shade] ?? flatShades[shade] ?? modeLight[shade]
|
|
82
|
-
if (dv !== undefined) dark[shade] = dv
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return { light, dark }
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
const createScale = (colorName: string, shadeKeys: string[]) => ({
|
|
89
|
-
DEFAULT: `var(--${colorName})`,
|
|
90
|
-
foreground: `var(--${colorName}-foreground)`,
|
|
91
|
-
accent: `var(--${colorName}-accent)`,
|
|
92
|
-
...Object.fromEntries(shadeKeys.map((shade) => [shade, `var(--color-${colorName}-${shade})`]))
|
|
93
|
-
})
|
|
94
|
-
|
|
95
|
-
export interface RimelightPresetOptions {
|
|
96
|
-
colors?: Record<string, ColorConfigValue>
|
|
97
|
-
autogenerateColorModes?: boolean
|
|
98
|
-
presets?: {
|
|
99
|
-
wind?: boolean
|
|
100
|
-
typography?: boolean
|
|
101
|
-
icons?: boolean
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export default definePreset((options?: RimelightPresetOptions) => {
|
|
106
|
-
const userColors = options?.colors ?? {}
|
|
107
|
-
const autoGen = options?.autogenerateColorModes ?? true
|
|
108
|
-
const allColors = [...new Set([...colorConfig.colors, ...Object.keys(userColors)])]
|
|
109
|
-
|
|
110
|
-
// Built-in scales already have explicit {light, dark} buckets — pass through directly.
|
|
111
|
-
// Only user-provided colors need resolveColorModes (they may be flat shades or partial modes).
|
|
112
|
-
const resolvedBuiltins = Object.fromEntries(
|
|
113
|
-
Object.entries(colorConfig.scales).map(([name, entry]) => [name, entry])
|
|
114
|
-
)
|
|
115
|
-
const resolvedUserColors = Object.fromEntries(
|
|
116
|
-
Object.entries(userColors).map(([name, entry]) => [name, resolveColorModes(entry, autoGen)])
|
|
117
|
-
)
|
|
118
|
-
const resolvedColors = { ...resolvedBuiltins, ...resolvedUserColors }
|
|
119
|
-
|
|
120
|
-
const safelist = allColors.flatMap((color) => ["rl-color-" + color])
|
|
121
|
-
|
|
122
|
-
const enabledPresets = {
|
|
123
|
-
wind: options?.presets?.wind !== false,
|
|
124
|
-
typography: options?.presets?.typography !== false,
|
|
125
|
-
icons: options?.presets?.icons !== false
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
return {
|
|
129
|
-
name: "rimelight-ui",
|
|
130
|
-
safelist,
|
|
131
|
-
presets: (
|
|
132
|
-
[
|
|
133
|
-
enabledPresets.wind && presetWind4(),
|
|
134
|
-
enabledPresets.typography &&
|
|
135
|
-
presetTypography({
|
|
136
|
-
cssExtend: {
|
|
137
|
-
"h1,h2,h3,h4,h5,h6": {
|
|
138
|
-
"font-family": "var(--font-sans), system-ui, sans-serif"
|
|
139
|
-
},
|
|
140
|
-
"p,li,blockquote,code": {
|
|
141
|
-
"font-family": "var(--font-sans), system-ui, sans-serif"
|
|
142
|
-
},
|
|
143
|
-
"pre,code": {
|
|
144
|
-
"font-family": "var(--font-mono), monospace"
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}),
|
|
148
|
-
enabledPresets.icons &&
|
|
149
|
-
presetIcons({
|
|
150
|
-
extraProperties: {
|
|
151
|
-
"display": "inline-block",
|
|
152
|
-
"vertical-align": "middle"
|
|
153
|
-
}
|
|
154
|
-
})
|
|
155
|
-
] as const
|
|
156
|
-
).filter((p): p is Preset => Boolean(p)),
|
|
157
|
-
transformers: [transformerDirectives(), transformerVariantGroup()],
|
|
158
|
-
|
|
159
|
-
outputToCssLayers: true,
|
|
160
|
-
layers: {
|
|
161
|
-
theme: 1,
|
|
162
|
-
preflights: 2,
|
|
163
|
-
shortcuts: 3,
|
|
164
|
-
default: 4
|
|
165
|
-
},
|
|
166
|
-
|
|
167
|
-
shortcuts: {
|
|
168
|
-
"container": "mx-auto w-full max-w-[var(--rl-container)] px-xs sm:px-md md:px-xl lg:px-xl",
|
|
169
|
-
"sr-only":
|
|
170
|
-
"absolute w-px h-px p-0 m-0 overflow-hidden clip-rect-1-1-1-1 whitespace-nowrap border-0"
|
|
171
|
-
},
|
|
172
|
-
rules: [
|
|
173
|
-
[
|
|
174
|
-
/^clip-rect-(\d+)-(\d+)-(\d+)-(\d+)$/,
|
|
175
|
-
([, t, r, b, l]) => ({ clip: `rect(${t}px, ${r}px, ${b}px, ${l}px)` })
|
|
176
|
-
],
|
|
177
|
-
[
|
|
178
|
-
/^rl-color-(.+)$/,
|
|
179
|
-
([, color]) => ({
|
|
180
|
-
"--rl-bg": `var(--color-${color}-500)`,
|
|
181
|
-
"--rl-bg-hover": `var(--color-${color}-600)`,
|
|
182
|
-
"--rl-text": `var(--color-${color}-600)`,
|
|
183
|
-
"--rl-ring": `var(--color-${color}-500)`,
|
|
184
|
-
"--rl-border": `var(--color-${color}-500)`
|
|
185
|
-
})
|
|
186
|
-
],
|
|
187
|
-
// Pins the element's color-scheme to light — light-dark() resolves to light values.
|
|
188
|
-
// Also sets color so plain text children inherit the correct foreground without needing
|
|
189
|
-
// an explicit utility class on every element.
|
|
190
|
-
["rl-light", { "color-scheme": "light", "color": "var(--foreground)" }],
|
|
191
|
-
// Pins the element's color-scheme to dark — light-dark() resolves to dark values.
|
|
192
|
-
["rl-dark", { "color-scheme": "dark", "color": "var(--foreground)" }],
|
|
193
|
-
// Resets color-scheme back to reactive — follows the page-level preference
|
|
194
|
-
// (i.e. whatever is set on <html>). Use inside a pinned wrapper to opt a subtree back out.
|
|
195
|
-
["rl-auto", { "color-scheme": "light dark", "color": "var(--foreground)" }],
|
|
196
|
-
// Visibility-aware rendering utility to prevent unsafe inline style attributes in strict CSPs
|
|
197
|
-
[
|
|
198
|
-
"rla-visibility-aware",
|
|
199
|
-
{
|
|
200
|
-
"content-visibility": "auto",
|
|
201
|
-
"contain-intrinsic-size": "var(--rla-contain-intrinsic-size, auto 500px)"
|
|
202
|
-
}
|
|
203
|
-
],
|
|
204
|
-
[
|
|
205
|
-
/^(text)-(default|muted|dimmed|toned|highlighted|elevated|accented|inverted)(?:\/(\d+))?$/,
|
|
206
|
-
([, , name, opacity]) =>
|
|
207
|
-
opacity
|
|
208
|
-
? { color: `color-mix(in srgb, var(--text-color-${name}) ${opacity}%, transparent)` }
|
|
209
|
-
: { color: `var(--text-color-${name})` }
|
|
210
|
-
],
|
|
211
|
-
[
|
|
212
|
-
/^(bg)-(default|muted|elevated|accented|dimmed|toned|highlighted)(?:\/(\d+))?$/,
|
|
213
|
-
([, , name, opacity]) =>
|
|
214
|
-
opacity
|
|
215
|
-
? {
|
|
216
|
-
"background-color": `color-mix(in srgb, var(--background-color-${name}) ${opacity}%, transparent)`
|
|
217
|
-
}
|
|
218
|
-
: { "background-color": `var(--background-color-${name})` }
|
|
219
|
-
],
|
|
220
|
-
[
|
|
221
|
-
/^bg-inverted(?:\/(\d+))?$/,
|
|
222
|
-
([, opacity]) =>
|
|
223
|
-
opacity
|
|
224
|
-
? {
|
|
225
|
-
"background-color": `color-mix(in srgb, var(--background-color-inverted) ${opacity}%, transparent)`,
|
|
226
|
-
"color": "var(--text-color-inverted)"
|
|
227
|
-
}
|
|
228
|
-
: {
|
|
229
|
-
"background-color": "var(--background-color-inverted)",
|
|
230
|
-
"color": "var(--text-color-inverted)"
|
|
231
|
-
}
|
|
232
|
-
],
|
|
233
|
-
[
|
|
234
|
-
/^(ring)-(default|muted|elevated|accented|dimmed|toned|highlighted|inverted)(?:\/(\d+))?$/,
|
|
235
|
-
([, , name, opacity]) =>
|
|
236
|
-
opacity
|
|
237
|
-
? {
|
|
238
|
-
"--un-ring-color": `color-mix(in srgb, var(--ring-color-${name}) ${opacity}%, transparent)`
|
|
239
|
-
}
|
|
240
|
-
: { "--un-ring-color": `var(--ring-color-${name})` }
|
|
241
|
-
],
|
|
242
|
-
[
|
|
243
|
-
/^(border)-(default|muted|elevated|accented|dimmed|toned|highlighted|inverted)(?:\/(\d+))?$/,
|
|
244
|
-
([, , name, opacity]) =>
|
|
245
|
-
opacity
|
|
246
|
-
? {
|
|
247
|
-
"border-color": `color-mix(in srgb, var(--border-color-${name}) ${opacity}%, transparent)`
|
|
248
|
-
}
|
|
249
|
-
: { "border-color": `var(--border-color-${name})` }
|
|
250
|
-
],
|
|
251
|
-
[
|
|
252
|
-
/^(outline)-(inverted)(?:\/(\d+))?$/,
|
|
253
|
-
([, , name, opacity]) =>
|
|
254
|
-
opacity
|
|
255
|
-
? {
|
|
256
|
-
"outline-color": `color-mix(in srgb, var(--ring-color-${name}) ${opacity}%, transparent)`
|
|
257
|
-
}
|
|
258
|
-
: { "outline-color": `var(--ring-color-${name})` }
|
|
259
|
-
]
|
|
260
|
-
],
|
|
261
|
-
|
|
262
|
-
theme: {
|
|
263
|
-
spacing: {
|
|
264
|
-
"6xs": "0.125rem",
|
|
265
|
-
"5xs": "0.25rem",
|
|
266
|
-
"4xs": "0.375rem",
|
|
267
|
-
"3xs": "0.5rem",
|
|
268
|
-
"2xs": "0.625rem",
|
|
269
|
-
"xs": "0.75rem",
|
|
270
|
-
"sm": "0.875rem",
|
|
271
|
-
"md": "1rem",
|
|
272
|
-
"lg": "1.25rem",
|
|
273
|
-
"xl": "1.5rem",
|
|
274
|
-
"2xl": "2rem",
|
|
275
|
-
"3xl": "3rem",
|
|
276
|
-
"4xl": "4rem",
|
|
277
|
-
"5xl": "6rem",
|
|
278
|
-
"6xl": "8rem"
|
|
279
|
-
},
|
|
280
|
-
colors: {
|
|
281
|
-
"background": "var(--background)",
|
|
282
|
-
"foreground": "var(--foreground)",
|
|
283
|
-
"card": {
|
|
284
|
-
DEFAULT: "var(--card)",
|
|
285
|
-
foreground: "var(--card-foreground)"
|
|
286
|
-
},
|
|
287
|
-
"popover": {
|
|
288
|
-
DEFAULT: "var(--popover)",
|
|
289
|
-
foreground: "var(--popover-foreground)"
|
|
290
|
-
},
|
|
291
|
-
...Object.fromEntries(
|
|
292
|
-
allColors.map((color) => {
|
|
293
|
-
const m = resolvedColors[color]!
|
|
294
|
-
const shadeKeys = [...new Set([...Object.keys(m.light), ...Object.keys(m.dark)])]
|
|
295
|
-
return [color, createScale(color, shadeKeys)]
|
|
296
|
-
})
|
|
297
|
-
),
|
|
298
|
-
"muted": {
|
|
299
|
-
DEFAULT: "var(--muted)",
|
|
300
|
-
foreground: "var(--muted-foreground)"
|
|
301
|
-
},
|
|
302
|
-
"accent": {
|
|
303
|
-
DEFAULT: "var(--accent)",
|
|
304
|
-
foreground: "var(--accent-foreground)"
|
|
305
|
-
},
|
|
306
|
-
"border": "var(--border)",
|
|
307
|
-
"input": "var(--input)",
|
|
308
|
-
"outline": "var(--outline)",
|
|
309
|
-
"ring": "var(--ring)",
|
|
310
|
-
"destructive": {
|
|
311
|
-
DEFAULT: "var(--destructive)",
|
|
312
|
-
subtle: "var(--color-destructive-subtle)"
|
|
313
|
-
},
|
|
314
|
-
"sidebar": {
|
|
315
|
-
DEFAULT: "var(--sidebar)",
|
|
316
|
-
foreground: "var(--sidebar-foreground)",
|
|
317
|
-
primary: {
|
|
318
|
-
DEFAULT: "var(--sidebar-primary)",
|
|
319
|
-
foreground: "var(--sidebar-primary-foreground)"
|
|
320
|
-
},
|
|
321
|
-
accent: {
|
|
322
|
-
DEFAULT: "var(--sidebar-accent)",
|
|
323
|
-
foreground: "var(--sidebar-accent-foreground)"
|
|
324
|
-
},
|
|
325
|
-
border: "var(--sidebar-border)",
|
|
326
|
-
ring: "var(--sidebar-ring)"
|
|
327
|
-
},
|
|
328
|
-
"chart": {
|
|
329
|
-
"1": "var(--chart-1)",
|
|
330
|
-
"2": "var(--chart-2)",
|
|
331
|
-
"3": "var(--chart-3)",
|
|
332
|
-
"4": "var(--chart-4)",
|
|
333
|
-
"5": "var(--chart-5)"
|
|
334
|
-
},
|
|
335
|
-
"hover": "var(--color-hover)",
|
|
336
|
-
"surface": "var(--color-surface)",
|
|
337
|
-
"muted-strong": "var(--color-muted-strong)",
|
|
338
|
-
"foreground-secondary": "var(--color-foreground-secondary)",
|
|
339
|
-
"foreground-tertiary": "var(--color-foreground-tertiary)",
|
|
340
|
-
"placeholder": "var(--color-placeholder)",
|
|
341
|
-
"input-border": "var(--color-input-border)",
|
|
342
|
-
"accent-subtle": "var(--color-accent-subtle)",
|
|
343
|
-
"elevated": "var(--background-color-elevated)",
|
|
344
|
-
"accented": "var(--ring-color-accented)",
|
|
345
|
-
"dimmed": "var(--text-color-dimmed)",
|
|
346
|
-
"toned": "var(--text-color-toned)",
|
|
347
|
-
"highlighted": "var(--text-color-highlighted)"
|
|
348
|
-
},
|
|
349
|
-
radius: {
|
|
350
|
-
"xs": "calc(var(--radius) - 0.375rem)",
|
|
351
|
-
"sm": "calc(var(--radius) - 0.25rem)",
|
|
352
|
-
"md": "calc(var(--radius) - 0.125rem)",
|
|
353
|
-
"lg": "var(--radius)",
|
|
354
|
-
"xl": "calc(var(--radius) + 0.25rem)",
|
|
355
|
-
"2xl": "calc(var(--radius) + 0.5rem)",
|
|
356
|
-
"3xl": "calc(var(--radius) + 1rem)"
|
|
357
|
-
},
|
|
358
|
-
animation: {
|
|
359
|
-
keyframes: {
|
|
360
|
-
"accordion-down":
|
|
361
|
-
"from { height: 0; } to { height: var(--starwind-accordion-content-height); }",
|
|
362
|
-
"accordion-up":
|
|
363
|
-
"from { height: var(--starwind-accordion-content-height); } to { height: 0; }",
|
|
364
|
-
"marquee": "from { transform: translateX(0); } to { transform: translateX(-100%); }"
|
|
365
|
-
},
|
|
366
|
-
durations: {
|
|
367
|
-
"accordion-down": "0.2s",
|
|
368
|
-
"accordion-up": "0.2s",
|
|
369
|
-
"marquee": "30s"
|
|
370
|
-
},
|
|
371
|
-
timingFns: {
|
|
372
|
-
"accordion-down": "ease-out",
|
|
373
|
-
"accordion-up": "ease-out",
|
|
374
|
-
"marquee": "linear"
|
|
375
|
-
},
|
|
376
|
-
counts: { marquee: "infinite" }
|
|
377
|
-
}
|
|
378
|
-
},
|
|
379
|
-
|
|
380
|
-
preflights: [
|
|
381
|
-
{
|
|
382
|
-
getCSS: () => {
|
|
383
|
-
// Single pass: emit light-dark() for every color shade.
|
|
384
|
-
// The browser resolves each call based on the element's inherited color-scheme.
|
|
385
|
-
const lightDarkLines = Object.entries(resolvedColors)
|
|
386
|
-
.flatMap(([color, modes]) => {
|
|
387
|
-
const light = modes.light as Record<string, string>
|
|
388
|
-
const dark = (modes.dark ?? modes.light) as Record<string, string>
|
|
389
|
-
return Object.keys(light).map((shade) => {
|
|
390
|
-
const l = light[shade]
|
|
391
|
-
const d = dark[shade] ?? l
|
|
392
|
-
return ` --color-${color}-${shade}: light-dark(${l}, ${d});`
|
|
393
|
-
})
|
|
394
|
-
})
|
|
395
|
-
.join("\n")
|
|
396
|
-
|
|
397
|
-
return `
|
|
398
|
-
:root {
|
|
399
|
-
color-scheme: light dark;
|
|
400
|
-
|
|
401
|
-
/* Semantic tokens — each resolves to its light or dark value based on color-scheme */
|
|
402
|
-
--background: light-dark(#ffffff, #030712);
|
|
403
|
-
--foreground: light-dark(#030712, #f9fafb);
|
|
404
|
-
--card: light-dark(#ffffff, #111827);
|
|
405
|
-
--card-foreground: light-dark(#030712, #f9fafb);
|
|
406
|
-
--popover: light-dark(#ffffff, #1f2937);
|
|
407
|
-
--popover-foreground: light-dark(#030712, #f9fafb);
|
|
408
|
-
--primary: light-dark(#0064d7, #3b82f6);
|
|
409
|
-
--primary-foreground: #ffffff;
|
|
410
|
-
--primary-accent: light-dark(#0050ac, #60a5fa);
|
|
411
|
-
--secondary: #8b5cf6;
|
|
412
|
-
--secondary-foreground: #f9fafb;
|
|
413
|
-
--secondary-accent: light-dark(#7c3aed, #a78bfa);
|
|
414
|
-
--muted: light-dark(#f3f4f6, #1f2937);
|
|
415
|
-
--muted-foreground: light-dark(#4b5563, #9ca3af);
|
|
416
|
-
--accent: light-dark(#f3f4f6, #374151);
|
|
417
|
-
--accent-foreground: light-dark(#111827, #f3f4f6);
|
|
418
|
-
--info: #3b82f6;
|
|
419
|
-
--info-foreground: #ffffff;
|
|
420
|
-
--info-accent: light-dark(#2563eb, #60a5fa);
|
|
421
|
-
--success: #22c55e;
|
|
422
|
-
--success-foreground: #ffffff;
|
|
423
|
-
--success-accent: light-dark(#16a34a, #4ade80);
|
|
424
|
-
--warning: #f59e0b;
|
|
425
|
-
--warning-foreground: #000000;
|
|
426
|
-
--warning-accent: light-dark(#d97706, #fbbf24);
|
|
427
|
-
--error: #ef4444;
|
|
428
|
-
--error-foreground: #f9fafb;
|
|
429
|
-
--error-accent: light-dark(#dc2626, #f87171);
|
|
430
|
-
--commentary: light-dark(#ec4899, #f472b6);
|
|
431
|
-
--commentary-foreground: light-dark(#f9fafb, #0f172a);
|
|
432
|
-
--commentary-accent: light-dark(#db2777, #f9a8d4);
|
|
433
|
-
--ideation: light-dark(#8b5cf6, #a78bfa);
|
|
434
|
-
--ideation-foreground: light-dark(#f9fafb, #0f172a);
|
|
435
|
-
--ideation-accent: light-dark(#7c3aed, #c4b5fd);
|
|
436
|
-
--source: light-dark(#38bdf8, #7dd3fc);
|
|
437
|
-
--source-foreground: #0f172a;
|
|
438
|
-
--source-accent: light-dark(#0284c7, #bae6fd);
|
|
439
|
-
--border: light-dark(#e5e7eb, rgba(249, 250, 251, 0.1));
|
|
440
|
-
--input: light-dark(#e5e7eb, rgba(249, 250, 251, 0.15));
|
|
441
|
-
--outline: light-dark(#9ca3af, #6b7280);
|
|
442
|
-
--ring: light-dark(#9ca3af, #6b7280);
|
|
443
|
-
--radius: 0.625rem;
|
|
444
|
-
--sidebar: light-dark(#f9fafb, #111827);
|
|
445
|
-
--sidebar-foreground: light-dark(#030712, #f9fafb);
|
|
446
|
-
--sidebar-primary: #1d4ed8;
|
|
447
|
-
--sidebar-primary-foreground: #f9fafb;
|
|
448
|
-
--sidebar-accent: light-dark(#f3f4f6, #1f2937);
|
|
449
|
-
--sidebar-accent-foreground: light-dark(#111827, #f3f4f6);
|
|
450
|
-
--sidebar-border: light-dark(#e5e7eb, #1f2937);
|
|
451
|
-
--sidebar-ring: light-dark(#9ca3af, #6b7280);
|
|
452
|
-
--chart-1: light-dark(#3b82f6, #60a5fa);
|
|
453
|
-
--chart-2: light-dark(#6366f1, #818cf8);
|
|
454
|
-
--chart-3: light-dark(#8b5cf6, #a78bfa);
|
|
455
|
-
--chart-4: light-dark(#a855f7, #c084fc);
|
|
456
|
-
--chart-5: light-dark(#ec4899, #f472b6);
|
|
457
|
-
--destructive: light-dark(#ef4444, #f87171);
|
|
458
|
-
--color-surface: light-dark(#ffffff, #1f2937);
|
|
459
|
-
--color-muted-strong: light-dark(#e5e7eb, #374151);
|
|
460
|
-
--color-foreground-secondary: light-dark(#4b5563, #d1d5db);
|
|
461
|
-
--color-foreground-tertiary: light-dark(#6b7280, #9ca3af);
|
|
462
|
-
--color-placeholder: light-dark(#9ca3af, #6b7280);
|
|
463
|
-
--color-input-border: light-dark(#d1d5db, #4b5563);
|
|
464
|
-
--color-hover: light-dark(#f3f4f6, #374151);
|
|
465
|
-
--color-destructive-subtle: light-dark(#fef2f2, #451a1a);
|
|
466
|
-
--color-accent-subtle: light-dark(#eff6ff, #1e293b);
|
|
467
|
-
--font-sans: "Noto Sans", sans-serif;
|
|
468
|
-
--font-serif: "Noto Serif", serif;
|
|
469
|
-
--font-mono: "Noto Sans Mono", monospace;
|
|
470
|
-
|
|
471
|
-
--ui-header-height: 4rem;
|
|
472
|
-
--rl-container: 90rem;
|
|
473
|
-
|
|
474
|
-
/* Text / background / border / ring semantic tokens using responsive neutral variables */
|
|
475
|
-
--text-color-default: var(--color-neutral-700);
|
|
476
|
-
--text-color-muted: var(--color-neutral-600);
|
|
477
|
-
--text-color-dimmed: var(--color-neutral-500);
|
|
478
|
-
--text-color-toned: var(--color-neutral-800);
|
|
479
|
-
--text-color-highlighted: var(--color-neutral-950);
|
|
480
|
-
--text-color-elevated: var(--color-neutral-800);
|
|
481
|
-
--text-color-accented: var(--color-neutral-900);
|
|
482
|
-
--text-color-inverted: var(--color-neutral-50);
|
|
483
|
-
|
|
484
|
-
--background-color-default: light-dark(#ffffff, var(--color-neutral-50));
|
|
485
|
-
--background-color-muted: var(--color-neutral-100);
|
|
486
|
-
--background-color-elevated: var(--color-neutral-200);
|
|
487
|
-
--background-color-accented: var(--color-neutral-300);
|
|
488
|
-
--background-color-dimmed: var(--color-neutral-400);
|
|
489
|
-
--background-color-toned: var(--color-neutral-800);
|
|
490
|
-
--background-color-highlighted: var(--color-neutral-900);
|
|
491
|
-
--background-color-inverted: var(--color-neutral-950);
|
|
492
|
-
|
|
493
|
-
--border-color-default: var(--color-neutral-200);
|
|
494
|
-
--border-color-muted: var(--color-neutral-100);
|
|
495
|
-
--border-color-elevated: var(--color-neutral-200);
|
|
496
|
-
--border-color-accented: var(--color-neutral-300);
|
|
497
|
-
--border-color-dimmed: var(--color-neutral-400);
|
|
498
|
-
--border-color-toned: var(--color-neutral-800);
|
|
499
|
-
--border-color-highlighted: var(--color-neutral-900);
|
|
500
|
-
--border-color-inverted: var(--color-neutral-950);
|
|
501
|
-
|
|
502
|
-
--ring-color-default: var(--color-neutral-200);
|
|
503
|
-
--ring-color-muted: var(--color-neutral-100);
|
|
504
|
-
--ring-color-elevated: var(--color-neutral-200);
|
|
505
|
-
--ring-color-accented: var(--color-neutral-300);
|
|
506
|
-
--ring-color-dimmed: var(--color-neutral-400);
|
|
507
|
-
--ring-color-toned: var(--color-neutral-800);
|
|
508
|
-
--ring-color-highlighted: var(--color-neutral-900);
|
|
509
|
-
--ring-color-inverted: var(--color-neutral-950);
|
|
510
|
-
|
|
511
|
-
--divide-color-default: var(--color-neutral-200);
|
|
512
|
-
--divide-color-inverted: var(--color-neutral-950);
|
|
513
|
-
|
|
514
|
-
/* Color scales — light-dark() resolves based on inherited color-scheme */
|
|
515
|
-
${lightDarkLines}
|
|
516
|
-
|
|
517
|
-
/* Shiki / Expressive Code */
|
|
518
|
-
--shiki-foreground: #e1e4e8;
|
|
519
|
-
--shiki-background: #1f2428;
|
|
520
|
-
--shiki-token-keyword: #f97583;
|
|
521
|
-
--shiki-token-string: #9ecbff;
|
|
522
|
-
--shiki-token-comment: #6a737d;
|
|
523
|
-
--shiki-token-function: #b392f0;
|
|
524
|
-
--shiki-token-constant: #79b8ff;
|
|
525
|
-
--shiki-token-parameter: #ffab70;
|
|
526
|
-
--shiki-token-punctuation: #e1e4e8;
|
|
527
|
-
}
|
|
528
|
-
/* Re-declare color on semantic text elements so light-dark() re-evaluates
|
|
529
|
-
against each element's own inherited color-scheme. Without this, plain
|
|
530
|
-
text inherits a pre-computed color from body and ignores rl-dark/rl-light
|
|
531
|
-
wrappers. All rules are overridable by any utility class. */
|
|
532
|
-
p, h1, h2, h3, h4, h5, h6,
|
|
533
|
-
li, blockquote, figcaption, caption,
|
|
534
|
-
label, legend, dt, dd {
|
|
535
|
-
color: var(--foreground);
|
|
536
|
-
}
|
|
537
|
-
.dark {
|
|
538
|
-
color-scheme: dark;
|
|
539
|
-
}
|
|
540
|
-
.light {
|
|
541
|
-
color-scheme: light;
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
/* Accessibility fallback for hidden="until-found" in older/non-supporting browsers */
|
|
545
|
-
@supports not (content-visibility: hidden) {
|
|
546
|
-
[hidden="until-found"] {
|
|
547
|
-
display: none !important;
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
/* ── Global body reset ───────────────────────────────────────────── */
|
|
552
|
-
body {
|
|
553
|
-
background-color: var(--background);
|
|
554
|
-
color: var(--foreground);
|
|
555
|
-
font-family: var(--font-sans);
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
/* ── Uniform focus styles ────────────────────────────────────────── */
|
|
559
|
-
*,
|
|
560
|
-
::before,
|
|
561
|
-
::after {
|
|
562
|
-
/* Setup default ring/outline parameters or halo */
|
|
563
|
-
--un-ring-color: var(--primary);
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
*:focus-visible,
|
|
567
|
-
*:has(> a:focus-visible) {
|
|
568
|
-
outline: 2px solid color-mix(in srgb, var(--un-ring-color, var(--primary)) 25%, transparent);
|
|
569
|
-
outline-offset: 2px;
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
`
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
]
|
|
576
|
-
}
|
|
577
|
-
})
|
package/src/stores/toast.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { atom } from "nanostores"
|
|
2
|
-
|
|
3
|
-
export interface ToastItem {
|
|
4
|
-
id: string
|
|
5
|
-
title: string
|
|
6
|
-
description?: string
|
|
7
|
-
variant?: "success" | "error" | "warning" | "info" | "default"
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const toasts = atom<ToastItem[]>([])
|
|
11
|
-
|
|
12
|
-
export function addToast(toast: Omit<ToastItem, "id">) {
|
|
13
|
-
const id = Math.random().toString(36).slice(2, 9)
|
|
14
|
-
const item: ToastItem = { id, ...toast }
|
|
15
|
-
toasts.set([...toasts.get(), item])
|
|
16
|
-
|
|
17
|
-
setTimeout(() => {
|
|
18
|
-
removeToast(id)
|
|
19
|
-
}, 4500)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function removeToast(id: string) {
|
|
23
|
-
toasts.set(toasts.get().filter((t) => t.id !== id))
|
|
24
|
-
}
|
package/src/themes.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { ComponentTheme } from "./types/component"
|
|
2
|
-
|
|
3
|
-
export { defineTheme } from "./utils/defineTheme"
|
|
4
|
-
|
|
5
|
-
const themeModules = import.meta.glob<{ default: ComponentTheme }>("./components/**/*.theme.ts", {
|
|
6
|
-
eager: true
|
|
7
|
-
})
|
|
8
|
-
|
|
9
|
-
function kebabToCamel(str: string): string {
|
|
10
|
-
return str.replace(/-([a-z])/g, (_, char) => char.toUpperCase())
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function themeNameFromFile(path: string): string {
|
|
14
|
-
const fileName =
|
|
15
|
-
path
|
|
16
|
-
.split("/")
|
|
17
|
-
.pop()
|
|
18
|
-
?.replace(/\.theme\.ts$/, "") || ""
|
|
19
|
-
return kebabToCamel(fileName)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export const uiConfig: Record<string, ComponentTheme> = Object.fromEntries(
|
|
23
|
-
Object.entries(themeModules)
|
|
24
|
-
.filter(([_, mod]) => Boolean(mod && mod.default))
|
|
25
|
-
.map(([path, module]) => [themeNameFromFile(path), module.default])
|
|
26
|
-
)
|
package/src/types/component.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { colorScales } from "../config/color.config"
|
|
2
|
-
|
|
3
|
-
export type Theme = "light" | "dark"
|
|
4
|
-
|
|
5
|
-
export type ThemeColor = keyof typeof colorScales | (string & {})
|
|
6
|
-
|
|
7
|
-
export interface ComponentTheme {
|
|
8
|
-
slots: string[]
|
|
9
|
-
base: Record<string, string | string[]>
|
|
10
|
-
variants?: Record<string, Record<string, Record<string, string | string[]>>>
|
|
11
|
-
compoundVariants?: any[]
|
|
12
|
-
defaultVariants?: Record<string, unknown>
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export type ComponentVariants<T extends { variants?: Record<string, Record<string, unknown>> }> =
|
|
16
|
-
T["variants"] extends Record<string, Record<string, unknown>>
|
|
17
|
-
? {
|
|
18
|
-
[K in keyof T["variants"]]?: T["variants"][K] extends { true: unknown; false: unknown }
|
|
19
|
-
? boolean
|
|
20
|
-
: T["variants"][K] extends { true: unknown }
|
|
21
|
-
? boolean
|
|
22
|
-
: keyof T["variants"][K]
|
|
23
|
-
}
|
|
24
|
-
: never
|
|
25
|
-
|
|
26
|
-
export type ComponentSlots<T extends { slots: readonly string[] }> = Partial<
|
|
27
|
-
Record<T["slots"][number], string>
|
|
28
|
-
>
|