@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/typography.scss" as *;
|
|
2
|
+
@use "../../assets/scss/variables/colors.scss" as *;
|
|
3
|
+
@use "../../assets/scss/variables/shadows.scss" as *;
|
|
4
4
|
|
|
5
5
|
$background: $white;
|
|
6
6
|
$textColor: $neutral-900;
|
|
@@ -15,7 +15,7 @@ $shadow: $ib-shadow-3;
|
|
|
15
15
|
color: $textColor;
|
|
16
16
|
border-radius: 4px;
|
|
17
17
|
box-shadow: $shadow;
|
|
18
|
-
z-index:
|
|
18
|
+
z-index: 9998;
|
|
19
19
|
text-align: start;
|
|
20
20
|
|
|
21
21
|
&.ib {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -8,33 +8,31 @@
|
|
|
8
8
|
}"
|
|
9
9
|
v-if="view === sortingTypesView.TABLE_VIEW"
|
|
10
10
|
>
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
</button>
|
|
11
|
+
<button
|
|
12
|
+
class="sorting-label"
|
|
13
|
+
v-tooltip:[sortingTooltipPosition]="sortingTooltipContent"
|
|
14
|
+
:class="{
|
|
15
|
+
'sorting-label-active': isOpenToggleTip && hasToggleTip,
|
|
16
|
+
'has-action': tooltipText?.length || hasToggleTip
|
|
17
|
+
}"
|
|
18
|
+
type="button"
|
|
19
|
+
@click="isOpenToggleTip = !isOpenToggleTip"
|
|
20
|
+
>
|
|
21
|
+
{{ title }}
|
|
22
|
+
</button>
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
</div>
|
|
24
|
+
<ib-toggle-tip
|
|
25
|
+
v-if="hasToggleTip"
|
|
26
|
+
position="bottom-center"
|
|
27
|
+
:is-open="isOpenToggleTip"
|
|
28
|
+
:title="toggleTipTitle"
|
|
29
|
+
@close="isOpenToggleTip = false"
|
|
30
|
+
>
|
|
31
|
+
<slot name="toggleTipBody"></slot>
|
|
32
|
+
<template #buttons>
|
|
33
|
+
<slot name="toggleTipButtons"></slot>
|
|
34
|
+
</template>
|
|
35
|
+
</ib-toggle-tip>
|
|
38
36
|
|
|
39
37
|
<ib-icon-button
|
|
40
38
|
v-if="!hideSortingButton"
|
|
@@ -212,5 +210,5 @@ export default {
|
|
|
212
210
|
};
|
|
213
211
|
</script>
|
|
214
212
|
<style lang="scss" scoped>
|
|
215
|
-
@
|
|
213
|
+
@use "./sorting.scss" as *;
|
|
216
214
|
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
3
|
-
@
|
|
4
|
-
@
|
|
1
|
+
@use "../../assets/scss/typography.scss" as *;
|
|
2
|
+
@use "../../assets/scss/variables/colors.scss" as *;
|
|
3
|
+
@use "../../assets/scss/reset.scss" as *;
|
|
4
|
+
@use "../../assets/scss/mixins.scss" as *;
|
|
5
5
|
|
|
6
6
|
button {
|
|
7
7
|
padding: 0;
|
|
@@ -87,4 +87,4 @@ button {
|
|
|
87
87
|
@include focus(2px);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
}
|
|
90
|
+
}
|
|
File without changes
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="classes">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
v-if="
|
|
3
|
+
|
|
4
|
+
<router-link
|
|
5
|
+
v-if="isRouterLink"
|
|
6
6
|
class="split-button-main"
|
|
7
|
+
:class="{ disabled }"
|
|
8
|
+
:disabled="disabled"
|
|
9
|
+
:to="mainButtonAttrs.to"
|
|
7
10
|
v-bind="mainButtonAttrs"
|
|
11
|
+
@click="onClickLink"
|
|
8
12
|
>
|
|
9
13
|
{{ content }}
|
|
10
|
-
</
|
|
14
|
+
</router-link>
|
|
11
15
|
|
|
12
16
|
<a
|
|
13
|
-
v-else
|
|
17
|
+
v-else-if="isLink"
|
|
14
18
|
class="split-button-main"
|
|
15
19
|
:class="{ disabled }"
|
|
16
20
|
:disabled="disabled"
|
|
@@ -20,7 +24,16 @@
|
|
|
20
24
|
{{ content }}
|
|
21
25
|
</a>
|
|
22
26
|
|
|
23
|
-
<
|
|
27
|
+
<button
|
|
28
|
+
v-else
|
|
29
|
+
:disabled="disabled"
|
|
30
|
+
class="split-button-main"
|
|
31
|
+
v-bind="mainButtonAttrs"
|
|
32
|
+
>
|
|
33
|
+
{{ content }}
|
|
34
|
+
</button>
|
|
35
|
+
|
|
36
|
+
<ib-dropdown-list :disabled="disabled" :closeOnClick="true" :vertical="verticalPosition" :horizontal="verticalPosition === 'top' ? 'right' : 'left'">
|
|
24
37
|
<template #trigger>
|
|
25
38
|
<button :disabled="disabled" class="split-button-menu-trigger">
|
|
26
39
|
<ib-icon name="chevron-down-outline" />
|
|
@@ -53,6 +66,10 @@ export default {
|
|
|
53
66
|
type: String,
|
|
54
67
|
default: splitButtonKindOptions.common,
|
|
55
68
|
},
|
|
69
|
+
verticalPosition: {
|
|
70
|
+
type: String,
|
|
71
|
+
default: "bottom",
|
|
72
|
+
},
|
|
56
73
|
disabled: {
|
|
57
74
|
type: Boolean,
|
|
58
75
|
default: false,
|
|
@@ -83,7 +100,20 @@ export default {
|
|
|
83
100
|
}
|
|
84
101
|
}
|
|
85
102
|
|
|
86
|
-
this
|
|
103
|
+
this.$nextTick(() => {
|
|
104
|
+
this.setActiveItem();
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
this.listObserver = new MutationObserver((mutationsList) => {
|
|
108
|
+
for (const mutation of mutationsList) {
|
|
109
|
+
if (mutation.type === "attributes" && mutation.attributeName === "disabled") {
|
|
110
|
+
this.mainButtonAttrs.disabled = mutation.target.disabled;
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
this.listObserver.observe(this.$refs.list, { attributes: true, subtree: true });
|
|
87
117
|
},
|
|
88
118
|
data() {
|
|
89
119
|
return {
|
|
@@ -91,7 +121,9 @@ export default {
|
|
|
91
121
|
content: "",
|
|
92
122
|
mainButtonAttrs: {},
|
|
93
123
|
isLink: false,
|
|
124
|
+
isRouterLink: false,
|
|
94
125
|
childList: [],
|
|
126
|
+
listObserver: null,
|
|
95
127
|
};
|
|
96
128
|
},
|
|
97
129
|
components: {
|
|
@@ -100,14 +132,21 @@ export default {
|
|
|
100
132
|
},
|
|
101
133
|
methods: {
|
|
102
134
|
setActiveItem() {
|
|
103
|
-
|
|
135
|
+
const attrs = this.$slots.default()[this.activeElemIdx].props;
|
|
104
136
|
|
|
137
|
+
this.mainButtonAttrs = attrs;
|
|
105
138
|
if (this.mainButtonAttrs && "href" in this.mainButtonAttrs) {
|
|
106
139
|
this.isLink = true;
|
|
107
140
|
} else {
|
|
108
141
|
this.isLink = false;
|
|
109
142
|
}
|
|
110
143
|
|
|
144
|
+
if (this.mainButtonAttrs && "to" in this.mainButtonAttrs) {
|
|
145
|
+
this.isRouterLink = true;
|
|
146
|
+
} else {
|
|
147
|
+
this.isRouterLink = false;
|
|
148
|
+
}
|
|
149
|
+
|
|
111
150
|
this.childList[this.activeElemIdx].classList.add("active");
|
|
112
151
|
this.content = this.childList[this.activeElemIdx].textContent;
|
|
113
152
|
},
|
|
@@ -131,9 +170,13 @@ export default {
|
|
|
131
170
|
this.setActiveItem();
|
|
132
171
|
},
|
|
133
172
|
},
|
|
173
|
+
beforeUnmount() {
|
|
174
|
+
this.listObserver.disconnect();
|
|
175
|
+
this.listObserver = null;
|
|
176
|
+
}
|
|
134
177
|
};
|
|
135
178
|
</script>
|
|
136
179
|
|
|
137
180
|
<style lang="scss">
|
|
138
|
-
@
|
|
181
|
+
@use "./splitButton.scss" as *;
|
|
139
182
|
</style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<component
|
|
3
|
-
:is="
|
|
3
|
+
:is="component"
|
|
4
4
|
v-bind="attrs"
|
|
5
5
|
class="ib-dropdown-item"
|
|
6
6
|
>
|
|
@@ -15,6 +15,9 @@ export default {
|
|
|
15
15
|
type: String,
|
|
16
16
|
default: "",
|
|
17
17
|
},
|
|
18
|
+
to: {
|
|
19
|
+
type: [String, Object],
|
|
20
|
+
}
|
|
18
21
|
},
|
|
19
22
|
computed: {
|
|
20
23
|
attrs() {
|
|
@@ -23,12 +26,21 @@ export default {
|
|
|
23
26
|
attrsList.href = this.href;
|
|
24
27
|
}
|
|
25
28
|
|
|
29
|
+
if (this.to) {
|
|
30
|
+
attrsList.to = this.to;
|
|
31
|
+
}
|
|
32
|
+
|
|
26
33
|
return attrsList;
|
|
27
34
|
},
|
|
35
|
+
component() {
|
|
36
|
+
if (this.href.length) return "a";
|
|
37
|
+
if (this.to) return "router-link";
|
|
38
|
+
return "button";
|
|
39
|
+
}
|
|
28
40
|
},
|
|
29
41
|
};
|
|
30
42
|
</script>
|
|
31
43
|
<style lang="scss" scoped>
|
|
32
|
-
@
|
|
44
|
+
@use "../../assets/scss/mixins/dropdown-list-item.scss" as *;
|
|
33
45
|
@include DropdownListItem;
|
|
34
46
|
</style>
|
|
File without changes
|
|
@@ -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
|
$split-button-color: $white;
|
|
6
6
|
$split-button-disabled-color: $neutral-500;
|
|
File without changes
|
|
@@ -24,8 +24,8 @@ export default {
|
|
|
24
24
|
</script>
|
|
25
25
|
|
|
26
26
|
<style lang="scss" scoped>
|
|
27
|
-
@
|
|
28
|
-
@
|
|
27
|
+
@use "../../assets/scss/variables/colors.scss" as *;
|
|
28
|
+
@use "../../assets/scss//typography.scss" as *;
|
|
29
29
|
|
|
30
30
|
@keyframes loader {
|
|
31
31
|
from {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -43,8 +43,8 @@ export default {
|
|
|
43
43
|
</script>
|
|
44
44
|
|
|
45
45
|
<style lang="scss" scoped>
|
|
46
|
-
@
|
|
47
|
-
@
|
|
46
|
+
@use "../../../assets/scss/typography.scss" as *;
|
|
47
|
+
@use "../../../assets/scss/variables/colors.scss" as *;
|
|
48
48
|
|
|
49
49
|
.ib-cell {
|
|
50
50
|
@include Ib-H4-regular;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -3,19 +3,23 @@
|
|
|
3
3
|
<ul class="tabs-list">
|
|
4
4
|
<li class="tab-item" v-for="(tab, index) in tabs" :key="index">
|
|
5
5
|
<div v-if="!tab.name" class="wrapper-tab-link">
|
|
6
|
-
<
|
|
6
|
+
<component
|
|
7
|
+
:is="setHref ? 'a' : 'div'"
|
|
8
|
+
v-bind="setHref ? { href: createHref(tab.id), target: '_self' } : {}"
|
|
7
9
|
class="tab-link"
|
|
8
10
|
:class="{
|
|
9
11
|
active: selectedTab === tab.id,
|
|
10
12
|
disabled: tab.disabled,
|
|
11
13
|
}"
|
|
12
|
-
:href="createHref(tab.id)"
|
|
13
14
|
:tabindex="tab.disabled ? -1 : 0"
|
|
14
15
|
@click="selectTab(tab.id)"
|
|
15
|
-
target="_self"
|
|
16
16
|
>
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
<ib-icon class="tab-icon" v-if="tab.icon" :name="tab.icon" />
|
|
18
|
+
|
|
19
|
+
<template v-if="showTitle">
|
|
20
|
+
{{ tab.title }}
|
|
21
|
+
</template>
|
|
22
|
+
</component>
|
|
19
23
|
</div>
|
|
20
24
|
<ib-tab-dropdown
|
|
21
25
|
v-else
|
|
@@ -32,15 +36,25 @@
|
|
|
32
36
|
</div>
|
|
33
37
|
</template>
|
|
34
38
|
<script>
|
|
39
|
+
import IbIcon from "../Icon.vue";
|
|
35
40
|
import IbTabDropdown from "./TabDropdown.vue";
|
|
36
41
|
import getHrefFromId from "../../helpers/getHrefFromID";
|
|
42
|
+
|
|
37
43
|
export default {
|
|
38
44
|
name: "IbTabs",
|
|
39
45
|
props: {
|
|
46
|
+
showTitle: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: true,
|
|
49
|
+
},
|
|
40
50
|
selectedTabId: {
|
|
41
51
|
type: String,
|
|
42
52
|
default: "",
|
|
43
53
|
},
|
|
54
|
+
setHref: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: false,
|
|
57
|
+
}
|
|
44
58
|
},
|
|
45
59
|
data() {
|
|
46
60
|
return {
|
|
@@ -108,10 +122,11 @@ export default {
|
|
|
108
122
|
},
|
|
109
123
|
components: {
|
|
110
124
|
IbTabDropdown,
|
|
125
|
+
IbIcon,
|
|
111
126
|
},
|
|
112
127
|
emits: ["changeTab"]
|
|
113
128
|
};
|
|
114
129
|
</script>
|
|
115
130
|
<style lang="scss" scoped>
|
|
116
|
-
@
|
|
131
|
+
@use "./tabs.scss" as *;
|
|
117
132
|
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
3
|
-
@
|
|
4
|
-
@
|
|
1
|
+
@use "../../assets/scss/variables/colors.scss" as *;
|
|
2
|
+
@use "../../assets/scss/typography.scss" as *;
|
|
3
|
+
@use "../../assets/scss/mixins.scss" as *;
|
|
4
|
+
@use "../../assets/scss/reset.scss" as *;
|
|
5
5
|
|
|
6
6
|
.tabs {
|
|
7
7
|
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
background-color: $gray-300;
|
|
24
24
|
z-index: -1;
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
|
|
27
27
|
.tab-item {
|
|
28
28
|
position: relative;
|
|
29
29
|
margin: 0 15px;
|
|
@@ -65,6 +65,12 @@
|
|
|
65
65
|
color: $neutral-900;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
.tab-icon {
|
|
69
|
+
margin-right: 3px;
|
|
70
|
+
color: inherit;
|
|
71
|
+
font-size: 16px;
|
|
72
|
+
}
|
|
73
|
+
|
|
68
74
|
&::after {
|
|
69
75
|
content: '';
|
|
70
76
|
width: 100%;
|
|
@@ -154,4 +160,4 @@
|
|
|
154
160
|
}
|
|
155
161
|
}
|
|
156
162
|
}
|
|
157
|
-
}
|
|
163
|
+
}
|
|
File without changes
|
|
@@ -18,6 +18,10 @@ export default {
|
|
|
18
18
|
default: tagPillSTatuses.neutral,
|
|
19
19
|
validator: (value) => Object.keys(tagPillSTatuses).includes(value),
|
|
20
20
|
},
|
|
21
|
+
icon: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: "",
|
|
24
|
+
},
|
|
21
25
|
showIcon: {
|
|
22
26
|
type: Boolean,
|
|
23
27
|
default: false,
|
|
@@ -31,6 +35,8 @@ export default {
|
|
|
31
35
|
return classList;
|
|
32
36
|
},
|
|
33
37
|
iconName() {
|
|
38
|
+
if (this.icon) return this.icon;
|
|
39
|
+
|
|
34
40
|
switch (this.status) {
|
|
35
41
|
case tagPillSTatuses.success:
|
|
36
42
|
return "checkmark-outline";
|
|
@@ -50,8 +56,8 @@ export default {
|
|
|
50
56
|
</script>
|
|
51
57
|
|
|
52
58
|
<style lang="scss" scoped>
|
|
53
|
-
@
|
|
54
|
-
@
|
|
59
|
+
@use "../../assets/scss/typography.scss" as *;
|
|
60
|
+
@use "../../assets/scss/variables/colors.scss" as *;
|
|
55
61
|
|
|
56
62
|
$neutral-tag-bg: $gray-100;
|
|
57
63
|
$neutral-tag-color: $neutral-600;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
3
|
-
@
|
|
4
|
-
@
|
|
1
|
+
@use "../../assets/scss/typography.scss" as *;
|
|
2
|
+
@use "../../assets/scss/mixins/tooltip-position.scss" as *;
|
|
3
|
+
@use "../../assets/scss/variables/colors.scss" as *;
|
|
4
|
+
@use "../../assets/scss/variables/shadows.scss" as *;
|
|
5
5
|
|
|
6
6
|
$background: $white;
|
|
7
7
|
$textColor: $neutral-900;
|
|
@@ -19,7 +19,7 @@ $shadow: $ib-shadow-3;
|
|
|
19
19
|
bottom: auto;
|
|
20
20
|
left: auto;
|
|
21
21
|
right: auto;
|
|
22
|
-
z-index: 100;
|
|
22
|
+
z-index: 100;
|
|
23
23
|
@include TooltipPosition;
|
|
24
24
|
|
|
25
25
|
&-head {
|
|
@@ -45,15 +45,15 @@ export default {
|
|
|
45
45
|
</script>
|
|
46
46
|
|
|
47
47
|
<style lang="scss" scoped>
|
|
48
|
-
@
|
|
49
|
-
@
|
|
50
|
-
@
|
|
48
|
+
@use "../../assets/scss/typography.scss" as *;
|
|
49
|
+
@use "../../assets/scss/variables/shadows.scss" as *;
|
|
50
|
+
@use "../../assets/scss/mixins.scss" as *;
|
|
51
51
|
|
|
52
52
|
.ib-tooltip {
|
|
53
53
|
padding: 10px;
|
|
54
54
|
max-width: 240px;
|
|
55
55
|
box-shadow: $ib-shadow-1;
|
|
56
|
-
z-index:
|
|
56
|
+
z-index: 10051;
|
|
57
57
|
|
|
58
58
|
&.ib-tooltip-large {
|
|
59
59
|
box-shadow: $ib-shadow-2;
|
|
File without changes
|