@rimelight/ui 0.0.56 → 0.0.58
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 +5 -5
- 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 +0 -11
- 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/tooltip/RLATooltip.astro +7 -11
|
@@ -1,219 +1,211 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { ChartProps, ChartDataPoint } from "./chart"
|
|
3
|
-
import { chartTheme } from "./chart.theme"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const {
|
|
8
|
-
type = "bar",
|
|
9
|
-
data = [],
|
|
10
|
-
title,
|
|
11
|
-
height = 280,
|
|
12
|
-
color = "primary",
|
|
13
|
-
...rest
|
|
14
|
-
} = Astro.props as ChartProps
|
|
15
|
-
|
|
16
|
-
const classes = chartTheme(Astro.props)
|
|
17
|
-
|
|
18
|
-
// Compute derived values on the server so we don't do heavy JS on the client
|
|
19
|
-
const max = data.length > 0 ? Math.max(...data.map(d => d.value)) : 1
|
|
20
|
-
const total = data.reduce((sum, d) => sum + d.value, 0)
|
|
21
|
-
|
|
22
|
-
// Palette for chart segments/bars when no per-item color given
|
|
23
|
-
const palette = [
|
|
24
|
-
"hsl(221 83% 53%)", // blue
|
|
25
|
-
"hsl(262 83% 58%)", // violet
|
|
26
|
-
"hsl(142 76% 36%)", // green
|
|
27
|
-
"hsl(32 95% 44%)", // amber
|
|
28
|
-
"hsl(0 84% 60%)", // red
|
|
29
|
-
"hsl(187 85% 43%)", // cyan
|
|
30
|
-
]
|
|
31
|
-
|
|
32
|
-
const getColor = (item: ChartDataPoint, index: number) =>
|
|
33
|
-
item.color ?? palette[index % palette.length]
|
|
34
|
-
|
|
35
|
-
// Build pie/donut SVG path segments
|
|
36
|
-
const PIE_R = 80
|
|
37
|
-
const PIE_CX = 100
|
|
38
|
-
const PIE_CY = 100
|
|
39
|
-
const DONUT_INNER_R = 45
|
|
40
|
-
|
|
41
|
-
const polarToCartesian = (cx: number, cy: number, r: number, angleDeg: number) => {
|
|
42
|
-
const rad = (angleDeg - 90) * (Math.PI / 180)
|
|
43
|
-
return { x: cx + r * Math.cos(rad), y: cy + r * Math.sin(rad) }
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const describeArc = (cx: number, cy: number, r: number, start: number, end: number) => {
|
|
47
|
-
const s = polarToCartesian(cx, cy, r, start)
|
|
48
|
-
const e = polarToCartesian(cx, cy, r, end)
|
|
49
|
-
const largeArc = end - start > 180 ? 1 : 0
|
|
50
|
-
return `M ${s.x} ${s.y} A ${r} ${r} 0 ${largeArc} 1 ${e.x} ${e.y}`
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
let pieCursor = 0
|
|
54
|
-
const pieSlices = data.map((item, i) => {
|
|
55
|
-
const angle = (item.value / (total || 1)) * 360
|
|
56
|
-
const start = pieCursor
|
|
57
|
-
const end = pieCursor + angle
|
|
58
|
-
pieCursor = end
|
|
59
|
-
return { item, i, start, end }
|
|
60
|
-
})
|
|
61
|
-
|
|
62
|
-
// Build line chart SVG points
|
|
63
|
-
const LINE_W = 400
|
|
64
|
-
const LINE_H = 160
|
|
65
|
-
const LINE_PAD = 32
|
|
66
|
-
const linePoints = data.map((d, i) => {
|
|
67
|
-
const x = data.length < 2
|
|
68
|
-
? LINE_PAD
|
|
69
|
-
: LINE_PAD + (i / (data.length - 1)) * (LINE_W - LINE_PAD * 2)
|
|
70
|
-
const y = LINE_H - LINE_PAD - ((d.value / (max || 1)) * (LINE_H - LINE_PAD * 2))
|
|
71
|
-
return { x, y, d, i }
|
|
72
|
-
})
|
|
73
|
-
const linePath = linePoints.map((p, i) => `${i === 0 ? "M" : "L"} ${p.x} ${p.y}`).join(" ")
|
|
74
|
-
const areaPath = linePoints.length > 0
|
|
75
|
-
? linePath +
|
|
76
|
-
` L ${linePoints[linePoints.length - 1]!.x} ${LINE_H - LINE_PAD}` +
|
|
77
|
-
` L ${linePoints[0]!.x} ${LINE_H - LINE_PAD} Z`
|
|
78
|
-
: ""
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
<span class=
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
{/*
|
|
130
|
-
{
|
|
131
|
-
<
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
<circle cx="5" cy="5" r="5" fill={getColor(item, i)} />
|
|
213
|
-
</svg>
|
|
214
|
-
<span>{item.label}</span>
|
|
215
|
-
</div>
|
|
216
|
-
))}
|
|
217
|
-
</div>
|
|
218
|
-
)}
|
|
219
|
-
</div>
|
|
1
|
+
---
|
|
2
|
+
import type { ChartProps, ChartDataPoint } from "./chart"
|
|
3
|
+
import { chartTheme } from "./chart.theme"
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
const {
|
|
8
|
+
type = "bar",
|
|
9
|
+
data = [],
|
|
10
|
+
title,
|
|
11
|
+
height = 280,
|
|
12
|
+
color = "primary",
|
|
13
|
+
...rest
|
|
14
|
+
} = Astro.props as ChartProps
|
|
15
|
+
|
|
16
|
+
const classes = chartTheme(Astro.props)
|
|
17
|
+
|
|
18
|
+
// Compute derived values on the server so we don't do heavy JS on the client
|
|
19
|
+
const max = data.length > 0 ? Math.max(...data.map(d => d.value)) : 1
|
|
20
|
+
const total = data.reduce((sum, d) => sum + d.value, 0)
|
|
21
|
+
|
|
22
|
+
// Palette for chart segments/bars when no per-item color given
|
|
23
|
+
const palette = [
|
|
24
|
+
"hsl(221 83% 53%)", // blue
|
|
25
|
+
"hsl(262 83% 58%)", // violet
|
|
26
|
+
"hsl(142 76% 36%)", // green
|
|
27
|
+
"hsl(32 95% 44%)", // amber
|
|
28
|
+
"hsl(0 84% 60%)", // red
|
|
29
|
+
"hsl(187 85% 43%)", // cyan
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
const getColor = (item: ChartDataPoint, index: number) =>
|
|
33
|
+
item.color ?? palette[index % palette.length]
|
|
34
|
+
|
|
35
|
+
// Build pie/donut SVG path segments
|
|
36
|
+
const PIE_R = 80
|
|
37
|
+
const PIE_CX = 100
|
|
38
|
+
const PIE_CY = 100
|
|
39
|
+
const DONUT_INNER_R = 45
|
|
40
|
+
|
|
41
|
+
const polarToCartesian = (cx: number, cy: number, r: number, angleDeg: number) => {
|
|
42
|
+
const rad = (angleDeg - 90) * (Math.PI / 180)
|
|
43
|
+
return { x: cx + r * Math.cos(rad), y: cy + r * Math.sin(rad) }
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const describeArc = (cx: number, cy: number, r: number, start: number, end: number) => {
|
|
47
|
+
const s = polarToCartesian(cx, cy, r, start)
|
|
48
|
+
const e = polarToCartesian(cx, cy, r, end)
|
|
49
|
+
const largeArc = end - start > 180 ? 1 : 0
|
|
50
|
+
return `M ${s.x} ${s.y} A ${r} ${r} 0 ${largeArc} 1 ${e.x} ${e.y}`
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
let pieCursor = 0
|
|
54
|
+
const pieSlices = data.map((item, i) => {
|
|
55
|
+
const angle = (item.value / (total || 1)) * 360
|
|
56
|
+
const start = pieCursor
|
|
57
|
+
const end = pieCursor + angle
|
|
58
|
+
pieCursor = end
|
|
59
|
+
return { item, i, start, end }
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
// Build line chart SVG points
|
|
63
|
+
const LINE_W = 400
|
|
64
|
+
const LINE_H = 160
|
|
65
|
+
const LINE_PAD = 32
|
|
66
|
+
const linePoints = data.map((d, i) => {
|
|
67
|
+
const x = data.length < 2
|
|
68
|
+
? LINE_PAD
|
|
69
|
+
: LINE_PAD + (i / (data.length - 1)) * (LINE_W - LINE_PAD * 2)
|
|
70
|
+
const y = LINE_H - LINE_PAD - ((d.value / (max || 1)) * (LINE_H - LINE_PAD * 2))
|
|
71
|
+
return { x, y, d, i }
|
|
72
|
+
})
|
|
73
|
+
const linePath = linePoints.map((p, i) => `${i === 0 ? "M" : "L"} ${p.x} ${p.y}`).join(" ")
|
|
74
|
+
const areaPath = linePoints.length > 0
|
|
75
|
+
? linePath +
|
|
76
|
+
` L ${linePoints[linePoints.length - 1]!.x} ${LINE_H - LINE_PAD}` +
|
|
77
|
+
` L ${linePoints[0]!.x} ${LINE_H - LINE_PAD} Z`
|
|
78
|
+
: ""
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
<div class:list={[classes.root, `min-h-[${height}px]`]} data-slot="root" {...rest}>
|
|
82
|
+
{title && <div class={classes.title} data-slot="title">{title}</div>}
|
|
83
|
+
|
|
84
|
+
{/* Bar Chart */}
|
|
85
|
+
{type === "bar" && (
|
|
86
|
+
<div class:list={[classes.container, `h-[${height - 60}px] gap-1.5 items-end`]} data-slot="container">
|
|
87
|
+
{data.map((item, i) => {
|
|
88
|
+
const pct = max > 0 ? (item.value / max) * 100 : 0
|
|
89
|
+
return (
|
|
90
|
+
<div class="flex flex-col items-center gap-1 flex-1 group">
|
|
91
|
+
<span class="text-[10px] text-muted font-mono opacity-0 group-hover:opacity-100 transition-opacity">
|
|
92
|
+
{item.value}
|
|
93
|
+
</span>
|
|
94
|
+
<div class:list={[classes.bar, "h-full w-full overflow-hidden !bg-transparent"]} title={`${item.label}: ${item.value}`}>
|
|
95
|
+
<svg class="h-full w-full overflow-visible" viewBox="0 0 20 100" preserveAspectRatio="none">
|
|
96
|
+
<rect x="0" y={100 - pct} width="20" height={pct} fill={getColor(item, i)} rx="2" />
|
|
97
|
+
</svg>
|
|
98
|
+
</div>
|
|
99
|
+
<span class={classes.axis}>{item.label}</span>
|
|
100
|
+
</div>
|
|
101
|
+
)
|
|
102
|
+
})}
|
|
103
|
+
</div>
|
|
104
|
+
)}
|
|
105
|
+
|
|
106
|
+
{/* Line / Area Chart */}
|
|
107
|
+
{(type === "line" || type === "area") && (
|
|
108
|
+
<div class:list={["relative w-full rla-chart-line-wrap", `h-[${height - 60}px]`]}>
|
|
109
|
+
<svg
|
|
110
|
+
class={classes.svg}
|
|
111
|
+
viewBox={`0 0 ${LINE_W} ${LINE_H}`}
|
|
112
|
+
preserveAspectRatio="none"
|
|
113
|
+
aria-label={title ?? "Line chart"}
|
|
114
|
+
>
|
|
115
|
+
{/* Grid lines */}
|
|
116
|
+
{[0, 0.25, 0.5, 0.75, 1].map(t => {
|
|
117
|
+
const y = LINE_PAD + t * (LINE_H - LINE_PAD * 2)
|
|
118
|
+
return <line x1={LINE_PAD} y1={y} x2={LINE_W - LINE_PAD} y2={y} stroke="currentColor" stroke-opacity="0.08" />
|
|
119
|
+
})}
|
|
120
|
+
|
|
121
|
+
{/* Area fill */}
|
|
122
|
+
{type === "area" && (
|
|
123
|
+
<path d={areaPath} fill={palette[0]!} fill-opacity="0.15" />
|
|
124
|
+
)}
|
|
125
|
+
|
|
126
|
+
{/* Line */}
|
|
127
|
+
<path d={linePath} class={classes.line} stroke={palette[0]!} stroke-width="2.5" />
|
|
128
|
+
|
|
129
|
+
{/* Dots */}
|
|
130
|
+
{linePoints.map(p => (
|
|
131
|
+
<circle
|
|
132
|
+
cx={p.x}
|
|
133
|
+
cy={p.y}
|
|
134
|
+
r="4"
|
|
135
|
+
fill={getColor(p.d, p.i)}
|
|
136
|
+
stroke="white"
|
|
137
|
+
stroke-width="1.5"
|
|
138
|
+
>
|
|
139
|
+
<title>{p.d.label}: {p.d.value}</title>
|
|
140
|
+
</circle>
|
|
141
|
+
))}
|
|
142
|
+
|
|
143
|
+
{/* X axis labels */}
|
|
144
|
+
{linePoints.map(p => (
|
|
145
|
+
<text x={p.x} y={LINE_H - 4} text-anchor="middle" class={classes.axis}>{p.d.label}</text>
|
|
146
|
+
))}
|
|
147
|
+
</svg>
|
|
148
|
+
</div>
|
|
149
|
+
)}
|
|
150
|
+
|
|
151
|
+
{/* Pie / Donut Chart */}
|
|
152
|
+
{(type === "pie" || type === "donut") && (
|
|
153
|
+
<div class:list={["flex items-center gap-6 justify-center rla-chart-pie-wrap", `h-[${height - 60}px]`]}>
|
|
154
|
+
<svg
|
|
155
|
+
viewBox="0 0 200 200"
|
|
156
|
+
class="h-full w-auto max-h-48"
|
|
157
|
+
aria-label={title ?? "Pie chart"}
|
|
158
|
+
>
|
|
159
|
+
{pieSlices.map(({ item, i, start, end }) => {
|
|
160
|
+
const isFullCircle = Math.abs(end - start - 360) < 0.01
|
|
161
|
+
const d = isFullCircle
|
|
162
|
+
? `M ${PIE_CX} ${PIE_CY - PIE_R} A ${PIE_R} ${PIE_R} 0 1 1 ${PIE_CX - 0.001} ${PIE_CY - PIE_R} Z`
|
|
163
|
+
: describeArc(PIE_CX, PIE_CY, PIE_R, start, end) +
|
|
164
|
+
` L ${PIE_CX} ${PIE_CY} Z`
|
|
165
|
+
return (
|
|
166
|
+
<path
|
|
167
|
+
d={d}
|
|
168
|
+
fill={getColor(item, i)}
|
|
169
|
+
class="transition-opacity hover:opacity-85 cursor-pointer"
|
|
170
|
+
>
|
|
171
|
+
<title>{item.label}: {item.value}</title>
|
|
172
|
+
</path>
|
|
173
|
+
)
|
|
174
|
+
})}
|
|
175
|
+
{type === "donut" && (
|
|
176
|
+
<circle cx={PIE_CX} cy={PIE_CY} r={DONUT_INNER_R} fill="var(--rl-neutral-50)" />
|
|
177
|
+
)}
|
|
178
|
+
</svg>
|
|
179
|
+
|
|
180
|
+
{/* Legend */}
|
|
181
|
+
<div class="flex flex-col gap-1.5">
|
|
182
|
+
{data.map((item, i) => (
|
|
183
|
+
<div class="flex items-center gap-2 text-xs text-muted">
|
|
184
|
+
<svg class="size-3 shrink-0" viewBox="0 0 10 10">
|
|
185
|
+
<rect width="10" height="10" rx="2" fill={getColor(item, i)} />
|
|
186
|
+
</svg>
|
|
187
|
+
<span>{item.label}</span>
|
|
188
|
+
<span class="ml-1 font-mono text-highlighted">{item.value}</span>
|
|
189
|
+
</div>
|
|
190
|
+
))}
|
|
191
|
+
</div>
|
|
192
|
+
</div>
|
|
193
|
+
)}
|
|
194
|
+
|
|
195
|
+
{/* Custom slot for fully custom chart content */}
|
|
196
|
+
<slot />
|
|
197
|
+
|
|
198
|
+
{/* Legend row for bar/line */}
|
|
199
|
+
{(type === "bar" || type === "line" || type === "area") && data.length > 0 && (
|
|
200
|
+
<div class={classes.legend} data-slot="legend">
|
|
201
|
+
{data.map((item, i) => (
|
|
202
|
+
<div class="flex items-center gap-1.5">
|
|
203
|
+
<svg class="size-2.5 shrink-0" viewBox="0 0 10 10">
|
|
204
|
+
<circle cx="5" cy="5" r="5" fill={getColor(item, i)} />
|
|
205
|
+
</svg>
|
|
206
|
+
<span>{item.label}</span>
|
|
207
|
+
</div>
|
|
208
|
+
))}
|
|
209
|
+
</div>
|
|
210
|
+
)}
|
|
211
|
+
</div>
|
|
@@ -18,7 +18,7 @@ const Tag = as;
|
|
|
18
18
|
const classes = dashboardNavbarTheme(Astro.props);
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
-
<Tag class:list={[classes.root]} data-slot="root"
|
|
21
|
+
<Tag class:list={[classes.root]} data-slot="root" {...rest}>
|
|
22
22
|
<div data-slot="left" class={classes.left}>
|
|
23
23
|
{toggle && toggleSide === "left" && (
|
|
24
24
|
<button type="button" data-dashboard-toggle="mobile" class={classes.toggle + " lg:hidden"} data-slot="toggle" aria-label="Toggle sidebar">
|
|
@@ -45,21 +45,7 @@ const RLSDashboardNavbar: Component<RLSDashboardNavbarProps> = (allProps) => {
|
|
|
45
45
|
)
|
|
46
46
|
|
|
47
47
|
return (
|
|
48
|
-
<Dynamic
|
|
49
|
-
component={Tag()}
|
|
50
|
-
class={resolvedClasses().root}
|
|
51
|
-
data-slot="root"
|
|
52
|
-
style={{
|
|
53
|
-
"height": "4rem",
|
|
54
|
-
"min-height": "4rem",
|
|
55
|
-
"padding": "1rem 1.5rem",
|
|
56
|
-
"display": "flex",
|
|
57
|
-
"align-items": "center",
|
|
58
|
-
"justify-content": "space-between",
|
|
59
|
-
"box-sizing": "border-box"
|
|
60
|
-
}}
|
|
61
|
-
{...rest}
|
|
62
|
-
>
|
|
48
|
+
<Dynamic component={Tag()} class={resolvedClasses().root} data-slot="root" {...rest}>
|
|
63
49
|
<div data-slot="left" class={resolvedClasses().left}>
|
|
64
50
|
<Show when={showToggle() && toggleSide() === "left"}>
|
|
65
51
|
<button
|
|
@@ -14,7 +14,7 @@ const classes = dashboardPanelTheme({
|
|
|
14
14
|
size: false
|
|
15
15
|
});
|
|
16
16
|
---
|
|
17
|
-
<div class={classes.root} data-slot="root"
|
|
17
|
+
<div class:list={[classes.root, "flex-1 min-w-0"]} data-slot="root" {...rest}>
|
|
18
18
|
<slot name="header" />
|
|
19
19
|
|
|
20
20
|
<div data-slot="body" class={classes.body}>
|
|
@@ -52,12 +52,7 @@ const RLSDashboardPanel: Component<RLSDashboardPanelProps> = (allProps) => {
|
|
|
52
52
|
|
|
53
53
|
return (
|
|
54
54
|
<>
|
|
55
|
-
<div
|
|
56
|
-
class={resolvedClasses().root}
|
|
57
|
-
data-slot="root"
|
|
58
|
-
style={{ "flex": "1 1 0%", "min-width": "0" }}
|
|
59
|
-
{...rest}
|
|
60
|
-
>
|
|
55
|
+
<div class={`${resolvedClasses().root} flex-1 min-w-0`} data-slot="root" {...rest}>
|
|
61
56
|
{headerContent()}
|
|
62
57
|
|
|
63
58
|
<div data-slot="body" class={resolvedClasses().body}>
|
|
@@ -15,7 +15,7 @@ const classes = dashboardSearchTheme({
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
17
|
<template id="dashboard-search-template">
|
|
18
|
-
<div data-dashboard-search data-slot="modal" class={classes.modal
|
|
18
|
+
<div data-dashboard-search data-slot="modal" class:list={[classes.modal, "fixed inset-0 z-50 flex items-start justify-center sm:pt-16"]}>
|
|
19
19
|
<div class="fixed inset-0 bg-default/80 backdrop-blur-sm" data-dashboard-search-close></div>
|
|
20
20
|
<div class:list={["relative w-full bg-default border border-default sm:rounded-xl shadow-2xl overflow-hidden", classes.modal]}>
|
|
21
21
|
<div class="flex items-center gap-2 border-b border-default px-4">
|
|
@@ -206,17 +206,6 @@ const {
|
|
|
206
206
|
el.rlScrollListener = scrollListener;
|
|
207
207
|
window.addEventListener('scroll', scrollListener, { passive: true });
|
|
208
208
|
}
|
|
209
|
-
|
|
210
|
-
(function retry() {
|
|
211
|
-
if (!el.isConnected) return;
|
|
212
|
-
const h = getHeight(contentEl);
|
|
213
|
-
if (h !== naturalHeight) {
|
|
214
|
-
naturalHeight = h;
|
|
215
|
-
RL.register(id, stackIndex, naturalHeight, isVisible, el, type);
|
|
216
|
-
}
|
|
217
|
-
if (h > 0 && h !== 64 && contentEl && contentEl.offsetHeight > 0) return;
|
|
218
|
-
requestAnimationFrame(retry);
|
|
219
|
-
})();
|
|
220
209
|
}
|
|
221
210
|
|
|
222
211
|
function startObserver() {
|
|
@@ -136,7 +136,7 @@ const baseImageProps: Record<string, any> = {
|
|
|
136
136
|
---
|
|
137
137
|
|
|
138
138
|
<rla-image {...rest}>
|
|
139
|
-
<div class={classes.root} data-slot="root" data-theme={theme}
|
|
139
|
+
<div class={classes.root} data-slot="root" data-theme={theme}>
|
|
140
140
|
{isFigure ? (
|
|
141
141
|
<figure class={classes.figure} data-slot="figure">
|
|
142
142
|
<slot name="trigger">
|
|
@@ -154,18 +154,17 @@ const baseImageProps: Record<string, any> = {
|
|
|
154
154
|
</picture>
|
|
155
155
|
) : hasColorMode ? (
|
|
156
156
|
<div
|
|
157
|
-
class="rla-image-color-mode w-full h-full relative overflow-hidden rounded-
|
|
158
|
-
style={`--rla-img-light: url('${lightUrl}'); --rla-img-dark: url('${darkUrl}');`}
|
|
157
|
+
class="rla-image-color-mode w-full h-full relative overflow-hidden rounded-[inherit] flex items-center justify-center"
|
|
159
158
|
>
|
|
160
159
|
<Image
|
|
161
160
|
{...(baseImageProps as any)}
|
|
162
161
|
src={effectiveLight as any}
|
|
163
|
-
class:list={[classes.triggerImage, "rla-img-light w-full h-full object-cover rounded-
|
|
162
|
+
class:list={[classes.triggerImage, "rla-img-light w-full h-full object-cover rounded-[inherit]"]}
|
|
164
163
|
/>
|
|
165
164
|
<Image
|
|
166
165
|
{...(baseImageProps as any)}
|
|
167
166
|
src={effectiveDark as any}
|
|
168
|
-
class:list={[classes.triggerImage, "rla-img-dark w-full h-full object-cover rounded-
|
|
167
|
+
class:list={[classes.triggerImage, "rla-img-dark w-full h-full object-cover rounded-[inherit] hidden"]}
|
|
169
168
|
/>
|
|
170
169
|
</div>
|
|
171
170
|
) : isFormatFallback ? (
|
|
@@ -182,7 +181,7 @@ const baseImageProps: Record<string, any> = {
|
|
|
182
181
|
)}
|
|
183
182
|
</button>
|
|
184
183
|
) : (
|
|
185
|
-
<div class="overflow-hidden rounded-
|
|
184
|
+
<div class="overflow-hidden rounded-[inherit] block">
|
|
186
185
|
{isResponsive && mobileImg && desktopImg ? (
|
|
187
186
|
<picture>
|
|
188
187
|
<source media={`(max-width: ${breakpointVal - 1}px)`} srcset={mobileImg.src} />
|
|
@@ -191,18 +190,17 @@ const baseImageProps: Record<string, any> = {
|
|
|
191
190
|
</picture>
|
|
192
191
|
) : hasColorMode ? (
|
|
193
192
|
<div
|
|
194
|
-
class="rla-image-color-mode w-full h-full relative overflow-hidden rounded-
|
|
195
|
-
style={`--rla-img-light: url('${lightUrl}'); --rla-img-dark: url('${darkUrl}');`}
|
|
193
|
+
class="rla-image-color-mode w-full h-full relative overflow-hidden rounded-[inherit] flex items-center justify-center"
|
|
196
194
|
>
|
|
197
195
|
<Image
|
|
198
196
|
{...(baseImageProps as any)}
|
|
199
197
|
src={effectiveLight as any}
|
|
200
|
-
class:list={[classes.triggerImage, "rla-img-light w-full h-full object-cover rounded-
|
|
198
|
+
class:list={[classes.triggerImage, "rla-img-light w-full h-full object-cover rounded-[inherit]"]}
|
|
201
199
|
/>
|
|
202
200
|
<Image
|
|
203
201
|
{...(baseImageProps as any)}
|
|
204
202
|
src={effectiveDark as any}
|
|
205
|
-
class:list={[classes.triggerImage, "rla-img-dark w-full h-full object-cover rounded-
|
|
203
|
+
class:list={[classes.triggerImage, "rla-img-dark w-full h-full object-cover rounded-[inherit] hidden"]}
|
|
206
204
|
/>
|
|
207
205
|
</div>
|
|
208
206
|
) : isFormatFallback ? (
|
|
@@ -240,18 +238,17 @@ const baseImageProps: Record<string, any> = {
|
|
|
240
238
|
</picture>
|
|
241
239
|
) : hasColorMode ? (
|
|
242
240
|
<div
|
|
243
|
-
class="rla-image-color-mode w-full h-full relative overflow-hidden rounded-
|
|
244
|
-
style={`--rla-img-light: url('${lightUrl}'); --rla-img-dark: url('${darkUrl}');`}
|
|
241
|
+
class="rla-image-color-mode w-full h-full relative overflow-hidden rounded-[inherit] flex items-center justify-center"
|
|
245
242
|
>
|
|
246
243
|
<Image
|
|
247
244
|
{...(baseImageProps as any)}
|
|
248
245
|
src={effectiveLight as any}
|
|
249
|
-
class:list={[classes.triggerImage, "rla-img-light w-full h-full object-cover rounded-
|
|
246
|
+
class:list={[classes.triggerImage, "rla-img-light w-full h-full object-cover rounded-[inherit]"]}
|
|
250
247
|
/>
|
|
251
248
|
<Image
|
|
252
249
|
{...(baseImageProps as any)}
|
|
253
250
|
src={effectiveDark as any}
|
|
254
|
-
class:list={[classes.triggerImage, "rla-img-dark w-full h-full object-cover rounded-
|
|
251
|
+
class:list={[classes.triggerImage, "rla-img-dark w-full h-full object-cover rounded-[inherit] hidden"]}
|
|
255
252
|
/>
|
|
256
253
|
</div>
|
|
257
254
|
) : isFormatFallback ? (
|
|
@@ -268,7 +265,7 @@ const baseImageProps: Record<string, any> = {
|
|
|
268
265
|
)}
|
|
269
266
|
</button>
|
|
270
267
|
) : (
|
|
271
|
-
<div class="overflow-hidden rounded-
|
|
268
|
+
<div class="overflow-hidden rounded-[inherit] block">
|
|
272
269
|
{isResponsive && mobileImg && desktopImg ? (
|
|
273
270
|
<picture>
|
|
274
271
|
<source media={`(max-width: ${breakpointVal - 1}px)`} srcset={mobileImg.src} />
|
|
@@ -277,18 +274,17 @@ const baseImageProps: Record<string, any> = {
|
|
|
277
274
|
</picture>
|
|
278
275
|
) : hasColorMode ? (
|
|
279
276
|
<div
|
|
280
|
-
class="rla-image-color-mode w-full h-full relative overflow-hidden rounded-
|
|
281
|
-
style={`--rla-img-light: url('${lightUrl}'); --rla-img-dark: url('${darkUrl}');`}
|
|
277
|
+
class="rla-image-color-mode w-full h-full relative overflow-hidden rounded-[inherit] flex items-center justify-center"
|
|
282
278
|
>
|
|
283
279
|
<Image
|
|
284
280
|
{...(baseImageProps as any)}
|
|
285
281
|
src={effectiveLight as any}
|
|
286
|
-
class:list={[classes.triggerImage, "rla-img-light w-full h-full object-cover rounded-
|
|
282
|
+
class:list={[classes.triggerImage, "rla-img-light w-full h-full object-cover rounded-[inherit]"]}
|
|
287
283
|
/>
|
|
288
284
|
<Image
|
|
289
285
|
{...(baseImageProps as any)}
|
|
290
286
|
src={effectiveDark as any}
|
|
291
|
-
class:list={[classes.triggerImage, "rla-img-dark w-full h-full object-cover rounded-
|
|
287
|
+
class:list={[classes.triggerImage, "rla-img-dark w-full h-full object-cover rounded-[inherit] hidden"]}
|
|
292
288
|
/>
|
|
293
289
|
</div>
|
|
294
290
|
) : isFormatFallback ? (
|
|
@@ -327,7 +323,6 @@ const baseImageProps: Record<string, any> = {
|
|
|
327
323
|
) : hasColorMode ? (
|
|
328
324
|
<div
|
|
329
325
|
class="rla-image-color-mode max-w-full max-h-[65vh] relative flex items-center justify-center overflow-hidden"
|
|
330
|
-
style={`--rla-img-light: url('${lightUrl}'); --rla-img-dark: url('${darkUrl}');`}
|
|
331
326
|
>
|
|
332
327
|
<img
|
|
333
328
|
src={lightUrl}
|