@rimelight/ui 0.0.47 → 0.0.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. package/dist/index.d.mts +4 -5
  2. package/dist/preset.mjs +73 -1
  3. package/dist/resolver.d.mts +3 -4
  4. package/dist/resolver.mjs +2 -4
  5. package/dist/shortcuts.d.mts +10 -11
  6. package/dist/stores.d.mts +3 -4
  7. package/package.json +8 -6
  8. package/src/components/3d-hover/RLS3dHover.tsx +21 -0
  9. package/src/components/accordion/RLSAccordion.tsx +112 -0
  10. package/src/components/app/RLSApp.tsx +21 -0
  11. package/src/components/aspect-ratio/RLSAspectRatio.tsx +30 -0
  12. package/src/components/audio/RLSAudio.tsx +27 -0
  13. package/src/components/avatar/RLSAvatar.tsx +142 -0
  14. package/src/components/avatar/avatar.ts +22 -21
  15. package/src/components/avatar-group/RLSAvatarGroup.tsx +163 -0
  16. package/src/components/badge/RLSBadge.tsx +1 -1
  17. package/src/components/badge/RLVBadge.vue +5 -3
  18. package/src/components/banner/RLSBanner.tsx +151 -0
  19. package/src/components/breadcrumb/RLSBreadcrumb.tsx +194 -0
  20. package/src/components/browser-mockup/RLSBrowserMockup.tsx +21 -0
  21. package/src/components/button/RLSButton.tsx +49 -40
  22. package/src/components/button/RLVButton.vue +44 -32
  23. package/src/components/calendar/RLSCalendar.tsx +26 -0
  24. package/src/components/callout/RLSCallout.tsx +151 -0
  25. package/src/components/card/RLSCard.tsx +4 -0
  26. package/src/components/card/RLVCard.vue +4 -0
  27. package/src/components/card/card.ts +10 -0
  28. package/src/components/carousel/RLACarousel.astro +14 -1
  29. package/src/components/carousel/RLSCarousel.tsx +260 -0
  30. package/src/components/chart/RLSChart.tsx +299 -0
  31. package/src/components/chat/RLSChat.tsx +27 -0
  32. package/src/components/chat-message/RLSChatMessage.tsx +27 -0
  33. package/src/components/chat-messages/RLSChatMessages.tsx +27 -0
  34. package/src/components/chat-palette/RLSChatPalette.tsx +27 -0
  35. package/src/components/chat-prompt/RLSChatPrompt.tsx +27 -0
  36. package/src/components/chat-prompt-submit/RLSChatPromptSubmit.tsx +27 -0
  37. package/src/components/chat-reasoning/RLSChatReasoning.tsx +27 -0
  38. package/src/components/chat-shimmer/RLSChatShimmer.tsx +27 -0
  39. package/src/components/chat-tool/RLSChatTool.tsx +27 -0
  40. package/src/components/checkbox/RLACheckbox.astro +1 -0
  41. package/src/components/checkbox/RLSCheckbox.tsx +1 -1
  42. package/src/components/checkbox/checkbox.theme.ts +2 -2
  43. package/src/components/chip/RLSChip.tsx +65 -0
  44. package/src/components/collapsible/RLSCollapsible.tsx +89 -0
  45. package/src/components/color-area/RLSColorArea.tsx +554 -0
  46. package/src/components/color-field/RLSColorField.tsx +236 -0
  47. package/src/components/color-picker/RLSColorPicker.tsx +26 -0
  48. package/src/components/color-slider/RLSColorSlider.tsx +373 -0
  49. package/src/components/command-palette/RLSCommandPalette.tsx +26 -0
  50. package/src/components/compare/RLSCompare.tsx +26 -0
  51. package/src/components/confirm/RLSConfirm.tsx +173 -0
  52. package/src/components/container/RLSContainer.tsx +24 -0
  53. package/src/components/context-menu/RLSContextMenu.tsx +26 -0
  54. package/src/components/copy-markdown/RLSCopyMarkdown.tsx +57 -0
  55. package/src/components/dashboard-group/RLSDashboardGroup.tsx +29 -0
  56. package/src/components/dashboard-navbar/RLSDashboardNavbar.tsx +116 -0
  57. package/src/components/dashboard-panel/RLSDashboardPanel.tsx +84 -0
  58. package/src/components/dashboard-resize-handle/RLSDashboardResizeHandle.tsx +35 -0
  59. package/src/components/dashboard-search/RLADashboardSearch.astro +1 -1
  60. package/src/components/dashboard-search/RLSDashboardSearch.tsx +125 -0
  61. package/src/components/dashboard-search-button/RLSDashboardSearchButton.tsx +82 -0
  62. package/src/components/dashboard-sidebar/RLSDashboardSidebar.tsx +184 -0
  63. package/src/components/dashboard-sidebar-collapse/RLSDashboardSidebarCollapse.tsx +46 -0
  64. package/src/components/dashboard-sidebar-toggle/RLSDashboardSidebarToggle.tsx +35 -0
  65. package/src/components/dashboard-toolbar/RLSDashboardToolbar.tsx +49 -0
  66. package/src/components/date/RLSDate.tsx +34 -0
  67. package/src/components/dock/RLSDock.tsx +26 -0
  68. package/src/components/drawer/RLSDrawer.tsx +177 -0
  69. package/src/components/dropdown-menu/RLADropdownMenu.astro +250 -241
  70. package/src/components/dropdown-menu/RLSDropdownMenu.tsx +183 -86
  71. package/src/components/editor/RLSEditor.tsx +26 -0
  72. package/src/components/empty/RLSEmpty.tsx +132 -0
  73. package/src/components/error/RLSError.tsx +26 -0
  74. package/src/components/field-group/RLSFieldGroup.tsx +46 -0
  75. package/src/components/fieldset/RLSFieldset.tsx +26 -0
  76. package/src/components/file-upload/RLSFileUpload.tsx +163 -0
  77. package/src/components/floating-action/RLSFloatingAction.tsx +26 -0
  78. package/src/components/footer/RLSFooter.tsx +56 -0
  79. package/src/components/form/RLSForm.tsx +34 -0
  80. package/src/components/gallery/RLSGallery.tsx +21 -0
  81. package/src/components/gamepad/RLSGamepad.tsx +269 -0
  82. package/src/components/grid/RLSGrid.tsx +29 -0
  83. package/src/components/head/RLAHead.astro +9 -0
  84. package/src/components/head/RLSHead.tsx +42 -0
  85. package/src/components/head/UIHead.astro +3 -0
  86. package/src/components/header/RLSHeader.tsx +87 -0
  87. package/src/components/hover-card/RLSHoverCard.tsx +72 -0
  88. package/src/components/icon/RLSIcon.tsx +3 -1
  89. package/src/components/image/RLAImage.astro +447 -138
  90. package/src/components/image/RLSImage.tsx +545 -0
  91. package/src/components/image/image.theme.ts +19 -3
  92. package/src/components/image/image.ts +31 -1
  93. package/src/components/input/RLAInput.astro +62 -51
  94. package/src/components/input/RLSInput.tsx +1 -1
  95. package/src/components/input-date/RLSInputDate.tsx +92 -0
  96. package/src/components/input-menu/RLSInputMenu.tsx +199 -0
  97. package/src/components/input-number/RLSInputNumber.tsx +184 -0
  98. package/src/components/input-pin/RLSInputPin.tsx +185 -0
  99. package/src/components/input-rating/RLSInputRating.tsx +198 -0
  100. package/src/components/input-rating/input-rating.ts +4 -0
  101. package/src/components/input-tags/RLSInputTags.tsx +94 -0
  102. package/src/components/input-time/RLSInputTime.tsx +92 -0
  103. package/src/components/kbd/RLSKbd.tsx +37 -0
  104. package/src/components/keyboard/RLSKeyboard.tsx +476 -0
  105. package/src/components/knob/RLSKnob.tsx +27 -0
  106. package/src/components/label/RLSLabel.tsx +27 -0
  107. package/src/components/layout-grid/RLSLayoutGrid.tsx +402 -0
  108. package/src/components/layout-grid/layout-grid.ts +25 -1
  109. package/src/components/link/RLSLink.tsx +2 -1
  110. package/src/components/link/link.ts +21 -12
  111. package/src/components/link-group/RLSLinkGroup.tsx +76 -0
  112. package/src/components/listbox/RLSListbox.tsx +27 -0
  113. package/src/components/locale-selector/RLALocaleSelector.astro +2 -1
  114. package/src/components/locale-selector/RLSLocaleSelector.tsx +178 -0
  115. package/src/components/logo/RLALogo.astro +69 -4
  116. package/src/components/logo/RLSLogo.tsx +129 -0
  117. package/src/components/main/RLSMain.tsx +40 -0
  118. package/src/components/marquee/RLSMarquee.tsx +80 -0
  119. package/src/components/meter/RLSMeter.tsx +27 -0
  120. package/src/components/modal/RLAModal.astro +1 -1
  121. package/src/components/modal/RLSModal.tsx +109 -72
  122. package/src/components/navigation-menu/RLSNavigationMenu.tsx +228 -0
  123. package/src/components/navigation-menu/navigation-menu.ts +2 -2
  124. package/src/components/package-managers/RLSPackageManagers.tsx +204 -0
  125. package/src/components/page/RLSPage.tsx +21 -0
  126. package/src/components/page-aside/RLSPageAside.tsx +21 -0
  127. package/src/components/page-body/RLSPageBody.tsx +21 -0
  128. package/src/components/page-header/RLSPageHeader.tsx +21 -0
  129. package/src/components/page-section/RLSPageSection.tsx +201 -0
  130. package/src/components/pagination/RLSPagination.tsx +114 -0
  131. package/src/components/password/RLSPassword.tsx +27 -0
  132. package/src/components/phone-mockup/RLSPhoneMockup.tsx +27 -0
  133. package/src/components/placeholder/RLSPlaceholder.tsx +47 -0
  134. package/src/components/popover/RLSPopover.tsx +124 -0
  135. package/src/components/post/RLSPost.tsx +134 -0
  136. package/src/components/pricing-plan/RLSPricingPlan.tsx +26 -0
  137. package/src/components/pricing-table/RLSPricingTable.tsx +26 -0
  138. package/src/components/progress/RLSProgress.tsx +53 -0
  139. package/src/components/prose/RLSProse.tsx +26 -0
  140. package/src/components/qr-code/RLSQrCode.tsx +26 -0
  141. package/src/components/quote/RLAQuote.astro +10 -6
  142. package/src/components/quote/RLSQuote.tsx +37 -0
  143. package/src/components/quote/quote.theme.ts +5 -2
  144. package/src/components/radio-group/RLSRadioGroup.tsx +37 -0
  145. package/src/components/rating/RLSRating.tsx +27 -0
  146. package/src/components/scroll-area/RLSScrollArea.tsx +210 -0
  147. package/src/components/scroll-to-top/RLAScrollToTop.astro +1 -0
  148. package/src/components/scroll-to-top/RLSScrollToTop.tsx +145 -0
  149. package/src/components/search/RLSSearch.tsx +237 -0
  150. package/src/components/select/RLASelect.astro +67 -4
  151. package/src/components/select/RLSSelect.tsx +107 -39
  152. package/src/components/select/RLVSelect.vue +50 -1
  153. package/src/components/select/select.theme.ts +30 -10
  154. package/src/components/select/select.ts +20 -1
  155. package/src/components/separator/RLSSeparator.tsx +92 -0
  156. package/src/components/share/RLSShare.tsx +66 -0
  157. package/src/components/shortcuts/RLSShortcuts.tsx +393 -0
  158. package/src/components/sidebar/RLSSidebar.tsx +271 -0
  159. package/src/components/skeleton/RLSSkeleton.tsx +21 -0
  160. package/src/components/slideover/RLASlideover.astro +1 -1
  161. package/src/components/slideover/RLSSlideover.tsx +159 -0
  162. package/src/components/slider/RLSSlider.tsx +112 -0
  163. package/src/components/speed-dial/RLSSpeedDial.tsx +27 -0
  164. package/src/components/spinner/RLSSpinner.tsx +22 -0
  165. package/src/components/splitter/RLSSplitter.tsx +178 -0
  166. package/src/components/spoiler/RLSSpoiler.tsx +26 -0
  167. package/src/components/stepper/RLSStepper.tsx +205 -0
  168. package/src/components/steps/RLSSteps.tsx +108 -0
  169. package/src/components/sticky-surface/RLSStickySurface.tsx +63 -0
  170. package/src/components/surround/RLSSurround.tsx +57 -0
  171. package/src/components/switch/RLSSwitch.tsx +56 -0
  172. package/src/components/table/RLATable.astro +1044 -579
  173. package/src/components/table/RLSTable.tsx +893 -0
  174. package/src/components/table/table.theme.ts +47 -16
  175. package/src/components/table/table.ts +104 -66
  176. package/src/components/table-of-contents/RLSTableOfContents.tsx +196 -0
  177. package/src/components/tabs/RLSTabs.tsx +298 -0
  178. package/src/components/textarea/RLATextarea.astro +1 -0
  179. package/src/components/textarea/RLSTextarea.tsx +3 -1
  180. package/src/components/theme-selector/RLAThemeSelector.astro +85 -56
  181. package/src/components/theme-selector/RLSThemeSelector.tsx +131 -0
  182. package/src/components/theme-selector/theme-selector.theme.ts +5 -7
  183. package/src/components/theme-selector/theme-selector.ts +11 -1
  184. package/src/components/timeline/RLSTimeline.tsx +171 -0
  185. package/src/components/toast/RLSToast.tsx +179 -0
  186. package/src/components/toaster/RLSToaster.tsx +82 -0
  187. package/src/components/tooltip/RLSTooltip.tsx +48 -0
  188. package/src/components/tour/RLSTour.tsx +26 -0
  189. package/src/components/tree/RLSTree.tsx +26 -0
  190. package/src/components/user/RLSUser.tsx +26 -0
  191. package/src/components/video/RLAVideo.astro +4 -1
  192. package/src/components/video/RLSVideo.tsx +158 -0
  193. package/src/components/watermark/RLSWatermark.tsx +27 -0
  194. package/src/components/window-mockup/RLSWindowMockup.tsx +27 -0
  195. package/src/preset.ts +73 -1
  196. package/src/resolver.ts +6 -1
  197. package/src/virtual.d.ts +6 -0
package/dist/index.d.mts CHANGED
@@ -1,13 +1,12 @@
1
1
  import { c as UIConfig } from "./types-DWmKMcYC.mjs";
2
2
  //#region src/index.d.ts
3
- interface RimelightUIPlugin {
3
+ export interface RimelightUIPlugin {
4
4
  name: string;
5
5
  enforce?: "pre" | "post";
6
6
  resolveId?: (id: string) => string | null | undefined;
7
7
  load?: (id: string) => string | null | undefined;
8
8
  [key: string]: any;
9
9
  }
10
- type RimelightUIPlugins = (RimelightUIPlugin | RimelightUIPlugin[])[];
11
- declare const ui: ({ unocss, ...cfg }?: UIConfig) => RimelightUIPlugins;
12
- //#endregion
13
- export { RimelightUIPlugin, RimelightUIPlugins, ui };
10
+ export type RimelightUIPlugins = (RimelightUIPlugin | RimelightUIPlugin[])[];
11
+ export declare const ui: ({ unocss, ...cfg }?: UIConfig) => RimelightUIPlugins;
12
+ //#endregion
package/dist/preset.mjs CHANGED
@@ -208,7 +208,79 @@ function rimelightUiPreset({ colors, icons, presets = {} } = {}) {
208
208
  }
209
209
  [data-theme="dark"] { color-scheme: dark; }
210
210
  [data-theme="light"] { color-scheme: light; }
211
- body { background-color: var(--rl-neutral-50); color: var(--rl-neutral-950); }` }]
211
+ body { background-color: var(--rl-neutral-50); color: var(--rl-neutral-950); }
212
+
213
+ /* Reduced motion - disable all animations for users who prefer it */
214
+ @media (prefers-reduced-motion: reduce) {
215
+ *,
216
+ *::before,
217
+ *::after {
218
+ animation-duration: 0.01ms !important;
219
+ animation-iteration-count: 1 !important;
220
+ transition-duration: 0.01ms !important;
221
+ scroll-behavior: auto !important;
222
+ }
223
+ }
224
+
225
+ /* Global focus-visible ring for consistent keyboard focus */
226
+ :focus-visible {
227
+ outline: 2px solid var(--rl-primary-500);
228
+ outline-offset: 2px;
229
+ }
230
+
231
+ /* Ensure minimum touch target sizes (WCAG 2.2 - 24x24 minimum, 44x44 enhanced) */
232
+ button:not(:disabled),
233
+ [role="button"]:not(:disabled),
234
+ a[href],
235
+ input:not([type="hidden"]),
236
+ select,
237
+ textarea,
238
+ summary {
239
+ min-width: 24px;
240
+ min-height: 24px;
241
+ }
242
+
243
+ /* Enhanced touch targets for primary interactive elements */
244
+ @media (pointer: coarse) {
245
+ button:not(:disabled),
246
+ [role="button"]:not(:disabled),
247
+ a[href] {
248
+ min-width: 44px;
249
+ min-height: 44px;
250
+ }
251
+ }
252
+
253
+ /* Improve skip link visibility */
254
+ .skip-link:focus-visible {
255
+ position: absolute;
256
+ top: 1rem;
257
+ left: 1rem;
258
+ z-index: 9999;
259
+ padding: 0.75rem 1.5rem;
260
+ background: var(--rl-primary-600);
261
+ color: white;
262
+ border-radius: 0.5rem;
263
+ font-weight: 600;
264
+ text-decoration: none;
265
+ }
266
+
267
+ @keyframes carousel {
268
+ 0% { transform: translateX(-100%); }
269
+ 100% { transform: translateX(350%); }
270
+ }
271
+ @keyframes carousel-inverse {
272
+ 0% { transform: translateX(350%); }
273
+ 100% { transform: translateX(-100%); }
274
+ }
275
+ @keyframes swing {
276
+ 0%, 100% { transform: translateX(-50%); }
277
+ 50% { transform: translateX(250%); }
278
+ }
279
+ @keyframes elastic {
280
+ 0% { transform: scaleX(0.1) translateX(-100%); }
281
+ 50% { transform: scaleX(0.7) translateX(100%); }
282
+ 100% { transform: scaleX(0.1) translateX(350%); }
283
+ }` }]
212
284
  };
213
285
  }
214
286
  //#endregion
@@ -1,6 +1,5 @@
1
1
  import { n as ClassValue, s as ThemeConfig } from "./types-DWmKMcYC.mjs";
2
2
  //#region src/resolver.d.ts
3
- declare function cx(...args: ClassValue[]): string;
4
- declare function defineTheme<const S extends string>(name: string, themeConfig: ThemeConfig<S>): (props?: any) => Record<S, string>;
5
- //#endregion
6
- export { cx, defineTheme };
3
+ export declare function cx(...args: ClassValue[]): string;
4
+ export declare function defineTheme<const S extends string>(name: string, themeConfig: ThemeConfig<S>): (props?: any) => Record<S, string>;
5
+ //#endregion
package/dist/resolver.mjs CHANGED
@@ -63,10 +63,8 @@ function defineTheme(name, themeConfig) {
63
63
  return (props = {}) => {
64
64
  const res = {};
65
65
  for (let i = 0; i < slots.length; i++) res[slots[i]] = baseMap[slots[i]] || "";
66
- const values = {
67
- ...defaultVariants,
68
- ...props
69
- };
66
+ const values = { ...defaultVariants };
67
+ for (const k in props) if (props[k] !== void 0) values[k] = props[k];
70
68
  const color = autoColor ? props.color ?? defaultVariants.color : void 0;
71
69
  for (let k = 0; k < variantKeys.length; k++) {
72
70
  const key = variantKeys[k];
@@ -1,7 +1,7 @@
1
1
  import { Atom } from "./stores.mjs";
2
2
  //#region src/shortcuts.d.ts
3
- type Handler = (e: KeyboardEvent) => void;
4
- interface ShortcutConfig {
3
+ export type Handler = (e: KeyboardEvent) => void;
4
+ export interface ShortcutConfig {
5
5
  handler: Handler;
6
6
  usingInput?: boolean | string | undefined;
7
7
  label?: string | undefined;
@@ -9,11 +9,11 @@ interface ShortcutConfig {
9
9
  category?: string | undefined;
10
10
  order?: number | undefined;
11
11
  }
12
- type ShortcutsConfig = Record<string, ShortcutConfig | Handler | false | null | undefined>;
13
- interface ShortcutsOptions {
12
+ export type ShortcutsConfig = Record<string, ShortcutConfig | Handler | false | null | undefined>;
13
+ export interface ShortcutsOptions {
14
14
  chainDelay?: number | undefined;
15
15
  }
16
- interface RegisteredShortcut {
16
+ export interface RegisteredShortcut {
17
17
  id: string;
18
18
  keys: string[];
19
19
  label?: string | undefined;
@@ -21,9 +21,8 @@ interface RegisteredShortcut {
21
21
  category?: string | undefined;
22
22
  order?: number | undefined;
23
23
  }
24
- declare const normalizeModifier: (m: string) => string;
25
- declare const formatShortcutKeys: (k: string) => string[];
26
- declare const activeShortcutsStore: Atom<RegisteredShortcut[]>;
27
- declare function defineShortcuts(config: ShortcutsConfig, options?: ShortcutsOptions): () => void;
28
- //#endregion
29
- export { Handler, RegisteredShortcut, ShortcutConfig, ShortcutsConfig, ShortcutsOptions, activeShortcutsStore, defineShortcuts, formatShortcutKeys, normalizeModifier };
24
+ export declare const normalizeModifier: (m: string) => string;
25
+ export declare const formatShortcutKeys: (k: string) => string[];
26
+ export declare const activeShortcutsStore: Atom<RegisteredShortcut[]>;
27
+ export declare function defineShortcuts(config: ShortcutsConfig, options?: ShortcutsOptions): () => void;
28
+ //#endregion
package/dist/stores.d.mts CHANGED
@@ -1,9 +1,8 @@
1
1
  //#region src/stores.d.ts
2
- interface Atom<T> {
2
+ export interface Atom<T> {
3
3
  get: () => T;
4
4
  set: (next: T) => void;
5
5
  subscribe: (fn: (val: T) => void) => () => void;
6
6
  }
7
- declare function atom<T>(initial: T): Atom<T>;
8
- //#endregion
9
- export { Atom, atom };
7
+ export declare function atom<T>(initial: T): Atom<T>;
8
+ //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rimelight/ui",
3
- "version": "0.0.47",
3
+ "version": "0.0.49",
4
4
  "private": false,
5
5
  "description": "Rimelight Entertainment's UI Package",
6
6
  "homepage": "https://rimelight.com/docs",
@@ -55,18 +55,20 @@
55
55
  "access": "public"
56
56
  },
57
57
  "dependencies": {
58
- "@unocss/vite": "66.10.0",
59
- "unocss": "66.10.0"
58
+ "@unocss/vite": "66.10.2",
59
+ "unocss": "66.10.2"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@astrojs/check": "0.9.10",
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.5",
67
- "astro": "7.3.1",
66
+ "@rimelight/config": "0.0.7",
67
+ "@vitejs/plugin-vue": "6.0.8",
68
+ "astro": "7.3.2",
68
69
  "solid-js": "1.9.15",
69
70
  "typescript": "6.0.3",
71
+ "vite-plugin-solid": "2.11.14",
70
72
  "vue": "3.5.42"
71
73
  },
72
74
  "peerDependencies": {
@@ -91,7 +93,7 @@
91
93
  }
92
94
  },
93
95
  "engines": {
94
- "node": ">=26.7.0"
96
+ "node": ">=26.8.2"
95
97
  },
96
98
  "scripts": {
97
99
  "build": "vp pack",
@@ -0,0 +1,21 @@
1
+ import { createMemo, splitProps, type Component, type JSX } from "solid-js"
2
+ import type { ThreeDHoverProps } from "./3d-hover"
3
+ import { hover3dTheme } from "./3d-hover.theme"
4
+
5
+ export interface RLS3dHoverProps extends ThreeDHoverProps {
6
+ children?: JSX.Element
7
+ }
8
+
9
+ const RLS3dHover: Component<RLS3dHoverProps> = (allProps) => {
10
+ const [props, rest] = splitProps(allProps, ["ui", "class", "children"])
11
+
12
+ const resolvedClasses = createMemo(() => hover3dTheme({ ui: props.ui, class: props.class }))
13
+
14
+ return (
15
+ <div class={resolvedClasses().root} data-slot="root" {...rest}>
16
+ {props.children}
17
+ </div>
18
+ )
19
+ }
20
+
21
+ export default RLS3dHover
@@ -0,0 +1,112 @@
1
+ import { createMemo, splitProps, For, type Component, type JSX } from "solid-js"
2
+ import type { AccordionItem, AccordionProps } from "./accordion"
3
+ import { accordionTheme } from "./accordion.theme"
4
+ import RLSIcon from "../icon/RLSIcon"
5
+
6
+ export interface RLSAccordionProps extends AccordionProps {
7
+ children?: JSX.Element
8
+ trailingIconSlot?: JSX.Element
9
+ }
10
+
11
+ const RLSAccordion: Component<RLSAccordionProps> = (allProps) => {
12
+ const [props, rest] = splitProps(allProps, [
13
+ "items",
14
+ "summary",
15
+ "multiple",
16
+ "trailingIcon",
17
+ "disabled",
18
+ "name",
19
+ "ui",
20
+ "class",
21
+ "children",
22
+ "trailingIconSlot"
23
+ ])
24
+
25
+ const groupName =
26
+ props.name ||
27
+ (!props.multiple ? `accordion-${Math.random().toString(36).substring(2, 9)}` : undefined)
28
+
29
+ const resolvedClasses = createMemo(() =>
30
+ accordionTheme({
31
+ disabled: props.disabled ? true : false,
32
+ ui: props.ui,
33
+ class: props.class
34
+ })
35
+ )
36
+
37
+ const trailingIcon = () => props.trailingIcon ?? "chevronDown"
38
+
39
+ return props.items && props.items.length > 0 ? (
40
+ <div class={resolvedClasses().root} data-slot="root" {...rest}>
41
+ <For each={props.items}>
42
+ {(item: AccordionItem) => {
43
+ const itemDisabled = () => !!(props.disabled || item.disabled)
44
+ const itemTrailingIcon = () => (item.trailingIcon as string | undefined) || trailingIcon()
45
+ return (
46
+ <details
47
+ class={resolvedClasses().item}
48
+ data-slot="item"
49
+ name={props.name || (!props.multiple ? groupName : undefined)}
50
+ >
51
+ <summary
52
+ class={`${resolvedClasses().trigger} ${itemDisabled() ? "pointer-events-none opacity-50 select-none" : ""}`}
53
+ data-slot="trigger"
54
+ >
55
+ {item.icon ? (
56
+ <span class={resolvedClasses().leadingIcon} data-slot="leading-icon">
57
+ <span class={item.icon} aria-hidden="true" />
58
+ </span>
59
+ ) : null}
60
+
61
+ <span class={resolvedClasses().label} data-slot="label">
62
+ {item.label}
63
+ </span>
64
+
65
+ {itemTrailingIcon() ? (
66
+ <span class={resolvedClasses().trailingIcon} data-slot="trailing-icon">
67
+ {props.trailingIconSlot ?? <RLSIcon name={itemTrailingIcon()} size="md" />}
68
+ </span>
69
+ ) : null}
70
+ </summary>
71
+
72
+ <div class={resolvedClasses().content} data-slot="content">
73
+ <div class={resolvedClasses().body} data-slot="body">
74
+ {item.content}
75
+ </div>
76
+ </div>
77
+ </details>
78
+ )
79
+ }}
80
+ </For>
81
+ </div>
82
+ ) : (
83
+ <details
84
+ class={`${resolvedClasses().root} ${resolvedClasses().item}`}
85
+ data-slot="root"
86
+ name={props.name}
87
+ {...rest}
88
+ >
89
+ <summary
90
+ class={`${resolvedClasses().trigger} ${props.disabled ? "pointer-events-none opacity-50 select-none" : ""}`}
91
+ data-slot="trigger"
92
+ >
93
+ <span class={resolvedClasses().label} data-slot="label">
94
+ {props.summary}
95
+ </span>
96
+ {trailingIcon() ? (
97
+ <span class={resolvedClasses().trailingIcon} data-slot="trailing-icon">
98
+ {props.trailingIconSlot ?? <RLSIcon name={trailingIcon()} size="md" />}
99
+ </span>
100
+ ) : null}
101
+ </summary>
102
+
103
+ <div class={resolvedClasses().content} data-slot="content">
104
+ <div class={resolvedClasses().body} data-slot="body">
105
+ {props.children}
106
+ </div>
107
+ </div>
108
+ </details>
109
+ )
110
+ }
111
+
112
+ export default RLSAccordion
@@ -0,0 +1,21 @@
1
+ import { createMemo, splitProps, type Component, type JSX } from "solid-js"
2
+ import type { AppProps } from "./app"
3
+ import { appTheme } from "./app.theme"
4
+
5
+ export interface RLSAppProps extends AppProps {
6
+ children?: JSX.Element
7
+ }
8
+
9
+ const RLSApp: Component<RLSAppProps> = (allProps) => {
10
+ const [props, rest] = splitProps(allProps, ["ui", "class", "children"])
11
+
12
+ const resolvedClasses = createMemo(() => appTheme({ ui: props.ui, class: props.class }))
13
+
14
+ return (
15
+ <div class={resolvedClasses().root} data-slot="root" {...rest}>
16
+ {props.children}
17
+ </div>
18
+ )
19
+ }
20
+
21
+ export default RLSApp
@@ -0,0 +1,30 @@
1
+ import { createMemo, splitProps, type Component, type JSX } from "solid-js"
2
+ import type { AspectRatioProps } from "./aspect-ratio"
3
+ import { aspectRatioTheme } from "./aspect-ratio.theme"
4
+
5
+ export interface RLSAspectRatioProps extends AspectRatioProps {
6
+ children?: JSX.Element
7
+ }
8
+
9
+ const RLSAspectRatio: Component<RLSAspectRatioProps> = (allProps) => {
10
+ const [props, rest] = splitProps(allProps, ["ratio", "ui", "class", "children"])
11
+
12
+ const resolvedClasses = createMemo(() =>
13
+ aspectRatioTheme({ ratio: props.ratio, ui: props.ui, class: props.class })
14
+ )
15
+
16
+ return (
17
+ <div class={resolvedClasses().root} data-slot="root" {...rest}>
18
+ <svg
19
+ viewBox={`0 0 100 ${(1 / (props.ratio ?? 1)) * 100}`}
20
+ class="w-full h-auto pointer-events-none block"
21
+ aria-hidden="true"
22
+ />
23
+ <div class={resolvedClasses().content} data-slot="content">
24
+ {props.children}
25
+ </div>
26
+ </div>
27
+ )
28
+ }
29
+
30
+ export default RLSAspectRatio
@@ -0,0 +1,27 @@
1
+ import { createMemo, splitProps, type Component, type JSX } from "solid-js"
2
+ import type { AudioProps } from "./audio"
3
+ import { audioTheme } from "./audio.theme"
4
+
5
+ export interface RLSAudioProps extends AudioProps {
6
+ children?: JSX.Element
7
+ transcript?: JSX.Element
8
+ }
9
+
10
+ const RLSAudio: Component<RLSAudioProps> = (allProps) => {
11
+ const [props, rest] = splitProps(allProps, ["ui", "class", "children", "transcript"])
12
+
13
+ const resolvedClasses = createMemo(() => audioTheme({ ui: props.ui, class: props.class }))
14
+
15
+ return (
16
+ <div class={resolvedClasses().root} data-slot="root" {...rest}>
17
+ {props.children}
18
+ {props.transcript !== undefined && (
19
+ <div class="mt-2 text-sm text-zinc-400" data-slot="transcript">
20
+ {props.transcript}
21
+ </div>
22
+ )}
23
+ </div>
24
+ )
25
+ }
26
+
27
+ export default RLSAudio
@@ -0,0 +1,142 @@
1
+ import { createMemo, splitProps, type Component, type JSX } from "solid-js"
2
+ import type { AvatarProps } from "./avatar"
3
+ import { avatarTheme } from "./avatar.theme"
4
+ import RLSIcon from "../icon/RLSIcon"
5
+
6
+ export interface RLSAvatarProps extends AvatarProps {
7
+ children?: JSX.Element
8
+ fallbackSlot?: JSX.Element
9
+ badgeSlot?: JSX.Element
10
+ imgProps?: JSX.ImgHTMLAttributes<HTMLImageElement>
11
+ }
12
+
13
+ const RLSAvatar: Component<RLSAvatarProps> = (allProps) => {
14
+ const [props, rest] = splitProps(allProps, [
15
+ "src",
16
+ "alt",
17
+ "fallback",
18
+ "initials",
19
+ "title",
20
+ "subtitle",
21
+ "label",
22
+ "badge",
23
+ "badgeColor",
24
+ "badgePosition",
25
+ "size",
26
+ "color",
27
+ "loading",
28
+ "referrerpolicy",
29
+ "crossorigin",
30
+ "decoding",
31
+ "height",
32
+ "width",
33
+ "sizes",
34
+ "srcset",
35
+ "ui",
36
+ "class",
37
+ "children",
38
+ "fallbackSlot",
39
+ "badgeSlot",
40
+ "imgProps"
41
+ ])
42
+
43
+ const resolvedClasses = createMemo(() =>
44
+ avatarTheme({
45
+ size: props.size ?? "md",
46
+ color: props.color ?? "neutral",
47
+ badgePosition: props.badgePosition ?? "bottom-right",
48
+ ui: props.ui,
49
+ class: props.class
50
+ })
51
+ )
52
+
53
+ const avatarFallback = () => props.fallback || props.initials
54
+ const hasTextLayout = () => Boolean(props.title || props.subtitle)
55
+ const badgeClass = () =>
56
+ props.badgeColor?.startsWith("bg-")
57
+ ? props.badgeColor
58
+ : `bg-${props.badgeColor ?? "success"}-500`
59
+
60
+ const image = () => (
61
+ <>
62
+ {props.src ? (
63
+ <img
64
+ src={props.src}
65
+ alt={props.alt ?? ""}
66
+ class={resolvedClasses().image}
67
+ data-slot="image"
68
+ loading={props.loading}
69
+ referrerPolicy={props.referrerpolicy || undefined}
70
+ crossorigin={props.crossorigin || undefined}
71
+ decoding={props.decoding}
72
+ {...props.imgProps}
73
+ />
74
+ ) : (
75
+ <span class={resolvedClasses().fallback} data-slot="fallback">
76
+ {props.fallbackSlot ? (
77
+ props.fallbackSlot
78
+ ) : avatarFallback() ? (
79
+ avatarFallback()
80
+ ) : (
81
+ <RLSIcon name="i-rl-user" class={resolvedClasses().icon} aria-hidden="true" />
82
+ )}
83
+ </span>
84
+ )}
85
+ </>
86
+ )
87
+
88
+ const badgeEl = () =>
89
+ props.badge || props.badgeSlot ? (
90
+ <span class={`${resolvedClasses().badge} ${badgeClass()}`} data-slot="badge">
91
+ {props.badgeSlot
92
+ ? props.badgeSlot
93
+ : typeof props.badge === "string" || typeof props.badge === "number"
94
+ ? props.badge
95
+ : null}
96
+ </span>
97
+ ) : null
98
+
99
+ if (hasTextLayout()) {
100
+ return (
101
+ <div class="flex items-center gap-3" data-slot="profile-wrapper">
102
+ <span
103
+ class={resolvedClasses().root}
104
+ data-slot="root"
105
+ aria-label={props.label || props.title}
106
+ role={props.label || props.title ? "img" : undefined}
107
+ {...rest}
108
+ >
109
+ {props.children ? props.children : image()}
110
+ {badgeEl()}
111
+ </span>
112
+ <div class="flex flex-col leading-tight">
113
+ {props.title && (
114
+ <span class="font-medium text-sm text-default" data-slot="title">
115
+ {props.title}
116
+ </span>
117
+ )}
118
+ {props.subtitle && (
119
+ <span class="text-xs text-muted" data-slot="subtitle">
120
+ {props.subtitle}
121
+ </span>
122
+ )}
123
+ </div>
124
+ </div>
125
+ )
126
+ }
127
+
128
+ return (
129
+ <span
130
+ class={resolvedClasses().root}
131
+ data-slot="root"
132
+ aria-label={props.label}
133
+ role={props.label ? "img" : undefined}
134
+ {...rest}
135
+ >
136
+ {props.children ? props.children : image()}
137
+ {badgeEl()}
138
+ </span>
139
+ )
140
+ }
141
+
142
+ export default RLSAvatar
@@ -8,24 +8,24 @@ export interface AvatarProps {
8
8
  * @default "span"
9
9
  */
10
10
  as?: any
11
- src?: string
12
- alt?: string
11
+ src?: string | undefined
12
+ alt?: string | undefined
13
13
  icon?: any
14
- text?: string
15
- fallback?: string
14
+ text?: string | undefined
15
+ fallback?: string | undefined
16
16
  /**
17
17
  * @default "md"
18
18
  */
19
- size?: "3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl"
19
+ size?: "3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | undefined
20
20
  /**
21
21
  * @default "neutral"
22
22
  */
23
- color?: ThemeColor
24
- chip?: boolean | ChipProps
25
- badge?: boolean | string | number
26
- badgeColor?: string
27
- badgePosition?: "top-right" | "bottom-right" | "top-left" | "bottom-left"
28
- loading?: "lazy" | "eager"
23
+ color?: ThemeColor | undefined
24
+ chip?: boolean | ChipProps | undefined
25
+ badge?: boolean | string | number | undefined
26
+ badgeColor?: string | undefined
27
+ badgePosition?: "top-right" | "bottom-right" | "top-left" | "bottom-left" | undefined
28
+ loading?: "lazy" | "eager" | undefined
29
29
  referrerpolicy?:
30
30
  | ""
31
31
  | "no-referrer"
@@ -36,25 +36,26 @@ export interface AvatarProps {
36
36
  | "strict-origin"
37
37
  | "strict-origin-when-cross-origin"
38
38
  | "unsafe-url"
39
- crossorigin?: "" | "anonymous" | "use-credentials"
40
- decoding?: "async" | "auto" | "sync"
41
- height?: string | number
42
- width?: string | number
43
- sizes?: string
44
- srcset?: string
45
- usemap?: string
39
+ | undefined
40
+ crossorigin?: "" | "anonymous" | "use-credentials" | undefined
41
+ decoding?: "async" | "auto" | "sync" | undefined
42
+ height?: string | number | undefined
43
+ width?: string | number | undefined
44
+ sizes?: string | undefined
45
+ srcset?: string | undefined
46
+ usemap?: string | undefined
46
47
  /**
47
48
  * Compact initials displayed inside the avatar circle (alias for fallback)
48
49
  */
49
- initials?: string
50
+ initials?: string | undefined
50
51
  /**
51
52
  * Display name rendered adjacent to the avatar (e.g. "Daniel Marchi")
52
53
  */
53
- title?: string
54
+ title?: string | undefined
54
55
  /**
55
56
  * Secondary description rendered below the title (e.g. "Lead Developer")
56
57
  */
57
- subtitle?: string
58
+ subtitle?: string | undefined
58
59
  /**
59
60
  * Accessible aria-label fallback for screen readers when avatar is purely visual
60
61
  */