@frollo/frollo-web-ui 0.0.10 → 0.0.13

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/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as vue from 'vue';
2
2
  import { PropType, Plugin } from 'vue';
3
3
  export { Form as FwForm } from 'vee-validate';
4
4
 
5
- declare const _default$3: vue.DefineComponent<{
5
+ declare const _default$4: vue.DefineComponent<{
6
6
  /**
7
7
  * The header title of the card
8
8
  */
@@ -52,7 +52,7 @@ declare const _default$3: vue.DefineComponent<{
52
52
  href: StringConstructor;
53
53
  }>>, {}>;
54
54
 
55
- declare type ButtonVariantName = 'primary' | 'secondary' | 'tertiary' | 'error' | 'success' | 'text';
55
+ declare type ButtonVariantName = 'primary' | 'secondary' | 'tertiary' | 'error' | 'success' | 'text' | 'link';
56
56
  interface ButtonDefinition {
57
57
  text: string;
58
58
  background: string;
@@ -65,13 +65,15 @@ declare type ButtonSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl';
65
65
  declare type ButtonSizes = {
66
66
  [key in ButtonSize]: string;
67
67
  };
68
+ declare type ButtonTypeAttribute = 'button' | 'submit' | 'reset';
68
69
  interface FwButtonProps {
69
70
  to?: string | object;
70
71
  href?: string;
71
72
  size?: ButtonSize;
72
73
  variant?: ButtonVariantName;
74
+ buttonType?: ButtonTypeAttribute;
73
75
  }
74
- declare const _default$2: vue.DefineComponent<{
76
+ declare const _default$3: vue.DefineComponent<{
75
77
  /**
76
78
  * A `router-link` path or object
77
79
  */
@@ -99,6 +101,14 @@ declare const _default$2: vue.DefineComponent<{
99
101
  default: string;
100
102
  validator: (value: string) => boolean;
101
103
  };
104
+ /**
105
+ * The type attribute of the button
106
+ */
107
+ buttonType: {
108
+ type: PropType<ButtonTypeAttribute>;
109
+ default: string;
110
+ validator: (value: string) => boolean;
111
+ };
102
112
  }, {
103
113
  textColorClass: vue.ComputedRef<string>;
104
114
  bgColorClass: vue.ComputedRef<string>;
@@ -109,7 +119,7 @@ declare const _default$2: vue.DefineComponent<{
109
119
  onMouseout: (this: GlobalEventHandlers, ev: MouseEvent) => any;
110
120
  onFocusin: (this: GlobalEventHandlers, ev: FocusEvent) => any;
111
121
  onFocusout: (this: GlobalEventHandlers, ev: FocusEvent) => any;
112
- tagName: vue.ComputedRef<"router-link" | "a" | "button">;
122
+ tagName: vue.ComputedRef<"button" | "router-link" | "a">;
113
123
  }, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("click" | "mouseover" | "mouseout" | "focusin" | "focusout")[], "click" | "mouseover" | "mouseout" | "focusin" | "focusout", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
114
124
  /**
115
125
  * A `router-link` path or object
@@ -138,6 +148,14 @@ declare const _default$2: vue.DefineComponent<{
138
148
  default: string;
139
149
  validator: (value: string) => boolean;
140
150
  };
151
+ /**
152
+ * The type attribute of the button
153
+ */
154
+ buttonType: {
155
+ type: PropType<ButtonTypeAttribute>;
156
+ default: string;
157
+ validator: (value: string) => boolean;
158
+ };
141
159
  }>> & {
142
160
  onClick?: ((...args: any[]) => any) | undefined;
143
161
  onMouseover?: ((...args: any[]) => any) | undefined;
@@ -147,6 +165,7 @@ declare const _default$2: vue.DefineComponent<{
147
165
  }, {
148
166
  size: ButtonSize;
149
167
  variant: ButtonVariantName;
168
+ buttonType: ButtonTypeAttribute;
150
169
  }>;
151
170
 
152
171
  interface NavMenuItem {
@@ -154,7 +173,7 @@ interface NavMenuItem {
154
173
  href?: string;
155
174
  label: string;
156
175
  }
157
- declare const _default$1: vue.DefineComponent<{
176
+ declare const _default$2: vue.DefineComponent<{
158
177
  /**
159
178
  * An array of menu items
160
179
  * `{ to?: string | object; href?: string; label: string; }`
@@ -200,8 +219,10 @@ interface FwInputProps {
200
219
  label?: string;
201
220
  placeholder?: string;
202
221
  rules?: string | object | Function;
222
+ readonly?: boolean;
223
+ hint?: string;
203
224
  }
204
- declare const _default: vue.DefineComponent<{
225
+ declare const _default$1: vue.DefineComponent<{
205
226
  /**
206
227
  * The input v-model
207
228
  */
@@ -243,6 +264,19 @@ declare const _default: vue.DefineComponent<{
243
264
  rules: {
244
265
  type: (StringConstructor | ObjectConstructor | FunctionConstructor)[];
245
266
  };
267
+ /**
268
+ * Converts the input into a readonly disabled field
269
+ */
270
+ readonly: {
271
+ type: BooleanConstructor;
272
+ default: boolean;
273
+ };
274
+ /**
275
+ * The hint text shown below the input
276
+ */
277
+ hint: {
278
+ type: StringConstructor;
279
+ };
246
280
  }, {
247
281
  inputValue: vue.WritableComputedRef<string>;
248
282
  }, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
@@ -287,16 +321,90 @@ declare const _default: vue.DefineComponent<{
287
321
  rules: {
288
322
  type: (StringConstructor | ObjectConstructor | FunctionConstructor)[];
289
323
  };
324
+ /**
325
+ * Converts the input into a readonly disabled field
326
+ */
327
+ readonly: {
328
+ type: BooleanConstructor;
329
+ default: boolean;
330
+ };
331
+ /**
332
+ * The hint text shown below the input
333
+ */
334
+ hint: {
335
+ type: StringConstructor;
336
+ };
290
337
  }>> & {
291
338
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
292
339
  }, {
293
340
  modelValue: string;
294
341
  type: InputType;
295
342
  placeholder: string;
343
+ readonly: boolean;
296
344
  }>;
297
345
 
346
+ interface FwCheckboxProps {
347
+ name: string;
348
+ label?: string;
349
+ rules?: string | object | Function;
350
+ hint?: string;
351
+ }
352
+ declare const _default: vue.DefineComponent<{
353
+ /**
354
+ * The name of the input field. Must be unique per form.
355
+ */
356
+ name: {
357
+ type: StringConstructor;
358
+ required: true;
359
+ };
360
+ /**
361
+ * Label for the input. Also renders to an aria-label attribute
362
+ */
363
+ label: {
364
+ type: StringConstructor;
365
+ };
366
+ /**
367
+ * Validation rules. Accepts a string, object, function or schema.
368
+ */
369
+ rules: {
370
+ type: (StringConstructor | ObjectConstructor | FunctionConstructor)[];
371
+ };
372
+ /**
373
+ * The hint text shown below the input
374
+ */
375
+ hint: {
376
+ type: StringConstructor;
377
+ };
378
+ }, unknown, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
379
+ /**
380
+ * The name of the input field. Must be unique per form.
381
+ */
382
+ name: {
383
+ type: StringConstructor;
384
+ required: true;
385
+ };
386
+ /**
387
+ * Label for the input. Also renders to an aria-label attribute
388
+ */
389
+ label: {
390
+ type: StringConstructor;
391
+ };
392
+ /**
393
+ * Validation rules. Accepts a string, object, function or schema.
394
+ */
395
+ rules: {
396
+ type: (StringConstructor | ObjectConstructor | FunctionConstructor)[];
397
+ };
398
+ /**
399
+ * The hint text shown below the input
400
+ */
401
+ hint: {
402
+ type: StringConstructor;
403
+ };
404
+ }>>, {}>;
405
+
298
406
  declare const install: Exclude<Plugin['install'], undefined>;
299
407
 
300
408
  declare module '@frollo/frollo-web-ui/icons' { }
301
409
 
302
- export { ButtonDefinition, ButtonDefinitionList, ButtonSize, ButtonSizes, ButtonVariantName, _default$2 as FwButton, FwButtonProps, _default$3 as FwCard, _default as FwInput, FwInputProps, _default$1 as FwNavigationMenu, InputType, NavMenuItem, install as default };
410
+ export { ButtonDefinition, ButtonDefinitionList, ButtonSize, ButtonSizes, ButtonTypeAttribute, ButtonVariantName, _default$3 as FwButton, FwButtonProps, _default$4 as FwCard, _default as FwCheckbox, FwCheckboxProps, _default$1 as FwInput, FwInputProps, _default$2 as FwNavigationMenu, InputType, NavMenuItem, install as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frollo/frollo-web-ui",
3
- "version": "0.0.10",
3
+ "version": "0.0.13",
4
4
  "description": "Frollo's UI library for components, utilities and configs",
5
5
  "exports": {
6
6
  "./icons": "./icons/index.ts",
@@ -1,5 +1,5 @@
1
1
  import { PropType } from 'vue';
2
- export declare type ButtonVariantName = 'primary' | 'secondary' | 'tertiary' | 'error' | 'success' | 'text';
2
+ export declare type ButtonVariantName = 'primary' | 'secondary' | 'tertiary' | 'error' | 'success' | 'text' | 'link';
3
3
  export interface ButtonDefinition {
4
4
  text: string;
5
5
  background: string;
@@ -12,11 +12,13 @@ export declare type ButtonSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl';
12
12
  export declare type ButtonSizes = {
13
13
  [key in ButtonSize]: string;
14
14
  };
15
+ export declare type ButtonTypeAttribute = 'button' | 'submit' | 'reset';
15
16
  export interface FwButtonProps {
16
17
  to?: string | object;
17
18
  href?: string;
18
19
  size?: ButtonSize;
19
20
  variant?: ButtonVariantName;
21
+ buttonType?: ButtonTypeAttribute;
20
22
  }
21
23
  declare const _default: import("vue").DefineComponent<{
22
24
  /**
@@ -46,6 +48,14 @@ declare const _default: import("vue").DefineComponent<{
46
48
  default: string;
47
49
  validator: (value: string) => boolean;
48
50
  };
51
+ /**
52
+ * The type attribute of the button
53
+ */
54
+ buttonType: {
55
+ type: PropType<ButtonTypeAttribute>;
56
+ default: string;
57
+ validator: (value: string) => boolean;
58
+ };
49
59
  }, {
50
60
  textColorClass: import("vue").ComputedRef<string>;
51
61
  bgColorClass: import("vue").ComputedRef<string>;
@@ -56,7 +66,7 @@ declare const _default: import("vue").DefineComponent<{
56
66
  onMouseout: (this: GlobalEventHandlers, ev: MouseEvent) => any;
57
67
  onFocusin: (this: GlobalEventHandlers, ev: FocusEvent) => any;
58
68
  onFocusout: (this: GlobalEventHandlers, ev: FocusEvent) => any;
59
- tagName: import("vue").ComputedRef<"router-link" | "a" | "button">;
69
+ tagName: import("vue").ComputedRef<"button" | "router-link" | "a">;
60
70
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "mouseover" | "mouseout" | "focusin" | "focusout")[], "click" | "mouseover" | "mouseout" | "focusin" | "focusout", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
61
71
  /**
62
72
  * A `router-link` path or object
@@ -85,6 +95,14 @@ declare const _default: import("vue").DefineComponent<{
85
95
  default: string;
86
96
  validator: (value: string) => boolean;
87
97
  };
98
+ /**
99
+ * The type attribute of the button
100
+ */
101
+ buttonType: {
102
+ type: PropType<ButtonTypeAttribute>;
103
+ default: string;
104
+ validator: (value: string) => boolean;
105
+ };
88
106
  }>> & {
89
107
  onClick?: ((...args: any[]) => any) | undefined;
90
108
  onMouseover?: ((...args: any[]) => any) | undefined;
@@ -94,5 +112,6 @@ declare const _default: import("vue").DefineComponent<{
94
112
  }, {
95
113
  size: ButtonSize;
96
114
  variant: ButtonVariantName;
115
+ buttonType: ButtonTypeAttribute;
97
116
  }>;
98
117
  export default _default;
@@ -0,0 +1,60 @@
1
+ export interface FwCheckboxProps {
2
+ name: string;
3
+ label?: string;
4
+ rules?: string | object | Function;
5
+ hint?: string;
6
+ }
7
+ declare const _default: import("vue").DefineComponent<{
8
+ /**
9
+ * The name of the input field. Must be unique per form.
10
+ */
11
+ name: {
12
+ type: StringConstructor;
13
+ required: true;
14
+ };
15
+ /**
16
+ * Label for the input. Also renders to an aria-label attribute
17
+ */
18
+ label: {
19
+ type: StringConstructor;
20
+ };
21
+ /**
22
+ * Validation rules. Accepts a string, object, function or schema.
23
+ */
24
+ rules: {
25
+ type: (StringConstructor | ObjectConstructor | FunctionConstructor)[];
26
+ };
27
+ /**
28
+ * The hint text shown below the input
29
+ */
30
+ hint: {
31
+ type: StringConstructor;
32
+ };
33
+ }, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
34
+ /**
35
+ * The name of the input field. Must be unique per form.
36
+ */
37
+ name: {
38
+ type: StringConstructor;
39
+ required: true;
40
+ };
41
+ /**
42
+ * Label for the input. Also renders to an aria-label attribute
43
+ */
44
+ label: {
45
+ type: StringConstructor;
46
+ };
47
+ /**
48
+ * Validation rules. Accepts a string, object, function or schema.
49
+ */
50
+ rules: {
51
+ type: (StringConstructor | ObjectConstructor | FunctionConstructor)[];
52
+ };
53
+ /**
54
+ * The hint text shown below the input
55
+ */
56
+ hint: {
57
+ type: StringConstructor;
58
+ };
59
+ }>>, {}>;
60
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import FwCheckbox from './fw-checkbox.vue';
2
+ export { FwCheckbox };
@@ -7,6 +7,8 @@ export interface FwInputProps {
7
7
  label?: string;
8
8
  placeholder?: string;
9
9
  rules?: string | object | Function;
10
+ readonly?: boolean;
11
+ hint?: string;
10
12
  }
11
13
  declare const _default: import("vue").DefineComponent<{
12
14
  /**
@@ -50,6 +52,19 @@ declare const _default: import("vue").DefineComponent<{
50
52
  rules: {
51
53
  type: (StringConstructor | ObjectConstructor | FunctionConstructor)[];
52
54
  };
55
+ /**
56
+ * Converts the input into a readonly disabled field
57
+ */
58
+ readonly: {
59
+ type: BooleanConstructor;
60
+ default: boolean;
61
+ };
62
+ /**
63
+ * The hint text shown below the input
64
+ */
65
+ hint: {
66
+ type: StringConstructor;
67
+ };
53
68
  }, {
54
69
  inputValue: import("vue").WritableComputedRef<string>;
55
70
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -94,11 +109,25 @@ declare const _default: import("vue").DefineComponent<{
94
109
  rules: {
95
110
  type: (StringConstructor | ObjectConstructor | FunctionConstructor)[];
96
111
  };
112
+ /**
113
+ * Converts the input into a readonly disabled field
114
+ */
115
+ readonly: {
116
+ type: BooleanConstructor;
117
+ default: boolean;
118
+ };
119
+ /**
120
+ * The hint text shown below the input
121
+ */
122
+ hint: {
123
+ type: StringConstructor;
124
+ };
97
125
  }>> & {
98
126
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
99
127
  }, {
100
128
  modelValue: string;
101
129
  type: InputType;
102
130
  placeholder: string;
131
+ readonly: boolean;
103
132
  }>;
104
133
  export default _default;
@@ -3,3 +3,4 @@ export * from './fw-button';
3
3
  export * from './fw-navigation-menu';
4
4
  export * from './fw-form';
5
5
  export * from './fw-input';
6
+ export * from './fw-checkbox';
@@ -4,4 +4,7 @@ import ManageSvg from './manage.svg';
4
4
  import NotFoundSvg from './not-found.svg';
5
5
  import EmailFilledSvg from './email-filled.svg';
6
6
  import AlertSvg from './alert.svg';
7
- export { ViewSvg, GenerateSvg, ManageSvg, NotFoundSvg, EmailFilledSvg, AlertSvg };
7
+ import LockSvg from './lock.svg';
8
+ import EyeSvg from './eye.svg';
9
+ import EyeCrossedSvg from './eye-crossed.svg';
10
+ export { ViewSvg, GenerateSvg, ManageSvg, NotFoundSvg, EmailFilledSvg, AlertSvg, LockSvg, EyeSvg, EyeCrossedSvg };
@@ -6,3 +6,4 @@ export * from './components/fw-card/fw-card.vue';
6
6
  export * from './components/fw-button/fw-button.vue';
7
7
  export * from './components/fw-navigation-menu/fw-navigation-menu.vue';
8
8
  export * from './components/fw-input/fw-input.vue';
9
+ export * from './components/fw-checkbox/fw-checkbox.vue';