@massimo-cassandro/minimo 1.16.2 → 1.17.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 (69) hide show
  1. package/design-tokens/_src/headings.minimo.tokens.mjs +8 -0
  2. package/design-tokens/_src/typography.minimo.tokens.mjs +1 -1
  3. package/design-tokens/tokens/{headings.minimo.tokens.jsonc → design-tokens/_src/headings.minimo.tokens.jsonc} +8 -0
  4. package/design-tokens/tokens/src/components/inner-nav/inner-nav.minimo.tokens.jsonc +20 -0
  5. package/design-tokens/tokens/src/components/modal-alert/modal-alert.minimo.tokens.jsonc +166 -0
  6. package/design-tokens/tokens/src/components/slide-up-down-toggle/slide-up-down-toggle.minimo.tokens.jsonc +14 -0
  7. package/design-tokens/utilities/build-tokens-src/formats/css.mjs +1 -1
  8. package/design-tokens/utilities/build-tokens-src/formats/penpot.mjs +1 -1
  9. package/design-tokens/utilities/check-unresolved-custom-props.mjs +11 -12
  10. package/design-tokens/utilities/tokens-config-sample.mjs +1 -1
  11. package/package.json +1 -1
  12. package/src/components/inner-nav/inner-nav.css +2 -2
  13. package/src/components/inner-nav/inner-nav.minimo.tokens.mjs +15 -0
  14. package/src/components/modal-alert/modal-alert.js +295 -165
  15. package/src/components/modal-alert/modal-alert.minimo.tokens.mjs +164 -0
  16. package/src/components/modal-alert/modal-alert.module.css +145 -0
  17. package/src/components/modal-alert/svg/confirm.svg +4 -1
  18. package/src/components/modal-alert/svg/danger.svg +4 -0
  19. package/src/components/modal-alert/svg/error.svg +4 -1
  20. package/src/components/modal-alert/svg/info.svg +4 -1
  21. package/src/components/modal-alert/svg/success.svg +4 -1
  22. package/src/components/modal-alert/svg/warning.svg +4 -1
  23. package/src/components/slide-up-down-toggle/slide-up-down-toggle.minimo.tokens.mjs +9 -0
  24. package/src/components/slide-up-down-toggle/slide-up-down-toggle.module.css +2 -2
  25. package/src/custom-properties.css +26 -0
  26. package/src/components/modal-alert/TODO modal-alert-demo/demo.css +0 -63
  27. package/src/components/modal-alert/TODO modal-alert-demo/demo.js +0 -155
  28. package/src/components/modal-alert/TODO.md +0 -3
  29. package/src/components/modal-alert/customization-templates/custom-modal-alert.css +0 -46
  30. package/src/components/modal-alert/customization-templates/custom-modal-alert.js +0 -89
  31. package/src/components/modal-alert/defaults.js +0 -58
  32. package/src/components/modal-alert/marks.js +0 -9
  33. package/src/components/modal-alert/modal-alert.css +0 -159
  34. package/src/components/modal-alert/svg/svg-to-js.mjs +0 -26
  35. /package/design-tokens/tokens/{alerts.minimo.tokens.jsonc → design-tokens/_src/alerts.minimo.tokens.jsonc} +0 -0
  36. /package/design-tokens/tokens/{badge.minimo.tokens.jsonc → design-tokens/_src/badge.minimo.tokens.jsonc} +0 -0
  37. /package/design-tokens/tokens/{btn-close.minimo.tokens.jsonc → design-tokens/_src/btn-close.minimo.tokens.jsonc} +0 -0
  38. /package/design-tokens/tokens/{btn-color-themes.minimo.tokens.jsonc → design-tokens/_src/btn-color-themes.minimo.tokens.jsonc} +0 -0
  39. /package/design-tokens/tokens/{btn.minimo.tokens.jsonc → design-tokens/_src/btn.minimo.tokens.jsonc} +0 -0
  40. /package/design-tokens/tokens/{color-accent.minimo.tokens.jsonc → design-tokens/_src/color-accent.minimo.tokens.jsonc} +0 -0
  41. /package/design-tokens/tokens/{color-neutral.minimo.tokens.jsonc → design-tokens/_src/color-neutral.minimo.tokens.jsonc} +0 -0
  42. /package/design-tokens/tokens/{color-primary.minimo.tokens.jsonc → design-tokens/_src/color-primary.minimo.tokens.jsonc} +0 -0
  43. /package/design-tokens/tokens/{color-secondary.minimo.tokens.jsonc → design-tokens/_src/color-secondary.minimo.tokens.jsonc} +0 -0
  44. /package/design-tokens/tokens/{flex-grid.minimo.tokens.jsonc → design-tokens/_src/flex-grid.minimo.tokens.jsonc} +0 -0
  45. /package/design-tokens/tokens/{form-validation.minimo.tokens.jsonc → design-tokens/_src/form-validation.minimo.tokens.jsonc} +0 -0
  46. /package/design-tokens/tokens/{form.minimo.tokens.jsonc → design-tokens/_src/form.minimo.tokens.jsonc} +0 -0
  47. /package/design-tokens/tokens/{layout.minimo.tokens.jsonc → design-tokens/_src/layout.minimo.tokens.jsonc} +0 -0
  48. /package/design-tokens/tokens/{link.minimo.tokens.jsonc → design-tokens/_src/link.minimo.tokens.jsonc} +0 -0
  49. /package/design-tokens/tokens/{modal-popup.minimo.tokens.jsonc → design-tokens/_src/modal-popup.minimo.tokens.jsonc} +0 -0
  50. /package/design-tokens/tokens/{radius.minimo.tokens.jsonc → design-tokens/_src/radius.minimo.tokens.jsonc} +0 -0
  51. /package/design-tokens/tokens/{shadows.minimo.tokens.jsonc → design-tokens/_src/shadows.minimo.tokens.jsonc} +0 -0
  52. /package/design-tokens/tokens/{size.minimo.tokens.jsonc → design-tokens/_src/size.minimo.tokens.jsonc} +0 -0
  53. /package/design-tokens/tokens/{status.minimo.tokens.jsonc → design-tokens/_src/status.minimo.tokens.jsonc} +0 -0
  54. /package/design-tokens/tokens/{switch.minimo.tokens.jsonc → design-tokens/_src/switch.minimo.tokens.jsonc} +0 -0
  55. /package/design-tokens/tokens/{table.minimo.tokens.jsonc → design-tokens/_src/table.minimo.tokens.jsonc} +0 -0
  56. /package/design-tokens/tokens/{text.minimo.tokens.jsonc → design-tokens/_src/text.minimo.tokens.jsonc} +0 -0
  57. /package/design-tokens/tokens/{typography.minimo.tokens.jsonc → design-tokens/_src/typography.minimo.tokens.jsonc} +0 -0
  58. /package/design-tokens/tokens/{utility.minimo.tokens.jsonc → design-tokens/_src/utility.minimo.tokens.jsonc} +0 -0
  59. /package/design-tokens/tokens/{z-index.minimo.tokens.jsonc → design-tokens/_src/z-index.minimo.tokens.jsonc} +0 -0
  60. /package/design-tokens/tokens/{components → src/components/sf-macro}/sf-macro.minimo.tokens.jsonc +0 -0
  61. /package/design-tokens/tokens/{components → src/components/snackbar}/snackbar.minimo.tokens.jsonc +0 -0
  62. /package/design-tokens/tokens/{components → src/components/spinner}/spinner.minimo.tokens.jsonc +0 -0
  63. /package/design-tokens/tokens/{components → src/components/unsplash-page}/unsplash-page.minimo.tokens.jsonc +0 -0
  64. /package/design-tokens/tokens/{web-components → src/web-components/s-datatable-component}/simple-datatable.minimo.tokens.jsonc +0 -0
  65. /package/{design-tokens/_src/components → src/components/sf-macro}/sf-macro.minimo.tokens.mjs +0 -0
  66. /package/{design-tokens/_src/components → src/components/snackbar}/snackbar.minimo.tokens.mjs +0 -0
  67. /package/{design-tokens/_src/components → src/components/spinner}/spinner.minimo.tokens.mjs +0 -0
  68. /package/{design-tokens/_src/components → src/components/unsplash-page}/unsplash-page.minimo.tokens.mjs +0 -0
  69. /package/{design-tokens/_src/web-components → src/web-components/s-datatable-component}/simple-datatable.minimo.tokens.mjs +0 -0
@@ -11,11 +11,19 @@ export default {
11
11
  $value: '{text.color}'
12
12
  },
13
13
  font: {
14
+ family: {
15
+ $type: 'fontFamily',
16
+ $value: '{font.family}'
17
+ },
14
18
  weight: {
15
19
  $type: 'string',
16
20
  $value: '{font.weight.semibold}'
17
21
  }
18
22
  },
23
+ 'line-height': {
24
+ $type: 'dimension',
25
+ $value: '{line-height.xs}'
26
+ },
19
27
  h1: {
20
28
  font: {
21
29
  weight: {
@@ -1,8 +1,8 @@
1
1
  export default {
2
2
  font: {
3
3
  family: {
4
+ $type: 'fontFamily',
4
5
  $value: 'sans-serif',
5
- $type: 'fontFamily'
6
6
  },
7
7
  'family-mono': {
8
8
  $value: '\'Monaspace Neon Var\', \'Monaspace Neon\', \'Aptos Mono\', \'Roboto Mono\', \'SFMono-Regular\', \'Menlo\', \'Monaco\', \'Consolas\', \'Liberation Mono\', \'Andale Mono\', \'Courier New\', monospace',
@@ -17,11 +17,19 @@
17
17
  "$value": "{text.color}"
18
18
  },
19
19
  "font": {
20
+ "family": {
21
+ "$type": "fontFamily",
22
+ "$value": "{font.family}"
23
+ },
20
24
  "weight": {
21
25
  "$type": "string",
22
26
  "$value": "{font.weight.semibold}"
23
27
  }
24
28
  },
29
+ "line-height": {
30
+ "$type": "dimension",
31
+ "$value": "{line-height.xs}"
32
+ },
25
33
  "h1": {
26
34
  "font": {
27
35
  "weight": {
@@ -0,0 +1,20 @@
1
+ // -----------------------------------------------------------------------
2
+ // Generated file — do not edit manually.
3
+ // This file is produced by the design-token build pipeline.
4
+ // Source of truth: the token files in the project source directory.
5
+ // Re-generate with: node build-tokens.mjs --config <path/to/config>
6
+ // -----------------------------------------------------------------------
7
+ {
8
+ "inner-nav": {
9
+ "gap": {
10
+ "$type": "dimension",
11
+ "$value": "{size.lg}"
12
+ },
13
+ "margin": {
14
+ "block": {
15
+ "$type": "dimension",
16
+ "$value": "{size.base}"
17
+ }
18
+ }
19
+ }
20
+ }
@@ -0,0 +1,166 @@
1
+ // -----------------------------------------------------------------------
2
+ // Generated file — do not edit manually.
3
+ // This file is produced by the design-token build pipeline.
4
+ // Source of truth: the token files in the project source directory.
5
+ // Re-generate with: node build-tokens.mjs --config <path/to/config>
6
+ // -----------------------------------------------------------------------
7
+ {
8
+ "malert": {
9
+ "background": {
10
+ "color": {
11
+ "$type": "color",
12
+ "$value": "#fff"
13
+ }
14
+ },
15
+ "border": {
16
+ "radius": {
17
+ "$type": "dimension",
18
+ "$value": "{radius.xs}"
19
+ }
20
+ },
21
+ "box-shadow-color": {
22
+ "$type": "color",
23
+ "$value": "#000"
24
+ },
25
+ "box-shadow": {
26
+ "$type": "shadow",
27
+ "$value": [
28
+ {
29
+ "offsetX": "0",
30
+ "offsetY": ".4px",
31
+ "blur": "4px",
32
+ "spread": "0",
33
+ "color": "color-mix(in srgb, #000 15%, transparent)"
34
+ },
35
+ {
36
+ "offsetX": "-.3px",
37
+ "offsetY": "3px",
38
+ "blur": "3.3px",
39
+ "spread": "-.5px",
40
+ "color": "color-mix(in srgb, #000 15%, transparent)"
41
+ },
42
+ {
43
+ "offsetX": "-.5px",
44
+ "offsetY": "6.1px",
45
+ "blur": "6.6px",
46
+ "spread": "-.9px",
47
+ "color": "color-mix(in srgb, #000 14%, transparent)"
48
+ },
49
+ {
50
+ "offsetX": "-.9px",
51
+ "offsetY": "11.2px",
52
+ "blur": "12.1px",
53
+ "spread": "-1.4px",
54
+ "color": "color-mix(in srgb, #000 14%, transparent)"
55
+ },
56
+ {
57
+ "offsetX": "-1.6px",
58
+ "offsetY": "19.5px",
59
+ "blur": "21.1px",
60
+ "spread": "-1.9px",
61
+ "color": "color-mix(in srgb, #000 13%, transparent)"
62
+ },
63
+ {
64
+ "offsetX": "-2.7px",
65
+ "offsetY": "32.7px",
66
+ "blur": "35.4px",
67
+ "spread": "-2.3px",
68
+ "color": "color-mix(in srgb, #000 13%, transparent)"
69
+ },
70
+ {
71
+ "offsetX": "-4.3px",
72
+ "offsetY": "52px",
73
+ "blur": "56.4px",
74
+ "spread": "-2.8px",
75
+ "color": "color-mix(in srgb, #000 12%, transparent)"
76
+ }
77
+ ]
78
+ },
79
+ "backdrop": {
80
+ "$type": "color",
81
+ "$value": "rgb(0 0 0 / .7)"
82
+ },
83
+ "success": {
84
+ "bg": {
85
+ "$type": "color",
86
+ "$value": "{status.success.background.color}"
87
+ },
88
+ "fg": {
89
+ "$type": "color",
90
+ "$value": "{status.success.fg}"
91
+ }
92
+ },
93
+ "info": {
94
+ "bg": {
95
+ "$type": "color",
96
+ "$value": "{status.info.background.color}"
97
+ },
98
+ "fg": {
99
+ "$type": "color",
100
+ "$value": "{status.info.fg}"
101
+ }
102
+ },
103
+ "warning": {
104
+ "bg": {
105
+ "$type": "color",
106
+ "$value": "{status.warning.background.color}"
107
+ },
108
+ "fg": {
109
+ "$type": "color",
110
+ "$value": "{status.warning.fg}"
111
+ }
112
+ },
113
+ "error": {
114
+ "bg": {
115
+ "$type": "color",
116
+ "$value": "{status.danger.background.color}"
117
+ },
118
+ "fg": {
119
+ "$type": "color",
120
+ "$value": "{status.danger.fg}"
121
+ }
122
+ },
123
+ "confirm": {
124
+ "bg": {
125
+ "$type": "color",
126
+ "$value": "hsl(277deg 72% 45%)"
127
+ },
128
+ "fg": {
129
+ "$type": "color",
130
+ "$value": "#fff"
131
+ }
132
+ },
133
+ "heading": {
134
+ "font": {
135
+ "family": {
136
+ "$type": "fontFamily",
137
+ "$value": "{headings.font.family}"
138
+ },
139
+ "size": {
140
+ "$type": "dimension",
141
+ "$value": "{headings.h2.font.size}"
142
+ },
143
+ "weight": {
144
+ "$type": "dimension",
145
+ "$value": "{headings.font.weight}"
146
+ }
147
+ },
148
+ "line-height": {
149
+ "$type": "dimension",
150
+ "$value": "{headings.line-height}"
151
+ }
152
+ },
153
+ "text": {
154
+ "font": {
155
+ "family": {
156
+ "$type": "fontFamily",
157
+ "$value": "{font.family}"
158
+ },
159
+ "size": {
160
+ "$type": "dimension",
161
+ "$value": "{font.size.base}"
162
+ }
163
+ }
164
+ }
165
+ }
166
+ }
@@ -0,0 +1,14 @@
1
+ // -----------------------------------------------------------------------
2
+ // Generated file — do not edit manually.
3
+ // This file is produced by the design-token build pipeline.
4
+ // Source of truth: the token files in the project source directory.
5
+ // Re-generate with: node build-tokens.mjs --config <path/to/config>
6
+ // -----------------------------------------------------------------------
7
+ {
8
+ "slide": {
9
+ "duration": {
10
+ "$type": "duration",
11
+ "$value": "500ms"
12
+ }
13
+ }
14
+ }
@@ -150,7 +150,7 @@ StyleDictionary.registerFormat({
150
150
  const sequenceList = [
151
151
  'xxs', 'xs', 'sm', 'base', 'md', 'lg', 'xl', 'xxl', 'xxxl', '2xl', '3xl',
152
152
  'xlight', 'light', 'regular', 'medium', 'semibold', 'bold', 'xbold'
153
- ]
153
+ ];
154
154
 
155
155
  const sortFunction = (a, b) => {
156
156
  const idxA = sequenceList.indexOf(a.name);
@@ -110,7 +110,6 @@ const resolveExpression = (orig, tokenMap) => {
110
110
  if (!/^[\d\s+\-*/.()]+$/.test(expr)) return null;
111
111
 
112
112
  try {
113
- // eslint-disable-next-line no-new-func
114
113
  const result = Function(`"use strict"; return (${expr})`)();
115
114
  if (typeof result !== 'number' || !isFinite(result)) return null;
116
115
  // Round to a reasonable precision to avoid floating-point noise
@@ -161,6 +160,7 @@ StyleDictionary.registerFormat({
161
160
  value = resolved;
162
161
  } else {
163
162
  // Resolution failed — keep the original and emit a warning
163
+ // eslint-disable-next-line no-console
164
164
  console.warn(`[build-tokens] penpot: could not resolve expression "${orig}" for token "${token.path.join('.')}". Keeping original.`);
165
165
  value = orig;
166
166
  }
@@ -16,7 +16,7 @@ import * as fs from 'node:fs';
16
16
  import { /* fileURLToPath, */pathToFileURL } from 'url';
17
17
  // import { dirname } from 'path';
18
18
  import { glob } from 'node:fs/promises';
19
- import { styleText, parseArgs } from 'node:util';
19
+ import { styleText } from 'node:util';
20
20
 
21
21
  // const __filename = fileURLToPath(import.meta.url);
22
22
  // const __dirname = dirname(__filename);
@@ -24,22 +24,17 @@ import { styleText, parseArgs } from 'node:util';
24
24
  // ---------------------------------------------------------------------------
25
25
  // 1. Parse flags
26
26
  // ---------------------------------------------------------------------------
27
- const options = {
28
- config: {
29
- type: 'string',
30
- short: 'c',
31
- },
32
- };
27
+ const args = process.argv.slice(2);
28
+ const configFlagIndex = args.findIndex(arg => arg === '--config' || arg === '-c');
29
+ const configArgPath = configFlagIndex !== -1 ? args[configFlagIndex + 1] : undefined;
33
30
 
34
- const { values } = parseArgs({ options });
35
-
36
- if (!values.config) {
31
+ if (!configArgPath) {
37
32
  console.error(styleText(['red'], 'Error: you must provide the config path with --config or -c'));
38
33
  console.log('Example: node check-unresolved-custom-props.mjs --config ./config.mjs');
39
34
  process.exit(1);
40
35
  }
41
36
 
42
- const absoluteConfigPath = path.resolve(process.cwd(), values.config);
37
+ const absoluteConfigPath = path.resolve(process.cwd(), configArgPath);
43
38
  const configDir = path.dirname(absoluteConfigPath);
44
39
 
45
40
  // ---------------------------------------------------------------------------
@@ -60,9 +55,13 @@ async function run() {
60
55
  const exclude = config.exclude_pattern ?? [];
61
56
 
62
57
  // Collect all .css files in the scan directory, excluding the token file itself
58
+ // and any file under a directory whose name starts with "TODO" (work-in-progress folders)
63
59
  const files = [];
64
60
  for await (const entry of glob(path.join(checkdir, '/**/*.css'))) {
65
- if (!entry.endsWith(custom_prop_filename)) {
61
+ const relDirSegments = path.relative(checkdir, path.dirname(entry)).split(path.sep);
62
+ const isInTodoDir = relDirSegments.some(segment => /^todo/i.test(segment));
63
+
64
+ if (!entry.endsWith(custom_prop_filename) && !isInTodoDir) {
66
65
  files.push(entry);
67
66
  }
68
67
  }
@@ -5,7 +5,7 @@
5
5
  // All paths are relative to this config file (not to the CWD).
6
6
 
7
7
  // import { homedir } from 'os';
8
- import path from 'path';
8
+ // import path from 'path';
9
9
 
10
10
  // Path to the design token source files.
11
11
  // You can use an absolute path, a relative path, or build it programmatically.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@massimo-cassandro/minimo",
3
- "version": "1.16.2",
3
+ "version": "1.17.1",
4
4
  "description": "Light css framework & utilities",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -1,8 +1,8 @@
1
1
  .inner-nav-main, .inner-nav {
2
2
  display: flex;
3
- gap: var(--size-lg);
3
+ gap: var(--inner-nav-gap);
4
4
  justify-content: flex-end;
5
- margin-block: var(--size-base);
5
+ margin-block: var(--inner-nav-margin-block);
6
6
  /* text-align: end; */
7
7
 
8
8
  @media print {
@@ -0,0 +1,15 @@
1
+ export default {
2
+ 'inner-nav': {
3
+ gap: {
4
+ $type: 'dimension',
5
+ $value: '{size.lg}'
6
+ },
7
+ margin: {
8
+ block: {
9
+ $type: 'dimension',
10
+ $value: '{size.base}'
11
+ }
12
+ },
13
+ }
14
+ };
15
+