bani-ui 1.0.2-alpha.9 → 1.0.2
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/es/{Button-Bwzevixh.js → Button-CXgL_cy-.js} +6 -4
- package/dist/es/{ButtonGroup-iYDLXmLV.js → ButtonGroup-CaS3gDGZ.js} +4 -3
- package/dist/es/ConfigProvider-BPs20cEq.js +74 -0
- package/dist/es/Dropdown-Dgqe_mDE.js +175 -0
- package/dist/es/{Icon-C5WM3GNh.js → Icon-iDz_Qer5.js} +2 -2
- package/dist/es/{Loading-DEDOSX2q.js → Loading-BuMMkzGV.js} +3 -3
- package/dist/es/{Message-CQJbBQH-.js → Message-xfxk4ZMC.js} +9 -8
- package/dist/es/{Popconfirm-n33nSKOi.js → Popconfirm-DiHdBNmK.js} +10 -9
- package/dist/es/{Tooltip-BF6cY52d.js → Tooltip-CR8OQQL4.js} +3 -3
- package/dist/es/{hooks-D92zul9o.js → hooks-Bze4eaZa.js} +6 -8
- package/dist/es/index.js +20 -10
- package/dist/es/{utils-Uf9tqvV5.js → utils-mFOE2DND.js} +1 -1
- package/dist/es/{vendor-R0ZbR4ac.js → vendor-mcUuP0dl.js} +129 -11
- package/dist/index.css +1 -1
- package/dist/theme/ConfigProvider.css +1 -0
- package/dist/theme/Dropdown.css +117 -0
- package/dist/types/components/Button/constants.d.ts +1 -0
- package/dist/types/components/Button/index.d.ts +156 -16
- package/dist/types/components/Button/types.d.ts +3 -2
- package/dist/types/components/ButtonGroup/index.d.ts +34 -3
- package/dist/types/components/ButtonGroup/types.d.ts +1 -0
- package/dist/types/components/ConfigProvider/constants.d.ts +5 -0
- package/dist/types/components/ConfigProvider/hooks.d.ts +6 -0
- package/dist/types/components/ConfigProvider/index.d.ts +41 -0
- package/dist/types/components/ConfigProvider/types.d.ts +6 -0
- package/dist/types/components/Dropdown/constants.d.ts +4 -0
- package/dist/types/components/Dropdown/index.d.ts +266 -0
- package/dist/types/components/Dropdown/types.d.ts +31 -0
- package/dist/types/components/Icon/index.d.ts +235 -3
- package/dist/types/components/Icon/types.d.ts +1 -0
- package/dist/types/components/Loading/directive.d.ts +1 -0
- package/dist/types/components/Loading/index.d.ts +2 -0
- package/dist/types/components/Loading/service.d.ts +1 -0
- package/dist/types/components/Loading/types.d.ts +1 -0
- package/dist/types/components/Message/index.d.ts +2 -1
- package/dist/types/components/Message/methods.d.ts +1 -0
- package/dist/types/components/Message/types.d.ts +1 -0
- package/dist/types/components/Popconfirm/index.d.ts +125 -102
- package/dist/types/components/Popconfirm/types.d.ts +1 -0
- package/dist/types/components/Tooltip/index.d.ts +128 -15
- package/dist/types/components/Tooltip/types.d.ts +1 -0
- package/dist/types/components/Tooltip/useEventsToTiggerNode.d.ts +1 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/core/index.d.ts +1 -0
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/useClickOutside.d.ts +1 -0
- package/dist/types/hooks/useEventListener.d.ts +1 -0
- package/dist/types/hooks/useId.d.ts +1 -0
- package/dist/types/hooks/useLocale.d.ts +2 -1
- package/dist/types/hooks/useOffset.d.ts +1 -0
- package/dist/types/utils/install.d.ts +1 -0
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.css.br +0 -0
- package/dist/umd/index.css.gz +0 -0
- package/dist/umd/index.umd.cjs +12 -12
- package/dist/umd/index.umd.cjs.br +0 -0
- package/dist/umd/index.umd.cjs.gz +0 -0
- package/dist/umd/locale/lang.umd.cjs +1 -0
- package/package.json +12 -6
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent, inject, computed, useSlots, ref, openBlock, createBlock, resolveDynamicComponent, unref, normalizeClass, withCtx, renderSlot, createVNode, normalizeStyle, createCommentVNode } from "vue";
|
|
2
|
-
import { _ as _sfc_main$1 } from "./Icon-
|
|
2
|
+
import { _ as _sfc_main$1 } from "./Icon-iDz_Qer5.js";
|
|
3
3
|
import { faSpinner } from "@fortawesome/free-solid-svg-icons";
|
|
4
4
|
import { library } from "@fortawesome/fontawesome-svg-core";
|
|
5
|
-
import { t as throttle } from "./vendor-
|
|
6
|
-
import { w as withInstall } from "./utils-
|
|
5
|
+
import { t as throttle } from "./vendor-mcUuP0dl.js";
|
|
6
|
+
import { w as withInstall } from "./utils-mFOE2DND.js";
|
|
7
7
|
const BUTTON_GROUP_CTX_KEY = Symbol(
|
|
8
8
|
"BUTTON_GROUP_CTX_KEY"
|
|
9
9
|
);
|
|
@@ -49,7 +49,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
49
49
|
{ trailing: false }
|
|
50
50
|
);
|
|
51
51
|
__expose({
|
|
52
|
-
ref
|
|
52
|
+
get ref() {
|
|
53
|
+
return _ref.value ?? void 0;
|
|
54
|
+
},
|
|
53
55
|
disabled,
|
|
54
56
|
size,
|
|
55
57
|
type
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, provide, reactive, toRef, openBlock, createElementBlock, renderSlot } from "vue";
|
|
2
|
-
import { B as BUTTON_GROUP_CTX_KEY } from "./Button-
|
|
3
|
-
import { w as withInstall } from "./utils-
|
|
2
|
+
import { B as BUTTON_GROUP_CTX_KEY } from "./Button-CXgL_cy-.js";
|
|
3
|
+
import { w as withInstall } from "./utils-mFOE2DND.js";
|
|
4
4
|
import "@fortawesome/free-solid-svg-icons";
|
|
5
5
|
const _hoisted_1 = { class: "er-button-group" };
|
|
6
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -32,5 +32,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
32
32
|
});
|
|
33
33
|
const BnButtonGroup = withInstall(_sfc_main);
|
|
34
34
|
export {
|
|
35
|
-
BnButtonGroup as B
|
|
35
|
+
BnButtonGroup as B,
|
|
36
|
+
_sfc_main as _
|
|
36
37
|
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { ref, getCurrentInstance, computed, unref, inject, provide, defineComponent, renderSlot } from "vue";
|
|
2
|
+
import { n as merge, o as n, p as o } from "./vendor-mcUuP0dl.js";
|
|
3
|
+
import { E as English } from "./locale/lang/en.js";
|
|
4
|
+
import { w as withInstall } from "./utils-mFOE2DND.js";
|
|
5
|
+
import "@fortawesome/free-solid-svg-icons";
|
|
6
|
+
const configProviderContextKey = Symbol();
|
|
7
|
+
const globalConfig = ref();
|
|
8
|
+
function useGlobalConfig(key, defaultVal = void 0) {
|
|
9
|
+
const config = getCurrentInstance() ? inject(configProviderContextKey, globalConfig) : globalConfig;
|
|
10
|
+
return config;
|
|
11
|
+
}
|
|
12
|
+
const _createI18n = (opts) => {
|
|
13
|
+
var _a, _b, _c;
|
|
14
|
+
const mergeMsg = (msg) => merge(msg, (opts == null ? void 0 : opts.extendsI18nMsg) ?? {});
|
|
15
|
+
if (!(opts == null ? void 0 : opts.locale))
|
|
16
|
+
return o({
|
|
17
|
+
locale: "en",
|
|
18
|
+
messages: mergeMsg({
|
|
19
|
+
en: English.el
|
|
20
|
+
})
|
|
21
|
+
});
|
|
22
|
+
return o({
|
|
23
|
+
locale: ((_a = opts.locale) == null ? void 0 : _a.name) || "en",
|
|
24
|
+
messages: mergeMsg({
|
|
25
|
+
[((_b = opts.locale) == null ? void 0 : _b.name) || "en"]: ((_c = opts.locale) == null ? void 0 : _c.el) || {}
|
|
26
|
+
})
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
function provideGlobalConfig(config = { locale: English }, app, global = false) {
|
|
30
|
+
const instance = getCurrentInstance();
|
|
31
|
+
const oldConfig = instance ? useGlobalConfig() : void 0;
|
|
32
|
+
const provideFn = instance ? provide : void 0;
|
|
33
|
+
if (!provideFn) {
|
|
34
|
+
console.warn(
|
|
35
|
+
"provideGlobalConfig",
|
|
36
|
+
"provideGlobalConfig() can only be used inside setup()"
|
|
37
|
+
);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const context = computed(() => {
|
|
41
|
+
const cfg = unref(config);
|
|
42
|
+
if (!(oldConfig == null ? void 0 : oldConfig.value)) return cfg;
|
|
43
|
+
return merge({}, oldConfig.value, cfg);
|
|
44
|
+
});
|
|
45
|
+
const i18n = computed(() => {
|
|
46
|
+
return _createI18n(context.value);
|
|
47
|
+
});
|
|
48
|
+
provideFn(configProviderContextKey, context);
|
|
49
|
+
provideFn(n, i18n);
|
|
50
|
+
if (global || !globalConfig.value) globalConfig.value = context.value;
|
|
51
|
+
return context;
|
|
52
|
+
}
|
|
53
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
54
|
+
...{
|
|
55
|
+
name: "BnConfigProvider",
|
|
56
|
+
inheritAttrs: false
|
|
57
|
+
},
|
|
58
|
+
__name: "ConfigProvider",
|
|
59
|
+
props: {
|
|
60
|
+
locale: {},
|
|
61
|
+
extendsI18nMsg: {}
|
|
62
|
+
},
|
|
63
|
+
setup(__props) {
|
|
64
|
+
const props = __props;
|
|
65
|
+
const config = provideGlobalConfig(props);
|
|
66
|
+
return (_ctx, _cache) => {
|
|
67
|
+
return renderSlot(_ctx.$slots, "default", { config: unref(config) });
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
const BnConfigProvider = withInstall(_sfc_main);
|
|
72
|
+
export {
|
|
73
|
+
BnConfigProvider as B
|
|
74
|
+
};
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { defineComponent, inject, computed, openBlock, createElementBlock, Fragment, createCommentVNode, createElementVNode, normalizeClass, unref, renderSlot, createTextVNode, toDisplayString, useSlots, ref, provide, createVNode, mergeProps, withCtx, createBlock, renderList } from "vue";
|
|
2
|
+
import { b as useId } from "./hooks-Bze4eaZa.js";
|
|
3
|
+
import { _ as _sfc_main$2 } from "./ButtonGroup-CaS3gDGZ.js";
|
|
4
|
+
import { _ as _sfc_main$3 } from "./Button-CXgL_cy-.js";
|
|
5
|
+
import { B as BnTooltip } from "./Tooltip-CR8OQQL4.js";
|
|
6
|
+
import { faAngleDown } from "@fortawesome/free-solid-svg-icons";
|
|
7
|
+
import { library } from "@fortawesome/fontawesome-svg-core";
|
|
8
|
+
import { q as omit, k as isNil } from "./vendor-mcUuP0dl.js";
|
|
9
|
+
import { w as withInstall } from "./utils-mFOE2DND.js";
|
|
10
|
+
const DROPDOWN_CTX_KEY = Symbol("dropdownContext");
|
|
11
|
+
const _hoisted_1$1 = {
|
|
12
|
+
key: 0,
|
|
13
|
+
role: "separator",
|
|
14
|
+
class: "divided-placeholder"
|
|
15
|
+
};
|
|
16
|
+
const _hoisted_2 = ["id"];
|
|
17
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
18
|
+
...{
|
|
19
|
+
name: "BnDropdownItem",
|
|
20
|
+
inheritAttrs: false
|
|
21
|
+
},
|
|
22
|
+
__name: "DropdownItem",
|
|
23
|
+
props: {
|
|
24
|
+
command: { default: useId().value },
|
|
25
|
+
label: {},
|
|
26
|
+
disabled: { type: Boolean, default: false },
|
|
27
|
+
divided: { type: Boolean }
|
|
28
|
+
},
|
|
29
|
+
setup(__props) {
|
|
30
|
+
const props = __props;
|
|
31
|
+
const ctx = inject(DROPDOWN_CTX_KEY);
|
|
32
|
+
const size = computed(() => ctx == null ? void 0 : ctx.size.value);
|
|
33
|
+
function handleClick() {
|
|
34
|
+
if (props.disabled) return;
|
|
35
|
+
ctx == null ? void 0 : ctx.handleItemClick(props);
|
|
36
|
+
}
|
|
37
|
+
return (_ctx, _cache) => {
|
|
38
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
39
|
+
__props.divided ? (openBlock(), createElementBlock("li", _hoisted_1$1)) : createCommentVNode("", true),
|
|
40
|
+
createElementVNode("li", {
|
|
41
|
+
id: `dropdown-item-${__props.command ?? unref(useId)().value}`,
|
|
42
|
+
class: normalizeClass({
|
|
43
|
+
"er-dropdown__item": true,
|
|
44
|
+
["er-dropdown__item--" + size.value]: size.value,
|
|
45
|
+
"is-disabled": __props.disabled,
|
|
46
|
+
"is-divided": __props.divided
|
|
47
|
+
}),
|
|
48
|
+
onClick: handleClick
|
|
49
|
+
}, [
|
|
50
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
51
|
+
createTextVNode(toDisplayString(__props.label), 1)
|
|
52
|
+
])
|
|
53
|
+
], 10, _hoisted_2)
|
|
54
|
+
], 64);
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
const _hoisted_1 = { class: "er-dropdown__menu" };
|
|
59
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
60
|
+
...{
|
|
61
|
+
name: "BnDropdown",
|
|
62
|
+
inheritAttrs: false
|
|
63
|
+
},
|
|
64
|
+
__name: "Dropdown",
|
|
65
|
+
props: {
|
|
66
|
+
type: {},
|
|
67
|
+
size: {},
|
|
68
|
+
items: { default: () => [] },
|
|
69
|
+
hideOnClick: { type: Boolean, default: true },
|
|
70
|
+
splitButton: { type: Boolean },
|
|
71
|
+
content: {},
|
|
72
|
+
trigger: {},
|
|
73
|
+
placement: {},
|
|
74
|
+
manual: { type: Boolean },
|
|
75
|
+
disabled: { type: Boolean },
|
|
76
|
+
popperOptions: {},
|
|
77
|
+
transition: {},
|
|
78
|
+
showTimeout: {},
|
|
79
|
+
hideTimeout: {}
|
|
80
|
+
},
|
|
81
|
+
emits: ["visible-change", "command", "click"],
|
|
82
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
83
|
+
library.add(faAngleDown);
|
|
84
|
+
const props = __props;
|
|
85
|
+
const emits = __emit;
|
|
86
|
+
useSlots();
|
|
87
|
+
const tooltipRef = ref();
|
|
88
|
+
const triggerRef = ref();
|
|
89
|
+
const virtualRef = computed(() => {
|
|
90
|
+
var _a;
|
|
91
|
+
return ((_a = triggerRef.value) == null ? void 0 : _a.ref) ?? void 0;
|
|
92
|
+
});
|
|
93
|
+
const tooltipProps = computed(
|
|
94
|
+
() => omit(props, ["items", "hideAfterClick", "size", "type", "splitButton"])
|
|
95
|
+
);
|
|
96
|
+
function handleItemClick(e) {
|
|
97
|
+
var _a;
|
|
98
|
+
props.hideOnClick && ((_a = tooltipRef.value) == null ? void 0 : _a.hide());
|
|
99
|
+
!isNil(e.command) && emits("command", e.command);
|
|
100
|
+
}
|
|
101
|
+
provide(DROPDOWN_CTX_KEY, {
|
|
102
|
+
handleItemClick,
|
|
103
|
+
size: computed(() => props.size)
|
|
104
|
+
});
|
|
105
|
+
__expose({
|
|
106
|
+
open: () => {
|
|
107
|
+
var _a;
|
|
108
|
+
return (_a = tooltipRef.value) == null ? void 0 : _a.show();
|
|
109
|
+
},
|
|
110
|
+
close: () => {
|
|
111
|
+
var _a;
|
|
112
|
+
return (_a = tooltipRef.value) == null ? void 0 : _a.hide();
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
return (_ctx, _cache) => {
|
|
116
|
+
return openBlock(), createElementBlock("div", {
|
|
117
|
+
class: normalizeClass(["er-dropdown", { "is-disabled": props.disabled }])
|
|
118
|
+
}, [
|
|
119
|
+
createVNode(BnTooltip, mergeProps({
|
|
120
|
+
ref_key: "tooltipRef",
|
|
121
|
+
ref: tooltipRef
|
|
122
|
+
}, tooltipProps.value, {
|
|
123
|
+
"virtual-triggering": __props.splitButton,
|
|
124
|
+
"virtual-ref": virtualRef.value,
|
|
125
|
+
onVisibleChange: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("visible-change", $event))
|
|
126
|
+
}), {
|
|
127
|
+
content: withCtx(() => [
|
|
128
|
+
createElementVNode("div", _hoisted_1, [
|
|
129
|
+
renderSlot(_ctx.$slots, "dropdown", {}, () => [
|
|
130
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item) => {
|
|
131
|
+
return openBlock(), createBlock(_sfc_main$1, mergeProps({
|
|
132
|
+
key: item.command,
|
|
133
|
+
ref_for: true
|
|
134
|
+
}, item), null, 16);
|
|
135
|
+
}), 128))
|
|
136
|
+
])
|
|
137
|
+
])
|
|
138
|
+
]),
|
|
139
|
+
default: withCtx(() => [
|
|
140
|
+
__props.splitButton ? (openBlock(), createBlock(_sfc_main$2, {
|
|
141
|
+
key: 0,
|
|
142
|
+
type: __props.type,
|
|
143
|
+
size: __props.size,
|
|
144
|
+
disabled: __props.disabled
|
|
145
|
+
}, {
|
|
146
|
+
default: withCtx(() => [
|
|
147
|
+
createVNode(_sfc_main$3, {
|
|
148
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
|
|
149
|
+
}, {
|
|
150
|
+
default: withCtx(() => [
|
|
151
|
+
renderSlot(_ctx.$slots, "default")
|
|
152
|
+
]),
|
|
153
|
+
_: 3
|
|
154
|
+
}),
|
|
155
|
+
createVNode(_sfc_main$3, {
|
|
156
|
+
ref_key: "triggerRef",
|
|
157
|
+
ref: triggerRef,
|
|
158
|
+
icon: "angle-down"
|
|
159
|
+
}, null, 512)
|
|
160
|
+
]),
|
|
161
|
+
_: 3
|
|
162
|
+
}, 8, ["type", "size", "disabled"])) : renderSlot(_ctx.$slots, "default", { key: 1 })
|
|
163
|
+
]),
|
|
164
|
+
_: 3
|
|
165
|
+
}, 16, ["virtual-triggering", "virtual-ref"])
|
|
166
|
+
], 2);
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
const BnDropdown = withInstall(_sfc_main);
|
|
171
|
+
const BnDropdownItem = withInstall(_sfc_main$1);
|
|
172
|
+
export {
|
|
173
|
+
BnDropdown as B,
|
|
174
|
+
BnDropdownItem as a
|
|
175
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createElementBlock, mergeProps, createVNode, unref, normalizeProps, guardReactiveProps } from "vue";
|
|
2
2
|
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
|
|
3
|
-
import {
|
|
4
|
-
import { w as withInstall } from "./utils-
|
|
3
|
+
import { q as omit } from "./vendor-mcUuP0dl.js";
|
|
4
|
+
import { w as withInstall } from "./utils-mFOE2DND.js";
|
|
5
5
|
import "@fortawesome/free-solid-svg-icons";
|
|
6
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
7
|
...{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, useCssVars, computed, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, createCommentVNode, createElementBlock, toDisplayString, vShow, nextTick, ref, reactive, createApp } from "vue";
|
|
2
|
-
import { e as useZIndex } from "./hooks-
|
|
3
|
-
import { _ as _sfc_main$1 } from "./Icon-
|
|
4
|
-
import { m as isString, k as isNil, a as defer, e as delay } from "./vendor-
|
|
2
|
+
import { e as useZIndex } from "./hooks-Bze4eaZa.js";
|
|
3
|
+
import { _ as _sfc_main$1 } from "./Icon-iDz_Qer5.js";
|
|
4
|
+
import { m as isString, k as isNil, a as defer, e as delay } from "./vendor-mcUuP0dl.js";
|
|
5
5
|
const _hoisted_1 = { class: "er-loading__spinner" };
|
|
6
6
|
const _hoisted_2 = {
|
|
7
7
|
key: 1,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, onMounted, watch, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeStyle, normalizeClass, createVNode, renderSlot, unref, createCommentVNode, createElementBlock, withModifiers, vShow, shallowReactive, isVNode, h, render } from "vue";
|
|
2
|
-
import { d as useOffset, a as useEventListener, e as useZIndex, b as useId } from "./hooks-
|
|
3
|
-
import { t as typeIconMap, R as RenderVnode, b as withInstallFunction } from "./utils-
|
|
4
|
-
import { _ as _sfc_main$1 } from "./Icon-
|
|
5
|
-
import { faCircleInfo } from "@fortawesome/free-solid-svg-icons";
|
|
6
|
-
import { b as bind, e as delay, g as forEach, m as isString, f as findIndex, h as get, s as set } from "./vendor-
|
|
2
|
+
import { d as useOffset, a as useEventListener, e as useZIndex, b as useId } from "./hooks-Bze4eaZa.js";
|
|
3
|
+
import { t as typeIconMap, R as RenderVnode, b as withInstallFunction } from "./utils-mFOE2DND.js";
|
|
4
|
+
import { _ as _sfc_main$1 } from "./Icon-iDz_Qer5.js";
|
|
5
|
+
import { faCircleInfo, faXmark } from "@fortawesome/free-solid-svg-icons";
|
|
6
|
+
import { b as bind, e as delay, g as forEach, m as isString, f as findIndex, h as get, s as set } from "./vendor-mcUuP0dl.js";
|
|
7
7
|
const messageTypes = [
|
|
8
8
|
"info",
|
|
9
9
|
"success",
|
|
@@ -110,9 +110,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
110
110
|
]),
|
|
111
111
|
__props.showClose ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
112
112
|
createVNode(_sfc_main$1, {
|
|
113
|
-
icon:
|
|
113
|
+
icon: unref(faXmark),
|
|
114
114
|
onClick: withModifiers(close, ["stop"])
|
|
115
|
-
})
|
|
115
|
+
}, null, 8, ["icon"])
|
|
116
116
|
])) : createCommentVNode("", true)
|
|
117
117
|
], 38), [
|
|
118
118
|
[vShow, visible.value]
|
|
@@ -198,5 +198,6 @@ forEach(
|
|
|
198
198
|
message.closeAll = closeAll;
|
|
199
199
|
const BnMessage = withInstallFunction(message, "$message");
|
|
200
200
|
export {
|
|
201
|
-
BnMessage as B
|
|
201
|
+
BnMessage as B,
|
|
202
|
+
messageTypes as m
|
|
202
203
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, openBlock, createBlock, createSlots, withCtx, createElementVNode, normalizeStyle, createCommentVNode, createTextVNode, toDisplayString, createVNode,
|
|
2
|
-
import { _ as _sfc_main$2 } from "./Button-
|
|
3
|
-
import { _ as _sfc_main$1 } from "./Icon-
|
|
4
|
-
import { B as BnTooltip } from "./Tooltip-
|
|
1
|
+
import { defineComponent, computed, ref, openBlock, createBlock, createSlots, withCtx, createElementVNode, normalizeStyle, createCommentVNode, createTextVNode, toDisplayString, createVNode, renderSlot } from "vue";
|
|
2
|
+
import { _ as _sfc_main$2 } from "./Button-CXgL_cy-.js";
|
|
3
|
+
import { _ as _sfc_main$1 } from "./Icon-iDz_Qer5.js";
|
|
4
|
+
import { B as BnTooltip } from "./Tooltip-CR8OQQL4.js";
|
|
5
5
|
import { faQuestionCircle } from "@fortawesome/free-solid-svg-icons";
|
|
6
|
-
import { a as addUnit, w as withInstall } from "./utils-
|
|
7
|
-
import { c as useLocale } from "./hooks-
|
|
6
|
+
import { a as addUnit, w as withInstall } from "./utils-mFOE2DND.js";
|
|
7
|
+
import { c as useLocale } from "./hooks-Bze4eaZa.js";
|
|
8
8
|
const _hoisted_1 = { class: "er-popconfirm__main" };
|
|
9
9
|
const _hoisted_2 = { class: "er-popconfirm__action" };
|
|
10
10
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -26,7 +26,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
26
26
|
},
|
|
27
27
|
emits: ["confirm", "cancel"],
|
|
28
28
|
setup(__props, { emit: __emit }) {
|
|
29
|
-
const
|
|
29
|
+
const locale = useLocale();
|
|
30
|
+
const t = computed(() => locale.value.t);
|
|
30
31
|
const props = __props;
|
|
31
32
|
const icon = computed(() => props.icon ?? faQuestionCircle);
|
|
32
33
|
const emits = __emit;
|
|
@@ -72,7 +73,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
72
73
|
onClick: cancel
|
|
73
74
|
}, {
|
|
74
75
|
default: withCtx(() => [
|
|
75
|
-
createTextVNode(toDisplayString(__props.cancelButtonText ||
|
|
76
|
+
createTextVNode(toDisplayString(__props.cancelButtonText || t.value("popconfirm.cancelButtonText")), 1)
|
|
76
77
|
]),
|
|
77
78
|
_: 1
|
|
78
79
|
}, 8, ["type"]),
|
|
@@ -83,7 +84,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
83
84
|
onClick: confirm
|
|
84
85
|
}, {
|
|
85
86
|
default: withCtx(() => [
|
|
86
|
-
createTextVNode(toDisplayString(__props.confirmButtonText ||
|
|
87
|
+
createTextVNode(toDisplayString(__props.confirmButtonText || t.value("popconfirm.confirmButtonText")), 1)
|
|
87
88
|
]),
|
|
88
89
|
_: 1
|
|
89
90
|
}, 8, ["type"])
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { onMounted, watch, onUnmounted, defineComponent, ref, computed, watchEffect, openBlock, createElementBlock, mergeProps, toHandlers, renderSlot, createVNode, Transition, withCtx, createTextVNode, toDisplayString, createElementVNode, createCommentVNode } from "vue";
|
|
2
|
-
import { u as useClickOutside } from "./hooks-
|
|
3
|
-
import { i as isElement, g as forEach, c as createPopper, d as debounce, b as bind, k as isNil } from "./vendor-
|
|
4
|
-
import { _ as _export_sfc, w as withInstall } from "./utils-
|
|
2
|
+
import { u as useClickOutside } from "./hooks-Bze4eaZa.js";
|
|
3
|
+
import { i as isElement, g as forEach, c as createPopper, d as debounce, b as bind, k as isNil } from "./vendor-mcUuP0dl.js";
|
|
4
|
+
import { _ as _export_sfc, w as withInstall } from "./utils-mFOE2DND.js";
|
|
5
5
|
import "@fortawesome/free-solid-svg-icons";
|
|
6
6
|
function useEvenstToTiggerNode(props, triggerNode, events, closeMethod) {
|
|
7
7
|
let watchEventsStopHandle;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isRef, watch, onMounted, onBeforeUnmount, unref, computed, ref, inject } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { o as n, p as o, q as omit } from "./vendor-mcUuP0dl.js";
|
|
3
3
|
import { E as English } from "./locale/lang/en.js";
|
|
4
4
|
function useEventListener(target, event, handler) {
|
|
5
5
|
if (isRef(target)) {
|
|
@@ -50,13 +50,11 @@ function useId(namespace = "er") {
|
|
|
50
50
|
}
|
|
51
51
|
function useLocale(localeOverrides) {
|
|
52
52
|
{
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"install"
|
|
59
|
-
);
|
|
53
|
+
const injected = inject(n);
|
|
54
|
+
return computed(() => {
|
|
55
|
+
const instance = unref(injected) ?? o({ locale: English.name, messages: { en: English.el } });
|
|
56
|
+
return omit(instance, "install");
|
|
57
|
+
});
|
|
60
58
|
}
|
|
61
59
|
}
|
|
62
60
|
function useClickOutside(elementRef, callback) {
|
package/dist/es/index.js
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { m as makeInstaller } from "./utils-
|
|
1
|
+
import { m as makeInstaller } from "./utils-mFOE2DND.js";
|
|
2
2
|
import "@fortawesome/free-solid-svg-icons";
|
|
3
|
-
import { a as BnButton } from "./Button-
|
|
4
|
-
import { B as BnButtonGroup } from "./ButtonGroup-
|
|
5
|
-
import { B as BnMessage } from "./Message-
|
|
6
|
-
import {
|
|
7
|
-
import { B as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
3
|
+
import { a as BnButton } from "./Button-CXgL_cy-.js";
|
|
4
|
+
import { B as BnButtonGroup } from "./ButtonGroup-CaS3gDGZ.js";
|
|
5
|
+
import { B as BnMessage } from "./Message-xfxk4ZMC.js";
|
|
6
|
+
import { m } from "./Message-xfxk4ZMC.js";
|
|
7
|
+
import { B as BnIcon } from "./Icon-iDz_Qer5.js";
|
|
8
|
+
import { B as BnLoading } from "./Loading-BuMMkzGV.js";
|
|
9
|
+
import { v, L, v as v2 } from "./Loading-BuMMkzGV.js";
|
|
10
|
+
import { a as BnTooltip } from "./Tooltip-CR8OQQL4.js";
|
|
11
|
+
import { B as BnPopconfirm } from "./Popconfirm-DiHdBNmK.js";
|
|
12
|
+
import { B as BnDropdown, a as BnDropdownItem } from "./Dropdown-Dgqe_mDE.js";
|
|
13
|
+
import { B as BnConfigProvider } from "./ConfigProvider-BPs20cEq.js";
|
|
11
14
|
const components = [
|
|
12
15
|
BnButton,
|
|
13
16
|
BnButtonGroup,
|
|
@@ -15,12 +18,18 @@ const components = [
|
|
|
15
18
|
BnMessage,
|
|
16
19
|
BnLoading,
|
|
17
20
|
BnTooltip,
|
|
18
|
-
BnPopconfirm
|
|
21
|
+
BnPopconfirm,
|
|
22
|
+
BnDropdown,
|
|
23
|
+
BnDropdownItem,
|
|
24
|
+
BnConfigProvider
|
|
19
25
|
];
|
|
20
26
|
const installer = makeInstaller(components);
|
|
21
27
|
export {
|
|
22
28
|
BnButton,
|
|
23
29
|
BnButtonGroup,
|
|
30
|
+
BnConfigProvider,
|
|
31
|
+
BnDropdown,
|
|
32
|
+
BnDropdownItem,
|
|
24
33
|
BnIcon,
|
|
25
34
|
BnLoading,
|
|
26
35
|
v as BnLoadingDirective,
|
|
@@ -29,5 +38,6 @@ export {
|
|
|
29
38
|
BnPopconfirm,
|
|
30
39
|
BnTooltip,
|
|
31
40
|
installer as default,
|
|
41
|
+
m as messageTypes,
|
|
32
42
|
v2 as vLoading
|
|
33
43
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as forEach, j as isFunction, l as isNumber, m as isString } from "./vendor-
|
|
1
|
+
import { g as forEach, j as isFunction, l as isNumber, m as isString } from "./vendor-mcUuP0dl.js";
|
|
2
2
|
import { faCircleInfo, faCheckCircle, faCircleExclamation, faCircleXmark } from "@fortawesome/free-solid-svg-icons";
|
|
3
3
|
import { defineComponent } from "vue";
|
|
4
4
|
function makeInstaller(components) {
|