@zanichelli/albe-web-components 17.0.2 → 17.0.4
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 +4 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/z-anchor-navigation.cjs.entry.js +1 -1
- package/dist/cjs/z-anchor-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/z-app-header_12.cjs.entry.js +13 -14
- package/dist/cjs/z-app-header_12.cjs.entry.js.map +1 -1
- package/dist/cjs/z-book-card-app.cjs.entry.js +1 -1
- package/dist/cjs/z-book-card-app.cjs.entry.js.map +1 -1
- package/dist/cjs/z-book-card.cjs.entry.js +2 -2
- package/dist/cjs/z-book-card.cjs.entry.js.map +1 -1
- package/dist/cjs/z-date-picker.cjs.entry.js +5 -3
- package/dist/cjs/z-date-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/z-pagination.cjs.entry.js +1 -1
- package/dist/cjs/z-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/z-select.cjs.entry.js +27 -35
- package/dist/cjs/z-select.cjs.entry.js.map +1 -1
- package/dist/collection/components/book-card/z-book-card/index.js +1 -1
- package/dist/collection/components/book-card/z-book-card/index.js.map +1 -1
- package/dist/collection/components/book-card/z-book-card/styles.css +3 -0
- package/dist/collection/components/book-card/z-book-card-app/styles.css +1 -0
- package/dist/collection/components/date-picker/z-date-picker/index.js +41 -3
- package/dist/collection/components/date-picker/z-date-picker/index.js.map +1 -1
- package/dist/collection/components/date-picker/z-date-picker/index.stories.js +17 -5
- package/dist/collection/components/date-picker/z-date-picker/index.stories.js.map +1 -1
- package/dist/collection/components/z-anchor-navigation/index.stories.js +16 -4
- package/dist/collection/components/z-anchor-navigation/index.stories.js.map +1 -1
- package/dist/collection/components/z-anchor-navigation/styles.css +7 -4
- package/dist/collection/components/z-app-header/styles.css +1 -0
- package/dist/collection/components/z-input/index.js +9 -11
- package/dist/collection/components/z-input/index.js.map +1 -1
- package/dist/collection/components/z-input/index.stories.js +21 -21
- package/dist/collection/components/z-input/index.stories.js.map +1 -1
- package/dist/collection/components/z-input/styles.css +97 -75
- package/dist/collection/components/z-input-message/index.js +19 -1
- package/dist/collection/components/z-input-message/index.js.map +1 -1
- package/dist/collection/components/z-input-message/styles.css +9 -4
- package/dist/collection/components/z-pagination/styles.css +7 -11
- package/dist/collection/components/z-select/index.js +27 -35
- package/dist/collection/components/z-select/index.js.map +1 -1
- package/dist/collection/components/z-select/styles.css +18 -17
- package/dist/components/index11.js +10 -12
- package/dist/components/index11.js.map +1 -1
- package/dist/components/index12.js +4 -2
- package/dist/components/index12.js.map +1 -1
- package/dist/components/utils.js +1 -1
- package/dist/components/z-anchor-navigation.js +1 -1
- package/dist/components/z-anchor-navigation.js.map +1 -1
- package/dist/components/z-app-header.js +1 -1
- package/dist/components/z-app-header.js.map +1 -1
- package/dist/components/z-book-card-app.js +1 -1
- package/dist/components/z-book-card-app.js.map +1 -1
- package/dist/components/z-book-card.js +2 -2
- package/dist/components/z-book-card.js.map +1 -1
- package/dist/components/z-date-picker.js +7 -3
- package/dist/components/z-date-picker.js.map +1 -1
- package/dist/components/z-pagination.js +1 -1
- package/dist/components/z-pagination.js.map +1 -1
- package/dist/components/z-select.js +28 -36
- package/dist/components/z-select.js.map +1 -1
- package/dist/components/z-skip-to-content.js +1 -1
- package/dist/esm/{index-8df19678.js → index-092fc7cc.js} +2 -2
- package/dist/esm/{index-8df19678.js.map → index-092fc7cc.js.map} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-ed82ce58.js → utils-b924649f.js} +2 -2
- package/dist/esm/{utils-ed82ce58.js.map → utils-b924649f.js.map} +1 -1
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/z-anchor-navigation.entry.js +1 -1
- package/dist/esm/z-anchor-navigation.entry.js.map +1 -1
- package/dist/esm/z-app-header_12.entry.js +14 -15
- package/dist/esm/z-app-header_12.entry.js.map +1 -1
- package/dist/esm/z-book-card-app.entry.js +1 -1
- package/dist/esm/z-book-card-app.entry.js.map +1 -1
- package/dist/esm/z-book-card-deprecated.entry.js +1 -1
- package/dist/esm/z-book-card.entry.js +2 -2
- package/dist/esm/z-book-card.entry.js.map +1 -1
- package/dist/esm/z-breadcrumb.entry.js +1 -1
- package/dist/esm/z-combobox.entry.js +1 -1
- package/dist/esm/z-date-picker.entry.js +5 -3
- package/dist/esm/z-date-picker.entry.js.map +1 -1
- package/dist/esm/z-menu.entry.js +1 -1
- package/dist/esm/z-myz-card-info.entry.js +1 -1
- package/dist/esm/z-myz-list-item.entry.js +1 -1
- package/dist/esm/z-pagination.entry.js +1 -1
- package/dist/esm/z-pagination.entry.js.map +1 -1
- package/dist/esm/z-select.entry.js +28 -36
- package/dist/esm/z-select.entry.js.map +1 -1
- package/dist/esm/z-skip-to-content.entry.js +1 -1
- package/dist/esm/z-slideshow.entry.js +1 -1
- package/dist/esm/z-table.entry.js +2 -2
- package/dist/esm/z-toggle-switch.entry.js +1 -1
- package/dist/esm/z-tr.entry.js +2 -2
- package/dist/types/components/date-picker/z-date-picker/index.d.ts +4 -0
- package/dist/types/components/z-input-message/index.d.ts +2 -0
- package/dist/types/components/z-select/index.d.ts +1 -1
- package/dist/types/components.d.ts +24 -0
- package/dist/web-components-library/index.esm.js +1 -1
- package/dist/web-components-library/p-0378c12a.entry.js +2 -0
- package/dist/web-components-library/p-0378c12a.entry.js.map +1 -0
- package/dist/web-components-library/p-1e3ff105.entry.js +2 -0
- package/dist/web-components-library/p-1e3ff105.entry.js.map +1 -0
- package/dist/web-components-library/{p-caccf490.entry.js → p-22e32e11.entry.js} +2 -2
- package/{www/build/p-caccf490.entry.js.map → dist/web-components-library/p-22e32e11.entry.js.map} +1 -1
- package/dist/web-components-library/{p-20b628e7.entry.js → p-2fa0042e.entry.js} +2 -2
- package/dist/web-components-library/p-4a3fedbf.entry.js +2 -0
- package/dist/web-components-library/p-4a3fedbf.entry.js.map +1 -0
- package/dist/web-components-library/{p-4fedcbc2.entry.js → p-5387e6f3.entry.js} +2 -2
- package/{www/build/p-0565f1b2.entry.js → dist/web-components-library/p-758333dc.entry.js} +2 -2
- package/{www/build/p-605f6780.entry.js → dist/web-components-library/p-7af33b00.entry.js} +2 -2
- package/{www/build/p-b309bd71.entry.js → dist/web-components-library/p-7f370d17.entry.js} +2 -2
- package/dist/web-components-library/{p-65f1b68b.entry.js → p-9c4b7a51.entry.js} +2 -2
- package/dist/web-components-library/{p-037c59b3.js → p-bba6129f.js} +2 -2
- package/dist/web-components-library/{p-cc8186a9.entry.js → p-bd571858.entry.js} +2 -2
- package/dist/web-components-library/p-c29a520b.entry.js +2 -0
- package/{www/build/p-34f4f441.entry.js.map → dist/web-components-library/p-c29a520b.entry.js.map} +1 -1
- package/dist/web-components-library/p-ce0d5448.entry.js +2 -0
- package/dist/web-components-library/p-ce0d5448.entry.js.map +1 -0
- package/dist/web-components-library/{p-9f0a3d88.entry.js → p-cf7b7e73.entry.js} +2 -2
- package/dist/web-components-library/p-d1cca5ea.entry.js +2 -0
- package/dist/web-components-library/p-d1cca5ea.entry.js.map +1 -0
- package/dist/web-components-library/p-d6a2b1c6.entry.js +2 -0
- package/dist/web-components-library/p-d6a2b1c6.entry.js.map +1 -0
- package/dist/web-components-library/p-e185545c.entry.js +2 -0
- package/dist/web-components-library/{p-10607a39.js → p-e691c0b8.js} +2 -2
- package/{www/build/p-3bf02cab.entry.js → dist/web-components-library/p-e78353d6.entry.js} +2 -2
- package/dist/web-components-library/web-components-library.css +125 -72
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/dist/web-components-library/web-components-library.esm.js.map +1 -1
- package/package.json +1 -1
- package/www/build/index.esm.js +1 -1
- package/www/build/p-01994cd6.js +2 -0
- package/www/build/p-0378c12a.entry.js +2 -0
- package/www/build/p-0378c12a.entry.js.map +1 -0
- package/www/build/p-1e3ff105.entry.js +2 -0
- package/www/build/p-1e3ff105.entry.js.map +1 -0
- package/www/build/{p-caccf490.entry.js → p-22e32e11.entry.js} +2 -2
- package/{dist/web-components-library/p-caccf490.entry.js.map → www/build/p-22e32e11.entry.js.map} +1 -1
- package/www/build/{p-20b628e7.entry.js → p-2fa0042e.entry.js} +2 -2
- package/www/build/p-4a3fedbf.entry.js +2 -0
- package/www/build/p-4a3fedbf.entry.js.map +1 -0
- package/www/build/{p-4fedcbc2.entry.js → p-5387e6f3.entry.js} +2 -2
- package/{dist/web-components-library/p-0565f1b2.entry.js → www/build/p-758333dc.entry.js} +2 -2
- package/{dist/web-components-library/p-605f6780.entry.js → www/build/p-7af33b00.entry.js} +2 -2
- package/{dist/web-components-library/p-b309bd71.entry.js → www/build/p-7f370d17.entry.js} +2 -2
- package/www/build/{p-65f1b68b.entry.js → p-9c4b7a51.entry.js} +2 -2
- package/www/build/{p-4c358c38.css → p-a35437c8.css} +125 -72
- package/www/build/{p-037c59b3.js → p-bba6129f.js} +2 -2
- package/www/build/{p-cc8186a9.entry.js → p-bd571858.entry.js} +2 -2
- package/www/build/p-c29a520b.entry.js +2 -0
- package/{dist/web-components-library/p-34f4f441.entry.js.map → www/build/p-c29a520b.entry.js.map} +1 -1
- package/www/build/p-ce0d5448.entry.js +2 -0
- package/www/build/p-ce0d5448.entry.js.map +1 -0
- package/www/build/{p-9f0a3d88.entry.js → p-cf7b7e73.entry.js} +2 -2
- package/www/build/p-d1cca5ea.entry.js +2 -0
- package/www/build/p-d1cca5ea.entry.js.map +1 -0
- package/www/build/p-d6a2b1c6.entry.js +2 -0
- package/www/build/p-d6a2b1c6.entry.js.map +1 -0
- package/www/build/p-e185545c.entry.js +2 -0
- package/www/build/{p-10607a39.js → p-e691c0b8.js} +2 -2
- package/{dist/web-components-library/p-3bf02cab.entry.js → www/build/p-e78353d6.entry.js} +2 -2
- package/www/build/web-components-library.css +125 -72
- package/www/build/web-components-library.esm.js +1 -1
- package/www/build/web-components-library.esm.js.map +1 -1
- package/www/index.html +1 -1
- package/www/pages/book-cards.html +20 -14
- package/dist/web-components-library/p-015621c8.entry.js +0 -2
- package/dist/web-components-library/p-015621c8.entry.js.map +0 -1
- package/dist/web-components-library/p-34f4f441.entry.js +0 -2
- package/dist/web-components-library/p-38e8c15d.entry.js +0 -2
- package/dist/web-components-library/p-38e8c15d.entry.js.map +0 -1
- package/dist/web-components-library/p-54a70792.entry.js +0 -2
- package/dist/web-components-library/p-54a70792.entry.js.map +0 -1
- package/dist/web-components-library/p-60a9cb8b.entry.js +0 -2
- package/dist/web-components-library/p-60a9cb8b.entry.js.map +0 -1
- package/dist/web-components-library/p-972098a5.entry.js +0 -2
- package/dist/web-components-library/p-972098a5.entry.js.map +0 -1
- package/dist/web-components-library/p-a90027c2.entry.js +0 -2
- package/dist/web-components-library/p-a90027c2.entry.js.map +0 -1
- package/dist/web-components-library/p-deb86b5c.entry.js +0 -2
- package/www/build/p-015621c8.entry.js +0 -2
- package/www/build/p-015621c8.entry.js.map +0 -1
- package/www/build/p-34f4f441.entry.js +0 -2
- package/www/build/p-38e8c15d.entry.js +0 -2
- package/www/build/p-38e8c15d.entry.js.map +0 -1
- package/www/build/p-45f04bb4.js +0 -2
- package/www/build/p-54a70792.entry.js +0 -2
- package/www/build/p-54a70792.entry.js.map +0 -1
- package/www/build/p-60a9cb8b.entry.js +0 -2
- package/www/build/p-60a9cb8b.entry.js.map +0 -1
- package/www/build/p-972098a5.entry.js +0 -2
- package/www/build/p-972098a5.entry.js.map +0 -1
- package/www/build/p-a90027c2.entry.js +0 -2
- package/www/build/p-a90027c2.entry.js.map +0 -1
- package/www/build/p-deb86b5c.entry.js +0 -2
- /package/dist/web-components-library/{p-20b628e7.entry.js.map → p-2fa0042e.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-4fedcbc2.entry.js.map → p-5387e6f3.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-0565f1b2.entry.js.map → p-758333dc.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-605f6780.entry.js.map → p-7af33b00.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-b309bd71.entry.js.map → p-7f370d17.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-65f1b68b.entry.js.map → p-9c4b7a51.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-037c59b3.js.map → p-bba6129f.js.map} +0 -0
- /package/dist/web-components-library/{p-cc8186a9.entry.js.map → p-bd571858.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-9f0a3d88.entry.js.map → p-cf7b7e73.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-deb86b5c.entry.js.map → p-e185545c.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-10607a39.js.map → p-e691c0b8.js.map} +0 -0
- /package/dist/web-components-library/{p-3bf02cab.entry.js.map → p-e78353d6.entry.js.map} +0 -0
- /package/www/build/{p-20b628e7.entry.js.map → p-2fa0042e.entry.js.map} +0 -0
- /package/www/build/{p-4fedcbc2.entry.js.map → p-5387e6f3.entry.js.map} +0 -0
- /package/www/build/{p-0565f1b2.entry.js.map → p-758333dc.entry.js.map} +0 -0
- /package/www/build/{p-605f6780.entry.js.map → p-7af33b00.entry.js.map} +0 -0
- /package/www/build/{p-b309bd71.entry.js.map → p-7f370d17.entry.js.map} +0 -0
- /package/www/build/{p-65f1b68b.entry.js.map → p-9c4b7a51.entry.js.map} +0 -0
- /package/www/build/{p-037c59b3.js.map → p-bba6129f.js.map} +0 -0
- /package/www/build/{p-cc8186a9.entry.js.map → p-bd571858.entry.js.map} +0 -0
- /package/www/build/{p-9f0a3d88.entry.js.map → p-cf7b7e73.entry.js.map} +0 -0
- /package/www/build/{p-deb86b5c.entry.js.map → p-e185545c.entry.js.map} +0 -0
- /package/www/build/{p-10607a39.js.map → p-e691c0b8.js.map} +0 -0
- /package/www/build/{p-3bf02cab.entry.js.map → p-e78353d6.entry.js.map} +0 -0
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
width: inherit;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
+
:host * {
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
}
|
|
9
|
+
|
|
6
10
|
input::-ms-clear,
|
|
7
11
|
input::-ms-reveal {
|
|
8
12
|
display: none;
|
|
@@ -15,26 +19,26 @@ input::-ms-reveal {
|
|
|
15
19
|
}
|
|
16
20
|
|
|
17
21
|
input,
|
|
18
|
-
textarea
|
|
19
|
-
.textarea-wrapper {
|
|
20
|
-
box-sizing: border-box;
|
|
21
|
-
border: var(--border-size-small) solid var(--gray700);
|
|
22
|
+
textarea {
|
|
22
23
|
background: var(--color-form-background);
|
|
23
|
-
|
|
24
|
-
color: var(--gray900);
|
|
25
|
-
fill: var(--gray900);
|
|
24
|
+
fill: var(--color-form-default-icon);
|
|
26
25
|
font-family: var(--font-family-sans);
|
|
27
26
|
font-size: var(--font-size-3);
|
|
28
27
|
font-weight: var(--font-rg);
|
|
29
28
|
outline: none;
|
|
30
29
|
}
|
|
31
30
|
|
|
31
|
+
input,
|
|
32
|
+
.textarea-wrapper {
|
|
33
|
+
border: var(--border-size-small) solid var(--color-form-surface04);
|
|
34
|
+
border-radius: var(--border-radius-small);
|
|
35
|
+
color: var(--color-form-default-text);
|
|
36
|
+
}
|
|
37
|
+
|
|
32
38
|
:host([size="small"]) input,
|
|
33
39
|
:host([size="small"]) textarea,
|
|
34
|
-
:host([size="small"]) .textarea-wrapper,
|
|
35
40
|
:host([size="x-small"]) input,
|
|
36
|
-
:host([size="x-small"]) textarea
|
|
37
|
-
:host([size="x-small"]) .textarea-wrapper {
|
|
41
|
+
:host([size="x-small"]) textarea {
|
|
38
42
|
font-size: var(--font-size-2);
|
|
39
43
|
}
|
|
40
44
|
|
|
@@ -42,19 +46,32 @@ textarea,
|
|
|
42
46
|
cursor: pointer;
|
|
43
47
|
}
|
|
44
48
|
|
|
49
|
+
/* HOVER */
|
|
50
|
+
input:not([readonly]):hover,
|
|
51
|
+
.textarea-wrapper:not(.readonly):hover {
|
|
52
|
+
outline: var(--border-size-medium) solid var(--color-form-surface04);
|
|
53
|
+
outline-offset: -2px;
|
|
54
|
+
}
|
|
55
|
+
|
|
45
56
|
/* FOCUS */
|
|
46
57
|
:host:not(.active-select) input:focus:focus-visible,
|
|
47
|
-
|
|
58
|
+
.textarea-wrapper:focus-within {
|
|
59
|
+
border-color: var(--color-form-active-primary);
|
|
48
60
|
box-shadow: var(--shadow-focus-primary);
|
|
61
|
+
color: var(--color-form-active-primary);
|
|
49
62
|
}
|
|
50
63
|
|
|
51
|
-
input:focus:focus-visible,
|
|
52
|
-
textarea:
|
|
53
|
-
color: var(--color-
|
|
64
|
+
:host input:focus:focus-visible:hover,
|
|
65
|
+
.textarea-wrapper:not(.readonly):focus-within:hover {
|
|
66
|
+
outline-color: var(--color-form-active-primary);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
:host input:focus:focus-visible + .icons-wrapper {
|
|
70
|
+
fill: var(--color-form-active-primary);
|
|
54
71
|
}
|
|
55
72
|
|
|
56
73
|
:host.active-select input {
|
|
57
|
-
border: var(--border-size-small) solid var(--color-
|
|
74
|
+
border: var(--border-size-small) solid var(--color-form-active-primary);
|
|
58
75
|
}
|
|
59
76
|
|
|
60
77
|
:host.cursor-select input:focus:focus-visible {
|
|
@@ -65,76 +82,80 @@ textarea:focus:focus-visible {
|
|
|
65
82
|
box-shadow: none;
|
|
66
83
|
}
|
|
67
84
|
|
|
68
|
-
/* FILLED */
|
|
69
|
-
.filled {
|
|
70
|
-
border-color: var(--color-surface05);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
85
|
/* STATUSES (success, warning, error) */
|
|
74
86
|
.input-success {
|
|
75
|
-
border-color: var(--color-success01);
|
|
76
|
-
background: var(--color-
|
|
77
|
-
|
|
87
|
+
border-color: var(--color-form-success01);
|
|
88
|
+
background: var(--color-form-inverse-success);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.input-success:focus:focus-visible + .icons-wrapper,
|
|
92
|
+
.input-success + .icons-wrapper {
|
|
93
|
+
fill: var(--color-form-success01);
|
|
78
94
|
}
|
|
79
95
|
|
|
80
96
|
.input-error {
|
|
81
|
-
border-color: var(--color-
|
|
82
|
-
background: var(--color-
|
|
83
|
-
|
|
97
|
+
border-color: var(--color-form-hover-error);
|
|
98
|
+
background: var(--color-form-inverse-error);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.input-error:focus:focus-visible + .icons-wrapper,
|
|
102
|
+
.input-error + .icons-wrapper {
|
|
103
|
+
fill: var(--color-form-hover-error);
|
|
84
104
|
}
|
|
85
105
|
|
|
86
106
|
.input-warning {
|
|
87
|
-
border-color: var(--color-
|
|
107
|
+
border-color: var(--color-form-hover-warning);
|
|
88
108
|
background: var(--color-warning-inverse);
|
|
89
|
-
fill: var(--color-warning01);
|
|
90
109
|
}
|
|
91
110
|
|
|
92
|
-
|
|
93
|
-
input
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
111
|
+
.input-warning:focus:focus-visible + .icons-wrapper,
|
|
112
|
+
.input-warning + .icons-wrapper {
|
|
113
|
+
fill: var(--color-form-hover-warning);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
:is(.input-success, .input-error, .input-warning):focus:focus-visible {
|
|
117
|
+
color: var(--color-form-default-text);
|
|
97
118
|
}
|
|
98
119
|
|
|
99
120
|
/* READONLY */
|
|
100
121
|
:host:not(.active-select) input[readonly],
|
|
101
|
-
.readonly {
|
|
102
|
-
border-color: var(--color-
|
|
103
|
-
fill: var(--color-disabled01);
|
|
122
|
+
.textarea-wrapper.readonly {
|
|
123
|
+
border-color: var(--color-form-surface03);
|
|
124
|
+
fill: var(--color-form-disabled01-icon);
|
|
104
125
|
pointer-events: none;
|
|
105
126
|
}
|
|
106
127
|
|
|
107
128
|
/* DISABLED */
|
|
108
|
-
:host([disabled]
|
|
109
|
-
:host([disabled]
|
|
110
|
-
:host([disabled]
|
|
111
|
-
border-color: var(--color-
|
|
129
|
+
:host([disabled]) input,
|
|
130
|
+
:host([disabled]) .textarea-wrapper,
|
|
131
|
+
:host([disabled]) z-icon {
|
|
132
|
+
border-color: var(--color-form-disabled03);
|
|
112
133
|
box-shadow: none;
|
|
113
|
-
color: var(--color-
|
|
114
|
-
fill: var(--color-disabled01);
|
|
134
|
+
color: var(--color-form-disabled-text);
|
|
135
|
+
fill: var(--color-form-disabled01-icon);
|
|
115
136
|
pointer-events: none;
|
|
116
137
|
}
|
|
117
138
|
|
|
118
|
-
:host([disabled]
|
|
139
|
+
:host([disabled]) input:hover {
|
|
119
140
|
border-width: var(--border-size-small);
|
|
120
141
|
}
|
|
121
142
|
|
|
122
143
|
/* PLACEHOLDER */
|
|
123
144
|
input::placeholder,
|
|
124
145
|
textarea::placeholder {
|
|
125
|
-
color: var(--color-
|
|
146
|
+
color: var(--color-form-placeholder-text);
|
|
126
147
|
}
|
|
127
148
|
|
|
128
149
|
::-webkit-textarea-placeholder {
|
|
129
|
-
color: var(--color-
|
|
150
|
+
color: var(--color-form-placeholder-text);
|
|
130
151
|
}
|
|
131
152
|
|
|
132
153
|
:-ms-textarea-placeholder {
|
|
133
|
-
color: var(--color-
|
|
154
|
+
color: var(--color-form-placeholder-text);
|
|
134
155
|
}
|
|
135
156
|
|
|
136
157
|
::placeholder {
|
|
137
|
-
color: var(--color-
|
|
158
|
+
color: var(--color-form-placeholder-text);
|
|
138
159
|
}
|
|
139
160
|
|
|
140
161
|
/* LABEL */
|
|
@@ -149,14 +170,14 @@ label.input-label {
|
|
|
149
170
|
text-transform: uppercase;
|
|
150
171
|
}
|
|
151
172
|
|
|
152
|
-
:host([disabled]
|
|
173
|
+
:host([disabled]) label.input-label {
|
|
153
174
|
color: var(--color-disabled03);
|
|
154
175
|
}
|
|
155
176
|
|
|
156
177
|
.text-wrapper > div {
|
|
157
178
|
position: relative;
|
|
158
179
|
z-index: 1;
|
|
159
|
-
fill: var(--
|
|
180
|
+
fill: var(--color-form-default-icon);
|
|
160
181
|
}
|
|
161
182
|
|
|
162
183
|
.text-wrapper > div > input {
|
|
@@ -194,7 +215,8 @@ label.input-label {
|
|
|
194
215
|
transform: translateY(-50%);
|
|
195
216
|
}
|
|
196
217
|
|
|
197
|
-
.text-wrapper .icons-wrapper > button.icon
|
|
218
|
+
.text-wrapper .icons-wrapper > button.input-icon {
|
|
219
|
+
display: flex;
|
|
198
220
|
padding: 0;
|
|
199
221
|
border: 0;
|
|
200
222
|
background: none;
|
|
@@ -203,33 +225,33 @@ label.input-label {
|
|
|
203
225
|
pointer-events: initial;
|
|
204
226
|
}
|
|
205
227
|
|
|
206
|
-
.text-wrapper .icons-wrapper >
|
|
228
|
+
.text-wrapper .icons-wrapper > .input-icon + .input-icon {
|
|
207
229
|
margin-left: calc(var(--space-unit) * 0.5);
|
|
208
230
|
}
|
|
209
231
|
|
|
210
|
-
.text-wrapper .icons-wrapper > button.icon
|
|
232
|
+
.text-wrapper .icons-wrapper > button.input-icon.hidden {
|
|
211
233
|
display: none;
|
|
212
234
|
}
|
|
213
235
|
|
|
214
|
-
.text-wrapper .icons-wrapper > button.
|
|
215
|
-
.text-wrapper .icons-wrapper > button.
|
|
236
|
+
.text-wrapper .icons-wrapper > button.reset-icon,
|
|
237
|
+
.text-wrapper .icons-wrapper > button.toggle-password-icon {
|
|
216
238
|
cursor: pointer;
|
|
217
239
|
}
|
|
218
240
|
|
|
219
|
-
.text-wrapper .icons-wrapper >
|
|
241
|
+
.text-wrapper .icons-wrapper > .input-icon {
|
|
220
242
|
--z-icon-width: 18px;
|
|
221
243
|
--z-icon-height: 18px;
|
|
222
244
|
|
|
223
245
|
display: block;
|
|
224
246
|
}
|
|
225
247
|
|
|
226
|
-
.text-wrapper .icons-wrapper >
|
|
227
|
-
.text-wrapper .icons-wrapper >
|
|
248
|
+
.text-wrapper .icons-wrapper > .input-icon.small,
|
|
249
|
+
.text-wrapper .icons-wrapper > .input-icon.x-small {
|
|
228
250
|
--z-icon-width: 16px;
|
|
229
251
|
--z-icon-height: 16px;
|
|
230
252
|
}
|
|
231
253
|
|
|
232
|
-
.text-wrapper .icons-wrapper > button.icon
|
|
254
|
+
.text-wrapper .icons-wrapper > button.input-icon:focus {
|
|
233
255
|
box-shadow: var(--shadow-focus-primary);
|
|
234
256
|
outline: none !important;
|
|
235
257
|
}
|
|
@@ -241,38 +263,38 @@ label.input-label {
|
|
|
241
263
|
}
|
|
242
264
|
|
|
243
265
|
.textarea-wrapper {
|
|
266
|
+
width: 100%;
|
|
267
|
+
height: 100%;
|
|
244
268
|
padding: calc(var(--space-unit) * 1.5);
|
|
245
|
-
|
|
246
|
-
/* Firefox scrollbar */
|
|
247
|
-
scrollbar-color: var(--color-primary01) transparent;
|
|
248
269
|
}
|
|
249
270
|
|
|
250
271
|
textarea::-webkit-scrollbar {
|
|
251
|
-
width:
|
|
252
|
-
background: linear-gradient(to right, transparent 0
|
|
253
|
-
border-radius: var(--border-radius);
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
textarea::-webkit-scrollbar-track {
|
|
257
|
-
background-color: transparent;
|
|
272
|
+
width: 6px;
|
|
273
|
+
background: linear-gradient(to right, transparent 0 1px, var(--gray200) 1px 5px, transparent 5px 6px);
|
|
258
274
|
}
|
|
259
275
|
|
|
260
276
|
textarea::-webkit-scrollbar-thumb {
|
|
261
|
-
width: 10px;
|
|
262
277
|
background-color: var(--color-primary01);
|
|
263
|
-
border-radius: var(--border-radius);
|
|
264
278
|
}
|
|
265
279
|
|
|
266
280
|
textarea::-webkit-scrollbar-thumb:hover {
|
|
267
281
|
background-color: var(--color-hover-primary);
|
|
268
282
|
}
|
|
269
283
|
|
|
284
|
+
/* Firefox scrollbar */
|
|
285
|
+
@supports not selector(textarea::-webkit-scrollbar-track) {
|
|
286
|
+
textarea {
|
|
287
|
+
scrollbar-color: var(--color-primary01) transparent;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
270
291
|
textarea {
|
|
271
292
|
width: 100%;
|
|
272
293
|
min-height: 132px;
|
|
273
294
|
padding: 0;
|
|
274
295
|
border: none;
|
|
275
296
|
margin: 0;
|
|
297
|
+
color: currentcolor;
|
|
276
298
|
resize: none;
|
|
277
299
|
}
|
|
278
300
|
|
|
@@ -282,14 +304,14 @@ textarea {
|
|
|
282
304
|
display: inline-flex;
|
|
283
305
|
flex-direction: row;
|
|
284
306
|
align-items: center;
|
|
285
|
-
color: var(--color-default-text);
|
|
286
|
-
fill: var(--color-
|
|
307
|
+
color: var(--color-form-default-text);
|
|
308
|
+
fill: var(--color-form-active-primary);
|
|
287
309
|
font-family: var(--font-family-sans);
|
|
288
310
|
}
|
|
289
311
|
|
|
290
312
|
.radio-wrapper:hover,
|
|
291
313
|
.checkbox-wrapper:hover {
|
|
292
|
-
color: var(--color-hover-primary);
|
|
314
|
+
color: var(--color-form-hover-primary);
|
|
293
315
|
fill: currentcolor;
|
|
294
316
|
}
|
|
295
317
|
|
|
@@ -398,12 +420,12 @@ textarea {
|
|
|
398
420
|
/* disabled */
|
|
399
421
|
.radio-wrapper > input:disabled + .radio-label,
|
|
400
422
|
.checkbox-wrapper > input:disabled + .checkbox-label {
|
|
401
|
-
color: var(--color-
|
|
423
|
+
color: var(--color-form-disabled-text);
|
|
402
424
|
}
|
|
403
425
|
|
|
404
426
|
.radio-wrapper > input:disabled + .radio-label > z-icon,
|
|
405
427
|
.checkbox-wrapper > input:disabled + .checkbox-label > z-icon {
|
|
406
428
|
cursor: default;
|
|
407
|
-
fill: var(--color-disabled01);
|
|
429
|
+
fill: var(--color-form-disabled01-icon);
|
|
408
430
|
}
|
|
409
431
|
|
|
@@ -8,6 +8,7 @@ export class ZInputMessage {
|
|
|
8
8
|
};
|
|
9
9
|
this.message = undefined;
|
|
10
10
|
this.status = undefined;
|
|
11
|
+
this.disabled = undefined;
|
|
11
12
|
this.statusRole = {};
|
|
12
13
|
}
|
|
13
14
|
onMessageChange() {
|
|
@@ -17,7 +18,7 @@ export class ZInputMessage {
|
|
|
17
18
|
this.onMessageChange();
|
|
18
19
|
}
|
|
19
20
|
render() {
|
|
20
|
-
return (h(Host, Object.assign({ key: '
|
|
21
|
+
return (h(Host, Object.assign({ key: 'f7d15c2c744fbc9f7822a57245d552980e7f36b2' }, this.statusRole, { "aria-label": this.message }), this.statusIcons[this.status] && this.message && h("z-icon", { key: '1124a2604c6def360993c6a83ce90d5a950e9f7c', name: this.statusIcons[this.status] }), h("span", { key: 'a5186a1bf672e27ef9d85fd47b7f73b71e8f0998', innerHTML: this.message })));
|
|
21
22
|
}
|
|
22
23
|
static get is() { return "z-input-message"; }
|
|
23
24
|
static get encapsulation() { return "shadow"; }
|
|
@@ -72,6 +73,23 @@ export class ZInputMessage {
|
|
|
72
73
|
},
|
|
73
74
|
"attribute": "status",
|
|
74
75
|
"reflect": true
|
|
76
|
+
},
|
|
77
|
+
"disabled": {
|
|
78
|
+
"type": "boolean",
|
|
79
|
+
"mutable": false,
|
|
80
|
+
"complexType": {
|
|
81
|
+
"original": "boolean",
|
|
82
|
+
"resolved": "boolean",
|
|
83
|
+
"references": {}
|
|
84
|
+
},
|
|
85
|
+
"required": false,
|
|
86
|
+
"optional": true,
|
|
87
|
+
"docs": {
|
|
88
|
+
"tags": [],
|
|
89
|
+
"text": "input disabled status (optional)"
|
|
90
|
+
},
|
|
91
|
+
"attribute": "disabled",
|
|
92
|
+
"reflect": true
|
|
75
93
|
}
|
|
76
94
|
};
|
|
77
95
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/z-input-message/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AACrE,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AAOxC,MAAM,OAAO,aAAa;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/z-input-message/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AACrE,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AAOxC,MAAM,OAAO,aAAa;;QAahB,gBAAW,GAAG;YACpB,OAAO,EAAE,kBAAkB;YAC3B,KAAK,EAAE,kBAAkB;YACzB,OAAO,EAAE,oBAAoB;SAC9B,CAAC;;;;0BAGW,EAAE;;IAIf,eAAe;QACb,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACvE,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qEACC,IAAI,CAAC,UAAU,kBACP,IAAI,CAAC,OAAO;YAEvB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,OAAO,IAAI,+DAAQ,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,GAAW;YACxG,6DAAM,SAAS,EAAE,IAAI,CAAC,OAAO,GAAI,CAC5B,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Host, Prop, State, Watch, h} from \"@stencil/core\";\nimport {InputStatus} from \"../../beans\";\n\n@Component({\n tag: \"z-input-message\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZInputMessage {\n /** input helper message */\n @Prop()\n message: string;\n\n /** input status (optional) */\n @Prop({reflect: true})\n status?: InputStatus;\n\n /** input disabled status (optional) */\n @Prop({reflect: true})\n disabled?: boolean;\n\n private statusIcons = {\n success: \"checkmark-circle\",\n error: \"multiply-circled\",\n warning: \"exclamation-circle\",\n };\n\n @State()\n statusRole = {};\n\n @Watch(\"message\")\n @Watch(\"status\")\n onMessageChange(): void {\n this.statusRole = this.message && this.status ? {role: \"alert\"} : {};\n }\n\n componentWillLoad(): void {\n this.onMessageChange();\n }\n\n render(): HTMLZInputMessageElement {\n return (\n <Host\n {...this.statusRole}\n aria-label={this.message}\n >\n {this.statusIcons[this.status] && this.message && <z-icon name={this.statusIcons[this.status]}></z-icon>}\n <span innerHTML={this.message} />\n </Host>\n );\n }\n}\n"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
min-height: calc(var(--space-unit) * 2.5);
|
|
4
4
|
align-items: start;
|
|
5
5
|
margin-top: var(--space-unit);
|
|
6
|
-
color: var(--color-
|
|
6
|
+
color: var(--color-default-text);
|
|
7
7
|
fill: currentcolor;
|
|
8
8
|
font-family: var(--font-family-sans);
|
|
9
9
|
font-size: var(--font-size-2);
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
:host([status="success"]) {
|
|
20
|
-
color: var(--color-
|
|
20
|
+
color: var(--color-success01);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
:host([status="error"]) {
|
|
24
|
-
color: var(--color-
|
|
24
|
+
color: var(--color-hover-error);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
:host([status="warning"]) {
|
|
28
|
-
color: var(--color-
|
|
28
|
+
color: var(--color-hover-warning);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
:host(:focus) {
|
|
@@ -46,3 +46,8 @@
|
|
|
46
46
|
--z-icon-height: 14px;
|
|
47
47
|
--z-icon-right-margin: calc(var(--space-unit) * 0.5);
|
|
48
48
|
}
|
|
49
|
+
|
|
50
|
+
:host([disabled]) {
|
|
51
|
+
color: var(--color-disabled03);
|
|
52
|
+
fill: var(--color-disabled03);
|
|
53
|
+
}
|
|
@@ -45,7 +45,7 @@ z-pagination .pagination-bar button {
|
|
|
45
45
|
justify-content: center;
|
|
46
46
|
border: none;
|
|
47
47
|
margin: 0;
|
|
48
|
-
background-color: var(--color-
|
|
48
|
+
background-color: var(--color-surface02);
|
|
49
49
|
color: var(--color-primary01);
|
|
50
50
|
cursor: pointer;
|
|
51
51
|
font-family: inherit;
|
|
@@ -59,8 +59,7 @@ z-pagination .pagination-bar button {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
z-pagination .pagination-bar button:focus-visible {
|
|
62
|
-
background-color: var(--color-
|
|
63
|
-
box-shadow: inset var(--shadow-focus-primary);
|
|
62
|
+
background-color: var(--color-surface01);
|
|
64
63
|
outline: none;
|
|
65
64
|
}
|
|
66
65
|
|
|
@@ -77,9 +76,9 @@ z-pagination .pagination-bar .navigation-button {
|
|
|
77
76
|
|
|
78
77
|
z-pagination .pagination-bar .pagination-button:disabled,
|
|
79
78
|
z-pagination .pagination-bar .navigation-button:disabled {
|
|
80
|
-
background-color: var(--color-disabled01);
|
|
81
79
|
color: var(--color-disabled03);
|
|
82
80
|
cursor: default;
|
|
81
|
+
fill: var(--color-disabled03);
|
|
83
82
|
pointer-events: none;
|
|
84
83
|
}
|
|
85
84
|
|
|
@@ -117,10 +116,6 @@ z-pagination .pagination-bar .page-button {
|
|
|
117
116
|
font-weight: var(--font-sb);
|
|
118
117
|
}
|
|
119
118
|
|
|
120
|
-
z-pagination .pagination-bar .page-button:focus-visible {
|
|
121
|
-
border-bottom-color: var(--color-hover-light);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
119
|
z-pagination .pagination-bar .page-button[data-current] {
|
|
125
120
|
border-bottom-color: var(--color-primary01);
|
|
126
121
|
font-size: var(--font-size-7);
|
|
@@ -158,7 +153,7 @@ z-pagination .mobile-go-to-page {
|
|
|
158
153
|
flex: 1 auto;
|
|
159
154
|
align-items: center;
|
|
160
155
|
justify-content: center;
|
|
161
|
-
background-color: var(--color-
|
|
156
|
+
background-color: var(--color-surface02);
|
|
162
157
|
}
|
|
163
158
|
|
|
164
159
|
z-pagination .mobile-go-to-page z-input {
|
|
@@ -181,11 +176,12 @@ z-pagination .mobile-go-to-page > span {
|
|
|
181
176
|
|
|
182
177
|
@media (hover: hover) {
|
|
183
178
|
z-pagination .pagination-bar button:hover {
|
|
184
|
-
background-color: var(--color-
|
|
179
|
+
background-color: var(--color-surface01);
|
|
185
180
|
}
|
|
186
181
|
|
|
187
182
|
z-pagination .pagination-bar .page-button:hover {
|
|
188
|
-
border-bottom-color: var(--color-hover-
|
|
183
|
+
border-bottom-color: var(--color-hover-primary);
|
|
184
|
+
color: var(--color-hover-primary);
|
|
189
185
|
}
|
|
190
186
|
}
|
|
191
187
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { ControlSize, KeyboardCode, ListDividerType, ListSize } from "../../beans";
|
|
3
|
-
import { boolean,
|
|
3
|
+
import { boolean, containsElement, getClickedElement, handleKeyboardSubmit, randomId } from "../../utils/utils";
|
|
4
4
|
export class ZSelect {
|
|
5
5
|
constructor() {
|
|
6
6
|
this.itemsList = [];
|
|
@@ -26,7 +26,6 @@ export class ZSelect {
|
|
|
26
26
|
this.focusedItemId = undefined;
|
|
27
27
|
this.searchString = undefined;
|
|
28
28
|
this.toggleSelectUl = this.toggleSelectUl.bind(this);
|
|
29
|
-
this.selectItem = this.selectItem.bind(this);
|
|
30
29
|
this.handleSelectFocus = this.handleSelectFocus.bind(this);
|
|
31
30
|
}
|
|
32
31
|
watchItems() {
|
|
@@ -117,20 +116,18 @@ export class ZSelect {
|
|
|
117
116
|
this.toggleSelectUl();
|
|
118
117
|
}
|
|
119
118
|
}
|
|
120
|
-
selectItem(
|
|
121
|
-
if (
|
|
119
|
+
selectItem(selected) {
|
|
120
|
+
if (selected === null || selected === void 0 ? void 0 : selected.disabled) {
|
|
122
121
|
return;
|
|
123
122
|
}
|
|
124
123
|
this.itemsList = this.mapSelectedItemToItemsArray();
|
|
125
|
-
this.itemsList
|
|
126
|
-
i.selected =
|
|
127
|
-
if (i.id === (item === null || item === void 0 ? void 0 : item.id)) {
|
|
128
|
-
i.selected = selected;
|
|
129
|
-
}
|
|
124
|
+
this.itemsList.forEach((i) => {
|
|
125
|
+
i.selected = i.id === (selected === null || selected === void 0 ? void 0 : selected.id);
|
|
130
126
|
return i;
|
|
131
127
|
});
|
|
132
128
|
this.selectedItem = this.itemsList.find((item) => item.selected);
|
|
133
129
|
this.emitOptionSelect();
|
|
130
|
+
this.toggleSelectUl(true);
|
|
134
131
|
if (this.searchString) {
|
|
135
132
|
this.searchString = null;
|
|
136
133
|
}
|
|
@@ -166,10 +163,8 @@ export class ZSelect {
|
|
|
166
163
|
this.focusSelectItem(index);
|
|
167
164
|
}
|
|
168
165
|
focusSelectItem(index) {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
focusElem.focus();
|
|
172
|
-
}
|
|
166
|
+
var _a;
|
|
167
|
+
(_a = this.host.querySelector(`#${this.htmlid}_${index}`)) === null || _a === void 0 ? void 0 : _a.focus();
|
|
173
168
|
}
|
|
174
169
|
toggleSelectUl(selfFocusOnClose = false) {
|
|
175
170
|
if (this.disabled || this.readonly) {
|
|
@@ -183,22 +178,24 @@ export class ZSelect {
|
|
|
183
178
|
document.removeEventListener("click", this.handleSelectFocus);
|
|
184
179
|
document.removeEventListener("keyup", this.handleSelectFocus);
|
|
185
180
|
if (selfFocusOnClose) {
|
|
186
|
-
this.
|
|
181
|
+
this.host.querySelector(`#${this.htmlid}_input`).focus();
|
|
187
182
|
}
|
|
188
183
|
}
|
|
189
184
|
this.focusedItemId = "";
|
|
190
185
|
this.isOpen = !this.isOpen;
|
|
191
186
|
}
|
|
192
187
|
handleInputClick(e) {
|
|
193
|
-
|
|
194
|
-
const clearIcon = cp.find((item) => item.classList && item.classList.contains("reset-icon"));
|
|
195
|
-
if (clearIcon) {
|
|
188
|
+
if (e.target.closest(".reset-icon")) {
|
|
196
189
|
e.stopPropagation();
|
|
197
190
|
return;
|
|
198
191
|
}
|
|
199
192
|
this.toggleSelectUl();
|
|
200
193
|
}
|
|
201
194
|
handleSelectFocus(e) {
|
|
195
|
+
const clickedElement = getClickedElement();
|
|
196
|
+
if (clickedElement === null || clickedElement === void 0 ? void 0 : clickedElement.hasAttribute("disabled")) {
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
202
199
|
if (e instanceof KeyboardEvent && e.key === KeyboardCode.ESC) {
|
|
203
200
|
e.stopPropagation();
|
|
204
201
|
return this.toggleSelectUl(true);
|
|
@@ -206,18 +203,14 @@ export class ZSelect {
|
|
|
206
203
|
if (e instanceof KeyboardEvent && e.key !== KeyboardCode.TAB && e.key !== KeyboardCode.ENTER) {
|
|
207
204
|
return;
|
|
208
205
|
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
return elem.nodeName.toLowerCase() === "z-input" && elem.id === `${this.htmlid}_input`;
|
|
212
|
-
});
|
|
213
|
-
if (!parent) {
|
|
214
|
-
this.toggleSelectUl(e instanceof MouseEvent ? true : false);
|
|
206
|
+
if (!containsElement(this.host, clickedElement)) {
|
|
207
|
+
this.toggleSelectUl(e instanceof MouseEvent);
|
|
215
208
|
}
|
|
216
209
|
}
|
|
217
210
|
scrollToLetter(letter) {
|
|
218
|
-
const foundItem = this.itemsList.
|
|
219
|
-
if (foundItem) {
|
|
220
|
-
this.focusSelectItem(
|
|
211
|
+
const foundItem = this.itemsList.findIndex((item) => item.name.charAt(0) === letter);
|
|
212
|
+
if (foundItem > -1) {
|
|
213
|
+
this.focusSelectItem(foundItem);
|
|
221
214
|
}
|
|
222
215
|
}
|
|
223
216
|
renderInput() {
|
|
@@ -227,7 +220,7 @@ export class ZSelect {
|
|
|
227
220
|
}, id: `${this.htmlid}_input`, htmlid: `${this.htmlid}_select_input`, placeholder: this.placeholder, value: !this.isOpen && this.selectedItem ? this.selectedItem.name.replace(/<[^>]+>/g, "") : null, label: this.label, "aria-expanded": this.isOpen ? "true" : "false", "aria-label": this.ariaLabel, "aria-controls": `${this.htmlid}_list`, "aria-autocomplete": this.hasAutocomplete() ? "list" : "none", "aria-activedescendant": this.isOpen ? this.focusedItemId : "", icon: this.isOpen ? "caret-up" : "caret-down", hasclearicon: this.hasAutocomplete(), message: false, disabled: this.disabled, readonly: this.readonly || (!this.hasAutocomplete() && this.isOpen), status: this.isOpen ? undefined : this.status, role: "combobox", size: this.size, onClick: (e) => {
|
|
228
221
|
this.handleInputClick(e);
|
|
229
222
|
}, onKeyUp: (e) => {
|
|
230
|
-
if (e.
|
|
223
|
+
if (e.key !== KeyboardCode.ENTER) {
|
|
231
224
|
e.preventDefault();
|
|
232
225
|
}
|
|
233
226
|
handleKeyboardSubmit(e, this.toggleSelectUl);
|
|
@@ -243,13 +236,12 @@ export class ZSelect {
|
|
|
243
236
|
} }));
|
|
244
237
|
}
|
|
245
238
|
renderSelectUl() {
|
|
246
|
-
return (h("div", { class: this.isOpen ? "open" : "closed"
|
|
239
|
+
return (h("div", { class: this.isOpen ? "open" : "closed" }, h("div", { class: {
|
|
247
240
|
"ul-scroll-wrapper": true,
|
|
248
241
|
"fixed": this.isfixed,
|
|
249
|
-
}
|
|
242
|
+
} }, h("z-list", { role: "listbox", "aria-label": this.ariaLabel || this.label, tabindex: this.disabled || this.readonly || !this.isOpen ? -1 : 0, id: `${this.htmlid}_list`, "aria-multiselectable": false, size: this.listSizeType(), class: {
|
|
250
243
|
disabled: this.disabled,
|
|
251
244
|
readonly: this.readonly,
|
|
252
|
-
filled: !!this.selectedItem,
|
|
253
245
|
[`input-${this.status}`]: !this.isOpen && !!this.status,
|
|
254
246
|
} }, this.resetItem && this.renderResetItem(), this.renderSelectUlItems()))));
|
|
255
247
|
}
|
|
@@ -265,7 +257,7 @@ export class ZSelect {
|
|
|
265
257
|
}, onKeyDown: (e) => this.arrowsSelectNav(e, 0) }, h("div", { class: "reset-item-content" }, h("z-icon", { name: "multiply-circled" }), h("span", null, this.resetItem))));
|
|
266
258
|
}
|
|
267
259
|
renderItem(item, key, lastItem) {
|
|
268
|
-
return (h("z-list-element", { clickable: !item.disabled, disabled: item.disabled, dividerType: lastItem ? ListDividerType.HEADER : ListDividerType.ELEMENT, role: "option", tabindex: item.disabled || !this.isOpen ? -1 : 0, "aria-selected": item.selected ? "true" : "false", id: `${this.htmlid}_${key}`, size: this.listSizeType(), onClickItem: () => this.selectItem(item
|
|
260
|
+
return (h("z-list-element", { clickable: !item.disabled, disabled: item.disabled, dividerType: lastItem ? ListDividerType.HEADER : ListDividerType.ELEMENT, role: "option", tabindex: item.disabled || !this.isOpen ? -1 : 0, "aria-selected": item.selected ? "true" : "false", id: `${this.htmlid}_${key}`, size: this.listSizeType(), onClickItem: () => this.selectItem(item), onKeyDown: (e) => this.arrowsSelectNav(e, key) }, h("div", { class: "list-element-container" }, h("div", { class: {
|
|
269
261
|
"selected": !!item.selected,
|
|
270
262
|
"list-element-content": true,
|
|
271
263
|
}, innerHTML: item.name }), item.icon && h("z-tag", { icon: item.icon }))));
|
|
@@ -305,16 +297,16 @@ export class ZSelect {
|
|
|
305
297
|
});
|
|
306
298
|
}
|
|
307
299
|
renderNoSearchResults() {
|
|
308
|
-
return (h("z-list-element", { color: "
|
|
300
|
+
return (h("z-list-element", { color: "color-primary01", class: "no-results", size: this.listSizeType() }, h("z-icon", { name: "multiply-circle", fill: "color-primary01-icon" }), this.noresultslabel));
|
|
309
301
|
}
|
|
310
302
|
renderMessage() {
|
|
311
303
|
if (boolean(this.message) === false) {
|
|
312
304
|
return;
|
|
313
305
|
}
|
|
314
|
-
return (h("z-input-message", { message: boolean(this.message) === true ? undefined : this.message, status: this.status, class: this.size }));
|
|
306
|
+
return (h("z-input-message", { message: boolean(this.message) === true ? undefined : this.message, status: this.status, class: this.size, disabled: this.disabled }));
|
|
315
307
|
}
|
|
316
308
|
render() {
|
|
317
|
-
return (h("div", { key: '
|
|
309
|
+
return (h("div", { key: 'e6bd4b8c9c016ca713f09226ebe4a81866f6caba', class: "select-wrapper" }, this.renderInput(), this.renderSelectUl(), this.renderMessage()));
|
|
318
310
|
}
|
|
319
311
|
static get is() { return "z-select"; }
|
|
320
312
|
static get encapsulation() { return "scoped"; }
|
|
@@ -758,7 +750,7 @@ export class ZSelect {
|
|
|
758
750
|
}
|
|
759
751
|
};
|
|
760
752
|
}
|
|
761
|
-
static get elementRef() { return "
|
|
753
|
+
static get elementRef() { return "host"; }
|
|
762
754
|
static get watchers() {
|
|
763
755
|
return [{
|
|
764
756
|
"propName": "items",
|