@zanichelli/albe-web-components 19.2.6 → 19.2.8-RC1
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/CHANGELOG.md +10 -0
- package/dist/cjs/index-D_S5lGcb.js +4 -4
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-Ctc6JP2n.js → utils-BY7xrW7W.js} +6 -0
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/z-alert.cjs.entry.js +1 -1
- package/dist/cjs/z-app-header_12.cjs.entry.js +141 -211
- package/dist/cjs/z-book-card-deprecated.cjs.entry.js +1 -1
- package/dist/cjs/z-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/z-color-picker.cjs.entry.js +1 -1
- package/dist/cjs/z-combobox.cjs.entry.js +7 -5
- package/dist/cjs/z-menu.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-alert.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-footer-sections.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-footer.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-icon.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-info.cjs.entry.js +2 -2
- package/dist/cjs/z-myz-card-list.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card_4.cjs.entry.js +4 -4
- package/dist/cjs/z-myz-list-item.cjs.entry.js +2 -2
- package/dist/cjs/z-myz-list.cjs.entry.js +1 -1
- package/dist/cjs/z-otp.cjs.entry.js +2 -2
- package/dist/cjs/z-popover.cjs.entry.js +1 -1
- package/dist/cjs/z-select.cjs.entry.js +4 -8
- package/dist/cjs/z-skip-to-content.cjs.entry.js +2 -2
- package/dist/cjs/z-slideshow.cjs.entry.js +1 -1
- package/dist/cjs/z-stepper-item.cjs.entry.js +1 -1
- package/dist/cjs/z-stepper.cjs.entry.js +1 -1
- package/dist/cjs/z-table.cjs.entry.js +1 -1
- package/dist/cjs/z-td.cjs.entry.js +3 -3
- package/dist/cjs/z-th.cjs.entry.js +5 -3
- package/dist/cjs/z-toast-notification-list.cjs.entry.js +1 -1
- package/dist/cjs/z-toast-notification.cjs.entry.js +95 -34
- package/dist/cjs/z-toggle-button.cjs.entry.js +2 -2
- package/dist/cjs/z-toggle-switch.cjs.entry.js +4 -4
- package/dist/cjs/z-tool.cjs.entry.js +3 -3
- package/dist/cjs/z-toolbar.cjs.entry.js +1 -1
- package/dist/cjs/z-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/z-tr.cjs.entry.js +1 -1
- package/dist/collection/components/css-components/z-scrollbar/styles.css +40 -0
- package/dist/collection/components/table/cells/{z-td/styles.css → z-table-cells.css} +0 -1
- package/dist/collection/components/table/cells/z-td/index.js +3 -3
- package/dist/collection/components/table/cells/z-th/index.js +3 -3
- package/dist/collection/components/table/cells/z-th/styles.css +0 -72
- package/dist/collection/components/z-app-header/index.js +21 -2
- package/dist/collection/components/z-app-header/index.stories.js +25 -9
- package/dist/collection/components/z-combobox/index.js +5 -5
- package/dist/collection/components/z-combobox/styles.css +0 -12
- package/dist/collection/components/z-input/index.js +51 -32
- package/dist/collection/components/z-input/styles-checkbox-radio.css +130 -0
- package/dist/collection/components/z-input/styles-general.css +166 -0
- package/dist/collection/components/z-input/styles-text.css +87 -0
- package/dist/collection/components/z-input/styles-textarea.css +19 -0
- package/dist/collection/components/z-searchbar/index.js +133 -193
- package/dist/collection/components/z-searchbar/index.stories.js +12 -16
- package/dist/collection/components/z-searchbar/styles.css +87 -201
- package/dist/collection/components/z-select/index.js +4 -8
- package/dist/collection/components/z-skip-to-content/index.js +1 -1
- package/dist/collection/components/z-stepper/index.js +1 -1
- package/dist/collection/components/z-stepper-item/index.js +1 -1
- package/dist/collection/components/z-toast-notification/index.js +3 -3
- package/dist/collection/components/z-toast-notification-list/index.js +1 -1
- package/dist/collection/components/z-toggle-button/index.js +2 -2
- package/dist/collection/components/z-toggle-switch/index.js +3 -3
- package/dist/collection/components/z-tool/index.js +2 -2
- package/dist/collection/components/z-toolbar/index.js +1 -1
- package/dist/collection/components/z-tooltip/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-alert/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.js +1 -1
- package/dist/collection/snowflakes/myz/list/z-myz-list/index.js +1 -1
- package/dist/collection/snowflakes/myz/list/z-myz-list-item/index.js +1 -1
- package/dist/collection/snowflakes/myz/z-alert/index.js +1 -1
- package/dist/collection/snowflakes/myz/z-otp/index.js +2 -2
- package/dist/collection/utils/utils.js +5 -0
- package/dist/components/index13.js +1 -1
- package/dist/components/index17.js +1 -1
- package/dist/components/index22.js +1 -1
- package/dist/components/index23.js +1 -1
- package/dist/components/index24.js +1 -1
- package/dist/components/index25.js +1 -1
- package/dist/components/index26.js +1 -1
- package/dist/components/index27.js +1 -1
- package/dist/components/index4.js +1 -1
- package/dist/components/index7.js +1 -1
- package/dist/components/utils.js +1 -1
- package/dist/components/z-app-header.js +1 -1
- package/dist/components/z-combobox.js +1 -1
- package/dist/components/z-myz-card-alert.js +1 -1
- package/dist/components/z-myz-card-dictionary.js +1 -1
- package/dist/components/z-myz-card-footer-sections.js +1 -1
- package/dist/components/z-myz-card-footer.js +1 -1
- package/dist/components/z-myz-card-icon.js +1 -1
- package/dist/components/z-myz-card-info.js +1 -1
- package/dist/components/z-myz-card-list.js +1 -1
- package/dist/components/z-myz-list.js +1 -1
- package/dist/components/z-otp.js +1 -1
- package/dist/components/z-select.js +1 -1
- package/dist/components/z-skip-to-content.js +1 -1
- package/dist/components/z-slideshow.js +1 -1
- package/dist/components/z-stepper-item.js +1 -1
- package/dist/components/z-stepper.js +1 -1
- package/dist/components/z-td.js +1 -1
- package/dist/components/z-th.js +1 -1
- package/dist/components/z-toast-notification-list.js +1 -1
- package/dist/components/z-toast-notification.js +1 -1
- package/dist/components/z-toggle-button.js +1 -1
- package/dist/components/z-toggle-switch.js +1 -1
- package/dist/components/z-tool.js +1 -1
- package/dist/components/z-toolbar.js +1 -1
- package/dist/esm/index-DPdXlnVe.js +4 -4
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-0PByxJyN.js → utils-BEzZQwOB.js} +7 -2
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/z-alert.entry.js +1 -1
- package/dist/esm/z-app-header_12.entry.js +142 -212
- package/dist/esm/z-book-card-deprecated.entry.js +1 -1
- package/dist/esm/z-breadcrumb.entry.js +1 -1
- package/dist/esm/z-color-picker.entry.js +1 -1
- package/dist/esm/z-combobox.entry.js +7 -5
- package/dist/esm/z-menu.entry.js +1 -1
- package/dist/esm/z-myz-card-alert.entry.js +1 -1
- package/dist/esm/z-myz-card-dictionary.entry.js +1 -1
- package/dist/esm/z-myz-card-footer-sections.entry.js +1 -1
- package/dist/esm/z-myz-card-footer.entry.js +1 -1
- package/dist/esm/z-myz-card-icon.entry.js +1 -1
- package/dist/esm/z-myz-card-info.entry.js +2 -2
- package/dist/esm/z-myz-card-list.entry.js +1 -1
- package/dist/esm/z-myz-card_4.entry.js +4 -4
- package/dist/esm/z-myz-list-item.entry.js +2 -2
- package/dist/esm/z-myz-list.entry.js +1 -1
- package/dist/esm/z-otp.entry.js +2 -2
- package/dist/esm/z-popover.entry.js +1 -1
- package/dist/esm/z-select.entry.js +4 -8
- package/dist/esm/z-skip-to-content.entry.js +2 -2
- package/dist/esm/z-slideshow.entry.js +1 -1
- package/dist/esm/z-stepper-item.entry.js +1 -1
- package/dist/esm/z-stepper.entry.js +1 -1
- package/dist/esm/z-table.entry.js +1 -1
- package/dist/esm/z-td.entry.js +3 -3
- package/dist/esm/z-th.entry.js +5 -3
- package/dist/esm/z-toast-notification-list.entry.js +1 -1
- package/dist/esm/z-toast-notification.entry.js +95 -34
- package/dist/esm/z-toggle-button.entry.js +2 -2
- package/dist/esm/z-toggle-switch.entry.js +4 -4
- package/dist/esm/z-tool.entry.js +3 -3
- package/dist/esm/z-toolbar.entry.js +1 -1
- package/dist/esm/z-tooltip.entry.js +1 -1
- package/dist/esm/z-tr.entry.js +1 -1
- package/dist/types/components/z-app-header/index.d.ts +4 -0
- package/dist/types/components/z-app-header/index.stories.d.ts +7 -0
- package/dist/types/components/z-input/index.d.ts +6 -4
- package/dist/types/components/z-searchbar/index.d.ts +26 -28
- package/dist/types/components/z-searchbar/index.stories.d.ts +4 -0
- package/dist/types/components/z-select/index.d.ts +0 -1
- package/dist/types/components.d.ts +46 -17
- package/dist/types/utils/utils.d.ts +2 -0
- package/dist/web-components-library/index.esm.js +1 -1
- package/dist/web-components-library/{p-19d3a16b.entry.js → p-0105149a.entry.js} +1 -1
- package/dist/web-components-library/p-0da8eae7.entry.js +1 -0
- package/dist/web-components-library/{p-5fa910e4.entry.js → p-13e7f751.entry.js} +1 -1
- package/dist/web-components-library/{p-45866f64.entry.js → p-1580db58.entry.js} +1 -1
- package/dist/web-components-library/{p-eed4e897.entry.js → p-20d94cce.entry.js} +1 -1
- package/dist/web-components-library/{p-2ce3ac48.entry.js → p-271dfd9c.entry.js} +1 -1
- package/dist/web-components-library/{p-e2d94c86.entry.js → p-2abf765d.entry.js} +1 -1
- package/dist/web-components-library/{p-5b9cacd7.entry.js → p-2df6d169.entry.js} +1 -1
- package/dist/web-components-library/{p-de0b7109.entry.js → p-313fc91d.entry.js} +1 -1
- package/dist/web-components-library/p-41584e90.entry.js +1 -0
- package/dist/web-components-library/p-4a434f6e.entry.js +1 -0
- package/dist/web-components-library/{p-7a9d19b8.entry.js → p-4d1b3d16.entry.js} +1 -1
- package/dist/web-components-library/p-53670be4.entry.js +1 -0
- package/dist/web-components-library/{p-538a1bd2.entry.js → p-5d20fc3d.entry.js} +1 -1
- package/dist/web-components-library/p-61992f12.entry.js +1 -0
- package/dist/web-components-library/{p-d11d39f5.entry.js → p-62d2247e.entry.js} +1 -1
- package/dist/web-components-library/{p-7d9477ed.entry.js → p-64c025f6.entry.js} +1 -1
- package/dist/web-components-library/{p-364b0ca4.entry.js → p-658f022d.entry.js} +1 -1
- package/dist/web-components-library/{p-6fb8a984.entry.js → p-660737b0.entry.js} +1 -1
- package/dist/web-components-library/p-7371a543.entry.js +2 -0
- package/dist/web-components-library/{p-f94c360f.entry.js → p-788eaac7.entry.js} +1 -1
- package/dist/web-components-library/{p-c6ae9241.entry.js → p-88a3ba7c.entry.js} +1 -1
- package/{www/build/p-c6920758.entry.js → dist/web-components-library/p-89daaeb5.entry.js} +1 -1
- package/dist/web-components-library/p-B0bOjMSb.js +1 -0
- package/dist/web-components-library/{p-f5bbcaa6.entry.js → p-a4f673f8.entry.js} +1 -1
- package/{www/build/p-4ae7df7f.entry.js → dist/web-components-library/p-b01ff8e6.entry.js} +1 -1
- package/dist/web-components-library/{p-2d6a4515.entry.js → p-b6223d7e.entry.js} +1 -1
- package/dist/web-components-library/{p-7835fdda.entry.js → p-b9343431.entry.js} +1 -1
- package/dist/web-components-library/{p-c539ae57.entry.js → p-c42ddd93.entry.js} +1 -1
- package/{www/build/p-eadf2552.entry.js → dist/web-components-library/p-c4e7bd16.entry.js} +1 -1
- package/dist/web-components-library/{p-3f996a63.entry.js → p-c944a943.entry.js} +1 -1
- package/dist/web-components-library/{p-19f5fdd3.entry.js → p-cd33f4b1.entry.js} +1 -1
- package/dist/web-components-library/{p-a40ae683.entry.js → p-ce3bbaf2.entry.js} +1 -1
- package/dist/web-components-library/p-d121122f.entry.js +1 -0
- package/dist/web-components-library/p-dc5ab2cc.entry.js +1 -0
- package/dist/web-components-library/{p-91503030.entry.js → p-ef5018bb.entry.js} +1 -1
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/package.json +5 -4
- package/www/build/index.esm.js +1 -1
- package/www/build/{p-19d3a16b.entry.js → p-0105149a.entry.js} +1 -1
- package/www/build/p-0da8eae7.entry.js +1 -0
- package/www/build/{p-5fa910e4.entry.js → p-13e7f751.entry.js} +1 -1
- package/www/build/{p-45866f64.entry.js → p-1580db58.entry.js} +1 -1
- package/www/build/{p-eed4e897.entry.js → p-20d94cce.entry.js} +1 -1
- package/www/build/{p-2ce3ac48.entry.js → p-271dfd9c.entry.js} +1 -1
- package/www/build/{p-e2d94c86.entry.js → p-2abf765d.entry.js} +1 -1
- package/www/build/{p-5b9cacd7.entry.js → p-2df6d169.entry.js} +1 -1
- package/www/build/{p-de0b7109.entry.js → p-313fc91d.entry.js} +1 -1
- package/www/build/p-41584e90.entry.js +1 -0
- package/www/build/p-4a434f6e.entry.js +1 -0
- package/www/build/{p-7a9d19b8.entry.js → p-4d1b3d16.entry.js} +1 -1
- package/www/build/p-53670be4.entry.js +1 -0
- package/www/build/{p-538a1bd2.entry.js → p-5d20fc3d.entry.js} +1 -1
- package/www/build/p-61992f12.entry.js +1 -0
- package/www/build/{p-d11d39f5.entry.js → p-62d2247e.entry.js} +1 -1
- package/www/build/{p-7d9477ed.entry.js → p-64c025f6.entry.js} +1 -1
- package/www/build/{p-364b0ca4.entry.js → p-658f022d.entry.js} +1 -1
- package/www/build/{p-6fb8a984.entry.js → p-660737b0.entry.js} +1 -1
- package/www/build/p-7371a543.entry.js +2 -0
- package/www/build/{p-f94c360f.entry.js → p-788eaac7.entry.js} +1 -1
- package/www/build/{p-c6ae9241.entry.js → p-88a3ba7c.entry.js} +1 -1
- package/{dist/web-components-library/p-c6920758.entry.js → www/build/p-89daaeb5.entry.js} +1 -1
- package/www/build/p-B0bOjMSb.js +1 -0
- package/www/build/{p-f5bbcaa6.entry.js → p-a4f673f8.entry.js} +1 -1
- package/{dist/web-components-library/p-4ae7df7f.entry.js → www/build/p-b01ff8e6.entry.js} +1 -1
- package/www/build/{p-2d6a4515.entry.js → p-b6223d7e.entry.js} +1 -1
- package/www/build/{p-804ab9a4.js → p-b82f3aad.js} +1 -1
- package/www/build/{p-7835fdda.entry.js → p-b9343431.entry.js} +1 -1
- package/www/build/{p-c539ae57.entry.js → p-c42ddd93.entry.js} +1 -1
- package/{dist/web-components-library/p-eadf2552.entry.js → www/build/p-c4e7bd16.entry.js} +1 -1
- package/www/build/{p-3f996a63.entry.js → p-c944a943.entry.js} +1 -1
- package/www/build/{p-19f5fdd3.entry.js → p-cd33f4b1.entry.js} +1 -1
- package/www/build/{p-a40ae683.entry.js → p-ce3bbaf2.entry.js} +1 -1
- package/www/build/p-d121122f.entry.js +1 -0
- package/www/build/p-dc5ab2cc.entry.js +1 -0
- package/www/build/{p-91503030.entry.js → p-ef5018bb.entry.js} +1 -1
- package/www/build/web-components-library.esm.js +1 -1
- package/www/index.html +1 -1
- package/dist/collection/components/z-input/styles.css +0 -406
- package/dist/web-components-library/p-32440f4c.entry.js +0 -1
- package/dist/web-components-library/p-550ee6c3.entry.js +0 -1
- package/dist/web-components-library/p-8fd25c59.entry.js +0 -2
- package/dist/web-components-library/p-D4yqZKyM.js +0 -1
- package/dist/web-components-library/p-a9f848ef.entry.js +0 -1
- package/dist/web-components-library/p-ab50e989.entry.js +0 -1
- package/dist/web-components-library/p-ae69bb7d.entry.js +0 -1
- package/dist/web-components-library/p-f3436721.entry.js +0 -1
- package/dist/web-components-library/p-fc15a666.entry.js +0 -1
- package/www/build/p-32440f4c.entry.js +0 -1
- package/www/build/p-550ee6c3.entry.js +0 -1
- package/www/build/p-8fd25c59.entry.js +0 -2
- package/www/build/p-D4yqZKyM.js +0 -1
- package/www/build/p-a9f848ef.entry.js +0 -1
- package/www/build/p-ab50e989.entry.js +0 -1
- package/www/build/p-ae69bb7d.entry.js +0 -1
- package/www/build/p-f3436721.entry.js +0 -1
- package/www/build/p-fc15a666.entry.js +0 -1
|
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, H as Host, d as getElement
|
|
|
2
2
|
import { r as ToastNotificationTransition, g as KeyboardCode } from './index-BKCj6NR2.js';
|
|
3
3
|
import { g as getDefaultExportFromCjs } from './_commonjsHelpers-B85MJLTf.js';
|
|
4
4
|
|
|
5
|
-
/*! @license DOMPurify 3.
|
|
5
|
+
/*! @license DOMPurify 3.4.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.0/LICENSE */
|
|
6
6
|
|
|
7
7
|
const {
|
|
8
8
|
entries,
|
|
@@ -31,12 +31,18 @@ if (!seal) {
|
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
if (!apply) {
|
|
34
|
-
apply = function apply(
|
|
35
|
-
|
|
34
|
+
apply = function apply(func, thisArg) {
|
|
35
|
+
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
36
|
+
args[_key - 2] = arguments[_key];
|
|
37
|
+
}
|
|
38
|
+
return func.apply(thisArg, args);
|
|
36
39
|
};
|
|
37
40
|
}
|
|
38
41
|
if (!construct) {
|
|
39
|
-
construct = function construct(Func
|
|
42
|
+
construct = function construct(Func) {
|
|
43
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
44
|
+
args[_key2 - 1] = arguments[_key2];
|
|
45
|
+
}
|
|
40
46
|
return new Func(...args);
|
|
41
47
|
};
|
|
42
48
|
}
|
|
@@ -65,8 +71,8 @@ function unapply(func) {
|
|
|
65
71
|
if (thisArg instanceof RegExp) {
|
|
66
72
|
thisArg.lastIndex = 0;
|
|
67
73
|
}
|
|
68
|
-
for (var
|
|
69
|
-
args[
|
|
74
|
+
for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
|
|
75
|
+
args[_key3 - 1] = arguments[_key3];
|
|
70
76
|
}
|
|
71
77
|
return apply(func, thisArg, args);
|
|
72
78
|
};
|
|
@@ -77,12 +83,12 @@ function unapply(func) {
|
|
|
77
83
|
* @param func - The constructor function to be wrapped and called.
|
|
78
84
|
* @returns A new function that constructs an instance of the given constructor function with the provided arguments.
|
|
79
85
|
*/
|
|
80
|
-
function unconstruct(
|
|
86
|
+
function unconstruct(Func) {
|
|
81
87
|
return function () {
|
|
82
|
-
for (var
|
|
83
|
-
args[
|
|
88
|
+
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
89
|
+
args[_key4] = arguments[_key4];
|
|
84
90
|
}
|
|
85
|
-
return construct(
|
|
91
|
+
return construct(Func, args);
|
|
86
92
|
};
|
|
87
93
|
}
|
|
88
94
|
/**
|
|
@@ -181,8 +187,8 @@ function lookupGetter(object, prop) {
|
|
|
181
187
|
return fallbackValue;
|
|
182
188
|
}
|
|
183
189
|
|
|
184
|
-
const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);
|
|
185
|
-
const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
|
|
190
|
+
const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'search', 'section', 'select', 'shadow', 'slot', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);
|
|
191
|
+
const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'enterkeyhint', 'exportparts', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'inputmode', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'part', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
|
|
186
192
|
const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);
|
|
187
193
|
// List of SVG elements that are disallowed by default.
|
|
188
194
|
// We still need to know them so that we can do namespace
|
|
@@ -195,9 +201,9 @@ const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mgly
|
|
|
195
201
|
const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);
|
|
196
202
|
const text = freeze(['#text']);
|
|
197
203
|
|
|
198
|
-
const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);
|
|
199
|
-
const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);
|
|
200
|
-
const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', '
|
|
204
|
+
const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'exportparts', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inert', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'part', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'slot', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);
|
|
205
|
+
const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'mask-type', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);
|
|
206
|
+
const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnalign', 'columnlines', 'columnspacing', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lquote', 'lspace', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);
|
|
201
207
|
const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
|
|
202
208
|
|
|
203
209
|
// eslint-disable-next-line unicorn/better-regex
|
|
@@ -294,7 +300,7 @@ const _createHooksMap = function _createHooksMap() {
|
|
|
294
300
|
function createDOMPurify() {
|
|
295
301
|
let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
|
|
296
302
|
const DOMPurify = root => createDOMPurify(root);
|
|
297
|
-
DOMPurify.version = '3.
|
|
303
|
+
DOMPurify.version = '3.4.0';
|
|
298
304
|
DOMPurify.removed = [];
|
|
299
305
|
if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
|
|
300
306
|
// Not running in a browser, provide a factory function
|
|
@@ -405,6 +411,21 @@ function createDOMPurify() {
|
|
|
405
411
|
let FORBID_TAGS = null;
|
|
406
412
|
/* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */
|
|
407
413
|
let FORBID_ATTR = null;
|
|
414
|
+
/* Config object to store ADD_TAGS/ADD_ATTR functions (when used as functions) */
|
|
415
|
+
const EXTRA_ELEMENT_HANDLING = Object.seal(create(null, {
|
|
416
|
+
tagCheck: {
|
|
417
|
+
writable: true,
|
|
418
|
+
configurable: false,
|
|
419
|
+
enumerable: true,
|
|
420
|
+
value: null
|
|
421
|
+
},
|
|
422
|
+
attributeCheck: {
|
|
423
|
+
writable: true,
|
|
424
|
+
configurable: false,
|
|
425
|
+
enumerable: true,
|
|
426
|
+
value: null
|
|
427
|
+
}
|
|
428
|
+
}));
|
|
408
429
|
/* Decide if ARIA attributes are okay */
|
|
409
430
|
let ALLOW_ARIA_ATTR = true;
|
|
410
431
|
/* Decide if custom data attributes are okay */
|
|
@@ -555,7 +576,7 @@ function createDOMPurify() {
|
|
|
555
576
|
NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
|
|
556
577
|
MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS;
|
|
557
578
|
HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS;
|
|
558
|
-
CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING ||
|
|
579
|
+
CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || create(null);
|
|
559
580
|
if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
|
|
560
581
|
CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
|
|
561
582
|
}
|
|
@@ -574,7 +595,7 @@ function createDOMPurify() {
|
|
|
574
595
|
/* Parse profile info */
|
|
575
596
|
if (USE_PROFILES) {
|
|
576
597
|
ALLOWED_TAGS = addToSet({}, text);
|
|
577
|
-
ALLOWED_ATTR =
|
|
598
|
+
ALLOWED_ATTR = create(null);
|
|
578
599
|
if (USE_PROFILES.html === true) {
|
|
579
600
|
addToSet(ALLOWED_TAGS, html$1);
|
|
580
601
|
addToSet(ALLOWED_ATTR, html);
|
|
@@ -595,18 +616,30 @@ function createDOMPurify() {
|
|
|
595
616
|
addToSet(ALLOWED_ATTR, xml);
|
|
596
617
|
}
|
|
597
618
|
}
|
|
619
|
+
/* Always reset function-based ADD_TAGS / ADD_ATTR checks to prevent
|
|
620
|
+
* leaking across calls when switching from function to array config */
|
|
621
|
+
EXTRA_ELEMENT_HANDLING.tagCheck = null;
|
|
622
|
+
EXTRA_ELEMENT_HANDLING.attributeCheck = null;
|
|
598
623
|
/* Merge configuration parameters */
|
|
599
624
|
if (cfg.ADD_TAGS) {
|
|
600
|
-
if (
|
|
601
|
-
|
|
625
|
+
if (typeof cfg.ADD_TAGS === 'function') {
|
|
626
|
+
EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;
|
|
627
|
+
} else {
|
|
628
|
+
if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
|
|
629
|
+
ALLOWED_TAGS = clone(ALLOWED_TAGS);
|
|
630
|
+
}
|
|
631
|
+
addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
|
|
602
632
|
}
|
|
603
|
-
addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
|
|
604
633
|
}
|
|
605
634
|
if (cfg.ADD_ATTR) {
|
|
606
|
-
if (
|
|
607
|
-
|
|
635
|
+
if (typeof cfg.ADD_ATTR === 'function') {
|
|
636
|
+
EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;
|
|
637
|
+
} else {
|
|
638
|
+
if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
|
|
639
|
+
ALLOWED_ATTR = clone(ALLOWED_ATTR);
|
|
640
|
+
}
|
|
641
|
+
addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
|
|
608
642
|
}
|
|
609
|
-
addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
|
|
610
643
|
}
|
|
611
644
|
if (cfg.ADD_URI_SAFE_ATTR) {
|
|
612
645
|
addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
|
|
@@ -617,6 +650,12 @@ function createDOMPurify() {
|
|
|
617
650
|
}
|
|
618
651
|
addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
|
|
619
652
|
}
|
|
653
|
+
if (cfg.ADD_FORBID_CONTENTS) {
|
|
654
|
+
if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
|
|
655
|
+
FORBID_CONTENTS = clone(FORBID_CONTENTS);
|
|
656
|
+
}
|
|
657
|
+
addToSet(FORBID_CONTENTS, cfg.ADD_FORBID_CONTENTS, transformCaseFunc);
|
|
658
|
+
}
|
|
620
659
|
/* Add #text in case KEEP_CONTENT is set to true */
|
|
621
660
|
if (KEEP_CONTENT) {
|
|
622
661
|
ALLOWED_TAGS['#text'] = true;
|
|
@@ -903,6 +942,11 @@ function createDOMPurify() {
|
|
|
903
942
|
_forceRemove(currentNode);
|
|
904
943
|
return true;
|
|
905
944
|
}
|
|
945
|
+
/* Remove risky CSS construction leading to mXSS */
|
|
946
|
+
if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && tagName === 'style' && _isNode(currentNode.firstElementChild)) {
|
|
947
|
+
_forceRemove(currentNode);
|
|
948
|
+
return true;
|
|
949
|
+
}
|
|
906
950
|
/* Remove any occurrence of processing instructions */
|
|
907
951
|
if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
|
|
908
952
|
_forceRemove(currentNode);
|
|
@@ -914,7 +958,7 @@ function createDOMPurify() {
|
|
|
914
958
|
return true;
|
|
915
959
|
}
|
|
916
960
|
/* Remove element if anything forbids its presence */
|
|
917
|
-
if (
|
|
961
|
+
if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {
|
|
918
962
|
/* Check if we have a custom element to handle */
|
|
919
963
|
if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
|
|
920
964
|
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
|
|
@@ -978,6 +1022,10 @@ function createDOMPurify() {
|
|
|
978
1022
|
*/
|
|
979
1023
|
// eslint-disable-next-line complexity
|
|
980
1024
|
const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
|
|
1025
|
+
/* FORBID_ATTR must always win, even if ADD_ATTR predicate would allow it */
|
|
1026
|
+
if (FORBID_ATTR[lcName]) {
|
|
1027
|
+
return false;
|
|
1028
|
+
}
|
|
981
1029
|
/* Make sure attribute cannot clobber */
|
|
982
1030
|
if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
|
|
983
1031
|
return false;
|
|
@@ -986,12 +1034,12 @@ function createDOMPurify() {
|
|
|
986
1034
|
(https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
|
|
987
1035
|
XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
|
|
988
1036
|
We don't need to check the value; it's always URI safe. */
|
|
989
|
-
if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
|
|
1037
|
+
if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
|
|
990
1038
|
if (
|
|
991
1039
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
992
1040
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
993
1041
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
994
|
-
_isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) ||
|
|
1042
|
+
_isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName, lcTag)) ||
|
|
995
1043
|
// Alternative, second condition checks if it's an `is`-attribute, AND
|
|
996
1044
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
997
1045
|
lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {
|
|
@@ -1070,7 +1118,12 @@ function createDOMPurify() {
|
|
|
1070
1118
|
value = SANITIZE_NAMED_PROPS_PREFIX + value;
|
|
1071
1119
|
}
|
|
1072
1120
|
/* Work around a security issue with comments inside attributes */
|
|
1073
|
-
if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title)/i, value)) {
|
|
1121
|
+
if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) {
|
|
1122
|
+
_removeAttribute(name, currentNode);
|
|
1123
|
+
continue;
|
|
1124
|
+
}
|
|
1125
|
+
/* Make sure we cannot easily use animated hrefs, even if animations are allowed */
|
|
1126
|
+
if (lcName === 'attributename' && stringMatch(value, 'href')) {
|
|
1074
1127
|
_removeAttribute(name, currentNode);
|
|
1075
1128
|
continue;
|
|
1076
1129
|
}
|
|
@@ -1144,7 +1197,7 @@ function createDOMPurify() {
|
|
|
1144
1197
|
*
|
|
1145
1198
|
* @param fragment to iterate over recursively
|
|
1146
1199
|
*/
|
|
1147
|
-
const
|
|
1200
|
+
const _sanitizeShadowDOM2 = function _sanitizeShadowDOM(fragment) {
|
|
1148
1201
|
let shadowNode = null;
|
|
1149
1202
|
const shadowIterator = _createNodeIterator(fragment);
|
|
1150
1203
|
/* Execute a hook if present */
|
|
@@ -1158,7 +1211,7 @@ function createDOMPurify() {
|
|
|
1158
1211
|
_sanitizeAttributes(shadowNode);
|
|
1159
1212
|
/* Deep shadow DOM detected */
|
|
1160
1213
|
if (shadowNode.content instanceof DocumentFragment) {
|
|
1161
|
-
|
|
1214
|
+
_sanitizeShadowDOM2(shadowNode.content);
|
|
1162
1215
|
}
|
|
1163
1216
|
}
|
|
1164
1217
|
/* Execute a hook if present */
|
|
@@ -1253,7 +1306,7 @@ function createDOMPurify() {
|
|
|
1253
1306
|
_sanitizeAttributes(currentNode);
|
|
1254
1307
|
/* Shadow DOM detected, sanitize it */
|
|
1255
1308
|
if (currentNode.content instanceof DocumentFragment) {
|
|
1256
|
-
|
|
1309
|
+
_sanitizeShadowDOM2(currentNode.content);
|
|
1257
1310
|
}
|
|
1258
1311
|
}
|
|
1259
1312
|
/* If we sanitized `dirty` in-place, return it. */
|
|
@@ -1262,6 +1315,14 @@ function createDOMPurify() {
|
|
|
1262
1315
|
}
|
|
1263
1316
|
/* Return sanitized string or DOM */
|
|
1264
1317
|
if (RETURN_DOM) {
|
|
1318
|
+
if (SAFE_FOR_TEMPLATES) {
|
|
1319
|
+
body.normalize();
|
|
1320
|
+
let html = body.innerHTML;
|
|
1321
|
+
arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
|
|
1322
|
+
html = stringReplace(html, expr, ' ');
|
|
1323
|
+
});
|
|
1324
|
+
body.innerHTML = html;
|
|
1325
|
+
}
|
|
1265
1326
|
if (RETURN_DOM_FRAGMENT) {
|
|
1266
1327
|
returnNode = createDocumentFragment.call(body.ownerDocument);
|
|
1267
1328
|
while (body.firstChild) {
|
|
@@ -4137,19 +4198,19 @@ const ZToastNotification = class {
|
|
|
4137
4198
|
}
|
|
4138
4199
|
}
|
|
4139
4200
|
render() {
|
|
4140
|
-
return (h(Host, { key: '
|
|
4201
|
+
return (h(Host, { key: '6d582aa79426417081842e17e0ccb61fffec81a0', style: { "--percentuale": `${this.percentage}%` }, class: { [this.transition]: !!this.transition, [this.type]: !!this.type }, onAnimationEnd: (e) => {
|
|
4141
4202
|
if (this.autoclose && e.animationName.includes("slidein")) {
|
|
4142
4203
|
this.startClosingTimeout(this.autoclose);
|
|
4143
4204
|
}
|
|
4144
4205
|
if (e.animationName.includes("slideout")) {
|
|
4145
4206
|
this.hostElement.parentNode.removeChild(this.hostElement);
|
|
4146
4207
|
}
|
|
4147
|
-
} }, h("div", { key: '
|
|
4208
|
+
} }, h("div", { key: '3b509ad43470b3bd5ceec401d28ce887a7f1de10', class: "toast-notification-container" }, h("div", { key: '7caaa8f330f15214c827eb89666ea2fdbbde3920', class: "toast-notification-content" }, h("div", { key: '49ad47ccf665b0bbcdbf94430cc2dab1e05219ab', class: "toast-notification-text" }, this.heading && h("span", { key: 'c2ea1e161d8c6bbefc9cff2ff27eadc713f5c133', class: "title" }, this.heading), h("span", { key: 'f93072a79ae141440445746ad654de84b50d2441', class: "message" }, h("slot", { key: '09d8108c415599d93b67925496fd52416fac4907', name: "message" }, this.message && h("span", { key: '011e00ae54cee5a33059cef9760576781c63f737', innerHTML: purify.sanitize(this.message) })))), h("div", { key: '67bde6f049f31a6b4e7d84c720b036f974bedba7', class: "button-container", hidden: !this.hasSlottedButton }, h("slot", { key: 'c92a7087e89012ee690c8e41577ccee412be112f', name: "button", onSlotchange: () => this.checkSlottedButton() }))), this.closebutton && (h("button", { key: '41198c2a426c339046948b8969d3002aee7607c3', class: "close-button", "aria-label": "Chiudi notifica", onClick: () => this.close(SLIDE_OUT_TRANSITION_MAP[this.transition], true), onKeyDown: (e) => {
|
|
4148
4209
|
if (e.code == KeyboardCode.SPACE || e.code == KeyboardCode.ENTER) {
|
|
4149
4210
|
e.preventDefault();
|
|
4150
4211
|
this.close(SLIDE_OUT_TRANSITION_MAP[this.transition], true);
|
|
4151
4212
|
}
|
|
4152
|
-
} }, h("z-icon", { key: '
|
|
4213
|
+
} }, h("z-icon", { key: '3316d0e9e999039cd99eb96faa37c81219e5617b', name: "multiply-circled" }))))));
|
|
4153
4214
|
}
|
|
4154
4215
|
get hostElement() { return getElement(this); }
|
|
4155
4216
|
static get watchers() { return {
|
|
@@ -21,10 +21,10 @@ const ZToggleButton = class {
|
|
|
21
21
|
this.toggleClick.emit(this.opened);
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
|
-
return (h("button", { key: '
|
|
24
|
+
return (h("button", { key: '3448d665412b78c55f77951e408df8abaa158803', tabindex: this.avoidclick ? "-1" : "0", class: {
|
|
25
25
|
"isopen": this.opened,
|
|
26
26
|
"avoid-clicks": this.avoidclick,
|
|
27
|
-
}, disabled: this.isdisabled, "aria-expanded": this.opened ? "true" : "false", "aria-label": this.ariaLabel, onClick: () => this.emitToggleClick() }, h("z-icon", { key: '
|
|
27
|
+
}, disabled: this.isdisabled, "aria-expanded": this.opened ? "true" : "false", "aria-label": this.ariaLabel, onClick: () => this.emitToggleClick() }, h("z-icon", { key: '4514f07522fc6ecfced03793a5bc58e7c8f185e8', name: this.opened ? "chevron-down" : "chevron-up", width: 16, height: 16 }), this.label));
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
ZToggleButton.style = stylesCss();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-DPdXlnVe.js';
|
|
2
2
|
import { k as LabelPosition } from './index-BKCj6NR2.js';
|
|
3
|
-
import { r as randomId } from './utils-
|
|
3
|
+
import { r as randomId } from './utils-BEzZQwOB.js';
|
|
4
4
|
import './breakpoints-Q-tWjk7P.js';
|
|
5
5
|
|
|
6
6
|
const stylesCss = () => `.sc-z-toggle-switch-h{position:relative;display:inline-flex;font-family:var(--font-family-sans);font-weight:var(--font-rg)}label.sc-z-toggle-switch{display:flex;flex-direction:row;align-items:center;cursor:pointer}label.disabled.sc-z-toggle-switch{cursor:default}label.right.sc-z-toggle-switch{flex-direction:row-reverse}label.sc-z-toggle-switch>span.sc-z-toggle-switch:first-child{color:var(--color-default-text);letter-spacing:0}label.left.sc-z-toggle-switch>span.sc-z-toggle-switch:first-child{margin-right:var(--space-unit)}label.right.sc-z-toggle-switch>span.sc-z-toggle-switch:first-child{margin-left:var(--space-unit)}label.sc-z-toggle-switch>span.container.sc-z-toggle-switch{position:relative;top:1px;left:1px;display:flex;width:calc(var(--space-unit) * 4);height:18px;align-items:center;background-color:var(--gray500);border-radius:var(--space-unit);color:var(--gray500);cursor:pointer}label.sc-z-toggle-switch>span.container.disabled.sc-z-toggle-switch,label.sc-z-toggle-switch>span.container.checked.disabled.sc-z-toggle-switch{background-color:var(--color-disabled01);cursor:default}label.sc-z-toggle-switch>span.container.checked.disabled.sc-z-toggle-switch>span.circle.sc-z-toggle-switch>z-icon.sc-z-toggle-switch{fill:var(--color-disabled01)}label.sc-z-toggle-switch>span.container.checked.sc-z-toggle-switch{background-color:var(--color-primary01);fill:var(--color-primary01)}input.sc-z-toggle-switch:focus:focus-visible+label.sc-z-toggle-switch>span.container.sc-z-toggle-switch:not(.disabled){box-shadow:var(--shadow-focus-primary);outline:none}input.sc-z-toggle-switch:focus:focus-visible+label.sc-z-toggle-switch>span.container.disabled.sc-z-toggle-switch{outline:none}label.sc-z-toggle-switch>span.container.sc-z-toggle-switch:not(.disabled):hover{background-color:var(--color-hover-primary);fill:var(--color-hover-primary)}label.sc-z-toggle-switch>span.container.sc-z-toggle-switch>span.circle.sc-z-toggle-switch{position:absolute;top:1px;left:1px;display:flex;width:calc(var(--space-unit) * 2);height:calc(var(--space-unit) * 2);align-items:center;justify-content:center;margin:0;background-color:var(--color-white);border-radius:7px;box-shadow:var(--shadow-1);transition:transform 0.3s ease}label.sc-z-toggle-switch>span.container.checked.sc-z-toggle-switch>span.circle.sc-z-toggle-switch{transform:translateX(calc(100% - 2px))}input[type="checkbox"].sc-z-toggle-switch{position:absolute;z-index:-1;opacity:0;pointer-events:none}`;
|
|
@@ -32,14 +32,14 @@ const ZToggleSwitch = class {
|
|
|
32
32
|
this.emitToggleClick();
|
|
33
33
|
}
|
|
34
34
|
render() {
|
|
35
|
-
return (h(Host, { key: '
|
|
35
|
+
return (h(Host, { key: 'd31f156ba646f113f8f2509afdaee3e79fdb33f7' }, h("input", { key: '48a3963dd555c00867816af0169ed677dc4ccc68', id: this.htmlid, type: "checkbox", checked: this.checked, disabled: this.disabled, onChange: this.handleClick.bind(this) }), h("label", { key: '3872377775f759727b62288794555cd84e60b12c', htmlFor: this.htmlid, class: {
|
|
36
36
|
[this.labelPosition]: true,
|
|
37
37
|
disabled: this.disabled,
|
|
38
|
-
} }, h("span", { key: '
|
|
38
|
+
} }, h("span", { key: 'b46cb8e359cdb11e696a116661659c9872d49a1e' }, h("slot", { key: '42fc26c0ced09c5fdda062735fe543b8cb57a658' })), h("span", { key: 'b55f0fbd2ff23f01c1ac0b845c6af5571d81c13f', class: {
|
|
39
39
|
container: true,
|
|
40
40
|
disabled: this.disabled,
|
|
41
41
|
checked: this.checked,
|
|
42
|
-
} }, h("span", { key: '
|
|
42
|
+
} }, h("span", { key: '87bc69be905d84458fec5384f756348a94e446fe', class: "circle" }, this.checked && (h("z-icon", { key: '4464b2bf8aa91a7c0c5c9e2bff26e84ff7c34be2', width: 12, height: 12, name: "checkmark" })))))));
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
ZToggleSwitch.style = stylesCss();
|
package/dist/esm/z-tool.entry.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, d as getElement } from './index-DPdXlnVe.js';
|
|
2
2
|
import { P as PopoverPosition, g as KeyboardCode } from './index-BKCj6NR2.js';
|
|
3
|
-
import { a as containsElement } from './utils-
|
|
3
|
+
import { a as containsElement } from './utils-BEzZQwOB.js';
|
|
4
4
|
import './breakpoints-Q-tWjk7P.js';
|
|
5
5
|
|
|
6
6
|
const stylesCss = () => `:host,*{box-sizing:border-box}.z-tool{--z-tool-size:calc(var(--space-unit) * 5.5);--z-tool-icon-size:calc(var(--space-unit) * 2.5);position:relative;display:inline-flex;width:var(--z-tool-size);height:var(--z-tool-size);align-items:center;justify-content:center;padding:0;border:none;margin:0;background-color:var(--color-surface01);border-radius:var(--border-radius);cursor:pointer}:host(:is([active],[open])) .z-tool{box-shadow:inset 0 0 0 2px var(--color-primary01)}:host([open]) .z-tool{background:var(--color-primary03)}@media (hover: hover){:host(:hover),:host(.z-tool-tooltip-open){z-index:1}:host(:not([disabled])) .z-tool:hover{background-color:var(--color-primary03)}}.z-tool:focus:focus-visible{background-color:var(--color-primary03);outline:none}z-icon{--z-icon-width:var(--z-tool-icon-size);--z-icon-height:var(--z-tool-icon-size);display:block;fill:var(--color-default-icon)}:host([disabled]) .z-tool{color:var(--color-disabled01-icon);cursor:not-allowed}:host([disabled]) z-icon{fill:var(--color-disabled01-icon)}.z-tool-tooltip{--z-tooltip-padding:calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 2);--z-tooltip-shadow-filter:drop-shadow(0 4px 8px var(--shadow-color-base));position:relative;z-index:2;font-family:var(--font-family-sans);white-space:nowrap}.z-tool-submenu{z-index:3;border-radius:calc(var(--border-radius) + var(--border-size-small))}.z-tool-submenu ::slotted(z-color-picker){border:var(--border-size-small) solid var(--color-surface03);border-radius:var(--border-radius)}@media (max-width: 767px) and (hover: none){.z-tool-tooltip{display:none !important}}`;
|
|
@@ -187,10 +187,10 @@ const ZTool = class {
|
|
|
187
187
|
(_a = this.mql) === null || _a === void 0 ? void 0 : _a.removeEventListener("change", this.onMobileViewChange);
|
|
188
188
|
}
|
|
189
189
|
render() {
|
|
190
|
-
return (h(Host, { key: '
|
|
190
|
+
return (h(Host, { key: 'f5da5cd309607dc94dd12a28596b2ea02d28ba4c', class: { "z-tool-tooltip-open": this.tooltipOpen } }, h("button", { key: 'be63d078b5035ba1f08c480c8c08f365b3115191', class: "z-tool", type: "button", ref: (el) => (this.buttonRef = el), "aria-pressed": this.hasSlottedContent ? undefined : this.active ? "true" : "false", "aria-expanded": this.hasSlottedContent ? (this.open ? "true" : "false") : undefined, "aria-haspopup": this.hasSlottedContent ? "true" : undefined, "aria-label": this.htmlAriaLabel || this.tooltip || undefined, disabled: this.disabled, onClick: this.handleClick, onMouseEnter: this.handleTooltipOpen, onMouseLeave: this.handleTooltipClose, onFocus: this.handleTooltipOpen, onBlur: this.handleTooltipClose }, h("z-icon", { key: 'a08b5432871a1522374633050a835bb18001a6d6', ref: (el) => (this.iconRef = el), name: this.icon, indicatorColor: this.indicatorColor })), this.tooltip && (h("z-tooltip", { key: '9e0fa11a43662f333404543e315b097aa96ab08c', class: "z-tool-tooltip", ref: (el) => (this.tooltipRef = el), bindTo: this.iconRef, open: this.tooltipOpen && !this.open, position: this.isNested ? PopoverPosition.BOTTOM : this.tooltipPosition, dark: true, onMouseLeave: this.handleTooltipClose, onBlur: this.handleTooltipClose, onOpenChange: this.onTooltipOpenChange }, h("span", { key: 'bfc2be83824830ed05b70f423e9f044015624f49', class: "body-4" }, this.tooltip))), this.hasSlottedContent && (h("z-popover", { key: '717697756e5333f066f96c96695cd9741b006e93', class: "z-tool-submenu", open: this.open, bindTo: this.isMobile && this.mainToolbar ? this.mainToolbar : this.hostElement, center: true,
|
|
191
191
|
/* disable auto-close to prevent unwanted close behaviors on mobile,
|
|
192
192
|
when the bound element is the main toolbar */
|
|
193
|
-
closable: false, position: this.isMobile ? PopoverPosition.TOP : PopoverPosition.BOTTOM }, h("slot", { key: '
|
|
193
|
+
closable: false, position: this.isMobile ? PopoverPosition.TOP : PopoverPosition.BOTTOM }, h("slot", { key: 'd151d02e38fb7a0941012ec969b6cea647721846' })))));
|
|
194
194
|
}
|
|
195
195
|
get hostElement() { return getElement(this); }
|
|
196
196
|
static get watchers() { return {
|
|
@@ -129,7 +129,7 @@ const ZToolbar = class {
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
render() {
|
|
132
|
-
return (h(Host, { key: '
|
|
132
|
+
return (h(Host, { key: '9f77e33a2a5e3566137ca23c4a41526b58b46515', role: "toolbar", "aria-label": this.htmlAriaLabel }, h("slot", { key: 'a62af35ef54781baee92f865a969a8642ce58703', onSlotchange: () => {
|
|
133
133
|
this.collectToolItems();
|
|
134
134
|
this.updateTabIndexes();
|
|
135
135
|
} })));
|
|
@@ -26,7 +26,7 @@ const ZTooltip = class {
|
|
|
26
26
|
this.open = this.popoverEl.open;
|
|
27
27
|
}
|
|
28
28
|
render() {
|
|
29
|
-
return (h("z-popover", { key: '
|
|
29
|
+
return (h("z-popover", { key: '0cc1e8ea0e6896f5031309a5984c09df4b095d8b', ref: (el) => (this.popoverEl = el), bindTo: this.bindTo, open: this.open, position: this.position, closable: this.closable, center: true, showArrow: true, onOpenChange: (event) => this.openChange.emit(event.detail) }, h("slot", { key: 'a0548343b099fe7986066d821a455f1092428b38' })));
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
ZTooltip.style = stylesCss();
|
package/dist/esm/z-tr.entry.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, d as getElement } from './index-DPdXlnVe.js';
|
|
2
|
-
import { r as randomId } from './utils-
|
|
2
|
+
import { r as randomId } from './utils-BEzZQwOB.js';
|
|
3
3
|
import './z-td.entry.js';
|
|
4
4
|
import './z-th.entry.js';
|
|
5
5
|
import './index-BKCj6NR2.js';
|
|
@@ -31,6 +31,10 @@ export declare class ZAppHeader implements ComponentInterface {
|
|
|
31
31
|
* Placeholder text for the search bar.
|
|
32
32
|
*/
|
|
33
33
|
searchPlaceholder: string;
|
|
34
|
+
/**
|
|
35
|
+
* Label of the search button.
|
|
36
|
+
*/
|
|
37
|
+
searchButtonLabel?: string;
|
|
34
38
|
/**
|
|
35
39
|
* Search string for the search bar.
|
|
36
40
|
*/
|
|
@@ -20,6 +20,8 @@ declare const StoryMeta: {
|
|
|
20
20
|
"--app-header-content-max-width": string;
|
|
21
21
|
enableSearch: false;
|
|
22
22
|
searchPageUrl: string;
|
|
23
|
+
searchPlaceholder: string;
|
|
24
|
+
searchButtonLabel: string;
|
|
23
25
|
enableZLogo: false;
|
|
24
26
|
enableOffcanvas: false;
|
|
25
27
|
};
|
|
@@ -93,6 +95,11 @@ export declare const OffcanvasMenu: {
|
|
|
93
95
|
args: {
|
|
94
96
|
enableOffcanvas: true;
|
|
95
97
|
};
|
|
98
|
+
parameters: {
|
|
99
|
+
controls: {
|
|
100
|
+
exclude: string[];
|
|
101
|
+
};
|
|
102
|
+
};
|
|
96
103
|
render: (args: ZAppHeaderStoriesArgs) => TemplateResult<1>;
|
|
97
104
|
};
|
|
98
105
|
export declare const Stuck: {
|
|
@@ -20,6 +20,10 @@ export declare class ZInput implements ComponentInterface {
|
|
|
20
20
|
htmlAriaAutocomplete?: string;
|
|
21
21
|
/** the input aria-activedescendant (optional): available for text, password, number, email */
|
|
22
22
|
htmlAriaActivedescendant?: string;
|
|
23
|
+
/** the input aria-describedby (optional) */
|
|
24
|
+
htmlAriaDescribedBy?: string;
|
|
25
|
+
/** the input aria-labelledby (optional) */
|
|
26
|
+
htmlAriaLabelledby?: string;
|
|
23
27
|
/** the input value */
|
|
24
28
|
value?: string;
|
|
25
29
|
/** the input is disabled */
|
|
@@ -38,8 +42,6 @@ export declare class ZInput implements ComponentInterface {
|
|
|
38
42
|
status?: InputStatus;
|
|
39
43
|
/** input helper message (optional): available for text, password, number, email, textarea - if set to `false` message won't be displayed */
|
|
40
44
|
message?: string | boolean;
|
|
41
|
-
/** input helper message id (optional): available for text, password, number, email, textarea - if set, it will be used to populate the aria-describedby attribute, otherwise the attribute (if present) will be populated with an auto-generated value */
|
|
42
|
-
htmlAriaDescribedBy?: string;
|
|
43
45
|
/** the input label position: available for checkbox, radio */
|
|
44
46
|
labelPosition?: LabelPosition;
|
|
45
47
|
/** the input has autocomplete option (optional): available for text, password, number, email */
|
|
@@ -94,9 +96,9 @@ export declare class ZInput implements ComponentInterface {
|
|
|
94
96
|
private getTextAttributes;
|
|
95
97
|
private getNumberAttributes;
|
|
96
98
|
private getPatternAttribute;
|
|
97
|
-
private getRoleAttribute;
|
|
98
99
|
private inputHasMessage;
|
|
99
|
-
private
|
|
100
|
+
private getAriaAttributes;
|
|
101
|
+
private getTextAriaAttributes;
|
|
100
102
|
private getFocusBlurAttributes;
|
|
101
103
|
private renderInputText;
|
|
102
104
|
private renderLabel;
|
|
@@ -6,13 +6,14 @@ import { ButtonVariant, ControlSize, SearchbarItem } from "../../beans";
|
|
|
6
6
|
* @cssprop --z-searchbar-tag-bg - Color of tag's background (default --color-hover-primary);
|
|
7
7
|
*/
|
|
8
8
|
export declare class ZSearchbar implements ComponentInterface {
|
|
9
|
-
|
|
9
|
+
host: HTMLZSearchbarElement;
|
|
10
|
+
/** The id of the searchbar element */
|
|
10
11
|
htmlid: string;
|
|
11
12
|
/** Prevent submit action */
|
|
12
13
|
preventSubmit?: boolean;
|
|
13
|
-
/**
|
|
14
|
+
/** The input label */
|
|
14
15
|
label?: string;
|
|
15
|
-
/**
|
|
16
|
+
/** The input aria-label */
|
|
16
17
|
htmlAriaLabel?: string;
|
|
17
18
|
/** Input search string */
|
|
18
19
|
value?: string;
|
|
@@ -22,7 +23,7 @@ export declare class ZSearchbar implements ComponentInterface {
|
|
|
22
23
|
autocomplete?: boolean;
|
|
23
24
|
/** Minimun number of characters to dispatch typing event */
|
|
24
25
|
autocompleteMinChars?: number;
|
|
25
|
-
/** Number of results shown
|
|
26
|
+
/** Number of results shown. Default: all */
|
|
26
27
|
resultsCount?: number;
|
|
27
28
|
/** Search helper text */
|
|
28
29
|
searchHelperLabel?: string;
|
|
@@ -32,55 +33,52 @@ export declare class ZSearchbar implements ComponentInterface {
|
|
|
32
33
|
sortResultsItems?: boolean;
|
|
33
34
|
/** Show submit button */
|
|
34
35
|
showSearchButton?: boolean;
|
|
35
|
-
/**
|
|
36
|
+
/** Hide the label of the submit button, showing only the icon */
|
|
36
37
|
searchButtonIconOnly?: boolean;
|
|
37
|
-
/**
|
|
38
|
+
/** The label of the submit button */
|
|
39
|
+
searchButtonLabel?: string;
|
|
40
|
+
/** Size of the `z-input` and submit `z-button` */
|
|
38
41
|
size?: ControlSize;
|
|
39
|
-
/**
|
|
42
|
+
/** Submit `z-button` variant */
|
|
40
43
|
variant?: ButtonVariant;
|
|
41
44
|
searchString: string;
|
|
42
|
-
currResultsCount: number;
|
|
45
|
+
currResultsCount: number | undefined;
|
|
43
46
|
showResults: boolean;
|
|
44
47
|
isMobile: boolean;
|
|
45
48
|
selectedItem?: SearchbarItem;
|
|
46
|
-
element: HTMLZSearchbarElement;
|
|
47
49
|
private resultsItemsList;
|
|
48
50
|
private inputRef;
|
|
49
|
-
|
|
50
|
-
private
|
|
51
|
+
/** Media query list for detecting mobile view. */
|
|
52
|
+
private mql?;
|
|
53
|
+
/** Listener for changes in the mobile view media query. */
|
|
54
|
+
private onMobileViewChange?;
|
|
51
55
|
/** Emitted on search submit, return search string */
|
|
52
56
|
searchSubmit: EventEmitter<string>;
|
|
53
|
-
private emitSearchSubmit;
|
|
54
57
|
/** Emitted on search typing, return search string */
|
|
55
58
|
searchTyping: EventEmitter<string>;
|
|
56
|
-
private emitSearchTyping;
|
|
57
59
|
/** Emitted on search result click, return item */
|
|
58
60
|
searchItemClick: EventEmitter<SearchbarItem>;
|
|
59
61
|
private emitSearchItemClick;
|
|
62
|
+
private emitSearchSubmit;
|
|
60
63
|
watchItems(): void;
|
|
61
64
|
watchResultsCount(): void;
|
|
62
65
|
watchValue(): void;
|
|
63
66
|
watchSearchString(): void;
|
|
64
|
-
watchShowResults(): void;
|
|
65
|
-
disconnectedCallback(): void;
|
|
66
|
-
componentDidLoad(): void;
|
|
67
|
-
componentWillLoad(): void;
|
|
68
67
|
private getResultsItemsList;
|
|
69
68
|
private getGroupedItems;
|
|
70
|
-
private
|
|
69
|
+
private onListItemKeyDown;
|
|
70
|
+
private onSearchHelperKeyDown;
|
|
71
|
+
private handleArrowsNavigation;
|
|
71
72
|
private handleStopTyping;
|
|
72
73
|
private handleSubmit;
|
|
73
74
|
private handleOutsideClick;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
private renderResults;
|
|
77
|
-
private renderResultsList;
|
|
78
|
-
private renderItems;
|
|
79
|
-
private handleArrowsNavigation;
|
|
80
|
-
private renderItem;
|
|
75
|
+
componentWillLoad(): void;
|
|
76
|
+
disconnectedCallback(): void;
|
|
81
77
|
private renderItemLabel;
|
|
82
|
-
private
|
|
83
|
-
|
|
84
|
-
|
|
78
|
+
private renderItem;
|
|
79
|
+
/**
|
|
80
|
+
* Renders the item grouped by category and subcategory. If `resultsCount` is set, it limits the number of rendered items.
|
|
81
|
+
*/
|
|
82
|
+
private renderItemGroups;
|
|
85
83
|
render(): HTMLZSearchbarElement;
|
|
86
84
|
}
|