@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
@@ -0,0 +1,158 @@
1
+ import { createMemo, createSignal, Show, splitProps, type Component, type JSX } from "solid-js"
2
+ import type { VideoProps } from "./video"
3
+ import { videoTheme } from "./video.theme"
4
+ import RLSIcon from "../icon/RLSIcon"
5
+
6
+ export interface RLSVideoProps extends VideoProps {
7
+ children?: JSX.Element
8
+ thumbnail?: string
9
+ iconSlot?: JSX.Element
10
+ transcriptSlot?: JSX.Element
11
+ }
12
+
13
+ const PLACEHOLDER_THUMBNAIL = "/assets/placeholder.webp"
14
+ const YOUTUBE_EMBED_BASE = "https://www.youtube.com/embed/"
15
+ const VALID_ID_PATTERN = /^[\w-]{11}$/
16
+ const KNOWN_PREFIXES = ["www.", "m.", "music.", "gaming."]
17
+ const YOUTUBE_THUMB_BASE = "https://i3.ytimg.com/vi/"
18
+
19
+ function normalizeHost(host: string): string {
20
+ for (const prefix of KNOWN_PREFIXES) {
21
+ if (host.startsWith(prefix)) {
22
+ return host.slice(prefix.length)
23
+ }
24
+ }
25
+ return host
26
+ }
27
+
28
+ function sanitizeVideoId(id: string | null): string | null {
29
+ if (!id) return null
30
+ return VALID_ID_PATTERN.test(id) ? id : null
31
+ }
32
+
33
+ function extractYoutubeVideoId(rawUrl: string): string | null {
34
+ if (!rawUrl) return null
35
+ try {
36
+ const url = new URL(rawUrl)
37
+ const host = normalizeHost(url.hostname)
38
+
39
+ if (host === "youtu.be") {
40
+ const id = url.pathname.split("/").find(Boolean) ?? null
41
+ return sanitizeVideoId(id)
42
+ }
43
+
44
+ if (host.endsWith("youtube.com")) {
45
+ const paramsId = sanitizeVideoId(url.searchParams.get("v"))
46
+ if (paramsId) return paramsId
47
+
48
+ const segments = url.pathname.split("/").filter(Boolean)
49
+ if (!segments.length) return null
50
+
51
+ if (segments[0] === "embed" || segments[0] === "shorts" || segments[0] === "live") {
52
+ return sanitizeVideoId(segments[1] ?? null)
53
+ }
54
+
55
+ return sanitizeVideoId(segments[segments.length - 1] ?? null)
56
+ }
57
+ } catch {
58
+ if (VALID_ID_PATTERN.test(rawUrl)) {
59
+ return rawUrl
60
+ }
61
+ return null
62
+ }
63
+ return null
64
+ }
65
+
66
+ const RLSVideo: Component<RLSVideoProps> = (allProps) => {
67
+ const [props, rest] = splitProps(allProps, [
68
+ "src",
69
+ "title",
70
+ "icon",
71
+ "thumbnail",
72
+ "iconSlot",
73
+ "transcriptSlot",
74
+ "ui",
75
+ "class",
76
+ "children"
77
+ ])
78
+
79
+ const [isPlaying, setIsPlaying] = createSignal(false)
80
+
81
+ const videoId = createMemo(() => extractYoutubeVideoId(props.src || ""))
82
+ const embedUrl = createMemo(() =>
83
+ videoId() ? `${YOUTUBE_EMBED_BASE}${videoId()}?autoplay=1` : null
84
+ )
85
+ const defaultThumbnail = createMemo(() =>
86
+ videoId() ? `${YOUTUBE_THUMB_BASE}${videoId()}/hqdefault.jpg` : PLACEHOLDER_THUMBNAIL
87
+ )
88
+
89
+ const titleText = () => props.title || "YouTube Video Player"
90
+ const iconName = () => props.icon || "play"
91
+ const isPlayable = () => Boolean(embedUrl())
92
+
93
+ const resolvedClasses = createMemo(() =>
94
+ videoTheme({
95
+ title: !!props.title,
96
+ icon: !!props.icon,
97
+ ui: props.ui,
98
+ class: props.class
99
+ })
100
+ )
101
+
102
+ return (
103
+ <div>
104
+ <div class={resolvedClasses().root} data-slot="root" {...rest}>
105
+ <Show
106
+ when={isPlaying() && embedUrl()}
107
+ fallback={
108
+ <button
109
+ type="button"
110
+ class={resolvedClasses().trigger}
111
+ data-slot="trigger"
112
+ aria-label={isPlayable() ? "Play YouTube Video" : "YouTube Video Unavailable"}
113
+ disabled={!isPlayable()}
114
+ onClick={() => setIsPlaying(true)}
115
+ >
116
+ <img
117
+ src={props.thumbnail || defaultThumbnail()}
118
+ alt={titleText()}
119
+ loading="lazy"
120
+ class={resolvedClasses().image}
121
+ data-slot="image"
122
+ />
123
+
124
+ {props.iconSlot !== undefined ? (
125
+ props.iconSlot
126
+ ) : (
127
+ <RLSIcon
128
+ name={iconName()}
129
+ class={resolvedClasses().icon}
130
+ data-slot="icon"
131
+ aria-hidden="true"
132
+ />
133
+ )}
134
+ </button>
135
+ }
136
+ >
137
+ <iframe
138
+ src={embedUrl()!}
139
+ title={titleText()}
140
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
141
+ allowfullscreen
142
+ loading="lazy"
143
+ referrerpolicy="strict-origin-when-cross-origin"
144
+ class="w-full h-full absolute inset-0 border-0"
145
+ />
146
+ </Show>
147
+ </div>
148
+
149
+ <Show when={props.transcriptSlot !== undefined || props.children !== undefined}>
150
+ <div class="mt-2 text-sm text-zinc-400" data-slot="transcript">
151
+ {props.transcriptSlot !== undefined ? props.transcriptSlot : props.children}
152
+ </div>
153
+ </Show>
154
+ </div>
155
+ )
156
+ }
157
+
158
+ export default RLSVideo
@@ -0,0 +1,27 @@
1
+ import { createMemo, splitProps, type Component, type JSX } from "solid-js"
2
+ import type { WatermarkProps } from "./watermark"
3
+ import { watermarkTheme } from "./watermark.theme"
4
+
5
+ export interface RLSWatermarkProps extends WatermarkProps {
6
+ children?: JSX.Element
7
+ }
8
+
9
+ const RLSWatermark: Component<RLSWatermarkProps> = (allProps) => {
10
+ const [props, rest] = splitProps(allProps, ["ui", "class", "children"])
11
+
12
+ const resolvedClasses = createMemo(() =>
13
+ watermarkTheme({
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 RLSWatermark
@@ -0,0 +1,27 @@
1
+ import { createMemo, splitProps, type Component, type JSX } from "solid-js"
2
+ import type { WindowMockupProps } from "./window-mockup"
3
+ import { windowMockupTheme } from "./window-mockup.theme"
4
+
5
+ export interface RLSWindowMockupProps extends WindowMockupProps {
6
+ children?: JSX.Element
7
+ }
8
+
9
+ const RLSWindowMockup: Component<RLSWindowMockupProps> = (allProps) => {
10
+ const [props, rest] = splitProps(allProps, ["ui", "class", "children"])
11
+
12
+ const resolvedClasses = createMemo(() =>
13
+ windowMockupTheme({
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 RLSWindowMockup
package/src/preset.ts CHANGED
@@ -141,7 +141,79 @@ export default function rimelightUiPreset({ colors, icons, presets = {} }: UICon
141
141
  }
142
142
  [data-theme="dark"] { color-scheme: dark; }
143
143
  [data-theme="light"] { color-scheme: light; }
144
- body { background-color: var(--rl-neutral-50); color: var(--rl-neutral-950); }`
144
+ body { background-color: var(--rl-neutral-50); color: var(--rl-neutral-950); }
145
+
146
+ /* Reduced motion - disable all animations for users who prefer it */
147
+ @media (prefers-reduced-motion: reduce) {
148
+ *,
149
+ *::before,
150
+ *::after {
151
+ animation-duration: 0.01ms !important;
152
+ animation-iteration-count: 1 !important;
153
+ transition-duration: 0.01ms !important;
154
+ scroll-behavior: auto !important;
155
+ }
156
+ }
157
+
158
+ /* Global focus-visible ring for consistent keyboard focus */
159
+ :focus-visible {
160
+ outline: 2px solid var(--rl-primary-500);
161
+ outline-offset: 2px;
162
+ }
163
+
164
+ /* Ensure minimum touch target sizes (WCAG 2.2 - 24x24 minimum, 44x44 enhanced) */
165
+ button:not(:disabled),
166
+ [role="button"]:not(:disabled),
167
+ a[href],
168
+ input:not([type="hidden"]),
169
+ select,
170
+ textarea,
171
+ summary {
172
+ min-width: 24px;
173
+ min-height: 24px;
174
+ }
175
+
176
+ /* Enhanced touch targets for primary interactive elements */
177
+ @media (pointer: coarse) {
178
+ button:not(:disabled),
179
+ [role="button"]:not(:disabled),
180
+ a[href] {
181
+ min-width: 44px;
182
+ min-height: 44px;
183
+ }
184
+ }
185
+
186
+ /* Improve skip link visibility */
187
+ .skip-link:focus-visible {
188
+ position: absolute;
189
+ top: 1rem;
190
+ left: 1rem;
191
+ z-index: 9999;
192
+ padding: 0.75rem 1.5rem;
193
+ background: var(--rl-primary-600);
194
+ color: white;
195
+ border-radius: 0.5rem;
196
+ font-weight: 600;
197
+ text-decoration: none;
198
+ }
199
+
200
+ @keyframes carousel {
201
+ 0% { transform: translateX(-100%); }
202
+ 100% { transform: translateX(350%); }
203
+ }
204
+ @keyframes carousel-inverse {
205
+ 0% { transform: translateX(350%); }
206
+ 100% { transform: translateX(-100%); }
207
+ }
208
+ @keyframes swing {
209
+ 0%, 100% { transform: translateX(-50%); }
210
+ 50% { transform: translateX(250%); }
211
+ }
212
+ @keyframes elastic {
213
+ 0% { transform: scaleX(0.1) translateX(-100%); }
214
+ 50% { transform: scaleX(0.7) translateX(100%); }
215
+ 100% { transform: scaleX(0.1) translateX(350%); }
216
+ }`
145
217
  }
146
218
  ]
147
219
  }
package/src/resolver.ts CHANGED
@@ -76,7 +76,12 @@ export function defineTheme<const S extends string>(name: string, themeConfig: T
76
76
  res[slots[i]!] = baseMap[slots[i]!] || ""
77
77
  }
78
78
 
79
- const values = { ...defaultVariants, ...props }
79
+ const values: Record<string, any> = { ...defaultVariants }
80
+ for (const k in props) {
81
+ if (props[k] !== undefined) {
82
+ values[k] = props[k]
83
+ }
84
+ }
80
85
  const color = autoColor ? (props.color ?? defaultVariants.color) : undefined
81
86
 
82
87
  for (let k = 0; k < variantKeys.length; k++) {
package/src/virtual.d.ts CHANGED
@@ -2,3 +2,9 @@ declare module "virtual:rimelight/ui" {
2
2
  import type { UIConfig } from "./types"
3
3
  export default {} as UIConfig
4
4
  }
5
+
6
+ declare module "*.vue" {
7
+ import type { DefineComponent } from "vue"
8
+ const component: DefineComponent<Record<string, any>, Record<string, any>, any>
9
+ export default component
10
+ }