@avakhula/ui 0.1.22 → 0.1.24
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/App.js +23 -0
- package/dist/EventEmmiter.js +33 -0
- package/dist/chunks/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/chunks/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/chunks/floating-ui.dom-D8OVFdyL.js +861 -0
- package/dist/chunks/vue-quill.esm-bundler-FvTqp_xR.js +9070 -0
- package/dist/components/Accordion/Accordion.js +81 -0
- package/dist/components/Alert/Alert.js +121 -0
- package/dist/components/Alert/constants.js +10 -0
- package/dist/components/Avatar/Avatar.js +75 -0
- package/dist/components/Avatar/constants.js +12 -0
- package/dist/components/Badge/Badge.js +29 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +117 -0
- package/dist/components/Button/Button.js +140 -0
- package/dist/components/Button/constants.js +11 -0
- package/dist/components/ButtonGroup/ButtonGroup.js +14 -0
- package/dist/components/Chips/Chips.js +65 -0
- package/dist/components/Dropdown/Dropdown.js +228 -0
- package/dist/components/Dropdown/DropdownDivider.js +10 -0
- package/dist/components/Dropdown/DropdownItem.js +50 -0
- package/dist/components/Dropdown/DropdownList.js +104 -0
- package/dist/components/Dropdown/constants.js +12 -0
- package/dist/components/Form/CharactersCount.js +33 -0
- package/dist/components/Form/Checkbox/Checkbox.js +171 -0
- package/dist/components/Form/CheckboxGroup/CheckboxGroup.js +81 -0
- package/dist/components/Form/DatePicker/DatePicker.js +1782 -0
- package/dist/components/Form/DatePicker/Icons/chevron-back.js +8 -0
- package/dist/components/Form/DatePicker/Icons/chevron-forward.js +8 -0
- package/dist/components/Form/FormGroup/FormGroup.js +30 -0
- package/dist/components/Form/FormGroup/FormGroupSet.js +44 -0
- package/dist/components/Form/Input/Input.js +375 -0
- package/dist/components/Form/Input/constants.js +9 -0
- package/dist/components/Form/Label/Label.js +87 -0
- package/dist/components/Form/PhoneInput/PhoneInput.js +3811 -0
- package/dist/components/Form/Radio/Radio.js +91 -0
- package/dist/components/Form/TextEditor/TextEditor.js +422 -0
- package/dist/components/Form/TextEditor/Toolbar.js +291 -0
- package/dist/components/Form/TextEditor/icons/toolbarIcons.js +109 -0
- package/dist/components/Form/TextEditor/plugins/alphabetList.js +31 -0
- package/dist/components/Form/TextEditor/plugins/imageBlot.js +16 -0
- package/dist/components/Form/TextEditor/setupTextEditor.js +27 -0
- package/dist/components/Form/Textarea/Textarea.js +121 -0
- package/dist/components/Form/Toggle/Toggle.js +134 -0
- package/dist/components/Icon.js +37 -0
- package/dist/components/IconButton/IconButton.js +93 -0
- package/dist/components/IconButton/constants.js +15 -0
- package/dist/components/List.js +66 -0
- package/dist/components/Modal/Modal.js +198 -0
- package/dist/components/Modal/constants.js +9 -0
- package/dist/components/Pagination/LimitSelector.js +73 -0
- package/dist/components/Pagination/Pagination.js +226 -0
- package/dist/components/Panel/Panel.js +107 -0
- package/dist/components/Popover/Popover.js +105 -0
- package/dist/components/Popover/constants.js +17 -0
- package/dist/components/ProgressBar/ProgressBar.js +63 -0
- package/dist/components/ProgressBar/constants.js +10 -0
- package/dist/components/Sorting/Sorting.js +182 -0
- package/dist/components/Sorting/constants.js +12 -0
- package/dist/components/SplitButton/SplitButton.js +145 -0
- package/dist/components/SplitButton/SplitButtonItem.js +34 -0
- package/dist/components/SplitButton/constants.js +7 -0
- package/dist/components/StatusIndicator/StatusIndicator.js +29 -0
- package/dist/components/StatusIndicator/constants.js +13 -0
- package/dist/components/StatusIndicator/icons.js +44 -0
- package/dist/components/Table/Cells/Cell.js +39 -0
- package/dist/components/Table/Cells/CheckboxCell.js +37 -0
- package/dist/components/Table/Row.js +14 -0
- package/dist/components/Table/Table.js +24 -0
- package/dist/components/Tabs/Tab.js +47 -0
- package/dist/components/Tabs/TabDropdown.js +94 -0
- package/dist/components/Tabs/Tabs.js +128 -0
- package/dist/components/TagPill/TagPill.js +61 -0
- package/dist/components/TagPill/constants.js +12 -0
- package/dist/components/ToggleTip/ToggleTip.js +91 -0
- package/dist/components/ToggleTip/constants.js +17 -0
- package/dist/components/Tooltip/Tooltip.js +46 -0
- package/dist/components/TreeSelect/Option.js +302 -0
- package/dist/components/TreeSelect/Select.js +1867 -0
- package/dist/components/TreeSelect/mixins/InfinityLoaderMixin.js +32 -0
- package/dist/constants/events.js +5 -0
- package/dist/constants/keyCodes.js +12 -0
- package/dist/directives/outside/outside.js +37 -0
- package/dist/directives/tooltip/TooltipController.js +116 -0
- package/dist/directives/tooltip/textOverflowTooltip.js +23 -0
- package/dist/directives/tooltip/tooltip.js +48 -0
- package/dist/helpers/debounce.js +14 -0
- package/dist/helpers/generateUID.js +6 -0
- package/dist/helpers/getHrefFromID.js +6 -0
- package/dist/helpers/multiLineOverflows.js +6 -0
- package/dist/helpers/removeEvents.js +8 -0
- package/dist/helpers/stripHtml.js +6 -0
- package/dist/index.css +1 -1
- package/dist/index.js +103 -22665
- package/dist/main.js +10 -0
- package/dist/mixins/expandAnimation.js +24 -0
- package/package.json +7 -4
- package/src/components/Form/Textarea/Textarea.vue +8 -4
- package/src/components/TreeSelect/Select.vue +11 -11
- package/.babelrc.json +0 -14
- package/.eslintrc.cjs +0 -22
- package/.nvmrc +0 -1
- package/.prettierrc.json +0 -1
- package/.storybook/intelliboardTheme.js +0 -10
- package/.storybook/main.js +0 -25
- package/.storybook/manager.js +0 -7
- package/.storybook/preview-head.html +0 -12
- package/.storybook/preview.js +0 -25
- package/.storybook/scss-loader.scss +0 -6
- package/.storybook/withSource.js +0 -97
- package/dist/index.umd.cjs +0 -238
- package/index.html +0 -21
- package/static/Logo.svg +0 -25
- package/static/docks/button.pdf +0 -147566
- package/static/favicon.ico +0 -0
- package/vite.config.js +0 -47
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import y from "./LimitSelector.js";
|
|
2
|
+
import x from "../IconButton/IconButton.js";
|
|
3
|
+
import k from "../Form/Input/Input.js";
|
|
4
|
+
import R from "../Form/Label/Label.js";
|
|
5
|
+
import L from "../Icon.js";
|
|
6
|
+
import N from "../Tooltip/Tooltip.js";
|
|
7
|
+
import { resolveComponent as l, createElementBlock as a, openBlock as o, normalizeClass as _, createBlock as m, createCommentVNode as c, createElementVNode as h, createVNode as s, Fragment as S, withCtx as P, createTextVNode as C, toDisplayString as g, renderList as V, withDirectives as z, vShow as T } from "vue";
|
|
8
|
+
import { _ as O } from "../../chunks/_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
|
+
const B = 475, D = {
|
|
10
|
+
name: "IbPagination",
|
|
11
|
+
props: {
|
|
12
|
+
tooltipTextPrev: {
|
|
13
|
+
type: String
|
|
14
|
+
},
|
|
15
|
+
tooltipTextNext: {
|
|
16
|
+
type: String
|
|
17
|
+
},
|
|
18
|
+
labelInput: {
|
|
19
|
+
type: String
|
|
20
|
+
},
|
|
21
|
+
labelSelect: {
|
|
22
|
+
type: String,
|
|
23
|
+
required: !0
|
|
24
|
+
},
|
|
25
|
+
countRows: {
|
|
26
|
+
type: Number,
|
|
27
|
+
required: !0
|
|
28
|
+
},
|
|
29
|
+
pageCount: {
|
|
30
|
+
type: Number,
|
|
31
|
+
default: null
|
|
32
|
+
},
|
|
33
|
+
current: {
|
|
34
|
+
type: Number,
|
|
35
|
+
default: 1
|
|
36
|
+
},
|
|
37
|
+
limitSelector: {
|
|
38
|
+
type: Number,
|
|
39
|
+
default: 10
|
|
40
|
+
},
|
|
41
|
+
showPaginationInput: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: !0
|
|
44
|
+
},
|
|
45
|
+
showLimitSelector: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: !0
|
|
48
|
+
},
|
|
49
|
+
vertical: {
|
|
50
|
+
type: String
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
data() {
|
|
54
|
+
return {
|
|
55
|
+
isShort: !1,
|
|
56
|
+
resizeObserver: null,
|
|
57
|
+
currentPage: this.current,
|
|
58
|
+
indexSpaceLeft: null,
|
|
59
|
+
indexSpaceRight: null,
|
|
60
|
+
limitValue: this.limitSelector
|
|
61
|
+
};
|
|
62
|
+
},
|
|
63
|
+
watch: {
|
|
64
|
+
current(t) {
|
|
65
|
+
this.onSelect(t);
|
|
66
|
+
},
|
|
67
|
+
limitSelector(t) {
|
|
68
|
+
this.limitValue = t;
|
|
69
|
+
},
|
|
70
|
+
limitValue() {
|
|
71
|
+
this.currentPage = 1;
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
mounted() {
|
|
75
|
+
this.handleResize(), this.resizeObserver = new ResizeObserver(this.handleResize), this.resizeObserver.observe(this.$refs.paginationControl);
|
|
76
|
+
},
|
|
77
|
+
methods: {
|
|
78
|
+
handleResize() {
|
|
79
|
+
this.isShort = this.$refs.paginationControl.clientWidth < B;
|
|
80
|
+
},
|
|
81
|
+
changeLimit(t) {
|
|
82
|
+
Number.isInteger(t) && (this.limitValue = t, this.$emit("set-limit", t));
|
|
83
|
+
},
|
|
84
|
+
onInput(t) {
|
|
85
|
+
if (t < 1) {
|
|
86
|
+
this.onSelect(1);
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (t > this.countPagePagination) {
|
|
90
|
+
this.onSelect(this.countPagePagination);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
this.onSelect(Number(t));
|
|
94
|
+
},
|
|
95
|
+
onSelect(t) {
|
|
96
|
+
Number.isInteger(t) && (this.currentPage = t, this.$emit("select", t));
|
|
97
|
+
},
|
|
98
|
+
showItem(t) {
|
|
99
|
+
if (this.countPagePagination <= 5)
|
|
100
|
+
return this.indexSpaceLeft = null, this.indexSpaceRight = null, !0;
|
|
101
|
+
if (t === 1 || t === this.countPagePagination)
|
|
102
|
+
return !0;
|
|
103
|
+
if (this.countPagePagination >= 7) {
|
|
104
|
+
if (this.currentPage <= 3 && t <= 5)
|
|
105
|
+
return this.indexSpaceLeft = this.countPagePagination, this.indexSpaceRight = null, !0;
|
|
106
|
+
if (this.currentPage >= this.countPagePagination - 2 && t >= this.countPagePagination - 4)
|
|
107
|
+
return this.indexSpaceLeft = null, this.indexSpaceRight = 1, !0;
|
|
108
|
+
if (3 < this.currentPage < this.countPagePagination - 3 && (t === this.currentPage + 1 || t === this.currentPage - 1 || t === this.currentPage))
|
|
109
|
+
return this.indexSpaceLeft = this.countPagePagination, this.indexSpaceRight = 1, !0;
|
|
110
|
+
} else
|
|
111
|
+
return !0;
|
|
112
|
+
return !1;
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
computed: {
|
|
116
|
+
setCountOfRows() {
|
|
117
|
+
return this.currentPage === 1 || this.countPagePagination === 1 ? "1 - " + (this.countPagePagination > 1 ? this.limitValue : this.countRows) : this.countPagePagination === this.currentPage ? (this.currentPage - 1) * this.limitValue + " - " + this.countRows : (this.currentPage - 1) * this.limitValue + 1 + " - " + this.currentPage * this.limitValue;
|
|
118
|
+
},
|
|
119
|
+
countPagePagination() {
|
|
120
|
+
return Math.ceil(this.countRows / this.limitValue);
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
beforeUnmount() {
|
|
124
|
+
this.resizeObserver.disconnect(), this.resizeObserver = null;
|
|
125
|
+
},
|
|
126
|
+
components: {
|
|
127
|
+
IbIconButton: x,
|
|
128
|
+
IbIcon: L,
|
|
129
|
+
IbInput: k,
|
|
130
|
+
IbLabel: R,
|
|
131
|
+
IbLimitSelector: y,
|
|
132
|
+
IbTooltip: N
|
|
133
|
+
}
|
|
134
|
+
}, q = { class: "repot-pagination" }, E = { class: "pagination-input" }, F = { class: "row-count" }, M = {
|
|
135
|
+
key: 1,
|
|
136
|
+
class: "pagination-text"
|
|
137
|
+
}, U = {
|
|
138
|
+
key: 2,
|
|
139
|
+
class: "pagination-wrapper"
|
|
140
|
+
}, W = ["onClick"];
|
|
141
|
+
function H(t, u, e, j, i, n) {
|
|
142
|
+
const v = l("ib-limit-selector"), I = l("ib-label"), w = l("ib-input"), b = l("ib-icon"), p = l("ib-tooltip"), f = l("ib-icon-button");
|
|
143
|
+
return o(), a("div", {
|
|
144
|
+
ref: "paginationControl",
|
|
145
|
+
class: _(["report-controls", { "simple-pagination": !e.showLimitSelector }])
|
|
146
|
+
}, [
|
|
147
|
+
e.showLimitSelector ? (o(), m(v, {
|
|
148
|
+
key: 0,
|
|
149
|
+
onSelect: n.changeLimit,
|
|
150
|
+
value: i.limitValue,
|
|
151
|
+
vertical: e.vertical,
|
|
152
|
+
"label-select": e.labelSelect
|
|
153
|
+
}, null, 8, ["onSelect", "value", "vertical", "label-select"])) : c("", !0),
|
|
154
|
+
h("div", q, [
|
|
155
|
+
e.showPaginationInput ? (o(), a(S, { key: 0 }, [
|
|
156
|
+
s(I, { for: "goToPage" }, {
|
|
157
|
+
default: P(() => [
|
|
158
|
+
C(g(e.labelInput), 1)
|
|
159
|
+
]),
|
|
160
|
+
_: 1
|
|
161
|
+
}),
|
|
162
|
+
h("div", E, [
|
|
163
|
+
s(w, {
|
|
164
|
+
id: "goToPage",
|
|
165
|
+
type: "number",
|
|
166
|
+
"hide-number-actions": "",
|
|
167
|
+
debounce: 500,
|
|
168
|
+
onInput: n.onInput
|
|
169
|
+
}, null, 8, ["onInput"])
|
|
170
|
+
])
|
|
171
|
+
], 64)) : c("", !0),
|
|
172
|
+
h("div", F, g(n.setCountOfRows + " of " + e.countRows), 1),
|
|
173
|
+
s(f, {
|
|
174
|
+
kind: "tertiary",
|
|
175
|
+
size: "m",
|
|
176
|
+
class: "toggle-children button-prev",
|
|
177
|
+
disabled: i.currentPage === 1,
|
|
178
|
+
onClick: u[0] || (u[0] = (d) => n.onSelect(i.currentPage - 1))
|
|
179
|
+
}, {
|
|
180
|
+
default: P(() => [
|
|
181
|
+
s(b, { name: "chevron-back-outline" }),
|
|
182
|
+
e.tooltipTextPrev ? (o(), m(p, {
|
|
183
|
+
key: 0,
|
|
184
|
+
text: e.tooltipTextPrev
|
|
185
|
+
}, null, 8, ["text"])) : c("", !0)
|
|
186
|
+
]),
|
|
187
|
+
_: 1
|
|
188
|
+
}, 8, ["disabled"]),
|
|
189
|
+
i.isShort ? (o(), a("p", M, g(i.currentPage) + " Page ", 1)) : (o(), a("ul", U, [
|
|
190
|
+
(o(!0), a(S, null, V(n.countPagePagination, (d, r) => z((o(), a("li", {
|
|
191
|
+
key: r,
|
|
192
|
+
class: _(["pagination-item", {
|
|
193
|
+
active: r + 1 === i.currentPage,
|
|
194
|
+
"dots-left": i.indexSpaceLeft === r + 1,
|
|
195
|
+
"dots-right": i.indexSpaceRight === r + 1
|
|
196
|
+
}]),
|
|
197
|
+
onClick: (A) => n.onSelect(r + 1)
|
|
198
|
+
}, [
|
|
199
|
+
h("button", null, g(r + 1), 1)
|
|
200
|
+
], 10, W)), [
|
|
201
|
+
[T, n.showItem(r + 1)]
|
|
202
|
+
])), 128))
|
|
203
|
+
])),
|
|
204
|
+
s(f, {
|
|
205
|
+
kind: "tertiary",
|
|
206
|
+
size: "m",
|
|
207
|
+
class: "toggle-children button-next",
|
|
208
|
+
disabled: i.currentPage === n.countPagePagination,
|
|
209
|
+
onClick: u[1] || (u[1] = (d) => n.onSelect(i.currentPage + 1))
|
|
210
|
+
}, {
|
|
211
|
+
default: P(() => [
|
|
212
|
+
s(b, { name: "chevron-forward-outline" }),
|
|
213
|
+
e.tooltipTextNext ? (o(), m(p, {
|
|
214
|
+
key: 0,
|
|
215
|
+
text: e.tooltipTextNext
|
|
216
|
+
}, null, 8, ["text"])) : c("", !0)
|
|
217
|
+
]),
|
|
218
|
+
_: 1
|
|
219
|
+
}, 8, ["disabled"])
|
|
220
|
+
])
|
|
221
|
+
], 2);
|
|
222
|
+
}
|
|
223
|
+
const tt = /* @__PURE__ */ O(D, [["render", H]]);
|
|
224
|
+
export {
|
|
225
|
+
tt as default
|
|
226
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import h from "../IconButton/IconButton.js";
|
|
2
|
+
import _ from "../Icon.js";
|
|
3
|
+
import O from "../../mixins/expandAnimation.js";
|
|
4
|
+
import { TooltipDirective as B } from "../../directives/tooltip/tooltip.js";
|
|
5
|
+
import { resolveComponent as r, resolveDirective as b, createElementBlock as V, openBlock as l, normalizeClass as d, createElementVNode as t, createVNode as p, withDirectives as i, createCommentVNode as y, renderSlot as s, vShow as c, createBlock as E, withCtx as u, Transition as I } from "vue";
|
|
6
|
+
import { _ as w } from "../../chunks/_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
+
const k = {
|
|
8
|
+
name: "IbPanel",
|
|
9
|
+
mixins: [O],
|
|
10
|
+
props: {
|
|
11
|
+
showExpandButton: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: !1
|
|
14
|
+
},
|
|
15
|
+
expandButtonTooltip: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: ""
|
|
18
|
+
},
|
|
19
|
+
isOpen: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: !0
|
|
22
|
+
},
|
|
23
|
+
error: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: !1
|
|
26
|
+
},
|
|
27
|
+
hideHeaderDivider: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: !1
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
watch: {
|
|
33
|
+
isOpen() {
|
|
34
|
+
this.isOpenVal = this.isOpen;
|
|
35
|
+
},
|
|
36
|
+
isOpenVal() {
|
|
37
|
+
this.$emit("update:isOpen", this.isOpenVal);
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
data() {
|
|
41
|
+
return {
|
|
42
|
+
isOpenVal: this.isOpen
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
components: {
|
|
46
|
+
IconButton: h,
|
|
47
|
+
Icon: _
|
|
48
|
+
},
|
|
49
|
+
directives: {
|
|
50
|
+
Tooltip: B
|
|
51
|
+
},
|
|
52
|
+
emits: ["update:isOpen"]
|
|
53
|
+
}, x = { class: "panel-head" }, C = { class: "head-title" }, D = { class: "divider" }, T = { class: "head-content" }, g = { class: "panel-body" };
|
|
54
|
+
function A(e, a, n, N, o, S) {
|
|
55
|
+
const m = r("icon"), f = r("icon-button"), v = b("tooltip");
|
|
56
|
+
return l(), V("div", {
|
|
57
|
+
class: d(["ib-panel", { "panel-error": n.error }])
|
|
58
|
+
}, [
|
|
59
|
+
t("div", x, [
|
|
60
|
+
t("div", C, [
|
|
61
|
+
s(e.$slots, "title", {}, void 0, !0)
|
|
62
|
+
]),
|
|
63
|
+
i(t("div", D, null, 512), [
|
|
64
|
+
[c, !n.hideHeaderDivider]
|
|
65
|
+
]),
|
|
66
|
+
t("div", T, [
|
|
67
|
+
s(e.$slots, "head-content", {}, void 0, !0)
|
|
68
|
+
]),
|
|
69
|
+
n.showExpandButton ? i((l(), E(f, {
|
|
70
|
+
key: 0,
|
|
71
|
+
class: d({
|
|
72
|
+
"toggle-visible-button": !0,
|
|
73
|
+
active: o.isOpenVal
|
|
74
|
+
}),
|
|
75
|
+
kind: "ghost",
|
|
76
|
+
type: "button",
|
|
77
|
+
onClick: a[0] || (a[0] = (H) => o.isOpenVal = !o.isOpenVal)
|
|
78
|
+
}, {
|
|
79
|
+
default: u(() => [
|
|
80
|
+
p(m, { name: "chevron-down-outline" })
|
|
81
|
+
]),
|
|
82
|
+
_: 1
|
|
83
|
+
}, 8, ["class"])), [
|
|
84
|
+
[v, n.expandButtonTooltip]
|
|
85
|
+
]) : y("", !0)
|
|
86
|
+
]),
|
|
87
|
+
p(I, {
|
|
88
|
+
name: "expand",
|
|
89
|
+
onEnter: e.enter,
|
|
90
|
+
onAfterEnter: e.afterEnter,
|
|
91
|
+
onLeave: e.leave
|
|
92
|
+
}, {
|
|
93
|
+
default: u(() => [
|
|
94
|
+
i(t("div", g, [
|
|
95
|
+
s(e.$slots, "body", {}, void 0, !0)
|
|
96
|
+
], 512), [
|
|
97
|
+
[c, o.isOpenVal]
|
|
98
|
+
])
|
|
99
|
+
]),
|
|
100
|
+
_: 3
|
|
101
|
+
}, 8, ["onEnter", "onAfterEnter", "onLeave"])
|
|
102
|
+
], 2);
|
|
103
|
+
}
|
|
104
|
+
const F = /* @__PURE__ */ w(k, [["render", A], ["__scopeId", "data-v-5d452f83"]]);
|
|
105
|
+
export {
|
|
106
|
+
F as default
|
|
107
|
+
};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { c as f, a as m } from "../../chunks/floating-ui.dom-D8OVFdyL.js";
|
|
2
|
+
import { createBlock as a, openBlock as n, Teleport as b, createVNode as P, Transition as l, withCtx as d, withDirectives as h, createElementVNode as p, normalizeClass as u, renderSlot as v, vShow as c } from "vue";
|
|
3
|
+
import { _ as y } from "../../chunks/_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
const N = {
|
|
5
|
+
name: "IbPopover",
|
|
6
|
+
props: {
|
|
7
|
+
position: {
|
|
8
|
+
type: [String, Array],
|
|
9
|
+
default: "top"
|
|
10
|
+
},
|
|
11
|
+
alwaysVisible: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: !1
|
|
14
|
+
},
|
|
15
|
+
attachToBody: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: !1
|
|
18
|
+
},
|
|
19
|
+
attachTo: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: null
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
data() {
|
|
25
|
+
return {
|
|
26
|
+
parentNode: null,
|
|
27
|
+
isVisible: !!this.alwaysVisible,
|
|
28
|
+
activePosition: null
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
mounted() {
|
|
32
|
+
this.$nextTick(() => {
|
|
33
|
+
var e, s, t, o;
|
|
34
|
+
this.parentNode = this.$el.parentNode, this.alwaysVisible || ((e = this.parentNode) == null || e.addEventListener("focus", this.showPopover, !0), (s = this.parentNode) == null || s.addEventListener("blur", this.hidePopover, !0), (t = this.parentNode) == null || t.addEventListener("mouseover", this.showPopover), (o = this.parentNode) == null || o.addEventListener("mouseleave", this.hidePopover));
|
|
35
|
+
});
|
|
36
|
+
},
|
|
37
|
+
methods: {
|
|
38
|
+
showPopover() {
|
|
39
|
+
this.isVisible || (this.isVisible = !0, f(
|
|
40
|
+
this.parentNode,
|
|
41
|
+
this.$refs.popover,
|
|
42
|
+
{
|
|
43
|
+
middleware: [
|
|
44
|
+
m({
|
|
45
|
+
allowedPlacements: this.position
|
|
46
|
+
})
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
).then(({ x: e, y: s, placement: t }) => {
|
|
50
|
+
this.activePosition = t, Object.assign(this.$refs.popover.style, {
|
|
51
|
+
left: `${e}px`,
|
|
52
|
+
top: `${s}px`
|
|
53
|
+
});
|
|
54
|
+
}));
|
|
55
|
+
},
|
|
56
|
+
hidePopover() {
|
|
57
|
+
this.isVisible = !1;
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
computed: {
|
|
61
|
+
classes() {
|
|
62
|
+
const e = ["ib-popover"];
|
|
63
|
+
return e.push(`ib-${this.activePosition}`), this.isVisible && e.push("active"), e;
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
beforeUnmount() {
|
|
67
|
+
!this.alwaysVisible && this.parentNode && (this.parentNode.removeEventListener("focus", this.showPopover, !0), this.parentNode.removeEventListener("blur", this.hidePopover, !0), this.parentNode.removeEventListener("mouseover", this.showPopover, !0), this.parentNode.removeEventListener("mouseleave", this.hidePopover, !0));
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
function w(e, s, t, o, i, r) {
|
|
71
|
+
return t.attachToBody || t.attachTo ? (n(), a(b, {
|
|
72
|
+
key: 0,
|
|
73
|
+
to: t.attachToBody ? "body" : t.attachTo
|
|
74
|
+
}, [
|
|
75
|
+
P(l, null, {
|
|
76
|
+
default: d(() => [
|
|
77
|
+
h(p("div", {
|
|
78
|
+
ref: "popover",
|
|
79
|
+
class: u(r.classes)
|
|
80
|
+
}, [
|
|
81
|
+
v(e.$slots, "default", {}, void 0, !0)
|
|
82
|
+
], 2), [
|
|
83
|
+
[c, i.isVisible]
|
|
84
|
+
])
|
|
85
|
+
]),
|
|
86
|
+
_: 3
|
|
87
|
+
})
|
|
88
|
+
], 8, ["to"])) : (n(), a(l, { key: 1 }, {
|
|
89
|
+
default: d(() => [
|
|
90
|
+
h(p("div", {
|
|
91
|
+
ref: "popover",
|
|
92
|
+
class: u(r.classes)
|
|
93
|
+
}, [
|
|
94
|
+
v(e.$slots, "default", {}, void 0, !0)
|
|
95
|
+
], 2), [
|
|
96
|
+
[c, i.isVisible]
|
|
97
|
+
])
|
|
98
|
+
]),
|
|
99
|
+
_: 3
|
|
100
|
+
}));
|
|
101
|
+
}
|
|
102
|
+
const L = /* @__PURE__ */ y(N, [["render", w], ["__scopeId", "data-v-6da16abc"]]);
|
|
103
|
+
export {
|
|
104
|
+
L as default
|
|
105
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const t = {
|
|
2
|
+
topLeft: "top-left",
|
|
3
|
+
topCenter: "top-center",
|
|
4
|
+
topRight: "top-right",
|
|
5
|
+
rightTop: "right-top",
|
|
6
|
+
rightCenter: "right-center",
|
|
7
|
+
rightBottom: "right-bottom",
|
|
8
|
+
bottomLeft: "bottom-left",
|
|
9
|
+
bottomCenter: "bottom-center",
|
|
10
|
+
bottomRight: "bottom-right",
|
|
11
|
+
leftTop: "left-top",
|
|
12
|
+
leftCenter: "left-center",
|
|
13
|
+
leftBottom: "left-bottom"
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
t as popoverPosition
|
|
17
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import c from "../Icon.js";
|
|
2
|
+
import { progressBarStates as s } from "./constants.js";
|
|
3
|
+
import { resolveComponent as n, createElementBlock as l, openBlock as p, createElementVNode as t, withDirectives as d, normalizeClass as m, normalizeStyle as u, createVNode as _, vShow as h, pushScopeId as g, popScopeId as v } from "vue";
|
|
4
|
+
import { _ as S } from "../../chunks/_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
const b = {
|
|
6
|
+
props: {
|
|
7
|
+
states: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: s.PROGRESS
|
|
10
|
+
},
|
|
11
|
+
progress: {
|
|
12
|
+
type: [String, Number],
|
|
13
|
+
default: 0
|
|
14
|
+
},
|
|
15
|
+
ariaLabel: {
|
|
16
|
+
type: String,
|
|
17
|
+
required: !0
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
computed: {
|
|
21
|
+
classes() {
|
|
22
|
+
const e = ["ib-progress-bar"];
|
|
23
|
+
return e.push(`progress-bar-${this.states}`), e;
|
|
24
|
+
},
|
|
25
|
+
iconName() {
|
|
26
|
+
return this.states === s.SUCCESS ? "checkmark-circle" : this.states === s.FAILED || this.states === s.CANCELING || this.states === s.CANCELED ? "close-circle" : "";
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
components: {
|
|
30
|
+
IbIcon: c
|
|
31
|
+
}
|
|
32
|
+
}, o = (e) => (g("data-v-88a1a511"), e = e(), v(), e), f = { class: "ib-progress-bar-wrapper" }, N = ["aria-label", "aria-valuenow"], C = /* @__PURE__ */ o(() => /* @__PURE__ */ t("div", { class: "gradient" }, null, -1)), E = [
|
|
33
|
+
C
|
|
34
|
+
], I = /* @__PURE__ */ o(() => /* @__PURE__ */ t("div", null, null, -1));
|
|
35
|
+
function w(e, L, a, y, k, r) {
|
|
36
|
+
const i = n("ib-icon");
|
|
37
|
+
return p(), l("div", f, [
|
|
38
|
+
t("div", {
|
|
39
|
+
class: m(r.classes)
|
|
40
|
+
}, [
|
|
41
|
+
t("div", {
|
|
42
|
+
class: "progress",
|
|
43
|
+
role: "meter",
|
|
44
|
+
"aria-label": a.ariaLabel,
|
|
45
|
+
"aria-valuemin": "0",
|
|
46
|
+
"aria-valuemax": "100",
|
|
47
|
+
"aria-valuenow": a.progress,
|
|
48
|
+
style: u({ width: a.progress + "%" })
|
|
49
|
+
}, E, 12, N),
|
|
50
|
+
I
|
|
51
|
+
], 2),
|
|
52
|
+
d(_(i, {
|
|
53
|
+
class: "status-icon",
|
|
54
|
+
name: r.iconName
|
|
55
|
+
}, null, 8, ["name"]), [
|
|
56
|
+
[h, r.iconName.length]
|
|
57
|
+
])
|
|
58
|
+
]);
|
|
59
|
+
}
|
|
60
|
+
const z = /* @__PURE__ */ S(b, [["render", w], ["__scopeId", "data-v-88a1a511"]]);
|
|
61
|
+
export {
|
|
62
|
+
z as default
|
|
63
|
+
};
|