@avakhula/ui 0.0.505 → 0.0.506-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.js +14352 -12501
- package/dist/index.umd.cjs +93 -82
- package/package.json +8 -7
- package/src/App.vue +7 -126
- package/src/assets/scss/mixins/dropdown-list-item.scss +6 -1
- package/src/assets/scss/mixins/tooltip-position.scss +0 -0
- package/src/assets/scss/mixins.scss +0 -0
- package/src/assets/scss/style.scss +0 -0
- 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 +0 -0
- package/src/components/Accordion/Accordion.stories.js +0 -0
- package/src/components/Accordion/Accordion.vue +0 -0
- 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 +5 -0
- package/src/components/Alert/alert.scss +6 -1
- 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 +25 -2
- package/src/components/Avatar/constants.js +6 -0
- package/src/components/Badge/Badge.spec.js +0 -0
- package/src/components/Badge/Badge.vue +0 -0
- package/src/components/Badge/readme.mdx +0 -0
- package/src/components/Breadcrumbs/Breadcrumbs.vue +23 -8
- package/src/components/Breadcrumbs/breadcrumbs.scss +0 -0
- package/src/components/Breadcrumbs/breadcrumbs.stories.js +0 -0
- package/src/components/Button/Button.spec.js +0 -0
- package/src/components/Button/Button.vue +19 -3
- package/src/components/Button/button.scss +5 -0
- 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 +93 -23
- package/src/components/Dropdown/DropdownDivider.vue +0 -0
- package/src/components/Dropdown/DropdownItem.vue +26 -4
- package/src/components/Dropdown/DropdownList.stories.js +0 -0
- package/src/components/Dropdown/DropdownList.vue +15 -1
- package/src/components/Dropdown/readme.mdx +0 -0
- package/src/components/Form/CharactersCount.vue +10 -7
- package/src/components/Form/Checkbox/Checkbox.scss +0 -0
- package/src/components/Form/Checkbox/Checkbox.stories.js +0 -0
- package/src/components/Form/Checkbox/Checkbox.vue +24 -11
- 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 +352 -261
- package/src/components/Form/DatePicker/DatePicker.stories.js +0 -0
- package/src/components/Form/DatePicker/DatePicker.vue +72 -17
- package/src/components/Form/DatePicker/readme.mdx +0 -0
- package/src/components/Form/FormGroup/FormGroup.vue +3 -3
- package/src/components/Form/FormGroup/FormGroupSet.vue +0 -0
- package/src/components/Form/Input/Input.stories.js +0 -0
- package/src/components/Form/Input/Input.vue +119 -13
- package/src/components/Form/Input/constants.js +0 -0
- package/src/components/Form/Input/input.scss +61 -2
- 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 +22 -10
- 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 +76 -27
- package/src/components/Form/PhoneInput/phoneInput.scss +38 -6
- 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 +16 -44
- package/src/components/Form/Radio/radio.scss +5 -2
- 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 +91 -137
- 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 +11 -335
- 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 +20 -6
- package/src/components/Form/Textarea/readme.mdx +0 -0
- package/src/components/Form/Textarea/textarea.scss +30 -2
- package/src/components/Form/Toggle/Toggle.stories.js +0 -0
- package/src/components/Form/Toggle/Toggle.vue +0 -0
- package/src/components/Form/Toggle/readme.mdx +0 -0
- package/src/components/Form/Toggle/toggle.scss +0 -0
- package/src/components/IconButton/IconButton.scss +11 -0
- package/src/components/IconButton/IconButton.vue +10 -3
- package/src/components/IconButton/readme.mdx +0 -0
- package/src/components/List.vue +0 -0
- package/src/components/Modal/Modal.stories.js +0 -0
- package/src/components/Modal/Modal.vue +42 -9
- 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 +36 -4
- package/src/components/Pagination/pagination.scss +17 -1
- package/src/components/Panel/Panel.stories.js +0 -0
- package/src/components/Panel/Panel.vue +68 -2
- package/src/components/Popover/Popover.vue +25 -9
- package/src/components/Popover/constants.js +0 -0
- package/src/components/Popover/popover.scss +1 -1
- package/src/components/Popover/readme.mdx +0 -0
- package/src/components/ProgressBar/ProgressBar.vue +0 -0
- package/src/components/ProgressBar/constants.js +0 -0
- package/src/components/ProgressBar/progressBar.scss +0 -0
- package/src/components/ProgressBar/readme.mdx +0 -0
- package/src/components/Sorting/Sorting.stories.js +0 -0
- package/src/components/Sorting/Sorting.vue +24 -26
- package/src/components/Sorting/sorting.scss +0 -0
- package/src/components/SplitButton/SplitButton.stories.js +0 -0
- package/src/components/SplitButton/SplitButton.vue +51 -8
- package/src/components/SplitButton/SplitButtonItem.vue +13 -1
- package/src/components/SplitButton/readme.mdx +0 -0
- package/src/components/SplitButton/splitButton.scss +0 -0
- package/src/components/StatusIndicator/StatusIndicator.stories.js +0 -0
- package/src/components/StatusIndicator/StatusIndicator.vue +0 -0
- 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 +0 -0
- package/src/components/Table/Cells/CheckboxCell.vue +0 -0
- package/src/components/Table/Row.vue +0 -0
- 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 +0 -0
- package/src/components/Tabs/Tabs.stories.js +0 -0
- package/src/components/Tabs/Tabs.vue +20 -5
- package/src/components/Tabs/tabs.scss +8 -2
- package/src/components/TagPill/TagPill.stories.js +0 -0
- package/src/components/TagPill/TagPill.vue +6 -0
- package/src/components/TagPill/readme.mdx +0 -0
- package/src/components/ToggleTip/ToggleTip.vue +0 -0
- package/src/components/ToggleTip/constants.js +0 -0
- package/src/components/ToggleTip/readme.mdx +0 -0
- package/src/components/ToggleTip/toggleTip.scss +0 -0
- package/src/components/Tooltip/Tooltip.vue +1 -1
- package/src/components/Tooltip/readme.mdx +0 -0
- package/src/components/TreeSelect/Option.vue +58 -24
- package/src/components/TreeSelect/Select.stories.js +0 -0
- package/src/components/TreeSelect/Select.vue +281 -147
- 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 +31 -0
- package/src/components/TreeSelect/scss/select.scss +93 -2
- 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 +0 -0
- package/dist/style.css +0 -1
|
@@ -2,18 +2,19 @@
|
|
|
2
2
|
<ib-button
|
|
3
3
|
v-bind="attrs"
|
|
4
4
|
:href="href"
|
|
5
|
+
:to="to"
|
|
5
6
|
:kind="kind"
|
|
6
7
|
:disabled="disabled"
|
|
7
8
|
:prevent-default="preventDefault"
|
|
9
|
+
v-tooltip="helpText"
|
|
8
10
|
>
|
|
9
11
|
<slot></slot>
|
|
10
|
-
<ib-tooltip v-if="helpText.length" :text="helpText" />
|
|
11
12
|
</ib-button>
|
|
12
13
|
</template>
|
|
13
14
|
|
|
14
15
|
<script>
|
|
15
16
|
import IbButton from "../Button/Button.vue";
|
|
16
|
-
import
|
|
17
|
+
import { TooltipDirective as Tooltip } from "../../directives/tooltip/tooltip"
|
|
17
18
|
import { iconButtonKindOptions, iconButtonSize } from "./constants.js";
|
|
18
19
|
|
|
19
20
|
export default {
|
|
@@ -43,6 +44,10 @@ export default {
|
|
|
43
44
|
type: String,
|
|
44
45
|
default: "",
|
|
45
46
|
},
|
|
47
|
+
to: {
|
|
48
|
+
type: [String, Object],
|
|
49
|
+
default: "",
|
|
50
|
+
},
|
|
46
51
|
helpText: {
|
|
47
52
|
type: String,
|
|
48
53
|
default: "",
|
|
@@ -90,7 +95,9 @@ export default {
|
|
|
90
95
|
},
|
|
91
96
|
components: {
|
|
92
97
|
IbButton,
|
|
93
|
-
|
|
98
|
+
},
|
|
99
|
+
directives: {
|
|
100
|
+
Tooltip,
|
|
94
101
|
},
|
|
95
102
|
inheritAttrs: false,
|
|
96
103
|
};
|
|
File without changes
|
package/src/components/List.vue
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
</div>
|
|
11
11
|
|
|
12
12
|
<Teleport to="body">
|
|
13
|
-
<div
|
|
13
|
+
<div :class="classes" v-show="isActive" ref="modal">
|
|
14
14
|
<div :class="bodyClassList" :style="bodyStyles" v-outside="clickOutside">
|
|
15
15
|
<ib-icon-button
|
|
16
16
|
v-if="showCloseButton"
|
|
@@ -116,8 +116,10 @@ export default {
|
|
|
116
116
|
this.close();
|
|
117
117
|
}
|
|
118
118
|
},
|
|
119
|
-
onTriggerBlur() {
|
|
120
|
-
this.$refs.modal?.
|
|
119
|
+
onTriggerBlur(e) {
|
|
120
|
+
if (!this.$refs.modal?.contains(e.relatedTarget) && this.isActive ) {
|
|
121
|
+
this.$refs.modal?.querySelector("a, button, [tabindex]")?.focus();
|
|
122
|
+
}
|
|
121
123
|
},
|
|
122
124
|
open() {
|
|
123
125
|
this.isActive = true;
|
|
@@ -125,16 +127,35 @@ export default {
|
|
|
125
127
|
this.$emit("open");
|
|
126
128
|
},
|
|
127
129
|
close() {
|
|
128
|
-
this.isActive = false;
|
|
129
130
|
this.$refs.trigger?.querySelector("a, button, [tabindex]")?.focus();
|
|
130
131
|
document.body.classList.remove("modal-open");
|
|
131
132
|
this.$emit("close");
|
|
132
133
|
},
|
|
133
134
|
setFocusOnModal(e) {
|
|
134
|
-
if(!this
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
if (!this.isActive) return;
|
|
136
|
+
|
|
137
|
+
const openModals = Array.from(
|
|
138
|
+
document.querySelectorAll('.modal.is-active')
|
|
139
|
+
);
|
|
140
|
+
|
|
141
|
+
const topModal = openModals
|
|
142
|
+
.sort((a, b) =>
|
|
143
|
+
+(getComputedStyle(a).zIndex || 0) - +(getComputedStyle(b).zIndex || 0)
|
|
144
|
+
)
|
|
145
|
+
.at(-1);
|
|
146
|
+
|
|
147
|
+
if (topModal !== (this.$refs.modal)) return;
|
|
148
|
+
|
|
149
|
+
if (
|
|
150
|
+
!topModal.contains(e.target) &&
|
|
151
|
+
!topModal.contains(e.relatedTarget)
|
|
152
|
+
) {
|
|
153
|
+
const focusable = topModal.querySelector(
|
|
154
|
+
`a[href], button:not([disabled]),
|
|
155
|
+
textarea, input:not([type="hidden"]),
|
|
156
|
+
select, [tabindex]:not([tabindex="-1"])`
|
|
157
|
+
);
|
|
158
|
+
focusable?.focus();
|
|
138
159
|
}
|
|
139
160
|
},
|
|
140
161
|
clickOutside(e) {
|
|
@@ -153,9 +174,21 @@ export default {
|
|
|
153
174
|
}
|
|
154
175
|
},
|
|
155
176
|
computed: {
|
|
177
|
+
classes() {
|
|
178
|
+
const classList = ["modal"];
|
|
179
|
+
|
|
180
|
+
if (this.classList.length) {
|
|
181
|
+
classList.push(this.classList);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
if (this.isActive) {
|
|
185
|
+
classList.push("is-active");
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
return classList;
|
|
189
|
+
},
|
|
156
190
|
bodyStyles() {
|
|
157
191
|
const styleList = {};
|
|
158
|
-
|
|
159
192
|
if (this.size === modalSizes.S) {
|
|
160
193
|
styleList.width = "380px";
|
|
161
194
|
styleList.minHeight = "160px";
|
|
File without changes
|
|
File without changes
|
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
<ib-select
|
|
5
5
|
classList="report-limit-selector-select"
|
|
6
6
|
:value="value"
|
|
7
|
+
:vertical="vertical"
|
|
7
8
|
:options="prepareOptions"
|
|
8
9
|
:is-multiple="false"
|
|
9
10
|
:show-clear-button="false"
|
|
11
|
+
aria-label="Pagination"
|
|
10
12
|
@input="selectItem"
|
|
11
13
|
/>
|
|
12
14
|
</div>
|
|
@@ -25,6 +27,9 @@ export default {
|
|
|
25
27
|
value: {
|
|
26
28
|
type: Number,
|
|
27
29
|
},
|
|
30
|
+
vertical: {
|
|
31
|
+
type: String
|
|
32
|
+
},
|
|
28
33
|
options: {
|
|
29
34
|
type: Array,
|
|
30
35
|
default: () => [10, 25, 50, 100],
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="report-controls">
|
|
2
|
+
<div ref="paginationControl" class="report-controls" :class="{ 'simple-pagination': !showLimitSelector }">
|
|
3
3
|
<ib-limit-selector
|
|
4
|
+
v-if="showLimitSelector"
|
|
4
5
|
@select="changeLimit"
|
|
5
6
|
:value="limitValue"
|
|
7
|
+
:vertical="vertical"
|
|
6
8
|
:label-select="labelSelect"
|
|
7
9
|
></ib-limit-selector>
|
|
8
10
|
|
|
9
11
|
<div class="repot-pagination">
|
|
10
12
|
<template v-if="showPaginationInput">
|
|
11
|
-
<ib-label>{{ labelInput }}</ib-label>
|
|
13
|
+
<ib-label for="goToPage">{{ labelInput }}</ib-label>
|
|
12
14
|
<div class="pagination-input">
|
|
13
|
-
<ib-input type="number" :debounce="500" @input="onInput"></ib-input>
|
|
15
|
+
<ib-input id="goToPage" type="number" hide-number-actions :debounce="500" @input="onInput"></ib-input>
|
|
14
16
|
</div>
|
|
15
17
|
</template>
|
|
16
18
|
|
|
@@ -28,7 +30,10 @@
|
|
|
28
30
|
<ib-tooltip v-if="tooltipTextPrev" :text="tooltipTextPrev"></ib-tooltip>
|
|
29
31
|
</ib-icon-button>
|
|
30
32
|
|
|
31
|
-
<
|
|
33
|
+
<p v-if="isShort" class="pagination-text">
|
|
34
|
+
{{ currentPage }} Page
|
|
35
|
+
</p>
|
|
36
|
+
<ul v-else class="pagination-wrapper">
|
|
32
37
|
<li
|
|
33
38
|
v-for="(item, index) of countPagePagination"
|
|
34
39
|
v-show="showItem(index + 1)"
|
|
@@ -68,6 +73,9 @@ import IbInput from "../Form/Input/Input.vue";
|
|
|
68
73
|
import IbLabel from "../Form/Label/Label.vue";
|
|
69
74
|
import IbIcon from "../Icon.vue";
|
|
70
75
|
import IbTooltip from "../Tooltip/Tooltip.vue";
|
|
76
|
+
|
|
77
|
+
const MIN_FULL_WIDTH = 475;
|
|
78
|
+
|
|
71
79
|
export default {
|
|
72
80
|
name: "IbPagination",
|
|
73
81
|
props: {
|
|
@@ -104,9 +112,18 @@ export default {
|
|
|
104
112
|
type: Boolean,
|
|
105
113
|
default: true,
|
|
106
114
|
},
|
|
115
|
+
showLimitSelector: {
|
|
116
|
+
type: Boolean,
|
|
117
|
+
default: true,
|
|
118
|
+
},
|
|
119
|
+
vertical: {
|
|
120
|
+
type: String
|
|
121
|
+
}
|
|
107
122
|
},
|
|
108
123
|
data() {
|
|
109
124
|
return {
|
|
125
|
+
isShort: false,
|
|
126
|
+
resizeObserver: null,
|
|
110
127
|
currentPage: this.current,
|
|
111
128
|
indexSpaceLeft: null,
|
|
112
129
|
indexSpaceRight: null,
|
|
@@ -117,11 +134,22 @@ export default {
|
|
|
117
134
|
current(newVal) {
|
|
118
135
|
this.onSelect(newVal);
|
|
119
136
|
},
|
|
137
|
+
limitSelector(newVal) {
|
|
138
|
+
this.limitValue = newVal;
|
|
139
|
+
},
|
|
120
140
|
limitValue() {
|
|
121
141
|
this.currentPage = 1;
|
|
122
142
|
},
|
|
123
143
|
},
|
|
144
|
+
mounted() {
|
|
145
|
+
this.handleResize();
|
|
146
|
+
this.resizeObserver = new ResizeObserver(this.handleResize);
|
|
147
|
+
this.resizeObserver.observe(this.$refs.paginationControl);
|
|
148
|
+
},
|
|
124
149
|
methods: {
|
|
150
|
+
handleResize() {
|
|
151
|
+
this.isShort = this.$refs.paginationControl.clientWidth < MIN_FULL_WIDTH;
|
|
152
|
+
},
|
|
125
153
|
changeLimit(val) {
|
|
126
154
|
if (Number.isInteger(val)) {
|
|
127
155
|
this.limitValue = val;
|
|
@@ -222,6 +250,10 @@ export default {
|
|
|
222
250
|
return Math.ceil(this.countRows / this.limitValue);
|
|
223
251
|
},
|
|
224
252
|
},
|
|
253
|
+
beforeUnmount() {
|
|
254
|
+
this.resizeObserver.disconnect();
|
|
255
|
+
this.resizeObserver = null;
|
|
256
|
+
},
|
|
225
257
|
components: {
|
|
226
258
|
IbIconButton,
|
|
227
259
|
IbIcon,
|
|
@@ -29,12 +29,28 @@
|
|
|
29
29
|
justify-content: space-between;
|
|
30
30
|
align-items: center;
|
|
31
31
|
|
|
32
|
+
&.simple-pagination {
|
|
33
|
+
width: 100%;
|
|
34
|
+
|
|
35
|
+
.repot-pagination {
|
|
36
|
+
width: 100%;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.row-count {
|
|
40
|
+
margin-right: auto;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
32
43
|
.row-count {
|
|
33
44
|
margin-right: 10px;
|
|
34
45
|
@include Ib-H4-regular;
|
|
35
46
|
color: $gray-600;
|
|
36
47
|
}
|
|
37
48
|
|
|
49
|
+
.pagination-text {
|
|
50
|
+
@include Ib-H4-regular;
|
|
51
|
+
color: $gray-600;
|
|
52
|
+
margin: 0 8px;
|
|
53
|
+
}
|
|
38
54
|
.repot-pagination {
|
|
39
55
|
display: flex;
|
|
40
56
|
align-items: center;
|
|
@@ -180,4 +196,4 @@
|
|
|
180
196
|
}
|
|
181
197
|
}
|
|
182
198
|
}
|
|
183
|
-
}
|
|
199
|
+
}
|
|
File without changes
|
|
@@ -4,10 +4,26 @@
|
|
|
4
4
|
<div class="head-title">
|
|
5
5
|
<slot name="title" />
|
|
6
6
|
</div>
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
<div v-show="!hideHeaderDivider" class="divider"></div>
|
|
9
|
+
|
|
8
10
|
<div class="head-content">
|
|
9
11
|
<slot name="head-content" />
|
|
10
12
|
</div>
|
|
13
|
+
|
|
14
|
+
<icon-button
|
|
15
|
+
v-if="showExpandButton"
|
|
16
|
+
:class="{
|
|
17
|
+
'toggle-visible-button': true,
|
|
18
|
+
'active': isOpenVal,
|
|
19
|
+
}"
|
|
20
|
+
kind="ghost"
|
|
21
|
+
type="button"
|
|
22
|
+
v-tooltip="expandButtonTooltip"
|
|
23
|
+
@click="isOpenVal = !isOpenVal"
|
|
24
|
+
>
|
|
25
|
+
<icon name="chevron-down-outline" />
|
|
26
|
+
</icon-button>
|
|
11
27
|
</div>
|
|
12
28
|
<Transition
|
|
13
29
|
name="expand"
|
|
@@ -15,7 +31,7 @@
|
|
|
15
31
|
@after-enter="afterEnter"
|
|
16
32
|
@leave="leave"
|
|
17
33
|
>
|
|
18
|
-
<div v-show="
|
|
34
|
+
<div v-show="isOpenVal" class="panel-body">
|
|
19
35
|
<slot name="body"></slot>
|
|
20
36
|
</div>
|
|
21
37
|
</Transition>
|
|
@@ -23,12 +39,23 @@
|
|
|
23
39
|
</template>
|
|
24
40
|
|
|
25
41
|
<script>
|
|
42
|
+
import IconButton from "../IconButton/IconButton.vue";
|
|
43
|
+
import Icon from "../Icon.vue";
|
|
26
44
|
import expandAnimation from "../../mixins/expandAnimation";
|
|
45
|
+
import { TooltipDirective as Tooltip } from "../../directives/tooltip/tooltip";
|
|
27
46
|
|
|
28
47
|
export default {
|
|
29
48
|
name: "IbPanel",
|
|
30
49
|
mixins: [expandAnimation],
|
|
31
50
|
props: {
|
|
51
|
+
showExpandButton: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: false,
|
|
54
|
+
},
|
|
55
|
+
expandButtonTooltip: {
|
|
56
|
+
type: String,
|
|
57
|
+
default: "",
|
|
58
|
+
},
|
|
32
59
|
isOpen: {
|
|
33
60
|
type: Boolean,
|
|
34
61
|
default: true,
|
|
@@ -37,7 +64,32 @@ export default {
|
|
|
37
64
|
type: Boolean,
|
|
38
65
|
default: false,
|
|
39
66
|
},
|
|
67
|
+
hideHeaderDivider: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
default: false,
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
watch: {
|
|
73
|
+
isOpen() {
|
|
74
|
+
this.isOpenVal = this.isOpen;
|
|
75
|
+
},
|
|
76
|
+
isOpenVal() {
|
|
77
|
+
this.$emit("update:isOpen", this.isOpenVal);
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
data() {
|
|
81
|
+
return {
|
|
82
|
+
isOpenVal: this.isOpen,
|
|
83
|
+
};
|
|
40
84
|
},
|
|
85
|
+
components: {
|
|
86
|
+
IconButton,
|
|
87
|
+
Icon,
|
|
88
|
+
},
|
|
89
|
+
directives: {
|
|
90
|
+
Tooltip,
|
|
91
|
+
},
|
|
92
|
+
emits: ["update:isOpen"],
|
|
41
93
|
};
|
|
42
94
|
</script>
|
|
43
95
|
|
|
@@ -69,6 +121,20 @@ $panel-divider-color: $gray-300;
|
|
|
69
121
|
outline: 2px solid $panel-error-outline-color;
|
|
70
122
|
}
|
|
71
123
|
|
|
124
|
+
.toggle-visible-button {
|
|
125
|
+
margin-left: 10px;
|
|
126
|
+
|
|
127
|
+
ion-icon {
|
|
128
|
+
transition: transform 0.5s;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
&.active {
|
|
132
|
+
ion-icon {
|
|
133
|
+
transform: rotate(180deg);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
72
138
|
.panel-head {
|
|
73
139
|
display: inline-flex;
|
|
74
140
|
width: 100%;
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
<Teleport :to="attachToBody ? 'body' : attachTo" v-if="attachToBody || attachTo">
|
|
3
|
+
<Transition>
|
|
4
|
+
<div ref="popover" v-show="isVisible" :class="classes">
|
|
5
|
+
<slot></slot>
|
|
6
|
+
</div>
|
|
7
|
+
</Transition>
|
|
8
|
+
</Teleport>
|
|
9
|
+
|
|
10
|
+
<Transition v-else>
|
|
11
|
+
<div ref="popover" v-show="isVisible" :class="classes">
|
|
12
|
+
<slot></slot>
|
|
13
|
+
</div>
|
|
14
|
+
</Transition>
|
|
7
15
|
</template>
|
|
8
16
|
|
|
9
17
|
<script>
|
|
@@ -20,6 +28,14 @@ export default {
|
|
|
20
28
|
type: Boolean,
|
|
21
29
|
default: false,
|
|
22
30
|
},
|
|
31
|
+
attachToBody: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: false,
|
|
34
|
+
},
|
|
35
|
+
attachTo: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: null
|
|
38
|
+
}
|
|
23
39
|
},
|
|
24
40
|
data() {
|
|
25
41
|
return {
|
|
@@ -33,10 +49,10 @@ export default {
|
|
|
33
49
|
this.parentNode = this.$el.parentNode;
|
|
34
50
|
|
|
35
51
|
if (!this.alwaysVisible) {
|
|
36
|
-
this.parentNode
|
|
37
|
-
this.parentNode
|
|
38
|
-
this.parentNode
|
|
39
|
-
this.parentNode
|
|
52
|
+
this.parentNode?.addEventListener("focus", this.showPopover, true);
|
|
53
|
+
this.parentNode?.addEventListener("blur", this.hidePopover, true);
|
|
54
|
+
this.parentNode?.addEventListener("mouseover", this.showPopover);
|
|
55
|
+
this.parentNode?.addEventListener("mouseleave", this.hidePopover);
|
|
40
56
|
}
|
|
41
57
|
});
|
|
42
58
|
},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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"
|
|
File without changes
|
|
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,6 +170,10 @@ 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
|
|