classcard-ui 0.2.199 → 0.2.203

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,15 +1,16 @@
1
1
  {
2
2
  "name": "classcard-ui",
3
- "version": "0.2.199",
4
- "main": "dist/classcard-ui.common.js",
3
+ "version": "0.2.203",
5
4
  "scripts": {
6
5
  "serve": "vue-cli-service serve",
7
6
  "build": "vue-cli-service build",
8
- "build-bundle": "vue-cli-service build --target lib --name classcard-ui src/main.js",
9
7
  "lint": "vue-cli-service lint",
10
- "storybook": "start-storybook -p 6006",
11
- "build-storybook": "build-storybook"
8
+ "build-bundle": "vue-cli-service build --target lib --name classcard-ui src/main.js",
9
+ "build-storybook": "build-storybook",
10
+ "publish-to-npm": "npm version patch && npm run build-bundle && npm publish",
11
+ "storybook": "start-storybook -p 6006"
12
12
  },
13
+ "main": "dist/classcard-ui.common.js",
13
14
  "files": [
14
15
  "dist/*",
15
16
  "src/*"
@@ -17,13 +18,18 @@
17
18
  "dependencies": {
18
19
  "@shopify/draggable": "^1.0.0-beta.8",
19
20
  "@storybook/addon-postcss": "^2.0.0",
20
- "@tailwindcss/forms": "^0.2.1",
21
+ "@tailwindcss/postcss7-compat": "^2.2.17",
22
+ "autoprefixer": "^9",
21
23
  "core-js": "^3.18.0",
22
24
  "dayjs": "^1.10.7",
23
25
  "filestack-js": "^3.25.0",
24
26
  "gridjs-selection": "^3.4.0",
25
27
  "gridjs-vue": "^3.4.0",
28
+ "i": "^0.3.7",
26
29
  "lodash-es": "^4.17.21",
30
+ "npm": "^8.3.0",
31
+ "postcss": "^7",
32
+ "tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.17",
27
33
  "v-calendar": "^2.3.2",
28
34
  "vue": "^2.6.14",
29
35
  "vue-good-table": "^2.21.8",
@@ -36,22 +42,21 @@
36
42
  },
37
43
  "devDependencies": {
38
44
  "@babel/core": "^7.15.5",
39
- "@storybook/addon-actions": "^6.4.4",
40
- "@storybook/addon-essentials": "^6.4.4",
41
- "@storybook/addon-links": "^6.4.4",
42
- "@storybook/vue": "^6.4.4",
45
+ "@storybook/addon-actions": "^6.4.9",
46
+ "@storybook/addon-essentials": "^6.4.9",
47
+ "@storybook/addon-links": "^6.4.9",
48
+ "@storybook/vue": "^6.4.9",
49
+ "@tailwindcss/forms": "^0.4.0",
43
50
  "@tailwindcss/postcss7-compat": "^2.2.14",
44
51
  "@types/lodash-es": "^4.17.5",
45
52
  "@vue/cli-plugin-babel": "^4.5.13",
46
53
  "@vue/cli-plugin-eslint": "^4.5.13",
47
54
  "@vue/cli-service": "^4.5.13",
48
- "autoprefixer": "^9.8.6",
49
55
  "babel-eslint": "^10.1.0",
50
56
  "babel-loader": "^8.2.2",
51
57
  "eslint": "^6.7.2",
52
58
  "eslint-plugin-vue": "^6.2.2",
53
- "postcss": "^7.0.36",
54
- "tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.14",
59
+ "vue-cli-plugin-tailwind": "~2.2.18",
55
60
  "vue-template-compiler": "^2.6.14"
56
61
  },
57
62
  "eslintConfig": {
@@ -0,0 +1,5 @@
1
+ @tailwind base;
2
+
3
+ @tailwind components;
4
+
5
+ @tailwind utilities;
@@ -17,6 +17,7 @@
17
17
  :type="type"
18
18
  :value="inputValue"
19
19
  @input="$emit('input', $event.target.value)"
20
+ @blur="$emit('blur', $event.target.value)"
20
21
  :class="errorClasses"
21
22
  class="focus:ring-indigo-500 focus:border-indigo-500 flex-1 block w-full px-3 py-2 rounded-md sm:text-sm disabled:opacity-50"
22
23
  :placeholder="placeholder"
@@ -1,12 +1,11 @@
1
1
  <template>
2
2
  <div>
3
- <!-- <label class="text-sm text-gray-900">{{label}}</label>
3
+ <!-- <label class="text-sm text-gray-900">{{label}}</label>
4
4
  <multiselect class="mt-1" v-model="value" :options="options" :multiple="true">
5
5
  </multiselect> -->
6
6
  </div>
7
7
  </template>
8
8
  <script>
9
- import Multiselect from "vue-multiselect";
10
9
  export default {
11
10
  // name: "CMultiselect",
12
11
  // components: { Multiselect },
@@ -38,7 +37,7 @@ export default {
38
37
  .multiselect__tag-icon:hover,
39
38
  .multiselect__option--highlight,
40
39
  .multiselect__option--highlight::after {
41
- background: #0369A1;
40
+ background: #0369a1;
42
41
  color: #fff;
43
42
  }
44
43
  </style>
@@ -10,13 +10,17 @@
10
10
  <input
11
11
  type="radio"
12
12
  :value="item.value"
13
+ :name="name"
13
14
  v-model="selectedItem"
14
15
  @click="onChange(item.value)"
15
16
  class="focus:ring-indigo-500 h-4 w-4 text-indigo-600 cursor-pointer border-gray-300 disabled:opacity-50"
16
17
  :disabled="isDisabled"
17
18
  />
18
19
  </div>
19
- <label class="ml-3 flex flex-col cursor-pointer" @click="onChange(item.value)">
20
+ <label
21
+ class="ml-3 flex flex-col cursor-pointer"
22
+ @click="onChange(item.value)"
23
+ >
20
24
  <span class="block text-sm font-medium">
21
25
  {{ item.label }}
22
26
  </span>
@@ -44,6 +48,10 @@ export default {
44
48
  isDisabled: {
45
49
  type: Boolean,
46
50
  },
51
+ name: {
52
+ type: String,
53
+ required: true,
54
+ },
47
55
  },
48
56
  data() {
49
57
  return {
@@ -14,7 +14,8 @@
14
14
  :placeholder="placeholder"
15
15
  :rows="rows"
16
16
  :class="errorClasses"
17
- class="focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm rounded-md"
17
+ :disabled="disabled"
18
+ class="focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm rounded-md disabled:opacity-50"
18
19
  ></textarea>
19
20
  <div
20
21
  v-if="!isValidate"
@@ -55,6 +56,10 @@ export default {
55
56
  errorMessage: {
56
57
  type: String,
57
58
  },
59
+ disabled: {
60
+ type: Boolean,
61
+ default: false,
62
+ },
58
63
  },
59
64
  computed: {
60
65
  errorClasses() {
package/src/icons.js CHANGED
@@ -52,8 +52,7 @@ export default {
52
52
  "M3 6l3 1m0 0l-3 9a5.002 5.002 0 006.001 0M6 7l3 9M6 7l6-2m6 2l3-1m-3 1l-3 9a5.002 5.002 0 006.001 0M18 7l3 9m-3-9l-6-2m0-2v2m0 16V5m0 16H9m3 0h3",
53
53
  "clipboard-check":
54
54
  "M9 2a1 1 0 000 2h2a1 1 0 100-2H9z M4 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v11a2 2 0 01-2 2H6a2 2 0 01-2-2V5zm9.707 5.707a1 1 0 00-1.414-1.414L9 12.586l-1.293-1.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
55
- cloud:
56
- "M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z",
55
+ cloud: "M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z",
57
56
  search: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",
58
57
  "menu-alt-2": "M4 6h16M4 12h16M4 18h7",
59
58
  close: "M6 18L18 6M6 6l12 12",
@@ -100,8 +99,7 @@ export default {
100
99
  "M18 5v8a2 2 0 01-2 2h-5l-5 4v-4H4a2 2 0 01-2-2V5a2 2 0 012-2h12a2 2 0 012 2zM7 8H5v2h2V8zm2 0h2v2H9V8zm6 0h-2v2h2V8z",
101
100
  "check-circle-solid":
102
101
  "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
103
- "folder-solid":
104
- "M2 6a2 2 0 012-2h5l2 2h5a2 2 0 012 2v6a2 2 0 01-2 2H4a2 2 0 01-2-2V6z",
102
+ "folder-solid": "M2 6a2 2 0 012-2h5l2 2h5a2 2 0 012 2v6a2 2 0 01-2 2H4a2 2 0 01-2-2V6z",
105
103
  "shopping-cart-outline":
106
104
  "M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z",
107
105
  "external-link-outline":
@@ -186,10 +184,11 @@ export default {
186
184
  "M4.083 9h1.946c.089-1.546.383-2.97.837-4.118A6.004 6.004 0 004.083 9zM10 2a8 8 0 100 16 8 8 0 000-16zm0 2c-.076 0-.232.032-.465.262-.238.234-.497.623-.737 1.182-.389.907-.673 2.142-.766 3.556h3.936c-.093-1.414-.377-2.649-.766-3.556-.24-.56-.5-.948-.737-1.182C10.232 4.032 10.076 4 10 4zm3.971 5c-.089-1.546-.383-2.97-.837-4.118A6.004 6.004 0 0115.917 9h-1.946zm-2.003 2H8.032c.093 1.414.377 2.649.766 3.556.24.56.5.948.737 1.182.233.23.389.262.465.262.076 0 .232-.032.465-.262.238-.234.498-.623.737-1.182.389-.907.673-2.142.766-3.556zm1.166 4.118c.454-1.147.748-2.572.837-4.118h1.946a6.004 6.004 0 01-2.783 4.118zm-6.268 0C6.412 13.97 6.118 12.546 6.03 11H4.083a6.004 6.004 0 002.783 4.118z",
187
185
  "x-circle-solid":
188
186
  "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",
189
- "x-circle-outline":
190
- "M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z",
187
+ "x-circle-outline": "M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z",
191
188
  "check-circle-outline": "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
192
189
  "play-solid":
193
190
  "M10 18a8 8 0 100-16 8 8 0 000 16zM9.555 7.168A1 1 0 008 8v4a1 1 0 001.555.832l3-2a1 1 0 000-1.664l-3-2z",
191
+ "phone-outgoing-solid":
192
+ "M17.924 2.617a.997.997 0 00-.215-.322l-.004-.004A.997.997 0 0017 2h-4a1 1 0 100 2h1.586l-3.293 3.293a1 1 0 001.414 1.414L16 5.414V7a1 1 0 102 0V3a.997.997 0 00-.076-.383z M2 3a1 1 0 011-1h2.153a1 1 0 01.986.836l.74 4.435a1 1 0 01-.54 1.06l-1.548.773a11.037 11.037 0 006.105 6.105l.774-1.548a1 1 0 011.059-.54l4.435.74a1 1 0 01.836.986V17a1 1 0 01-1 1h-2C7.82 18 2 12.18 2 5V3z",
194
193
  save: "M7.707 10.293a1 1 0 10-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L11 11.586V6h5a2 2 0 012 2v7a2 2 0 01-2 2H4a2 2 0 01-2-2V8a2 2 0 012-2h5v5.586l-1.293-1.293zM9 4a1 1 0 012 0v2H9V4z",
195
194
  };
package/src/main.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as components from './components'
2
+ import './assets/tailwind.css'
2
3
 
3
4
  const ClasscardUI = {
4
5
  install(Vue) {
@@ -23,7 +23,7 @@ Default.args = {
23
23
  description: "Add subjects to include them in the package",
24
24
  value: 1,
25
25
  isDisabled: false,
26
- onChange(val) {
26
+ onChange() {
27
27
  return;
28
28
  },
29
29
  };
@@ -32,4 +32,5 @@ Default.args = {
32
32
  ],
33
33
  selectedOption: "value1",
34
34
  isDisabled: false,
35
+ name: "radio",
35
36
  };
@@ -22,7 +22,8 @@ export default {
22
22
  const Template = (args, { argTypes }) => ({
23
23
  props: Object.keys(argTypes),
24
24
  components: { CTable },
25
- template: '<c-table @hideCols="hideCols" @showCheckbox="showCheckbox" @reordered="handleReorder" v-bind="$props" />',
25
+ template:
26
+ '<c-table @hideCols="hideCols" @showCheckbox="showCheckbox" @reordered="handleReorder" v-bind="$props" />',
26
27
  });
27
28
 
28
29
  export const Default = Template.bind({});
@@ -35,8 +36,8 @@ Default.args = {
35
36
  field: "menuOptions",
36
37
  hidden: false,
37
38
  customizeColumn: true,
38
- width: "60px"
39
- }
39
+ width: "60px",
40
+ },
40
41
  ],
41
42
  showHideColumnList: [
42
43
  { label: "", field: "drag", hidden: false },
@@ -45,9 +46,100 @@ Default.args = {
45
46
  field: "mode",
46
47
  hidden: false,
47
48
  sortable: true,
48
- }
49
+ },
50
+ ],
51
+ rows: [
52
+ {
53
+ id: 5,
54
+ mode: "ATM Machine 1",
55
+ sort_order: 2,
56
+ status: 1,
57
+ rcInstitutionID: 82,
58
+ created_at: "2020-09-02T12:53:09.000000Z",
59
+ updated_at: "2021-11-25T13:13:56.000000Z",
60
+ },
61
+ {
62
+ id: 11,
63
+ mode: "QA 1",
64
+ sort_order: 3,
65
+ status: 1,
66
+ rcInstitutionID: 82,
67
+ created_at: "2020-09-04T09:57:47.000000Z",
68
+ updated_at: "2021-11-25T13:13:56.000000Z",
69
+ },
70
+ {
71
+ id: 7,
72
+ mode: "ATM Machine 2",
73
+ sort_order: 4,
74
+ status: 1,
75
+ rcInstitutionID: 82,
76
+ created_at: "2020-09-04T09:45:47.000000Z",
77
+ updated_at: "2021-11-25T13:13:56.000000Z",
78
+ },
79
+ {
80
+ id: 18,
81
+ mode: "QA 3",
82
+ sort_order: 8,
83
+ status: 1,
84
+ rcInstitutionID: 82,
85
+ created_at: "2020-09-04T10:05:15.000000Z",
86
+ updated_at: "2021-11-25T13:13:56.000000Z",
87
+ },
88
+ {
89
+ id: 12,
90
+ mode: "QA 2",
91
+ sort_order: 21,
92
+ status: 1,
93
+ rcInstitutionID: 82,
94
+ created_at: "2020-09-04T09:57:55.000000Z",
95
+ updated_at: "2021-11-25T13:13:56.000000Z",
96
+ },
97
+ {
98
+ id: 15,
99
+ mode: "QA 4",
100
+ sort_order: 22,
101
+ status: 1,
102
+ rcInstitutionID: 82,
103
+ created_at: "2020-09-04T10:00:23.000000Z",
104
+ updated_at: "2021-11-25T13:13:56.000000Z",
105
+ },
106
+ {
107
+ id: 162,
108
+ mode: "Yes bank",
109
+ sort_order: 62,
110
+ status: 1,
111
+ rcInstitutionID: 82,
112
+ created_at: "2020-11-18T09:22:43.000000Z",
113
+ updated_at: "2021-11-25T13:13:56.000000Z",
114
+ },
115
+ {
116
+ id: 163,
117
+ mode: "SBI bank",
118
+ sort_order: 63,
119
+ status: 1,
120
+ rcInstitutionID: 82,
121
+ created_at: "2020-11-18T09:33:17.000000Z",
122
+ updated_at: "2021-11-25T13:13:56.000000Z",
123
+ },
124
+ {
125
+ id: 164,
126
+ mode: "BOB bank",
127
+ sort_order: 64,
128
+ status: 1,
129
+ rcInstitutionID: 82,
130
+ created_at: "2020-11-18T09:35:12.000000Z",
131
+ updated_at: "2021-11-25T13:13:56.000000Z",
132
+ },
133
+ {
134
+ id: 165,
135
+ mode: "PNB bank",
136
+ sort_order: 65,
137
+ status: 1,
138
+ rcInstitutionID: 82,
139
+ created_at: "2020-11-18T09:55:16.000000Z",
140
+ updated_at: "2021-11-25T13:13:56.000000Z",
141
+ },
49
142
  ],
50
- rows: [{"id":5,"mode":"ATM Machine 1","sort_order":2,"status":1,"rcInstitutionID":82,"created_at":"2020-09-02T12:53:09.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"},{"id":11,"mode":"QA 1","sort_order":3,"status":1,"rcInstitutionID":82,"created_at":"2020-09-04T09:57:47.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"},{"id":7,"mode":"ATM Machine 2","sort_order":4,"status":1,"rcInstitutionID":82,"created_at":"2020-09-04T09:45:47.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"},{"id":18,"mode":"QA 3","sort_order":8,"status":1,"rcInstitutionID":82,"created_at":"2020-09-04T10:05:15.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"},{"id":12,"mode":"QA 2","sort_order":21,"status":1,"rcInstitutionID":82,"created_at":"2020-09-04T09:57:55.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"},{"id":15,"mode":"QA 4","sort_order":22,"status":1,"rcInstitutionID":82,"created_at":"2020-09-04T10:00:23.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"},{"id":162,"mode":"Yes bank","sort_order":62,"status":1,"rcInstitutionID":82,"created_at":"2020-11-18T09:22:43.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"},{"id":163,"mode":"SBI bank","sort_order":63,"status":1,"rcInstitutionID":82,"created_at":"2020-11-18T09:33:17.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"},{"id":164,"mode":"BOB bank","sort_order":64,"status":1,"rcInstitutionID":82,"created_at":"2020-11-18T09:35:12.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"},{"id":165,"mode":"PNB bank","sort_order":65,"status":1,"rcInstitutionID":82,"created_at":"2020-11-18T09:55:16.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"}],
51
143
  pagination: true,
52
144
  sorting: false,
53
145
  searching: true,
@@ -70,8 +162,8 @@ Default.args = {
70
162
  },
71
163
  handleReorder(val) {
72
164
  Default.args.rows = val;
73
- val.forEach((item, index) => {
165
+ val.forEach((item) => {
74
166
  console.log(item);
75
167
  });
76
- }
168
+ },
77
169
  };
@@ -1,16 +1,16 @@
1
- import CTextarea from '../components/CTextarea/CTextarea.vue';
2
- import './utils.css'
1
+ import CTextarea from "../components/CTextarea/CTextarea.vue";
2
+ import "./utils.css";
3
3
 
4
4
  export default {
5
- title: 'CTextarea',
5
+ title: "CTextarea",
6
6
  component: CTextarea,
7
7
  argTypes: {
8
8
  label: String,
9
9
  placeholder: String,
10
10
  rows: String,
11
11
  helpText: String,
12
- hint:String,
13
- isValidate: Boolean
12
+ hint: String,
13
+ isValidate: Boolean,
14
14
  },
15
15
  };
16
16
 
@@ -22,10 +22,11 @@ const Template = (args, { argTypes }) => ({
22
22
 
23
23
  export const Default = Template.bind({});
24
24
  Default.args = {
25
- label: 'Name',
26
- placeholder: 'Enter your name',
27
- rows: '3',
28
- helpText: 'This information is displayed on booking page',
29
- hint: 'Optional',
30
- isValidate: true
25
+ label: "Name",
26
+ placeholder: "Enter your name",
27
+ rows: "3",
28
+ helpText: "This information is displayed on booking page",
29
+ hint: "Optional",
30
+ isValidate: true,
31
+ disabled: false,
31
32
  };