@schukai/monster 3.85.2 → 3.86.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +19 -0
- package/package.json +1 -1
- package/source/components/datatable/datatable/header.mjs +4 -2
- package/source/components/datatable/datatable.mjs +2 -1
- package/source/components/datatable/style/datatable.pcss +41 -9
- package/source/components/datatable/stylesheet/datatable.mjs +1 -1
- package/source/components/form/button-bar.mjs +3 -38
- package/source/components/form/button.mjs +0 -1
- package/source/components/form/style/button-bar.pcss +3 -2
- package/source/components/form/style/button.pcss +6 -1
- package/source/components/form/style/confirm-button.pcss +6 -1
- package/source/components/form/style/field-set.pcss +41 -56
- package/source/components/form/style/message-state-button.pcss +6 -2
- package/source/components/form/style/popper-button.pcss +7 -1
- package/source/components/form/style/select.pcss +2 -2
- package/source/components/form/style/state-button.pcss +4 -1
- package/source/components/form/stylesheet/button-bar.mjs +7 -14
- package/source/components/form/stylesheet/button.mjs +7 -14
- package/source/components/form/stylesheet/confirm-button.mjs +7 -14
- package/source/components/form/stylesheet/field-set.mjs +7 -14
- package/source/components/form/stylesheet/message-state-button.mjs +7 -14
- package/source/components/form/stylesheet/popper-button.mjs +7 -14
- package/source/components/form/stylesheet/select.mjs +7 -14
- package/source/components/form/stylesheet/state-button.mjs +7 -14
- package/source/components/layout/stylesheet/panel.mjs +7 -14
@@ -124,39 +124,6 @@ const switchElementSymbol = Symbol("switchElement");
|
|
124
124
|
*/
|
125
125
|
const ATTRIBUTE_POPPER_POSITION = "data-monster-popper-position";
|
126
126
|
|
127
|
-
/**
|
128
|
-
* This CustomControl creates a button bar.
|
129
|
-
*
|
130
|
-
* <img src="./images/button-bar.png">
|
131
|
-
*
|
132
|
-
* Dependencies: the system uses functions of the [monsterjs](https://monsterjs.org/) library.
|
133
|
-
*
|
134
|
-
* You can create this control either by specifying the HTML tag `<monster-tabs />` directly in the HTML or using
|
135
|
-
* Javascript via the `document.createElement('monster-tabs');` method.
|
136
|
-
*
|
137
|
-
* ```html
|
138
|
-
* <monster-tabs></monster-tabs>
|
139
|
-
* ```
|
140
|
-
*
|
141
|
-
* Or you can create this CustomControl directly in Javascript:
|
142
|
-
*
|
143
|
-
* ```js
|
144
|
-
* import {ButtonBar} from '@schukai/component-form/source/tab.js';
|
145
|
-
* document.createElement('monster-tabs');
|
146
|
-
* ```
|
147
|
-
*
|
148
|
-
* @startuml button-bar.png
|
149
|
-
* skinparam monochrome true
|
150
|
-
* skinparam shadowing false
|
151
|
-
* HTMLElement <|-- CustomElement
|
152
|
-
* CustomElement <|-- ButtonBar
|
153
|
-
* @enduml
|
154
|
-
*
|
155
|
-
* @copyright schukai GmbH
|
156
|
-
* @summary A configurable tab control
|
157
|
-
* @fires monster-fetched
|
158
|
-
*/
|
159
|
-
|
160
127
|
/**
|
161
128
|
* A button bar control.
|
162
129
|
*
|
@@ -164,9 +131,8 @@ const ATTRIBUTE_POPPER_POSITION = "data-monster-popper-position";
|
|
164
131
|
*
|
165
132
|
* @example /examples/components/form/button-bar-simple
|
166
133
|
*
|
167
|
-
* @since 3.19.0
|
168
134
|
* @copyright schukai GmbH
|
169
|
-
* @summary
|
135
|
+
* @summary This is a button bar control that can be used to display a set of buttons.
|
170
136
|
* @fires monster-fetched
|
171
137
|
*/
|
172
138
|
class ButtonBar extends CustomElement {
|
@@ -198,7 +164,8 @@ class ButtonBar extends CustomElement {
|
|
198
164
|
},
|
199
165
|
labels: {},
|
200
166
|
popper: {
|
201
|
-
placement: "
|
167
|
+
placement: "left",
|
168
|
+
middleware: ["autoPlacement", "shift" ,"offset:5"],
|
202
169
|
},
|
203
170
|
});
|
204
171
|
|
@@ -448,8 +415,6 @@ function rearrangeButtons() {
|
|
448
415
|
continue;
|
449
416
|
}
|
450
417
|
|
451
|
-
const buttonLabel = element.innerText;
|
452
|
-
|
453
418
|
if (sum > space) {
|
454
419
|
element.setAttribute("slot", "popper");
|
455
420
|
} else {
|
@@ -47,7 +47,6 @@ export const buttonElementSymbol = Symbol("buttonElement");
|
|
47
47
|
* @example /examples/components/form/button-simple
|
48
48
|
* @example /examples/components/form/button-with-click-event
|
49
49
|
*
|
50
|
-
* @since 1.5.0
|
51
50
|
* @copyright schukai GmbH
|
52
51
|
* @summary A beautiful button that can make your life easier and also looks good.
|
53
52
|
* @fires monster-button-clicked this event is triggered when the button is clicked. It contains the field {button} with the button instance.
|
@@ -39,11 +39,12 @@ div[data-monster-role="control"] {
|
|
39
39
|
|
40
40
|
& slot[name=popper] {
|
41
41
|
display: flex;
|
42
|
-
flex-direction:
|
42
|
+
flex-direction: column;
|
43
43
|
flex-wrap: nowrap;
|
44
|
-
align-items:
|
44
|
+
align-items: center;
|
45
45
|
align-content: center;
|
46
46
|
justify-content: space-between;
|
47
|
+
gap: 0.4rem;
|
47
48
|
}
|
48
49
|
|
49
50
|
|
@@ -1,10 +1,15 @@
|
|
1
1
|
@import "../../style/control.pcss";
|
2
2
|
@import "../../style/button.pcss";
|
3
3
|
@import "../../style/border.pcss";
|
4
|
+
@import "../../style/typography.pcss";
|
4
5
|
|
5
6
|
:host(monster-button){display:flex;}
|
6
7
|
|
7
8
|
[data-monster-role="control"] {
|
8
9
|
display: flex;
|
9
10
|
align-items: stretch;
|
10
|
-
}
|
11
|
+
}
|
12
|
+
|
13
|
+
button {
|
14
|
+
width: max-content;
|
15
|
+
}
|
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
div[data-monster-role="decision"] {
|
8
8
|
display: flex;
|
9
|
-
width:
|
9
|
+
width: max-content;
|
10
10
|
align-items: center;
|
11
11
|
justify-content: space-evenly;
|
12
12
|
margin: 1rem 0 0.4rem 0;
|
@@ -14,4 +14,9 @@ div[data-monster-role="decision"] {
|
|
14
14
|
|
15
15
|
div[data-monster-role="control"] {
|
16
16
|
height: 100%;
|
17
|
+
width: max-content;
|
18
|
+
}
|
19
|
+
|
20
|
+
button {
|
21
|
+
width: max-content;
|
17
22
|
}
|
@@ -53,7 +53,7 @@
|
|
53
53
|
|
54
54
|
slot {
|
55
55
|
display: grid;
|
56
|
-
grid-template-columns:
|
56
|
+
grid-template-columns: auto 1fr;
|
57
57
|
grid-gap: 0.8rem;
|
58
58
|
accent-color: var(--monster-color-secondary-2);
|
59
59
|
}
|
@@ -68,13 +68,21 @@ slot {
|
|
68
68
|
border-bottom: thin dotted var(--monster-color-primary-1);
|
69
69
|
}
|
70
70
|
|
71
|
+
::slotted(hr),
|
71
72
|
::slotted(h1),
|
72
73
|
::slotted(h2),
|
73
74
|
::slotted(h3),
|
74
75
|
::slotted(h4),
|
75
76
|
::slotted(h5),
|
76
|
-
::slotted(h6) {
|
77
|
-
grid-column: 1 /
|
77
|
+
::slotted(h6) {
|
78
|
+
grid-column: 1 / -1;
|
79
|
+
}
|
80
|
+
|
81
|
+
::slotted(hr) {
|
82
|
+
border: none;
|
83
|
+
border-top: thin dotted var(--monster-color-gray-3);
|
84
|
+
margin: 1rem 0;
|
85
|
+
padding: 0;
|
78
86
|
}
|
79
87
|
|
80
88
|
::slotted(select) {
|
@@ -83,16 +91,13 @@ slot {
|
|
83
91
|
|
84
92
|
::slotted(monster-button),
|
85
93
|
::slotted(monster-state-button),
|
86
|
-
::slotted(monster-select),
|
87
94
|
::slotted(monster-api-button),
|
88
95
|
::slotted(monster-state-button),
|
89
96
|
::slotted(monster-datasource-save-button) {
|
90
|
-
grid-column: 2;
|
91
97
|
}
|
92
98
|
|
93
99
|
::slotted(input),
|
94
100
|
::slotted(monster-button),
|
95
|
-
::slotted(monster-select),
|
96
101
|
::slotted(monster-state-button),
|
97
102
|
::slotted(monster-api-button),
|
98
103
|
::slotted(monster-state-button),
|
@@ -100,28 +105,16 @@ slot {
|
|
100
105
|
|
101
106
|
}
|
102
107
|
|
103
|
-
::slotted(input)
|
108
|
+
::slotted(input) ,
|
109
|
+
::slotted(monster-toggle-switch) ,
|
110
|
+
::slotted(select) {
|
104
111
|
align-self: end;
|
105
|
-
|
106
112
|
}
|
107
113
|
|
108
114
|
::slotted(monster-toggle-switch) {
|
109
|
-
width:
|
110
|
-
}
|
111
|
-
|
112
|
-
.multiple-columns ::slotted(.span-1) {
|
113
|
-
grid-column: 2 / span 3;
|
115
|
+
width: 3rem;
|
114
116
|
}
|
115
117
|
|
116
|
-
.multiple-columns ::slotted(.span-1-max) {
|
117
|
-
grid-column: 2 / span 5;
|
118
|
-
}
|
119
|
-
|
120
|
-
.multiple-columns ::slotted(.span-2) {
|
121
|
-
grid-column: 4 / span 3;
|
122
|
-
}
|
123
|
-
|
124
|
-
|
125
118
|
@container field-set (max-width: 1200px) {
|
126
119
|
|
127
120
|
.multiple-columns {
|
@@ -129,43 +122,19 @@ slot {
|
|
129
122
|
& slot {
|
130
123
|
grid-template-columns: auto 1fr auto 1fr;
|
131
124
|
}
|
132
|
-
|
133
|
-
& ::slotted(.span-1) {
|
134
|
-
grid-column: 2 / span 3;
|
135
|
-
}
|
136
|
-
|
137
|
-
& ::slotted(.span-2) {
|
138
|
-
grid-column: unset;
|
139
|
-
}
|
140
|
-
|
141
|
-
& ::slotted(.span-1-max:first-child) {
|
142
|
-
grid-column: 2 / span 3;
|
143
|
-
}
|
144
125
|
}
|
145
126
|
|
146
127
|
}
|
147
128
|
|
148
|
-
@container field-set (max-width:
|
129
|
+
@container field-set (max-width: 900px) {
|
149
130
|
|
150
131
|
.multiple-columns {
|
151
132
|
|
152
133
|
& slot {
|
153
134
|
grid-template-columns: auto 1fr;
|
154
135
|
}
|
155
|
-
& ::slotted(.span-1) {
|
156
|
-
grid-column: unset;
|
157
|
-
}
|
158
|
-
|
159
|
-
& ::slotted(.span-2) {
|
160
|
-
grid-column: unset;
|
161
|
-
}
|
162
|
-
|
163
|
-
& ::slotted(.span-1-max) {
|
164
|
-
grid-column: unset;
|
165
|
-
}
|
166
136
|
}
|
167
137
|
|
168
|
-
|
169
138
|
}
|
170
139
|
|
171
140
|
@container field-set (max-width: 500px) {
|
@@ -174,39 +143,55 @@ slot {
|
|
174
143
|
gap: 0;
|
175
144
|
}
|
176
145
|
|
177
|
-
|
178
146
|
::slotted(h1),
|
179
147
|
::slotted(h2),
|
180
148
|
::slotted(h3),
|
181
149
|
::slotted(h4),
|
182
150
|
::slotted(h5),
|
183
151
|
::slotted(h6) {
|
184
|
-
grid-column: 1
|
152
|
+
grid-column: 1;
|
185
153
|
}
|
186
154
|
|
187
|
-
::slotted(
|
188
|
-
|
189
|
-
|
190
|
-
|
155
|
+
::slotted(select) {
|
156
|
+
grid-column: 1;
|
157
|
+
}
|
158
|
+
|
159
|
+
::slotted(input),
|
160
|
+
::slotted(monster-toggle-switch),
|
161
|
+
::slotted(textarea),
|
162
|
+
::slotted(select) {
|
163
|
+
grid-column: 1;
|
191
164
|
}
|
192
165
|
|
193
166
|
::slotted(monster-button),
|
167
|
+
::slotted(monster-action-button),
|
194
168
|
::slotted(monster-state-button),
|
195
169
|
::slotted(monster-api-button),
|
196
170
|
::slotted(monster-state-button),
|
197
171
|
::slotted(monster-datasource-save-button) {
|
198
172
|
grid-column: 1;
|
173
|
+
}
|
174
|
+
|
175
|
+
::slotted(h1),
|
176
|
+
::slotted(h2),
|
177
|
+
::slotted(h3),
|
178
|
+
::slotted(h4),
|
179
|
+
::slotted(h5),
|
180
|
+
::slotted(h6) {
|
181
|
+
grid-column: 1
|
199
182
|
}
|
200
183
|
|
184
|
+
::slotted(label),
|
185
|
+
::slotted(.label) {
|
186
|
+
padding-top: 1rem;
|
187
|
+
border-bottom: none;
|
188
|
+
}
|
201
189
|
|
202
190
|
.multiple-columns {
|
203
191
|
& slot {
|
204
192
|
grid-template-columns: 1fr;
|
205
193
|
}
|
206
194
|
|
207
|
-
& ::slotted(.span-1-max) {
|
208
|
-
grid-column: unset;
|
209
|
-
}
|
210
195
|
}
|
211
196
|
|
212
197
|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
@import "../../style/control.pcss";
|
2
2
|
@import "../../style/floating-ui.pcss";
|
3
3
|
@import "../../style/button.pcss";
|
4
|
+
@import "../../style/typography.pcss";
|
4
5
|
|
5
6
|
[data-monster-role=control] {
|
6
7
|
position: relative;
|
@@ -8,9 +9,14 @@
|
|
8
9
|
}
|
9
10
|
|
10
11
|
[data-monster-role=button] {
|
11
|
-
width:
|
12
|
+
width: max-content;
|
12
13
|
}
|
13
14
|
|
14
15
|
div[data-monster-role="control"] {
|
15
16
|
height: 100%;
|
17
|
+
width: max-content;
|
18
|
+
}
|
19
|
+
|
20
|
+
button {
|
21
|
+
width: max-content;
|
16
22
|
}
|
@@ -16,7 +16,7 @@
|
|
16
16
|
width: 100%;
|
17
17
|
overflow: auto;
|
18
18
|
|
19
|
-
scrollbar-color: var(--monster-color-primary-1) var(--monster-color-primary-
|
19
|
+
scrollbar-color: var(--monster-color-primary-1) var(--monster-bg-color-primary-1);
|
20
20
|
scrollbar-width: thin;
|
21
21
|
|
22
22
|
}
|
@@ -231,7 +231,7 @@ div[data-monster-role=selection] {
|
|
231
231
|
display: flex;
|
232
232
|
flex-direction: column;
|
233
233
|
flex-grow: 1;
|
234
|
-
scrollbar-color: var(--monster-color-primary-1) var(--monster-color-primary-
|
234
|
+
scrollbar-color: var(--monster-color-primary-1) var(--monster-bg-color-primary-1);
|
235
235
|
scrollbar-width: thin;
|
236
236
|
|
237
237
|
}
|
@@ -1,12 +1,15 @@
|
|
1
1
|
@import "../../style/control.pcss";
|
2
2
|
@import "../../style/border.pcss";
|
3
3
|
@import "../../style/color.pcss";
|
4
|
+
@import "../../style/typography.pcss";
|
4
5
|
|
5
6
|
div[data-monster-role="control"] {
|
6
7
|
height: 100%;
|
7
8
|
}
|
8
9
|
|
9
|
-
|
10
|
+
button {
|
11
|
+
width: max-content;
|
12
|
+
}
|
10
13
|
|
11
14
|
[data-monster-role=button] {
|
12
15
|
display: flex;
|