@italia/modal 1.0.0-alpha.9 → 1.0.0-beta.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/README.md +6 -54
- package/custom-elements.json +103 -15
- package/dist/src/index.js.map +1 -1
- package/dist/src/it-modal.d.ts +17 -0
- package/dist/src/it-modal.d.ts.map +1 -1
- package/dist/src/it-modal.js +908 -171
- package/dist/src/it-modal.js.map +1 -1
- package/dist/src/types.d.ts +5 -0
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +27 -27
- package/styles/globals.scss +2 -2
package/dist/src/types.d.ts
CHANGED
|
@@ -4,6 +4,11 @@ export declare const MODAL_VARIANTS: readonly ["alert", "popconfirm", "link-list
|
|
|
4
4
|
export type ModalSize = (typeof MODAL_SIZES)[number] | '';
|
|
5
5
|
export type ModalPosition = (typeof MODAL_POSITIONS)[number];
|
|
6
6
|
export type ModalVariant = (typeof MODAL_VARIANTS)[number];
|
|
7
|
+
/**
|
|
8
|
+
* Detail degli eventi `it-modal-open` / `it-modal-close`.
|
|
9
|
+
* Entrambi gli eventi sono cancelable: `event.preventDefault()` impedisce
|
|
10
|
+
* rispettivamente l'apertura e la chiusura della modale.
|
|
11
|
+
*/
|
|
7
12
|
export interface ModalEventDetail {
|
|
8
13
|
/** Riferimento all'elemento modale */
|
|
9
14
|
modal: HTMLElement;
|
package/dist/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,6BAA8B,CAAC;AACvD,eAAO,MAAM,eAAe,sCAAuC,CAAC;AACpE,eAAO,MAAM,cAAc,+CAAgD,CAAC;AAE5E,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;AAC1D,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAC7D,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D,MAAM,WAAW,gBAAgB;IAC/B,sCAAsC;IACtC,KAAK,EAAE,WAAW,CAAC;CACpB"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,6BAA8B,CAAC;AACvD,eAAO,MAAM,eAAe,sCAAuC,CAAC;AACpE,eAAO,MAAM,cAAc,+CAAgD,CAAC;AAE5E,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;AAC1D,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAC7D,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,sCAAsC;IACtC,KAAK,EAAE,WAAW,CAAC;CACpB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@italia/modal",
|
|
3
3
|
"description": "Web component it-modal del Design system .italia",
|
|
4
|
-
"version": "1.0.0-
|
|
4
|
+
"version": "1.0.0-beta.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -33,42 +33,42 @@
|
|
|
33
33
|
"LICENSE",
|
|
34
34
|
"custom-elements.json"
|
|
35
35
|
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"analyze": "cem analyze --litelement --exclude dist",
|
|
38
|
+
"build": "rollup --config rollup.config.js",
|
|
39
|
+
"clean": "rimraf node_modules .turbo .rollup.cache dist coverage",
|
|
40
|
+
"prepublish": "pnpm build",
|
|
41
|
+
"lint": "eslint --ext .ts \"src/**/*.ts\" \"stories/**/*.ts\" \"test/**/*.ts\" && stylelint \"styles/**/*.scss\" \"src/**/*.scss\" && prettier \"src/**/*.ts\" \"stories/**/*.ts\" \"test/**/*.ts\" --check",
|
|
42
|
+
"format": "eslint --fix --ext .ts \"src/**/*.ts\" \"stories/**/*.ts\" \"test/**/*.ts\" && stylelint --fix \"styles/**/*.scss\" \"src/**/*.scss\" && prettier --write \"src/**/*.ts\" \"stories/**/*.ts\" \"test/**/*.ts\"",
|
|
43
|
+
"test": "wtr --coverage --node-resolve --config web-test-runner.config.js",
|
|
44
|
+
"test:watch": "wtr --coverage --node-resolve --config web-test-runner.config.js --watch"
|
|
45
|
+
},
|
|
36
46
|
"dependencies": {
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
47
|
+
"@italia/globals": "workspace:^",
|
|
48
|
+
"bootstrap-italia": "catalog:",
|
|
49
|
+
"lit": "catalog:"
|
|
40
50
|
},
|
|
41
51
|
"devDependencies": {
|
|
42
52
|
"@custom-elements-manifest/analyzer": "^0.10.3",
|
|
43
|
-
"@
|
|
53
|
+
"@italia/test-config": "workspace:^",
|
|
54
|
+
"@italia/button": "workspace:^",
|
|
55
|
+
"@italia/icon": "workspace:^",
|
|
56
|
+
"@italia/typescript-config": "workspace:^",
|
|
57
|
+
"@open-wc/testing": "catalog:",
|
|
44
58
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
45
59
|
"@rollup/plugin-typescript": "^12.1.2",
|
|
46
|
-
"@types/mocha": "
|
|
47
|
-
"@web/test-runner": "
|
|
60
|
+
"@types/mocha": "catalog:",
|
|
61
|
+
"@web/test-runner": "catalog:",
|
|
48
62
|
"rimraf": "^6.0.1",
|
|
49
63
|
"rollup": "^4.42.0",
|
|
50
64
|
"rollup-plugin-scss-lit": "^2.1.0",
|
|
51
|
-
"sass": "
|
|
65
|
+
"sass": "catalog:",
|
|
52
66
|
"tslib": "^2.6.3",
|
|
53
|
-
"typescript": "
|
|
54
|
-
"@italia/test-config": "^0.0.0",
|
|
55
|
-
"@italia/button": "^1.0.0-alpha.9",
|
|
56
|
-
"@italia/icon": "^1.0.0-alpha.9",
|
|
57
|
-
"@italia/typescript-config": "^0.0.0"
|
|
67
|
+
"typescript": "catalog:"
|
|
58
68
|
},
|
|
59
69
|
"peerDependencies": {
|
|
60
|
-
"@italia/button": "
|
|
61
|
-
"@italia/icon": "
|
|
70
|
+
"@italia/button": "workspace:^",
|
|
71
|
+
"@italia/icon": "workspace:^"
|
|
62
72
|
},
|
|
63
|
-
"customElements": "custom-elements.json"
|
|
64
|
-
|
|
65
|
-
"analyze": "cem analyze --litelement --exclude dist",
|
|
66
|
-
"build": "rollup --config rollup.config.js",
|
|
67
|
-
"clean": "rimraf node_modules .turbo .rollup.cache dist coverage",
|
|
68
|
-
"prepublish": "pnpm build",
|
|
69
|
-
"lint": "eslint --ext .ts \"src/**/*.ts\" \"stories/**/*.ts\" \"test/**/*.ts\" && stylelint \"styles/**/*.scss\" \"src/**/*.scss\" && prettier \"src/**/*.ts\" \"stories/**/*.ts\" \"test/**/*.ts\" --check",
|
|
70
|
-
"format": "eslint --fix --ext .ts \"src/**/*.ts\" \"stories/**/*.ts\" \"test/**/*.ts\" && stylelint --fix \"styles/**/*.scss\" \"src/**/*.scss\" && prettier --write \"src/**/*.ts\" \"stories/**/*.ts\" \"test/**/*.ts\"",
|
|
71
|
-
"test": "wtr --coverage --node-resolve --config web-test-runner.config.js",
|
|
72
|
-
"test:watch": "wtr --coverage --node-resolve --config web-test-runner.config.js --watch"
|
|
73
|
-
}
|
|
74
|
-
}
|
|
73
|
+
"customElements": "custom-elements.json"
|
|
74
|
+
}
|
package/styles/globals.scss
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Global styles that need to be imported at page level
|
|
2
2
|
// These styles affect elements outside the shadow DOM
|
|
3
3
|
|
|
4
|
-
@
|
|
5
|
-
@
|
|
4
|
+
@use 'bootstrap-italia/src/scss/base/functions' as *;
|
|
5
|
+
@use 'bootstrap-italia/src/scss/base/variables' as *;
|
|
6
6
|
|
|
7
7
|
// Body scroll lock when modal is open
|
|
8
8
|
body.modal-open {
|