@mgdis/mg-components 5.2.0 → 5.4.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 (90) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/{mg-badge_27.cjs.entry.js → mg-badge_29.cjs.entry.js} +496 -79
  3. package/dist/cjs/mg-components.cjs.js +1 -1
  4. package/dist/collection/collection-manifest.json +3 -1
  5. package/dist/collection/components/atoms/mg-badge/mg-badge.css +6 -0
  6. package/dist/collection/components/atoms/mg-badge/mg-badge.js +14 -19
  7. package/dist/collection/components/atoms/mg-button/mg-button.css +6 -1
  8. package/dist/collection/components/atoms/mg-button/mg-button.js +1 -1
  9. package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +20 -4
  10. package/dist/collection/components/atoms/mg-icon/mg-icon.css +27 -0
  11. package/dist/collection/components/atoms/mg-icon/mg-icon.js +19 -7
  12. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +94 -52
  13. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.css +7 -0
  14. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.css +7 -0
  15. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.css +6 -0
  16. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.css +7 -0
  17. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.css +7 -0
  18. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.css +6 -0
  19. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.css +6 -0
  20. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.css +6 -0
  21. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.css +6 -0
  22. package/dist/collection/components/molecules/menu/mg-menu/doc/mg-menu.stories.js +87 -0
  23. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.conf.js +8 -0
  24. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.css +10 -0
  25. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +173 -0
  26. package/dist/collection/components/molecules/menu/mg-menu-item/doc/mg-menu-item.stories.js +32 -0
  27. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.conf.js +22 -0
  28. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.css +343 -0
  29. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +320 -0
  30. package/dist/collection/components/molecules/mg-details/mg-details.css +6 -0
  31. package/dist/collection/components/molecules/mg-form/mg-form.js +1 -1
  32. package/dist/collection/components/molecules/mg-pagination/mg-pagination.css +6 -0
  33. package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js +3 -0
  34. package/dist/collection/components/molecules/mg-tabs/mg-tabs.css +67 -17
  35. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +10 -4
  36. package/dist/collection/locales/index.js +3 -1
  37. package/dist/collection/variables.css +23 -1
  38. package/dist/components/index.d.ts +2 -0
  39. package/dist/components/index.js +2 -0
  40. package/dist/components/index2.js +3 -1
  41. package/dist/components/mg-badge2.js +2 -2
  42. package/dist/components/mg-button2.js +2 -2
  43. package/dist/components/mg-details.js +1 -1
  44. package/dist/components/mg-form.js +1 -1
  45. package/dist/components/mg-icon2.js +23 -5
  46. package/dist/components/mg-input-checkbox.js +1 -1
  47. package/dist/components/mg-input-date.js +1 -1
  48. package/dist/components/mg-input-numeric.js +1 -1
  49. package/dist/components/mg-input-password.js +1 -1
  50. package/dist/components/mg-input-radio.js +1 -1
  51. package/dist/components/mg-input-select2.js +1 -1
  52. package/dist/components/mg-input-text2.js +1 -1
  53. package/dist/components/mg-input-textarea.js +1 -1
  54. package/dist/components/mg-input-toggle.js +1 -1
  55. package/dist/components/mg-menu-item.d.ts +11 -0
  56. package/dist/components/mg-menu-item.js +269 -0
  57. package/dist/components/mg-menu.conf.js +10 -0
  58. package/dist/components/mg-menu.d.ts +11 -0
  59. package/dist/components/mg-menu.js +137 -0
  60. package/dist/components/mg-pagination.js +1 -1
  61. package/dist/components/mg-tabs.js +6 -2
  62. package/dist/components/mg-tooltip2.js +94 -52
  63. package/dist/esm/loader.js +1 -1
  64. package/dist/esm/{mg-badge_27.entry.js → mg-badge_29.entry.js} +495 -80
  65. package/dist/esm/mg-components.js +1 -1
  66. package/dist/mg-components/mg-components.css +1 -1
  67. package/dist/mg-components/mg-components.esm.js +1 -1
  68. package/dist/mg-components/p-059a9a59.entry.js +1 -0
  69. package/dist/mg-components/variables.css +23 -1
  70. package/dist/types/components/atoms/mg-badge/doc/mg-badge.stories.d.ts +2 -2
  71. package/dist/types/components/atoms/mg-badge/mg-badge.conf.d.ts +5 -5
  72. package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +8 -8
  73. package/dist/types/components/atoms/mg-icon/doc/mg-icon.stories.d.ts +2 -2
  74. package/dist/types/components/atoms/mg-icon/mg-icon.conf.d.ts +10 -2
  75. package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +7 -6
  76. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +15 -0
  77. package/dist/types/components/molecules/menu/mg-menu/doc/mg-menu.stories.d.ts +17 -0
  78. package/dist/types/components/molecules/menu/mg-menu/mg-menu.conf.d.ts +7 -0
  79. package/dist/types/components/molecules/menu/mg-menu/mg-menu.d.ts +64 -0
  80. package/dist/types/components/molecules/menu/mg-menu-item/doc/mg-menu-item.stories.d.ts +11 -0
  81. package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.conf.d.ts +24 -0
  82. package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.d.ts +115 -0
  83. package/dist/types/components/molecules/mg-tabs/doc/mg-tabs.stories.d.ts +1 -1
  84. package/dist/types/components/molecules/mg-tabs/mg-tabs.conf.d.ts +12 -4
  85. package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +6 -6
  86. package/dist/types/components.d.ts +91 -14
  87. package/dist/types/locales/index.d.ts +7 -1
  88. package/dist/types/stories/icons.stories.d.ts +1 -1
  89. package/package.json +2 -2
  90. package/dist/mg-components/p-b2b07c3f.entry.js +0 -1
@@ -20,6 +20,13 @@
20
20
  https://jira.mgdis.fr/browse/PDA9-690
21
21
  */
22
22
 
23
+ /* App */
24
+ /* default color-info */
25
+ --mg-color-app-h: var(--color-info-h);
26
+ --mg-color-app-s: var(--color-info-s);
27
+ --mg-color-app-l: var(--color-info-l);
28
+ --mg-color-app-hsl: var(--mg-color-app-h), var(--mg-color-app-s), var(--mg-color-app-l);
29
+
23
30
  /* Neutral */
24
31
  /* #fefefe; */
25
32
  /* rgb(254, 254, 254); */
@@ -173,9 +180,10 @@
173
180
  --mg-panel-box-shadow: var(--box-shadow);
174
181
  --mg-panel-content-padding: 1.5rem;
175
182
 
176
- /*
183
+ /*
177
184
  <mg-illustrated-message>
178
185
  */
186
+
179
187
  --mg-illustrated-message-padding-vertical: 4rem;
180
188
 
181
189
  /*
@@ -230,4 +238,18 @@
230
238
  <mg-input-radio>
231
239
  */
232
240
  --mg-input-check-size: 1.3rem;
241
+
242
+ /*
243
+ <mg-menu-item>
244
+ */
245
+ --mg-menu-item-focused-background-color-hsl: var(--mg-color-app-hsl);
246
+ --mg-menu-item-border-color-active-hsl: var(--mg-color-app-hsl);
247
+ --mg-menu-item-color-active-hsl: var(--mg-color-app-hsl);
248
+
249
+ /*
250
+ <mg-tabs>
251
+ */
252
+ --mg-tabs-focused-background-color-hsl: var(--mg-color-app-hsl);
253
+ --mg-tabs-border-color-active-hsl: var(--mg-color-app-hsl);
254
+ --mg-tabs-color-active-hsl: var(--mg-color-app-hsl);
233
255
  }
@@ -3,13 +3,13 @@ declare const _default: {
3
3
  title: string;
4
4
  argTypes: {
5
5
  variant: {
6
- options: string[];
6
+ options: readonly ["info", "primary", "secondary", "success", "warning", "danger"];
7
7
  control: {
8
8
  type: string;
9
9
  };
10
10
  table: {
11
11
  defaultValue: {
12
- summary: string;
12
+ summary: "info";
13
13
  };
14
14
  };
15
15
  };
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * List of all possibles variants
3
3
  */
4
- export declare const variants: string[];
5
- export declare type BadgeType = {
6
- value: string | number;
7
- label: string;
8
- };
4
+ export declare const variants: readonly ["info", "primary", "secondary", "success", "warning", "danger"];
5
+ /**
6
+ * Variant type from variants
7
+ */
8
+ export declare type BadgeVariantType = typeof variants[number];
@@ -1,4 +1,4 @@
1
- import { BadgeType } from './mg-badge.conf';
1
+ import { BadgeVariantType } from './mg-badge.conf';
2
2
  import { ClassList } from '../../../utils/components.utils';
3
3
  export declare class MgBadge {
4
4
  /************
@@ -11,24 +11,24 @@ export declare class MgBadge {
11
11
  /**
12
12
  * Badge value
13
13
  */
14
- value: BadgeType['value'];
15
- validateValue(newValue: BadgeType['value']): void;
14
+ value: string | number;
15
+ validateValue(newValue: MgBadge['value']): void;
16
16
  /**
17
17
  * Badge label. Include short description.
18
18
  * Required for accessibility
19
19
  */
20
- label: BadgeType['label'];
21
- validateLabel(newValue: BadgeType['label']): void;
20
+ label: string;
21
+ validateLabel(newValue: MgBadge['label']): void;
22
22
  /**
23
23
  * Define button variant
24
24
  */
25
- variant: string;
26
- validateVariant(newValue: string, oldValue?: string): void;
25
+ variant?: BadgeVariantType;
26
+ validateVariant(newValue: MgBadge['variant'], oldValue?: MgBadge['variant']): void;
27
27
  /**
28
28
  * Define if button is using outline style
29
29
  */
30
30
  outline: boolean;
31
- validateOutline(newValue: boolean): void;
31
+ validateOutline(newValue: MgBadge['outline']): void;
32
32
  /**
33
33
  * Component classes
34
34
  */
@@ -9,13 +9,13 @@ declare const _default: {
9
9
  };
10
10
  };
11
11
  size: {
12
- options: string[];
12
+ options: readonly ["small", "regular", "large", "extra-large"];
13
13
  control: {
14
14
  type: string;
15
15
  };
16
16
  };
17
17
  variant: {
18
- options: string[];
18
+ options: ("info" | "success" | "warning" | "danger")[];
19
19
  control: {
20
20
  type: string;
21
21
  };
@@ -5,8 +5,16 @@ export declare const icons: unknown;
5
5
  /**
6
6
  * List of all possibles sizes
7
7
  */
8
- export declare const sizes: string[];
8
+ export declare const sizes: readonly ["small", "regular", "large", "extra-large"];
9
+ /**
10
+ * Icon Size from sizes
11
+ */
12
+ export declare type IconSizeType = typeof sizes[number];
9
13
  /**
10
14
  * List of all possibles variants
11
15
  */
12
- export declare const variants: string[];
16
+ export declare const variants: readonly ["success", "warning", "danger", "info"];
17
+ /**
18
+ * Variant type from variants
19
+ */
20
+ export declare type IconVariantType = typeof variants[number];
@@ -1,26 +1,27 @@
1
+ import { IconVariantType, IconSizeType } from './mg-icon.conf';
1
2
  import { ClassList } from '../../../utils/components.utils';
2
3
  export declare class MgIcon {
3
4
  /**
4
5
  * Icon to display
5
6
  */
6
7
  icon: string;
7
- validateIcon(newValue: string, oldValue?: string): void;
8
+ validateIcon(newValue: MgIcon['icon'], oldValue?: MgIcon['icon']): void;
8
9
  /**
9
10
  * Define icon size
10
11
  */
11
- size: string;
12
- validateSize(newValue: string, oldValue?: string): void;
12
+ size: IconSizeType;
13
+ validateSize(newValue: MgIcon['size'], oldValue?: MgIcon['size']): void;
13
14
  /**
14
15
  * Define icon variant
15
16
  * Add a background to the icon based on variant color
16
17
  */
17
- variant: string;
18
- validateVariant(newValue: string, oldValue?: string): void;
18
+ variant?: IconVariantType;
19
+ validateVariant(newValue: MgIcon['variant'], oldValue?: MgIcon['variant']): void;
19
20
  /**
20
21
  * Make the icon spin
21
22
  */
22
23
  spin: boolean;
23
- handleSpin(newValue: boolean): void;
24
+ handleSpin(newValue: MgIcon['spin']): void;
24
25
  /**
25
26
  * Component classes
26
27
  */
@@ -5,6 +5,7 @@ export declare class MgTooltip {
5
5
  ************/
6
6
  private popper;
7
7
  private tooltip;
8
+ private tooltipedElement;
8
9
  private guard;
9
10
  /**************
10
11
  * Decorators *
@@ -71,6 +72,20 @@ export declare class MgTooltip {
71
72
  * @returns {void}
72
73
  */
73
74
  private resetGuard;
75
+ /**
76
+ * Update slot content when it is a mg-button
77
+ *
78
+ * @param {HTMLMgButtonElement} mgButton slotted mg-button
79
+ * @returns {void}
80
+ */
81
+ private setMgButtonWrapper;
82
+ /**
83
+ * Init tooltip
84
+ *
85
+ * @param {HTMLElement} slotElement slotted element
86
+ * @param {HTMLElement} interactiveElement interactive element
87
+ */
88
+ private initTooltip;
74
89
  /*************
75
90
  * Lifecycle *
76
91
  *************/
@@ -0,0 +1,17 @@
1
+ import { Direction } from '../mg-menu.conf';
2
+ declare const _default: {
3
+ component: string;
4
+ title: string;
5
+ argTypes: {
6
+ direction: {
7
+ options: Direction[];
8
+ control: {
9
+ type: string;
10
+ };
11
+ };
12
+ };
13
+ };
14
+ export default _default;
15
+ export declare const MgMenuHorizontal: any;
16
+ export declare const MgMenuVertical: any;
17
+ export declare const MgMenuVerticalSmallContainer: any;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Menu direction type
3
+ */
4
+ export declare enum Direction {
5
+ VERTICAL = "vertical",
6
+ HORIZONTAL = "horizontal"
7
+ }
@@ -0,0 +1,64 @@
1
+ import { Direction } from './mg-menu.conf';
2
+ export declare class MgMenu {
3
+ /************
4
+ * Internal *
5
+ ************/
6
+ private readonly name;
7
+ private menuItems;
8
+ private focusedMenuItem;
9
+ /**************
10
+ * Decorators *
11
+ **************/
12
+ /**
13
+ * Get component DOM element
14
+ */
15
+ element: HTMLMgMenuElement;
16
+ /**
17
+ * Menu label. Include short menu description.
18
+ * Required for accessibility
19
+ */
20
+ label: string;
21
+ validateLabel(newValue: MgMenu['label']): void;
22
+ /**
23
+ * Component display direction. Default: "horizontal"
24
+ */
25
+ direction: Direction;
26
+ validateDirection(newValue: MgMenu['direction']): void;
27
+ /**
28
+ * is this menu a child menu. Used for conditional render.
29
+ */
30
+ isChildMenu: boolean;
31
+ /**
32
+ * Close matching menu-item
33
+ *
34
+ * @param {HTMLMgMenuItemElement} item menu-item to close
35
+ * @param {boolean} condition addionnal condition
36
+ * @returns {void}
37
+ */
38
+ private closeMenuItem;
39
+ /**
40
+ * Store menu-items on component init and add listeners
41
+ */
42
+ private initMenuItems;
43
+ /*************
44
+ * Lifecycle *
45
+ *************/
46
+ /**
47
+ * Validate props
48
+ *
49
+ * @returns {void}
50
+ */
51
+ componentWillLoad(): void;
52
+ /**
53
+ * Check if component slots configuration
54
+ *
55
+ * @returns {ReturnType<typeof setTimeout>} timeout
56
+ */
57
+ componentDidLoad(): ReturnType<typeof setTimeout>;
58
+ /**
59
+ * Render
60
+ *
61
+ * @returns {HTMLElement} HTML Element
62
+ */
63
+ render(): HTMLElement;
64
+ }
@@ -0,0 +1,11 @@
1
+ declare const _default: {
2
+ component: string;
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const MgMenuItem: any;
7
+ export declare const MgMenuItemWhitIcon: any;
8
+ export declare const MgMenuItemWhitBadge: any;
9
+ export declare const MgMenuItemWhitBadgeAndIcon: any;
10
+ export declare const MgMenuItemWhitMetadata: any;
11
+ export declare const MgMenuItemWhithSubmenu: any;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Available menu-item positions
3
+ */
4
+ export declare enum ElementPosition {
5
+ FIRST = "first",
6
+ LAST = "last"
7
+ }
8
+ /**
9
+ * Available menu item status
10
+ */
11
+ export declare enum Status {
12
+ VISIBLE = "visible",
13
+ HIDDEN = "hidden",
14
+ DISABLED = "disabled",
15
+ ACTIVE = "active"
16
+ }
17
+ /**
18
+ * List of all possibles sizes
19
+ */
20
+ export declare const sizes: readonly ["regular", "medium", "large"];
21
+ /**
22
+ * item Size from sizes
23
+ */
24
+ export declare type MenuItemSizeType = typeof sizes[number];
@@ -0,0 +1,115 @@
1
+ import { ClassList } from '../../../../utils/components.utils';
2
+ import { MgMenu } from '../mg-menu/mg-menu';
3
+ import { MenuItemSizeType, Status } from './mg-menu-item.conf';
4
+ export declare class MgMenuItem {
5
+ /************
6
+ * Internal *
7
+ ************/
8
+ private readonly name;
9
+ private readonly navigationButton;
10
+ /**************
11
+ * Decorators *
12
+ **************/
13
+ /**
14
+ * Get component DOM element
15
+ */
16
+ element: HTMLMgMenuItemElement;
17
+ /************
18
+ * Props *
19
+ ************/
20
+ /**
21
+ * Define menu-item badge
22
+ * when defined menu-item contain an anchor instead of button
23
+ */
24
+ href: string;
25
+ /**
26
+ * Define menu-item status. Default: "visible"
27
+ */
28
+ status: Status;
29
+ validateStatus(newValue: MgMenuItem['status'], oldValue?: MgMenuItem['status']): void;
30
+ /**
31
+ * Define menu-item size. Default: "large".
32
+ */
33
+ size: MenuItemSizeType;
34
+ validateSize(newValue: MgMenuItem['size'], oldValue?: MgMenuItem['size']): void;
35
+ /**
36
+ * Define menu-item content expanded. Default: false.
37
+ */
38
+ expanded: boolean;
39
+ validateExpanded(newValue: MgMenuItem['expanded']): void;
40
+ /************
41
+ * States *
42
+ ************/
43
+ /**
44
+ * Component button classes
45
+ */
46
+ navigationButtonClassList: ClassList;
47
+ /**
48
+ * Parent menu direction
49
+ */
50
+ direction: MgMenu['direction'];
51
+ /**
52
+ * Does component is in main menu
53
+ */
54
+ isInMainMenu: boolean;
55
+ /**
56
+ * Does component have children. Default: false.
57
+ */
58
+ hasChildren: boolean;
59
+ validateHasChildren(newValue: boolean): void;
60
+ /************
61
+ * Methods *
62
+ ************/
63
+ /**
64
+ * Toggle expanded prop value
65
+ *
66
+ * @returns {void}
67
+ */
68
+ private toggleExpanded;
69
+ /**
70
+ * Does an HTMLElement contain child with given Status
71
+ *
72
+ * @param {HTMLElement} element to parse
73
+ * @param {MgMenuItem['status']} status to check
74
+ * @returns {boolean} true if element with status is found
75
+ */
76
+ private hasChildElementStatus;
77
+ /**
78
+ * Is component contextual direction match the given direction
79
+ *
80
+ * @param {MgMenuItem['direction']} direction in parent menu
81
+ * @returns {boolean} true is direction match the direction propertie
82
+ */
83
+ private isdirection;
84
+ /************
85
+ * Handlers *
86
+ ************/
87
+ /**
88
+ * Handle interacrtive element click
89
+ *
90
+ * @param {MouseEvent} event click on element
91
+ * @returns {void}
92
+ */
93
+ private handleElementCLick;
94
+ /*************
95
+ * Lifecycle *
96
+ *************/
97
+ /**
98
+ * Validate props
99
+ *
100
+ * @returns {void}
101
+ */
102
+ componentWillLoad(): void;
103
+ /**
104
+ * Check if component slots configuration
105
+ *
106
+ * @returns {ReturnType<typeof setTimeout>} timeout
107
+ */
108
+ componentDidLoad(): ReturnType<typeof setTimeout>;
109
+ /**
110
+ * Render
111
+ *
112
+ * @returns {HTMLElement} HTML Element
113
+ */
114
+ render(): HTMLElement;
115
+ }
@@ -3,7 +3,7 @@ declare const _default: {
3
3
  title: string;
4
4
  argTypes: {
5
5
  size: {
6
- options: string[];
6
+ options: readonly ["regular", "large"];
7
7
  control: {
8
8
  type: string;
9
9
  };
@@ -1,4 +1,8 @@
1
- import { BadgeType } from '../../atoms/mg-badge/mg-badge.conf';
1
+ import { MgBadge } from '../../atoms/mg-badge/mg-badge';
2
+ import { MgIcon } from '../../atoms/mg-icon/mg-icon';
3
+ /**
4
+ * Available tabs items status
5
+ */
2
6
  export declare enum Status {
3
7
  VISIBLE = "visible",
4
8
  HIDDEN = "hidden",
@@ -11,11 +15,15 @@ export declare enum Status {
11
15
  */
12
16
  export declare type TabItem = {
13
17
  label: string;
14
- icon?: string;
15
- badge?: BadgeType;
18
+ icon?: MgIcon['icon'];
19
+ badge?: Pick<MgBadge, 'value' | 'variant' | 'label'>;
16
20
  status: Status;
17
21
  };
18
22
  /**
19
23
  * List of all possibles sizes
20
24
  */
21
- export declare const sizes: string[];
25
+ export declare const sizes: readonly ["regular", "large"];
26
+ /**
27
+ * Variant type from variants
28
+ */
29
+ export declare type SizeType = typeof sizes[number];
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter } from '../../../stencil-public-runtime';
2
2
  import { ClassList } from '../../../utils/components.utils';
3
- import { TabItem } from './mg-tabs.conf';
3
+ import { TabItem, SizeType } from './mg-tabs.conf';
4
4
  export declare class MgTabs {
5
5
  /************
6
6
  * Internal *
@@ -25,24 +25,24 @@ export declare class MgTabs {
25
25
  * Required for accessibility
26
26
  */
27
27
  label: string;
28
- validateLabel(newValue: string): void;
28
+ validateLabel(newValue: MgTabs['label']): void;
29
29
  /**
30
30
  * Define tabs size
31
31
  */
32
- size: string;
33
- validateSize(newValue: string): void;
32
+ size: SizeType;
33
+ validateSize(newValue: MgTabs['size']): void;
34
34
  /**
35
35
  * Tabs items
36
36
  * Required
37
37
  */
38
38
  items: string[] | TabItem[];
39
- validateItems(newValue: string[] | TabItem[]): void;
39
+ validateItems(newValue: MgTabs['items']): void;
40
40
  /**
41
41
  * Active tab number
42
42
  * default: first is 1
43
43
  */
44
44
  activeTab: number;
45
- validateActiveTab(newValue: number): void;
45
+ validateActiveTab(newValue: MgTabs['activeTab']): void;
46
46
  /**
47
47
  * Component tabs
48
48
  */