@bridge-ui/vue 0.0.1-beta.3 → 0.0.1-beta.4
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/Components/Button/Button.vue_vue_type_script_setup_true_lang.js +2 -4
- package/dist/Components/Button/composables/useButton.js +52 -44
- package/dist/Components/Divider/Divider.js +5 -0
- package/dist/Components/Divider/Divider.vue.d.ts +4 -0
- package/dist/Components/Divider/Divider.vue_vue_type_script_setup_true_lang.js +21 -0
- package/dist/Components/Divider/composables/useDivider.d.ts +13 -0
- package/dist/Components/Divider/composables/useDivider.js +42 -0
- package/dist/Components/Divider/divider.types.d.ts +31 -0
- package/dist/Components/Divider/index.d.ts +3 -0
- package/dist/Components/Divider/index.js +3 -0
- package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +21 -21
- package/dist/Components/Listbox/composables/useListbox.d.ts +0 -1
- package/dist/Components/Listbox/composables/useListbox.js +6 -7
- package/dist/Components/Skeleton/Skeleton.js +5 -0
- package/dist/Components/Skeleton/Skeleton.vue.d.ts +4 -0
- package/dist/Components/Skeleton/Skeleton.vue_vue_type_script_setup_true_lang.js +17 -0
- package/dist/Components/Skeleton/composables/useSkeleton.d.ts +9 -0
- package/dist/Components/Skeleton/composables/useSkeleton.js +33 -0
- package/dist/Components/Skeleton/index.d.ts +3 -0
- package/dist/Components/Skeleton/index.js +3 -0
- package/dist/Components/Skeleton/skeleton.types.d.ts +24 -0
- package/dist/augments.d.ts +10 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +41 -37
- package/package.json +2 -2
|
@@ -34,10 +34,8 @@ var b = /* @__PURE__ */ u({
|
|
|
34
34
|
variant: "solid",
|
|
35
35
|
density: "default"
|
|
36
36
|
});
|
|
37
|
-
return (i, u) => (p(), o(m(g(S)), d({
|
|
37
|
+
return (i, u) => (p(), o(m(g(S)), d({ href: g(D) }, g(E), {
|
|
38
38
|
type: g(O),
|
|
39
|
-
href: g(D)
|
|
40
|
-
}, g(E), {
|
|
41
39
|
disabled: g(M),
|
|
42
40
|
"aria-busy": g(j),
|
|
43
41
|
"aria-disabled": g(I)
|
|
@@ -62,8 +60,8 @@ var b = /* @__PURE__ */ u({
|
|
|
62
60
|
], 64))]),
|
|
63
61
|
_: 1
|
|
64
62
|
}, 16, [
|
|
65
|
-
"type",
|
|
66
63
|
"href",
|
|
64
|
+
"type",
|
|
67
65
|
"disabled",
|
|
68
66
|
"aria-busy",
|
|
69
67
|
"aria-disabled"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
|
|
2
2
|
import { computed as r, useAttrs as i } from "vue";
|
|
3
|
-
import { get as a,
|
|
4
|
-
import { cn as
|
|
5
|
-
import { densityProps as
|
|
3
|
+
import { get as a, includes as o, isNil as s } from "es-toolkit/compat";
|
|
4
|
+
import { cn as c, mergeBridgeUILayeredClasses as l, splitComponentProps as u } from "@bridge-ui/core";
|
|
5
|
+
import { densityProps as d, roundedProps as f, variantProps as p } from "@bridge-ui/core/Components/Button";
|
|
6
6
|
//#region src/Components/Button/composables/useButton.ts
|
|
7
|
-
var
|
|
7
|
+
var m = [
|
|
8
8
|
"as",
|
|
9
9
|
"full",
|
|
10
10
|
"href",
|
|
@@ -22,70 +22,78 @@ var p = [
|
|
|
22
22
|
"startIcon",
|
|
23
23
|
"customProps"
|
|
24
24
|
];
|
|
25
|
-
function
|
|
26
|
-
let
|
|
27
|
-
bridgeKeys:
|
|
25
|
+
function h(h, g) {
|
|
26
|
+
let _ = i(), v = r(() => u({
|
|
27
|
+
bridgeKeys: m,
|
|
28
28
|
props: {
|
|
29
|
-
...
|
|
30
|
-
...
|
|
29
|
+
..._,
|
|
30
|
+
...h
|
|
31
31
|
}
|
|
32
|
-
})), { merged:
|
|
33
|
-
libDefaults:
|
|
32
|
+
})), { merged: y, entry: b } = t({
|
|
33
|
+
libDefaults: g,
|
|
34
34
|
componentName: "Button",
|
|
35
|
-
props: () =>
|
|
36
|
-
}),
|
|
37
|
-
entry:
|
|
38
|
-
props: () =>
|
|
39
|
-
}),
|
|
40
|
-
if (!(!
|
|
41
|
-
}), M = r(() =>
|
|
35
|
+
props: () => v.value.componentProps
|
|
36
|
+
}), x = r(() => y.value.customProps), S = n({
|
|
37
|
+
entry: b,
|
|
38
|
+
props: () => v.value.componentProps
|
|
39
|
+
}), C = r(() => y.value.as ?? "button"), w = r(() => C.value === "a"), T = r(() => C.value === "button"), E = r(() => y.value.density === "mini"), D = r(() => y.value.disabled || y.value.loading), O = r(() => T.value ? D.value : void 0), k = r(() => y.value.loading ? !0 : void 0), A = r(() => D.value && !T.value ? !0 : void 0), j = r(() => {
|
|
40
|
+
if (!(!w.value || D.value || !y.value.href)) return y.value.href;
|
|
41
|
+
}), M = r(() => {
|
|
42
|
+
if (!T.value) return;
|
|
43
|
+
let e = a(v.value.inheritedAttrs, "type");
|
|
44
|
+
return o([
|
|
45
|
+
"submit",
|
|
46
|
+
"reset",
|
|
47
|
+
"button"
|
|
48
|
+
], e) ? e : "button";
|
|
49
|
+
}), N = r(() => a(l(d, b.value?.customProps?.density), [y.value.density, y.value.size])), P = r(() => s(v.value.componentProps.variant) ? E.value ? "flat" : y.value.variant : v.value.componentProps.variant), F = r(() => a(l(p, b.value?.customProps?.variant), [P.value, y.value.color])), I = r(() => a(l(f, b.value?.customProps?.rounded), y.value.rounded));
|
|
42
50
|
return {
|
|
43
|
-
tag:
|
|
44
|
-
merged:
|
|
45
|
-
isMini:
|
|
46
|
-
iconBind: r(() => e(
|
|
51
|
+
tag: C,
|
|
52
|
+
merged: y,
|
|
53
|
+
isMini: E,
|
|
54
|
+
iconBind: r(() => e(x.value?.icon, {}, c({
|
|
47
55
|
"shrink-0": !0,
|
|
48
|
-
[
|
|
56
|
+
[S.value.icon ?? ""]: !0
|
|
49
57
|
}))),
|
|
50
|
-
rootBind: r(() => e(
|
|
58
|
+
rootBind: r(() => e(x.value?.root, v.value.inheritedAttrs, c({
|
|
51
59
|
"inline-flex items-center justify-center": !0,
|
|
52
60
|
"cursor-pointer outline-none outline-hidden": !0,
|
|
53
|
-
"shrink-0":
|
|
54
|
-
[
|
|
55
|
-
[
|
|
56
|
-
"w-full": !
|
|
57
|
-
"w-fit": !
|
|
58
|
-
"group hover:shadow-xs": !
|
|
59
|
-
[a(
|
|
60
|
-
[a(
|
|
61
|
-
[a(
|
|
61
|
+
"shrink-0": E.value,
|
|
62
|
+
[N.value ?? ""]: !0,
|
|
63
|
+
[I.value ?? ""]: !0,
|
|
64
|
+
"w-full": !E.value && y.value.full,
|
|
65
|
+
"w-fit": !E.value && !y.value.full,
|
|
66
|
+
"group hover:shadow-xs": !E.value,
|
|
67
|
+
[a(F.value, "base") ?? ""]: !0,
|
|
68
|
+
[a(F.value, "hover") ?? ""]: !0,
|
|
69
|
+
[a(F.value, "focus") ?? ""]: !0,
|
|
62
70
|
"transition-all ease-in-out duration-200": !0,
|
|
63
71
|
"focus:ring-2": !0,
|
|
64
72
|
"focus:ring-offset-background-white dark:focus:ring-offset-background-dark": !0,
|
|
65
73
|
"disabled:opacity-80 disabled:cursor-not-allowed": !0,
|
|
66
74
|
"aria-disabled:opacity-80 aria-disabled:cursor-not-allowed aria-disabled:pointer-events-none": !0,
|
|
67
|
-
[
|
|
75
|
+
[S.value.root ?? ""]: !0
|
|
68
76
|
}))),
|
|
69
77
|
rootHref: j,
|
|
70
|
-
rootType:
|
|
71
|
-
endIconBind: r(() => e(
|
|
78
|
+
rootType: M,
|
|
79
|
+
endIconBind: r(() => e(x.value?.endIcon, {}, c({
|
|
72
80
|
"shrink-0": !0,
|
|
73
|
-
[
|
|
81
|
+
[S.value.endIcon ?? ""]: !0
|
|
74
82
|
}))),
|
|
75
|
-
endSlotBind: r(() => e(
|
|
83
|
+
endSlotBind: r(() => e(x.value?.end, {}, "inline-flex shrink-0 items-center")),
|
|
76
84
|
rootAriaBusy: k,
|
|
77
85
|
rootDisabled: O,
|
|
78
|
-
startIconBind: r(() => e(
|
|
86
|
+
startIconBind: r(() => e(x.value?.startIcon, {}, c({
|
|
79
87
|
"shrink-0": !0,
|
|
80
|
-
[
|
|
88
|
+
[S.value.startIcon ?? ""]: !0
|
|
81
89
|
}))),
|
|
82
|
-
startSlotBind: r(() => e(
|
|
83
|
-
loadingIconBind: r(() => e(
|
|
90
|
+
startSlotBind: r(() => e(x.value?.start, {}, "inline-flex shrink-0 items-center")),
|
|
91
|
+
loadingIconBind: r(() => e(x.value?.loading, {}, c({
|
|
84
92
|
"shrink-0 animate-spin": !0,
|
|
85
|
-
[
|
|
93
|
+
[S.value.loading ?? ""]: !0
|
|
86
94
|
}))),
|
|
87
95
|
rootAriaDisabled: A
|
|
88
96
|
};
|
|
89
97
|
}
|
|
90
98
|
//#endregion
|
|
91
|
-
export {
|
|
99
|
+
export { h as useButton };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DividerOwnProps } from './divider.types';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<DividerOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<DividerOwnProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useDivider as e } from "./composables/useDivider.js";
|
|
2
|
+
import { createElementBlock as t, defineComponent as n, guardReactiveProps as r, normalizeProps as i, openBlock as a, unref as o } from "vue";
|
|
3
|
+
//#region src/Components/Divider/Divider.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var s = /* @__PURE__ */ n({
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "Divider",
|
|
7
|
+
props: {
|
|
8
|
+
classes: {},
|
|
9
|
+
color: {},
|
|
10
|
+
orientation: {}
|
|
11
|
+
},
|
|
12
|
+
setup(n) {
|
|
13
|
+
let { rootBind: s } = e(n, {
|
|
14
|
+
color: "dark",
|
|
15
|
+
orientation: "horizontal"
|
|
16
|
+
});
|
|
17
|
+
return (e, n) => (a(), t("hr", i(r(o(s))), null, 16));
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
//#endregion
|
|
21
|
+
export { s as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LibDefaultsShape, MergeLibDefaults } from '@bridge-ui/core';
|
|
2
|
+
import { DividerOwnProps, DividerProps } from '../divider.types';
|
|
3
|
+
type DividerLibDefaults = LibDefaultsShape<DividerOwnProps, "color" | "orientation">;
|
|
4
|
+
type DividerMerged = MergeLibDefaults<DividerOwnProps, DividerLibDefaults>;
|
|
5
|
+
export declare function useDivider(props: DividerOwnProps, libDefaults: DividerLibDefaults): {
|
|
6
|
+
merged: import('vue').ComputedRef<DividerMerged>;
|
|
7
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<{
|
|
8
|
+
role: string;
|
|
9
|
+
"aria-orientation": NonNullable<keyof import('@bridge-ui/core').DividerOrientation | undefined>;
|
|
10
|
+
class: string;
|
|
11
|
+
}, "class", {}, Omit<DividerProps, "color" | "orientation" | "classes">>>;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
|
|
2
|
+
import { computed as r, useAttrs as i } from "vue";
|
|
3
|
+
import { get as a } from "es-toolkit/compat";
|
|
4
|
+
import { cn as o, mergeBridgeUILayeredClasses as s, splitComponentProps as c } from "@bridge-ui/core";
|
|
5
|
+
import { colorProps as l, orientationProps as u } from "@bridge-ui/core/Components/Divider";
|
|
6
|
+
//#region src/Components/Divider/composables/useDivider.ts
|
|
7
|
+
var d = [
|
|
8
|
+
"color",
|
|
9
|
+
"classes",
|
|
10
|
+
"orientation"
|
|
11
|
+
];
|
|
12
|
+
function f(f, p) {
|
|
13
|
+
let m = i(), h = r(() => c({
|
|
14
|
+
props: {
|
|
15
|
+
...m,
|
|
16
|
+
...f
|
|
17
|
+
},
|
|
18
|
+
bridgeKeys: d
|
|
19
|
+
})), { merged: g, entry: _ } = t({
|
|
20
|
+
libDefaults: p,
|
|
21
|
+
componentName: "Divider",
|
|
22
|
+
props: () => h.value.componentProps
|
|
23
|
+
}), v = n({
|
|
24
|
+
entry: _,
|
|
25
|
+
props: () => h.value.componentProps
|
|
26
|
+
}), y = r(() => a(s(l, _.value?.customProps?.color), g.value.color)), b = r(() => a(s(u, _.value?.customProps?.orientation), g.value.orientation));
|
|
27
|
+
return {
|
|
28
|
+
merged: g,
|
|
29
|
+
rootBind: r(() => e({}, h.value.inheritedAttrs, {
|
|
30
|
+
role: "separator",
|
|
31
|
+
"aria-orientation": g.value.orientation,
|
|
32
|
+
class: o({
|
|
33
|
+
"m-0 shrink-0 border-0 border-solid": !0,
|
|
34
|
+
[y.value ?? ""]: !0,
|
|
35
|
+
[b.value ?? ""]: !0,
|
|
36
|
+
[v.value.root ?? ""]: !0
|
|
37
|
+
})
|
|
38
|
+
}))
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { f as useDivider };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
import { DividerColor, DividerOrientation, MergeHtmlProps, MergeProps } from '@bridge-ui/core';
|
|
3
|
+
export interface DividerColorOverrides {}
|
|
4
|
+
export interface DividerOrientationOverrides {}
|
|
5
|
+
export interface DividerClasses {
|
|
6
|
+
/**
|
|
7
|
+
* The classes to apply to the root.
|
|
8
|
+
*/
|
|
9
|
+
root?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface DividerOwnProps {
|
|
12
|
+
/**
|
|
13
|
+
* The classes to apply to the divider.
|
|
14
|
+
*
|
|
15
|
+
* @default undefined
|
|
16
|
+
*/
|
|
17
|
+
classes?: DividerClasses;
|
|
18
|
+
/**
|
|
19
|
+
* The color of the divider.
|
|
20
|
+
*
|
|
21
|
+
* @default "dark"
|
|
22
|
+
*/
|
|
23
|
+
color?: MergeProps<DividerColor, DividerColorOverrides>;
|
|
24
|
+
/**
|
|
25
|
+
* The orientation of the divider.
|
|
26
|
+
*
|
|
27
|
+
* @default "horizontal"
|
|
28
|
+
*/
|
|
29
|
+
orientation?: MergeProps<DividerOrientation, DividerOrientationOverrides>;
|
|
30
|
+
}
|
|
31
|
+
export type DividerProps = MergeHtmlProps<DividerOwnProps, HTMLAttributes>;
|
|
@@ -59,32 +59,32 @@ var M = { key: 1 }, N = /* @__PURE__ */ m({
|
|
|
59
59
|
O(F, (e) => {
|
|
60
60
|
P("show-change", e);
|
|
61
61
|
});
|
|
62
|
-
let I = m, {
|
|
62
|
+
let I = m, { merged: L, checkClass: R, scrollBind: z, messageBind: B, loadingBind: V, sizeClasses: H, mergedClasses: U, loadingTrackBind: W, optionSelectedClass: G, optionHighlightedClass: K } = r(I, {
|
|
63
63
|
size: "md",
|
|
64
64
|
color: "primary"
|
|
65
|
-
}), q = s(() =>
|
|
66
|
-
function
|
|
65
|
+
}), q = s(() => !I.loading && I.options.length === 0 && I.hideEmptyMessage !== !0), J = s(() => A(R.value, U.value.check));
|
|
66
|
+
function Y(e) {
|
|
67
67
|
return I.isSelected?.(e) ?? !1;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function X(e) {
|
|
70
70
|
return I.highlightedIndex === e;
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function Z(e) {
|
|
73
73
|
e.preventDefault();
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function Q(e, t) {
|
|
76
76
|
let n = {
|
|
77
77
|
tabindex: -1,
|
|
78
|
-
onMousedown:
|
|
78
|
+
onMousedown: Z,
|
|
79
79
|
class: A(H.value?.option)
|
|
80
80
|
};
|
|
81
|
-
return
|
|
81
|
+
return Y(e.value) ? n.class = A(n.class, G.value, U.value.optionSelected) : X(t) && (n.class = A(n.class, K.value, U.value.optionHighlighted)), {
|
|
82
82
|
interactive: n,
|
|
83
83
|
primary: { class: H.value?.primary },
|
|
84
84
|
secondary: { class: H.value?.secondary }
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function $(e) {
|
|
88
88
|
e.disabled || P("select", e);
|
|
89
89
|
}
|
|
90
90
|
return (r, s) => (b(), c(T(a), {
|
|
@@ -93,12 +93,12 @@ var M = { key: 1 }, N = /* @__PURE__ */ m({
|
|
|
93
93
|
"anchor-el": m.anchorEl,
|
|
94
94
|
placement: m.placement,
|
|
95
95
|
"close-on-click-away": !0,
|
|
96
|
-
"
|
|
97
|
-
"
|
|
96
|
+
"disable-auto-focus": m.disableAutoFocus,
|
|
97
|
+
"custom-props": { content: T(L).customProps?.content }
|
|
98
98
|
}, {
|
|
99
99
|
default: k(() => [
|
|
100
100
|
T(e)(T(N), "beforeOptions") ? (b(), c(C(T(t)(T(N), "beforeOptions")), { key: 0 })) : l("", !0),
|
|
101
|
-
m.loading ? (b(), u(o, { key: 1 }, [d("div", y(h(T(W))), [d("div", y(h(T(V))), null, 16)], 16), d("div", y(h(T(B))), [T(e)(T(N), "loading") ? (b(), c(C(T(t)(T(N), "loading")), { key: 0 })) : (b(), u("span", M, w(m.loadingMessage), 1))], 16)], 64)) : (b(), u("div", y(_({ key: 2 }, T(
|
|
101
|
+
m.loading ? (b(), u(o, { key: 1 }, [d("div", y(h(T(W))), [d("div", y(h(T(V))), null, 16)], 16), d("div", y(h(T(B))), [T(e)(T(N), "loading") ? (b(), c(C(T(t)(T(N), "loading")), { key: 0 })) : (b(), u("span", M, w(m.loadingMessage), 1))], 16)], 64)) : (b(), u("div", y(_({ key: 2 }, T(z))), [p(T(n), {
|
|
102
102
|
dense: "",
|
|
103
103
|
role: "listbox",
|
|
104
104
|
padding: "none",
|
|
@@ -114,20 +114,20 @@ var M = { key: 1 }, N = /* @__PURE__ */ m({
|
|
|
114
114
|
key: String(t.value),
|
|
115
115
|
disabled: t.disabled,
|
|
116
116
|
secondary: t.description,
|
|
117
|
-
onClick: (e) =>
|
|
117
|
+
onClick: (e) => $(t),
|
|
118
118
|
id: `${m.listboxId}-option-${n}`,
|
|
119
|
-
"aria-selected":
|
|
120
|
-
"custom-props":
|
|
119
|
+
"aria-selected": Y(t.value),
|
|
120
|
+
"custom-props": Q(t, n)
|
|
121
121
|
}, f({ _: 2 }, [T(e)(T(N), "option") ? {
|
|
122
122
|
name: "default",
|
|
123
123
|
fn: k(() => [S(r.$slots, "option", {
|
|
124
124
|
option: t,
|
|
125
|
-
selected:
|
|
125
|
+
selected: Y(t.value)
|
|
126
126
|
})]),
|
|
127
127
|
key: "0"
|
|
128
|
-
} : void 0, m.showCheckmark &&
|
|
128
|
+
} : void 0, m.showCheckmark && Y(t.value) ? {
|
|
129
129
|
name: "end",
|
|
130
|
-
fn: k(() => [p(T(j), { class: v(
|
|
130
|
+
fn: k(() => [p(T(j), { class: v(J.value) }, null, 8, ["class"])]),
|
|
131
131
|
key: "1"
|
|
132
132
|
} : void 0]), 1032, [
|
|
133
133
|
"primary",
|
|
@@ -144,7 +144,7 @@ var M = { key: 1 }, N = /* @__PURE__ */ m({
|
|
|
144
144
|
"aria-labelledby",
|
|
145
145
|
"aria-multiselectable"
|
|
146
146
|
])], 16)),
|
|
147
|
-
|
|
147
|
+
q.value && !T(e)(T(N), "empty") ? (b(), u("div", y(_({ key: 3 }, T(B))), w(m.emptyMessage), 17)) : q.value && T(e)(T(N), "empty") ? (b(), c(C(T(t)(T(N), "empty")), { key: 4 })) : l("", !0),
|
|
148
148
|
T(e)(T(N), "afterOptions") ? (b(), c(C(T(t)(T(N), "afterOptions")), { key: 5 })) : l("", !0)
|
|
149
149
|
]),
|
|
150
150
|
_: 3
|
|
@@ -152,8 +152,8 @@ var M = { key: 1 }, N = /* @__PURE__ */ m({
|
|
|
152
152
|
"modelValue",
|
|
153
153
|
"anchor-el",
|
|
154
154
|
"placement",
|
|
155
|
-
"
|
|
156
|
-
"
|
|
155
|
+
"disable-auto-focus",
|
|
156
|
+
"custom-props"
|
|
157
157
|
]));
|
|
158
158
|
}
|
|
159
159
|
});
|
|
@@ -7,7 +7,6 @@ export declare function useListbox(props: ListboxOwnProps, libDefaults: ListboxL
|
|
|
7
7
|
merged: import('vue').ComputedRef<ListboxMerged>;
|
|
8
8
|
checkClass: import('vue').ComputedRef<string>;
|
|
9
9
|
scrollBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
10
|
-
contentBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
11
10
|
messageBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", {}, {}>>;
|
|
12
11
|
loadingBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
13
12
|
sizeClasses: import('vue').ComputedRef<import('@bridge-ui/core').ListboxSizeItem | undefined>;
|
|
@@ -27,17 +27,17 @@ function p(p, m) {
|
|
|
27
27
|
}), y = n({
|
|
28
28
|
entry: v,
|
|
29
29
|
props: () => g.value.componentProps
|
|
30
|
-
}), b = r(() => a(s(l, v.value?.customProps?.color), _.value.color ?? "primary")), x = r(() => s(u, v.value?.customProps?.invalidated)), S = r(() => _.value.invalidated ? x.value : b.value), C = r(() => a(s(d, v.value?.customProps?.size), _.value.size ?? "md")), w = r(() => S.value?.selected), T = r(() => S.value?.highlighted), E = r(() => o(C.value?.check, S.value?.check)), D = r(() =>
|
|
30
|
+
}), b = r(() => a(s(l, v.value?.customProps?.color), _.value.color ?? "primary")), x = r(() => s(u, v.value?.customProps?.invalidated)), S = r(() => _.value.invalidated ? x.value : b.value), C = r(() => a(s(d, v.value?.customProps?.size), _.value.size ?? "md")), w = r(() => S.value?.selected), T = r(() => S.value?.highlighted), E = r(() => o(C.value?.check, S.value?.check)), D = r(() => {
|
|
31
31
|
let t = _.value.maxHeight ?? "max-h-60", n = _.value.disableMaxHeight === !0;
|
|
32
32
|
return e(_.value.customProps?.scroll, {}, o({
|
|
33
33
|
"overflow-y-auto overscroll-contain": !n,
|
|
34
34
|
[t]: !n,
|
|
35
35
|
[y.value.scroll ?? ""]: !0
|
|
36
36
|
}));
|
|
37
|
-
}),
|
|
37
|
+
}), O = r(() => e({}, {
|
|
38
38
|
role: "progressbar",
|
|
39
39
|
"aria-hidden": !0
|
|
40
|
-
}, o({ "h-0.5 w-full shrink-0 overflow-hidden": !0 }))),
|
|
40
|
+
}, o({ "h-0.5 w-full shrink-0 overflow-hidden": !0 }))), k = r(() => e(_.value.customProps?.loading, {}, o({
|
|
41
41
|
"h-full w-1/3 animate-bridge-listbox-indeterminate": !0,
|
|
42
42
|
[b.value?.progressColor ?? ""]: !0,
|
|
43
43
|
[y.value.loading ?? ""]: !0
|
|
@@ -45,16 +45,15 @@ function p(p, m) {
|
|
|
45
45
|
return {
|
|
46
46
|
merged: _,
|
|
47
47
|
checkClass: E,
|
|
48
|
-
scrollBind:
|
|
49
|
-
contentBind: D,
|
|
48
|
+
scrollBind: D,
|
|
50
49
|
messageBind: r(() => e({}, {}, o({
|
|
51
50
|
"text-gray-500": !0,
|
|
52
51
|
[C.value?.message ?? ""]: !0
|
|
53
52
|
}))),
|
|
54
|
-
loadingBind:
|
|
53
|
+
loadingBind: k,
|
|
55
54
|
sizeClasses: C,
|
|
56
55
|
mergedClasses: y,
|
|
57
|
-
loadingTrackBind:
|
|
56
|
+
loadingTrackBind: O,
|
|
58
57
|
optionSelectedClass: w,
|
|
59
58
|
optionHighlightedClass: T
|
|
60
59
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SkeletonOwnProps } from './skeleton.types';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<SkeletonOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SkeletonOwnProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useSkeleton as e } from "./composables/useSkeleton.js";
|
|
2
|
+
import { createElementBlock as t, defineComponent as n, guardReactiveProps as r, normalizeProps as i, openBlock as a, unref as o } from "vue";
|
|
3
|
+
//#region src/Components/Skeleton/Skeleton.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var s = /* @__PURE__ */ n({
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "Skeleton",
|
|
7
|
+
props: {
|
|
8
|
+
classes: {},
|
|
9
|
+
rounded: {}
|
|
10
|
+
},
|
|
11
|
+
setup(n) {
|
|
12
|
+
let { rootBind: s } = e(n, { rounded: "md" });
|
|
13
|
+
return (e, n) => (a(), t("div", i(r(o(s))), null, 16));
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
//#endregion
|
|
17
|
+
export { s as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LibDefaultsShape, MergeLibDefaults } from '@bridge-ui/core';
|
|
2
|
+
import { SkeletonOwnProps, SkeletonProps } from '../skeleton.types';
|
|
3
|
+
type SkeletonLibDefaults = LibDefaultsShape<SkeletonOwnProps, "rounded">;
|
|
4
|
+
type SkeletonMerged = MergeLibDefaults<SkeletonOwnProps, SkeletonLibDefaults>;
|
|
5
|
+
export declare function useSkeleton(props: SkeletonOwnProps, libDefaults: SkeletonLibDefaults): {
|
|
6
|
+
merged: import('vue').ComputedRef<SkeletonMerged>;
|
|
7
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", {}, Omit<SkeletonProps, "classes" | "rounded">>>;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
|
|
2
|
+
import { computed as r, useAttrs as i } from "vue";
|
|
3
|
+
import { get as a } from "es-toolkit/compat";
|
|
4
|
+
import { cn as o, mergeBridgeUILayeredClasses as s, splitComponentProps as c } from "@bridge-ui/core";
|
|
5
|
+
import { roundedProps as l } from "@bridge-ui/core/Components/Skeleton";
|
|
6
|
+
//#region src/Components/Skeleton/composables/useSkeleton.ts
|
|
7
|
+
var u = ["classes", "rounded"];
|
|
8
|
+
function d(d, f) {
|
|
9
|
+
let p = i(), m = r(() => c({
|
|
10
|
+
props: {
|
|
11
|
+
...p,
|
|
12
|
+
...d
|
|
13
|
+
},
|
|
14
|
+
bridgeKeys: u
|
|
15
|
+
})), { merged: h, entry: g } = t({
|
|
16
|
+
libDefaults: f,
|
|
17
|
+
componentName: "Skeleton",
|
|
18
|
+
props: () => m.value.componentProps
|
|
19
|
+
}), _ = n({
|
|
20
|
+
entry: g,
|
|
21
|
+
props: () => m.value.componentProps
|
|
22
|
+
}), v = r(() => a(s(l, g.value?.customProps?.rounded), h.value.rounded));
|
|
23
|
+
return {
|
|
24
|
+
merged: h,
|
|
25
|
+
rootBind: r(() => e({}, m.value.inheritedAttrs, o({
|
|
26
|
+
"block animate-pulse bg-gray-200 dark:bg-gray-700": !0,
|
|
27
|
+
[v.value ?? ""]: !0,
|
|
28
|
+
[_.value.root ?? ""]: !0
|
|
29
|
+
})))
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { d as useSkeleton };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
import { MergeHtmlProps, MergeProps, SkeletonRounded } from '@bridge-ui/core';
|
|
3
|
+
export interface SkeletonRoundedOverrides {}
|
|
4
|
+
export interface SkeletonClasses {
|
|
5
|
+
/**
|
|
6
|
+
* The classes to apply to the root.
|
|
7
|
+
*/
|
|
8
|
+
root?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface SkeletonOwnProps {
|
|
11
|
+
/**
|
|
12
|
+
* The classes to apply to the skeleton.
|
|
13
|
+
*
|
|
14
|
+
* @default undefined
|
|
15
|
+
*/
|
|
16
|
+
classes?: SkeletonClasses;
|
|
17
|
+
/**
|
|
18
|
+
* The roundedness of the skeleton.
|
|
19
|
+
*
|
|
20
|
+
* @default "md"
|
|
21
|
+
*/
|
|
22
|
+
rounded?: MergeProps<SkeletonRounded, SkeletonRoundedOverrides>;
|
|
23
|
+
}
|
|
24
|
+
export type SkeletonProps = MergeHtmlProps<SkeletonOwnProps, HTMLAttributes>;
|
package/dist/augments.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { ButtonClasses, ButtonProps } from './Components/Button';
|
|
|
5
5
|
import { CardClasses, CardProps } from './Components/Card';
|
|
6
6
|
import { CheckboxClasses, CheckboxProps } from './Components/Checkbox';
|
|
7
7
|
import { ChipClasses, ChipProps } from './Components/Chip';
|
|
8
|
+
import { DividerClasses, DividerProps } from './Components/Divider';
|
|
8
9
|
import { FormControlClasses, FormControlProps } from './Components/FormControl';
|
|
9
10
|
import { FormFieldClasses, FormFieldProps } from './Components/FormField';
|
|
10
11
|
import { IconProps } from './Components/Icon';
|
|
@@ -19,6 +20,7 @@ import { NumberFieldClasses } from './Components/NumberField';
|
|
|
19
20
|
import { PasswordFieldClasses } from './Components/PasswordField';
|
|
20
21
|
import { RadioClasses, RadioProps } from './Components/Radio';
|
|
21
22
|
import { SelectClasses, SelectProps } from './Components/Select';
|
|
23
|
+
import { SkeletonClasses, SkeletonProps } from './Components/Skeleton';
|
|
22
24
|
import { SnackbarClasses, SnackbarProps } from './Components/Snackbar';
|
|
23
25
|
import { SwitchClasses, SwitchProps } from './Components/Switch';
|
|
24
26
|
import { TextareaClasses, TextareaProps } from './Components/Textarea';
|
|
@@ -51,6 +53,10 @@ declare module "@bridge-ui/core" {
|
|
|
51
53
|
classes: ChipClasses;
|
|
52
54
|
defaultProps: Partial<Pick<ChipProps, "size">>;
|
|
53
55
|
}
|
|
56
|
+
interface DividerConfigOverrides {
|
|
57
|
+
classes: DividerClasses;
|
|
58
|
+
defaultProps: Partial<Pick<DividerProps, "color" | "orientation">>;
|
|
59
|
+
}
|
|
54
60
|
interface FormControlConfigOverrides {
|
|
55
61
|
classes: FormControlClasses;
|
|
56
62
|
defaultProps: Partial<Pick<FormControlProps, "size" | "error" | "withoutErrorMessage">>;
|
|
@@ -107,6 +113,10 @@ declare module "@bridge-ui/core" {
|
|
|
107
113
|
classes: SelectClasses;
|
|
108
114
|
defaultProps: Partial<Pick<SelectProps, "size" | "color" | "rounded" | "variant">>;
|
|
109
115
|
}
|
|
116
|
+
interface SkeletonConfigOverrides {
|
|
117
|
+
classes: SkeletonClasses;
|
|
118
|
+
defaultProps: Partial<Pick<SkeletonProps, "rounded">>;
|
|
119
|
+
}
|
|
110
120
|
interface SwitchConfigOverrides {
|
|
111
121
|
classes: SwitchClasses;
|
|
112
122
|
defaultProps: Partial<Pick<SwitchProps, "size" | "color" | "rounded">>;
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ export { Checkbox, useCheckbox } from './Components/Checkbox';
|
|
|
12
12
|
export type { CheckboxClasses, CheckboxColorOverrides, CheckboxCustomProps, CheckboxOwnProps, CheckboxProps, CheckboxRoundedOverrides, CheckboxSizeOverrides, CheckboxSlots, } from './Components/Checkbox';
|
|
13
13
|
export { Chip, useChip } from './Components/Chip';
|
|
14
14
|
export type { ChipClasses, ChipCustomProps, ChipEmits, ChipOwnProps, ChipProps, ChipSizeOverrides, ChipSlots, } from './Components/Chip';
|
|
15
|
+
export { Divider, useDivider } from './Components/Divider';
|
|
16
|
+
export type { DividerClasses, DividerColorOverrides, DividerOrientationOverrides, DividerOwnProps, DividerProps, } from './Components/Divider';
|
|
15
17
|
export { FormControl, useFormControl } from './Components/FormControl';
|
|
16
18
|
export type { FormControlClasses, FormControlCustomProps, FormControlOwnProps, FormControlProps, FormControlSizeOverrides, FormControlSlots, UseFormControlReturn, } from './Components/FormControl';
|
|
17
19
|
export { FormField, useFormField } from './Components/FormField';
|
|
@@ -42,6 +44,8 @@ export { Radio, useRadio } from './Components/Radio';
|
|
|
42
44
|
export type { RadioClasses, RadioColorOverrides, RadioCustomProps, RadioOwnProps, RadioProps, RadioRoundedOverrides, RadioSizeOverrides, RadioSlots, } from './Components/Radio';
|
|
43
45
|
export { Select, SelectOption } from './Components/Select';
|
|
44
46
|
export type { SelectAsyncData, SelectClasses, SelectEmits, SelectModel, SelectOptionData, SelectOptionProps, SelectProps, SelectSlots, SelectValue, } from './Components/Select';
|
|
47
|
+
export { Skeleton, useSkeleton } from './Components/Skeleton';
|
|
48
|
+
export type { SkeletonClasses, SkeletonOwnProps, SkeletonProps, SkeletonRoundedOverrides, } from './Components/Skeleton';
|
|
45
49
|
export { Snackbar, useSnackbar } from './Components/Snackbar';
|
|
46
50
|
export type { SnackbarClasses, SnackbarColorOverrides, SnackbarCustomProps, SnackbarEmits, SnackbarOwnProps, SnackbarPaddingOverrides, SnackbarProps, SnackbarSlots, SnackbarTransitionOverrides, } from './Components/Snackbar';
|
|
47
51
|
export { Switch, useSwitch } from './Components/Switch';
|
package/dist/index.js
CHANGED
|
@@ -16,40 +16,44 @@ import { useCheckbox as h } from "./Components/Checkbox/composables/useCheckbox.
|
|
|
16
16
|
import g from "./Components/Checkbox/Checkbox.js";
|
|
17
17
|
import { useChip as _ } from "./Components/Chip/composables/useChip.js";
|
|
18
18
|
import v from "./Components/Chip/Chip.js";
|
|
19
|
-
import {
|
|
20
|
-
import b from "./Components/
|
|
21
|
-
import {
|
|
22
|
-
import S from "./Components/
|
|
23
|
-
import {
|
|
24
|
-
import w from "./Components/
|
|
25
|
-
import {
|
|
26
|
-
import E from "./Components/
|
|
27
|
-
import {
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import {
|
|
31
|
-
import I from "./Components/
|
|
32
|
-
import L from "./Components/
|
|
33
|
-
import R from "./Components/
|
|
34
|
-
import
|
|
35
|
-
import B from "./Components/
|
|
36
|
-
import {
|
|
37
|
-
import H from "./Components/
|
|
38
|
-
import {
|
|
39
|
-
import W from "./Components/
|
|
40
|
-
import {
|
|
41
|
-
import K from "./Components/
|
|
42
|
-
import q from "./Components/
|
|
43
|
-
import J from "./Components/
|
|
44
|
-
import
|
|
45
|
-
import X from "./Components/
|
|
46
|
-
import {
|
|
47
|
-
import Q from "./Components/
|
|
48
|
-
import {
|
|
49
|
-
import ee from "./Components/
|
|
50
|
-
import {
|
|
51
|
-
import ne from "./Components/
|
|
52
|
-
import re from "./
|
|
53
|
-
import
|
|
54
|
-
import {
|
|
55
|
-
|
|
19
|
+
import { useDivider as y } from "./Components/Divider/composables/useDivider.js";
|
|
20
|
+
import b from "./Components/Divider/Divider.js";
|
|
21
|
+
import { useFormField as x } from "./Components/FormField/composables/useFormField.js";
|
|
22
|
+
import S from "./Components/FormField/FormField.js";
|
|
23
|
+
import { useLabel as C } from "./Components/Label/composables/useLabel.js";
|
|
24
|
+
import w from "./Components/Label/Label.js";
|
|
25
|
+
import { useLink as T } from "./Components/Link/composables/useLink.js";
|
|
26
|
+
import E from "./Components/Link/Link.js";
|
|
27
|
+
import { useList as D } from "./Components/List/composables/useList.js";
|
|
28
|
+
import O from "./Components/List/List.js";
|
|
29
|
+
import { useListbox as k } from "./Components/Listbox/composables/useListbox.js";
|
|
30
|
+
import { findFirstEnabledOptionIndex as A, findLastEnabledOptionIndex as j, getListboxActiveDescendantId as M, getListboxOptionId as N, moveListboxHighlight as P, useListboxNavigation as F } from "./Components/Listbox/composables/useListboxNavigation.js";
|
|
31
|
+
import I from "./Components/ListItem/ListItem.js";
|
|
32
|
+
import { useMenu as L } from "./Components/Menu/composables/useMenu.js";
|
|
33
|
+
import R from "./Components/Menu/Menu.js";
|
|
34
|
+
import z from "./Components/Listbox/Listbox.js";
|
|
35
|
+
import B from "./Components/ListSection/ListSection.js";
|
|
36
|
+
import { useModal as V } from "./Components/Modal/composables/useModal.js";
|
|
37
|
+
import H from "./Components/Modal/Modal.js";
|
|
38
|
+
import { useNumberField as U } from "./Components/NumberField/composables/useNumberField.js";
|
|
39
|
+
import W from "./Components/NumberField/NumberField.js";
|
|
40
|
+
import { usePasswordField as G } from "./Components/PasswordField/composables/usePasswordField.js";
|
|
41
|
+
import K from "./Components/PasswordField/PasswordField.js";
|
|
42
|
+
import { useRadio as q } from "./Components/Radio/composables/useRadio.js";
|
|
43
|
+
import J from "./Components/Radio/Radio.js";
|
|
44
|
+
import Y from "./Components/Select/Select.js";
|
|
45
|
+
import X from "./Components/Select/SelectOption.js";
|
|
46
|
+
import { useSkeleton as Z } from "./Components/Skeleton/composables/useSkeleton.js";
|
|
47
|
+
import Q from "./Components/Skeleton/Skeleton.js";
|
|
48
|
+
import { useSnackbar as $ } from "./Components/Snackbar/composables/useSnackbar.js";
|
|
49
|
+
import ee from "./Components/Snackbar/Snackbar.js";
|
|
50
|
+
import { useSwitch as te } from "./Components/Switch/composables/useSwitch.js";
|
|
51
|
+
import ne from "./Components/Switch/Switch.js";
|
|
52
|
+
import { useTextarea as re } from "./Components/Textarea/composables/useTextarea.js";
|
|
53
|
+
import ie from "./Components/Textarea/Textarea.js";
|
|
54
|
+
import { useTextField as ae } from "./Components/TextField/composables/useTextField.js";
|
|
55
|
+
import oe from "./Components/TextField/TextField.js";
|
|
56
|
+
import se from "./Provider/BridgeUIProvider.js";
|
|
57
|
+
import { createBridgeUI as ce } from "./Provider/createBridgeUI.js";
|
|
58
|
+
import { BRIDGE_UI_DEFAULT_GLOBAL as le, cn as ue, mergeBridgeUIComponents as de, mergeBridgeUIGlobal as fe, resolveBridgeUIOptions as pe } from "@bridge-ui/core";
|
|
59
|
+
export { a as Alert, o as Avatar, le as BRIDGE_UI_DEFAULT_GLOBAL, c as Badge, se as BridgeUIProvider, u as Button, f as Card, g as Checkbox, v as Chip, b as Divider, m as FormControl, S as FormField, i as Icon, w as Label, E as Link, O as List, I as ListItem, B as ListSection, z as Listbox, R as Menu, H as Modal, W as NumberField, K as PasswordField, J as Radio, Y as Select, X as SelectOption, Q as Skeleton, ee as Snackbar, ne as Switch, oe as TextField, ie as Textarea, ue as cn, ce as createBridgeUI, A as findFirstEnabledOptionIndex, j as findLastEnabledOptionIndex, M as getListboxActiveDescendantId, N as getListboxOptionId, de as mergeBridgeUIComponents, fe as mergeBridgeUIGlobal, P as moveListboxHighlight, pe as resolveBridgeUIOptions, r as useAlert, s as useBadge, e as useBridgeUI, t as useBridgeUIComponent, n as useBridgeUIMergedRegistryClasses, l as useButton, d as useCard, h as useCheckbox, _ as useChip, y as useDivider, p as useFormControl, x as useFormField, C as useLabel, T as useLink, D as useList, k as useListbox, F as useListboxNavigation, L as useMenu, V as useModal, U as useNumberField, G as usePasswordField, q as useRadio, Z as useSkeleton, $ as useSnackbar, te as useSwitch, ae as useTextField, re as useTextarea };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "0.0.1-beta.
|
|
4
|
+
"version": "0.0.1-beta.4",
|
|
5
5
|
"author": "BridgeUI",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"name": "@bridge-ui/vue",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"dist"
|
|
61
61
|
],
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@bridge-ui/core": "^0.0.1-beta.
|
|
63
|
+
"@bridge-ui/core": "^0.0.1-beta.4",
|
|
64
64
|
"@lucide/vue": ">=1.0.0",
|
|
65
65
|
"vue": "^3.4.0"
|
|
66
66
|
},
|