@deskhero/dh_ui 1.0.0 → 1.3.0
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 +61 -19
- package/dist/dh_ui.es.js +1 -1
- package/dist/dh_ui.umd.js +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/stories/Button.stories.d.ts +274 -0
- package/dist/stories/Button.vue.d.ts +49 -0
- package/dist/stories/Forms.stories.d.ts +12 -0
- package/dist/stories/Forms.vue.d.ts +2 -0
- package/dist/stories/Grid.stories.d.ts +12 -0
- package/dist/stories/Grid.vue.d.ts +2 -0
- package/dist/stories/Icons.vue.d.ts +2 -0
- package/dist/stories/Utilities.stories.d.ts +12 -0
- package/dist/style.css +1 -1
- package/package.json +35 -5
package/README.md
CHANGED
|
@@ -1,40 +1,82 @@
|
|
|
1
|
-
|
|
1
|
+
## Deskhero ui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Deskhero ui is component library, based on Deskhero design system and Vue 3.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+

|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
<hr/>
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Installation
|
|
10
|
+
Install the component library
|
|
11
|
+
```
|
|
12
|
+
npm i @deskhero/dh_ui
|
|
13
|
+
```
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
## Usage
|
|
16
|
+
You can import from the main bundle:
|
|
17
|
+
```javascript
|
|
18
|
+
import { DhButton } from "@deskhero/dh_ui";
|
|
19
|
+
```
|
|
12
20
|
|
|
13
|
-
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
|
|
14
21
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
22
|
+
You also need to import Main CSS file to your project
|
|
23
|
+
```javascript
|
|
24
|
+
import "@deskhero/dh_ui/dist/style.css"
|
|
25
|
+
```
|
|
19
26
|
|
|
20
|
-
##
|
|
27
|
+
## Storybook
|
|
21
28
|
|
|
22
|
-
|
|
29
|
+
Storybook helps you build UI components in isolation from your app's business logic, data, and context. That makes it easy to develop hard-to-reach states. Save these UI states as stories to revisit during development, testing, or QA.
|
|
23
30
|
|
|
24
|
-
|
|
31
|
+
We are using storybook in order to develop the components independently from any consumer.
|
|
32
|
+
run this to build & run the storybook locally:
|
|
25
33
|
|
|
26
|
-
|
|
34
|
+
|
|
35
|
+
First install the node packages:
|
|
36
|
+
```bash
|
|
27
37
|
npm install
|
|
28
38
|
```
|
|
39
|
+
then serve storybook application
|
|
40
|
+
```bash
|
|
41
|
+
npm run storybook
|
|
42
|
+
```
|
|
43
|
+
the storybook will be served on `http://localhost:6006`
|
|
44
|
+
|
|
29
45
|
|
|
30
|
-
|
|
46
|
+
## Developing locally with your consumer application
|
|
47
|
+
When developing locally we are using a npm functionality called npm link, this allows us to
|
|
48
|
+
work locally on our package and use it in a different project without publishing.
|
|
49
|
+
This functionality basically overrides the npm mapping between package name to its repo, and points it to where the package is located locally.
|
|
50
|
+
|
|
51
|
+
From dh_ui
|
|
31
52
|
|
|
32
53
|
```sh
|
|
33
|
-
npm run
|
|
54
|
+
npm run build && npm link
|
|
34
55
|
```
|
|
35
56
|
|
|
36
|
-
|
|
57
|
+
Then on your project
|
|
37
58
|
|
|
38
59
|
```sh
|
|
39
|
-
npm
|
|
60
|
+
npm link @deskhero/dh_ui
|
|
40
61
|
```
|
|
62
|
+
|
|
63
|
+
<hr/>
|
|
64
|
+
|
|
65
|
+
### Recommended IDE Setup
|
|
66
|
+
|
|
67
|
+
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
### Type Support for .vue Imports in TS
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
|
|
74
|
+
|
|
75
|
+
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
|
|
76
|
+
|
|
77
|
+
1. Disable the built-in TypeScript Extension
|
|
78
|
+
1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
|
|
79
|
+
2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
|
|
80
|
+
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
|
|
81
|
+
|
|
82
|
+
<hr/>
|
package/dist/dh_ui.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { reactive, computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, toDisplayString } from "vue";
|
|
2
|
-
var button = /* @__PURE__ */ (() => ".button{font-family:Nunito Sans,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;border:0;
|
|
2
|
+
var button = /* @__PURE__ */ (() => ".button{font-family:Nunito Sans,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;border:0;cursor:pointer;line-height:1}.button--primary{color:#fff;background-color:green}.button--secondary{color:#333;background-color:#ff4500;box-shadow:#00000026 0 0 0 1px inset}.button--small{font-size:12px;padding:10px 16px}.button--medium{font-size:14px;padding:11px 20px}.button--large{font-size:16px;padding:12px 24px}\n")();
|
|
3
3
|
var _export_sfc = (sfc, props) => {
|
|
4
4
|
const target = sfc.__vccOpts || sfc;
|
|
5
5
|
for (const [key, val] of props) {
|
package/dist/dh_ui.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(n,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(n=typeof globalThis!="undefined"?globalThis:n||self,e(n.dh_ui={},n.Vue))})(this,function(n,e){"use strict";var
|
|
2
|
-
`)(),a=(t,o)=>{const i=t.__vccOpts||t;for(const[r,l]of o)i[r]=l;return i};const u={name:"dh-button",props:{label:{type:String,required:!0},primary:{type:Boolean,default:!1},size:{type:String,validator:function(t){return["small","medium","large"].indexOf(t)!==-1}},backgroundColor:{type:String}},emits:["click"],setup(t,{emit:o}){return t=e.reactive(t),{classes:e.computed(()=>({button:!0,"button--primary":t.primary,"button--secondary":!t.primary,[`button--${t.size||"medium"}`]:!0})),style:e.computed(()=>({backgroundColor:t.backgroundColor})),onClick(){o("click")}}}};function
|
|
1
|
+
(function(n,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(n=typeof globalThis!="undefined"?globalThis:n||self,e(n.dh_ui={},n.Vue))})(this,function(n,e){"use strict";var f=(()=>`.button{font-family:Nunito Sans,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;border:0;cursor:pointer;line-height:1}.button--primary{color:#fff;background-color:green}.button--secondary{color:#333;background-color:#ff4500;box-shadow:#00000026 0 0 0 1px inset}.button--small{font-size:12px;padding:10px 16px}.button--medium{font-size:14px;padding:11px 20px}.button--large{font-size:16px;padding:12px 24px}
|
|
2
|
+
`)(),a=(t,o)=>{const i=t.__vccOpts||t;for(const[r,l]of o)i[r]=l;return i};const u={name:"dh-button",props:{label:{type:String,required:!0},primary:{type:Boolean,default:!1},size:{type:String,validator:function(t){return["small","medium","large"].indexOf(t)!==-1}},backgroundColor:{type:String}},emits:["click"],setup(t,{emit:o}){return t=e.reactive(t),{classes:e.computed(()=>({button:!0,"button--primary":t.primary,"button--secondary":!t.primary,[`button--${t.size||"medium"}`]:!0})),style:e.computed(()=>({backgroundColor:t.backgroundColor})),onClick(){o("click")}}}};function c(t,o,i,r,l,p){return e.openBlock(),e.createElementBlock("button",{type:"button",class:e.normalizeClass(r.classes),onClick:o[0]||(o[0]=(...d)=>r.onClick&&r.onClick(...d)),style:e.normalizeStyle(r.style)},e.toDisplayString(i.label),7)}var s=a(u,[["render",c]]);n.DhButton=s,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export const title: string;
|
|
3
|
+
export { MyButton as component };
|
|
4
|
+
export namespace argTypes {
|
|
5
|
+
namespace backgroundColor {
|
|
6
|
+
const control: string;
|
|
7
|
+
}
|
|
8
|
+
const onClick: {};
|
|
9
|
+
namespace size {
|
|
10
|
+
export namespace control_1 {
|
|
11
|
+
const type: string;
|
|
12
|
+
}
|
|
13
|
+
export { control_1 as control };
|
|
14
|
+
export const options: string[];
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export default _default;
|
|
19
|
+
export function Primary(args: any): {
|
|
20
|
+
components: {
|
|
21
|
+
MyButton: import("vue").DefineComponent<{
|
|
22
|
+
label: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
primary: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
default: boolean;
|
|
29
|
+
};
|
|
30
|
+
size: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
validator: (value: unknown) => boolean;
|
|
33
|
+
};
|
|
34
|
+
backgroundColor: {
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
};
|
|
37
|
+
}, {
|
|
38
|
+
classes: import("vue").ComputedRef<{
|
|
39
|
+
[x: string]: boolean;
|
|
40
|
+
button: boolean;
|
|
41
|
+
"button--primary": boolean;
|
|
42
|
+
"button--secondary": boolean;
|
|
43
|
+
}>;
|
|
44
|
+
style: import("vue").ComputedRef<{
|
|
45
|
+
backgroundColor: string | undefined;
|
|
46
|
+
}>;
|
|
47
|
+
onClick(): void;
|
|
48
|
+
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
49
|
+
label: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
required: true;
|
|
52
|
+
};
|
|
53
|
+
primary: {
|
|
54
|
+
type: BooleanConstructor;
|
|
55
|
+
default: boolean;
|
|
56
|
+
};
|
|
57
|
+
size: {
|
|
58
|
+
type: StringConstructor;
|
|
59
|
+
validator: (value: unknown) => boolean;
|
|
60
|
+
};
|
|
61
|
+
backgroundColor: {
|
|
62
|
+
type: StringConstructor;
|
|
63
|
+
};
|
|
64
|
+
}>> & {
|
|
65
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
66
|
+
}, {
|
|
67
|
+
primary: boolean;
|
|
68
|
+
}>;
|
|
69
|
+
};
|
|
70
|
+
setup(): {
|
|
71
|
+
args: any;
|
|
72
|
+
};
|
|
73
|
+
template: string;
|
|
74
|
+
};
|
|
75
|
+
export namespace Primary {
|
|
76
|
+
namespace args {
|
|
77
|
+
const primary: boolean;
|
|
78
|
+
const label: string;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
export function Secondary(args: any): {
|
|
82
|
+
components: {
|
|
83
|
+
MyButton: import("vue").DefineComponent<{
|
|
84
|
+
label: {
|
|
85
|
+
type: StringConstructor;
|
|
86
|
+
required: true;
|
|
87
|
+
};
|
|
88
|
+
primary: {
|
|
89
|
+
type: BooleanConstructor;
|
|
90
|
+
default: boolean;
|
|
91
|
+
};
|
|
92
|
+
size: {
|
|
93
|
+
type: StringConstructor;
|
|
94
|
+
validator: (value: unknown) => boolean;
|
|
95
|
+
};
|
|
96
|
+
backgroundColor: {
|
|
97
|
+
type: StringConstructor;
|
|
98
|
+
};
|
|
99
|
+
}, {
|
|
100
|
+
classes: import("vue").ComputedRef<{
|
|
101
|
+
[x: string]: boolean;
|
|
102
|
+
button: boolean;
|
|
103
|
+
"button--primary": boolean;
|
|
104
|
+
"button--secondary": boolean;
|
|
105
|
+
}>;
|
|
106
|
+
style: import("vue").ComputedRef<{
|
|
107
|
+
backgroundColor: string | undefined;
|
|
108
|
+
}>;
|
|
109
|
+
onClick(): void;
|
|
110
|
+
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
111
|
+
label: {
|
|
112
|
+
type: StringConstructor;
|
|
113
|
+
required: true;
|
|
114
|
+
};
|
|
115
|
+
primary: {
|
|
116
|
+
type: BooleanConstructor;
|
|
117
|
+
default: boolean;
|
|
118
|
+
};
|
|
119
|
+
size: {
|
|
120
|
+
type: StringConstructor;
|
|
121
|
+
validator: (value: unknown) => boolean;
|
|
122
|
+
};
|
|
123
|
+
backgroundColor: {
|
|
124
|
+
type: StringConstructor;
|
|
125
|
+
};
|
|
126
|
+
}>> & {
|
|
127
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
128
|
+
}, {
|
|
129
|
+
primary: boolean;
|
|
130
|
+
}>;
|
|
131
|
+
};
|
|
132
|
+
setup(): {
|
|
133
|
+
args: any;
|
|
134
|
+
};
|
|
135
|
+
template: string;
|
|
136
|
+
};
|
|
137
|
+
export namespace Secondary {
|
|
138
|
+
export namespace args_1 {
|
|
139
|
+
const label_1: string;
|
|
140
|
+
export { label_1 as label };
|
|
141
|
+
}
|
|
142
|
+
export { args_1 as args };
|
|
143
|
+
}
|
|
144
|
+
export function Large(args: any): {
|
|
145
|
+
components: {
|
|
146
|
+
MyButton: import("vue").DefineComponent<{
|
|
147
|
+
label: {
|
|
148
|
+
type: StringConstructor;
|
|
149
|
+
required: true;
|
|
150
|
+
};
|
|
151
|
+
primary: {
|
|
152
|
+
type: BooleanConstructor;
|
|
153
|
+
default: boolean;
|
|
154
|
+
};
|
|
155
|
+
size: {
|
|
156
|
+
type: StringConstructor;
|
|
157
|
+
validator: (value: unknown) => boolean;
|
|
158
|
+
};
|
|
159
|
+
backgroundColor: {
|
|
160
|
+
type: StringConstructor;
|
|
161
|
+
};
|
|
162
|
+
}, {
|
|
163
|
+
classes: import("vue").ComputedRef<{
|
|
164
|
+
[x: string]: boolean;
|
|
165
|
+
button: boolean;
|
|
166
|
+
"button--primary": boolean;
|
|
167
|
+
"button--secondary": boolean;
|
|
168
|
+
}>;
|
|
169
|
+
style: import("vue").ComputedRef<{
|
|
170
|
+
backgroundColor: string | undefined;
|
|
171
|
+
}>;
|
|
172
|
+
onClick(): void;
|
|
173
|
+
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
174
|
+
label: {
|
|
175
|
+
type: StringConstructor;
|
|
176
|
+
required: true;
|
|
177
|
+
};
|
|
178
|
+
primary: {
|
|
179
|
+
type: BooleanConstructor;
|
|
180
|
+
default: boolean;
|
|
181
|
+
};
|
|
182
|
+
size: {
|
|
183
|
+
type: StringConstructor;
|
|
184
|
+
validator: (value: unknown) => boolean;
|
|
185
|
+
};
|
|
186
|
+
backgroundColor: {
|
|
187
|
+
type: StringConstructor;
|
|
188
|
+
};
|
|
189
|
+
}>> & {
|
|
190
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
191
|
+
}, {
|
|
192
|
+
primary: boolean;
|
|
193
|
+
}>;
|
|
194
|
+
};
|
|
195
|
+
setup(): {
|
|
196
|
+
args: any;
|
|
197
|
+
};
|
|
198
|
+
template: string;
|
|
199
|
+
};
|
|
200
|
+
export namespace Large {
|
|
201
|
+
export namespace args_2 {
|
|
202
|
+
const size_1: string;
|
|
203
|
+
export { size_1 as size };
|
|
204
|
+
const label_2: string;
|
|
205
|
+
export { label_2 as label };
|
|
206
|
+
}
|
|
207
|
+
export { args_2 as args };
|
|
208
|
+
}
|
|
209
|
+
export function Small(args: any): {
|
|
210
|
+
components: {
|
|
211
|
+
MyButton: import("vue").DefineComponent<{
|
|
212
|
+
label: {
|
|
213
|
+
type: StringConstructor;
|
|
214
|
+
required: true;
|
|
215
|
+
};
|
|
216
|
+
primary: {
|
|
217
|
+
type: BooleanConstructor;
|
|
218
|
+
default: boolean;
|
|
219
|
+
};
|
|
220
|
+
size: {
|
|
221
|
+
type: StringConstructor;
|
|
222
|
+
validator: (value: unknown) => boolean;
|
|
223
|
+
};
|
|
224
|
+
backgroundColor: {
|
|
225
|
+
type: StringConstructor;
|
|
226
|
+
};
|
|
227
|
+
}, {
|
|
228
|
+
classes: import("vue").ComputedRef<{
|
|
229
|
+
[x: string]: boolean;
|
|
230
|
+
button: boolean;
|
|
231
|
+
"button--primary": boolean;
|
|
232
|
+
"button--secondary": boolean;
|
|
233
|
+
}>;
|
|
234
|
+
style: import("vue").ComputedRef<{
|
|
235
|
+
backgroundColor: string | undefined;
|
|
236
|
+
}>;
|
|
237
|
+
onClick(): void;
|
|
238
|
+
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
239
|
+
label: {
|
|
240
|
+
type: StringConstructor;
|
|
241
|
+
required: true;
|
|
242
|
+
};
|
|
243
|
+
primary: {
|
|
244
|
+
type: BooleanConstructor;
|
|
245
|
+
default: boolean;
|
|
246
|
+
};
|
|
247
|
+
size: {
|
|
248
|
+
type: StringConstructor;
|
|
249
|
+
validator: (value: unknown) => boolean;
|
|
250
|
+
};
|
|
251
|
+
backgroundColor: {
|
|
252
|
+
type: StringConstructor;
|
|
253
|
+
};
|
|
254
|
+
}>> & {
|
|
255
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
256
|
+
}, {
|
|
257
|
+
primary: boolean;
|
|
258
|
+
}>;
|
|
259
|
+
};
|
|
260
|
+
setup(): {
|
|
261
|
+
args: any;
|
|
262
|
+
};
|
|
263
|
+
template: string;
|
|
264
|
+
};
|
|
265
|
+
export namespace Small {
|
|
266
|
+
export namespace args_3 {
|
|
267
|
+
const size_2: string;
|
|
268
|
+
export { size_2 as size };
|
|
269
|
+
const label_3: string;
|
|
270
|
+
export { label_3 as label };
|
|
271
|
+
}
|
|
272
|
+
export { args_3 as args };
|
|
273
|
+
}
|
|
274
|
+
import MyButton from "./Button.vue";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
label: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
primary: {
|
|
7
|
+
type: BooleanConstructor;
|
|
8
|
+
default: boolean;
|
|
9
|
+
};
|
|
10
|
+
size: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
validator: (value: unknown) => boolean;
|
|
13
|
+
};
|
|
14
|
+
backgroundColor: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
};
|
|
17
|
+
}, {
|
|
18
|
+
classes: import("vue").ComputedRef<{
|
|
19
|
+
[x: string]: boolean;
|
|
20
|
+
button: boolean;
|
|
21
|
+
"button--primary": boolean;
|
|
22
|
+
"button--secondary": boolean;
|
|
23
|
+
}>;
|
|
24
|
+
style: import("vue").ComputedRef<{
|
|
25
|
+
backgroundColor: string | undefined;
|
|
26
|
+
}>;
|
|
27
|
+
onClick(): void;
|
|
28
|
+
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
29
|
+
label: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
required: true;
|
|
32
|
+
};
|
|
33
|
+
primary: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
default: boolean;
|
|
36
|
+
};
|
|
37
|
+
size: {
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
validator: (value: unknown) => boolean;
|
|
40
|
+
};
|
|
41
|
+
backgroundColor: {
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
};
|
|
44
|
+
}>> & {
|
|
45
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
46
|
+
}, {
|
|
47
|
+
primary: boolean;
|
|
48
|
+
}>;
|
|
49
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export const title: string;
|
|
3
|
+
export { MyForm as component };
|
|
4
|
+
}
|
|
5
|
+
export default _default;
|
|
6
|
+
export function Default(): {
|
|
7
|
+
components: {
|
|
8
|
+
MyForm: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
9
|
+
};
|
|
10
|
+
template: string;
|
|
11
|
+
};
|
|
12
|
+
import MyForm from "./Forms.vue";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export const title: string;
|
|
3
|
+
export { MyGrid as component };
|
|
4
|
+
}
|
|
5
|
+
export default _default;
|
|
6
|
+
export function Default(): {
|
|
7
|
+
components: {
|
|
8
|
+
MyGrid: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
9
|
+
};
|
|
10
|
+
template: string;
|
|
11
|
+
};
|
|
12
|
+
import MyGrid from "./Grid.vue";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export const title: string;
|
|
3
|
+
export { MyIcons as component };
|
|
4
|
+
}
|
|
5
|
+
export default _default;
|
|
6
|
+
export function Default(): {
|
|
7
|
+
components: {
|
|
8
|
+
MyIcons: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
9
|
+
};
|
|
10
|
+
template: string;
|
|
11
|
+
};
|
|
12
|
+
import MyIcons from "./Icons.vue";
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.button{font-family:Nunito Sans,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;border:0;
|
|
1
|
+
.button{font-family:Nunito Sans,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;border:0;cursor:pointer;line-height:1}.button--primary{color:#fff;background-color:green}.button--secondary{color:#333;background-color:#ff4500;box-shadow:#00000026 0 0 0 1px inset}.button--small{font-size:12px;padding:10px 16px}.button--medium{font-size:14px;padding:11px 20px}.button--large{font-size:16px;padding:12px 24px}
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deskhero/dh_ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
7
7
|
"main": "dist/dh_ui.umd.js",
|
|
8
8
|
"module": "dist/dh_ui.es.js",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
9
10
|
"exports": {
|
|
10
11
|
".": {
|
|
11
12
|
"import": "./dist/dh_ui.es.js",
|
|
@@ -23,18 +24,18 @@
|
|
|
23
24
|
"build": "run-p type-check build-only",
|
|
24
25
|
"preview": "vite preview --port 4173",
|
|
25
26
|
"build-only": "vite build",
|
|
26
|
-
"type-check": "vue-tsc
|
|
27
|
+
"type-check": "vue-tsc",
|
|
27
28
|
"storybook": "start-storybook -p 6006",
|
|
28
29
|
"build-storybook": "build-storybook",
|
|
29
30
|
"chromatic": "npx chromatic --project-token=9b1dd74e6816"
|
|
30
31
|
},
|
|
31
32
|
"dependencies": {
|
|
32
|
-
"@storybook/addons": "^6.5.9",
|
|
33
|
-
"@storybook/theming": "^6.5.9",
|
|
34
33
|
"vue": "^3.2.36"
|
|
35
34
|
},
|
|
36
35
|
"devDependencies": {
|
|
37
36
|
"@babel/core": "^7.18.5",
|
|
37
|
+
"@storybook/addons": "^6.5.9",
|
|
38
|
+
"@storybook/theming": "^6.5.9",
|
|
38
39
|
"@storybook/addon-actions": "^6.5.9",
|
|
39
40
|
"@storybook/addon-essentials": "^6.5.9",
|
|
40
41
|
"@storybook/addon-interactions": "^6.5.9",
|
|
@@ -64,7 +65,36 @@
|
|
|
64
65
|
},
|
|
65
66
|
"release": {
|
|
66
67
|
"plugins": [
|
|
67
|
-
|
|
68
|
+
[
|
|
69
|
+
"@semantic-release/commit-analyzer",
|
|
70
|
+
{
|
|
71
|
+
"preset": "angular",
|
|
72
|
+
"releaseRules": [
|
|
73
|
+
{
|
|
74
|
+
"type": "docs",
|
|
75
|
+
"scope": "README",
|
|
76
|
+
"release": "patch"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"type": "refactor",
|
|
80
|
+
"scope": "core-*",
|
|
81
|
+
"release": "minor"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"type": "feat",
|
|
85
|
+
"release": "minor"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"type": "fix",
|
|
89
|
+
"release": "patch"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"type": "perf",
|
|
93
|
+
"release": "patch"
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
],
|
|
68
98
|
"@semantic-release/release-notes-generator",
|
|
69
99
|
"@semantic-release/npm",
|
|
70
100
|
"@semantic-release/changelog",
|