@rimelight/ui 0.0.43 → 0.0.44
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/LICENSE +21 -0
- package/README.md +14 -12
- package/package.json +11 -14
- package/src/components/avatar/RLAAvatar.astro +4 -12
- package/src/components/badge/RLABadge.astro +2 -1
- package/src/components/badge/badge.theme.ts +0 -4
- package/src/components/banner/RLABanner.astro +1 -1
- package/src/components/banner/banner.theme.ts +1 -1
- package/src/components/breadcrumb/RLABreadcrumb.astro +2 -2
- package/src/components/button/RLAButton.astro +4 -1
- package/src/components/button/button.theme.ts +1 -5
- package/src/components/callout/RLACallout.astro +7 -5
- package/src/components/callout/callout.theme.ts +1 -5
- package/src/components/card/card.theme.ts +3 -3
- package/src/components/carousel/RLACarousel.astro +2 -2
- package/src/components/carousel/carousel.theme.ts +2 -2
- package/src/components/chart/RLAChart.astro +1 -1
- package/src/components/checkbox/RLACheckbox.astro +2 -1
- package/src/components/checkbox/checkbox.theme.ts +0 -4
- package/src/components/chip/RLAChip.astro +2 -1
- package/src/components/chip/chip.theme.ts +0 -4
- package/src/components/collapsible/RLACollapsible.astro +1 -1
- package/src/components/color-area/RLAColorArea.astro +1 -0
- package/src/components/color-area/color-area.theme.ts +1 -5
- package/src/components/color-field/RLAColorField.astro +1 -0
- package/src/components/color-field/color-field.theme.ts +1 -5
- package/src/components/color-slider/RLAColorSlider.astro +1 -0
- package/src/components/color-slider/color-slider.theme.ts +1 -5
- package/src/components/dashboard-group/RLADashboardGroup.astro +5 -7
- package/src/components/dashboard-group/dashboard-group.theme.ts +1 -1
- package/src/components/dashboard-group/dashboard-group.ts +1 -1
- package/src/components/dashboard-navbar/RLADashboardNavbar.astro +4 -4
- package/src/components/dashboard-navbar/dashboard-navbar.theme.ts +3 -3
- package/src/components/dashboard-navbar/dashboard-navbar.ts +1 -1
- package/src/components/dashboard-panel/RLADashboardPanel.astro +9 -8
- package/src/components/dashboard-panel/dashboard-panel.theme.ts +1 -1
- package/src/components/dashboard-sidebar/RLADashboardSidebar.astro +7 -4
- package/src/components/dashboard-sidebar/dashboard-sidebar.theme.ts +6 -5
- package/src/components/dashboard-sidebar-collapse/RLADashboardSidebarCollapse.astro +1 -0
- package/src/components/drawer/RLADrawer.astro +1 -1
- package/src/components/dropdown-menu/dropdown-menu.theme.ts +2 -2
- package/src/components/footer/RLAFooter.astro +2 -0
- package/src/components/footer/footer.theme.ts +0 -8
- package/src/components/gamepad/RLAGamepad.astro +1 -1
- package/src/components/head/UIHead.astro +1 -2
- package/src/components/header/header.theme.ts +1 -1
- package/src/components/icon/RLAIcon.astro +2 -5
- package/src/components/icon/RLSIcon.tsx +2 -2
- package/src/components/icon/RLVIcon.vue +18 -6
- package/src/components/icon/icon.theme.ts +1 -1
- package/src/components/image/image.theme.ts +1 -1
- package/src/components/input/RLAInput.astro +2 -1
- package/src/components/input/input.theme.ts +0 -4
- package/src/components/input-menu/RLAInputMenu.astro +2 -2
- package/src/components/input-menu/input-menu.theme.ts +1 -1
- package/src/components/input-rating/input-rating.theme.ts +2 -2
- package/src/components/kbd/RLAKbd.astro +2 -1
- package/src/components/kbd/kbd.theme.ts +0 -4
- package/src/components/keyboard/RLAKeyboard.astro +1 -1
- package/src/components/link/RLALink.astro +1 -0
- package/src/components/link/link.theme.ts +0 -4
- package/src/components/link-group/RLALinkGroup.astro +1 -1
- package/src/components/link-group/link-group.theme.ts +1 -10
- package/src/components/locale-selector/RLALocaleSelector.astro +4 -36
- package/src/components/locale-selector/locale-selector.theme.ts +3 -11
- package/src/components/logo/RLALogo.astro +1 -2
- package/src/components/modal/RLAModal.astro +1 -1
- package/src/components/modal/RLSModal.tsx +2 -2
- package/src/components/navigation-menu/RLANavigationMenu.astro +17 -21
- package/src/components/navigation-menu/navigation-menu.theme.ts +3 -7
- package/src/components/pagination/RLAPagination.astro +2 -2
- package/src/components/pagination/pagination.theme.ts +1 -1
- package/src/components/popover/RLAPopover.astro +39 -0
- package/src/components/progress/RLAProgress.astro +2 -0
- package/src/components/progress/progress.theme.ts +0 -4
- package/src/components/scroll-area/scroll-area.theme.ts +1 -1
- package/src/components/scroll-to-top/RLAScrollToTop.astro +6 -5
- package/src/components/scroll-to-top/RLVScrollToTop.vue +7 -7
- package/src/components/scroll-to-top/scroll-to-top.theme.ts +3 -7
- package/src/components/search/RLASearch.astro +3 -3
- package/src/components/select/RLASelect.astro +96 -528
- package/src/components/select/RLSSelect.tsx +68 -14
- package/src/components/select/RLVSelect.vue +57 -0
- package/src/components/select/select.theme.ts +11 -96
- package/src/components/shortcuts/RLAShortcuts.astro +9 -9
- package/src/components/sidebar/RLASidebar.astro +3 -3
- package/src/components/slideover/RLASlideover.astro +1 -1
- package/src/components/slider/RLASlider.astro +2 -1
- package/src/components/slider/slider.theme.ts +1 -5
- package/src/components/spinner/RLASpinner.astro +2 -1
- package/src/components/spinner/spinner.theme.ts +1 -5
- package/src/components/splitter/splitter.theme.ts +1 -1
- package/src/components/stepper/RLAStepper.astro +8 -8
- package/src/components/stepper/stepper.theme.ts +6 -7
- package/src/components/steps/RLASteps.astro +3 -3
- package/src/components/switch/RLASwitch.astro +2 -1
- package/src/components/switch/switch.theme.ts +0 -4
- package/src/components/table/table.theme.ts +1 -1
- package/src/components/table-of-contents/RLATableOfContents.astro +5 -5
- package/src/components/theme-selector/RLAThemeSelector.astro +16 -14
- package/src/components/theme-selector/theme-selector.theme.ts +2 -2
- package/src/components/toast/RLAToast.astro +6 -6
- package/src/components/toast/store.ts +1 -1
- package/src/components/tooltip/tooltip.theme.ts +1 -1
- package/src/icons.raw.ts +67 -0
- package/src/icons.ts +31 -64
- package/src/index.ts +19 -18
- package/src/preset.ts +110 -108
- package/src/resolver.ts +127 -15
- package/src/shortcuts.ts +103 -84
- package/src/stores.ts +22 -0
- package/src/types.ts +27 -9
- package/src/virtual.d.ts +4 -0
- package/src/components/editor/PageEditor.vue +0 -459
- package/src/components/editor/PageMention.vue +0 -87
- package/src/components/editor/PagePropertiesEditor.vue +0 -358
- package/src/components/editor/PagePropertiesRenderer.vue +0 -285
- package/src/components/editor/PageRenderer.vue +0 -155
- package/src/components/editor/PageSurround.vue +0 -130
- package/src/components/editor/PageVersionSelector.vue +0 -371
- package/src/components/editor/blocks/AddBlockModal.vue +0 -196
- package/src/components/editor/blocks/Block.vue +0 -142
- package/src/components/editor/blocks/BlockEditRenderer.vue +0 -26
- package/src/components/editor/blocks/BlockEditor.vue +0 -141
- package/src/components/editor/blocks/BlockViewRenderer.vue +0 -71
- package/src/components/editor/blocks/TextRenderer.vue +0 -31
- package/src/components/editor/blocks/editor/CalloutBlockEditor.vue +0 -53
- package/src/components/editor/blocks/editor/ImageBlockEditor.vue +0 -55
- package/src/components/editor/blocks/editor/ParagraphBlockEditor.vue +0 -31
- package/src/components/editor/blocks/editor/SectionBlockEditor.vue +0 -65
- package/src/components/editor/blocks/nodes/LinkNode.vue +0 -28
- package/src/components/editor/blocks/nodes/TextNode.vue +0 -22
- package/src/components/editor/blocks/renderer/CalloutBlockRenderer.vue +0 -65
- package/src/components/editor/blocks/renderer/ImageBlockRenderer.vue +0 -20
- package/src/components/editor/blocks/renderer/ParagraphBlockRenderer.vue +0 -21
- package/src/components/editor/blocks/renderer/SectionBlockRenderer.vue +0 -55
- package/src/components/editor/composables/injectionKeys.ts +0 -3
- package/src/components/editor/composables/useBlockEditor.ts +0 -261
- package/src/components/editor/composables/usePageEditor.ts +0 -97
- package/src/components/editor/modals/CreatePageModal.vue +0 -160
- package/src/components/editor/modals/DeletePageModal.vue +0 -116
- package/src/components/editor/modals/PageTreeModal.vue +0 -275
- package/src/components/editor/types/blocks.ts +0 -100
- package/src/components/editor/types/pages.ts +0 -89
- package/src/components/editor/types/schemas.ts +0 -36
- package/src/components/editor/utils/blocks.ts +0 -42
- package/src/components/editor/utils/editorHelpers.ts +0 -24
- package/src/components/editor/utils/page.ts +0 -219
- package/src/components/editor/utils/richTextHelpers.ts +0 -35
- package/src/components/editor/views/PageEditView.vue +0 -195
- package/src/components/editor/views/PageLiveView.vue +0 -90
- package/src/components/editor/views/PageReviewView.vue +0 -308
- package/src/components/icon/resolver.ts +0 -23
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Rimelight Entertainment
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@ deno add npm:@rimelight/ui
|
|
|
50
50
|
bun add @rimelight/ui
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
2. Add the Rimelight UI
|
|
53
|
+
2. Add the Rimelight UI Vite plugin to your configuration:
|
|
54
54
|
|
|
55
55
|
```typescript
|
|
56
56
|
// astro.config.ts
|
|
@@ -58,18 +58,20 @@ import { ui } from "@rimelight/ui"
|
|
|
58
58
|
import { defineConfig } from "astro/config"
|
|
59
59
|
|
|
60
60
|
export default defineConfig({
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
61
|
+
vite: {
|
|
62
|
+
plugins: [
|
|
63
|
+
ui({
|
|
64
|
+
// Optional: Provide global UI overrides
|
|
65
|
+
components: {
|
|
66
|
+
themes: {
|
|
67
|
+
button: {
|
|
68
|
+
defaultVariants: { variant: "primary" }
|
|
69
|
+
}
|
|
68
70
|
}
|
|
69
71
|
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
72
|
+
})
|
|
73
|
+
]
|
|
74
|
+
}
|
|
73
75
|
})
|
|
74
76
|
```
|
|
75
77
|
|
|
@@ -110,7 +112,7 @@ For mixed usage please refer to the [Astro documentation on using front-end fram
|
|
|
110
112
|
|
|
111
113
|
<details>
|
|
112
114
|
<summary><b>Can I use Rimelight UI without Astro?</b></summary>
|
|
113
|
-
For the time being, no. The library is
|
|
115
|
+
For the time being, no. The component library itself is Astro-based (the <code>.astro</code> components require Astro's compiler), but its configuration and styling pipeline are distributed as a plain Vite plugin, so any Vite-powered project can consume the Vue/Solid components, themes, and design tokens.
|
|
114
116
|
</details>
|
|
115
117
|
|
|
116
118
|
<details>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rimelight/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.44",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Rimelight Entertainment's UI Package",
|
|
6
6
|
"homepage": "https://rimelight.com/docs",
|
|
@@ -26,25 +26,19 @@
|
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
|
-
"scripts": {
|
|
30
|
-
"astro": "astro",
|
|
31
|
-
"check": "pnpm audit --audit-level=moderate && vp check --fix && astro check"
|
|
32
|
-
},
|
|
33
29
|
"dependencies": {
|
|
34
|
-
"@unocss/
|
|
35
|
-
"
|
|
36
|
-
"nanostores": "1.5.1"
|
|
30
|
+
"@unocss/vite": "66.8.1",
|
|
31
|
+
"unocss": "66.8.1"
|
|
37
32
|
},
|
|
38
33
|
"devDependencies": {
|
|
39
34
|
"@astrojs/check": "0.9.10",
|
|
40
35
|
"@astrojs/solid-js": "7.0.2",
|
|
41
|
-
"@astrojs/ts-plugin": "1.10.
|
|
36
|
+
"@astrojs/ts-plugin": "1.10.11",
|
|
42
37
|
"@astrojs/vue": "7.0.2",
|
|
43
|
-
"@rimelight/config": "
|
|
44
|
-
"astro": "7.2.
|
|
38
|
+
"@rimelight/config": "0.0.3",
|
|
39
|
+
"astro": "7.2.7",
|
|
45
40
|
"solid-js": "1.9.15",
|
|
46
41
|
"typescript": "6.0.3",
|
|
47
|
-
"unocss": "66.7.5",
|
|
48
42
|
"vue": "3.5.41"
|
|
49
43
|
},
|
|
50
44
|
"peerDependencies": {
|
|
@@ -71,5 +65,8 @@
|
|
|
71
65
|
"engines": {
|
|
72
66
|
"node": ">=26.7.0"
|
|
73
67
|
},
|
|
74
|
-
"
|
|
75
|
-
|
|
68
|
+
"scripts": {
|
|
69
|
+
"astro": "astro",
|
|
70
|
+
"check": "vp check --fix && astro check"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -44,7 +44,7 @@ const badgeClass = badgeColor?.startsWith("bg-") ? badgeColor : `bg-${badgeColor
|
|
|
44
44
|
{avatarFallback}
|
|
45
45
|
</slot>
|
|
46
46
|
{!avatarFallback && !Astro.slots.has("fallback") && (
|
|
47
|
-
<RLAIcon name="user" class={classes.icon} aria-hidden="true" />
|
|
47
|
+
<RLAIcon name="i-rl-user" class={classes.icon} aria-hidden="true" />
|
|
48
48
|
)}
|
|
49
49
|
</span>
|
|
50
50
|
)}
|
|
@@ -62,16 +62,8 @@ const badgeClass = badgeColor?.startsWith("bg-") ? badgeColor : `bg-${badgeColor
|
|
|
62
62
|
</slot>
|
|
63
63
|
</span>
|
|
64
64
|
<div class="flex flex-col leading-tight">
|
|
65
|
-
{title &&
|
|
66
|
-
|
|
67
|
-
{title}
|
|
68
|
-
</span>
|
|
69
|
-
)}
|
|
70
|
-
{subtitle && (
|
|
71
|
-
<span class="text-xs text-muted" data-slot="subtitle">
|
|
72
|
-
{subtitle}
|
|
73
|
-
</span>
|
|
74
|
-
)}
|
|
65
|
+
{title && <span class="font-medium text-sm text-default" data-slot="title">{title}</span>}
|
|
66
|
+
{subtitle && <span class="text-xs text-muted" data-slot="subtitle">{subtitle}</span>}
|
|
75
67
|
</div>
|
|
76
68
|
</div>
|
|
77
69
|
) : (
|
|
@@ -96,7 +88,7 @@ const badgeClass = badgeColor?.startsWith("bg-") ? badgeColor : `bg-${badgeColor
|
|
|
96
88
|
{avatarFallback}
|
|
97
89
|
</slot>
|
|
98
90
|
{!avatarFallback && !Astro.slots.has("fallback") && (
|
|
99
|
-
<RLAIcon name="user" class={classes.icon} aria-hidden="true" />
|
|
91
|
+
<RLAIcon name="i-rl-user" class={classes.icon} aria-hidden="true" />
|
|
100
92
|
)}
|
|
101
93
|
</span>
|
|
102
94
|
)}
|
|
@@ -6,6 +6,7 @@ import { badgeTheme } from "./badge.theme"
|
|
|
6
6
|
const {
|
|
7
7
|
variant,
|
|
8
8
|
label,
|
|
9
|
+
theme,
|
|
9
10
|
...rest
|
|
10
11
|
} = Astro.props as BadgeProps
|
|
11
12
|
|
|
@@ -18,6 +19,6 @@ const classes = badgeTheme({
|
|
|
18
19
|
variant: resolvedVariant as "solid"
|
|
19
20
|
})
|
|
20
21
|
---
|
|
21
|
-
<span class={classes.root} data-slot="root" {...rest}>
|
|
22
|
+
<span class={classes.root} data-slot="root" data-theme={theme} {...rest}>
|
|
22
23
|
<slot>{label}</slot>
|
|
23
24
|
</span>
|
|
@@ -83,7 +83,7 @@ const storageKey = dismissId || bannerId
|
|
|
83
83
|
class:list={[
|
|
84
84
|
"inline-flex items-center justify-center gap-1 px-3 py-1 rounded-md text-xs font-semibold transition-colors no-underline cursor-pointer shrink-0",
|
|
85
85
|
action.variant === "solid" || !action.variant
|
|
86
|
-
? "bg-
|
|
86
|
+
? "bg-neutral-950 text-neutral-50 hover:opacity-90"
|
|
87
87
|
: "bg-white/20 text-white hover:bg-white/30",
|
|
88
88
|
action.class
|
|
89
89
|
]}
|
|
@@ -10,7 +10,7 @@ export const bannerTheme = defineTheme("banner", {
|
|
|
10
10
|
left: "absolute left-0 inset-y-0 flex items-center px-4 max-w-[30%] truncate",
|
|
11
11
|
center: "absolute left-1/2 -translate-x-1/2 max-w-[50%] truncate text-center",
|
|
12
12
|
side: "flex-none flex items-center gap-2",
|
|
13
|
-
actions: "flex-none flex items-center gap-
|
|
13
|
+
actions: "flex-none flex items-center gap-xs",
|
|
14
14
|
dismiss:
|
|
15
15
|
"flex-none flex items-center justify-center size-8 rounded-md hover:bg-black/10 dark:hover:bg-white/10 transition-colors cursor-pointer"
|
|
16
16
|
},
|
|
@@ -199,7 +199,7 @@ if (needsOverflow && hasMidItems) {
|
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
.rla-bc-ellipsis {
|
|
202
|
-
color: var(--
|
|
202
|
+
color: var(--rl-neutral-600);
|
|
203
203
|
letter-spacing: 0.05em;
|
|
204
204
|
font-weight: 500;
|
|
205
205
|
}
|
|
@@ -219,7 +219,7 @@ if (needsOverflow && hasMidItems) {
|
|
|
219
219
|
so we rely on the counter never being 0 when this element is visible
|
|
220
220
|
(the overflow li is only shown when --base-hidden > 0 or a container
|
|
221
221
|
query is active). */
|
|
222
|
-
color: var(--
|
|
222
|
+
color: var(--rl-neutral-600);
|
|
223
223
|
font-size: 0.6875rem;
|
|
224
224
|
font-weight: 600;
|
|
225
225
|
vertical-align: super;
|
|
@@ -23,6 +23,8 @@ const {
|
|
|
23
23
|
active = false,
|
|
24
24
|
activeColor,
|
|
25
25
|
activeVariant,
|
|
26
|
+
theme,
|
|
27
|
+
class: className,
|
|
26
28
|
...rest
|
|
27
29
|
} = Astro.props as ButtonProps
|
|
28
30
|
|
|
@@ -56,8 +58,9 @@ const Tag = (href || to) ? RLALink : "button";
|
|
|
56
58
|
const loadingAutoProps = loadingAuto ? { 'data-loading-auto': '' } : {};
|
|
57
59
|
---
|
|
58
60
|
<Tag
|
|
59
|
-
class={classes.root}
|
|
61
|
+
class={`${classes.root}${className ? ` ${className}` : ""}`}
|
|
60
62
|
data-slot="root"
|
|
63
|
+
data-theme={theme}
|
|
61
64
|
{...(Tag === RLALink ? { href, to, noExternalIcon: true, raw: true } : {})}
|
|
62
65
|
{...loadingAutoProps}
|
|
63
66
|
{...rest}
|
|
@@ -93,10 +93,6 @@ export const buttonTheme = defineTheme("button", {
|
|
|
93
93
|
active: {
|
|
94
94
|
true: { root: "" },
|
|
95
95
|
false: { root: "" }
|
|
96
|
-
},
|
|
97
|
-
theme: {
|
|
98
|
-
light: { root: "rl-light" },
|
|
99
|
-
dark: { root: "rl-dark" }
|
|
100
96
|
}
|
|
101
97
|
},
|
|
102
98
|
compoundVariants: [
|
|
@@ -104,7 +100,7 @@ export const buttonTheme = defineTheme("button", {
|
|
|
104
100
|
color: "neutral",
|
|
105
101
|
variant: "solid",
|
|
106
102
|
classNames: {
|
|
107
|
-
root: "text-inverted bg-inverted hover:bg-inverted/90 active:bg-inverted/90 disabled:bg-inverted aria-disabled:bg-inverted focus-visible:
|
|
103
|
+
root: "text-inverted bg-inverted hover:bg-inverted/90 active:bg-inverted/90 disabled:bg-inverted aria-disabled:bg-inverted focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-inverted"
|
|
108
104
|
}
|
|
109
105
|
},
|
|
110
106
|
{
|
|
@@ -14,14 +14,15 @@ const {
|
|
|
14
14
|
avatar,
|
|
15
15
|
actions,
|
|
16
16
|
close,
|
|
17
|
+
theme,
|
|
17
18
|
...rest
|
|
18
19
|
} = Astro.props as CalloutProps
|
|
19
20
|
|
|
20
21
|
const colorToIcon: Record<string, string | undefined> = {
|
|
21
|
-
error: "
|
|
22
|
-
warning: "alertTriangle",
|
|
23
|
-
info: "info",
|
|
24
|
-
success: "circleCheck",
|
|
22
|
+
error: "i-rl-circleCheck",
|
|
23
|
+
warning: "i-rl-alertTriangle",
|
|
24
|
+
info: "i-rl-info",
|
|
25
|
+
success: "i-rl-circleCheck",
|
|
25
26
|
primary: undefined,
|
|
26
27
|
secondary: undefined,
|
|
27
28
|
commentary: undefined,
|
|
@@ -45,6 +46,7 @@ const classes = calloutTheme({
|
|
|
45
46
|
class={classes.root}
|
|
46
47
|
data-slot="root"
|
|
47
48
|
role="alert"
|
|
49
|
+
data-theme={theme}
|
|
48
50
|
{...rest}
|
|
49
51
|
>
|
|
50
52
|
<slot name="icon">
|
|
@@ -81,7 +83,7 @@ const classes = calloutTheme({
|
|
|
81
83
|
<slot name="close">
|
|
82
84
|
{close && (
|
|
83
85
|
<button class={classes.close} data-slot="close">
|
|
84
|
-
<RLAIcon name="close" class="size-4" />
|
|
86
|
+
<RLAIcon name="i-rl-close" class="size-4" />
|
|
85
87
|
</button>
|
|
86
88
|
)}
|
|
87
89
|
</slot>
|
|
@@ -22,11 +22,7 @@ export const calloutTheme = defineTheme("callout", {
|
|
|
22
22
|
root: "bg-[var(--rl-bg)]/10 text-[var(--rl-text)] ring ring-inset ring-[var(--rl-border)]/25"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
|
-
color: "auto"
|
|
26
|
-
theme: {
|
|
27
|
-
light: { root: "rl-light" },
|
|
28
|
-
dark: { root: "rl-dark" }
|
|
29
|
-
}
|
|
25
|
+
color: "auto"
|
|
30
26
|
},
|
|
31
27
|
compoundVariants: [
|
|
32
28
|
{
|
|
@@ -21,13 +21,13 @@ export const cardTheme = defineTheme("card", {
|
|
|
21
21
|
description: "text-dimmed"
|
|
22
22
|
},
|
|
23
23
|
outline: {
|
|
24
|
-
root: "bg-default border border-default divide-y divide-
|
|
24
|
+
root: "bg-default border border-default divide-y divide-border"
|
|
25
25
|
},
|
|
26
26
|
soft: {
|
|
27
|
-
root: "bg-elevated/50 divide-y divide-
|
|
27
|
+
root: "bg-elevated/50 divide-y divide-border"
|
|
28
28
|
},
|
|
29
29
|
subtle: {
|
|
30
|
-
root: "bg-elevated/50 border border-default divide-y divide-
|
|
30
|
+
root: "bg-elevated/50 border border-default divide-y divide-border"
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
interactive: {
|
|
@@ -43,10 +43,10 @@ const carouselId = `rla-carousel-${Math.random().toString(36).substring(2, 9)}`
|
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
<button class={classes.buttonPrev} data-slot="prev-button" type="button" aria-label="Previous slide">
|
|
46
|
-
<RLAIcon name="chevronLeft" class="size-5" aria-hidden="true" />
|
|
46
|
+
<RLAIcon name="i-rl-chevronLeft" class="size-5" aria-hidden="true" />
|
|
47
47
|
</button>
|
|
48
48
|
<button class={classes.buttonNext} data-slot="next-button" type="button" aria-label="Next slide">
|
|
49
|
-
<RLAIcon name="chevronRight" class="size-5" aria-hidden="true" />
|
|
49
|
+
<RLAIcon name="i-rl-chevronRight" class="size-5" aria-hidden="true" />
|
|
50
50
|
</button>
|
|
51
51
|
</div>
|
|
52
52
|
</rla-carousel>
|
|
@@ -16,11 +16,11 @@ export const carouselTheme = defineTheme("carousel", {
|
|
|
16
16
|
"opacity-0 scale-90 group-hover/carousel:opacity-100 group-hover/carousel:scale-100"
|
|
17
17
|
],
|
|
18
18
|
dots: "absolute bottom-4 left-1/2 -translate-x-1/2 z-10 flex gap-1.5 items-center",
|
|
19
|
-
dot: "block size-2 rounded-full bg-
|
|
19
|
+
dot: "block size-2 rounded-full bg-neutral-950/20 cursor-pointer transition-all duration-350 hover:bg-neutral-950/45"
|
|
20
20
|
},
|
|
21
21
|
variants: {
|
|
22
22
|
active: {
|
|
23
|
-
true: { dot: "bg-
|
|
23
|
+
true: { dot: "bg-neutral-950 size-2.5" },
|
|
24
24
|
false: { dot: "" }
|
|
25
25
|
}
|
|
26
26
|
},
|
|
@@ -181,7 +181,7 @@ const id = `chart-${Math.random().toString(36).substring(2, 9)}`
|
|
|
181
181
|
)
|
|
182
182
|
})}
|
|
183
183
|
{type === "donut" && (
|
|
184
|
-
<circle cx={PIE_CX} cy={PIE_CY} r={DONUT_INNER_R} fill="var(--
|
|
184
|
+
<circle cx={PIE_CX} cy={PIE_CY} r={DONUT_INNER_R} fill="var(--rl-neutral-50)" />
|
|
185
185
|
)}
|
|
186
186
|
</svg>
|
|
187
187
|
|
|
@@ -10,12 +10,13 @@ const {
|
|
|
10
10
|
name,
|
|
11
11
|
label,
|
|
12
12
|
size = "md",
|
|
13
|
+
theme,
|
|
13
14
|
...rest
|
|
14
15
|
} = Astro.props as CheckboxProps
|
|
15
16
|
|
|
16
17
|
const classes = checkboxTheme(Astro.props);
|
|
17
18
|
---
|
|
18
|
-
<label class={classes.root} data-slot="root">
|
|
19
|
+
<label class={classes.root} data-slot="root" data-theme={theme}>
|
|
19
20
|
<input
|
|
20
21
|
type="checkbox"
|
|
21
22
|
class={classes.input}
|
|
@@ -8,6 +8,7 @@ const {
|
|
|
8
8
|
text,
|
|
9
9
|
standalone = false,
|
|
10
10
|
show = true,
|
|
11
|
+
theme,
|
|
11
12
|
...rest
|
|
12
13
|
} = Astro.props as ChipProps
|
|
13
14
|
|
|
@@ -22,7 +23,7 @@ const classes = chipTheme(Astro.props)
|
|
|
22
23
|
</span>
|
|
23
24
|
)
|
|
24
25
|
) : (
|
|
25
|
-
<div class={classes.root} data-slot="root" {...rest}>
|
|
26
|
+
<div class={classes.root} data-slot="root" data-theme={theme} {...rest}>
|
|
26
27
|
<slot />
|
|
27
28
|
{show && (
|
|
28
29
|
<span class={classes.base} data-slot="base">
|
|
@@ -21,7 +21,7 @@ const classes = collapsibleTheme(Astro.props);
|
|
|
21
21
|
{icon && <span class={icon} />}
|
|
22
22
|
{label}
|
|
23
23
|
</span>
|
|
24
|
-
<RLAIcon name="chevronDown" class="transition-transform duration-200 group-open:rotate-180" />
|
|
24
|
+
<RLAIcon name="i-rl-chevronDown" class="transition-transform duration-200 group-open:rotate-180" />
|
|
25
25
|
</slot>
|
|
26
26
|
</summary>
|
|
27
27
|
<div class={classes.content} data-slot="content">
|
|
@@ -9,11 +9,7 @@ export const colorAreaTheme = defineTheme("color-area", {
|
|
|
9
9
|
"absolute block size-4 rounded-full border-2 border-white shadow-md -translate-x-1/2 -translate-y-1/2 cursor-grab active:cursor-grabbing focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--rl-ring)]/50"
|
|
10
10
|
},
|
|
11
11
|
variants: {
|
|
12
|
-
color: "auto"
|
|
13
|
-
theme: {
|
|
14
|
-
light: { root: "rl-light" },
|
|
15
|
-
dark: { root: "rl-dark" }
|
|
16
|
-
}
|
|
12
|
+
color: "auto"
|
|
17
13
|
},
|
|
18
14
|
defaultVariants: {
|
|
19
15
|
color: "primary"
|
|
@@ -51,6 +51,7 @@ const initialValue = modelValue || defaultValue
|
|
|
51
51
|
data-disable-wheel={disableWheelChange ? "true" : "false"}
|
|
52
52
|
data-readonly={readonly ? "true" : "false"}
|
|
53
53
|
data-step={step}
|
|
54
|
+
data-theme={theme}
|
|
54
55
|
{...rest}
|
|
55
56
|
>
|
|
56
57
|
<div class={classes.root} data-slot="root">
|
|
@@ -8,11 +8,7 @@ export const colorFieldTheme = defineTheme("color-field", {
|
|
|
8
8
|
"w-full bg-transparent border-0 p-0 text-sm focus:outline-none focus:ring-0 text-highlighted placeholder-muted-foreground"
|
|
9
9
|
},
|
|
10
10
|
variants: {
|
|
11
|
-
color: "auto"
|
|
12
|
-
theme: {
|
|
13
|
-
light: { root: "rl-light" },
|
|
14
|
-
dark: { root: "rl-dark" }
|
|
15
|
-
}
|
|
11
|
+
color: "auto"
|
|
16
12
|
},
|
|
17
13
|
defaultVariants: {
|
|
18
14
|
color: "primary"
|
|
@@ -49,6 +49,7 @@ const initialValue = modelValue || defaultValue
|
|
|
49
49
|
data-orientation={orientation}
|
|
50
50
|
data-inverted={inverted ? "true" : "false"}
|
|
51
51
|
data-step={step}
|
|
52
|
+
data-theme={theme}
|
|
52
53
|
{...rest}
|
|
53
54
|
>
|
|
54
55
|
<div class={classes.root} data-slot="root" data-orientation={orientation}>
|
|
@@ -10,11 +10,7 @@ export const colorSliderTheme = defineTheme("color-slider", {
|
|
|
10
10
|
"absolute block size-5 rounded-full border-2 border-white shadow-md cursor-grab active:cursor-grabbing focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--rl-ring)]/50"
|
|
11
11
|
},
|
|
12
12
|
variants: {
|
|
13
|
-
color: "auto"
|
|
14
|
-
theme: {
|
|
15
|
-
light: { root: "rl-light" },
|
|
16
|
-
dark: { root: "rl-dark" }
|
|
17
|
-
}
|
|
13
|
+
color: "auto"
|
|
18
14
|
},
|
|
19
15
|
defaultVariants: {
|
|
20
16
|
color: "primary"
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { DashboardGroupProps } from "./dashboard-group"
|
|
3
3
|
import { dashboardGroupTheme } from "./dashboard-group.theme"
|
|
4
|
-
|
|
5
|
-
|
|
6
4
|
const {
|
|
7
|
-
as
|
|
5
|
+
as = "div",
|
|
6
|
+
class: className,
|
|
8
7
|
...rest
|
|
9
|
-
} = Astro.props as DashboardGroupProps
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
} = Astro.props as DashboardGroupProps
|
|
12
9
|
|
|
10
|
+
const Tag = as;
|
|
13
11
|
const classes = dashboardGroupTheme(Astro.props);
|
|
14
12
|
---
|
|
15
|
-
<Tag class={classes.root} data-slot="root" {...rest}>
|
|
13
|
+
<Tag class:list={[classes.root]} data-slot="root" {...rest}>
|
|
16
14
|
<slot />
|
|
17
15
|
</Tag>
|
|
@@ -3,7 +3,7 @@ import { defineTheme } from "../../resolver"
|
|
|
3
3
|
export const dashboardGroupTheme = defineTheme("dashboard-group", {
|
|
4
4
|
slots: ["root"],
|
|
5
5
|
base: {
|
|
6
|
-
root: "relative w-full h-full min-h-0 flex overflow-hidden"
|
|
6
|
+
root: "relative w-full h-full min-h-0 flex flex-row overflow-hidden"
|
|
7
7
|
},
|
|
8
8
|
variants: {},
|
|
9
9
|
defaultVariants: {}
|
|
@@ -5,20 +5,20 @@ import RLAIcon from "../icon/RLAIcon.astro"
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
const {
|
|
8
|
-
as
|
|
8
|
+
as = "header",
|
|
9
9
|
icon,
|
|
10
10
|
title,
|
|
11
11
|
toggle = true,
|
|
12
12
|
toggleSide = "left",
|
|
13
|
+
class: className,
|
|
13
14
|
...rest
|
|
14
15
|
} = Astro.props as DashboardNavbarProps
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
const Tag = as;
|
|
18
18
|
const classes = dashboardNavbarTheme(Astro.props);
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
-
<Tag class={classes.root} data-slot="root" {...rest}>
|
|
21
|
+
<Tag class:list={[classes.root]} data-slot="root" style="height: 4rem; min-height: 4rem; padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; box-sizing: border-box;" {...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">
|
|
@@ -3,10 +3,10 @@ import { defineTheme } from "../../resolver"
|
|
|
3
3
|
export const dashboardNavbarTheme = defineTheme("dashboard-navbar", {
|
|
4
4
|
slots: ["root", "left", "icon", "title", "center", "right", "toggle"],
|
|
5
5
|
base: {
|
|
6
|
-
root: "h-
|
|
7
|
-
left: "flex items-center gap-
|
|
6
|
+
root: "h-16 min-h-16 shrink-0 flex items-center justify-between border-b border-default px-6 py-4 gap-3",
|
|
7
|
+
left: "flex items-center gap-3 min-w-0 h-full",
|
|
8
8
|
icon: "shrink-0 size-5 self-center me-1.5",
|
|
9
|
-
title: "flex items-center gap-
|
|
9
|
+
title: "flex items-center gap-2 font-semibold text-highlighted truncate text-lg",
|
|
10
10
|
center: "hidden lg:flex",
|
|
11
11
|
right: "flex items-center shrink-0 gap-1.5",
|
|
12
12
|
toggle: ""
|
|
@@ -5,6 +5,7 @@ import { dashboardPanelTheme } from "./dashboard-panel.theme"
|
|
|
5
5
|
|
|
6
6
|
const {
|
|
7
7
|
resizable = false,
|
|
8
|
+
class: className,
|
|
8
9
|
...rest
|
|
9
10
|
} = Astro.props as DashboardPanelProps
|
|
10
11
|
|
|
@@ -13,16 +14,16 @@ const classes = dashboardPanelTheme({
|
|
|
13
14
|
size: false
|
|
14
15
|
});
|
|
15
16
|
---
|
|
16
|
-
<div class={classes.root} data-slot="root" {...rest}>
|
|
17
|
-
<slot
|
|
18
|
-
<slot name="header" />
|
|
17
|
+
<div class={classes.root} data-slot="root" style="flex: 1 1 0%; min-width: 0;" {...rest}>
|
|
18
|
+
<slot name="header" />
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
<div data-slot="body" class={classes.body}>
|
|
21
|
+
<slot name="body">
|
|
22
|
+
<slot />
|
|
23
|
+
</slot>
|
|
24
|
+
</div>
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
</slot>
|
|
26
|
+
<slot name="footer" />
|
|
26
27
|
</div>
|
|
27
28
|
|
|
28
29
|
{resizable && (
|