classcard-ui 0.2.230 → 0.2.234
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 +88 -73
- package/dist/classcard-ui.common.js.map +1 -1
- package/dist/classcard-ui.umd.js +88 -73
- 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 +2 -2
- package/src/components/CButtonWithDropdown/CButtonWithDropdown.vue +15 -13
- package/src/components/CMultiselect/CMultiselect.vue +2 -0
- package/src/components/CPhoneNumber/CPhoneNumber.vue +10 -1
- package/src/stories/CButtonWithDropdown.stories.js +16 -6
package/package.json
CHANGED
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
v-for="(button, index) in buttonObject"
|
|
46
46
|
v-bind:key="button.label"
|
|
47
47
|
type="button"
|
|
48
|
+
class="relative inline-flex items-center px-2 py-2 border-r border-l border-t border-b border-gray-300 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:z-10 focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500"
|
|
48
49
|
:class="{
|
|
49
50
|
'rounded-r-md border-l-0': index == buttonObject.length - 1,
|
|
50
|
-
'rounded-l-md border-r-0
|
|
51
|
+
'rounded-l-md border-r-0': index == 0,
|
|
51
52
|
'px-4': button.label,
|
|
52
53
|
}"
|
|
53
|
-
class="relative inline-flex items-center px-2 py-2 border-r border-t border-b border-gray-300 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:z-10 focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500"
|
|
54
54
|
@click="buttonAction($event, button.value)"
|
|
55
55
|
>
|
|
56
56
|
<div v-if="button.icon == ''" class="h-5"></div>
|
|
@@ -25,7 +25,12 @@
|
|
|
25
25
|
:class="dropdownPositionClass"
|
|
26
26
|
class="origin-top-right absolute right-0 z-10 mt-2 -mr-1 w-56 rounded-md shadow-lg bg-white ring-1 ring-gray-900 ring-opacity-5"
|
|
27
27
|
>
|
|
28
|
-
<div
|
|
28
|
+
<div
|
|
29
|
+
class="py-1"
|
|
30
|
+
role="menu"
|
|
31
|
+
aria-orientation="vertical"
|
|
32
|
+
aria-labelledby="option-menu"
|
|
33
|
+
>
|
|
29
34
|
<li
|
|
30
35
|
v-for="item in items"
|
|
31
36
|
v-bind:key="item.items"
|
|
@@ -78,21 +83,18 @@ export default {
|
|
|
78
83
|
computed: {
|
|
79
84
|
classes() {
|
|
80
85
|
return {
|
|
81
|
-
"border text-gray-700 border-gray-300 hover:bg-gray-50 focus:ring-indigo-600":
|
|
82
|
-
this.type == "secondary",
|
|
83
86
|
"border text-white hover:bg-indigo-800 bg-indigo-700 focus:ring-indigo-600":
|
|
84
87
|
this.type == "primary",
|
|
85
|
-
"border text-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
+
"border text-gray-700 border-gray-300 hover:bg-gray-50 focus:ring-indigo-600":
|
|
89
|
+
this.type == "secondary",
|
|
90
|
+
"border text-white hover:bg-green-800 bg-green-700 focus:ring-green-600":
|
|
91
|
+
this.type == "success",
|
|
92
|
+
"border text-white hover:bg-red-800 bg-red-700 focus:ring-red-600":
|
|
93
|
+
this.type == "danger",
|
|
94
|
+
"border border-green-800 bg-green-100 text-green-800 hover:bg-green-200 focus:ring-green-200":
|
|
95
|
+
this.type == "light-green",
|
|
88
96
|
"border border-red-800 bg-red-100 text-red-800 hover:bg-red-200 focus:ring-red-200":
|
|
89
|
-
|
|
90
|
-
(this.type == "light-red" && !this.selectedValue),
|
|
91
|
-
"border border-red-800 bg-red-400 text-white hover:bg-red-500 focus:ring-red-500":
|
|
92
|
-
(this.type == "light-red" && this.isSelected == true) ||
|
|
93
|
-
(this.type == "light-red" && this.selectedValue),
|
|
94
|
-
"border border-green-900 bg-green-800 text-white hover:bg-green-900 focus:ring-green-900":
|
|
95
|
-
this.type == "success" && this.selectedValue,
|
|
97
|
+
this.type == "light-red",
|
|
96
98
|
"cursor-default pointer-events-none": this.isLoading,
|
|
97
99
|
};
|
|
98
100
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<label v-if="label" class="text-sm text-gray-900">{{ label }}</label>
|
|
4
|
+
<p v-if="subLabel" class="text-sm text-gray-500">{{ subLabel }}</p>
|
|
4
5
|
<v-select
|
|
5
6
|
class="text-sm mt-1"
|
|
6
7
|
:placeholder="placeholder"
|
|
@@ -80,6 +81,7 @@ export default {
|
|
|
80
81
|
required: true,
|
|
81
82
|
},
|
|
82
83
|
label: String,
|
|
84
|
+
subLabel: String,
|
|
83
85
|
placeholder: {
|
|
84
86
|
type: String,
|
|
85
87
|
default: "Start typing... (min 2 characters) to search options",
|
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<label class="text-sm text-gray-900">{{ label }}</label>
|
|
4
4
|
<div class="w-full mt-1">
|
|
5
|
-
<vue-tel-input
|
|
5
|
+
<vue-tel-input
|
|
6
|
+
v-bind="bindProps"
|
|
7
|
+
:autoFormat="false"
|
|
8
|
+
v-model="value"
|
|
9
|
+
></vue-tel-input>
|
|
6
10
|
</div>
|
|
7
11
|
</div>
|
|
8
12
|
</template>
|
|
@@ -34,6 +38,11 @@ export default {
|
|
|
34
38
|
},
|
|
35
39
|
};
|
|
36
40
|
},
|
|
41
|
+
watch: {
|
|
42
|
+
value(newVal) {
|
|
43
|
+
this.$emit("onChange", newVal);
|
|
44
|
+
},
|
|
45
|
+
},
|
|
37
46
|
};
|
|
38
47
|
</script>
|
|
39
48
|
<style>
|
|
@@ -8,7 +8,17 @@ export default {
|
|
|
8
8
|
subcomponents: { CIcon },
|
|
9
9
|
argTypes: {
|
|
10
10
|
type: {
|
|
11
|
-
control: {
|
|
11
|
+
control: {
|
|
12
|
+
type: "select",
|
|
13
|
+
options: [
|
|
14
|
+
"primary",
|
|
15
|
+
"secondary",
|
|
16
|
+
"success",
|
|
17
|
+
"danger",
|
|
18
|
+
"light-green",
|
|
19
|
+
"light-red",
|
|
20
|
+
],
|
|
21
|
+
},
|
|
12
22
|
},
|
|
13
23
|
items: { control: { type: "object" } },
|
|
14
24
|
},
|
|
@@ -23,9 +33,9 @@ const Template = (args, { argTypes }) => ({
|
|
|
23
33
|
export const Default = Template.bind({});
|
|
24
34
|
Default.args = {
|
|
25
35
|
items: [
|
|
26
|
-
{ text: "one", value:
|
|
27
|
-
{ text: "two"
|
|
36
|
+
{ text: "one", value: "one" },
|
|
37
|
+
{ text: "two", value: "two" },
|
|
28
38
|
],
|
|
29
|
-
// type: 'primary',
|
|
30
|
-
label: "Button"
|
|
31
|
-
};
|
|
39
|
+
// type: 'primary',
|
|
40
|
+
label: "Button",
|
|
41
|
+
};
|