@schukai/monster 4.89.0 → 4.91.0
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 +17 -0
- package/package.json +1 -1
- package/source/components/datatable/save-button.mjs +215 -40
- package/source/components/form/repeat-field-set.mjs +1090 -0
- package/source/components/form/select.mjs +8 -1
- package/source/components/form/style/field-set.pcss +2 -296
- package/source/components/form/style/mixin/field-set-layout.pcss +545 -0
- package/source/components/form/style/repeat-field-set-items.pcss +11 -0
- package/source/components/form/style/repeat-field-set.pcss +45 -0
- package/source/components/form/stylesheet/field-set.mjs +1 -1
- package/source/components/form/stylesheet/mixin/field-set-layout.mjs +38 -0
- package/source/components/form/stylesheet/repeat-field-set-items.mjs +38 -0
- package/source/components/form/stylesheet/repeat-field-set.mjs +38 -0
- package/source/data/diff.mjs +0 -4
- package/source/monster.mjs +1 -0
- package/test/cases/data/diff.mjs +24 -1
|
@@ -3193,14 +3193,21 @@ function convertSelectionToValue(selection) {
|
|
|
3193
3193
|
}
|
|
3194
3194
|
|
|
3195
3195
|
if (value.length === 0) {
|
|
3196
|
-
return "";
|
|
3196
|
+
return this.getOption("type") === "checkbox" ? [] : "";
|
|
3197
3197
|
} else if (value.length === 1) {
|
|
3198
|
+
if (this.getOption("type") === "checkbox") {
|
|
3199
|
+
return value;
|
|
3200
|
+
}
|
|
3198
3201
|
const v = value.pop();
|
|
3199
3202
|
if (v === undefined) return "";
|
|
3200
3203
|
if (v === null) return "";
|
|
3201
3204
|
return `${v}`;
|
|
3202
3205
|
}
|
|
3203
3206
|
|
|
3207
|
+
if (this.getOption("type") === "checkbox") {
|
|
3208
|
+
return value;
|
|
3209
|
+
}
|
|
3210
|
+
|
|
3204
3211
|
return value.join(",");
|
|
3205
3212
|
}
|
|
3206
3213
|
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
@import "../../style/control.pcss";
|
|
11
11
|
@import "../../style/floating-ui.pcss";
|
|
12
|
+
@import "./mixin/field-set-layout.pcss";
|
|
12
13
|
|
|
13
14
|
[data-monster-role="container"] {
|
|
14
15
|
container-type: inline-size;
|
|
@@ -71,299 +72,4 @@
|
|
|
71
72
|
display: none !important;
|
|
72
73
|
}
|
|
73
74
|
|
|
74
|
-
|
|
75
|
-
display: grid;
|
|
76
|
-
grid-template-columns: auto 1fr;
|
|
77
|
-
grid-gap: 0.8rem;
|
|
78
|
-
accent-color: var(--monster-color-secondary-2);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.multiple-columns slot {
|
|
82
|
-
grid-template-columns: auto 1fr auto 1fr auto 1fr;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
::slotted(label),
|
|
86
|
-
::slotted(.label) {
|
|
87
|
-
color: var(--monster-color-primary-1);
|
|
88
|
-
border-bottom: thin dotted var(--monster-color-primary-1);
|
|
89
|
-
display: flex;
|
|
90
|
-
align-items: flex-start;
|
|
91
|
-
gap: 0.4rem;
|
|
92
|
-
justify-content: space-between;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
::slotted(hr),
|
|
96
|
-
::slotted(h1),
|
|
97
|
-
::slotted(h2),
|
|
98
|
-
::slotted(h3),
|
|
99
|
-
::slotted(h4),
|
|
100
|
-
::slotted(h5),
|
|
101
|
-
::slotted(h6) {
|
|
102
|
-
grid-column: 1 / -1;
|
|
103
|
-
margin: 3rem 0 0.1rem !important;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
::slotted(hr) {
|
|
107
|
-
border: none;
|
|
108
|
-
border-top: thin dotted var(--monster-color-gray-3);
|
|
109
|
-
margin: 1rem 0;
|
|
110
|
-
padding: 0;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
::slotted(hr.delimiter) {
|
|
114
|
-
border: none;
|
|
115
|
-
margin: 0;
|
|
116
|
-
padding: 0;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
::slotted(.grid-span-full) {
|
|
120
|
-
grid-column-end: -1;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
::slotted(.grid-start-1),
|
|
124
|
-
::slotted(.grid-start-2),
|
|
125
|
-
::slotted(.grid-start-3),
|
|
126
|
-
::slotted(.grid-start-4) {
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
::slotted(.grid-start-1) {
|
|
131
|
-
grid-column-start: 1;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
::slotted(.grid-start-2) {
|
|
135
|
-
grid-column-start: 2;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
::slotted(.grid-start-3) {
|
|
139
|
-
grid-column-start: 3;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
::slotted(.grid-start-4) {
|
|
143
|
-
grid-column-start: 4;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
::slotted(.grid-double-span) {
|
|
147
|
-
grid-column: span 3;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
::slotted(.grid-to-end) {
|
|
151
|
-
grid-column-end: -1;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
::slotted(monster-button),
|
|
156
|
-
::slotted(monster-state-button),
|
|
157
|
-
::slotted(monster-api-button),
|
|
158
|
-
::slotted(monster-state-button),
|
|
159
|
-
::slotted(monster-datasource-save-button) {
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
::slotted(input),
|
|
163
|
-
::slotted(monster-button),
|
|
164
|
-
::slotted(monster-state-button),
|
|
165
|
-
::slotted(monster-api-button),
|
|
166
|
-
::slotted(monster-state-button),
|
|
167
|
-
::slotted(monster-datasource-save-button) {
|
|
168
|
-
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
::slotted(input[type="text"]),
|
|
172
|
-
::slotted(input[type="password"]),
|
|
173
|
-
::slotted(input[type="email"]),
|
|
174
|
-
::slotted(input[type="number"]),
|
|
175
|
-
::slotted(input[type="tel"]) {
|
|
176
|
-
height: -webkit-fill-available;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
::slotted(input:not([type="checkbox"]):not([type="radio"])) {
|
|
180
|
-
width: 100%;
|
|
181
|
-
border-radius: var(--monster-theme-control-border-radius);
|
|
182
|
-
border-width: var(--monster-theme-control-border-width);
|
|
183
|
-
border-color: var(--monster-theme-control-border-color);
|
|
184
|
-
border-style: var(--monster-theme-control-border-style);
|
|
185
|
-
|
|
186
|
-
&[readonly] {
|
|
187
|
-
background-color: var(--monster-bg-color-primary-3);
|
|
188
|
-
color: var(--monster-color-primary-3);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
::slotted(input[readonly]:not([type="checkbox"]):not([type="radio"])) {
|
|
194
|
-
background-color: var(--monster-bg-color-primary-2);
|
|
195
|
-
color: var(--monster-color-primary-2);
|
|
196
|
-
cursor: default;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
::slotted(input),
|
|
201
|
-
::slotted(monster-toggle-switch),
|
|
202
|
-
::slotted(select) {
|
|
203
|
-
min-height: 1.8rem;
|
|
204
|
-
padding: 0.5rem;
|
|
205
|
-
box-sizing: border-box;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
::slotted(monster-password) {
|
|
209
|
-
min-height: 1.8rem;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
::slotted(input[type="color"]) {
|
|
213
|
-
padding: 0 0.2rem;
|
|
214
|
-
min-height: calc(1.8rem + 0.4rem);
|
|
215
|
-
width: 100%;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
::slotted(input[type="time"]),
|
|
219
|
-
::slotted(input[type="date"]) {
|
|
220
|
-
padding: 0 0.2rem;
|
|
221
|
-
min-height: calc(1.8rem + 0.4rem);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
::slotted(input[type="checkbox"]),
|
|
225
|
-
::slotted(input[type="radio"]) {
|
|
226
|
-
width: 1.8rem;
|
|
227
|
-
min-height: calc(1.8rem + 0.4rem);
|
|
228
|
-
padding: 0 0.2rem;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
::slotted(input[type="file"]) {
|
|
232
|
-
padding: 0.4rem;
|
|
233
|
-
min-height: calc(1.2rem );
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
::slotted(input),
|
|
237
|
-
::slotted(monster-toggle-switch),
|
|
238
|
-
::slotted(monster-password),
|
|
239
|
-
::slotted(select),
|
|
240
|
-
::slotted([data-monster-validation-wrapper]) {
|
|
241
|
-
align-self: end;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
::slotted(monster-toggle-switch) {
|
|
245
|
-
width: 3rem;
|
|
246
|
-
padding: 0;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
@container field-set (max-width: 1200px) {
|
|
250
|
-
|
|
251
|
-
.multiple-columns {
|
|
252
|
-
|
|
253
|
-
& slot {
|
|
254
|
-
grid-template-columns: auto 1fr auto 1fr;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
::slotted(h1),
|
|
259
|
-
::slotted(h2),
|
|
260
|
-
::slotted(h3),
|
|
261
|
-
::slotted(h4),
|
|
262
|
-
::slotted(h5),
|
|
263
|
-
::slotted(h6) {
|
|
264
|
-
margin: 2.2rem 0 0.1rem !important;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
::slotted(.grid-double-span) {
|
|
268
|
-
grid-column: span 1;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
@container field-set (max-width: 900px) {
|
|
274
|
-
|
|
275
|
-
.multiple-columns {
|
|
276
|
-
|
|
277
|
-
& slot {
|
|
278
|
-
grid-template-columns: auto 1fr;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
::slotted(h1),
|
|
283
|
-
::slotted(h2),
|
|
284
|
-
::slotted(h3),
|
|
285
|
-
::slotted(h4),
|
|
286
|
-
::slotted(h5),
|
|
287
|
-
::slotted(h6) {
|
|
288
|
-
margin: 1.8rem 0 0.1rem !important;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
::slotted(.grid-double-span) {
|
|
292
|
-
grid-column: span 1;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
@container field-set (max-width: 500px) {
|
|
298
|
-
slot {
|
|
299
|
-
grid-template-columns: 1fr;
|
|
300
|
-
gap: 0;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
::slotted(h1),
|
|
304
|
-
::slotted(h2),
|
|
305
|
-
::slotted(h3),
|
|
306
|
-
::slotted(h4),
|
|
307
|
-
::slotted(h5),
|
|
308
|
-
::slotted(h6) {
|
|
309
|
-
grid-column: 1;
|
|
310
|
-
margin: 1.3rem 0 0.1rem !important;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
::slotted(select) {
|
|
314
|
-
grid-column: 1;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
::slotted(div.wrapper),
|
|
318
|
-
::slotted(input),
|
|
319
|
-
::slotted(monster-toggle-switch),
|
|
320
|
-
::slotted(monster-password),
|
|
321
|
-
::slotted(textarea),
|
|
322
|
-
::slotted(select) {
|
|
323
|
-
grid-column: 1;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
::slotted(monster-button),
|
|
327
|
-
::slotted(monster-action-button),
|
|
328
|
-
::slotted(monster-state-button),
|
|
329
|
-
::slotted(monster-api-button),
|
|
330
|
-
::slotted(monster-state-button),
|
|
331
|
-
::slotted(monster-datasource-save-button) {
|
|
332
|
-
grid-column: 1;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
::slotted(h1),
|
|
336
|
-
::slotted(h2),
|
|
337
|
-
::slotted(h3),
|
|
338
|
-
::slotted(h4),
|
|
339
|
-
::slotted(h5),
|
|
340
|
-
::slotted(h6) {
|
|
341
|
-
grid-column: 1
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
::slotted(label),
|
|
345
|
-
::slotted(.label) {
|
|
346
|
-
padding-top: 1rem;
|
|
347
|
-
border-bottom: none;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
.multiple-columns {
|
|
351
|
-
& slot {
|
|
352
|
-
grid-template-columns: 1fr;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
::slotted(.grid-start-1),
|
|
358
|
-
::slotted(.grid-start-2),
|
|
359
|
-
::slotted(.grid-start-3),
|
|
360
|
-
::slotted(.grid-start-4),
|
|
361
|
-
::slotted(.grid-span-full) {
|
|
362
|
-
grid-column: 1 !important;
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
::slotted(.grid-double-span) {
|
|
366
|
-
grid-column: span 1 !important;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
}
|
|
75
|
+
@mixin fieldSetSlotLayout;
|