@can2421/ui 0.0.15 → 0.0.17

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.
@@ -1,3 +1,5 @@
1
+ import { DefineComponent, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ import { ButtonType } from '.';
1
3
  declare function __VLS_template(): {
2
4
  attrs: Partial<{}>;
3
5
  slots: {
@@ -7,20 +9,20 @@ declare function __VLS_template(): {
7
9
  rootEl: HTMLButtonElement;
8
10
  };
9
11
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
- declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
12
+ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
11
13
  type: {
12
- type: import('vue').PropType<import('.').ButtonType>;
14
+ type: PropType<ButtonType>;
13
15
  default: string;
14
16
  };
15
17
  disabled: {
16
18
  type: BooleanConstructor;
17
19
  default: boolean;
18
20
  };
19
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
21
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
20
22
  click: (event: MouseEvent) => any;
21
- }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
23
+ }, string, PublicProps, Readonly< ExtractPropTypes<{
22
24
  type: {
23
- type: import('vue').PropType<import('.').ButtonType>;
25
+ type: PropType<ButtonType>;
24
26
  default: string;
25
27
  };
26
28
  disabled: {
@@ -30,9 +32,9 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
30
32
  }>> & Readonly<{
31
33
  onClick?: ((event: MouseEvent) => any) | undefined;
32
34
  }>, {
33
- type: import('.').ButtonType;
35
+ type: ButtonType;
34
36
  disabled: boolean;
35
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLButtonElement>;
37
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLButtonElement>;
36
38
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
37
39
  export default _default;
38
40
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,4 +1,4 @@
1
- import { default as Button } from './Button.vue';
1
+ import { default as Button } from './Button';
2
2
  export { Button };
3
3
  export default Button;
4
4
  export * from './types/button';
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ (function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.Can2421UI={},e.Vue))})(this,(function(e,t){"use strict";const l={type:{type:String,default:"primary"},disabled:{type:Boolean,default:!1}},f=["disabled"],u=t.defineComponent({__name:"Button",props:l,emits:["click"],setup(n,{emit:o}){const s=n,c=o;function d(i){s.disabled||c("click",i)}return(i,B)=>(t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass(["hyc-button",[`hyc-button--${i.type}`,{"hyc-button--disabled":i.disabled}]]),disabled:i.disabled,onClick:d},[t.renderSlot(i.$slots,"default")],10,f))}}),r="Hyc";function p(n){const o={};return Object.entries(n).forEach(([s,c])=>{const d=`${r}${s}`;o[d]=c}),o}function m(n,o){Object.entries(o).forEach(([s,c])=>{n.component(s,c)})}const a=p({Button:u}),b=a.HycButton,y={install(n){m(n,a)}};e.Button=u,e.HycButton=b,e.buttonProps=l,e.default=y,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
package/dist/index.d.ts CHANGED
@@ -1,6 +1,70 @@
1
- export * from './ui/src/index'
2
- export {}
3
- import Can2421UI from './ui/src/index'
4
- export default Can2421UI
5
- export * from './ui/src/index'
6
- export {}
1
+ import { App, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps } from 'vue';
2
+ import { ButtonType } from './types';
3
+ export declare const HycButton: {
4
+ new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
5
+ type: {
6
+ type: PropType<ButtonType>;
7
+ default: string;
8
+ };
9
+ disabled: {
10
+ type: BooleanConstructor;
11
+ default: boolean;
12
+ };
13
+ }>> & Readonly<{
14
+ onClick?: ((event: MouseEvent) => any) | undefined;
15
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
16
+ click: (event: MouseEvent) => any;
17
+ }, PublicProps, {
18
+ type: ButtonType;
19
+ disabled: boolean;
20
+ }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLButtonElement, ComponentProvideOptions, {
21
+ P: {};
22
+ B: {};
23
+ D: {};
24
+ C: {};
25
+ M: {};
26
+ Defaults: {};
27
+ }, Readonly< ExtractPropTypes<{
28
+ type: {
29
+ type: PropType<ButtonType>;
30
+ default: string;
31
+ };
32
+ disabled: {
33
+ type: BooleanConstructor;
34
+ default: boolean;
35
+ };
36
+ }>> & Readonly<{
37
+ onClick?: ((event: MouseEvent) => any) | undefined;
38
+ }>, {}, {}, {}, {}, {
39
+ type: ButtonType;
40
+ disabled: boolean;
41
+ }>;
42
+ __isFragment?: never;
43
+ __isTeleport?: never;
44
+ __isSuspense?: never;
45
+ } & ComponentOptionsBase<Readonly< ExtractPropTypes<{
46
+ type: {
47
+ type: PropType<ButtonType>;
48
+ default: string;
49
+ };
50
+ disabled: {
51
+ type: BooleanConstructor;
52
+ default: boolean;
53
+ };
54
+ }>> & Readonly<{
55
+ onClick?: ((event: MouseEvent) => any) | undefined;
56
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
57
+ click: (event: MouseEvent) => any;
58
+ }, string, {
59
+ type: ButtonType;
60
+ disabled: boolean;
61
+ }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
62
+ $slots: {
63
+ default?(_: {}): any;
64
+ };
65
+ });
66
+ export * from './types';
67
+ declare const _default: {
68
+ install(app: App): void;
69
+ };
70
+ export default _default;
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent as a, createElementBlock as r, openBlock as l, normalizeClass as d, renderSlot as p } from "vue";
1
+ import { defineComponent as l, createElementBlock as a, openBlock as r, normalizeClass as d, renderSlot as p } from "vue";
2
2
  const u = {
3
3
  type: {
4
4
  type: String,
@@ -8,57 +8,52 @@ const u = {
8
8
  type: Boolean,
9
9
  default: !1
10
10
  }
11
- }, f = ["disabled"], m = /* @__PURE__ */ a({
11
+ }, f = ["disabled"], m = /* @__PURE__ */ l({
12
12
  __name: "Button",
13
13
  props: u,
14
14
  emits: ["click"],
15
15
  setup(t, { emit: e }) {
16
- const n = t, o = e;
17
- function c(s) {
18
- n.disabled || o("click", s);
16
+ const o = t, s = e;
17
+ function c(n) {
18
+ o.disabled || s("click", n);
19
19
  }
20
- return (s, C) => (l(), r("button", {
20
+ return (n, C) => (r(), a("button", {
21
21
  class: d(["hyc-button", [
22
- `hyc-button--${s.type}`,
23
- { "hyc-button--disabled": s.disabled }
22
+ `hyc-button--${n.type}`,
23
+ { "hyc-button--disabled": n.disabled }
24
24
  ]]),
25
- disabled: s.disabled,
25
+ disabled: n.disabled,
26
26
  onClick: c
27
27
  }, [
28
- p(s.$slots, "default", {}, void 0, !0)
28
+ p(n.$slots, "default")
29
29
  ], 10, f));
30
30
  }
31
- }), b = (t, e) => {
32
- const n = t.__vccOpts || t;
33
- for (const [o, c] of e)
34
- n[o] = c;
35
- return n;
36
- }, y = /* @__PURE__ */ b(m, [["__scopeId", "data-v-6c0ad3e0"]]), _ = "Hyc";
37
- function h(t) {
31
+ }), b = "Hyc";
32
+ function y(t) {
38
33
  const e = {};
39
- return Object.entries(t).forEach(([n, o]) => {
40
- const c = `${_}${n}`;
41
- e[c] = o;
34
+ return Object.entries(t).forEach(([o, s]) => {
35
+ const c = `${b}${o}`;
36
+ e[c] = s;
42
37
  }), e;
43
38
  }
44
- function k(t, e) {
45
- Object.entries(e).forEach(([n, o]) => {
46
- t.component(n, o);
39
+ function h(t, e) {
40
+ Object.entries(e).forEach(([o, s]) => {
41
+ t.component(o, s);
47
42
  });
48
43
  }
49
44
  const B = {
50
- Button: y
45
+ Button: m
51
46
  // 添加新组件示例:
52
47
  // Input,
53
48
  // Dialog,
54
- }, i = h(B), O = i.HycButton, v = {
49
+ }, i = y(B), E = i.HycButton, _ = {
55
50
  install(t) {
56
- k(t, i);
51
+ h(t, i);
57
52
  }
58
53
  };
59
54
  export {
60
- y as Button,
61
- O as HycButton,
55
+ m as Button,
56
+ E as HycButton,
62
57
  u as buttonProps,
63
- v as default
58
+ _ as default
64
59
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@can2421/ui",
3
- "version": "0.0.15",
3
+ "version": "0.0.17",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./dist/index.d.ts",
@@ -1 +0,0 @@
1
- .hyc-button[data-v-6c0ad3e0]{padding:8px 16px;border-radius:4px;border:none;cursor:pointer;font-size:14px;transition:all .3s}.hyc-button--primary[data-v-6c0ad3e0]{background-color:#1890ff;color:#fff}.hyc-button--secondary[data-v-6c0ad3e0]{background-color:#f5f5f5;color:#333}.hyc-button--text[data-v-6c0ad3e0]{background-color:transparent;color:#1890ff}.hyc-button--disabled[data-v-6c0ad3e0]{opacity:.6;cursor:not-allowed}
@@ -1,2 +0,0 @@
1
- (function(t,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(t=typeof globalThis<"u"?globalThis:t||self,o(t.Can2421UI={},t.Vue))})(this,(function(t,o){"use strict";var i=document.createElement("style");i.textContent=`.hyc-button[data-v-6c0ad3e0]{padding:8px 16px;border-radius:4px;border:none;cursor:pointer;font-size:14px;transition:all .3s}.hyc-button--primary[data-v-6c0ad3e0]{background-color:#1890ff;color:#fff}.hyc-button--secondary[data-v-6c0ad3e0]{background-color:#f5f5f5;color:#333}.hyc-button--text[data-v-6c0ad3e0]{background-color:transparent;color:#1890ff}.hyc-button--disabled[data-v-6c0ad3e0]{opacity:.6;cursor:not-allowed}
2
- /*$vite$:1*/`,document.head.appendChild(i);const r={type:{type:String,default:"primary"},disabled:{type:Boolean,default:!1}},f=["disabled"],l=((e,n)=>{const c=e.__vccOpts||e;for(const[d,s]of n)c[d]=s;return c})(o.defineComponent({__name:"Button",props:r,emits:["click"],setup(e,{emit:n}){const c=e,d=n;function s(a){c.disabled||d("click",a)}return(a,C)=>(o.openBlock(),o.createElementBlock("button",{class:o.normalizeClass(["hyc-button",[`hyc-button--${a.type}`,{"hyc-button--disabled":a.disabled}]]),disabled:a.disabled,onClick:s},[o.renderSlot(a.$slots,"default",{},void 0,!0)],10,f))}}),[["__scopeId","data-v-6c0ad3e0"]]),p="Hyc";function b(e){const n={};return Object.entries(e).forEach(([c,d])=>{const s=`${p}${c}`;n[s]=d}),n}function y(e,n){Object.entries(n).forEach(([c,d])=>{e.component(c,d)})}const u=b({Button:l}),m=u.HycButton,_={install(e){y(e,u)}};t.Button=l,t.HycButton=m,t.buttonProps=r,t.default=_,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
@@ -1,2 +0,0 @@
1
- declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
2
- export default _default;
File without changes
@@ -1,2 +0,0 @@
1
- declare const router: any;
2
- export default router;
@@ -1,2 +0,0 @@
1
- declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
2
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const _default: import('vite').UserConfig;
2
- export default _default;
@@ -1,69 +0,0 @@
1
- import { App } from 'vue';
2
- export declare const HycButton: {
3
- new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
4
- type: {
5
- type: import('vue').PropType<import('./types').ButtonType>;
6
- default: string;
7
- };
8
- disabled: {
9
- type: BooleanConstructor;
10
- default: boolean;
11
- };
12
- }>> & Readonly<{
13
- onClick?: ((event: MouseEvent) => any) | undefined;
14
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
15
- click: (event: MouseEvent) => any;
16
- }, import('vue').PublicProps, {
17
- type: import('./types').ButtonType;
18
- disabled: boolean;
19
- }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLButtonElement, import('vue').ComponentProvideOptions, {
20
- P: {};
21
- B: {};
22
- D: {};
23
- C: {};
24
- M: {};
25
- Defaults: {};
26
- }, Readonly<import('vue').ExtractPropTypes<{
27
- type: {
28
- type: import('vue').PropType<import('./types').ButtonType>;
29
- default: string;
30
- };
31
- disabled: {
32
- type: BooleanConstructor;
33
- default: boolean;
34
- };
35
- }>> & Readonly<{
36
- onClick?: ((event: MouseEvent) => any) | undefined;
37
- }>, {}, {}, {}, {}, {
38
- type: import('./types').ButtonType;
39
- disabled: boolean;
40
- }>;
41
- __isFragment?: never;
42
- __isTeleport?: never;
43
- __isSuspense?: never;
44
- } & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
45
- type: {
46
- type: import('vue').PropType<import('./types').ButtonType>;
47
- default: string;
48
- };
49
- disabled: {
50
- type: BooleanConstructor;
51
- default: boolean;
52
- };
53
- }>> & Readonly<{
54
- onClick?: ((event: MouseEvent) => any) | undefined;
55
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
56
- click: (event: MouseEvent) => any;
57
- }, string, {
58
- type: import('./types').ButtonType;
59
- disabled: boolean;
60
- }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
61
- $slots: {
62
- default?(_: {}): any;
63
- };
64
- });
65
- export * from './types';
66
- declare const _default: {
67
- install(app: App): void;
68
- };
69
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const _default: import('vite').UserConfig;
2
- export default _default;
File without changes
File without changes