@maggioli-design-system/mds-table-row 4.7.0 → 4.8.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/{index-97006570.js → index-6ff13374.js} +45 -7
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mds-table-row.cjs.entry.js +17 -3
- package/dist/cjs/mds-table-row.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/common/aria.js +17 -1
- package/dist/collection/common/device.js +6 -0
- package/dist/collection/common/keyboard-manager.js +2 -2
- package/dist/collection/common/locale.js +17 -5
- package/dist/collection/components/mds-table-row/mds-table-row.css +57 -252
- package/dist/collection/components/mds-table-row/mds-table-row.js +26 -1
- package/dist/collection/dictionary/button.js +1 -0
- package/dist/collection/dictionary/file-extensions.js +114 -56
- package/dist/collection/dictionary/text.js +60 -1
- package/dist/collection/dictionary/variant.js +10 -1
- package/dist/collection/type/variant-file-format.js +0 -34
- package/dist/components/mds-table-row.js +18 -3
- package/dist/documentation.json +24 -3
- package/dist/esm/{index-ac4b33c0.js → index-0a14d3b4.js} +45 -8
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mds-table-row.entry.js +17 -3
- package/dist/esm/mds-table-row.js +4 -4
- package/dist/esm-es5/index-0a14d3b4.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mds-table-row.entry.js +1 -1
- package/dist/esm-es5/mds-table-row.js +1 -1
- package/dist/mds-table-row/mds-table-row.esm.js +1 -1
- package/dist/mds-table-row/mds-table-row.js +1 -1
- package/dist/mds-table-row/p-25a5e94e.system.js +1 -0
- package/dist/mds-table-row/p-33796315.entry.js +1 -0
- package/dist/mds-table-row/p-580bb30b.system.js +2 -0
- package/dist/mds-table-row/p-60aa058b.js +2 -0
- package/dist/mds-table-row/p-cca5599e.system.entry.js +1 -0
- package/dist/stats.json +84 -43
- package/dist/types/common/aria.d.ts +3 -1
- package/dist/types/common/date.d.ts +1 -1
- package/dist/types/common/device.d.ts +2 -0
- package/dist/types/common/file.d.ts +3 -4
- package/dist/types/common/locale.d.ts +3 -1
- package/dist/types/components/mds-table-row/mds-table-row.d.ts +4 -0
- package/dist/types/components.d.ts +2 -0
- package/dist/types/dictionary/file-extensions.d.ts +2 -1
- package/dist/types/dictionary/text.d.ts +3 -1
- package/dist/types/dictionary/variant.d.ts +2 -1
- package/dist/types/stencil-public-runtime.d.ts +6 -0
- package/dist/types/type/autocomplete.d.ts +1 -1
- package/dist/types/type/button.d.ts +1 -1
- package/dist/types/type/header-bar.d.ts +2 -0
- package/dist/types/type/input.d.ts +3 -0
- package/dist/types/type/text.d.ts +2 -0
- package/dist/types/type/variant-file-format.d.ts +4 -4
- package/dist/types/type/variant.d.ts +2 -1
- package/documentation.json +65 -34
- package/package.json +5 -5
- package/readme.md +5 -4
- package/src/common/aria.ts +22 -2
- package/src/common/device.ts +9 -0
- package/src/common/file.ts +2 -3
- package/src/common/keyboard-manager.ts +2 -2
- package/src/common/locale.ts +20 -6
- package/src/common/unit.ts +1 -1
- package/src/components/mds-table-row/.gitlab-ci.yml +5 -10
- package/src/components/mds-table-row/mds-table-row.css +60 -0
- package/src/components/mds-table-row/mds-table-row.tsx +19 -1
- package/src/components/mds-table-row/readme.md +4 -3
- package/src/components.d.ts +2 -0
- package/src/dictionary/button.ts +1 -0
- package/src/dictionary/file-extensions.ts +118 -57
- package/src/dictionary/text.ts +64 -0
- package/src/dictionary/variant.ts +11 -0
- package/src/fixtures/icons.json +20 -2
- package/src/fixtures/iconsauce.json +12 -0
- package/src/meta/file-format/locale.el.json +39 -0
- package/src/meta/file-format/locale.en.json +39 -0
- package/src/meta/file-format/locale.es.json +39 -0
- package/src/meta/file-format/locale.it.json +39 -0
- package/src/tailwind/components.css +1 -1
- package/src/type/autocomplete.ts +0 -1
- package/src/type/button.ts +1 -0
- package/src/type/header-bar.ts +11 -0
- package/src/type/input.ts +4 -0
- package/src/type/text.ts +59 -0
- package/src/type/variant-file-format.ts +20 -37
- package/src/type/variant.ts +9 -1
- package/www/build/mds-table-row.esm.js +1 -1
- package/www/build/mds-table-row.js +1 -1
- package/www/build/p-25a5e94e.system.js +1 -0
- package/www/build/p-33796315.entry.js +1 -0
- package/www/build/p-580bb30b.system.js +2 -0
- package/www/build/p-60aa058b.js +2 -0
- package/www/build/p-cca5599e.system.entry.js +1 -0
- package/dist/collection/type/language.js +0 -1
- package/dist/esm-es5/index-ac4b33c0.js +0 -1
- package/dist/mds-table-row/p-0a6d4960.js +0 -2
- package/dist/mds-table-row/p-11e2454f.system.js +0 -1
- package/dist/mds-table-row/p-bc92b059.system.js +0 -2
- package/dist/mds-table-row/p-cb00bcd8.entry.js +0 -1
- package/dist/mds-table-row/p-e2d6387e.system.entry.js +0 -1
- package/dist/types/interface/input-value.d.ts +0 -4
- package/dist/types/type/language.d.ts +0 -2
- package/src/interface/input-value.ts +0 -5
- package/src/type/language.ts +0 -8
- package/www/build/p-0a6d4960.js +0 -2
- package/www/build/p-11e2454f.system.js +0 -1
- package/www/build/p-bc92b059.system.js +0 -2
- package/www/build/p-cb00bcd8.entry.js +0 -1
- package/www/build/p-e2d6387e.system.entry.js +0 -1
- /package/dist/collection/{interface/input-value.js → type/header-bar.js} +0 -0
|
@@ -5,8 +5,9 @@ export type ThemeFullVariantAvatarType = 'amaranth' | 'aqua' | 'blue' | 'error'
|
|
|
5
5
|
export type ThemeLuminanceVariantType = 'dark' | 'light';
|
|
6
6
|
export type LabelVariantType = 'amaranth' | 'aqua' | 'blue' | 'green' | 'lime' | 'orange' | 'orchid' | 'sky' | 'violet' | 'yellow';
|
|
7
7
|
export type ActionVariantType = 'primary' | 'dark' | 'light';
|
|
8
|
+
export type ChipVariantType = 'primary' | 'secondary' | 'dark' | 'error' | 'info' | 'success' | 'warning';
|
|
8
9
|
export type StateVariantType = 'disabled' | 'focused' | 'readonly';
|
|
9
|
-
export type ToneActionVariantType = 'primary' | 'secondary' | '
|
|
10
|
+
export type ToneActionVariantType = 'primary' | 'secondary' | 'strong' | 'weak' | 'ghost' | 'quiet';
|
|
10
11
|
export type ToneVariantType = 'strong' | 'weak' | 'ghost' | 'quiet';
|
|
11
12
|
export type ToneSimpleVariantType = 'quiet' | 'strong' | 'weak';
|
|
12
13
|
export type ToneMinimalVariantType = 'strong' | 'weak';
|
package/documentation.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2024-
|
|
2
|
+
"timestamp": "2024-12-04T15:30:05",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
|
-
"version": "4.
|
|
6
|
-
"typescriptVersion": "5.5.
|
|
5
|
+
"version": "4.22.2",
|
|
6
|
+
"typescriptVersion": "5.5.4"
|
|
7
7
|
},
|
|
8
8
|
"components": [
|
|
9
9
|
{
|
|
10
10
|
"filePath": "src/components/mds-table-row/mds-table-row.tsx",
|
|
11
11
|
"encapsulation": "shadow",
|
|
12
12
|
"tag": "mds-table-row",
|
|
13
|
-
"readme": "# mds-table-row\n\n\n\nThis is a web-component from Maggioli Design System [Magma](https://magma.maggiolicloud.it), built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the
|
|
14
|
-
"docs": "This is a web-component from Maggioli Design System [Magma](https://magma.maggiolicloud.it), built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the
|
|
13
|
+
"readme": "# mds-table-row\n\n\n\nThis is a web-component from Maggioli Design System [Magma](https://magma.maggiolicloud.it), built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the JavaScript framework you are using.\n",
|
|
14
|
+
"docs": "This is a web-component from Maggioli Design System [Magma](https://magma.maggiolicloud.it), built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the JavaScript framework you are using.",
|
|
15
15
|
"docsTags": [
|
|
16
16
|
{
|
|
17
17
|
"name": "slot",
|
|
@@ -40,6 +40,27 @@
|
|
|
40
40
|
],
|
|
41
41
|
"optional": false,
|
|
42
42
|
"required": false
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "overlayActions",
|
|
46
|
+
"type": "boolean",
|
|
47
|
+
"complexType": {
|
|
48
|
+
"original": "boolean",
|
|
49
|
+
"resolved": "boolean",
|
|
50
|
+
"references": {}
|
|
51
|
+
},
|
|
52
|
+
"mutable": true,
|
|
53
|
+
"attr": "overlay-actions",
|
|
54
|
+
"reflectToAttr": true,
|
|
55
|
+
"docs": "",
|
|
56
|
+
"docsTags": [],
|
|
57
|
+
"values": [
|
|
58
|
+
{
|
|
59
|
+
"type": "boolean"
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"optional": false,
|
|
63
|
+
"required": false
|
|
43
64
|
}
|
|
44
65
|
],
|
|
45
66
|
"methods": [],
|
|
@@ -81,6 +102,11 @@
|
|
|
81
102
|
"docstring": "",
|
|
82
103
|
"path": "src/components/mds-accordion-item/meta/event-detail.ts"
|
|
83
104
|
},
|
|
105
|
+
"src/components/mds-accordion-timer/meta/event-detail.ts::MdsAccordionTimerEventDetail": {
|
|
106
|
+
"declaration": "export interface MdsAccordionTimerEventDetail {\n index: number;\n}",
|
|
107
|
+
"docstring": "",
|
|
108
|
+
"path": "src/components/mds-accordion-timer/meta/event-detail.ts"
|
|
109
|
+
},
|
|
84
110
|
"src/components/mds-accordion-timer-item/meta/event-detail.ts::MdsAccordionTimerItemEventDetail": {
|
|
85
111
|
"declaration": "export interface MdsAccordionTimerItemEventDetail {\n selected: boolean;\n uuid: number;\n}",
|
|
86
112
|
"docstring": "",
|
|
@@ -167,7 +193,7 @@
|
|
|
167
193
|
"path": "src/type/button.ts"
|
|
168
194
|
},
|
|
169
195
|
"src/type/button.ts::ButtonVariantType": {
|
|
170
|
-
"declaration": "export type ButtonVariantType =\n | 'primary'\n | 'dark'\n | 'light'\n | 'error'\n | 'info'\n | 'success'\n | 'warning'",
|
|
196
|
+
"declaration": "export type ButtonVariantType =\n | 'primary'\n | 'secondary'\n | 'dark'\n | 'light'\n | 'error'\n | 'info'\n | 'success'\n | 'warning'",
|
|
171
197
|
"docstring": "",
|
|
172
198
|
"path": "src/type/button.ts"
|
|
173
199
|
},
|
|
@@ -181,6 +207,11 @@
|
|
|
181
207
|
"docstring": "",
|
|
182
208
|
"path": "src/type/button.ts"
|
|
183
209
|
},
|
|
210
|
+
"src/type/variant.ts::ChipVariantType": {
|
|
211
|
+
"declaration": "export type ChipVariantType =\n | 'primary'\n | 'secondary'\n | 'dark'\n | 'error'\n | 'info'\n | 'success'\n | 'warning'",
|
|
212
|
+
"docstring": "",
|
|
213
|
+
"path": "src/type/variant.ts"
|
|
214
|
+
},
|
|
184
215
|
"src/components/mds-chip/meta/interface.ts::MdsChipEvent": {
|
|
185
216
|
"declaration": "interface MdsChipEvent {\n event: Event\n element: HTMLMdsChipElement\n}",
|
|
186
217
|
"docstring": "",
|
|
@@ -222,7 +253,7 @@
|
|
|
222
253
|
"path": "src/type/text.ts"
|
|
223
254
|
},
|
|
224
255
|
"src/components/mds-file-preview/meta/event-detail.ts::MdsFilePreviewEventDetail": {
|
|
225
|
-
"declaration": "export interface MdsFilePreviewEventDetail {\n extension: string\n filename: string\n target:
|
|
256
|
+
"declaration": "export interface MdsFilePreviewEventDetail {\n extension: string\n filename: string\n target: HTMLMdsFilePreviewElement\n}",
|
|
226
257
|
"docstring": "",
|
|
227
258
|
"path": "src/components/mds-file-preview/meta/event-detail.ts"
|
|
228
259
|
},
|
|
@@ -236,10 +267,15 @@
|
|
|
236
267
|
"docstring": "",
|
|
237
268
|
"path": "src/components/mds-filter-item/meta/event-detail.ts"
|
|
238
269
|
},
|
|
239
|
-
"src/
|
|
240
|
-
"declaration": "export type
|
|
270
|
+
"src/type/header-bar.ts::HeaderBarMenuType": {
|
|
271
|
+
"declaration": "export type HeaderBarMenuType =\n | 'all'\n | 'desktop'\n | 'mobile'\n | 'none'",
|
|
272
|
+
"docstring": "",
|
|
273
|
+
"path": "src/type/header-bar.ts"
|
|
274
|
+
},
|
|
275
|
+
"src/type/header-bar.ts::HeaderBarNavType": {
|
|
276
|
+
"declaration": "export type HeaderBarNavType =\n | 'all'\n | 'desktop'\n | 'mobile'\n | 'none'",
|
|
241
277
|
"docstring": "",
|
|
242
|
-
"path": "src/
|
|
278
|
+
"path": "src/type/header-bar.ts"
|
|
243
279
|
},
|
|
244
280
|
"src/components/mds-header/meta/event-detail.ts::MdsHeaderEventDetail": {
|
|
245
281
|
"declaration": "export interface MdsHeaderEventDetail {\n bar: HTMLMdsHeaderBarElement\n}",
|
|
@@ -277,7 +313,7 @@
|
|
|
277
313
|
"path": "src/components/mds-img/meta/event-detail.ts"
|
|
278
314
|
},
|
|
279
315
|
"src/type/autocomplete.ts::AutocompleteType": {
|
|
280
|
-
"declaration": "export type AutocompleteType =\n | 'additional-name'\n | 'address'\n | 'address-level1'\n | 'address-level2'\n | 'address-level3'\n | 'address-level4'\n | 'address-line1'\n | 'address-line2'\n | 'address-line3'\n | 'bday'\n | 'bday-day'\n | 'bday-month'\n | 'bday-year'\n | 'cc-additional-name'\n | 'cc-csc'\n | 'cc-exp'\n | 'cc-exp-month'\n | 'cc-exp-year'\n | 'cc-family-name'\n | 'cc-
|
|
316
|
+
"declaration": "export type AutocompleteType =\n | 'additional-name'\n | 'address'\n | 'address-level1'\n | 'address-level2'\n | 'address-level3'\n | 'address-level4'\n | 'address-line1'\n | 'address-line2'\n | 'address-line3'\n | 'bday'\n | 'bday-day'\n | 'bday-month'\n | 'bday-year'\n | 'cc-additional-name'\n | 'cc-csc'\n | 'cc-exp'\n | 'cc-exp-month'\n | 'cc-exp-year'\n | 'cc-family-name'\n | 'cc-given-name'\n | 'cc-name'\n | 'cc-number'\n | 'cc-type'\n | 'country'\n | 'country-name'\n | 'current-password'\n | 'email'\n | 'family-name'\n | 'given-name'\n | 'honorific-prefix'\n | 'honorific-suffix'\n | 'impp'\n | 'language'\n | 'name'\n | 'new-password'\n | 'nickname'\n | 'off'\n | 'on'\n | 'one-time-code'\n | 'organization'\n | 'organization-title'\n | 'photo'\n | 'postal-code'\n | 'sex'\n | 'street-address'\n | 'tel'\n | 'tel-area-code'\n | 'tel-country-code'\n | 'tel-extension'\n | 'tel-local'\n | 'tel-national'\n | 'transaction-amount'\n | 'transaction-currency'\n | 'url'\n | 'username'",
|
|
281
317
|
"docstring": "",
|
|
282
318
|
"path": "src/type/autocomplete.ts"
|
|
283
319
|
},
|
|
@@ -306,10 +342,10 @@
|
|
|
306
342
|
"docstring": "",
|
|
307
343
|
"path": "src/type/typography.ts"
|
|
308
344
|
},
|
|
309
|
-
"src/
|
|
310
|
-
"declaration": "export interface MdsInputEventDetail {\n value?: string\n}",
|
|
345
|
+
"src/type/input.ts::MdsInputEventDetail": {
|
|
346
|
+
"declaration": "export interface MdsInputEventDetail {\n value?: File | string | FormData | null\n}",
|
|
311
347
|
"docstring": "",
|
|
312
|
-
"path": "src/
|
|
348
|
+
"path": "src/type/input.ts"
|
|
313
349
|
},
|
|
314
350
|
"src/components/mds-input-field/meta/types.ts::InputFieldType": {
|
|
315
351
|
"declaration": "export type InputFieldType =\n | 'date'\n | 'email'\n | 'number'\n | 'password'\n | 'search'\n | 'tel'\n | 'text'\n | 'textarea'\n | 'time'\n | 'url'\n | 'cc'\n | 'cf'\n | 'isbn'\n | 'piva'",
|
|
@@ -326,11 +362,6 @@
|
|
|
326
362
|
"docstring": "",
|
|
327
363
|
"path": "src/components/mds-input-field/meta/validators.ts"
|
|
328
364
|
},
|
|
329
|
-
"src/interface/input-value.ts::InputValue": {
|
|
330
|
-
"declaration": "export interface InputValue {\n value: InputValueType\n}",
|
|
331
|
-
"docstring": "",
|
|
332
|
-
"path": "src/interface/input-value.ts"
|
|
333
|
-
},
|
|
334
365
|
"src/components/mds-input-switch/meta/types.ts::InputSwitchSizeType": {
|
|
335
366
|
"declaration": "export type InputSwitchSizeType =\n | 'sm'\n | 'md'\n | 'lg'",
|
|
336
367
|
"docstring": "",
|
|
@@ -377,7 +408,12 @@
|
|
|
377
408
|
"path": "src/type/typography.ts"
|
|
378
409
|
},
|
|
379
410
|
"src/components/mds-modal/meta/types.ts::ModalPositionType": {
|
|
380
|
-
"declaration": "export type ModalPositionType =\n | 'bottom'\n | 'center'\n | 'left'\n | 'right'\n | 'top'",
|
|
411
|
+
"declaration": "export type ModalPositionType =\n | 'bottom'\n | 'bottom-left'\n | 'bottom-right'\n | 'center'\n | 'left'\n | 'right'\n | 'top'\n | 'top-left'\n | 'top-right'",
|
|
412
|
+
"docstring": "",
|
|
413
|
+
"path": "src/components/mds-modal/meta/types.ts"
|
|
414
|
+
},
|
|
415
|
+
"src/components/mds-modal/meta/types.ts::ModalAnimationStateType": {
|
|
416
|
+
"declaration": "export type ModalAnimationStateType =\n | 'intro'\n | 'none'\n | 'outro'",
|
|
381
417
|
"docstring": "",
|
|
382
418
|
"path": "src/components/mds-modal/meta/types.ts"
|
|
383
419
|
},
|
|
@@ -416,21 +452,11 @@
|
|
|
416
452
|
"docstring": "",
|
|
417
453
|
"path": "src/components/mds-pref-contrast/meta/types.ts"
|
|
418
454
|
},
|
|
419
|
-
"src/type/language.ts::PrefLanguageType": {
|
|
420
|
-
"declaration": "export type PrefLanguageType =\n | 'auto'\n | `${Lowercase<string>}${Lowercase<string>}`\n | `${Lowercase<string>}${Lowercase<string>}${Lowercase<string>}`",
|
|
421
|
-
"docstring": "",
|
|
422
|
-
"path": "src/type/language.ts"
|
|
423
|
-
},
|
|
424
455
|
"src/event-detail/language.ts::MdsPrefLanguageEventDetail": {
|
|
425
|
-
"declaration": "export interface MdsPrefLanguageEventDetail {\n language?:
|
|
456
|
+
"declaration": "export interface MdsPrefLanguageEventDetail {\n /* A string representing the language version as defined in {@link https://datatracker.ietf.org/doc/html/rfc5646 RFC 5646: Tags for Identifying Languages (also known as BCP 47)}.\n *\n * `Examples of valid language codes include \"en\", \"en-US\", \"fr\", \"fr-FR\", \"es-ES\", etc.`\n */\n language?: string\n}",
|
|
426
457
|
"docstring": "",
|
|
427
458
|
"path": "src/event-detail/language.ts"
|
|
428
459
|
},
|
|
429
|
-
"src/type/language.ts::LanguageType": {
|
|
430
|
-
"declaration": "export type LanguageType =\n | `${Lowercase<string>}${Lowercase<string>}`\n | `${Lowercase<string>}${Lowercase<string>}${Lowercase<string>}`",
|
|
431
|
-
"docstring": "",
|
|
432
|
-
"path": "src/type/language.ts"
|
|
433
|
-
},
|
|
434
460
|
"src/components/mds-pref-theme/meta/types.ts::ThemeModeType": {
|
|
435
461
|
"declaration": "export type ThemeModeType =\n | 'light'\n | 'dark'\n | 'system'",
|
|
436
462
|
"docstring": "",
|
|
@@ -471,6 +497,11 @@
|
|
|
471
497
|
"docstring": "",
|
|
472
498
|
"path": "src/components/mds-push-notification/meta/event-detail.ts"
|
|
473
499
|
},
|
|
500
|
+
"src/type/text.ts::TypographyHeadingTagType": {
|
|
501
|
+
"declaration": "export type TypographyHeadingTagType =\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'",
|
|
502
|
+
"docstring": "",
|
|
503
|
+
"path": "src/type/text.ts"
|
|
504
|
+
},
|
|
474
505
|
"src/components/mds-stepper-bar/meta/event-detail.ts::MdsStepperBarEventDetail": {
|
|
475
506
|
"declaration": "export interface MdsStepperBarEventDetail {\n step: number\n value: string\n}",
|
|
476
507
|
"docstring": "",
|
|
@@ -502,7 +533,7 @@
|
|
|
502
533
|
"path": "src/components/mds-tab-item/meta/event-detail.ts"
|
|
503
534
|
},
|
|
504
535
|
"src/components/mds-table-header-cell/meta/types.ts::SortDirectionType": {
|
|
505
|
-
"declaration": "export type SortDirectionType =\n | '
|
|
536
|
+
"declaration": "export type SortDirectionType =\n | 'ascending'\n | 'descending'\n | 'none'",
|
|
506
537
|
"docstring": "",
|
|
507
538
|
"path": "src/components/mds-table-header-cell/meta/types.ts"
|
|
508
539
|
},
|
|
@@ -511,10 +542,10 @@
|
|
|
511
542
|
"docstring": "",
|
|
512
543
|
"path": "src/components/mds-text/meta/types.ts"
|
|
513
544
|
},
|
|
514
|
-
"src/
|
|
545
|
+
"src/type/text.ts::TypographyTagType": {
|
|
515
546
|
"declaration": "export type TypographyTagType =\n | 'abbr'\n | 'address'\n | 'article'\n | 'b'\n | 'bdo'\n | 'blockquote'\n | 'cite'\n | 'code'\n | 'dd'\n | 'del'\n | 'details'\n | 'dfn'\n | 'div'\n | 'dl'\n | 'dt'\n | 'em'\n | 'figcaption'\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'\n | 'i'\n | 'ins'\n | 'kbd'\n | 'label'\n | 'legend'\n | 'li'\n | 'mark'\n | 'ol'\n | 'p'\n | 'pre'\n | 'q'\n | 'rb'\n | 'rt'\n | 'ruby'\n | 's'\n | 'samp'\n | 'small'\n | 'span'\n | 'strong'\n | 'sub'\n | 'summary'\n | 'sup'\n | 'time'\n | 'u'\n | 'ul'\n | 'var'",
|
|
516
547
|
"docstring": "",
|
|
517
|
-
"path": "src/
|
|
548
|
+
"path": "src/type/text.ts"
|
|
518
549
|
},
|
|
519
550
|
"src/type/variant.ts::ThemeLuminanceVariantType": {
|
|
520
551
|
"declaration": "export type ThemeLuminanceVariantType =\n | 'dark'\n | 'light'",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maggioli-design-system/mds-table-row",
|
|
3
|
-
"version": "4.
|
|
4
|
-
"description": "mds-table-row is a web-component from Magma Design System, built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the
|
|
3
|
+
"version": "4.8.0",
|
|
4
|
+
"description": "mds-table-row is a web-component from Magma Design System, built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the JavaScript framework you are using.",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"es2015": "dist/esm/index.mjs",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"prepublishOnly": "npm run build"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@maggioli-design-system/mds-table-cell": "4.7.
|
|
27
|
-
"@maggioli-design-system/styles": "15.
|
|
28
|
-
"@stencil/core": "4.
|
|
26
|
+
"@maggioli-design-system/mds-table-cell": "4.7.2",
|
|
27
|
+
"@maggioli-design-system/styles": "15.5.0",
|
|
28
|
+
"@stencil/core": "4.22.2"
|
|
29
29
|
},
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"author": {
|
package/readme.md
CHANGED
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
This is a web-component from Maggioli Design System [Magma](https://magma.maggiolicloud.it), built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the
|
|
5
|
+
This is a web-component from Maggioli Design System [Magma](https://magma.maggiolicloud.it), built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the JavaScript framework you are using.
|
|
6
6
|
|
|
7
7
|
<!-- Auto Generated Below -->
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
## Properties
|
|
11
11
|
|
|
12
|
-
| Property
|
|
13
|
-
|
|
|
14
|
-
| `interactive`
|
|
12
|
+
| Property | Attribute | Description | Type | Default |
|
|
13
|
+
| ---------------- | ----------------- | ----------- | --------- | ----------- |
|
|
14
|
+
| `interactive` | `interactive` | | `boolean` | `undefined` |
|
|
15
|
+
| `overlayActions` | `overlay-actions` | | `boolean` | `undefined` |
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
## Slots
|
package/src/common/aria.ts
CHANGED
|
@@ -20,6 +20,24 @@ const setAttributeIfEmpty = (element: HTMLElement, attribute: string, value: str
|
|
|
20
20
|
return value
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
const removeAttributesIf = (element: HTMLElement, attribute: string, valueCheck: string = 'true', cleanAttributes: string | string[]): boolean => {
|
|
24
|
+
if (ifAttribute(element, attribute, valueCheck)) {
|
|
25
|
+
const attributesList = Array.isArray(cleanAttributes) ? cleanAttributes : [cleanAttributes]
|
|
26
|
+
attributesList.forEach(attributeToRemove => {
|
|
27
|
+
element.removeAttribute(attributeToRemove)
|
|
28
|
+
})
|
|
29
|
+
return true
|
|
30
|
+
}
|
|
31
|
+
return false
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const ifAttribute = (element: HTMLElement, attribute: string, valueCheck: string = 'true'): boolean => {
|
|
35
|
+
if (element.hasAttribute(attribute) && element.getAttribute(attribute) === valueCheck) {
|
|
36
|
+
return true
|
|
37
|
+
}
|
|
38
|
+
return false
|
|
39
|
+
}
|
|
40
|
+
|
|
23
41
|
const hashValue = (value: string): string => `${value}-${hash(value)}`
|
|
24
42
|
|
|
25
43
|
const hashRandomValue = (value?: string): string => {
|
|
@@ -32,8 +50,10 @@ const hashRandomValue = (value?: string): string => {
|
|
|
32
50
|
}
|
|
33
51
|
|
|
34
52
|
export {
|
|
35
|
-
unslugName,
|
|
36
|
-
setAttributeIfEmpty,
|
|
37
53
|
hashRandomValue,
|
|
38
54
|
hashValue,
|
|
55
|
+
removeAttributesIf,
|
|
56
|
+
setAttributeIfEmpty,
|
|
57
|
+
ifAttribute,
|
|
58
|
+
unslugName,
|
|
39
59
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const isMobileDevice = (): boolean => {
|
|
2
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3
|
+
const userAgent = navigator.userAgent || navigator.vendor || (window as any).opera
|
|
4
|
+
return /android|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(userAgent)
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
isMobileDevice,
|
|
9
|
+
}
|
package/src/common/file.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { fileExtensionsDictionary, ExtensionInfo } from '@dictionary/file-extensions'
|
|
2
2
|
import { fileFormatsVariant } from '@type/variant-file-format'
|
|
3
|
+
import { ThemeFullVariantType } from '@type/variant'
|
|
3
4
|
|
|
4
5
|
interface FileFormatsVariants {
|
|
5
|
-
color: string
|
|
6
6
|
icon: string
|
|
7
|
-
|
|
8
|
-
variant: string
|
|
7
|
+
variant: ThemeFullVariantType
|
|
9
8
|
}
|
|
10
9
|
|
|
11
10
|
const sanitizeFilename = (filename: string, error: string = 'Attribute "filename" is undefined.') => {
|
|
@@ -36,14 +36,14 @@ export class KeyboardManager {
|
|
|
36
36
|
|
|
37
37
|
attachEscapeBehavior = (callback: () => void): void => {
|
|
38
38
|
this.escapeCallback = callback
|
|
39
|
-
if (window !== undefined) {
|
|
39
|
+
if (typeof window !== 'undefined') {
|
|
40
40
|
window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this))
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
detachEscapeBehavior = (): void => {
|
|
45
45
|
this.escapeCallback = () => { return }
|
|
46
|
-
if (window !== undefined) {
|
|
46
|
+
if (typeof window !== 'undefined') {
|
|
47
47
|
window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this))
|
|
48
48
|
}
|
|
49
49
|
}
|
package/src/common/locale.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { render } from 'mustache'
|
|
2
2
|
|
|
3
3
|
type LocaleConfig = {
|
|
4
4
|
el?: Record<string, string | string[]>
|
|
@@ -12,6 +12,7 @@ export class Locale {
|
|
|
12
12
|
language: string
|
|
13
13
|
config: LocaleConfig
|
|
14
14
|
closestElement:HTMLElement
|
|
15
|
+
element: HTMLElement
|
|
15
16
|
|
|
16
17
|
constructor (configData?: LocaleConfig) {
|
|
17
18
|
if (configData) {
|
|
@@ -23,8 +24,9 @@ export class Locale {
|
|
|
23
24
|
this.config = configData
|
|
24
25
|
}
|
|
25
26
|
|
|
26
|
-
lang = (
|
|
27
|
-
this.
|
|
27
|
+
lang = (el: HTMLElement): string => {
|
|
28
|
+
this.element = el
|
|
29
|
+
this.closestElement = this.element.closest('[lang]') as HTMLElement
|
|
28
30
|
|
|
29
31
|
if (this.closestElement) {
|
|
30
32
|
if (this.closestElement.lang) {
|
|
@@ -37,11 +39,24 @@ export class Locale {
|
|
|
37
39
|
return this.language
|
|
38
40
|
}
|
|
39
41
|
|
|
42
|
+
update = (doc?: Document | ShadowRoot): void => {
|
|
43
|
+
const context = doc ?? this.element.shadowRoot
|
|
44
|
+
context && context.querySelectorAll('*').forEach(el => {
|
|
45
|
+
if (el.tagName.toLowerCase().startsWith('mds-')) {
|
|
46
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
47
|
+
if (el && 'updateLang' in el) {
|
|
48
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
49
|
+
(el as any).updateLang()
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
}
|
|
54
|
+
|
|
40
55
|
private pluralize = (tag: string | string[], context: Record<string, string | number>): string => {
|
|
41
56
|
|
|
42
57
|
const languagePhrase: string | string[] = this.config[this.language] ? this.config[this.language][tag] : this.config[this.rollbackLanguage][tag]
|
|
43
58
|
const phrases: string[] = []
|
|
44
|
-
|
|
59
|
+
|
|
45
60
|
if (Array.isArray(languagePhrase)) {
|
|
46
61
|
phrases.push(languagePhrase[0])
|
|
47
62
|
phrases.push(languagePhrase[1])
|
|
@@ -63,8 +78,7 @@ export class Locale {
|
|
|
63
78
|
}
|
|
64
79
|
}
|
|
65
80
|
|
|
66
|
-
|
|
67
|
-
return template(context)
|
|
81
|
+
return render(translatePhrase, context)
|
|
68
82
|
}
|
|
69
83
|
|
|
70
84
|
get = (tag: string | string[], context?: Record<string, string | number>): string => {
|
package/src/common/unit.ts
CHANGED
|
@@ -2,24 +2,19 @@
|
|
|
2
2
|
variables:
|
|
3
3
|
COMPONENT: mds-table-row
|
|
4
4
|
|
|
5
|
-
# ISOLATE
|
|
6
|
-
table-row-isolate:
|
|
7
|
-
extends: [.base-isolate, .base-table-row]
|
|
8
|
-
dependencies: [base-stencil-build]
|
|
9
|
-
|
|
10
5
|
# TEST
|
|
11
6
|
table-row-publish-test:
|
|
12
7
|
extends: [.base-stencil-publish-test, .base-table-row]
|
|
13
|
-
dependencies: [base-stencil-build,
|
|
8
|
+
dependencies: [base-stencil-build, base-isolate]
|
|
14
9
|
|
|
15
10
|
# PUBLISH
|
|
16
11
|
table-row-publish:
|
|
17
12
|
extends: [.base-stencil-publish, .base-table-row]
|
|
18
|
-
dependencies: [base-stencil-build,
|
|
19
|
-
needs: [base-stencil-build,
|
|
13
|
+
dependencies: [base-stencil-build, base-isolate]
|
|
14
|
+
needs: [base-stencil-build, base-isolate, table-row-publish-test]
|
|
20
15
|
|
|
21
16
|
# INSTALL TEST
|
|
22
17
|
table-row-install-test:
|
|
23
18
|
extends: [.base-stencil-install-test, .base-table-row]
|
|
24
|
-
dependencies: [base-stencil-build,
|
|
25
|
-
needs: [base-stencil-build,
|
|
19
|
+
dependencies: [base-stencil-build, base-isolate]
|
|
20
|
+
needs: [base-stencil-build, base-isolate, table-row-publish]
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
--mds-table-row-color-hover: var(--mds-table-color-hover, theme('colors.tone-neutral-02'));
|
|
6
6
|
--mds-table-row-color: var(--mds-table-color, theme('colors.tone-neutral-03'));
|
|
7
|
+
--mds-table-row-actions-gap: var(--mds-table-actions-gap, theme('spacing.400'));
|
|
8
|
+
|
|
7
9
|
|
|
8
10
|
@apply
|
|
9
11
|
duration-200
|
|
@@ -11,10 +13,68 @@
|
|
|
11
13
|
|
|
12
14
|
color: var(--mds-table-row-color);
|
|
13
15
|
display: table-row;
|
|
16
|
+
position: relative;
|
|
14
17
|
transition-property: color;
|
|
15
18
|
|
|
16
19
|
}
|
|
17
20
|
|
|
21
|
+
.actions-wrapper {
|
|
22
|
+
inset: 0;
|
|
23
|
+
display: flex;
|
|
24
|
+
justify-content: end;
|
|
25
|
+
pointer-events: none;
|
|
26
|
+
position: absolute;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.actions {
|
|
30
|
+
align-items: center;
|
|
31
|
+
background-color: var(--mds-table-cell-background);
|
|
32
|
+
border-bottom-color: transparent;
|
|
33
|
+
border-bottom-style: solid;
|
|
34
|
+
border-bottom-width: var(--mds-table-border-width);
|
|
35
|
+
border-top-color: var(--mds-table-border-color);
|
|
36
|
+
border-top-style: solid;
|
|
37
|
+
border-top-width: var(--mds-table-border-width);
|
|
38
|
+
box-sizing: border-box;
|
|
39
|
+
display: inline-flex;
|
|
40
|
+
gap: var(--mds-table-row-actions-gap);
|
|
41
|
+
height: 100%;
|
|
42
|
+
margin-top: calc(var(--mds-table-border-width) * -1);
|
|
43
|
+
padding: var(--mds-table-cell-padding);
|
|
44
|
+
pointer-events: auto;
|
|
45
|
+
position: sticky;
|
|
46
|
+
right: 0;
|
|
47
|
+
transform: translateX(100%);
|
|
48
|
+
transition-duration: theme('transitionDuration.500');
|
|
49
|
+
transition-property: transform, background-color;
|
|
50
|
+
transition-timing-function: theme('transitionTimingFunction.out-expo');
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.actions-wrapper--mobile {
|
|
54
|
+
position: relative;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.actions-wrapper--mobile .actions {
|
|
58
|
+
position: static;
|
|
59
|
+
transform: translateX(0);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:host(:hover) .actions {
|
|
63
|
+
transform: translateX(0);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:host([overlay-actions]:not([overlay-actions="false"])) .actions-wrapper:not(.actions-wrapper--mobile) .actions {
|
|
67
|
+
transform: translateX(100%);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
:host([interactive]:not([interactive="false"])) .actions {
|
|
71
|
+
--mds-table-cell-background: var(--mds-table-body-background);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
:host([interactive]:not([interactive="false"]):hover) .actions {
|
|
75
|
+
--mds-table-cell-background: var(--mds-table-cell-background-hover);
|
|
76
|
+
}
|
|
77
|
+
|
|
18
78
|
:host([sorted][interactive]:not([interactive="false"])) ::slotted(mds-table-cell[sorted]) {
|
|
19
79
|
|
|
20
80
|
--mds-table-cell-background: var(--mds-table-cell-background-hover);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { Component, Host, h, Listen, Prop } from '@stencil/core'
|
|
1
|
+
import { Component, Host, h, Listen, Prop, Element } from '@stencil/core'
|
|
2
|
+
import { isMobileDevice } from '@common/device'
|
|
3
|
+
import clsx from 'clsx'
|
|
2
4
|
|
|
3
5
|
/**
|
|
4
6
|
* @slot default - Put `mds-table-cell` element/s.
|
|
@@ -11,17 +13,33 @@ import { Component, Host, h, Listen, Prop } from '@stencil/core'
|
|
|
11
13
|
})
|
|
12
14
|
export class MdsTableRow {
|
|
13
15
|
|
|
16
|
+
@Element() host: HTMLMdsTableRowElement
|
|
17
|
+
private actions: boolean
|
|
18
|
+
|
|
14
19
|
@Prop({ mutable: true, reflect: true }) interactive: boolean
|
|
15
20
|
|
|
21
|
+
@Prop({ mutable: true, reflect: true }) overlayActions: boolean
|
|
22
|
+
|
|
16
23
|
@Listen('mdsTableInteractiveChange', { target: 'document' })
|
|
17
24
|
tableInteractiveHandler (event: CustomEvent<boolean>): void {
|
|
18
25
|
this.interactive = event.detail
|
|
19
26
|
}
|
|
20
27
|
|
|
28
|
+
componentWillLoad (): void {
|
|
29
|
+
this.actions = this.host.querySelector('[slot="action"]') !== null
|
|
30
|
+
}
|
|
31
|
+
|
|
21
32
|
render () {
|
|
22
33
|
return (
|
|
23
34
|
<Host role="row">
|
|
24
35
|
<slot/>
|
|
36
|
+
{ this.actions
|
|
37
|
+
&& <div class={clsx('actions-wrapper', isMobileDevice() && 'actions-wrapper--mobile')} role="cell">
|
|
38
|
+
<div class="actions">
|
|
39
|
+
<slot name="action"></slot>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
}
|
|
25
43
|
</Host>
|
|
26
44
|
)
|
|
27
45
|
}
|
|
@@ -7,9 +7,10 @@
|
|
|
7
7
|
|
|
8
8
|
## Properties
|
|
9
9
|
|
|
10
|
-
| Property
|
|
11
|
-
|
|
|
12
|
-
| `interactive`
|
|
10
|
+
| Property | Attribute | Description | Type | Default |
|
|
11
|
+
| ---------------- | ----------------- | ----------- | --------- | ----------- |
|
|
12
|
+
| `interactive` | `interactive` | | `boolean` | `undefined` |
|
|
13
|
+
| `overlayActions` | `overlay-actions` | | `boolean` | `undefined` |
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
## Slots
|
package/src/components.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { HTMLStencilElement, JSXBase } from "@stencil/core/internal";
|
|
|
8
8
|
export namespace Components {
|
|
9
9
|
interface MdsTableRow {
|
|
10
10
|
"interactive": boolean;
|
|
11
|
+
"overlayActions": boolean;
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
14
|
declare global {
|
|
@@ -24,6 +25,7 @@ declare global {
|
|
|
24
25
|
declare namespace LocalJSX {
|
|
25
26
|
interface MdsTableRow {
|
|
26
27
|
"interactive"?: boolean;
|
|
28
|
+
"overlayActions"?: boolean;
|
|
27
29
|
}
|
|
28
30
|
interface IntrinsicElements {
|
|
29
31
|
"mds-table-row": MdsTableRow;
|