@daouypkgs/antd 2.0.157
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 +1 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/antd.css +29217 -0
- package/dist/antd.esm.js +2557 -0
- package/dist/antd.esm.js.map +1 -0
- package/dist/customControls.d.ts +17 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +2644 -0
- package/dist/index.js.map +1 -0
- package/dist/registerButton.d.ts +7 -0
- package/dist/registerCarousel.d.ts +6 -0
- package/dist/registerCheckbox.d.ts +19 -0
- package/dist/registerCollapse.d.ts +15 -0
- package/dist/registerDropdown.d.ts +13 -0
- package/dist/registerInput.d.ts +26 -0
- package/dist/registerMenu.d.ts +20 -0
- package/dist/registerOption.d.ts +10 -0
- package/dist/registerRate.d.ts +6 -0
- package/dist/registerSelect.d.ts +16 -0
- package/dist/registerSlider.d.ts +19 -0
- package/dist/registerSwitch.d.ts +7 -0
- package/dist/registerTable.d.ts +30 -0
- package/dist/registerTabs.d.ts +14 -0
- package/dist/registerable.d.ts +4 -0
- package/package.json +83 -0
- package/skinny/customControls-82aa5d0c.esm.js +20 -0
- package/skinny/customControls-82aa5d0c.esm.js.map +1 -0
- package/skinny/customControls-fb0b7e5f.cjs.js +22 -0
- package/skinny/customControls-fb0b7e5f.cjs.js.map +1 -0
- package/skinny/customControls.d.ts +17 -0
- package/skinny/package.json +1 -0
- package/skinny/registerButton.cjs.js +90 -0
- package/skinny/registerButton.cjs.js.map +1 -0
- package/skinny/registerButton.d.ts +7 -0
- package/skinny/registerButton.esm.js +82 -0
- package/skinny/registerButton.esm.js.map +1 -0
- package/skinny/registerCarousel.cjs.js +76 -0
- package/skinny/registerCarousel.cjs.js.map +1 -0
- package/skinny/registerCarousel.d.ts +6 -0
- package/skinny/registerCarousel.esm.js +68 -0
- package/skinny/registerCarousel.esm.js.map +1 -0
- package/skinny/registerCheckbox.cjs.js +190 -0
- package/skinny/registerCheckbox.cjs.js.map +1 -0
- package/skinny/registerCheckbox.d.ts +19 -0
- package/skinny/registerCheckbox.esm.js +177 -0
- package/skinny/registerCheckbox.esm.js.map +1 -0
- package/skinny/registerCollapse.cjs.js +214 -0
- package/skinny/registerCollapse.cjs.js.map +1 -0
- package/skinny/registerCollapse.d.ts +15 -0
- package/skinny/registerCollapse.esm.js +202 -0
- package/skinny/registerCollapse.esm.js.map +1 -0
- package/skinny/registerDropdown.cjs.js +191 -0
- package/skinny/registerDropdown.cjs.js.map +1 -0
- package/skinny/registerDropdown.d.ts +13 -0
- package/skinny/registerDropdown.esm.js +179 -0
- package/skinny/registerDropdown.esm.js.map +1 -0
- package/skinny/registerInput.cjs.js +468 -0
- package/skinny/registerInput.cjs.js.map +1 -0
- package/skinny/registerInput.d.ts +26 -0
- package/skinny/registerInput.esm.js +447 -0
- package/skinny/registerInput.esm.js.map +1 -0
- package/skinny/registerMenu.cjs.js +319 -0
- package/skinny/registerMenu.cjs.js.map +1 -0
- package/skinny/registerMenu.d.ts +20 -0
- package/skinny/registerMenu.esm.js +299 -0
- package/skinny/registerMenu.esm.js.map +1 -0
- package/skinny/registerOption.cjs.js +89 -0
- package/skinny/registerOption.cjs.js.map +1 -0
- package/skinny/registerOption.d.ts +10 -0
- package/skinny/registerOption.esm.js +78 -0
- package/skinny/registerOption.esm.js.map +1 -0
- package/skinny/registerRate.cjs.js +82 -0
- package/skinny/registerRate.cjs.js.map +1 -0
- package/skinny/registerRate.d.ts +6 -0
- package/skinny/registerRate.esm.js +74 -0
- package/skinny/registerRate.esm.js.map +1 -0
- package/skinny/registerSelect.cjs.js +173 -0
- package/skinny/registerSelect.cjs.js.map +1 -0
- package/skinny/registerSelect.d.ts +16 -0
- package/skinny/registerSelect.esm.js +165 -0
- package/skinny/registerSelect.esm.js.map +1 -0
- package/skinny/registerSlider.cjs.js +162 -0
- package/skinny/registerSlider.cjs.js.map +1 -0
- package/skinny/registerSlider.d.ts +19 -0
- package/skinny/registerSlider.esm.js +153 -0
- package/skinny/registerSlider.esm.js.map +1 -0
- package/skinny/registerSwitch.cjs.js +84 -0
- package/skinny/registerSwitch.cjs.js.map +1 -0
- package/skinny/registerSwitch.d.ts +7 -0
- package/skinny/registerSwitch.esm.js +76 -0
- package/skinny/registerSwitch.esm.js.map +1 -0
- package/skinny/registerTable.cjs.js +217 -0
- package/skinny/registerTable.cjs.js.map +1 -0
- package/skinny/registerTable.d.ts +30 -0
- package/skinny/registerTable.esm.js +203 -0
- package/skinny/registerTable.esm.js.map +1 -0
- package/skinny/registerTabs.cjs.js +390 -0
- package/skinny/registerTabs.cjs.js.map +1 -0
- package/skinny/registerTabs.d.ts +14 -0
- package/skinny/registerTabs.esm.js +378 -0
- package/skinny/registerTabs.esm.js.map +1 -0
- package/skinny/registerable.cjs.js +3 -0
- package/skinny/registerable.cjs.js.map +1 -0
- package/skinny/registerable.d.ts +4 -0
- package/skinny/registerable.esm.js +2 -0
- package/skinny/registerable.esm.js.map +1 -0
package/package.json
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@daouypkgs/antd",
|
|
3
|
+
"version": "2.0.157",
|
|
4
|
+
"description": "Daouy registration calls for antd components",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"module": "dist/antd.esm.js",
|
|
8
|
+
"nx": {
|
|
9
|
+
"targets": {
|
|
10
|
+
"build": {
|
|
11
|
+
"inputs": [
|
|
12
|
+
"{projectRoot}/**/*",
|
|
13
|
+
"!{projectRoot}/**/dist/**/*",
|
|
14
|
+
"!{projectRoot}/skinny/**/*"
|
|
15
|
+
],
|
|
16
|
+
"outputs": [
|
|
17
|
+
"{projectRoot}/**/dist/**/*",
|
|
18
|
+
"{projectRoot}/skinny/**/*"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"require": "./dist/index.js",
|
|
26
|
+
"import": "./dist/antd.esm.js",
|
|
27
|
+
"types": "./dist/index.d.ts"
|
|
28
|
+
},
|
|
29
|
+
"./dist/antd.css": "./dist/antd.css",
|
|
30
|
+
"./skinny/*": {
|
|
31
|
+
"require": "./skinny/*.cjs.js",
|
|
32
|
+
"import": "./skinny/*.esm.js",
|
|
33
|
+
"types": "./skinny/*.d.ts"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"files": [
|
|
37
|
+
"dist",
|
|
38
|
+
"skinny"
|
|
39
|
+
],
|
|
40
|
+
"size-limit": [
|
|
41
|
+
{
|
|
42
|
+
"path": "dist/antd.cjs.production.min.js",
|
|
43
|
+
"limit": "10 KB"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"path": "dist/antd.esm.js",
|
|
47
|
+
"limit": "10 KB"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"scripts": {
|
|
51
|
+
"build": "rollup -c rollup.config.mjs && yarn copy_css_files && yarn gentypes",
|
|
52
|
+
"gentypes": "yarn tsc --emitDeclarationOnly --declaration src/index.ts --incremental --tsBuildInfoFile ./dist/.tsbuildinfo --skipLibCheck --jsx react --lib dom,es2019 --esModuleInterop --strict --outDir ./dist/ && cp ./dist/*.d.ts skinny/ && rm skinny/index.d.ts",
|
|
53
|
+
"prepublishOnly": "npm run build",
|
|
54
|
+
"copy_css_files": "cp src/*.css dist/",
|
|
55
|
+
"size": "size-limit",
|
|
56
|
+
"analyze": "size-limit --why"
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"antd": "^4.19.5"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@daouy/host": "^1.0.234",
|
|
63
|
+
"@rollup/plugin-commonjs": "^11.0.0",
|
|
64
|
+
"@rollup/plugin-json": "^4.0.0",
|
|
65
|
+
"@rollup/plugin-node-resolve": "^9.0.0",
|
|
66
|
+
"@types/glob": "^7.1.3",
|
|
67
|
+
"@types/node": "^14.0.26",
|
|
68
|
+
"@types/react": "^18.2.33",
|
|
69
|
+
"glob": "^7.1.3",
|
|
70
|
+
"rc-menu": "~9.8.0",
|
|
71
|
+
"rc-select": "~14.1.17",
|
|
72
|
+
"react": "^18.2.0",
|
|
73
|
+
"react-dom": "^18.2.0",
|
|
74
|
+
"rollup": "^3.10.1",
|
|
75
|
+
"rollup-plugin-esbuild": "^5.0.0",
|
|
76
|
+
"rollup-plugin-replace-imports": "^1.0.0",
|
|
77
|
+
"typescript": "^5.2.2"
|
|
78
|
+
},
|
|
79
|
+
"peerDependencies": {
|
|
80
|
+
"@daouy/host": "^1.0.234",
|
|
81
|
+
"react": ">=16.8.0"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
function traverseReactEltTree(children, callback) {
|
|
2
|
+
const rec = (elts) => {
|
|
3
|
+
(Array.isArray(elts) ? elts : [elts]).forEach((elt) => {
|
|
4
|
+
var _a;
|
|
5
|
+
if (elt) {
|
|
6
|
+
callback(elt);
|
|
7
|
+
if (elt.children) {
|
|
8
|
+
rec(elt.children);
|
|
9
|
+
}
|
|
10
|
+
if (((_a = elt.props) == null ? void 0 : _a.children) && elt.props.children !== elt.children) {
|
|
11
|
+
rec(elt.props.children);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
rec(children);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { traverseReactEltTree as t };
|
|
20
|
+
//# sourceMappingURL=customControls-82aa5d0c.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customControls-82aa5d0c.esm.js","sources":["../src/customControls.ts"],"sourcesContent":["import type React from \"react\";\n\ntype ReactElt = {\n children: ReactElt | ReactElt[];\n props: {\n children: ReactElt | ReactElt[];\n [prop: string]: any;\n } | null;\n type: React.ComponentType<any> | null;\n key: string | null;\n} | null;\n\n/**\n * Traverses the tree of elements from a `React.createElement`. Notice we can't\n * traverse elements created within the children's render function since this is\n * the tree before rendering.\n */\nexport function traverseReactEltTree(\n children: React.ReactNode,\n callback: (elt: ReactElt) => void\n) {\n const rec = (elts: ReactElt | ReactElt[] | null) => {\n (Array.isArray(elts) ? elts : [elts]).forEach((elt) => {\n if (elt) {\n callback(elt);\n if (elt.children) {\n rec(elt.children);\n }\n if (elt.props?.children && elt.props.children !== elt.children) {\n rec(elt.props.children);\n }\n }\n });\n };\n rec(children as any);\n}\n"],"names":[],"mappings":"AAiBgB,SAAA,oBAAA,CACd,UACA,QACA,EAAA;AACA,EAAM,MAAA,GAAA,GAAM,CAAC,IAAuC,KAAA;AAClD,IAAC,CAAA,KAAA,CAAM,OAAQ,CAAA,IAAI,CAAI,GAAA,IAAA,GAAO,CAAC,IAAI,CAAA,EAAG,OAAQ,CAAA,CAAC,GAAQ,KAAA;AAtB3D,MAAA,IAAA,EAAA,CAAA;AAuBM,MAAA,IAAI,GAAK,EAAA;AACP,QAAA,QAAA,CAAS,GAAG,CAAA,CAAA;AACZ,QAAA,IAAI,IAAI,QAAU,EAAA;AAChB,UAAA,GAAA,CAAI,IAAI,QAAQ,CAAA,CAAA;AAAA,SAClB;AACA,QAAI,IAAA,CAAA,CAAA,EAAA,GAAA,GAAA,CAAI,UAAJ,IAAW,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,QAAA,KAAY,IAAI,KAAM,CAAA,QAAA,KAAa,IAAI,QAAU,EAAA;AAC9D,UAAI,GAAA,CAAA,GAAA,CAAI,MAAM,QAAQ,CAAA,CAAA;AAAA,SACxB;AAAA,OACF;AAAA,KACD,CAAA,CAAA;AAAA,GACH,CAAA;AACA,EAAA,GAAA,CAAI,QAAe,CAAA,CAAA;AACrB;;;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function traverseReactEltTree(children, callback) {
|
|
4
|
+
const rec = (elts) => {
|
|
5
|
+
(Array.isArray(elts) ? elts : [elts]).forEach((elt) => {
|
|
6
|
+
var _a;
|
|
7
|
+
if (elt) {
|
|
8
|
+
callback(elt);
|
|
9
|
+
if (elt.children) {
|
|
10
|
+
rec(elt.children);
|
|
11
|
+
}
|
|
12
|
+
if (((_a = elt.props) == null ? void 0 : _a.children) && elt.props.children !== elt.children) {
|
|
13
|
+
rec(elt.props.children);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
rec(children);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
exports.traverseReactEltTree = traverseReactEltTree;
|
|
22
|
+
//# sourceMappingURL=customControls-fb0b7e5f.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customControls-fb0b7e5f.cjs.js","sources":["../src/customControls.ts"],"sourcesContent":["import type React from \"react\";\n\ntype ReactElt = {\n children: ReactElt | ReactElt[];\n props: {\n children: ReactElt | ReactElt[];\n [prop: string]: any;\n } | null;\n type: React.ComponentType<any> | null;\n key: string | null;\n} | null;\n\n/**\n * Traverses the tree of elements from a `React.createElement`. Notice we can't\n * traverse elements created within the children's render function since this is\n * the tree before rendering.\n */\nexport function traverseReactEltTree(\n children: React.ReactNode,\n callback: (elt: ReactElt) => void\n) {\n const rec = (elts: ReactElt | ReactElt[] | null) => {\n (Array.isArray(elts) ? elts : [elts]).forEach((elt) => {\n if (elt) {\n callback(elt);\n if (elt.children) {\n rec(elt.children);\n }\n if (elt.props?.children && elt.props.children !== elt.children) {\n rec(elt.props.children);\n }\n }\n });\n };\n rec(children as any);\n}\n"],"names":[],"mappings":";;AAiBgB,SAAA,oBAAA,CACd,UACA,QACA,EAAA;AACA,EAAM,MAAA,GAAA,GAAM,CAAC,IAAuC,KAAA;AAClD,IAAC,CAAA,KAAA,CAAM,OAAQ,CAAA,IAAI,CAAI,GAAA,IAAA,GAAO,CAAC,IAAI,CAAA,EAAG,OAAQ,CAAA,CAAC,GAAQ,KAAA;AAtB3D,MAAA,IAAA,EAAA,CAAA;AAuBM,MAAA,IAAI,GAAK,EAAA;AACP,QAAA,QAAA,CAAS,GAAG,CAAA,CAAA;AACZ,QAAA,IAAI,IAAI,QAAU,EAAA;AAChB,UAAA,GAAA,CAAI,IAAI,QAAQ,CAAA,CAAA;AAAA,SAClB;AACA,QAAI,IAAA,CAAA,CAAA,EAAA,GAAA,GAAA,CAAI,UAAJ,IAAW,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,QAAA,KAAY,IAAI,KAAM,CAAA,QAAA,KAAa,IAAI,QAAU,EAAA;AAC9D,UAAI,GAAA,CAAA,GAAA,CAAI,MAAM,QAAQ,CAAA,CAAA;AAAA,SACxB;AAAA,OACF;AAAA,KACD,CAAA,CAAA;AAAA,GACH,CAAA;AACA,EAAA,GAAA,CAAI,QAAe,CAAA,CAAA;AACrB;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
type ReactElt = {
|
|
3
|
+
children: ReactElt | ReactElt[];
|
|
4
|
+
props: {
|
|
5
|
+
children: ReactElt | ReactElt[];
|
|
6
|
+
[prop: string]: any;
|
|
7
|
+
} | null;
|
|
8
|
+
type: React.ComponentType<any> | null;
|
|
9
|
+
key: string | null;
|
|
10
|
+
} | null;
|
|
11
|
+
/**
|
|
12
|
+
* Traverses the tree of elements from a `React.createElement`. Notice we can't
|
|
13
|
+
* traverse elements created within the children's render function since this is
|
|
14
|
+
* the tree before rendering.
|
|
15
|
+
*/
|
|
16
|
+
export declare function traverseReactEltTree(children: React.ReactNode, callback: (elt: ReactElt) => void): void;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var registerComponent = require('@daouy/host/registerComponent');
|
|
4
|
+
var antd = require('antd');
|
|
5
|
+
|
|
6
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
|
+
|
|
8
|
+
var registerComponent__default = /*#__PURE__*/_interopDefault(registerComponent);
|
|
9
|
+
|
|
10
|
+
const Button = antd.Button;
|
|
11
|
+
const buttonMeta = {
|
|
12
|
+
name: "AntdButton",
|
|
13
|
+
displayName: "Antd Button",
|
|
14
|
+
props: {
|
|
15
|
+
type: {
|
|
16
|
+
type: "choice",
|
|
17
|
+
options: ["default", "primary", "ghost", "dashed", "link", "text"],
|
|
18
|
+
description: "Can be set to primary, ghost, dashed, link, text, default",
|
|
19
|
+
defaultValueHint: "default"
|
|
20
|
+
},
|
|
21
|
+
size: {
|
|
22
|
+
type: "choice",
|
|
23
|
+
options: ["small", "medium", "large"],
|
|
24
|
+
description: "Set the size of button",
|
|
25
|
+
defaultValueHint: "medium"
|
|
26
|
+
},
|
|
27
|
+
shape: {
|
|
28
|
+
type: "choice",
|
|
29
|
+
options: ["default", "circle", "round"],
|
|
30
|
+
description: "Can be set button shape",
|
|
31
|
+
defaultValueHint: "default"
|
|
32
|
+
},
|
|
33
|
+
disabled: {
|
|
34
|
+
type: "boolean",
|
|
35
|
+
description: "Disabled state of button",
|
|
36
|
+
defaultValueHint: false
|
|
37
|
+
},
|
|
38
|
+
ghost: {
|
|
39
|
+
type: "boolean",
|
|
40
|
+
description: "Make background transparent and invert text and border colors",
|
|
41
|
+
defaultValueHint: false
|
|
42
|
+
},
|
|
43
|
+
danger: {
|
|
44
|
+
type: "boolean",
|
|
45
|
+
description: "Set the danger status of button",
|
|
46
|
+
defaultValueHint: false
|
|
47
|
+
},
|
|
48
|
+
block: {
|
|
49
|
+
type: "boolean",
|
|
50
|
+
description: "Option to fit button width to its parent width",
|
|
51
|
+
defaultValueHint: false
|
|
52
|
+
},
|
|
53
|
+
loading: {
|
|
54
|
+
type: "boolean",
|
|
55
|
+
description: "Set the loading status of button",
|
|
56
|
+
defaultValueHint: false
|
|
57
|
+
},
|
|
58
|
+
href: {
|
|
59
|
+
type: "string",
|
|
60
|
+
description: "Redirect url of link button"
|
|
61
|
+
},
|
|
62
|
+
target: {
|
|
63
|
+
type: "choice",
|
|
64
|
+
options: ["_blank", "_self", "_parent", "_top"],
|
|
65
|
+
description: "Same as target attribute of a, works when href is specified",
|
|
66
|
+
hidden: (props) => !props.href,
|
|
67
|
+
defaultValueHint: "_self"
|
|
68
|
+
},
|
|
69
|
+
children: {
|
|
70
|
+
type: "slot",
|
|
71
|
+
defaultValue: [
|
|
72
|
+
{
|
|
73
|
+
type: "text",
|
|
74
|
+
value: "Button"
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
importPath: "@daouypkgs/antd/skinny/registerButton",
|
|
80
|
+
importName: "Button"
|
|
81
|
+
};
|
|
82
|
+
function registerButton(loader, customButtonMeta) {
|
|
83
|
+
const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent__default.default(...args);
|
|
84
|
+
doRegisterComponent(antd.Button, customButtonMeta != null ? customButtonMeta : buttonMeta);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
exports.Button = Button;
|
|
88
|
+
exports.buttonMeta = buttonMeta;
|
|
89
|
+
exports.registerButton = registerButton;
|
|
90
|
+
//# sourceMappingURL=registerButton.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerButton.cjs.js","sources":["../src/registerButton.ts"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@daouy/host/registerComponent\";\nimport { Button as AntdButton } from \"antd\";\nimport type { ButtonProps } from \"antd/es/button\";\nimport { Registerable } from \"./registerable\";\n\nexport const Button: typeof AntdButton = AntdButton;\n\nexport const buttonMeta: ComponentMeta<ButtonProps> = {\n name: \"AntdButton\",\n displayName: \"Antd Button\",\n props: {\n type: {\n type: \"choice\",\n options: [\"default\", \"primary\", \"ghost\", \"dashed\", \"link\", \"text\"],\n description: \"Can be set to primary, ghost, dashed, link, text, default\",\n defaultValueHint: \"default\",\n },\n size: {\n type: \"choice\",\n options: [\"small\", \"medium\", \"large\"],\n description: \"Set the size of button\",\n defaultValueHint: \"medium\",\n },\n shape: {\n type: \"choice\",\n options: [\"default\", \"circle\", \"round\"],\n description: \"Can be set button shape\",\n defaultValueHint: \"default\",\n },\n disabled: {\n type: \"boolean\",\n description: \"Disabled state of button\",\n defaultValueHint: false,\n },\n ghost: {\n type: \"boolean\",\n description:\n \"Make background transparent and invert text and border colors\",\n defaultValueHint: false,\n },\n danger: {\n type: \"boolean\",\n description: \"Set the danger status of button\",\n defaultValueHint: false,\n },\n block: {\n type: \"boolean\",\n description: \"Option to fit button width to its parent width\",\n defaultValueHint: false,\n },\n loading: {\n type: \"boolean\",\n description: \"Set the loading status of button\",\n defaultValueHint: false,\n },\n href: {\n type: \"string\",\n description: \"Redirect url of link button\",\n },\n target: {\n type: \"choice\",\n options: [\"_blank\", \"_self\", \"_parent\", \"_top\"],\n description:\n \"Same as target attribute of a, works when href is specified\",\n hidden: (props) => !props.href,\n defaultValueHint: \"_self\",\n },\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"text\",\n value: \"Button\",\n },\n ],\n },\n },\n importPath: \"@daouypkgs/antd/skinny/registerButton\",\n importName: \"Button\",\n};\n\nexport function registerButton(\n loader?: Registerable,\n customButtonMeta?: ComponentMeta<ButtonProps>\n) {\n const doRegisterComponent: typeof registerComponent = (...args) =>\n loader ? loader.registerComponent(...args) : registerComponent(...args);\n doRegisterComponent(AntdButton, customButtonMeta ?? buttonMeta);\n}\n"],"names":["AntdButton","registerComponent"],"mappings":";;;;;;;;;AAOO,MAAM,MAA4B,GAAAA,YAAA;AAElC,MAAM,UAAyC,GAAA;AAAA,EACpD,IAAM,EAAA,YAAA;AAAA,EACN,WAAa,EAAA,aAAA;AAAA,EACb,KAAO,EAAA;AAAA,IACL,IAAM,EAAA;AAAA,MACJ,IAAM,EAAA,QAAA;AAAA,MACN,SAAS,CAAC,SAAA,EAAW,WAAW,OAAS,EAAA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A;AAAA,MACN,IAAM,EAAA,QAAA;AAAA,MACN,OAAS,EAAA,CAAC,QAAU,EAAA,OAAA,EAAS,WAAW,MAAM,CAAA;AAAA,MAC9C,WACE,EAAA,6DAAA;AAAA,MACF,MAAQ,EAAA,CAAC,KAAU,KAAA,CAAC,KAAM,CAAA,IAAA;AAAA,MAC1B,gBAAkB,EAAA,OAAA;AAAA,KACpB;AAAA,IACA,QAAU,EAAA;AAAA,MACR,IAAM,EAAA,MAAA;AAAA,MACN,YAAc,EAAA;AAAA,QACZ;AAAA,UACE,IAAM,EAAA,MAAA;AAAA,UACN,KAAO,EAAA,QAAA;AAAA,SACT;AAAA,OACF;AAAA,KACF;AAAA,GACF;AAAA,EACA,UAAY,EAAA,uCAAA;AAAA,EACZ,UAAY,EAAA,QAAA;AACd,EAAA;AAEgB,SAAA,cAAA,CACd,QACA,gBACA,EAAA;AACA,EAAM,MAAA,mBAAA,GAAgD,CAAI,GAAA,IAAA,KACxD,MAAS,GAAA,MAAA,CAAO,iBAAkB,CAAA,GAAG,IAAI,CAAA,GAAIC,kCAAkB,CAAA,GAAG,IAAI,CAAA,CAAA;AACxE,EAAoB,mBAAA,CAAAD,WAAA,EAAY,8CAAoB,UAAU,CAAA,CAAA;AAChE;;;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentMeta } from "@daouy/host/registerComponent";
|
|
2
|
+
import { Button as AntdButton } from "antd";
|
|
3
|
+
import type { ButtonProps } from "antd/es/button";
|
|
4
|
+
import { Registerable } from "./registerable";
|
|
5
|
+
export declare const Button: typeof AntdButton;
|
|
6
|
+
export declare const buttonMeta: ComponentMeta<ButtonProps>;
|
|
7
|
+
export declare function registerButton(loader?: Registerable, customButtonMeta?: ComponentMeta<ButtonProps>): void;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import registerComponent from '@daouy/host/registerComponent';
|
|
2
|
+
import { Button as Button$1 } from 'antd';
|
|
3
|
+
|
|
4
|
+
const Button = Button$1;
|
|
5
|
+
const buttonMeta = {
|
|
6
|
+
name: "AntdButton",
|
|
7
|
+
displayName: "Antd Button",
|
|
8
|
+
props: {
|
|
9
|
+
type: {
|
|
10
|
+
type: "choice",
|
|
11
|
+
options: ["default", "primary", "ghost", "dashed", "link", "text"],
|
|
12
|
+
description: "Can be set to primary, ghost, dashed, link, text, default",
|
|
13
|
+
defaultValueHint: "default"
|
|
14
|
+
},
|
|
15
|
+
size: {
|
|
16
|
+
type: "choice",
|
|
17
|
+
options: ["small", "medium", "large"],
|
|
18
|
+
description: "Set the size of button",
|
|
19
|
+
defaultValueHint: "medium"
|
|
20
|
+
},
|
|
21
|
+
shape: {
|
|
22
|
+
type: "choice",
|
|
23
|
+
options: ["default", "circle", "round"],
|
|
24
|
+
description: "Can be set button shape",
|
|
25
|
+
defaultValueHint: "default"
|
|
26
|
+
},
|
|
27
|
+
disabled: {
|
|
28
|
+
type: "boolean",
|
|
29
|
+
description: "Disabled state of button",
|
|
30
|
+
defaultValueHint: false
|
|
31
|
+
},
|
|
32
|
+
ghost: {
|
|
33
|
+
type: "boolean",
|
|
34
|
+
description: "Make background transparent and invert text and border colors",
|
|
35
|
+
defaultValueHint: false
|
|
36
|
+
},
|
|
37
|
+
danger: {
|
|
38
|
+
type: "boolean",
|
|
39
|
+
description: "Set the danger status of button",
|
|
40
|
+
defaultValueHint: false
|
|
41
|
+
},
|
|
42
|
+
block: {
|
|
43
|
+
type: "boolean",
|
|
44
|
+
description: "Option to fit button width to its parent width",
|
|
45
|
+
defaultValueHint: false
|
|
46
|
+
},
|
|
47
|
+
loading: {
|
|
48
|
+
type: "boolean",
|
|
49
|
+
description: "Set the loading status of button",
|
|
50
|
+
defaultValueHint: false
|
|
51
|
+
},
|
|
52
|
+
href: {
|
|
53
|
+
type: "string",
|
|
54
|
+
description: "Redirect url of link button"
|
|
55
|
+
},
|
|
56
|
+
target: {
|
|
57
|
+
type: "choice",
|
|
58
|
+
options: ["_blank", "_self", "_parent", "_top"],
|
|
59
|
+
description: "Same as target attribute of a, works when href is specified",
|
|
60
|
+
hidden: (props) => !props.href,
|
|
61
|
+
defaultValueHint: "_self"
|
|
62
|
+
},
|
|
63
|
+
children: {
|
|
64
|
+
type: "slot",
|
|
65
|
+
defaultValue: [
|
|
66
|
+
{
|
|
67
|
+
type: "text",
|
|
68
|
+
value: "Button"
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
importPath: "@daouypkgs/antd/skinny/registerButton",
|
|
74
|
+
importName: "Button"
|
|
75
|
+
};
|
|
76
|
+
function registerButton(loader, customButtonMeta) {
|
|
77
|
+
const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
|
|
78
|
+
doRegisterComponent(Button$1, customButtonMeta != null ? customButtonMeta : buttonMeta);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export { Button, buttonMeta, registerButton };
|
|
82
|
+
//# sourceMappingURL=registerButton.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerButton.esm.js","sources":["../src/registerButton.ts"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@daouy/host/registerComponent\";\nimport { Button as AntdButton } from \"antd\";\nimport type { ButtonProps } from \"antd/es/button\";\nimport { Registerable } from \"./registerable\";\n\nexport const Button: typeof AntdButton = AntdButton;\n\nexport const buttonMeta: ComponentMeta<ButtonProps> = {\n name: \"AntdButton\",\n displayName: \"Antd Button\",\n props: {\n type: {\n type: \"choice\",\n options: [\"default\", \"primary\", \"ghost\", \"dashed\", \"link\", \"text\"],\n description: \"Can be set to primary, ghost, dashed, link, text, default\",\n defaultValueHint: \"default\",\n },\n size: {\n type: \"choice\",\n options: [\"small\", \"medium\", \"large\"],\n description: \"Set the size of button\",\n defaultValueHint: \"medium\",\n },\n shape: {\n type: \"choice\",\n options: [\"default\", \"circle\", \"round\"],\n description: \"Can be set button shape\",\n defaultValueHint: \"default\",\n },\n disabled: {\n type: \"boolean\",\n description: \"Disabled state of button\",\n defaultValueHint: false,\n },\n ghost: {\n type: \"boolean\",\n description:\n \"Make background transparent and invert text and border colors\",\n defaultValueHint: false,\n },\n danger: {\n type: \"boolean\",\n description: \"Set the danger status of button\",\n defaultValueHint: false,\n },\n block: {\n type: \"boolean\",\n description: \"Option to fit button width to its parent width\",\n defaultValueHint: false,\n },\n loading: {\n type: \"boolean\",\n description: \"Set the loading status of button\",\n defaultValueHint: false,\n },\n href: {\n type: \"string\",\n description: \"Redirect url of link button\",\n },\n target: {\n type: \"choice\",\n options: [\"_blank\", \"_self\", \"_parent\", \"_top\"],\n description:\n \"Same as target attribute of a, works when href is specified\",\n hidden: (props) => !props.href,\n defaultValueHint: \"_self\",\n },\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"text\",\n value: \"Button\",\n },\n ],\n },\n },\n importPath: \"@daouypkgs/antd/skinny/registerButton\",\n importName: \"Button\",\n};\n\nexport function registerButton(\n loader?: Registerable,\n customButtonMeta?: ComponentMeta<ButtonProps>\n) {\n const doRegisterComponent: typeof registerComponent = (...args) =>\n loader ? loader.registerComponent(...args) : registerComponent(...args);\n doRegisterComponent(AntdButton, customButtonMeta ?? buttonMeta);\n}\n"],"names":["AntdButton"],"mappings":";;;AAOO,MAAM,MAA4B,GAAAA,SAAA;AAElC,MAAM,UAAyC,GAAA;AAAA,EACpD,IAAM,EAAA,YAAA;AAAA,EACN,WAAa,EAAA,aAAA;AAAA,EACb,KAAO,EAAA;AAAA,IACL,IAAM,EAAA;AAAA,MACJ,IAAM,EAAA,QAAA;AAAA,MACN,SAAS,CAAC,SAAA,EAAW,WAAW,OAAS,EAAA,QAAA,EAAU,QAAQ,MAAM,CAAA;AAAA,MACjE,WAAa,EAAA,2DAAA;AAAA,MACb,gBAAkB,EAAA,SAAA;AAAA,KACpB;AAAA,IACA,IAAM,EAAA;AAAA,MACJ,IAAM,EAAA,QAAA;AAAA,MACN,OAAS,EAAA,CAAC,OAAS,EA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A;AAAA,MAC1B,gBAAkB,EAAA,OAAA;AAAA,KACpB;AAAA,IACA,QAAU,EAAA;AAAA,MACR,IAAM,EAAA,MAAA;AAAA,MACN,YAAc,EAAA;AAAA,QACZ;AAAA,UACE,IAAM,EAAA,MAAA;AAAA,UACN,KAAO,EAAA,QAAA;AAAA,SACT;AAAA,OACF;AAAA,KACF;AAAA,GACF;AAAA,EACA,UAAY,EAAA,uCAAA;AAAA,EACZ,UAAY,EAAA,QAAA;AACd,EAAA;AAEgB,SAAA,cAAA,CACd,QACA,gBACA,EAAA;AACA,EAAM,MAAA,mBAAA,GAAgD,CAAI,GAAA,IAAA,KACxD,MAAS,GAAA,MAAA,CAAO,iBAAkB,CAAA,GAAG,IAAI,CAAA,GAAI,iBAAkB,CAAA,GAAG,IAAI,CAAA,CAAA;AACxE,EAAoB,mBAAA,CAAAA,QAAA,EAAY,8CAAoB,UAAU,CAAA,CAAA;AAChE;;;;"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var registerComponent = require('@daouy/host/registerComponent');
|
|
4
|
+
var antd = require('antd');
|
|
5
|
+
|
|
6
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
|
+
|
|
8
|
+
var registerComponent__default = /*#__PURE__*/_interopDefault(registerComponent);
|
|
9
|
+
|
|
10
|
+
const Carousel = antd.Carousel;
|
|
11
|
+
const contentStyle = {
|
|
12
|
+
height: 160,
|
|
13
|
+
color: "#fff",
|
|
14
|
+
lineHeight: 160,
|
|
15
|
+
textAlign: "center",
|
|
16
|
+
backgroundColor: "#364d79"
|
|
17
|
+
};
|
|
18
|
+
const carouselMeta = {
|
|
19
|
+
name: "AntdCarousel",
|
|
20
|
+
displayName: "Antd Carousel",
|
|
21
|
+
props: {
|
|
22
|
+
autoplay: {
|
|
23
|
+
type: "boolean",
|
|
24
|
+
description: "Whether to scroll automatically",
|
|
25
|
+
defaultValueHint: false
|
|
26
|
+
},
|
|
27
|
+
dotPosition: {
|
|
28
|
+
type: "choice",
|
|
29
|
+
options: ["top", "bottom", "left", "right"],
|
|
30
|
+
description: "The position of the dots",
|
|
31
|
+
defaultValueHint: "bottom"
|
|
32
|
+
},
|
|
33
|
+
dots: {
|
|
34
|
+
type: "boolean",
|
|
35
|
+
description: "Whether to show the dots at the bottom of the gallery",
|
|
36
|
+
defaultValueHint: true
|
|
37
|
+
},
|
|
38
|
+
effect: {
|
|
39
|
+
type: "choice",
|
|
40
|
+
options: ["scrollx", "fade"],
|
|
41
|
+
defaultValueHint: "scrollx"
|
|
42
|
+
},
|
|
43
|
+
children: {
|
|
44
|
+
type: "slot",
|
|
45
|
+
defaultValue: [
|
|
46
|
+
{
|
|
47
|
+
type: "vbox",
|
|
48
|
+
children: {
|
|
49
|
+
type: "text",
|
|
50
|
+
value: "1",
|
|
51
|
+
styles: contentStyle
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
type: "vbox",
|
|
56
|
+
children: {
|
|
57
|
+
type: "text",
|
|
58
|
+
value: "2",
|
|
59
|
+
styles: contentStyle
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
importPath: "@daouypkgs/antd/skinny/registerCarousel",
|
|
66
|
+
importName: "Carousel"
|
|
67
|
+
};
|
|
68
|
+
function registerCarousel(loader, customCarouselMeta) {
|
|
69
|
+
const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent__default.default(...args);
|
|
70
|
+
doRegisterComponent(Carousel, customCarouselMeta != null ? customCarouselMeta : carouselMeta);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
exports.Carousel = Carousel;
|
|
74
|
+
exports.carouselMeta = carouselMeta;
|
|
75
|
+
exports.registerCarousel = registerCarousel;
|
|
76
|
+
//# sourceMappingURL=registerCarousel.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerCarousel.cjs.js","sources":["../src/registerCarousel.ts"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@daouy/host/registerComponent\";\nimport { Carousel as AntdCarousel } from \"antd\";\nimport type { CarouselProps } from \"antd/es/carousel\";\nimport { Registerable } from \"./registerable\";\n\nexport const Carousel = AntdCarousel;\n\nconst contentStyle = {\n height: 160,\n color: \"#fff\",\n lineHeight: 160,\n textAlign: \"center\" as const,\n backgroundColor: \"#364d79\",\n};\n\nexport const carouselMeta: ComponentMeta<CarouselProps> = {\n name: \"AntdCarousel\",\n displayName: \"Antd Carousel\",\n props: {\n autoplay: {\n type: \"boolean\",\n description: \"Whether to scroll automatically\",\n defaultValueHint: false,\n },\n dotPosition: {\n type: \"choice\",\n options: [\"top\", \"bottom\", \"left\", \"right\"],\n description: \"The position of the dots\",\n defaultValueHint: \"bottom\",\n },\n dots: {\n type: \"boolean\",\n description: \"Whether to show the dots at the bottom of the gallery\",\n defaultValueHint: true,\n },\n effect: {\n type: \"choice\",\n options: [\"scrollx\", \"fade\"],\n defaultValueHint: \"scrollx\",\n },\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"vbox\",\n children: {\n type: \"text\",\n value: \"1\",\n styles: contentStyle,\n },\n },\n {\n type: \"vbox\",\n children: {\n type: \"text\",\n value: \"2\",\n styles: contentStyle,\n },\n },\n ],\n },\n },\n importPath: \"@daouypkgs/antd/skinny/registerCarousel\",\n importName: \"Carousel\",\n};\n\nexport function registerCarousel(\n loader?: Registerable,\n customCarouselMeta?: ComponentMeta<CarouselProps>\n) {\n const doRegisterComponent: typeof registerComponent = (...args) =>\n loader ? loader.registerComponent(...args) : registerComponent(...args);\n doRegisterComponent(Carousel, customCarouselMeta ?? carouselMeta);\n}\n"],"names":["AntdCarousel","registerComponent"],"mappings":";;;;;;;;;AAOO,MAAM,QAAW,GAAAA,cAAA;AAExB,MAAM,YAAe,GAAA;AAAA,EACnB,MAAQ,EAAA,GAAA;AAAA,EACR,KAAO,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,WACV;AAAA,SACF;AAAA,OACF;AAAA,KACF;AAAA,GACF;AAAA,EACA,UAAY,EAAA,yCAAA;AAAA,EACZ,UAAY,EAAA,UAAA;AACd,EAAA;AAEgB,SAAA,gBAAA,CACd,QACA,kBACA,EAAA;AACA,EAAM,MAAA,mBAAA,GAAgD,CAAI,GAAA,IAAA,KACxD,MAAS,GAAA,MAAA,CAAO,iBAAkB,CAAA,GAAG,IAAI,CAAA,GAAIC,kCAAkB,CAAA,GAAG,IAAI,CAAA,CAAA;AACxE,EAAoB,mBAAA,CAAA,QAAA,EAAU,kDAAsB,YAAY,CAAA,CAAA;AAClE;;;;;;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentMeta } from "@daouy/host/registerComponent";
|
|
2
|
+
import type { CarouselProps } from "antd/es/carousel";
|
|
3
|
+
import { Registerable } from "./registerable";
|
|
4
|
+
export declare const Carousel: import("react").ForwardRefExoticComponent<import("antd").CarouselProps & import("react").RefAttributes<import("antd/lib/carousel").CarouselRef>>;
|
|
5
|
+
export declare const carouselMeta: ComponentMeta<CarouselProps>;
|
|
6
|
+
export declare function registerCarousel(loader?: Registerable, customCarouselMeta?: ComponentMeta<CarouselProps>): void;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import registerComponent from '@daouy/host/registerComponent';
|
|
2
|
+
import { Carousel as Carousel$1 } from 'antd';
|
|
3
|
+
|
|
4
|
+
const Carousel = Carousel$1;
|
|
5
|
+
const contentStyle = {
|
|
6
|
+
height: 160,
|
|
7
|
+
color: "#fff",
|
|
8
|
+
lineHeight: 160,
|
|
9
|
+
textAlign: "center",
|
|
10
|
+
backgroundColor: "#364d79"
|
|
11
|
+
};
|
|
12
|
+
const carouselMeta = {
|
|
13
|
+
name: "AntdCarousel",
|
|
14
|
+
displayName: "Antd Carousel",
|
|
15
|
+
props: {
|
|
16
|
+
autoplay: {
|
|
17
|
+
type: "boolean",
|
|
18
|
+
description: "Whether to scroll automatically",
|
|
19
|
+
defaultValueHint: false
|
|
20
|
+
},
|
|
21
|
+
dotPosition: {
|
|
22
|
+
type: "choice",
|
|
23
|
+
options: ["top", "bottom", "left", "right"],
|
|
24
|
+
description: "The position of the dots",
|
|
25
|
+
defaultValueHint: "bottom"
|
|
26
|
+
},
|
|
27
|
+
dots: {
|
|
28
|
+
type: "boolean",
|
|
29
|
+
description: "Whether to show the dots at the bottom of the gallery",
|
|
30
|
+
defaultValueHint: true
|
|
31
|
+
},
|
|
32
|
+
effect: {
|
|
33
|
+
type: "choice",
|
|
34
|
+
options: ["scrollx", "fade"],
|
|
35
|
+
defaultValueHint: "scrollx"
|
|
36
|
+
},
|
|
37
|
+
children: {
|
|
38
|
+
type: "slot",
|
|
39
|
+
defaultValue: [
|
|
40
|
+
{
|
|
41
|
+
type: "vbox",
|
|
42
|
+
children: {
|
|
43
|
+
type: "text",
|
|
44
|
+
value: "1",
|
|
45
|
+
styles: contentStyle
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
type: "vbox",
|
|
50
|
+
children: {
|
|
51
|
+
type: "text",
|
|
52
|
+
value: "2",
|
|
53
|
+
styles: contentStyle
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
importPath: "@daouypkgs/antd/skinny/registerCarousel",
|
|
60
|
+
importName: "Carousel"
|
|
61
|
+
};
|
|
62
|
+
function registerCarousel(loader, customCarouselMeta) {
|
|
63
|
+
const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
|
|
64
|
+
doRegisterComponent(Carousel, customCarouselMeta != null ? customCarouselMeta : carouselMeta);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export { Carousel, carouselMeta, registerCarousel };
|
|
68
|
+
//# sourceMappingURL=registerCarousel.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerCarousel.esm.js","sources":["../src/registerCarousel.ts"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@daouy/host/registerComponent\";\nimport { Carousel as AntdCarousel } from \"antd\";\nimport type { CarouselProps } from \"antd/es/carousel\";\nimport { Registerable } from \"./registerable\";\n\nexport const Carousel = AntdCarousel;\n\nconst contentStyle = {\n height: 160,\n color: \"#fff\",\n lineHeight: 160,\n textAlign: \"center\" as const,\n backgroundColor: \"#364d79\",\n};\n\nexport const carouselMeta: ComponentMeta<CarouselProps> = {\n name: \"AntdCarousel\",\n displayName: \"Antd Carousel\",\n props: {\n autoplay: {\n type: \"boolean\",\n description: \"Whether to scroll automatically\",\n defaultValueHint: false,\n },\n dotPosition: {\n type: \"choice\",\n options: [\"top\", \"bottom\", \"left\", \"right\"],\n description: \"The position of the dots\",\n defaultValueHint: \"bottom\",\n },\n dots: {\n type: \"boolean\",\n description: \"Whether to show the dots at the bottom of the gallery\",\n defaultValueHint: true,\n },\n effect: {\n type: \"choice\",\n options: [\"scrollx\", \"fade\"],\n defaultValueHint: \"scrollx\",\n },\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"vbox\",\n children: {\n type: \"text\",\n value: \"1\",\n styles: contentStyle,\n },\n },\n {\n type: \"vbox\",\n children: {\n type: \"text\",\n value: \"2\",\n styles: contentStyle,\n },\n },\n ],\n },\n },\n importPath: \"@daouypkgs/antd/skinny/registerCarousel\",\n importName: \"Carousel\",\n};\n\nexport function registerCarousel(\n loader?: Registerable,\n customCarouselMeta?: ComponentMeta<CarouselProps>\n) {\n const doRegisterComponent: typeof registerComponent = (...args) =>\n loader ? loader.registerComponent(...args) : registerComponent(...args);\n doRegisterComponent(Carousel, customCarouselMeta ?? carouselMeta);\n}\n"],"names":["AntdCarousel"],"mappings":";;;AAOO,MAAM,QAAW,GAAAA,WAAA;AAExB,MAAM,YAAe,GAAA;AAAA,EACnB,MAAQ,EAAA,GAAA;AAAA,EACR,KAAO,EAAA,MAAA;AAAA,EACP,UAAY,EAAA,GAAA;AAAA,EACZ,SA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