@rimelight/ui 0.0.43 → 0.0.45

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 (154) hide show
  1. package/README.md +14 -12
  2. package/package.json +8 -10
  3. package/src/components/avatar/RLAAvatar.astro +4 -12
  4. package/src/components/badge/RLABadge.astro +2 -1
  5. package/src/components/badge/badge.theme.ts +0 -4
  6. package/src/components/banner/RLABanner.astro +1 -1
  7. package/src/components/banner/banner.theme.ts +1 -1
  8. package/src/components/breadcrumb/RLABreadcrumb.astro +2 -2
  9. package/src/components/button/RLAButton.astro +4 -1
  10. package/src/components/button/RLSButton.tsx +1 -1
  11. package/src/components/button/button.theme.ts +1 -5
  12. package/src/components/callout/RLACallout.astro +7 -5
  13. package/src/components/callout/callout.theme.ts +1 -5
  14. package/src/components/card/card.theme.ts +3 -3
  15. package/src/components/carousel/RLACarousel.astro +2 -2
  16. package/src/components/carousel/carousel.theme.ts +2 -2
  17. package/src/components/chart/RLAChart.astro +1 -1
  18. package/src/components/checkbox/RLACheckbox.astro +2 -1
  19. package/src/components/checkbox/checkbox.theme.ts +0 -4
  20. package/src/components/chip/RLAChip.astro +2 -1
  21. package/src/components/chip/chip.theme.ts +0 -4
  22. package/src/components/collapsible/RLACollapsible.astro +1 -1
  23. package/src/components/color-area/RLAColorArea.astro +1 -0
  24. package/src/components/color-area/color-area.theme.ts +1 -5
  25. package/src/components/color-field/RLAColorField.astro +1 -0
  26. package/src/components/color-field/color-field.theme.ts +1 -5
  27. package/src/components/color-slider/RLAColorSlider.astro +1 -0
  28. package/src/components/color-slider/color-slider.theme.ts +1 -5
  29. package/src/components/dashboard-group/RLADashboardGroup.astro +5 -7
  30. package/src/components/dashboard-group/dashboard-group.theme.ts +1 -1
  31. package/src/components/dashboard-group/dashboard-group.ts +1 -1
  32. package/src/components/dashboard-navbar/RLADashboardNavbar.astro +4 -4
  33. package/src/components/dashboard-navbar/dashboard-navbar.theme.ts +3 -3
  34. package/src/components/dashboard-navbar/dashboard-navbar.ts +1 -1
  35. package/src/components/dashboard-panel/RLADashboardPanel.astro +9 -8
  36. package/src/components/dashboard-panel/dashboard-panel.theme.ts +1 -1
  37. package/src/components/dashboard-sidebar/RLADashboardSidebar.astro +52 -20
  38. package/src/components/dashboard-sidebar/dashboard-sidebar.theme.ts +6 -5
  39. package/src/components/dashboard-sidebar-collapse/RLADashboardSidebarCollapse.astro +1 -0
  40. package/src/components/drawer/RLADrawer.astro +1 -1
  41. package/src/components/dropdown-menu/dropdown-menu.theme.ts +2 -2
  42. package/src/components/footer/RLAFooter.astro +2 -0
  43. package/src/components/footer/footer.theme.ts +0 -8
  44. package/src/components/gamepad/RLAGamepad.astro +1 -1
  45. package/src/components/head/UIHead.astro +1 -2
  46. package/src/components/header/header.theme.ts +1 -1
  47. package/src/components/icon/RLAIcon.astro +2 -5
  48. package/src/components/icon/RLSIcon.tsx +2 -2
  49. package/src/components/icon/RLVIcon.vue +18 -6
  50. package/src/components/icon/icon.theme.ts +1 -1
  51. package/src/components/image/image.theme.ts +1 -1
  52. package/src/components/input/RLAInput.astro +2 -1
  53. package/src/components/input/input.theme.ts +0 -4
  54. package/src/components/input-menu/RLAInputMenu.astro +2 -2
  55. package/src/components/input-menu/input-menu.theme.ts +1 -1
  56. package/src/components/input-rating/input-rating.theme.ts +2 -2
  57. package/src/components/kbd/RLAKbd.astro +2 -1
  58. package/src/components/kbd/kbd.theme.ts +0 -4
  59. package/src/components/keyboard/RLAKeyboard.astro +1 -1
  60. package/src/components/link/RLALink.astro +1 -0
  61. package/src/components/link/link.theme.ts +0 -4
  62. package/src/components/link-group/RLALinkGroup.astro +1 -1
  63. package/src/components/link-group/link-group.theme.ts +1 -10
  64. package/src/components/locale-selector/RLALocaleSelector.astro +4 -36
  65. package/src/components/locale-selector/locale-selector.theme.ts +3 -11
  66. package/src/components/logo/RLALogo.astro +1 -2
  67. package/src/components/modal/RLAModal.astro +8 -5
  68. package/src/components/modal/RLSModal.tsx +17 -12
  69. package/src/components/modal/modal.theme.ts +5 -4
  70. package/src/components/navigation-menu/RLANavigationMenu.astro +17 -21
  71. package/src/components/navigation-menu/navigation-menu.theme.ts +3 -7
  72. package/src/components/pagination/RLAPagination.astro +2 -2
  73. package/src/components/pagination/pagination.theme.ts +1 -1
  74. package/src/components/popover/RLAPopover.astro +39 -0
  75. package/src/components/progress/RLAProgress.astro +2 -0
  76. package/src/components/progress/progress.theme.ts +0 -4
  77. package/src/components/scroll-area/scroll-area.theme.ts +1 -1
  78. package/src/components/scroll-to-top/RLAScrollToTop.astro +6 -5
  79. package/src/components/scroll-to-top/RLVScrollToTop.vue +7 -7
  80. package/src/components/scroll-to-top/scroll-to-top.theme.ts +3 -7
  81. package/src/components/search/RLASearch.astro +3 -3
  82. package/src/components/select/RLASelect.astro +96 -528
  83. package/src/components/select/RLSSelect.tsx +68 -14
  84. package/src/components/select/RLVSelect.vue +57 -0
  85. package/src/components/select/select.theme.ts +11 -96
  86. package/src/components/shortcuts/RLAShortcuts.astro +9 -9
  87. package/src/components/sidebar/RLASidebar.astro +3 -3
  88. package/src/components/slideover/RLASlideover.astro +1 -1
  89. package/src/components/slider/RLASlider.astro +2 -1
  90. package/src/components/slider/slider.theme.ts +1 -5
  91. package/src/components/spinner/RLASpinner.astro +2 -1
  92. package/src/components/spinner/spinner.theme.ts +1 -5
  93. package/src/components/splitter/splitter.theme.ts +1 -1
  94. package/src/components/stepper/RLAStepper.astro +8 -8
  95. package/src/components/stepper/stepper.theme.ts +6 -7
  96. package/src/components/steps/RLASteps.astro +3 -3
  97. package/src/components/switch/RLASwitch.astro +2 -1
  98. package/src/components/switch/switch.theme.ts +0 -4
  99. package/src/components/table/table.theme.ts +1 -1
  100. package/src/components/table-of-contents/RLATableOfContents.astro +5 -5
  101. package/src/components/theme-selector/RLAThemeSelector.astro +16 -14
  102. package/src/components/theme-selector/theme-selector.theme.ts +2 -2
  103. package/src/components/toast/RLAToast.astro +6 -6
  104. package/src/components/toast/store.ts +1 -1
  105. package/src/components/tooltip/tooltip.theme.ts +1 -1
  106. package/src/icons.raw.ts +67 -0
  107. package/src/icons.ts +31 -64
  108. package/src/index.ts +19 -18
  109. package/src/preset.ts +110 -108
  110. package/src/resolver.ts +127 -15
  111. package/src/shortcuts.ts +103 -84
  112. package/src/stores.ts +22 -0
  113. package/src/types.ts +27 -9
  114. package/src/virtual.d.ts +4 -0
  115. package/src/components/editor/PageEditor.vue +0 -459
  116. package/src/components/editor/PageMention.vue +0 -87
  117. package/src/components/editor/PagePropertiesEditor.vue +0 -358
  118. package/src/components/editor/PagePropertiesRenderer.vue +0 -285
  119. package/src/components/editor/PageRenderer.vue +0 -155
  120. package/src/components/editor/PageSurround.vue +0 -130
  121. package/src/components/editor/PageVersionSelector.vue +0 -371
  122. package/src/components/editor/blocks/AddBlockModal.vue +0 -196
  123. package/src/components/editor/blocks/Block.vue +0 -142
  124. package/src/components/editor/blocks/BlockEditRenderer.vue +0 -26
  125. package/src/components/editor/blocks/BlockEditor.vue +0 -141
  126. package/src/components/editor/blocks/BlockViewRenderer.vue +0 -71
  127. package/src/components/editor/blocks/TextRenderer.vue +0 -31
  128. package/src/components/editor/blocks/editor/CalloutBlockEditor.vue +0 -53
  129. package/src/components/editor/blocks/editor/ImageBlockEditor.vue +0 -55
  130. package/src/components/editor/blocks/editor/ParagraphBlockEditor.vue +0 -31
  131. package/src/components/editor/blocks/editor/SectionBlockEditor.vue +0 -65
  132. package/src/components/editor/blocks/nodes/LinkNode.vue +0 -28
  133. package/src/components/editor/blocks/nodes/TextNode.vue +0 -22
  134. package/src/components/editor/blocks/renderer/CalloutBlockRenderer.vue +0 -65
  135. package/src/components/editor/blocks/renderer/ImageBlockRenderer.vue +0 -20
  136. package/src/components/editor/blocks/renderer/ParagraphBlockRenderer.vue +0 -21
  137. package/src/components/editor/blocks/renderer/SectionBlockRenderer.vue +0 -55
  138. package/src/components/editor/composables/injectionKeys.ts +0 -3
  139. package/src/components/editor/composables/useBlockEditor.ts +0 -261
  140. package/src/components/editor/composables/usePageEditor.ts +0 -97
  141. package/src/components/editor/modals/CreatePageModal.vue +0 -160
  142. package/src/components/editor/modals/DeletePageModal.vue +0 -116
  143. package/src/components/editor/modals/PageTreeModal.vue +0 -275
  144. package/src/components/editor/types/blocks.ts +0 -100
  145. package/src/components/editor/types/pages.ts +0 -89
  146. package/src/components/editor/types/schemas.ts +0 -36
  147. package/src/components/editor/utils/blocks.ts +0 -42
  148. package/src/components/editor/utils/editorHelpers.ts +0 -24
  149. package/src/components/editor/utils/page.ts +0 -219
  150. package/src/components/editor/utils/richTextHelpers.ts +0 -35
  151. package/src/components/editor/views/PageEditView.vue +0 -195
  152. package/src/components/editor/views/PageLiveView.vue +0 -90
  153. package/src/components/editor/views/PageReviewView.vue +0 -308
  154. package/src/components/icon/resolver.ts +0 -23
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  import type { ModalProps } from "./modal"
3
3
  import { modalTheme } from "./modal.theme"
4
- import RLAIcon from "../icon/RLAIcon.astro"
4
+ import RLAButton from "../button/RLAButton.astro"
5
5
 
6
6
 
7
7
 
@@ -49,15 +49,18 @@ const modalId = `rla-modal-${Math.random().toString(36).substring(2, 9)}`
49
49
  data-unmount-on-hide={unmountOnHide ? "true" : "false"}
50
50
  {...rest}
51
51
  >
52
- <button
52
+ <RLAButton
53
53
  class={classes.closeButton}
54
54
  data-slot="close-button"
55
55
  type="button"
56
+ variant="ghost"
57
+ color="neutral"
58
+ size="sm"
59
+ square
60
+ leadingIcon="i-rl-close"
56
61
  data-dialog-close={modalId}
57
62
  aria-label="Close modal"
58
- >
59
- <RLAIcon name="close" class="size-4" aria-hidden="true" />
60
- </button>
63
+ />
61
64
 
62
65
  <div class={classes.header} data-slot="header">
63
66
  {title && <h3 class={classes.title} data-slot="title">{title}</h3>}
@@ -10,7 +10,7 @@ import {
10
10
  } from "solid-js"
11
11
  import type { ModalProps } from "./modal"
12
12
  import { modalTheme } from "./modal.theme"
13
- import RLSIcon from "../icon/RLSIcon"
13
+ import RLSButton from "../button/RLSButton"
14
14
 
15
15
  export interface RLSModalProps extends ModalProps {
16
16
  onClose?: () => void
@@ -41,6 +41,7 @@ const RLSModal: Component<RLSModalProps> = (allProps) => {
41
41
 
42
42
  const closeOnClickOutside = () => props.closeOnClickOutside !== false
43
43
  const closeOnEscape = () => props.closeOnEscape !== false
44
+ const unmountOnHide = () => props.unmountOnHide !== false
44
45
 
45
46
  const handleClose = () => {
46
47
  props.onClose?.()
@@ -54,8 +55,8 @@ const RLSModal: Component<RLSModalProps> = (allProps) => {
54
55
  e.preventDefault()
55
56
  } else {
56
57
  e.preventDefault()
57
- handleClose()
58
58
  }
59
+ handleClose()
59
60
  }
60
61
  const handleClick = (e: MouseEvent) => {
61
62
  // Clicking the ::backdrop means e.target IS the dialog element
@@ -91,24 +92,28 @@ const RLSModal: Component<RLSModalProps> = (allProps) => {
91
92
  })
92
93
 
93
94
  return (
94
- <Show when={props.open || !props.unmountOnHide}>
95
+ <Show when={props.open || !unmountOnHide()}>
95
96
  <dialog
96
97
  ref={(el) => (dialogRef = el)}
97
- class={`w-full rounded-xl border border-default bg-default p-6 shadow-xl outline-none flex flex-col max-h-[90vh] overflow-y-auto text-foreground backdrop:bg-black/60 backdrop:backdrop-blur-sm ${
98
- resolvedClasses().content || ""
99
- } ${props.class || ""}`}
98
+ class={`w-[calc(100%-1.5rem)] sm:w-full rounded-xl border border-default bg-default p-5 sm:p-6 shadow-xl outline-none flex flex-col max-h-[calc(100dvh-1.5rem)] sm:max-h-[90vh] overflow-y-auto text-highlighted backdrop:bg-black/60 backdrop:backdrop-blur-sm ${
99
+ props.open ? "" : "hidden"
100
+ } ${resolvedClasses().content || ""} ${props.class || ""}`}
101
+ data-state={props.open ? "open" : "closed"}
100
102
  data-slot="content"
101
103
  {...rest}
102
104
  >
103
- <button
105
+ <RLSButton
104
106
  type="button"
105
- class="absolute right-4 top-4 rounded-md p-1 text-muted-foreground hover:text-foreground hover:bg-neutral-100 dark:hover:bg-neutral-800 transition cursor-pointer border-none bg-transparent"
106
- data-slot="close-button"
107
+ variant="ghost"
108
+ color="neutral"
109
+ size="sm"
110
+ square
111
+ leadingIcon="close"
107
112
  aria-label="Close modal"
113
+ data-slot="close-button"
114
+ class="absolute right-4 top-4 text-muted hover:text-highlighted"
108
115
  onClick={handleClose}
109
- >
110
- <RLSIcon name="close" size="sm" aria-hidden="true" />
111
- </button>
116
+ />
112
117
 
113
118
  {props.title || props.description || props.titleSlot || props.descriptionSlot ? (
114
119
  <div class={resolvedClasses().header || "mb-4"} data-slot="header">
@@ -17,8 +17,9 @@ export const modalTheme = defineTheme("modal", {
17
17
  trigger: "",
18
18
  backdrop: "fixed inset-0 z-50 bg-black/60 backdrop-blur-sm transition-all duration-300",
19
19
  content: [
20
- "fixed left-1/2 top-1/2 z-50 w-full max-w-lg -translate-x-1/2 -translate-y-1/2 rounded-xl border border-default",
21
- "bg-default p-6 shadow-xl transition-all duration-300 outline-none",
20
+ "fixed left-1/2 top-1/2 z-50 w-[calc(100%-1.5rem)] sm:w-full max-w-lg -translate-x-1/2 -translate-y-1/2 rounded-xl border border-default",
21
+ "bg-default p-5 sm:p-6 shadow-xl transition-all duration-300 outline-none",
22
+ "max-h-[calc(100dvh-1.5rem)] sm:max-h-[90vh] overflow-y-auto",
22
23
  "data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-1/2",
23
24
  "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-1/2"
24
25
  ],
@@ -27,8 +28,8 @@ export const modalTheme = defineTheme("modal", {
27
28
  description: "text-sm text-muted leading-relaxed",
28
29
  footer: "flex flex-col-reverse sm:flex-row sm:justify-end gap-2 mt-6",
29
30
  closeButton: [
30
- "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100",
31
- "focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none"
31
+ "absolute right-4 top-4 opacity-70 transition-opacity hover:opacity-100",
32
+ "focus:outline-none"
32
33
  ]
33
34
  },
34
35
  variants: {
@@ -3,17 +3,14 @@ import RLAIcon from "../icon/RLAIcon.astro"
3
3
  import type { NavigationMenuProps } from "./navigation-menu"
4
4
  import { navigationMenuTheme } from "./navigation-menu.theme"
5
5
 
6
-
7
-
8
6
  const {
9
7
  items = [],
10
8
  color = "primary",
11
9
  orientation = "horizontal",
10
+ theme,
12
11
  ...rest
13
12
  } = Astro.props as NavigationMenuProps
14
13
 
15
-
16
-
17
14
  const classes = navigationMenuTheme(Astro.props)
18
15
 
19
16
  const slotContents: Record<string, string> = {}
@@ -26,22 +23,22 @@ await Promise.all(
26
23
  )
27
24
  ---
28
25
 
29
- <rla-navigation-menu orientation={orientation} {...rest}>
26
+ <rla-navigation-menu orientation={orientation} data-theme={theme} {...rest}>
30
27
  <nav class={classes.root} data-slot="root" data-nav-menu data-orientation={orientation}>
31
28
  <ul class={classes.list} data-slot="list" role="list">
32
29
  {items.map((item, i) => {
33
30
  const hasChildren = item.children && item.children.length > 0
34
-
31
+
35
32
  const itemPath = (item.href ?? item.to ?? "#") as string
36
33
  const normalizedPath = itemPath.replace(/^\/[a-z]{2}(?:-[a-zA-Z]{2})?(?=\/|$)/, '').replace(/\/+$/, '') || '/'
37
34
  const currentPath = Astro.url.pathname.replace(/^\/[a-z]{2}(?:-[a-zA-Z]{2})?(?=\/|$)/, '').replace(/\/+$/, '') || '/'
38
-
35
+
39
36
  const isActive = item.active ?? (
40
- normalizedPath !== '' && normalizedPath !== '/'
37
+ normalizedPath !== '' && normalizedPath !== '/'
41
38
  ? currentPath.startsWith(normalizedPath)
42
39
  : currentPath === '/'
43
40
  )
44
-
41
+
45
42
  return (
46
43
  <li class={classes.item} data-slot="item" data-nav-item data-index={i}>
47
44
  {hasChildren ? (
@@ -55,7 +52,7 @@ await Promise.all(
55
52
  >
56
53
  {item.icon && <span class={item.icon + " mr-1.5 size-4"} />}
57
54
  {item.label}
58
- <RLAIcon name="chevronDown" class="ml-1 size-3.5 transition-transform duration-200" aria-hidden="true" data-chevron />
55
+ <RLAIcon name="i-rl-chevronDown" class="ml-1 size-3.5 transition-transform duration-200" aria-hidden="true" data-chevron />
59
56
  </button>
60
57
  ) : (
61
58
  <a
@@ -70,10 +67,10 @@ await Promise.all(
70
67
  )}
71
68
 
72
69
  {hasChildren && (
73
- <div
74
- class={classes.content + " hidden"}
75
- data-slot="content"
76
- data-nav-content
70
+ <div
71
+ class={classes.content + " hidden"}
72
+ data-slot="content"
73
+ data-nav-content
77
74
  data-item-index={i}
78
75
  role="region"
79
76
  >
@@ -85,7 +82,7 @@ await Promise.all(
85
82
  <li>
86
83
  <a
87
84
  href={typeof child.href === "string" ? child.href : (typeof child.to === "string" ? child.to : "#")}
88
- class="flex items-start gap-3 rounded-sm px-3 py-2 text-sm hover:bg-accent hover:text-accent-foreground transition-colors"
85
+ class="flex items-start gap-3 rounded-sm px-3 py-2 text-sm hover:bg-accented hover:text-highlighted transition-colors"
89
86
  >
90
87
  {child.icon && <span class={child.icon + " mt-0.5 size-4 shrink-0 text-muted"} />}
91
88
  <div>
@@ -151,7 +148,7 @@ await Promise.all(
151
148
 
152
149
  const open = (item: HTMLElement, trigger: HTMLElement, content: HTMLElement) => {
153
150
  clearTimeout(hoverTimeout);
154
-
151
+
155
152
  if (orientation === "horizontal" && activeItem && activeItem !== item) {
156
153
  close(activeItem);
157
154
  }
@@ -182,7 +179,7 @@ await Promise.all(
182
179
  const close = (item: HTMLElement) => {
183
180
  const trigger = item.querySelector("[data-nav-trigger]") as HTMLElement | null;
184
181
  const itemIndex = item.getAttribute("data-index");
185
-
182
+
186
183
  let content = item.querySelector("[data-nav-content]") as HTMLElement | null;
187
184
  if (!content && viewport) {
188
185
  content = viewport.querySelector(`[data-nav-content][data-item-index="${itemIndex}"]`) as HTMLElement | null;
@@ -329,7 +326,7 @@ await Promise.all(
329
326
  outline: none !important;
330
327
  outline-width: 0px !important;
331
328
  outline-color: transparent !important;
332
-
329
+
333
330
  /* Wiping out any UnoCSS/Tailwind rings on the viewport container */
334
331
  --un-ring-width: 0px !important;
335
332
  --tw-ring-width: 0px !important;
@@ -341,7 +338,7 @@ await Promise.all(
341
338
  --tw-ring-shadow: none !important;
342
339
  --un-ring-offset-shadow: none !important;
343
340
  --tw-ring-offset-shadow: none !important;
344
-
341
+
345
342
  /* Premium card shadow */
346
343
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.35), 0 8px 10px -6px rgb(0 0 0 / 0.35) !important; /* Premium shadow-xl */
347
344
  }
@@ -356,8 +353,7 @@ await Promise.all(
356
353
  border-width: 0px !important;
357
354
  box-shadow: none !important;
358
355
  padding: 0 !important;
359
- background: transparent !important;
360
-
356
+
361
357
  /* Wiping out any UnoCSS/Tailwind rings on content */
362
358
  --un-ring-width: 0px !important;
363
359
  --tw-ring-width: 0px !important;
@@ -6,20 +6,16 @@ export const navigationMenuTheme = defineTheme("navigation-menu", {
6
6
  root: "relative z-10 flex w-full",
7
7
  list: "group flex flex-1 list-none",
8
8
  item: "relative",
9
- link: "text-highlighted inline-flex items-center px-4 py-2 text-sm font-medium transition-colors hover:text-accent-foreground focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50",
9
+ link: "text-highlighted inline-flex items-center px-4 py-2 text-sm font-medium transition-colors hover:text-highlighted focus:text-highlighted focus:outline-none disabled:pointer-events-none disabled:opacity-50",
10
10
  trigger:
11
- "group inline-flex h-10 items-center rounded-md bg-default px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 gap-1",
11
+ "group inline-flex h-10 items-center rounded-md bg-default px-4 py-2 text-sm font-medium transition-colors hover:bg-accented hover:text-highlighted focus:bg-accented focus:text-highlighted focus:outline-none disabled:pointer-events-none disabled:opacity-50 gap-1",
12
12
  content:
13
13
  "absolute left-0 top-full z-50 mt-1.5 w-56 rounded-md border bg-elevated p-1 text-highlighted shadow-md origin-top-left",
14
14
  viewportWrapper: "absolute left-0 top-full flex justify-center w-full",
15
15
  viewport:
16
- "relative mt-1.5 h-auto w-full origin-top overflow-hidden rounded-md border bg-elevated text-highlighted shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90"
16
+ "relative mt-1.5 h-auto w-full origin-top overflow-hidden rounded-md bg-default text-highlighted shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90"
17
17
  },
18
18
  variants: {
19
- theme: {
20
- light: { link: "rl-light", trigger: "rl-light" },
21
- dark: { link: "rl-dark", trigger: "rl-dark" }
22
- },
23
19
  orientation: {
24
20
  horizontal: {
25
21
  root: "max-w-max flex-1 items-center justify-center",
@@ -44,7 +44,7 @@ const pages = getPageNumbers()
44
44
  aria-label="Go to previous page"
45
45
  aria-disabled={currentPage === 1}
46
46
  >
47
- <RLAIcon name="chevronLeft" class="size-4" aria-hidden="true" />
47
+ <RLAIcon name="i-rl-chevronLeft" class="size-4" aria-hidden="true" />
48
48
  </a>
49
49
  </li>
50
50
 
@@ -84,7 +84,7 @@ const pages = getPageNumbers()
84
84
  aria-label="Go to next page"
85
85
  aria-disabled={currentPage === totalPages}
86
86
  >
87
- <RLAIcon name="chevronRight" class="size-4" aria-hidden="true" />
87
+ <RLAIcon name="i-rl-chevronRight" class="size-4" aria-hidden="true" />
88
88
  </a>
89
89
  </li>
90
90
  </ul>
@@ -14,7 +14,7 @@ export const paginationTheme = defineTheme("pagination", {
14
14
  },
15
15
  variants: {
16
16
  active: {
17
- true: { link: "border-primary bg-primary text-primary-foreground hover:bg-primary/95" },
17
+ true: { link: "border-primary bg-primary text-neutral-50 hover:bg-primary/95" },
18
18
  false: { link: "" }
19
19
  }
20
20
  },
@@ -87,6 +87,10 @@ const popoverId = `rla-popover-${Math.random().toString(36).substring(2, 9)}`
87
87
  [popover][data-slot="content"] {
88
88
  position: absolute;
89
89
  position-anchor: --rla-popover-anchor;
90
+ /* The theme adds `top-full left-1/2 -translate-x-1/2` for non-popover
91
+ dropdowns; that transform shifts a top-layer popover off its anchor,
92
+ so neutralize it when we position via CSS anchor properties. */
93
+ transform: none;
90
94
  }
91
95
 
92
96
  /* bottom (default) */
@@ -234,6 +238,41 @@ const popoverId = `rla-popover-${Math.random().toString(36).substring(2, 9)}`
234
238
  });
235
239
  panel.addEventListener('mouseleave', hide);
236
240
  }
241
+
242
+ // Deterministic positioning: anchor positioning is a progressive
243
+ // enhancement, but we always place the popover next to its trigger
244
+ // via JS so it is reliably visible (no off-screen / scrollbar issues).
245
+ const positionPopover = () => {
246
+ if (!trigger) return;
247
+ const pw = panel.offsetWidth;
248
+ const ph = panel.offsetHeight;
249
+ if (pw === 0 || ph === 0) return; // closed or not yet rendered
250
+
251
+ const parts = (container.dataset.placement || 'bottom').split('-');
252
+ const vert = parts[0]; // top | bottom
253
+ const horiz = parts[1] || 'center'; // start | end | center
254
+ const gap = 8;
255
+ const r = trigger.getBoundingClientRect();
256
+
257
+ let top = vert === 'top' ? r.top - ph - gap : r.bottom + gap;
258
+ let left =
259
+ horiz === 'end' ? r.right - pw :
260
+ horiz === 'start' ? r.left :
261
+ r.left + r.width / 2 - pw / 2;
262
+
263
+ left = Math.max(8, Math.min(left, window.innerWidth - pw - 8));
264
+ top = Math.max(8, Math.min(top, window.innerHeight - ph - 8));
265
+
266
+ panel.style.position = 'fixed';
267
+ panel.style.transform = 'none';
268
+ panel.style.top = `${top}px`;
269
+ panel.style.left = `${left}px`;
270
+ };
271
+
272
+ panel.addEventListener('toggle', () => positionPopover());
273
+ const reposition = () => positionPopover();
274
+ window.addEventListener('scroll', reposition, true);
275
+ window.addEventListener('resize', reposition);
237
276
  });
238
277
  }
239
278
 
@@ -6,6 +6,7 @@ import { progressTheme } from "./progress.theme"
6
6
  const {
7
7
  value = 0,
8
8
  max = 100,
9
+ theme,
9
10
  ...rest
10
11
  } = Astro.props as ProgressProps
11
12
 
@@ -21,6 +22,7 @@ const id = `progress-${Math.random().toString(36).substring(2, 9)}`
21
22
  aria-valuemin={0}
22
23
  aria-valuemax={max}
23
24
  aria-valuenow={value}
25
+ data-theme={theme}
24
26
  {...rest}
25
27
  >
26
28
  <div
@@ -12,10 +12,6 @@ export const progressTheme = defineTheme("progress", {
12
12
  sm: { root: "h-1.5" },
13
13
  md: { root: "h-3" },
14
14
  lg: { root: "h-5" }
15
- },
16
- theme: {
17
- light: { root: "rl-light" },
18
- dark: { root: "rl-dark" }
19
15
  }
20
16
  },
21
17
  defaultVariants: {
@@ -8,7 +8,7 @@ export const scrollAreaTheme = defineTheme("scroll-area", {
8
8
  "h-full w-full rounded-[inherit] overflow-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",
9
9
  scrollbar:
10
10
  "absolute flex user-select-none touch-action-none p-0.5 bg-transparent transition-colors duration-150 ease-out hover:bg-muted/10",
11
- thumb: "relative flex-1 rounded-full bg-border transition-colors hover:bg-muted/45"
11
+ thumb: "relative flex-1 rounded-full bg-neutral-200 transition-colors hover:bg-muted/45"
12
12
  },
13
13
  variants: {
14
14
  orientation: {
@@ -10,6 +10,7 @@ const {
10
10
  duration = 0.1,
11
11
  threshold = 200,
12
12
  showProgress = false,
13
+ theme,
13
14
  ...rest
14
15
  } = Astro.props as ScrollToTopProps
15
16
 
@@ -17,7 +18,7 @@ const classes = scrollToTopTheme(Astro.props)
17
18
 
18
19
  ---
19
20
 
20
- <rla-scroll-to-top data-threshold={threshold} data-duration={duration} data-color={color} data-progress-width={progressWidth} {...rest}>
21
+ <rla-scroll-to-top data-threshold={threshold} data-duration={duration} data-color={color} data-progress-width={progressWidth} data-theme={theme} {...rest}>
21
22
  <div
22
23
  class:list={["rla-scroll-to-top-inner", "fixed bottom-6 right-6 z-50", classes.root]}
23
24
  >
@@ -110,12 +111,12 @@ const classes = scrollToTopTheme(Astro.props)
110
111
  const gaugeProgressEl = innerElement.querySelector('[data-gauge-progress]') as HTMLElement | null;
111
112
  if (gaugeProgressEl) {
112
113
  gaugeProgressEl.style.setProperty('--gauge-stroke-width', `${gaugeBorderWidth}px`);
113
- gaugeProgressEl.style.setProperty('--gauge-color', `var(--color-${color}-500)`);
114
+ gaugeProgressEl.style.setProperty('--gauge-color', `var(--rl-${color}-500)`);
114
115
  }
115
116
  const gaugeTrackEl = innerElement.querySelector('.gauge-track') as HTMLElement | null;
116
117
  if (gaugeTrackEl) {
117
118
  gaugeTrackEl.style.setProperty('border-width', `${gaugeBorderWidth}px`);
118
- gaugeTrackEl.style.setProperty('border-color', `var(--color-${color}-900)`);
119
+ gaugeTrackEl.style.setProperty('border-color', `var(--rl-${color}-900)`);
119
120
  gaugeTrackEl.style.setProperty('background-color', '#000');
120
121
  }
121
122
 
@@ -195,8 +196,8 @@ const classes = scrollToTopTheme(Astro.props)
195
196
  border-radius: 50%;
196
197
  background: conic-gradient(
197
198
  from 0deg,
198
- var(--gauge-color, var(--color-primary-500)) 0deg,
199
- var(--gauge-color, var(--color-primary-500)) calc(var(--gauge-progress, 0) * 3.6deg),
199
+ var(--gauge-color, var(--rl-primary-500)) 0deg,
200
+ var(--gauge-color, var(--rl-primary-500)) calc(var(--gauge-progress, 0) * 3.6deg),
200
201
  transparent calc(var(--gauge-progress, 0) * 3.6deg)
201
202
  );
202
203
  -webkit-mask: radial-gradient(
@@ -30,10 +30,10 @@ function updateCssVars() {
30
30
  if (!styleEl) return
31
31
  styleEl.textContent = `
32
32
  [data-rla-instance="${instanceId}"] {
33
- --gauge-track-border-color: var(--color-${color}-900);
34
- --gauge-track-bg: var(--color-${color}-950);
33
+ --gauge-track-border-color: var(--rl-${color}-900);
34
+ --gauge-track-bg: var(--rl-${color}-950);
35
35
  --gauge-stroke-width: ${gaugeBorderWidth}px;
36
- --gauge-color: var(--color-${color}-500);
36
+ --gauge-color: var(--rl-${color}-500);
37
37
  --gauge-progress: ${scrollPercentage.value};
38
38
  }
39
39
  `
@@ -116,8 +116,8 @@ onUnmounted(() => {
116
116
  border-radius: 50%;
117
117
  border-style: solid;
118
118
  border-width: var(--gauge-stroke-width, 3px);
119
- border-color: var(--gauge-track-border-color, var(--color-primary-900));
120
- background-color: var(--gauge-track-bg, var(--color-primary-950));
119
+ border-color: var(--gauge-track-border-color, var(--rl-primary-900));
120
+ background-color: var(--gauge-track-bg, var(--rl-primary-950));
121
121
  }
122
122
 
123
123
  .gauge-progress {
@@ -126,8 +126,8 @@ onUnmounted(() => {
126
126
  border-radius: 50%;
127
127
  background: conic-gradient(
128
128
  from 0deg,
129
- var(--gauge-color, var(--color-primary-500)) 0deg,
130
- var(--gauge-color, var(--color-primary-500)) calc(var(--gauge-progress, 0) * 3.6deg),
129
+ var(--gauge-color, var(--rl-primary-500)) 0deg,
130
+ var(--gauge-color, var(--rl-primary-500)) calc(var(--gauge-progress, 0) * 3.6deg),
131
131
  transparent calc(var(--gauge-progress, 0) * 3.6deg)
132
132
  );
133
133
  -webkit-mask: radial-gradient(
@@ -11,23 +11,19 @@ export const scrollToTopTheme = defineTheme("scroll-to-top", {
11
11
  icon: "size-6 text-white"
12
12
  },
13
13
  variants: {
14
- color: "auto",
15
- theme: {
16
- light: { root: "rl-light" },
17
- dark: { root: "rl-dark" }
18
- }
14
+ color: "auto"
19
15
  },
20
16
  compoundVariants: [
21
17
  {
22
18
  color: "primary",
23
19
  classNames: {
24
- icon: "text-primary-foreground"
20
+ icon: "text-neutral-50"
25
21
  }
26
22
  },
27
23
  {
28
24
  color: "secondary",
29
25
  classNames: {
30
- icon: "text-secondary-foreground"
26
+ icon: "text-neutral-50"
31
27
  }
32
28
  }
33
29
  ],
@@ -55,7 +55,7 @@ const emptyId = `search-empty-${uniqueId}`
55
55
  square
56
56
  aria-label="Open Search"
57
57
  >
58
- <RLAIcon name="search" class="w-5 h-5" />
58
+ <RLAIcon name="i-rl-search" class="w-5 h-5" />
59
59
  </RLAButton>
60
60
  )}
61
61
 
@@ -77,11 +77,11 @@ const emptyId = `search-empty-${uniqueId}`
77
77
  trailing: "absolute right-0 flex items-center gap-2"
78
78
  }}
79
79
  >
80
- <RLAIcon name="search" class={classes.headerIcon} slot="leading" />
80
+ <RLAIcon name="i-rl-search" class={classes.headerIcon} slot="leading" />
81
81
  <div slot="trailing" class="flex items-center gap-2">
82
82
  <RLAKbd size="sm">Esc</RLAKbd>
83
83
  <button id={`${modalId}-close`} class={classes.close} aria-label="Close search">
84
- <RLAIcon name="close" class={classes.closeIcon} />
84
+ <RLAIcon name="i-rl-close" class={classes.closeIcon} />
85
85
  </button>
86
86
  </div>
87
87
  </RLAInput>