@massimo-cassandro/minimo 1.19.0 → 1.19.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.
- package/design-tokens/README.md +195 -0
- package/design-tokens/tokens/src/components/unsplash-page/unsplash-page.minimo.tokens.jsonc +69 -31
- package/design-tokens/{utilities/tokens-config-sample.mjs → tokens-config-sample.mjs} +10 -10
- package/dev-tools/starter-kit/starter-install.sh +1 -1
- package/package.json +6 -2
- package/snippets/error-pages/error-pages.js +3 -2
- package/src/components/unsplash-page/unsplash-page.minimo.tokens.mjs +78 -39
- package/src/components/unsplash-page/unsplash-page.module.css +25 -6
- package/src/custom-properties.css +8 -1
- package/src/minimo.css +1 -1
- package/src/web-components/s-datatable-component/s-datatable-component.js +4 -1
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/index.js +0 -92
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/src/charts/hbars.js +0 -356
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/src/charts/pie.js +0 -245
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/src/charts/radial-bars.js +0 -177
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/src/charts/rating-display.js +0 -835
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/src/charts/settimanale-mensile-src/costruzione-assi.js +0 -212
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/src/charts/settimanale-mensile-src/costruzione-linee.js +0 -101
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/src/charts/settimanale-mensile-src/defaults.js +0 -185
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/src/charts/settimanale-mensile-src/display-current.js +0 -27
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/src/charts/settimanale-mensile-src/grid-areas.js +0 -129
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/src/charts/settimanale-mensile-src/parse-opts.js +0 -64
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/src/charts/settimanale-mensile-src/paths-setup.js +0 -73
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/src/charts/settimanale-mensile.js +0 -126
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/src/charts/signal-bars.js +0 -290
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/src/week-utils.js +0 -122
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/browser-test/src/hbars-test.js +0 -52
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/browser-test/src/mcn-test.js +0 -74
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/browser-test/src/pie-test.js +0 -16
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/browser-test/src/radial-bars-test.js +0 -48
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/browser-test/src/settimanale-mensile-dati-settimanale.js +0 -426
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/browser-test/src/settimanale-mensile-test.js +0 -260
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/browser-test/src/signal-bars-test.js +0 -64
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/node-test/node-test.mjs +0 -86
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/node-test/src/hBars-node-test.mjs +0 -40
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/node-test/src/lines-node-test.mjs +0 -73
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/node-test/src/mcn-node-test.mjs +0 -64
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/node-test/src/pie-node-test.mjs +0 -12
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/node-test/src/radialsBar-node-test.mjs +0 -44
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/node-test/src/settimanale-mensile-node-test.mjs +0 -258
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/node-test/src/signalBars-node-test.mjs +0 -36
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/test-readme.md +0 -24
- package/charts/TODO charts/1a-vers DA RIFATTORIZZARE/test/textToPath-test.mjs +0 -14
- package/charts/TODO charts/???/InfoBox.js +0 -456
- package/charts/TODO charts/???/README-upg OLD/342/206/222NEW.md" +0 -53
- package/charts/TODO charts/???/README.md +0 -1
- package/charts/TODO charts/???/TODO.md +0 -39
- package/charts/TODO charts/???/base-cfg.js +0 -66
- package/charts/TODO charts/???/rating-displayOLD.js +0 -837
- package/charts/TODO charts/docs/TODO.md +0 -1
- package/charts/TODO charts/docs/costruzione display rating.md +0 -145
- package/charts/TODO charts/test/node-test.mjs +0 -92
- package/charts/TODO charts/test/test-readme.md +0 -23
- package/charts/TODO charts/test/test-src/rating-display-extra-test.js +0 -132
- package/charts/TODO charts/test/test-src/rating-display-test.js +0 -155
- package/charts/TODO charts/test/textToPath-test.mjs +0 -14
- package/charts/TODO.md +0 -7
- package/charts/src/node-helpers/TODO.md +0 -2
- package/dev-tools/starter-kit/TODO.md +0 -135
- package/src/components/TODO form-multiselect/form-multiselect.css +0 -40
- package/src/components/TODO form-multiselect/form-multiselect.js +0 -83
- package/src/components/TODO vanilla-cookie-consent/cookie-consent.css +0 -20
- package/src/components/TODO vanilla-cookie-consent/cookie-consent.js +0 -76
- package/src/components/TODO vanilla-cookie-consent/render-cookie-list.js +0 -32
- package/src/components/TODO vanilla-cookie-consent/src/cookie-list.js +0 -85
- package/src/components/TODO vanilla-cookie-consent/src/it-translation.js +0 -38
- package/src/components/TODO vanilla-cookie-consent/src/run-analytics.js +0 -54
- package/src/components/TODO vanilla-cookie-consent/src/run-recaptcha.js +0 -71
- package/src/components/autocomplete/TODO.md +0 -4
- package/src/web-components/TODO json-table/README.md +0 -67
- package/src/web-components/TODO json-table/TODO.md +0 -12
- package/src/web-components/TODO json-table/_work/OLD/docs/custom-props-list.md +0 -69
- package/src/web-components/TODO json-table/_work/OLD/script/create-css-custom-props-doc.mjs +0 -113
- package/src/web-components/TODO json-table/_work/OLD/script/src/custom-props-end.md +0 -4
- package/src/web-components/TODO json-table/_work/OLD/script/src/custom-props-start.md +0 -30
- package/src/web-components/TODO json-table/_work/OLD/src/css/icons.module.css +0 -22
- package/src/web-components/TODO json-table/_work/OLD/src/css/info.module.css +0 -42
- package/src/web-components/TODO json-table/_work/OLD/src/css/main-wrapper.module.css +0 -4
- package/src/web-components/TODO json-table/_work/OLD/src/css/table.module.css +0 -154
- package/src/web-components/TODO json-table/_work/OLD/src/css/utility.module.css +0 -9
- package/src/web-components/TODO json-table/_work/OLD/src/icons/false.svg +0 -1
- package/src/web-components/TODO json-table/_work/OLD/src/icons/search-arrows.svg +0 -1
- package/src/web-components/TODO json-table/_work/OLD/src/icons/true.svg +0 -1
- package/src/web-components/TODO json-table/_work/OLD/src/index.js +0 -56
- package/src/web-components/TODO json-table/_work/OLD/src/js/default-columns-data-types.js +0 -172
- package/src/web-components/TODO json-table/_work/OLD/src/js/defaults.js +0 -156
- package/src/web-components/TODO json-table/_work/OLD/src/js/info-section.js +0 -31
- package/src/web-components/TODO json-table/_work/OLD/src/js/listeners.js +0 -17
- package/src/web-components/TODO json-table/_work/OLD/src/js/main-builder.js +0 -26
- package/src/web-components/TODO json-table/_work/OLD/src/js/parse-params.js +0 -121
- package/src/web-components/TODO json-table/_work/OLD/src/js/set-column-classname.js +0 -22
- package/src/web-components/TODO json-table/_work/OLD/src/js/table-builder.js +0 -64
- package/src/web-components/TODO json-table/_work/OLD/src/js/table-foot.js +0 -8
- package/src/web-components/TODO json-table/_work/OLD/src/js/table-head.js +0 -47
- package/src/web-components/TODO json-table/_work/OLD/src/js/table-row.js +0 -83
- package/src/web-components/TODO json-table/_work/OLD/src/js/utilities.js +0 -5
- package/src/web-components/TODO json-table/_work/__json-table-react/index.js +0 -4
- package/src/web-components/TODO json-table/_work/__json-table-react/src/build-page-array.js +0 -73
- package/src/web-components/TODO json-table/_work/__json-table-react/src/columns-data-types.js +0 -73
- package/src/web-components/TODO json-table/_work/__json-table-react/src/defaults.js +0 -50
- package/src/web-components/TODO json-table/_work/__json-table-react/src/download-excel.js +0 -156
- package/src/web-components/TODO json-table/_work/__json-table-react/src/set-className.js +0 -19
- package/src/web-components/TODO json-table/_work/__json-table-react/src/set-download-filename.js +0 -17
- package/src/web-components/TODO json-table/_work/__json-table-react/src/table-to-csv.js +0 -48
- package/src/web-components/TODO json-table/_work/archived/table-to-csv.js +0 -48
- package/src/web-components/TODO json-table/_work/arrow.svg +0 -3
- package/src/web-components/TODO json-table/_work/da decidere/get-cell-data.js +0 -18
- package/src/web-components/TODO json-table/_work/download-button.js +0 -29
- package/src/web-components/TODO json-table/_work/download-excel.js +0 -155
- package/src/web-components/TODO json-table/_work/pagination-array-builder.js +0 -73
- package/src/web-components/TODO json-table/_work/pagination.js +0 -37
- package/src/web-components/TODO json-table/_work/set-download-filename.js +0 -19
- package/src/web-components/TODO json-table/_work/table-info.js +0 -24
- package/src/web-components/TODO json-table/demo/README.md +0 -66
- package/src/web-components/TODO json-table/demo/assets/link-simple.svg +0 -1
- package/src/web-components/TODO json-table/demo/demo-data/json-static-table-demo-data.js +0 -512
- package/src/web-components/TODO json-table/demo/demo.css +0 -32
- package/src/web-components/TODO json-table/demo/demo.js +0 -24
- package/src/web-components/TODO json-table/demo/js/demo-ajax-table.js +0 -165
- package/src/web-components/TODO json-table/demo/js/demo-static-table.js +0 -180
- package/src/web-components/TODO json-table/demo/webpack-modules/css-rules.mjs +0 -122
- package/src/web-components/TODO json-table/demo/webpack-modules/get-jsConfig-aliases.mjs +0 -33
- package/src/web-components/TODO json-table/demo/webpack-modules/svg-rules.mjs +0 -108
- package/src/web-components/TODO json-table/demo/webpack-modules/svgo.config.mjs +0 -26
- package/src/web-components/TODO json-table/demo/webpack.config.mjs +0 -333
- package/src/web-components/TODO json-table/docs/custom-props-list.md +0 -74
- package/src/web-components/TODO json-table/docs-builder/create-css-custom-props-doc.mjs +0 -157
- package/src/web-components/TODO json-table/docs-builder/src/custom-props-end.md +0 -6
- package/src/web-components/TODO json-table/docs-builder/src/custom-props-start.md +0 -29
- package/src/web-components/TODO json-table/src/TODO.md +0 -1
- package/src/web-components/TODO json-table/src/__json-table-react/build-page-array.js +0 -73
- package/src/web-components/TODO json-table/src/__json-table-react/columns-data-types.js +0 -73
- package/src/web-components/TODO json-table/src/__json-table-react/defaults.js +0 -50
- package/src/web-components/TODO json-table/src/__json-table-react/download-excel.js +0 -156
- package/src/web-components/TODO json-table/src/__json-table-react/set-className.js +0 -19
- package/src/web-components/TODO json-table/src/__json-table-react/set-download-filename.js +0 -17
- package/src/web-components/TODO json-table/src/__json-table-react/table-to-csv.js +0 -48
- package/src/web-components/TODO json-table/src/css/custom-media.css +0 -16
- package/src/web-components/TODO json-table/src/css/icons.module.css +0 -22
- package/src/web-components/TODO json-table/src/css/info-section.module.css +0 -78
- package/src/web-components/TODO json-table/src/css/main-builder.module.css +0 -6
- package/src/web-components/TODO json-table/src/css/table.module.css +0 -172
- package/src/web-components/TODO json-table/src/css/utility.module.css +0 -9
- package/src/web-components/TODO json-table/src/icons/arrow-down-bold.svg +0 -1
- package/src/web-components/TODO json-table/src/icons/false.svg +0 -1
- package/src/web-components/TODO json-table/src/icons/true.svg +0 -1
- package/src/web-components/TODO json-table/src/index.js +0 -125
- package/src/web-components/TODO json-table/src/js/default-columns-data-types.js +0 -172
- package/src/web-components/TODO json-table/src/js/defaults.js +0 -510
- package/src/web-components/TODO json-table/src/js/get-ajax-data.js +0 -72
- package/src/web-components/TODO json-table/src/js/info-section.js +0 -39
- package/src/web-components/TODO json-table/src/js/init-ajax-table.js +0 -30
- package/src/web-components/TODO json-table/src/js/init-static-table.js +0 -18
- package/src/web-components/TODO json-table/src/js/main-builder.js +0 -87
- package/src/web-components/TODO json-table/src/js/parse-data-row.js +0 -123
- package/src/web-components/TODO json-table/src/js/parse-params.js +0 -118
- package/src/web-components/TODO json-table/src/js/set-search-listener.js +0 -62
- package/src/web-components/TODO json-table/src/js/set-sort-listeners.js +0 -115
- package/src/web-components/TODO json-table/src/js/static-data-sorting.js +0 -23
- package/src/web-components/TODO json-table/src/js/table-builder.js +0 -45
- package/src/web-components/TODO json-table/src/js/table-row.js +0 -43
- package/src/web-components/TODO json-table/src/js/table-tfoot.js +0 -9
- package/src/web-components/TODO json-table/src/js/table-thead.js +0 -91
- package/src/web-components/TODO json-table/src/js/update-info.js +0 -42
- package/src/web-components/TODO json-table/src/js/utilities.js +0 -5
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# Design Tokens
|
|
2
|
+
|
|
3
|
+
<!-- TODO intro -->
|
|
4
|
+
|
|
5
|
+
## Using design tokens
|
|
6
|
+
|
|
7
|
+
<!-- TODO modalità d'uso (da tokens penpots o figma, con o snza merge css ecc...) -->
|
|
8
|
+
|
|
9
|
+
## Design Token Utilities
|
|
10
|
+
|
|
11
|
+
<!-- TODO rivedere e semplificare -->
|
|
12
|
+
|
|
13
|
+
A set of Node.js scripts for managing CSS design tokens in a project. Built on top of [Style Dictionary v5](https://styledictionary.com/).
|
|
14
|
+
|
|
15
|
+
### Scripts
|
|
16
|
+
|
|
17
|
+
| Script | Purpose |
|
|
18
|
+
|---|---|
|
|
19
|
+
| `build-tokens.mjs` | Generates a CSS custom properties file from design token source files |
|
|
20
|
+
| `check-unresolved-custom-props.mjs` | Scans CSS files and reports any `var(--...)` references not found in the generated token file |
|
|
21
|
+
|
|
22
|
+
Both scripts share the same config file, passed via `--config`.
|
|
23
|
+
|
|
24
|
+
### Setup
|
|
25
|
+
|
|
26
|
+
The scripts are intended to be used as npm scripts. Add them to your `package.json`:
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build tokens": "npx buildTokens --config ./path/to/tokens-config.mjs",
|
|
32
|
+
"check unresolved props": "npx checkUnresolvedProps --config ./path/to/tokens-config.mjs"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Dependencies
|
|
38
|
+
|
|
39
|
+
The following packages must be present in your project:
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"style-dictionary": "^5",
|
|
44
|
+
"stylelint": "^16"
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Configuration file
|
|
49
|
+
|
|
50
|
+
Both scripts read a shared config file passed with `--config`. Use `tokens-config-sample.mjs` as a starting point.
|
|
51
|
+
|
|
52
|
+
Read comments inside the sample file for more info.
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### `build-tokens.mjs`
|
|
56
|
+
|
|
57
|
+
Reads design token source files and generates:
|
|
58
|
+
- A **CSS file** containing all tokens as custom properties inside `:root { ... }`
|
|
59
|
+
- Optionally, one or more **W3C DTCG JSON/JSONC** files to import into Penpot/Figma (use in Figma requires a plugin).
|
|
60
|
+
|
|
61
|
+
#### Usage
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
npx buildTokens --config ./path/to/tokens-config.mjs
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
#### Source files
|
|
68
|
+
|
|
69
|
+
The `source` array accepts any combination of:
|
|
70
|
+
- Concrete file paths: `'./tokens/colors.jsonc'`
|
|
71
|
+
- Glob patterns: `'./tokens/**/*.{json,jsonc,mjs}'`
|
|
72
|
+
|
|
73
|
+
**Supported formats:**
|
|
74
|
+
- `.json` / `.jsonc` — parsed directly as token data
|
|
75
|
+
- `.mjs` / `.js` — imported as ES modules; must export a W3C DTCG-compliant object as `default`
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
#### Token file format (JS example)
|
|
79
|
+
|
|
80
|
+
When using `.mjs` source files, export a default object following the [W3C Design Token Community Group format](https://design-tokens.github.io/community-group/format/):
|
|
81
|
+
|
|
82
|
+
```js
|
|
83
|
+
// colors.tokens.mjs
|
|
84
|
+
export default {
|
|
85
|
+
color: {
|
|
86
|
+
brand: {
|
|
87
|
+
primary: { $type: 'color', $value: '#0057FF' },
|
|
88
|
+
secondary: { $type: 'color', $value: '#FF6B00' },
|
|
89
|
+
},
|
|
90
|
+
neutral: {
|
|
91
|
+
'100': { $type: 'color', $value: '#F5F5F5' },
|
|
92
|
+
'900': { $type: 'color', $value: '#1A1A1A' },
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
semantic: {
|
|
96
|
+
color: {
|
|
97
|
+
text: {
|
|
98
|
+
primary: { $type: 'color', $value: '{color.neutral.900}' }, // alias
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
The main advantage of `.mjs` over `.json` is the ability to use JavaScript variables, comments, and computed values within the token definition.
|
|
106
|
+
|
|
107
|
+
Values can be expressions like `"{size.base} * .25"`, see `tokens-config-sample.mjs` for more info.
|
|
108
|
+
|
|
109
|
+
#### Custom transforms
|
|
110
|
+
|
|
111
|
+
The following transforms are registered on top of Style Dictionary's built-ins:
|
|
112
|
+
|
|
113
|
+
| Name | Type | Description |
|
|
114
|
+
|---|---|---|
|
|
115
|
+
| `shadow/css` | value | Converts shadow objects (single or array) to a `box-shadow` CSS string. px values are converted to rem. |
|
|
116
|
+
| `size/pxToRem-smart` | value | Converts `dimension` token values from px to rem. Skips values already in rem. |
|
|
117
|
+
| `color/css-modern` | value | Color passthrough with transitive alias support. |
|
|
118
|
+
| `gradient/css` | value | Converts gradient objects to CSS `linear-gradient`, `radial-gradient` or `conic-gradient`. |
|
|
119
|
+
| `composite/css` | value | Converts `border`, `outline`, `transition` and `animation` objects to their CSS shorthand. |
|
|
120
|
+
| `typography/css` | value | Typography passthrough — the format handles exploding the value into individual properties. |
|
|
121
|
+
|
|
122
|
+
#### CSS output
|
|
123
|
+
|
|
124
|
+
All tokens are output as CSS custom properties inside `:root`, sorted alphabetically.
|
|
125
|
+
|
|
126
|
+
Typography tokens are expanded into multiple properties:
|
|
127
|
+
- `--token-name-font` — a `font` shorthand (when both `fontSize` and `fontFamily` are present)
|
|
128
|
+
- `--token-name-letter-spacing`, `--token-name-text-transform`, `--token-name-text-decoration` — individual properties
|
|
129
|
+
|
|
130
|
+
The generated file is linted and auto-fixed with stylelint using the config specified in `stylelintConfigPath`.
|
|
131
|
+
|
|
132
|
+
#### Penpot output
|
|
133
|
+
|
|
134
|
+
When `penpotBuildPath` is set, the script also generates W3C DTCG token files for import into Penpot via the [Design Tokens plugin](https://penpot.app/penpot-files/design-tokens).
|
|
135
|
+
|
|
136
|
+
**Single file** (`penpotDestFile` is a string):
|
|
137
|
+
```
|
|
138
|
+
penpotBuildPath/tokens.jsonc ← all tokens in one file
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**One file per source** (`penpotDestFile` is `null` or omitted):
|
|
142
|
+
```
|
|
143
|
+
penpotBuildPath/colors.tokens.jsonc
|
|
144
|
+
penpotBuildPath/spacing.tokens.jsonc
|
|
145
|
+
penpotBuildPath/typography.tokens.jsonc
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
The `penpotFormat` option controls the output:
|
|
149
|
+
|
|
150
|
+
| Value | Extension | Disclaimer header |
|
|
151
|
+
|---|---|---|
|
|
152
|
+
| `'jsonc'` | `.jsonc` | Yes |
|
|
153
|
+
| `'json'` | `.json` | No |
|
|
154
|
+
|
|
155
|
+
Alias references (`{color.brand.primary}`) are preserved in the output so Penpot maintains token links between primitive and semantic tokens.
|
|
156
|
+
|
|
157
|
+
> Penpot token files intentionally use a minimal set of transforms (no px→rem conversion, no shorthand expansion) because Penpot expects original values and structured objects, not resolved CSS strings.
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
### `check-unresolved-custom-props.mjs`
|
|
162
|
+
|
|
163
|
+
Scans all `.css` files in `dir_to_check` (recursively) and reports any `var(--...)` references that are not defined in the generated token CSS file or in any `extra_custom_props_files`.
|
|
164
|
+
|
|
165
|
+
Results are written to `unresolved-props.md` in the same directory as the config file.
|
|
166
|
+
|
|
167
|
+
#### Usage
|
|
168
|
+
|
|
169
|
+
```sh
|
|
170
|
+
npx checkUnresolvedProps --config ./path/to/tokens-config.mjs
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
#### Output
|
|
174
|
+
|
|
175
|
+
The script creates a `unresolved-props.md` file next to the config file. Each line links to the file and line number where the unresolved property is used:
|
|
176
|
+
|
|
177
|
+
```markdown
|
|
178
|
+
* [components.css :: 42](../src/components.css#L42) -> var(--color-action-hover)
|
|
179
|
+
* [layout.css :: 17](../src/layout.css#L17) -> var(--spacing-missing)
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
In VS Code, Option/Alt-clicking on the URL opens the file at the required line.
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
#### Excluding properties
|
|
186
|
+
|
|
187
|
+
Use `exclude_pattern` to suppress false positives — for example, internal/private custom properties that are defined dynamically or inline:
|
|
188
|
+
|
|
189
|
+
```js
|
|
190
|
+
// skips all custom props starting with `--_` or `--js-`
|
|
191
|
+
exclude_pattern: [
|
|
192
|
+
/^--_/,
|
|
193
|
+
/^--js-/,
|
|
194
|
+
]
|
|
195
|
+
```
|
|
@@ -40,15 +40,23 @@
|
|
|
40
40
|
"$value": "unset"
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
|
-
"
|
|
43
|
+
"h1": {
|
|
44
|
+
"color": {
|
|
45
|
+
"$type": "color",
|
|
46
|
+
"$value": "{uspg.text.color}"
|
|
47
|
+
},
|
|
44
48
|
"font": {
|
|
45
49
|
"size": {
|
|
46
50
|
"$type": "dimension",
|
|
47
|
-
"$value": "{font.size.
|
|
51
|
+
"$value": "{font.size.xl}"
|
|
48
52
|
},
|
|
49
53
|
"weight": {
|
|
50
54
|
"$type": "fontWeight",
|
|
51
|
-
"$value": "{font.weight.
|
|
55
|
+
"$value": "{font.weight.bold}"
|
|
56
|
+
},
|
|
57
|
+
"variation-settings": {
|
|
58
|
+
"$type": "string",
|
|
59
|
+
"$value": "unset"
|
|
52
60
|
}
|
|
53
61
|
},
|
|
54
62
|
"line-height": {
|
|
@@ -56,23 +64,73 @@
|
|
|
56
64
|
"$value": "{line-height.xs}"
|
|
57
65
|
}
|
|
58
66
|
},
|
|
59
|
-
"
|
|
67
|
+
"link": {
|
|
60
68
|
"color": {
|
|
61
69
|
"$type": "color",
|
|
62
|
-
"$value": "
|
|
70
|
+
"$value": "#fc0"
|
|
71
|
+
},
|
|
72
|
+
"decoration": {
|
|
73
|
+
"$type": "string",
|
|
74
|
+
"$value": "none"
|
|
75
|
+
},
|
|
76
|
+
"visited": {
|
|
77
|
+
"color": {
|
|
78
|
+
"$type": "color",
|
|
79
|
+
"$value": "#C711FF"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"hover": {
|
|
83
|
+
"color": {
|
|
84
|
+
"$type": "color",
|
|
85
|
+
"$value": "{uspg.bg.color}"
|
|
86
|
+
},
|
|
87
|
+
"background": {
|
|
88
|
+
"color": {
|
|
89
|
+
"$type": "color",
|
|
90
|
+
"$value": "transparent"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"decoration": {
|
|
94
|
+
"$type": "string",
|
|
95
|
+
"$value": "underline"
|
|
96
|
+
}
|
|
63
97
|
},
|
|
98
|
+
"active": {
|
|
99
|
+
"color": {
|
|
100
|
+
"$type": "color",
|
|
101
|
+
"$value": "#F49C29"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"focus": {
|
|
105
|
+
"outline": {
|
|
106
|
+
"width": {
|
|
107
|
+
"$type": "dimension",
|
|
108
|
+
"$value": "2px"
|
|
109
|
+
},
|
|
110
|
+
"style": {
|
|
111
|
+
"$type": "string",
|
|
112
|
+
"$value": "solid"
|
|
113
|
+
},
|
|
114
|
+
"color": {
|
|
115
|
+
"$type": "color",
|
|
116
|
+
"$value": "{uspg.link.color}"
|
|
117
|
+
},
|
|
118
|
+
"offset": {
|
|
119
|
+
"$type": "dimension",
|
|
120
|
+
"$value": "2px"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"credits": {
|
|
64
126
|
"font": {
|
|
65
127
|
"size": {
|
|
66
128
|
"$type": "dimension",
|
|
67
|
-
"$value": "{font.size.
|
|
129
|
+
"$value": "{font.size.xs}"
|
|
68
130
|
},
|
|
69
131
|
"weight": {
|
|
70
132
|
"$type": "fontWeight",
|
|
71
|
-
"$value": "{font.weight.
|
|
72
|
-
},
|
|
73
|
-
"variation-settings": {
|
|
74
|
-
"$type": "string",
|
|
75
|
-
"$value": "unset"
|
|
133
|
+
"$value": "{font.weight.regular}"
|
|
76
134
|
}
|
|
77
135
|
},
|
|
78
136
|
"line-height": {
|
|
@@ -102,26 +160,6 @@
|
|
|
102
160
|
}
|
|
103
161
|
}
|
|
104
162
|
},
|
|
105
|
-
"link": {
|
|
106
|
-
"color": {
|
|
107
|
-
"$type": "color",
|
|
108
|
-
"$value": "#fc0"
|
|
109
|
-
},
|
|
110
|
-
"decoration": {
|
|
111
|
-
"$type": "string",
|
|
112
|
-
"$value": "none"
|
|
113
|
-
},
|
|
114
|
-
"hover": {
|
|
115
|
-
"color": {
|
|
116
|
-
"$type": "color",
|
|
117
|
-
"$value": "#fc0"
|
|
118
|
-
},
|
|
119
|
-
"decoration": {
|
|
120
|
-
"$type": "string",
|
|
121
|
-
"$value": "underline"
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
163
|
"loader": {
|
|
126
164
|
"color": {
|
|
127
165
|
"$type": "color",
|
|
@@ -10,14 +10,10 @@
|
|
|
10
10
|
// Path to the design token source files.
|
|
11
11
|
// You can use an absolute path, a relative path, or build it programmatically.
|
|
12
12
|
|
|
13
|
-
// Example using a local node_modules package (JS source files)
|
|
14
|
-
const minimo_path = '../../node_modules/@massimo-cassandro/minimo/design-tokens-src';
|
|
15
13
|
|
|
16
|
-
// Alternative: pre-built JSONC files from the same package
|
|
17
|
-
// const minimo_path = '../../node_modules/@massimo-cassandro/minimo/design-tokens';
|
|
18
14
|
|
|
19
|
-
//
|
|
20
|
-
|
|
15
|
+
// minimo package path in node_modules
|
|
16
|
+
const minimo_path = '../../node_modules/@massimo-cassandro/minimo';
|
|
21
17
|
|
|
22
18
|
const config = {
|
|
23
19
|
|
|
@@ -42,11 +38,15 @@ const config = {
|
|
|
42
38
|
// OK: `${minimo_path}/**/*.{json,mjs}`
|
|
43
39
|
// NO: path.join(minimo_path, '/**/*.{json,mjs}')
|
|
44
40
|
source: [
|
|
45
|
-
`${minimo_path}/**/*.{jsonc
|
|
46
|
-
|
|
41
|
+
`${minimo_path}/design-tokens/_src/**/*.tokens.{mjs,jsonc}`, // main tokens
|
|
42
|
+
`${minimo_path}/src/**/*.tokens.{mjs,jsonc}`, // components tokens
|
|
47
43
|
|
|
48
44
|
// optional extra token source (in this example, openProps, https://open-props.style/)
|
|
49
45
|
// '../../node_modules/open-props/open-props.style-dictionary-tokens.json',
|
|
46
|
+
|
|
47
|
+
// your project tokens
|
|
48
|
+
'./project-tokens/*.{js,mjs,jsonc,json}',
|
|
49
|
+
|
|
50
50
|
],
|
|
51
51
|
|
|
52
52
|
// ---------------------------------------------------------------------------
|
|
@@ -61,12 +61,12 @@ const config = {
|
|
|
61
61
|
|
|
62
62
|
// Output directory for the Penpot design token files.
|
|
63
63
|
// Set to null (or omit) to disable json output entirely.
|
|
64
|
-
penpotBuildPath: './path/to/generated/design-tokens-dir',
|
|
64
|
+
penpotBuildPath: null || './path/to/generated/design-tokens-dir',
|
|
65
65
|
|
|
66
66
|
// Base name (without extension) for the aggregated Penpot output file.
|
|
67
67
|
// The extension is added automatically based on penpotFormat.
|
|
68
68
|
// Set to null (or omit) to generate one file per .mjs source file instead.
|
|
69
|
-
penpotDestFile: 'tokens',
|
|
69
|
+
penpotDestFile: null || 'tokens',
|
|
70
70
|
|
|
71
71
|
// How to handle math expressions in dimension token $values (e.g. "{size.base} * .25"):
|
|
72
72
|
// 'keep' write the expression unchanged
|
|
@@ -218,7 +218,7 @@ for FILE in "${MINIMO_ROOT_CSS_DIR}"/*.css; do
|
|
|
218
218
|
done
|
|
219
219
|
|
|
220
220
|
# copia tokens.config.mjs
|
|
221
|
-
safe_cat "${BASE_URL}/../../design-tokens/tokens-config.mjs" "${TEMPLATE_DIR_NAME}/css/tokens-config.mjs"
|
|
221
|
+
safe_cat "${BASE_URL}/../../design-tokens/tokens-config-sample.mjs" "${TEMPLATE_DIR_NAME}/css/tokens-config.mjs"
|
|
222
222
|
|
|
223
223
|
# template delle entry css (globale/di pagina e critical): ogni entry deve
|
|
224
224
|
# importare direttamente custom-properties.css (vedi commenti nei file stessi)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@massimo-cassandro/minimo",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.1",
|
|
4
4
|
"description": "Light css framework & utilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -56,12 +56,16 @@
|
|
|
56
56
|
"files": [
|
|
57
57
|
"./index.js",
|
|
58
58
|
"src/**/*.{js,mjs,css,svg,md}",
|
|
59
|
+
"design-tokens/README.md",
|
|
60
|
+
"design-tokens/tokens-config-sample.mjs",
|
|
59
61
|
"design-tokens/tokens/**/*.{tokens.json,tokens.jsonc}",
|
|
60
62
|
"design-tokens/_src/**/*.{tokens.json,tokens.jsonc,mjs,js,md}",
|
|
61
63
|
"design-tokens/utilities/**/*.{mjs,md}",
|
|
62
64
|
"charts/**/*.{js,mjs,md}",
|
|
63
65
|
"dev-tools/**/*",
|
|
64
|
-
"snippets/**/*"
|
|
66
|
+
"snippets/**/*",
|
|
67
|
+
"!**/TODO*/**",
|
|
68
|
+
"!**/TODO*"
|
|
65
69
|
],
|
|
66
70
|
"peerDependencies": {
|
|
67
71
|
"@svgdotjs/svg.js": "^3.2.7",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
import { unsplashPage } from '@massimo-cassandro/minimo
|
|
3
|
+
import { unsplashPage } from '@massimo-cassandro/minimo';
|
|
4
|
+
// import './error-pages.css';
|
|
4
5
|
|
|
5
6
|
const errCode = document.documentElement.dataset.errCode || '500',
|
|
6
7
|
errText = document.documentElement.dataset.errText,
|
|
@@ -27,7 +28,7 @@ unsplashPage({
|
|
|
27
28
|
targetElement : document.getElementById('root'),
|
|
28
29
|
className : 'error-page',
|
|
29
30
|
unsplashDataUrl : url,
|
|
30
|
-
utmSource : '
|
|
31
|
+
utmSource : 'marketing.bluvacanze.it',
|
|
31
32
|
title : errors[errCode]?.title ?? errText,
|
|
32
33
|
text : `(${errCode} ${errText})`,
|
|
33
34
|
backLink : errCode !== '503'? 'Torna alla <a href="/">Home</a>' : '',
|
|
@@ -37,49 +37,112 @@ export default {
|
|
|
37
37
|
}
|
|
38
38
|
}, // end base setup
|
|
39
39
|
|
|
40
|
-
//
|
|
41
|
-
|
|
40
|
+
// title
|
|
41
|
+
h1: {
|
|
42
|
+
color: {
|
|
43
|
+
$type: 'color',
|
|
44
|
+
$value: '{uspg.text.color}'
|
|
45
|
+
},
|
|
42
46
|
font: {
|
|
43
47
|
size: {
|
|
44
48
|
$type: 'dimension',
|
|
45
|
-
$value: '{font.size.
|
|
49
|
+
$value: '{font.size.xl}'
|
|
46
50
|
},
|
|
47
51
|
weight: {
|
|
48
52
|
$type: 'fontWeight',
|
|
49
|
-
$value: '{font.weight.
|
|
53
|
+
$value: '{font.weight.bold}'
|
|
50
54
|
},
|
|
55
|
+
'variation-settings': {
|
|
56
|
+
$type: 'string',
|
|
57
|
+
$value: 'unset'
|
|
58
|
+
}
|
|
51
59
|
},
|
|
52
60
|
'line-height': {
|
|
53
61
|
$type: 'number',
|
|
54
62
|
$value: '{line-height.xs}'
|
|
55
63
|
},
|
|
56
|
-
}, // end
|
|
64
|
+
}, // end h1
|
|
57
65
|
|
|
58
|
-
|
|
59
|
-
|
|
66
|
+
|
|
67
|
+
// links
|
|
68
|
+
link: {
|
|
60
69
|
color: {
|
|
61
70
|
$type: 'color',
|
|
62
|
-
$value: '
|
|
71
|
+
$value: '#fc0'
|
|
72
|
+
},
|
|
73
|
+
decoration: {
|
|
74
|
+
$type: 'string',
|
|
75
|
+
$value: 'none'
|
|
76
|
+
},
|
|
77
|
+
visited: {
|
|
78
|
+
color: {
|
|
79
|
+
$type: 'color',
|
|
80
|
+
$value: '#C711FF'
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
hover: {
|
|
84
|
+
color: {
|
|
85
|
+
$type: 'color',
|
|
86
|
+
$value: '{uspg.bg.color}'
|
|
87
|
+
},
|
|
88
|
+
background: {
|
|
89
|
+
color: {
|
|
90
|
+
$type: 'color',
|
|
91
|
+
$value: 'transparent'
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
decoration: {
|
|
95
|
+
$type: 'string',
|
|
96
|
+
$value: 'underline'
|
|
97
|
+
},
|
|
63
98
|
},
|
|
99
|
+
active: {
|
|
100
|
+
color: {
|
|
101
|
+
$type: 'color',
|
|
102
|
+
$value: '#F49C29'
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
focus: {
|
|
106
|
+
outline: {
|
|
107
|
+
width: {
|
|
108
|
+
$value: '2px',
|
|
109
|
+
$type: 'dimension'
|
|
110
|
+
},
|
|
111
|
+
style: {
|
|
112
|
+
$value: 'solid',
|
|
113
|
+
$type: 'string'
|
|
114
|
+
},
|
|
115
|
+
color: {
|
|
116
|
+
$value: '{uspg.link.color}',
|
|
117
|
+
$type: 'color'
|
|
118
|
+
},
|
|
119
|
+
offset: {
|
|
120
|
+
$value: '2px',
|
|
121
|
+
$type: 'dimension'
|
|
122
|
+
},
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
// credit box
|
|
129
|
+
credits: {
|
|
64
130
|
font: {
|
|
65
131
|
size: {
|
|
66
132
|
$type: 'dimension',
|
|
67
|
-
$value: '{font.size.
|
|
133
|
+
$value: '{font.size.xs}'
|
|
68
134
|
},
|
|
69
135
|
weight: {
|
|
70
136
|
$type: 'fontWeight',
|
|
71
|
-
$value: '{font.weight.
|
|
137
|
+
$value: '{font.weight.regular}'
|
|
72
138
|
},
|
|
73
|
-
'variation-settings': {
|
|
74
|
-
$type: 'string',
|
|
75
|
-
$value: 'unset'
|
|
76
|
-
}
|
|
77
139
|
},
|
|
78
140
|
'line-height': {
|
|
79
141
|
$type: 'number',
|
|
80
142
|
$value: '{line-height.xs}'
|
|
81
143
|
},
|
|
82
|
-
}, // end
|
|
144
|
+
}, // end credits
|
|
145
|
+
|
|
83
146
|
|
|
84
147
|
// icons
|
|
85
148
|
icon: {
|
|
@@ -105,30 +168,6 @@ export default {
|
|
|
105
168
|
}
|
|
106
169
|
}, // end icons
|
|
107
170
|
|
|
108
|
-
// links
|
|
109
|
-
link: {
|
|
110
|
-
color: {
|
|
111
|
-
$type: 'color',
|
|
112
|
-
$value: '#fc0'
|
|
113
|
-
},
|
|
114
|
-
decoration: {
|
|
115
|
-
$type: 'string',
|
|
116
|
-
$value: 'none'
|
|
117
|
-
},
|
|
118
|
-
hover: {
|
|
119
|
-
color: {
|
|
120
|
-
$type: 'color',
|
|
121
|
-
$value: '#fc0'
|
|
122
|
-
},
|
|
123
|
-
decoration: {
|
|
124
|
-
$type: 'string',
|
|
125
|
-
$value: 'underline'
|
|
126
|
-
},
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
}, // end link
|
|
131
|
-
|
|
132
171
|
// loader
|
|
133
172
|
loader: {
|
|
134
173
|
color: {
|
|
@@ -68,16 +68,33 @@ html, body {
|
|
|
68
68
|
|
|
69
69
|
background-color: #333;
|
|
70
70
|
|
|
71
|
-
a
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
a {
|
|
72
|
+
&:is(:link, :visited) {
|
|
73
|
+
text-decoration: var(--uspg-link-decoration);
|
|
74
|
+
}
|
|
75
|
+
&:link {
|
|
76
|
+
color: var(--uspg-link-color);
|
|
77
|
+
}
|
|
78
|
+
&:visited {
|
|
79
|
+
color: var(--uspg-link-visited-color);
|
|
80
|
+
}
|
|
81
|
+
&:focus {
|
|
82
|
+
outline: none;
|
|
83
|
+
}
|
|
84
|
+
&:focus-visible {
|
|
85
|
+
outline: var(--uspg-link-focus-outline-width) var(--uspg-link-focus-outline-style) var(--uspg-link-focus-outline-color);
|
|
86
|
+
outline-offset: var(--uspg-link-focus-outline-offset);
|
|
87
|
+
}
|
|
75
88
|
@media (hover: hover) {
|
|
76
89
|
&:hover {
|
|
77
|
-
color: var(--uspg-link-hover-color
|
|
78
|
-
text-decoration: var(--uspg-link-hover-decoration
|
|
90
|
+
color: var(--uspg-link-hover-color);
|
|
91
|
+
text-decoration: var(--uspg-link-hover-decoration);
|
|
92
|
+
background-color: var(--uspg-link-hover-background-color);
|
|
79
93
|
}
|
|
80
94
|
}
|
|
95
|
+
&:active {
|
|
96
|
+
color: var(--uspg-link-active-color);
|
|
97
|
+
}
|
|
81
98
|
}
|
|
82
99
|
}
|
|
83
100
|
|
|
@@ -122,6 +139,8 @@ html, body {
|
|
|
122
139
|
justify-content: center;
|
|
123
140
|
width: 100%;
|
|
124
141
|
overflow: hidden;
|
|
142
|
+
|
|
143
|
+
|
|
125
144
|
}
|
|
126
145
|
|
|
127
146
|
.message, .credits {
|
|
@@ -358,10 +358,17 @@
|
|
|
358
358
|
--uspg-icon-fill-color: #333;
|
|
359
359
|
--uspg-icon-hover-box-bg: #fff;
|
|
360
360
|
--uspg-line-height: var(--line-height-sm);
|
|
361
|
+
--uspg-link-active-color: #f49c29;
|
|
361
362
|
--uspg-link-color: #fc0;
|
|
362
363
|
--uspg-link-decoration: none;
|
|
363
|
-
--uspg-link-
|
|
364
|
+
--uspg-link-focus-outline-color: var(--uspg-link-color);
|
|
365
|
+
--uspg-link-focus-outline-offset: .125rem;
|
|
366
|
+
--uspg-link-focus-outline-style: solid;
|
|
367
|
+
--uspg-link-focus-outline-width: .125rem;
|
|
368
|
+
--uspg-link-hover-background-color: transparent;
|
|
369
|
+
--uspg-link-hover-color: var(--uspg-bg-color);
|
|
364
370
|
--uspg-link-hover-decoration: underline;
|
|
371
|
+
--uspg-link-visited-color: #c711ff;
|
|
365
372
|
--uspg-loader-color: hsl(0deg 0% 100% / .6);
|
|
366
373
|
--uspg-text-color: #fff;
|
|
367
374
|
--z-index-overlay: 99;
|
package/src/minimo.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
/* @import '@src/fonts.css'; */
|
|
3
3
|
/* @import '@src/css/custom-media.css'; */ /* managed by postcss */
|
|
4
|
-
@import '@src/custom-properties.css';
|
|
4
|
+
/* @import '@src/custom-properties.css'; */ /* managed by postcss-jit-props */
|
|
5
5
|
|
|
6
6
|
@import '@minimo/css/reset.css';
|
|
7
7
|
@import '@minimo/css/layout-base.css';
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
+
|
|
3
|
+
/* global process */
|
|
4
|
+
|
|
2
5
|
import { DataTable } from 'simple-datatables';
|
|
3
6
|
|
|
4
7
|
import { parseCols } from './src/parse-cols.js';
|
|
@@ -219,7 +222,7 @@ class SimpleDatatableAdapter extends HTMLElement {
|
|
|
219
222
|
super();
|
|
220
223
|
// this.attachShadow({ mode: 'open' }); // commentare per light dom
|
|
221
224
|
|
|
222
|
-
if (!_deprecationWarned) {
|
|
225
|
+
if (!_deprecationWarned && process.env.NODE_ENV === 'development') {
|
|
223
226
|
_deprecationWarned = true;
|
|
224
227
|
// eslint-disable-next-line no-console
|
|
225
228
|
console.warn('[s-datatable] componente deprecato');
|