css-zero 0.0.53 → 0.0.54
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -3
- data/app/assets/stylesheets/zutilities.css +0 -1
- data/lib/css_zero/version.rb +1 -1
- data/lib/generators/css_zero/add/USAGE +1 -1
- data/lib/generators/css_zero/add/resources.yml +4 -0
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/breadcrumb.css +5 -1
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/flatpickr.css +795 -0
- data/lib/generators/css_zero/add/templates/app/assets/stylesheets/zdatepicker.css +175 -0
- data/lib/generators/css_zero/add/templates/app/javascript/controllers/datepicker_controller.js +52 -0
- data/lib/generators/css_zero/install/templates/app/assets/stylesheets/base.css +0 -2
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ed27e158f8a76846339dfa69f1c174dea2af1fdadae6a3b63373da5b8c71f7b
|
4
|
+
data.tar.gz: b3969c7185bd0508fe1c63ec94a48c9d96243d614d2cc30a2dd5469fb0be959f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 623658c4fba2326aabdd9313c80f8fb1d2fdeb46d2f48d6181f5d1fc9701f1be82173f15956c194d680d9800f13984fda6151c3d11dd9b02ff00d3bb1aa5bffc
|
7
|
+
data.tar.gz: d1a40430b67b9084a6f40de4c32907b19f31c157baed20f9f27538b4017d9ce3e2e9ca837d649e7659c8b12512b9f6d3339d1ad739a1b6ed4947615b89f2bfe0
|
data/README.md
CHANGED
@@ -90,9 +90,7 @@ Check the [CSS files](app/assets/stylesheets) in the repository to see the avail
|
|
90
90
|
|
91
91
|
## Components
|
92
92
|
|
93
|
-
[<img src="https://github.com/user-attachments/assets/
|
94
|
-
|
95
|
-
More components soon...
|
93
|
+
[<img src="https://github.com/user-attachments/assets/3a7fbd1e-5cc8-4476-a60c-52bc28efca29">](https://csszero.lazaronixon.com)
|
96
94
|
|
97
95
|
## Development
|
98
96
|
|
@@ -101,7 +101,6 @@
|
|
101
101
|
*****************************************************************/
|
102
102
|
.colorize-black { filter: var(--color-filter-text); }
|
103
103
|
.colorize-white { filter: var(--color-filter-text-reversed); }
|
104
|
-
.colorize-shade { filter: var(--color-filter-text-subtle); }
|
105
104
|
.colorize-negative { filter: var(--color-filter-negative); }
|
106
105
|
.colorize-positive { filter: var(--color-filter-positive); }
|
107
106
|
|
data/lib/css_zero/version.rb
CHANGED
@@ -2,7 +2,7 @@ Description:
|
|
2
2
|
This will add components into your project.
|
3
3
|
|
4
4
|
Components:
|
5
|
-
accordion alert autosave avatar badge breadcrumb button card carousel combobox check_all command collapsible dialog dropdown flash form fullscreen hotkey input input_concerns inputmask layouts lightbox local_time pagination progress prose sheet skeleton switch table tabs trix upload_preview toggle web_share
|
5
|
+
accordion alert autosave avatar badge breadcrumb button card carousel combobox check_all command collapsible datepicker dialog dropdown flash form fullscreen hotkey input input_concerns inputmask layouts lightbox local_time pagination progress prose sheet skeleton switch table tabs trix upload_preview toggle web_share
|
6
6
|
|
7
7
|
Example:
|
8
8
|
bin/rails generate css_zero:add [components...]
|
@@ -36,6 +36,10 @@ command:
|
|
36
36
|
- app/assets/images/search.svg
|
37
37
|
collapsible:
|
38
38
|
- app/javascript/controllers/collapsible_controller.js
|
39
|
+
datepicker:
|
40
|
+
- app/assets/stylesheets/flatpickr.css
|
41
|
+
- app/assets/stylesheets/zdatepicker.css
|
42
|
+
- app/javascript/controllers/datepicker_controller.js
|
39
43
|
dialog:
|
40
44
|
- app/assets/stylesheets/dialog.css
|
41
45
|
- app/javascript/controllers/dialog_controller.js
|
@@ -0,0 +1,795 @@
|
|
1
|
+
.flatpickr-calendar {
|
2
|
+
background: transparent;
|
3
|
+
opacity: 0;
|
4
|
+
display: none;
|
5
|
+
text-align: center;
|
6
|
+
visibility: hidden;
|
7
|
+
padding: 0;
|
8
|
+
-webkit-animation: none;
|
9
|
+
animation: none;
|
10
|
+
direction: ltr;
|
11
|
+
border: 0;
|
12
|
+
font-size: 14px;
|
13
|
+
line-height: 24px;
|
14
|
+
border-radius: 5px;
|
15
|
+
position: absolute;
|
16
|
+
width: 307.875px;
|
17
|
+
-webkit-box-sizing: border-box;
|
18
|
+
box-sizing: border-box;
|
19
|
+
-ms-touch-action: manipulation;
|
20
|
+
touch-action: manipulation;
|
21
|
+
background: #fff;
|
22
|
+
-webkit-box-shadow: 1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08);
|
23
|
+
box-shadow: 1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08);
|
24
|
+
}
|
25
|
+
.flatpickr-calendar.open,
|
26
|
+
.flatpickr-calendar.inline {
|
27
|
+
opacity: 1;
|
28
|
+
max-height: 640px;
|
29
|
+
visibility: visible;
|
30
|
+
}
|
31
|
+
.flatpickr-calendar.open {
|
32
|
+
display: inline-block;
|
33
|
+
z-index: 99999;
|
34
|
+
}
|
35
|
+
.flatpickr-calendar.animate.open {
|
36
|
+
-webkit-animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
|
37
|
+
animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
|
38
|
+
}
|
39
|
+
.flatpickr-calendar.inline {
|
40
|
+
display: block;
|
41
|
+
position: relative;
|
42
|
+
top: 2px;
|
43
|
+
}
|
44
|
+
.flatpickr-calendar.static {
|
45
|
+
position: absolute;
|
46
|
+
top: calc(100% + 2px);
|
47
|
+
}
|
48
|
+
.flatpickr-calendar.static.open {
|
49
|
+
z-index: 999;
|
50
|
+
display: block;
|
51
|
+
}
|
52
|
+
.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7) {
|
53
|
+
-webkit-box-shadow: none !important;
|
54
|
+
box-shadow: none !important;
|
55
|
+
}
|
56
|
+
.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1) {
|
57
|
+
-webkit-box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
|
58
|
+
box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
|
59
|
+
}
|
60
|
+
.flatpickr-calendar .hasWeeks .dayContainer,
|
61
|
+
.flatpickr-calendar .hasTime .dayContainer {
|
62
|
+
border-bottom: 0;
|
63
|
+
border-bottom-right-radius: 0;
|
64
|
+
border-bottom-left-radius: 0;
|
65
|
+
}
|
66
|
+
.flatpickr-calendar .hasWeeks .dayContainer {
|
67
|
+
border-left: 0;
|
68
|
+
}
|
69
|
+
.flatpickr-calendar.hasTime .flatpickr-time {
|
70
|
+
height: 40px;
|
71
|
+
border-top: 1px solid #e6e6e6;
|
72
|
+
}
|
73
|
+
.flatpickr-calendar.noCalendar.hasTime .flatpickr-time {
|
74
|
+
height: auto;
|
75
|
+
}
|
76
|
+
.flatpickr-calendar:before,
|
77
|
+
.flatpickr-calendar:after {
|
78
|
+
position: absolute;
|
79
|
+
display: block;
|
80
|
+
pointer-events: none;
|
81
|
+
border: solid transparent;
|
82
|
+
content: '';
|
83
|
+
height: 0;
|
84
|
+
width: 0;
|
85
|
+
left: 22px;
|
86
|
+
}
|
87
|
+
.flatpickr-calendar.rightMost:before,
|
88
|
+
.flatpickr-calendar.arrowRight:before,
|
89
|
+
.flatpickr-calendar.rightMost:after,
|
90
|
+
.flatpickr-calendar.arrowRight:after {
|
91
|
+
left: auto;
|
92
|
+
right: 22px;
|
93
|
+
}
|
94
|
+
.flatpickr-calendar.arrowCenter:before,
|
95
|
+
.flatpickr-calendar.arrowCenter:after {
|
96
|
+
left: 50%;
|
97
|
+
right: 50%;
|
98
|
+
}
|
99
|
+
.flatpickr-calendar:before {
|
100
|
+
border-width: 5px;
|
101
|
+
margin: 0 -5px;
|
102
|
+
}
|
103
|
+
.flatpickr-calendar:after {
|
104
|
+
border-width: 4px;
|
105
|
+
margin: 0 -4px;
|
106
|
+
}
|
107
|
+
.flatpickr-calendar.arrowTop:before,
|
108
|
+
.flatpickr-calendar.arrowTop:after {
|
109
|
+
bottom: 100%;
|
110
|
+
}
|
111
|
+
.flatpickr-calendar.arrowTop:before {
|
112
|
+
border-bottom-color: #e6e6e6;
|
113
|
+
}
|
114
|
+
.flatpickr-calendar.arrowTop:after {
|
115
|
+
border-bottom-color: #fff;
|
116
|
+
}
|
117
|
+
.flatpickr-calendar.arrowBottom:before,
|
118
|
+
.flatpickr-calendar.arrowBottom:after {
|
119
|
+
top: 100%;
|
120
|
+
}
|
121
|
+
.flatpickr-calendar.arrowBottom:before {
|
122
|
+
border-top-color: #e6e6e6;
|
123
|
+
}
|
124
|
+
.flatpickr-calendar.arrowBottom:after {
|
125
|
+
border-top-color: #fff;
|
126
|
+
}
|
127
|
+
.flatpickr-calendar:focus {
|
128
|
+
outline: 0;
|
129
|
+
}
|
130
|
+
.flatpickr-wrapper {
|
131
|
+
position: relative;
|
132
|
+
display: inline-block;
|
133
|
+
}
|
134
|
+
.flatpickr-months {
|
135
|
+
display: -webkit-box;
|
136
|
+
display: -webkit-flex;
|
137
|
+
display: -ms-flexbox;
|
138
|
+
display: flex;
|
139
|
+
}
|
140
|
+
.flatpickr-months .flatpickr-month {
|
141
|
+
background: transparent;
|
142
|
+
color: rgba(0,0,0,0.9);
|
143
|
+
fill: rgba(0,0,0,0.9);
|
144
|
+
height: 34px;
|
145
|
+
line-height: 1;
|
146
|
+
text-align: center;
|
147
|
+
position: relative;
|
148
|
+
-webkit-user-select: none;
|
149
|
+
-moz-user-select: none;
|
150
|
+
-ms-user-select: none;
|
151
|
+
user-select: none;
|
152
|
+
overflow: hidden;
|
153
|
+
-webkit-box-flex: 1;
|
154
|
+
-webkit-flex: 1;
|
155
|
+
-ms-flex: 1;
|
156
|
+
flex: 1;
|
157
|
+
}
|
158
|
+
.flatpickr-months .flatpickr-prev-month,
|
159
|
+
.flatpickr-months .flatpickr-next-month {
|
160
|
+
-webkit-user-select: none;
|
161
|
+
-moz-user-select: none;
|
162
|
+
-ms-user-select: none;
|
163
|
+
user-select: none;
|
164
|
+
text-decoration: none;
|
165
|
+
cursor: pointer;
|
166
|
+
position: absolute;
|
167
|
+
top: 0;
|
168
|
+
height: 34px;
|
169
|
+
padding: 10px;
|
170
|
+
z-index: 3;
|
171
|
+
color: rgba(0,0,0,0.9);
|
172
|
+
fill: rgba(0,0,0,0.9);
|
173
|
+
}
|
174
|
+
.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,
|
175
|
+
.flatpickr-months .flatpickr-next-month.flatpickr-disabled {
|
176
|
+
display: none;
|
177
|
+
}
|
178
|
+
.flatpickr-months .flatpickr-prev-month i,
|
179
|
+
.flatpickr-months .flatpickr-next-month i {
|
180
|
+
position: relative;
|
181
|
+
}
|
182
|
+
.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,
|
183
|
+
.flatpickr-months .flatpickr-next-month.flatpickr-prev-month {
|
184
|
+
/*
|
185
|
+
/*rtl:begin:ignore*/
|
186
|
+
/*
|
187
|
+
*/
|
188
|
+
left: 0;
|
189
|
+
/*
|
190
|
+
/*rtl:end:ignore*/
|
191
|
+
/*
|
192
|
+
*/
|
193
|
+
}
|
194
|
+
/*
|
195
|
+
/*rtl:begin:ignore*/
|
196
|
+
/*
|
197
|
+
/*rtl:end:ignore*/
|
198
|
+
.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,
|
199
|
+
.flatpickr-months .flatpickr-next-month.flatpickr-next-month {
|
200
|
+
/*
|
201
|
+
/*rtl:begin:ignore*/
|
202
|
+
/*
|
203
|
+
*/
|
204
|
+
right: 0;
|
205
|
+
/*
|
206
|
+
/*rtl:end:ignore*/
|
207
|
+
/*
|
208
|
+
*/
|
209
|
+
}
|
210
|
+
/*
|
211
|
+
/*rtl:begin:ignore*/
|
212
|
+
/*
|
213
|
+
/*rtl:end:ignore*/
|
214
|
+
.flatpickr-months .flatpickr-prev-month:hover,
|
215
|
+
.flatpickr-months .flatpickr-next-month:hover {
|
216
|
+
color: #959ea9;
|
217
|
+
}
|
218
|
+
.flatpickr-months .flatpickr-prev-month:hover svg,
|
219
|
+
.flatpickr-months .flatpickr-next-month:hover svg {
|
220
|
+
fill: #f64747;
|
221
|
+
}
|
222
|
+
.flatpickr-months .flatpickr-prev-month svg,
|
223
|
+
.flatpickr-months .flatpickr-next-month svg {
|
224
|
+
width: 14px;
|
225
|
+
height: 14px;
|
226
|
+
}
|
227
|
+
.flatpickr-months .flatpickr-prev-month svg path,
|
228
|
+
.flatpickr-months .flatpickr-next-month svg path {
|
229
|
+
-webkit-transition: fill 0.1s;
|
230
|
+
transition: fill 0.1s;
|
231
|
+
fill: inherit;
|
232
|
+
}
|
233
|
+
.numInputWrapper {
|
234
|
+
position: relative;
|
235
|
+
height: auto;
|
236
|
+
}
|
237
|
+
.numInputWrapper input,
|
238
|
+
.numInputWrapper span {
|
239
|
+
display: inline-block;
|
240
|
+
}
|
241
|
+
.numInputWrapper input {
|
242
|
+
width: 100%;
|
243
|
+
}
|
244
|
+
.numInputWrapper input::-ms-clear {
|
245
|
+
display: none;
|
246
|
+
}
|
247
|
+
.numInputWrapper input::-webkit-outer-spin-button,
|
248
|
+
.numInputWrapper input::-webkit-inner-spin-button {
|
249
|
+
margin: 0;
|
250
|
+
-webkit-appearance: none;
|
251
|
+
}
|
252
|
+
.numInputWrapper span {
|
253
|
+
position: absolute;
|
254
|
+
right: 0;
|
255
|
+
width: 14px;
|
256
|
+
padding: 0 4px 0 2px;
|
257
|
+
height: 50%;
|
258
|
+
line-height: 50%;
|
259
|
+
opacity: 0;
|
260
|
+
cursor: pointer;
|
261
|
+
border: 1px solid rgba(57,57,57,0.15);
|
262
|
+
-webkit-box-sizing: border-box;
|
263
|
+
box-sizing: border-box;
|
264
|
+
}
|
265
|
+
.numInputWrapper span:hover {
|
266
|
+
background: rgba(0,0,0,0.1);
|
267
|
+
}
|
268
|
+
.numInputWrapper span:active {
|
269
|
+
background: rgba(0,0,0,0.2);
|
270
|
+
}
|
271
|
+
.numInputWrapper span:after {
|
272
|
+
display: block;
|
273
|
+
content: "";
|
274
|
+
position: absolute;
|
275
|
+
}
|
276
|
+
.numInputWrapper span.arrowUp {
|
277
|
+
top: 0;
|
278
|
+
border-bottom: 0;
|
279
|
+
}
|
280
|
+
.numInputWrapper span.arrowUp:after {
|
281
|
+
border-left: 4px solid transparent;
|
282
|
+
border-right: 4px solid transparent;
|
283
|
+
border-bottom: 4px solid rgba(57,57,57,0.6);
|
284
|
+
top: 26%;
|
285
|
+
}
|
286
|
+
.numInputWrapper span.arrowDown {
|
287
|
+
top: 50%;
|
288
|
+
}
|
289
|
+
.numInputWrapper span.arrowDown:after {
|
290
|
+
border-left: 4px solid transparent;
|
291
|
+
border-right: 4px solid transparent;
|
292
|
+
border-top: 4px solid rgba(57,57,57,0.6);
|
293
|
+
top: 40%;
|
294
|
+
}
|
295
|
+
.numInputWrapper span svg {
|
296
|
+
width: inherit;
|
297
|
+
height: auto;
|
298
|
+
}
|
299
|
+
.numInputWrapper span svg path {
|
300
|
+
fill: rgba(0,0,0,0.5);
|
301
|
+
}
|
302
|
+
.numInputWrapper:hover {
|
303
|
+
background: rgba(0,0,0,0.05);
|
304
|
+
}
|
305
|
+
.numInputWrapper:hover span {
|
306
|
+
opacity: 1;
|
307
|
+
}
|
308
|
+
.flatpickr-current-month {
|
309
|
+
font-size: 135%;
|
310
|
+
line-height: inherit;
|
311
|
+
font-weight: 300;
|
312
|
+
color: inherit;
|
313
|
+
position: absolute;
|
314
|
+
width: 75%;
|
315
|
+
left: 12.5%;
|
316
|
+
padding: 7.48px 0 0 0;
|
317
|
+
line-height: 1;
|
318
|
+
height: 34px;
|
319
|
+
display: inline-block;
|
320
|
+
text-align: center;
|
321
|
+
-webkit-transform: translate3d(0px, 0px, 0px);
|
322
|
+
transform: translate3d(0px, 0px, 0px);
|
323
|
+
}
|
324
|
+
.flatpickr-current-month span.cur-month {
|
325
|
+
font-family: inherit;
|
326
|
+
font-weight: 700;
|
327
|
+
color: inherit;
|
328
|
+
display: inline-block;
|
329
|
+
margin-left: 0.5ch;
|
330
|
+
padding: 0;
|
331
|
+
}
|
332
|
+
.flatpickr-current-month span.cur-month:hover {
|
333
|
+
background: rgba(0,0,0,0.05);
|
334
|
+
}
|
335
|
+
.flatpickr-current-month .numInputWrapper {
|
336
|
+
width: 6ch;
|
337
|
+
width: 7ch\0;
|
338
|
+
display: inline-block;
|
339
|
+
}
|
340
|
+
.flatpickr-current-month .numInputWrapper span.arrowUp:after {
|
341
|
+
border-bottom-color: rgba(0,0,0,0.9);
|
342
|
+
}
|
343
|
+
.flatpickr-current-month .numInputWrapper span.arrowDown:after {
|
344
|
+
border-top-color: rgba(0,0,0,0.9);
|
345
|
+
}
|
346
|
+
.flatpickr-current-month input.cur-year {
|
347
|
+
background: transparent;
|
348
|
+
-webkit-box-sizing: border-box;
|
349
|
+
box-sizing: border-box;
|
350
|
+
color: inherit;
|
351
|
+
cursor: text;
|
352
|
+
padding: 0 0 0 0.5ch;
|
353
|
+
margin: 0;
|
354
|
+
display: inline-block;
|
355
|
+
font-size: inherit;
|
356
|
+
font-family: inherit;
|
357
|
+
font-weight: 300;
|
358
|
+
line-height: inherit;
|
359
|
+
height: auto;
|
360
|
+
border: 0;
|
361
|
+
border-radius: 0;
|
362
|
+
vertical-align: initial;
|
363
|
+
-webkit-appearance: textfield;
|
364
|
+
-moz-appearance: textfield;
|
365
|
+
appearance: textfield;
|
366
|
+
}
|
367
|
+
.flatpickr-current-month input.cur-year:focus {
|
368
|
+
outline: 0;
|
369
|
+
}
|
370
|
+
.flatpickr-current-month input.cur-year[disabled],
|
371
|
+
.flatpickr-current-month input.cur-year[disabled]:hover {
|
372
|
+
font-size: 100%;
|
373
|
+
color: rgba(0,0,0,0.5);
|
374
|
+
background: transparent;
|
375
|
+
pointer-events: none;
|
376
|
+
}
|
377
|
+
.flatpickr-current-month .flatpickr-monthDropdown-months {
|
378
|
+
appearance: menulist;
|
379
|
+
background: transparent;
|
380
|
+
border: none;
|
381
|
+
border-radius: 0;
|
382
|
+
box-sizing: border-box;
|
383
|
+
color: inherit;
|
384
|
+
cursor: pointer;
|
385
|
+
font-size: inherit;
|
386
|
+
font-family: inherit;
|
387
|
+
font-weight: 300;
|
388
|
+
height: auto;
|
389
|
+
line-height: inherit;
|
390
|
+
margin: -1px 0 0 0;
|
391
|
+
outline: none;
|
392
|
+
padding: 0 0 0 0.5ch;
|
393
|
+
position: relative;
|
394
|
+
vertical-align: initial;
|
395
|
+
-webkit-box-sizing: border-box;
|
396
|
+
-webkit-appearance: menulist;
|
397
|
+
-moz-appearance: menulist;
|
398
|
+
width: auto;
|
399
|
+
}
|
400
|
+
.flatpickr-current-month .flatpickr-monthDropdown-months:focus,
|
401
|
+
.flatpickr-current-month .flatpickr-monthDropdown-months:active {
|
402
|
+
outline: none;
|
403
|
+
}
|
404
|
+
.flatpickr-current-month .flatpickr-monthDropdown-months:hover {
|
405
|
+
background: rgba(0,0,0,0.05);
|
406
|
+
}
|
407
|
+
.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month {
|
408
|
+
background-color: transparent;
|
409
|
+
outline: none;
|
410
|
+
padding: 0;
|
411
|
+
}
|
412
|
+
.flatpickr-weekdays {
|
413
|
+
background: transparent;
|
414
|
+
text-align: center;
|
415
|
+
overflow: hidden;
|
416
|
+
width: 100%;
|
417
|
+
display: -webkit-box;
|
418
|
+
display: -webkit-flex;
|
419
|
+
display: -ms-flexbox;
|
420
|
+
display: flex;
|
421
|
+
-webkit-box-align: center;
|
422
|
+
-webkit-align-items: center;
|
423
|
+
-ms-flex-align: center;
|
424
|
+
align-items: center;
|
425
|
+
height: 28px;
|
426
|
+
}
|
427
|
+
.flatpickr-weekdays .flatpickr-weekdaycontainer {
|
428
|
+
display: -webkit-box;
|
429
|
+
display: -webkit-flex;
|
430
|
+
display: -ms-flexbox;
|
431
|
+
display: flex;
|
432
|
+
-webkit-box-flex: 1;
|
433
|
+
-webkit-flex: 1;
|
434
|
+
-ms-flex: 1;
|
435
|
+
flex: 1;
|
436
|
+
}
|
437
|
+
span.flatpickr-weekday {
|
438
|
+
cursor: default;
|
439
|
+
font-size: 90%;
|
440
|
+
background: transparent;
|
441
|
+
color: rgba(0,0,0,0.54);
|
442
|
+
line-height: 1;
|
443
|
+
margin: 0;
|
444
|
+
text-align: center;
|
445
|
+
display: block;
|
446
|
+
-webkit-box-flex: 1;
|
447
|
+
-webkit-flex: 1;
|
448
|
+
-ms-flex: 1;
|
449
|
+
flex: 1;
|
450
|
+
font-weight: bolder;
|
451
|
+
}
|
452
|
+
.dayContainer,
|
453
|
+
.flatpickr-weeks {
|
454
|
+
padding: 1px 0 0 0;
|
455
|
+
}
|
456
|
+
.flatpickr-days {
|
457
|
+
position: relative;
|
458
|
+
overflow: hidden;
|
459
|
+
display: -webkit-box;
|
460
|
+
display: -webkit-flex;
|
461
|
+
display: -ms-flexbox;
|
462
|
+
display: flex;
|
463
|
+
-webkit-box-align: start;
|
464
|
+
-webkit-align-items: flex-start;
|
465
|
+
-ms-flex-align: start;
|
466
|
+
align-items: flex-start;
|
467
|
+
width: 307.875px;
|
468
|
+
}
|
469
|
+
.flatpickr-days:focus {
|
470
|
+
outline: 0;
|
471
|
+
}
|
472
|
+
.dayContainer {
|
473
|
+
padding: 0;
|
474
|
+
outline: 0;
|
475
|
+
text-align: left;
|
476
|
+
width: 307.875px;
|
477
|
+
min-width: 307.875px;
|
478
|
+
max-width: 307.875px;
|
479
|
+
-webkit-box-sizing: border-box;
|
480
|
+
box-sizing: border-box;
|
481
|
+
display: inline-block;
|
482
|
+
display: -ms-flexbox;
|
483
|
+
display: -webkit-box;
|
484
|
+
display: -webkit-flex;
|
485
|
+
display: flex;
|
486
|
+
-webkit-flex-wrap: wrap;
|
487
|
+
flex-wrap: wrap;
|
488
|
+
-ms-flex-wrap: wrap;
|
489
|
+
-ms-flex-pack: justify;
|
490
|
+
-webkit-justify-content: space-around;
|
491
|
+
justify-content: space-around;
|
492
|
+
-webkit-transform: translate3d(0px, 0px, 0px);
|
493
|
+
transform: translate3d(0px, 0px, 0px);
|
494
|
+
opacity: 1;
|
495
|
+
}
|
496
|
+
.dayContainer + .dayContainer {
|
497
|
+
-webkit-box-shadow: -1px 0 0 #e6e6e6;
|
498
|
+
box-shadow: -1px 0 0 #e6e6e6;
|
499
|
+
}
|
500
|
+
.flatpickr-day {
|
501
|
+
background: none;
|
502
|
+
border: 1px solid transparent;
|
503
|
+
border-radius: 150px;
|
504
|
+
-webkit-box-sizing: border-box;
|
505
|
+
box-sizing: border-box;
|
506
|
+
color: #393939;
|
507
|
+
cursor: pointer;
|
508
|
+
font-weight: 400;
|
509
|
+
width: 14.2857143%;
|
510
|
+
-webkit-flex-basis: 14.2857143%;
|
511
|
+
-ms-flex-preferred-size: 14.2857143%;
|
512
|
+
flex-basis: 14.2857143%;
|
513
|
+
max-width: 39px;
|
514
|
+
height: 39px;
|
515
|
+
line-height: 39px;
|
516
|
+
margin: 0;
|
517
|
+
display: inline-block;
|
518
|
+
position: relative;
|
519
|
+
-webkit-box-pack: center;
|
520
|
+
-webkit-justify-content: center;
|
521
|
+
-ms-flex-pack: center;
|
522
|
+
justify-content: center;
|
523
|
+
text-align: center;
|
524
|
+
}
|
525
|
+
.flatpickr-day.inRange,
|
526
|
+
.flatpickr-day.prevMonthDay.inRange,
|
527
|
+
.flatpickr-day.nextMonthDay.inRange,
|
528
|
+
.flatpickr-day.today.inRange,
|
529
|
+
.flatpickr-day.prevMonthDay.today.inRange,
|
530
|
+
.flatpickr-day.nextMonthDay.today.inRange,
|
531
|
+
.flatpickr-day:hover,
|
532
|
+
.flatpickr-day.prevMonthDay:hover,
|
533
|
+
.flatpickr-day.nextMonthDay:hover,
|
534
|
+
.flatpickr-day:focus,
|
535
|
+
.flatpickr-day.prevMonthDay:focus,
|
536
|
+
.flatpickr-day.nextMonthDay:focus {
|
537
|
+
cursor: pointer;
|
538
|
+
outline: 0;
|
539
|
+
background: #e6e6e6;
|
540
|
+
border-color: #e6e6e6;
|
541
|
+
}
|
542
|
+
.flatpickr-day.today {
|
543
|
+
border-color: #959ea9;
|
544
|
+
}
|
545
|
+
.flatpickr-day.today:hover,
|
546
|
+
.flatpickr-day.today:focus {
|
547
|
+
border-color: #959ea9;
|
548
|
+
background: #959ea9;
|
549
|
+
color: #fff;
|
550
|
+
}
|
551
|
+
.flatpickr-day.selected,
|
552
|
+
.flatpickr-day.startRange,
|
553
|
+
.flatpickr-day.endRange,
|
554
|
+
.flatpickr-day.selected.inRange,
|
555
|
+
.flatpickr-day.startRange.inRange,
|
556
|
+
.flatpickr-day.endRange.inRange,
|
557
|
+
.flatpickr-day.selected:focus,
|
558
|
+
.flatpickr-day.startRange:focus,
|
559
|
+
.flatpickr-day.endRange:focus,
|
560
|
+
.flatpickr-day.selected:hover,
|
561
|
+
.flatpickr-day.startRange:hover,
|
562
|
+
.flatpickr-day.endRange:hover,
|
563
|
+
.flatpickr-day.selected.prevMonthDay,
|
564
|
+
.flatpickr-day.startRange.prevMonthDay,
|
565
|
+
.flatpickr-day.endRange.prevMonthDay,
|
566
|
+
.flatpickr-day.selected.nextMonthDay,
|
567
|
+
.flatpickr-day.startRange.nextMonthDay,
|
568
|
+
.flatpickr-day.endRange.nextMonthDay {
|
569
|
+
background: #569ff7;
|
570
|
+
-webkit-box-shadow: none;
|
571
|
+
box-shadow: none;
|
572
|
+
color: #fff;
|
573
|
+
border-color: #569ff7;
|
574
|
+
}
|
575
|
+
.flatpickr-day.selected.startRange,
|
576
|
+
.flatpickr-day.startRange.startRange,
|
577
|
+
.flatpickr-day.endRange.startRange {
|
578
|
+
border-radius: 50px 0 0 50px;
|
579
|
+
}
|
580
|
+
.flatpickr-day.selected.endRange,
|
581
|
+
.flatpickr-day.startRange.endRange,
|
582
|
+
.flatpickr-day.endRange.endRange {
|
583
|
+
border-radius: 0 50px 50px 0;
|
584
|
+
}
|
585
|
+
.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),
|
586
|
+
.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),
|
587
|
+
.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {
|
588
|
+
-webkit-box-shadow: -10px 0 0 #569ff7;
|
589
|
+
box-shadow: -10px 0 0 #569ff7;
|
590
|
+
}
|
591
|
+
.flatpickr-day.selected.startRange.endRange,
|
592
|
+
.flatpickr-day.startRange.startRange.endRange,
|
593
|
+
.flatpickr-day.endRange.startRange.endRange {
|
594
|
+
border-radius: 50px;
|
595
|
+
}
|
596
|
+
.flatpickr-day.inRange {
|
597
|
+
border-radius: 0;
|
598
|
+
-webkit-box-shadow: -5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
|
599
|
+
box-shadow: -5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
|
600
|
+
}
|
601
|
+
.flatpickr-day.flatpickr-disabled,
|
602
|
+
.flatpickr-day.flatpickr-disabled:hover,
|
603
|
+
.flatpickr-day.prevMonthDay,
|
604
|
+
.flatpickr-day.nextMonthDay,
|
605
|
+
.flatpickr-day.notAllowed,
|
606
|
+
.flatpickr-day.notAllowed.prevMonthDay,
|
607
|
+
.flatpickr-day.notAllowed.nextMonthDay {
|
608
|
+
color: rgba(57,57,57,0.3);
|
609
|
+
background: transparent;
|
610
|
+
border-color: transparent;
|
611
|
+
cursor: default;
|
612
|
+
}
|
613
|
+
.flatpickr-day.flatpickr-disabled,
|
614
|
+
.flatpickr-day.flatpickr-disabled:hover {
|
615
|
+
cursor: not-allowed;
|
616
|
+
color: rgba(57,57,57,0.1);
|
617
|
+
}
|
618
|
+
.flatpickr-day.week.selected {
|
619
|
+
border-radius: 0;
|
620
|
+
-webkit-box-shadow: -5px 0 0 #569ff7, 5px 0 0 #569ff7;
|
621
|
+
box-shadow: -5px 0 0 #569ff7, 5px 0 0 #569ff7;
|
622
|
+
}
|
623
|
+
.flatpickr-day.hidden {
|
624
|
+
visibility: hidden;
|
625
|
+
}
|
626
|
+
.rangeMode .flatpickr-day {
|
627
|
+
margin-top: 1px;
|
628
|
+
}
|
629
|
+
.flatpickr-weekwrapper {
|
630
|
+
float: left;
|
631
|
+
}
|
632
|
+
.flatpickr-weekwrapper .flatpickr-weeks {
|
633
|
+
padding: 0 12px;
|
634
|
+
-webkit-box-shadow: 1px 0 0 #e6e6e6;
|
635
|
+
box-shadow: 1px 0 0 #e6e6e6;
|
636
|
+
}
|
637
|
+
.flatpickr-weekwrapper .flatpickr-weekday {
|
638
|
+
float: none;
|
639
|
+
width: 100%;
|
640
|
+
line-height: 28px;
|
641
|
+
}
|
642
|
+
.flatpickr-weekwrapper span.flatpickr-day,
|
643
|
+
.flatpickr-weekwrapper span.flatpickr-day:hover {
|
644
|
+
display: block;
|
645
|
+
width: 100%;
|
646
|
+
max-width: none;
|
647
|
+
color: rgba(57,57,57,0.3);
|
648
|
+
background: transparent;
|
649
|
+
cursor: default;
|
650
|
+
border: none;
|
651
|
+
}
|
652
|
+
.flatpickr-innerContainer {
|
653
|
+
display: block;
|
654
|
+
display: -webkit-box;
|
655
|
+
display: -webkit-flex;
|
656
|
+
display: -ms-flexbox;
|
657
|
+
display: flex;
|
658
|
+
-webkit-box-sizing: border-box;
|
659
|
+
box-sizing: border-box;
|
660
|
+
overflow: hidden;
|
661
|
+
}
|
662
|
+
.flatpickr-rContainer {
|
663
|
+
display: inline-block;
|
664
|
+
padding: 0;
|
665
|
+
-webkit-box-sizing: border-box;
|
666
|
+
box-sizing: border-box;
|
667
|
+
}
|
668
|
+
.flatpickr-time {
|
669
|
+
text-align: center;
|
670
|
+
outline: 0;
|
671
|
+
display: block;
|
672
|
+
height: 0;
|
673
|
+
line-height: 40px;
|
674
|
+
max-height: 40px;
|
675
|
+
-webkit-box-sizing: border-box;
|
676
|
+
box-sizing: border-box;
|
677
|
+
overflow: hidden;
|
678
|
+
display: -webkit-box;
|
679
|
+
display: -webkit-flex;
|
680
|
+
display: -ms-flexbox;
|
681
|
+
display: flex;
|
682
|
+
}
|
683
|
+
.flatpickr-time:after {
|
684
|
+
content: "";
|
685
|
+
display: table;
|
686
|
+
clear: both;
|
687
|
+
}
|
688
|
+
.flatpickr-time .numInputWrapper {
|
689
|
+
-webkit-box-flex: 1;
|
690
|
+
-webkit-flex: 1;
|
691
|
+
-ms-flex: 1;
|
692
|
+
flex: 1;
|
693
|
+
width: 40%;
|
694
|
+
height: 40px;
|
695
|
+
float: left;
|
696
|
+
}
|
697
|
+
.flatpickr-time .numInputWrapper span.arrowUp:after {
|
698
|
+
border-bottom-color: #393939;
|
699
|
+
}
|
700
|
+
.flatpickr-time .numInputWrapper span.arrowDown:after {
|
701
|
+
border-top-color: #393939;
|
702
|
+
}
|
703
|
+
.flatpickr-time.hasSeconds .numInputWrapper {
|
704
|
+
width: 26%;
|
705
|
+
}
|
706
|
+
.flatpickr-time.time24hr .numInputWrapper {
|
707
|
+
width: 49%;
|
708
|
+
}
|
709
|
+
.flatpickr-time input {
|
710
|
+
background: transparent;
|
711
|
+
-webkit-box-shadow: none;
|
712
|
+
box-shadow: none;
|
713
|
+
border: 0;
|
714
|
+
border-radius: 0;
|
715
|
+
text-align: center;
|
716
|
+
margin: 0;
|
717
|
+
padding: 0;
|
718
|
+
height: inherit;
|
719
|
+
line-height: inherit;
|
720
|
+
color: #393939;
|
721
|
+
font-size: 14px;
|
722
|
+
position: relative;
|
723
|
+
-webkit-box-sizing: border-box;
|
724
|
+
box-sizing: border-box;
|
725
|
+
-webkit-appearance: textfield;
|
726
|
+
-moz-appearance: textfield;
|
727
|
+
appearance: textfield;
|
728
|
+
}
|
729
|
+
.flatpickr-time input.flatpickr-hour {
|
730
|
+
font-weight: bold;
|
731
|
+
}
|
732
|
+
.flatpickr-time input.flatpickr-minute,
|
733
|
+
.flatpickr-time input.flatpickr-second {
|
734
|
+
font-weight: 400;
|
735
|
+
}
|
736
|
+
.flatpickr-time input:focus {
|
737
|
+
outline: 0;
|
738
|
+
border: 0;
|
739
|
+
}
|
740
|
+
.flatpickr-time .flatpickr-time-separator,
|
741
|
+
.flatpickr-time .flatpickr-am-pm {
|
742
|
+
height: inherit;
|
743
|
+
float: left;
|
744
|
+
line-height: inherit;
|
745
|
+
color: #393939;
|
746
|
+
font-weight: bold;
|
747
|
+
width: 2%;
|
748
|
+
-webkit-user-select: none;
|
749
|
+
-moz-user-select: none;
|
750
|
+
-ms-user-select: none;
|
751
|
+
user-select: none;
|
752
|
+
-webkit-align-self: center;
|
753
|
+
-ms-flex-item-align: center;
|
754
|
+
align-self: center;
|
755
|
+
}
|
756
|
+
.flatpickr-time .flatpickr-am-pm {
|
757
|
+
outline: 0;
|
758
|
+
width: 18%;
|
759
|
+
cursor: pointer;
|
760
|
+
text-align: center;
|
761
|
+
font-weight: 400;
|
762
|
+
}
|
763
|
+
.flatpickr-time input:hover,
|
764
|
+
.flatpickr-time .flatpickr-am-pm:hover,
|
765
|
+
.flatpickr-time input:focus,
|
766
|
+
.flatpickr-time .flatpickr-am-pm:focus {
|
767
|
+
background: #eee;
|
768
|
+
}
|
769
|
+
.flatpickr-input[readonly] {
|
770
|
+
cursor: pointer;
|
771
|
+
}
|
772
|
+
@-webkit-keyframes fpFadeInDown {
|
773
|
+
from {
|
774
|
+
opacity: 0;
|
775
|
+
-webkit-transform: translate3d(0, -20px, 0);
|
776
|
+
transform: translate3d(0, -20px, 0);
|
777
|
+
}
|
778
|
+
to {
|
779
|
+
opacity: 1;
|
780
|
+
-webkit-transform: translate3d(0, 0, 0);
|
781
|
+
transform: translate3d(0, 0, 0);
|
782
|
+
}
|
783
|
+
}
|
784
|
+
@keyframes fpFadeInDown {
|
785
|
+
from {
|
786
|
+
opacity: 0;
|
787
|
+
-webkit-transform: translate3d(0, -20px, 0);
|
788
|
+
transform: translate3d(0, -20px, 0);
|
789
|
+
}
|
790
|
+
to {
|
791
|
+
opacity: 1;
|
792
|
+
-webkit-transform: translate3d(0, 0, 0);
|
793
|
+
transform: translate3d(0, 0, 0);
|
794
|
+
}
|
795
|
+
}
|
@@ -0,0 +1,175 @@
|
|
1
|
+
.input--datepicker {
|
2
|
+
cursor: pointer;
|
3
|
+
}
|
4
|
+
|
5
|
+
.flatpickr-calendar {
|
6
|
+
background: var(--color-bg);
|
7
|
+
border: 1px solid var(--color-border);
|
8
|
+
border-radius: var(--rounded-md);
|
9
|
+
box-shadow: var(--shadow-md);
|
10
|
+
font-size: var(--text-sm);
|
11
|
+
inline-size: 280px;
|
12
|
+
padding: var(--size-3);
|
13
|
+
|
14
|
+
:is(.dayContainer, .flatpickr-days) {
|
15
|
+
inline-size: 100%;
|
16
|
+
min-inline-size: 100%;
|
17
|
+
max-inline-size: 100%;
|
18
|
+
}
|
19
|
+
|
20
|
+
.flatpickr-months {
|
21
|
+
> * {
|
22
|
+
position: static;
|
23
|
+
}
|
24
|
+
|
25
|
+
.flatpickr-month {
|
26
|
+
color: var(--color-text);
|
27
|
+
}
|
28
|
+
|
29
|
+
svg {
|
30
|
+
fill: var(--color-border-dark);
|
31
|
+
}
|
32
|
+
|
33
|
+
.flatpickr-prev-month:hover svg {
|
34
|
+
fill: var(--color-text);
|
35
|
+
}
|
36
|
+
|
37
|
+
.flatpickr-next-month:hover svg {
|
38
|
+
fill: var(--color-text);
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
.flatpickr-monthDropdown-months {
|
43
|
+
appearance: none;
|
44
|
+
border-radius: var(--rounded-md);
|
45
|
+
font-size: var(--text-sm);
|
46
|
+
font-weight: var(--font-medium);
|
47
|
+
line-height: var(--leading-normal);
|
48
|
+
padding: 0;
|
49
|
+
text-align: center;
|
50
|
+
|
51
|
+
&:hover {
|
52
|
+
background: var(--color-border-light);
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
.numInputWrapper {
|
57
|
+
input {
|
58
|
+
border-radius: var(--rounded-md);
|
59
|
+
color: var(--color-text);
|
60
|
+
font-size: var(--text-sm);
|
61
|
+
font-weight: var(--font-medium);
|
62
|
+
line-height: var(--leading-normal);
|
63
|
+
padding: 0;
|
64
|
+
text-align: center;
|
65
|
+
}
|
66
|
+
|
67
|
+
span {
|
68
|
+
border-color: var(--color-border);
|
69
|
+
}
|
70
|
+
|
71
|
+
span:hover {
|
72
|
+
background: transparent;
|
73
|
+
}
|
74
|
+
|
75
|
+
span.arrowUp::after {
|
76
|
+
border-bottom-color: var(--color-text);
|
77
|
+
}
|
78
|
+
|
79
|
+
span.arrowDown::after {
|
80
|
+
border-top-color: var(--color-text);
|
81
|
+
}
|
82
|
+
|
83
|
+
&:hover {
|
84
|
+
background: transparent;
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
.flatpickr-weekday {
|
89
|
+
color: var(--color-text-subtle);
|
90
|
+
font-weight: var(--font-normal);
|
91
|
+
}
|
92
|
+
|
93
|
+
.flatpickr-time {
|
94
|
+
.hasTime & {
|
95
|
+
border-top-color: var(--color-border);
|
96
|
+
}
|
97
|
+
|
98
|
+
.hasTime.noCalendar & {
|
99
|
+
border: 0;
|
100
|
+
}
|
101
|
+
|
102
|
+
.numInput {
|
103
|
+
background: transparent;
|
104
|
+
color: var(--color-text);
|
105
|
+
}
|
106
|
+
|
107
|
+
.flatpickr-time-separator {
|
108
|
+
color: var(--color-text);
|
109
|
+
}
|
110
|
+
|
111
|
+
.flatpickr-am-pm {
|
112
|
+
background: transparent;
|
113
|
+
color: var(--color-text);
|
114
|
+
}
|
115
|
+
}
|
116
|
+
|
117
|
+
.flatpickr-day {
|
118
|
+
align-items: center;
|
119
|
+
border-radius: var(--rounded-md);
|
120
|
+
border-color: transparent !important;
|
121
|
+
box-shadow: none !important;
|
122
|
+
color: var(--color-text);
|
123
|
+
display: inline-flex;
|
124
|
+
height: var(--size-9);
|
125
|
+
max-width: 100%;
|
126
|
+
|
127
|
+
&:is(.inRange) {
|
128
|
+
border-radius: 0;
|
129
|
+
}
|
130
|
+
|
131
|
+
&:is(.today, .inRange, :hover, :focus) {
|
132
|
+
background: var(--color-secondary);
|
133
|
+
}
|
134
|
+
|
135
|
+
&:is(
|
136
|
+
.flatpickr-disabled,
|
137
|
+
.flatpickr-disabled:hover,
|
138
|
+
.prevMonthDay,
|
139
|
+
.nextMonthDay,
|
140
|
+
.notAllowed,
|
141
|
+
.notAllowed.prevMonthDay,
|
142
|
+
.notAllowed.nextMonthDay
|
143
|
+
) {
|
144
|
+
color: var(--color-text-subtle);
|
145
|
+
}
|
146
|
+
|
147
|
+
&:is(
|
148
|
+
.selected,
|
149
|
+
.startRange,
|
150
|
+
.endRange,
|
151
|
+
.selected.inRange,
|
152
|
+
.startRange.inRange,
|
153
|
+
.endRange.inRange,
|
154
|
+
.selected:focus,
|
155
|
+
.startRange:focus,
|
156
|
+
.endRange:focus,
|
157
|
+
.selected:hover,
|
158
|
+
.startRange:hover,
|
159
|
+
.endRange:hover,
|
160
|
+
.selected.prevMonthDay,
|
161
|
+
.startRange.prevMonthDay,
|
162
|
+
.endRange.prevMonthDay,
|
163
|
+
.selected.nextMonthDay,
|
164
|
+
.startRange.nextMonthDay,
|
165
|
+
.endRange.nextMonthDay
|
166
|
+
) {
|
167
|
+
background: var(--color-primary);
|
168
|
+
color: var(--color-text-reversed);
|
169
|
+
}
|
170
|
+
}
|
171
|
+
|
172
|
+
&::before, &::after {
|
173
|
+
display: none;
|
174
|
+
}
|
175
|
+
}
|
data/lib/generators/css_zero/add/templates/app/javascript/controllers/datepicker_controller.js
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
import { Controller } from "@hotwired/stimulus"
|
2
|
+
import flatpickr from "flatpickr"
|
3
|
+
|
4
|
+
export default class extends Controller {
|
5
|
+
static targets = [ "details" ]
|
6
|
+
static values = {
|
7
|
+
type: String,
|
8
|
+
disable: Array,
|
9
|
+
mode: { type: String, default: "single" },
|
10
|
+
dateFormat: { type: String, default: "F d, Y" },
|
11
|
+
dateTimeFormat: { type: String, default: "F d, Y H:i" }
|
12
|
+
}
|
13
|
+
|
14
|
+
connect() {
|
15
|
+
if (this.typeValue == "time") {
|
16
|
+
this.flatpickr = flatpickr(this.element, this.#timeOptions)
|
17
|
+
} else if (this.typeValue == "datetime") {
|
18
|
+
this.flatpickr = flatpickr(this.element, this.#dateTimeOptions)
|
19
|
+
} else {
|
20
|
+
this.flatpickr = flatpickr(this.element, this.#basicOptions)
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
disconnect() {
|
25
|
+
this.flatpickr.destroy()
|
26
|
+
}
|
27
|
+
|
28
|
+
get #timeOptions() {
|
29
|
+
return { dateFormat: "H:i", enableTime: true, noCalendar: true }
|
30
|
+
}
|
31
|
+
|
32
|
+
get #dateTimeOptions() {
|
33
|
+
return {
|
34
|
+
altInput: true,
|
35
|
+
altFormat: this.dateTimeFormatValue,
|
36
|
+
dateFormat: "Y-m-d H:i",
|
37
|
+
disable: this.disableValue,
|
38
|
+
mode: this.modeValue,
|
39
|
+
enableTime: true
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
get #basicOptions() {
|
44
|
+
return {
|
45
|
+
altInput: true,
|
46
|
+
altFormat: this.dateFormatValue,
|
47
|
+
dateFormat: "Y-m-d",
|
48
|
+
disable: this.disableValue,
|
49
|
+
mode: this.modeValue
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
@@ -20,7 +20,6 @@
|
|
20
20
|
/* SVG color values */
|
21
21
|
--color-filter-text: invert(0);
|
22
22
|
--color-filter-text-reversed: invert(1);
|
23
|
-
--color-filter-text-subtle: invert(46%) sepia(8%) saturate(371%) hue-rotate(202deg) brightness(93%) contrast(85%);
|
24
23
|
--color-filter-negative: invert(22%) sepia(85%) saturate(1790%) hue-rotate(339deg) brightness(105%) contrast(108%);
|
25
24
|
--color-filter-positive: invert(44%) sepia(89%) saturate(409%) hue-rotate(89deg) brightness(94%) contrast(97%);
|
26
25
|
|
@@ -46,7 +45,6 @@
|
|
46
45
|
/* SVG color values */
|
47
46
|
--color-filter-text: invert(1);
|
48
47
|
--color-filter-text-reversed: invert(0);
|
49
|
-
--color-filter-text-subtle: invert(76%) sepia(8%) saturate(230%) hue-rotate(201deg) brightness(84%) contrast(87%);
|
50
48
|
--color-filter-negative: invert(54%) sepia(16%) saturate(2119%) hue-rotate(313deg) brightness(111%) contrast(94%);
|
51
49
|
--color-filter-positive: invert(81%) sepia(23%) saturate(1237%) hue-rotate(80deg) brightness(95%) contrast(83%);
|
52
50
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: css-zero
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.54
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lázaro Nixon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: lazaronixon@hotmail.com
|
@@ -67,6 +67,7 @@ files:
|
|
67
67
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/command.css
|
68
68
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/dialog.css
|
69
69
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/flash.css
|
70
|
+
- lib/generators/css_zero/add/templates/app/assets/stylesheets/flatpickr.css
|
70
71
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/input.css
|
71
72
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/layouts.css
|
72
73
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/lightbox.css
|
@@ -82,6 +83,7 @@ files:
|
|
82
83
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/toggle.css
|
83
84
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/tom-select.css
|
84
85
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/zcombobox.css
|
86
|
+
- lib/generators/css_zero/add/templates/app/assets/stylesheets/zdatepicker.css
|
85
87
|
- lib/generators/css_zero/add/templates/app/assets/stylesheets/ztrix.css
|
86
88
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/autosave_controller.js
|
87
89
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
|
@@ -91,6 +93,7 @@ files:
|
|
91
93
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/collapsible_controller.js
|
92
94
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/combobox_controller.js
|
93
95
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/copyable_input_controller.js
|
96
|
+
- lib/generators/css_zero/add/templates/app/javascript/controllers/datepicker_controller.js
|
94
97
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/dialog_controller.js
|
95
98
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/element_removal_controller.js
|
96
99
|
- lib/generators/css_zero/add/templates/app/javascript/controllers/filter_controller.js
|