classcard-ui 0.2.774 → 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.
Files changed (175) hide show
  1. package/README.md +24 -24
  2. package/dist/classcard-ui.common.js +79 -63
  3. package/dist/classcard-ui.common.js.map +1 -1
  4. package/dist/classcard-ui.umd.js +79 -63
  5. package/dist/classcard-ui.umd.js.map +1 -1
  6. package/dist/classcard-ui.umd.min.js +1 -1
  7. package/dist/classcard-ui.umd.min.js.map +1 -1
  8. package/package.json +81 -81
  9. package/src/App.vue +16 -16
  10. package/src/components/CAlerts/CAlerts.vue +70 -70
  11. package/src/components/CAlerts/index.js +2 -2
  12. package/src/components/CAnchorTabs/CAnchorTabs.vue +96 -96
  13. package/src/components/CAnchorTabs/index.js +2 -2
  14. package/src/components/CAnchorTag/CAnchorTag.vue +62 -62
  15. package/src/components/CAnchorTag/index.js +2 -2
  16. package/src/components/CAvatar/CAvatar.vue +112 -112
  17. package/src/components/CAvatar/index.js +2 -2
  18. package/src/components/CAvatarGroup/CAvatarGroup.vue +145 -145
  19. package/src/components/CAvatarGroup/index.js +2 -2
  20. package/src/components/CBasicTable/CBasicTable.vue +184 -184
  21. package/src/components/CBasicTable/index.js +2 -2
  22. package/src/components/CBreadcrumbs/CBreadcrumbs.vue +38 -38
  23. package/src/components/CBreadcrumbs/index.js +2 -2
  24. package/src/components/CButton/CButton.vue +147 -147
  25. package/src/components/CButton/index.js +2 -2
  26. package/src/components/CButtonGroup/CButtonGroup.vue +118 -118
  27. package/src/components/CButtonGroup/index.js +2 -2
  28. package/src/components/CButtonIcon/CButtonIcon.vue +112 -112
  29. package/src/components/CButtonIcon/index.js +2 -2
  30. package/src/components/CButtonLink/CButtonLink.vue +39 -39
  31. package/src/components/CButtonLink/index.js +2 -2
  32. package/src/components/CButtonSelect/CButtonSelect.vue +103 -103
  33. package/src/components/CButtonSelect/index.js +2 -2
  34. package/src/components/CButtonWithDropdown/CButtonWithDropdown.vue +168 -168
  35. package/src/components/CButtonWithDropdown/index.js +2 -2
  36. package/src/components/CCalendar/CCalendar.vue +410 -410
  37. package/src/components/CCalendar/index.js +3 -3
  38. package/src/components/CCard/CCard.vue +49 -49
  39. package/src/components/CCard/index.js +2 -2
  40. package/src/components/CCheckbox/CCheckbox.vue +70 -70
  41. package/src/components/CCheckbox/index.js +2 -2
  42. package/src/components/CCollapsibleSection/CCollapsibleSection.vue +101 -101
  43. package/src/components/CCollapsibleSection/index.js +2 -2
  44. package/src/components/CColorDots/CColorDots.vue +35 -35
  45. package/src/components/CColorDots/index.js +3 -3
  46. package/src/components/CConfirmActionModal/CConfirmActionModal.vue +131 -131
  47. package/src/components/CConfirmActionModal/index.js +3 -3
  48. package/src/components/CDatepicker/CDatepicker.vue +139 -139
  49. package/src/components/CDatepicker/index.js +2 -2
  50. package/src/components/CDualSelect/CDualSelect.vue +193 -193
  51. package/src/components/CDualSelect/index.js +2 -2
  52. package/src/components/CEditor/CEditor.vue +96 -96
  53. package/src/components/CEditor/index.js +2 -2
  54. package/src/components/CFormSectionHeading/CFormSectionHeading.vue +53 -53
  55. package/src/components/CFormSectionHeading/index.js +2 -2
  56. package/src/components/CGroupedSelect/CGroupedSelect.vue +218 -218
  57. package/src/components/CGroupedSelect/index.js +3 -3
  58. package/src/components/CIcon/CIcon.vue +77 -77
  59. package/src/components/CIcon/index.js +2 -2
  60. package/src/components/CIconDropdown/CIconDropdown.vue +118 -118
  61. package/src/components/CIconDropdown/index.js +2 -2
  62. package/src/components/CInput/CInput.vue +123 -123
  63. package/src/components/CInput/index.js +2 -2
  64. package/src/components/CInputAddon/CInputAddon.vue +202 -202
  65. package/src/components/CInputAddon/index.js +2 -2
  66. package/src/components/CInputEmail/CInputEmail.vue +93 -93
  67. package/src/components/CInputEmail/index.js +2 -2
  68. package/src/components/CModalHeading/CModalHeading.vue +22 -22
  69. package/src/components/CModalHeading/index.js +2 -2
  70. package/src/components/CModuleHelpLinks/CModuleHelpLinks.vue +39 -39
  71. package/src/components/CModuleHelpLinks/index.js +3 -3
  72. package/src/components/CMultiselect/CMultiselect.vue +361 -361
  73. package/src/components/CMultiselect/index.js +2 -2
  74. package/src/components/CMultiselectr/CMultiselectr.vue +44 -44
  75. package/src/components/CMultiselectr/index.js +2 -2
  76. package/src/components/CPageHeading/CPageHeading.vue +56 -56
  77. package/src/components/CPageHeading/index.js +2 -2
  78. package/src/components/CPagination/CPagination.vue +204 -204
  79. package/src/components/CPagination/index.js +2 -2
  80. package/src/components/CPhoneNumber/CPhoneNumber.vue +89 -89
  81. package/src/components/CPhoneNumber/index.js +2 -2
  82. package/src/components/CRadio/CRadio.vue +106 -106
  83. package/src/components/CRadio/index.js +2 -2
  84. package/src/components/CRangeSlider/CRangeSlider.vue +55 -55
  85. package/src/components/CRangeSlider/index.js +2 -2
  86. package/src/components/CReorderableStackedList/CReorderableStackedList.vue +94 -94
  87. package/src/components/CReorderableStackedList/index.js +2 -2
  88. package/src/components/CSelect/CSelect.vue +353 -353
  89. package/src/components/CSelect/index.js +2 -2
  90. package/src/components/CSmallTimeline/CSmallTimeline.vue +40 -40
  91. package/src/components/CSmallTimeline/index.js +2 -2
  92. package/src/components/CStackedList/CStackedList.vue +132 -132
  93. package/src/components/CStackedList/index.js +2 -2
  94. package/src/components/CStats/CStats.vue +116 -116
  95. package/src/components/CStats/index.js +2 -2
  96. package/src/components/CSwitch/CSwitch.vue +168 -168
  97. package/src/components/CSwitch/index.js +2 -2
  98. package/src/components/CTable/CTable.vue +542 -538
  99. package/src/components/CTable/index.js +2 -2
  100. package/src/components/CTabs/CTabs.vue +111 -111
  101. package/src/components/CTabs/index.js +2 -2
  102. package/src/components/CTag/CTag.vue +36 -36
  103. package/src/components/CTag/index.js +2 -2
  104. package/src/components/CTextarea/CTextarea.vue +95 -95
  105. package/src/components/CTextarea/index.js +2 -2
  106. package/src/components/CTimeline/CTimeline.vue +237 -237
  107. package/src/components/CTimeline/index.js +2 -2
  108. package/src/components/CUpload/CUpload.vue +231 -231
  109. package/src/components/CUpload/index.js +2 -2
  110. package/src/components/index.js +48 -48
  111. package/src/icons.js +304 -304
  112. package/src/main.js +22 -22
  113. package/src/stories/CAlerts.stories.js +37 -37
  114. package/src/stories/CAnchorTabs.stories.js +29 -29
  115. package/src/stories/CAnchorTag.stories.js +36 -36
  116. package/src/stories/CAvatar.stories.js +38 -38
  117. package/src/stories/CAvatarGroup.stories.js +100 -100
  118. package/src/stories/CBasicTable.stories.js +316 -316
  119. package/src/stories/CBreadcrumbs.stories.js +24 -24
  120. package/src/stories/CButton.stories.js +46 -46
  121. package/src/stories/CButtonGroup.stories.js +33 -33
  122. package/src/stories/CButtonIcon.stories.js +27 -27
  123. package/src/stories/CButtonLink.stories.js +24 -24
  124. package/src/stories/CButtonSelect.stories.js +32 -32
  125. package/src/stories/CButtonWithDropdown.stories.js +41 -41
  126. package/src/stories/CCalendar.stories.js +16 -16
  127. package/src/stories/CCard.stories.js +30 -30
  128. package/src/stories/CCheckbox.stories.js +29 -29
  129. package/src/stories/CCollapsibleSection.stories.js +28 -28
  130. package/src/stories/CColorDots.stories.js +28 -28
  131. package/src/stories/CConfirmActionModal.stories.js +59 -59
  132. package/src/stories/CDatepicker.stories.js +30 -30
  133. package/src/stories/CDualSelect.stories.js +29 -29
  134. package/src/stories/CEditor.stories.js +30 -30
  135. package/src/stories/CFormSectionHeading.stories.js +34 -34
  136. package/src/stories/CGroupedSelect.stories.js +69 -69
  137. package/src/stories/CIcon.stories.js +26 -26
  138. package/src/stories/CIconDropdown.stories.js +45 -45
  139. package/src/stories/CInput.stories.js +36 -36
  140. package/src/stories/CInputAddon.stories.js +37 -37
  141. package/src/stories/CInputEmail.stories.js +27 -27
  142. package/src/stories/CModalHeading.stories.js +25 -25
  143. package/src/stories/CModuleHelpLinks.stories.js +25 -25
  144. package/src/stories/CMultiselect.stories.js +103 -103
  145. package/src/stories/CMultiselectr.stories.js +23 -23
  146. package/src/stories/CPageHeading.stories.js +32 -32
  147. package/src/stories/CPagination.stories.js +30 -30
  148. package/src/stories/CPhoneNumber.stories.js +29 -29
  149. package/src/stories/CRadio.stories.js +36 -36
  150. package/src/stories/CRangeSlider.stories.js +23 -23
  151. package/src/stories/CReorderableStackedList.stories.js +23 -23
  152. package/src/stories/CSelect.stories.js +62 -62
  153. package/src/stories/CSmallTimeline.stories.js +26 -26
  154. package/src/stories/CStackedList.stories.js +37 -37
  155. package/src/stories/CStats.stories.js +33 -33
  156. package/src/stories/CSwitch.stories.js +28 -28
  157. package/src/stories/CTable.stories.js +77 -77
  158. package/src/stories/CTabs.stories.js +33 -33
  159. package/src/stories/CTag.stories.js +23 -23
  160. package/src/stories/CTextarea.stories.js +32 -32
  161. package/src/stories/CTimeline.stories.js +26 -26
  162. package/src/stories/CUpload.stories.js +36 -36
  163. package/src/stories/Introduction.stories.mdx +207 -207
  164. package/src/stories/Page.vue +88 -88
  165. package/src/stories/assets/code-brackets.svg +0 -0
  166. package/src/stories/assets/colors.svg +0 -0
  167. package/src/stories/assets/comments.svg +0 -0
  168. package/src/stories/assets/direction.svg +0 -0
  169. package/src/stories/assets/flow.svg +0 -0
  170. package/src/stories/assets/plugin.svg +0 -0
  171. package/src/stories/assets/repo.svg +0 -0
  172. package/src/stories/assets/stackalt.svg +0 -0
  173. package/src/stories/header.css +26 -26
  174. package/src/stories/page.css +69 -69
  175. package/src/stories/utils.css +17 -17
@@ -1,3 +1,3 @@
1
- import CCalendar from "./CCalendar.vue";
2
-
3
- export default CCalendar;
1
+ import CCalendar from "./CCalendar.vue";
2
+
3
+ export default CCalendar;
@@ -1,49 +1,49 @@
1
- <template>
2
- <div
3
- class="relative rounded-lg border border-gray-300 bg-white px-6 py-5 shadow-sm flex items-center space-x-3 hover:border-gray-400 focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-indigo-500"
4
- >
5
- <div class="flex-shrink-0 p-2 rounded-md bg-gray-100">
6
- <c-avatar
7
- :image="image.image"
8
- :rounded="image.rounded"
9
- :size="image.size"
10
- imageClasses="object-contain"
11
- ></c-avatar>
12
- </div>
13
- <div class="flex-1 min-w-0">
14
- <a href="#" class="focus:outline-none">
15
- <span class="absolute inset-0" aria-hidden="true"></span>
16
- <div class="flex">
17
- <p class="text-sm text-gray-900">
18
- {{ name }}
19
- </p>
20
- <slot></slot>
21
- </div>
22
- <p class="text-sm text-gray-500 truncate">
23
- {{ description }}
24
- </p>
25
- </a>
26
- </div>
27
- </div>
28
- </template>
29
-
30
- <script>
31
- import CAvatar from "../CAvatar/CAvatar.vue";
32
- export default {
33
- name: "CCard",
34
- components: { CAvatar },
35
- props: {
36
- image: {
37
- type: Object,
38
- },
39
- name: {
40
- type: String,
41
- },
42
- description: {
43
- type: String,
44
- },
45
- },
46
- };
47
- </script>
48
-
49
- <style></style>
1
+ <template>
2
+ <div
3
+ class="relative rounded-lg border border-gray-300 bg-white px-6 py-5 shadow-sm flex items-center space-x-3 hover:border-gray-400 focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-indigo-500"
4
+ >
5
+ <div class="flex-shrink-0 p-2 rounded-md bg-gray-100">
6
+ <c-avatar
7
+ :image="image.image"
8
+ :rounded="image.rounded"
9
+ :size="image.size"
10
+ imageClasses="object-contain"
11
+ ></c-avatar>
12
+ </div>
13
+ <div class="flex-1 min-w-0">
14
+ <a href="#" class="focus:outline-none">
15
+ <span class="absolute inset-0" aria-hidden="true"></span>
16
+ <div class="flex">
17
+ <p class="text-sm text-gray-900">
18
+ {{ name }}
19
+ </p>
20
+ <slot></slot>
21
+ </div>
22
+ <p class="text-sm text-gray-500 truncate">
23
+ {{ description }}
24
+ </p>
25
+ </a>
26
+ </div>
27
+ </div>
28
+ </template>
29
+
30
+ <script>
31
+ import CAvatar from "../CAvatar/CAvatar.vue";
32
+ export default {
33
+ name: "CCard",
34
+ components: { CAvatar },
35
+ props: {
36
+ image: {
37
+ type: Object,
38
+ },
39
+ name: {
40
+ type: String,
41
+ },
42
+ description: {
43
+ type: String,
44
+ },
45
+ },
46
+ };
47
+ </script>
48
+
49
+ <style></style>
@@ -1,3 +1,3 @@
1
- import CCard from './CCard.vue'
2
-
1
+ import CCard from './CCard.vue'
2
+
3
3
  export default CCard
@@ -1,70 +1,70 @@
1
- <template>
2
- <div>
3
- <div class="relative flex items-start">
4
- <div class="flex h-5 items-center">
5
- <input
6
- type="checkbox"
7
- v-model="checkedValue"
8
- class="h-4 w-4 cursor-pointer rounded border-gray-300 text-indigo-600 focus:ring-indigo-500 disabled:opacity-50"
9
- @click="changeValue"
10
- :disabled="isDisabled"
11
- />
12
- </div>
13
- <div
14
- class="ml-3 cursor-pointer text-sm"
15
- :class="isDisabled ? 'pointer-events-none' : ''"
16
- @click="changeValue"
17
- >
18
- <label
19
- :class="`cursor-pointer font-medium text-gray-900 ${
20
- isDisabled ? 'opacity-50' : ''
21
- }`"
22
- >{{ label }}</label
23
- >
24
- <p
25
- :class="`mt-0.5 cursor-pointer text-gray-500 ${
26
- isDisabled ? 'opacity-50' : ''
27
- }`"
28
- >
29
- {{ description }}
30
- </p>
31
- </div>
32
- </div>
33
- </div>
34
- </template>
35
- <script>
36
- export default {
37
- name: "CCheckbox",
38
- props: {
39
- label: { type: String },
40
- description: { type: String },
41
- value: [Boolean, Number],
42
- isDisabled: {
43
- type: Boolean,
44
- },
45
- },
46
- data() {
47
- return {
48
- checkedValue: this.value == 0 ? false : true,
49
- };
50
- },
51
- methods: {
52
- changeValue() {
53
- let selectedValue = 0;
54
- if (this.checkedValue) {
55
- this.checkedValue = false;
56
- selectedValue = 0;
57
- } else if (!this.checkedValue) {
58
- this.checkedValue = true;
59
- selectedValue = 1;
60
- }
61
- this.$emit("onChange", selectedValue);
62
- },
63
- },
64
- watch: {
65
- value() {
66
- this.checkedValue = this.value;
67
- },
68
- },
69
- };
70
- </script>
1
+ <template>
2
+ <div>
3
+ <div class="relative flex items-start">
4
+ <div class="flex h-5 items-center">
5
+ <input
6
+ type="checkbox"
7
+ v-model="checkedValue"
8
+ class="h-4 w-4 cursor-pointer rounded border-gray-300 text-indigo-600 focus:ring-indigo-500 disabled:opacity-50"
9
+ @click="changeValue"
10
+ :disabled="isDisabled"
11
+ />
12
+ </div>
13
+ <div
14
+ class="ml-3 cursor-pointer text-sm"
15
+ :class="isDisabled ? 'pointer-events-none' : ''"
16
+ @click="changeValue"
17
+ >
18
+ <label
19
+ :class="`cursor-pointer font-medium text-gray-900 ${
20
+ isDisabled ? 'opacity-50' : ''
21
+ }`"
22
+ >{{ label }}</label
23
+ >
24
+ <p
25
+ :class="`mt-0.5 cursor-pointer text-gray-500 ${
26
+ isDisabled ? 'opacity-50' : ''
27
+ }`"
28
+ >
29
+ {{ description }}
30
+ </p>
31
+ </div>
32
+ </div>
33
+ </div>
34
+ </template>
35
+ <script>
36
+ export default {
37
+ name: "CCheckbox",
38
+ props: {
39
+ label: { type: String },
40
+ description: { type: String },
41
+ value: [Boolean, Number],
42
+ isDisabled: {
43
+ type: Boolean,
44
+ },
45
+ },
46
+ data() {
47
+ return {
48
+ checkedValue: this.value == 0 ? false : true,
49
+ };
50
+ },
51
+ methods: {
52
+ changeValue() {
53
+ let selectedValue = 0;
54
+ if (this.checkedValue) {
55
+ this.checkedValue = false;
56
+ selectedValue = 0;
57
+ } else if (!this.checkedValue) {
58
+ this.checkedValue = true;
59
+ selectedValue = 1;
60
+ }
61
+ this.$emit("onChange", selectedValue);
62
+ },
63
+ },
64
+ watch: {
65
+ value() {
66
+ this.checkedValue = this.value;
67
+ },
68
+ },
69
+ };
70
+ </script>
@@ -1,3 +1,3 @@
1
- import CCheckbox from './CCheckbox.vue'
2
-
1
+ import CCheckbox from './CCheckbox.vue'
2
+
3
3
  export default CCheckbox
@@ -1,101 +1,101 @@
1
- <template>
2
- <div>
3
- <div
4
- :class="divider || showSection ? 'border-b border-gray-200 pb-2' : ''"
5
- class="flex cursor-pointer flex-row items-center justify-between"
6
- @click.self="collapse"
7
- >
8
- <!-- left and right arrow icon as per opening and closing of collapsible -->
9
- <div class="flex flex-row items-center" @click="collapse">
10
- <c-icon
11
- :name="showSection ? 'chevron-down' : 'chevron-right'"
12
- class="h-5 w-5 text-gray-900"
13
- type="solid"
14
- ></c-icon>
15
- <!-- label of the collapsible section -->
16
- <div
17
- :class="{ 'py-2': tabAction }"
18
- class="ml-1 whitespace-nowrap border-transparent text-base font-semibold text-gray-900 hover:border-gray-300 hover:text-gray-700"
19
- >
20
- {{ label }}
21
- </div>
22
- <p v-if="isRequired" class="ml-1 text-red-600">*</p>
23
- </div>
24
- <!-- tertiary button to render on right side of collapsible section -->
25
- <c-button
26
- v-if="tabAction && showSection"
27
- type="tertiary"
28
- :label="buttonLabel"
29
- @action="action"
30
- ></c-button>
31
- <!-- anchor tag to render on right side of collapsible section -->
32
- <c-anchor-tag
33
- v-if="tabLink && showSection"
34
- :label="tabLink.label"
35
- :action="action"
36
- ></c-anchor-tag>
37
- </div>
38
- <!-- content to render in collapsible section -->
39
- <div class="mt-5 text-sm text-gray-500" v-if="showSection">
40
- <slot></slot>
41
- </div>
42
- </div>
43
- </template>
44
-
45
- <script>
46
- import CIcon from "../CIcon/CIcon.vue";
47
- import CButton from "../CButton/CButton.vue";
48
- import CAnchorTag from "../CAnchorTag/CAnchorTag.vue";
49
- export default {
50
- name: "CCollapsibleSection",
51
- components: { CIcon, CButton, CAnchorTag },
52
- props: {
53
- // label of section
54
- label: {
55
- type: String,
56
- },
57
- // text to render on tertiary button
58
- buttonLabel: {
59
- type: String,
60
- },
61
- // whether to show the divider below section heading
62
- divider: {
63
- type: Boolean,
64
- },
65
- isCollapsed: {
66
- type: Boolean,
67
- default: true,
68
- },
69
- // to render button on right side of section heading
70
- tabAction: { type: Boolean },
71
- // link to render on right side of section
72
- tabLink: { type: Object },
73
- // action to emit on click of link/button
74
- action: {
75
- type: Function,
76
- },
77
- isRequired: {
78
- type: Boolean,
79
- default: false,
80
- },
81
- },
82
- data() {
83
- return {
84
- showSection: this.isCollapsed,
85
- };
86
- },
87
- methods: {
88
- collapse() {
89
- console.log("collapsing");
90
- this.showSection = !this.showSection;
91
- },
92
- },
93
- watch: {
94
- isCollapsed() {
95
- this.showSection = this.isCollapsed;
96
- },
97
- },
98
- };
99
- </script>
100
-
101
- <style></style>
1
+ <template>
2
+ <div>
3
+ <div
4
+ :class="divider || showSection ? 'border-b border-gray-200 pb-2' : ''"
5
+ class="flex cursor-pointer flex-row items-center justify-between"
6
+ @click.self="collapse"
7
+ >
8
+ <!-- left and right arrow icon as per opening and closing of collapsible -->
9
+ <div class="flex flex-row items-center" @click="collapse">
10
+ <c-icon
11
+ :name="showSection ? 'chevron-down' : 'chevron-right'"
12
+ class="h-5 w-5 text-gray-900"
13
+ type="solid"
14
+ ></c-icon>
15
+ <!-- label of the collapsible section -->
16
+ <div
17
+ :class="{ 'py-2': tabAction }"
18
+ class="ml-1 whitespace-nowrap border-transparent text-base font-semibold text-gray-900 hover:border-gray-300 hover:text-gray-700"
19
+ >
20
+ {{ label }}
21
+ </div>
22
+ <p v-if="isRequired" class="ml-1 text-red-600">*</p>
23
+ </div>
24
+ <!-- tertiary button to render on right side of collapsible section -->
25
+ <c-button
26
+ v-if="tabAction && showSection"
27
+ type="tertiary"
28
+ :label="buttonLabel"
29
+ @action="action"
30
+ ></c-button>
31
+ <!-- anchor tag to render on right side of collapsible section -->
32
+ <c-anchor-tag
33
+ v-if="tabLink && showSection"
34
+ :label="tabLink.label"
35
+ :action="action"
36
+ ></c-anchor-tag>
37
+ </div>
38
+ <!-- content to render in collapsible section -->
39
+ <div class="mt-5 text-sm text-gray-500" v-if="showSection">
40
+ <slot></slot>
41
+ </div>
42
+ </div>
43
+ </template>
44
+
45
+ <script>
46
+ import CIcon from "../CIcon/CIcon.vue";
47
+ import CButton from "../CButton/CButton.vue";
48
+ import CAnchorTag from "../CAnchorTag/CAnchorTag.vue";
49
+ export default {
50
+ name: "CCollapsibleSection",
51
+ components: { CIcon, CButton, CAnchorTag },
52
+ props: {
53
+ // label of section
54
+ label: {
55
+ type: String,
56
+ },
57
+ // text to render on tertiary button
58
+ buttonLabel: {
59
+ type: String,
60
+ },
61
+ // whether to show the divider below section heading
62
+ divider: {
63
+ type: Boolean,
64
+ },
65
+ isCollapsed: {
66
+ type: Boolean,
67
+ default: true,
68
+ },
69
+ // to render button on right side of section heading
70
+ tabAction: { type: Boolean },
71
+ // link to render on right side of section
72
+ tabLink: { type: Object },
73
+ // action to emit on click of link/button
74
+ action: {
75
+ type: Function,
76
+ },
77
+ isRequired: {
78
+ type: Boolean,
79
+ default: false,
80
+ },
81
+ },
82
+ data() {
83
+ return {
84
+ showSection: this.isCollapsed,
85
+ };
86
+ },
87
+ methods: {
88
+ collapse() {
89
+ console.log("collapsing");
90
+ this.showSection = !this.showSection;
91
+ },
92
+ },
93
+ watch: {
94
+ isCollapsed() {
95
+ this.showSection = this.isCollapsed;
96
+ },
97
+ },
98
+ };
99
+ </script>
100
+
101
+ <style></style>
@@ -1,3 +1,3 @@
1
- import CCollapsibleSection from './CCollapsibleSection.vue'
2
-
1
+ import CCollapsibleSection from './CCollapsibleSection.vue'
2
+
3
3
  export default CCollapsibleSection
@@ -1,35 +1,35 @@
1
- <template>
2
- <div class="flex items-center">
3
- <span class="h-1.5 w-1.5 rounded-full" :class="colorClasses" aria-hidden="true"></span>
4
- <div class="ml-2 text-sm font-medium">
5
- {{ label }}
6
- </div>
7
- </div>
8
- </template>
9
- <script>
10
- export default {
11
- name: "CColorDots",
12
- props: {
13
- color: {
14
- type: String,
15
- },
16
- label: {
17
- type: String,
18
- },
19
- },
20
- computed: {
21
- colorClasses() {
22
- return {
23
- "bg-gray-500": this.color == "gray",
24
- "bg-red-500": this.color == "red",
25
- "bg-yellow-500": this.color == "yellow",
26
- "bg-green-500": this.color == "green",
27
- "bg-blue-500": this.color == "indigo",
28
- "bg-purple-500": this.color == "purple",
29
- "bg-pink-500": this.color == "pink",
30
- "bg-indigo-500": this.color == "indigo",
31
- };
32
- },
33
- },
34
- };
35
- </script>
1
+ <template>
2
+ <div class="flex items-center">
3
+ <span class="h-1.5 w-1.5 rounded-full" :class="colorClasses" aria-hidden="true"></span>
4
+ <div class="ml-2 text-sm font-medium">
5
+ {{ label }}
6
+ </div>
7
+ </div>
8
+ </template>
9
+ <script>
10
+ export default {
11
+ name: "CColorDots",
12
+ props: {
13
+ color: {
14
+ type: String,
15
+ },
16
+ label: {
17
+ type: String,
18
+ },
19
+ },
20
+ computed: {
21
+ colorClasses() {
22
+ return {
23
+ "bg-gray-500": this.color == "gray",
24
+ "bg-red-500": this.color == "red",
25
+ "bg-yellow-500": this.color == "yellow",
26
+ "bg-green-500": this.color == "green",
27
+ "bg-blue-500": this.color == "indigo",
28
+ "bg-purple-500": this.color == "purple",
29
+ "bg-pink-500": this.color == "pink",
30
+ "bg-indigo-500": this.color == "indigo",
31
+ };
32
+ },
33
+ },
34
+ };
35
+ </script>
@@ -1,3 +1,3 @@
1
- import CColorDots from "./CColorDots.vue";
2
-
3
- export default CColorDots;
1
+ import CColorDots from "./CColorDots.vue";
2
+
3
+ export default CColorDots;