@citizenplane/pimp 18.9.11 → 18.9.13
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/package.json
CHANGED
|
@@ -78,6 +78,7 @@ interface InputsOptions {
|
|
|
78
78
|
type DateField = 'day' | 'month'
|
|
79
79
|
|
|
80
80
|
interface Props {
|
|
81
|
+
allowEmpty?: boolean
|
|
81
82
|
autocompleteBirthday?: boolean
|
|
82
83
|
disabled?: boolean
|
|
83
84
|
displayErrorMessage?: boolean
|
|
@@ -99,6 +100,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
99
100
|
maxDate: () => DateTime.now().toISO(),
|
|
100
101
|
label: '',
|
|
101
102
|
required: false,
|
|
103
|
+
allowEmpty: false,
|
|
102
104
|
disabled: false,
|
|
103
105
|
isInvalid: false,
|
|
104
106
|
errorMessage: '',
|
|
@@ -179,7 +181,7 @@ const areInputsEmpty = computed(() => {
|
|
|
179
181
|
})
|
|
180
182
|
|
|
181
183
|
const isDateValid = computed(() => {
|
|
182
|
-
if (areInputsEmpty.value && !props.required)
|
|
184
|
+
if (areInputsEmpty.value && (!props.required || props.allowEmpty)) return true
|
|
183
185
|
|
|
184
186
|
return (
|
|
185
187
|
!props.isInvalid &&
|
|
@@ -476,7 +478,7 @@ watch(year, handleUpdate)
|
|
|
476
478
|
opacity: 0.4;
|
|
477
479
|
}
|
|
478
480
|
}
|
|
479
|
-
|
|
481
|
+
|
|
480
482
|
&--isInvalid {
|
|
481
483
|
.cpDate__inputs,
|
|
482
484
|
.cpDate__inputs:hover {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="cpTable" :class="mainClasses">
|
|
3
|
-
<
|
|
3
|
+
<section
|
|
4
4
|
ref="cpTableContainer"
|
|
5
5
|
:aria-labelledby="uniqueId"
|
|
6
6
|
class="cpTable__container"
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
</tbody>
|
|
92
92
|
</table>
|
|
93
93
|
<cp-table-empty-state v-if="hasNoResult" class="cpTable__emptyState" :placeholder="noResultPlaceholder" />
|
|
94
|
-
</
|
|
94
|
+
</section>
|
|
95
95
|
<cp-table-footer
|
|
96
96
|
v-if="hasPagination"
|
|
97
97
|
:is-loading="isLoading"
|
|
@@ -574,7 +574,7 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
|
|
|
574
574
|
}
|
|
575
575
|
|
|
576
576
|
/* Scrolling Visual Cue */
|
|
577
|
-
&__container[
|
|
577
|
+
&__container[aria-labelledby][tabindex] {
|
|
578
578
|
@extend %u-scrolling-visual-cue;
|
|
579
579
|
|
|
580
580
|
overflow: auto;
|
|
@@ -616,12 +616,12 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
|
|
|
616
616
|
var(--cp-dimensions-3_5) 100%;
|
|
617
617
|
}
|
|
618
618
|
|
|
619
|
-
&__container[
|
|
619
|
+
&__container[aria-labelledby][tabindex]:focus {
|
|
620
620
|
border-radius: var(--cp-radius-md-lg);
|
|
621
621
|
box-shadow: 0 0 0 calc(var(--cp-dimensions-0_5) * 1.5) var(--cp-focus);
|
|
622
622
|
}
|
|
623
623
|
|
|
624
|
-
&__container[
|
|
624
|
+
&__container[aria-labelledby][tabindex] &__table {
|
|
625
625
|
border: none;
|
|
626
626
|
margin: 0;
|
|
627
627
|
}
|