@citizenplane/pimp 18.7.0 → 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.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 +6794 -6459
- 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 +10 -10
- 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 +1 -2
- 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
|
@@ -32,11 +32,10 @@
|
|
|
32
32
|
import { computed, useId } from 'vue'
|
|
33
33
|
import { useWebHaptics } from 'web-haptics/vue'
|
|
34
34
|
|
|
35
|
-
import { Haptics } from '@/constants/Hapitcs'
|
|
36
|
-
|
|
37
35
|
import CpTooltip from '@/components/CpTooltip.vue'
|
|
38
36
|
|
|
39
37
|
import { ToggleColors } from '@/constants'
|
|
38
|
+
import { Haptics } from '@/constants/Hapitcs'
|
|
40
39
|
import { capitalizeFirstLetter } from '@/helpers'
|
|
41
40
|
|
|
42
41
|
interface Props {
|
|
@@ -135,6 +134,7 @@ const handleClick = (value: boolean): void => {
|
|
|
135
134
|
|
|
136
135
|
.cpSwitch {
|
|
137
136
|
--cp-switch-base-height: var(--cp-dimensions-5);
|
|
137
|
+
|
|
138
138
|
align-items: center;
|
|
139
139
|
|
|
140
140
|
&,
|
|
@@ -163,15 +163,15 @@ const handleClick = (value: boolean): void => {
|
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
&__tooltip {
|
|
166
|
-
color: var(--cp-foreground-quaternary);
|
|
167
166
|
padding: var(--cp-spacing-sm);
|
|
167
|
+
color: var(--cp-foreground-quaternary);
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
&--hasLabel {
|
|
171
171
|
display: grid;
|
|
172
|
-
grid-template-columns: min-content 1fr;
|
|
173
|
-
grid-gap: var(--cp-spacing-lg);
|
|
174
172
|
align-items: flex-start;
|
|
173
|
+
gap: var(--cp-spacing-lg);
|
|
174
|
+
grid-template-columns: min-content 1fr;
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
&--isReversed {
|
|
@@ -182,6 +182,40 @@ const handleClick = (value: boolean): void => {
|
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
+
&__knobContainer {
|
|
186
|
+
display: flex;
|
|
187
|
+
width: 100%;
|
|
188
|
+
align-items: center;
|
|
189
|
+
padding: var(--cp-dimensions-0_5);
|
|
190
|
+
transition: transform 300ms var(--cp-easing-elastic);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
&__knob {
|
|
194
|
+
width: calc(var(--cp-switch-base-height) - var(--cp-dimensions-1));
|
|
195
|
+
height: calc(var(--cp-switch-base-height) - var(--cp-dimensions-1));
|
|
196
|
+
border-radius: var(--cp-radius-full);
|
|
197
|
+
background-color: var(--cp-foreground-white);
|
|
198
|
+
box-shadow: var(--cp-shadows-3xs);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
&--isActive .cpSwitch {
|
|
202
|
+
&__knobContainer {
|
|
203
|
+
transform: translate3d(50%, 0, 0);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
&__switch {
|
|
208
|
+
position: relative;
|
|
209
|
+
display: flex;
|
|
210
|
+
overflow: hidden;
|
|
211
|
+
width: calc(var(--cp-switch-base-height) * 2);
|
|
212
|
+
height: var(--cp-switch-base-height);
|
|
213
|
+
border-radius: var(--cp-radius-full);
|
|
214
|
+
background-color: var(--cp-background-quaternary);
|
|
215
|
+
margin-block: var(--cp-spacing-xs);
|
|
216
|
+
transition: background-color 100ms ease-out;
|
|
217
|
+
}
|
|
218
|
+
|
|
185
219
|
&--isDisabled,
|
|
186
220
|
&--isDisabled:hover {
|
|
187
221
|
&,
|
|
@@ -190,8 +224,8 @@ const handleClick = (value: boolean): void => {
|
|
|
190
224
|
}
|
|
191
225
|
|
|
192
226
|
.cpSwitch__switch {
|
|
193
|
-
background-color: var(--cp-background-disabled);
|
|
194
227
|
border: var(--cp-dimensions-0_25) solid var(--cp-border-disabled);
|
|
228
|
+
background-color: var(--cp-background-disabled);
|
|
195
229
|
}
|
|
196
230
|
|
|
197
231
|
.cpSwitch__label,
|
|
@@ -200,10 +234,10 @@ const handleClick = (value: boolean): void => {
|
|
|
200
234
|
}
|
|
201
235
|
|
|
202
236
|
.cpSwitch__knob {
|
|
203
|
-
background-color: var(--cp-foreground-disabled);
|
|
204
|
-
box-shadow: none;
|
|
205
237
|
width: calc(var(--cp-switch-base-height) * 0.5 - var(--cp-dimensions-0_5));
|
|
206
238
|
height: calc(var(--cp-switch-base-height) * 0.5 - var(--cp-dimensions-0_5));
|
|
239
|
+
background-color: var(--cp-foreground-disabled);
|
|
240
|
+
box-shadow: none;
|
|
207
241
|
}
|
|
208
242
|
|
|
209
243
|
.cpSwitch__knobContainer {
|
|
@@ -211,52 +245,17 @@ const handleClick = (value: boolean): void => {
|
|
|
211
245
|
}
|
|
212
246
|
}
|
|
213
247
|
|
|
214
|
-
&--isActive .cpSwitch {
|
|
215
|
-
&__knobContainer {
|
|
216
|
-
transform: translate3d(50%, 0, 0);
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
|
|
220
248
|
@include cp-switch-style(var(--cp-background-accent-solid), 'Accent');
|
|
221
|
-
|
|
222
249
|
@include cp-switch-style(var(--cp-background-accent-solid), 'Purple'); // TODO: Should be replace by ACCENT
|
|
223
250
|
|
|
224
|
-
&__switch {
|
|
225
|
-
position: relative;
|
|
226
|
-
border-radius: var(--cp-radius-full);
|
|
227
|
-
background-color: var(--cp-background-quaternary);
|
|
228
|
-
overflow: hidden;
|
|
229
|
-
transition: background-color 100ms ease-out;
|
|
230
|
-
display: flex;
|
|
231
|
-
height: var(--cp-switch-base-height);
|
|
232
|
-
width: calc(var(--cp-switch-base-height) * 2);
|
|
233
|
-
margin-block: var(--cp-spacing-xs);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
251
|
input {
|
|
237
252
|
position: absolute;
|
|
238
253
|
z-index: 1;
|
|
239
254
|
top: 0;
|
|
240
255
|
left: 0;
|
|
241
|
-
opacity: 0;
|
|
242
256
|
width: 100%;
|
|
243
257
|
height: 100%;
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
&__knobContainer {
|
|
247
|
-
width: 100%;
|
|
248
|
-
padding: var(--cp-dimensions-0_5);
|
|
249
|
-
display: flex;
|
|
250
|
-
align-items: center;
|
|
251
|
-
transition: transform 300ms var(--cp-easing-elastic);
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
&__knob {
|
|
255
|
-
background-color: var(--cp-foreground-white);
|
|
256
|
-
border-radius: var(--cp-radius-full);
|
|
257
|
-
box-shadow: var(--cp-shadows-3xs);
|
|
258
|
-
width: calc(var(--cp-switch-base-height) - var(--cp-dimensions-1));
|
|
259
|
-
height: calc(var(--cp-switch-base-height) - var(--cp-dimensions-1));
|
|
258
|
+
opacity: 0;
|
|
260
259
|
}
|
|
261
260
|
}
|
|
262
261
|
</style>
|
|
@@ -120,20 +120,17 @@
|
|
|
120
120
|
</template>
|
|
121
121
|
|
|
122
122
|
<script setup lang="ts">
|
|
123
|
-
import { ref, computed, useId, watch, useSlots } from 'vue'
|
|
124
|
-
|
|
125
123
|
import type { MenuItemCommandEvent } from 'primevue/menuitem'
|
|
126
|
-
|
|
127
|
-
import { CpTableColumnObject } from '@/constants/CpTableColumn'
|
|
124
|
+
import { computed, ref, useId, useSlots, watch } from 'vue'
|
|
128
125
|
|
|
129
126
|
import CpContextualMenu from '@/components/CpContextualMenu.vue'
|
|
130
127
|
import CpTableEmptyState from '@/components/CpTableEmptyState.vue'
|
|
131
128
|
import CpTableFooter from '@/components/CpTableFooter.vue'
|
|
132
129
|
|
|
133
|
-
import { camelize, decamelize } from '@/helpers/string'
|
|
134
|
-
|
|
135
130
|
import { RESERVED_KEYS, VISIBLE_ROWS_MAX } from '@/constants'
|
|
131
|
+
import { CpTableColumnObject } from '@/constants/CpTableColumn'
|
|
136
132
|
import { capitalizeFirstLetter } from '@/helpers'
|
|
133
|
+
import { camelize, decamelize } from '@/helpers/string'
|
|
137
134
|
|
|
138
135
|
interface Emits {
|
|
139
136
|
(evt: 'onRowClick', data: Record<string, unknown>): void
|
|
@@ -564,33 +561,24 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
|
|
|
564
561
|
&__container {
|
|
565
562
|
position: relative;
|
|
566
563
|
display: flex;
|
|
567
|
-
flex-direction: column;
|
|
568
564
|
flex: 1;
|
|
565
|
+
flex-direction: column;
|
|
569
566
|
|
|
570
567
|
&--hasPagination {
|
|
571
568
|
border-bottom: var(--cp-dimensions-0_25) solid var(--cp-border-soft);
|
|
572
569
|
}
|
|
573
570
|
}
|
|
574
571
|
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
&__container[role='region'][aria-labelledby][tabindex]:focus {
|
|
581
|
-
border-radius: var(--cp-radius-md-lg);
|
|
582
|
-
box-shadow: 0 0 0 calc(var(--cp-dimensions-0_5) * 1.5) var(--cp-focus);
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
&__container[role='region'][aria-labelledby][tabindex] &__table {
|
|
586
|
-
margin: 0;
|
|
587
|
-
border: none;
|
|
572
|
+
&__table {
|
|
573
|
+
width: 100%;
|
|
574
|
+
border-collapse: collapse;
|
|
588
575
|
}
|
|
589
576
|
|
|
590
577
|
/* Scrolling Visual Cue */
|
|
591
578
|
&__container[role='region'][aria-labelledby][tabindex] {
|
|
592
579
|
@extend %u-scrolling-visual-cue;
|
|
593
580
|
|
|
581
|
+
overflow: auto;
|
|
594
582
|
background:
|
|
595
583
|
linear-gradient(
|
|
596
584
|
to right,
|
|
@@ -614,36 +602,50 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
|
|
|
614
602
|
color-mix(in srgb, #{var(--cp-colors-grey-shadow-color-50)} 0%, transparent)
|
|
615
603
|
)
|
|
616
604
|
0 100%;
|
|
617
|
-
background-
|
|
605
|
+
background-attachment: local, local, scroll, scroll;
|
|
618
606
|
background-color: var(--cp-background-white);
|
|
619
|
-
background-size:
|
|
620
|
-
var(--cp-dimensions-10) 100%,
|
|
621
|
-
var(--cp-dimensions-10) 100%,
|
|
622
|
-
var(--cp-dimensions-3_5) 100%,
|
|
623
|
-
var(--cp-dimensions-3_5) 100%;
|
|
624
607
|
background-position:
|
|
625
608
|
0 0,
|
|
626
609
|
100%,
|
|
627
610
|
0 0,
|
|
628
611
|
100%;
|
|
629
|
-
background-
|
|
612
|
+
background-repeat: no-repeat;
|
|
613
|
+
background-size:
|
|
614
|
+
var(--cp-dimensions-10) 100%,
|
|
615
|
+
var(--cp-dimensions-10) 100%,
|
|
616
|
+
var(--cp-dimensions-3_5) 100%,
|
|
617
|
+
var(--cp-dimensions-3_5) 100%;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
&__container[role='region'][aria-labelledby][tabindex]:focus {
|
|
621
|
+
border-radius: var(--cp-radius-md-lg);
|
|
622
|
+
box-shadow: 0 0 0 calc(var(--cp-dimensions-0_5) * 1.5) var(--cp-focus);
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
&__container[role='region'][aria-labelledby][tabindex] &__table {
|
|
626
|
+
border: none;
|
|
627
|
+
margin: 0;
|
|
630
628
|
}
|
|
631
629
|
|
|
632
630
|
&__caption {
|
|
633
631
|
position: sticky;
|
|
634
632
|
left: 0;
|
|
635
633
|
margin-bottom: var(--cp-spacing-xl);
|
|
636
|
-
text-align: left;
|
|
637
634
|
font-size: var(--cp-text-size-lg);
|
|
635
|
+
text-align: left;
|
|
638
636
|
|
|
639
|
-
|
|
637
|
+
&::first-letter {
|
|
640
638
|
text-transform: capitalize;
|
|
641
639
|
}
|
|
642
640
|
}
|
|
643
641
|
|
|
644
|
-
&
|
|
645
|
-
|
|
646
|
-
|
|
642
|
+
&__body {
|
|
643
|
+
vertical-align: middle;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
&__row--body,
|
|
647
|
+
&__cell {
|
|
648
|
+
vertical-align: inherit;
|
|
647
649
|
}
|
|
648
650
|
|
|
649
651
|
&__row {
|
|
@@ -684,30 +686,30 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
|
|
|
684
686
|
|
|
685
687
|
&__column {
|
|
686
688
|
position: sticky;
|
|
687
|
-
top: 0;
|
|
688
689
|
z-index: 3;
|
|
690
|
+
top: 0;
|
|
689
691
|
padding: var(--cp-spacing-md) var(--cp-spacing-lg);
|
|
690
|
-
|
|
691
|
-
|
|
692
|
+
background-color: var(--cp-background-primary);
|
|
693
|
+
color: var(--cp-text-secondary);
|
|
692
694
|
font-size: var(--cp-text-size-xs);
|
|
693
|
-
line-height: var(--cp-line-height-xs);
|
|
694
695
|
font-weight: normal;
|
|
695
|
-
|
|
696
|
-
|
|
696
|
+
line-height: var(--cp-line-height-xs);
|
|
697
|
+
text-align: left;
|
|
698
|
+
white-space: nowrap;
|
|
697
699
|
|
|
698
|
-
|
|
700
|
+
&::first-letter {
|
|
699
701
|
text-transform: capitalize;
|
|
700
702
|
}
|
|
701
703
|
|
|
702
704
|
/* Workaround for sticky header border-bottom */
|
|
703
|
-
|
|
704
|
-
content: '';
|
|
705
|
+
&::after {
|
|
705
706
|
position: absolute;
|
|
706
707
|
bottom: 0;
|
|
707
708
|
left: 0;
|
|
708
709
|
width: 100%;
|
|
709
710
|
height: var(--cp-dimensions-0_25);
|
|
710
711
|
background-color: var(--cp-border-soft);
|
|
712
|
+
content: '';
|
|
711
713
|
}
|
|
712
714
|
|
|
713
715
|
&--isOptions {
|
|
@@ -728,15 +730,6 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
|
|
|
728
730
|
}
|
|
729
731
|
}
|
|
730
732
|
|
|
731
|
-
&__body {
|
|
732
|
-
vertical-align: middle;
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
&__row--body,
|
|
736
|
-
&__cell {
|
|
737
|
-
vertical-align: inherit;
|
|
738
|
-
}
|
|
739
|
-
|
|
740
733
|
&__cell {
|
|
741
734
|
&:not(#{&}--isFullWidth):not(#{&}--isOptions) {
|
|
742
735
|
padding: var(--cp-spacing-xl) var(--cp-spacing-lg);
|
|
@@ -750,8 +743,8 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
|
|
|
750
743
|
|
|
751
744
|
&--isFullWidth > * {
|
|
752
745
|
left: 50%;
|
|
753
|
-
transform: translateX(-50%);
|
|
754
746
|
display: inline-block;
|
|
747
|
+
transform: translateX(-50%);
|
|
755
748
|
}
|
|
756
749
|
|
|
757
750
|
&--isOptions {
|
|
@@ -777,8 +770,8 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
|
|
|
777
770
|
}
|
|
778
771
|
|
|
779
772
|
&:is(:hover, :focus):not(:disabled) {
|
|
780
|
-
box-shadow: none;
|
|
781
773
|
background-color: var(--cp-background-primary-hover);
|
|
774
|
+
box-shadow: none;
|
|
782
775
|
color: var(--cp-foreground-primary);
|
|
783
776
|
}
|
|
784
777
|
|
|
@@ -798,18 +791,18 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
|
|
|
798
791
|
}
|
|
799
792
|
|
|
800
793
|
&:focus {
|
|
801
|
-
outline: none !important;
|
|
802
794
|
box-shadow: 0 0 0 calc(var(--cp-dimensions-0_5) * 1.5) var(--cp-focus);
|
|
795
|
+
outline: none !important;
|
|
803
796
|
}
|
|
804
797
|
}
|
|
805
798
|
|
|
806
799
|
@mixin cp-table-only-default-action-visible-style {
|
|
807
800
|
padding: var(--cp-spacing-sm);
|
|
801
|
+
border-radius: var(--cp-radius-md);
|
|
802
|
+
background-color: var(--cp-background-primary);
|
|
808
803
|
box-shadow:
|
|
809
804
|
var(--cp-shadows-3xs),
|
|
810
805
|
0 0 0 var(--cp-dimensions-0_25) var(--cp-border-soft);
|
|
811
|
-
border-radius: var(--cp-radius-md);
|
|
812
|
-
background-color: var(--cp-background-primary);
|
|
813
806
|
}
|
|
814
807
|
|
|
815
808
|
// Solo default action mode
|
|
@@ -850,17 +843,17 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
|
|
|
850
843
|
// Actions wrapper on desktop : displayed only if there are quick actions inside
|
|
851
844
|
&__cell--isOptions .cpTable__actions {
|
|
852
845
|
position: absolute;
|
|
853
|
-
opacity: 0;
|
|
854
846
|
top: 50%;
|
|
855
|
-
transform: translateY(-50%);
|
|
856
847
|
right: var(--cp-dimensions-3);
|
|
857
848
|
display: inline-flex;
|
|
858
849
|
overflow: hidden;
|
|
850
|
+
border-radius: var(--cp-radius-md);
|
|
851
|
+
background-color: var(--cp-background-primary);
|
|
859
852
|
box-shadow:
|
|
860
853
|
var(--cp-shadows-3xs),
|
|
861
854
|
0 0 0 var(--cp-dimensions-0_25) var(--cp-border-soft);
|
|
862
|
-
|
|
863
|
-
|
|
855
|
+
opacity: 0;
|
|
856
|
+
transform: translateY(-50%);
|
|
864
857
|
|
|
865
858
|
&:has(.cpTable__action:only-child) {
|
|
866
859
|
right: var(--cp-dimensions-4);
|
|
@@ -882,38 +875,22 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
|
|
|
882
875
|
flex: 1;
|
|
883
876
|
}
|
|
884
877
|
|
|
885
|
-
&--isLoading &__overlay {
|
|
886
|
-
opacity: 0.5;
|
|
887
|
-
pointer-events: all;
|
|
888
|
-
|
|
889
|
-
&::after {
|
|
890
|
-
animation-play-state: running;
|
|
891
|
-
}
|
|
892
|
-
}
|
|
893
878
|
|
|
894
879
|
&__overlay {
|
|
895
880
|
position: absolute;
|
|
881
|
+
z-index: 4;
|
|
896
882
|
overflow: hidden;
|
|
897
|
-
left: 0;
|
|
898
|
-
right: 0;
|
|
899
|
-
top: 0;
|
|
900
|
-
bottom: 0;
|
|
901
883
|
border-radius: var(--cp-radius-md-lg);
|
|
902
884
|
background-color: var(--cp-background-primary);
|
|
903
|
-
z-index: 4;
|
|
904
|
-
opacity: 0;
|
|
905
|
-
transition: 0.15s opacity ease-in-out;
|
|
906
885
|
cursor: wait;
|
|
886
|
+
inset: 0;
|
|
887
|
+
opacity: 0;
|
|
907
888
|
pointer-events: none;
|
|
889
|
+
transition: 0.15s opacity ease-in-out;
|
|
908
890
|
|
|
909
891
|
&::after {
|
|
910
|
-
content: '';
|
|
911
892
|
position: absolute;
|
|
912
|
-
|
|
913
|
-
right: 0;
|
|
914
|
-
bottom: 0;
|
|
915
|
-
left: 0;
|
|
916
|
-
transform: translate3d(-100%, 0, 0);
|
|
893
|
+
animation: shimmer 2s infinite paused;
|
|
917
894
|
background-image: linear-gradient(
|
|
918
895
|
90deg,
|
|
919
896
|
color-mix(in srgb, #{var(--cp-colors-grey-shadow-color-20)} 0%, transparent) 0,
|
|
@@ -921,7 +898,9 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
|
|
|
921
898
|
color-mix(in srgb, #{var(--cp-colors-grey-shadow-color-20)} 50%, transparent) 60%,
|
|
922
899
|
color-mix(in srgb, #{var(--cp-colors-grey-shadow-color-20)} 0%, transparent)
|
|
923
900
|
);
|
|
924
|
-
|
|
901
|
+
content: '';
|
|
902
|
+
inset: 0;
|
|
903
|
+
transform: translate3d(-100%, 0, 0);
|
|
925
904
|
}
|
|
926
905
|
|
|
927
906
|
@keyframes shimmer {
|
|
@@ -930,5 +909,14 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
|
|
|
930
909
|
}
|
|
931
910
|
}
|
|
932
911
|
}
|
|
912
|
+
|
|
913
|
+
&--isLoading &__overlay {
|
|
914
|
+
opacity: 0.5;
|
|
915
|
+
pointer-events: all;
|
|
916
|
+
|
|
917
|
+
&::after {
|
|
918
|
+
animation-play-state: running;
|
|
919
|
+
}
|
|
920
|
+
}
|
|
933
921
|
}
|
|
934
922
|
</style>
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
</template>
|
|
82
82
|
|
|
83
83
|
<script setup lang="ts">
|
|
84
|
-
import { computed, ref,
|
|
84
|
+
import { computed, ref, useId, useTemplateRef } from 'vue'
|
|
85
85
|
|
|
86
86
|
import type { CpTableColumnObject } from '@/constants/CpTableColumn'
|
|
87
87
|
|
|
@@ -149,21 +149,21 @@ const handleDropdownShown = () => {
|
|
|
149
149
|
|
|
150
150
|
<style lang="scss">
|
|
151
151
|
.cpTableColumnEditor {
|
|
152
|
-
text-align: right;
|
|
153
152
|
padding-bottom: var(--cp-spacing-xs);
|
|
153
|
+
text-align: right;
|
|
154
154
|
|
|
155
155
|
&__trigger {
|
|
156
156
|
@extend %u-focus-outline;
|
|
157
157
|
|
|
158
|
-
color: var(--cp-text-secondary);
|
|
159
158
|
border-radius: var(--cp-radius-md);
|
|
159
|
+
color: var(--cp-text-secondary);
|
|
160
160
|
|
|
161
161
|
&--isOpen,
|
|
162
162
|
&:hover,
|
|
163
163
|
&:focus-within {
|
|
164
|
-
transform: none;
|
|
165
|
-
outline-offset: 0;
|
|
166
164
|
background-color: var(--cp-background-primary-hover);
|
|
165
|
+
outline-offset: 0;
|
|
166
|
+
transform: none;
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
|
|
@@ -183,24 +183,24 @@ const handleDropdownShown = () => {
|
|
|
183
183
|
padding-inline: var(--cp-spacing-lg);
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
+
&__column,
|
|
187
|
+
&__empty {
|
|
188
|
+
font-size: var(--cp-text-size-sm);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&__column {
|
|
192
|
+
text-transform: capitalize;
|
|
193
|
+
}
|
|
194
|
+
|
|
186
195
|
&__heading,
|
|
187
196
|
&__column:not(:has(.cpTableColumnEditor__checkbox)) {
|
|
188
197
|
padding: var(--cp-spacing-sm) var(--cp-spacing-lg);
|
|
189
198
|
}
|
|
190
199
|
|
|
191
200
|
&__heading {
|
|
201
|
+
color: var(--cp-text-secondary);
|
|
192
202
|
font-size: var(--cp-text-size-xs);
|
|
193
203
|
line-height: var(--cp-line-height-md);
|
|
194
|
-
color: var(--cp-text-secondary);
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
&__column,
|
|
198
|
-
&__empty {
|
|
199
|
-
font-size: var(--cp-text-size-sm);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
&__column {
|
|
203
|
-
text-transform: capitalize;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
&__empty {
|
|
@@ -213,8 +213,8 @@ const handleDropdownShown = () => {
|
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
&__checkbox {
|
|
216
|
-
color: var(--cp-text-primary);
|
|
217
216
|
padding: var(--cp-spacing-sm) var(--cp-spacing-md);
|
|
217
|
+
color: var(--cp-text-primary);
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
</style>
|
|
@@ -20,17 +20,17 @@ defineProps<Props>()
|
|
|
20
20
|
|
|
21
21
|
<style lang="scss">
|
|
22
22
|
.cpTableEmptyState {
|
|
23
|
-
padding: 10vh var(--cp-spacing-xl);
|
|
24
23
|
display: flex;
|
|
25
24
|
align-items: center;
|
|
26
25
|
justify-content: center;
|
|
26
|
+
padding: 10vh var(--cp-spacing-xl);
|
|
27
27
|
|
|
28
28
|
&__icon {
|
|
29
|
-
margin-bottom: var(--cp-spacing-2xl);
|
|
30
|
-
border-radius: var(--cp-radius-sm);
|
|
31
29
|
display: inline-block;
|
|
32
|
-
background-color: var(--cp-background-secondary);
|
|
33
30
|
padding: var(--cp-spacing-xl);
|
|
31
|
+
border-radius: var(--cp-radius-sm);
|
|
32
|
+
margin-bottom: var(--cp-spacing-2xl);
|
|
33
|
+
background-color: var(--cp-background-secondary);
|
|
34
34
|
color: var(--cp-foreground-secondary);
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -98,15 +98,15 @@ const pageLastResultIndex = computed(() => {
|
|
|
98
98
|
<style scoped lang="scss">
|
|
99
99
|
.cpTableFooter {
|
|
100
100
|
position: sticky;
|
|
101
|
-
bottom: var(--cp-spacing-md);
|
|
102
101
|
z-index: 3;
|
|
102
|
+
bottom: var(--cp-spacing-md);
|
|
103
103
|
|
|
104
104
|
&__loader {
|
|
105
105
|
display: inline-flex;
|
|
106
106
|
align-items: center;
|
|
107
|
-
gap: var(--cp-spacing-sm);
|
|
108
107
|
color: var(--cp-text-secondary);
|
|
109
108
|
font-size: var(--cp-text-size-sm);
|
|
109
|
+
gap: var(--cp-spacing-sm);
|
|
110
110
|
line-height: var(--cp-line-height-sm);
|
|
111
111
|
}
|
|
112
112
|
|
|
@@ -57,8 +57,8 @@ const emit = defineEmits<Emits>()
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
&__results {
|
|
60
|
-
font-variant-numeric: tabular-nums;
|
|
61
60
|
color: var(--cp-text-secondary);
|
|
61
|
+
font-variant-numeric: tabular-nums;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
&__results strong {
|
|
@@ -66,8 +66,8 @@ const emit = defineEmits<Emits>()
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
&__pagination {
|
|
69
|
-
justify-content: flex-end;
|
|
70
69
|
display: flex;
|
|
70
|
+
justify-content: flex-end;
|
|
71
71
|
gap: var(--cp-spacing-md);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -35,17 +35,17 @@ const paginationResultsDetails = computed(() => {
|
|
|
35
35
|
<style lang="scss">
|
|
36
36
|
.cpTableFooterDetails {
|
|
37
37
|
&__paginationLabel {
|
|
38
|
-
font-weight: 600;
|
|
39
38
|
color: var(--cp-text-primary);
|
|
40
39
|
font-size: var(--cp-text-size-xs);
|
|
40
|
+
font-weight: 600;
|
|
41
41
|
line-height: var(--cp-line-height-xs);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
&__resultsCount,
|
|
45
45
|
&__noResults {
|
|
46
|
-
font-weight: 500;
|
|
47
46
|
color: var(--cp-text-secondary);
|
|
48
47
|
font-size: var(--cp-text-size-xs);
|
|
48
|
+
font-weight: 500;
|
|
49
49
|
line-height: var(--cp-line-height-xs);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -47,16 +47,16 @@ const emit = defineEmits<Emits>()
|
|
|
47
47
|
|
|
48
48
|
<style scoped lang="scss">
|
|
49
49
|
.cpTableFooterMobile {
|
|
50
|
+
z-index: 3;
|
|
50
51
|
display: flex;
|
|
51
52
|
align-items: center;
|
|
52
53
|
justify-content: space-between;
|
|
53
|
-
gap: var(--cp-spacing-md);
|
|
54
|
-
font-size: var(--cp-text-size-sm);
|
|
55
54
|
padding: var(--cp-spacing-xs) var(--cp-spacing-xl);
|
|
56
|
-
box-shadow: var(--cp-shadows-overlay);
|
|
57
55
|
border-radius: var(--cp-radius-md);
|
|
58
56
|
background: var(--cp-background-primary);
|
|
59
|
-
|
|
57
|
+
box-shadow: var(--cp-shadows-overlay);
|
|
58
|
+
font-size: var(--cp-text-size-sm);
|
|
59
|
+
gap: var(--cp-spacing-md);
|
|
60
60
|
|
|
61
61
|
.cpButton--isDisabled {
|
|
62
62
|
background: var(--cp-background-primary);
|