@rxdrag/website-lib 0.0.151 → 0.0.153
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/README.md +2 -2
- package/components/AnimationNumber.astro +217 -217
- package/components/Background.astro +140 -114
- package/components/BackgroundGroup.astro +20 -26
- package/components/BaseFooter.astro +24 -39
- package/components/BaseHeader.astro +22 -25
- package/components/Box.astro +20 -22
- package/components/Button.astro +80 -0
- package/components/Carousel.astro +456 -315
- package/components/CarouselPagination.astro +97 -76
- package/components/CarouselSlide.astro +10 -16
- package/components/Collapse.astro +125 -125
- package/components/CollapseIndicator.astro +20 -20
- package/components/Container.astro +27 -32
- package/components/Content.astro +20 -0
- package/components/CookieConsent.astro +47 -47
- package/components/CookieConsent.css +52 -52
- package/components/CookieConsentConfig.ts +208 -208
- package/components/Dialog.astro +342 -338
- package/components/DialogTrigger.astro +32 -32
- package/components/Document.astro +240 -225
- package/components/Frame.astro +32 -0
- package/components/GlassBorder.astro +104 -0
- package/components/GlassRefraction.astro +85 -0
- package/components/GradientBorder.astro +80 -0
- package/components/Grid.astro +32 -34
- package/components/GridCell.astro +28 -32
- package/components/Heading.astro +24 -24
- package/components/Icon.astro +29 -29
- package/components/Image.astro +100 -100
- package/components/Image.md +14 -14
- package/components/Link.astro +89 -99
- package/components/Main.astro +17 -17
- package/components/Meta.astro +65 -65
- package/components/Popover.astro +189 -189
- package/components/RichTextView.astro +28 -28
- package/components/Section.astro +26 -44
- package/components/TabButton.astro +32 -16
- package/components/TabPanel.astro +20 -19
- package/components/Tabs.astro +220 -147
- package/components/Video.astro +6 -4
- package/components/YearsSince.astro +20 -20
- package/components//344/270/211/345/261/202/346/250/241/345/236/213.md +5 -5
- package/components//344/270/273/351/242/230Token.md +198 -198
- package/components//345/216/237/345/255/220/345/206/273/347/273/223/346/270/205/345/215/225.md +270 -260
- package/components//347/211/251/346/226/231/346/270/205/345/215/225.md +599 -567
- package/index.ts +5 -5
- package/package.json +7 -7
- package/components/BaseBlock.astro +0 -34
- package/components/Motion.astro +0 -77
- package/components/Stack.astro +0 -31
package/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Do not write code directly here, instead use the `src` folder!
|
|
2
|
-
// Then, use this file to export everything you want your user to access.
|
|
3
|
-
|
|
4
|
-
export { default as Document } from "./components/Document.astro";
|
|
5
|
-
|
|
1
|
+
// Do not write code directly here, instead use the `src` folder!
|
|
2
|
+
// Then, use this file to export everything you want your user to access.
|
|
3
|
+
|
|
4
|
+
export { default as Document } from "./components/Document.astro";
|
|
5
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rxdrag/website-lib",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.153",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.ts",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"eslint": "^9.39.2",
|
|
29
29
|
"gsap": "^3.12.7",
|
|
30
30
|
"typescript": "^5",
|
|
31
|
-
"@rxdrag/
|
|
32
|
-
"@rxdrag/tsconfig": "0.2.1",
|
|
33
|
-
"@rxdrag/rxcms-models": "0.3.106",
|
|
31
|
+
"@rxdrag/website-lib-core": "0.0.127",
|
|
34
32
|
"@rxdrag/entify-hooks": "0.2.79",
|
|
35
|
-
"@rxdrag/
|
|
36
|
-
"@rxdrag/
|
|
33
|
+
"@rxdrag/tiptap-preview": "0.0.3",
|
|
34
|
+
"@rxdrag/rxcms-models": "0.3.109",
|
|
35
|
+
"@rxdrag/eslint-config-custom": "0.2.13",
|
|
36
|
+
"@rxdrag/tsconfig": "0.2.1"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"aos": "3.0.0-beta.6",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"react": "^19.1.0",
|
|
42
42
|
"react-dom": "^19.1.0",
|
|
43
43
|
"vanilla-cookieconsent": "3.1.0",
|
|
44
|
-
"@rxdrag/rxcms-models": "0.3.
|
|
44
|
+
"@rxdrag/rxcms-models": "0.3.109"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"astro": "^5.16.6",
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from "astro/types";
|
|
3
|
-
import type { BackgroundConfig } from "@rxdrag/website-lib-core";
|
|
4
|
-
import BackgroundGroup from "./BackgroundGroup.astro";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* 基础容器壳
|
|
8
|
-
*
|
|
9
|
-
* 规范:被冻结(Frozen)的设计器原子组件(基础壳)
|
|
10
|
-
* - 对外接口与 DOM 结构应保持稳定,不随业务随意增删/调整
|
|
11
|
-
* - 允许通过原生属性透传(...rest)注入 id/style/data-*(如 data-aos-*)等通用能力
|
|
12
|
-
* - baseClass 用于提供组件的默认类名;class/className 由使用方叠加
|
|
13
|
-
* - backgrounds 用于渲染 BackgroundGroup
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
interface Props extends HTMLAttributes<"div"> {
|
|
17
|
-
baseClass?: string | string[];
|
|
18
|
-
className?: string;
|
|
19
|
-
backgrounds?: BackgroundConfig[];
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const {
|
|
23
|
-
baseClass = "",
|
|
24
|
-
className,
|
|
25
|
-
class: classAttr,
|
|
26
|
-
backgrounds,
|
|
27
|
-
...rest
|
|
28
|
-
} = Astro.props;
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
<div class:list={[baseClass, className, classAttr]} {...rest}>
|
|
32
|
-
{backgrounds?.length ? <BackgroundGroup backgrounds={backgrounds} /> : null}
|
|
33
|
-
<slot />
|
|
34
|
-
</div>
|
package/components/Motion.astro
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from "astro/types";
|
|
3
|
-
|
|
4
|
-
type WhileInViewPreset =
|
|
5
|
-
| "fade"
|
|
6
|
-
| "fade-up"
|
|
7
|
-
| "fade-down"
|
|
8
|
-
| "fade-left"
|
|
9
|
-
| "fade-right"
|
|
10
|
-
| "zoom-in"
|
|
11
|
-
| "zoom-out"
|
|
12
|
-
| "slide-up"
|
|
13
|
-
| "slide-down"
|
|
14
|
-
| "slide-left"
|
|
15
|
-
| "slide-right";
|
|
16
|
-
|
|
17
|
-
type WhileInViewConfig = {
|
|
18
|
-
preset?: WhileInViewPreset;
|
|
19
|
-
once?: boolean;
|
|
20
|
-
duration?: number;
|
|
21
|
-
delay?: number;
|
|
22
|
-
easing?: string;
|
|
23
|
-
offset?: number;
|
|
24
|
-
anchorPlacement?: string;
|
|
25
|
-
anchor?: string;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
interface Props extends HTMLAttributes<"div"> {
|
|
29
|
-
as?: string;
|
|
30
|
-
class?: string;
|
|
31
|
-
className?: string;
|
|
32
|
-
whileInView?: WhileInViewPreset | WhileInViewConfig;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const {
|
|
36
|
-
as = "div",
|
|
37
|
-
whileInView,
|
|
38
|
-
class: cls,
|
|
39
|
-
className,
|
|
40
|
-
...rest
|
|
41
|
-
} = Astro.props;
|
|
42
|
-
|
|
43
|
-
const Tag = as as any;
|
|
44
|
-
|
|
45
|
-
const config: WhileInViewConfig | undefined =
|
|
46
|
-
typeof whileInView === "string" ? { preset: whileInView } : whileInView;
|
|
47
|
-
|
|
48
|
-
const dataAos = config?.preset;
|
|
49
|
-
const dataAosOnce = config?.once;
|
|
50
|
-
const dataAosDuration = config?.duration;
|
|
51
|
-
const dataAosDelay = config?.delay;
|
|
52
|
-
const dataAosEasing = config?.easing;
|
|
53
|
-
const dataAosOffset = config?.offset;
|
|
54
|
-
const dataAosAnchorPlacement = config?.anchorPlacement;
|
|
55
|
-
const dataAosAnchor = config?.anchor;
|
|
56
|
-
|
|
57
|
-
const aosAttrs = dataAos
|
|
58
|
-
? {
|
|
59
|
-
"data-aos": dataAos,
|
|
60
|
-
"data-aos-once":
|
|
61
|
-
typeof dataAosOnce === "boolean" ? String(dataAosOnce) : undefined,
|
|
62
|
-
"data-aos-duration":
|
|
63
|
-
typeof dataAosDuration === "number" ? String(dataAosDuration) : undefined,
|
|
64
|
-
"data-aos-delay":
|
|
65
|
-
typeof dataAosDelay === "number" ? String(dataAosDelay) : undefined,
|
|
66
|
-
"data-aos-easing": dataAosEasing,
|
|
67
|
-
"data-aos-offset":
|
|
68
|
-
typeof dataAosOffset === "number" ? String(dataAosOffset) : undefined,
|
|
69
|
-
"data-aos-anchor-placement": dataAosAnchorPlacement,
|
|
70
|
-
"data-aos-anchor": dataAosAnchor,
|
|
71
|
-
}
|
|
72
|
-
: {};
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
<Tag class:list={[cls, className]} {...aosAttrs} {...rest}>
|
|
76
|
-
<slot />
|
|
77
|
-
</Tag>
|
package/components/Stack.astro
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from "astro/types";
|
|
3
|
-
import type { BackgroundConfig } from "@rxdrag/website-lib-core";
|
|
4
|
-
import BaseBlock from "./BaseBlock.astro";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* 堆叠布局
|
|
8
|
-
*
|
|
9
|
-
* 规范:被冻结(Frozen)的设计器原子组件
|
|
10
|
-
* - 对外接口与 DOM 结构应保持稳定,不随业务随意增删/调整
|
|
11
|
-
* - 允许通过原生属性透传(...rest)注入 id/style/data-*(如 data-aos-*)等通用能力
|
|
12
|
-
* - 默认 mobile 为 vertical(flex-col);响应式方向/间距/对齐通过 class / className(Tailwind)表达
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
interface Props extends HTMLAttributes<'div'> {
|
|
16
|
-
className?: string;
|
|
17
|
-
backgrounds?: BackgroundConfig[];
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const { className, class: classAttr, backgrounds, ...rest } = Astro.props;
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
<BaseBlock
|
|
24
|
-
baseClass={["flex", "flex-col"]}
|
|
25
|
-
className={className}
|
|
26
|
-
class={classAttr}
|
|
27
|
-
backgrounds={backgrounds}
|
|
28
|
-
{...rest}
|
|
29
|
-
>
|
|
30
|
-
<slot />
|
|
31
|
-
</BaseBlock>
|