classcard-ui 0.2.772 → 0.2.775
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/dist/classcard-ui.common.js +67 -61
- package/dist/classcard-ui.common.js.map +1 -1
- package/dist/classcard-ui.umd.js +67 -61
- package/dist/classcard-ui.umd.js.map +1 -1
- package/dist/classcard-ui.umd.min.js +1 -1
- package/dist/classcard-ui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CCollapsibleSection/CCollapsibleSection.vue +11 -9
- package/src/components/CTable/CTable.vue +5 -1
package/package.json
CHANGED
|
@@ -2,26 +2,24 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<div
|
|
4
4
|
:class="divider || showSection ? 'border-b border-gray-200 pb-2' : ''"
|
|
5
|
-
class="flex flex-row items-center justify-between
|
|
5
|
+
class="flex cursor-pointer flex-row items-center justify-between"
|
|
6
6
|
@click.self="collapse"
|
|
7
7
|
>
|
|
8
8
|
<!-- left and right arrow icon as per opening and closing of collapsible -->
|
|
9
|
-
<div
|
|
10
|
-
class="flex flex-row items-center"
|
|
11
|
-
@click="collapse"
|
|
12
|
-
>
|
|
9
|
+
<div class="flex flex-row items-center" @click="collapse">
|
|
13
10
|
<c-icon
|
|
14
11
|
:name="showSection ? 'chevron-down' : 'chevron-right'"
|
|
15
|
-
class="
|
|
12
|
+
class="h-5 w-5 text-gray-900"
|
|
16
13
|
type="solid"
|
|
17
14
|
></c-icon>
|
|
18
15
|
<!-- label of the collapsible section -->
|
|
19
16
|
<div
|
|
20
17
|
:class="{ 'py-2': tabAction }"
|
|
21
|
-
class="border-transparent text-
|
|
18
|
+
class="ml-1 whitespace-nowrap border-transparent text-base font-semibold text-gray-900 hover:border-gray-300 hover:text-gray-700"
|
|
22
19
|
>
|
|
23
20
|
{{ label }}
|
|
24
21
|
</div>
|
|
22
|
+
<p v-if="isRequired" class="ml-1 text-red-600">*</p>
|
|
25
23
|
</div>
|
|
26
24
|
<!-- tertiary button to render on right side of collapsible section -->
|
|
27
25
|
<c-button
|
|
@@ -38,7 +36,7 @@
|
|
|
38
36
|
></c-anchor-tag>
|
|
39
37
|
</div>
|
|
40
38
|
<!-- content to render in collapsible section -->
|
|
41
|
-
<div class="text-sm text-gray-500
|
|
39
|
+
<div class="mt-5 text-sm text-gray-500" v-if="showSection">
|
|
42
40
|
<slot></slot>
|
|
43
41
|
</div>
|
|
44
42
|
</div>
|
|
@@ -76,6 +74,10 @@ export default {
|
|
|
76
74
|
action: {
|
|
77
75
|
type: Function,
|
|
78
76
|
},
|
|
77
|
+
isRequired: {
|
|
78
|
+
type: Boolean,
|
|
79
|
+
default: false,
|
|
80
|
+
},
|
|
79
81
|
},
|
|
80
82
|
data() {
|
|
81
83
|
return {
|
|
@@ -84,7 +86,7 @@ export default {
|
|
|
84
86
|
},
|
|
85
87
|
methods: {
|
|
86
88
|
collapse() {
|
|
87
|
-
console.log("collapsing")
|
|
89
|
+
console.log("collapsing");
|
|
88
90
|
this.showSection = !this.showSection;
|
|
89
91
|
},
|
|
90
92
|
},
|
|
@@ -286,6 +286,10 @@ export default {
|
|
|
286
286
|
searchPlaceholder: {
|
|
287
287
|
type: String,
|
|
288
288
|
},
|
|
289
|
+
// Existing text for search
|
|
290
|
+
searchQuery: {
|
|
291
|
+
type: String,
|
|
292
|
+
},
|
|
289
293
|
// Total number of rows in a table to calculate page numbers
|
|
290
294
|
totalRecords: {
|
|
291
295
|
type: String,
|
|
@@ -370,7 +374,7 @@ export default {
|
|
|
370
374
|
return {
|
|
371
375
|
toggleDropdown: false,
|
|
372
376
|
showLoader: this.isLoading,
|
|
373
|
-
searchTerm: "",
|
|
377
|
+
searchTerm: this.searchQuery ? this.searchQuery : "",
|
|
374
378
|
paginationRecords: this.paginationData,
|
|
375
379
|
reorderedArray: [...this.rows],
|
|
376
380
|
controlClick: false,
|