@mgdis/mg-components 5.12.0 → 5.13.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.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{mg-action-more_31.cjs.entry.js → mg-action-more_32.cjs.entry.js} +325 -137
- package/dist/cjs/mg-components.cjs.js +1 -1
- package/dist/cjs/mg-item-more.cjs.entry.js +1 -1
- package/dist/cjs/{mg-menu.conf-79f0c761.js → mg-menu.conf-857748e1.js} +20 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +15 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +259 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js +16 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.css +41 -3
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +106 -100
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +1 -1
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +1 -1
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +1 -1
- package/dist/collection/components/molecules/mg-details/mg-details.css +3 -5
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +1 -1
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.css +3 -0
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +19 -1
- package/dist/collection/components/molecules/mg-panel/mg-panel.conf.js +8 -0
- package/dist/collection/components/molecules/mg-panel/mg-panel.css +9 -5
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +133 -47
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.css +1 -0
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +1 -1
- package/dist/collection/locales/en/messages.json +13 -1
- package/dist/collection/locales/fr/messages.json +7 -1
- package/dist/collection/stories/icon-gallery.js +9 -0
- package/dist/collection/variables.css +7 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index2.js +20 -2
- package/dist/components/mg-details.js +1 -1
- package/dist/components/mg-input-checkbox-paginated.d.ts +11 -0
- package/dist/components/mg-input-checkbox-paginated.js +6 -0
- package/dist/components/mg-input-checkbox-paginated2.js +205 -0
- package/dist/components/mg-input-checkbox.js +114 -108
- package/dist/components/mg-menu-item2.js +1 -1
- package/dist/components/mg-menu2.js +1 -1
- package/dist/components/mg-pagination2.js +4 -2
- package/dist/components/mg-panel.js +83 -37
- package/dist/components/mg-tabs.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{mg-action-more_31.entry.js → mg-action-more_32.entry.js} +325 -138
- package/dist/esm/mg-components.js +1 -1
- package/dist/esm/mg-item-more.entry.js +1 -1
- package/dist/esm/{mg-menu.conf-850d4c6e.js → mg-menu.conf-c31828ca.js} +20 -2
- package/dist/mg-components/locales/en/messages.json +13 -1
- package/dist/mg-components/locales/fr/messages.json +7 -1
- package/dist/mg-components/mg-components.css +1 -1
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/p-622e2323.js +1 -0
- package/dist/mg-components/p-bda0b795.entry.js +1 -0
- package/dist/mg-components/{p-67ba5d05.entry.js → p-d37b29bb.entry.js} +1 -1
- package/dist/mg-components/variables.css +7 -2
- package/dist/types/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.d.ts +8 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +103 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +50 -12
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +48 -53
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +0 -1
- package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +0 -1
- package/dist/types/components/molecules/mg-pagination/mg-pagination.d.ts +4 -0
- package/dist/types/components/molecules/mg-panel/mg-panel.conf.d.ts +16 -0
- package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +44 -10
- package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +0 -1
- package/dist/types/components.d.ts +125 -19
- package/dist/types/locales/index.d.ts +18 -0
- package/dist/types/stories/icon-gallery.d.ts +6 -0
- package/package.json +23 -13
- package/dist/mg-components/p-60b7afd9.entry.js +0 -1
- package/dist/mg-components/p-689503fc.js +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h } from '@stencil/core';
|
|
2
2
|
import { createID, ClassList } from '../../../utils/components.utils';
|
|
3
3
|
import { initLocales } from '../../../locales';
|
|
4
|
+
import { expandToggleDisplays, titlePositions } from './mg-panel.conf';
|
|
4
5
|
export class MgPanel {
|
|
5
6
|
constructor() {
|
|
6
7
|
/************
|
|
@@ -19,9 +20,8 @@ export class MgPanel {
|
|
|
19
20
|
* Collapse button click handler
|
|
20
21
|
*/
|
|
21
22
|
this.handleCollapseButton = () => {
|
|
22
|
-
if (!this.expandToggleDisabled)
|
|
23
|
+
if (!this.expandToggleDisabled)
|
|
23
24
|
this.expanded = !this.expanded;
|
|
24
|
-
}
|
|
25
25
|
};
|
|
26
26
|
/**
|
|
27
27
|
* Edit button click handler
|
|
@@ -47,60 +47,92 @@ export class MgPanel {
|
|
|
47
47
|
* Validate edition button handler
|
|
48
48
|
*/
|
|
49
49
|
this.handleValidateEditButton = () => {
|
|
50
|
-
if (this.editInputElement.valid)
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
this.
|
|
54
|
-
|
|
50
|
+
if (!this.editInputElement.valid)
|
|
51
|
+
return;
|
|
52
|
+
if (this.updatedPanelTitle !== undefined)
|
|
53
|
+
this.panelTitle = this.updatedPanelTitle;
|
|
54
|
+
this.toggleIsEditing();
|
|
55
55
|
};
|
|
56
|
+
/*************
|
|
57
|
+
* Render *
|
|
58
|
+
*************/
|
|
56
59
|
/**
|
|
57
|
-
*
|
|
58
|
-
* @returns
|
|
60
|
+
* Render collapse button
|
|
61
|
+
* @returns collpase button
|
|
59
62
|
*/
|
|
60
|
-
this.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
63
|
+
this.renderCollapseButton = () => (h("mg-button", { onClick: this.handleCollapseButton, variant: "flat", identifier: `${this.identifier}-collapse-button`, "aria-expanded": this.expanded !== undefined && this.expanded.toString(), "aria-controls": `${this.identifier}-content`, disabled: this.expandToggleDisabled, isIcon: this.expandToggleDisplay === 'icon', label: this.panelTitle }, h("span", { class: "mg-panel__collapse-button-content" }, h("mg-icon", { icon: this.expanded ? 'chevron-up' : 'chevron-down' }), !this.isEditing && this.expandToggleDisplay !== 'icon' && this.panelTitle)));
|
|
64
|
+
/**
|
|
65
|
+
* Render edit button
|
|
66
|
+
* @returns edit Button
|
|
67
|
+
*/
|
|
68
|
+
this.renderEditButton = () => (h("mg-button", { key: "edit-button", "is-icon": true, variant: "flat", label: this.messages.panel.editLabel, onClick: this.handleEditButton, identifier: `${this.identifier}-edit-button` }, h("mg-icon", { icon: "pen" })));
|
|
69
|
+
/**
|
|
70
|
+
* Render input button
|
|
71
|
+
* @returns edit title input
|
|
72
|
+
*/
|
|
73
|
+
this.renderEditInput = () => (h("mg-input-text", { key: "edition-input", label: this.messages.panel.editLabel, "label-hide": true, value: this.panelTitle, "onValue-change": this.handleUpdateTitle, displayCharacterLeft: false, pattern: this.titlePattern, "pattern-error-message": this.titlePatternErrorMessage, identifier: `${this.identifier}-edition-input`, ref: el => (this.editInputElement = el) }, h("mg-button", { slot: "append-input", label: this.messages.general.cancel, "is-icon": true, variant: "secondary", onClick: this.handleCancelEditButton, identifier: `${this.identifier}-edition-button-cancel` }, h("mg-icon", { icon: "cross" })), h("mg-button", { slot: "append-input", label: this.messages.general.confirm, "is-icon": true, variant: "secondary", onClick: this.handleValidateEditButton, identifier: `${this.identifier}-edition-button-validate` }, h("mg-icon", { icon: "check" }))));
|
|
74
|
+
/**
|
|
75
|
+
* Render title
|
|
76
|
+
* @returns title element
|
|
77
|
+
*/
|
|
78
|
+
this.renderTitle = () => {
|
|
79
|
+
const elementsToRender = [this.renderCollapseButton()];
|
|
80
|
+
if (this.titleEditable) {
|
|
81
|
+
if (!this.isEditing)
|
|
82
|
+
elementsToRender.push(this.renderEditButton());
|
|
83
|
+
else
|
|
84
|
+
elementsToRender.push(this.renderEditInput());
|
|
73
85
|
}
|
|
74
|
-
return
|
|
86
|
+
return this.titlePosition === 'right' ? elementsToRender.reverse() : elementsToRender;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Render header children
|
|
90
|
+
* @returns header child
|
|
91
|
+
*/
|
|
92
|
+
this.renderHeaderChildren = () => {
|
|
93
|
+
const children = [
|
|
94
|
+
h("div", { class: { 'mg-panel__header-title': true, 'mg-panel__header-title--full': this.isEditing, 'mg-panel__header-title--reverse': this.titlePosition === 'right' }, key: this.panelTitle }, this.renderTitle()),
|
|
95
|
+
h("div", { class: "mg-panel__header-content", key: "slot-header" }, h("slot", { name: "header-right" })),
|
|
96
|
+
];
|
|
97
|
+
return this.titlePosition === 'right' ? children.reverse() : children;
|
|
75
98
|
};
|
|
76
99
|
this.identifier = createID('mg-panel');
|
|
77
100
|
this.panelTitle = undefined;
|
|
78
101
|
this.titlePattern = undefined;
|
|
79
102
|
this.titlePatternErrorMessage = undefined;
|
|
103
|
+
this.titleEditable = false;
|
|
104
|
+
this.titlePosition = titlePositions[0];
|
|
80
105
|
this.expanded = false;
|
|
106
|
+
this.expandToggleDisplay = expandToggleDisplays[0];
|
|
81
107
|
this.expandToggleDisabled = undefined;
|
|
82
|
-
this.titleEditable = false;
|
|
83
108
|
this.classCollection = new ClassList(['mg-panel']);
|
|
84
109
|
this.isEditing = false;
|
|
85
110
|
this.updatedPanelTitle = undefined;
|
|
86
111
|
}
|
|
87
112
|
validatePanelTitle(newValue) {
|
|
88
|
-
if (typeof newValue !== 'string' || newValue.trim() === '')
|
|
113
|
+
if (typeof newValue !== 'string' || newValue.trim() === '')
|
|
89
114
|
throw new Error('<mg-panel> prop "panelTitle" is required.');
|
|
90
|
-
}
|
|
91
115
|
this.titleChange.emit(newValue);
|
|
92
116
|
}
|
|
93
117
|
validatetitlePattern(newValue) {
|
|
94
|
-
if (newValue !== undefined && !this.titleEditable)
|
|
118
|
+
if (newValue !== undefined && !this.titleEditable)
|
|
95
119
|
throw new Error('<mg-panel> prop "titleEditable" must be set to `true`.');
|
|
96
|
-
|
|
97
|
-
if (newValue !== undefined && (this.titlePatternErrorMessage === undefined || this.titlePatternErrorMessage.trim() === '')) {
|
|
120
|
+
if (newValue !== undefined && (this.titlePatternErrorMessage === undefined || this.titlePatternErrorMessage.trim() === ''))
|
|
98
121
|
throw new Error('<mg-panel> prop "titlePattern" must be paired with the prop "titlePatternErrorMessage".');
|
|
99
|
-
|
|
122
|
+
}
|
|
123
|
+
validateTitlePosition(newValue) {
|
|
124
|
+
if (!titlePositions.includes(newValue))
|
|
125
|
+
throw new Error(`<mg-panel> prop "titlePosition" must be one of: ${titlePositions.join(', ')}.`);
|
|
100
126
|
}
|
|
101
127
|
handleExpanded(newValue) {
|
|
102
128
|
this.expandedChange.emit(newValue);
|
|
103
129
|
}
|
|
130
|
+
validateExpandToggleDisplay(newValue) {
|
|
131
|
+
if (!expandToggleDisplays.includes(newValue))
|
|
132
|
+
throw new Error(`<mg-panel> prop "expandToggleDisplay" must be one of: ${expandToggleDisplays.join(', ')}.`);
|
|
133
|
+
if (newValue === 'icon' && this.titleEditable)
|
|
134
|
+
this.titleEditable = false;
|
|
135
|
+
}
|
|
104
136
|
/*************
|
|
105
137
|
* Lifecycle *
|
|
106
138
|
*************/
|
|
@@ -113,22 +145,24 @@ export class MgPanel {
|
|
|
113
145
|
// Validate
|
|
114
146
|
this.validatetitlePattern(this.titlePattern);
|
|
115
147
|
this.validatePanelTitle(this.panelTitle);
|
|
148
|
+
this.validateExpandToggleDisplay(this.expandToggleDisplay);
|
|
149
|
+
this.validateTitlePosition(this.titlePosition);
|
|
116
150
|
}
|
|
117
151
|
/**
|
|
118
152
|
* Edit DOM after render
|
|
119
153
|
*/
|
|
120
154
|
componentDidRender() {
|
|
121
155
|
// when we are editing we get focus on edition input
|
|
122
|
-
if (this.isEditing)
|
|
156
|
+
if (this.isEditing)
|
|
123
157
|
this.editInputElement.setFocus();
|
|
124
|
-
}
|
|
125
158
|
}
|
|
126
159
|
/**
|
|
127
160
|
* Render component
|
|
128
|
-
* @returns
|
|
161
|
+
* @returns rendered component
|
|
129
162
|
*/
|
|
130
163
|
render() {
|
|
131
|
-
|
|
164
|
+
const headerId = `${this.identifier}-header`;
|
|
165
|
+
return (h("section", { class: this.classCollection.join(), id: this.identifier }, h("mg-card", null, h("header", { class: { 'mg-panel__header': true, 'mg-panel__header--reverse': this.titlePosition === 'right' }, id: headerId }, this.renderHeaderChildren()), h("article", { class: "mg-panel__content", id: `${this.identifier}-content`, "aria-labelledby": headerId, hidden: !this.expanded }, h("slot", null)))));
|
|
132
166
|
}
|
|
133
167
|
static get is() { return "mg-panel"; }
|
|
134
168
|
static get encapsulation() { return "shadow"; }
|
|
@@ -213,7 +247,7 @@ export class MgPanel {
|
|
|
213
247
|
"attribute": "title-pattern-error-message",
|
|
214
248
|
"reflect": false
|
|
215
249
|
},
|
|
216
|
-
"
|
|
250
|
+
"titleEditable": {
|
|
217
251
|
"type": "boolean",
|
|
218
252
|
"mutable": true,
|
|
219
253
|
"complexType": {
|
|
@@ -225,15 +259,38 @@ export class MgPanel {
|
|
|
225
259
|
"optional": false,
|
|
226
260
|
"docs": {
|
|
227
261
|
"tags": [],
|
|
228
|
-
"text": "
|
|
262
|
+
"text": "Define if panel title is editable"
|
|
229
263
|
},
|
|
230
|
-
"attribute": "
|
|
264
|
+
"attribute": "title-editable",
|
|
231
265
|
"reflect": false,
|
|
232
266
|
"defaultValue": "false"
|
|
233
267
|
},
|
|
234
|
-
"
|
|
235
|
-
"type": "
|
|
268
|
+
"titlePosition": {
|
|
269
|
+
"type": "string",
|
|
236
270
|
"mutable": false,
|
|
271
|
+
"complexType": {
|
|
272
|
+
"original": "TitlePositionType",
|
|
273
|
+
"resolved": "\"left\" | \"right\"",
|
|
274
|
+
"references": {
|
|
275
|
+
"TitlePositionType": {
|
|
276
|
+
"location": "import",
|
|
277
|
+
"path": "./mg-panel.conf"
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
"required": false,
|
|
282
|
+
"optional": false,
|
|
283
|
+
"docs": {
|
|
284
|
+
"tags": [],
|
|
285
|
+
"text": "Define title position"
|
|
286
|
+
},
|
|
287
|
+
"attribute": "title-position",
|
|
288
|
+
"reflect": false,
|
|
289
|
+
"defaultValue": "titlePositions[0]"
|
|
290
|
+
},
|
|
291
|
+
"expanded": {
|
|
292
|
+
"type": "boolean",
|
|
293
|
+
"mutable": true,
|
|
237
294
|
"complexType": {
|
|
238
295
|
"original": "boolean",
|
|
239
296
|
"resolved": "boolean",
|
|
@@ -243,12 +300,36 @@ export class MgPanel {
|
|
|
243
300
|
"optional": false,
|
|
244
301
|
"docs": {
|
|
245
302
|
"tags": [],
|
|
246
|
-
"text": "
|
|
303
|
+
"text": "Panel is opened"
|
|
247
304
|
},
|
|
248
|
-
"attribute": "
|
|
249
|
-
"reflect": false
|
|
305
|
+
"attribute": "expanded",
|
|
306
|
+
"reflect": false,
|
|
307
|
+
"defaultValue": "false"
|
|
250
308
|
},
|
|
251
|
-
"
|
|
309
|
+
"expandToggleDisplay": {
|
|
310
|
+
"type": "string",
|
|
311
|
+
"mutable": false,
|
|
312
|
+
"complexType": {
|
|
313
|
+
"original": "ExpandToggleDisplayType",
|
|
314
|
+
"resolved": "\"icon\" | \"text\"",
|
|
315
|
+
"references": {
|
|
316
|
+
"ExpandToggleDisplayType": {
|
|
317
|
+
"location": "import",
|
|
318
|
+
"path": "./mg-panel.conf"
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
"required": false,
|
|
323
|
+
"optional": false,
|
|
324
|
+
"docs": {
|
|
325
|
+
"tags": [],
|
|
326
|
+
"text": "Define expand toggle button display"
|
|
327
|
+
},
|
|
328
|
+
"attribute": "expand-toggle-display",
|
|
329
|
+
"reflect": false,
|
|
330
|
+
"defaultValue": "expandToggleDisplays[0]"
|
|
331
|
+
},
|
|
332
|
+
"expandToggleDisabled": {
|
|
252
333
|
"type": "boolean",
|
|
253
334
|
"mutable": false,
|
|
254
335
|
"complexType": {
|
|
@@ -260,11 +341,10 @@ export class MgPanel {
|
|
|
260
341
|
"optional": false,
|
|
261
342
|
"docs": {
|
|
262
343
|
"tags": [],
|
|
263
|
-
"text": "
|
|
344
|
+
"text": "Disable possibility to toggle expand"
|
|
264
345
|
},
|
|
265
|
-
"attribute": "
|
|
266
|
-
"reflect": false
|
|
267
|
-
"defaultValue": "false"
|
|
346
|
+
"attribute": "expand-toggle-disabled",
|
|
347
|
+
"reflect": false
|
|
268
348
|
}
|
|
269
349
|
};
|
|
270
350
|
}
|
|
@@ -316,9 +396,15 @@ export class MgPanel {
|
|
|
316
396
|
}, {
|
|
317
397
|
"propName": "titlePattern",
|
|
318
398
|
"methodName": "validatetitlePattern"
|
|
399
|
+
}, {
|
|
400
|
+
"propName": "titlePosition",
|
|
401
|
+
"methodName": "validateTitlePosition"
|
|
319
402
|
}, {
|
|
320
403
|
"propName": "expanded",
|
|
321
404
|
"methodName": "handleExpanded"
|
|
405
|
+
}, {
|
|
406
|
+
"propName": "expandToggleDisplay",
|
|
407
|
+
"methodName": "validateExpandToggleDisplay"
|
|
322
408
|
}];
|
|
323
409
|
}
|
|
324
410
|
}
|
|
@@ -28,7 +28,19 @@
|
|
|
28
28
|
"result": "result",
|
|
29
29
|
"results": "results",
|
|
30
30
|
"searchResults": "Search result(s) list.",
|
|
31
|
-
"noResult": "No result."
|
|
31
|
+
"noResult": "No result.",
|
|
32
|
+
"sections": {
|
|
33
|
+
"selected": {
|
|
34
|
+
"title": "Selected",
|
|
35
|
+
"titlePlurial": "Selected",
|
|
36
|
+
"action": "Unselect all"
|
|
37
|
+
},
|
|
38
|
+
"notSelected": {
|
|
39
|
+
"title": "Not selected",
|
|
40
|
+
"titlePlurial": "Not selected",
|
|
41
|
+
"action": "Select all"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
32
44
|
}
|
|
33
45
|
},
|
|
34
46
|
"form": {
|
|
@@ -28,7 +28,13 @@
|
|
|
28
28
|
"result": "resultat",
|
|
29
29
|
"results": "resultats",
|
|
30
30
|
"searchResults": "List de resultat(s) de la recherche.",
|
|
31
|
-
"noResult": "Aucun resultat."
|
|
31
|
+
"noResult": "Aucun resultat.",
|
|
32
|
+
"checkedItem": "Sélectionné",
|
|
33
|
+
"checkedItems": "Sélectionnés",
|
|
34
|
+
"notCheckedItem": "Non sélectionné",
|
|
35
|
+
"notCheckedItems": "Non sélectionnés",
|
|
36
|
+
"unselectAll": "Tout désélectionner",
|
|
37
|
+
"selectAll": "Tout sélectionner"
|
|
32
38
|
}
|
|
33
39
|
},
|
|
34
40
|
"form": {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import iconList from '@mgdis/img/dist/icons/index.json';
|
|
2
|
+
import { IconGallery, IconItem } from '@storybook/blocks';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
/**
|
|
5
|
+
* Template
|
|
6
|
+
* @returns HTMLElement
|
|
7
|
+
*/
|
|
8
|
+
const Template = () => React.createElement(IconGallery, null, iconList.map(icon => React.createElement(IconItem, { name: icon, key: icon }, React.createElement('mg-icon', { icon: icon }))));
|
|
9
|
+
export default Template;
|
|
@@ -74,9 +74,13 @@
|
|
|
74
74
|
--color-dark-s: 37.3%;
|
|
75
75
|
--color-dark-l: 13.1%;
|
|
76
76
|
--color-dark: var(--color-dark-h), var(--color-dark-s), var(--color-dark-l);
|
|
77
|
-
|
|
77
|
+
|
|
78
|
+
/* dark-40 */
|
|
79
|
+
--mg-color-dark-40-hsl: var(--color-dark-h), 7%, 43%;
|
|
78
80
|
/* dark-5 */
|
|
79
|
-
--mg-color-dark-5-hsl:
|
|
81
|
+
--mg-color-dark-5-hsl: var(--color-dark-h), 9%, 96%;
|
|
82
|
+
/* dark-soft */
|
|
83
|
+
--mg-color-dark-soft-hsl: var(--color-dark-h), var(--color-dark-s), 90%;
|
|
80
84
|
|
|
81
85
|
/* Light */
|
|
82
86
|
/* white; (#ffffff) */
|
|
@@ -262,6 +266,7 @@
|
|
|
262
266
|
--mg-tabs-focused-background-color-hsl: var(--mg-color-app-hsl);
|
|
263
267
|
--mg-tabs-border-color-active-hsl: var(--mg-color-app-hsl);
|
|
264
268
|
--mg-tabs-color-active-hsl: var(--mg-color-app-hsl);
|
|
269
|
+
--mg-tabs-border-bottom: solid 0.1rem hsl(var(--mg-color-dark-soft-hsl));
|
|
265
270
|
|
|
266
271
|
/*
|
|
267
272
|
<mg-details>
|
|
@@ -10,6 +10,7 @@ export { MgForm as MgForm } from '../types/components/molecules/mg-form/mg-form'
|
|
|
10
10
|
export { MgIcon as MgIcon } from '../types/components/atoms/mg-icon/mg-icon';
|
|
11
11
|
export { MgIllustratedMessage as MgIllustratedMessage } from '../types/components/molecules/mg-illustrated-message/mg-illustrated-message';
|
|
12
12
|
export { MgInputCheckbox as MgInputCheckbox } from '../types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox';
|
|
13
|
+
export { MgInputCheckboxPaginated as MgInputCheckboxPaginated } from '../types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated';
|
|
13
14
|
export { MgInputDate as MgInputDate } from '../types/components/molecules/inputs/mg-input-date/mg-input-date';
|
|
14
15
|
export { MgInputNumeric as MgInputNumeric } from '../types/components/molecules/inputs/mg-input-numeric/mg-input-numeric';
|
|
15
16
|
export { MgInputPassword as MgInputPassword } from '../types/components/molecules/inputs/mg-input-password/mg-input-password';
|
package/dist/components/index.js
CHANGED
|
@@ -10,6 +10,7 @@ export { MgForm, defineCustomElement as defineCustomElementMgForm } from './mg-f
|
|
|
10
10
|
export { MgIcon, defineCustomElement as defineCustomElementMgIcon } from './mg-icon.js';
|
|
11
11
|
export { MgIllustratedMessage, defineCustomElement as defineCustomElementMgIllustratedMessage } from './mg-illustrated-message.js';
|
|
12
12
|
export { MgInputCheckbox, defineCustomElement as defineCustomElementMgInputCheckbox } from './mg-input-checkbox.js';
|
|
13
|
+
export { MgInputCheckboxPaginated, defineCustomElement as defineCustomElementMgInputCheckboxPaginated } from './mg-input-checkbox-paginated.js';
|
|
13
14
|
export { MgInputDate, defineCustomElement as defineCustomElementMgInputDate } from './mg-input-date.js';
|
|
14
15
|
export { MgInputNumeric, defineCustomElement as defineCustomElementMgInputNumeric } from './mg-input-numeric.js';
|
|
15
16
|
export { MgInputPassword, defineCustomElement as defineCustomElementMgInputPassword } from './mg-input-password.js';
|
|
@@ -27,7 +27,19 @@ const input$1 = {
|
|
|
27
27
|
result: "result",
|
|
28
28
|
results: "results",
|
|
29
29
|
searchResults: "Search result(s) list.",
|
|
30
|
-
noResult: "No result."
|
|
30
|
+
noResult: "No result.",
|
|
31
|
+
sections: {
|
|
32
|
+
selected: {
|
|
33
|
+
title: "Selected",
|
|
34
|
+
titlePlurial: "Selected",
|
|
35
|
+
action: "Unselect all"
|
|
36
|
+
},
|
|
37
|
+
notSelected: {
|
|
38
|
+
title: "Not selected",
|
|
39
|
+
titlePlurial: "Not selected",
|
|
40
|
+
action: "Select all"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
31
43
|
}
|
|
32
44
|
};
|
|
33
45
|
const form$1 = {
|
|
@@ -114,7 +126,13 @@ const input = {
|
|
|
114
126
|
result: "resultat",
|
|
115
127
|
results: "resultats",
|
|
116
128
|
searchResults: "List de resultat(s) de la recherche.",
|
|
117
|
-
noResult: "Aucun resultat."
|
|
129
|
+
noResult: "Aucun resultat.",
|
|
130
|
+
checkedItem: "Sélectionné",
|
|
131
|
+
checkedItems: "Sélectionnés",
|
|
132
|
+
notCheckedItem: "Non sélectionné",
|
|
133
|
+
notCheckedItems: "Non sélectionnés",
|
|
134
|
+
unselectAll: "Tout désélectionner",
|
|
135
|
+
selectAll: "Tout sélectionner"
|
|
118
136
|
}
|
|
119
137
|
};
|
|
120
138
|
const form = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
2
|
import { d as defineCustomElement$2 } from './mg-icon2.js';
|
|
3
3
|
|
|
4
|
-
const mgDetailsCss = "
|
|
4
|
+
const mgDetailsCss = ".sr-only{border:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){.mg-a11y-animation{animation:none !important;transition:none !important}}.mg-details summary{display:flex;align-items:baseline;cursor:pointer}.mg-details__toggle{margin-left:1.5rem;flex-shrink:0;display:flex;align-items:center;align-self:flex-start;gap:0.6rem;min-height:calc(var(--font-size) * var(--line-height))}.mg-details__details{margin-top:var(--mg-details-spacing)}@media (width < 43.75rem){.mg-details__toggle>span{border:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}}";
|
|
5
5
|
|
|
6
6
|
const MgDetails$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
7
|
constructor() {
|
|
@@ -0,0 +1,11 @@
|
|
|
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;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { a as MgInputCheckboxPaginated$1, d as defineCustomElement$1 } from './mg-input-checkbox-paginated2.js';
|
|
2
|
+
|
|
3
|
+
const MgInputCheckboxPaginated = MgInputCheckboxPaginated$1;
|
|
4
|
+
const defineCustomElement = defineCustomElement$1;
|
|
5
|
+
|
|
6
|
+
export { MgInputCheckboxPaginated, defineCustomElement };
|