@avakhula/ui 0.0.33 → 0.0.34-4.1
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/.eslintrc.cjs +17 -10
- package/.storybook/preview-head.html +1 -0
- package/dist/index.js +9040 -7752
- package/dist/index.umd.cjs +87 -88
- package/dist/style.css +1 -1
- package/package.json +15 -15
- package/src/App.vue +138 -25
- package/src/assets/scss/mixins/dropdown-list-item.scss +8 -1
- package/src/assets/scss/mixins/tooltip-position.scss +1 -1
- package/src/assets/scss/variables/shadows.json +14 -30
- package/src/assets/scss/variables/shadows.scss +10 -15
- package/src/components/Accordion/Accordion.scss +4 -1
- package/src/components/Accordion/Accordion.vue +20 -3
- package/src/components/Accordion/Acordion.spec.js +75 -0
- package/src/components/Alert/Alert.spec.js +69 -0
- package/src/components/Alert/Alert.stories.js +1 -4
- package/src/components/Alert/Alert.vue +22 -3
- package/src/components/Alert/alert.scss +22 -0
- package/src/components/Alert/constants.js +1 -0
- package/src/components/Avatar/Avatar.stories.js +23 -0
- package/src/components/Avatar/Avatar.vue +125 -0
- package/src/components/Avatar/constants.js +4 -0
- package/src/components/Badge/Badge.spec.js +37 -0
- package/src/components/Badge/Badge.vue +1 -1
- package/src/components/Button/Button.spec.js +85 -0
- package/src/components/Button/Button.vue +14 -3
- package/src/components/Button/button.scss +5 -0
- package/src/components/Dropdown/Dropdown.vue +3 -3
- package/src/components/Dropdown/DropdownItem.vue +9 -3
- package/src/components/Form/Checkbox/Checkbox.scss +79 -53
- package/src/components/Form/Checkbox/Checkbox.stories.js +4 -2
- package/src/components/Form/Checkbox/Checkbox.vue +70 -48
- package/src/components/Form/CheckboxGroup/CheckboxGroup.vue +11 -0
- package/src/components/Form/CheckboxGroup/readme.mdx +2 -0
- package/src/components/Form/DatePicker/DatePicker.scss +259 -261
- package/src/components/Form/DatePicker/DatePicker.vue +1 -1
- package/src/components/Form/Input/Input.vue +69 -15
- package/src/components/Form/Input/constants.js +1 -0
- package/src/components/Form/Input/input.scss +33 -6
- package/src/components/Form/Label/Label.stories.js +7 -0
- package/src/components/Form/Label/Label.vue +43 -4
- package/src/components/Form/Label/readme.mdx +1 -0
- package/src/components/Form/PhoneInput/phoneInput.scss +3 -2
- package/src/components/Form/Radio/Radio.vue +31 -38
- package/src/components/Form/Radio/radio.scss +6 -3
- package/src/components/Form/Toggle/Toggle.vue +5 -1
- package/src/components/Form/Toggle/toggle.scss +4 -4
- package/src/components/IconButton/IconButton.scss +7 -0
- package/src/components/IconButton/IconButton.vue +10 -9
- package/src/components/List.vue +1 -1
- package/src/components/Modal/Modal.stories.js +6 -4
- package/src/components/Modal/Modal.vue +56 -11
- package/src/components/Pagination/LimitSelector.vue +3 -5
- package/src/components/Pagination/Pagination.vue +3 -0
- package/src/components/Pagination/pagination.scss +8 -14
- package/src/components/Panel/Panel.stories.js +0 -7
- package/src/components/Panel/Panel.vue +30 -29
- package/src/components/Popover/Popover.vue +43 -17
- package/src/components/Popover/constants.js +1 -1
- package/src/components/Popover/popover.scss +28 -8
- package/src/components/ProgressBar/ProgressBar.vue +14 -1
- package/src/components/ProgressBar/constants.js +1 -0
- package/src/components/ProgressBar/progressBar.scss +7 -0
- package/src/components/Sorting/Sorting.stories.js +12 -2
- package/src/components/Sorting/Sorting.vue +125 -37
- package/src/components/Sorting/sorting.scss +17 -14
- package/src/components/SplitButton/SplitButton.vue +8 -1
- package/src/components/SplitButton/splitButton.scss +3 -0
- package/src/components/StatusIndicator/icons.js +11 -11
- package/src/components/Tabs/Tabs.vue +25 -2
- package/src/components/Tabs/tabs.scss +1 -1
- package/src/components/ToggleTip/constants.js +1 -1
- package/src/components/ToggleTip/toggleTip.scss +2 -2
- package/src/components/Tooltip/Tooltip.vue +120 -4
- package/src/components/TreeSelect/Option.vue +36 -27
- package/src/components/TreeSelect/Select.stories.js +5 -90
- package/src/components/TreeSelect/Select.vue +254 -121
- package/src/components/TreeSelect/scss/option.scss +4 -0
- package/src/components/TreeSelect/scss/select.scss +51 -6
- package/src/directives/tooltip/TooltipController.js +184 -0
- package/src/directives/tooltip/readme.mdx +17 -0
- package/src/directives/tooltip/textOverflowTooltip.js +21 -49
- package/src/directives/tooltip/tooltip.js +57 -45
- package/src/directives/tooltip/tooltip.stories.js +39 -0
- package/src/helpers/removeEvents.js +2 -2
- package/src/index.js +1 -0
- package/src/main.js +1 -0
- package/src/scripts/parseScssVariables.js +23 -7
- package/src/components/Panel/constants.js +0 -4
|
@@ -1,49 +1,52 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
2
|
+
<div role="checkbox" class="ib-checkbox-wrapper" :class="this.$attrs.class" :aria-checked="checked ? true : false">
|
|
3
|
+
<label
|
|
4
|
+
v-bind="attrs"
|
|
5
|
+
:for="id"
|
|
6
|
+
:tabindex="disabled | disableFocus ? -1 : 0"
|
|
7
|
+
@click.prevent.stop="onChange"
|
|
8
|
+
@keypress.prevent="onChange"
|
|
9
|
+
>
|
|
10
|
+
<input
|
|
11
|
+
tabindex="-1"
|
|
12
|
+
type="checkbox"
|
|
13
|
+
:name="name"
|
|
14
|
+
:id="id"
|
|
15
|
+
:value="value"
|
|
16
|
+
:disabled="disabled"
|
|
17
|
+
:required="required"
|
|
18
|
+
v-model="checked"
|
|
19
|
+
@click="onChange"
|
|
20
|
+
/>
|
|
21
|
+
<div class="ib-checkbox-body">
|
|
22
|
+
<span
|
|
23
|
+
v-if="labelPosition === 'left' && label.length"
|
|
24
|
+
class="ib-checkbox-label"
|
|
25
|
+
:class="{ 'ib-checkbox-label-left': labelPosition === 'left' }"
|
|
26
|
+
>
|
|
27
|
+
<span v-if="required" class="required">*</span>
|
|
28
|
+
{{ label }}
|
|
29
|
+
</span>
|
|
28
30
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
<span class="ib-checkbox-input">
|
|
32
|
+
<ib-icon name="checkmark-sharp" v-show="checked && !indeterminate" />
|
|
33
|
+
<ib-icon
|
|
34
|
+
:class="'checkbox-undeterminate-icon'"
|
|
35
|
+
name="remove-sharp"
|
|
36
|
+
v-show="indeterminate"
|
|
37
|
+
/>
|
|
38
|
+
</span>
|
|
37
39
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
<span
|
|
41
|
+
v-if="labelPosition === 'right' && label?.length"
|
|
42
|
+
class="ib-checkbox-label"
|
|
43
|
+
>
|
|
44
|
+
<span v-if="required" class="required">*</span>
|
|
45
|
+
{{ label }}
|
|
46
|
+
</span>
|
|
47
|
+
</div>
|
|
48
|
+
</label>
|
|
49
|
+
</div>
|
|
47
50
|
</template>
|
|
48
51
|
<script>
|
|
49
52
|
import generateUID from "../../../helpers/generateUID";
|
|
@@ -71,14 +74,25 @@ export default {
|
|
|
71
74
|
value: {
|
|
72
75
|
default: 1,
|
|
73
76
|
},
|
|
77
|
+
modelValue: {
|
|
78
|
+
type: Boolean,
|
|
79
|
+
},
|
|
74
80
|
isChecked: {
|
|
75
81
|
type: Boolean,
|
|
76
82
|
default: false,
|
|
77
83
|
},
|
|
84
|
+
readonly: {
|
|
85
|
+
type: Boolean,
|
|
86
|
+
default: false,
|
|
87
|
+
},
|
|
78
88
|
disabled: {
|
|
79
89
|
type: Boolean,
|
|
80
90
|
default: false,
|
|
81
91
|
},
|
|
92
|
+
disableFocus: {
|
|
93
|
+
type: Boolean,
|
|
94
|
+
default: false,
|
|
95
|
+
},
|
|
82
96
|
required: {
|
|
83
97
|
type: Boolean,
|
|
84
98
|
default: false,
|
|
@@ -92,15 +106,22 @@ export default {
|
|
|
92
106
|
isChecked(value) {
|
|
93
107
|
this.checked = value;
|
|
94
108
|
},
|
|
109
|
+
modelValue(value) {
|
|
110
|
+
this.$emit("update:modelValue", this.modelValue);
|
|
111
|
+
this.checked = value;
|
|
112
|
+
},
|
|
95
113
|
},
|
|
96
114
|
data() {
|
|
97
115
|
return {
|
|
98
|
-
checked: this.isChecked,
|
|
116
|
+
checked: this.modelValue ? this.modelValue : this.isChecked,
|
|
99
117
|
};
|
|
100
118
|
},
|
|
101
119
|
methods: {
|
|
102
|
-
onChange() {
|
|
120
|
+
onChange(e) {
|
|
121
|
+
if (this.disabled || this.readonly) return;
|
|
122
|
+
|
|
103
123
|
this.checked = !this.checked;
|
|
124
|
+
this.$emit("update:modelValue", this.checked);
|
|
104
125
|
this.$emit("input", this.checked);
|
|
105
126
|
},
|
|
106
127
|
},
|
|
@@ -111,6 +132,7 @@ export default {
|
|
|
111
132
|
"ib-has-error": this.error,
|
|
112
133
|
"ib-checkbox-filled": this.checked,
|
|
113
134
|
"ib-checkbox-disabled": this.disabled,
|
|
135
|
+
"ib-checkbox-readonly": this.readonly,
|
|
114
136
|
"ib-checkbox-indeterminate": this.indeterminate,
|
|
115
137
|
};
|
|
116
138
|
},
|
|
@@ -119,8 +141,8 @@ export default {
|
|
|
119
141
|
},
|
|
120
142
|
attrs() {
|
|
121
143
|
const attrsList = { ...removeEvents({ ...this.$attrs }) };
|
|
122
|
-
|
|
123
|
-
attrsList.class =
|
|
144
|
+
delete attrsList.class;
|
|
145
|
+
attrsList.class = this.classes;
|
|
124
146
|
|
|
125
147
|
return attrsList;
|
|
126
148
|
},
|
|
@@ -132,6 +154,6 @@ export default {
|
|
|
132
154
|
};
|
|
133
155
|
</script>
|
|
134
156
|
|
|
135
|
-
<style lang="scss">
|
|
157
|
+
<style lang="scss" scoped>
|
|
136
158
|
@import "./Checkbox.scss";
|
|
137
159
|
</style>
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
v-if="labelText.length"
|
|
8
8
|
class="ib-checkbox-group-label"
|
|
9
9
|
:required="required"
|
|
10
|
+
:info-text="infoText"
|
|
10
11
|
>
|
|
11
12
|
{{ labelText }}
|
|
12
13
|
</ib-label>
|
|
@@ -44,6 +45,14 @@ export default {
|
|
|
44
45
|
type: String,
|
|
45
46
|
default: "",
|
|
46
47
|
},
|
|
48
|
+
infoText: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: ""
|
|
51
|
+
},
|
|
52
|
+
height: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: '290px'
|
|
55
|
+
}
|
|
47
56
|
},
|
|
48
57
|
components: {
|
|
49
58
|
IbLabel,
|
|
@@ -62,6 +71,8 @@ export default {
|
|
|
62
71
|
.ib-checkbox-group-content {
|
|
63
72
|
display: flex;
|
|
64
73
|
flex-direction: column;
|
|
74
|
+
flex-wrap: wrap;
|
|
75
|
+
max-height: v-bind(height);
|
|
65
76
|
.ib-radio:not(:last-child),
|
|
66
77
|
.ib-checkbox:not(:last-child) {
|
|
67
78
|
margin-bottom: 10px;
|
|
@@ -17,6 +17,8 @@ The IbCheckboxGroup component is a wrapper component that helps to group and dis
|
|
|
17
17
|
| required | Boolean | false | If true, a required indicator will be displayed next to the label |
|
|
18
18
|
| horizontal | Boolean | false | If true, the checkboxes or radio buttons will be displayed horizontally |
|
|
19
19
|
| errorMessage | String | '' | Responsible for displaying an error |
|
|
20
|
+
| infoText | String | '' | The text that will be displayed inside the tooltip when the information button is hover or have focus. |
|
|
21
|
+
| maxHeight | String | '290px' | Max height of container with radio elements. |
|
|
20
22
|
|
|
21
23
|
### Slots
|
|
22
24
|
|