@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
|
@@ -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>
|
|
@@ -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
|
+
}
|