@rimelight/ui 0.0.57 → 0.0.60
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 +3 -4
- package/src/components/avatar/avatar.theme.ts +58 -1
- package/src/components/avatar/avatar.ts +21 -1
- package/src/components/avatar-group/RLAAvatarGroup.astro +37 -161
- package/src/components/avatar-group/RLSAvatarGroup.tsx +37 -121
- package/src/components/breadcrumb/RLABreadcrumb.astro +59 -196
- package/src/components/breadcrumb/RLSBreadcrumb.tsx +57 -120
- package/src/components/card/RLSCard.tsx +1 -2
- package/src/components/card/RLVCard.vue +1 -2
- package/src/components/carousel/RLACarousel.astro +2 -1
- package/src/components/carousel/RLSCarousel.tsx +3 -11
- package/src/components/chart/RLAChart.astro +211 -219
- package/src/components/dashboard-navbar/RLADashboardNavbar.astro +1 -1
- package/src/components/dashboard-navbar/RLSDashboardNavbar.tsx +1 -15
- package/src/components/dashboard-panel/RLADashboardPanel.astro +1 -1
- package/src/components/dashboard-panel/RLSDashboardPanel.tsx +1 -6
- package/src/components/dashboard-search/RLADashboardSearch.astro +1 -1
- package/src/components/head/UIHead.astro +1 -12
- package/src/components/image/RLAImage.astro +15 -20
- package/src/components/image/RLSImage.tsx +5 -12
- package/src/components/image/image.theme.ts +4 -4
- package/src/components/input-rating/RLAInputRating.astro +19 -14
- package/src/components/input-rating/RLSInputRating.tsx +39 -32
- package/src/components/input-tags/RLAInputTags.astro +27 -137
- package/src/components/layout-grid/RLALayoutGrid.astro +4 -4
- package/src/components/logo/RLALogo.astro +0 -16
- package/src/components/logo/RLSLogo.tsx +1 -8
- package/src/components/marquee/RLAMarquee.astro +55 -62
- package/src/components/page-section/RLAPageSection.astro +2 -2
- package/src/components/progress/RLAProgress.astro +39 -38
- package/src/components/progress/RLSProgress.tsx +16 -5
- package/src/components/progress/progress.theme.ts +1 -1
- package/src/components/scroll-area/RLAScrollArea.astro +4 -5
- package/src/components/scroll-area/RLSScrollArea.tsx +5 -6
- package/src/components/splitter/RLASplitter.astro +217 -230
- package/src/components/splitter/RLSSplitter.tsx +2 -6
- package/src/components/steps/RLASteps.astro +110 -110
- package/src/components/sticky-surface/RLAStickySurface.astro +49 -67
- package/src/components/table/RLATable.astro +16 -46
- package/src/components/tabs/RLATabs.astro +352 -385
- package/src/components/textarea/RLATextarea.astro +1 -2
- package/src/components/theme-selector/RLAThemeSelector.astro +6 -6
- package/src/components/timeline/RLATimeline.astro +49 -23
- package/src/components/timeline/RLSTimeline.tsx +38 -13
- package/src/components/timeline/timeline.ts +10 -0
- package/src/components/tooltip/RLATooltip.astro +7 -11
|
@@ -81,7 +81,6 @@ const RLSLogo: Component<RLSLogoProps> = (allProps) => {
|
|
|
81
81
|
aria-label={props.alt || variant()}
|
|
82
82
|
data-slot="root"
|
|
83
83
|
data-theme={props.theme}
|
|
84
|
-
style={props.theme ? { "color-scheme": props.theme } : undefined}
|
|
85
84
|
{...rest}
|
|
86
85
|
>
|
|
87
86
|
<Show when={logoInfo().logoSrc} fallback={props.children}>
|
|
@@ -94,13 +93,7 @@ const RLSLogo: Component<RLSLogoProps> = (allProps) => {
|
|
|
94
93
|
<Show
|
|
95
94
|
when={!hasAutoMode()}
|
|
96
95
|
fallback={
|
|
97
|
-
<span
|
|
98
|
-
class="rla-logo-image size-full flex items-center justify-center shrink-0"
|
|
99
|
-
style={{
|
|
100
|
-
"--rla-logo-light": `url('${logoInfo().lightSrc}')`,
|
|
101
|
-
"--rla-logo-dark": `url('${logoInfo().darkSrc}')`
|
|
102
|
-
}}
|
|
103
|
-
>
|
|
96
|
+
<span class="rla-logo-image size-full flex items-center justify-center shrink-0">
|
|
104
97
|
<img
|
|
105
98
|
src={logoInfo().lightSrc || ""}
|
|
106
99
|
alt={props.alt || ""}
|
|
@@ -1,62 +1,55 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { MarqueeProps } from "./marquee"
|
|
3
|
-
import { marqueeTheme } from "./marquee.theme"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const {
|
|
7
|
-
speed = 40,
|
|
8
|
-
...rest
|
|
9
|
-
} = Astro.props as MarqueeProps
|
|
10
|
-
|
|
11
|
-
const classes = marqueeTheme(Astro.props)
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<div class={classes.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
animation
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
.animate-marquee
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
to { transform: translateY(-100%); }
|
|
57
|
-
}
|
|
58
|
-
@keyframes marquee-down {
|
|
59
|
-
from { transform: translateY(-100%); }
|
|
60
|
-
to { transform: translateY(0); }
|
|
61
|
-
}
|
|
62
|
-
</style>
|
|
1
|
+
---
|
|
2
|
+
import type { MarqueeProps } from "./marquee"
|
|
3
|
+
import { marqueeTheme } from "./marquee.theme"
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
const {
|
|
7
|
+
speed = 40,
|
|
8
|
+
...rest
|
|
9
|
+
} = Astro.props as MarqueeProps
|
|
10
|
+
|
|
11
|
+
const classes = marqueeTheme(Astro.props)
|
|
12
|
+
|
|
13
|
+
const durationClass = `duration-[${speed}s]`
|
|
14
|
+
---
|
|
15
|
+
<div class={classes.root} data-slot="marquee-root" {...rest}>
|
|
16
|
+
<div class:list={[classes.track, durationClass]} data-slot="track">
|
|
17
|
+
<slot />
|
|
18
|
+
</div>
|
|
19
|
+
<div class:list={[classes.track, durationClass]} data-slot="track" aria-hidden="true">
|
|
20
|
+
<slot />
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<style>
|
|
25
|
+
.animate-marquee,
|
|
26
|
+
.animate-marquee-left {
|
|
27
|
+
animation: marquee-left 30s linear infinite;
|
|
28
|
+
}
|
|
29
|
+
.animate-marquee-right {
|
|
30
|
+
animation: marquee-right 30s linear infinite;
|
|
31
|
+
}
|
|
32
|
+
.animate-marquee-up {
|
|
33
|
+
animation: marquee-up 30s linear infinite;
|
|
34
|
+
}
|
|
35
|
+
.animate-marquee-down {
|
|
36
|
+
animation: marquee-down 30s linear infinite;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@keyframes marquee-left {
|
|
40
|
+
from { transform: translateX(0); }
|
|
41
|
+
to { transform: translateX(-100%); }
|
|
42
|
+
}
|
|
43
|
+
@keyframes marquee-right {
|
|
44
|
+
from { transform: translateX(-100%); }
|
|
45
|
+
to { transform: translateX(0); }
|
|
46
|
+
}
|
|
47
|
+
@keyframes marquee-up {
|
|
48
|
+
from { transform: translateY(0); }
|
|
49
|
+
to { transform: translateY(-100%); }
|
|
50
|
+
}
|
|
51
|
+
@keyframes marquee-down {
|
|
52
|
+
from { transform: translateY(-100%); }
|
|
53
|
+
to { transform: translateY(0); }
|
|
54
|
+
}
|
|
55
|
+
</style>
|
|
@@ -45,9 +45,9 @@ const TitleTag = variant === "hero" ? "h1" : "h2";
|
|
|
45
45
|
data-orientation={orientation}
|
|
46
46
|
class:list={[
|
|
47
47
|
classes.root,
|
|
48
|
-
contentVisibility === "auto" && "[content-visibility:auto]
|
|
48
|
+
contentVisibility === "auto" && "[content-visibility:auto]",
|
|
49
|
+
containIntrinsicSize ? `[contain-intrinsic-size:${containIntrinsicSize}]` : (contentVisibility === "auto" && "[contain-intrinsic-size:auto_500px]")
|
|
49
50
|
]}
|
|
50
|
-
style={containIntrinsicSize ? `--rla-contain-intrinsic-size: ${containIntrinsicSize};` : undefined}
|
|
51
51
|
{...rest}
|
|
52
52
|
>
|
|
53
53
|
{Astro.slots.has("background") && (
|
|
@@ -1,38 +1,39 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { ProgressProps } from "./progress"
|
|
3
|
-
import { progressTheme } from "./progress.theme"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const {
|
|
7
|
-
value = 0,
|
|
8
|
-
max = 100,
|
|
9
|
-
theme,
|
|
10
|
-
...rest
|
|
11
|
-
} = Astro.props as ProgressProps
|
|
12
|
-
|
|
13
|
-
const classes = progressTheme(Astro.props)
|
|
14
|
-
|
|
15
|
-
const percentage = Math.min(100, Math.max(0, (value / max) * 100))
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
{
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
1
|
+
---
|
|
2
|
+
import type { ProgressProps } from "./progress"
|
|
3
|
+
import { progressTheme } from "./progress.theme"
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
const {
|
|
7
|
+
value = 0,
|
|
8
|
+
max = 100,
|
|
9
|
+
theme,
|
|
10
|
+
...rest
|
|
11
|
+
} = Astro.props as ProgressProps
|
|
12
|
+
|
|
13
|
+
const classes = progressTheme(Astro.props)
|
|
14
|
+
|
|
15
|
+
const percentage = Math.min(100, Math.max(0, Math.round((value / max) * 100)))
|
|
16
|
+
|
|
17
|
+
const widthClass =
|
|
18
|
+
percentage === 100 ? "w-full" :
|
|
19
|
+
percentage === 75 ? "w-3/4" :
|
|
20
|
+
percentage === 50 ? "w-1/2" :
|
|
21
|
+
percentage === 25 ? "w-1/4" :
|
|
22
|
+
percentage === 0 ? "w-0" :
|
|
23
|
+
`w-[${percentage}%]`
|
|
24
|
+
---
|
|
25
|
+
<div
|
|
26
|
+
class={classes.root}
|
|
27
|
+
data-slot="progress-root"
|
|
28
|
+
role="progressbar"
|
|
29
|
+
aria-valuemin={0}
|
|
30
|
+
aria-valuemax={max}
|
|
31
|
+
aria-valuenow={value}
|
|
32
|
+
data-theme={theme}
|
|
33
|
+
{...rest}
|
|
34
|
+
>
|
|
35
|
+
<div
|
|
36
|
+
class:list={[classes.indicator, widthClass]}
|
|
37
|
+
data-slot="indicator"
|
|
38
|
+
/>
|
|
39
|
+
</div>
|
|
@@ -29,6 +29,21 @@ const RLSProgress: Component<RLSProgressProps> = (allProps) => {
|
|
|
29
29
|
})
|
|
30
30
|
)
|
|
31
31
|
|
|
32
|
+
const widthClass = () => {
|
|
33
|
+
const pct = Math.round(percentage())
|
|
34
|
+
return pct === 100
|
|
35
|
+
? "w-full"
|
|
36
|
+
: pct === 75
|
|
37
|
+
? "w-3/4"
|
|
38
|
+
: pct === 50
|
|
39
|
+
? "w-1/2"
|
|
40
|
+
: pct === 25
|
|
41
|
+
? "w-1/4"
|
|
42
|
+
: pct === 0
|
|
43
|
+
? "w-0"
|
|
44
|
+
: `w-[${pct}%]`
|
|
45
|
+
}
|
|
46
|
+
|
|
32
47
|
return (
|
|
33
48
|
<div
|
|
34
49
|
class={resolvedClasses().root}
|
|
@@ -40,11 +55,7 @@ const RLSProgress: Component<RLSProgressProps> = (allProps) => {
|
|
|
40
55
|
data-theme={props.theme}
|
|
41
56
|
{...rest}
|
|
42
57
|
>
|
|
43
|
-
<div
|
|
44
|
-
class={resolvedClasses().indicator}
|
|
45
|
-
data-slot="indicator"
|
|
46
|
-
style={{ transform: `translateX(-${100 - percentage()}%)` }}
|
|
47
|
-
/>
|
|
58
|
+
<div class={`${resolvedClasses().indicator} ${widthClass()}`} data-slot="indicator" />
|
|
48
59
|
{props.children}
|
|
49
60
|
</div>
|
|
50
61
|
)
|
|
@@ -4,7 +4,7 @@ export const progressTheme = defineTheme("progress", {
|
|
|
4
4
|
slots: ["root", "indicator"],
|
|
5
5
|
base: {
|
|
6
6
|
root: "relative w-full overflow-hidden rounded-full bg-muted shadow-inner",
|
|
7
|
-
indicator: "h-full
|
|
7
|
+
indicator: "h-full rounded-full transition-all duration-300 ease-in-out bg-[var(--rl-bg)]"
|
|
8
8
|
},
|
|
9
9
|
variants: {
|
|
10
10
|
color: "auto",
|
|
@@ -13,18 +13,17 @@ const {
|
|
|
13
13
|
|
|
14
14
|
const classes = scrollAreaTheme(Astro.props)
|
|
15
15
|
|
|
16
|
-
const
|
|
17
|
-
?
|
|
18
|
-
:
|
|
16
|
+
const heightClass = height
|
|
17
|
+
? (typeof height === "number" ? `h-[${height}px]` : `h-[${height}]`)
|
|
18
|
+
: ""
|
|
19
19
|
---
|
|
20
20
|
|
|
21
21
|
<div
|
|
22
|
-
class={classes.root}
|
|
22
|
+
class:list={[classes.root, heightClass]}
|
|
23
23
|
data-slot="root"
|
|
24
24
|
data-scroll-area
|
|
25
25
|
data-orientation={orientation}
|
|
26
26
|
data-hide-delay={scrollHideDelay}
|
|
27
|
-
style={heightStyle}
|
|
28
27
|
{...rest}
|
|
29
28
|
>
|
|
30
29
|
{/* Scrollable viewport */}
|
|
@@ -141,21 +141,20 @@ const RLSScrollArea: Component<RLSScrollAreaProps> = (allProps) => {
|
|
|
141
141
|
})
|
|
142
142
|
)
|
|
143
143
|
|
|
144
|
-
const
|
|
144
|
+
const heightClass = () =>
|
|
145
145
|
props.height
|
|
146
146
|
? typeof props.height === "number"
|
|
147
|
-
?
|
|
148
|
-
: props.height
|
|
149
|
-
:
|
|
147
|
+
? `h-[${props.height}px]`
|
|
148
|
+
: `h-[${props.height}]`
|
|
149
|
+
: ""
|
|
150
150
|
|
|
151
151
|
return (
|
|
152
152
|
<div
|
|
153
|
-
class={resolvedClasses().root}
|
|
153
|
+
class={`${resolvedClasses().root} ${heightClass()}`}
|
|
154
154
|
data-slot="root"
|
|
155
155
|
data-scroll-area
|
|
156
156
|
data-orientation={orientation()}
|
|
157
157
|
data-hide-delay={hideDelay()}
|
|
158
|
-
style={{ height: heightStyle() }}
|
|
159
158
|
{...rest}
|
|
160
159
|
>
|
|
161
160
|
<div
|