@citizenplane/pimp 18.6.2 → 18.8.0
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/biome.json +178 -0
- package/dist/components/BaseInputLabel.vue.d.ts.map +1 -1
- package/dist/components/BaseSelectClearButton.vue.d.ts.map +1 -1
- package/dist/components/CpAccordion.vue.d.ts.map +1 -1
- package/dist/components/CpAlert.vue.d.ts.map +1 -1
- package/dist/components/CpBadge.vue.d.ts.map +1 -1
- package/dist/components/CpButton.vue.d.ts.map +1 -1
- package/dist/components/CpButtonToggle.vue.d.ts +1 -1
- package/dist/components/CpButtonToggle.vue.d.ts.map +1 -1
- package/dist/components/CpCalendar.vue.d.ts.map +1 -1
- package/dist/components/CpCheckbox.vue.d.ts.map +1 -1
- package/dist/components/CpContextualMenu.vue.d.ts.map +1 -1
- package/dist/components/CpDate.vue.d.ts.map +1 -1
- package/dist/components/CpDatepicker.vue.d.ts.map +1 -1
- package/dist/components/CpInput.vue.d.ts.map +1 -1
- package/dist/components/CpItemActions.vue.d.ts +2 -0
- package/dist/components/CpItemActions.vue.d.ts.map +1 -1
- package/dist/components/CpMenu.vue.d.ts.map +1 -1
- package/dist/components/CpMenuItem.vue.d.ts.map +1 -1
- package/dist/components/CpMultiselect.vue.d.ts.map +1 -1
- package/dist/components/CpRadio.vue.d.ts.map +1 -1
- package/dist/components/CpRadioGroup.vue.d.ts.map +1 -1
- package/dist/components/CpRadioNew.vue.d.ts.map +1 -1
- package/dist/components/CpSelect.vue.d.ts.map +1 -1
- package/dist/components/CpSelectMenu.vue.d.ts.map +1 -1
- package/dist/components/CpSelectableButton.vue.d.ts +1 -1
- package/dist/components/CpSelectableButton.vue.d.ts.map +1 -1
- package/dist/components/CpSwitch.vue.d.ts.map +1 -1
- package/dist/components/CpTable.vue.d.ts.map +1 -1
- package/dist/components/CpTelInput.vue.d.ts.map +1 -1
- package/dist/components/CpTooltip.vue.d.ts +2 -0
- package/dist/components/CpTooltip.vue.d.ts.map +1 -1
- package/dist/components/CpTrip.vue.d.ts +48 -0
- package/dist/components/CpTrip.vue.d.ts.map +1 -0
- package/dist/components/CpTripTimeline.vue.d.ts +24 -0
- package/dist/components/CpTripTimeline.vue.d.ts.map +1 -0
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/composables/useDynamicSize.d.ts +9 -0
- package/dist/composables/useDynamicSize.d.ts.map +1 -0
- package/dist/constants/index.d.ts +2 -2
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/layout/Breakpoints.d.ts +9 -0
- package/dist/constants/layout/Breakpoints.d.ts.map +1 -0
- package/dist/constants/layout/Sizes.d.ts +2 -0
- package/dist/constants/layout/Sizes.d.ts.map +1 -0
- package/dist/constants/layout/index.d.ts +3 -0
- package/dist/constants/layout/index.d.ts.map +1 -0
- package/dist/helpers/functions.d.ts +1 -0
- package/dist/helpers/functions.d.ts.map +1 -1
- package/dist/libs/CoreDatepicker.vue.d.ts.map +1 -1
- package/dist/pimp.es.js +6797 -6461
- package/dist/pimp.umd.js +54 -54
- package/dist/style.css +1 -1
- package/package.json +14 -24
- package/src/assets/css/base.css +17 -11
- package/src/assets/css/colors.css +12 -22
- package/src/assets/css/dimensions.css +4 -0
- package/src/assets/css/shadows.css +0 -3
- package/src/assets/css/tokens.css +21 -65
- package/src/assets/css/typography.css +0 -17
- package/src/assets/main.css +7 -7
- package/src/assets/styles/helpers/_functions.scss +2 -2
- package/src/assets/styles/utilities/_index.scss +2 -3
- package/src/components/BaseInputLabel.vue +7 -11
- package/src/components/BaseSelectClearButton.vue +6 -7
- package/src/components/CpAccordion.vue +27 -28
- package/src/components/CpAccordionGroup.vue +2 -2
- package/src/components/CpAlert.vue +12 -11
- package/src/components/CpBadge.vue +4 -19
- package/src/components/CpButton.vue +23 -25
- package/src/components/CpButtonGroup.vue +2 -2
- package/src/components/CpButtonToggle.vue +22 -22
- package/src/components/CpCalendar.vue +30 -26
- package/src/components/CpCheckbox.vue +29 -33
- package/src/components/CpContextualMenu.vue +1 -2
- package/src/components/CpDate.vue +72 -76
- package/src/components/CpDatepicker.vue +2 -3
- package/src/components/CpDialog.vue +8 -8
- package/src/components/CpHeading.vue +6 -6
- package/src/components/CpIcon.vue +2 -2
- package/src/components/CpInput.vue +46 -48
- package/src/components/CpItemActions.vue +17 -16
- package/src/components/CpMenu.vue +8 -9
- package/src/components/CpMenuItem.vue +7 -7
- package/src/components/CpMenuList.vue +3 -3
- package/src/components/CpMultiselect.vue +29 -30
- package/src/components/CpRadio.vue +53 -59
- package/src/components/CpRadioGroup.vue +11 -12
- package/src/components/CpRadioNew.vue +56 -58
- package/src/components/CpSelect.vue +42 -42
- package/src/components/CpSelectMenu.vue +32 -32
- package/src/components/CpSelectableButton.vue +50 -51
- package/src/components/CpSwitch.vue +43 -44
- package/src/components/CpTable.vue +69 -81
- package/src/components/CpTableColumnEditor.vue +16 -16
- package/src/components/CpTableEmptyState.vue +4 -4
- package/src/components/CpTableFooter.vue +2 -2
- package/src/components/CpTableFooterDesktop.vue +2 -2
- package/src/components/CpTableFooterDetails.vue +2 -2
- package/src/components/CpTableFooterMobile.vue +4 -4
- package/src/components/CpTabs.vue +1 -1
- package/src/components/CpTelInput.vue +31 -32
- package/src/components/CpTextarea.vue +13 -13
- package/src/components/CpToast.vue +25 -24
- package/src/components/CpTooltip.vue +15 -13
- package/src/components/CpTransitionCounter.vue +1 -1
- package/src/components/CpTransitionExpand.vue +5 -5
- package/src/components/CpTransitionSize.vue +1 -1
- package/src/components/CpTrip.vue +190 -0
- package/src/components/CpTripTimeline.vue +272 -0
- package/src/components/index.ts +36 -34
- package/src/composables/useDynamicSize.ts +60 -0
- package/src/constants/index.ts +2 -2
- package/src/constants/layout/Breakpoints.ts +8 -0
- package/src/constants/layout/Sizes.ts +1 -0
- package/src/constants/layout/index.ts +3 -0
- package/src/directives/ClickOutside.ts +1 -1
- package/src/directives/ResizeSelect.ts +1 -1
- package/src/helpers/functions.ts +1 -1
- package/src/helpers/index.ts +1 -1
- package/src/libs/CoreDatepicker.vue +115 -134
- package/src/stories/Colors.stories.ts +2 -1
- package/src/stories/CpAccordion.stories.ts +2 -2
- package/src/stories/CpAccordionGroup.stories.ts +1 -2
- package/src/stories/CpButtonToggle.stories.ts +1 -2
- package/src/stories/CpCheckbox.stories.ts +1 -2
- package/src/stories/CpContextualMenu.stories.ts +1 -2
- package/src/stories/CpDate.stories.ts +1 -2
- package/src/stories/CpDatepicker.stories.ts +1 -2
- package/src/stories/CpDialog.stories.ts +1 -2
- package/src/stories/CpInput.stories.ts +1 -2
- package/src/stories/CpItemActions.stories.ts +10 -5
- package/src/stories/CpMenu.stories.ts +1 -2
- package/src/stories/CpMenuItem.stories.ts +1 -2
- package/src/stories/CpMultiselect.stories.ts +1 -2
- package/src/stories/CpRadio.stories.ts +1 -2
- package/src/stories/CpRadioGroup.stories.ts +1 -2
- package/src/stories/CpSelect.stories.ts +1 -2
- package/src/stories/CpSelectMenu.stories.ts +1 -2
- package/src/stories/CpSwitch.stories.ts +1 -2
- package/src/stories/CpTable.stories.ts +2 -3
- package/src/stories/CpTabs.stories.ts +1 -2
- package/src/stories/CpText.stories.ts +2 -1
- package/src/stories/CpTextarea.stories.ts +1 -2
- package/src/stories/CpToast.stories.ts +2 -3
- package/src/stories/CpTransitionCounter.stories.ts +1 -2
- package/src/stories/CpTransitionExpand.stories.ts +1 -2
- package/src/stories/CpTransitionListItems.stories.ts +1 -2
- package/src/stories/CpTransitionSize.stories.ts +1 -2
- package/src/stories/CpTransitionSlide.stories.ts +1 -2
- package/src/stories/CpTransitionTabContent.stories.ts +1 -2
- package/src/stories/CpTrip.stories.ts +323 -0
- package/src/stories/Dimensions.stories.ts +1 -0
- package/src/stories/Shadows.stories.ts +1 -0
- package/src/stories/Typography.stories.ts +1 -0
- package/src/vendors/ff-polyfill.ts +1 -1
- package/vitest.workspace.js +1 -1
- package/src/components/Pimp.vue +0 -10
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
v-for="(month, index) in showMonths"
|
|
38
38
|
:key="month"
|
|
39
39
|
class="asd__days-legend"
|
|
40
|
-
:style="[monthWidthStyles, { left: width * index
|
|
40
|
+
:style="[monthWidthStyles, { left: `${width * index}px` }]"
|
|
41
41
|
>
|
|
42
42
|
<div v-for="(day, dayIndex) in daysShort" :key="dayIndex" class="asd__day-title">{{ day }}</div>
|
|
43
43
|
</div>
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
<tr v-for="(week, index) in month.weeks" :key="index" class="asd__week">
|
|
97
97
|
<td
|
|
98
98
|
v-for="({ dayDate, dayNumber }, dayIndex) in week"
|
|
99
|
-
:key="dayIndex
|
|
99
|
+
:key="`${dayIndex}_${dayNumber}`"
|
|
100
100
|
:ref="`date-${dayDate}`"
|
|
101
101
|
class="asd__day"
|
|
102
102
|
:class="getDayClasses(dayNumber, dayDate)"
|
|
@@ -247,7 +247,6 @@ export default {
|
|
|
247
247
|
},
|
|
248
248
|
isTest: {
|
|
249
249
|
type: Boolean,
|
|
250
|
-
// eslint-disable-next-line vue/no-boolean-default
|
|
251
250
|
default: () => process.env.NODE_ENV === 'test',
|
|
252
251
|
},
|
|
253
252
|
},
|
|
@@ -264,7 +263,7 @@ export default {
|
|
|
264
263
|
],
|
|
265
264
|
data() {
|
|
266
265
|
return {
|
|
267
|
-
wrapperId:
|
|
266
|
+
wrapperId: `datepicker-wrapper-${useId()}`,
|
|
268
267
|
dateLabelFormat: 'dddd, MMMM D, YYYY',
|
|
269
268
|
showDatepicker: false,
|
|
270
269
|
showKeyboardShortcutsMenu: false,
|
|
@@ -321,18 +320,18 @@ export default {
|
|
|
321
320
|
},
|
|
322
321
|
wrapperStyles() {
|
|
323
322
|
return {
|
|
324
|
-
width: this.width * this.showMonths
|
|
323
|
+
width: `${this.width * this.showMonths}px`,
|
|
325
324
|
zIndex: this.inline ? '' : '100',
|
|
326
325
|
}
|
|
327
326
|
},
|
|
328
327
|
innerStyles() {
|
|
329
328
|
return {
|
|
330
|
-
'margin-left': this.showFullscreen ?
|
|
329
|
+
'margin-left': this.showFullscreen ? `-${this.viewportWidth}` : `-${this.width}px`,
|
|
331
330
|
}
|
|
332
331
|
},
|
|
333
332
|
monthWidthStyles() {
|
|
334
333
|
return {
|
|
335
|
-
width: this.showFullscreen ? this.viewportWidth : this.width
|
|
334
|
+
width: this.showFullscreen ? this.viewportWidth : `${this.width}px`,
|
|
336
335
|
}
|
|
337
336
|
},
|
|
338
337
|
mobileHeaderFallback() {
|
|
@@ -370,7 +369,7 @@ export default {
|
|
|
370
369
|
return dtDateTwo < dtDateOne
|
|
371
370
|
},
|
|
372
371
|
visibleMonths() {
|
|
373
|
-
const firstMonthArray = this.months.filter((
|
|
372
|
+
const firstMonthArray = this.months.filter((_m, index) => index > 0)
|
|
374
373
|
const numberOfMonthsArray = []
|
|
375
374
|
for (let i = 0; i < this.showMonths; i++) {
|
|
376
375
|
numberOfMonthsArray.push(i)
|
|
@@ -444,11 +443,9 @@ export default {
|
|
|
444
443
|
this.openDatepicker()
|
|
445
444
|
}
|
|
446
445
|
|
|
447
|
-
// eslint-disable-next-line vue/no-undef-properties
|
|
448
446
|
this.triggerElement.addEventListener('click', this._handleWindowClickEvent)
|
|
449
447
|
},
|
|
450
448
|
unmounted() {
|
|
451
|
-
// eslint-disable-next-line vue/no-undef-properties
|
|
452
449
|
window.removeEventListener('resize', this._handleWindowResizeEvent)
|
|
453
450
|
|
|
454
451
|
window.removeEventListener('click', this._handleWindowClickEvent)
|
|
@@ -457,7 +454,7 @@ export default {
|
|
|
457
454
|
},
|
|
458
455
|
methods: {
|
|
459
456
|
handleDatepickerSizing() {
|
|
460
|
-
this.viewportWidth = window.innerWidth
|
|
457
|
+
this.viewportWidth = `${window.innerWidth}px`
|
|
461
458
|
|
|
462
459
|
this._handleWindowResizeEvent = this.debounce(() => {
|
|
463
460
|
if (this.inline) this.openDatepicker()
|
|
@@ -509,19 +506,17 @@ export default {
|
|
|
509
506
|
let timeout
|
|
510
507
|
|
|
511
508
|
return function () {
|
|
512
|
-
//
|
|
513
|
-
// eslint-disable-next-line
|
|
514
|
-
const context = this
|
|
509
|
+
// biome-ignore lint: use the rest of argument [...arguments]
|
|
515
510
|
const args = arguments
|
|
516
511
|
|
|
517
|
-
const later =
|
|
512
|
+
const later = () => {
|
|
518
513
|
timeout = null
|
|
519
|
-
if (!immediate) func.apply(
|
|
514
|
+
if (!immediate) func.apply(this, args)
|
|
520
515
|
}
|
|
521
516
|
const callNow = immediate && !timeout
|
|
522
517
|
clearTimeout(timeout)
|
|
523
518
|
timeout = setTimeout(later, wait)
|
|
524
|
-
if (callNow) func.apply(
|
|
519
|
+
if (callNow) func.apply(this, args)
|
|
525
520
|
}
|
|
526
521
|
},
|
|
527
522
|
copyObject(obj) {
|
|
@@ -669,11 +664,11 @@ export default {
|
|
|
669
664
|
for (let d = 0; d < daysInMonth; d++) {
|
|
670
665
|
const isLastDayInMonth = d >= daysInMonth - 1
|
|
671
666
|
const dayNumber = d + 1
|
|
672
|
-
const dayNumberFull = dayNumber < 10 ?
|
|
667
|
+
const dayNumberFull = dayNumber < 10 ? `0${dayNumber}` : dayNumber
|
|
673
668
|
week.push({
|
|
674
669
|
dayNumber,
|
|
675
670
|
dayNumberFull,
|
|
676
|
-
dayDate: year
|
|
671
|
+
dayDate: `${year}-${month}-${dayNumberFull}`,
|
|
677
672
|
})
|
|
678
673
|
|
|
679
674
|
if (week.length === 7) {
|
|
@@ -742,7 +737,7 @@ export default {
|
|
|
742
737
|
const dateElement = this.$refs[`date-${date}`]
|
|
743
738
|
// handle .focus() on ie11 by adding a short timeout
|
|
744
739
|
if (dateElement && dateElement.length) {
|
|
745
|
-
setTimeout(
|
|
740
|
+
setTimeout(() => {
|
|
746
741
|
dateElement[0].focus()
|
|
747
742
|
}, 10)
|
|
748
743
|
}
|
|
@@ -910,14 +905,14 @@ export default {
|
|
|
910
905
|
this.openDatepicker()
|
|
911
906
|
}
|
|
912
907
|
},
|
|
913
|
-
updateMonth(
|
|
908
|
+
updateMonth(_offset, year, event) {
|
|
914
909
|
const newMonth = event.target.value
|
|
915
910
|
const monthIdx = this.monthNames.indexOf(newMonth)
|
|
916
911
|
const startingDate = DateTime.fromISO(this.startingDate)
|
|
917
912
|
this.startingDate = startingDate.set({ month: monthIdx, year }).toISODate()
|
|
918
913
|
this.generateMonths()
|
|
919
914
|
},
|
|
920
|
-
updateYear(
|
|
915
|
+
updateYear(_offset, monthIdx, event) {
|
|
921
916
|
const newYear = event.target.value
|
|
922
917
|
const startingDate = DateTime.fromISO(this.startingDate)
|
|
923
918
|
this.startingDate = startingDate.set({ month: monthIdx, year: newYear }).toISODate()
|
|
@@ -928,9 +923,7 @@ export default {
|
|
|
928
923
|
this.setStartDates()
|
|
929
924
|
this.triggerElement.classList.add('datepicker-open')
|
|
930
925
|
this.showDatepicker = true
|
|
931
|
-
// eslint-disable-next-line vue/no-undef-properties
|
|
932
926
|
this.initialDate1 = this.dateOne
|
|
933
|
-
// eslint-disable-next-line vue/no-undef-properties
|
|
934
927
|
this.initialDate2 = this.dateTwo
|
|
935
928
|
this.$emit('opened')
|
|
936
929
|
this.$nextTick(() => {
|
|
@@ -968,7 +961,7 @@ export default {
|
|
|
968
961
|
}
|
|
969
962
|
|
|
970
963
|
const viewportWidth = document.documentElement.clientWidth || window.innerWidth
|
|
971
|
-
this.viewportWidth = viewportWidth
|
|
964
|
+
this.viewportWidth = `${viewportWidth}px`
|
|
972
965
|
|
|
973
966
|
this.isMobile = viewportWidth < 768
|
|
974
967
|
|
|
@@ -999,20 +992,18 @@ export default {
|
|
|
999
992
|
|
|
1000
993
|
<style lang="scss">
|
|
1001
994
|
$tablet: 768px;
|
|
1002
|
-
|
|
1003
995
|
$background-grey-color: #f7f7f7;
|
|
1004
|
-
|
|
1005
996
|
$transition-time: 0.3s;
|
|
1006
997
|
|
|
1007
998
|
@include mx.popover-desktop('asd__fade');
|
|
1008
999
|
|
|
1009
1000
|
@mixin degrade {
|
|
1010
|
-
content: '';
|
|
1011
|
-
width: 65px;
|
|
1012
|
-
height: 35px;
|
|
1013
|
-
background: linear-gradient(90deg, #f7f7f7 50%, rgba(241, 241, 241, 0) 95%);
|
|
1014
1001
|
position: absolute;
|
|
1015
1002
|
z-index: -1;
|
|
1003
|
+
width: 65px;
|
|
1004
|
+
height: 35px;
|
|
1005
|
+
background: linear-gradient(90deg, #f7f7f7 50%, rgba(241, 241, 241, 0%) 95%);
|
|
1006
|
+
content: '';
|
|
1016
1007
|
}
|
|
1017
1008
|
|
|
1018
1009
|
// datepicker
|
|
@@ -1029,11 +1020,11 @@ $transition-time: 0.3s;
|
|
|
1029
1020
|
|
|
1030
1021
|
.asd {
|
|
1031
1022
|
&__wrapper {
|
|
1023
|
+
overflow: hidden;
|
|
1032
1024
|
border-radius: 10px;
|
|
1033
|
-
white-space: nowrap;
|
|
1034
|
-
text-align: center;
|
|
1035
1025
|
background-color: var(--cp-background-white);
|
|
1036
|
-
|
|
1026
|
+
text-align: center;
|
|
1027
|
+
white-space: nowrap;
|
|
1037
1028
|
|
|
1038
1029
|
&:not(&--isInline) {
|
|
1039
1030
|
box-shadow:
|
|
@@ -1045,42 +1036,36 @@ $transition-time: 0.3s;
|
|
|
1045
1036
|
position: relative !important;
|
|
1046
1037
|
}
|
|
1047
1038
|
|
|
1048
|
-
|
|
1039
|
+
&::before {
|
|
1049
1040
|
// Line between the two months
|
|
1050
1041
|
@media (min-width: $tablet) {
|
|
1051
1042
|
position: absolute;
|
|
1052
|
-
|
|
1053
|
-
left: 0;
|
|
1054
|
-
right: 0;
|
|
1055
|
-
top: 20px;
|
|
1056
|
-
bottom: 0;
|
|
1057
|
-
margin: auto;
|
|
1043
|
+
z-index: -1;
|
|
1058
1044
|
width: 1px;
|
|
1045
|
+
margin: auto;
|
|
1059
1046
|
background: var(--cp-border-soft);
|
|
1060
|
-
|
|
1047
|
+
content: '';
|
|
1048
|
+
inset: 20px 0 0;
|
|
1061
1049
|
}
|
|
1062
1050
|
}
|
|
1063
1051
|
|
|
1064
1052
|
&--showOneMonth {
|
|
1065
|
-
|
|
1053
|
+
&::before {
|
|
1066
1054
|
content: none;
|
|
1067
1055
|
}
|
|
1068
1056
|
}
|
|
1069
1057
|
|
|
1070
1058
|
&--full-screen {
|
|
1071
1059
|
position: fixed;
|
|
1072
|
-
top: 0;
|
|
1073
|
-
right: 0;
|
|
1074
|
-
bottom: 0;
|
|
1075
|
-
left: 0;
|
|
1076
|
-
border: none;
|
|
1077
1060
|
z-index: 100;
|
|
1061
|
+
border: none;
|
|
1062
|
+
inset: 0;
|
|
1078
1063
|
}
|
|
1079
1064
|
}
|
|
1080
1065
|
|
|
1081
1066
|
&__inner-wrapper {
|
|
1082
|
-
transition: all $transition-time ease;
|
|
1083
1067
|
position: relative;
|
|
1068
|
+
transition: all $transition-time ease;
|
|
1084
1069
|
}
|
|
1085
1070
|
|
|
1086
1071
|
&__datepicker-header {
|
|
@@ -1088,12 +1073,12 @@ $transition-time: 0.3s;
|
|
|
1088
1073
|
}
|
|
1089
1074
|
|
|
1090
1075
|
&__change-month-button {
|
|
1091
|
-
display: flex;
|
|
1092
|
-
align-items: center;
|
|
1093
|
-
justify-content: center;
|
|
1094
1076
|
position: absolute;
|
|
1095
1077
|
z-index: 10;
|
|
1096
1078
|
top: 16px;
|
|
1079
|
+
display: flex;
|
|
1080
|
+
align-items: center;
|
|
1081
|
+
justify-content: center;
|
|
1097
1082
|
border-radius: var(--cp-radius-full);
|
|
1098
1083
|
|
|
1099
1084
|
&:focus-visible {
|
|
@@ -1138,8 +1123,8 @@ $transition-time: 0.3s;
|
|
|
1138
1123
|
user-select: none;
|
|
1139
1124
|
|
|
1140
1125
|
@media (min-width: $tablet) {
|
|
1141
|
-
padding: 0 24px;
|
|
1142
1126
|
top: 60px;
|
|
1127
|
+
padding: 0 24px;
|
|
1143
1128
|
}
|
|
1144
1129
|
|
|
1145
1130
|
@media (max-width: ($tablet - 1px)) {
|
|
@@ -1151,33 +1136,33 @@ $transition-time: 0.3s;
|
|
|
1151
1136
|
&__day-title {
|
|
1152
1137
|
display: inline-block;
|
|
1153
1138
|
width: math.div(1, 7) * 100%;
|
|
1154
|
-
|
|
1139
|
+
margin-left: -1px;
|
|
1155
1140
|
color: var(--cp-text-secondary);
|
|
1156
1141
|
font-size: 14px;
|
|
1157
1142
|
line-height: 18px;
|
|
1158
|
-
|
|
1143
|
+
text-align: center;
|
|
1159
1144
|
}
|
|
1160
1145
|
|
|
1161
1146
|
&__month-table {
|
|
1162
|
-
border-spacing: 0 6px;
|
|
1163
1147
|
width: 100%;
|
|
1164
1148
|
max-width: 100%;
|
|
1149
|
+
border-spacing: 0 6px;
|
|
1165
1150
|
}
|
|
1166
1151
|
|
|
1167
1152
|
&__wrapper:not(&__wrapper--isInline) &__month {
|
|
1168
|
-
padding-left: 16px;
|
|
1169
1153
|
padding-right: 16px;
|
|
1154
|
+
padding-left: 16px;
|
|
1170
1155
|
|
|
1171
1156
|
@media (min-width: $tablet) {
|
|
1172
|
-
padding-left: 24px;
|
|
1173
1157
|
padding-right: 24px;
|
|
1158
|
+
padding-left: 24px;
|
|
1174
1159
|
}
|
|
1175
1160
|
}
|
|
1176
1161
|
|
|
1177
1162
|
&__month {
|
|
1178
|
-
transition: all $transition-time ease;
|
|
1179
1163
|
display: inline-block;
|
|
1180
1164
|
padding: 16px 16px 8px;
|
|
1165
|
+
transition: all $transition-time ease;
|
|
1181
1166
|
|
|
1182
1167
|
@media (min-width: $tablet) {
|
|
1183
1168
|
padding: 24px 24px 12px;
|
|
@@ -1190,11 +1175,11 @@ $transition-time: 0.3s;
|
|
|
1190
1175
|
}
|
|
1191
1176
|
|
|
1192
1177
|
&__month-name {
|
|
1193
|
-
font-size: 16px;
|
|
1194
|
-
text-align: center;
|
|
1195
1178
|
margin: 0 0 36px;
|
|
1196
|
-
line-height: 20px;
|
|
1197
1179
|
color: var(--cp-text-primary);
|
|
1180
|
+
font-size: 16px;
|
|
1181
|
+
line-height: 20px;
|
|
1182
|
+
text-align: center;
|
|
1198
1183
|
|
|
1199
1184
|
@media (max-width: $tablet) {
|
|
1200
1185
|
margin-top: 2px;
|
|
@@ -1208,48 +1193,50 @@ $transition-time: 0.3s;
|
|
|
1208
1193
|
&__selected {
|
|
1209
1194
|
&-date-one {
|
|
1210
1195
|
background: $background-grey-color;
|
|
1211
|
-
border-top-left-radius: 50%;
|
|
1212
1196
|
border-bottom-left-radius: 50%;
|
|
1197
|
+
border-top-left-radius: 50%;
|
|
1213
1198
|
}
|
|
1214
1199
|
|
|
1215
1200
|
&-date-one.asd__day--end-month {
|
|
1216
|
-
|
|
1201
|
+
&::before {
|
|
1217
1202
|
@include degrade;
|
|
1218
|
-
|
|
1203
|
+
|
|
1219
1204
|
border-bottom-left-radius: 50%;
|
|
1205
|
+
border-top-left-radius: 50%;
|
|
1220
1206
|
}
|
|
1221
1207
|
}
|
|
1222
1208
|
|
|
1223
1209
|
&-date-one.asd__day--end-week:not(.asd__day--selected) {
|
|
1224
|
-
border-top-right-radius: 10px;
|
|
1225
1210
|
border-bottom-right-radius: 10px;
|
|
1211
|
+
border-top-right-radius: 10px;
|
|
1226
1212
|
}
|
|
1227
1213
|
|
|
1228
1214
|
&-date-two {
|
|
1229
1215
|
background: $background-grey-color;
|
|
1230
|
-
border-top-right-radius: 50%;
|
|
1231
1216
|
border-bottom-right-radius: 50%;
|
|
1217
|
+
border-top-right-radius: 50%;
|
|
1232
1218
|
}
|
|
1233
1219
|
|
|
1234
1220
|
&-date-two.asd__day--start-month {
|
|
1235
|
-
|
|
1221
|
+
&::before {
|
|
1236
1222
|
@include degrade;
|
|
1237
|
-
|
|
1223
|
+
|
|
1238
1224
|
right: 20px;
|
|
1239
1225
|
width: 20px;
|
|
1226
|
+
transform: rotate(180deg);
|
|
1240
1227
|
}
|
|
1241
1228
|
}
|
|
1242
1229
|
|
|
1243
1230
|
&-date-two.asd__day--start-week {
|
|
1244
|
-
border-top-left-radius: 5px;
|
|
1245
1231
|
border-bottom-left-radius: 5px;
|
|
1232
|
+
border-top-left-radius: 5px;
|
|
1246
1233
|
}
|
|
1247
1234
|
}
|
|
1248
1235
|
|
|
1249
1236
|
&__day {
|
|
1250
|
-
outline: none;
|
|
1251
|
-
padding: 0;
|
|
1252
1237
|
position: relative;
|
|
1238
|
+
padding: 0;
|
|
1239
|
+
outline: none;
|
|
1253
1240
|
|
|
1254
1241
|
&--in-range,
|
|
1255
1242
|
&--hovered {
|
|
@@ -1258,67 +1245,65 @@ $transition-time: 0.3s;
|
|
|
1258
1245
|
|
|
1259
1246
|
&--hovered {
|
|
1260
1247
|
.asd__day--end-week {
|
|
1261
|
-
border-top-right-radius: 5px;
|
|
1262
1248
|
border-bottom-right-radius: 5px;
|
|
1249
|
+
border-top-right-radius: 5px;
|
|
1263
1250
|
}
|
|
1264
1251
|
|
|
1265
1252
|
.asd__day--start-week {
|
|
1266
|
-
border-top-left-radius: 5px;
|
|
1267
1253
|
border-bottom-left-radius: 5px;
|
|
1254
|
+
border-top-left-radius: 5px;
|
|
1268
1255
|
}
|
|
1269
1256
|
}
|
|
1270
1257
|
|
|
1271
1258
|
&--in-range.asd__day--end-week {
|
|
1272
|
-
border-top-right-radius: 5px;
|
|
1273
1259
|
border-bottom-right-radius: 5px;
|
|
1260
|
+
border-top-right-radius: 5px;
|
|
1274
1261
|
}
|
|
1275
1262
|
|
|
1276
1263
|
&--in-range.asd__day--start-week {
|
|
1277
|
-
border-top-left-radius: 5px;
|
|
1278
1264
|
border-bottom-left-radius: 5px;
|
|
1265
|
+
border-top-left-radius: 5px;
|
|
1279
1266
|
}
|
|
1280
1267
|
|
|
1281
1268
|
&--hovered.asd__day--start-month,
|
|
1282
|
-
&--in-range.asd__day--start-month:not(.asd__selected-date-one
|
|
1283
|
-
|
|
1269
|
+
&--in-range.asd__day--start-month:not(.asd__selected-date-one, .asd__selected-date-two) {
|
|
1270
|
+
&::before {
|
|
1284
1271
|
@include degrade;
|
|
1272
|
+
|
|
1273
|
+
right: 20px;
|
|
1285
1274
|
width: 30px;
|
|
1286
1275
|
transform: rotate(180deg);
|
|
1287
|
-
right: 20px;
|
|
1288
1276
|
}
|
|
1289
1277
|
}
|
|
1290
1278
|
|
|
1291
1279
|
&--hovered.asd__day--end-month,
|
|
1292
|
-
&--in-range.asd__day--end-month:not(.asd__selected-date-one
|
|
1293
|
-
|
|
1280
|
+
&--in-range.asd__day--end-month:not(.asd__selected-date-one, .asd__selected-date-two) {
|
|
1281
|
+
&::before {
|
|
1294
1282
|
@include degrade;
|
|
1295
1283
|
}
|
|
1296
1284
|
}
|
|
1297
1285
|
|
|
1298
1286
|
&--enabled {
|
|
1299
|
-
&:not(.asd__day--disabled
|
|
1300
|
-
.asd__day--in-range
|
|
1301
|
-
):hover {
|
|
1287
|
+
&:not(.asd__day--disabled, .asd__day--selected, .asd__selected-date-one, .asd__selected-date-two, .asd__day--in-range):hover {
|
|
1302
1288
|
button {
|
|
1303
1289
|
z-index: 2;
|
|
1304
|
-
background: var(--cp-background-white);
|
|
1305
1290
|
border: 2px solid #f7f7f7;
|
|
1306
1291
|
border-radius: 50%;
|
|
1292
|
+
background: var(--cp-background-white);
|
|
1307
1293
|
}
|
|
1308
1294
|
}
|
|
1309
1295
|
|
|
1310
1296
|
&.asd__day--date-two-not-selected:hover {
|
|
1311
1297
|
background: $background-grey-color;
|
|
1312
|
-
border-top-right-radius: 50%;
|
|
1313
1298
|
border-bottom-right-radius: 50%;
|
|
1299
|
+
border-top-right-radius: 50%;
|
|
1314
1300
|
|
|
1315
|
-
&.asd__day--start-month {
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
}
|
|
1301
|
+
&.asd__day--start-month::before {
|
|
1302
|
+
@include degrade;
|
|
1303
|
+
|
|
1304
|
+
right: 20px;
|
|
1305
|
+
width: 30px;
|
|
1306
|
+
transform: rotate(180deg);
|
|
1322
1307
|
}
|
|
1323
1308
|
}
|
|
1324
1309
|
}
|
|
@@ -1333,29 +1318,25 @@ $transition-time: 0.3s;
|
|
|
1333
1318
|
background: var(--cp-background-accent-solid);
|
|
1334
1319
|
}
|
|
1335
1320
|
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
@include degrade;
|
|
1339
|
-
border-top-left-radius: 50%;
|
|
1340
|
-
border-bottom-left-radius: 50%;
|
|
1341
|
-
}
|
|
1321
|
+
button span {
|
|
1322
|
+
color: var(--cp-text-white) !important;
|
|
1342
1323
|
}
|
|
1343
1324
|
|
|
1344
|
-
&.asd__selected-date-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
width: 30px;
|
|
1350
|
-
transform: rotate(180deg);
|
|
1351
|
-
right: 20px;
|
|
1352
|
-
}
|
|
1325
|
+
&.asd__selected-date-one::before {
|
|
1326
|
+
@include degrade;
|
|
1327
|
+
|
|
1328
|
+
border-bottom-left-radius: 50%;
|
|
1329
|
+
border-top-left-radius: 50%;
|
|
1353
1330
|
}
|
|
1354
1331
|
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1332
|
+
&.asd__selected-date-two::before {
|
|
1333
|
+
@include degrade;
|
|
1334
|
+
|
|
1335
|
+
right: 20px;
|
|
1336
|
+
width: 30px;
|
|
1337
|
+
border-bottom-right-radius: 50%;
|
|
1338
|
+
border-top-right-radius: 50%;
|
|
1339
|
+
transform: rotate(180deg);
|
|
1359
1340
|
}
|
|
1360
1341
|
}
|
|
1361
1342
|
|
|
@@ -1374,32 +1355,32 @@ $transition-time: 0.3s;
|
|
|
1374
1355
|
}
|
|
1375
1356
|
|
|
1376
1357
|
&--recurency {
|
|
1377
|
-
&:not(.asd__selected-date-one
|
|
1358
|
+
&:not(.asd__selected-date-one, .asd__selected-date-two) {
|
|
1378
1359
|
background: $background-grey-color;
|
|
1379
1360
|
}
|
|
1380
1361
|
|
|
1381
1362
|
button {
|
|
1382
|
-
background: var(--cp-background-accent-solid) !important;
|
|
1383
|
-
border-radius: 50%;
|
|
1384
1363
|
border: 2px solid $background-grey-color;
|
|
1364
|
+
border-radius: 50%;
|
|
1365
|
+
background: var(--cp-background-accent-solid) !important;
|
|
1366
|
+
}
|
|
1385
1367
|
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
}
|
|
1368
|
+
button .asd__day-number {
|
|
1369
|
+
color: var(--cp-text-white);
|
|
1389
1370
|
}
|
|
1390
1371
|
}
|
|
1391
1372
|
|
|
1392
1373
|
&--selected-recurrent {
|
|
1393
1374
|
button {
|
|
1394
1375
|
z-index: 2;
|
|
1395
|
-
background: var(--cp-background-white);
|
|
1396
1376
|
border: 2px solid $background-grey-color;
|
|
1397
1377
|
border-radius: 50%;
|
|
1378
|
+
background: var(--cp-background-white);
|
|
1379
|
+
}
|
|
1398
1380
|
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
}
|
|
1381
|
+
button::before {
|
|
1382
|
+
top: 7px;
|
|
1383
|
+
left: 5px;
|
|
1403
1384
|
}
|
|
1404
1385
|
|
|
1405
1386
|
span {
|
|
@@ -1409,32 +1390,32 @@ $transition-time: 0.3s;
|
|
|
1409
1390
|
}
|
|
1410
1391
|
|
|
1411
1392
|
&__day-button {
|
|
1412
|
-
outline: none;
|
|
1413
1393
|
position: relative;
|
|
1414
|
-
background: transparent;
|
|
1415
1394
|
width: 35px;
|
|
1416
1395
|
height: 35px;
|
|
1417
1396
|
border: none;
|
|
1418
|
-
|
|
1397
|
+
background: transparent;
|
|
1419
1398
|
font-size: 14px;
|
|
1399
|
+
outline: none;
|
|
1400
|
+
user-select: none;
|
|
1420
1401
|
|
|
1421
1402
|
.asd__day-number {
|
|
1422
|
-
z-index: 3;
|
|
1423
1403
|
position: relative;
|
|
1404
|
+
z-index: 3;
|
|
1424
1405
|
color: var(--cp-text-primary);
|
|
1425
1406
|
}
|
|
1426
1407
|
}
|
|
1427
1408
|
|
|
1428
1409
|
&__mobile-header {
|
|
1429
|
-
border-bottom: var(--cp-border-soft);
|
|
1430
1410
|
position: relative;
|
|
1431
|
-
padding: 15px 15px 15px 15px !important;
|
|
1432
|
-
text-align: center;
|
|
1433
1411
|
height: 50px;
|
|
1412
|
+
padding: 15px !important;
|
|
1413
|
+
border-bottom: var(--cp-border-soft);
|
|
1414
|
+
text-align: center;
|
|
1434
1415
|
|
|
1435
1416
|
h3 {
|
|
1436
|
-
font-size: 20px;
|
|
1437
1417
|
margin: 0;
|
|
1418
|
+
font-size: 20px;
|
|
1438
1419
|
}
|
|
1439
1420
|
}
|
|
1440
1421
|
|
|
@@ -1447,19 +1428,19 @@ $transition-time: 0.3s;
|
|
|
1447
1428
|
}
|
|
1448
1429
|
|
|
1449
1430
|
&__mobile-close {
|
|
1450
|
-
border: none;
|
|
1451
1431
|
position: absolute;
|
|
1432
|
+
z-index: 100;
|
|
1452
1433
|
top: 7px;
|
|
1453
1434
|
right: 5px;
|
|
1454
1435
|
padding: 5px;
|
|
1455
|
-
|
|
1436
|
+
border: none;
|
|
1456
1437
|
cursor: pointer;
|
|
1457
1438
|
|
|
1458
1439
|
&__icon {
|
|
1459
1440
|
position: relative;
|
|
1441
|
+
padding: 0;
|
|
1460
1442
|
font-size: 1.6em;
|
|
1461
1443
|
font-weight: bold;
|
|
1462
|
-
padding: 0;
|
|
1463
1444
|
}
|
|
1464
1445
|
}
|
|
1465
1446
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/vue3-vite'
|
|
2
2
|
|
|
3
|
-
import { docLabelStyle } from '@/stories/documentationStyles'
|
|
4
3
|
import type { Token } from '@/stories/tokenUtils'
|
|
4
|
+
|
|
5
|
+
import { docLabelStyle } from '@/stories/documentationStyles'
|
|
5
6
|
import { copyableClass, copyableCopiedClass, readTokens, useCopier } from '@/stories/tokenUtils'
|
|
6
7
|
|
|
7
8
|
const meta: Meta = {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { computed } from 'vue'
|
|
2
|
-
|
|
3
1
|
import type { Args, Meta, StoryObj } from '@storybook/vue3-vite'
|
|
4
2
|
import type { MenuItem } from 'primevue/menuitem'
|
|
3
|
+
import { computed } from 'vue'
|
|
5
4
|
|
|
6
5
|
import type { CpAccordionBaseProps } from '@/components/CpAccordion.vue'
|
|
6
|
+
|
|
7
7
|
import CpAccordion from '@/components/CpAccordion.vue'
|
|
8
8
|
import CpButton from '@/components/CpButton.vue'
|
|
9
9
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { computed } from 'vue'
|
|
2
|
-
|
|
3
1
|
import type { Args, Meta, StoryObj } from '@storybook/vue3-vite'
|
|
4
2
|
import type { MenuItem } from 'primevue/menuitem'
|
|
3
|
+
import { computed } from 'vue'
|
|
5
4
|
|
|
6
5
|
import CpAccordion from '@/components/CpAccordion.vue'
|
|
7
6
|
import CpAccordionGroup from '@/components/CpAccordionGroup.vue'
|