@maggioli-design-system/styles 15.11.1 → 16.0.1

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 (46) hide show
  1. package/README.md +59 -8
  2. package/dist/css/animations.css +3 -1
  3. package/dist/css/base.css +109 -67
  4. package/dist/css/colors-hex-brand-rnd.css +39 -37
  5. package/dist/css/colors-hex-brand.css +72 -70
  6. package/dist/css/colors-hex-default.css +732 -664
  7. package/dist/css/colors-hex-label.css +402 -334
  8. package/dist/css/colors-hex-status.css +138 -136
  9. package/dist/css/colors-hex-tones.css +171 -169
  10. package/dist/css/colors-hex.css +897 -2230
  11. package/dist/css/colors-rgb-brand-rnd.css +34 -32
  12. package/dist/css/colors-rgb-brand.css +65 -63
  13. package/dist/css/colors-rgb-default.css +692 -624
  14. package/dist/css/colors-rgb-label.css +399 -331
  15. package/dist/css/colors-rgb-status.css +124 -122
  16. package/dist/css/colors-rgb-tones.css +166 -164
  17. package/dist/css/colors-rgb.css +852 -2185
  18. package/dist/css/globals.css +222 -7
  19. package/dist/css/hydrated.css +2 -0
  20. package/dist/css/layer.css +1 -0
  21. package/dist/css/reset.css +123 -115
  22. package/dist/css/tailwind-theme-color.css +306 -0
  23. package/dist/css/tailwind-theme-typography.css +251 -0
  24. package/dist/css/transitions.css +45 -0
  25. package/dist/css/typography.css +219 -163
  26. package/dist/css/utility-typography.css +254 -0
  27. package/dist/tailwind/base.css +88 -41
  28. package/dist/tailwind/reset.css +116 -99
  29. package/dist/tailwind/theme.css +5 -0
  30. package/dist/tailwind/typography.css +137 -157
  31. package/dist/tailwind/utilities.css +97 -0
  32. package/dist/tailwind3/base.css +51 -0
  33. package/dist/{tailwind → tailwind3}/components.css +5 -4
  34. package/dist/tailwind3/reset.css +114 -0
  35. package/dist/tailwind3/typography.css +140 -0
  36. package/package.json +19 -10
  37. package/postcss.config.js +2 -7
  38. package/tailwind.config.js +11 -10
  39. package/dist/css/colors-hex-brand-apk.css +0 -281
  40. package/dist/css/colors-hex-brand-mindy.css +0 -50
  41. package/dist/css/colors-hex-brand-synbee.css +0 -83
  42. package/dist/css/colors-hex-synbee-v1.css +0 -1025
  43. package/dist/css/colors-rgb-brand-apk.css +0 -281
  44. package/dist/css/colors-rgb-brand-mindy.css +0 -50
  45. package/dist/css/colors-rgb-brand-synbee.css +0 -83
  46. package/dist/css/colors-rgb-synbee-v1.css +0 -1025
@@ -0,0 +1,97 @@
1
+ @utility focus-bounce {
2
+ animation-duration: var(--magma-outline-animation-duration, 1s);
3
+ animation-fill-mode: forwards;
4
+ animation-iteration-count: infinite;
5
+ animation-name: focus-bounce;
6
+ animation-play-state: paused;
7
+ animation-timing-function: var(--ease-out, cubic-bezier(0, 0, 0.2, 1));
8
+ outline: var(--magma-outline-blur, 2px solid var(--magma-outline-blur-color, rgb(0 0 0 / 0)));
9
+ transition-duration: 200ms;
10
+ transition-property:
11
+ background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform;
12
+ transition-timing-function: ease-in-out;
13
+ }
14
+
15
+ @utility focus-bounce--focused {
16
+ --magma-outline-blur: var(--magma-outline-focus);
17
+
18
+ animation-play-state: running;
19
+ }
20
+
21
+ @utility text-box-uppercase {
22
+ min-height: auto;
23
+ text-box: trim-both cap alphabetic;
24
+ }
25
+
26
+ @utility text-box-vertical-margin {
27
+ min-height: auto;
28
+ text-box: trim-both text;
29
+ }
30
+
31
+ @utility text-box-vertical-align {
32
+ min-height: auto;
33
+ text-box: trim-both cap alphabetic;
34
+ }
35
+
36
+ @utility hide-scrollbar {
37
+ -webkit-overflow-scrolling: touch;
38
+ -ms-overflow-style: none;
39
+ scrollbar-width: none;
40
+
41
+ &::-webkit-scrollbar {
42
+ display: none;
43
+ }
44
+ }
45
+
46
+ @utility focus-bounce {
47
+ &:focus-visible {
48
+ --magma-outline-blur: var(--magma-outline-focus);
49
+
50
+ animation-play-state: running;
51
+ }
52
+ }
53
+
54
+ @utility not-hydrated {
55
+ animation-duration: 0s;
56
+ opacity: 0;
57
+ transition-delay: 0.1s;
58
+ transition-duration: 0s;
59
+ visibility: hidden;
60
+ }
61
+
62
+ @layer utilities {
63
+ /* .focus-bounce:focus-visible {
64
+ --magma-outline-blur: var(--magma-outline-focus);
65
+
66
+ animation-play-state: running;
67
+ } */
68
+
69
+ .focus-zoom {
70
+ @apply duration-200
71
+ ease-out;
72
+
73
+ outline: var(--magma-outline-blur);
74
+ outline-offset: var(--magma-outline-blur-offset);
75
+ transition-property:
76
+ background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform;
77
+ }
78
+
79
+ .focus-zoom--focused,
80
+ .focus-zoom:focus-visible {
81
+ --magma-outline-blur-offset: var(--magma-outline-focus-offset);
82
+ --magma-outline-blur: var(--magma-outline-focus);
83
+ }
84
+
85
+ .focus-zoom--light.focus-zoom--focused,
86
+ .focus-zoom--light:focus-visible {
87
+ --magma-outline-blur: 2px solid rgb(var(--tone-neutral));
88
+ }
89
+
90
+ /* .not-hydrated {
91
+ animation-duration: 0s;
92
+ opacity: 0;
93
+ transition-delay: 0.1s;
94
+ transition-duration: 0s;
95
+ visibility: hidden;
96
+ } */
97
+ }
@@ -0,0 +1,51 @@
1
+ body {
2
+ @apply font-info
3
+ text-info-detail;
4
+
5
+ background-color: rgb(var(--tone-neutral, theme('colors.tone-neutral')));
6
+ color: rgb(var(--tone-neutral-03, theme('colors.tone-neutral-03')));
7
+ }
8
+
9
+ :root.pref-contrast-high body {
10
+ color: rgb(var(--tone-neutral-01, theme('colors.tone-neutral-01')));
11
+ }
12
+
13
+ @media (prefers-contrast: more) {
14
+ :root.pref-contrast-system body {
15
+ color: rgb(var(--tone-neutral-01, theme('colors.tone-neutral-01')));
16
+ }
17
+ }
18
+
19
+ ::selection {
20
+ background-color: var(--magma-selection-background, theme('colors.label-sky-09'));
21
+ color: var(--magma-selection-color, theme('colors.label-sky-01'));
22
+ }
23
+
24
+ button,
25
+ optgroup,
26
+ select {
27
+ @apply text-title-action;
28
+ }
29
+
30
+ b,
31
+ strong {
32
+ @apply font-semibold
33
+ tracking-tight;
34
+ }
35
+
36
+ a {
37
+ color: rgb(var(--theme-default-02-primary-text, theme('colors.theme-default-02-primary-text')));
38
+ }
39
+
40
+ h1,
41
+ h2,
42
+ h3,
43
+ h4,
44
+ h5,
45
+ h6 {
46
+ max-width: theme('spacing.title');
47
+ }
48
+
49
+ p {
50
+ max-width: theme('spacing.text');
51
+ }
@@ -10,7 +10,8 @@
10
10
  animation-timing-function: theme('transitionTimingFunction.out');
11
11
  outline: var(--magma-outline-blur);
12
12
  transition-duration: 200ms;
13
- transition-property: background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform;
13
+ transition-property:
14
+ background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform;
14
15
  transition-timing-function: ease-in-out;
15
16
  }
16
17
 
@@ -22,13 +23,13 @@
22
23
  }
23
24
 
24
25
  .focus-zoom {
25
- @apply
26
- duration-200
26
+ @apply duration-200
27
27
  ease-out;
28
28
 
29
29
  outline: var(--magma-outline-blur);
30
30
  outline-offset: var(--magma-outline-blur-offset);
31
- transition-property: background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform;
31
+ transition-property:
32
+ background-color, border-color, box-shadow, color, fill, outline, outline-offset, transform;
32
33
  }
33
34
 
34
35
  .focus-zoom--focused,
@@ -0,0 +1,114 @@
1
+ html {
2
+ hanging-punctuation: first last;
3
+ interpolate-size: allow-keywords;
4
+ transition-duration: theme('transitionDuration.200');
5
+ transition-timing-function: theme('transitionTimingFunction.out');
6
+ }
7
+
8
+ *,
9
+ *::before,
10
+ *::after {
11
+ box-sizing: border-box;
12
+ overflow-wrap: anywhere;
13
+ }
14
+
15
+ body,
16
+ html {
17
+ margin: 0;
18
+ }
19
+
20
+ body {
21
+ -moz-osx-font-smoothing: grayscale;
22
+ -webkit-font-smoothing: antialiased;
23
+ min-height: 100svh;
24
+ -webkit-tap-highlight-color: transparent;
25
+ text-rendering: optimizelegibility;
26
+ text-size-adjust: 100%;
27
+ }
28
+
29
+ input,
30
+ textarea {
31
+ appearance: none;
32
+ font-family: inherit;
33
+ }
34
+
35
+ a {
36
+ font-family: inherit;
37
+ font-size: inherit;
38
+ font-weight: inherit;
39
+ }
40
+
41
+ a,
42
+ aside,
43
+ body,
44
+ code,
45
+ div,
46
+ datalist,
47
+ footer,
48
+ form,
49
+ h1,
50
+ h2,
51
+ h3,
52
+ h4,
53
+ h5,
54
+ h6,
55
+ header,
56
+ hr,
57
+ html,
58
+ input,
59
+ li,
60
+ main,
61
+ section,
62
+ span,
63
+ ul,
64
+ textarea {
65
+ box-sizing: border-box;
66
+ }
67
+
68
+ h1,
69
+ h2,
70
+ h3,
71
+ h4,
72
+ h5,
73
+ h6 {
74
+ margin: 0;
75
+ max-width: theme('spacing.title');
76
+ text-wrap: balance;
77
+ }
78
+
79
+ p {
80
+ margin: 0;
81
+ max-width: theme('spacing.text');
82
+ text-wrap: pretty;
83
+ }
84
+
85
+ li,
86
+ figcaption {
87
+ max-width: theme('spacing.text');
88
+ text-wrap: pretty;
89
+ }
90
+
91
+ header,
92
+ footer,
93
+ section,
94
+ article {
95
+ container-type: inline-size;
96
+ }
97
+
98
+ img,
99
+ picture,
100
+ svg,
101
+ video {
102
+ display: block;
103
+ max-width: 100%;
104
+ }
105
+
106
+ @media (prefers-reduced-motion: no-preference) {
107
+ html {
108
+ scroll-behavior: smooth;
109
+ }
110
+
111
+ :has(:target) {
112
+ scroll-behavior: smooth;
113
+ }
114
+ }
@@ -0,0 +1,140 @@
1
+ @layer components {
2
+ .text-title-h1 {
3
+ @apply antialiased
4
+ font-black
5
+ font-title
6
+ min-h-1200
7
+ text-size-title-h1;
8
+ }
9
+
10
+ .text-title-h2 {
11
+ @apply antialiased
12
+ font-black
13
+ font-title
14
+ min-h-1000
15
+ text-size-title-h2;
16
+ }
17
+
18
+ .text-title-h3 {
19
+ @apply antialiased
20
+ font-black
21
+ font-title
22
+ min-h-900
23
+ text-size-title-h3;
24
+ }
25
+
26
+ .text-title-h4 {
27
+ @apply antialiased
28
+ font-bold
29
+ font-title
30
+ min-h-800
31
+ text-size-title-h4;
32
+ }
33
+
34
+ .text-title-h5 {
35
+ @apply antialiased
36
+ font-bold
37
+ font-title
38
+ min-h-700
39
+ text-size-title-h5;
40
+ }
41
+
42
+ .text-title-h6 {
43
+ @apply antialiased
44
+ font-bold
45
+ font-title
46
+ min-h-600
47
+ text-size-title-h6;
48
+ }
49
+
50
+ .text-title-action {
51
+ @apply antialiased
52
+ font-medium
53
+ font-title
54
+ min-h-600
55
+ text-size-title-action;
56
+ }
57
+
58
+ .text-info-paragraph {
59
+ @apply antialiased
60
+ font-info
61
+ min-h-800
62
+ text-size-info-paragraph;
63
+ }
64
+
65
+ .text-info-detail {
66
+ @apply antialiased
67
+ font-info
68
+ min-h-600
69
+ text-size-info-detail;
70
+ }
71
+
72
+ .text-info-caption {
73
+ @apply antialiased
74
+ font-info
75
+ min-h-500
76
+ text-size-info-caption;
77
+ }
78
+
79
+ .text-info-label {
80
+ @apply antialiased
81
+ font-bold
82
+ font-info
83
+ min-h-400
84
+ text-size-info-label
85
+ uppercase;
86
+ }
87
+
88
+ .text-info-option {
89
+ @apply antialiased
90
+ font-bold
91
+ font-info
92
+ min-h-250
93
+ text-size-info-option
94
+ uppercase;
95
+ }
96
+
97
+ .text-info-tip {
98
+ @apply antialiased
99
+ font-info
100
+ min-h-400
101
+ text-size-info-tip;
102
+ }
103
+
104
+ .text-read-paragraph {
105
+ @apply antialiased
106
+ font-light
107
+ font-read
108
+ min-h-800
109
+ text-size-read-paragraph;
110
+ }
111
+
112
+ .text-read-detail {
113
+ @apply antialiased
114
+ font-light
115
+ font-read
116
+ min-h-600
117
+ text-size-read-detail;
118
+ }
119
+
120
+ .text-read-caption {
121
+ @apply antialiased
122
+ font-read
123
+ min-h-500
124
+ text-size-read-caption;
125
+ }
126
+
127
+ .text-code-snippet {
128
+ @apply antialiased
129
+ font-code
130
+ min-h-600
131
+ text-size-code-snippet;
132
+ }
133
+
134
+ .text-code-hack {
135
+ @apply antialiased
136
+ font-code
137
+ min-h-500
138
+ text-size-code-hack;
139
+ }
140
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maggioli-design-system/styles",
3
- "version": "15.11.1",
3
+ "version": "16.0.1",
4
4
  "description": "This module contains SCSS and CSS styles used by Maggioli Design System, it also makes available a Tailwind config based on Maggioli design tokens.",
5
5
  "main": "./tailwind.config.js",
6
6
  "scripts": {
@@ -10,8 +10,11 @@
10
10
  "copy": "tsx scripts/copy.ts",
11
11
  "tailwind.base": "postcss ./postcss/base.css -o ./dist/css/base.css",
12
12
  "tailwind.reset": "postcss ./postcss/reset.css -o ./dist/css/reset.css",
13
- "tailwind.build": "npm run tailwind.base && npm run tailwind.reset && npm run tailwind.typography",
14
- "tailwind.typography": "postcss ./postcss/typography.css -o ./dist/css/typography.css"
13
+ "tailwind.layer": "postcss ./postcss/layer.css -o ./dist/css/layer.css",
14
+ "tailwind.build": "npm run tailwind.base && npm run tailwind.reset && npm run tailwind.layer && npm run tailwind.typography",
15
+ "tailwind.typography": "postcss ./postcss/typography.css -o ./dist/css/utility-typography.css",
16
+ "lint": "eslint .",
17
+ "lint:fix": "eslint . --fix"
15
18
  },
16
19
  "files": [
17
20
  "/postcss.config.js",
@@ -20,7 +23,8 @@
20
23
  ],
21
24
  "repository": {
22
25
  "type": "git",
23
- "url": "https://gitlab.com/maggiolispa/ricerca-sviluppo-new-media/magma/design-system.git"
26
+ "url": "git+https://github.com/magma-design-system/magma.git",
27
+ "directory": "projects/styles"
24
28
  },
25
29
  "keywords": [
26
30
  "scss",
@@ -38,6 +42,11 @@
38
42
  "name": "Daniele Tardia",
39
43
  "email": "daniele.tardia@hibo.it",
40
44
  "role": "Senior Developer"
45
+ },
46
+ {
47
+ "name": "Nicola Tamburini",
48
+ "email": "nicola.tamburini@maggioli.it",
49
+ "role": "Software Engineer"
41
50
  }
42
51
  ],
43
52
  "license": "ISC",
@@ -46,14 +55,14 @@
46
55
  "@fontsource/merriweather": "5.1.0",
47
56
  "@fontsource/roboto": "5.1.0",
48
57
  "@fontsource/roboto-mono": "5.1.0",
49
- "@maggioli-design-system/design-tokens": "13.7.2",
58
+ "@maggioli-design-system/design-tokens": "14.1.0",
50
59
  "normalize.css": "8.0.1"
51
60
  },
52
61
  "devDependencies": {
53
- "autoprefixer": "10.4.20",
54
- "postcss-cli": "11.0.0",
55
- "postcss": "8.4.49",
56
- "postcss-import": "16.1.0",
57
- "tailwindcss": "3.4.17"
62
+ "autoprefixer": "10.4.27",
63
+ "postcss-cli": "11.0.1",
64
+ "postcss": "8.5.8",
65
+ "postcss-import": "16.1.1",
66
+ "tailwindcss": "4.2.2"
58
67
  }
59
68
  }
package/postcss.config.js CHANGED
@@ -1,8 +1,3 @@
1
1
  module.exports = {
2
- plugins: [
3
- require('postcss-import'),
4
- require('tailwindcss/nesting'),
5
- require('tailwindcss'),
6
- require('autoprefixer'),
7
- ],
8
- }
2
+ plugins: [require('postcss-import'), require('@tailwindcss/postcss'), require('autoprefixer')],
3
+ };
@@ -1,9 +1,12 @@
1
1
  /* eslint-disable @typescript-eslint/no-var-requires */
2
2
  /** @type {import('tailwindcss').Config} */
3
3
 
4
- const { palette } = require('@maggioli-design-system/design-tokens')
5
- const { fontFamily } = require('@maggioli-design-system/design-tokens/dist/js/tailwind-font-family.js')
6
- const fontSizeMagma = require('@maggioli-design-system/design-tokens/dist/js/tailwind-font-size.js').fontSize
4
+ const { palette } = require('@maggioli-design-system/design-tokens');
5
+ const {
6
+ fontFamily,
7
+ } = require('@maggioli-design-system/design-tokens/dist/js/tailwind-font-family.js');
8
+ const fontSizeMagma =
9
+ require('@maggioli-design-system/design-tokens/dist/js/tailwind-font-size.js').fontSize;
7
10
  const {
8
11
  aspectRatio,
9
12
  border,
@@ -17,16 +20,14 @@ const {
17
20
  size,
18
21
  timingFunction,
19
22
  transitionProperty,
20
- } = require('@maggioli-design-system/design-tokens/dist/js/tailwind-props.js').properties
23
+ } = require('@maggioli-design-system/design-tokens/dist/js/tailwind-props.js').properties;
21
24
 
22
- const { screens } = require('@maggioli-design-system/design-tokens/dist/js/tailwind-screens.js')
23
- const { leading } = require('@maggioli-design-system/design-tokens/dist/js/tailwind-leading.js')
25
+ const { screens } = require('@maggioli-design-system/design-tokens/dist/js/tailwind-screens.js');
26
+ const { leading } = require('@maggioli-design-system/design-tokens/dist/js/tailwind-leading.js');
24
27
 
25
28
  module.exports = {
26
29
  important: true,
27
- content: [
28
- './src/**/*.{js,jsx}',
29
- ],
30
+ content: ['./src/**/*.{js,jsx}'],
30
31
  darkMode: [
31
32
  'variant',
32
33
  [
@@ -123,4 +124,4 @@ module.exports = {
123
124
  },
124
125
  },
125
126
  },
126
- }
127
+ };