kmaterialize 2.3.3-1.0.2 → 2.3.3-1.0.21
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/README.md +4 -4
- package/components/air-datepicker/_air-datepicker.scss +137 -0
- package/components/air-datepicker/air-datepicker.ts +192 -0
- package/components/alert/_alerts.scss +130 -0
- package/components/alert/alert.ts +73 -0
- package/components/appbar/appbar.css +301 -4
- package/components/button/_buttons.scss +39 -1
- package/components/card/_cards.scss +9 -1
- package/components/checkbox/_checkboxes.scss +120 -229
- package/components/collapsible/_collapsible.scss +50 -0
- package/components/color-input/_color-input.scss +124 -0
- package/components/color-input/color-input.ts +203 -0
- package/components/dropdown/dropdown.ts +1 -1
- package/components/file-input/_file-input-enhanced.scss +61 -0
- package/components/file-input/file-input.ts +203 -0
- package/components/kanban/_kanban.scss +148 -0
- package/components/kanban/kanban.ts +133 -0
- package/components/list/_collection.scss +10 -2
- package/components/number-input/number-input.ts +103 -0
- package/components/password-input/password-input.ts +72 -0
- package/components/slider/_range.scss +5 -1
- package/components/switch/_switches.scss +5 -0
- package/components/textfield/_input-fields.scss +4 -4
- package/components/textfield/_select.scss +54 -0
- package/components/tom-select/_tom-select-field.scss +256 -0
- package/components/tom-select/tom-select-field.ts +175 -0
- package/components/toolbar/_toolbar.scss +324 -0
- package/components/toolbar/toolbar.ts +152 -0
- package/dist/css/materialize.colors.min.css +2 -2
- package/dist/css/materialize.css +10575 -711
- package/dist/css/materialize.min.css +2 -2
- package/dist/css/materialize.min.css.map +1 -1
- package/dist/js/materialize.cjs.js +1136 -45
- package/dist/js/materialize.d.ts +227 -2
- package/dist/js/materialize.js +1136 -45
- package/dist/js/materialize.min.js +2 -2
- package/dist/js/materialize.mjs +1128 -46
- package/package.json +45 -1
- package/sass/_colors.scss +191 -5
- package/sass/_global.scss +240 -1
- package/sass/materialize.scss +14 -1
- package/sass/mixins.module.scss +6 -6
|
@@ -1,281 +1,172 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* Material Design 3 checkboxes, adapted to native Materialize markup. */
|
|
2
2
|
|
|
3
3
|
@at-root {
|
|
4
4
|
:root {
|
|
5
|
-
--checkbox-size:
|
|
5
|
+
--checkbox-size: 20px;
|
|
6
6
|
--checkbox-shape: 2px;
|
|
7
|
+
--checkbox-state-layer-size: 44px;
|
|
7
8
|
}
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
input[type="checkbox"] {
|
|
11
|
-
|
|
12
|
-
-webkit-appearance: none;
|
|
13
|
-
appearance: none;
|
|
14
|
-
/* For iOS < 15 to remove gradient background */
|
|
15
|
-
// background-color: #fff;
|
|
16
|
-
margin: 0;
|
|
12
|
+
box-sizing: border-box;
|
|
17
13
|
position: relative;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
input[type="checkbox"]:focus {
|
|
22
|
-
outline: 3px solid var(--md-sys-color-secondary);
|
|
23
|
-
border-radius: 50%;
|
|
24
|
-
outline-offset: 0.5rem;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
input[type="checkbox"]:before {
|
|
28
|
-
opacity: 1;
|
|
29
|
-
position: absolute;
|
|
30
|
-
display: block;
|
|
14
|
+
z-index: 0;
|
|
15
|
+
flex: 0 0 var(--checkbox-size);
|
|
31
16
|
width: var(--checkbox-size);
|
|
32
17
|
height: var(--checkbox-size);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
display: block;
|
|
42
|
-
// left: 2px;
|
|
43
|
-
// top: -11px;
|
|
44
|
-
width: var(--checkbox-size);
|
|
45
|
-
height: var(--checkbox-size);
|
|
46
|
-
// border-width: 2px;
|
|
47
|
-
// border-style: solid;
|
|
48
|
-
// border-color: var(--md-sys-color-on-surface-variant);
|
|
49
|
-
content: "";
|
|
50
|
-
// background-image: linear-gradient(135deg, #B1B6BE 0%, #FFF 100%);
|
|
18
|
+
margin: 0;
|
|
19
|
+
padding: 0;
|
|
20
|
+
vertical-align: middle;
|
|
21
|
+
appearance: none;
|
|
22
|
+
-webkit-appearance: none;
|
|
23
|
+
color: var(--checkbox-selected-icon-color, var(--md-sys-color-on-primary));
|
|
24
|
+
background: transparent;
|
|
25
|
+
border: 2px solid var(--checkbox-outline-color, var(--md-sys-color-on-surface-variant));
|
|
51
26
|
border-radius: var(--checkbox-shape);
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
input[type="checkbox"]:checked:after {
|
|
57
|
-
background-color: var(--md-sys-color-primary);
|
|
58
|
-
clip-path: polygon(0 48%, 0 0, 56% 0, 74% 17%, 40% 64%, 23% 50%, 14% 61%, 42% 82%, 81% 31%, 32% 0, 100% 0, 100% 100%, 0 100%, 0 49%);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
[type="checkbox"]:indeterminate:after {
|
|
62
|
-
background-color: var(--md-sys-color-primary);
|
|
63
|
-
clip-path: polygon(0% 0%, 0% 100%, 18% 100%, 16% 43%, 83% 42%, 83% 63%, 16% 63%, 16% 100%, 100% 100%, 100% 0%);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// Disabled
|
|
67
|
-
input[type="checkbox"]:disabled:before {
|
|
68
|
-
filter: opacity(0.2);
|
|
69
|
-
}
|
|
70
|
-
input[type="checkbox"]:disabled:after {
|
|
71
|
-
filter: opacity(0.2);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// Hover
|
|
75
|
-
input[type="checkbox"]:not(:disabled):checked:hover:after{
|
|
76
|
-
// background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAQAAABuW59YAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAB2SURBVHjaAGkAlv8A3QDyAP0A/QD+Dam3W+kCAAD8APYAAgTVZaZCGwwA5wr0AvcA+Dh+7UX/x24AqK3Wg/8nt6w4/5q71wAAVP9g/7rTXf9n/+9N+AAAtpJa/zf/S//DhP8H/wAA4gzWj2P4lsf0JP0A/wADAHB0Ngka6UmKAAAAAElFTkSuQmCC'), linear-gradient(135deg, #8BB0C2 0%,#FFF 100%);
|
|
77
|
-
background-color: var(--md-sys-color-primary);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
input[type="checkbox"]:not(:disabled):hover:after{
|
|
81
|
-
// background-image: linear-gradient(135deg, #8BB0C2 0%,#FFF 100%);
|
|
82
|
-
border-color: #85A9BB #92C2DA #92C2DA #85A9BB;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
input[type="checkbox"]:not(:disabled):hover:before{
|
|
86
|
-
border-color: #3D7591;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/*
|
|
90
|
-
// Checkbox Styles
|
|
91
|
-
[type="checkbox"] {
|
|
92
|
-
// Text Label Style
|
|
93
|
-
+ span:not(.lever) {
|
|
94
|
-
position: relative;
|
|
95
|
-
cursor: pointer;
|
|
96
|
-
display: inline-block;
|
|
97
|
-
height: var(--checkbox-size);
|
|
98
|
-
line-height: var(--checkbox-size);
|
|
99
|
-
padding-left: var(--checkbox-size);
|
|
100
|
-
// background-color: red;
|
|
101
|
-
font-size: 1rem;
|
|
102
|
-
user-select: none;
|
|
103
|
-
}
|
|
27
|
+
outline: none;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
transition: background-color 150ms linear, border-color 150ms linear;
|
|
30
|
+
-webkit-tap-highlight-color: transparent;
|
|
104
31
|
|
|
105
|
-
//
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
content: '';
|
|
32
|
+
// The visual box stays compact while interaction feedback occupies 44px.
|
|
33
|
+
&::before {
|
|
34
|
+
content: "";
|
|
109
35
|
position: absolute;
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
border-radius:
|
|
117
|
-
|
|
36
|
+
z-index: -1;
|
|
37
|
+
top: 50%;
|
|
38
|
+
left: 50%;
|
|
39
|
+
width: var(--checkbox-state-layer-size);
|
|
40
|
+
height: var(--checkbox-state-layer-size);
|
|
41
|
+
background: transparent;
|
|
42
|
+
border-radius: 50%;
|
|
43
|
+
transform: translate(-50%, -50%) scale(0.8);
|
|
44
|
+
transition: background-color 150ms linear, transform 150ms ease;
|
|
45
|
+
pointer-events: none;
|
|
118
46
|
}
|
|
119
47
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
48
|
+
// Check mark; the indeterminate state replaces it with a short bar.
|
|
49
|
+
&::after {
|
|
50
|
+
content: "";
|
|
51
|
+
position: absolute;
|
|
52
|
+
top: 2px;
|
|
53
|
+
left: 6px;
|
|
54
|
+
box-sizing: border-box;
|
|
55
|
+
width: 5px;
|
|
56
|
+
height: 10px;
|
|
57
|
+
border: solid currentColor;
|
|
58
|
+
border-width: 0 2px 2px 0;
|
|
59
|
+
opacity: 0;
|
|
60
|
+
transform: rotate(45deg) scale(0.6);
|
|
61
|
+
transform-origin: center;
|
|
62
|
+
transition: opacity 50ms linear, transform 350ms cubic-bezier(0.2, 0, 0, 1);
|
|
63
|
+
pointer-events: none;
|
|
123
64
|
}
|
|
124
65
|
|
|
125
|
-
&:
|
|
126
|
-
|
|
66
|
+
&:checked,
|
|
67
|
+
&:indeterminate {
|
|
68
|
+
background: var(--checkbox-selected-container-color, var(--md-sys-color-primary));
|
|
69
|
+
border-color: var(--checkbox-selected-container-color, var(--md-sys-color-primary));
|
|
127
70
|
}
|
|
128
71
|
|
|
129
|
-
&:
|
|
130
|
-
|
|
72
|
+
&:checked::after {
|
|
73
|
+
opacity: 1;
|
|
74
|
+
transform: rotate(45deg) scale(1);
|
|
131
75
|
}
|
|
132
76
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
77
|
+
&:indeterminate::after {
|
|
78
|
+
top: 7px;
|
|
79
|
+
left: 3px;
|
|
80
|
+
width: 10px;
|
|
81
|
+
height: 2px;
|
|
82
|
+
background: currentColor;
|
|
136
83
|
border: 0;
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
background-color: rgba(0, 0, 0, 0.12);
|
|
84
|
+
opacity: 1;
|
|
85
|
+
transform: scale(1);
|
|
140
86
|
}
|
|
141
|
-
}
|
|
142
87
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
left: -5px;
|
|
147
|
-
width: 12px;
|
|
148
|
-
height: 22px;
|
|
149
|
-
border-top: 2px solid transparent;
|
|
150
|
-
border-left: 2px solid transparent;
|
|
151
|
-
border-right: 2px solid var(--md-sys-color-primary);
|
|
152
|
-
border-bottom: 2px solid var(--md-sys-color-primary);
|
|
153
|
-
transform: rotate(40deg);
|
|
154
|
-
backface-visibility: hidden;
|
|
155
|
-
transform-origin: 100% 100%;
|
|
88
|
+
&:not(:disabled):hover::before {
|
|
89
|
+
background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent);
|
|
90
|
+
transform: translate(-50%, -50%) scale(1);
|
|
156
91
|
}
|
|
157
92
|
|
|
158
|
-
&:disabled
|
|
159
|
-
|
|
160
|
-
border-bottom: 2px solid color-mix(in srgb, transparent, var(--md-sys-color-on-surface) 38%);
|
|
93
|
+
&:not(:disabled):is(:checked, :indeterminate):hover::before {
|
|
94
|
+
background: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent);
|
|
161
95
|
}
|
|
162
|
-
}
|
|
163
96
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
top: -11px;
|
|
168
|
-
left: -12px;
|
|
169
|
-
width: 10px;
|
|
170
|
-
height: 22px;
|
|
171
|
-
border-top: none;
|
|
172
|
-
border-left: none;
|
|
173
|
-
border-right: 2px solid var(--md-sys-color-primary);
|
|
174
|
-
border-bottom: none;
|
|
175
|
-
transform: rotate(90deg);
|
|
176
|
-
backface-visibility: hidden;
|
|
177
|
-
transform-origin: 100% 100%;
|
|
97
|
+
&:not(:disabled):active::before {
|
|
98
|
+
background: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent);
|
|
99
|
+
transform: translate(-50%, -50%) scale(1);
|
|
178
100
|
}
|
|
179
101
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
border-right: 2px solid color-mix(in srgb, transparent, var(--md-sys-color-on-surface) 38%);
|
|
183
|
-
background-color: transparent;
|
|
102
|
+
&:not(:disabled):is(:checked, :indeterminate):active::before {
|
|
103
|
+
background: color-mix(in srgb, var(--md-sys-color-primary) 12%, transparent);
|
|
184
104
|
}
|
|
185
|
-
}
|
|
186
105
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
border-radius: 2px;
|
|
106
|
+
&:focus-visible::before,
|
|
107
|
+
&.tabbed:focus::before {
|
|
108
|
+
background: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent);
|
|
109
|
+
transform: translate(-50%, -50%) scale(1);
|
|
192
110
|
}
|
|
193
111
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
left: 0;
|
|
198
|
-
position: absolute;
|
|
199
|
-
// .1s delay is for check animation
|
|
200
|
-
transition: border .25s, background-color .25s, width .20s .1s, height .20s .1s, top .20s .1s, left .20s .1s;
|
|
201
|
-
z-index: 1;
|
|
112
|
+
&:is(:checked, :indeterminate):focus-visible::before,
|
|
113
|
+
&:is(:checked, :indeterminate).tabbed:focus::before {
|
|
114
|
+
background: color-mix(in srgb, var(--md-sys-color-primary) 12%, transparent);
|
|
202
115
|
}
|
|
203
116
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
height: 0;
|
|
208
|
-
border: 3px solid transparent;
|
|
209
|
-
left: 6px;
|
|
210
|
-
top: 10px;
|
|
211
|
-
transform: rotateZ(37deg);
|
|
212
|
-
transform-origin: 100% 100%;
|
|
117
|
+
&:disabled {
|
|
118
|
+
cursor: default;
|
|
119
|
+
border-color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);
|
|
213
120
|
}
|
|
214
121
|
|
|
215
|
-
&:
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
border: 2px solid var(--md-sys-color-on-surface-variant);
|
|
220
|
-
top: 0px;
|
|
221
|
-
z-index: 0;
|
|
122
|
+
&:disabled:is(:checked, :indeterminate) {
|
|
123
|
+
color: var(--md-sys-color-surface);
|
|
124
|
+
background: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);
|
|
125
|
+
border-color: transparent;
|
|
222
126
|
}
|
|
127
|
+
}
|
|
223
128
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
left: 1px;
|
|
229
|
-
width: 8px;
|
|
230
|
-
height: 13px;
|
|
231
|
-
border-top: 2px solid transparent;
|
|
232
|
-
border-left: 2px solid transparent;
|
|
233
|
-
border-right: 2px solid var(--md-sys-color-on-primary);
|
|
234
|
-
border-bottom: 2px solid var(--md-sys-color-on-primary);
|
|
235
|
-
transform: rotateZ(37deg);
|
|
236
|
-
transform-origin: 100% 100%;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
+ span:not(.lever):after {
|
|
240
|
-
top: 0;
|
|
241
|
-
width: 20px;
|
|
242
|
-
height: 20px;
|
|
243
|
-
border: 2px solid var(--md-sys-color-primary);
|
|
244
|
-
background-color: var(--md-sys-color-primary);
|
|
245
|
-
z-index: 0;
|
|
246
|
-
}
|
|
247
|
-
}
|
|
129
|
+
// Material has one checkbox type; keep this legacy class API visually unified.
|
|
130
|
+
input[type="checkbox"].filled-in {
|
|
131
|
+
border-radius: var(--checkbox-shape);
|
|
132
|
+
}
|
|
248
133
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
134
|
+
// Match the 20px box with a 48px accessible row target. The :not(.lever)
|
|
135
|
+
// sibling keeps these layout rules away from Materialize switches.
|
|
136
|
+
label:has(> input[type="checkbox"]):has(> span:not(.lever)) {
|
|
137
|
+
display: inline-flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
gap: 12px;
|
|
140
|
+
min-height: 48px;
|
|
141
|
+
color: var(--md-sys-color-on-surface);
|
|
142
|
+
font-size: 16px;
|
|
143
|
+
cursor: pointer;
|
|
144
|
+
user-select: none;
|
|
255
145
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
border-color: var(--md-sys-color-primary);
|
|
146
|
+
> span:not(.lever) {
|
|
147
|
+
padding: 0;
|
|
148
|
+
line-height: 24px;
|
|
260
149
|
}
|
|
261
150
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
151
|
+
> .checkbox-icon {
|
|
152
|
+
flex: 0 0 auto;
|
|
153
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
154
|
+
font-size: 20px;
|
|
155
|
+
line-height: 24px;
|
|
266
156
|
}
|
|
267
157
|
|
|
268
|
-
|
|
269
|
-
|
|
158
|
+
> input[type="checkbox"]:disabled ~ span:not(.lever),
|
|
159
|
+
> input[type="checkbox"]:disabled ~ .checkbox-icon {
|
|
160
|
+
color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);
|
|
270
161
|
}
|
|
271
162
|
|
|
272
|
-
&:
|
|
273
|
-
|
|
163
|
+
&:has(> input[type="checkbox"]:disabled) {
|
|
164
|
+
cursor: default;
|
|
274
165
|
}
|
|
166
|
+
}
|
|
275
167
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
168
|
+
// The 48px label already provides Material's touch target. Remove the default
|
|
169
|
+
// paragraph margins when a paragraph is used only as a checkbox row.
|
|
170
|
+
p:has(> label:has(> input[type="checkbox"]):has(> span:not(.lever))) {
|
|
171
|
+
margin-block: 0;
|
|
280
172
|
}
|
|
281
|
-
*/
|
|
@@ -4,11 +4,24 @@
|
|
|
4
4
|
.collapsible {
|
|
5
5
|
padding-left: 0;
|
|
6
6
|
list-style-type: none;
|
|
7
|
+
background-color: var(--md-sys-color-surface);
|
|
7
8
|
border-top: 1px solid var(--md-sys-color-outline-variant);
|
|
8
9
|
border-right: 1px solid var(--md-sys-color-outline-variant);
|
|
9
10
|
border-left: 1px solid var(--md-sys-color-outline-variant);
|
|
10
11
|
margin: $element-top-margin 0 $element-bottom-margin 0;
|
|
12
|
+
// @implement /Users/kzarshenas/Sites/RodeoFx/rodeo_toolkit_2/app/Front/style/scss/component_enhance.scss
|
|
13
|
+
// Matches the 12px corner radius used across cards, dropdowns and
|
|
14
|
+
// collections instead of square corners.
|
|
15
|
+
border-radius: 12px;
|
|
11
16
|
@extend .z-depth-1;
|
|
17
|
+
|
|
18
|
+
// @implement /Users/kzarshenas/Sites/RodeoFx/rodeo_toolkit_2/app/Front/style/scss/component_enhance.scss
|
|
19
|
+
// Only clip to the rounded corners while every item is closed - an open
|
|
20
|
+
// last item's body needs to be able to grow past the list's own bottom
|
|
21
|
+
// edge instead of being cut off by it.
|
|
22
|
+
&:not(:has(li:last-child.active)) {
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
}
|
|
12
25
|
}
|
|
13
26
|
|
|
14
27
|
.collapsible-header {
|
|
@@ -61,6 +74,43 @@
|
|
|
61
74
|
overflow: hidden;
|
|
62
75
|
}
|
|
63
76
|
|
|
77
|
+
// @implement /Users/kzarshenas/Sites/RodeoFx/rodeo_toolkit_2/app/Front/style/scss/component_enhance.scss
|
|
78
|
+
// Round the corners of the first/last item's own header/body so they
|
|
79
|
+
// follow the list's rounded outline instead of showing a square edge
|
|
80
|
+
// inside it. Longhand corners (not the `border-radius` shorthand) so that
|
|
81
|
+
// a single-item accordion - where the same <li> is both first and last -
|
|
82
|
+
// gets all 4 corners rounded instead of the last-child rule's shorthand
|
|
83
|
+
// wiping out the top corners the first-child rule just set.
|
|
84
|
+
.collapsible > li:first-child .collapsible-header {
|
|
85
|
+
border-top-left-radius: 12px;
|
|
86
|
+
border-top-right-radius: 12px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.collapsible > li:last-child {
|
|
90
|
+
&:not(.active) .collapsible-header {
|
|
91
|
+
border-bottom-left-radius: 12px;
|
|
92
|
+
border-bottom-right-radius: 12px;
|
|
93
|
+
transition-delay: 250ms;
|
|
94
|
+
transition-property: border-radius;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&.active .collapsible-body {
|
|
98
|
+
border-radius: 0 0 12px 12px;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// CSS resolves border-radius per-corner, not per-rule: once the
|
|
103
|
+
// :not(.active) rule above stops matching, nothing here fixes the bottom
|
|
104
|
+
// corners back to square, so a more specific rule elsewhere (e.g. the
|
|
105
|
+
// sidenav's `li > a { border-radius: 100px; }` pill styling, which also
|
|
106
|
+
// matches .collapsible-header since it's an <a> inside a sidenav <li>)
|
|
107
|
+
// is free to fill that gap and leave the header rounded on all 4 corners
|
|
108
|
+
// while expanded. Force it explicitly instead of leaving it implicit.
|
|
109
|
+
.collapsible > li.active .collapsible-header {
|
|
110
|
+
border-bottom-left-radius: 0;
|
|
111
|
+
border-bottom-right-radius: 0;
|
|
112
|
+
}
|
|
113
|
+
|
|
64
114
|
// Popout Collapsible
|
|
65
115
|
|
|
66
116
|
.collapsible.popout {
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
@use '../../sass/variables' as *;
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--color-input-width: 40px;
|
|
5
|
+
--color-input-height: 32px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// @implement /Users/kzarshenas/Sites/CrazyProject/CrazyPHP/resources/Scss/style/enhancement/pickr_materializecss.scss
|
|
9
|
+
// Reskins Pickr's own DOM (it doesn't read Materialize's own tokens) to
|
|
10
|
+
// match the rest of kmaterialize - source used --md-sys-color-on-tertiary
|
|
11
|
+
// for the popup background, swapped here for --md-sys-color-surface since
|
|
12
|
+
// that's what every other popup/menu surface in kmaterialize already uses
|
|
13
|
+
// (a color meant for text-on-tertiary looked wrong as a popup background).
|
|
14
|
+
.pickr button.pcr-button {
|
|
15
|
+
// Match the native fallback below: a compact filled colour surface with
|
|
16
|
+
// Materialize's underline retained as its focus/field affordance.
|
|
17
|
+
width: var(--color-input-width);
|
|
18
|
+
height: var(--color-input-height);
|
|
19
|
+
min-width: 0;
|
|
20
|
+
padding: 0;
|
|
21
|
+
margin: 0;
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
border-bottom: 1px solid var(--md-sys-color-on-surface-variant);
|
|
24
|
+
border-radius: 6px 6px 0 0;
|
|
25
|
+
|
|
26
|
+
&::before,
|
|
27
|
+
&::after {
|
|
28
|
+
border-radius: 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Pickr's default focus treatment stacks two shadows outside the rounded
|
|
32
|
+
// button, which appears as mismatched grey arcs around the top corners.
|
|
33
|
+
&:focus,
|
|
34
|
+
&.pcr-active {
|
|
35
|
+
box-shadow: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&:focus-visible {
|
|
39
|
+
outline: 2px solid var(--md-sys-color-primary);
|
|
40
|
+
outline-offset: -2px;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// While Pickr is loading (or when its optional peer is unavailable), make
|
|
45
|
+
// the native colour input use the same compact, fully-filled presentation.
|
|
46
|
+
input[type="color"][data-color-picker] {
|
|
47
|
+
width: var(--color-input-width);
|
|
48
|
+
height: var(--color-input-height);
|
|
49
|
+
min-width: 0;
|
|
50
|
+
// Override the higher-specificity generic text-input padding, including
|
|
51
|
+
// its focused state, which otherwise adds a 20px inset above the swatch.
|
|
52
|
+
padding: 0 !important;
|
|
53
|
+
margin: 0;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
border-radius: 6px 6px 0 0;
|
|
57
|
+
|
|
58
|
+
&::-webkit-color-swatch-wrapper {
|
|
59
|
+
padding: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&::-webkit-color-swatch,
|
|
63
|
+
&::-moz-color-swatch {
|
|
64
|
+
border: 0;
|
|
65
|
+
border-radius: 6px 6px 0 0;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// The swatch button replaces a hidden `<input type="color">`, so
|
|
70
|
+
// Materialize's usual floating label (meant to sit inside/over a live text
|
|
71
|
+
// input, floating up on focus/value) has nothing correct to float relative
|
|
72
|
+
// to - left alone it overlaps the swatch. Lay the whole field out as a row
|
|
73
|
+
// instead - swatch (and any prefix/suffix icon placed alongside it) then
|
|
74
|
+
// the label to its right, vertically centered - and reset the label itself
|
|
75
|
+
// out of Materialize's floating positioning.
|
|
76
|
+
.input-field:has(> input[type="color"][data-color-picker]) {
|
|
77
|
+
display: inline-flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
gap: 12px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
input[type="color"][data-color-picker] ~ label {
|
|
83
|
+
position: static;
|
|
84
|
+
display: inline-block;
|
|
85
|
+
transform: none;
|
|
86
|
+
margin: 0;
|
|
87
|
+
padding: 0;
|
|
88
|
+
font-size: 1rem;
|
|
89
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Disabled - dim the swatch and make the intent obvious; Pickr's own base
|
|
93
|
+
// CSS already sets cursor:not-allowed on .pcr-button.disabled.
|
|
94
|
+
.pickr button.pcr-button.disabled {
|
|
95
|
+
opacity: 0.38;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.pcr-app {
|
|
99
|
+
background: var(--md-sys-color-surface);
|
|
100
|
+
color: var(--md-sys-color-on-surface);
|
|
101
|
+
border: 1px solid var(--md-sys-color-outline-variant);
|
|
102
|
+
border-radius: 6px;
|
|
103
|
+
box-shadow:
|
|
104
|
+
0 2px 6px color-mix(in srgb, var(--md-sys-color-shadow) 18%, transparent),
|
|
105
|
+
0 10px 28px color-mix(in srgb, var(--md-sys-color-shadow) 22%, transparent);
|
|
106
|
+
|
|
107
|
+
.pcr-interaction {
|
|
108
|
+
.pcr-result {
|
|
109
|
+
height: 25px;
|
|
110
|
+
color: var(--md-sys-color-on-surface);
|
|
111
|
+
background-color: var(--md-sys-color-surface-variant);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
input {
|
|
115
|
+
color: var(--md-sys-color-on-surface);
|
|
116
|
+
background-color: var(--md-sys-color-surface-variant);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.pcr-save {
|
|
120
|
+
background-color: var(--md-sys-color-primary);
|
|
121
|
+
color: var(--md-sys-color-on-primary);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|