@maggioli-design-system/mds-table-row 4.5.3 → 4.6.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 (74) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/index-97006570.js +1198 -0
  3. package/dist/cjs/loader.cjs.js +4 -2
  4. package/dist/cjs/mds-table-row.cjs.entry.js +5 -4
  5. package/dist/cjs/mds-table-row.cjs.js +12 -10
  6. package/dist/collection/collection-manifest.json +2 -2
  7. package/dist/collection/common/locale.js +50 -0
  8. package/dist/collection/components/mds-table-row/mds-table-row.css +159 -39
  9. package/dist/collection/components/mds-table-row/mds-table-row.js +1 -1
  10. package/dist/collection/type/preference.js +1 -0
  11. package/dist/collection/type/variant-file-format.js +20 -11
  12. package/dist/components/mds-table-row.js +4 -3
  13. package/dist/documentation.d.ts +34 -0
  14. package/dist/documentation.json +3 -3
  15. package/dist/esm/app-globals-0f993ce5.js +3 -0
  16. package/dist/esm/index-ac4b33c0.js +1171 -0
  17. package/dist/esm/loader.js +5 -3
  18. package/dist/esm/mds-table-row.entry.js +5 -4
  19. package/dist/esm/mds-table-row.js +13 -11
  20. package/dist/esm-es5/app-globals-0f993ce5.js +1 -0
  21. package/dist/esm-es5/index-ac4b33c0.js +1 -0
  22. package/dist/esm-es5/loader.js +1 -1
  23. package/dist/esm-es5/mds-table-row.entry.js +1 -1
  24. package/dist/esm-es5/mds-table-row.js +1 -1
  25. package/dist/mds-table-row/mds-table-row.esm.js +1 -1
  26. package/dist/mds-table-row/mds-table-row.js +1 -1
  27. package/dist/mds-table-row/p-0a6d4960.js +2 -0
  28. package/dist/mds-table-row/p-11e2454f.system.js +1 -0
  29. package/dist/mds-table-row/p-24249845.entry.js +1 -0
  30. package/dist/mds-table-row/p-56ba5cbf.system.js +1 -0
  31. package/dist/mds-table-row/p-778c4fcb.system.entry.js +1 -0
  32. package/dist/mds-table-row/p-bc92b059.system.js +2 -0
  33. package/dist/mds-table-row/p-e1255160.js +1 -0
  34. package/dist/stats.json +45 -33
  35. package/dist/types/common/locale.d.ts +15 -0
  36. package/dist/types/stencil-public-runtime.d.ts +3 -10
  37. package/dist/types/type/preference.d.ts +2 -0
  38. package/documentation.json +43 -23
  39. package/loader/cdn.js +1 -2
  40. package/loader/index.cjs.js +1 -2
  41. package/loader/index.d.ts +3 -0
  42. package/loader/index.es2017.js +1 -2
  43. package/loader/index.js +1 -2
  44. package/package.json +4 -4
  45. package/src/common/locale.ts +66 -0
  46. package/src/components/mds-table-row/css/mds-table-row-pref-animation.css +16 -0
  47. package/src/components/mds-table-row/mds-table-row.css +14 -0
  48. package/src/fixtures/icons.json +18 -0
  49. package/src/fixtures/iconsauce.json +9 -0
  50. package/src/tailwind/components.css +71 -0
  51. package/src/type/preference.ts +10 -0
  52. package/src/type/variant-file-format.ts +20 -11
  53. package/www/build/mds-table-row.esm.js +1 -1
  54. package/www/build/mds-table-row.js +1 -1
  55. package/www/build/p-0a6d4960.js +2 -0
  56. package/www/build/p-11e2454f.system.js +1 -0
  57. package/www/build/p-24249845.entry.js +1 -0
  58. package/www/build/p-56ba5cbf.system.js +1 -0
  59. package/www/build/p-778c4fcb.system.entry.js +1 -0
  60. package/www/build/p-bc92b059.system.js +2 -0
  61. package/www/build/p-e1255160.js +1 -0
  62. package/dist/cjs/index-7b6fb148.js +0 -1644
  63. package/dist/esm/index-9f40909f.js +0 -1617
  64. package/dist/esm-es5/index-9f40909f.js +0 -1
  65. package/dist/mds-table-row/p-24e0f761.system.js +0 -2
  66. package/dist/mds-table-row/p-4e5a0559.js +0 -2
  67. package/dist/mds-table-row/p-65fbbba9.system.js +0 -1
  68. package/dist/mds-table-row/p-ab9fb13e.entry.js +0 -1
  69. package/dist/mds-table-row/p-f8b0aa6b.system.entry.js +0 -1
  70. package/www/build/p-24e0f761.system.js +0 -2
  71. package/www/build/p-4e5a0559.js +0 -2
  72. package/www/build/p-65fbbba9.system.js +0 -1
  73. package/www/build/p-ab9fb13e.entry.js +0 -1
  74. package/www/build/p-f8b0aa6b.system.entry.js +0 -1
@@ -768,6 +768,7 @@ export declare namespace JSXBase {
768
768
  hrefLang?: string;
769
769
  hreflang?: string;
770
770
  media?: string;
771
+ ping?: string;
771
772
  rel?: string;
772
773
  target?: string;
773
774
  referrerPolicy?: ReferrerPolicy;
@@ -794,7 +795,6 @@ export declare namespace JSXBase {
794
795
  cite?: string;
795
796
  }
796
797
  interface ButtonHTMLAttributes<T> extends HTMLAttributes<T> {
797
- autoFocus?: boolean;
798
798
  disabled?: boolean;
799
799
  form?: string;
800
800
  formAction?: string;
@@ -921,8 +921,6 @@ export declare namespace JSXBase {
921
921
  autocapitalize?: string;
922
922
  autoComplete?: string;
923
923
  autocomplete?: string;
924
- autoFocus?: boolean;
925
- autofocus?: boolean | string;
926
924
  capture?: string;
927
925
  checked?: boolean;
928
926
  crossOrigin?: string;
@@ -979,8 +977,6 @@ export declare namespace JSXBase {
979
977
  popoverTarget?: string;
980
978
  }
981
979
  interface KeygenHTMLAttributes<T> extends HTMLAttributes<T> {
982
- autoFocus?: boolean;
983
- autofocus?: boolean | string;
984
980
  challenge?: string;
985
981
  disabled?: boolean;
986
982
  form?: string;
@@ -993,7 +989,6 @@ export declare namespace JSXBase {
993
989
  interface LabelHTMLAttributes<T> extends HTMLAttributes<T> {
994
990
  form?: string;
995
991
  htmlFor?: string;
996
- htmlfor?: string;
997
992
  }
998
993
  interface LiHTMLAttributes<T> extends HTMLAttributes<T> {
999
994
  value?: string | string[] | number;
@@ -1104,7 +1099,6 @@ export declare namespace JSXBase {
1104
1099
  interface OutputHTMLAttributes<T> extends HTMLAttributes<T> {
1105
1100
  form?: string;
1106
1101
  htmlFor?: string;
1107
- htmlfor?: string;
1108
1102
  name?: string;
1109
1103
  }
1110
1104
  interface ParamHTMLAttributes<T> extends HTMLAttributes<T> {
@@ -1129,7 +1123,6 @@ export declare namespace JSXBase {
1129
1123
  type?: string;
1130
1124
  }
1131
1125
  interface SelectHTMLAttributes<T> extends HTMLAttributes<T> {
1132
- autoFocus?: boolean;
1133
1126
  disabled?: boolean;
1134
1127
  form?: string;
1135
1128
  multiple?: boolean;
@@ -1164,8 +1157,6 @@ export declare namespace JSXBase {
1164
1157
  interface TextareaHTMLAttributes<T> extends HTMLAttributes<T> {
1165
1158
  autoComplete?: string;
1166
1159
  autocomplete?: string;
1167
- autoFocus?: boolean;
1168
- autofocus?: boolean | string;
1169
1160
  cols?: number;
1170
1161
  disabled?: boolean;
1171
1162
  form?: string;
@@ -1218,6 +1209,8 @@ export declare namespace JSXBase {
1218
1209
  interface HTMLAttributes<T = HTMLElement> extends DOMAttributes<T> {
1219
1210
  innerHTML?: string;
1220
1211
  accessKey?: string;
1212
+ autoFocus?: boolean;
1213
+ autofocus?: boolean | string;
1221
1214
  class?: string | {
1222
1215
  [className: string]: boolean;
1223
1216
  };
@@ -0,0 +1,2 @@
1
+ export type UIPreferenceType = 'animation' | 'consumption' | 'contrast' | 'theme';
2
+ export type ConsumptionModeType = 'high' | 'medium' | 'low';
@@ -1,9 +1,9 @@
1
1
  {
2
- "timestamp": "2024-04-18T15:04:37",
2
+ "timestamp": "2024-09-05T13:13:09",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
- "version": "4.10.0",
6
- "typescriptVersion": "5.3.3"
5
+ "version": "4.21.0",
6
+ "typescriptVersion": "5.5.3"
7
7
  },
8
8
  "components": [
9
9
  {
@@ -236,26 +236,6 @@
236
236
  "docstring": "",
237
237
  "path": "src/components/mds-filter-item/meta/event-detail.ts"
238
238
  },
239
- "src/components/mds-form/meta/types.ts::CharacterSetType": {
240
- "declaration": "export type CharacterSetType =\n | '8859-1'\n | 'ansi'\n | 'ascii'\n | 'utf-8'",
241
- "docstring": "",
242
- "path": "src/components/mds-form/meta/types.ts"
243
- },
244
- "src/components/mds-form/meta/types.ts::FormAutocompleteType": {
245
- "declaration": "export type FormAutocompleteType =\n | 'off'\n | 'on'",
246
- "docstring": "",
247
- "path": "src/components/mds-form/meta/types.ts"
248
- },
249
- "src/components/mds-form/meta/types.ts::EnctypeType": {
250
- "declaration": "export type EnctypeType =\n | 'application/x-www-form-urlencoded'\n | 'multipart/form-data'\n | 'text/plain'",
251
- "docstring": "",
252
- "path": "src/components/mds-form/meta/types.ts"
253
- },
254
- "src/components/mds-form/meta/types.ts::FormMethodType": {
255
- "declaration": "export type FormMethodType =\n | 'get'\n | 'post'",
256
- "docstring": "",
257
- "path": "src/components/mds-form/meta/types.ts"
258
- },
259
239
  "src/components/mds-header-bar/meta/types.ts::MenuType": {
260
240
  "declaration": "export type MenuType =\n | 'all'\n | 'desktop'\n | 'mobile'\n | 'none'",
261
241
  "docstring": "",
@@ -366,11 +346,26 @@
366
346
  "docstring": "",
367
347
  "path": "src/components/mds-input-switch/meta/event-detail.ts"
368
348
  },
349
+ "src/components/mds-input-tip/meta/types.ts::InputTipPositionType": {
350
+ "declaration": "export type InputTipPositionType =\n | 'top'\n | 'bottom'",
351
+ "docstring": "",
352
+ "path": "src/components/mds-input-tip/meta/types.ts"
353
+ },
354
+ "src/components/mds-input-tip-item/meta/types.ts::InputTipItemVariantType": {
355
+ "declaration": "export type InputTipItemVariantType =\n | 'required'\n | 'required-success'\n | 'disabled'\n | 'readonly'\n | 'text'",
356
+ "docstring": "",
357
+ "path": "src/components/mds-input-tip-item/meta/types.ts"
358
+ },
369
359
  "src/components/mds-input-upload/meta/types.ts::AttachmentSort": {
370
360
  "declaration": "type AttachmentSort =\n 'status' |\n 'date'",
371
361
  "docstring": "",
372
362
  "path": "src/components/mds-input-upload/meta/types.ts"
373
363
  },
364
+ "src/components/mds-input-upload/meta/types.ts::FileError": {
365
+ "declaration": "interface FileError {\n filename: string,\n errorMessage: string,\n}",
366
+ "docstring": "",
367
+ "path": "src/components/mds-input-upload/meta/types.ts"
368
+ },
374
369
  "src/type/typography.ts::TypographyType": {
375
370
  "declaration": "export type TypographyType =\n | 'action'\n | 'caption'\n | 'snippet'\n | 'detail'\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'\n | 'hack'\n | 'label'\n | 'option'\n | 'paragraph'\n | 'tip'",
376
371
  "docstring": "",
@@ -401,6 +396,31 @@
401
396
  "docstring": "",
402
397
  "path": "src/components/mds-paginator/meta/event-detail.ts"
403
398
  },
399
+ "src/components/mds-pref-animation/meta/types.ts::AnimationModeType": {
400
+ "declaration": "export type AnimationModeType =\n | 'reduce'\n | 'no-preference'\n | 'system'",
401
+ "docstring": "",
402
+ "path": "src/components/mds-pref-animation/meta/types.ts"
403
+ },
404
+ "src/type/preference.ts::ConsumptionModeType": {
405
+ "declaration": "export type ConsumptionModeType =\n | 'high'\n | 'medium'\n | 'low'",
406
+ "docstring": "",
407
+ "path": "src/type/preference.ts"
408
+ },
409
+ "src/components/mds-pref-contrast/meta/types.ts::ContrastModeType": {
410
+ "declaration": "export type ContrastModeType =\n | 'more'\n | 'no-preference'\n | 'system'",
411
+ "docstring": "",
412
+ "path": "src/components/mds-pref-contrast/meta/types.ts"
413
+ },
414
+ "src/components/mds-pref-theme/meta/types.ts::ThemeModeType": {
415
+ "declaration": "export type ThemeModeType =\n | 'light'\n | 'dark'\n | 'system'",
416
+ "docstring": "",
417
+ "path": "src/components/mds-pref-theme/meta/types.ts"
418
+ },
419
+ "src/components/mds-pref-theme/meta/types.ts::ThemeTransitionType": {
420
+ "declaration": "export type ThemeTransitionType =\n | 'none'\n | 'flash'\n | 'smooth'",
421
+ "docstring": "",
422
+ "path": "src/components/mds-pref-theme/meta/types.ts"
423
+ },
404
424
  "src/components/mds-price-table-features-cell/meta/types.ts::PriceTableFeaturesCellType": {
405
425
  "declaration": "export type PriceTableFeaturesCellType =\n | 'custom'\n | 'label'\n | 'supported'\n | 'text'\n | 'unsupported'",
406
426
  "docstring": "",
package/loader/cdn.js CHANGED
@@ -1,3 +1,2 @@
1
-
2
1
  module.exports = require('../dist/cjs/loader.cjs.js');
3
- module.exports.applyPolyfills = function() { return Promise.resolve() };
2
+ module.exports.applyPolyfills = function() { return Promise.resolve() };
@@ -1,3 +1,2 @@
1
-
2
1
  module.exports = require('../dist/cjs/loader.cjs.js');
3
- module.exports.applyPolyfills = function() { return Promise.resolve() };
2
+ module.exports.applyPolyfills = function() { return Promise.resolve() };
package/loader/index.d.ts CHANGED
@@ -9,6 +9,9 @@ export interface CustomElementsDefineOptions {
9
9
  rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
10
10
  }
11
11
  export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): void;
12
+ /**
13
+ * @deprecated
14
+ */
12
15
  export declare function applyPolyfills(): Promise<void>;
13
16
 
14
17
  /**
@@ -1,3 +1,2 @@
1
-
2
1
  export * from '../dist/esm/polyfills/index.js';
3
- export * from '../dist/esm/loader.js';
2
+ export * from '../dist/esm/loader.js';
package/loader/index.js CHANGED
@@ -1,4 +1,3 @@
1
-
2
1
  (function(){if("undefined"!==typeof window&&void 0!==window.Reflect&&void 0!==window.customElements){var a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)};HTMLElement.prototype=a.prototype;HTMLElement.prototype.constructor=HTMLElement;Object.setPrototypeOf(HTMLElement,a)}})();
3
2
  export * from '../dist/esm/polyfills/index.js';
4
- export * from '../dist/esm-es5/loader.js';
3
+ export * from '../dist/esm-es5/loader.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maggioli-design-system/mds-table-row",
3
- "version": "4.5.3",
3
+ "version": "4.6.0",
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 JavaScirpt framework you are using.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -23,9 +23,9 @@
23
23
  "prepublishOnly": "npm run build"
24
24
  },
25
25
  "dependencies": {
26
- "@maggioli-design-system/mds-table-cell": "4.5.1",
27
- "@maggioli-design-system/styles": "14.3.2",
28
- "@stencil/core": "4.10.0"
26
+ "@maggioli-design-system/mds-table-cell": "4.6.0",
27
+ "@maggioli-design-system/styles": "15.3.0",
28
+ "@stencil/core": "4.21.0"
29
29
  },
30
30
  "license": "MIT",
31
31
  "author": {
@@ -0,0 +1,66 @@
1
+ import Handlebars from 'handlebars'
2
+
3
+ type LocaleConfig = {
4
+ it?: Record<string, string | string[]>
5
+ en?: Record<string, string | string[]>
6
+ gr?: Record<string, string | string[]>
7
+ }
8
+
9
+ export class Locale {
10
+ defaultLanguage: string = 'en'
11
+ language: string
12
+ config: LocaleConfig
13
+
14
+ constructor (configData: LocaleConfig) {
15
+ this.config = configData
16
+ }
17
+
18
+ lang = (element: HTMLElement): void => {
19
+ const closestElement:HTMLElement = element.closest('[lang]') as HTMLElement
20
+ if (closestElement) {
21
+ if (closestElement.lang) {
22
+ this.language = closestElement.lang
23
+ return
24
+ }
25
+ }
26
+
27
+ this.language = this.defaultLanguage
28
+ }
29
+
30
+ private pluralize = (tag: string | string[], context: Record<string, string | number>): string => {
31
+
32
+ const languagePhrase: string | string[] = this.config[this.language][tag] ?? this.config[this.defaultLanguage][tag]
33
+ const phrases: string[] = []
34
+
35
+ if (Array.isArray(languagePhrase)) {
36
+ phrases.push(languagePhrase[0])
37
+ phrases.push(languagePhrase[1])
38
+ } else {
39
+ phrases.push(languagePhrase)
40
+ phrases.push(languagePhrase)
41
+ }
42
+
43
+ const [ defaultPhrase ] = phrases
44
+ let translatePhrase: string = defaultPhrase
45
+
46
+ const keys = Object.keys(context)
47
+ if (keys.length > 0) {
48
+ const [firstKey] = keys
49
+ if (typeof context[firstKey] === 'number') {
50
+ if (context[firstKey] !== 1) {
51
+ translatePhrase = phrases[1]
52
+ }
53
+ }
54
+ }
55
+
56
+ const template = Handlebars.compile(translatePhrase)
57
+ return template(context)
58
+ }
59
+
60
+ get = (tag: string | string[], context?: Record<string, string | number>): string => {
61
+ if (context) {
62
+ return this.pluralize(tag, context)
63
+ }
64
+ return this.config[this.language][tag] ?? this.config[this.defaultLanguage][tag]
65
+ }
66
+ }
@@ -0,0 +1,16 @@
1
+ @tailwind utilities;
2
+
3
+ @container style(--magma-pref-animation: reduce) {
4
+ :host {
5
+ transition-duration: 0s;
6
+ }
7
+ }
8
+
9
+ @container style(--magma-pref-animation: system) {
10
+
11
+ @media (prefers-reduced-motion) {
12
+ :host {
13
+ transition-duration: 0s;
14
+ }
15
+ }
16
+ }
@@ -1,10 +1,24 @@
1
1
  @tailwind utilities;
2
2
 
3
3
  :host {
4
+
5
+ --mds-table-row-color-hover: var(--mds-table-color-hover, theme('colors.tone-neutral-02'));
6
+ --mds-table-row-color: var(--mds-table-color, theme('colors.tone-neutral-03'));
7
+
8
+ @apply
9
+ duration-200
10
+ ease-out;
11
+
12
+ color: var(--mds-table-row-color);
4
13
  display: table-row;
14
+ transition-property: color;
15
+
5
16
  }
6
17
 
7
18
  :host( [interactive]:hover ) {
8
19
 
9
20
  --mds-table-cell-background: var(--mds-table-cell-background-hover, theme('colors.tone-neutral'));
21
+ --mds-table-row-color: var(--mds-table-row-color-hover);
10
22
  }
23
+
24
+ @import './css/mds-table-row-pref-animation.css';
@@ -34,6 +34,7 @@
34
34
  "mgg/address-book-on",
35
35
  "mgg/adv-denied",
36
36
  "mgg/alerts-pagopa",
37
+ "mgg/ansc",
37
38
  "mgg/area-edificabile",
38
39
  "mgg/area-weather",
39
40
  "mgg/assignments-accept-rejection",
@@ -61,6 +62,9 @@
61
62
  "mgg/citizenship",
62
63
  "mgg/city-bin",
63
64
  "mgg/classic-permission",
65
+ "mgg/consumption-high",
66
+ "mgg/consumption-low",
67
+ "mgg/consumption-medium",
64
68
  "mgg/copy-paste",
65
69
  "mgg/d-instrumental-buildings",
66
70
  "mgg/data-analytics-alt",
@@ -113,6 +117,8 @@
113
117
  "mgg/fullscreen-on-alt",
114
118
  "mgg/google-check-small",
115
119
  "mgg/google-experiment",
120
+ "mgg/google-face-retouching-off",
121
+ "mgg/google-hub",
116
122
  "mgg/google-keyboard-double-arrow-down",
117
123
  "mgg/google-keyboard-double-arrow-up",
118
124
  "mgg/google-place-item",
@@ -159,6 +165,7 @@
159
165
  "mgg/national-document-off",
160
166
  "mgg/not-instrumental-d-buildings",
161
167
  "mgg/not-sent-yet",
168
+ "mgg/office-off",
162
169
  "mgg/order-return-down-left-to-right",
163
170
  "mgg/order-return-down-left-to-up",
164
171
  "mgg/order-return-down-right-to-left",
@@ -197,6 +204,7 @@
197
204
  "mgg/relevance",
198
205
  "mgg/reporting-abuse",
199
206
  "mgg/residency-permit",
207
+ "mgg/robot",
200
208
  "mgg/roles-permission",
201
209
  "mgg/rubber-stamp",
202
210
  "mgg/rurale",
@@ -256,6 +264,7 @@
256
264
  "mgg/view-chart-gantt",
257
265
  "mgg/view-side-by-side",
258
266
  "mgg/warning-superscript",
267
+ "mgg/web-app-ansc",
259
268
  "mgg/work-book",
260
269
  "mi/baseline/account-balance",
261
270
  "mi/baseline/account-balance-wallet",
@@ -263,21 +272,26 @@
263
272
  "mi/baseline/add-circle",
264
273
  "mi/baseline/adobe",
265
274
  "mi/baseline/agriculture",
275
+ "mi/baseline/animation",
266
276
  "mi/baseline/arrow-back",
267
277
  "mi/baseline/arrow-forward",
268
278
  "mi/baseline/attach-file",
269
279
  "mi/baseline/attachment",
270
280
  "mi/baseline/audiotrack",
281
+ "mi/baseline/auto-awesome",
271
282
  "mi/baseline/badge",
272
283
  "mi/baseline/book",
273
284
  "mi/baseline/border-all",
285
+ "mi/baseline/broken-image",
274
286
  "mi/baseline/cancel",
275
287
  "mi/baseline/category",
276
288
  "mi/baseline/check-box",
277
289
  "mi/baseline/check-box-outline-blank",
278
290
  "mi/baseline/check-circle",
279
291
  "mi/baseline/close",
292
+ "mi/baseline/contrast",
280
293
  "mi/baseline/css",
294
+ "mi/baseline/dark-mode",
281
295
  "mi/baseline/description",
282
296
  "mi/baseline/done",
283
297
  "mi/baseline/downhill-skiing",
@@ -294,6 +308,7 @@
294
308
  "mi/baseline/insert-drive-file",
295
309
  "mi/baseline/keyboard-arrow-down",
296
310
  "mi/baseline/keyboard-arrow-up",
311
+ "mi/baseline/light-mode",
297
312
  "mi/baseline/local-activity",
298
313
  "mi/baseline/lock-open",
299
314
  "mi/baseline/login",
@@ -316,6 +331,9 @@
316
331
  "mi/baseline/warning-amber",
317
332
  "mi/baseline/web",
318
333
  "mi/baseline/wysiwyg",
334
+ "mi/outline/auto-awesome",
335
+ "mi/outline/circle",
336
+ "mi/outline/dark-mode",
319
337
  "mi/outline/help-outline",
320
338
  "mi/outline/schedule",
321
339
  "mi/round/arrow-circle-down",
@@ -22,6 +22,7 @@
22
22
  "mgg/address-book-on",
23
23
  "mgg/adv-denied",
24
24
  "mgg/alerts-pagopa",
25
+ "mgg/ansc",
25
26
  "mgg/area-edificabile",
26
27
  "mgg/area-weather",
27
28
  "mgg/assignments-accept-rejection",
@@ -49,6 +50,9 @@
49
50
  "mgg/citizenship",
50
51
  "mgg/city-bin",
51
52
  "mgg/classic-permission",
53
+ "mgg/consumption-high",
54
+ "mgg/consumption-low",
55
+ "mgg/consumption-medium",
52
56
  "mgg/copy-paste",
53
57
  "mgg/d-instrumental-buildings",
54
58
  "mgg/data-analytics-alt",
@@ -101,6 +105,8 @@
101
105
  "mgg/fullscreen-on-alt",
102
106
  "mgg/google-check-small",
103
107
  "mgg/google-experiment",
108
+ "mgg/google-face-retouching-off",
109
+ "mgg/google-hub",
104
110
  "mgg/google-keyboard-double-arrow-down",
105
111
  "mgg/google-keyboard-double-arrow-up",
106
112
  "mgg/google-place-item",
@@ -147,6 +153,7 @@
147
153
  "mgg/national-document",
148
154
  "mgg/not-instrumental-d-buildings",
149
155
  "mgg/not-sent-yet",
156
+ "mgg/office-off",
150
157
  "mgg/order-return-down-left-to-right",
151
158
  "mgg/order-return-down-left-to-up",
152
159
  "mgg/order-return-down-right-to-left",
@@ -185,6 +192,7 @@
185
192
  "mgg/relevance",
186
193
  "mgg/reporting-abuse",
187
194
  "mgg/residency-permit",
195
+ "mgg/robot",
188
196
  "mgg/roles-permission",
189
197
  "mgg/rubber-stamp",
190
198
  "mgg/rurale",
@@ -244,5 +252,6 @@
244
252
  "mgg/view-chart-gantt",
245
253
  "mgg/view-side-by-side",
246
254
  "mgg/warning-superscript",
255
+ "mgg/web-app-ansc",
247
256
  "mgg/work-book"
248
257
  ]
@@ -1,5 +1,6 @@
1
1
  @import '~@maggioli-design-system/styles/dist/tailwind/components.css';
2
2
  @tailwind components;
3
+ @tailwind utilities;
3
4
 
4
5
  @layer components {
5
6
  .svg {
@@ -12,4 +13,74 @@
12
13
  h-full
13
14
  w-full;
14
15
  }
16
+
17
+ .contrast-area-base {
18
+ border-radius: inherit;
19
+ box-shadow: theme('boxShadow.outline-50') inset;
20
+ display: none;
21
+ inset: 0;
22
+ opacity: 0;
23
+ pointer-events: none;
24
+ position: absolute;
25
+ transition-behavior: allow-discrete;
26
+ transition-property: display opacity;
27
+ }
28
+
29
+ .contrast-area-50 {
30
+ @apply contrast-area-base;
31
+
32
+ box-shadow: theme('boxShadow.outline-50') inset;
33
+ }
34
+
35
+ .contrast-area {
36
+ @apply contrast-area-base;
37
+
38
+ box-shadow: theme('boxShadow.outline') inset;
39
+ }
40
+
41
+ @container style(--magma-pref-contrast: more) {
42
+ .contrast-area,
43
+ .contrast-area-50 {
44
+ @apply
45
+ block
46
+ opacity-100;
47
+
48
+ /* @starting-style {
49
+ opacity: 0;
50
+ } */
51
+ }
52
+ }
53
+
54
+ @container style(--magma-pref-contrast: system) {
55
+
56
+ @media (prefers-contrast: more) {
57
+ .contrast-area,
58
+ .contrast-area-50 {
59
+ @apply
60
+ block
61
+ opacity-100;
62
+
63
+ /* @starting-style {
64
+ opacity: 0;
65
+ } */
66
+ }
67
+ }
68
+ }
69
+
70
+ @container style(--magma-pref-animation: reduce) {
71
+ .contrast-area,
72
+ .contrast-area-50 {
73
+ @apply duration-0;
74
+ }
75
+ }
76
+
77
+ @container style(--magma-pref-animation: system) {
78
+
79
+ @media (prefers-reduced-motion) {
80
+ .contrast-area,
81
+ .contrast-area-50 {
82
+ @apply duration-0;
83
+ }
84
+ }
85
+ }
15
86
  }
@@ -0,0 +1,10 @@
1
+ export type UIPreferenceType =
2
+ | 'animation'
3
+ | 'consumption'
4
+ | 'contrast'
5
+ | 'theme'
6
+
7
+ export type ConsumptionModeType =
8
+ | 'high'
9
+ | 'medium'
10
+ | 'low'
@@ -4,6 +4,15 @@ import baselineAudiotrack from '@icon/mi/baseline/audiotrack.svg'
4
4
  import baselineTerminal from '@icon/mi/baseline/terminal.svg'
5
5
  import baselineInsertDriveFile from '@icon/mi/baseline/insert-drive-file.svg'
6
6
  import mdiHardDisk from '@icon/mdi/harddisk.svg'
7
+ import baselineEmail from '@icon/mi/baseline/email.svg'
8
+ import baselineWysiwyg from '@icon/mi/baseline/wysiwyg.svg'
9
+ import baselinePanorama from '@icon/mi/baseline/panorama.svg'
10
+ import baselineWeb from '@icon/mi/baseline/web.svg'
11
+ import baselineTV from '@icon/mi/baseline/tv.svg'
12
+ import baselineBorderAll from '@icon/mi/baseline/border-all.svg'
13
+ import baselineDescription from '@icon/mi/baseline/description.svg'
14
+ import mdiVectorCurve from '@icon/mdi/vector-curve.svg'
15
+ import baselineVideocam from '@icon/mi/baseline/videocam.svg'
7
16
 
8
17
  interface FileFormatVariant {
9
18
  color: string
@@ -55,67 +64,67 @@ const fileFormatsVariant: FileFormatVariants = {
55
64
  },
56
65
  email: {
57
66
  color: 'fill-label-blue-04 text-label-blue-04',
58
- icon: 'mi/baseline/email',
67
+ icon: baselineEmail,
59
68
  iconBackground: 'bg-label-blue-10',
60
69
  variant: 'blue',
61
70
  },
62
71
  executable: {
63
72
  color: 'fill-label-amaranth-04 text-label-amaranth-04',
64
- icon: 'mi/baseline/wysiwyg',
73
+ icon: baselineWysiwyg,
65
74
  iconBackground: 'bg-label-amaranth-10',
66
75
  variant: 'amaranth',
67
76
  },
68
77
  image: {
69
78
  color: 'fill-label-green-04 text-label-green-04',
70
- icon: 'mi/baseline/panorama',
79
+ icon: baselinePanorama,
71
80
  iconBackground: 'bg-label-green-10',
72
81
  variant: 'green',
73
82
  },
74
83
  imageRaster: {
75
84
  color: 'fill-label-green-04 text-label-green-04',
76
- icon: 'mi/baseline/panorama',
85
+ icon: baselinePanorama,
77
86
  iconBackground: 'bg-label-green-10',
78
87
  variant: 'green',
79
88
  },
80
89
  markup: {
81
90
  color: 'fill-label-yellow-04 text-label-yellow-04',
82
- icon: 'mi/baseline/web',
91
+ icon: baselineWeb,
83
92
  iconBackground: 'bg-label-yellow-10',
84
93
  variant: 'yellow',
85
94
  },
86
95
  slide: {
87
96
  color: 'fill-label-orchid-04 text-label-orchid-04',
88
- icon: 'mi/baseline/tv',
97
+ icon: baselineTV,
89
98
  iconBackground: 'bg-label-orchid-10',
90
99
  variant: 'orchid',
91
100
  },
92
101
  spreadsheet: {
93
102
  color: 'fill-label-lime-04 text-label-lime-04',
94
- icon: 'mi/baseline/border-all',
103
+ icon: baselineBorderAll,
95
104
  iconBackground: 'bg-label-lime-10',
96
105
  variant: 'lime',
97
106
  },
98
107
  text: {
99
108
  color: 'fill-label-blue-04 text-label-blue-04',
100
- icon: 'mi/baseline/description',
109
+ icon: baselineDescription,
101
110
  iconBackground: 'bg-label-blue-10',
102
111
  variant: 'blue',
103
112
  },
104
113
  vectorImage: {
105
114
  color: 'fill-label-aqua-04 text-label-aqua-04',
106
- icon: 'mdi/vector-curve',
115
+ icon: mdiVectorCurve,
107
116
  iconBackground: 'bg-label-aqua-10',
108
117
  variant: 'aqua',
109
118
  },
110
119
  vector: {
111
120
  color: 'fill-label-aqua-04 text-label-aqua-04',
112
- icon: 'mdi/vector-curve',
121
+ icon: mdiVectorCurve,
113
122
  iconBackground: 'bg-label-aqua-10',
114
123
  variant: 'aqua',
115
124
  },
116
125
  video: {
117
126
  color: 'fill-label-violet-04 text-label-violet-04',
118
- icon: 'mi/baseline/videocam',
127
+ icon: baselineVideocam,
119
128
  iconBackground: 'bg-label-violet-10',
120
129
  variant: 'violet',
121
130
  },