@avakhula/ui 0.0.338 → 0.0.340

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.
@@ -56,7 +56,7 @@ $calendar-hover-icon: $blue-700;
56
56
  $calendar-disabled-icon: $neutral-500;
57
57
  $calendar-focus-icon: $blue-900;
58
58
 
59
- .flatpickr-wrapper {
59
+ .ib-flatpickr-wrapper {
60
60
  width: 100%;
61
61
 
62
62
  .label {
@@ -135,345 +135,343 @@ $calendar-focus-icon: $blue-900;
135
135
  justify-content: space-between;
136
136
  }
137
137
  }
138
- }
139
-
140
-
141
138
 
142
- .date-picker-input {
143
- width: 100%;
144
- @include Ib-H4-regular;
145
- padding: 0 30px 0 15px;
146
- height: 36px;
147
- border-radius: 4px 4px 0 0;
148
- background-color: $input-bg;
149
- color: $input-color;
150
- cursor: pointer;
151
- border: none;
152
- outline: none;
153
- border-bottom: 1px solid $input-border-color;
154
- transition: color 0.3s, border-bottom-color 0.3s, border-radius 0.3s, background-color 0.3s;
155
-
156
- &::placeholder {
139
+ .date-picker-input {
140
+ width: 100%;
157
141
  @include Ib-H4-regular;
158
- color: $input-placeholder-color;
159
- }
160
-
161
- &:disabled {
162
- color: $input-disabled-color;
163
- background-color: $input-disabled-bg;
164
- border-bottom-color: $neutral-900;
142
+ padding: 0 30px 0 15px;
143
+ height: 36px;
144
+ border-radius: 4px 4px 0 0;
145
+ background-color: $input-bg;
146
+ color: $input-color;
147
+ cursor: pointer;
148
+ border: none;
149
+ outline: none;
150
+ border-bottom: 1px solid $input-border-color;
151
+ transition: color 0.3s, border-bottom-color 0.3s, border-radius 0.3s, background-color 0.3s;
165
152
 
166
153
  &::placeholder {
167
- color: $input-disabled-placeholder-color;
154
+ @include Ib-H4-regular;
155
+ color: $input-placeholder-color;
168
156
  }
169
157
 
170
- & + .calendar-icon {
171
- color: $calendar-disabled-icon;
172
- }
173
- }
158
+ &:disabled {
159
+ color: $input-disabled-color;
160
+ background-color: $input-disabled-bg;
161
+ border-bottom-color: $neutral-900;
174
162
 
175
- &:focus {
176
- border-radius: 4px;
177
- border-bottom: 0;
178
- @include focus(0px);
163
+ &::placeholder {
164
+ color: $input-disabled-placeholder-color;
165
+ }
179
166
 
180
- & + .calendar-icon {
181
- color: $calendar-focus-icon;
167
+ & + .calendar-icon {
168
+ color: $calendar-disabled-icon;
169
+ }
182
170
  }
183
- }
184
- }
185
- .input-wrapper:hover {
186
- .date-picker-input {
187
- color: $input-hover-color;
188
- background-color: $input-hover-bg;
189
- border-bottom-color: $input-hover-border-color;
190
171
 
191
- &::placeholder {
192
- color: $input-hover-placeholder-color;
193
- }
172
+ &:focus {
173
+ border-radius: 4px;
174
+ border-bottom: 0;
175
+ @include focus(0px);
194
176
 
195
- & + .calendar-icon {
196
- color: $calendar-hover-icon;
177
+ & + .calendar-icon {
178
+ color: $calendar-focus-icon;
179
+ }
197
180
  }
198
181
  }
199
- }
200
-
201
- .flatpickr-wrapper {
202
- position: relative;
203
- }
204
-
205
- .flatpickr-calendar {
206
- padding: 15px;
207
- box-shadow: $datepicker-shadow;
208
- width: 312px;
209
- min-width: 312px;
210
- max-width: 312px;
211
- background-color: $datepicker-bg;
212
-
213
- &::after,
214
- &::before {
215
- display: none;
216
- }
182
+ .input-wrapper:hover {
183
+ .date-picker-input {
184
+ color: $input-hover-color;
185
+ background-color: $input-hover-bg;
186
+ border-bottom-color: $input-hover-border-color;
187
+
188
+ &::placeholder {
189
+ color: $input-hover-placeholder-color;
190
+ }
217
191
 
218
- .numInputWrapper {
219
- width: 60px;
220
- padding: 5px 0px 5px 10px;
192
+ & + .calendar-icon {
193
+ color: $calendar-hover-icon;
194
+ }
195
+ }
221
196
  }
222
197
 
223
- .cur-year {
224
- padding: 0 !important;
198
+ .flatpickr-wrapper {
199
+ position: relative;
225
200
  }
226
201
 
227
- .numInputWrapper,
228
- .flatpickr-monthDropdown-months {
229
- @include Ib-H4-medium;
230
- padding: 5px 10px;
231
- border-radius: 4px;
232
- border: 2px solid transparent;
202
+ .flatpickr-calendar {
203
+ padding: 15px;
204
+ box-shadow: $datepicker-shadow;
205
+ width: 312px;
206
+ min-width: 312px;
207
+ max-width: 312px;
208
+ background-color: $datepicker-bg;
233
209
 
234
- &:hover {
235
- border-color: $blue-300;
236
- background-color: $blue-100;
210
+ &::after,
211
+ &::before {
212
+ display: none;
237
213
  }
238
- }
239
214
 
240
- .numInput {
241
- @include Ib-H4-medium;
242
- font-weight: 500!important;
243
- }
244
-
245
- .flatpickr-months {
246
- display: flex;
247
- align-items: center;
248
- height: 36px;
249
- margin-bottom: 5px;
250
- }
251
-
252
- .flatpickr-prev-month,
253
- .flatpickr-next-month {
254
- position: initial;
255
- width: 24px;
256
- height: 24px;
257
- border: 2px solid transparent;
258
- transition: border 0.3s;
259
- padding: 0;
260
- display: flex;
261
- align-items: center;
262
- justify-content: center;
263
- font-size: 16px;
264
- border-radius: 4px;
265
- background: $ghost-btn-background;
266
-
267
- svg {
268
- width: 16px;
269
- height: 16px;
270
-
271
- path {
272
- stroke: $ghost-btn-color;
273
- }
215
+ .numInputWrapper {
216
+ width: 60px;
217
+ padding: 5px 0px 5px 10px;
274
218
  }
275
219
 
276
- &:focus,
277
- &:hover {
278
- background: $ghost-btn-hover-background;
279
- border-color: $ghost-btn-hover-border-color;
220
+ .cur-year {
221
+ padding: 0 !important;
222
+ }
280
223
 
281
- svg {
282
- fill: transparent;
224
+ .numInputWrapper,
225
+ .flatpickr-monthDropdown-months {
226
+ @include Ib-H4-medium;
227
+ padding: 5px 10px;
228
+ border-radius: 4px;
229
+ border: 2px solid transparent;
283
230
 
284
- path {
285
- stroke: $ghost-btn-hover-color;
286
- }
231
+ &:hover {
232
+ border-color: $blue-300;
233
+ background-color: $blue-100;
287
234
  }
288
235
  }
289
236
 
290
- &:active {
291
- color: $ghost-btn-active-color;
292
- background: $ghost-btn-active-background;
293
- svg path {
294
- stroke: $ghost-btn-active-color;
295
- }
237
+ .numInput {
238
+ @include Ib-H4-medium;
239
+ font-weight: 500!important;
296
240
  }
297
- }
298
- .flatpickr-days,
299
- .flatpickr-innerContainer {
300
- overflow: visible;
301
- }
302
241
 
303
- .flatpickr-current-month {
304
- @include Ib-H4-medium;
305
- padding: 0;
306
- display: flex;
307
- align-items: center;
308
- justify-content: space-between;
309
- }
242
+ .flatpickr-months {
243
+ display: flex;
244
+ align-items: center;
245
+ height: 36px;
246
+ margin-bottom: 5px;
247
+ }
310
248
 
311
- .flatpickr-weekday {
312
- @include Ib-H4-medium;
313
- color: $weekday-color;
314
- }
249
+ .flatpickr-prev-month,
250
+ .flatpickr-next-month {
251
+ position: initial;
252
+ width: 24px;
253
+ height: 24px;
254
+ border: 2px solid transparent;
255
+ transition: border 0.3s;
256
+ padding: 0;
257
+ display: flex;
258
+ align-items: center;
259
+ justify-content: center;
260
+ font-size: 16px;
261
+ border-radius: 4px;
262
+ background: $ghost-btn-background;
315
263
 
316
- .flatpickr-weekdaycontainer,
317
- .dayContainer {
318
- width: 287px;
319
- max-width: 287px;
320
- min-width: 287px;
321
- margin-left: -5px;
322
- }
264
+ svg {
265
+ width: 16px;
266
+ height: 16px;
323
267
 
324
- .flatpickr-day {
325
- @include Ib-H4-medium;
326
- color: $day-color;
327
- border-radius: 4px;
328
- border: 2px solid $day-border;
268
+ path {
269
+ stroke: $ghost-btn-color;
270
+ }
271
+ }
329
272
 
330
- &.prevMonthDay,
331
- &.nextMonthDay {
332
- color: $day-prev-next-color;
333
- }
273
+ &:focus,
274
+ &:hover {
275
+ background: $ghost-btn-hover-background;
276
+ border-color: $ghost-btn-hover-border-color;
334
277
 
335
- &:focus {
336
- border: transparent;
337
- background-color: transparent;
338
- }
278
+ svg {
279
+ fill: transparent;
339
280
 
340
- &:hover {
341
- color: $day-hover-color;
342
- background-color: $day-hover-bg;
343
- border-color: $day-hover-border-color;
344
- }
281
+ path {
282
+ stroke: $ghost-btn-hover-color;
283
+ }
284
+ }
285
+ }
345
286
 
346
- &:focus {
347
- @include focus(2px);
287
+ &:active {
288
+ color: $ghost-btn-active-color;
289
+ background: $ghost-btn-active-background;
290
+ svg path {
291
+ stroke: $ghost-btn-active-color;
292
+ }
293
+ }
348
294
  }
349
-
350
- &.selected {
351
- color: $day-selected-color;
352
- background-color: $day-selected-bg;
295
+ .flatpickr-days,
296
+ .flatpickr-innerContainer {
297
+ overflow: visible;
353
298
  }
354
299
 
355
- &.startRange {
356
- box-shadow: 5px 0 0 $day-selected-in-range;
357
- &.startRange:hover {
358
- box-shadow: none;
359
- }
300
+ .flatpickr-current-month {
301
+ @include Ib-H4-medium;
302
+ padding: 0;
303
+ display: flex;
304
+ align-items: center;
305
+ justify-content: space-between;
360
306
  }
361
307
 
362
- &.endRange {
363
- box-shadow: -5px 0 0 $day-selected-in-range;
308
+ .flatpickr-weekday {
309
+ @include Ib-H4-medium;
310
+ color: $weekday-color;
364
311
  }
365
312
 
366
- &.startRange,
367
- &.endRange {
368
- color: $day-start-end-range-color;
369
- background-color: $day-start-end-range-bg;
370
- border-radius: 4px;
313
+ .flatpickr-weekdaycontainer,
314
+ .dayContainer {
315
+ width: 287px;
316
+ max-width: 287px;
317
+ min-width: 287px;
318
+ margin-left: -5px;
371
319
  }
372
320
 
373
- &.startRange.endRange {
374
- color: $day-start-end-range-color;
375
- background-color: $day-start-end-range-bg;
321
+ .flatpickr-day {
322
+ @include Ib-H4-medium;
323
+ color: $day-color;
376
324
  border-radius: 4px;
377
- box-shadow: none;
378
- }
379
-
380
- &.inRange {
381
- border-radius: 4px !important;
382
- border-radius: 0;
383
- background-color: $day-selected-in-range;
384
- box-shadow: -5px 0 0 $day-selected-in-range,
385
- 5px 0 0 $day-selected-in-range;
325
+ border: 2px solid $day-border;
386
326
 
387
327
  &.prevMonthDay,
388
328
  &.nextMonthDay {
389
- color: $day-color;
390
- border: transparent;
329
+ color: $day-prev-next-color;
391
330
  }
392
331
 
393
332
  &:focus {
394
- z-index: 100;
333
+ border: transparent;
334
+ background-color: transparent;
395
335
  }
396
- }
397
-
398
- &.inRange {
399
- border-radius: 4px;
400
336
 
401
337
  &:hover {
402
- position: relative;
403
338
  color: $day-hover-color;
404
339
  background-color: $day-hover-bg;
405
- border: 2px solid $day-hover-border-color;
406
- z-index: 1000;
340
+ border-color: $day-hover-border-color;
407
341
  }
408
- }
409
-
410
- &.today.inRange,
411
- &.today {
412
- color: $white;
413
- border-color: transparent;
414
- background-color: $blue-800;
415
- transition: border 0.3s, color 0.3s, background-color 0.3s;
416
342
 
417
- &:focus,
418
- &:hover {
419
- border: transparent;
420
- background-color: $blue-700;
343
+ &:focus {
344
+ @include focus(2px);
421
345
  }
422
346
 
423
- &:active {
424
- border: transparent;
425
- background-color: $blue-900;
347
+ &.selected {
348
+ color: $day-selected-color;
349
+ background-color: $day-selected-bg;
426
350
  }
427
- }
428
351
 
429
- &:nth-child(7n) {
430
- border-radius: 0 4px 4px 0 !important;
352
+ &.startRange {
353
+ box-shadow: 5px 0 0 $day-selected-in-range;
354
+ &.startRange:hover {
355
+ box-shadow: none;
356
+ }
357
+ }
431
358
 
432
- &.inRange {
359
+ &.endRange {
433
360
  box-shadow: -5px 0 0 $day-selected-in-range;
434
361
  }
435
362
 
436
- &.selected,
437
- &:hover,
438
- &:focus {
439
- border-radius: 4px !important;
363
+ &.startRange,
364
+ &.endRange {
365
+ color: $day-start-end-range-color;
366
+ background-color: $day-start-end-range-bg;
367
+ border-radius: 4px;
368
+ }
369
+
370
+ &.startRange.endRange {
371
+ color: $day-start-end-range-color;
372
+ background-color: $day-start-end-range-bg;
373
+ border-radius: 4px;
374
+ box-shadow: none;
440
375
  }
441
- }
442
376
 
443
- &:nth-child(7n + 1) {
444
- border-radius: 4px 0 0 4px !important;
377
+ &.inRange {
378
+ border-radius: 4px !important;
379
+ border-radius: 0;
380
+ background-color: $day-selected-in-range;
381
+ box-shadow: -5px 0 0 $day-selected-in-range,
382
+ 5px 0 0 $day-selected-in-range;
383
+
384
+ &.prevMonthDay,
385
+ &.nextMonthDay {
386
+ color: $day-color;
387
+ border: transparent;
388
+ }
389
+
390
+ &:focus {
391
+ z-index: 100;
392
+ }
393
+ }
445
394
 
446
395
  &.inRange {
447
- box-shadow: 5px 0 0 $day-selected-in-range;
396
+ border-radius: 4px;
397
+
398
+ &:hover {
399
+ position: relative;
400
+ color: $day-hover-color;
401
+ background-color: $day-hover-bg;
402
+ border: 2px solid $day-hover-border-color;
403
+ z-index: 1000;
404
+ }
448
405
  }
449
406
 
450
- &.endRange {
451
- box-shadow: none !important;
407
+ &.today.inRange,
408
+ &.today {
409
+ color: $white;
410
+ border-color: transparent;
411
+ background-color: $blue-800;
412
+ transition: border 0.3s, color 0.3s, background-color 0.3s;
413
+
414
+ &:focus,
415
+ &:hover {
416
+ border: transparent;
417
+ background-color: $blue-700;
418
+ }
419
+
420
+ &:active {
421
+ border: transparent;
422
+ background-color: $blue-900;
423
+ }
452
424
  }
453
425
 
454
- &.selected,
455
- &:hover,
456
- &:focus {
457
- border-radius: 4px !important;
426
+ &:nth-child(7n) {
427
+ border-radius: 0 4px 4px 0 !important;
428
+
429
+ &.inRange {
430
+ box-shadow: -5px 0 0 $day-selected-in-range;
431
+ }
432
+
433
+ &.selected,
434
+ &:hover,
435
+ &:focus {
436
+ border-radius: 4px !important;
437
+ }
438
+ }
439
+
440
+ &:nth-child(7n + 1) {
441
+ border-radius: 4px 0 0 4px !important;
442
+
443
+ &.inRange {
444
+ box-shadow: 5px 0 0 $day-selected-in-range;
445
+ }
446
+
447
+ &.endRange {
448
+ box-shadow: none !important;
449
+ }
450
+
451
+ &.selected,
452
+ &:hover,
453
+ &:focus {
454
+ border-radius: 4px !important;
455
+ }
458
456
  }
459
457
  }
460
- }
461
458
 
462
- .flatpickr-day,
463
- .flatpickr-weekday {
464
- display: flex;
465
- height: 36px;
466
- width: 36px;
467
- max-width: 36px;
468
- min-width: 36px;
469
- align-items: center;
470
- justify-content: center;
471
- margin: 0 0 5px 5px;
459
+ .flatpickr-day,
460
+ .flatpickr-weekday {
461
+ display: flex;
462
+ height: 36px;
463
+ width: 36px;
464
+ max-width: 36px;
465
+ min-width: 36px;
466
+ align-items: center;
467
+ justify-content: center;
468
+ margin: 0 0 5px 5px;
469
+ }
472
470
  }
473
- }
474
471
 
475
- .flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n + 1)),
476
- .flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n + 1)),
477
- .flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n + 1)) {
478
- box-shadow: -5px 0 0 $day-selected-in-range;
472
+ .flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n + 1)),
473
+ .flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n + 1)),
474
+ .flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n + 1)) {
475
+ box-shadow: -5px 0 0 $day-selected-in-range;
476
+ }
479
477
  }
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div
3
- class="flatpickr-wrapper"
3
+ class="ib-flatpickr-wrapper"
4
4
  :class="{
5
5
  'has-labels': label.length || endDateLabel.length,
6
6
  'has-label': label.length,
@@ -9,18 +9,17 @@
9
9
  class="info-button"
10
10
  kind="ghost"
11
11
  type="button"
12
+ v-tooltip:[tooltipPosition]="infoText"
12
13
  >
13
14
  <ib-icon name="information-circle-outline" />
14
-
15
- <ib-tooltip :text="infoText" :position="tooltipPosition"></ib-tooltip>
16
15
  </ib-icon-button>
17
16
  </label>
18
17
  </template>
19
18
 
20
19
  <script>
21
20
  import IbIconButton from "../../IconButton/IconButton.vue";
22
- import IbTooltip from "../../Tooltip/Tooltip.vue";
23
21
  import IbIcon from "../../Icon.vue";
22
+ import { TooltipDirective as Tooltip } from "../../../directives/tooltip/tooltip";
24
23
 
25
24
  export default {
26
25
  name: "IbLabel",
@@ -68,7 +67,9 @@ export default {
68
67
  components: {
69
68
  IbIconButton,
70
69
  IbIcon,
71
- IbTooltip,
70
+ },
71
+ directives: {
72
+ Tooltip,
72
73
  },
73
74
  };
74
75
  </script>
@@ -109,6 +110,8 @@ export default {
109
110
  .info-button {
110
111
  display: inline-block;
111
112
  margin-left: 3px;
113
+ position: relative;
114
+
112
115
  .ib-icon {
113
116
  color: $gray-600;
114
117
  font-size: 16px;
@@ -4,6 +4,7 @@
4
4
  :class="classes"
5
5
  :for="id"
6
6
  :aria-checked="checked"
7
+ @click.prevent="onClick"
7
8
  >
8
9
  <input
9
10
  type="radio"
@@ -30,13 +30,12 @@ $radio-border-filled-disabled: $neutral-500;
30
30
  .ib-radio {
31
31
  display: inline-flex;
32
32
  cursor: pointer;
33
- position: relative;
34
33
 
35
34
  input {
36
35
  opacity: 0;
37
36
  position: absolute;
38
- width: 1px;
39
- height: 1px;
37
+ top: -100%;
38
+ right: -100%;
40
39
 
41
40
  &:focus + .ib-radio-body {
42
41
  border-radius: 4px;