@rimelight/ui 0.0.29 → 0.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rimelight/ui",
3
- "version": "0.0.29",
3
+ "version": "0.0.30",
4
4
  "private": false,
5
5
  "description": "Rimelight Entertainment UI Library.",
6
6
  "keywords": [
@@ -0,0 +1,28 @@
1
+ ---
2
+ import { scv } from "css-variants"
3
+ import { useUi, resolveClasses } from "../../utils"
4
+ import type { MainProps } from "../../types"
5
+ import mainTheme from "../../themes/main.theme"
6
+
7
+ const main = scv(mainTheme)
8
+
9
+ const {
10
+ as = "main",
11
+ ui: uiProp,
12
+ class: className,
13
+ ...rest
14
+ } = Astro.props as MainProps;
15
+
16
+ const classes = resolveClasses(main, {
17
+ hasContent: Astro.slots.has("default")
18
+ }, useUi("main", uiProp), className);
19
+
20
+ const Tag = as;
21
+ ---
22
+
23
+ <Tag
24
+ class:list={[classes.root]}
25
+ {...rest}
26
+ >
27
+ <slot />
28
+ </Tag>
@@ -43,7 +43,6 @@ const TitleTag = variant === "hero" ? "h1" : "h2";
43
43
 
44
44
  <Tag
45
45
  data-orientation={orientation}
46
- data-slot="root"
47
46
  class:list={[classes.root]}
48
47
  {...rest}
49
48
  >
@@ -0,0 +1,12 @@
1
+ import { defineTheme } from "../utils/defineTheme"
2
+
3
+ export default defineTheme({
4
+ slots: [
5
+ "root"
6
+ ],
7
+ base: {
8
+ root: "min-h-[calc(100vh-var(--ui-header-height))]"
9
+ },
10
+ variants: {},
11
+ defaultVariants: {}
12
+ })
@@ -1,10 +1,11 @@
1
+ export * from "./main"
2
+ export * from "./logo"
3
+ export * from "./header"
4
+ export * from "./footer"
1
5
  export * from "./navigation"
2
6
  export * from "./link"
3
7
  export * from "./button"
4
8
  export * from "./icon"
5
- export * from "./header"
6
- export * from "./footer"
7
- export * from "./logo"
8
9
  export * from "./section"
9
10
  export * from "./placeholder"
10
11
  export * from "./scroll-to-top"
@@ -0,0 +1,17 @@
1
+ export interface MainProps {
2
+ /**
3
+ * The element or component this component should render as.
4
+ *
5
+ * @default "main"
6
+ */
7
+ as?: any
8
+ /**
9
+ * Slot-specific CSS class overrides.
10
+ */
11
+ ui?: any
12
+ /**
13
+ * Additional CSS classes to apply to the root component.
14
+ */
15
+ class?: any
16
+ [key: string]: unknown
17
+ }