yangs-ui 0.0.3 → 0.0.5
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/{umd/index.full.css → dist/index.css} +9 -2
- package/{umd → dist}/index.full.js +19 -8
- package/es/component.js +5 -0
- package/es/{button → compontents/button}/index.js +2 -3
- package/es/{button → compontents/button}/src/button.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/{icon → compontents/icon}/index.js +2 -3
- package/es/{icon → compontents/icon}/src/icon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/compontents/index.d.ts +2 -0
- package/es/constants/key.js +3 -0
- package/es/index.js +11 -11
- package/es/make-install.js +13 -0
- package/lib/component.cjs +5 -0
- package/lib/{button → compontents/button}/index.cjs +2 -3
- package/lib/{button → compontents/button}/src/button.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/lib/{icon → compontents/icon}/index.cjs +2 -3
- package/lib/{icon → compontents/icon}/src/icon.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/lib/compontents/index.d.ts +2 -0
- package/lib/constants/key.cjs +3 -0
- package/lib/index.cjs +13 -10
- package/lib/make-install.cjs +13 -0
- package/package.json +1 -1
- package/theme-chalk/base.css +4 -0
- package/{lib/icon/style → theme-chalk}/index.css +9 -0
- package/theme-chalk/src/base.scss +4 -0
- package/theme-chalk/src/button.scss +6 -0
- package/theme-chalk/src/icon.scss +9 -0
- package/theme-chalk/src/index.scss +3 -0
- package/theme-chalk/src/mixins/config.scss +5 -0
- package/theme-chalk/src/mixins/mixins.scss +37 -0
- package/es/index.prod.d.ts +0 -8
- package/lib/button/style/index.css +0 -3
- package/lib/index.prod.d.ts +0 -8
- package/lib/theme-chalk/src/index.d.ts +0 -0
- /package/es/{button → compontents/button}/index.d.ts +0 -0
- /package/es/{button → compontents/button}/src/button.d.ts +0 -0
- /package/es/{button → compontents/button}/src/button.js +0 -0
- /package/es/{button → compontents/button}/src/button.vue.d.ts +0 -0
- /package/es/{button/src/button.vue.js → compontents/button/src/button2.js} +0 -0
- /package/es/{icon → compontents/icon}/index.d.ts +0 -0
- /package/es/{icon → compontents/icon}/src/icon.d.ts +0 -0
- /package/es/{icon → compontents/icon}/src/icon.js +0 -0
- /package/es/{icon → compontents/icon}/src/icon.vue.d.ts +0 -0
- /package/es/{icon/src/icon.vue.js → compontents/icon/src/icon2.js} +0 -0
- /package/lib/{button → compontents/button}/index.d.ts +0 -0
- /package/lib/{button → compontents/button}/src/button.cjs +0 -0
- /package/lib/{button → compontents/button}/src/button.d.ts +0 -0
- /package/lib/{button → compontents/button}/src/button.vue.d.ts +0 -0
- /package/lib/{button/src/button.vue.cjs → compontents/button/src/button2.cjs} +0 -0
- /package/lib/{icon → compontents/icon}/index.d.ts +0 -0
- /package/lib/{icon → compontents/icon}/src/icon.cjs +0 -0
- /package/lib/{icon → compontents/icon}/src/icon.d.ts +0 -0
- /package/lib/{icon → compontents/icon}/src/icon.vue.d.ts +0 -0
- /package/lib/{icon/src/icon.vue.cjs → compontents/icon/src/icon2.cjs} +0 -0
- /package/{es/button/style/index.css → theme-chalk/button.css} +0 -0
- /package/{es/icon/style/index.css → theme-chalk/icon.css} +0 -0
|
@@ -5,6 +5,19 @@
|
|
|
5
5
|
__esModule: { value: true },
|
|
6
6
|
[Symbol.toStringTag]: { value: "Module" }
|
|
7
7
|
});
|
|
8
|
+
// ../constants/key.ts
|
|
9
|
+
var INSTALLED_KEY = Symbol("INSTALLED_KEY");
|
|
10
|
+
// make-install.ts
|
|
11
|
+
function makeInstall(components) {
|
|
12
|
+
const install = (app) => {
|
|
13
|
+
if (app[INSTALLED_KEY]) return;
|
|
14
|
+
app[INSTALLED_KEY] = true;
|
|
15
|
+
components.forEach((component) => {
|
|
16
|
+
app.use(component);
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
return { install };
|
|
20
|
+
}
|
|
8
21
|
// ../utils/with-install.ts
|
|
9
22
|
function withInstall(component) {
|
|
10
23
|
component.install = function(app) {
|
|
@@ -112,16 +125,14 @@
|
|
|
112
125
|
};
|
|
113
126
|
}
|
|
114
127
|
}));
|
|
115
|
-
// index.
|
|
116
|
-
var
|
|
117
|
-
var install =
|
|
118
|
-
|
|
119
|
-
app.use(component);
|
|
120
|
-
});
|
|
121
|
-
};
|
|
122
|
-
var installer = { install };
|
|
128
|
+
// index.ts
|
|
129
|
+
var installer = makeInstall([YIcon, YButton]);
|
|
130
|
+
var install = installer.install;
|
|
131
|
+
exports.INSTALLED_KEY = INSTALLED_KEY;
|
|
123
132
|
exports.YButton = YButton;
|
|
124
133
|
exports.YIcon = YIcon;
|
|
134
|
+
exports.buttonProps = buttonProps;
|
|
125
135
|
exports.default = installer;
|
|
136
|
+
exports.iconProps = iconProps;
|
|
126
137
|
exports.install = install;
|
|
127
138
|
});
|
package/es/component.js
ADDED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { withInstall } from "
|
|
1
|
+
import { withInstall } from "../../utils/with-install.js";
|
|
2
2
|
import { buttonProps } from "./src/button.js";
|
|
3
|
-
import button_default from "./src/
|
|
4
|
-
import './style/index.css';/* empty css */
|
|
3
|
+
import button_default from "./src/button2.js";
|
|
5
4
|
// ../compontents/button/index.ts
|
|
6
5
|
var YButton = withInstall(button_default);
|
|
7
6
|
export { YButton, YButton as default, buttonProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createNameSpace } from "
|
|
1
|
+
import { createNameSpace } from "../../../utils/create.js";
|
|
2
2
|
import { buttonProps } from "./button.js";
|
|
3
3
|
import { computed, createElementBlock, defineComponent, normalizeClass, normalizeStyle, openBlock, renderSlot, unref } from "vue";
|
|
4
4
|
// ../compontents/button/src/button.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { withInstall } from "
|
|
1
|
+
import { withInstall } from "../../utils/with-install.js";
|
|
2
2
|
import { iconProps } from "./src/icon.js";
|
|
3
|
-
import icon_default from "./src/
|
|
4
|
-
import './style/index.css';/* empty css */
|
|
3
|
+
import icon_default from "./src/icon2.js";
|
|
5
4
|
// ../compontents/icon/index.ts
|
|
6
5
|
var YIcon = withInstall(icon_default);
|
|
7
6
|
export { YIcon, YIcon as default, iconProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createNameSpace } from "
|
|
1
|
+
import { createNameSpace } from "../../../utils/create.js";
|
|
2
2
|
import { iconProps } from "./icon.js";
|
|
3
3
|
import { computed, createElementBlock, defineComponent, normalizeClass, normalizeStyle, openBlock, renderSlot, unref } from "vue";
|
|
4
4
|
// ../compontents/icon/src/icon.vue?vue&type=script&setup=true&lang.ts
|
package/es/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
-
export { YButton, YIcon, installer as default, install };
|
|
1
|
+
import { INSTALLED_KEY } from "./constants/key.js";
|
|
2
|
+
import { makeInstall } from "./make-install.js";
|
|
3
|
+
import { iconProps } from "./compontents/icon/src/icon.js";
|
|
4
|
+
import { YIcon } from "./compontents/icon/index.js";
|
|
5
|
+
import { buttonProps } from "./compontents/button/src/button.js";
|
|
6
|
+
import { YButton } from "./compontents/button/index.js";
|
|
7
|
+
import component_default from "./component.js";
|
|
8
|
+
// index.ts
|
|
9
|
+
var installer = makeInstall(component_default);
|
|
10
|
+
var install = installer.install;
|
|
11
|
+
export { INSTALLED_KEY, YButton, YIcon, buttonProps, installer as default, iconProps, install };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { INSTALLED_KEY } from "./constants/key.js";
|
|
2
|
+
// make-install.ts
|
|
3
|
+
function makeInstall(components) {
|
|
4
|
+
const install = (app) => {
|
|
5
|
+
if (app[INSTALLED_KEY]) return;
|
|
6
|
+
app[INSTALLED_KEY] = true;
|
|
7
|
+
components.forEach((component) => {
|
|
8
|
+
app.use(component);
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
return { install };
|
|
12
|
+
}
|
|
13
|
+
export { makeInstall };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const require_with_install = require("../../utils/with-install.cjs");
|
|
2
2
|
const require_button = require("./src/button.cjs");
|
|
3
|
-
const require_button$1 = require("./src/
|
|
4
|
-
;/* empty css */
|
|
3
|
+
const require_button$1 = require("./src/button2.cjs");
|
|
5
4
|
// ../compontents/button/index.ts
|
|
6
5
|
var YButton = require_with_install.withInstall(require_button$1.default);
|
|
7
6
|
exports.YButton = YButton;
|
package/lib/{button → compontents/button}/src/button.vue_vue_type_script_setup_true_lang.cjs
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_create = require("
|
|
1
|
+
const require_create = require("../../../utils/create.cjs");
|
|
2
2
|
const require_button = require("./button.cjs");
|
|
3
3
|
let vue = require("vue");
|
|
4
4
|
// ../compontents/button/src/button.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const require_with_install = require("../../utils/with-install.cjs");
|
|
2
2
|
const require_icon = require("./src/icon.cjs");
|
|
3
|
-
const require_icon$1 = require("./src/
|
|
4
|
-
;/* empty css */
|
|
3
|
+
const require_icon$1 = require("./src/icon2.cjs");
|
|
5
4
|
// ../compontents/icon/index.ts
|
|
6
5
|
var YIcon = require_with_install.withInstall(require_icon$1.default);
|
|
7
6
|
exports.YIcon = YIcon;
|
package/lib/index.cjs
CHANGED
|
@@ -2,17 +2,20 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var
|
|
5
|
+
const require_key = require("./constants/key.cjs");
|
|
6
|
+
const require_make_install = require("./make-install.cjs");
|
|
7
|
+
const require_icon = require("./compontents/icon/src/icon.cjs");
|
|
8
|
+
const require_index = require("./compontents/icon/index.cjs");
|
|
9
|
+
const require_button = require("./compontents/button/src/button.cjs");
|
|
10
|
+
const require_index$1 = require("./compontents/button/index.cjs");
|
|
11
|
+
const require_component = require("./component.cjs");
|
|
12
|
+
// index.ts
|
|
13
|
+
var installer = require_make_install.makeInstall(require_component.default);
|
|
14
|
+
var install = installer.install;
|
|
15
|
+
exports.INSTALLED_KEY = require_key.INSTALLED_KEY;
|
|
15
16
|
exports.YButton = require_index$1.YButton;
|
|
16
17
|
exports.YIcon = require_index.YIcon;
|
|
18
|
+
exports.buttonProps = require_button.buttonProps;
|
|
17
19
|
exports.default = installer;
|
|
20
|
+
exports.iconProps = require_icon.iconProps;
|
|
18
21
|
exports.install = install;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const require_key = require("./constants/key.cjs");
|
|
2
|
+
// make-install.ts
|
|
3
|
+
function makeInstall(components) {
|
|
4
|
+
const install = (app) => {
|
|
5
|
+
if (app[require_key.INSTALLED_KEY]) return;
|
|
6
|
+
app[require_key.INSTALLED_KEY] = true;
|
|
7
|
+
components.forEach((component) => {
|
|
8
|
+
app.use(component);
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
return { install };
|
|
12
|
+
}
|
|
13
|
+
exports.makeInstall = makeInstall;
|
package/package.json
CHANGED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
@use "./config.scss" as *; // as * 表示导入所有变量,不带命名空间
|
|
2
|
+
@forward "./config.scss";
|
|
3
|
+
|
|
4
|
+
@mixin b($block) {
|
|
5
|
+
$B: $namespace + "-" + $block;
|
|
6
|
+
// #{$B} 使用变量$B的值
|
|
7
|
+
.#{$B} {
|
|
8
|
+
// 类似插槽的样式
|
|
9
|
+
@content;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@mixin e($element) {
|
|
14
|
+
// @at-root 里面生成的选择器不继承外层的父选择器,直接输出到根层级
|
|
15
|
+
@at-root {
|
|
16
|
+
// 父选择器和$element-separator、$element拼接,生成新选择器
|
|
17
|
+
#{& + $element-separator + $element} {
|
|
18
|
+
@content;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@mixin m($modifier) {
|
|
24
|
+
@at-root {
|
|
25
|
+
#{& + $modifier-separator + $modifier} {
|
|
26
|
+
@content;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@mixin when($state) {
|
|
32
|
+
@at-root {
|
|
33
|
+
&.#{$state-prefix + $state} {
|
|
34
|
+
@content;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
package/es/index.prod.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { YIcon } from '@yangs-ui/components/icon';
|
|
2
|
-
import { YButton } from '@yangs-ui/components/button';
|
|
3
|
-
declare const install: (app: any) => void;
|
|
4
|
-
declare const installer: {
|
|
5
|
-
install: (app: any) => void;
|
|
6
|
-
};
|
|
7
|
-
export default installer;
|
|
8
|
-
export { install, YIcon, YButton };
|
package/lib/index.prod.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { YIcon } from '@yangs-ui/components/icon';
|
|
2
|
-
import { YButton } from '@yangs-ui/components/button';
|
|
3
|
-
declare const install: (app: any) => void;
|
|
4
|
-
declare const installer: {
|
|
5
|
-
install: (app: any) => void;
|
|
6
|
-
};
|
|
7
|
-
export default installer;
|
|
8
|
-
export { install, YIcon, YButton };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|