@rimelight/ui 0.0.47 → 0.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +4 -5
- package/dist/preset.mjs +73 -1
- package/dist/resolver.d.mts +3 -4
- package/dist/resolver.mjs +2 -4
- package/dist/shortcuts.d.mts +10 -11
- package/dist/stores.d.mts +3 -4
- package/package.json +8 -6
- package/src/components/3d-hover/RLS3dHover.tsx +21 -0
- package/src/components/accordion/RLSAccordion.tsx +112 -0
- package/src/components/app/RLSApp.tsx +21 -0
- package/src/components/aspect-ratio/RLSAspectRatio.tsx +30 -0
- package/src/components/audio/RLSAudio.tsx +27 -0
- package/src/components/avatar/RLSAvatar.tsx +142 -0
- package/src/components/avatar/avatar.ts +22 -21
- package/src/components/avatar-group/RLSAvatarGroup.tsx +163 -0
- package/src/components/badge/RLSBadge.tsx +1 -1
- package/src/components/badge/RLVBadge.vue +5 -3
- package/src/components/banner/RLSBanner.tsx +151 -0
- package/src/components/breadcrumb/RLSBreadcrumb.tsx +194 -0
- package/src/components/browser-mockup/RLSBrowserMockup.tsx +21 -0
- package/src/components/button/RLSButton.tsx +49 -40
- package/src/components/button/RLVButton.vue +44 -32
- package/src/components/calendar/RLSCalendar.tsx +26 -0
- package/src/components/callout/RLSCallout.tsx +151 -0
- package/src/components/card/RLSCard.tsx +4 -0
- package/src/components/card/RLVCard.vue +4 -0
- package/src/components/card/card.ts +10 -0
- package/src/components/carousel/RLACarousel.astro +14 -1
- package/src/components/carousel/RLSCarousel.tsx +260 -0
- package/src/components/chart/RLSChart.tsx +299 -0
- package/src/components/chat/RLSChat.tsx +27 -0
- package/src/components/chat-message/RLSChatMessage.tsx +27 -0
- package/src/components/chat-messages/RLSChatMessages.tsx +27 -0
- package/src/components/chat-palette/RLSChatPalette.tsx +27 -0
- package/src/components/chat-prompt/RLSChatPrompt.tsx +27 -0
- package/src/components/chat-prompt-submit/RLSChatPromptSubmit.tsx +27 -0
- package/src/components/chat-reasoning/RLSChatReasoning.tsx +27 -0
- package/src/components/chat-shimmer/RLSChatShimmer.tsx +27 -0
- package/src/components/chat-tool/RLSChatTool.tsx +27 -0
- package/src/components/checkbox/RLACheckbox.astro +1 -0
- package/src/components/checkbox/RLSCheckbox.tsx +1 -1
- package/src/components/checkbox/checkbox.theme.ts +2 -2
- package/src/components/chip/RLSChip.tsx +65 -0
- package/src/components/collapsible/RLSCollapsible.tsx +89 -0
- package/src/components/color-area/RLSColorArea.tsx +554 -0
- package/src/components/color-field/RLSColorField.tsx +236 -0
- package/src/components/color-picker/RLSColorPicker.tsx +26 -0
- package/src/components/color-slider/RLSColorSlider.tsx +373 -0
- package/src/components/command-palette/RLSCommandPalette.tsx +26 -0
- package/src/components/compare/RLSCompare.tsx +26 -0
- package/src/components/confirm/RLSConfirm.tsx +173 -0
- package/src/components/container/RLSContainer.tsx +24 -0
- package/src/components/context-menu/RLSContextMenu.tsx +26 -0
- package/src/components/copy-markdown/RLSCopyMarkdown.tsx +57 -0
- package/src/components/dashboard-group/RLSDashboardGroup.tsx +29 -0
- package/src/components/dashboard-navbar/RLSDashboardNavbar.tsx +116 -0
- package/src/components/dashboard-panel/RLSDashboardPanel.tsx +84 -0
- package/src/components/dashboard-resize-handle/RLSDashboardResizeHandle.tsx +35 -0
- package/src/components/dashboard-search/RLADashboardSearch.astro +1 -1
- package/src/components/dashboard-search/RLSDashboardSearch.tsx +125 -0
- package/src/components/dashboard-search-button/RLSDashboardSearchButton.tsx +82 -0
- package/src/components/dashboard-sidebar/RLSDashboardSidebar.tsx +184 -0
- package/src/components/dashboard-sidebar-collapse/RLSDashboardSidebarCollapse.tsx +46 -0
- package/src/components/dashboard-sidebar-toggle/RLSDashboardSidebarToggle.tsx +35 -0
- package/src/components/dashboard-toolbar/RLSDashboardToolbar.tsx +49 -0
- package/src/components/date/RLSDate.tsx +34 -0
- package/src/components/dock/RLSDock.tsx +26 -0
- package/src/components/drawer/RLSDrawer.tsx +177 -0
- package/src/components/dropdown-menu/RLADropdownMenu.astro +250 -241
- package/src/components/dropdown-menu/RLSDropdownMenu.tsx +183 -86
- package/src/components/editor/RLSEditor.tsx +26 -0
- package/src/components/empty/RLSEmpty.tsx +132 -0
- package/src/components/error/RLSError.tsx +26 -0
- package/src/components/field-group/RLSFieldGroup.tsx +46 -0
- package/src/components/fieldset/RLSFieldset.tsx +26 -0
- package/src/components/file-upload/RLSFileUpload.tsx +163 -0
- package/src/components/floating-action/RLSFloatingAction.tsx +26 -0
- package/src/components/footer/RLSFooter.tsx +56 -0
- package/src/components/form/RLSForm.tsx +34 -0
- package/src/components/gallery/RLSGallery.tsx +21 -0
- package/src/components/gamepad/RLSGamepad.tsx +269 -0
- package/src/components/grid/RLSGrid.tsx +29 -0
- package/src/components/head/RLAHead.astro +9 -0
- package/src/components/head/RLSHead.tsx +42 -0
- package/src/components/head/UIHead.astro +3 -0
- package/src/components/header/RLSHeader.tsx +87 -0
- package/src/components/hover-card/RLSHoverCard.tsx +72 -0
- package/src/components/icon/RLSIcon.tsx +3 -1
- package/src/components/image/RLAImage.astro +447 -138
- package/src/components/image/RLSImage.tsx +545 -0
- package/src/components/image/image.theme.ts +19 -3
- package/src/components/image/image.ts +31 -1
- package/src/components/input/RLAInput.astro +62 -51
- package/src/components/input/RLSInput.tsx +1 -1
- package/src/components/input-date/RLSInputDate.tsx +92 -0
- package/src/components/input-menu/RLSInputMenu.tsx +199 -0
- package/src/components/input-number/RLSInputNumber.tsx +184 -0
- package/src/components/input-pin/RLSInputPin.tsx +185 -0
- package/src/components/input-rating/RLSInputRating.tsx +198 -0
- package/src/components/input-rating/input-rating.ts +4 -0
- package/src/components/input-tags/RLSInputTags.tsx +94 -0
- package/src/components/input-time/RLSInputTime.tsx +92 -0
- package/src/components/kbd/RLSKbd.tsx +37 -0
- package/src/components/keyboard/RLSKeyboard.tsx +476 -0
- package/src/components/knob/RLSKnob.tsx +27 -0
- package/src/components/label/RLSLabel.tsx +27 -0
- package/src/components/layout-grid/RLSLayoutGrid.tsx +402 -0
- package/src/components/layout-grid/layout-grid.ts +25 -1
- package/src/components/link/RLSLink.tsx +2 -1
- package/src/components/link/link.ts +21 -12
- package/src/components/link-group/RLSLinkGroup.tsx +76 -0
- package/src/components/listbox/RLSListbox.tsx +27 -0
- package/src/components/locale-selector/RLALocaleSelector.astro +2 -1
- package/src/components/locale-selector/RLSLocaleSelector.tsx +178 -0
- package/src/components/logo/RLALogo.astro +69 -4
- package/src/components/logo/RLSLogo.tsx +129 -0
- package/src/components/main/RLSMain.tsx +40 -0
- package/src/components/marquee/RLSMarquee.tsx +80 -0
- package/src/components/meter/RLSMeter.tsx +27 -0
- package/src/components/modal/RLAModal.astro +1 -1
- package/src/components/modal/RLSModal.tsx +109 -72
- package/src/components/navigation-menu/RLSNavigationMenu.tsx +228 -0
- package/src/components/navigation-menu/navigation-menu.ts +2 -2
- package/src/components/package-managers/RLSPackageManagers.tsx +204 -0
- package/src/components/page/RLSPage.tsx +21 -0
- package/src/components/page-aside/RLSPageAside.tsx +21 -0
- package/src/components/page-body/RLSPageBody.tsx +21 -0
- package/src/components/page-header/RLSPageHeader.tsx +21 -0
- package/src/components/page-section/RLSPageSection.tsx +201 -0
- package/src/components/pagination/RLSPagination.tsx +114 -0
- package/src/components/password/RLSPassword.tsx +27 -0
- package/src/components/phone-mockup/RLSPhoneMockup.tsx +27 -0
- package/src/components/placeholder/RLSPlaceholder.tsx +47 -0
- package/src/components/popover/RLSPopover.tsx +124 -0
- package/src/components/post/RLSPost.tsx +134 -0
- package/src/components/pricing-plan/RLSPricingPlan.tsx +26 -0
- package/src/components/pricing-table/RLSPricingTable.tsx +26 -0
- package/src/components/progress/RLSProgress.tsx +53 -0
- package/src/components/prose/RLSProse.tsx +26 -0
- package/src/components/qr-code/RLSQrCode.tsx +26 -0
- package/src/components/quote/RLAQuote.astro +10 -6
- package/src/components/quote/RLSQuote.tsx +37 -0
- package/src/components/quote/quote.theme.ts +5 -2
- package/src/components/radio-group/RLSRadioGroup.tsx +37 -0
- package/src/components/rating/RLSRating.tsx +27 -0
- package/src/components/scroll-area/RLSScrollArea.tsx +210 -0
- package/src/components/scroll-to-top/RLAScrollToTop.astro +1 -0
- package/src/components/scroll-to-top/RLSScrollToTop.tsx +145 -0
- package/src/components/search/RLSSearch.tsx +237 -0
- package/src/components/select/RLASelect.astro +67 -4
- package/src/components/select/RLSSelect.tsx +107 -39
- package/src/components/select/RLVSelect.vue +50 -1
- package/src/components/select/select.theme.ts +30 -10
- package/src/components/select/select.ts +20 -1
- package/src/components/separator/RLSSeparator.tsx +92 -0
- package/src/components/share/RLSShare.tsx +66 -0
- package/src/components/shortcuts/RLSShortcuts.tsx +393 -0
- package/src/components/sidebar/RLSSidebar.tsx +271 -0
- package/src/components/skeleton/RLSSkeleton.tsx +21 -0
- package/src/components/slideover/RLASlideover.astro +1 -1
- package/src/components/slideover/RLSSlideover.tsx +159 -0
- package/src/components/slider/RLSSlider.tsx +112 -0
- package/src/components/speed-dial/RLSSpeedDial.tsx +27 -0
- package/src/components/spinner/RLSSpinner.tsx +22 -0
- package/src/components/splitter/RLSSplitter.tsx +178 -0
- package/src/components/spoiler/RLSSpoiler.tsx +26 -0
- package/src/components/stepper/RLSStepper.tsx +205 -0
- package/src/components/steps/RLSSteps.tsx +108 -0
- package/src/components/sticky-surface/RLSStickySurface.tsx +63 -0
- package/src/components/surround/RLSSurround.tsx +57 -0
- package/src/components/switch/RLSSwitch.tsx +56 -0
- package/src/components/table/RLATable.astro +1044 -579
- package/src/components/table/RLSTable.tsx +893 -0
- package/src/components/table/table.theme.ts +47 -16
- package/src/components/table/table.ts +104 -66
- package/src/components/table-of-contents/RLSTableOfContents.tsx +196 -0
- package/src/components/tabs/RLSTabs.tsx +298 -0
- package/src/components/textarea/RLATextarea.astro +1 -0
- package/src/components/textarea/RLSTextarea.tsx +3 -1
- package/src/components/theme-selector/RLAThemeSelector.astro +85 -56
- package/src/components/theme-selector/RLSThemeSelector.tsx +131 -0
- package/src/components/theme-selector/theme-selector.theme.ts +5 -7
- package/src/components/theme-selector/theme-selector.ts +11 -1
- package/src/components/timeline/RLSTimeline.tsx +171 -0
- package/src/components/toast/RLSToast.tsx +179 -0
- package/src/components/toaster/RLSToaster.tsx +82 -0
- package/src/components/tooltip/RLSTooltip.tsx +48 -0
- package/src/components/tour/RLSTour.tsx +26 -0
- package/src/components/tree/RLSTree.tsx +26 -0
- package/src/components/user/RLSUser.tsx +26 -0
- package/src/components/video/RLAVideo.astro +4 -1
- package/src/components/video/RLSVideo.tsx +158 -0
- package/src/components/watermark/RLSWatermark.tsx +27 -0
- package/src/components/window-mockup/RLSWindowMockup.tsx +27 -0
- package/src/preset.ts +73 -1
- package/src/resolver.ts +6 -1
- package/src/virtual.d.ts +6 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { createMemo, splitProps, type Component, type JSX } from "solid-js"
|
|
2
|
+
import { Dynamic } from "solid-js/web"
|
|
3
|
+
import type { HeaderProps } from "./header"
|
|
4
|
+
import { headerTheme } from "./header.theme"
|
|
5
|
+
|
|
6
|
+
export interface RLSHeaderProps extends HeaderProps {
|
|
7
|
+
layerType?: "header" | "banner"
|
|
8
|
+
left?: JSX.Element
|
|
9
|
+
center?: JSX.Element
|
|
10
|
+
right?: JSX.Element
|
|
11
|
+
children?: JSX.Element
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const RLSHeader: Component<RLSHeaderProps> = (allProps) => {
|
|
15
|
+
const [props, rest] = splitProps(allProps, [
|
|
16
|
+
"as",
|
|
17
|
+
"layerType",
|
|
18
|
+
"contain",
|
|
19
|
+
"sticky",
|
|
20
|
+
"fixed",
|
|
21
|
+
"stackIndex",
|
|
22
|
+
"hideOnScroll",
|
|
23
|
+
"id",
|
|
24
|
+
"ui",
|
|
25
|
+
"class",
|
|
26
|
+
"left",
|
|
27
|
+
"center",
|
|
28
|
+
"right",
|
|
29
|
+
"children"
|
|
30
|
+
])
|
|
31
|
+
|
|
32
|
+
const tag = () => props.as ?? "header"
|
|
33
|
+
|
|
34
|
+
const contain = () => props.contain ?? true
|
|
35
|
+
const sticky = () => props.sticky ?? true
|
|
36
|
+
const fixed = () => props.fixed ?? false
|
|
37
|
+
const stackIndex = () => props.stackIndex ?? 0
|
|
38
|
+
const hideOnScroll = () => props.hideOnScroll ?? false
|
|
39
|
+
const layerType = () => props.layerType ?? "header"
|
|
40
|
+
const isBanner = () => layerType() === "banner"
|
|
41
|
+
|
|
42
|
+
const layerId =
|
|
43
|
+
typeof props.id === "string" ? props.id : `rla-header-${Math.random().toString(36).slice(2, 8)}`
|
|
44
|
+
|
|
45
|
+
const resolvedClasses = createMemo(() =>
|
|
46
|
+
headerTheme({
|
|
47
|
+
contain: contain(),
|
|
48
|
+
sticky: fixed() ? false : sticky(),
|
|
49
|
+
fixed: fixed(),
|
|
50
|
+
ui: props.ui,
|
|
51
|
+
class: props.class
|
|
52
|
+
})
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<Dynamic
|
|
57
|
+
component={tag()}
|
|
58
|
+
id={layerId}
|
|
59
|
+
data-slot="root"
|
|
60
|
+
class={resolvedClasses().root}
|
|
61
|
+
data-contain={contain() ? "true" : "false"}
|
|
62
|
+
data-rla-header={isBanner() ? undefined : "true"}
|
|
63
|
+
data-rla-banner={isBanner() ? "true" : undefined}
|
|
64
|
+
data-stack-index={stackIndex()}
|
|
65
|
+
data-hide-on-scroll={String(hideOnScroll())}
|
|
66
|
+
data-header-layer-id={layerId}
|
|
67
|
+
data-layer-type={layerType()}
|
|
68
|
+
{...rest}
|
|
69
|
+
>
|
|
70
|
+
<div class={resolvedClasses().content} data-header-content>
|
|
71
|
+
<div class={resolvedClasses().container} data-slot="container">
|
|
72
|
+
<div class={resolvedClasses().left} data-slot="left">
|
|
73
|
+
{props.left}
|
|
74
|
+
</div>
|
|
75
|
+
<div class={resolvedClasses().center} data-slot="center">
|
|
76
|
+
{props.center ?? props.children}
|
|
77
|
+
</div>
|
|
78
|
+
<div class={resolvedClasses().right} data-slot="right">
|
|
79
|
+
{props.right}
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
</Dynamic>
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export default RLSHeader
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { createMemo, createSignal, splitProps, type Component, type JSX } from "solid-js"
|
|
2
|
+
import type { HoverCardProps } from "./hover-card"
|
|
3
|
+
import { hoverCardTheme } from "./hover-card.theme"
|
|
4
|
+
|
|
5
|
+
export interface RLSHoverCardProps extends HoverCardProps {
|
|
6
|
+
children?: JSX.Element
|
|
7
|
+
trigger?: JSX.Element
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const RLSHoverCard: Component<RLSHoverCardProps> = (allProps) => {
|
|
11
|
+
const [props, rest] = splitProps(allProps, [
|
|
12
|
+
"triggerLabel",
|
|
13
|
+
"placement",
|
|
14
|
+
"ui",
|
|
15
|
+
"class",
|
|
16
|
+
"children",
|
|
17
|
+
"trigger"
|
|
18
|
+
])
|
|
19
|
+
|
|
20
|
+
const [isOpen, setIsOpen] = createSignal(false)
|
|
21
|
+
|
|
22
|
+
const resolvedClasses = createMemo(() =>
|
|
23
|
+
hoverCardTheme({
|
|
24
|
+
placement: props.placement ?? "bottom",
|
|
25
|
+
ui: props.ui,
|
|
26
|
+
class: props.class
|
|
27
|
+
})
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
const contentClass = () =>
|
|
31
|
+
resolvedClasses()["content"].replace(
|
|
32
|
+
/\s*(invisible|opacity-0|scale-95|pointer-events-none|group-hover\/hover-card:(visible|opacity-100|scale-100|pointer-events-auto))/g,
|
|
33
|
+
""
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<div
|
|
38
|
+
class={resolvedClasses().root}
|
|
39
|
+
data-slot="hover-card-container"
|
|
40
|
+
onMouseEnter={() => setIsOpen(true)}
|
|
41
|
+
onMouseLeave={() => setIsOpen(false)}
|
|
42
|
+
{...rest}
|
|
43
|
+
>
|
|
44
|
+
<div
|
|
45
|
+
class={resolvedClasses().trigger}
|
|
46
|
+
data-slot="trigger"
|
|
47
|
+
tabindex="0"
|
|
48
|
+
onFocus={() => setIsOpen(true)}
|
|
49
|
+
onBlur={() => setIsOpen(false)}
|
|
50
|
+
>
|
|
51
|
+
{props.trigger ? (
|
|
52
|
+
props.trigger
|
|
53
|
+
) : props.triggerLabel ? (
|
|
54
|
+
<span class="cursor-help underline decoration-dotted">{props.triggerLabel}</span>
|
|
55
|
+
) : null}
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<div
|
|
59
|
+
class={`${contentClass()} ${
|
|
60
|
+
isOpen()
|
|
61
|
+
? "visible opacity-100 scale-100 pointer-events-auto"
|
|
62
|
+
: "invisible opacity-0 scale-95 pointer-events-none"
|
|
63
|
+
}`}
|
|
64
|
+
data-slot="content"
|
|
65
|
+
>
|
|
66
|
+
{props.children}
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export default RLSHoverCard
|
|
@@ -3,7 +3,9 @@ import { resolveIcon } from "../../icons"
|
|
|
3
3
|
import type { IconProps } from "./icon"
|
|
4
4
|
import { iconTheme } from "./icon.theme"
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
export interface RLSIconProps extends IconProps {}
|
|
7
|
+
|
|
8
|
+
const RLSIcon: Component<RLSIconProps> = (allProps) => {
|
|
7
9
|
const [props, rest] = splitProps(allProps, ["name", "size", "ui", "class"])
|
|
8
10
|
const resolved = createMemo(() => resolveIcon(props.name))
|
|
9
11
|
const classes = createMemo(() =>
|