@steroidsjs/bootstrap 3.0.0-beta.55 → 3.0.0-beta.57
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/content/Accordion/AccordionItemView.d.ts +2 -2
- package/content/Accordion/AccordionView.d.ts +2 -2
- package/content/Calendar/CalendarView.js +1 -1
- package/content/Calendar/CalendarView.scss +66 -20
- package/content/Calendar/CaptionElement.scss +54 -17
- package/content/CopyToClipboard/CopyToClipboard.d.ts +3 -0
- package/content/CopyToClipboard/CopyToClipboard.js +19 -0
- package/content/CopyToClipboard/CopyToClipboard.scss +41 -0
- package/content/Menu/MenuItemView.d.ts +2 -2
- package/form/DateField/DateFieldView.js +3 -2
- package/form/DateField/DateFieldView.scss +5 -156
- package/form/DateRangeField/DateRangeFieldView.js +10 -13
- package/form/DateRangeField/DateRangeFieldView.scss +29 -78
- package/form/DateTimeField/DateTimeFieldView.js +5 -5
- package/form/DateTimeField/DateTimeFieldView.scss +7 -109
- package/form/DateTimeRangeField/DateTimeRangeFieldView.js +9 -7
- package/form/DateTimeRangeField/DateTimeRangeFieldView.scss +25 -90
- package/form/DropDownField/DropDownFieldView.scss +1 -1
- package/index.d.ts +3 -0
- package/index.js +3 -0
- package/index.scss +1 -0
- package/package.json +3 -3
- package/scss/mixins/date.scss +397 -0
- package/scss/mixins/index.scss +2 -1
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--date-icon-default-color: #cbd5db;
|
|
3
|
+
--date-icon-close-default-color: #323232;
|
|
4
|
+
--date-icon-disabled-color: rgba(0, 0, 0, 0.1);
|
|
5
|
+
--date-range-separator-color: rgba(0, 0, 0, 0.1);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
html[data-theme="dark"] {
|
|
9
|
+
--date-icon-default-color: #5b5c6b;
|
|
10
|
+
--date-icon-close-default-color: #ffffff;
|
|
11
|
+
--date-icon-disabled-color: rgba(255, 255, 255, 0.1);
|
|
12
|
+
--date-range-separator-color: rgba(255, 255, 255, 0.1);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
$date-icon-default-color: var(--date-icon-default-color);
|
|
16
|
+
$date-icon-close-default-color: var(--date-icon-close-default-color);
|
|
17
|
+
$date-icon-disabled-color: var(--date-icon-disabled-color);
|
|
18
|
+
$date-range-separator-color: var(--date-range-separator-color);
|
|
19
|
+
|
|
20
|
+
$date-sizes: () !default;
|
|
21
|
+
$date-sizes: map-merge(
|
|
22
|
+
(
|
|
23
|
+
"lg": (
|
|
24
|
+
"padding": 16px 8px,
|
|
25
|
+
"radius": $radius-large,
|
|
26
|
+
"font-size": $font-size-lg,
|
|
27
|
+
"height": 56px,
|
|
28
|
+
"first-input-width": 96px,
|
|
29
|
+
),
|
|
30
|
+
"md": (
|
|
31
|
+
"padding": 11px 8px,
|
|
32
|
+
"radius": $radius-large,
|
|
33
|
+
"font-size": $font-size-base,
|
|
34
|
+
"height": 46px,
|
|
35
|
+
"first-input-width": 86px,
|
|
36
|
+
),
|
|
37
|
+
"sm": (
|
|
38
|
+
"padding": 5px 8px,
|
|
39
|
+
"radius": $radius-small,
|
|
40
|
+
"font-size": $font-size-sm,
|
|
41
|
+
"height": 34px,
|
|
42
|
+
"first-input-width": 76px,
|
|
43
|
+
),
|
|
44
|
+
),
|
|
45
|
+
$date-sizes
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
@mixin icon-container($root) {
|
|
49
|
+
#{$root}__icon-container {
|
|
50
|
+
position: absolute;
|
|
51
|
+
top: 50%;
|
|
52
|
+
right: 8px;
|
|
53
|
+
transform: translateY(-50%);
|
|
54
|
+
width: 24px;
|
|
55
|
+
height: 24px;
|
|
56
|
+
|
|
57
|
+
> * {
|
|
58
|
+
display: inline-flex;
|
|
59
|
+
flex-flow: row nowrap;
|
|
60
|
+
width: 100%;
|
|
61
|
+
height: 100%;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
align-items: center;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
#{$root}__date-icon {
|
|
67
|
+
path,
|
|
68
|
+
circle {
|
|
69
|
+
stroke: $date-icon-default-color;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
#{$root}__close-icon {
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
path,
|
|
76
|
+
circle {
|
|
77
|
+
stroke: $date-icon-close-default-color;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@mixin date-default-sizes($root) {
|
|
84
|
+
&_size {
|
|
85
|
+
@each $size, $size-map in $date-sizes {
|
|
86
|
+
&_#{$size} {
|
|
87
|
+
#{$root}__input {
|
|
88
|
+
border-radius: map-get($size-map, radius);
|
|
89
|
+
padding: map-get($size-map, padding);
|
|
90
|
+
padding-right: 40px;
|
|
91
|
+
height: map-get($size-map, height);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
#{$root}__body::before {
|
|
95
|
+
border-radius: calc(map-get($size-map, radius) + 4px);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
font-size: map-get($size-map, font-size);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@mixin date-default-input() {
|
|
105
|
+
&__input {
|
|
106
|
+
width: 100%;
|
|
107
|
+
font-size: inherit;
|
|
108
|
+
line-height: $line-height-lg;
|
|
109
|
+
background-color: $element-background-color;
|
|
110
|
+
border: 1px solid $border-color;
|
|
111
|
+
color: $text-color;
|
|
112
|
+
transition: border-color 150ms ease-in-out;
|
|
113
|
+
|
|
114
|
+
&:active {
|
|
115
|
+
border-color: $primary;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&::placeholder {
|
|
119
|
+
color: $placeholder-color;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&:disabled {
|
|
123
|
+
border: none;
|
|
124
|
+
background-color: $background-disabled-color;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@mixin date-default-body() {
|
|
130
|
+
&__body {
|
|
131
|
+
position: relative;
|
|
132
|
+
|
|
133
|
+
&::before {
|
|
134
|
+
display: block;
|
|
135
|
+
position: absolute;
|
|
136
|
+
top: 0;
|
|
137
|
+
left: 0;
|
|
138
|
+
right: 0;
|
|
139
|
+
bottom: 0;
|
|
140
|
+
width: 100%;
|
|
141
|
+
height: 100%;
|
|
142
|
+
content: "";
|
|
143
|
+
border: 4px solid $primary-light;
|
|
144
|
+
transform: translate(-4px, -4px);
|
|
145
|
+
pointer-events: none;
|
|
146
|
+
opacity: 0;
|
|
147
|
+
transition: opacity 150ms ease-in-out;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
@mixin date-default-effects($root) {
|
|
153
|
+
&:focus-within:not(:active) {
|
|
154
|
+
#{$root}__body {
|
|
155
|
+
&::before {
|
|
156
|
+
opacity: 1;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
#{$root}__input {
|
|
161
|
+
border-color: transparent;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
&_disabled {
|
|
166
|
+
#{$root}__date-icon {
|
|
167
|
+
path,
|
|
168
|
+
circle {
|
|
169
|
+
stroke: $date-icon-disabled-color;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
&_is-invalid {
|
|
175
|
+
#{$root}__input {
|
|
176
|
+
border-color: $danger;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@mixin date-range-body($root) {
|
|
182
|
+
&__body {
|
|
183
|
+
position: relative;
|
|
184
|
+
display: flex;
|
|
185
|
+
flex-flow: row nowrap;
|
|
186
|
+
align-items: center;
|
|
187
|
+
background-color: $element-background-color;
|
|
188
|
+
color: $text-color;
|
|
189
|
+
column-gap: 8px;
|
|
190
|
+
|
|
191
|
+
> * {
|
|
192
|
+
&:nth-child(1) {
|
|
193
|
+
width: 91px;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
&:nth-child(2) {
|
|
197
|
+
width: 100%;
|
|
198
|
+
margin-right: 40px;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
@mixin date-range-effects($root) {
|
|
205
|
+
&__effect {
|
|
206
|
+
position: absolute;
|
|
207
|
+
display: block;
|
|
208
|
+
width: 100%;
|
|
209
|
+
height: 100%;
|
|
210
|
+
top: 0;
|
|
211
|
+
left: 0;
|
|
212
|
+
right: 0;
|
|
213
|
+
bottom: 0;
|
|
214
|
+
border-radius: inherit;
|
|
215
|
+
pointer-events: none;
|
|
216
|
+
|
|
217
|
+
&::before,
|
|
218
|
+
&::after {
|
|
219
|
+
display: block;
|
|
220
|
+
content: "";
|
|
221
|
+
position: absolute;
|
|
222
|
+
top: 0;
|
|
223
|
+
left: 0;
|
|
224
|
+
right: 0;
|
|
225
|
+
bottom: 0;
|
|
226
|
+
transition: border-color 150ms ease-in-out, opacity 150ms ease-in-out;
|
|
227
|
+
opacity: 1;
|
|
228
|
+
border-radius: inherit;
|
|
229
|
+
border-width: 1px;
|
|
230
|
+
border-style: solid;
|
|
231
|
+
pointer-events: none;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
&::before {
|
|
235
|
+
border-color: $border-color;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
&::after {
|
|
239
|
+
width: 100%;
|
|
240
|
+
height: 100%;
|
|
241
|
+
transform: translate(-4px, -4px);
|
|
242
|
+
border: 4px solid $primary-light;
|
|
243
|
+
opacity: 0;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
//Effects
|
|
248
|
+
//Active
|
|
249
|
+
&__input:active ~ &__effect::before {
|
|
250
|
+
border-color: $primary;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
//Focus
|
|
254
|
+
&__body:focus-within:not(:active) &__effect {
|
|
255
|
+
&::before {
|
|
256
|
+
border-color: transparent;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
&::after {
|
|
260
|
+
opacity: 1;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
&_disabled {
|
|
265
|
+
#{$root}__body {
|
|
266
|
+
background-color: $background-disabled-color;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
#{$root}__effect {
|
|
270
|
+
opacity: 0;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
&_disabled {
|
|
275
|
+
#{$root}__date-icon {
|
|
276
|
+
path,
|
|
277
|
+
circle {
|
|
278
|
+
stroke: $date-icon-disabled-color;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
&_is-invalid {
|
|
284
|
+
#{$root}__effect::before {
|
|
285
|
+
border-color: $danger;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
#{$root}__input:active ~ #{$root}__effect::before {
|
|
289
|
+
border-color: $danger;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
@mixin date-range-sizes($root) {
|
|
295
|
+
&_size {
|
|
296
|
+
@each $size, $size-map in $date-sizes {
|
|
297
|
+
&_#{$size} {
|
|
298
|
+
#{$root}__body {
|
|
299
|
+
padding: map-get($size-map, padding);
|
|
300
|
+
border-radius: map-get($size-map, radius);
|
|
301
|
+
height: map-get($size-map, height);
|
|
302
|
+
|
|
303
|
+
> * {
|
|
304
|
+
&:nth-child(1) {
|
|
305
|
+
width: map-get($size-map, first-input-width);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
#{$root}__effect::after {
|
|
311
|
+
border-radius: calc(map-get($size-map, radius) + 4px);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
font-size: map-get($size-map, font-size);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
@mixin date-range-input() {
|
|
321
|
+
&__input {
|
|
322
|
+
border: none;
|
|
323
|
+
font-size: inherit;
|
|
324
|
+
background-color: inherit;
|
|
325
|
+
color: inherit;
|
|
326
|
+
|
|
327
|
+
&::placeholder {
|
|
328
|
+
color: $placeholder-color;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
@mixin date-time-panel($root) {
|
|
335
|
+
&__panel-container {
|
|
336
|
+
position: relative;
|
|
337
|
+
display: flex;
|
|
338
|
+
flex-flow: row nowrap;
|
|
339
|
+
color: $text-color;
|
|
340
|
+
|
|
341
|
+
#{$root}__separator {
|
|
342
|
+
position: relative;
|
|
343
|
+
margin-left: 4px;
|
|
344
|
+
margin-right: 16px;
|
|
345
|
+
width: 1px;
|
|
346
|
+
height: 338px;
|
|
347
|
+
background-color: $date-range-separator-color;
|
|
348
|
+
transform: translateY(12px);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.TimePanelView__body {
|
|
352
|
+
column-gap: 2px;
|
|
353
|
+
width: 68px;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.TimePanelView__header {
|
|
357
|
+
border: none;
|
|
358
|
+
margin-top: 2px;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.TimePanelView__column {
|
|
362
|
+
height: 298px;
|
|
363
|
+
row-gap: 2px;
|
|
364
|
+
border: none;
|
|
365
|
+
|
|
366
|
+
&:not(:last-child) {
|
|
367
|
+
border-right: none;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
overflow: scroll;
|
|
371
|
+
scrollbar-width: none;
|
|
372
|
+
-ms-overflow-style: none;
|
|
373
|
+
|
|
374
|
+
&::-webkit-scrollbar {
|
|
375
|
+
width: 0px;
|
|
376
|
+
height: 0px;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.TimePanelView__cell {
|
|
380
|
+
padding: 0;
|
|
381
|
+
border-radius: $radius-large;
|
|
382
|
+
|
|
383
|
+
&-value {
|
|
384
|
+
padding: 6px 7px;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.TimePanelView__button_ok {
|
|
390
|
+
@include calendar-button();
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.TimePanelView__footer {
|
|
394
|
+
margin-top: 3px;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
package/scss/mixins/index.scss
CHANGED