rappel-ui 1.0.19 → 1.0.21
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/cjs/components/button/index.js +1 -1
- package/cjs/components/button/src/button.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/button/src/types.d.ts +1 -1
- package/cjs/components/button/style/css.js +2 -1
- package/cjs/components/button/style/index.js +2 -1
- package/cjs/components/button-group/style/css.js +2 -0
- package/cjs/components/button-group/style/index.js +2 -0
- package/cjs/components/colors/index.js +1 -1
- package/cjs/components/colors/style/css.js +2 -1
- package/cjs/components/colors/style/index.js +2 -1
- package/cjs/components/filter-panel/index.js +1 -1
- package/cjs/components/filter-panel/src/filter-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/filter-panel/style/css.js +2 -1
- package/cjs/components/filter-panel/style/index.js +2 -1
- package/cjs/components/input/index.js +1 -1
- package/cjs/components/popconfirm/index.d.ts +5 -5
- package/cjs/components/popconfirm/index.js +1 -1
- package/cjs/components/popconfirm/src/popconfirm.vue.d.ts +2 -2
- package/cjs/components/popconfirm/src/popconfirm.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/popconfirm/src/types.d.ts +2 -2
- package/cjs/components/popconfirm/style/css.js +2 -1
- package/cjs/components/popconfirm/style/index.js +2 -1
- package/cjs/components/popover/index.d.ts +5 -5
- package/cjs/components/popover/index.js +1 -1
- package/cjs/components/popover/src/popover.vue.d.ts +2 -2
- package/cjs/components/popover/src/popover.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/popover/src/types.d.ts +1 -1
- package/cjs/components/popover/style/css.js +2 -1
- package/cjs/components/popover/style/index.js +2 -1
- package/cjs/components/svg-icon/index.js +1 -1
- package/cjs/components/svg-icon/style/css.js +2 -1
- package/cjs/components/svg-icon/style/index.js +2 -1
- package/cjs/components/tabs/index.js +1 -1
- package/cjs/components/tooltip/index.js +1 -1
- package/cjs/components/tooltip/src/tooltip.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/tooltip/src/types.d.ts +1 -1
- package/cjs/components/tooltip/src/use-tooltip.js +1 -1
- package/cjs/components/tooltip/style/css.js +2 -1
- package/cjs/components/tooltip/style/index.js +2 -1
- package/cjs/composables/use-theme/index.d.ts +1 -1
- package/cjs/composables/use-theme/index.js +1 -1
- package/cjs/index.d.ts +10 -10
- package/cjs/theme-chalk/index.d.ts +0 -0
- package/es/components/button/src/button.vue_vue_type_script_setup_true_lang.mjs +47 -48
- package/es/components/button/src/types.d.ts +1 -1
- package/es/components/button/style/css.mjs +2 -2
- package/es/components/button/style/index.mjs +2 -2
- package/es/components/button-group/style/css.mjs +2 -0
- package/es/components/button-group/style/index.mjs +2 -0
- package/es/components/colors/style/css.mjs +2 -2
- package/es/components/colors/style/index.mjs +2 -2
- package/es/components/filter-panel/src/filter-panel.vue_vue_type_script_setup_true_lang.mjs +45 -46
- package/es/components/filter-panel/style/css.mjs +2 -2
- package/es/components/filter-panel/style/index.mjs +2 -2
- package/es/components/popconfirm/index.d.ts +5 -5
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +2 -2
- package/es/components/popconfirm/src/popconfirm.vue_vue_type_script_setup_true_lang.mjs +105 -108
- package/es/components/popconfirm/src/types.d.ts +2 -2
- package/es/components/popconfirm/style/css.mjs +2 -2
- package/es/components/popconfirm/style/index.mjs +2 -2
- package/es/components/popover/index.d.ts +5 -5
- package/es/components/popover/src/popover.vue.d.ts +2 -2
- package/es/components/popover/src/popover.vue_vue_type_script_setup_true_lang.mjs +1 -4
- package/es/components/popover/src/types.d.ts +1 -1
- package/es/components/popover/style/css.mjs +2 -2
- package/es/components/popover/style/index.mjs +2 -2
- package/es/components/svg-icon/style/css.mjs +2 -2
- package/es/components/svg-icon/style/index.mjs +2 -2
- package/es/components/tooltip/src/tooltip.vue_vue_type_script_setup_true_lang.mjs +2 -2
- package/es/components/tooltip/src/types.d.ts +1 -1
- package/es/components/tooltip/src/use-tooltip.mjs +24 -25
- package/es/components/tooltip/style/css.mjs +2 -2
- package/es/components/tooltip/style/index.mjs +2 -2
- package/es/composables/use-theme/index.d.ts +1 -1
- package/es/composables/use-theme/index.mjs +7 -8
- package/es/index.d.ts +10 -10
- package/es/theme-chalk/index.d.ts +0 -0
- package/package.json +1 -1
- package/cjs/node_modules/.pnpm/@floating-ui_core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -1
- package/cjs/node_modules/.pnpm/@floating-ui_dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -1
- package/cjs/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -1
- package/cjs/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -1
- package/cjs/node_modules/.pnpm/@floating-ui_vue@2.0.1_vue@3.5.26_typescript@5.9.3_/node_modules/@floating-ui/vue/dist/floating-ui.vue.js +0 -1
- package/cjs/node_modules/.pnpm/@vueuse_core@14.4.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.js +0 -1
- package/cjs/node_modules/.pnpm/@vueuse_shared@14.4.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/shared/dist/index.js +0 -1
- package/cjs/node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js +0 -1
- package/cjs/svg-icons/dist/es/_virtual/_rolldown_dynamic_import_helper.js +0 -1
- package/cjs/svg-icons/dist/es/create-icon.js +0 -1
- package/cjs/svg-icons/dist/es/icon-names.js +0 -1
- package/cjs/svg-icons/dist/es/index.js +0 -1
- package/cjs/svg-icons/dist/es/packages/components/svg-icon/index.js +0 -1
- package/cjs/svg-icons/dist/es/packages/components/svg-icon/src/svg-icon.js +0 -1
- package/cjs/svg-icons/dist/es/packages/components/svg-icon/src/svg-icon.vue_vue_type_script_setup_true_lang.js +0 -1
- package/cjs/svg-icons/dist/es/packages/composables/use-namespace/index.js +0 -1
- package/cjs/svg-icons/dist/es/packages/utils/util.js +0 -1
- package/cjs/svg-icons/dist/es/packages/utils/vue/index.js +0 -1
- package/cjs/svg-icons/dist/es/src/arrow-backward.js +0 -1
- package/cjs/svg-icons/dist/es/src/arrow-down.js +0 -1
- package/cjs/svg-icons/dist/es/src/arrow-downward.js +0 -1
- package/cjs/svg-icons/dist/es/src/arrow-forward.js +0 -1
- package/cjs/svg-icons/dist/es/src/arrow-left.js +0 -1
- package/cjs/svg-icons/dist/es/src/arrow-right.js +0 -1
- package/cjs/svg-icons/dist/es/src/arrow-up.js +0 -1
- package/cjs/svg-icons/dist/es/src/arrow-upward.js +0 -1
- package/cjs/svg-icons/dist/es/src/check-circle.js +0 -1
- package/cjs/svg-icons/dist/es/src/check.js +0 -1
- package/cjs/svg-icons/dist/es/src/close-short.js +0 -1
- package/cjs/svg-icons/dist/es/src/close.js +0 -1
- package/cjs/svg-icons/dist/es/src/copy-closure.js +0 -1
- package/cjs/svg-icons/dist/es/src/copy.js +0 -1
- package/cjs/svg-icons/dist/es/src/delete.js +0 -1
- package/cjs/svg-icons/dist/es/src/exclam.js +0 -1
- package/cjs/svg-icons/dist/es/src/help.js +0 -1
- package/cjs/svg-icons/dist/es/src/loading.js +0 -1
- package/cjs/svg-icons/dist/es/src/more-dot-circle-horizontal.js +0 -1
- package/cjs/svg-icons/dist/es/src/more-dot-circle-outline-horizontal.js +0 -1
- package/cjs/svg-icons/dist/es/src/more-dot-circle-outline-vertical.js +0 -1
- package/cjs/svg-icons/dist/es/src/more-dot-circle.js +0 -1
- package/cjs/svg-icons/dist/es/src/more-dot-square-horizontal.js +0 -1
- package/cjs/svg-icons/dist/es/src/more-dot-square.js +0 -1
- package/cjs/svg-icons/dist/es/src/more-line.js +0 -1
- package/cjs/svg-icons/dist/es/src/search-bold.js +0 -1
- package/cjs/svg-icons/dist/es/src/search.js +0 -1
- package/cjs/svg-icons/dist/es/src/star-fill.js +0 -1
- package/cjs/svg-icons/dist/es/src/star.js +0 -1
- package/dist/index.css +0 -1
- package/dist/index.umd.js +0 -58
- package/es/node_modules/.pnpm/@floating-ui_core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +0 -276
- package/es/node_modules/.pnpm/@floating-ui_dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +0 -322
- package/es/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +0 -99
- package/es/node_modules/.pnpm/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +0 -101
- package/es/node_modules/.pnpm/@floating-ui_vue@2.0.1_vue@3.5.26_typescript@5.9.3_/node_modules/@floating-ui/vue/dist/floating-ui.vue.mjs +0 -111
- package/es/node_modules/.pnpm/@vueuse_core@14.4.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.mjs +0 -478
- package/es/node_modules/.pnpm/@vueuse_shared@14.4.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/shared/dist/index.mjs +0 -136
- package/es/node_modules/.pnpm/process@0.11.10/node_modules/process/browser.mjs +0 -90
- package/es/svg-icons/dist/es/_virtual/_rolldown_dynamic_import_helper.mjs +0 -9
- package/es/svg-icons/dist/es/create-icon.mjs +0 -43
- package/es/svg-icons/dist/es/icon-names.mjs +0 -4
- package/es/svg-icons/dist/es/index.mjs +0 -70
- package/es/svg-icons/dist/es/packages/components/svg-icon/index.mjs +0 -6
- package/es/svg-icons/dist/es/packages/components/svg-icon/src/svg-icon.mjs +0 -5
- package/es/svg-icons/dist/es/packages/components/svg-icon/src/svg-icon.vue_vue_type_script_setup_true_lang.mjs +0 -49
- package/es/svg-icons/dist/es/packages/composables/use-namespace/index.mjs +0 -22
- package/es/svg-icons/dist/es/packages/utils/util.mjs +0 -6
- package/es/svg-icons/dist/es/packages/utils/vue/index.mjs +0 -17
- package/es/svg-icons/dist/es/src/arrow-backward.mjs +0 -8
- package/es/svg-icons/dist/es/src/arrow-down.mjs +0 -8
- package/es/svg-icons/dist/es/src/arrow-downward.mjs +0 -8
- package/es/svg-icons/dist/es/src/arrow-forward.mjs +0 -8
- package/es/svg-icons/dist/es/src/arrow-left.mjs +0 -8
- package/es/svg-icons/dist/es/src/arrow-right.mjs +0 -8
- package/es/svg-icons/dist/es/src/arrow-up.mjs +0 -8
- package/es/svg-icons/dist/es/src/arrow-upward.mjs +0 -8
- package/es/svg-icons/dist/es/src/check-circle.mjs +0 -8
- package/es/svg-icons/dist/es/src/check.mjs +0 -8
- package/es/svg-icons/dist/es/src/close-short.mjs +0 -8
- package/es/svg-icons/dist/es/src/close.mjs +0 -8
- package/es/svg-icons/dist/es/src/copy-closure.mjs +0 -8
- package/es/svg-icons/dist/es/src/copy.mjs +0 -8
- package/es/svg-icons/dist/es/src/delete.mjs +0 -8
- package/es/svg-icons/dist/es/src/exclam.mjs +0 -8
- package/es/svg-icons/dist/es/src/help.mjs +0 -8
- package/es/svg-icons/dist/es/src/loading.mjs +0 -8
- package/es/svg-icons/dist/es/src/more-dot-circle-horizontal.mjs +0 -8
- package/es/svg-icons/dist/es/src/more-dot-circle-outline-horizontal.mjs +0 -8
- package/es/svg-icons/dist/es/src/more-dot-circle-outline-vertical.mjs +0 -8
- package/es/svg-icons/dist/es/src/more-dot-circle.mjs +0 -8
- package/es/svg-icons/dist/es/src/more-dot-square-horizontal.mjs +0 -8
- package/es/svg-icons/dist/es/src/more-dot-square.mjs +0 -8
- package/es/svg-icons/dist/es/src/more-line.mjs +0 -8
- package/es/svg-icons/dist/es/src/search-bold.mjs +0 -8
- package/es/svg-icons/dist/es/src/search.mjs +0 -8
- package/es/svg-icons/dist/es/src/star-fill.mjs +0 -9
- package/es/svg-icons/dist/es/src/star.mjs +0 -8
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Loading as i } from "../../../svg-icons/dist/es/src/loading.mjs";
|
|
4
|
-
import { getAsyncIcon as a } from "../../../svg-icons/dist/es/index.mjs";
|
|
5
|
-
import { useNamespace as o } from "../../../composables/use-namespace/index.mjs";
|
|
1
|
+
import { _buttonGroupProps as e, buttonSizes as t, buttonTypes as n } from "./constants.mjs";
|
|
2
|
+
import { useNamespace as r } from "../../../composables/use-namespace/index.mjs";
|
|
6
3
|
import "../../../composables/index.mjs";
|
|
7
|
-
import { Fragment as
|
|
4
|
+
import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, defineComponent as l, inject as u, mergeProps as d, normalizeClass as f, openBlock as p, renderSlot as m, resolveDynamicComponent as h, unref as g, useTemplateRef as _ } from "vue";
|
|
5
|
+
import { computedAsync as v } from "@vueuse/core";
|
|
6
|
+
import { Loading as y, getAsyncIcon as b } from "@rappel-ui/svg-icons";
|
|
8
7
|
//#region packages/components/button/src/button.vue?vue&type=script&setup=true&lang.ts
|
|
9
8
|
var x = [
|
|
10
9
|
"type",
|
|
11
10
|
"disabled",
|
|
12
11
|
"autofocus",
|
|
13
12
|
"aria-disabled"
|
|
14
|
-
], S =
|
|
13
|
+
], S = l({
|
|
15
14
|
name: "ReButton",
|
|
16
15
|
__name: "button",
|
|
17
16
|
props: {
|
|
@@ -42,7 +41,7 @@ var x = [
|
|
|
42
41
|
type: Boolean,
|
|
43
42
|
default: () => void 0
|
|
44
43
|
},
|
|
45
|
-
loadingIcon: { default: () =>
|
|
44
|
+
loadingIcon: { default: () => y },
|
|
46
45
|
text: {
|
|
47
46
|
type: Boolean,
|
|
48
47
|
default: () => void 0
|
|
@@ -68,70 +67,70 @@ var x = [
|
|
|
68
67
|
nativeType: { default: "button" }
|
|
69
68
|
},
|
|
70
69
|
emits: ["click"],
|
|
71
|
-
setup(
|
|
72
|
-
let C = S, { n: w, nm: T, ns: E, is: D } =
|
|
70
|
+
setup(l, { expose: y, emit: S }) {
|
|
71
|
+
let C = S, { n: w, nm: T, ns: E, is: D } = r("button"), O = u(e, null), k = a(() => {
|
|
73
72
|
var e;
|
|
74
|
-
return
|
|
75
|
-
}), A =
|
|
73
|
+
return l.type || (O == null || (e = O.type) == null ? void 0 : e.value) || "";
|
|
74
|
+
}), A = a(() => {
|
|
76
75
|
var e;
|
|
77
|
-
return
|
|
78
|
-
}), j =
|
|
76
|
+
return l.size || (O == null || (e = O.size) == null ? void 0 : e.value) || "";
|
|
77
|
+
}), j = a(() => [
|
|
79
78
|
w(),
|
|
80
|
-
k.value &&
|
|
81
|
-
A.value &&
|
|
82
|
-
D("text",
|
|
83
|
-
D("text-padding",
|
|
84
|
-
D("text-bg",
|
|
85
|
-
D("link",
|
|
86
|
-
D("plain",
|
|
87
|
-
D("round",
|
|
88
|
-
D("circle",
|
|
89
|
-
D("dashed",
|
|
90
|
-
D("loading",
|
|
91
|
-
D("disabled",
|
|
92
|
-
]), M =
|
|
79
|
+
k.value && n.includes(k.value) ? T(k.value) : "",
|
|
80
|
+
A.value && t.includes(A.value) ? T(A.value) : "",
|
|
81
|
+
D("text", l.text),
|
|
82
|
+
D("text-padding", l.text && l.padding),
|
|
83
|
+
D("text-bg", l.text && l.bg),
|
|
84
|
+
D("link", l.link),
|
|
85
|
+
D("plain", l.plain),
|
|
86
|
+
D("round", l.round),
|
|
87
|
+
D("circle", l.circle),
|
|
88
|
+
D("dashed", l.dashed),
|
|
89
|
+
D("loading", l.loading),
|
|
90
|
+
D("disabled", l.disabled)
|
|
91
|
+
]), M = v(async () => await b(l.loadingIcon)), N = v(async () => await b(l.icon));
|
|
93
92
|
function P(e) {
|
|
94
|
-
if (
|
|
93
|
+
if (l.disabled || l.loading) {
|
|
95
94
|
e.stopPropagation();
|
|
96
95
|
return;
|
|
97
96
|
}
|
|
98
97
|
C("click", e);
|
|
99
98
|
}
|
|
100
|
-
let F =
|
|
101
|
-
return
|
|
99
|
+
let F = _("ref");
|
|
100
|
+
return y({ ref: F }), (e, t) => {
|
|
102
101
|
var n;
|
|
103
|
-
return
|
|
102
|
+
return p(), c("button", d(e.$attrs, {
|
|
104
103
|
ref_key: "ref",
|
|
105
104
|
ref: F,
|
|
106
105
|
class: j.value,
|
|
107
|
-
type:
|
|
108
|
-
disabled:
|
|
109
|
-
autofocus:
|
|
110
|
-
"aria-disabled":
|
|
106
|
+
type: l.nativeType,
|
|
107
|
+
disabled: l.disabled || l.loading,
|
|
108
|
+
autofocus: l.autofocus,
|
|
109
|
+
"aria-disabled": l.disabled,
|
|
111
110
|
onClick: P
|
|
112
111
|
}), [
|
|
113
|
-
|
|
112
|
+
m(e.$slots, "loading", {}, () => [l.loading ? (p(), c(i, { key: 0 }, [typeof g(M) == "string" ? (p(), c("i", {
|
|
114
113
|
key: 0,
|
|
115
|
-
class:
|
|
114
|
+
class: f([g(E)("loading"), g(M)]),
|
|
116
115
|
"aria-hidden": "true"
|
|
117
|
-
}, null, 2)) : (
|
|
116
|
+
}, null, 2)) : (p(), o(h(g(M)), {
|
|
118
117
|
key: 1,
|
|
119
|
-
class:
|
|
118
|
+
class: f([g(E)("loading")]),
|
|
120
119
|
"aria-hidden": "true"
|
|
121
|
-
}, null, 8, ["class"]))], 64)) :
|
|
122
|
-
|
|
120
|
+
}, null, 8, ["class"]))], 64)) : s("", !0)]),
|
|
121
|
+
m(e.$slots, "icon", {}, () => [l.icon ? (p(), c(i, { key: 0 }, [typeof g(N) == "string" ? (p(), c("i", {
|
|
123
122
|
key: 0,
|
|
124
|
-
class:
|
|
123
|
+
class: f([g(E)("icon"), g(N)]),
|
|
125
124
|
"aria-hidden": "true"
|
|
126
|
-
}, null, 2)) : (
|
|
125
|
+
}, null, 2)) : (p(), o(h(g(N)), {
|
|
127
126
|
key: 1,
|
|
128
|
-
class:
|
|
127
|
+
class: f([g(E)("icon")]),
|
|
129
128
|
"aria-hidden": "true"
|
|
130
|
-
}, null, 8, ["class"]))], 64)) :
|
|
131
|
-
(n = e.$slots) != null && n.default ? (
|
|
129
|
+
}, null, 8, ["class"]))], 64)) : s("", !0)]),
|
|
130
|
+
(n = e.$slots) != null && n.default ? (p(), c("span", {
|
|
132
131
|
key: 0,
|
|
133
|
-
class:
|
|
134
|
-
}, [
|
|
132
|
+
class: f([g(E)("content")])
|
|
133
|
+
}, [m(e.$slots, "default")], 2)) : s("", !0)
|
|
135
134
|
], 16, x);
|
|
136
135
|
};
|
|
137
136
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import '../../../../theme-chalk/base.css'
|
|
2
|
+
import '../../../../theme-chalk/re-button.css'
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import '../../../../theme-chalk/src/base.scss'
|
|
2
|
+
import '../../../../theme-chalk/src/button.scss'
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import '../../../../theme-chalk/base.css'
|
|
2
|
+
import '../../../../theme-chalk/re-colors.css'
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import '../../../../theme-chalk/src/base.scss'
|
|
2
|
+
import '../../../../theme-chalk/src/colors.scss'
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ArrowDownward as n } from "../../../svg-icons/dist/es/src/arrow-downward.mjs";
|
|
3
|
-
import { ArrowUpward as r } from "../../../svg-icons/dist/es/src/arrow-upward.mjs";
|
|
4
|
-
import { useNamespace as i } from "../../../composables/use-namespace/index.mjs";
|
|
1
|
+
import { useNamespace as e } from "../../../composables/use-namespace/index.mjs";
|
|
5
2
|
import "../../../composables/index.mjs";
|
|
6
|
-
import { ReButton as
|
|
7
|
-
import { computed as
|
|
3
|
+
import { ReButton as t } from "../../button/index.mjs";
|
|
4
|
+
import { computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, effectScope as u, mergeModels as d, normalizeClass as f, normalizeStyle as p, onMounted as m, onUnmounted as h, openBlock as g, renderSlot as _, unref as v, useModel as y, useTemplateRef as b, watch as x, watchEffect as S, withCtx as C, withModifiers as w } from "vue";
|
|
5
|
+
import { useElementSize as T, useMutationObserver as E } from "@vueuse/core";
|
|
6
|
+
import { ArrowDownward as D, ArrowUpward as O } from "@rappel-ui/svg-icons";
|
|
8
7
|
//#region packages/components/filter-panel/src/filter-panel.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
-
var k =
|
|
8
|
+
var k = l({
|
|
10
9
|
name: "ReFilterPanel",
|
|
11
10
|
__name: "filter-panel",
|
|
12
|
-
props:
|
|
11
|
+
props: d({
|
|
13
12
|
selector: { default: "> *" },
|
|
14
13
|
maxHeight: { default: 0 },
|
|
15
14
|
itemMinw: { default: 240 },
|
|
@@ -30,46 +29,46 @@ var k = p({
|
|
|
30
29
|
},
|
|
31
30
|
isExpandModifiers: {}
|
|
32
31
|
}),
|
|
33
|
-
emits:
|
|
34
|
-
setup(
|
|
35
|
-
let { n: A, ns: j } =
|
|
32
|
+
emits: d(["reset", "search"], ["update:isExpand"]),
|
|
33
|
+
setup(l, { expose: d, emit: k }) {
|
|
34
|
+
let { n: A, ns: j } = e("filter-panel"), M = b("main"), { height: N } = T(M), P = n(() => l.maxHeight || N.value), F = k, I = b("wrapper"), L = b("inner"), R = y(l, "isExpand"), z = n(() => V.value > P.value), B = () => {
|
|
36
35
|
R.value = !R.value;
|
|
37
|
-
}, { height: V, width: H } =
|
|
36
|
+
}, { height: V, width: H } = T(L, {
|
|
38
37
|
width: 0,
|
|
39
38
|
height: P.value
|
|
40
|
-
}), { width: U } =
|
|
39
|
+
}), { width: U } = T(I, {
|
|
41
40
|
width: 0,
|
|
42
41
|
height: P.value
|
|
43
42
|
}), W = () => {
|
|
44
43
|
if (!L.value) return;
|
|
45
|
-
let e = L.value.querySelectorAll(`.${j("inner")} ${
|
|
44
|
+
let e = L.value.querySelectorAll(`.${j("inner")} ${l.selector}:not(${l.exclude})`), t = Math.floor(H.value / l.itemMinw);
|
|
46
45
|
e.forEach((e) => {
|
|
47
46
|
e.style.width = `${100 / t}%`;
|
|
48
47
|
});
|
|
49
|
-
}, G =
|
|
48
|
+
}, G = u();
|
|
50
49
|
G.run(() => {
|
|
51
|
-
|
|
50
|
+
S(() => {
|
|
52
51
|
H.value && U.value && W();
|
|
53
|
-
}),
|
|
52
|
+
}), x(() => V.value, (e) => {
|
|
54
53
|
e > P.value && (R.value = !1);
|
|
55
54
|
});
|
|
56
55
|
});
|
|
57
56
|
let K = () => {
|
|
58
|
-
let { stop: e } =
|
|
57
|
+
let { stop: e } = E(L, () => {
|
|
59
58
|
W();
|
|
60
59
|
}, Object.assign({
|
|
61
60
|
childList: !0,
|
|
62
61
|
subtree: !0,
|
|
63
62
|
attributes: !0,
|
|
64
63
|
characterData: !0
|
|
65
|
-
},
|
|
64
|
+
}, l.observerOptions || {}));
|
|
66
65
|
return { stop: e };
|
|
67
66
|
}, q;
|
|
68
|
-
return
|
|
67
|
+
return l.enableObserver && (q = K().stop), h(() => {
|
|
69
68
|
G.stop(), q == null || q();
|
|
70
|
-
}),
|
|
69
|
+
}), m(() => {
|
|
71
70
|
W();
|
|
72
|
-
}),
|
|
71
|
+
}), d({
|
|
73
72
|
toggle: B,
|
|
74
73
|
update: W,
|
|
75
74
|
isExpand: R,
|
|
@@ -77,52 +76,52 @@ var k = p({
|
|
|
77
76
|
innerW: H,
|
|
78
77
|
wrapperW: U,
|
|
79
78
|
maxH: P
|
|
80
|
-
}), (e,
|
|
79
|
+
}), (e, n) => (g(), a("div", {
|
|
81
80
|
ref_key: "wrapper",
|
|
82
81
|
ref: I,
|
|
83
|
-
class:
|
|
84
|
-
style:
|
|
85
|
-
}, [
|
|
82
|
+
class: f([v(A)()]),
|
|
83
|
+
style: p({ "max-height": `${R.value ? v(V) : P.value}px` })
|
|
84
|
+
}, [o("div", {
|
|
86
85
|
ref_key: "inner",
|
|
87
86
|
ref: L,
|
|
88
|
-
class:
|
|
89
|
-
}, [
|
|
87
|
+
class: f([v(j)("inner")])
|
|
88
|
+
}, [_(e.$slots, "default")], 2), o("div", { class: f([v(j)("operator")]) }, [o("div", {
|
|
90
89
|
ref_key: "main",
|
|
91
90
|
ref: M,
|
|
92
|
-
class:
|
|
93
|
-
}, [
|
|
94
|
-
|
|
91
|
+
class: f([v(j)("main")])
|
|
92
|
+
}, [_(e.$slots, "main", {}, () => [
|
|
93
|
+
_(e.$slots, "expand", {
|
|
95
94
|
showExpand: z.value,
|
|
96
95
|
isExpand: R.value
|
|
97
|
-
}, () => [z.value ? (
|
|
96
|
+
}, () => [z.value ? (g(), r(v(t), {
|
|
98
97
|
key: 0,
|
|
99
98
|
type: "primary",
|
|
100
99
|
title: R.value ? "收起" : "展开",
|
|
101
100
|
text: "",
|
|
102
|
-
onClick:
|
|
101
|
+
onClick: w(B, ["stop"])
|
|
103
102
|
}, {
|
|
104
|
-
default:
|
|
103
|
+
default: C(() => [_(e.$slots, "expand-icon", {}, () => [R.value ? (g(), r(v(O), { key: 0 })) : (g(), r(v(D), { key: 1 }))])]),
|
|
105
104
|
_: 3
|
|
106
|
-
}, 8, ["title"])) :
|
|
107
|
-
|
|
108
|
-
disabled:
|
|
109
|
-
onClick:
|
|
105
|
+
}, 8, ["title"])) : i("", !0)]),
|
|
106
|
+
_(e.$slots, "reset", {}, () => [c(v(t), {
|
|
107
|
+
disabled: l.loading,
|
|
108
|
+
onClick: n[0] || (n[0] = w((e) => F("reset"), ["stop"]))
|
|
110
109
|
}, {
|
|
111
|
-
default:
|
|
110
|
+
default: C(() => [...n[2] || (n[2] = [s("重置", -1)])]),
|
|
112
111
|
_: 1
|
|
113
112
|
}, 8, ["disabled"])]),
|
|
114
|
-
|
|
113
|
+
_(e.$slots, "search", {}, () => [c(v(t), {
|
|
115
114
|
type: "primary",
|
|
116
|
-
disabled:
|
|
117
|
-
onClick:
|
|
115
|
+
disabled: l.loading,
|
|
116
|
+
onClick: n[1] || (n[1] = w((e) => F("search"), ["stop"]))
|
|
118
117
|
}, {
|
|
119
|
-
default:
|
|
118
|
+
default: C(() => [...n[3] || (n[3] = [s(" 查询 ", -1)])]),
|
|
120
119
|
_: 1
|
|
121
120
|
}, 8, ["disabled"])])
|
|
122
|
-
])], 2), e.$slots.extra ? (
|
|
121
|
+
])], 2), e.$slots.extra ? (g(), a("div", {
|
|
123
122
|
key: 0,
|
|
124
|
-
class:
|
|
125
|
-
}, [
|
|
123
|
+
class: f([v(j)("extra")])
|
|
124
|
+
}, [_(e.$slots, "extra")], 2)) : i("", !0)], 2)], 6));
|
|
126
125
|
}
|
|
127
126
|
});
|
|
128
127
|
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import '../../../../theme-chalk/base.css'
|
|
2
|
+
import '../../../../theme-chalk/re-filter-panel.css'
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import '../../../../theme-chalk/src/base.scss'
|
|
2
|
+
import '../../../../theme-chalk/src/filter-panel.scss'
|
|
@@ -18,7 +18,7 @@ export declare const RePopconfirm: {
|
|
|
18
18
|
onLeave?: ((el: HTMLElement, done: () => void) => any) | undefined;
|
|
19
19
|
onLeaveCancelled?: ((el: HTMLElement) => any) | undefined;
|
|
20
20
|
onAfterLeave?: ((el: HTMLElement) => any) | undefined;
|
|
21
|
-
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
21
|
+
"onUpdate:visible"?: ((value: boolean | undefined) => any) | undefined;
|
|
22
22
|
onConfirm?: ((e: MouseEvent) => any) | undefined;
|
|
23
23
|
}>, {
|
|
24
24
|
tooltipRef: Readonly< ShallowRef<any, any>>;
|
|
@@ -38,7 +38,7 @@ export declare const RePopconfirm: {
|
|
|
38
38
|
leave: (el: HTMLElement, done: () => void) => any;
|
|
39
39
|
leaveCancelled: (el: HTMLElement) => any;
|
|
40
40
|
afterLeave: (el: HTMLElement) => any;
|
|
41
|
-
"update:visible": (value: boolean) => any;
|
|
41
|
+
"update:visible": (value: boolean | undefined) => any;
|
|
42
42
|
confirm: (e: MouseEvent) => any;
|
|
43
43
|
}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
44
44
|
P: {};
|
|
@@ -63,7 +63,7 @@ export declare const RePopconfirm: {
|
|
|
63
63
|
onLeave?: ((el: HTMLElement, done: () => void) => any) | undefined;
|
|
64
64
|
onLeaveCancelled?: ((el: HTMLElement) => any) | undefined;
|
|
65
65
|
onAfterLeave?: ((el: HTMLElement) => any) | undefined;
|
|
66
|
-
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
66
|
+
"onUpdate:visible"?: ((value: boolean | undefined) => any) | undefined;
|
|
67
67
|
onConfirm?: ((e: MouseEvent) => any) | undefined;
|
|
68
68
|
}>, {
|
|
69
69
|
tooltipRef: Readonly< ShallowRef<any, any>>;
|
|
@@ -89,7 +89,7 @@ export declare const RePopconfirm: {
|
|
|
89
89
|
onLeave?: ((el: HTMLElement, done: () => void) => any) | undefined;
|
|
90
90
|
onLeaveCancelled?: ((el: HTMLElement) => any) | undefined;
|
|
91
91
|
onAfterLeave?: ((el: HTMLElement) => any) | undefined;
|
|
92
|
-
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
92
|
+
"onUpdate:visible"?: ((value: boolean | undefined) => any) | undefined;
|
|
93
93
|
onConfirm?: ((e: MouseEvent) => any) | undefined;
|
|
94
94
|
}>, {
|
|
95
95
|
tooltipRef: Readonly< ShallowRef<any, any>>;
|
|
@@ -109,7 +109,7 @@ export declare const RePopconfirm: {
|
|
|
109
109
|
leave: (el: HTMLElement, done: () => void) => any;
|
|
110
110
|
leaveCancelled: (el: HTMLElement) => any;
|
|
111
111
|
afterLeave: (el: HTMLElement) => any;
|
|
112
|
-
"update:visible": (value: boolean) => any;
|
|
112
|
+
"update:visible": (value: boolean | undefined) => any;
|
|
113
113
|
confirm: (e: MouseEvent) => any;
|
|
114
114
|
}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
115
115
|
$slots: {
|
|
@@ -72,7 +72,7 @@ declare const __VLS_base: DefineComponent<__VLS_PublicProps, {
|
|
|
72
72
|
leave: (el: HTMLElement, done: () => void) => any;
|
|
73
73
|
leaveCancelled: (el: HTMLElement) => any;
|
|
74
74
|
afterLeave: (el: HTMLElement) => any;
|
|
75
|
-
"update:visible": (value: boolean) => any;
|
|
75
|
+
"update:visible": (value: boolean | undefined) => any;
|
|
76
76
|
confirm: (e: MouseEvent) => any;
|
|
77
77
|
}, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
78
78
|
onCancel?: ((e: MouseEvent) => any) | undefined;
|
|
@@ -88,7 +88,7 @@ declare const __VLS_base: DefineComponent<__VLS_PublicProps, {
|
|
|
88
88
|
onLeave?: ((el: HTMLElement, done: () => void) => any) | undefined;
|
|
89
89
|
onLeaveCancelled?: ((el: HTMLElement) => any) | undefined;
|
|
90
90
|
onAfterLeave?: ((el: HTMLElement) => any) | undefined;
|
|
91
|
-
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
91
|
+
"onUpdate:visible"?: ((value: boolean | undefined) => any) | undefined;
|
|
92
92
|
onConfirm?: ((e: MouseEvent) => any) | undefined;
|
|
93
93
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
94
94
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|