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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "classcard-ui",
3
- "version": "0.2.772",
3
+ "version": "0.2.775",
4
4
  "main": "dist/classcard-ui.umd.min.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -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 cursor-pointer"
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="text-gray-900 h-5 w-5"
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-gray-900 hover:text-gray-700 hover:border-gray-300 whitespace-nowrap font-semibold text-base ml-1"
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 mt-5" v-if="showSection">
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,