classcard-ui 0.2.291 → 0.2.295
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/dist/classcard-ui.common.js +69 -63
- package/dist/classcard-ui.common.js.map +1 -1
- package/dist/classcard-ui.umd.js +69 -63
- package/dist/classcard-ui.umd.js.map +1 -1
- package/dist/classcard-ui.umd.min.js +1 -1
- package/dist/classcard-ui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CButtonGroup/CButtonGroup.vue +6 -2
- package/src/components/CInput/CInput.vue +1 -0
- package/src/components/CReorderableStackedList/CReorderableStackedList.vue +1 -0
- package/src/stories/CButtonGroup.stories.js +9 -1
- package/src/stories/CReorderableStackedList.stories.js +1 -1
package/package.json
CHANGED
|
@@ -51,7 +51,8 @@
|
|
|
51
51
|
'rounded-l-md border-r-0': index == 0,
|
|
52
52
|
'px-4': button.label,
|
|
53
53
|
}"
|
|
54
|
-
@click="
|
|
54
|
+
@click="handleEvent(button.onClickAction)"
|
|
55
|
+
@blur="handleEvent(button.blurAction)"
|
|
55
56
|
>
|
|
56
57
|
<div v-if="button.icon == ''" class="h-5"></div>
|
|
57
58
|
<c-icon
|
|
@@ -85,9 +86,12 @@ export default {
|
|
|
85
86
|
};
|
|
86
87
|
},
|
|
87
88
|
methods: {
|
|
89
|
+
handleEvent(function_name) {
|
|
90
|
+
if(function_name) function_name()
|
|
91
|
+
},
|
|
88
92
|
buttonAction(event, value) {
|
|
89
93
|
this.$emit("onClick", value);
|
|
90
|
-
}
|
|
94
|
+
}
|
|
91
95
|
},
|
|
92
96
|
};
|
|
93
97
|
</script>
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
:value="inputValue"
|
|
19
19
|
@input="$emit('input', $event.target.value)"
|
|
20
20
|
@blur="$emit('blur', $event.target.value)"
|
|
21
|
+
@focus="$emit('focus', $event.target.value)"
|
|
21
22
|
:class="errorClasses"
|
|
22
23
|
class="shadow-sm 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 text-gray-900"
|
|
23
24
|
:placeholder="placeholder"
|
|
@@ -15,10 +15,18 @@ const Template = (args, { argTypes }) => ({
|
|
|
15
15
|
template: '<c-button-group v-bind="$props" />',
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
+
const consoleIt = () => {
|
|
19
|
+
console.log("onclick fired")
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const consoleOut = () => {
|
|
23
|
+
console.log("focus lost")
|
|
24
|
+
}
|
|
25
|
+
|
|
18
26
|
export const Default = Template.bind({});
|
|
19
27
|
Default.args = {
|
|
20
28
|
buttonObject: [
|
|
21
|
-
{ icon: "bookmark", label: "Students", value:'students' },
|
|
29
|
+
{ icon: "bookmark", label: "Students", value:'students', onClickAction: consoleIt, blurAction: consoleOut },
|
|
22
30
|
{ icon: "chat", label: "Alkama", value:'alkama'},
|
|
23
31
|
{ icon: "bookmark", label: "Attendance", value:'attendance' },
|
|
24
32
|
],
|
|
@@ -18,6 +18,6 @@ const Template = (args, { argTypes }) => ({
|
|
|
18
18
|
export const Default = Template.bind({});
|
|
19
19
|
Default.args = {
|
|
20
20
|
listItems: [
|
|
21
|
-
{ image: "https://images.unsplash.com/photo-1491528323818-fdd1faba62cc?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80", heading: "Maths-Level1", description: "calvin.hawkins@example.com", size:"medium", rounded:false, tag:true, collapse:false, listIcon: true, reorder:true },
|
|
21
|
+
{ image: "https://images.unsplash.com/photo-1491528323818-fdd1faba62cc?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80", heading: "Maths-Level1", description: "calvin.hawkins@example.com", size:"medium", rounded:false, tag:true, collapse:false, listIcon: true, reorder:true, imageClasses: "bg-gray-200 border-gray-200 border" },
|
|
22
22
|
],
|
|
23
23
|
};
|