@mgdis/mg-components 6.22.0 → 6.23.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 (158) hide show
  1. package/dist/cjs/{index-C2viYwrR.js → index-BEF-cqV9.js} +325 -1789
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/{mg-action-more_37.cjs.entry.js → mg-action-more_36.cjs.entry.js} +242 -172
  4. package/dist/cjs/mg-alert.cjs.entry.js +6 -2
  5. package/dist/cjs/mg-breadcrumb.cjs.entry.js +2 -2
  6. package/dist/cjs/mg-components.cjs.js +3 -3
  7. package/dist/cjs/mg-fieldset.cjs.entry.js +4 -3
  8. package/dist/cjs/mg-input-combobox.cjs.entry.js +4 -3
  9. package/dist/cjs/mg-input-file.cjs.entry.js +5 -4
  10. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +7491 -6367
  11. package/dist/cjs/mg-input.conf-wgTh7iBb.js +84 -0
  12. package/dist/cjs/mg-loader.cjs.entry.js +2 -2
  13. package/dist/cjs/mg-progress.cjs.entry.js +2 -2
  14. package/dist/collection/assets/icons/index.js +1 -1
  15. package/dist/collection/collection-manifest.json +2 -2
  16. package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js +5 -2
  17. package/dist/collection/components/atoms/mg-badge/mg-badge.js +12 -3
  18. package/dist/collection/components/atoms/mg-button/mg-button.js +9 -4
  19. package/dist/collection/components/atoms/mg-card/mg-card.js +16 -7
  20. package/dist/collection/components/atoms/mg-icon/mg-icon.js +16 -9
  21. package/dist/collection/components/atoms/mg-tag/mg-tag.js +2 -1
  22. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +9 -3
  23. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +15 -13
  24. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxPaginated.js +38 -0
  25. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js +3 -2
  26. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +49 -26
  27. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +16 -8
  28. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +6 -3
  29. package/dist/collection/components/molecules/inputs/mg-input-file/mg-input-file.js +7 -4
  30. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +11 -5
  31. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +7 -3
  32. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +7 -3
  33. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +9 -4
  34. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +61 -19
  35. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +15 -8
  36. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +7 -3
  37. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +9 -4
  38. package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +5 -3
  39. package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js +5 -3
  40. package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js +8 -4
  41. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +11 -7
  42. package/dist/collection/components/molecules/mg-alert/mg-alert.js +29 -3
  43. package/dist/collection/components/molecules/mg-breadcrumb/mg-breadcrumb.js +3 -2
  44. package/dist/collection/components/molecules/mg-details/mg-details.js +3 -1
  45. package/dist/collection/components/molecules/mg-fieldset/mg-fieldset.js +5 -2
  46. package/dist/collection/components/molecules/mg-form/mg-form.js +8 -4
  47. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +5 -3
  48. package/dist/collection/components/molecules/mg-loader/mg-loader.js +1 -1
  49. package/dist/collection/components/molecules/mg-message/mg-message.js +43 -4
  50. package/dist/collection/components/molecules/mg-modal/mg-modal.js +4 -3
  51. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +2 -1
  52. package/dist/collection/components/molecules/mg-panel/mg-panel.js +20 -6
  53. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +1 -1
  54. package/dist/collection/components/molecules/mg-popover/mg-popover.js +3 -2
  55. package/dist/collection/components/molecules/mg-progress/mg-progress.js +3 -2
  56. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +3 -2
  57. package/dist/collection/components/molecules/mg-table/mg-table.js +4 -2
  58. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +3 -2
  59. package/dist/components/index2.js +1 -1
  60. package/dist/components/index3.js +1 -1
  61. package/dist/components/index4.js +1 -0
  62. package/dist/components/mg-action-more.js +1 -1
  63. package/dist/components/mg-alert.js +1 -1
  64. package/dist/components/mg-badge2.js +1 -1
  65. package/dist/components/mg-breadcrumb.js +1 -1
  66. package/dist/components/mg-button2.js +1 -1
  67. package/dist/components/mg-card2.js +1 -1
  68. package/dist/components/mg-character-left2.js +1 -1
  69. package/dist/components/mg-details.js +1 -1
  70. package/dist/components/mg-divider2.js +1 -1
  71. package/dist/components/mg-fieldset.js +1 -1
  72. package/dist/components/mg-form.js +1 -1
  73. package/dist/components/mg-icon2.js +1 -1
  74. package/dist/components/mg-illustrated-message.js +1 -1
  75. package/dist/components/mg-input-checkbox.js +1 -1
  76. package/dist/components/mg-input-combobox.js +1 -1
  77. package/dist/components/mg-input-date.js +1 -1
  78. package/dist/components/mg-input-file.js +1 -1
  79. package/dist/components/mg-input-numeric.js +1 -1
  80. package/dist/components/mg-input-password.js +1 -1
  81. package/dist/components/mg-input-radio.js +1 -1
  82. package/dist/components/mg-input-rich-text-editor.js +284 -284
  83. package/dist/components/mg-input-select2.js +1 -1
  84. package/dist/components/mg-input-text2.js +1 -1
  85. package/dist/components/mg-input-textarea.js +1 -1
  86. package/dist/components/mg-input-title2.js +1 -1
  87. package/dist/components/mg-input-toggle.js +1 -1
  88. package/dist/components/mg-input2.js +1 -1
  89. package/dist/components/mg-item-more2.js +1 -1
  90. package/dist/components/mg-loader2.js +1 -1
  91. package/dist/components/mg-menu-item2.js +1 -1
  92. package/dist/components/mg-message2.js +1 -1
  93. package/dist/components/mg-modal.js +1 -1
  94. package/dist/components/mg-pagination.js +1 -1
  95. package/dist/components/mg-panel.js +1 -1
  96. package/dist/components/mg-popover-content2.js +1 -1
  97. package/dist/components/mg-popover2.js +1 -1
  98. package/dist/components/mg-progress.js +1 -1
  99. package/dist/components/mg-skip-links.js +1 -1
  100. package/dist/components/mg-table.js +1 -1
  101. package/dist/components/mg-tabs2.js +1 -1
  102. package/dist/components/mg-tooltip2.js +1 -1
  103. package/dist/custom-elements.json +8828 -0
  104. package/dist/esm/{index-DFwaH2hS.js → index-DshvCiTL.js} +325 -1789
  105. package/dist/esm/loader.js +3 -3
  106. package/dist/esm/{mg-action-more_37.entry.js → mg-action-more_36.entry.js} +244 -173
  107. package/dist/esm/mg-alert.entry.js +6 -2
  108. package/dist/esm/mg-breadcrumb.entry.js +2 -2
  109. package/dist/esm/mg-components.js +4 -4
  110. package/dist/esm/mg-fieldset.entry.js +4 -3
  111. package/dist/esm/mg-input-combobox.entry.js +4 -3
  112. package/dist/esm/mg-input-file.entry.js +5 -4
  113. package/dist/esm/mg-input-rich-text-editor.entry.js +7491 -6367
  114. package/dist/esm/mg-input.conf-DOi9lJXy.js +73 -0
  115. package/dist/esm/mg-loader.entry.js +2 -2
  116. package/dist/esm/mg-progress.entry.js +2 -2
  117. package/dist/mg-components/mg-components.esm.js +1 -1
  118. package/dist/mg-components/{p-d5e69c95.entry.js → p-13feb37a.entry.js} +1 -1
  119. package/dist/mg-components/{p-c8c8cfc1.entry.js → p-236bb1d2.entry.js} +1 -1
  120. package/dist/mg-components/p-79265ad3.entry.js +1 -0
  121. package/dist/mg-components/{p-adec7fcc.entry.js → p-7c63e469.entry.js} +1 -1
  122. package/dist/mg-components/p-7fd3e519.entry.js +1 -0
  123. package/dist/mg-components/p-DOi9lJXy.js +1 -0
  124. package/dist/mg-components/p-DshvCiTL.js +2 -0
  125. package/dist/mg-components/p-a0e2c886.entry.js +1 -0
  126. package/dist/mg-components/p-cdb01923.entry.js +1 -0
  127. package/dist/mg-components/p-d0b6d8f5.entry.js +1 -0
  128. package/dist/mg-components/{p-c63f97f0.entry.js → p-d698fa67.entry.js} +283 -283
  129. package/dist/types/assets/icons/index.d.ts +2 -0
  130. package/dist/types/components/atoms/internals/mg-input-title/mg-input-title.d.ts +4 -0
  131. package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +4 -0
  132. package/dist/types/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.d.ts +2 -2
  133. package/dist/types/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxPaginated.d.ts +8 -0
  134. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +16 -8
  135. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +15 -5
  136. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +12 -6
  137. package/dist/types/components/molecules/mg-alert/mg-alert.d.ts +4 -0
  138. package/dist/types/components/molecules/mg-message/mg-message.d.ts +6 -0
  139. package/dist/types/components.d.ts +547 -170
  140. package/dist/types/stencil-public-runtime.d.ts +53 -2
  141. package/ide/intellij/web-types.json +211 -3476
  142. package/ide/vscode/css-custom-data.json +1 -1
  143. package/ide/vscode/html-custom-data.json +58 -314
  144. package/package.json +30 -25
  145. package/dist/cjs/mg-input.conf-BNpeATnq.js +0 -35
  146. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +0 -245
  147. package/dist/components/mg-input-checkbox-paginated.d.ts +0 -11
  148. package/dist/components/mg-input-checkbox-paginated.js +0 -1
  149. package/dist/components/mg-input-checkbox-paginated2.js +0 -1
  150. package/dist/esm/mg-input.conf-C9rmNQIL.js +0 -25
  151. package/dist/mg-components/p-0482eb9f.entry.js +0 -1
  152. package/dist/mg-components/p-2ee92f38.entry.js +0 -1
  153. package/dist/mg-components/p-3b653226.entry.js +0 -1
  154. package/dist/mg-components/p-5745fbea.entry.js +0 -1
  155. package/dist/mg-components/p-C9rmNQIL.js +0 -1
  156. package/dist/mg-components/p-DFwaH2hS.js +0 -2
  157. package/dist/mg-components/p-cc793586.entry.js +0 -1
  158. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +0 -77
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mgdis/mg-components",
3
- "version": "6.22.0",
3
+ "version": "6.23.0",
4
4
  "description": "MG Components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -10,13 +10,18 @@
10
10
  "collection": "dist/collection/collection-manifest.json",
11
11
  "collection:main": "dist/collection/index.js",
12
12
  "unpkg": "dist/mg-components/mg-components.esm.js",
13
+ "customElements": "dist/custom-elements.json",
13
14
  "web-types": "ide/intellij/web-types.json",
14
15
  "contributes": {
15
16
  "html": {
16
- "customData": "ide/vscode/html-custom-data.json"
17
+ "customData": [
18
+ "ide/vscode/html-custom-data.json"
19
+ ]
17
20
  },
18
21
  "css": {
19
- "customData": "ide/vscode/css-custom-data.json"
22
+ "customData": [
23
+ "ide/vscode/css-custom-data.json"
24
+ ]
20
25
  }
21
26
  },
22
27
  "files": [
@@ -34,36 +39,36 @@
34
39
  },
35
40
  "dependencies": {
36
41
  "@popperjs/core": "2.11.8",
37
- "@stencil/core": "4.40.1",
38
- "jodit": "4.12.2",
39
- "@mgdis/sanitize-html": "1.1.0",
40
- "@mgdis/styles": "2.17.0",
41
- "@mgdis/img": "2.6.0",
42
- "@mgdis/core-ui-helpers": "1.1.1"
42
+ "@stencil/core": "4.43.5",
43
+ "jodit": "4.12.4",
44
+ "@mgdis/core-ui-helpers": "1.2.0",
45
+ "@mgdis/sanitize-html": "1.1.2",
46
+ "@mgdis/styles": "2.18.0",
47
+ "@mgdis/img": "2.7.0"
43
48
  },
44
49
  "devDependencies": {
45
- "@playwright/test": "1.59.1",
46
- "@storybook/addon-a11y": "10.3.4",
47
- "@storybook/addon-docs": "10.3.4",
48
- "@storybook/addon-links": "10.3.4",
49
- "@storybook/html": "10.3.4",
50
- "@storybook/html-vite": "10.3.4",
50
+ "@playwright/test": "1.60.0",
51
+ "@storybook/addon-a11y": "10.4.2",
52
+ "@storybook/addon-docs": "10.4.2",
53
+ "@storybook/addon-links": "10.4.2",
54
+ "@storybook/html": "10.4.2",
55
+ "@storybook/html-vite": "10.4.2",
51
56
  "@types/jest": "29.5.14",
52
- "@types/node": "24.12.0",
53
- "chromatic": "15.3.1",
57
+ "@types/node": "24.12.4",
58
+ "chromatic": "17.2.0",
54
59
  "eslint": "8.57.1",
55
- "eslint-plugin-storybook": "10.3.4",
60
+ "eslint-plugin-storybook": "10.4.2",
56
61
  "jest": "29.7.0",
57
62
  "jest-cli": "29.7.0",
58
- "jest-junit": "16.0.0",
63
+ "jest-junit": "17.0.0",
59
64
  "jest-transform-stub": "2.0.0",
60
- "react": "19.2.4",
61
- "react-dom": "19.2.4",
62
- "sass": "1.98.0",
63
- "storybook": "10.3.4",
65
+ "react": "19.2.7",
66
+ "react-dom": "19.2.7",
67
+ "sass": "1.99.0",
68
+ "storybook": "10.4.2",
64
69
  "storybook-addon-tag-badges": "3.1.0",
65
70
  "typescript": "5.9.3",
66
- "vite": "7.3.1",
71
+ "vite": "8.0.16",
67
72
  "@core-ui/jest-config": "1.0.9",
68
73
  "@mgdis/linting-stencil": "1.3.11"
69
74
  },
@@ -75,7 +80,7 @@
75
80
  "test": "TZ=UTC stencil test --spec --e2e",
76
81
  "test:unit": "TZ=UTC stencil test --spec --collectCoverage",
77
82
  "test:e2e": "pnpm --package=@pnpm/@playwright/test dlx playwright test",
78
- "test:e2e:docker": "pnpm dlx @playwright/test test",
83
+ "test:e2e:docker": "pnpm exec playwright test",
79
84
  "test:watch": "stencil test --spec --e2e --watchAll",
80
85
  "generate": "stencil generate",
81
86
  "storybook": "storybook dev -p 6006",
@@ -1,35 +0,0 @@
1
- 'use strict';
2
-
3
- /**
4
- * Possible input width
5
- */
6
- const widths = [2, 4, 16, 'full'];
7
- /**
8
- * Possible tootltip postions
9
- */
10
- const tooltipPositions = ['input', 'label'];
11
- /**
12
- * Possible label headings
13
- */
14
- const labelHeadings = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
15
- /**
16
- * Is HTMLMgInputElement an HTMLMgInputFileElement
17
- * @param input - input element
18
- * @returns true if input is an mg-input-file element
19
- */
20
- const isMgInputFile = (input) => input.nodeName === 'MG-INPUT-FILE';
21
- const classFieldset = 'mg-c-input--fieldset';
22
- const classDisabled = 'mg-c-input--disabled';
23
- const classReadonly = 'mg-c-input--readonly';
24
- const classVerticalList = 'mg-c-input--vertical-list';
25
- const classDisplayCharacterLeft = 'mg-c-input--display-character-left';
26
-
27
- exports.classDisabled = classDisabled;
28
- exports.classDisplayCharacterLeft = classDisplayCharacterLeft;
29
- exports.classFieldset = classFieldset;
30
- exports.classReadonly = classReadonly;
31
- exports.classVerticalList = classVerticalList;
32
- exports.isMgInputFile = isMgInputFile;
33
- exports.labelHeadings = labelHeadings;
34
- exports.tooltipPositions = tooltipPositions;
35
- exports.widths = widths;
@@ -1,245 +0,0 @@
1
- import { h, Host } from "@stencil/core";
2
- import { MgInputCheckboxList } from "../MgInputCheckboxList";
3
- import { formatID } from "@mgdis/core-ui-helpers/dist/utils";
4
- /**
5
- * Internal component use to manage sections instances
6
- * @internal
7
- */
8
- export class MgInputCheckboxPaginated {
9
- constructor() {
10
- this.step = 10;
11
- /*************
12
- * Decorators *
13
- *************/
14
- /**
15
- * Define if mg-input-checkbox-list is readonly
16
- */
17
- this.readonly = false;
18
- /**
19
- * Define if mg-input-checkbox-list is disabled
20
- */
21
- this.disabled = false;
22
- /**
23
- * Page items limit to display
24
- */
25
- this.limit = this.step;
26
- /***********
27
- * Methods *
28
- ***********/
29
- /**
30
- * Component has next checkboxes to display
31
- * @returns truthy if have next elements
32
- */
33
- this.hasNext = () => {
34
- return this.checkboxes.length > this.limit;
35
- };
36
- /**
37
- * Set items from checkboxes and limit
38
- */
39
- this.setItems = () => {
40
- this.items = this.checkboxes.slice(0, this.limit);
41
- };
42
- /**
43
- * Handle load-more <mg-button> click event
44
- */
45
- this.handleLoadMore = () => {
46
- if (this.hasNext()) {
47
- this.limit += this.step;
48
- }
49
- };
50
- }
51
- watchCheckboxes() {
52
- this.setItems();
53
- }
54
- watchLimit() {
55
- this.setItems();
56
- }
57
- /**
58
- * Method to reset limit
59
- */
60
- async resetLimit() {
61
- this.limit = this.step;
62
- }
63
- /*************
64
- * Lifecycle *
65
- *************/
66
- /**
67
- * Validate props
68
- */
69
- componentWillLoad() {
70
- this.watchCheckboxes();
71
- }
72
- /**
73
- * Render
74
- * @returns HTML Element
75
- */
76
- render() {
77
- const listId = formatID(this.messages.label);
78
- const tabId = 'tab-info';
79
- return (h(Host, { key: 'ce0fe4a842cc21f7f981b6a9286d592c2c28819b' }, h("slot", { key: '683c26f98e76262c565613529c76e7f3b27efbc5', name: "header-action" }), h("div", { key: 'eb9e9bfa54a467b44f4e90a8575ae8b1fe40ea10', class: "mg-c-input__tabs-content" }, h("p", { key: '6eeb40f89a0cc0b8ea0837f44babe8cd440ced0f', id: tabId, class: { 'mg-c-input__popover-info': true, 'mg-u-visually-hidden': this.items.length !== 0 }, "aria-live": this.items.length !== 0 ? 'polite' : undefined }, this.items.length === 0 ? this.messages.noValue : this.messages.values.replace('{count}', this.items.length.toString())), this.items.length > 0 && (h(MgInputCheckboxList, { key: '1625b0bdbb1de6ef0c55850e3a08a2cf322da317', checkboxes: this.items, labelledby: tabId, id: listId, disabled: this.disabled, name: this.name, invalid: this.invalid })), this.hasNext() && (h("mg-button", { key: "load-more", variant: "flat", class: "mg-c-input__load-more", tabIndex: -1, "full-width": true, onClick: this.handleLoadMore, "aria-controls": listId }, h("mg-icon", { key: '8f10cc6152899cf869023ff1c465763e9a05d7b6', icon: "chevron-down" }), this.messages.showMore)))));
80
- }
81
- static get is() { return "mg-input-checkbox-paginated"; }
82
- static get encapsulation() { return "scoped"; }
83
- static get properties() {
84
- return {
85
- "readonly": {
86
- "type": "boolean",
87
- "mutable": false,
88
- "complexType": {
89
- "original": "boolean",
90
- "resolved": "boolean",
91
- "references": {}
92
- },
93
- "required": false,
94
- "optional": false,
95
- "docs": {
96
- "tags": [],
97
- "text": "Define if mg-input-checkbox-list is readonly"
98
- },
99
- "getter": false,
100
- "setter": false,
101
- "reflect": false,
102
- "attribute": "readonly",
103
- "defaultValue": "false"
104
- },
105
- "disabled": {
106
- "type": "boolean",
107
- "mutable": false,
108
- "complexType": {
109
- "original": "boolean",
110
- "resolved": "boolean",
111
- "references": {}
112
- },
113
- "required": false,
114
- "optional": false,
115
- "docs": {
116
- "tags": [],
117
- "text": "Define if mg-input-checkbox-list is disabled"
118
- },
119
- "getter": false,
120
- "setter": false,
121
- "reflect": false,
122
- "attribute": "disabled",
123
- "defaultValue": "false"
124
- },
125
- "name": {
126
- "type": "string",
127
- "mutable": false,
128
- "complexType": {
129
- "original": "string",
130
- "resolved": "string",
131
- "references": {}
132
- },
133
- "required": false,
134
- "optional": true,
135
- "docs": {
136
- "tags": [],
137
- "text": "Define mg-input-checkbox input name"
138
- },
139
- "getter": false,
140
- "setter": false,
141
- "reflect": false,
142
- "attribute": "name"
143
- },
144
- "invalid": {
145
- "type": "boolean",
146
- "mutable": false,
147
- "complexType": {
148
- "original": "boolean",
149
- "resolved": "boolean",
150
- "references": {}
151
- },
152
- "required": false,
153
- "optional": true,
154
- "docs": {
155
- "tags": [],
156
- "text": "Define mg-input-checkbox input invalid"
157
- },
158
- "getter": false,
159
- "setter": false,
160
- "reflect": false,
161
- "attribute": "invalid"
162
- },
163
- "checkboxes": {
164
- "type": "unknown",
165
- "mutable": false,
166
- "complexType": {
167
- "original": "CheckboxItem[]",
168
- "resolved": "CheckboxItem[]",
169
- "references": {
170
- "CheckboxItem": {
171
- "location": "import",
172
- "path": "../mg-input-checkbox.conf",
173
- "id": "src/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.ts::CheckboxItem"
174
- }
175
- }
176
- },
177
- "required": false,
178
- "optional": false,
179
- "docs": {
180
- "tags": [],
181
- "text": "Define checkboxes to paginate"
182
- },
183
- "getter": false,
184
- "setter": false
185
- },
186
- "messages": {
187
- "type": "unknown",
188
- "mutable": false,
189
- "complexType": {
190
- "original": "Record<string, string>",
191
- "resolved": "string",
192
- "references": {
193
- "Record": {
194
- "location": "global",
195
- "id": "global::Record"
196
- }
197
- }
198
- },
199
- "required": false,
200
- "optional": false,
201
- "docs": {
202
- "tags": [],
203
- "text": "Define component message"
204
- },
205
- "getter": false,
206
- "setter": false
207
- }
208
- };
209
- }
210
- static get states() {
211
- return {
212
- "limit": {}
213
- };
214
- }
215
- static get methods() {
216
- return {
217
- "resetLimit": {
218
- "complexType": {
219
- "signature": "() => Promise<void>",
220
- "parameters": [],
221
- "references": {
222
- "Promise": {
223
- "location": "global",
224
- "id": "global::Promise"
225
- }
226
- },
227
- "return": "Promise<void>"
228
- },
229
- "docs": {
230
- "text": "Method to reset limit",
231
- "tags": []
232
- }
233
- }
234
- };
235
- }
236
- static get watchers() {
237
- return [{
238
- "propName": "checkboxes",
239
- "methodName": "watchCheckboxes"
240
- }, {
241
- "propName": "limit",
242
- "methodName": "watchLimit"
243
- }];
244
- }
245
- }
@@ -1,11 +0,0 @@
1
- import type { Components, JSX } from "../types/components";
2
-
3
- interface MgInputCheckboxPaginated extends Components.MgInputCheckboxPaginated, HTMLElement {}
4
- export const MgInputCheckboxPaginated: {
5
- prototype: MgInputCheckboxPaginated;
6
- new (): MgInputCheckboxPaginated;
7
- };
8
- /**
9
- * Used to define this component and all nested components recursively.
10
- */
11
- export const defineCustomElement: () => void;
@@ -1 +0,0 @@
1
- import{M as o,d as t}from"./mg-input-checkbox-paginated2.js";const a=o,p=t;export{a as MgInputCheckboxPaginated,p as defineCustomElement}
@@ -1 +0,0 @@
1
- import{h as t,transformTag as e,proxyCustomElement as i,HTMLElement as s,Host as c}from"@stencil/core/internal/client";import{f as a}from"./index2.js";import{d as n}from"./mg-button2.js";import{d as o}from"./mg-icon2.js";const h=e=>t("div",{class:"mg-c-input__input-group-container","aria-labelledby":e.labelledby,id:e.id},e.checkboxes.map((i=>{var s,c;return t("div",{key:i._id,class:{"mg-c-input__input-group":!0,"mg-c-input__input-group--disabled":e.disabled||i.disabled}},t("input",{type:"checkbox",id:i._id,name:e.name,value:null===(s=i.value)||void 0===s?void 0:s.toString(),checked:Boolean(i.value),required:i.required,"aria-invalid":(null===(c=e.invalid)||void 0===c?void 0:c.toString())||"false",disabled:e.disabled||i.disabled,indeterminate:null===i.value,onInput:i._handleInput,onBlur:i._handleBlur,onKeyDown:i._handleKeydown}),t("label",{htmlFor:i._id},i.title))}))),l=i(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.step=10,this.readonly=!1,this.disabled=!1,this.limit=this.step,this.hasNext=()=>this.checkboxes.length>this.limit,this.setItems=()=>{this.items=this.checkboxes.slice(0,this.limit)},this.handleLoadMore=()=>{this.hasNext()&&(this.limit+=this.step)}}watchCheckboxes(){this.setItems()}watchLimit(){this.setItems()}async resetLimit(){this.limit=this.step}componentWillLoad(){this.watchCheckboxes()}render(){const e=a(this.messages.label),i="tab-info";return t(c,{key:"ce0fe4a842cc21f7f981b6a9286d592c2c28819b"},t("slot",{key:"683c26f98e76262c565613529c76e7f3b27efbc5",name:"header-action"}),t("div",{key:"eb9e9bfa54a467b44f4e90a8575ae8b1fe40ea10",class:"mg-c-input__tabs-content"},t("p",{key:"6eeb40f89a0cc0b8ea0837f44babe8cd440ced0f",id:i,class:{"mg-c-input__popover-info":!0,"mg-u-visually-hidden":0!==this.items.length},"aria-live":0!==this.items.length?"polite":void 0},0===this.items.length?this.messages.noValue:this.messages.values.replace("{count}",this.items.length.toString())),this.items.length>0&&t(h,{key:"1625b0bdbb1de6ef0c55850e3a08a2cf322da317",checkboxes:this.items,labelledby:i,id:e,disabled:this.disabled,name:this.name,invalid:this.invalid}),this.hasNext()&&t("mg-button",{key:"load-more",variant:"flat",class:"mg-c-input__load-more",tabIndex:-1,"full-width":!0,onClick:this.handleLoadMore,"aria-controls":e},t("mg-icon",{key:"8f10cc6152899cf869023ff1c465763e9a05d7b6",icon:"chevron-down"}),this.messages.showMore)))}static get watchers(){return{checkboxes:[{watchCheckboxes:0}],limit:[{watchLimit:0}]}}},[262,"mg-input-checkbox-paginated",{readonly:[4],disabled:[4],name:[1],invalid:[4],checkboxes:[16],messages:[16],limit:[32],resetLimit:[64]},void 0,{checkboxes:[{watchCheckboxes:0}],limit:[{watchLimit:0}]}]);function d(){"undefined"!=typeof customElements&&["mg-input-checkbox-paginated","mg-button","mg-icon"].forEach((t=>{switch(t){case"mg-input-checkbox-paginated":customElements.get(e(t))||customElements.define(e(t),l);break;case"mg-button":customElements.get(e(t))||n();break;case"mg-icon":customElements.get(e(t))||o()}}))}d();export{l as M,h as a,d}
@@ -1,25 +0,0 @@
1
- /**
2
- * Possible input width
3
- */
4
- const widths = [2, 4, 16, 'full'];
5
- /**
6
- * Possible tootltip postions
7
- */
8
- const tooltipPositions = ['input', 'label'];
9
- /**
10
- * Possible label headings
11
- */
12
- const labelHeadings = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
13
- /**
14
- * Is HTMLMgInputElement an HTMLMgInputFileElement
15
- * @param input - input element
16
- * @returns true if input is an mg-input-file element
17
- */
18
- const isMgInputFile = (input) => input.nodeName === 'MG-INPUT-FILE';
19
- const classFieldset = 'mg-c-input--fieldset';
20
- const classDisabled = 'mg-c-input--disabled';
21
- const classReadonly = 'mg-c-input--readonly';
22
- const classVerticalList = 'mg-c-input--vertical-list';
23
- const classDisplayCharacterLeft = 'mg-c-input--display-character-left';
24
-
25
- export { classDisabled as a, classFieldset as b, classReadonly as c, classVerticalList as d, classDisplayCharacterLeft as e, isMgInputFile as i, labelHeadings as l, tooltipPositions as t, widths as w };