@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,228 @@
|
|
|
1
|
+
import { ESC_KEY_CODE as O, ENTER_KEY_CODE as C, SPACE_KEY_CODE as v, ARROW_DOWN_KEY_CODE as b } from "../../constants/keyCodes.js";
|
|
2
|
+
import { EVENT_NAME_CLICK as k } from "../../constants/events.js";
|
|
3
|
+
import { OutsideDirective as w } from "../../directives/outside/outside.js";
|
|
4
|
+
import { horizontalPosition as p, verticalPosition as y } from "./constants.js";
|
|
5
|
+
import { c as E, o as S, f as T, s as D } from "../../chunks/floating-ui.dom-D8OVFdyL.js";
|
|
6
|
+
import { resolveDirective as B, withDirectives as g, createElementBlock as l, openBlock as d, createCommentVNode as a, createBlock as I, createElementVNode as c, withModifiers as K, normalizeClass as u, renderSlot as r, Teleport as z, vShow as m, Fragment as R } from "vue";
|
|
7
|
+
import { _ as P } from "../../chunks/_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
+
const N = {
|
|
9
|
+
name: "IbDropdown",
|
|
10
|
+
directives: { Outside: w },
|
|
11
|
+
props: {
|
|
12
|
+
vertical: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: y.bottom
|
|
15
|
+
},
|
|
16
|
+
horizontal: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: p.left
|
|
19
|
+
},
|
|
20
|
+
triggerClass: {
|
|
21
|
+
default: ""
|
|
22
|
+
},
|
|
23
|
+
isOpened: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: !1
|
|
26
|
+
},
|
|
27
|
+
showCloseIcon: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: !1
|
|
30
|
+
},
|
|
31
|
+
closeOnClick: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: !1
|
|
34
|
+
},
|
|
35
|
+
disabled: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: !1
|
|
38
|
+
},
|
|
39
|
+
triggerType: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: k
|
|
42
|
+
},
|
|
43
|
+
destroyOnHide: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: !1
|
|
46
|
+
},
|
|
47
|
+
attachToBody: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: !1
|
|
50
|
+
},
|
|
51
|
+
attachTo: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: null
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
watch: {
|
|
57
|
+
isOpened(e) {
|
|
58
|
+
e ? this.open() : this.close();
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
mounted() {
|
|
62
|
+
this.$globalEvents.$on("dropdown:open", (e) => {
|
|
63
|
+
this.$el.contains(e.$el) || this.close();
|
|
64
|
+
}), document.addEventListener("focus", this.closeOnEventOutside, !0), document.addEventListener("keyup", this.onKeyupDocument);
|
|
65
|
+
},
|
|
66
|
+
data() {
|
|
67
|
+
return {
|
|
68
|
+
isOpenedState: this.isOpened,
|
|
69
|
+
timeout: null
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
methods: {
|
|
73
|
+
async updatePosition() {
|
|
74
|
+
const e = this.$refs.dropdown, s = this.$refs.body;
|
|
75
|
+
if (!e || !s) return;
|
|
76
|
+
const i = this.vertical === "top" ? "top" : "bottom", f = this.horizontal === "right" ? "end" : this.horizontal === "center" ? "" : "start", n = f ? `${i}-${f}` : i, { x: t, y: h } = await E(e, s, {
|
|
77
|
+
placement: n,
|
|
78
|
+
middleware: [S(3), T(), D({ padding: 8 })]
|
|
79
|
+
});
|
|
80
|
+
Object.assign(s.style, {
|
|
81
|
+
left: `${t}px`,
|
|
82
|
+
top: `${h}px`
|
|
83
|
+
});
|
|
84
|
+
},
|
|
85
|
+
onKeydown(e) {
|
|
86
|
+
(e.keyCode === C || e.keyCode === v) && (e.preventDefault(), this.toggle()), e.keyCode === b && (e.preventDefault(), this.open());
|
|
87
|
+
},
|
|
88
|
+
onKeyupDocument(e) {
|
|
89
|
+
e.keyCode === O && (e.preventDefault(), this.close());
|
|
90
|
+
},
|
|
91
|
+
toggle() {
|
|
92
|
+
this.isOpenedState ? this.close() : this.open();
|
|
93
|
+
},
|
|
94
|
+
open() {
|
|
95
|
+
this.disabled || (this.isOpenedState = !0, this.$emit("open"), this.$globalEvents.$emit("dropdown:open", this), this.$nextTick(() => {
|
|
96
|
+
(this.attachToBody || this.attachTo) && this.updatePosition();
|
|
97
|
+
}));
|
|
98
|
+
},
|
|
99
|
+
close() {
|
|
100
|
+
if (this.isOpenedState) {
|
|
101
|
+
if (this.disabled)
|
|
102
|
+
return;
|
|
103
|
+
this.isOpenedState = !1, this.$emit("close");
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
closeOnOutsideClick(e) {
|
|
107
|
+
this.$refs.body && this.$refs.body.contains(e.target) || this.close();
|
|
108
|
+
},
|
|
109
|
+
debouncedOpen() {
|
|
110
|
+
this.timeout = setTimeout(() => {
|
|
111
|
+
this.open();
|
|
112
|
+
}, 300);
|
|
113
|
+
},
|
|
114
|
+
debouncedClose() {
|
|
115
|
+
this.close(), clearTimeout(this.timeout);
|
|
116
|
+
},
|
|
117
|
+
closeOnClickIfRequired() {
|
|
118
|
+
this.closeOnClick && this.close();
|
|
119
|
+
},
|
|
120
|
+
closeOnEventOutside(e) {
|
|
121
|
+
this.$refs.body && this.$refs.body.contains(e.target) || this.$el.contains(e.target) || this.close();
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
computed: {
|
|
125
|
+
classes() {
|
|
126
|
+
const e = this.vertical === y.bottom ? " dropdown-bottom" : " dropdown-top", s = this.horizontal === p.left ? " dropdown-left" : this.horizontal === p.right ? " dropdown-right" : " dropdown-center", i = this.isOpenedState ? " active" : "";
|
|
127
|
+
return e + s + i;
|
|
128
|
+
},
|
|
129
|
+
triggerClasses() {
|
|
130
|
+
let e = this.isOpenedState ? "active" : "";
|
|
131
|
+
return this.disabled && (e += " dropdown-trigger-disabled"), this.triggerClass + e;
|
|
132
|
+
},
|
|
133
|
+
hasTrigger() {
|
|
134
|
+
return !!this.$slots.trigger;
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
beforeUnmount() {
|
|
138
|
+
document.removeEventListener("focus", this.closeOnEventOutside, !0), document.removeEventListener("keypress", this.onKeydownDocument);
|
|
139
|
+
}
|
|
140
|
+
}, q = { class: "ib-dropdown" }, L = { class: "footer-slot" }, A = { class: "footer-slot" };
|
|
141
|
+
function M(e, s, i, f, n, t) {
|
|
142
|
+
const h = B("outside");
|
|
143
|
+
return g((d(), l("div", q, [
|
|
144
|
+
t.hasTrigger && i.triggerType === "click" ? (d(), l("span", {
|
|
145
|
+
key: 0,
|
|
146
|
+
class: u(["dropdown-trigger", t.triggerClasses]),
|
|
147
|
+
ref: "dropdown",
|
|
148
|
+
onKeydown: s[0] || (s[0] = (...o) => t.onKeydown && t.onKeydown(...o)),
|
|
149
|
+
onClick: s[1] || (s[1] = K((...o) => t.toggle && t.toggle(...o), ["prevent", "stop"]))
|
|
150
|
+
}, [
|
|
151
|
+
r(e.$slots, "trigger", { isOpened: n.isOpenedState }, void 0, !0)
|
|
152
|
+
], 34)) : a("", !0),
|
|
153
|
+
t.hasTrigger && i.triggerType === "hover" ? (d(), l("span", {
|
|
154
|
+
key: 1,
|
|
155
|
+
class: u(["dropdown-trigger", t.triggerClasses]),
|
|
156
|
+
onMouseenter: s[2] || (s[2] = (...o) => t.debouncedOpen && t.debouncedOpen(...o)),
|
|
157
|
+
onMouseleave: s[3] || (s[3] = (...o) => t.debouncedClose && t.debouncedClose(...o))
|
|
158
|
+
}, [
|
|
159
|
+
r(e.$slots, "trigger", { isOpened: n.isOpenedState }, void 0, !0)
|
|
160
|
+
], 34)) : a("", !0),
|
|
161
|
+
i.attachToBody || i.attachTo ? (d(), I(z, {
|
|
162
|
+
key: 2,
|
|
163
|
+
to: i.attachToBody ? "body" : i.attachTo
|
|
164
|
+
}, [
|
|
165
|
+
!i.destroyOnHide || n.isOpenedState ? g((d(), l("div", {
|
|
166
|
+
key: 0,
|
|
167
|
+
ref: "body",
|
|
168
|
+
class: u("ib-dropdown-menu is-teleported " + t.classes)
|
|
169
|
+
}, [
|
|
170
|
+
c("div", {
|
|
171
|
+
class: "dropdown-body",
|
|
172
|
+
onClick: s[5] || (s[5] = (...o) => t.closeOnClickIfRequired && t.closeOnClickIfRequired(...o))
|
|
173
|
+
}, [
|
|
174
|
+
r(e.$slots, "body", { isOpenedState: n.isOpenedState }, void 0, !0),
|
|
175
|
+
i.showCloseIcon ? (d(), l("span", {
|
|
176
|
+
key: 0,
|
|
177
|
+
class: "close",
|
|
178
|
+
onClick: s[4] || (s[4] = (...o) => t.close && t.close(...o))
|
|
179
|
+
}, [
|
|
180
|
+
r(e.$slots, "close", {}, void 0, !0)
|
|
181
|
+
])) : a("", !0)
|
|
182
|
+
]),
|
|
183
|
+
c("div", L, [
|
|
184
|
+
r(e.$slots, "footer", {}, void 0, !0)
|
|
185
|
+
])
|
|
186
|
+
], 2)), [
|
|
187
|
+
[m, n.isOpenedState]
|
|
188
|
+
]) : a("", !0)
|
|
189
|
+
], 8, ["to"])) : (d(), l(R, { key: 3 }, [
|
|
190
|
+
!i.destroyOnHide || n.isOpenedState ? g((d(), l("div", {
|
|
191
|
+
key: 0,
|
|
192
|
+
ref: "body",
|
|
193
|
+
class: u("ib-dropdown-menu " + t.classes)
|
|
194
|
+
}, [
|
|
195
|
+
c("div", {
|
|
196
|
+
class: "dropdown-body",
|
|
197
|
+
onClick: s[7] || (s[7] = (...o) => t.closeOnClickIfRequired && t.closeOnClickIfRequired(...o))
|
|
198
|
+
}, [
|
|
199
|
+
r(e.$slots, "body", { isOpenedState: n.isOpenedState }, void 0, !0),
|
|
200
|
+
i.showCloseIcon ? (d(), l("span", {
|
|
201
|
+
key: 0,
|
|
202
|
+
class: "close",
|
|
203
|
+
onClick: s[6] || (s[6] = (...o) => t.close && t.close(...o))
|
|
204
|
+
}, [
|
|
205
|
+
r(e.$slots, "close", {}, void 0, !0)
|
|
206
|
+
])) : a("", !0)
|
|
207
|
+
]),
|
|
208
|
+
c("div", A, [
|
|
209
|
+
r(e.$slots, "footer", {}, void 0, !0)
|
|
210
|
+
])
|
|
211
|
+
], 2)), [
|
|
212
|
+
[m, n.isOpenedState]
|
|
213
|
+
]) : a("", !0)
|
|
214
|
+
], 64)),
|
|
215
|
+
c("div", {
|
|
216
|
+
class: "before",
|
|
217
|
+
onClick: s[8] || (s[8] = (...o) => t.close && t.close(...o))
|
|
218
|
+
}, [
|
|
219
|
+
r(e.$slots, "before", {}, void 0, !0)
|
|
220
|
+
])
|
|
221
|
+
])), [
|
|
222
|
+
[h, t.closeOnOutsideClick]
|
|
223
|
+
]);
|
|
224
|
+
}
|
|
225
|
+
const U = /* @__PURE__ */ P(N, [["render", M], ["__scopeId", "data-v-637e3198"]]);
|
|
226
|
+
export {
|
|
227
|
+
U as default
|
|
228
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createElementBlock as e, openBlock as o } from "vue";
|
|
2
|
+
import { _ as r } from "../../chunks/_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
+
const c = {}, d = { class: "dropdown-divider" };
|
|
4
|
+
function t(n, _) {
|
|
5
|
+
return o(), e("div", d);
|
|
6
|
+
}
|
|
7
|
+
const i = /* @__PURE__ */ r(c, [["render", t], ["__scopeId", "data-v-dda620ec"]]);
|
|
8
|
+
export {
|
|
9
|
+
i as default
|
|
10
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { createElementBlock as c, openBlock as o, createBlock as i, resolveDynamicComponent as d, mergeProps as a, withCtx as l, createElementVNode as r, withDirectives as f, renderSlot as s, vShow as p } from "vue";
|
|
2
|
+
import { _ as h } from "../../chunks/_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
+
const u = {
|
|
4
|
+
props: {
|
|
5
|
+
checked: {
|
|
6
|
+
type: Boolean,
|
|
7
|
+
default: !1
|
|
8
|
+
},
|
|
9
|
+
href: {
|
|
10
|
+
type: String
|
|
11
|
+
},
|
|
12
|
+
to: {
|
|
13
|
+
type: [String, Object]
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
computed: {
|
|
17
|
+
component() {
|
|
18
|
+
return this.href ? "a" : this.to ? "router-link" : "div";
|
|
19
|
+
},
|
|
20
|
+
attrs() {
|
|
21
|
+
const e = {
|
|
22
|
+
class: "ib-dropdown-item"
|
|
23
|
+
};
|
|
24
|
+
return this.href && (e.href = this.href), this.to && (e.to = this.to), e;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}, m = { class: "dropdown-item-wrapper" }, _ = { class: "dropdown-item-icon" };
|
|
28
|
+
function w(e, v, n, k, b, t) {
|
|
29
|
+
return o(), c("li", m, [
|
|
30
|
+
(o(), i(d(t.component), a({
|
|
31
|
+
class: n.checked ? "active" : ""
|
|
32
|
+
}, t.attrs, { tabindex: "0" }), {
|
|
33
|
+
default: l(() => [
|
|
34
|
+
r("p", null, [
|
|
35
|
+
f(r("div", _, [
|
|
36
|
+
s(e.$slots, "icon", {}, void 0, !0)
|
|
37
|
+
], 512), [
|
|
38
|
+
[p, e.$slots.icon]
|
|
39
|
+
]),
|
|
40
|
+
s(e.$slots, "default", { ref: "slot" }, void 0, !0)
|
|
41
|
+
])
|
|
42
|
+
]),
|
|
43
|
+
_: 3
|
|
44
|
+
}, 16, ["class"]))
|
|
45
|
+
]);
|
|
46
|
+
}
|
|
47
|
+
const S = /* @__PURE__ */ h(u, [["render", w], ["__scopeId", "data-v-edcdcbaf"]]);
|
|
48
|
+
export {
|
|
49
|
+
S as default
|
|
50
|
+
};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import c from "./Dropdown.js";
|
|
2
|
+
import f from "../List.js";
|
|
3
|
+
import { horizontalPosition as p, verticalPosition as m } from "./constants.js";
|
|
4
|
+
import { resolveComponent as i, createElementBlock as h, openBlock as u, normalizeClass as y, createVNode as r, mergeProps as g, createSlots as b, withCtx as a, renderSlot as s } from "vue";
|
|
5
|
+
import { _ } from "../../chunks/_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
+
const B = {
|
|
7
|
+
props: {
|
|
8
|
+
vertical: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: m.bottom
|
|
11
|
+
},
|
|
12
|
+
horizontal: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: p.left
|
|
15
|
+
},
|
|
16
|
+
isOpened: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: !1
|
|
19
|
+
},
|
|
20
|
+
closeOnClick: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: !1
|
|
23
|
+
},
|
|
24
|
+
disabled: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: !1
|
|
27
|
+
},
|
|
28
|
+
class: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: ""
|
|
31
|
+
},
|
|
32
|
+
attachToBody: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: !1
|
|
35
|
+
},
|
|
36
|
+
attachTo: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: null
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
methods: {
|
|
42
|
+
proxyEvents(e) {
|
|
43
|
+
this.$emit(e.event, ...e.args);
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
data() {
|
|
47
|
+
return {
|
|
48
|
+
list: this.$refs.list
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
computed: {
|
|
52
|
+
hasTrigger() {
|
|
53
|
+
return !!this.$slots.trigger;
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
components: {
|
|
57
|
+
IbDropdown: c,
|
|
58
|
+
IbList: f
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
function O(e, T, t, v, w, l) {
|
|
62
|
+
const n = i("ib-list"), d = i("ib-dropdown");
|
|
63
|
+
return u(), h("div", {
|
|
64
|
+
class: y(["dropdown-list-wrapper", t.class])
|
|
65
|
+
}, [
|
|
66
|
+
r(d, g({
|
|
67
|
+
horizontal: t.horizontal,
|
|
68
|
+
vertical: t.vertical,
|
|
69
|
+
isOpened: t.isOpened,
|
|
70
|
+
closeOnClick: t.closeOnClick,
|
|
71
|
+
disabled: t.disabled,
|
|
72
|
+
attachToBody: t.attachToBody,
|
|
73
|
+
attachTo: t.attachTo
|
|
74
|
+
}, e.$attrs, {
|
|
75
|
+
ref: "dropdown",
|
|
76
|
+
onAll: l.proxyEvents
|
|
77
|
+
}), b({
|
|
78
|
+
body: a(({ isOpened: o }) => [
|
|
79
|
+
r(n, {
|
|
80
|
+
ref: "list",
|
|
81
|
+
class: "list"
|
|
82
|
+
}, {
|
|
83
|
+
default: a(() => [
|
|
84
|
+
s(e.$slots, "body", { isOpenedState: o })
|
|
85
|
+
]),
|
|
86
|
+
_: 2
|
|
87
|
+
}, 1536)
|
|
88
|
+
]),
|
|
89
|
+
_: 2
|
|
90
|
+
}, [
|
|
91
|
+
l.hasTrigger ? {
|
|
92
|
+
name: "trigger",
|
|
93
|
+
fn: a(({ isOpened: o }) => [
|
|
94
|
+
s(e.$slots, "trigger", { isOpened: o })
|
|
95
|
+
]),
|
|
96
|
+
key: "0"
|
|
97
|
+
} : void 0
|
|
98
|
+
]), 1040, ["horizontal", "vertical", "isOpened", "closeOnClick", "disabled", "attachToBody", "attachTo", "onAll"])
|
|
99
|
+
], 2);
|
|
100
|
+
}
|
|
101
|
+
const E = /* @__PURE__ */ _(B, [["render", O]]);
|
|
102
|
+
export {
|
|
103
|
+
E as default
|
|
104
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { createElementBlock as e, openBlock as c, toDisplayString as a, Fragment as i, createElementVNode as r, createTextVNode as n } from "vue";
|
|
2
|
+
import { _ as h } from "../../chunks/_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
+
const o = {
|
|
4
|
+
props: {
|
|
5
|
+
characterLimit: {
|
|
6
|
+
type: [String, Number],
|
|
7
|
+
required: !0
|
|
8
|
+
},
|
|
9
|
+
characterLength: {
|
|
10
|
+
type: [String, Number],
|
|
11
|
+
required: !0
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}, s = { class: "character-count" }, _ = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "val-limit"
|
|
17
|
+
}, l = { class: "val-length" }, d = { class: "val-limit" }, m = {
|
|
18
|
+
key: 2,
|
|
19
|
+
class: "val-length error"
|
|
20
|
+
};
|
|
21
|
+
function u(g, L, t, f, v, y) {
|
|
22
|
+
return c(), e("div", s, [
|
|
23
|
+
t.characterLength ? t.characterLimit >= t.characterLength ? (c(), e(i, { key: 1 }, [
|
|
24
|
+
r("p", l, a(t.characterLength), 1),
|
|
25
|
+
n(" / "),
|
|
26
|
+
r("p", d, a(t.characterLimit), 1)
|
|
27
|
+
], 64)) : (c(), e("p", m, a(t.characterLimit - t.characterLength), 1)) : (c(), e("p", _, "Max " + a(t.characterLimit), 1))
|
|
28
|
+
]);
|
|
29
|
+
}
|
|
30
|
+
const N = /* @__PURE__ */ h(o, [["render", u], ["__scopeId", "data-v-f7d02439"]]);
|
|
31
|
+
export {
|
|
32
|
+
N as default
|
|
33
|
+
};
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import _ from "../../../helpers/generateUID.js";
|
|
2
|
+
import g from "../../../helpers/removeEvents.js";
|
|
3
|
+
import v from "../../Icon.js";
|
|
4
|
+
import { resolveComponent as C, createElementBlock as n, openBlock as d, normalizeClass as r, createElementVNode as c, mergeProps as V, withModifiers as m, withDirectives as h, createCommentVNode as o, vModelCheckbox as q, createTextVNode as k, toDisplayString as f, createVNode as x, vShow as y } from "vue";
|
|
5
|
+
import { _ as B } from "../../../chunks/_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
+
const S = {
|
|
7
|
+
name: "IbCheckbox",
|
|
8
|
+
model: {
|
|
9
|
+
event: "input"
|
|
10
|
+
},
|
|
11
|
+
props: {
|
|
12
|
+
label: String,
|
|
13
|
+
error: {
|
|
14
|
+
type: [Boolean, null],
|
|
15
|
+
default: !1
|
|
16
|
+
},
|
|
17
|
+
name: String,
|
|
18
|
+
id: {
|
|
19
|
+
type: String,
|
|
20
|
+
default() {
|
|
21
|
+
return _();
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
value: {
|
|
25
|
+
type: [String, Number]
|
|
26
|
+
},
|
|
27
|
+
modelValue: {
|
|
28
|
+
type: [Boolean, String]
|
|
29
|
+
},
|
|
30
|
+
isChecked: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: !1
|
|
33
|
+
},
|
|
34
|
+
readonly: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: !1
|
|
37
|
+
},
|
|
38
|
+
disabled: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !1
|
|
41
|
+
},
|
|
42
|
+
disableFocus: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: !1
|
|
45
|
+
},
|
|
46
|
+
required: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: !1
|
|
49
|
+
},
|
|
50
|
+
labelPosition: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: "right"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
watch: {
|
|
56
|
+
isChecked(t) {
|
|
57
|
+
this.checked = t;
|
|
58
|
+
},
|
|
59
|
+
modelValue(t) {
|
|
60
|
+
this.$emit("update:modelValue", this.modelValue), this.checked = t === "0" ? !1 : !!t;
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
data() {
|
|
64
|
+
return {
|
|
65
|
+
checked: this.modelValue ? this.modelValue === "0" ? !1 : !!this.modelValue : this.isChecked
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
methods: {
|
|
69
|
+
onChange(t) {
|
|
70
|
+
this.disabled || this.readonly || (this.checked = !this.checked, this.$emit("update:modelValue", this.checked), this.$emit("input", this.checked));
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
computed: {
|
|
74
|
+
classes() {
|
|
75
|
+
return {
|
|
76
|
+
"ib-checkbox": !0,
|
|
77
|
+
"ib-has-error": this.error,
|
|
78
|
+
"ib-checkbox-filled": this.checked,
|
|
79
|
+
"ib-checkbox-disabled": this.disabled,
|
|
80
|
+
"ib-checkbox-readonly": this.readonly,
|
|
81
|
+
"ib-checkbox-indeterminate": this.indeterminate
|
|
82
|
+
};
|
|
83
|
+
},
|
|
84
|
+
indeterminate() {
|
|
85
|
+
return this.isChecked === null;
|
|
86
|
+
},
|
|
87
|
+
attrs() {
|
|
88
|
+
const t = { ...g({ ...this.$attrs }) };
|
|
89
|
+
return delete t.class, t.class = this.classes, t;
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
components: {
|
|
93
|
+
IbIcon: v
|
|
94
|
+
},
|
|
95
|
+
inheritAttrs: !1
|
|
96
|
+
}, I = ["for", "tabindex", "aria-checked"], w = ["name", "id", "value", "disabled", "required"], N = ["name", "disabled", "required"], P = { class: "ib-checkbox-body" }, p = {
|
|
97
|
+
key: 0,
|
|
98
|
+
class: "required"
|
|
99
|
+
}, D = { class: "ib-checkbox-input" }, E = {
|
|
100
|
+
key: 1,
|
|
101
|
+
class: "ib-checkbox-label"
|
|
102
|
+
}, F = {
|
|
103
|
+
key: 0,
|
|
104
|
+
class: "required"
|
|
105
|
+
};
|
|
106
|
+
function M(t, i, e, U, s, l) {
|
|
107
|
+
var b;
|
|
108
|
+
const u = C("ib-icon");
|
|
109
|
+
return d(), n("div", {
|
|
110
|
+
class: r(["ib-checkbox-wrapper", this.$attrs.class])
|
|
111
|
+
}, [
|
|
112
|
+
c("label", V(l.attrs, {
|
|
113
|
+
role: "checkbox",
|
|
114
|
+
for: e.id,
|
|
115
|
+
tabindex: e.disabled | e.disableFocus ? -1 : 0,
|
|
116
|
+
"aria-checked": !!s.checked,
|
|
117
|
+
onClick: i[2] || (i[2] = m((...a) => l.onChange && l.onChange(...a), ["prevent", "stop"])),
|
|
118
|
+
onKeypress: i[3] || (i[3] = m((...a) => l.onChange && l.onChange(...a), ["prevent"]))
|
|
119
|
+
}), [
|
|
120
|
+
h(c("input", {
|
|
121
|
+
tabindex: "-1",
|
|
122
|
+
type: "checkbox",
|
|
123
|
+
name: e.name,
|
|
124
|
+
id: e.id,
|
|
125
|
+
value: e.value ?? 1,
|
|
126
|
+
disabled: e.disabled,
|
|
127
|
+
required: e.required,
|
|
128
|
+
"onUpdate:modelValue": i[0] || (i[0] = (a) => s.checked = a),
|
|
129
|
+
onClick: i[1] || (i[1] = (...a) => l.onChange && l.onChange(...a))
|
|
130
|
+
}, null, 8, w), [
|
|
131
|
+
[q, s.checked]
|
|
132
|
+
]),
|
|
133
|
+
!e.value && !s.checked ? (d(), n("input", {
|
|
134
|
+
key: 0,
|
|
135
|
+
value: "0",
|
|
136
|
+
type: "hidden",
|
|
137
|
+
name: e.name,
|
|
138
|
+
disabled: e.disabled,
|
|
139
|
+
required: e.required
|
|
140
|
+
}, null, 8, N)) : o("", !0),
|
|
141
|
+
c("div", P, [
|
|
142
|
+
e.labelPosition === "left" && e.label.length ? (d(), n("span", {
|
|
143
|
+
key: 0,
|
|
144
|
+
class: r(["ib-checkbox-label", { "ib-checkbox-label-left": e.labelPosition === "left" }])
|
|
145
|
+
}, [
|
|
146
|
+
e.required ? (d(), n("span", p, "*")) : o("", !0),
|
|
147
|
+
k(" " + f(e.label), 1)
|
|
148
|
+
], 2)) : o("", !0),
|
|
149
|
+
c("span", D, [
|
|
150
|
+
h(x(u, { name: "checkmark-sharp" }, null, 512), [
|
|
151
|
+
[y, s.checked && !l.indeterminate]
|
|
152
|
+
]),
|
|
153
|
+
h(x(u, {
|
|
154
|
+
class: r("checkbox-undeterminate-icon"),
|
|
155
|
+
name: "remove-sharp"
|
|
156
|
+
}, null, 512), [
|
|
157
|
+
[y, l.indeterminate]
|
|
158
|
+
])
|
|
159
|
+
]),
|
|
160
|
+
e.labelPosition === "right" && ((b = e.label) != null && b.length) ? (d(), n("span", E, [
|
|
161
|
+
e.required ? (d(), n("span", F, "*")) : o("", !0),
|
|
162
|
+
k(" " + f(e.label), 1)
|
|
163
|
+
])) : o("", !0)
|
|
164
|
+
])
|
|
165
|
+
], 16, I)
|
|
166
|
+
], 2);
|
|
167
|
+
}
|
|
168
|
+
const j = /* @__PURE__ */ B(S, [["render", M], ["__scopeId", "data-v-50848111"]]);
|
|
169
|
+
export {
|
|
170
|
+
j as default
|
|
171
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import f from "../Label/Label.js";
|
|
2
|
+
import m from "../../Alert/Alert.js";
|
|
3
|
+
import { resolveComponent as n, createElementBlock as g, openBlock as o, normalizeClass as h, createBlock as l, createCommentVNode as a, createElementVNode as x, withCtx as s, createTextVNode as c, toDisplayString as u, renderSlot as k, useCssVars as y } from "vue";
|
|
4
|
+
import { _ as S } from "../../../chunks/_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
const r = {
|
|
6
|
+
name: "IbInputGroup",
|
|
7
|
+
props: {
|
|
8
|
+
labelText: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: ""
|
|
11
|
+
},
|
|
12
|
+
required: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
required: !1
|
|
15
|
+
},
|
|
16
|
+
horizontal: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: !1
|
|
19
|
+
},
|
|
20
|
+
errorMessage: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: ""
|
|
23
|
+
},
|
|
24
|
+
infoText: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: ""
|
|
27
|
+
},
|
|
28
|
+
height: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: "290px"
|
|
31
|
+
},
|
|
32
|
+
tooltipPosition: {
|
|
33
|
+
type: String
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
components: {
|
|
37
|
+
IbLabel: f,
|
|
38
|
+
IbAlert: m
|
|
39
|
+
}
|
|
40
|
+
}, p = () => {
|
|
41
|
+
y((t) => ({
|
|
42
|
+
f99cce84: t.height
|
|
43
|
+
}));
|
|
44
|
+
}, _ = r.setup;
|
|
45
|
+
r.setup = _ ? (t, i) => (p(), _(t, i)) : p;
|
|
46
|
+
const C = { class: "ib-checkbox-group-content" };
|
|
47
|
+
function T(t, i, e, q, B, V) {
|
|
48
|
+
const b = n("ib-label"), d = n("ib-alert");
|
|
49
|
+
return o(), g("div", {
|
|
50
|
+
class: h(["ib-checkbox-group", { "ib-checkbox-group-horizontal": e.horizontal }])
|
|
51
|
+
}, [
|
|
52
|
+
e.labelText.length ? (o(), l(b, {
|
|
53
|
+
key: 0,
|
|
54
|
+
class: "ib-checkbox-group-label",
|
|
55
|
+
required: e.required,
|
|
56
|
+
"info-text": e.infoText,
|
|
57
|
+
"tooltip-position": e.tooltipPosition
|
|
58
|
+
}, {
|
|
59
|
+
default: s(() => [
|
|
60
|
+
c(u(e.labelText), 1)
|
|
61
|
+
]),
|
|
62
|
+
_: 1
|
|
63
|
+
}, 8, ["required", "info-text", "tooltip-position"])) : a("", !0),
|
|
64
|
+
e.errorMessage.length ? (o(), l(d, {
|
|
65
|
+
key: 1,
|
|
66
|
+
class: "ib-error-message"
|
|
67
|
+
}, {
|
|
68
|
+
default: s(() => [
|
|
69
|
+
c(u(e.errorMessage), 1)
|
|
70
|
+
]),
|
|
71
|
+
_: 1
|
|
72
|
+
})) : a("", !0),
|
|
73
|
+
x("div", C, [
|
|
74
|
+
k(t.$slots, "default")
|
|
75
|
+
])
|
|
76
|
+
], 2);
|
|
77
|
+
}
|
|
78
|
+
const N = /* @__PURE__ */ S(r, [["render", T]]);
|
|
79
|
+
export {
|
|
80
|
+
N as default
|
|
81
|
+
};
|