@schukai/monster 4.43.4 → 4.43.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/package.json +1 -1
- package/source/components/form/password.mjs +140 -140
- package/source/components/navigation/site-navigation.mjs +331 -136
- package/source/components/navigation/style/site-navigation.pcss +131 -23
- package/source/components/navigation/style/wizard-navigation.pcss +82 -60
- package/source/components/navigation/stylesheet/site-navigation.mjs +1 -1
- package/source/components/navigation/stylesheet/wizard-navigation.mjs +7 -14
- package/source/components/navigation/wizard-navigation.mjs +407 -179
- package/source/types/version.mjs +1 -1
- package/test/cases/monster.mjs +1 -1
- package/test/web/test.html +2 -2
- package/test/web/tests.js +25 -18
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
## [4.43.6] - 2025-10-11
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- update the workflow navigation [#329](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/329)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## [4.43.5] - 2025-10-10
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
- update site-navigation, optimize hamburger, subnavigation [#336](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/336)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
5
21
|
## [4.43.4] - 2025-10-09
|
|
6
22
|
|
|
7
23
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.7.4","@popperjs/core":"^2.11.8"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"4.43.
|
|
1
|
+
{"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.7.4","@popperjs/core":"^2.11.8"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"4.43.6"}
|
|
@@ -14,8 +14,8 @@ import { instanceSymbol } from "../../constants.mjs";
|
|
|
14
14
|
import { ATTRIBUTE_ROLE } from "../../dom/constants.mjs";
|
|
15
15
|
import { CustomControl } from "../../dom/customcontrol.mjs";
|
|
16
16
|
import {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
assembleMethodSymbol,
|
|
18
|
+
registerCustomElement,
|
|
19
19
|
} from "../../dom/customelement.mjs";
|
|
20
20
|
import { PasswordStyleSheet } from "./stylesheet/password.mjs";
|
|
21
21
|
import { fireCustomEvent } from "../../dom/events.mjs";
|
|
@@ -61,107 +61,107 @@ export const inputElementSymbol = Symbol("inputIconElement");
|
|
|
61
61
|
* @fires monster-password-show
|
|
62
62
|
*/
|
|
63
63
|
class Password extends CustomControl {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
/**
|
|
65
|
+
* This method is called by the `instanceof` operator.
|
|
66
|
+
* @returns {symbol}
|
|
67
|
+
*/
|
|
68
|
+
static get [instanceSymbol]() {
|
|
69
|
+
return Symbol.for("@schukai/monster/components/form/password@@instance");
|
|
70
|
+
}
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @return {Components.Form.Password
|
|
75
|
+
*/
|
|
76
|
+
[assembleMethodSymbol]() {
|
|
77
|
+
super[assembleMethodSymbol]();
|
|
78
|
+
initControlReferences.call(this);
|
|
79
|
+
initEventHandler.call(this);
|
|
80
|
+
initPasswordState.call(this);
|
|
81
|
+
return this;
|
|
82
|
+
}
|
|
83
83
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
84
|
+
/**
|
|
85
|
+
* The current value of the Switch
|
|
86
|
+
* @return {string}
|
|
87
|
+
*/
|
|
88
|
+
get value() {
|
|
89
|
+
return this.getOption("value");
|
|
90
|
+
}
|
|
91
91
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
92
|
+
/**
|
|
93
|
+
* Set value
|
|
94
|
+
* @property {string} value
|
|
95
|
+
*/
|
|
96
|
+
set value(value) {
|
|
97
|
+
this.setOption("value", value);
|
|
98
|
+
this[inputElementSymbol].value = value;
|
|
99
|
+
this.setFormValue(value);
|
|
100
|
+
}
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
102
|
+
/**
|
|
103
|
+
* To set the options via the HTML Tag, the attribute `data-monster-options` must be used.
|
|
104
|
+
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
|
105
|
+
*
|
|
106
|
+
* The individual configuration values can be found in the table.
|
|
107
|
+
*
|
|
108
|
+
* @property {Object} templates Template definitions
|
|
109
|
+
* @property {string} templates.main Main template
|
|
110
|
+
* @property {string} templateMapping.hidden-icon The hidden icon template (without svg tag)
|
|
111
|
+
* @property {string} templateMapping.visible-icon The visible icon template (without svg tag)
|
|
112
|
+
* @property {string} type="password" The type of the input field
|
|
113
|
+
* @property {string} placeholder="" The placeholder of the input field
|
|
114
|
+
* @property {boolean} required=false The required state of the input field
|
|
115
|
+
* @property {string} autocomplete="off" The autocomplete state of the input field
|
|
116
|
+
* @property {string} inputmode="text" The inputmode state of the input field
|
|
117
|
+
* @property {Object} aria Aria attributes
|
|
118
|
+
* @property {boolean} aria.required=false The required state of the input field
|
|
119
|
+
* @property {string} aria.placeholder="" The placeholder of the input field
|
|
120
|
+
* @property {boolean} disabled=false Disabled state
|
|
121
|
+
*/
|
|
122
|
+
get defaults() {
|
|
123
|
+
return Object.assign({}, super.defaults, {
|
|
124
|
+
templates: {
|
|
125
|
+
main: getTemplate(),
|
|
126
|
+
},
|
|
127
|
+
templateMapping: {
|
|
128
|
+
"hidden-icon": `
|
|
129
129
|
<path d="M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7 7 0 0 0-2.79.588l.77.771A6 6 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755q-.247.248-.517.486z"/>
|
|
130
130
|
<path d="M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829"/>
|
|
131
131
|
<path d="M3.35 5.47q-.27.24-.518.487A13 13 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7 7 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884-12-12 .708-.708 12 12z"/>`,
|
|
132
|
-
|
|
132
|
+
"visible-icon": `
|
|
133
133
|
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8M1.173 8a13 13 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5s3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5s-3.879-1.168-5.168-2.457A13 13 0 0 1 1.172 8z"/>
|
|
134
134
|
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0"/>`,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
135
|
+
},
|
|
136
|
+
type: "password",
|
|
137
|
+
placeholder: "",
|
|
138
|
+
required: false,
|
|
139
|
+
autocomplete: "off",
|
|
140
|
+
inputmode: "text",
|
|
141
|
+
aria: {
|
|
142
|
+
required: false,
|
|
143
|
+
placeholder: "",
|
|
144
|
+
},
|
|
145
|
+
disabled: false,
|
|
146
|
+
value: null,
|
|
147
147
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
eventProcessing: true,
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
151
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
152
|
+
/**
|
|
153
|
+
* @return {string}
|
|
154
|
+
*/
|
|
155
|
+
static getTag() {
|
|
156
|
+
return "monster-password";
|
|
157
|
+
}
|
|
158
158
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
159
|
+
/**
|
|
160
|
+
* @return {CSSStyleSheet[]}
|
|
161
|
+
*/
|
|
162
|
+
static getCSSStyleSheet() {
|
|
163
|
+
return [PasswordStyleSheet];
|
|
164
|
+
}
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
/**
|
|
@@ -171,54 +171,54 @@ class Password extends CustomControl {
|
|
|
171
171
|
* @fires monster-password-show
|
|
172
172
|
*/
|
|
173
173
|
function initEventHandler() {
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
const self = this;
|
|
175
|
+
const element = this[passwordElementSymbol];
|
|
176
176
|
|
|
177
|
-
|
|
177
|
+
const type = "click";
|
|
178
178
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
179
|
+
this[hiddenIconElementSymbol].addEventListener(type, function (event) {
|
|
180
|
+
fireCustomEvent(self, "monster-password-show", {
|
|
181
|
+
element: self,
|
|
182
|
+
});
|
|
183
183
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
184
|
+
requestAnimationFrame(() => {
|
|
185
|
+
self[visibleIconElementSymbol].classList.remove("hidden");
|
|
186
|
+
self[hiddenIconElementSymbol].classList.add("hidden");
|
|
187
|
+
self.setOption("type", "text");
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
190
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
191
|
+
this[visibleIconElementSymbol].addEventListener(type, function (event) {
|
|
192
|
+
fireCustomEvent(self, "monster-password-hide", {
|
|
193
|
+
element: self,
|
|
194
|
+
});
|
|
195
195
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
196
|
+
requestAnimationFrame(() => {
|
|
197
|
+
self[visibleIconElementSymbol].classList.add("hidden");
|
|
198
|
+
self[hiddenIconElementSymbol].classList.remove("hidden");
|
|
199
|
+
self.setOption("type", "password");
|
|
200
|
+
});
|
|
201
|
+
});
|
|
202
202
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
203
|
+
this[inputElementSymbol].addEventListener("input", function (event) {
|
|
204
|
+
self.setFormValue(self.value);
|
|
205
|
+
self.setOption("value", this.value);
|
|
206
|
+
});
|
|
207
207
|
|
|
208
|
-
|
|
208
|
+
return this;
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
/**
|
|
212
212
|
* @private
|
|
213
213
|
*/
|
|
214
214
|
function initPasswordState() {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
215
|
+
if (this.getOption("type") === "password") {
|
|
216
|
+
this[visibleIconElementSymbol].classList.add("hidden");
|
|
217
|
+
this[hiddenIconElementSymbol].classList.remove("hidden");
|
|
218
|
+
} else {
|
|
219
|
+
this[visibleIconElementSymbol].classList.remove("hidden");
|
|
220
|
+
this[hiddenIconElementSymbol].classList.add("hidden");
|
|
221
|
+
}
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
/**
|
|
@@ -226,21 +226,21 @@ function initPasswordState() {
|
|
|
226
226
|
* @return {void}
|
|
227
227
|
*/
|
|
228
228
|
function initControlReferences() {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
229
|
+
this[passwordElementSymbol] = this.shadowRoot.querySelector(
|
|
230
|
+
`[${ATTRIBUTE_ROLE}="control"]`,
|
|
231
|
+
);
|
|
232
232
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
233
|
+
this[visibleIconElementSymbol] = this.shadowRoot.querySelector(
|
|
234
|
+
`[${ATTRIBUTE_ROLE}="visible-icon"]`,
|
|
235
|
+
);
|
|
236
236
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
237
|
+
this[hiddenIconElementSymbol] = this.shadowRoot.querySelector(
|
|
238
|
+
`[${ATTRIBUTE_ROLE}="hidden-icon"]`,
|
|
239
|
+
);
|
|
240
240
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
241
|
+
this[inputElementSymbol] = this.shadowRoot.querySelector(
|
|
242
|
+
`[${ATTRIBUTE_ROLE}="input"]`,
|
|
243
|
+
);
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
/**
|
|
@@ -248,8 +248,8 @@ function initControlReferences() {
|
|
|
248
248
|
* @return {string}
|
|
249
249
|
*/
|
|
250
250
|
function getTemplate() {
|
|
251
|
-
|
|
252
|
-
|
|
251
|
+
// language=HTML
|
|
252
|
+
return `
|
|
253
253
|
<div data-monster-role="control" part="control">
|
|
254
254
|
<monster-input-group part="input-group">
|
|
255
255
|
<input data-monster-role="input"
|