classcard-ui 0.2.202 → 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.202",
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,6 +18,8 @@
17
18
  "dependencies": {
18
19
  "@shopify/draggable": "^1.0.0-beta.8",
19
20
  "@storybook/addon-postcss": "^2.0.0",
21
+ "@tailwindcss/postcss7-compat": "^2.2.17",
22
+ "autoprefixer": "^9",
20
23
  "core-js": "^3.18.0",
21
24
  "dayjs": "^1.10.7",
22
25
  "filestack-js": "^3.25.0",
@@ -25,6 +28,8 @@
25
28
  "i": "^0.3.7",
26
29
  "lodash-es": "^4.17.21",
27
30
  "npm": "^8.3.0",
31
+ "postcss": "^7",
32
+ "tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.17",
28
33
  "v-calendar": "^2.3.2",
29
34
  "vue": "^2.6.14",
30
35
  "vue-good-table": "^2.21.8",
@@ -47,13 +52,11 @@
47
52
  "@vue/cli-plugin-babel": "^4.5.13",
48
53
  "@vue/cli-plugin-eslint": "^4.5.13",
49
54
  "@vue/cli-service": "^4.5.13",
50
- "autoprefixer": "^10.4.0",
51
55
  "babel-eslint": "^10.1.0",
52
56
  "babel-loader": "^8.2.2",
53
57
  "eslint": "^6.7.2",
54
58
  "eslint-plugin-vue": "^6.2.2",
55
- "postcss": "^8.4.4",
56
- "tailwindcss": "^3.0.1",
59
+ "vue-cli-plugin-tailwind": "~2.2.18",
57
60
  "vue-template-compiler": "^2.6.14"
58
61
  },
59
62
  "eslintConfig": {
@@ -0,0 +1,5 @@
1
+ @tailwind base;
2
+
3
+ @tailwind components;
4
+
5
+ @tailwind utilities;
@@ -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 {
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
  };