@avakhula/ui 0.0.505 → 0.0.510-alpha-spa.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/.babelrc.json +0 -0
- package/.eslintrc.cjs +0 -0
- package/.nvmrc +0 -0
- package/.storybook/main.js +0 -0
- package/.storybook/preview-head.html +0 -0
- package/.storybook/preview.js +0 -0
- package/dist/index.css +1 -0
- package/dist/index.es.js +22382 -0
- package/dist/index.umd.js +238 -0
- package/package.json +11 -10
- package/src/App.vue +16 -127
- package/src/assets/scss/mixins/dropdown-list-item.scss +9 -4
- package/src/assets/scss/mixins/tooltip-position.scss +7 -0
- package/src/assets/scss/mixins.scss +2 -2
- package/src/assets/scss/style.scss +4 -4
- package/src/assets/scss/typography.scss +3 -3
- package/src/assets/scss/variables/colors.json +0 -0
- package/src/assets/scss/variables/colors.scss +0 -0
- package/src/assets/scss/variables/shadows.json +0 -0
- package/src/assets/scss/variables/shadows.scss +0 -0
- package/src/components/Accordion/Accordion.scss +3 -3
- package/src/components/Accordion/Accordion.stories.js +0 -0
- package/src/components/Accordion/Accordion.vue +2 -2
- package/src/components/Accordion/Acordion.spec.js +0 -0
- package/src/components/Accordion/readme.mdx +0 -0
- package/src/components/Alert/Alert.spec.js +0 -0
- package/src/components/Alert/Alert.stories.js +0 -0
- package/src/components/Alert/Alert.vue +6 -1
- package/src/components/Alert/alert.scss +8 -3
- package/src/components/Alert/constants.js +0 -0
- package/src/components/Alert/readme.mdx +0 -0
- package/src/components/Avatar/Avatar.stories.js +5 -1
- package/src/components/Avatar/Avatar.vue +27 -4
- package/src/components/Avatar/constants.js +6 -0
- package/src/components/Badge/Badge.spec.js +0 -0
- package/src/components/Badge/Badge.vue +2 -2
- package/src/components/Badge/readme.mdx +0 -0
- package/src/components/Breadcrumbs/Breadcrumbs.vue +24 -9
- package/src/components/Breadcrumbs/breadcrumbs.scss +5 -5
- package/src/components/Breadcrumbs/breadcrumbs.stories.js +0 -0
- package/src/components/Button/Button.spec.js +0 -0
- package/src/components/Button/Button.vue +20 -4
- package/src/components/Button/button.scss +8 -3
- package/src/components/Button/readme.mdx +0 -0
- package/src/components/ButtonGroup/ButtonGroup.stories.js +0 -0
- package/src/components/ButtonGroup/readme.mdx +0 -0
- package/src/components/Chips/Chips.stories.js +30 -0
- package/src/components/Chips/Chips.vue +125 -0
- package/src/components/Dropdown/Dropdown.spec.js +0 -0
- package/src/components/Dropdown/Dropdown.stories.js +0 -0
- package/src/components/Dropdown/Dropdown.vue +3 -3
- package/src/components/Dropdown/DropdownDivider.vue +1 -1
- package/src/components/Dropdown/DropdownItem.vue +27 -5
- package/src/components/Dropdown/DropdownList.stories.js +0 -0
- package/src/components/Dropdown/DropdownList.vue +6 -2
- package/src/components/Dropdown/readme.mdx +0 -0
- package/src/components/Form/CharactersCount.vue +12 -9
- package/src/components/Form/Checkbox/Checkbox.scss +4 -4
- package/src/components/Form/Checkbox/Checkbox.stories.js +0 -0
- package/src/components/Form/Checkbox/Checkbox.vue +25 -12
- package/src/components/Form/Checkbox/readme.mdx +0 -0
- package/src/components/Form/CheckboxGroup/CheckboxGroup.stories.js +0 -0
- package/src/components/Form/CheckboxGroup/CheckboxGroup.vue +15 -0
- package/src/components/Form/CheckboxGroup/readme.mdx +2 -0
- package/src/components/Form/DatePicker/DatePicker.scss +356 -265
- package/src/components/Form/DatePicker/DatePicker.stories.js +0 -0
- package/src/components/Form/DatePicker/DatePicker.vue +73 -18
- package/src/components/Form/DatePicker/readme.mdx +0 -0
- package/src/components/Form/FormGroup/FormGroup.vue +5 -5
- package/src/components/Form/FormGroup/FormGroupSet.vue +1 -1
- package/src/components/Form/Input/Input.stories.js +0 -0
- package/src/components/Form/Input/Input.vue +120 -14
- package/src/components/Form/Input/constants.js +0 -0
- package/src/components/Form/Input/input.scss +64 -5
- package/src/components/Form/Input/readme.mdx +0 -0
- package/src/components/Form/Label/Label.stories.js +0 -0
- package/src/components/Form/Label/Label.vue +24 -12
- package/src/components/Form/Label/readme.mdx +0 -0
- package/src/components/Form/PhoneInput/PhoneInput.stories.js +0 -0
- package/src/components/Form/PhoneInput/PhoneInput.vue +77 -28
- package/src/components/Form/PhoneInput/phoneInput.scss +42 -10
- package/src/components/Form/PhoneInput/readme.mdx +0 -0
- package/src/components/Form/Radio/Radio.stories.js +0 -0
- package/src/components/Form/Radio/Radio.vue +17 -45
- package/src/components/Form/Radio/radio.scss +8 -5
- package/src/components/Form/Radio/readme.mdx +0 -0
- package/src/components/Form/TextEditor/TextEditor.stories.js +0 -0
- package/src/components/Form/TextEditor/TextEditor.vue +92 -138
- package/src/components/Form/TextEditor/Toolbar.vue +723 -0
- package/src/components/Form/TextEditor/icons/toolbarIcons.js +8 -0
- package/src/components/Form/TextEditor/plugins/imageBlot.js +23 -0
- package/src/components/Form/TextEditor/readme.mdx +0 -0
- package/src/components/Form/TextEditor/setupTextEditor.js +71 -0
- package/src/components/Form/TextEditor/textEditor.scss +15 -339
- package/src/components/Form/Textarea/Textarea.spec.js +0 -0
- package/src/components/Form/Textarea/Textarea.stories.js +0 -0
- package/src/components/Form/Textarea/Textarea.vue +28 -10
- package/src/components/Form/Textarea/readme.mdx +0 -0
- package/src/components/Form/Textarea/textarea.scss +33 -5
- package/src/components/Form/Toggle/Toggle.stories.js +0 -0
- package/src/components/Form/Toggle/Toggle.vue +1 -1
- package/src/components/Form/Toggle/readme.mdx +0 -0
- package/src/components/Form/Toggle/toggle.scss +3 -3
- package/src/components/IconButton/IconButton.scss +13 -2
- package/src/components/IconButton/IconButton.vue +11 -4
- package/src/components/IconButton/readme.mdx +0 -0
- package/src/components/List.vue +1 -1
- package/src/components/Modal/Modal.stories.js +0 -0
- package/src/components/Modal/Modal.vue +109 -40
- package/src/components/Modal/constants.js +0 -0
- package/src/components/Modal/readme.mdx +0 -0
- package/src/components/Pagination/LimitSelector.vue +5 -0
- package/src/components/Pagination/Pagination.vue +37 -5
- package/src/components/Pagination/pagination.scss +20 -4
- package/src/components/Panel/Panel.stories.js +0 -0
- package/src/components/Panel/Panel.vue +72 -6
- package/src/components/Popover/Popover.vue +27 -10
- package/src/components/Popover/constants.js +0 -0
- package/src/components/Popover/popover.scss +4 -4
- package/src/components/Popover/readme.mdx +0 -0
- package/src/components/ProgressBar/ProgressBar.vue +1 -1
- package/src/components/ProgressBar/constants.js +0 -0
- package/src/components/ProgressBar/progressBar.scss +1 -1
- package/src/components/ProgressBar/readme.mdx +0 -0
- package/src/components/Sorting/Sorting.stories.js +0 -0
- package/src/components/Sorting/Sorting.vue +25 -27
- package/src/components/Sorting/sorting.scss +5 -5
- package/src/components/SplitButton/SplitButton.stories.js +0 -0
- package/src/components/SplitButton/SplitButton.vue +52 -9
- package/src/components/SplitButton/SplitButtonItem.vue +14 -2
- package/src/components/SplitButton/readme.mdx +0 -0
- package/src/components/SplitButton/splitButton.scss +3 -3
- package/src/components/StatusIndicator/StatusIndicator.stories.js +0 -0
- package/src/components/StatusIndicator/StatusIndicator.vue +2 -2
- package/src/components/StatusIndicator/constants.js +0 -0
- package/src/components/StatusIndicator/icons.js +0 -0
- package/src/components/StatusIndicator/readme.mdx +0 -0
- package/src/components/Table/Cells/Cell.vue +2 -2
- package/src/components/Table/Cells/CheckboxCell.vue +0 -0
- package/src/components/Table/Row.vue +1 -1
- package/src/components/Table/Table.stories.js +0 -0
- package/src/components/Table/Table.vue +0 -0
- package/src/components/Tabs/Tab.vue +4 -0
- package/src/components/Tabs/TabDropdown.vue +1 -1
- package/src/components/Tabs/Tabs.stories.js +0 -0
- package/src/components/Tabs/Tabs.vue +21 -6
- package/src/components/Tabs/tabs.scss +12 -6
- package/src/components/TagPill/TagPill.stories.js +0 -0
- package/src/components/TagPill/TagPill.vue +8 -2
- package/src/components/TagPill/readme.mdx +0 -0
- package/src/components/ToggleTip/ToggleTip.vue +1 -1
- package/src/components/ToggleTip/constants.js +0 -0
- package/src/components/ToggleTip/readme.mdx +0 -0
- package/src/components/ToggleTip/toggleTip.scss +5 -5
- package/src/components/Tooltip/Tooltip.vue +4 -4
- package/src/components/Tooltip/readme.mdx +0 -0
- package/src/components/TreeSelect/Option.vue +59 -25
- package/src/components/TreeSelect/Select.stories.js +0 -0
- package/src/components/TreeSelect/Select.vue +283 -148
- package/src/components/TreeSelect/TreeSelect.stories.js +0 -0
- package/src/components/TreeSelect/mixins/InfinityLoaderMixin.js +40 -0
- package/src/components/TreeSelect/scss/option.scss +37 -6
- package/src/components/TreeSelect/scss/select.scss +97 -6
- package/src/constants/keyCodes.js +1 -0
- package/src/directives/outside/outside.stories.js +0 -0
- package/src/directives/outside/readme.mdx +0 -0
- package/src/directives/tooltip/TooltipController.js +2 -0
- package/src/directives/tooltip/readme.mdx +0 -0
- package/src/directives/tooltip/textOverflowTooltip.js +3 -1
- package/src/directives/tooltip/tooltip.js +61 -0
- package/src/directives/tooltip/tooltip.stories.js +0 -0
- package/src/helpers/debounce.js +23 -0
- package/src/helpers/removeEvents.js +0 -0
- package/src/helpers/stripHtml.js +4 -0
- package/src/index.js +7 -0
- package/src/main.js +0 -0
- package/src/mixins/expandAnimation.js +0 -0
- package/src/scripts/parseScssVariables.js +0 -0
- package/src/stories/link.readme.mdx +0 -0
- package/src/stories/variables/colors.stories.js +0 -0
- package/src/stories/variables/shadows.stories.js +0 -0
- package/static/docks/button.pdf +0 -0
- package/static/favicon.ico +0 -0
- package/vite.config.js +3 -9
- package/dist/index.js +0 -20786
- package/dist/index.umd.cjs +0 -227
- package/dist/style.css +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
3
|
-
@
|
|
1
|
+
@use "../../assets/scss/variables/colors.scss" as *;
|
|
2
|
+
@use "../../assets/scss/typography.scss" as *;
|
|
3
|
+
@use "../../assets/scss/mixins.scss" as *;
|
|
4
4
|
|
|
5
5
|
// Primary button colors
|
|
6
6
|
$primary-btn-background: $blue-800;
|
|
@@ -136,6 +136,7 @@ $disabled-btn-color: $neutral-500;
|
|
|
136
136
|
background: $tertiary-btn-focus-background;
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
+
&.active,
|
|
139
140
|
&:active {
|
|
140
141
|
color: $tertiary-btn-active-color;
|
|
141
142
|
background: $tertiary-btn-active-background;
|
|
@@ -151,6 +152,7 @@ $disabled-btn-color: $neutral-500;
|
|
|
151
152
|
background: $ghost-btn-hover-background;
|
|
152
153
|
}
|
|
153
154
|
|
|
155
|
+
&.active,
|
|
154
156
|
&:active {
|
|
155
157
|
color: $ghost-btn-active-color;
|
|
156
158
|
background: $ghost-btn-active-background;
|
|
@@ -209,6 +211,7 @@ $disabled-btn-color: $neutral-500;
|
|
|
209
211
|
display: block;
|
|
210
212
|
text-align: center;
|
|
211
213
|
width: 100%;
|
|
214
|
+
line-height: 36px;
|
|
212
215
|
}
|
|
213
216
|
|
|
214
217
|
&.ib-btn-disabled {
|
|
@@ -216,6 +219,8 @@ $disabled-btn-color: $neutral-500;
|
|
|
216
219
|
&:disabled {
|
|
217
220
|
background: $disabled-btn-background;
|
|
218
221
|
color: $disabled-btn-color;
|
|
222
|
+
cursor: auto;
|
|
223
|
+
pointer-events: none;
|
|
219
224
|
}
|
|
220
225
|
}
|
|
221
226
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import IbChips from "./Chips.vue";
|
|
2
|
+
import Icon from "../Icon.vue";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "Chips",
|
|
6
|
+
component: IbChips,
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const Template = (args) => ({
|
|
10
|
+
components: { IbChips },
|
|
11
|
+
setup() {
|
|
12
|
+
return { args };
|
|
13
|
+
},
|
|
14
|
+
template: '<ib-chips v-bind="args">Total Visits: 0-20</ib-chips>',
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const TemplateWithIcon = (args) => ({
|
|
18
|
+
components: { IbChips, Icon },
|
|
19
|
+
setup() {
|
|
20
|
+
return { args };
|
|
21
|
+
},
|
|
22
|
+
template: '<ib-chips v-bind="args"><template #icon><icon name="people-outline" /></template>Users</ib-chips>',
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export const Default = Template.bind({});
|
|
26
|
+
Default.args = {};
|
|
27
|
+
|
|
28
|
+
export const ChipsWithIcon = TemplateWithIcon.bind({});
|
|
29
|
+
ChipsWithIcon.args = {};
|
|
30
|
+
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<button
|
|
3
|
+
:class="{
|
|
4
|
+
'ib-chips': true,
|
|
5
|
+
'ib-chips-active': active,
|
|
6
|
+
'ib-chips-error': error,
|
|
7
|
+
'ib-chips-disabled': disabled,
|
|
8
|
+
}"
|
|
9
|
+
:disabled="disabled"
|
|
10
|
+
>
|
|
11
|
+
<span v-if="hasIcon" class="ib-chips-icon-wrapper">
|
|
12
|
+
<slot class="ib-chips-icon" name="icon" />
|
|
13
|
+
</span>
|
|
14
|
+
|
|
15
|
+
<slot />
|
|
16
|
+
|
|
17
|
+
<span class="ib-chips-close-wrapper" v-if="showCloseIcon">
|
|
18
|
+
<icon class="ib-chips-icon" name="close-outline" />
|
|
19
|
+
</span>
|
|
20
|
+
</button>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script>
|
|
24
|
+
import Icon from "../Icon.vue";
|
|
25
|
+
|
|
26
|
+
export default {
|
|
27
|
+
props: {
|
|
28
|
+
showCloseIcon: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false,
|
|
31
|
+
},
|
|
32
|
+
active: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: false,
|
|
35
|
+
},
|
|
36
|
+
error: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: false,
|
|
39
|
+
},
|
|
40
|
+
disabled: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: false,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
computed: {
|
|
46
|
+
hasIcon() {
|
|
47
|
+
return this.$slots?.icon;
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
components: {
|
|
51
|
+
Icon,
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
</script>
|
|
55
|
+
<style lang="scss" scoped>
|
|
56
|
+
@use "../../assets/scss/variables/colors.scss" as *;
|
|
57
|
+
@use "../../assets/scss/typography.scss" as *;
|
|
58
|
+
@use "../../assets/scss/mixins.scss" as *;
|
|
59
|
+
|
|
60
|
+
.ib-chips {
|
|
61
|
+
@include Ib-H4-medium;
|
|
62
|
+
padding: 8.5px 10px;
|
|
63
|
+
border: 2px solid transparent;
|
|
64
|
+
border-radius: 4px;
|
|
65
|
+
height: 36px;
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
background-color: $gray-100;
|
|
69
|
+
color: $neutral-600;
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
transition: all 0.3s;
|
|
72
|
+
|
|
73
|
+
.ib-chips-close-wrapper,
|
|
74
|
+
.ib-chips-icon-wrapper {
|
|
75
|
+
width: 16px;
|
|
76
|
+
height: 16px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.ib-chips-icon-wrapper {
|
|
80
|
+
margin-right: 5px;
|
|
81
|
+
}
|
|
82
|
+
.ib-chips-close-wrapper {
|
|
83
|
+
margin-left: 5px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.ib-chips-icon {
|
|
87
|
+
color: inherit;
|
|
88
|
+
font-size: 16px;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&.ib-chips-active {
|
|
92
|
+
background-color: $blue-200;
|
|
93
|
+
color: $blue-800;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&.ib-chips-error {
|
|
97
|
+
border-color: $red-800;
|
|
98
|
+
color: $red-800;
|
|
99
|
+
background-color: $red-50;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&.ib-chips-disabled {
|
|
103
|
+
border-color: transparent!important;
|
|
104
|
+
color: $neutral-500!important;
|
|
105
|
+
background-color: $gray-100!important;
|
|
106
|
+
cursor: default;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&:hover {
|
|
110
|
+
border-color: $blue-300;
|
|
111
|
+
background-color: $blue-100;
|
|
112
|
+
color: $blue-700;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&:active {
|
|
116
|
+
border-color: transparent;
|
|
117
|
+
background-color: $blue-200;
|
|
118
|
+
color: $blue-900;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&:focus {
|
|
122
|
+
@include focus(2px);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
</style>
|
|
File without changes
|
|
File without changes
|
|
@@ -221,8 +221,8 @@ export default {
|
|
|
221
221
|
</script>
|
|
222
222
|
|
|
223
223
|
<style scoped lang="scss">
|
|
224
|
-
@
|
|
225
|
-
@
|
|
224
|
+
@use "../../assets/scss/variables/colors.scss" as *;
|
|
225
|
+
@use "../../assets/scss/variables/shadows.scss" as *;
|
|
226
226
|
|
|
227
227
|
$menu-shadow: $ib-shadow-4;
|
|
228
228
|
$menu-bg: $white;
|
|
@@ -286,7 +286,7 @@ $menu-bg: $white;
|
|
|
286
286
|
}
|
|
287
287
|
</style>
|
|
288
288
|
<style lang="scss">
|
|
289
|
-
@
|
|
289
|
+
@use "../../assets/scss/variables/colors.scss" as *;
|
|
290
290
|
|
|
291
291
|
.dropdown-trigger {
|
|
292
292
|
&.active {
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<li class="dropdown-item-wrapper">
|
|
3
3
|
<component
|
|
4
|
-
:is="
|
|
4
|
+
:is="component"
|
|
5
5
|
:class="checked ? 'active' : ''"
|
|
6
6
|
v-bind="attrs"
|
|
7
7
|
tabindex="0"
|
|
8
8
|
>
|
|
9
|
-
<
|
|
9
|
+
<p>
|
|
10
|
+
<div v-show="$slots.icon" class="dropdown-item-icon">
|
|
11
|
+
<slot name="icon"></slot>
|
|
12
|
+
</div>
|
|
13
|
+
<slot ref="slot"></slot>
|
|
14
|
+
</p>
|
|
10
15
|
</component>
|
|
11
16
|
</li>
|
|
12
17
|
</template>
|
|
@@ -21,8 +26,20 @@ export default {
|
|
|
21
26
|
href: {
|
|
22
27
|
type: String,
|
|
23
28
|
},
|
|
29
|
+
to: {
|
|
30
|
+
type: [String, Object],
|
|
31
|
+
}
|
|
24
32
|
},
|
|
25
33
|
computed: {
|
|
34
|
+
component() {
|
|
35
|
+
if (this.href) {
|
|
36
|
+
return "a";
|
|
37
|
+
} else if (this.to) {
|
|
38
|
+
return "router-link";
|
|
39
|
+
} else {
|
|
40
|
+
return "div";
|
|
41
|
+
}
|
|
42
|
+
},
|
|
26
43
|
attrs() {
|
|
27
44
|
const attrs = {
|
|
28
45
|
class: "ib-dropdown-item",
|
|
@@ -32,14 +49,18 @@ export default {
|
|
|
32
49
|
attrs.href = this.href;
|
|
33
50
|
}
|
|
34
51
|
|
|
52
|
+
if (this.to) {
|
|
53
|
+
attrs.to = this.to;
|
|
54
|
+
}
|
|
55
|
+
|
|
35
56
|
return attrs;
|
|
36
57
|
},
|
|
37
58
|
},
|
|
38
59
|
};
|
|
39
60
|
</script>
|
|
40
61
|
|
|
41
|
-
<style lang="scss">
|
|
42
|
-
@
|
|
62
|
+
<style lang="scss" scoped>
|
|
63
|
+
@use "../../assets/scss/mixins/dropdown-list-item.scss" as *;
|
|
43
64
|
@include DropdownListItem;
|
|
44
65
|
|
|
45
66
|
.dropdown-item-wrapper {
|
|
@@ -50,8 +71,9 @@ export default {
|
|
|
50
71
|
display: flex;
|
|
51
72
|
align-items: center;
|
|
52
73
|
|
|
53
|
-
.
|
|
74
|
+
.dropdown-item-icon {
|
|
54
75
|
font-size: 16px;
|
|
76
|
+
height: 16px;
|
|
55
77
|
color: inherit;
|
|
56
78
|
margin-right: 15px;
|
|
57
79
|
}
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="dropdown-list-wrapper">
|
|
2
|
+
<div class="dropdown-list-wrapper" :class="class">
|
|
3
3
|
<ib-dropdown
|
|
4
4
|
:horizontal="horizontal"
|
|
5
5
|
:vertical="vertical"
|
|
@@ -50,6 +50,10 @@ export default {
|
|
|
50
50
|
type: Boolean,
|
|
51
51
|
default: false,
|
|
52
52
|
},
|
|
53
|
+
class: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: "",
|
|
56
|
+
},
|
|
53
57
|
},
|
|
54
58
|
methods: {
|
|
55
59
|
proxyEvents(eventInfo) {
|
|
@@ -73,7 +77,7 @@ export default {
|
|
|
73
77
|
};
|
|
74
78
|
</script>
|
|
75
79
|
<style lang="scss">
|
|
76
|
-
@
|
|
80
|
+
@use "../../assets/scss/variables/colors.scss" as *;
|
|
77
81
|
|
|
78
82
|
.dropdown-list-wrapper {
|
|
79
83
|
.list {
|
|
File without changes
|
|
@@ -3,17 +3,13 @@
|
|
|
3
3
|
<template v-if="!characterLength">
|
|
4
4
|
<p class="val-limit">Max {{ characterLimit }}</p>
|
|
5
5
|
</template>
|
|
6
|
-
<template v-else-if="characterLimit
|
|
7
|
-
<p class="val-length">{{
|
|
6
|
+
<template v-else-if="characterLimit >= characterLength">
|
|
7
|
+
<p class="val-length">{{ characterLength }}</p>
|
|
8
8
|
/
|
|
9
9
|
<p class="val-limit">{{ characterLimit }}</p>
|
|
10
10
|
</template>
|
|
11
|
-
<template v-else-if="characterLimit === characterLength">0</template>
|
|
12
|
-
|
|
13
11
|
<template v-else>
|
|
14
|
-
<p class="val-length
|
|
15
|
-
{{ characterLimit - characterLength }}
|
|
16
|
-
</p>
|
|
12
|
+
<p class="val-length error">{{ characterLimit - characterLength }}</p>
|
|
17
13
|
</template>
|
|
18
14
|
</div>
|
|
19
15
|
</template>
|
|
@@ -34,8 +30,8 @@ export default {
|
|
|
34
30
|
</script>
|
|
35
31
|
|
|
36
32
|
<style lang="scss" scoped>
|
|
37
|
-
@
|
|
38
|
-
@
|
|
33
|
+
@use "../../assets/scss/variables/colors.scss" as *;
|
|
34
|
+
@use "../../assets/scss/typography.scss" as *;
|
|
39
35
|
|
|
40
36
|
$textarea-character-count-color: $gray-600;
|
|
41
37
|
$textarea-character-count-limited-color: $red-900;
|
|
@@ -51,5 +47,12 @@ $textarea-character-count-limited-color: $red-900;
|
|
|
51
47
|
color: $textarea-character-count-limited-color;
|
|
52
48
|
}
|
|
53
49
|
}
|
|
50
|
+
|
|
51
|
+
.val-length,
|
|
52
|
+
.val-limit {
|
|
53
|
+
&.error {
|
|
54
|
+
color: $textarea-character-count-limited-color;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
54
57
|
}
|
|
55
58
|
</style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
3
|
-
@
|
|
1
|
+
@use "../../../assets/scss/variables/colors.scss" as *;
|
|
2
|
+
@use "../../../assets/scss/typography.scss" as *;
|
|
3
|
+
@use "../../../assets/scss/mixins.scss" as *;
|
|
4
4
|
|
|
5
5
|
$checkbox-bg-disabled: $gray-100;
|
|
6
6
|
$checkbox-filed-bg-disabled: $neutral-500;
|
|
@@ -45,7 +45,7 @@ $checkbox-bg-indeterminate: $blue-800;
|
|
|
45
45
|
align-items: center;
|
|
46
46
|
cursor: pointer;
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
|
|
49
49
|
/* Hide default HTML checkbox */
|
|
50
50
|
input {
|
|
51
51
|
display: none;
|
|
File without changes
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div class="ib-checkbox-wrapper" :class="this.$attrs.class">
|
|
3
3
|
<label
|
|
4
4
|
v-bind="attrs"
|
|
5
|
+
role="checkbox"
|
|
5
6
|
:for="id"
|
|
6
7
|
:tabindex="disabled | disableFocus ? -1 : 0"
|
|
8
|
+
:aria-checked="checked ? true : false"
|
|
7
9
|
@click.prevent.stop="onChange"
|
|
8
10
|
@keypress.prevent="onChange"
|
|
9
11
|
>
|
|
@@ -12,12 +14,22 @@
|
|
|
12
14
|
type="checkbox"
|
|
13
15
|
:name="name"
|
|
14
16
|
:id="id"
|
|
15
|
-
:value="value"
|
|
17
|
+
:value="value ?? 1"
|
|
16
18
|
:disabled="disabled"
|
|
17
19
|
:required="required"
|
|
18
20
|
v-model="checked"
|
|
19
21
|
@click="onChange"
|
|
20
22
|
/>
|
|
23
|
+
|
|
24
|
+
<input
|
|
25
|
+
v-if="!value && !checked"
|
|
26
|
+
value="0"
|
|
27
|
+
type="hidden"
|
|
28
|
+
:name="name"
|
|
29
|
+
:disabled="disabled"
|
|
30
|
+
:required="required"
|
|
31
|
+
/>
|
|
32
|
+
|
|
21
33
|
<div class="ib-checkbox-body">
|
|
22
34
|
<span
|
|
23
35
|
v-if="labelPosition === 'left' && label.length"
|
|
@@ -72,10 +84,10 @@ export default {
|
|
|
72
84
|
},
|
|
73
85
|
},
|
|
74
86
|
value: {
|
|
75
|
-
|
|
87
|
+
type: [String, Number],
|
|
76
88
|
},
|
|
77
89
|
modelValue: {
|
|
78
|
-
type: Boolean,
|
|
90
|
+
type: [Boolean, String],
|
|
79
91
|
},
|
|
80
92
|
isChecked: {
|
|
81
93
|
type: Boolean,
|
|
@@ -108,20 +120,21 @@ export default {
|
|
|
108
120
|
},
|
|
109
121
|
modelValue(value) {
|
|
110
122
|
this.$emit("update:modelValue", this.modelValue);
|
|
111
|
-
this.checked = value;
|
|
123
|
+
this.checked = value === "0" ? false : Boolean(value);
|
|
112
124
|
},
|
|
113
125
|
},
|
|
114
126
|
data() {
|
|
127
|
+
const value = this.modelValue
|
|
128
|
+
? (this.modelValue === "0" ? false : Boolean(this.modelValue))
|
|
129
|
+
: this.isChecked;
|
|
130
|
+
|
|
115
131
|
return {
|
|
116
|
-
checked:
|
|
132
|
+
checked: value,
|
|
117
133
|
};
|
|
118
134
|
},
|
|
119
135
|
methods: {
|
|
120
136
|
onChange(e) {
|
|
121
|
-
if (this.readonly)
|
|
122
|
-
e.preventDefault();
|
|
123
|
-
return;
|
|
124
|
-
};
|
|
137
|
+
if (this.disabled || this.readonly) return;
|
|
125
138
|
|
|
126
139
|
this.checked = !this.checked;
|
|
127
140
|
this.$emit("update:modelValue", this.checked);
|
|
@@ -157,6 +170,6 @@ export default {
|
|
|
157
170
|
};
|
|
158
171
|
</script>
|
|
159
172
|
|
|
160
|
-
<style lang="scss">
|
|
161
|
-
@
|
|
173
|
+
<style lang="scss" scoped>
|
|
174
|
+
@use "./Checkbox.scss" as *;
|
|
162
175
|
</style>
|
|
File without changes
|
|
File without changes
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
v-if="labelText.length"
|
|
8
8
|
class="ib-checkbox-group-label"
|
|
9
9
|
:required="required"
|
|
10
|
+
:info-text="infoText"
|
|
11
|
+
:tooltip-position="tooltipPosition"
|
|
10
12
|
>
|
|
11
13
|
{{ labelText }}
|
|
12
14
|
</ib-label>
|
|
@@ -44,6 +46,17 @@ export default {
|
|
|
44
46
|
type: String,
|
|
45
47
|
default: "",
|
|
46
48
|
},
|
|
49
|
+
infoText: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: ""
|
|
52
|
+
},
|
|
53
|
+
height: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: '290px'
|
|
56
|
+
},
|
|
57
|
+
tooltipPosition: {
|
|
58
|
+
type: String
|
|
59
|
+
}
|
|
47
60
|
},
|
|
48
61
|
components: {
|
|
49
62
|
IbLabel,
|
|
@@ -62,6 +75,8 @@ export default {
|
|
|
62
75
|
.ib-checkbox-group-content {
|
|
63
76
|
display: flex;
|
|
64
77
|
flex-direction: column;
|
|
78
|
+
flex-wrap: wrap;
|
|
79
|
+
max-height: v-bind(height);
|
|
65
80
|
.ib-radio:not(:last-child),
|
|
66
81
|
.ib-checkbox:not(:last-child) {
|
|
67
82
|
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
|
|