@rimelight/ui 0.0.46 → 0.0.47
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/icons-DPnFQCts.d.mts +72 -0
- package/dist/icons.d.mts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/preset.d.mts +1 -1
- package/dist/resolver.d.mts +1 -1
- package/dist/{types-DqAgCNcm.d.mts → types-DWmKMcYC.d.mts} +1 -1
- package/dist/types.d.mts +1 -1
- package/package.json +2 -2
- package/src/components/banner/RLABanner.astro +1 -1
- package/src/components/button/RLSButton.tsx +14 -8
- package/src/components/dashboard-sidebar/RLADashboardSidebar.astro +4 -4
- package/src/components/dropdown-menu/RLADropdownMenu.astro +1 -1
- package/src/components/file-upload/RLAFileUpload.astro +1 -1
- package/src/components/header/HeaderLayer.astro +1 -1
- package/src/components/input-menu/RLAInputMenu.astro +3 -3
- package/src/components/input-rating/RLAInputRating.astro +8 -8
- package/src/components/layout-grid/RLALayoutGrid.astro +29 -29
- package/src/components/link/RLALink.astro +5 -5
- package/src/components/link/RLSLink.tsx +4 -4
- package/src/components/locale-selector/RLALocaleSelector.astro +109 -102
- package/src/components/locale-selector/locale-selector.ts +2 -7
- package/src/components/logo/RLALogo.astro +88 -102
- package/src/components/navigation-menu/RLANavigationMenu.astro +6 -6
- package/src/components/popover/RLAPopover.astro +2 -2
- package/src/components/scroll-area/RLAScrollArea.astro +1 -1
- package/src/components/scroll-to-top/RLAScrollToTop.astro +4 -4
- package/src/components/search/RLASearch.astro +6 -6
- package/src/components/shortcuts/RLAShortcuts.astro +2 -2
- package/src/components/sidebar/RLASidebar.astro +1 -1
- package/src/components/splitter/RLASplitter.astro +1 -1
- package/src/components/stepper/RLAStepper.astro +9 -9
- package/src/components/table/RLATable.astro +1 -1
- package/src/components/tabs/RLATabs.astro +8 -8
- package/src/components/toast/RLAToast.astro +2 -2
- package/dist/icons--RzV1RTU.d.mts +0 -72
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
//#region src/icons.raw.d.ts
|
|
2
|
+
declare const svg: (inner: string) => string;
|
|
3
|
+
declare const ICONS: {
|
|
4
|
+
readonly alertTriangle: "<path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z\"/><path d=\"M12 9v4M12 17h.01\"/>";
|
|
5
|
+
readonly alignLeft: "<line x1=\"21\" x2=\"3\" y1=\"6\" y2=\"6\"/><line x1=\"15\" x2=\"3\" y1=\"12\" y2=\"12\"/><line x1=\"17\" x2=\"3\" y1=\"18\" y2=\"18\"/>";
|
|
6
|
+
readonly arrowLeft: "<path d=\"M19 12H5M12 19l-7-7 7-7\"/>";
|
|
7
|
+
readonly arrowRight: "<path d=\"M5 12h14M12 5l7 7-7 7\"/>";
|
|
8
|
+
readonly bell: "<path d=\"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9M10.3 21a1.94 1.94 0 0 0 3.4 0\"/>";
|
|
9
|
+
readonly check: "<path d=\"M20 6 9 17l-5-5\"/>";
|
|
10
|
+
readonly chevronDown: "<path d=\"m6 9 6 6 6-6\"/>";
|
|
11
|
+
readonly chevronLeft: "<path d=\"m15 18-6-6 6-6\"/>";
|
|
12
|
+
readonly chevronRight: "<path d=\"m9 18 6-6-6-6\"/>";
|
|
13
|
+
readonly chevronsUpDown: "<path d=\"m7 15 5 5 5-5M7 9l5-5 5 5\"/>";
|
|
14
|
+
readonly circleCheck: "<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"m9 12 2 2 4-4\"/>";
|
|
15
|
+
readonly circleX: "<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"m15 9-6 6M9 9l6 6\"/>";
|
|
16
|
+
readonly close: "<path d=\"M18 6 6 18M6 6l12 12\"/>";
|
|
17
|
+
readonly copy: "<rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\"/><path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"/>";
|
|
18
|
+
readonly download: "<path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3\"/>";
|
|
19
|
+
readonly externalLink: "<path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6M15 3h6v6M10 14 21 3\"/>";
|
|
20
|
+
readonly fileQuestion: "<path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\"/><path d=\"M14 2v4a2 2 0 0 0 2 2h4M9.1 11.8a3 3 0 0 1 5.8 1c0 .9-.6 1.4-1.1 1.8-.4.3-.8.7-.8 1.4M12 19h.01\"/>";
|
|
21
|
+
readonly gripHorizontal: "<circle cx=\"12\" cy=\"9\" r=\"1\"/><circle cx=\"19\" cy=\"9\" r=\"1\"/><circle cx=\"5\" cy=\"9\" r=\"1\"/><circle cx=\"12\" cy=\"15\" r=\"1\"/><circle cx=\"19\" cy=\"15\" r=\"1\"/><circle cx=\"5\" cy=\"15\" r=\"1\"/>";
|
|
22
|
+
readonly gripVertical: "<circle cx=\"9\" cy=\"12\" r=\"1\"/><circle cx=\"9\" cy=\"5\" r=\"1\"/><circle cx=\"9\" cy=\"19\" r=\"1\"/><circle cx=\"15\" cy=\"12\" r=\"1\"/><circle cx=\"15\" cy=\"5\" r=\"1\"/><circle cx=\"15\" cy=\"19\" r=\"1\"/>";
|
|
23
|
+
readonly hardDrive: "<rect width=\"20\" height=\"8\" x=\"2\" y=\"14\" rx=\"2\"/><path d=\"M6 18h.01M10 18h.01M2 14L5 3h14l3 11\"/>";
|
|
24
|
+
readonly image: "<rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" ry=\"2\"/><circle cx=\"9\" cy=\"9\" r=\"2\"/><path d=\"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21\"/>";
|
|
25
|
+
readonly imageUpscale: "<path d=\"M16 3H3v13h13V3z\"/><path d=\"M21 21v-4a2 2 0 0 0-2-2h-3M21 11V9M21 5a2 2 0 0 0-2-2h-1\"/>";
|
|
26
|
+
readonly info: "<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 16v-4M12 8h.01\"/>";
|
|
27
|
+
readonly layers: "<path d=\"m12 3-10 5L12 13l10-5-10-5Z\"/><path d=\"M2 17l10 5 10-5M2 12l10 5 10-5\"/>";
|
|
28
|
+
readonly list: "<line x1=\"8\" x2=\"21\" y1=\"6\" y2=\"6\"/><line x1=\"8\" x2=\"21\" y1=\"12\" y2=\"12\"/><line x1=\"8\" x2=\"21\" y1=\"18\" y2=\"18\"/><line x1=\"3\" x2=\"3.01\" y1=\"6\" y2=\"6\"/><line x1=\"3\" x2=\"3.01\" y1=\"12\" y2=\"12\"/><line x1=\"3\" x2=\"3.01\" y1=\"18\" y2=\"18\"/>";
|
|
29
|
+
readonly loaderCircle: "<path d=\"M21 12a9 9 0 1 1-6.219-8.56\"/>";
|
|
30
|
+
readonly moon: "<path d=\"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z\"/>";
|
|
31
|
+
readonly panelLeft: "<rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" ry=\"2\"/><path d=\"M9 3v18\"/>";
|
|
32
|
+
readonly play: "<polygon points=\"6 3 20 12 6 21 6 3\"/>";
|
|
33
|
+
readonly quote: "<path d=\"M3 21c3 0 7-1 7-8V5c0-1.25-.75-2-2-2H4c-1.25 0-2 .75-2 2v6c0 1.25.75 2 2 2h3c0 4-3 6-3 6Zm11 0c3 0 7-1 7-8V5c0-1.25-.75-2-2-2h-4c-1.25 0-2 .75-2 2v6c0 1.25.75 2 2 2h3c0 4-3 6-3 6Z\"/>";
|
|
34
|
+
readonly search: "<circle cx=\"11\" cy=\"11\" r=\"8\"/><path d=\"m21 21-4.3-4.3\"/>";
|
|
35
|
+
readonly share: "<circle cx=\"18\" cy=\"5\" r=\"3\"/><circle cx=\"6\" cy=\"12\" r=\"3\"/><circle cx=\"18\" cy=\"19\" r=\"3\"/><path d=\"m8.59 13.51 6.83 3.98M15.41 6.51l-6.82 3.98\"/>";
|
|
36
|
+
readonly sun: "<circle cx=\"12\" cy=\"12\" r=\"4\"/><path d=\"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41\"/>";
|
|
37
|
+
readonly uploadCloud: "<path d=\"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242M12 12v9M9 15l3-3 3 3\"/>";
|
|
38
|
+
readonly user: "<path d=\"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2\"/><circle cx=\"12\" cy=\"7\" r=\"4\"/>";
|
|
39
|
+
readonly star: "<polygon points=\"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2\"/>";
|
|
40
|
+
readonly lock: "<rect width=\"18\" height=\"11\" x=\"3\" y=\"11\" rx=\"2\" ry=\"2\"/><path d=\"M7 11V7a5 5 0 0 1 10 0v4\"/>";
|
|
41
|
+
readonly eye: "<path d=\"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0z\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/>";
|
|
42
|
+
readonly eyeOff: "<path d=\"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49\"/><path d=\"M14.084 14.158a3 3 0 0 1-4.242-4.242\"/><path d=\"M17.479 17.499A10.75 10.75 0 0 1 2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.225-4.22\"/><line x1=\"2\" x2=\"22\" y1=\"2\" y2=\"22\"/>";
|
|
43
|
+
readonly arrowUp: "<path d=\"M12 19V5M5 12l7-7 7 7\"/>";
|
|
44
|
+
readonly arrowDown: "<path d=\"M12 5v14M19 12l-7 7-7-7\"/>";
|
|
45
|
+
readonly edit: "<path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"/><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"/>";
|
|
46
|
+
readonly link: "<path d=\"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\"/><path d=\"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\"/>";
|
|
47
|
+
readonly plus: "<path d=\"M5 12h14M12 5v14\"/>";
|
|
48
|
+
readonly trash: "<path d=\"M3 6h18M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6M10 11v6M14 11v6\"/><path d=\"M9 6V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2\"/>";
|
|
49
|
+
readonly fileText: "<path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\"/><path d=\"M14 2v4a2 2 0 0 0 2 2h4\"/><path d=\"M10 9H8M16 13H8M16 17H8\"/>";
|
|
50
|
+
readonly settings: "<path d=\"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/>";
|
|
51
|
+
readonly type: "<polyline points=\"4 7 4 4 20 4 20 7\"/><line x1=\"9\" x2=\"15\" y1=\"20\" y2=\"20\"/><line x1=\"12\" x2=\"12\" y1=\"4\" y2=\"20\"/>";
|
|
52
|
+
readonly code: "<polyline points=\"16 18 22 12 16 6\"/><polyline points=\"8 6 2 12 8 18\"/>";
|
|
53
|
+
readonly film: "<rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\"/><path d=\"M7 3v18M17 3v18M3 7h4M17 7h4M3 12h18M3 17h4M17 17h4\"/>";
|
|
54
|
+
readonly messageSquare: "<path d=\"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z\"/>";
|
|
55
|
+
readonly bookOpen: "<path d=\"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z\"/><path d=\"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z\"/>";
|
|
56
|
+
readonly panelRight: "<rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" ry=\"2\"/><path d=\"M15 3v18\"/>";
|
|
57
|
+
readonly pin: "<path d=\"M12 17v5\"/><path d=\"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z\"/>";
|
|
58
|
+
readonly ellipsisVertical: "<circle cx=\"12\" cy=\"12\" r=\"1\"/><circle cx=\"12\" cy=\"5\" r=\"1\"/><circle cx=\"12\" cy=\"19\" r=\"1\"/>";
|
|
59
|
+
readonly arrowUpFromLine: "<path d=\"m18 9-6-6-6 6\"/><path d=\"M12 3v14\"/><path d=\"M5 21h14\"/>";
|
|
60
|
+
readonly arrowDownToLine: "<path d=\"M12 17V3\"/><path d=\"m6 11 6 6 6-6\"/><path d=\"M5 21h14\"/>";
|
|
61
|
+
};
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/icons.d.ts
|
|
64
|
+
declare const getSvgIcon: (k: string) => string;
|
|
65
|
+
declare const DEFAULT_ICONS: Record<keyof typeof ICONS, string>;
|
|
66
|
+
type RimelightIcons = Partial<Record<keyof typeof ICONS | (string & {}), string>>;
|
|
67
|
+
declare const resolveIcon: (name?: string, custom?: string) => {
|
|
68
|
+
isClass: boolean;
|
|
69
|
+
content: string;
|
|
70
|
+
};
|
|
71
|
+
//#endregion
|
|
72
|
+
export { ICONS as a, resolveIcon as i, RimelightIcons as n, svg as o, getSvgIcon as r, DEFAULT_ICONS as t };
|
package/dist/icons.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ICONS, i as resolveIcon, n as RimelightIcons, o as svg, r as getSvgIcon, t as DEFAULT_ICONS } from "./icons
|
|
1
|
+
import { a as ICONS, i as resolveIcon, n as RimelightIcons, o as svg, r as getSvgIcon, t as DEFAULT_ICONS } from "./icons-DPnFQCts.mjs";
|
|
2
2
|
export { DEFAULT_ICONS, ICONS, RimelightIcons, getSvgIcon, resolveIcon, svg };
|
package/dist/index.d.mts
CHANGED
package/dist/preset.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { l as PALETTES, u as rimelightUiPreset } from "./types-
|
|
1
|
+
import { l as PALETTES, u as rimelightUiPreset } from "./types-DWmKMcYC.mjs";
|
|
2
2
|
export { PALETTES, rimelightUiPreset as default };
|
package/dist/resolver.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ClassValue, s as ThemeConfig } from "./types-
|
|
1
|
+
import { n as ClassValue, s as ThemeConfig } from "./types-DWmKMcYC.mjs";
|
|
2
2
|
//#region src/resolver.d.ts
|
|
3
3
|
declare function cx(...args: ClassValue[]): string;
|
|
4
4
|
declare function defineTheme<const S extends string>(name: string, themeConfig: ThemeConfig<S>): (props?: any) => Record<S, string>;
|
package/dist/types.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as Theme, c as UIConfig, i as PresetOptions, n as ClassValue, o as ThemeColor, r as ColorModeInput, s as ThemeConfig, t as BuiltinThemeColor } from "./types-
|
|
1
|
+
import { a as Theme, c as UIConfig, i as PresetOptions, n as ClassValue, o as ThemeColor, r as ColorModeInput, s as ThemeConfig, t as BuiltinThemeColor } from "./types-DWmKMcYC.mjs";
|
|
2
2
|
export { BuiltinThemeColor, ClassValue, ColorModeInput, PresetOptions, Theme, ThemeColor, ThemeConfig, UIConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rimelight/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.47",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Rimelight Entertainment's UI Package",
|
|
6
6
|
"homepage": "https://rimelight.com/docs",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@astrojs/solid-js": "7.0.2",
|
|
64
64
|
"@astrojs/ts-plugin": "1.10.11",
|
|
65
65
|
"@astrojs/vue": "7.0.2",
|
|
66
|
-
"@rimelight/config": "0.0.
|
|
66
|
+
"@rimelight/config": "0.0.5",
|
|
67
67
|
"astro": "7.3.1",
|
|
68
68
|
"solid-js": "1.9.15",
|
|
69
69
|
"typescript": "6.0.3",
|
|
@@ -21,7 +21,7 @@ const classes = bannerTheme({
|
|
|
21
21
|
sticky: fixed ? false : sticky
|
|
22
22
|
})
|
|
23
23
|
|
|
24
|
-
const bannerId = (rest
|
|
24
|
+
const bannerId = (rest["id"] as string) || `rla-banner-${Math.random().toString(36).slice(2, 8)}`
|
|
25
25
|
const storageKey = dismissId || bannerId
|
|
26
26
|
---
|
|
27
27
|
|
|
@@ -92,7 +92,7 @@ const RLSButton: Component<RLSButtonProps> = (allProps) => {
|
|
|
92
92
|
href={props.href}
|
|
93
93
|
target={props.target}
|
|
94
94
|
rel={props.rel || undefined}
|
|
95
|
-
class={classes()
|
|
95
|
+
class={classes()["root"]}
|
|
96
96
|
data-slot="root"
|
|
97
97
|
aria-label={props.ariaLabel}
|
|
98
98
|
aria-disabled={props.disabled ? "true" : undefined}
|
|
@@ -102,7 +102,10 @@ const RLSButton: Component<RLSButtonProps> = (allProps) => {
|
|
|
102
102
|
{props.leading ? (
|
|
103
103
|
props.leading
|
|
104
104
|
) : isLeading() && showLeadingIcon() ? (
|
|
105
|
-
<span
|
|
105
|
+
<span
|
|
106
|
+
class={`${classes()["leadingIcon"]} ${leadingIconClass()}`}
|
|
107
|
+
data-slot="leading-icon"
|
|
108
|
+
>
|
|
106
109
|
<RLSIcon name={showLeadingIcon()!} size={props.size ?? "md"} aria-hidden="true" />
|
|
107
110
|
</span>
|
|
108
111
|
) : null}
|
|
@@ -110,7 +113,7 @@ const RLSButton: Component<RLSButtonProps> = (allProps) => {
|
|
|
110
113
|
{props.children !== undefined && props.children !== null ? (
|
|
111
114
|
props.children
|
|
112
115
|
) : props.label !== undefined && props.label !== null ? (
|
|
113
|
-
<span class={classes()
|
|
116
|
+
<span class={classes()["label"]} data-slot="label">
|
|
114
117
|
{props.label}
|
|
115
118
|
</span>
|
|
116
119
|
) : null}
|
|
@@ -119,7 +122,7 @@ const RLSButton: Component<RLSButtonProps> = (allProps) => {
|
|
|
119
122
|
props.trailing
|
|
120
123
|
) : isTrailing() && showTrailingIcon() ? (
|
|
121
124
|
<span
|
|
122
|
-
class={`${classes()
|
|
125
|
+
class={`${classes()["trailingIcon"]} ${trailingIconClass()}`}
|
|
123
126
|
data-slot="trailing-icon"
|
|
124
127
|
>
|
|
125
128
|
<RLSIcon name={showTrailingIcon()!} size={props.size ?? "md"} aria-hidden="true" />
|
|
@@ -133,7 +136,7 @@ const RLSButton: Component<RLSButtonProps> = (allProps) => {
|
|
|
133
136
|
<button
|
|
134
137
|
type={props.type || "button"}
|
|
135
138
|
disabled={props.disabled}
|
|
136
|
-
class={classes()
|
|
139
|
+
class={classes()["root"]}
|
|
137
140
|
data-slot="root"
|
|
138
141
|
aria-label={props.ariaLabel}
|
|
139
142
|
onClick={props.onClick}
|
|
@@ -142,7 +145,7 @@ const RLSButton: Component<RLSButtonProps> = (allProps) => {
|
|
|
142
145
|
{props.leading ? (
|
|
143
146
|
props.leading
|
|
144
147
|
) : isLeading() && showLeadingIcon() ? (
|
|
145
|
-
<span class={`${classes()
|
|
148
|
+
<span class={`${classes()["leadingIcon"]} ${leadingIconClass()}`} data-slot="leading-icon">
|
|
146
149
|
<RLSIcon name={showLeadingIcon()!} size={props.size ?? "md"} aria-hidden="true" />
|
|
147
150
|
</span>
|
|
148
151
|
) : null}
|
|
@@ -150,7 +153,7 @@ const RLSButton: Component<RLSButtonProps> = (allProps) => {
|
|
|
150
153
|
{props.children !== undefined && props.children !== null ? (
|
|
151
154
|
props.children
|
|
152
155
|
) : props.label !== undefined && props.label !== null ? (
|
|
153
|
-
<span class={classes()
|
|
156
|
+
<span class={classes()["label"]} data-slot="label">
|
|
154
157
|
{props.label}
|
|
155
158
|
</span>
|
|
156
159
|
) : null}
|
|
@@ -158,7 +161,10 @@ const RLSButton: Component<RLSButtonProps> = (allProps) => {
|
|
|
158
161
|
{props.trailing ? (
|
|
159
162
|
props.trailing
|
|
160
163
|
) : isTrailing() && showTrailingIcon() ? (
|
|
161
|
-
<span
|
|
164
|
+
<span
|
|
165
|
+
class={`${classes()["trailingIcon"]} ${trailingIconClass()}`}
|
|
166
|
+
data-slot="trailing-icon"
|
|
167
|
+
>
|
|
162
168
|
<RLSIcon name={showTrailingIcon()!} size={props.size ?? "md"} aria-hidden="true" />
|
|
163
169
|
</span>
|
|
164
170
|
) : null}
|
|
@@ -62,7 +62,7 @@ const classes = dashboardSidebarTheme({
|
|
|
62
62
|
const sidebar = document.querySelector<HTMLElement>('[data-dashboard-sidebar]');
|
|
63
63
|
if (!sidebar) return;
|
|
64
64
|
|
|
65
|
-
const collapsible = sidebar.dataset
|
|
65
|
+
const collapsible = sidebar.dataset["collapsible"] === 'true';
|
|
66
66
|
const mobilePanel = document.querySelector<HTMLElement>('[data-dashboard-sidebar-mobile]');
|
|
67
67
|
const overlay = document.querySelector<HTMLElement>('[data-dashboard-sidebar-overlay]');
|
|
68
68
|
|
|
@@ -91,8 +91,8 @@ const classes = dashboardSidebarTheme({
|
|
|
91
91
|
|
|
92
92
|
const collapseSidebar = (val?: boolean) => {
|
|
93
93
|
if (!collapsible) return;
|
|
94
|
-
const isCollapsed = val !== undefined ? val : sidebar.dataset
|
|
95
|
-
sidebar.dataset
|
|
94
|
+
const isCollapsed = val !== undefined ? val : sidebar.dataset["collapsed"] !== 'true';
|
|
95
|
+
sidebar.dataset["collapsed"] = isCollapsed ? 'true' : 'false';
|
|
96
96
|
sidebar.setAttribute('data-collapsed', isCollapsed ? 'true' : 'false');
|
|
97
97
|
|
|
98
98
|
document.querySelectorAll('[data-dashboard-toggle="collapse"]').forEach(btn => {
|
|
@@ -109,7 +109,7 @@ const classes = dashboardSidebarTheme({
|
|
|
109
109
|
// Toggle buttons (mobile drawer + collapse)
|
|
110
110
|
const toggle = target.closest<HTMLElement>('[data-dashboard-toggle]');
|
|
111
111
|
if (toggle) {
|
|
112
|
-
const side = toggle.dataset
|
|
112
|
+
const side = toggle.dataset["dashboardToggle"];
|
|
113
113
|
if (side === 'mobile') toggleMobile();
|
|
114
114
|
if (side === 'collapse') collapseSidebar();
|
|
115
115
|
return;
|
|
@@ -80,7 +80,7 @@ const itemGroups: DropdownMenuItem[][] = Array.isArray(items) && items.length >
|
|
|
80
80
|
data-slot="item"
|
|
81
81
|
data-dropdown-item
|
|
82
82
|
data-item-type={item.type}
|
|
83
|
-
data-item-id={item
|
|
83
|
+
data-item-id={item["id"] || item["label"]}
|
|
84
84
|
data-item-action={item.label}
|
|
85
85
|
disabled={item.disabled}
|
|
86
86
|
>
|
|
@@ -79,7 +79,7 @@ const inputId = `fileUpload-${Math.random().toString(36).slice(2, 9)}`
|
|
|
79
79
|
const fileList = zone.querySelector("[data-fileUpload-filelist]") as HTMLElement | null;
|
|
80
80
|
if (!input) return;
|
|
81
81
|
|
|
82
|
-
const isDisabled = zone.dataset
|
|
82
|
+
const isDisabled = zone.dataset["disabled"] === "true";
|
|
83
83
|
if (isDisabled) return;
|
|
84
84
|
|
|
85
85
|
const showFiles = (files: FileList | null) => {
|
|
@@ -39,7 +39,7 @@ const classes = theme({
|
|
|
39
39
|
})
|
|
40
40
|
|
|
41
41
|
const isBanner = layerType === "banner"
|
|
42
|
-
const layerId = rest
|
|
42
|
+
const layerId = rest["id"] || `rla-${componentName}-${Math.random().toString(36).slice(2, 8)}`
|
|
43
43
|
---
|
|
44
44
|
|
|
45
45
|
<Tag
|
|
@@ -100,7 +100,7 @@ const initialLabel = selectedItem ? selectedItem.label : ""
|
|
|
100
100
|
const onSearchInput = (e: Event) => {
|
|
101
101
|
const q = (e.target as HTMLInputElement).value.toLowerCase();
|
|
102
102
|
items.forEach(item => {
|
|
103
|
-
const label = (item as HTMLElement).dataset
|
|
103
|
+
const label = (item as HTMLElement).dataset["label"]?.toLowerCase() || "";
|
|
104
104
|
if (label.includes(q)) {
|
|
105
105
|
(item as HTMLElement).classList.remove("hidden");
|
|
106
106
|
} else {
|
|
@@ -114,8 +114,8 @@ const initialLabel = selectedItem ? selectedItem.label : ""
|
|
|
114
114
|
items.forEach(item => {
|
|
115
115
|
const onItemClick = (e: MouseEvent) => {
|
|
116
116
|
e.stopPropagation();
|
|
117
|
-
const val = (item as HTMLElement).dataset
|
|
118
|
-
const label = (item as HTMLElement).dataset
|
|
117
|
+
const val = (item as HTMLElement).dataset["value"] || "";
|
|
118
|
+
const label = (item as HTMLElement).dataset["label"] || "";
|
|
119
119
|
|
|
120
120
|
if (hiddenInput) hiddenInput.value = val;
|
|
121
121
|
if (valueSpan) valueSpan.textContent = label;
|
|
@@ -117,12 +117,12 @@ const ratingItems = Array.from({ length }, (_, idx) => {
|
|
|
117
117
|
const input = this.querySelector('.rating-hidden-input') as HTMLInputElement | null
|
|
118
118
|
const items = this.querySelectorAll('.input-rating-item') as NodeListOf<HTMLElement>
|
|
119
119
|
|
|
120
|
-
const step = parseFloat(this.dataset
|
|
121
|
-
const length = parseInt(this.dataset
|
|
122
|
-
const clearable = this.dataset
|
|
123
|
-
const hoverable = this.dataset
|
|
124
|
-
const disabled = this.dataset
|
|
125
|
-
const readonly = this.dataset
|
|
120
|
+
const step = parseFloat(this.dataset["step"] || '1')
|
|
121
|
+
const length = parseInt(this.dataset["length"] || '5')
|
|
122
|
+
const clearable = this.dataset["clearable"] === 'true'
|
|
123
|
+
const hoverable = this.dataset["hoverable"] === 'true'
|
|
124
|
+
const disabled = this.dataset["disabled"] === 'true'
|
|
125
|
+
const readonly = this.dataset["readonly"] === 'true'
|
|
126
126
|
|
|
127
127
|
if (disabled || readonly) return
|
|
128
128
|
|
|
@@ -130,7 +130,7 @@ const ratingItems = Array.from({ length }, (_, idx) => {
|
|
|
130
130
|
|
|
131
131
|
function updateVisuals(val: number) {
|
|
132
132
|
items.forEach((item) => {
|
|
133
|
-
const idx = parseInt(item.dataset
|
|
133
|
+
const idx = parseInt(item.dataset["index"] || '0')
|
|
134
134
|
const indicator = item.querySelector('.rating-item-indicator') as HTMLElement | null
|
|
135
135
|
if (indicator) {
|
|
136
136
|
indicator.style.width = getWidthForVal(val, idx)
|
|
@@ -153,7 +153,7 @@ const ratingItems = Array.from({ length }, (_, idx) => {
|
|
|
153
153
|
const clickListeners = new Map<HTMLElement, (e: MouseEvent) => void>()
|
|
154
154
|
|
|
155
155
|
items.forEach((item) => {
|
|
156
|
-
const idx = parseInt(item.dataset
|
|
156
|
+
const idx = parseInt(item.dataset["index"] || '0')
|
|
157
157
|
|
|
158
158
|
const onMouseMove = (event: MouseEvent) => {
|
|
159
159
|
const val = getValueFromEvent(event, item, idx)
|
|
@@ -136,7 +136,7 @@ const classes = layoutGridTheme(Astro.props)
|
|
|
136
136
|
this.updateGrid()
|
|
137
137
|
|
|
138
138
|
// Set up shortcuts using the library system
|
|
139
|
-
const shortcutKey = this.dataset
|
|
139
|
+
const shortcutKey = this.dataset["shortcut"] || 'meta_shift_g'
|
|
140
140
|
this.shortcutsCleanup = defineShortcuts({
|
|
141
141
|
[shortcutKey]: {
|
|
142
142
|
handler: (e) => {
|
|
@@ -160,10 +160,10 @@ const classes = layoutGridTheme(Astro.props)
|
|
|
160
160
|
|
|
161
161
|
private handleResize() {
|
|
162
162
|
const width = document.documentElement.clientWidth
|
|
163
|
-
const smBreakpoint = parseInt(this.dataset
|
|
164
|
-
const mdBreakpoint = parseInt(this.dataset
|
|
165
|
-
const lgBreakpoint = parseInt(this.dataset
|
|
166
|
-
const xlBreakpoint = parseInt(this.dataset
|
|
163
|
+
const smBreakpoint = parseInt(this.dataset["smBreakpoint"] || '640')
|
|
164
|
+
const mdBreakpoint = parseInt(this.dataset["mdBreakpoint"] || '768')
|
|
165
|
+
const lgBreakpoint = parseInt(this.dataset["lgBreakpoint"] || '1024')
|
|
166
|
+
const xlBreakpoint = parseInt(this.dataset["xlBreakpoint"] || '1280')
|
|
167
167
|
|
|
168
168
|
let newBreakpoint: 'base' | 'sm' | 'md' | 'lg' | 'xl' = 'base'
|
|
169
169
|
|
|
@@ -185,57 +185,57 @@ const classes = layoutGridTheme(Astro.props)
|
|
|
185
185
|
if (!this.columnsContainer) return
|
|
186
186
|
|
|
187
187
|
const width = document.documentElement.clientWidth
|
|
188
|
-
const smBreakpoint = parseInt(this.dataset
|
|
189
|
-
const mdBreakpoint = parseInt(this.dataset
|
|
190
|
-
const lgBreakpoint = parseInt(this.dataset
|
|
191
|
-
const xlBreakpoint = parseInt(this.dataset
|
|
188
|
+
const smBreakpoint = parseInt(this.dataset["smBreakpoint"] || '640')
|
|
189
|
+
const mdBreakpoint = parseInt(this.dataset["mdBreakpoint"] || '768')
|
|
190
|
+
const lgBreakpoint = parseInt(this.dataset["lgBreakpoint"] || '1024')
|
|
191
|
+
const xlBreakpoint = parseInt(this.dataset["xlBreakpoint"] || '1280')
|
|
192
192
|
|
|
193
193
|
let breakpointIndex = 0
|
|
194
|
-
let colCount = parseInt(this.dataset
|
|
194
|
+
let colCount = parseInt(this.dataset["cols"] || '4')
|
|
195
195
|
let breakpointThreshold = 0
|
|
196
196
|
|
|
197
197
|
switch (this.currentBreakpoint) {
|
|
198
198
|
case 'xl':
|
|
199
199
|
breakpointIndex = 4
|
|
200
|
-
colCount = parseInt(this.dataset
|
|
200
|
+
colCount = parseInt(this.dataset["xlCols"] || '12')
|
|
201
201
|
breakpointThreshold = xlBreakpoint
|
|
202
202
|
break
|
|
203
203
|
case 'lg':
|
|
204
204
|
breakpointIndex = 3
|
|
205
|
-
colCount = parseInt(this.dataset
|
|
205
|
+
colCount = parseInt(this.dataset["lgCols"] || '12')
|
|
206
206
|
breakpointThreshold = lgBreakpoint
|
|
207
207
|
break
|
|
208
208
|
case 'md':
|
|
209
209
|
breakpointIndex = 2
|
|
210
|
-
colCount = parseInt(this.dataset
|
|
210
|
+
colCount = parseInt(this.dataset["mdCols"] || '8')
|
|
211
211
|
breakpointThreshold = mdBreakpoint
|
|
212
212
|
break
|
|
213
213
|
case 'sm':
|
|
214
214
|
breakpointIndex = 1
|
|
215
|
-
colCount = parseInt(this.dataset
|
|
215
|
+
colCount = parseInt(this.dataset["smCols"] || '4')
|
|
216
216
|
breakpointThreshold = smBreakpoint
|
|
217
217
|
break
|
|
218
218
|
default:
|
|
219
219
|
breakpointIndex = 0
|
|
220
|
-
colCount = parseInt(this.dataset
|
|
220
|
+
colCount = parseInt(this.dataset["cols"] || '4')
|
|
221
221
|
breakpointThreshold = 0
|
|
222
222
|
break
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
const gutterArray = JSON.parse(this.dataset
|
|
226
|
-
const marginArray = JSON.parse(this.dataset
|
|
225
|
+
const gutterArray = JSON.parse(this.dataset["gutter"] || '[1,1,1,1,1]')
|
|
226
|
+
const marginArray = JSON.parse(this.dataset["margin"] || '[1,1,1,1,1]')
|
|
227
227
|
|
|
228
228
|
const gutterValue = gutterArray[breakpointIndex] ?? gutterArray[gutterArray.length - 1]
|
|
229
229
|
const marginValue = marginArray[breakpointIndex] ?? marginArray[marginArray.length - 1]
|
|
230
230
|
|
|
231
|
-
const gridColor = this.dataset
|
|
232
|
-
const gridOpacity = parseFloat(this.dataset
|
|
233
|
-
const showBackground = this.dataset
|
|
231
|
+
const gridColor = this.dataset["gridColor"] || '#ff0000'
|
|
232
|
+
const gridOpacity = parseFloat(this.dataset["gridOpacity"] || '0.1')
|
|
233
|
+
const showBackground = this.dataset["showBackground"] === 'true'
|
|
234
234
|
|
|
235
|
-
const showFullWidth = this.dataset
|
|
236
|
-
const fullWidthColor = this.dataset
|
|
237
|
-
const fullWidthOpacity = parseFloat(this.dataset
|
|
238
|
-
const showFullWidthBackground = this.dataset
|
|
235
|
+
const showFullWidth = this.dataset["showFullWidth"] !== 'false'
|
|
236
|
+
const fullWidthColor = this.dataset["fullWidthColor"] || '#3b82f6'
|
|
237
|
+
const fullWidthOpacity = parseFloat(this.dataset["fullWidthOpacity"] || '0.05')
|
|
238
|
+
const showFullWidthBackground = this.dataset["showFullWidthBackground"] === 'true'
|
|
239
239
|
|
|
240
240
|
// Convert rem spacings to pixels dynamically based on root font size
|
|
241
241
|
const rootFontSize = parseFloat(getComputedStyle(document.documentElement).fontSize) || 16
|
|
@@ -243,20 +243,20 @@ const classes = layoutGridTheme(Astro.props)
|
|
|
243
243
|
const gutterPx = gutterValue * rootFontSize
|
|
244
244
|
|
|
245
245
|
// Calculate max width boundaries
|
|
246
|
-
const maxWidthVal = this.dataset
|
|
246
|
+
const maxWidthVal = this.dataset["maxWidth"] || '1440px'
|
|
247
247
|
let maxWidthPx = width
|
|
248
248
|
if (!maxWidthVal.includes('vw')) {
|
|
249
249
|
maxWidthPx = parseInt(maxWidthVal)
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
-
const innerMaxWidthVal = this.dataset
|
|
252
|
+
const innerMaxWidthVal = this.dataset["innerMaxWidth"] || '768px'
|
|
253
253
|
let innerMaxWidthPx = width
|
|
254
254
|
if (!innerMaxWidthVal.includes('vw')) {
|
|
255
255
|
innerMaxWidthPx = parseInt(innerMaxWidthVal)
|
|
256
256
|
}
|
|
257
|
-
const innerGridColor = this.dataset
|
|
258
|
-
const innerGridOpacity = parseFloat(this.dataset
|
|
259
|
-
const showInnerBackground = this.dataset
|
|
257
|
+
const innerGridColor = this.dataset["innerColor"] || '#10b981'
|
|
258
|
+
const innerGridOpacity = parseFloat(this.dataset["innerOpacity"] || '0.1')
|
|
259
|
+
const showInnerBackground = this.dataset["showInnerBackground"] === 'true'
|
|
260
260
|
|
|
261
261
|
// Calculate grid properties based on container width or screen width
|
|
262
262
|
const activeWidth = width > maxWidthPx ? maxWidthPx : width
|
|
@@ -25,7 +25,7 @@ const {
|
|
|
25
25
|
const attrs = resolveLinkAttrs(Astro.props)
|
|
26
26
|
|
|
27
27
|
const classes = raw
|
|
28
|
-
? { root: (Astro.props
|
|
28
|
+
? { root: (Astro.props["class"] as string) || "", leadingIcon: "", label: "", trailingIcon: "" }
|
|
29
29
|
: (linkTheme({
|
|
30
30
|
theme,
|
|
31
31
|
...(active !== undefined ? { active } : {}),
|
|
@@ -34,7 +34,7 @@ const classes = raw
|
|
|
34
34
|
---
|
|
35
35
|
|
|
36
36
|
<a
|
|
37
|
-
class={classes
|
|
37
|
+
class={classes["root"]}
|
|
38
38
|
data-slot="root"
|
|
39
39
|
href={attrs.href}
|
|
40
40
|
target={attrs.target}
|
|
@@ -48,21 +48,21 @@ const classes = raw
|
|
|
48
48
|
>
|
|
49
49
|
<slot name="leading">
|
|
50
50
|
{leadingIcon && (
|
|
51
|
-
<span class={classes
|
|
51
|
+
<span class={classes["leadingIcon"]} data-slot="leading-icon">
|
|
52
52
|
<RLAIcon name={leadingIcon} size="sm" aria-hidden="true" />
|
|
53
53
|
</span>
|
|
54
54
|
)}
|
|
55
55
|
</slot>
|
|
56
56
|
|
|
57
57
|
{label !== undefined && label !== null ? (
|
|
58
|
-
<span class={classes
|
|
58
|
+
<span class={classes["label"]} data-slot="label">{label}</span>
|
|
59
59
|
) : (
|
|
60
60
|
<slot />
|
|
61
61
|
)}
|
|
62
62
|
|
|
63
63
|
<slot name="trailing">
|
|
64
64
|
{attrs.showTrailingIcon && (
|
|
65
|
-
<span class={classes
|
|
65
|
+
<span class={classes["trailingIcon"]} data-slot="trailing-icon">
|
|
66
66
|
<RLAIcon
|
|
67
67
|
name={attrs.showTrailingIcon}
|
|
68
68
|
size="sm"
|
|
@@ -53,7 +53,7 @@ const RLSLink: Component<RLSLinkProps> = (allProps) => {
|
|
|
53
53
|
|
|
54
54
|
return (
|
|
55
55
|
<a
|
|
56
|
-
class={classes()
|
|
56
|
+
class={classes()["root"]}
|
|
57
57
|
data-slot="root"
|
|
58
58
|
href={attrs().href}
|
|
59
59
|
target={attrs().target}
|
|
@@ -67,7 +67,7 @@ const RLSLink: Component<RLSLinkProps> = (allProps) => {
|
|
|
67
67
|
{props.leading ? (
|
|
68
68
|
props.leading
|
|
69
69
|
) : props.leadingIcon ? (
|
|
70
|
-
<span class={classes()
|
|
70
|
+
<span class={classes()["leadingIcon"]} data-slot="leading-icon">
|
|
71
71
|
<RLSIcon name={props.leadingIcon} size="sm" aria-hidden="true" />
|
|
72
72
|
</span>
|
|
73
73
|
) : null}
|
|
@@ -75,7 +75,7 @@ const RLSLink: Component<RLSLinkProps> = (allProps) => {
|
|
|
75
75
|
{props.children !== undefined && props.children !== null ? (
|
|
76
76
|
props.children
|
|
77
77
|
) : props.label !== undefined && props.label !== null ? (
|
|
78
|
-
<span class={classes()
|
|
78
|
+
<span class={classes()["label"]} data-slot="label">
|
|
79
79
|
{props.label}
|
|
80
80
|
</span>
|
|
81
81
|
) : null}
|
|
@@ -83,7 +83,7 @@ const RLSLink: Component<RLSLinkProps> = (allProps) => {
|
|
|
83
83
|
{props.trailing ? (
|
|
84
84
|
props.trailing
|
|
85
85
|
) : attrs().showTrailingIcon ? (
|
|
86
|
-
<span class={classes()
|
|
86
|
+
<span class={classes()["trailingIcon"]} data-slot="trailing-icon">
|
|
87
87
|
<RLSIcon name={attrs().showTrailingIcon!} size="sm" aria-hidden="true" />
|
|
88
88
|
</span>
|
|
89
89
|
) : null}
|