@rxdrag/website-lib 0.0.11 → 0.0.13
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 +5 -5
- package/src/components/Collapse.astro +20 -0
- package/src/components/CollapsePanel.astro +20 -0
- package/src/components/CollapseTrigger.astro +15 -0
- package/src/components/Modal.astro +2 -2
- package/src/components/ModalCloser.astro +2 -2
- package/src/components/ModalPanel.astro +2 -2
- package/src/components/ModalTrigger.astro +1 -1
- package/src/components/Motion.astro +3 -0
- package/src/components/Popover.astro +5 -3
- package/src/components/PopverPanel.astro +4 -4
- package/src/components/index.ts +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rxdrag/website-lib",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.ts"
|
|
@@ -24,17 +24,17 @@
|
|
|
24
24
|
"eslint": "^7.32.0",
|
|
25
25
|
"gsap": "^3.12.7",
|
|
26
26
|
"typescript": "^5",
|
|
27
|
-
"@rxdrag/slate-preview": "1.2.55",
|
|
28
|
-
"@rxdrag/entify-hooks": "0.2.40",
|
|
29
27
|
"@rxdrag/eslint-config-custom": "0.2.12",
|
|
28
|
+
"@rxdrag/entify-hooks": "0.2.42",
|
|
29
|
+
"@rxdrag/slate-preview": "1.2.55",
|
|
30
30
|
"@rxdrag/tsconfig": "0.2.0"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"clsx": "^2.1.0",
|
|
34
34
|
"react": "^18.2.0",
|
|
35
35
|
"react-dom": "^18.2.0",
|
|
36
|
-
"@rxdrag/
|
|
37
|
-
"@rxdrag/
|
|
36
|
+
"@rxdrag/rxcms-models": "0.3.48",
|
|
37
|
+
"@rxdrag/website-lib-core": "0.0.11"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"astro": "^4.0.0 || ^5.0.0"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
import {
|
|
3
|
+
getCollapseDataAttrs,
|
|
4
|
+
type IMotionProps,
|
|
5
|
+
} from "@rxdrag/website-lib-core";
|
|
6
|
+
|
|
7
|
+
import Motion from "./Motion.astro";
|
|
8
|
+
|
|
9
|
+
interface Props extends IMotionProps {
|
|
10
|
+
openableKey?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { openableKey, ...rest } = Astro.props;
|
|
14
|
+
|
|
15
|
+
const dataAttrs = getCollapseDataAttrs(openableKey);
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
<Motion {...dataAttrs} {...rest}>
|
|
19
|
+
<slot />
|
|
20
|
+
</Motion>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
import {
|
|
3
|
+
type IMotionProps,
|
|
4
|
+
defaultPopoverPanelAnimation,
|
|
5
|
+
getCollapsePanelDataAttrs,
|
|
6
|
+
} from "@rxdrag/website-lib-core";
|
|
7
|
+
import Motion from "./Motion.astro";
|
|
8
|
+
|
|
9
|
+
interface Props extends IMotionProps {
|
|
10
|
+
openableKey?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const dataAttrs = getCollapsePanelDataAttrs();
|
|
14
|
+
|
|
15
|
+
const { whileOpenable = defaultPopoverPanelAnimation, ...props } = Astro.props;
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
<Motion whileOpenable={whileOpenable} {...dataAttrs} {...props}>
|
|
19
|
+
<slot />
|
|
20
|
+
</Motion>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
import {
|
|
3
|
+
getCollapseTriggerDataAttrs,
|
|
4
|
+
type CollapseTriggerProps,
|
|
5
|
+
} from "@rxdrag/website-lib-core";
|
|
6
|
+
import Motion from "./Motion.astro";
|
|
7
|
+
|
|
8
|
+
interface Props extends CollapseTriggerProps {}
|
|
9
|
+
|
|
10
|
+
const dataAttrs = getCollapseTriggerDataAttrs();
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<Motion {...dataAttrs} {...Astro.props}>
|
|
14
|
+
<slot />
|
|
15
|
+
</Motion>
|
|
@@ -3,10 +3,10 @@ import { getModalDataAttrs, type IMotionProps } from "@rxdrag/website-lib-core";
|
|
|
3
3
|
import Motion from "./Motion.astro";
|
|
4
4
|
|
|
5
5
|
interface Props extends IMotionProps {
|
|
6
|
-
|
|
6
|
+
openableKey: string;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
const dataAttrs = getModalDataAttrs(Astro.props.
|
|
9
|
+
const dataAttrs = getModalDataAttrs(Astro.props.openableKey);
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
<Motion {...dataAttrs} {...Astro.props}>
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
import { Motion } from "../..";
|
|
7
7
|
|
|
8
8
|
interface Props extends IMotionProps {
|
|
9
|
-
|
|
9
|
+
openableKey?: string;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
const dataAttrs = getModalCloserDataAttrs(Astro.props.
|
|
12
|
+
const dataAttrs = getModalCloserDataAttrs(Astro.props.openableKey);
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
<Motion {...dataAttrs} {...Astro.props}>
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
import Motion from "./Motion.astro";
|
|
7
7
|
|
|
8
8
|
interface Props extends IMotionProps {
|
|
9
|
-
|
|
9
|
+
openableKey?: string;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
const dataAttrs = getModalPanelDataAttrs(Astro.props.
|
|
12
|
+
const dataAttrs = getModalPanelDataAttrs(Astro.props.openableKey);
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
<Motion {...dataAttrs} {...Astro.props}>
|
|
@@ -8,7 +8,7 @@ import Motion from "./Motion.astro";
|
|
|
8
8
|
interface Props extends ModalTriggerProps {}
|
|
9
9
|
|
|
10
10
|
const { callToAction, ...rest } = Astro.props;
|
|
11
|
-
const dataAttrs = getModalTriggerDataAttrs(Astro.props.
|
|
11
|
+
const dataAttrs = getModalTriggerDataAttrs(Astro.props.openableKey);
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
<Motion {...dataAttrs} {...rest}>
|
|
@@ -28,6 +28,7 @@ const { class: className, ...motionProps } = getMotionProps(rest);
|
|
|
28
28
|
animate,
|
|
29
29
|
aos,
|
|
30
30
|
tabs,
|
|
31
|
+
collapse,
|
|
31
32
|
} from "@rxdrag/website-lib-core";
|
|
32
33
|
|
|
33
34
|
pageLoader.onLoaded(() => {
|
|
@@ -41,5 +42,7 @@ const { class: className, ...motionProps } = getMotionProps(rest);
|
|
|
41
42
|
aos.mount();
|
|
42
43
|
//初始化标签页
|
|
43
44
|
tabs.mount();
|
|
45
|
+
//初始化折叠
|
|
46
|
+
collapse.mount();
|
|
44
47
|
});
|
|
45
48
|
</script>
|
|
@@ -7,12 +7,14 @@ import {
|
|
|
7
7
|
import Motion from "./Motion.astro";
|
|
8
8
|
|
|
9
9
|
interface Props extends IMotionProps {
|
|
10
|
-
|
|
10
|
+
openableKey?: string;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
const
|
|
13
|
+
const { openableKey, ...rest } = Astro.props;
|
|
14
|
+
|
|
15
|
+
const dataAttrs = getPopoverDataAttrs(openableKey);
|
|
14
16
|
---
|
|
15
17
|
|
|
16
|
-
<Motion {...dataAttrs} {...
|
|
18
|
+
<Motion {...dataAttrs} {...rest}>
|
|
17
19
|
<slot />
|
|
18
20
|
</Motion>
|
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
import Motion from "./Motion.astro";
|
|
8
8
|
|
|
9
9
|
interface Props extends IMotionProps {
|
|
10
|
-
|
|
10
|
+
openableKey?: string;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
const dataAttrs = getPopoverPanelDataAttrs(Astro.props.
|
|
13
|
+
const dataAttrs = getPopoverPanelDataAttrs(Astro.props.openableKey);
|
|
14
14
|
|
|
15
|
-
const {
|
|
15
|
+
const { whileOpenable = defaultPopoverPanelAnimation, ...props } = Astro.props;
|
|
16
16
|
---
|
|
17
17
|
|
|
18
|
-
<Motion
|
|
18
|
+
<Motion whileOpenable={whileOpenable} {...dataAttrs} {...props}>
|
|
19
19
|
<slot />
|
|
20
20
|
</Motion>
|
package/src/components/index.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export { default as AnimationNumber } from "./AnimationNumber.astro";
|
|
2
|
+
export { default as Collapse } from "./Collapse.astro";
|
|
3
|
+
export { default as CollapseTrigger } from "./CollapseTrigger.astro";
|
|
4
|
+
export { default as CollapsePanel } from "./CollapsePanel.astro";
|
|
2
5
|
export { default as Flip } from "./Flip.astro";
|
|
3
6
|
export { default as Link } from "./Link.astro";
|
|
4
7
|
export { default as Meta } from "./Meta.astro";
|