@frollo/frollo-web-ui 4.0.1 → 5.0.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.
Files changed (44) hide show
  1. package/cjs/index.js +800 -446
  2. package/esm/fw-accordion.js +61 -28
  3. package/esm/fw-animations.js +2 -2
  4. package/esm/fw-bar-chart.js +2 -1
  5. package/esm/{fw-button-7902ae9e.js → fw-button-beaf20f4.js} +1 -1
  6. package/esm/fw-button.js +3 -3
  7. package/esm/fw-checkbox.js +25 -9
  8. package/esm/fw-drawer.js +225 -0
  9. package/esm/fw-dropdown.js +1 -1
  10. package/esm/{fw-image-c829ed20.js → fw-image-161b667a.js} +65 -59
  11. package/esm/fw-image.js +4 -4
  12. package/esm/fw-input.js +2 -2
  13. package/esm/{fw-loading-spinner-7462e0b2.js → fw-loading-spinner-51deaa3d.js} +1 -1
  14. package/esm/fw-modal.js +3 -3
  15. package/esm/fw-navigation-menu.js +3 -3
  16. package/esm/fw-sidebar-menu.js +3 -3
  17. package/esm/fw-table.js +9 -9
  18. package/esm/fw-tag.js +93 -18
  19. package/esm/fw-toast.js +1 -1
  20. package/esm/fw-transactions-card.js +4 -4
  21. package/esm/get-root-colours-e2a1cb28.js +21 -0
  22. package/esm/{index-f0510452.js → index-2766bfe4.js} +12 -11
  23. package/esm/{index-dbe0534d.js → index-3624f1c9.js} +115 -101
  24. package/esm/index.js +40 -36
  25. package/frollo-web-ui.esm.js +861 -494
  26. package/icons/index.ts +3 -1
  27. package/icons/xmark.svg +3 -0
  28. package/index.d.ts +393 -140
  29. package/package.json +1 -1
  30. package/types/components/fw-accordion/fw-accordion.vue.d.ts +22 -4
  31. package/types/components/fw-accordion/index.types.d.ts +1 -0
  32. package/types/components/fw-checkbox/fw-checkbox.vue.d.ts +35 -3
  33. package/types/components/fw-checkbox/index.types.d.ts +2 -0
  34. package/types/components/fw-drawer/fw-drawer.vue.d.ts +165 -0
  35. package/types/components/fw-drawer/index.d.ts +2 -0
  36. package/types/components/fw-drawer/index.types.d.ts +14 -0
  37. package/types/components/fw-input/fw-input.vue.d.ts +2 -2
  38. package/types/components/fw-tag/fw-tag.vue.d.ts +30 -8
  39. package/types/components/fw-tag/index.types.d.ts +4 -2
  40. package/types/components/index.d.ts +1 -0
  41. package/types/components/index.types.d.ts +1 -0
  42. package/types/helpers/get-root-colours.d.ts +9 -0
  43. package/types/icons/index.d.ts +2 -1
  44. package/web-components/index.js +863 -496
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frollo/frollo-web-ui",
3
- "version": "4.0.1",
3
+ "version": "5.0.0",
4
4
  "description": "Frollo's UI library for components, utilities and configs",
5
5
  "exports": {
6
6
  "./icons": "./icons/index.ts",
@@ -1,4 +1,4 @@
1
- declare const _default: import("vue").DefineComponent<{
1
+ declare const __default__: import("vue").DefineComponent<{
2
2
  /**
3
3
  * The header title of the accordion
4
4
  */
@@ -18,10 +18,20 @@ declare const _default: import("vue").DefineComponent<{
18
18
  type: BooleanConstructor;
19
19
  default: boolean;
20
20
  };
21
+ /**
22
+ * Whether the accordion open icon should be at the start or end
23
+ */
24
+ iconPositionStart: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
27
+ };
21
28
  }, {
22
29
  isOpen: import("vue").Ref<boolean>;
23
- transitionEnter: (el: HTMLElement) => void;
24
- transitionLeave: (el: HTMLElement) => void;
30
+ beforeEnter: (el: Element) => void;
31
+ enter: (el: Element) => void;
32
+ beforeLeave: (el: Element) => void;
33
+ leave: (el: Element) => void;
34
+ bgHoverColor: string;
25
35
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
26
36
  /**
27
37
  * The header title of the accordion
@@ -42,7 +52,15 @@ declare const _default: import("vue").DefineComponent<{
42
52
  type: BooleanConstructor;
43
53
  default: boolean;
44
54
  };
55
+ /**
56
+ * Whether the accordion open icon should be at the start or end
57
+ */
58
+ iconPositionStart: {
59
+ type: BooleanConstructor;
60
+ default: boolean;
61
+ };
45
62
  }>>, {
46
63
  isOpened: boolean;
64
+ iconPositionStart: boolean;
47
65
  }>;
48
- export default _default;
66
+ export default __default__;
@@ -2,4 +2,5 @@ export declare interface FwAccordionProps {
2
2
  title?: string;
3
3
  suffixTitle?: string;
4
4
  isOpened?: boolean;
5
+ iconPositionStart?: boolean;
5
6
  }
@@ -1,12 +1,20 @@
1
1
  import { PropType } from 'vue';
2
2
  declare const _default: import("vue").DefineComponent<{
3
3
  /**
4
- * The name of the input field. Must be unique per form.
4
+ * The name of the checkbox input field.
5
+ * Multiple checkboxes can use the same name with a unique value.
5
6
  */
6
7
  name: {
7
8
  type: StringConstructor;
8
9
  required: true;
9
10
  };
11
+ /**
12
+ * The value of the input field. Must be unique per name.
13
+ */
14
+ value: {
15
+ type: StringConstructor;
16
+ required: false;
17
+ };
10
18
  /**
11
19
  * Label for the input. Also renders to an aria-label attribute
12
20
  */
@@ -25,16 +33,31 @@ declare const _default: import("vue").DefineComponent<{
25
33
  hint: {
26
34
  type: StringConstructor;
27
35
  };
36
+ /**
37
+ * Enable or disable the error hidden element
38
+ */
39
+ enableErrors: {
40
+ type: BooleanConstructor;
41
+ default: boolean;
42
+ };
28
43
  }, {
29
44
  uuid: string;
30
45
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
31
46
  /**
32
- * The name of the input field. Must be unique per form.
47
+ * The name of the checkbox input field.
48
+ * Multiple checkboxes can use the same name with a unique value.
33
49
  */
34
50
  name: {
35
51
  type: StringConstructor;
36
52
  required: true;
37
53
  };
54
+ /**
55
+ * The value of the input field. Must be unique per name.
56
+ */
57
+ value: {
58
+ type: StringConstructor;
59
+ required: false;
60
+ };
38
61
  /**
39
62
  * Label for the input. Also renders to an aria-label attribute
40
63
  */
@@ -53,5 +76,14 @@ declare const _default: import("vue").DefineComponent<{
53
76
  hint: {
54
77
  type: StringConstructor;
55
78
  };
56
- }>>, {}>;
79
+ /**
80
+ * Enable or disable the error hidden element
81
+ */
82
+ enableErrors: {
83
+ type: BooleanConstructor;
84
+ default: boolean;
85
+ };
86
+ }>>, {
87
+ enableErrors: boolean;
88
+ }>;
57
89
  export default _default;
@@ -1,6 +1,8 @@
1
1
  export declare interface FwCheckboxProps {
2
2
  name: string;
3
+ value?: string;
3
4
  label?: string;
4
5
  rules?: string | Record<string, unknown> | (() => boolean);
5
6
  hint?: string;
7
+ enableErrors?: boolean;
6
8
  }
@@ -0,0 +1,165 @@
1
+ import { PropType } from 'vue';
2
+ import { ButtonVariantName } from '../fw-button/index.types';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ /**
5
+ * The drawer's v-model. Controls the visibility of the drawer.
6
+ */
7
+ modelValue: {
8
+ type: BooleanConstructor;
9
+ };
10
+ /**
11
+ * The header title of the drawer
12
+ */
13
+ header: {
14
+ type: StringConstructor;
15
+ };
16
+ /**
17
+ * The body description of the drawer
18
+ */
19
+ body: {
20
+ type: StringConstructor;
21
+ };
22
+ /**
23
+ * The aria role of the drawer container. Defaults to `dialog`
24
+ */
25
+ role: {
26
+ type: StringConstructor;
27
+ default: string;
28
+ };
29
+ /**
30
+ * Whether to show the cancel button
31
+ */
32
+ showCancel: {
33
+ type: BooleanConstructor;
34
+ default: boolean;
35
+ };
36
+ /**
37
+ * Whether to show the confirm button
38
+ */
39
+ showConfirm: {
40
+ type: BooleanConstructor;
41
+ default: boolean;
42
+ };
43
+ /**
44
+ * Custom text for the cancel button
45
+ */
46
+ cancelButtonText: {
47
+ type: StringConstructor;
48
+ default: string;
49
+ };
50
+ /**
51
+ * Button variant for the cancel button
52
+ */
53
+ cancelButtonType: {
54
+ type: PropType<ButtonVariantName>;
55
+ default: string;
56
+ validator: (value: string) => boolean;
57
+ };
58
+ /**
59
+ * Custom text for the confirm button
60
+ */
61
+ confirmButtonText: {
62
+ type: StringConstructor;
63
+ default: string;
64
+ };
65
+ /**
66
+ * Button variant for the confirm button
67
+ */
68
+ confirmButtonType: {
69
+ type: PropType<ButtonVariantName>;
70
+ default: string;
71
+ validator: (value: string) => boolean;
72
+ };
73
+ }, {
74
+ baseDrawerClass: string;
75
+ drawerFooterClass: string;
76
+ isOpen: import("vue").WritableComputedRef<boolean>;
77
+ uuid: string;
78
+ isMounted: import("vue").Ref<boolean>;
79
+ onConfirmed: () => void;
80
+ onCancelled: () => void;
81
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "cancel" | "confirm")[], "update:modelValue" | "cancel" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
82
+ /**
83
+ * The drawer's v-model. Controls the visibility of the drawer.
84
+ */
85
+ modelValue: {
86
+ type: BooleanConstructor;
87
+ };
88
+ /**
89
+ * The header title of the drawer
90
+ */
91
+ header: {
92
+ type: StringConstructor;
93
+ };
94
+ /**
95
+ * The body description of the drawer
96
+ */
97
+ body: {
98
+ type: StringConstructor;
99
+ };
100
+ /**
101
+ * The aria role of the drawer container. Defaults to `dialog`
102
+ */
103
+ role: {
104
+ type: StringConstructor;
105
+ default: string;
106
+ };
107
+ /**
108
+ * Whether to show the cancel button
109
+ */
110
+ showCancel: {
111
+ type: BooleanConstructor;
112
+ default: boolean;
113
+ };
114
+ /**
115
+ * Whether to show the confirm button
116
+ */
117
+ showConfirm: {
118
+ type: BooleanConstructor;
119
+ default: boolean;
120
+ };
121
+ /**
122
+ * Custom text for the cancel button
123
+ */
124
+ cancelButtonText: {
125
+ type: StringConstructor;
126
+ default: string;
127
+ };
128
+ /**
129
+ * Button variant for the cancel button
130
+ */
131
+ cancelButtonType: {
132
+ type: PropType<ButtonVariantName>;
133
+ default: string;
134
+ validator: (value: string) => boolean;
135
+ };
136
+ /**
137
+ * Custom text for the confirm button
138
+ */
139
+ confirmButtonText: {
140
+ type: StringConstructor;
141
+ default: string;
142
+ };
143
+ /**
144
+ * Button variant for the confirm button
145
+ */
146
+ confirmButtonType: {
147
+ type: PropType<ButtonVariantName>;
148
+ default: string;
149
+ validator: (value: string) => boolean;
150
+ };
151
+ }>> & {
152
+ onCancel?: ((...args: any[]) => any) | undefined;
153
+ onConfirm?: ((...args: any[]) => any) | undefined;
154
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
155
+ }, {
156
+ modelValue: boolean;
157
+ role: string;
158
+ showCancel: boolean;
159
+ showConfirm: boolean;
160
+ cancelButtonText: string;
161
+ cancelButtonType: ButtonVariantName;
162
+ confirmButtonText: string;
163
+ confirmButtonType: ButtonVariantName;
164
+ }>;
165
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import FwDrawer from './fw-drawer.vue';
2
+ export { FwDrawer };
@@ -0,0 +1,14 @@
1
+ import { ButtonVariantName } from '../fw-button/index.types';
2
+ export declare interface FwDrawerProps {
3
+ modelValue: boolean;
4
+ header?: string;
5
+ element?: string;
6
+ body?: string;
7
+ role?: string;
8
+ showCancel?: boolean;
9
+ showConfirm?: boolean;
10
+ cancelButtonText?: string;
11
+ cancelButtonType?: ButtonVariantName;
12
+ confirmButtonText?: string;
13
+ confirmButtonType?: ButtonVariantName;
14
+ }
@@ -63,7 +63,7 @@ declare const _default: import("vue").DefineComponent<{
63
63
  };
64
64
  /**
65
65
  * The logical tab order of the input.
66
- * Defaults to 1
66
+ * Defaults to 0
67
67
  */
68
68
  tabindex: {
69
69
  type: StringConstructor;
@@ -152,7 +152,7 @@ declare const _default: import("vue").DefineComponent<{
152
152
  };
153
153
  /**
154
154
  * The logical tab order of the input.
155
- * Defaults to 1
155
+ * Defaults to 0
156
156
  */
157
157
  tabindex: {
158
158
  type: StringConstructor;
@@ -1,8 +1,8 @@
1
1
  import { PropType } from 'vue';
2
2
  import { TagSize, TagVariantName } from './index.types';
3
- declare const _default: import("vue").DefineComponent<{
3
+ declare const __default__: import("vue").DefineComponent<{
4
4
  /**
5
- * The size of the tag. Accepts: 'xs' & 'sm'
5
+ * The size of the tag. Accepts: 'xs', 'sm' & 'md'
6
6
  */
7
7
  size: {
8
8
  type: PropType<TagSize>;
@@ -11,21 +11,32 @@ declare const _default: import("vue").DefineComponent<{
11
11
  };
12
12
  /**
13
13
  * The colour variant of the tag.
14
- * Accepts 'primary', 'alert', 'error', 'success'
14
+ * Accepts 'primary', 'secondary', 'alert', 'error', 'success'
15
15
  */
16
16
  variant: {
17
17
  type: PropType<TagVariantName>;
18
18
  default: string;
19
19
  validator: (value: string) => boolean;
20
20
  };
21
+ /**
22
+ * Whether the tag can be dismissed or closed.
23
+ * Emits the @dismissed event
24
+ */
25
+ dismissable: {
26
+ type: BooleanConstructor;
27
+ default: boolean;
28
+ };
21
29
  }, {
22
30
  baseClass: import("vue").Ref<string>;
23
31
  textColorClass: import("vue").ComputedRef<string>;
24
32
  bgColorClass: import("vue").ComputedRef<string>;
25
33
  sizeClass: import("vue").ComputedRef<string>;
26
- }, 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
+ iconSizeClass: import("vue").ComputedRef<string>;
35
+ iconButtonType: import("vue").ComputedRef<import("../index.types").ButtonVariantName | undefined>;
36
+ primaryFade5: string;
37
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "dismissed"[], "dismissed", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
27
38
  /**
28
- * The size of the tag. Accepts: 'xs' & 'sm'
39
+ * The size of the tag. Accepts: 'xs', 'sm' & 'md'
29
40
  */
30
41
  size: {
31
42
  type: PropType<TagSize>;
@@ -34,15 +45,26 @@ declare const _default: import("vue").DefineComponent<{
34
45
  };
35
46
  /**
36
47
  * The colour variant of the tag.
37
- * Accepts 'primary', 'alert', 'error', 'success'
48
+ * Accepts 'primary', 'secondary', 'alert', 'error', 'success'
38
49
  */
39
50
  variant: {
40
51
  type: PropType<TagVariantName>;
41
52
  default: string;
42
53
  validator: (value: string) => boolean;
43
54
  };
44
- }>>, {
55
+ /**
56
+ * Whether the tag can be dismissed or closed.
57
+ * Emits the @dismissed event
58
+ */
59
+ dismissable: {
60
+ type: BooleanConstructor;
61
+ default: boolean;
62
+ };
63
+ }>> & {
64
+ onDismissed?: ((...args: any[]) => any) | undefined;
65
+ }, {
45
66
  size: TagSize;
46
67
  variant: TagVariantName;
68
+ dismissable: boolean;
47
69
  }>;
48
- export default _default;
70
+ export default __default__;
@@ -1,12 +1,14 @@
1
- export declare type TagVariantName = 'primary' | 'alert' | 'error' | 'success';
1
+ import { FwButtonProps } from '../fw-button/index.types';
2
+ export declare type TagVariantName = 'primary' | 'secondary' | 'alert' | 'error' | 'success';
2
3
  export declare interface TagDefinition {
3
4
  text: string;
4
5
  background: string;
6
+ iconType: FwButtonProps['variant'];
5
7
  }
6
8
  export declare type TagDefinitionList = {
7
9
  [key in TagVariantName]: TagDefinition;
8
10
  };
9
- export declare type TagSize = 'xs' | 'sm';
11
+ export declare type TagSize = 'xs' | 'sm' | 'md';
10
12
  export declare type TagSizes = {
11
13
  [key in TagSize]: string;
12
14
  };
@@ -17,4 +17,5 @@ export * from './fw-toast';
17
17
  export * from './fw-transactions-card';
18
18
  export * from './fw-bar-chart';
19
19
  export * from './fw-sidebar-menu';
20
+ export * from './fw-drawer';
20
21
  export * from './fw-animations';
@@ -14,3 +14,4 @@ export * from '../components/fw-toast/index.types';
14
14
  export * from '../components/fw-transactions-card/index.types';
15
15
  export * from '../components/fw-bar-chart/index.types';
16
16
  export * from '../components/fw-sidebar-menu/index.types';
17
+ export * from '../components/fw-drawer/index.types';
@@ -0,0 +1,9 @@
1
+ export declare const useColours: () => {
2
+ colorPrimary: string;
3
+ colorSecondary: string;
4
+ colorTertiary: string;
5
+ fontFamily: string;
6
+ colorBody: string;
7
+ primaryFade5: string;
8
+ primaryFade40: string;
9
+ };
@@ -33,4 +33,5 @@ import SolidXMarkSvg from './solid-xmark.svg';
33
33
  import ArrowSortSvg from './arrow-sort.svg';
34
34
  import ArrowDownSvg from './arrow-down.svg';
35
35
  import SearchSvg from './search.svg';
36
- export { ViewSvg, GenerateSvg, ManageSvg, NotFoundSvg, EmailFilledSvg, AlertSvg, LockSvg, EyeSvg, EyeCrossedSvg, DownloadSvg, IdCardSvg, InfoCircleSvg, FileExclamationSvg, HourglassClockSvg, EnvelopeSvg, CheckSvg, ChevronUpSvg, ChevronDownSvg, ChevronRightSvg, ChevronLeftSvg, ErrorFilledSvg, LightBulbSvg, LandmarkSvg, CoinsSvg, CaretDownSvg, SortLightSvg, PlusSvg, UserSvg, LoadingSvg, BullseyeSvg, SolidCheckSvg, SolidXMarkSvg, ArrowSortSvg, ArrowDownSvg, SearchSvg };
36
+ import XMarkSvg from './xmark.svg';
37
+ export { ViewSvg, GenerateSvg, ManageSvg, NotFoundSvg, EmailFilledSvg, AlertSvg, LockSvg, EyeSvg, EyeCrossedSvg, DownloadSvg, IdCardSvg, InfoCircleSvg, FileExclamationSvg, HourglassClockSvg, EnvelopeSvg, CheckSvg, ChevronUpSvg, ChevronDownSvg, ChevronRightSvg, ChevronLeftSvg, ErrorFilledSvg, LightBulbSvg, LandmarkSvg, CoinsSvg, CaretDownSvg, SortLightSvg, PlusSvg, UserSvg, LoadingSvg, BullseyeSvg, SolidCheckSvg, SolidXMarkSvg, ArrowSortSvg, ArrowDownSvg, SearchSvg, XMarkSvg };