classcard-ui 0.2.666 → 0.2.671

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 (174) hide show
  1. package/dist/classcard-ui.common.js +69 -81
  2. package/dist/classcard-ui.common.js.map +1 -1
  3. package/dist/classcard-ui.umd.js +69 -81
  4. package/dist/classcard-ui.umd.js.map +1 -1
  5. package/dist/classcard-ui.umd.min.js +1 -1
  6. package/dist/classcard-ui.umd.min.js.map +1 -1
  7. package/package.json +6 -7
  8. package/src/App.vue +0 -16
  9. package/src/components/CAlerts/CAlerts.vue +0 -70
  10. package/src/components/CAlerts/index.js +0 -3
  11. package/src/components/CAnchorTabs/CAnchorTabs.vue +0 -96
  12. package/src/components/CAnchorTabs/index.js +0 -3
  13. package/src/components/CAnchorTag/CAnchorTag.vue +0 -62
  14. package/src/components/CAnchorTag/index.js +0 -3
  15. package/src/components/CAvatar/CAvatar.vue +0 -112
  16. package/src/components/CAvatar/index.js +0 -3
  17. package/src/components/CAvatarGroup/CAvatarGroup.vue +0 -145
  18. package/src/components/CAvatarGroup/index.js +0 -3
  19. package/src/components/CBasicTable/CBasicTable.vue +0 -184
  20. package/src/components/CBasicTable/index.js +0 -3
  21. package/src/components/CBreadcrumbs/CBreadcrumbs.vue +0 -38
  22. package/src/components/CBreadcrumbs/index.js +0 -3
  23. package/src/components/CButton/CButton.vue +0 -147
  24. package/src/components/CButton/index.js +0 -3
  25. package/src/components/CButtonGroup/CButtonGroup.vue +0 -116
  26. package/src/components/CButtonGroup/index.js +0 -3
  27. package/src/components/CButtonIcon/CButtonIcon.vue +0 -91
  28. package/src/components/CButtonIcon/index.js +0 -3
  29. package/src/components/CButtonLink/CButtonLink.vue +0 -39
  30. package/src/components/CButtonLink/index.js +0 -3
  31. package/src/components/CButtonSelect/CButtonSelect.vue +0 -103
  32. package/src/components/CButtonSelect/index.js +0 -3
  33. package/src/components/CButtonWithDropdown/CButtonWithDropdown.vue +0 -168
  34. package/src/components/CButtonWithDropdown/index.js +0 -3
  35. package/src/components/CCalendar/CCalendar.vue +0 -401
  36. package/src/components/CCalendar/index.js +0 -3
  37. package/src/components/CCard/CCard.vue +0 -49
  38. package/src/components/CCard/index.js +0 -3
  39. package/src/components/CCheckbox/CCheckbox.vue +0 -70
  40. package/src/components/CCheckbox/index.js +0 -3
  41. package/src/components/CCollapsibleSection/CCollapsibleSection.vue +0 -99
  42. package/src/components/CCollapsibleSection/index.js +0 -3
  43. package/src/components/CColorDots/CColorDots.vue +0 -35
  44. package/src/components/CColorDots/index.js +0 -3
  45. package/src/components/CConfirmActionModal/CConfirmActionModal.vue +0 -120
  46. package/src/components/CConfirmActionModal/index.js +0 -3
  47. package/src/components/CDatepicker/CDatepicker.vue +0 -139
  48. package/src/components/CDatepicker/index.js +0 -3
  49. package/src/components/CDualSelect/CDualSelect.vue +0 -193
  50. package/src/components/CDualSelect/index.js +0 -3
  51. package/src/components/CEditor/CEditor.vue +0 -96
  52. package/src/components/CEditor/index.js +0 -3
  53. package/src/components/CFormSectionHeading/CFormSectionHeading.vue +0 -53
  54. package/src/components/CFormSectionHeading/index.js +0 -3
  55. package/src/components/CGroupedSelect/CGroupedSelect.vue +0 -217
  56. package/src/components/CGroupedSelect/index.js +0 -3
  57. package/src/components/CIcon/CIcon.vue +0 -77
  58. package/src/components/CIcon/index.js +0 -3
  59. package/src/components/CIconDropdown/CIconDropdown.vue +0 -111
  60. package/src/components/CIconDropdown/index.js +0 -3
  61. package/src/components/CInput/CInput.vue +0 -120
  62. package/src/components/CInput/index.js +0 -3
  63. package/src/components/CInputAddon/CInputAddon.vue +0 -202
  64. package/src/components/CInputAddon/index.js +0 -3
  65. package/src/components/CInputEmail/CInputEmail.vue +0 -93
  66. package/src/components/CInputEmail/index.js +0 -3
  67. package/src/components/CModalHeading/CModalHeading.vue +0 -22
  68. package/src/components/CModalHeading/index.js +0 -3
  69. package/src/components/CModuleHelpLinks/CModuleHelpLinks.vue +0 -39
  70. package/src/components/CModuleHelpLinks/index.js +0 -3
  71. package/src/components/CMultiselect/CMultiselect.vue +0 -333
  72. package/src/components/CMultiselect/index.js +0 -3
  73. package/src/components/CMultiselectr/CMultiselectr.vue +0 -44
  74. package/src/components/CMultiselectr/index.js +0 -3
  75. package/src/components/CPageHeading/CPageHeading.vue +0 -56
  76. package/src/components/CPageHeading/index.js +0 -3
  77. package/src/components/CPagination/CPagination.vue +0 -202
  78. package/src/components/CPagination/index.js +0 -3
  79. package/src/components/CPhoneNumber/CPhoneNumber.vue +0 -81
  80. package/src/components/CPhoneNumber/index.js +0 -3
  81. package/src/components/CRadio/CRadio.vue +0 -106
  82. package/src/components/CRadio/index.js +0 -3
  83. package/src/components/CRangeSlider/CRangeSlider.vue +0 -55
  84. package/src/components/CRangeSlider/index.js +0 -3
  85. package/src/components/CReorderableStackedList/CReorderableStackedList.vue +0 -94
  86. package/src/components/CReorderableStackedList/index.js +0 -3
  87. package/src/components/CSelect/CSelect.vue +0 -343
  88. package/src/components/CSelect/index.js +0 -3
  89. package/src/components/CSmallTimeline/CSmallTimeline.vue +0 -40
  90. package/src/components/CSmallTimeline/index.js +0 -3
  91. package/src/components/CStackedList/CStackedList.vue +0 -132
  92. package/src/components/CStackedList/index.js +0 -3
  93. package/src/components/CStats/CStats.vue +0 -111
  94. package/src/components/CStats/index.js +0 -3
  95. package/src/components/CSwitch/CSwitch.vue +0 -140
  96. package/src/components/CSwitch/index.js +0 -3
  97. package/src/components/CTable/CTable.vue +0 -536
  98. package/src/components/CTable/index.js +0 -3
  99. package/src/components/CTabs/CTabs.vue +0 -111
  100. package/src/components/CTabs/index.js +0 -3
  101. package/src/components/CTag/CTag.vue +0 -36
  102. package/src/components/CTag/index.js +0 -3
  103. package/src/components/CTextarea/CTextarea.vue +0 -95
  104. package/src/components/CTextarea/index.js +0 -3
  105. package/src/components/CTimeline/CTimeline.vue +0 -237
  106. package/src/components/CTimeline/index.js +0 -3
  107. package/src/components/CUpload/CUpload.vue +0 -231
  108. package/src/components/CUpload/index.js +0 -3
  109. package/src/components/index.js +0 -48
  110. package/src/icons.js +0 -275
  111. package/src/main.js +0 -22
  112. package/src/stories/CAlerts.stories.js +0 -37
  113. package/src/stories/CAnchorTabs.stories.js +0 -29
  114. package/src/stories/CAnchorTag.stories.js +0 -36
  115. package/src/stories/CAvatar.stories.js +0 -38
  116. package/src/stories/CAvatarGroup.stories.js +0 -100
  117. package/src/stories/CBasicTable.stories.js +0 -316
  118. package/src/stories/CBreadcrumbs.stories.js +0 -24
  119. package/src/stories/CButton.stories.js +0 -46
  120. package/src/stories/CButtonGroup.stories.js +0 -33
  121. package/src/stories/CButtonIcon.stories.js +0 -27
  122. package/src/stories/CButtonLink.stories.js +0 -24
  123. package/src/stories/CButtonSelect.stories.js +0 -32
  124. package/src/stories/CButtonWithDropdown.stories.js +0 -41
  125. package/src/stories/CCalendar.stories.js +0 -16
  126. package/src/stories/CCard.stories.js +0 -30
  127. package/src/stories/CCheckbox.stories.js +0 -29
  128. package/src/stories/CCollapsibleSection.stories.js +0 -28
  129. package/src/stories/CColorDots.stories.js +0 -28
  130. package/src/stories/CConfirmActionModal.stories.js +0 -59
  131. package/src/stories/CDatepicker.stories.js +0 -30
  132. package/src/stories/CDualSelect.stories.js +0 -29
  133. package/src/stories/CEditor.stories.js +0 -30
  134. package/src/stories/CFormSectionHeading.stories.js +0 -34
  135. package/src/stories/CGroupedSelect.stories.js +0 -69
  136. package/src/stories/CIcon.stories.js +0 -26
  137. package/src/stories/CIconDropdown.stories.js +0 -40
  138. package/src/stories/CInput.stories.js +0 -36
  139. package/src/stories/CInputAddon.stories.js +0 -37
  140. package/src/stories/CInputEmail.stories.js +0 -27
  141. package/src/stories/CModalHeading.stories.js +0 -25
  142. package/src/stories/CModuleHelpLinks.stories.js +0 -25
  143. package/src/stories/CMultiselect.stories.js +0 -97
  144. package/src/stories/CMultiselectr.stories.js +0 -23
  145. package/src/stories/CPageHeading.stories.js +0 -32
  146. package/src/stories/CPagination.stories.js +0 -30
  147. package/src/stories/CPhoneNumber.stories.js +0 -29
  148. package/src/stories/CRadio.stories.js +0 -36
  149. package/src/stories/CRangeSlider.stories.js +0 -23
  150. package/src/stories/CReorderableStackedList.stories.js +0 -23
  151. package/src/stories/CSelect.stories.js +0 -50
  152. package/src/stories/CSmallTimeline.stories.js +0 -26
  153. package/src/stories/CStackedList.stories.js +0 -37
  154. package/src/stories/CStats.stories.js +0 -33
  155. package/src/stories/CSwitch.stories.js +0 -28
  156. package/src/stories/CTable.stories.js +0 -77
  157. package/src/stories/CTabs.stories.js +0 -33
  158. package/src/stories/CTag.stories.js +0 -23
  159. package/src/stories/CTextarea.stories.js +0 -32
  160. package/src/stories/CTimeline.stories.js +0 -26
  161. package/src/stories/CUpload.stories.js +0 -36
  162. package/src/stories/Introduction.stories.mdx +0 -207
  163. package/src/stories/Page.vue +0 -88
  164. package/src/stories/assets/code-brackets.svg +0 -1
  165. package/src/stories/assets/colors.svg +0 -1
  166. package/src/stories/assets/comments.svg +0 -1
  167. package/src/stories/assets/direction.svg +0 -1
  168. package/src/stories/assets/flow.svg +0 -1
  169. package/src/stories/assets/plugin.svg +0 -1
  170. package/src/stories/assets/repo.svg +0 -1
  171. package/src/stories/assets/stackalt.svg +0 -1
  172. package/src/stories/header.css +0 -26
  173. package/src/stories/page.css +0 -69
  174. package/src/stories/utils.css +0 -18
@@ -1,111 +0,0 @@
1
- <template>
2
- <div>
3
- <slot></slot>
4
- <div
5
- :class="`${isDropDownRelative ? 'relative' : ''} inline-block text-left`"
6
- >
7
- <div>
8
- <button
9
- type="white"
10
- @click.stop="toggleDropdown = !toggleDropdown"
11
- @blur="close()"
12
- :class="
13
- customClasses
14
- ? iconClasses
15
- : 'inline-flex w-full justify-center rounded-full border-none p-2 focus:outline-none focus:ring-2 focus:ring-indigo-600 focus:ring-offset-2'
16
- "
17
- aria-haspopup="true"
18
- aria-expanded="true"
19
- >
20
- <c-icon
21
- :name="icon.name"
22
- :type="icon.type"
23
- :class="icon.class"
24
- ></c-icon>
25
- </button>
26
- </div>
27
- <div
28
- v-show="toggleDropdown"
29
- :class="classes"
30
- class="absolute z-10 mt-2 -mr-1 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-gray-900 ring-opacity-5"
31
- >
32
- <div
33
- class="w-max py-2"
34
- role="menu"
35
- aria-orientation="vertical"
36
- aria-labelledby="option-menu"
37
- >
38
- <a
39
- v-for="(item, index) in items"
40
- v-bind:key="item.text"
41
- @mousedown.stop.prevent="dropdownAction(item)"
42
- class="flex cursor-pointer px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900 disabled:pointer-events-none disabled:opacity-50"
43
- :class="item.class"
44
- role="menuitem"
45
- :disabled="item.disabled"
46
- >
47
- <c-icon
48
- v-if="item.icon"
49
- :name="dropdownIcons[index].name"
50
- :type="dropdownIcons[index].type"
51
- :class="dropdownIcons[index].class"
52
- ></c-icon>
53
- {{ item.text }}
54
- </a>
55
- </div>
56
- </div>
57
- </div>
58
- </div>
59
- </template>
60
-
61
- <script>
62
- import CIcon from "../CIcon/CIcon.vue";
63
- export default {
64
- name: "CIconDropdown",
65
- components: { CIcon },
66
- props: {
67
- items: {
68
- type: Array,
69
- required: true,
70
- },
71
- customClasses: {
72
- type: Boolean,
73
- default: false,
74
- },
75
- iconClasses: {
76
- type: String,
77
- },
78
- icon: {
79
- type: Object,
80
- },
81
- dropdownIcons: {
82
- type: Array,
83
- },
84
- classes: {
85
- type: String,
86
- },
87
- action: {
88
- type: Function,
89
- },
90
- isDropDownRelative: {
91
- type: Boolean,
92
- default: true,
93
- },
94
- },
95
- data() {
96
- return {
97
- toggleDropdown: false,
98
- };
99
- },
100
- methods: {
101
- dropdownAction(item) {
102
- this.$emit("action", item);
103
- },
104
- close() {
105
- this.toggleDropdown = false;
106
- },
107
- },
108
- };
109
- </script>
110
-
111
- <style></style>
@@ -1,3 +0,0 @@
1
- import CIconDropdown from './CIconDropdown.vue'
2
-
3
- export default CIconDropdown
@@ -1,120 +0,0 @@
1
- <template>
2
- <div>
3
- <div class="flex justify-between">
4
- <div class="flex items-center">
5
- <!-- label of input field -->
6
- <label class="block text-sm font-medium text-gray-900">
7
- {{ label }}
8
- </label>
9
- <!-- asterisk sign to render if field is required -->
10
- <p v-if="isRequired" class="ml-1 text-red-600">*</p>
11
- </div>
12
- <!-- hint on the right side of input field -->
13
- <span v-if="hint" class="text-sm text-gray-500">{{ hint }}</span>
14
- </div>
15
- <div class="relative mt-1 rounded-md">
16
- <input
17
- :readonly="readonly"
18
- :type="type"
19
- :value="inputValue"
20
- @input="$emit('input', $event.target.value)"
21
- @blur="$emit('blur', $event.target.value)"
22
- @focus="$emit('focus', $event.target.value)"
23
- :class="errorClasses"
24
- class="block w-full flex-1 rounded-md px-3 py-2 text-sm text-gray-900 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 disabled:opacity-50"
25
- :placeholder="placeholder"
26
- :disabled="disabled"
27
- />
28
- <!-- to render to show validation is failed -->
29
- <div
30
- v-if="!isValidate && !customIcon"
31
- class="pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3 text-red-600"
32
- >
33
- <c-icon name="exclamation-circle" type="solid" class="h-5 w-5"></c-icon>
34
- </div>
35
- <slot name="customIcon" v-if="customIcon"></slot>
36
- </div>
37
- <!-- validation error message -->
38
- <p v-if="!isValidate" class="mt-2 text-sm text-red-600">
39
- {{ errorMessage }}
40
- </p>
41
- <!-- description about the input field -->
42
- <p v-if="helpText && isValidate == true" class="mt-2 text-sm text-gray-500">
43
- {{ helpText }}
44
- </p>
45
- </div>
46
- </template>
47
-
48
- <script>
49
- import CIcon from "../CIcon/CIcon.vue";
50
- export default {
51
- name: "CInput",
52
- components: { CIcon },
53
- props: {
54
- // Label of input field
55
- label: {
56
- type: String,
57
- },
58
- // Read only of input field
59
- readonly: {
60
- type: Boolean,
61
- },
62
- // placeholder of input
63
- placeholder: {
64
- type: String,
65
- },
66
- // v-model of the field
67
- value: {
68
- type: String,
69
- },
70
- // hint on right side of input
71
- hint: { type: String },
72
- // description about the field
73
- helpText: {
74
- type: String,
75
- },
76
- // validation is passed or not
77
- isValidate: { type: Boolean },
78
- // validation error message
79
- errorMessage: {
80
- type: String,
81
- },
82
- // to disable the input field
83
- disabled: {
84
- type: Boolean,
85
- },
86
- // whether the input field is mandatory or not
87
- isRequired: {
88
- type: Boolean,
89
- },
90
- // type of input field
91
- type: {
92
- type: String,
93
- default: "text",
94
- },
95
- customIcon: {
96
- type: Boolean,
97
- default: false,
98
- },
99
- },
100
- computed: {
101
- errorClasses() {
102
- return {
103
- "border-red-300 text-red-900 placeholder-red-300 focus:ring-red-500 focus:border-red-500":
104
- this.isValidate == false,
105
- "border-gray-300": this.isValidate == true,
106
- };
107
- },
108
- },
109
- data() {
110
- return {
111
- inputValue: this.value,
112
- };
113
- },
114
- watch: {
115
- value() {
116
- this.inputValue = this.value;
117
- },
118
- },
119
- };
120
- </script>
@@ -1,3 +0,0 @@
1
- import CInput from './CInput.vue'
2
-
3
- export default CInput
@@ -1,202 +0,0 @@
1
- <template>
2
- <div>
3
- <div class="flex justify-between">
4
- <div class="flex items-center">
5
- <!-- label of input field -->
6
- <label class="block text-sm font-medium text-gray-900">
7
- {{ label }}
8
- </label>
9
- <!-- asterisk sign to render if field is required -->
10
- <p v-if="isRequired" class="ml-1 text-red-600">*</p>
11
- </div>
12
- <span v-if="hint" class="text-sm text-gray-500">{{ hint }}</span>
13
- </div>
14
- <div v-if="!inlineAddon && addonType == 'leading'" class="relative mt-1 flex rounded-md">
15
- <span
16
- :class="disabled ? 'opacity-50' : ''"
17
- v-if="addon"
18
- class="inline-flex items-center rounded-l-md border border-r-0 border-gray-300 bg-gray-50 px-3 text-gray-500 sm:text-sm"
19
- >
20
- {{ addon }}
21
- </span>
22
- <input
23
- :type="inputType"
24
- :value="inputValue"
25
- @input="$emit('input', $event.target.value)"
26
- @blur="$emit('blur', $event.target.value)"
27
- :class="{ ...errorClasses, 'rounded-l-md': !addon }"
28
- class="block w-full flex-1 rounded-r-md px-3 py-2 text-gray-900 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 disabled:opacity-50 sm:text-sm"
29
- :placeholder="placeholder"
30
- :disabled="disabled"
31
- />
32
- <div
33
- v-if="!isValidate"
34
- class="pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3 text-red-600"
35
- >
36
- <c-icon name="exclamation-circle" type="solid" class="h-5 w-5"></c-icon>
37
- </div>
38
- </div>
39
- <div v-if="!inlineAddon && addonType == 'trailing'" class="relative mt-1 flex rounded-md">
40
- <input
41
- :type="inputType"
42
- :value="inputValue"
43
- @input="$emit('input', $event.target.value)"
44
- @blur="$emit('blur', $event.target.value)"
45
- :class="errorClasses"
46
- class="block w-full flex-1 rounded-l-md px-3 py-2 text-gray-900 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 disabled:opacity-50 sm:text-sm"
47
- :placeholder="placeholder"
48
- :disabled="disabled"
49
- />
50
- <div
51
- v-if="!isValidate"
52
- class="pointer-events-none absolute inset-y-0 right-14 flex items-center pr-3 text-red-600"
53
- >
54
- <c-icon name="exclamation-circle" type="solid" class="h-5 w-5"></c-icon>
55
- </div>
56
- <span
57
- :class="disabled ? 'opacity-50' : ''"
58
- class="inline-flex items-center rounded-r-md border border-l-0 border-gray-300 bg-gray-50 px-4 py-2 text-gray-500 sm:text-sm"
59
- >
60
- {{ addon }}
61
- </span>
62
- </div>
63
- <div v-if="inlineAddon && addonType == 'trailing'" class="relative mt-1 flex rounded-md">
64
- <input
65
- :type="inputType"
66
- :value="inputValue"
67
- @input="$emit('input', $event.target.value)"
68
- @blur="$emit('blur', $event.target.value)"
69
- :class="errorClasses"
70
- class="block w-full flex-1 rounded-md px-3 py-2 text-gray-900 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 disabled:opacity-50 sm:text-sm"
71
- :placeholder="placeholder"
72
- :disabled="disabled"
73
- />
74
- <div class="pointer-events-none absolute inset-y-0 right-3 flex items-center">
75
- <div
76
- v-if="!isValidate"
77
- class="pointer-events-none right-0 flex items-center pr-2 text-red-600"
78
- >
79
- <c-icon name="exclamation-circle" type="solid" class="h-5 w-5"></c-icon>
80
- </div>
81
- <span
82
- class="text-gray-500 sm:text-sm"
83
- :class="[disabled ? 'opacity-50' : '', inputType === 'number' ? 'mr-5' : '']"
84
- >
85
- {{ addon }}
86
- </span>
87
- </div>
88
- </div>
89
- <div v-if="inlineAddon && addonType == 'leading'" class="relative mt-1 flex rounded-md">
90
- <div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3">
91
- <span class="text-gray-500 sm:text-sm">{{ addon }}</span>
92
- </div>
93
- <input
94
- :type="inputType"
95
- :value="inputValue"
96
- @input="$emit('input', $event.target.value)"
97
- @blur="$emit('blur', $event.target.value)"
98
- :class="errorClasses"
99
- :style="`padding-left:${leftPaddingStyle}`"
100
- class="block w-full rounded-md text-gray-900 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 disabled:opacity-50 sm:text-sm"
101
- :placeholder="placeholder"
102
- :disabled="disabled"
103
- />
104
- <div
105
- v-if="!isValidate"
106
- class="pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3 text-red-600"
107
- >
108
- <c-icon name="exclamation-circle" type="solid" class="h-5 w-5"></c-icon>
109
- </div>
110
- </div>
111
- <p v-if="!isValidate" class="mt-2 text-left text-sm text-red-600">
112
- {{ errorMessage }}
113
- </p>
114
- <p v-if="helpText && isValidate == true" :class="`mt-2 text-sm ${helpTextColorStyles}`">
115
- {{ helpText }}
116
- </p>
117
- </div>
118
- </template>
119
-
120
- <script>
121
- import CIcon from "../CIcon/CIcon.vue";
122
- export default {
123
- name: "CInputAddon",
124
- components: { CIcon },
125
- props: {
126
- label: {
127
- type: String,
128
- },
129
- placeholder: {
130
- type: String,
131
- },
132
- value: [String, Number],
133
- hint: { type: String },
134
- helpText: {
135
- type: String,
136
- },
137
- addon: { type: String },
138
- helpTextColor: {
139
- type: String,
140
- default: "gray",
141
- },
142
- inlineAddon: { type: Boolean },
143
- addonType: {
144
- type: String,
145
- },
146
- isValidate: { type: Boolean },
147
- errorMessage: {
148
- type: String,
149
- },
150
- disabled: {
151
- type: Boolean,
152
- },
153
- // whether the input field is mandatory or not
154
- isRequired: {
155
- type: Boolean,
156
- },
157
- inputType: {
158
- type: String,
159
- default: "text",
160
- },
161
- },
162
- computed: {
163
- errorClasses() {
164
- return {
165
- "border-red-300 text-red-900 placeholder-red-300 focus:ring-red-500 focus:border-red-500":
166
- this.isValidate == false,
167
- "border-gray-300": this.isValidate == true,
168
- };
169
- },
170
- leftPaddingStyle() {
171
- var leftPadding;
172
- if (this.addon.length <= 2) {
173
- leftPadding = "2rem";
174
- } else if (this.addon.length >= 3) {
175
- leftPadding = "3.5rem";
176
- }
177
- return leftPadding;
178
- },
179
- helpTextColorStyles() {
180
- switch (this.helpTextColor) {
181
- case "green":
182
- return "text-green-500";
183
- case "red":
184
- return "text-red-500";
185
- default:
186
- return "text-gray-500";
187
- }
188
- },
189
- },
190
- data() {
191
- return {
192
- inputValue: this.value,
193
- };
194
- },
195
- methods: {},
196
- watch: {
197
- value() {
198
- this.inputValue = this.value;
199
- },
200
- },
201
- };
202
- </script>
@@ -1,3 +0,0 @@
1
- import CInputAddon from './CInputAddon.vue'
2
-
3
- export default CInputAddon
@@ -1,93 +0,0 @@
1
- <template>
2
- <div>
3
- <div class="flex justify-between">
4
- <div class="flex items-center">
5
- <!-- label of input field -->
6
- <label v-if="label" class="block text-sm font-medium text-gray-900">
7
- {{ label }}
8
- </label>
9
- <!-- asterisk sign to render if field is required -->
10
- <p v-if="isRequired" class="ml-1 text-red-600">*</p>
11
- </div>
12
- <span v-if="hint" class="text-sm text-gray-500">{{ hint }}</span>
13
- </div>
14
- <div class="relative mt-1 rounded-md">
15
- <input
16
- type="text"
17
- :class="errorClasses"
18
- class="block w-full flex-1 rounded-md px-3 py-2 text-gray-900 focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
19
- :placeholder="placeholder"
20
- :value="email"
21
- @blur="checkValidation"
22
- @input="$emit('input', $event.target.value)"
23
- />
24
- <div
25
- v-if="isValidate"
26
- class="pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3 text-red-600"
27
- >
28
- <c-icon name="exclamation-circle" type="solid" class="h-5 w-5"></c-icon>
29
- </div>
30
- </div>
31
- <p v-if="isValidate" class="mt-2 text-sm text-red-600">Please enter valid email address</p>
32
- <p v-if="helpText && isValidate == false" class="mt-2 text-sm text-gray-500">
33
- {{ helpText }}
34
- </p>
35
- </div>
36
- </template>
37
-
38
- <script>
39
- import CIcon from "../CIcon/CIcon.vue";
40
- export default {
41
- name: "CInputEmail",
42
- components: { CIcon },
43
- props: {
44
- label: {
45
- type: String,
46
- required: true,
47
- },
48
- placeholder: {
49
- type: String,
50
- },
51
- hint: { type: String },
52
- helpText: {
53
- type: String,
54
- },
55
- // v-model of the field
56
- value: {
57
- type: String,
58
- },
59
- // whether the email field is mandatory or not
60
- isRequired: {
61
- type: Boolean,
62
- },
63
- },
64
- data() {
65
- return {
66
- email: this.value,
67
- isValidate: false,
68
- };
69
- },
70
- computed: {
71
- errorClasses() {
72
- return {
73
- "border-red-300 text-red-900 placeholder-red-300 focus:ring-red-500 focus:border-red-500":
74
- this.isValidate == true,
75
- "border-gray-300": this.isValidate == false,
76
- };
77
- },
78
- },
79
- methods: {
80
- checkValidation() {
81
- this.isValidate =
82
- /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/.test(this.email) || this.email == ""
83
- ? false
84
- : true;
85
- },
86
- },
87
- watch: {
88
- value() {
89
- this.email = this.value;
90
- },
91
- },
92
- };
93
- </script>
@@ -1,3 +0,0 @@
1
- import CInputEmail from './CInputEmail.vue'
2
-
3
- export default CInputEmail
@@ -1,22 +0,0 @@
1
- <template>
2
- <div>
3
- <div :class="{ 'border-b-2': divider }" class="pb-2 border-gray-200">
4
- <h3 class="text-lg leading-6 font-medium text-gray-700">
5
- {{ title }}
6
- </h3>
7
- <p v-if="description" class="max-w-4xl text-sm text-gray-500">
8
- {{ description }}
9
- </p>
10
- </div>
11
- </div>
12
- </template>
13
- <script>
14
- export default {
15
- name: "CModalHeading",
16
- props: {
17
- title: { type: String, required: true },
18
- description: { type: String },
19
- divider: { type: Boolean },
20
- },
21
- };
22
- </script>
@@ -1,3 +0,0 @@
1
- import CModalHeading from './CModalHeading.vue'
2
-
3
- export default CModalHeading
@@ -1,39 +0,0 @@
1
- <template>
2
- <div>
3
- <div v-if="description" class="mt-2 flex flex-col sm:flex-row sm:flex-wrap sm:space-x-6">
4
- <div class="flex items-center text-sm text-gray-500">
5
- {{ description }}
6
- </div>
7
- </div>
8
- <div class="mt-1 flex flex-col sm:flex-row sm:flex-wrap sm:mt-0 sm:space-x-6">
9
- <div class="mt-2 flex items-center text-sm text-indigo-600" v-if="helpArticle">
10
- <c-icon class="mr-1.5 h-5 w-5" name="book-open" type="solid"></c-icon>
11
- <a :href="helpArticle" target="_blank" class="font-medium text-indigo-600 hover:underline">
12
- How to get started
13
- </a>
14
- </div>
15
- <div class="mt-2 flex items-center text-sm text-indigo-600" v-if="helpVideo">
16
- <c-icon class="mr-1.5 h-5 w-5" name="video-camera" type="solid"></c-icon>
17
- <a :href="helpVideo" target="_blank" class="font-medium text-indigo-600 hover:underline">
18
- Watch a video
19
- </a>
20
- </div>
21
- </div>
22
- </div>
23
- </template>
24
-
25
- <script>
26
- import CIcon from "../CIcon/CIcon.vue";
27
- export default {
28
- name: "CModuleHelpLinks",
29
- components: { CIcon },
30
- props: {
31
- description: { type: String },
32
- helpVideo: {
33
- type: String,
34
- },
35
- helpArticle: { type: String },
36
- },
37
- methods: {},
38
- };
39
- </script>
@@ -1,3 +0,0 @@
1
- import CModuleHelpLinks from "./CModuleHelpLinks.vue";
2
-
3
- export default CModuleHelpLinks;