@rimelight/ui 0.0.46 → 0.0.48

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 (222) hide show
  1. package/dist/icons-DPnFQCts.d.mts +72 -0
  2. package/dist/icons.d.mts +1 -1
  3. package/dist/index.d.mts +5 -6
  4. package/dist/preset.d.mts +1 -1
  5. package/dist/preset.mjs +73 -1
  6. package/dist/resolver.d.mts +4 -5
  7. package/dist/resolver.mjs +2 -4
  8. package/dist/shortcuts.d.mts +10 -11
  9. package/dist/stores.d.mts +3 -4
  10. package/dist/{types-DqAgCNcm.d.mts → types-DWmKMcYC.d.mts} +1 -1
  11. package/dist/types.d.mts +1 -1
  12. package/package.json +8 -6
  13. package/src/components/3d-hover/RLS3dHover.tsx +21 -0
  14. package/src/components/accordion/RLSAccordion.tsx +112 -0
  15. package/src/components/app/RLSApp.tsx +21 -0
  16. package/src/components/aspect-ratio/RLSAspectRatio.tsx +30 -0
  17. package/src/components/audio/RLSAudio.tsx +27 -0
  18. package/src/components/avatar/RLSAvatar.tsx +142 -0
  19. package/src/components/avatar/avatar.ts +22 -21
  20. package/src/components/avatar-group/RLSAvatarGroup.tsx +163 -0
  21. package/src/components/badge/RLSBadge.tsx +1 -1
  22. package/src/components/badge/RLVBadge.vue +5 -3
  23. package/src/components/banner/RLABanner.astro +1 -1
  24. package/src/components/banner/RLSBanner.tsx +151 -0
  25. package/src/components/breadcrumb/RLSBreadcrumb.tsx +194 -0
  26. package/src/components/browser-mockup/RLSBrowserMockup.tsx +21 -0
  27. package/src/components/button/RLSButton.tsx +53 -38
  28. package/src/components/button/RLVButton.vue +44 -32
  29. package/src/components/calendar/RLSCalendar.tsx +26 -0
  30. package/src/components/callout/RLSCallout.tsx +151 -0
  31. package/src/components/card/RLSCard.tsx +4 -0
  32. package/src/components/card/RLVCard.vue +4 -0
  33. package/src/components/card/card.ts +10 -0
  34. package/src/components/carousel/RLACarousel.astro +14 -1
  35. package/src/components/carousel/RLSCarousel.tsx +260 -0
  36. package/src/components/chart/RLSChart.tsx +299 -0
  37. package/src/components/chat/RLSChat.tsx +27 -0
  38. package/src/components/chat-message/RLSChatMessage.tsx +27 -0
  39. package/src/components/chat-messages/RLSChatMessages.tsx +27 -0
  40. package/src/components/chat-palette/RLSChatPalette.tsx +27 -0
  41. package/src/components/chat-prompt/RLSChatPrompt.tsx +27 -0
  42. package/src/components/chat-prompt-submit/RLSChatPromptSubmit.tsx +27 -0
  43. package/src/components/chat-reasoning/RLSChatReasoning.tsx +27 -0
  44. package/src/components/chat-shimmer/RLSChatShimmer.tsx +27 -0
  45. package/src/components/chat-tool/RLSChatTool.tsx +27 -0
  46. package/src/components/checkbox/RLACheckbox.astro +1 -0
  47. package/src/components/checkbox/RLSCheckbox.tsx +1 -1
  48. package/src/components/checkbox/checkbox.theme.ts +2 -2
  49. package/src/components/chip/RLSChip.tsx +65 -0
  50. package/src/components/collapsible/RLSCollapsible.tsx +89 -0
  51. package/src/components/color-area/RLSColorArea.tsx +554 -0
  52. package/src/components/color-field/RLSColorField.tsx +236 -0
  53. package/src/components/color-picker/RLSColorPicker.tsx +26 -0
  54. package/src/components/color-slider/RLSColorSlider.tsx +373 -0
  55. package/src/components/command-palette/RLSCommandPalette.tsx +26 -0
  56. package/src/components/compare/RLSCompare.tsx +26 -0
  57. package/src/components/confirm/RLSConfirm.tsx +173 -0
  58. package/src/components/container/RLSContainer.tsx +24 -0
  59. package/src/components/context-menu/RLSContextMenu.tsx +26 -0
  60. package/src/components/copy-markdown/RLSCopyMarkdown.tsx +57 -0
  61. package/src/components/dashboard-group/RLSDashboardGroup.tsx +29 -0
  62. package/src/components/dashboard-navbar/RLSDashboardNavbar.tsx +116 -0
  63. package/src/components/dashboard-panel/RLSDashboardPanel.tsx +84 -0
  64. package/src/components/dashboard-resize-handle/RLSDashboardResizeHandle.tsx +35 -0
  65. package/src/components/dashboard-search/RLADashboardSearch.astro +1 -1
  66. package/src/components/dashboard-search/RLSDashboardSearch.tsx +125 -0
  67. package/src/components/dashboard-search-button/RLSDashboardSearchButton.tsx +82 -0
  68. package/src/components/dashboard-sidebar/RLADashboardSidebar.astro +4 -4
  69. package/src/components/dashboard-sidebar/RLSDashboardSidebar.tsx +184 -0
  70. package/src/components/dashboard-sidebar-collapse/RLSDashboardSidebarCollapse.tsx +46 -0
  71. package/src/components/dashboard-sidebar-toggle/RLSDashboardSidebarToggle.tsx +35 -0
  72. package/src/components/dashboard-toolbar/RLSDashboardToolbar.tsx +49 -0
  73. package/src/components/date/RLSDate.tsx +34 -0
  74. package/src/components/dock/RLSDock.tsx +26 -0
  75. package/src/components/drawer/RLSDrawer.tsx +177 -0
  76. package/src/components/dropdown-menu/RLADropdownMenu.astro +250 -241
  77. package/src/components/dropdown-menu/RLSDropdownMenu.tsx +183 -86
  78. package/src/components/editor/RLSEditor.tsx +26 -0
  79. package/src/components/empty/RLSEmpty.tsx +132 -0
  80. package/src/components/error/RLSError.tsx +26 -0
  81. package/src/components/field-group/RLSFieldGroup.tsx +46 -0
  82. package/src/components/fieldset/RLSFieldset.tsx +26 -0
  83. package/src/components/file-upload/RLAFileUpload.astro +1 -1
  84. package/src/components/file-upload/RLSFileUpload.tsx +163 -0
  85. package/src/components/floating-action/RLSFloatingAction.tsx +26 -0
  86. package/src/components/footer/RLSFooter.tsx +56 -0
  87. package/src/components/form/RLSForm.tsx +34 -0
  88. package/src/components/gallery/RLSGallery.tsx +21 -0
  89. package/src/components/gamepad/RLSGamepad.tsx +269 -0
  90. package/src/components/grid/RLSGrid.tsx +29 -0
  91. package/src/components/head/RLAHead.astro +9 -0
  92. package/src/components/head/RLSHead.tsx +42 -0
  93. package/src/components/head/UIHead.astro +3 -0
  94. package/src/components/header/HeaderLayer.astro +1 -1
  95. package/src/components/header/RLSHeader.tsx +87 -0
  96. package/src/components/hover-card/RLSHoverCard.tsx +72 -0
  97. package/src/components/icon/RLSIcon.tsx +3 -1
  98. package/src/components/image/RLAImage.astro +447 -138
  99. package/src/components/image/RLSImage.tsx +545 -0
  100. package/src/components/image/image.theme.ts +19 -3
  101. package/src/components/image/image.ts +31 -1
  102. package/src/components/input/RLAInput.astro +62 -51
  103. package/src/components/input/RLSInput.tsx +1 -1
  104. package/src/components/input-date/RLSInputDate.tsx +92 -0
  105. package/src/components/input-menu/RLAInputMenu.astro +3 -3
  106. package/src/components/input-menu/RLSInputMenu.tsx +199 -0
  107. package/src/components/input-number/RLSInputNumber.tsx +184 -0
  108. package/src/components/input-pin/RLSInputPin.tsx +185 -0
  109. package/src/components/input-rating/RLAInputRating.astro +8 -8
  110. package/src/components/input-rating/RLSInputRating.tsx +198 -0
  111. package/src/components/input-rating/input-rating.ts +4 -0
  112. package/src/components/input-tags/RLSInputTags.tsx +94 -0
  113. package/src/components/input-time/RLSInputTime.tsx +92 -0
  114. package/src/components/kbd/RLSKbd.tsx +37 -0
  115. package/src/components/keyboard/RLSKeyboard.tsx +476 -0
  116. package/src/components/knob/RLSKnob.tsx +27 -0
  117. package/src/components/label/RLSLabel.tsx +27 -0
  118. package/src/components/layout-grid/RLALayoutGrid.astro +29 -29
  119. package/src/components/layout-grid/RLSLayoutGrid.tsx +402 -0
  120. package/src/components/layout-grid/layout-grid.ts +25 -1
  121. package/src/components/link/RLALink.astro +5 -5
  122. package/src/components/link/RLSLink.tsx +6 -5
  123. package/src/components/link/link.ts +21 -12
  124. package/src/components/link-group/RLSLinkGroup.tsx +76 -0
  125. package/src/components/listbox/RLSListbox.tsx +27 -0
  126. package/src/components/locale-selector/RLALocaleSelector.astro +110 -102
  127. package/src/components/locale-selector/RLSLocaleSelector.tsx +178 -0
  128. package/src/components/locale-selector/locale-selector.ts +2 -7
  129. package/src/components/logo/RLALogo.astro +153 -102
  130. package/src/components/logo/RLSLogo.tsx +129 -0
  131. package/src/components/main/RLSMain.tsx +40 -0
  132. package/src/components/marquee/RLSMarquee.tsx +80 -0
  133. package/src/components/meter/RLSMeter.tsx +27 -0
  134. package/src/components/modal/RLAModal.astro +1 -1
  135. package/src/components/modal/RLSModal.tsx +109 -72
  136. package/src/components/navigation-menu/RLANavigationMenu.astro +6 -6
  137. package/src/components/navigation-menu/RLSNavigationMenu.tsx +228 -0
  138. package/src/components/navigation-menu/navigation-menu.ts +2 -2
  139. package/src/components/package-managers/RLSPackageManagers.tsx +204 -0
  140. package/src/components/page/RLSPage.tsx +21 -0
  141. package/src/components/page-aside/RLSPageAside.tsx +21 -0
  142. package/src/components/page-body/RLSPageBody.tsx +21 -0
  143. package/src/components/page-header/RLSPageHeader.tsx +21 -0
  144. package/src/components/page-section/RLSPageSection.tsx +201 -0
  145. package/src/components/pagination/RLSPagination.tsx +114 -0
  146. package/src/components/password/RLSPassword.tsx +27 -0
  147. package/src/components/phone-mockup/RLSPhoneMockup.tsx +27 -0
  148. package/src/components/placeholder/RLSPlaceholder.tsx +47 -0
  149. package/src/components/popover/RLAPopover.astro +2 -2
  150. package/src/components/popover/RLSPopover.tsx +124 -0
  151. package/src/components/post/RLSPost.tsx +134 -0
  152. package/src/components/pricing-plan/RLSPricingPlan.tsx +26 -0
  153. package/src/components/pricing-table/RLSPricingTable.tsx +26 -0
  154. package/src/components/progress/RLSProgress.tsx +53 -0
  155. package/src/components/prose/RLSProse.tsx +26 -0
  156. package/src/components/qr-code/RLSQrCode.tsx +26 -0
  157. package/src/components/quote/RLAQuote.astro +10 -6
  158. package/src/components/quote/RLSQuote.tsx +37 -0
  159. package/src/components/quote/quote.theme.ts +5 -2
  160. package/src/components/radio-group/RLSRadioGroup.tsx +37 -0
  161. package/src/components/rating/RLSRating.tsx +27 -0
  162. package/src/components/scroll-area/RLAScrollArea.astro +1 -1
  163. package/src/components/scroll-area/RLSScrollArea.tsx +210 -0
  164. package/src/components/scroll-to-top/RLAScrollToTop.astro +5 -4
  165. package/src/components/scroll-to-top/RLSScrollToTop.tsx +145 -0
  166. package/src/components/search/RLASearch.astro +6 -6
  167. package/src/components/search/RLSSearch.tsx +237 -0
  168. package/src/components/select/RLASelect.astro +67 -4
  169. package/src/components/select/RLSSelect.tsx +107 -39
  170. package/src/components/select/RLVSelect.vue +50 -1
  171. package/src/components/select/select.theme.ts +30 -10
  172. package/src/components/select/select.ts +20 -1
  173. package/src/components/separator/RLSSeparator.tsx +92 -0
  174. package/src/components/share/RLSShare.tsx +66 -0
  175. package/src/components/shortcuts/RLAShortcuts.astro +2 -2
  176. package/src/components/shortcuts/RLSShortcuts.tsx +393 -0
  177. package/src/components/sidebar/RLASidebar.astro +1 -1
  178. package/src/components/sidebar/RLSSidebar.tsx +271 -0
  179. package/src/components/skeleton/RLSSkeleton.tsx +21 -0
  180. package/src/components/slideover/RLASlideover.astro +1 -1
  181. package/src/components/slideover/RLSSlideover.tsx +159 -0
  182. package/src/components/slider/RLSSlider.tsx +112 -0
  183. package/src/components/speed-dial/RLSSpeedDial.tsx +27 -0
  184. package/src/components/spinner/RLSSpinner.tsx +22 -0
  185. package/src/components/splitter/RLASplitter.astro +1 -1
  186. package/src/components/splitter/RLSSplitter.tsx +178 -0
  187. package/src/components/spoiler/RLSSpoiler.tsx +26 -0
  188. package/src/components/stepper/RLAStepper.astro +9 -9
  189. package/src/components/stepper/RLSStepper.tsx +205 -0
  190. package/src/components/steps/RLSSteps.tsx +108 -0
  191. package/src/components/sticky-surface/RLSStickySurface.tsx +63 -0
  192. package/src/components/surround/RLSSurround.tsx +57 -0
  193. package/src/components/switch/RLSSwitch.tsx +56 -0
  194. package/src/components/table/RLATable.astro +1044 -579
  195. package/src/components/table/RLSTable.tsx +893 -0
  196. package/src/components/table/table.theme.ts +47 -16
  197. package/src/components/table/table.ts +104 -66
  198. package/src/components/table-of-contents/RLSTableOfContents.tsx +196 -0
  199. package/src/components/tabs/RLATabs.astro +8 -8
  200. package/src/components/tabs/RLSTabs.tsx +298 -0
  201. package/src/components/textarea/RLATextarea.astro +1 -0
  202. package/src/components/textarea/RLSTextarea.tsx +3 -1
  203. package/src/components/theme-selector/RLAThemeSelector.astro +85 -56
  204. package/src/components/theme-selector/RLSThemeSelector.tsx +131 -0
  205. package/src/components/theme-selector/theme-selector.theme.ts +5 -7
  206. package/src/components/theme-selector/theme-selector.ts +11 -1
  207. package/src/components/timeline/RLSTimeline.tsx +171 -0
  208. package/src/components/toast/RLAToast.astro +2 -2
  209. package/src/components/toast/RLSToast.tsx +179 -0
  210. package/src/components/toaster/RLSToaster.tsx +82 -0
  211. package/src/components/tooltip/RLSTooltip.tsx +48 -0
  212. package/src/components/tour/RLSTour.tsx +26 -0
  213. package/src/components/tree/RLSTree.tsx +26 -0
  214. package/src/components/user/RLSUser.tsx +26 -0
  215. package/src/components/video/RLAVideo.astro +4 -1
  216. package/src/components/video/RLSVideo.tsx +158 -0
  217. package/src/components/watermark/RLSWatermark.tsx +27 -0
  218. package/src/components/window-mockup/RLSWindowMockup.tsx +27 -0
  219. package/src/preset.ts +73 -1
  220. package/src/resolver.ts +6 -1
  221. package/src/virtual.d.ts +6 -0
  222. package/dist/icons--RzV1RTU.d.mts +0 -72
@@ -0,0 +1,47 @@
1
+ import { createMemo, splitProps, type Component, type JSX } from "solid-js"
2
+ import type { PlaceholderProps } from "./placeholder"
3
+ import { placeholderTheme } from "./placeholder.theme"
4
+
5
+ export interface RLSPlaceholderProps extends PlaceholderProps {
6
+ children?: JSX.Element
7
+ }
8
+
9
+ const RLSPlaceholder: Component<RLSPlaceholderProps> = (allProps) => {
10
+ const [props, rest] = splitProps(allProps, ["ui", "class", "children"])
11
+
12
+ const classes = createMemo(() =>
13
+ placeholderTheme({
14
+ ui: props.ui,
15
+ class: props.class
16
+ })
17
+ )
18
+
19
+ return (
20
+ <div class={classes()["base"]} {...rest}>
21
+ <svg class={classes()["svg"]}>
22
+ <defs>
23
+ <pattern
24
+ id="pattern-5c1e4f0e-62d5-498b-8ff0-cf77bb448c8e"
25
+ x="0"
26
+ y="0"
27
+ width="10"
28
+ height="10"
29
+ patternUnits="userSpaceOnUse"
30
+ >
31
+ <path d="M-3 13 15-5M-5 5l18-18M-1 21 17 3" />
32
+ </pattern>
33
+ </defs>
34
+ <rect
35
+ stroke="none"
36
+ fill="url(#pattern-5c1e4f0e-62d5-498b-8ff0-cf77bb448c8e)"
37
+ width="100%"
38
+ height="100%"
39
+ />
40
+ </svg>
41
+
42
+ {props.children}
43
+ </div>
44
+ )
45
+ }
46
+
47
+ export default RLSPlaceholder
@@ -198,7 +198,7 @@ const popoverId = `rla-popover-${Math.random().toString(36).substring(2, 9)}`
198
198
  */
199
199
  function setupPopovers() {
200
200
  document.querySelectorAll<HTMLElement>('[data-slot="popover-container"]').forEach(container => {
201
- const mode = container.dataset.mode || 'both';
201
+ const mode = container.dataset["mode"] || 'both';
202
202
  const popoverId = container.querySelector<HTMLElement>('[data-slot="content"]')?.id;
203
203
  if (!popoverId) return;
204
204
 
@@ -248,7 +248,7 @@ const popoverId = `rla-popover-${Math.random().toString(36).substring(2, 9)}`
248
248
  const ph = panel.offsetHeight;
249
249
  if (pw === 0 || ph === 0) return; // closed or not yet rendered
250
250
 
251
- const parts = (container.dataset.placement || 'bottom').split('-');
251
+ const parts = (container.dataset["placement"] || 'bottom').split('-');
252
252
  const vert = parts[0]; // top | bottom
253
253
  const horiz = parts[1] || 'center'; // start | end | center
254
254
  const gap = 8;
@@ -0,0 +1,124 @@
1
+ import {
2
+ createMemo,
3
+ createSignal,
4
+ splitProps,
5
+ Show,
6
+ onMount,
7
+ onCleanup,
8
+ type Component,
9
+ type JSX
10
+ } from "solid-js"
11
+ import type { PopoverProps } from "./popover"
12
+ import { popoverTheme } from "./popover.theme"
13
+
14
+ export interface RLSPopoverProps extends PopoverProps {
15
+ children?: JSX.Element
16
+ trigger?: JSX.Element
17
+ defaultOpen?: boolean
18
+ onOpenChange?: (open: boolean) => void
19
+ }
20
+
21
+ const RLSPopover: Component<RLSPopoverProps> = (allProps) => {
22
+ const [props, rest] = splitProps(allProps, [
23
+ "open",
24
+ "defaultOpen",
25
+ "triggerLabel",
26
+ "placement",
27
+ "mode",
28
+ "ui",
29
+ "class",
30
+ "children",
31
+ "trigger",
32
+ "onOpenChange"
33
+ ])
34
+
35
+ const [isOpen, setIsOpen] = createSignal(props.open ?? props.defaultOpen ?? false)
36
+ const [isHovered, setIsHovered] = createSignal(false)
37
+
38
+ const mode = () => props.mode ?? "both"
39
+ const isVisible = () => isOpen() || isHovered()
40
+
41
+ let containerRef: HTMLDivElement | undefined
42
+ let hoverTimer: ReturnType<typeof setTimeout> | undefined
43
+
44
+ const handleOpenChange = (next: boolean) => {
45
+ setIsOpen(next)
46
+ props.onOpenChange?.(next)
47
+ }
48
+
49
+ const handleHoverShow = () => {
50
+ if (hoverTimer) clearTimeout(hoverTimer)
51
+ setIsHovered(true)
52
+ }
53
+
54
+ const handleHoverHide = () => {
55
+ if (hoverTimer) clearTimeout(hoverTimer)
56
+ hoverTimer = setTimeout(() => {
57
+ setIsHovered(false)
58
+ }, 150)
59
+ }
60
+
61
+ onMount(() => {
62
+ const handleOutsideClick = (e: MouseEvent) => {
63
+ if (isOpen() && containerRef && !containerRef.contains(e.target as Node)) {
64
+ handleOpenChange(false)
65
+ }
66
+ }
67
+ document.addEventListener("click", handleOutsideClick)
68
+ onCleanup(() => document.removeEventListener("click", handleOutsideClick))
69
+ })
70
+
71
+ onCleanup(() => {
72
+ if (hoverTimer) clearTimeout(hoverTimer)
73
+ })
74
+
75
+ const resolvedClasses = createMemo(() =>
76
+ popoverTheme({
77
+ placement: props.placement ?? "bottom",
78
+ ui: props.ui,
79
+ class: props.class
80
+ })
81
+ )
82
+
83
+ return (
84
+ <div
85
+ ref={(el) => (containerRef = el)}
86
+ class={`rla-popover-host ${resolvedClasses().root}`}
87
+ data-slot="popover-container"
88
+ data-placement={props.placement ?? "bottom"}
89
+ data-mode={mode()}
90
+ {...rest}
91
+ >
92
+ <div
93
+ class={resolvedClasses().trigger}
94
+ data-slot="trigger"
95
+ onClick={(e) => {
96
+ e.stopPropagation()
97
+ if (mode() === "click" || mode() === "both") handleOpenChange(!isOpen())
98
+ }}
99
+ onMouseEnter={() => {
100
+ if (mode() === "hover" || mode() === "both") handleHoverShow()
101
+ }}
102
+ onMouseLeave={() => {
103
+ if (mode() === "hover" || mode() === "both") handleHoverHide()
104
+ }}
105
+ >
106
+ {props.trigger ? (
107
+ props.trigger
108
+ ) : props.triggerLabel ? (
109
+ <button type="button" class="cursor-pointer">
110
+ {props.triggerLabel}
111
+ </button>
112
+ ) : null}
113
+ </div>
114
+
115
+ <Show when={isVisible()}>
116
+ <div class={resolvedClasses().content} data-slot="content">
117
+ {props.children}
118
+ </div>
119
+ </Show>
120
+ </div>
121
+ )
122
+ }
123
+
124
+ export default RLSPopover
@@ -0,0 +1,134 @@
1
+ import { createMemo, splitProps, type Component, type JSX } from "solid-js"
2
+ import type { PostProps } from "./post"
3
+ import { postTheme } from "./post.theme"
4
+ import RLSBadge from "../badge/RLSBadge"
5
+
6
+ export interface RLSPostProps extends PostProps {
7
+ children?: JSX.Element
8
+ imageSlot?: JSX.Element
9
+ titleSlot?: JSX.Element
10
+ descriptionSlot?: JSX.Element
11
+ badgeSlot?: JSX.Element
12
+ dateSlot?: JSX.Element
13
+ footerSlot?: JSX.Element
14
+ }
15
+
16
+ const RLSPost: Component<RLSPostProps> = (allProps) => {
17
+ const [props, rest] = splitProps(allProps, [
18
+ "title",
19
+ "description",
20
+ "date",
21
+ "image",
22
+ "to",
23
+ "badge",
24
+ "badgeColor",
25
+ "variant",
26
+ "orientation",
27
+ "ui",
28
+ "class",
29
+ "children",
30
+ "imageSlot",
31
+ "titleSlot",
32
+ "descriptionSlot",
33
+ "badgeSlot",
34
+ "dateSlot",
35
+ "footerSlot"
36
+ ])
37
+
38
+ const classes = createMemo(() =>
39
+ postTheme({
40
+ variant: props.variant ?? "soft",
41
+ orientation: props.orientation ?? "vertical",
42
+ ui: props.ui,
43
+ class: props.class
44
+ })
45
+ )
46
+
47
+ const formattedDate = props.date
48
+ ? props.date instanceof Date
49
+ ? props.date.toLocaleDateString()
50
+ : props.date
51
+ : null
52
+
53
+ const imageSrc = () =>
54
+ typeof props.image === "string"
55
+ ? props.image
56
+ : (props.image as { src?: string } | undefined)?.src
57
+
58
+ const body = () => (
59
+ <>
60
+ {props.imageSlot !== undefined ? (
61
+ props.imageSlot
62
+ ) : props.image ? (
63
+ <div class={classes()["imageWrapper"]} data-slot="image-wrapper">
64
+ <img
65
+ src={imageSrc()}
66
+ alt={props.title || ""}
67
+ class={classes()["image"]}
68
+ data-slot="image"
69
+ />
70
+ </div>
71
+ ) : null}
72
+
73
+ <div class={classes()["content"]} data-slot="content">
74
+ {props.titleSlot !== undefined ? (
75
+ props.titleSlot
76
+ ) : props.title ? (
77
+ <h3 class={classes()["title"]} data-slot="title">
78
+ {props.title}
79
+ </h3>
80
+ ) : null}
81
+
82
+ {props.descriptionSlot !== undefined ? (
83
+ props.descriptionSlot
84
+ ) : props.description ? (
85
+ <p class={classes()["description"]} data-slot="description">
86
+ {props.description}
87
+ </p>
88
+ ) : null}
89
+
90
+ {props.badgeSlot !== undefined ? (
91
+ props.badgeSlot
92
+ ) : props.badge ? (
93
+ <RLSBadge
94
+ color={(props.badgeColor ?? "primary") as any}
95
+ size="sm"
96
+ shape="pill"
97
+ class={classes()["badge"]}
98
+ data-slot="badge"
99
+ >
100
+ {props.badge}
101
+ </RLSBadge>
102
+ ) : null}
103
+
104
+ {props.dateSlot !== undefined ? (
105
+ props.dateSlot
106
+ ) : formattedDate ? (
107
+ <time class={classes()["date"]} data-slot="date">
108
+ {formattedDate}
109
+ </time>
110
+ ) : null}
111
+
112
+ {props.children}
113
+ </div>
114
+
115
+ {props.footerSlot !== undefined && (
116
+ <div class={classes()["footer"]} data-slot="footer">
117
+ {props.footerSlot}
118
+ </div>
119
+ )}
120
+ </>
121
+ )
122
+
123
+ return props.to ? (
124
+ <a href={props.to} class={classes()["root"]} data-slot="root" {...rest}>
125
+ {body()}
126
+ </a>
127
+ ) : (
128
+ <div class={classes()["root"]} data-slot="root" {...rest}>
129
+ {body()}
130
+ </div>
131
+ )
132
+ }
133
+
134
+ export default RLSPost
@@ -0,0 +1,26 @@
1
+ import { createMemo, splitProps, type Component, type JSX } from "solid-js"
2
+ import type { PricingPlanProps } from "./pricing-plan"
3
+ import { pricingPlanTheme } from "./pricing-plan.theme"
4
+
5
+ export interface RLSPricingPlanProps extends PricingPlanProps {
6
+ children?: JSX.Element
7
+ }
8
+
9
+ const RLSPricingPlan: Component<RLSPricingPlanProps> = (allProps) => {
10
+ const [props, rest] = splitProps(allProps, ["ui", "class", "children"])
11
+
12
+ const resolvedClasses = createMemo(() =>
13
+ pricingPlanTheme({
14
+ ui: props.ui,
15
+ class: props.class
16
+ })
17
+ )
18
+
19
+ return (
20
+ <div class={resolvedClasses().root} data-slot="root" {...rest}>
21
+ {props.children}
22
+ </div>
23
+ )
24
+ }
25
+
26
+ export default RLSPricingPlan
@@ -0,0 +1,26 @@
1
+ import { createMemo, splitProps, type Component, type JSX } from "solid-js"
2
+ import type { PricingTableProps } from "./pricing-table"
3
+ import { pricingTableTheme } from "./pricing-table.theme"
4
+
5
+ export interface RLSPricingTableProps extends PricingTableProps {
6
+ children?: JSX.Element
7
+ }
8
+
9
+ const RLSPricingTable: Component<RLSPricingTableProps> = (allProps) => {
10
+ const [props, rest] = splitProps(allProps, ["ui", "class", "children"])
11
+
12
+ const resolvedClasses = createMemo(() =>
13
+ pricingTableTheme({
14
+ ui: props.ui,
15
+ class: props.class
16
+ })
17
+ )
18
+
19
+ return (
20
+ <div class={resolvedClasses().root} data-slot="root" {...rest}>
21
+ {props.children}
22
+ </div>
23
+ )
24
+ }
25
+
26
+ export default RLSPricingTable
@@ -0,0 +1,53 @@
1
+ import { createMemo, splitProps, type Component, type JSX } from "solid-js"
2
+ import type { ProgressProps } from "./progress"
3
+ import { progressTheme } from "./progress.theme"
4
+
5
+ export interface RLSProgressProps extends ProgressProps {
6
+ children?: JSX.Element
7
+ }
8
+
9
+ const RLSProgress: Component<RLSProgressProps> = (allProps) => {
10
+ const [props, rest] = splitProps(allProps, [
11
+ "value",
12
+ "max",
13
+ "theme",
14
+ "color",
15
+ "ui",
16
+ "class",
17
+ "children"
18
+ ])
19
+
20
+ const value = () => props.value ?? 0
21
+ const max = () => props.max ?? 100
22
+ const percentage = createMemo(() => Math.min(100, Math.max(0, (value() / max()) * 100)))
23
+
24
+ const resolvedClasses = createMemo(() =>
25
+ progressTheme({
26
+ color: props.color,
27
+ ui: props.ui,
28
+ class: props.class
29
+ })
30
+ )
31
+
32
+ return (
33
+ <div
34
+ class={resolvedClasses().root}
35
+ data-slot="progress-root"
36
+ role="progressbar"
37
+ aria-valuemin={0}
38
+ aria-valuemax={max()}
39
+ aria-valuenow={value()}
40
+ data-theme={props.theme}
41
+ {...rest}
42
+ >
43
+ <div
44
+ class={resolvedClasses().indicator}
45
+ data-slot="indicator"
46
+ style={{ transform: `translateX(-${100 - percentage()}%)` }}
47
+ />
48
+ {props.children}
49
+ </div>
50
+ )
51
+ }
52
+
53
+ export default RLSProgress
@@ -0,0 +1,26 @@
1
+ import { createMemo, splitProps, type Component, type JSX } from "solid-js"
2
+ import type { ProseProps } from "./prose"
3
+ import { proseTheme } from "./prose.theme"
4
+
5
+ export interface RLSProseProps extends ProseProps {
6
+ children?: JSX.Element
7
+ }
8
+
9
+ const RLSProse: Component<RLSProseProps> = (allProps) => {
10
+ const [props, rest] = splitProps(allProps, ["ui", "class", "children"])
11
+
12
+ const classes = createMemo(() =>
13
+ proseTheme({
14
+ ui: props.ui,
15
+ class: props.class
16
+ })
17
+ )
18
+
19
+ return (
20
+ <div class={classes()["root"]} data-slot="root" {...rest}>
21
+ {props.children}
22
+ </div>
23
+ )
24
+ }
25
+
26
+ export default RLSProse
@@ -0,0 +1,26 @@
1
+ import { createMemo, splitProps, type Component, type JSX } from "solid-js"
2
+ import type { QrCodeProps } from "./qr-code"
3
+ import { qrCodeTheme } from "./qr-code.theme"
4
+
5
+ export interface RLSQrCodeProps extends QrCodeProps {
6
+ children?: JSX.Element
7
+ }
8
+
9
+ const RLSQrCode: Component<RLSQrCodeProps> = (allProps) => {
10
+ const [props, rest] = splitProps(allProps, ["ui", "class", "children"])
11
+
12
+ const resolvedClasses = createMemo(() =>
13
+ qrCodeTheme({
14
+ ui: props.ui,
15
+ class: props.class
16
+ })
17
+ )
18
+
19
+ return (
20
+ <div class={resolvedClasses().root} data-slot="root" {...rest}>
21
+ {props.children}
22
+ </div>
23
+ )
24
+ }
25
+
26
+ export default RLSQrCode
@@ -1,15 +1,19 @@
1
1
  ---
2
2
  import RLAIcon from "../icon/RLAIcon.astro"
3
+ import type { QuoteProps } from "./quote"
4
+ import { quoteTheme } from "./quote.theme"
5
+
6
+ export interface Props extends QuoteProps {}
7
+
8
+ const classes = quoteTheme(Astro.props)
3
9
  ---
4
10
 
5
- <figure class="relative my-8 border-y-[3px] border-astro-gray-500 py-4">
6
- <RLAIcon name="quote" class="mb-2 s-10 md:absolute md:right-[calc(100%+1rem)] md:top-6" />
7
- <blockquote
8
- class="font-heading heading-3 text-xl font-medium text-white md:text-[32px] md:leading-[40px]"
9
- >
11
+ <figure class={classes.root} data-slot="root" {...Astro.props}>
12
+ <RLAIcon name="quote" class={classes.icon} data-slot="icon" />
13
+ <blockquote class={classes.quote} data-slot="quote">
10
14
  <slot name="quote" />
11
15
  </blockquote>
12
- <figcaption class="font-mono mt-4 text-right text-astro-pink-light">
16
+ <figcaption class={classes.caption} data-slot="caption">
13
17
  <slot name="caption" />
14
18
  </figcaption>
15
19
  </figure>
@@ -0,0 +1,37 @@
1
+ import { createMemo, splitProps, type Component, type JSX } from "solid-js"
2
+ import type { QuoteProps } from "./quote"
3
+ import { quoteTheme } from "./quote.theme"
4
+ import RLSIcon from "../icon/RLSIcon"
5
+
6
+ export interface RLSQuoteProps extends QuoteProps {
7
+ children?: JSX.Element
8
+ quote?: JSX.Element
9
+ caption?: JSX.Element
10
+ }
11
+
12
+ const RLSQuote: Component<RLSQuoteProps> = (allProps) => {
13
+ const [props, rest] = splitProps(allProps, ["quote", "caption", "children", "ui", "class"])
14
+
15
+ const resolvedClasses = createMemo(() =>
16
+ quoteTheme({
17
+ ui: props.ui,
18
+ class: props.class
19
+ })
20
+ )
21
+
22
+ return (
23
+ <figure class={resolvedClasses().root} data-slot="root" {...rest}>
24
+ <RLSIcon name="quote" class={resolvedClasses().icon} data-slot="icon" />
25
+ <blockquote class={resolvedClasses().quote} data-slot="quote">
26
+ {props.quote !== undefined ? props.quote : props.children}
27
+ </blockquote>
28
+ {props.caption ? (
29
+ <figcaption class={resolvedClasses().caption} data-slot="caption">
30
+ {props.caption}
31
+ </figcaption>
32
+ ) : null}
33
+ </figure>
34
+ )
35
+ }
36
+
37
+ export default RLSQuote
@@ -1,9 +1,12 @@
1
1
  import { defineTheme } from "../../resolver"
2
2
 
3
3
  export const quoteTheme = defineTheme("quote", {
4
- slots: ["root"],
4
+ slots: ["root", "icon", "quote", "caption"],
5
5
  base: {
6
- root: ""
6
+ root: "relative my-8 border-y-[3px] border-astro-gray-500 py-4",
7
+ icon: "mb-2 s-10 md:absolute md:right-[calc(100%+1rem)] md:top-6",
8
+ quote: "font-heading heading-3 text-xl font-medium text-white md:text-[32px] md:leading-[40px]",
9
+ caption: "font-mono mt-4 text-right text-astro-pink-light"
7
10
  },
8
11
  variants: {},
9
12
  defaultVariants: {}
@@ -0,0 +1,37 @@
1
+ import { createMemo, splitProps, type Component, type JSX } from "solid-js"
2
+ import type { RadioGroupProps } from "./radio-group"
3
+ import { radioGroupTheme } from "./radio-group.theme"
4
+
5
+ export interface RLSRadioGroupProps extends RadioGroupProps {
6
+ children?: JSX.Element
7
+ }
8
+
9
+ const RLSRadioGroup: Component<RLSRadioGroupProps> = (allProps) => {
10
+ const [props, rest] = splitProps(allProps, [
11
+ "ui",
12
+ "class",
13
+ "children",
14
+ "checked",
15
+ "disabled",
16
+ "name",
17
+ "label",
18
+ "value",
19
+ "trailing"
20
+ ])
21
+
22
+ const resolvedClasses = createMemo(() =>
23
+ radioGroupTheme({
24
+ ui: props.ui,
25
+ class: props.class,
26
+ ...allProps
27
+ })
28
+ )
29
+
30
+ return (
31
+ <div class={resolvedClasses().root} data-slot="root" {...rest}>
32
+ {props.children}
33
+ </div>
34
+ )
35
+ }
36
+
37
+ export default RLSRadioGroup
@@ -0,0 +1,27 @@
1
+ import { createMemo, splitProps, type Component, type JSX } from "solid-js"
2
+ import type { RatingProps } from "./rating"
3
+ import { ratingTheme } from "./rating.theme"
4
+
5
+ export interface RLSRatingProps extends RatingProps {
6
+ children?: JSX.Element
7
+ }
8
+
9
+ const RLSRating: Component<RLSRatingProps> = (allProps) => {
10
+ const [props, rest] = splitProps(allProps, ["ui", "class", "children"])
11
+
12
+ const resolvedClasses = createMemo(() =>
13
+ ratingTheme({
14
+ ui: props.ui,
15
+ class: props.class,
16
+ ...allProps
17
+ })
18
+ )
19
+
20
+ return (
21
+ <div class={resolvedClasses().root} data-slot="root" {...rest}>
22
+ {props.children}
23
+ </div>
24
+ )
25
+ }
26
+
27
+ export default RLSRating
@@ -66,7 +66,7 @@ const heightStyle = height
66
66
  const viewport = area.querySelector("[data-scroll-viewport]") as HTMLElement | null;
67
67
  if (!viewport) return;
68
68
 
69
- const hideDelay = parseInt((area as HTMLElement).dataset.hideDelay ?? "600", 10);
69
+ const hideDelay = parseInt((area as HTMLElement).dataset["hideDelay"] ?? "600", 10);
70
70
 
71
71
  const vBar = area.querySelector("[data-scroll-bar='vertical']") as HTMLElement | null;
72
72
  const hBar = area.querySelector("[data-scroll-bar='horizontal']") as HTMLElement | null;