@massimo-cassandro/minimo 1.21.4 → 1.21.6
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.
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
"scripts": {
|
|
20
20
|
"progetto JS webpack DEV": "npm 'launchChrome' && NODE_ENV=development webpack serve --config ./webpack.config.mjs #--open-app-name 'Google Chrome'",
|
|
21
21
|
"progetto sf webpack DEV": "rm -rf ./public/_dev && NODE_ENV=development webpack --config ./frontend/webpack.config.mjs",
|
|
22
|
-
"webpack PROD": "NODE_ENV=production webpack --config ./webpack.config.mjs --stats minimal",
|
|
22
|
+
"webpack PROD": "npm run 'UPD-version' && NODE_ENV=production webpack --config ./webpack.config.mjs --stats minimal",
|
|
23
|
+
"eslint-check": "npx eslint app/ # or src/, frontend/src/ ...",
|
|
23
24
|
"create-favicons INIT": "npx create-favicons init",
|
|
24
25
|
"create-favicons": "npx create-favicons --dir=./src/favicons",
|
|
25
26
|
"UPD-version": "npx update-version # --log-file=./frontend/changelog.md --log-patch --pkg=alt/path/to/package.json",
|
|
@@ -30,7 +31,9 @@
|
|
|
30
31
|
"symfony server": "symfony serve --port=8100 --listen-ip=0.0.0.0 # symfony server:stop # http://192.168.1.135:8100 # -d (deamon): rimane aperto anche dopo la chiusra del terminale",
|
|
31
32
|
"node server": "node serve # richiede ‘npm i serve’",
|
|
32
33
|
"build tokens": "npx buildTokens --config ./path/to/tokens-config.mjs",
|
|
33
|
-
"check unresolved props": "npx checkUnresolvedProps --config ./path/to/tokens-config.mjs"
|
|
34
|
+
"check unresolved props": "npx checkUnresolvedProps --config ./path/to/tokens-config.mjs",
|
|
35
|
+
"npm-outdated": "npm outdated",
|
|
36
|
+
"npm-upd": "npm update --save"
|
|
34
37
|
},
|
|
35
38
|
"devDependencies": {},
|
|
36
39
|
"dependencies": {}
|
|
@@ -457,9 +457,12 @@ const config = {
|
|
|
457
457
|
...(current_year > start_year? [current_year] : [])
|
|
458
458
|
].join('-')
|
|
459
459
|
,vers = packageJson.version.split('.').slice(0,-1).join('.')
|
|
460
|
+
// ,vers = packageJson.version
|
|
460
461
|
;
|
|
461
462
|
|
|
462
|
-
|
|
463
|
+
const author = packageJson.author?.name ?? (packageJson.author ?? '');
|
|
464
|
+
|
|
465
|
+
return `/*! ${packageJson.name} v.${vers} - ${author} ${year} */`;
|
|
463
466
|
|
|
464
467
|
},
|
|
465
468
|
raw: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@massimo-cassandro/minimo",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.6",
|
|
4
4
|
"description": "Light css framework & utilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -88,8 +88,8 @@
|
|
|
88
88
|
}
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
|
-
"@massimo-cassandro/eslint-config": "^3.0.
|
|
92
|
-
"@massimo-cassandro/stylelint-config": "^2.3.
|
|
91
|
+
"@massimo-cassandro/eslint-config": "^3.0.14",
|
|
92
|
+
"@massimo-cassandro/stylelint-config": "^2.3.14",
|
|
93
93
|
"@types/node": "^26.2.0",
|
|
94
94
|
"jsdom": "^29.1.1",
|
|
95
95
|
"style-dictionary": "^5.5.1"
|
|
@@ -40,7 +40,10 @@ function closeDialog(el) {
|
|
|
40
40
|
*
|
|
41
41
|
* @param {Object} params
|
|
42
42
|
* @param {string | null} [params.dialogExtraClassName=null] - Extra class added to the dialog element.
|
|
43
|
+
* @param {string | DomBuilderItem[] | null} [params.content=null] - Plain text, HTML, or a domBuilder array.
|
|
43
44
|
* @param {string | null} [params.contentExtraClassName=null] - Extra class added to the content wrapper.
|
|
45
|
+
* @param {HTMLElement | null} [params.triggerElement=null] - Optional element that triggered the popup; when set, `aria-haspopup`, `aria-controls` and `aria-expanded` are managed on it.
|
|
46
|
+
* @param {boolean} [params.addFocus=true] - if true, dialog receives focus after opening
|
|
44
47
|
* @param {string | null} [params.headerExtraClassName=null] - Extra class added to the header wrapper.
|
|
45
48
|
* @param {string | null} [params.footerExtraClassName=null] - Extra class added to the footer wrapper.
|
|
46
49
|
* @param {string | number | null} [params.dialogWidth=null] - optional dialog width value - if set, overrides main css custom prop
|
|
@@ -50,14 +53,13 @@ function closeDialog(el) {
|
|
|
50
53
|
* @param {string | number | null} [params.dialogMinHeight=null] - optional dialog min-height value - if set, overrides main css custom prop
|
|
51
54
|
* @param {string | number | null} [params.dialogMaxHeight=null] - optional dialog max-height value - if set, overrides main css custom prop
|
|
52
55
|
* @param {string | null} [params.iframeUrl=null] - URL to load in an iframe.
|
|
53
|
-
* @param {string | DomBuilderItem[] | null} [params.content=null] - Plain text, HTML, or a domBuilder array.
|
|
54
56
|
* @param {string | null} [params.ajaxUrl=null] - URL for Ajax content loading.
|
|
57
|
+
* @param {((el: HTMLDialogElement) => void) | null} [params.openCallback=null] - Called with the dialog element after opening, receives the dialog element (`openCallback(dialogEl)`).
|
|
58
|
+
* @param {((el: HTMLDialogElement) => void) | null} [params.closeCallback=null] - Called with the dialog element just before it is removed, receives the dialog element (`closeCallback(dialogEl)`). NB: `dialogEl` is removed immediately after closing.
|
|
55
59
|
* @param {((data: *, el: Element) => void) | null} [params.ajaxCallback=null] - Called with the Ajax response and the content element.
|
|
56
|
-
* @param {((el: HTMLDialogElement) => void) | null} [params.closeCallback=null] - Called with the dialog element just before it is removed.
|
|
57
60
|
* @param {boolean} [params.addScrollbarPadding=false] - Adds right padding to compensate for the scrollbar.
|
|
58
61
|
* @param {string | DomBuilderItem[] | null} [params.headerContent=null] - Header content: plain text, HTML, or a domBuilder array.
|
|
59
62
|
* @param {string | DomBuilderItem[] | null} [params.footerContent=null] - Footer content: plain text, HTML, or a domBuilder array.
|
|
60
|
-
* @param {HTMLElement | null} [params.triggerElement=null] - Optional element that triggered the popup; when set, `aria-haspopup`, `aria-controls` and `aria-expanded` are managed on it.
|
|
61
63
|
* @returns {HTMLDialogElement} The dialog element.
|
|
62
64
|
*/
|
|
63
65
|
|
|
@@ -77,6 +79,8 @@ export function modalPopup({
|
|
|
77
79
|
dialogMinHeight = null,
|
|
78
80
|
dialogMaxHeight = null,
|
|
79
81
|
|
|
82
|
+
addFocus = true,
|
|
83
|
+
|
|
80
84
|
/** iframe url */
|
|
81
85
|
iframeUrl = null,
|
|
82
86
|
|
|
@@ -90,10 +94,7 @@ export function modalPopup({
|
|
|
90
94
|
ajaxUrl = null,
|
|
91
95
|
ajaxCallback = null,
|
|
92
96
|
|
|
93
|
-
|
|
94
|
-
* receives the dialog element (`closeCallback(dialogEl)`)
|
|
95
|
-
* NB: `dialogEl` is removed immediately after
|
|
96
|
-
*/
|
|
97
|
+
openCallback = null,
|
|
97
98
|
closeCallback = null,
|
|
98
99
|
addScrollbarPadding = false, // adds extra right padding to compensate for the scrollbar
|
|
99
100
|
|
|
@@ -258,6 +259,10 @@ export function modalPopup({
|
|
|
258
259
|
// snapshot: dialogEl could be overwritten by a subsequent modalPopup call
|
|
259
260
|
const thisDialog = /** @type {HTMLDialogElement} */ (dialogEl);
|
|
260
261
|
|
|
262
|
+
if(openCallback) {
|
|
263
|
+
openCallback(thisDialog);
|
|
264
|
+
}
|
|
265
|
+
|
|
261
266
|
// close button listener
|
|
262
267
|
thisDialog.querySelector(`.${styles.closeButton}`)?.addEventListener('click', () => {
|
|
263
268
|
closeDialog(thisDialog);
|
|
@@ -295,7 +300,10 @@ export function modalPopup({
|
|
|
295
300
|
|
|
296
301
|
document.body.classList.add('overflow-hidden');
|
|
297
302
|
thisDialog.showModal();
|
|
298
|
-
|
|
303
|
+
|
|
304
|
+
if(addFocus) {
|
|
305
|
+
thisDialog.focus();
|
|
306
|
+
}
|
|
299
307
|
|
|
300
308
|
thisDialog.classList.add(styles.on);
|
|
301
309
|
|
|
@@ -15,11 +15,11 @@ export default {
|
|
|
15
15
|
},
|
|
16
16
|
height: {
|
|
17
17
|
$type: 'dimension',
|
|
18
|
-
$value: '
|
|
18
|
+
$value: 'fit-content',
|
|
19
19
|
},
|
|
20
20
|
'min-height': {
|
|
21
21
|
$type: 'dimension',
|
|
22
|
-
$value: '
|
|
22
|
+
$value: '40dvw',
|
|
23
23
|
},
|
|
24
24
|
'max-height': {
|
|
25
25
|
$type: 'dimension',
|