@frollo/frollo-web-ui 0.0.21 → 0.0.22
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/cjs/index.js +629 -126
- package/esm/{add-to-unscopables-874257d1.js → add-to-unscopables-c6a09beb.js} +1 -1
- package/esm/{es.array.includes-ef2f18f4.js → es.array.includes-1b7043c3.js} +2 -2
- package/esm/{es.function.name-43e1ffbd.js → es.function.name-f416c9da.js} +1 -1
- package/esm/{function-name-a620492a.js → function-name-982253be.js} +1 -1
- package/esm/{fw-button-fee2541f.js → fw-button-0826e6fc.js} +4 -4
- package/esm/fw-button.js +4 -4
- package/esm/fw-card.js +1 -1
- package/esm/fw-checkbox.js +2 -2
- package/esm/fw-input.js +4 -4
- package/esm/fw-modal.js +475 -0
- package/esm/fw-navigation-menu.js +7 -8
- package/esm/fw-tabs.js +3 -3
- package/esm/{index-5430e7a3.js → index-9de6159f.js} +2 -2
- package/esm/index.js +88 -16
- package/frollo-web-ui.esm.js +682 -138
- package/index.d.ts +213 -27
- package/package.json +4 -2
- package/styles/tailwind.scss +58 -0
- package/styles/transitions.scss +20 -0
- package/styles/typography.scss +38 -0
- package/tailwind.config.js +2 -2
- package/types/components/fw-button/fw-button.vue.d.ts +1 -21
- package/types/components/fw-button/index.types.d.ts +29 -0
- package/types/components/fw-card/index.types.d.ts +6 -0
- package/types/components/fw-checkbox/fw-checkbox.vue.d.ts +0 -6
- package/types/components/fw-checkbox/index.types.d.ts +6 -0
- package/types/components/fw-input/fw-input.vue.d.ts +4 -14
- package/types/components/fw-input/index.types.d.ts +14 -0
- package/types/components/fw-modal/fw-modal.vue.d.ts +145 -0
- package/types/components/fw-modal/index.d.ts +2 -0
- package/types/components/fw-modal/index.types.d.ts +12 -0
- package/types/components/fw-navigation-menu/fw-navigation-menu.vue.d.ts +1 -5
- package/types/components/fw-navigation-menu/index.types.d.ts +5 -0
- package/types/components/index.d.ts +1 -0
- package/types/components/index.types.d.ts +6 -0
- package/types/index-types.esm.d.ts +2 -7
- package/types/index.d.ts +1 -0
- package/types/index.esm.d.ts +2 -1
- package/types/services/index.d.ts +1 -0
- package/types/services/modal.d.ts +9 -0
package/index.d.ts
CHANGED
|
@@ -2,18 +2,22 @@ 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
|
|
6
|
-
|
|
5
|
+
declare enum FwInputType {
|
|
6
|
+
text = "text",
|
|
7
|
+
password = "password"
|
|
8
|
+
}
|
|
9
|
+
declare interface FwInputProps {
|
|
7
10
|
value: string;
|
|
8
11
|
name: string;
|
|
9
|
-
type?:
|
|
12
|
+
type?: FwInputType;
|
|
10
13
|
label?: string;
|
|
11
14
|
placeholder?: string;
|
|
12
15
|
rules?: string | object | Function;
|
|
13
16
|
readonly?: boolean;
|
|
14
17
|
hint?: string;
|
|
15
|
-
}
|
|
16
|
-
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
declare const _default$7: vue.DefineComponent<{
|
|
17
21
|
/**
|
|
18
22
|
* The input v-model
|
|
19
23
|
*/
|
|
@@ -32,7 +36,7 @@ declare const _default$6: vue.DefineComponent<{
|
|
|
32
36
|
* The input type. Accepts `text` | `password`
|
|
33
37
|
*/
|
|
34
38
|
type: {
|
|
35
|
-
type: PropType<
|
|
39
|
+
type: PropType<FwInputType>;
|
|
36
40
|
default: string;
|
|
37
41
|
validator: (value: string) => boolean;
|
|
38
42
|
};
|
|
@@ -89,7 +93,7 @@ declare const _default$6: vue.DefineComponent<{
|
|
|
89
93
|
* The input type. Accepts `text` | `password`
|
|
90
94
|
*/
|
|
91
95
|
type: {
|
|
92
|
-
type: PropType<
|
|
96
|
+
type: PropType<FwInputType>;
|
|
93
97
|
default: string;
|
|
94
98
|
validator: (value: string) => boolean;
|
|
95
99
|
};
|
|
@@ -129,18 +133,12 @@ declare const _default$6: vue.DefineComponent<{
|
|
|
129
133
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
130
134
|
}, {
|
|
131
135
|
modelValue: string;
|
|
132
|
-
type:
|
|
136
|
+
type: FwInputType;
|
|
133
137
|
placeholder: string;
|
|
134
138
|
readonly: boolean;
|
|
135
139
|
}>;
|
|
136
140
|
|
|
137
|
-
|
|
138
|
-
name: string;
|
|
139
|
-
label?: string;
|
|
140
|
-
rules?: string | object | Function;
|
|
141
|
-
hint?: string;
|
|
142
|
-
}
|
|
143
|
-
declare const _default$5: vue.DefineComponent<{
|
|
141
|
+
declare const _default$6: vue.DefineComponent<{
|
|
144
142
|
/**
|
|
145
143
|
* The name of the input field. Must be unique per form.
|
|
146
144
|
*/
|
|
@@ -194,7 +192,7 @@ declare const _default$5: vue.DefineComponent<{
|
|
|
194
192
|
};
|
|
195
193
|
}>>, {}>;
|
|
196
194
|
|
|
197
|
-
declare const _default$
|
|
195
|
+
declare const _default$5: vue.DefineComponent<{
|
|
198
196
|
/**
|
|
199
197
|
* The header title of the card
|
|
200
198
|
*/
|
|
@@ -244,8 +242,16 @@ declare const _default$4: vue.DefineComponent<{
|
|
|
244
242
|
href: StringConstructor;
|
|
245
243
|
}>>, {}>;
|
|
246
244
|
|
|
247
|
-
declare
|
|
248
|
-
|
|
245
|
+
declare enum ButtonVariantName {
|
|
246
|
+
primary = "primary",
|
|
247
|
+
secondary = "secondary",
|
|
248
|
+
tertiary = "tertiary",
|
|
249
|
+
error = "error",
|
|
250
|
+
success = "success",
|
|
251
|
+
text = "text",
|
|
252
|
+
link = "link"
|
|
253
|
+
}
|
|
254
|
+
declare interface ButtonDefinition {
|
|
249
255
|
text: string;
|
|
250
256
|
background: string;
|
|
251
257
|
border: string;
|
|
@@ -258,14 +264,15 @@ declare type ButtonSizes = {
|
|
|
258
264
|
[key in ButtonSize]: string;
|
|
259
265
|
};
|
|
260
266
|
declare type ButtonTypeAttribute = 'button' | 'submit' | 'reset';
|
|
261
|
-
interface FwButtonProps {
|
|
267
|
+
declare interface FwButtonProps {
|
|
262
268
|
to?: string | object;
|
|
263
269
|
href?: string;
|
|
264
270
|
size?: ButtonSize;
|
|
265
271
|
variant?: ButtonVariantName;
|
|
266
272
|
buttonType?: ButtonTypeAttribute;
|
|
267
|
-
}
|
|
268
|
-
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
declare const _default$4: vue.DefineComponent<{
|
|
269
276
|
/**
|
|
270
277
|
* A `router-link` path or object
|
|
271
278
|
*/
|
|
@@ -360,12 +367,13 @@ declare const _default$3: vue.DefineComponent<{
|
|
|
360
367
|
buttonType: ButtonTypeAttribute;
|
|
361
368
|
}>;
|
|
362
369
|
|
|
363
|
-
interface NavMenuItem {
|
|
370
|
+
declare interface NavMenuItem {
|
|
364
371
|
to?: string | object;
|
|
365
372
|
href?: string;
|
|
366
373
|
label: string;
|
|
367
|
-
}
|
|
368
|
-
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
declare const _default$3: vue.DefineComponent<{
|
|
369
377
|
/**
|
|
370
378
|
* An array of menu items
|
|
371
379
|
* `{ to?: string | object; href?: string; label: string; }`
|
|
@@ -403,7 +411,7 @@ declare const _default$2: vue.DefineComponent<{
|
|
|
403
411
|
onAction?: ((...args: any[]) => any) | undefined;
|
|
404
412
|
}, {}>;
|
|
405
413
|
|
|
406
|
-
declare const _default$
|
|
414
|
+
declare const _default$2: vue.DefineComponent<{
|
|
407
415
|
/**
|
|
408
416
|
* The active tab v-model
|
|
409
417
|
*/
|
|
@@ -427,7 +435,7 @@ declare const _default$1: vue.DefineComponent<{
|
|
|
427
435
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
428
436
|
}, {}>;
|
|
429
437
|
|
|
430
|
-
declare const _default: vue.DefineComponent<{
|
|
438
|
+
declare const _default$1: vue.DefineComponent<{
|
|
431
439
|
/**
|
|
432
440
|
* The label of the tab component used as the button panel label
|
|
433
441
|
*/
|
|
@@ -448,8 +456,186 @@ declare const _default: vue.DefineComponent<{
|
|
|
448
456
|
};
|
|
449
457
|
}>>, {}>;
|
|
450
458
|
|
|
459
|
+
declare const _default: vue.DefineComponent<{
|
|
460
|
+
/**
|
|
461
|
+
* The header title of the modal
|
|
462
|
+
*/
|
|
463
|
+
header: {
|
|
464
|
+
type: StringConstructor;
|
|
465
|
+
};
|
|
466
|
+
/**
|
|
467
|
+
* The body description of the modal
|
|
468
|
+
*/
|
|
469
|
+
body: {
|
|
470
|
+
type: StringConstructor;
|
|
471
|
+
};
|
|
472
|
+
/**
|
|
473
|
+
* The aria role of the modal container. Defaults to `dialog`
|
|
474
|
+
*/
|
|
475
|
+
role: {
|
|
476
|
+
type: StringConstructor;
|
|
477
|
+
default: string;
|
|
478
|
+
};
|
|
479
|
+
/**
|
|
480
|
+
* Whether to show the cancel button
|
|
481
|
+
*/
|
|
482
|
+
showCancel: {
|
|
483
|
+
type: BooleanConstructor;
|
|
484
|
+
default: boolean;
|
|
485
|
+
};
|
|
486
|
+
/**
|
|
487
|
+
* Whether to show the confirm button
|
|
488
|
+
*/
|
|
489
|
+
showConfirm: {
|
|
490
|
+
type: BooleanConstructor;
|
|
491
|
+
default: boolean;
|
|
492
|
+
};
|
|
493
|
+
/**
|
|
494
|
+
* Custom text for the cancel button
|
|
495
|
+
*/
|
|
496
|
+
cancelButtonText: {
|
|
497
|
+
type: StringConstructor;
|
|
498
|
+
default: string;
|
|
499
|
+
};
|
|
500
|
+
/**
|
|
501
|
+
* Button variant for the cancel button
|
|
502
|
+
*/
|
|
503
|
+
cancelButtonType: {
|
|
504
|
+
type: PropType<ButtonVariantName>;
|
|
505
|
+
default: string;
|
|
506
|
+
validator: (value: string) => boolean;
|
|
507
|
+
};
|
|
508
|
+
/**
|
|
509
|
+
* Custom text for the confirm button
|
|
510
|
+
*/
|
|
511
|
+
confirmButtonText: {
|
|
512
|
+
type: StringConstructor;
|
|
513
|
+
default: string;
|
|
514
|
+
};
|
|
515
|
+
/**
|
|
516
|
+
* Button variant for the confirm button
|
|
517
|
+
*/
|
|
518
|
+
confirmButtonType: {
|
|
519
|
+
type: PropType<ButtonVariantName>;
|
|
520
|
+
default: string;
|
|
521
|
+
validator: (value: string) => boolean;
|
|
522
|
+
};
|
|
523
|
+
}, {
|
|
524
|
+
uuid: string;
|
|
525
|
+
}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("cancel" | "confirm")[], "cancel" | "confirm", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
526
|
+
/**
|
|
527
|
+
* The header title of the modal
|
|
528
|
+
*/
|
|
529
|
+
header: {
|
|
530
|
+
type: StringConstructor;
|
|
531
|
+
};
|
|
532
|
+
/**
|
|
533
|
+
* The body description of the modal
|
|
534
|
+
*/
|
|
535
|
+
body: {
|
|
536
|
+
type: StringConstructor;
|
|
537
|
+
};
|
|
538
|
+
/**
|
|
539
|
+
* The aria role of the modal container. Defaults to `dialog`
|
|
540
|
+
*/
|
|
541
|
+
role: {
|
|
542
|
+
type: StringConstructor;
|
|
543
|
+
default: string;
|
|
544
|
+
};
|
|
545
|
+
/**
|
|
546
|
+
* Whether to show the cancel button
|
|
547
|
+
*/
|
|
548
|
+
showCancel: {
|
|
549
|
+
type: BooleanConstructor;
|
|
550
|
+
default: boolean;
|
|
551
|
+
};
|
|
552
|
+
/**
|
|
553
|
+
* Whether to show the confirm button
|
|
554
|
+
*/
|
|
555
|
+
showConfirm: {
|
|
556
|
+
type: BooleanConstructor;
|
|
557
|
+
default: boolean;
|
|
558
|
+
};
|
|
559
|
+
/**
|
|
560
|
+
* Custom text for the cancel button
|
|
561
|
+
*/
|
|
562
|
+
cancelButtonText: {
|
|
563
|
+
type: StringConstructor;
|
|
564
|
+
default: string;
|
|
565
|
+
};
|
|
566
|
+
/**
|
|
567
|
+
* Button variant for the cancel button
|
|
568
|
+
*/
|
|
569
|
+
cancelButtonType: {
|
|
570
|
+
type: PropType<ButtonVariantName>;
|
|
571
|
+
default: string;
|
|
572
|
+
validator: (value: string) => boolean;
|
|
573
|
+
};
|
|
574
|
+
/**
|
|
575
|
+
* Custom text for the confirm button
|
|
576
|
+
*/
|
|
577
|
+
confirmButtonText: {
|
|
578
|
+
type: StringConstructor;
|
|
579
|
+
default: string;
|
|
580
|
+
};
|
|
581
|
+
/**
|
|
582
|
+
* Button variant for the confirm button
|
|
583
|
+
*/
|
|
584
|
+
confirmButtonType: {
|
|
585
|
+
type: PropType<ButtonVariantName>;
|
|
586
|
+
default: string;
|
|
587
|
+
validator: (value: string) => boolean;
|
|
588
|
+
};
|
|
589
|
+
}>> & {
|
|
590
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
|
591
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
592
|
+
}, {
|
|
593
|
+
role: string;
|
|
594
|
+
showCancel: boolean;
|
|
595
|
+
showConfirm: boolean;
|
|
596
|
+
cancelButtonText: string;
|
|
597
|
+
cancelButtonType: ButtonVariantName;
|
|
598
|
+
confirmButtonText: string;
|
|
599
|
+
confirmButtonType: ButtonVariantName;
|
|
600
|
+
}>;
|
|
601
|
+
|
|
602
|
+
declare interface FwModalProps {
|
|
603
|
+
header?: string;
|
|
604
|
+
body?: string;
|
|
605
|
+
role?: string;
|
|
606
|
+
showCancel?: boolean;
|
|
607
|
+
showConfirm?: boolean;
|
|
608
|
+
cancelButtonText?: string;
|
|
609
|
+
cancelButtonType?: ButtonVariantName;
|
|
610
|
+
confirmButtonText?: string;
|
|
611
|
+
confirmButtonType?: ButtonVariantName;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
declare interface ModalServiceProps extends FwModalProps {
|
|
615
|
+
onConfirm?: () => void;
|
|
616
|
+
onCancel?: () => void;
|
|
617
|
+
}
|
|
618
|
+
declare const modalService: (options?: ModalServiceProps | undefined, element?: HTMLDivElement | undefined) => {
|
|
619
|
+
open: () => void;
|
|
620
|
+
close: () => void;
|
|
621
|
+
};
|
|
622
|
+
|
|
451
623
|
declare const install: Exclude<Plugin['install'], undefined>;
|
|
452
624
|
|
|
625
|
+
declare interface FwCardProps {
|
|
626
|
+
title?: string;
|
|
627
|
+
prefixTitle?: string;
|
|
628
|
+
to?: string | object;
|
|
629
|
+
href?: string;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
declare interface FwCheckboxProps {
|
|
633
|
+
name: string;
|
|
634
|
+
label?: string;
|
|
635
|
+
rules?: string | object | Function;
|
|
636
|
+
hint?: string;
|
|
637
|
+
}
|
|
638
|
+
|
|
453
639
|
declare module '@frollo/frollo-web-ui/icons' { }
|
|
454
640
|
|
|
455
|
-
export { ButtonDefinition, ButtonDefinitionList, ButtonSize, ButtonSizes, ButtonTypeAttribute, ButtonVariantName, _default$
|
|
641
|
+
export { ButtonDefinition, ButtonDefinitionList, ButtonSize, ButtonSizes, ButtonTypeAttribute, ButtonVariantName, _default$4 as FwButton, FwButtonProps, _default$5 as FwCard, FwCardProps, _default$6 as FwCheckbox, FwCheckboxProps, _default$7 as FwInput, FwInputProps, FwInputType, _default as FwModal, FwModalProps, _default$3 as FwNavigationMenu, _default$1 as FwTab, _default$2 as FwTabs, ModalServiceProps, NavMenuItem, install as default, modalService };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frollo/frollo-web-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.22",
|
|
4
4
|
"description": "Frollo's UI library for components, utilities and configs",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./icons": "./icons/index.ts",
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"@storybook/manager-webpack5": "^6.4.19",
|
|
51
51
|
"@storybook/vue3": "^6.4.19",
|
|
52
52
|
"@types/jest": "^27.4.0",
|
|
53
|
+
"@types/lodash-es": "^4.17.6",
|
|
53
54
|
"@typescript-eslint/eslint-plugin": "^5.12.0",
|
|
54
55
|
"@vue/cli-plugin-babel": "^5.0.1",
|
|
55
56
|
"@vue/eslint-config-typescript": "^10.0.0",
|
|
@@ -64,6 +65,7 @@
|
|
|
64
65
|
"eslint": "^8.9.0",
|
|
65
66
|
"eslint-plugin-vue": "^8.4.1",
|
|
66
67
|
"jest": "^27.5.1",
|
|
68
|
+
"lodash-es": "^4.17.21",
|
|
67
69
|
"rimraf": "^3.0.2",
|
|
68
70
|
"rollup": "^2.67.2",
|
|
69
71
|
"rollup-plugin-dts": "^4.1.0",
|
|
@@ -72,7 +74,7 @@
|
|
|
72
74
|
"rollup-plugin-vue": "^6.0.0",
|
|
73
75
|
"sass": "^1.49.7",
|
|
74
76
|
"sass-loader": "^12.6.0",
|
|
75
|
-
"tailwind-config-viewer": "^1.
|
|
77
|
+
"tailwind-config-viewer": "^1.7.1",
|
|
76
78
|
"tailwindcss": "^3.0.23",
|
|
77
79
|
"ts-jest": "^27.1.3",
|
|
78
80
|
"typescript": "^4.5.5",
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/* Tailwind */
|
|
2
|
+
@tailwind base;
|
|
3
|
+
@tailwind components;
|
|
4
|
+
@tailwind utilities;
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
* Default theme variables - Frollo branding
|
|
8
|
+
*/
|
|
9
|
+
:root {
|
|
10
|
+
--colorPrimary: #6923ff;
|
|
11
|
+
--colorSecondary: #000;
|
|
12
|
+
--colorTertiary: #fff;
|
|
13
|
+
|
|
14
|
+
--fontFamily: 'Montserrat';
|
|
15
|
+
}
|
|
16
|
+
/*
|
|
17
|
+
* Default font family
|
|
18
|
+
*/
|
|
19
|
+
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,500;0,700;1,500&display=swap');
|
|
20
|
+
|
|
21
|
+
/** Typography */
|
|
22
|
+
|
|
23
|
+
@layer base {
|
|
24
|
+
p {
|
|
25
|
+
@apply text-lg font-normal mb-1;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.p2 {
|
|
29
|
+
@apply text-base;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.p-small {
|
|
33
|
+
@apply text-sm;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
h1, .h1 {
|
|
37
|
+
@apply text-2xl font-bold mb-1 lg:text-3xl;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
h2, .h2 {
|
|
41
|
+
@apply text-2xl font-bold mb-1;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
h3, .h3 {
|
|
45
|
+
@apply text-xl font-bold mb-1;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
h4, .h4 {
|
|
49
|
+
@apply text-lg font-bold mb-1;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
h5, .h5 {
|
|
53
|
+
@apply text-base font-bold mb-1;
|
|
54
|
+
}
|
|
55
|
+
h6, .h6 {
|
|
56
|
+
@apply text-base font-bold mb-1;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
$fade-in-animation-duration: 0.35s;
|
|
2
|
+
|
|
3
|
+
.fadeIn-enter-active {
|
|
4
|
+
animation: fadeIn $fade-in-animation-duration;
|
|
5
|
+
transition: opacity $fade-in-animation-duration ease-in;
|
|
6
|
+
}
|
|
7
|
+
.fadeIn-leave-active {
|
|
8
|
+
animation: fadeIn $fade-in-animation-duration reverse;
|
|
9
|
+
transition: opacity $fade-in-animation-duration ease-out;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@keyframes fadeIn {
|
|
13
|
+
from {
|
|
14
|
+
opacity: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
to {
|
|
18
|
+
opacity: 1;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** Typography */
|
|
2
|
+
|
|
3
|
+
@layer base {
|
|
4
|
+
p {
|
|
5
|
+
@apply text-lg font-normal mb-1;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.p2 {
|
|
9
|
+
@apply text-base;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.p-small {
|
|
13
|
+
@apply text-sm;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
h1, .h1 {
|
|
17
|
+
@apply text-2xl font-bold mb-1 lg:text-3xl;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
h2, .h2 {
|
|
21
|
+
@apply text-2xl font-bold mb-1;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
h3, .h3 {
|
|
25
|
+
@apply text-xl font-bold mb-1;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
h4, .h4 {
|
|
29
|
+
@apply text-lg font-bold mb-1;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
h5, .h5 {
|
|
33
|
+
@apply text-base font-bold mb-1;
|
|
34
|
+
}
|
|
35
|
+
h6, .h6 {
|
|
36
|
+
@apply text-base font-bold mb-1;
|
|
37
|
+
}
|
|
38
|
+
}
|
package/tailwind.config.js
CHANGED
|
@@ -25,8 +25,8 @@ module.exports = {
|
|
|
25
25
|
base: ['16px', '1.5'],
|
|
26
26
|
lg: ['18px', '1.5'],
|
|
27
27
|
xl: ['22px', '1.5'],
|
|
28
|
-
'2xl': ['26px', '1.
|
|
29
|
-
'3xl': ['42px', '1.
|
|
28
|
+
'2xl': ['26px', '1.3'],
|
|
29
|
+
'3xl': ['42px', '1.2']
|
|
30
30
|
},
|
|
31
31
|
screens: {
|
|
32
32
|
// @media (min-width: 640px) { ... }
|
|
@@ -1,25 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
|
|
3
|
-
export interface ButtonDefinition {
|
|
4
|
-
text: string;
|
|
5
|
-
background: string;
|
|
6
|
-
border: string;
|
|
7
|
-
}
|
|
8
|
-
export declare type ButtonDefinitionList = {
|
|
9
|
-
[key in ButtonVariantName]: ButtonDefinition;
|
|
10
|
-
};
|
|
11
|
-
export declare type ButtonSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
12
|
-
export declare type ButtonSizes = {
|
|
13
|
-
[key in ButtonSize]: string;
|
|
14
|
-
};
|
|
15
|
-
export declare type ButtonTypeAttribute = 'button' | 'submit' | 'reset';
|
|
16
|
-
export interface FwButtonProps {
|
|
17
|
-
to?: string | object;
|
|
18
|
-
href?: string;
|
|
19
|
-
size?: ButtonSize;
|
|
20
|
-
variant?: ButtonVariantName;
|
|
21
|
-
buttonType?: ButtonTypeAttribute;
|
|
22
|
-
}
|
|
2
|
+
import { ButtonSize, ButtonVariantName, ButtonTypeAttribute } from './index.types';
|
|
23
3
|
declare const _default: import("vue").DefineComponent<{
|
|
24
4
|
/**
|
|
25
5
|
* A `router-link` path or object
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare enum ButtonVariantName {
|
|
2
|
+
primary = "primary",
|
|
3
|
+
secondary = "secondary",
|
|
4
|
+
tertiary = "tertiary",
|
|
5
|
+
error = "error",
|
|
6
|
+
success = "success",
|
|
7
|
+
text = "text",
|
|
8
|
+
link = "link"
|
|
9
|
+
}
|
|
10
|
+
export declare interface ButtonDefinition {
|
|
11
|
+
text: string;
|
|
12
|
+
background: string;
|
|
13
|
+
border: string;
|
|
14
|
+
}
|
|
15
|
+
export declare type ButtonDefinitionList = {
|
|
16
|
+
[key in ButtonVariantName]: ButtonDefinition;
|
|
17
|
+
};
|
|
18
|
+
export declare type ButtonSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
19
|
+
export declare type ButtonSizes = {
|
|
20
|
+
[key in ButtonSize]: string;
|
|
21
|
+
};
|
|
22
|
+
export declare type ButtonTypeAttribute = 'button' | 'submit' | 'reset';
|
|
23
|
+
export declare interface FwButtonProps {
|
|
24
|
+
to?: string | object;
|
|
25
|
+
href?: string;
|
|
26
|
+
size?: ButtonSize;
|
|
27
|
+
variant?: ButtonVariantName;
|
|
28
|
+
buttonType?: ButtonTypeAttribute;
|
|
29
|
+
}
|
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
|
|
3
|
-
export interface FwInputProps {
|
|
4
|
-
value: string;
|
|
5
|
-
name: string;
|
|
6
|
-
type?: InputType;
|
|
7
|
-
label?: string;
|
|
8
|
-
placeholder?: string;
|
|
9
|
-
rules?: string | object | Function;
|
|
10
|
-
readonly?: boolean;
|
|
11
|
-
hint?: string;
|
|
12
|
-
}
|
|
2
|
+
import { FwInputType } from './index.types';
|
|
13
3
|
declare const _default: import("vue").DefineComponent<{
|
|
14
4
|
/**
|
|
15
5
|
* The input v-model
|
|
@@ -29,7 +19,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
29
19
|
* The input type. Accepts `text` | `password`
|
|
30
20
|
*/
|
|
31
21
|
type: {
|
|
32
|
-
type: PropType<
|
|
22
|
+
type: PropType<FwInputType>;
|
|
33
23
|
default: string;
|
|
34
24
|
validator: (value: string) => boolean;
|
|
35
25
|
};
|
|
@@ -86,7 +76,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
86
76
|
* The input type. Accepts `text` | `password`
|
|
87
77
|
*/
|
|
88
78
|
type: {
|
|
89
|
-
type: PropType<
|
|
79
|
+
type: PropType<FwInputType>;
|
|
90
80
|
default: string;
|
|
91
81
|
validator: (value: string) => boolean;
|
|
92
82
|
};
|
|
@@ -126,7 +116,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
126
116
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
127
117
|
}, {
|
|
128
118
|
modelValue: string;
|
|
129
|
-
type:
|
|
119
|
+
type: FwInputType;
|
|
130
120
|
placeholder: string;
|
|
131
121
|
readonly: boolean;
|
|
132
122
|
}>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare enum FwInputType {
|
|
2
|
+
text = "text",
|
|
3
|
+
password = "password"
|
|
4
|
+
}
|
|
5
|
+
export declare interface FwInputProps {
|
|
6
|
+
value: string;
|
|
7
|
+
name: string;
|
|
8
|
+
type?: FwInputType;
|
|
9
|
+
label?: string;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
rules?: string | object | Function;
|
|
12
|
+
readonly?: boolean;
|
|
13
|
+
hint?: string;
|
|
14
|
+
}
|