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.
Files changed (55) hide show
  1. package/{umd/index.full.css → dist/index.css} +9 -2
  2. package/{umd → dist}/index.full.js +19 -8
  3. package/es/component.js +5 -0
  4. package/es/{button → compontents/button}/index.js +2 -3
  5. package/es/{button → compontents/button}/src/button.vue_vue_type_script_setup_true_lang.js +1 -1
  6. package/es/{icon → compontents/icon}/index.js +2 -3
  7. package/es/{icon → compontents/icon}/src/icon.vue_vue_type_script_setup_true_lang.js +1 -1
  8. package/es/compontents/index.d.ts +2 -0
  9. package/es/constants/key.js +3 -0
  10. package/es/index.js +11 -11
  11. package/es/make-install.js +13 -0
  12. package/lib/component.cjs +5 -0
  13. package/lib/{button → compontents/button}/index.cjs +2 -3
  14. package/lib/{button → compontents/button}/src/button.vue_vue_type_script_setup_true_lang.cjs +1 -1
  15. package/lib/{icon → compontents/icon}/index.cjs +2 -3
  16. package/lib/{icon → compontents/icon}/src/icon.vue_vue_type_script_setup_true_lang.cjs +1 -1
  17. package/lib/compontents/index.d.ts +2 -0
  18. package/lib/constants/key.cjs +3 -0
  19. package/lib/index.cjs +13 -10
  20. package/lib/make-install.cjs +13 -0
  21. package/package.json +1 -1
  22. package/theme-chalk/base.css +4 -0
  23. package/{lib/icon/style → theme-chalk}/index.css +9 -0
  24. package/theme-chalk/src/base.scss +4 -0
  25. package/theme-chalk/src/button.scss +6 -0
  26. package/theme-chalk/src/icon.scss +9 -0
  27. package/theme-chalk/src/index.scss +3 -0
  28. package/theme-chalk/src/mixins/config.scss +5 -0
  29. package/theme-chalk/src/mixins/mixins.scss +37 -0
  30. package/es/index.prod.d.ts +0 -8
  31. package/lib/button/style/index.css +0 -3
  32. package/lib/index.prod.d.ts +0 -8
  33. package/lib/theme-chalk/src/index.d.ts +0 -0
  34. /package/es/{button → compontents/button}/index.d.ts +0 -0
  35. /package/es/{button → compontents/button}/src/button.d.ts +0 -0
  36. /package/es/{button → compontents/button}/src/button.js +0 -0
  37. /package/es/{button → compontents/button}/src/button.vue.d.ts +0 -0
  38. /package/es/{button/src/button.vue.js → compontents/button/src/button2.js} +0 -0
  39. /package/es/{icon → compontents/icon}/index.d.ts +0 -0
  40. /package/es/{icon → compontents/icon}/src/icon.d.ts +0 -0
  41. /package/es/{icon → compontents/icon}/src/icon.js +0 -0
  42. /package/es/{icon → compontents/icon}/src/icon.vue.d.ts +0 -0
  43. /package/es/{icon/src/icon.vue.js → compontents/icon/src/icon2.js} +0 -0
  44. /package/lib/{button → compontents/button}/index.d.ts +0 -0
  45. /package/lib/{button → compontents/button}/src/button.cjs +0 -0
  46. /package/lib/{button → compontents/button}/src/button.d.ts +0 -0
  47. /package/lib/{button → compontents/button}/src/button.vue.d.ts +0 -0
  48. /package/lib/{button/src/button.vue.cjs → compontents/button/src/button2.cjs} +0 -0
  49. /package/lib/{icon → compontents/icon}/index.d.ts +0 -0
  50. /package/lib/{icon → compontents/icon}/src/icon.cjs +0 -0
  51. /package/lib/{icon → compontents/icon}/src/icon.d.ts +0 -0
  52. /package/lib/{icon → compontents/icon}/src/icon.vue.d.ts +0 -0
  53. /package/lib/{icon/src/icon.vue.cjs → compontents/icon/src/icon2.cjs} +0 -0
  54. /package/{es/button/style/index.css → theme-chalk/button.css} +0 -0
  55. /package/{es/icon/style/index.css → theme-chalk/icon.css} +0 -0
@@ -1,8 +1,15 @@
1
+ * {
2
+ margin: 0;
3
+ padding: 0;
4
+ }
5
+
1
6
  .y-icon {
2
7
  width: 1em;
3
8
  height: 1em;
4
9
  vertical-align: middle;
5
10
  display: inline-flex;
6
- }.y-button {
11
+ }
12
+
13
+ .y-button {
7
14
  border: 1px solid #ccc;
8
- }/*$vite$:1*/
15
+ }
@@ -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.prod.ts
116
- var components = [YIcon, YButton];
117
- var install = (app) => {
118
- components.forEach((component) => {
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
  });
@@ -0,0 +1,5 @@
1
+ import { YIcon } from "./compontents/icon/index.js";
2
+ import { YButton } from "./compontents/button/index.js";
3
+ // component.ts
4
+ var component_default = [YIcon, YButton];
5
+ export { component_default as default };
@@ -1,7 +1,6 @@
1
- import { withInstall } from "../utils/with-install.js";
1
+ import { withInstall } from "../../utils/with-install.js";
2
2
  import { buttonProps } from "./src/button.js";
3
- import button_default from "./src/button.vue.js";
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 "../../utils/create.js";
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 "../utils/with-install.js";
1
+ import { withInstall } from "../../utils/with-install.js";
2
2
  import { iconProps } from "./src/icon.js";
3
- import icon_default from "./src/icon.vue.js";
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 "../../utils/create.js";
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
@@ -0,0 +1,2 @@
1
+ export * from './icon';
2
+ export * from './button';
@@ -0,0 +1,3 @@
1
+ // ../constants/key.ts
2
+ var INSTALLED_KEY = Symbol("INSTALLED_KEY");
3
+ export { INSTALLED_KEY };
package/es/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import { YIcon } from "./icon/index.js";
2
- import { YButton } from "./button/index.js";
3
- // index.prod.ts
4
- var components = [YIcon, YButton];
5
- var install = (app) => {
6
- components.forEach((component) => {
7
- app.use(component);
8
- });
9
- };
10
- var installer = { install };
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 };
@@ -0,0 +1,5 @@
1
+ const require_index = require("./compontents/icon/index.cjs");
2
+ const require_index$1 = require("./compontents/button/index.cjs");
3
+ // component.ts
4
+ var component_default = [require_index.YIcon, require_index$1.YButton];
5
+ exports.default = component_default;
@@ -1,7 +1,6 @@
1
- require('./style/index.css');const require_with_install = require("../utils/with-install.cjs");
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/button.vue.cjs");
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;
@@ -1,4 +1,4 @@
1
- const require_create = require("../../utils/create.cjs");
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
- require('./style/index.css');const require_with_install = require("../utils/with-install.cjs");
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/icon.vue.cjs");
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;
@@ -1,4 +1,4 @@
1
- const require_create = require("../../utils/create.cjs");
1
+ const require_create = require("../../../utils/create.cjs");
2
2
  const require_icon = require("./icon.cjs");
3
3
  let vue = require("vue");
4
4
  // ../compontents/icon/src/icon.vue?vue&type=script&setup=true&lang.ts
@@ -0,0 +1,2 @@
1
+ export * from './icon';
2
+ export * from './button';
@@ -0,0 +1,3 @@
1
+ // ../constants/key.ts
2
+ var INSTALLED_KEY = Symbol("INSTALLED_KEY");
3
+ exports.INSTALLED_KEY = INSTALLED_KEY;
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 require_index = require("./icon/index.cjs");
6
- const require_index$1 = require("./button/index.cjs");
7
- // index.prod.ts
8
- var components = [require_index.YIcon, require_index$1.YButton];
9
- var install = (app) => {
10
- components.forEach((component) => {
11
- app.use(component);
12
- });
13
- };
14
- var installer = { install };
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "yangs-ui",
3
3
  "type": "module",
4
- "version": "0.0.3",
4
+ "version": "0.0.5",
5
5
  "description": "A Component Library for Vue 3",
6
6
  "keywords": [
7
7
  "yangs-ui",
@@ -0,0 +1,4 @@
1
+ * {
2
+ margin: 0;
3
+ padding: 0;
4
+ }
@@ -1,6 +1,15 @@
1
+ * {
2
+ margin: 0;
3
+ padding: 0;
4
+ }
5
+
1
6
  .y-icon {
2
7
  width: 1em;
3
8
  height: 1em;
4
9
  vertical-align: middle;
5
10
  display: inline-flex;
11
+ }
12
+
13
+ .y-button {
14
+ border: 1px solid #ccc;
6
15
  }
@@ -0,0 +1,4 @@
1
+ * {
2
+ margin: 0;
3
+ padding: 0;
4
+ }
@@ -0,0 +1,6 @@
1
+ @use "./mixins/mixins.scss" as *;
2
+
3
+ @include b(button) {
4
+ // 使用em单位,因为传入了font-size
5
+ border: 1px solid #ccc;
6
+ }
@@ -0,0 +1,9 @@
1
+ @use "./mixins/mixins.scss" as *;
2
+
3
+ @include b(icon) {
4
+ // 使用em单位,因为传入了font-size
5
+ width: 1em;
6
+ height: 1em;
7
+ vertical-align: middle;
8
+ display: inline-flex;
9
+ }
@@ -0,0 +1,3 @@
1
+ @use "./base.scss";
2
+ @use "./icon.scss";
3
+ @use "./button.scss";
@@ -0,0 +1,5 @@
1
+ // bem规范变量定义
2
+ $namespace: "y";
3
+ $element-separator: "__";
4
+ $modifier-separator: "--";
5
+ $state-prefix: "is-";
@@ -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
+ }
@@ -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 };
@@ -1,3 +0,0 @@
1
- .y-button {
2
- border: 1px solid #ccc;
3
- }
@@ -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