@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.
@@ -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, isNil as o } from "es-toolkit/compat";
4
- import { cn as s, mergeBridgeUILayeredClasses as c, splitComponentProps as l } from "@bridge-ui/core";
5
- import { densityProps as u, roundedProps as d, variantProps as f } from "@bridge-ui/core/Components/Button";
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 p = [
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 m(m, h) {
26
- let g = i(), _ = r(() => l({
27
- bridgeKeys: p,
25
+ function h(h, g) {
26
+ let _ = i(), v = r(() => u({
27
+ bridgeKeys: m,
28
28
  props: {
29
- ...g,
30
- ...m
29
+ ..._,
30
+ ...h
31
31
  }
32
- })), { merged: v, entry: y } = t({
33
- libDefaults: h,
32
+ })), { merged: y, entry: b } = t({
33
+ libDefaults: g,
34
34
  componentName: "Button",
35
- props: () => _.value.componentProps
36
- }), b = r(() => v.value.customProps), x = n({
37
- entry: y,
38
- props: () => _.value.componentProps
39
- }), S = r(() => v.value.as ?? "button"), C = r(() => S.value === "a"), w = r(() => S.value === "button"), T = r(() => v.value.density === "mini"), E = r(() => v.value.disabled || v.value.loading), D = r(() => w.value ? "button" : void 0), O = r(() => w.value ? E.value : void 0), k = r(() => v.value.loading ? !0 : void 0), A = r(() => E.value && !w.value ? !0 : void 0), j = r(() => {
40
- if (!(!C.value || E.value || !v.value.href)) return v.value.href;
41
- }), M = r(() => a(c(u, y.value?.customProps?.density), [v.value.density, v.value.size])), N = r(() => o(_.value.componentProps.variant) ? T.value ? "flat" : v.value.variant : _.value.componentProps.variant), P = r(() => a(c(f, y.value?.customProps?.variant), [N.value, v.value.color])), F = r(() => a(c(d, y.value?.customProps?.rounded), v.value.rounded));
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: S,
44
- merged: v,
45
- isMini: T,
46
- iconBind: r(() => e(b.value?.icon, {}, s({
51
+ tag: C,
52
+ merged: y,
53
+ isMini: E,
54
+ iconBind: r(() => e(x.value?.icon, {}, c({
47
55
  "shrink-0": !0,
48
- [x.value.icon ?? ""]: !0
56
+ [S.value.icon ?? ""]: !0
49
57
  }))),
50
- rootBind: r(() => e(b.value?.root, _.value.inheritedAttrs, s({
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": T.value,
54
- [M.value ?? ""]: !0,
55
- [F.value ?? ""]: !0,
56
- "w-full": !T.value && v.value.full,
57
- "w-fit": !T.value && !v.value.full,
58
- "group hover:shadow-xs": !T.value,
59
- [a(P.value, "base") ?? ""]: !0,
60
- [a(P.value, "hover") ?? ""]: !0,
61
- [a(P.value, "focus") ?? ""]: !0,
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
- [x.value.root ?? ""]: !0
75
+ [S.value.root ?? ""]: !0
68
76
  }))),
69
77
  rootHref: j,
70
- rootType: D,
71
- endIconBind: r(() => e(b.value?.endIcon, {}, s({
78
+ rootType: M,
79
+ endIconBind: r(() => e(x.value?.endIcon, {}, c({
72
80
  "shrink-0": !0,
73
- [x.value.endIcon ?? ""]: !0
81
+ [S.value.endIcon ?? ""]: !0
74
82
  }))),
75
- endSlotBind: r(() => e(b.value?.end, {}, "inline-flex shrink-0 items-center")),
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(b.value?.startIcon, {}, s({
86
+ startIconBind: r(() => e(x.value?.startIcon, {}, c({
79
87
  "shrink-0": !0,
80
- [x.value.startIcon ?? ""]: !0
88
+ [S.value.startIcon ?? ""]: !0
81
89
  }))),
82
- startSlotBind: r(() => e(b.value?.start, {}, "inline-flex shrink-0 items-center")),
83
- loadingIconBind: r(() => e(b.value?.loading, {}, s({
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
- [x.value.loading ?? ""]: !0
93
+ [S.value.loading ?? ""]: !0
86
94
  }))),
87
95
  rootAriaDisabled: A
88
96
  };
89
97
  }
90
98
  //#endregion
91
- export { m as useButton };
99
+ export { h as useButton };
@@ -0,0 +1,5 @@
1
+ import e from "./Divider.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/Components/Divider/Divider.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -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>;
@@ -0,0 +1,3 @@
1
+ export { useDivider } from './composables/useDivider';
2
+ export type { DividerClasses, DividerColorOverrides, DividerOrientationOverrides, DividerOwnProps, DividerProps, } from './divider.types';
3
+ export { default as Divider } from './Divider.vue';
@@ -0,0 +1,3 @@
1
+ import { useDivider as e } from "./composables/useDivider.js";
2
+ import t from "./Divider.js";
3
+ export { t as Divider, e as useDivider };
@@ -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, { checkClass: L, scrollBind: R, contentBind: z, messageBind: B, loadingBind: V, sizeClasses: H, mergedClasses: U, loadingTrackBind: W, optionSelectedClass: G, optionHighlightedClass: K } = r(I, {
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(() => ({ content: z.value })), J = s(() => !I.loading && I.options.length === 0 && I.hideEmptyMessage !== !0), Y = s(() => A(L.value, U.value.check));
66
- function X(e) {
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 Z(e) {
69
+ function X(e) {
70
70
  return I.highlightedIndex === e;
71
71
  }
72
- function Q(e) {
72
+ function Z(e) {
73
73
  e.preventDefault();
74
74
  }
75
- function $(e, t) {
75
+ function Q(e, t) {
76
76
  let n = {
77
77
  tabindex: -1,
78
- onMousedown: Q,
78
+ onMousedown: Z,
79
79
  class: A(H.value?.option)
80
80
  };
81
- return X(e.value) ? n.class = A(n.class, G.value, U.value.optionSelected) : Z(t) && (n.class = A(n.class, K.value, U.value.optionHighlighted)), {
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 ee(e) {
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
- "custom-props": q.value,
97
- "disable-auto-focus": m.disableAutoFocus
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(R))), [p(T(n), {
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) => ee(t),
117
+ onClick: (e) => $(t),
118
118
  id: `${m.listboxId}-option-${n}`,
119
- "aria-selected": X(t.value),
120
- "custom-props": $(t, n)
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: X(t.value)
125
+ selected: Y(t.value)
126
126
  })]),
127
127
  key: "0"
128
- } : void 0, m.showCheckmark && X(t.value) ? {
128
+ } : void 0, m.showCheckmark && Y(t.value) ? {
129
129
  name: "end",
130
- fn: k(() => [p(T(j), { class: v(Y.value) }, null, 8, ["class"])]),
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
- J.value && !T(e)(T(N), "empty") ? (b(), u("div", y(_({ key: 3 }, T(B))), w(m.emptyMessage), 17)) : J.value && T(e)(T(N), "empty") ? (b(), c(C(T(t)(T(N), "empty")), { key: 4 })) : l("", !0),
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
- "custom-props",
156
- "disable-auto-focus"
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(() => e(_.value.customProps?.content, {}, o({ relative: !0 }))), O = 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
- }), k = r(() => e({}, {
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 }))), A = r(() => e(_.value.customProps?.loading, {}, o({
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: O,
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: A,
53
+ loadingBind: k,
55
54
  sizeClasses: C,
56
55
  mergedClasses: y,
57
- loadingTrackBind: k,
56
+ loadingTrackBind: O,
58
57
  optionSelectedClass: w,
59
58
  optionHighlightedClass: T
60
59
  };
@@ -0,0 +1,5 @@
1
+ import e from "./Skeleton.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/Components/Skeleton/Skeleton.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -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,3 @@
1
+ export { useSkeleton } from './composables/useSkeleton';
2
+ export type { SkeletonClasses, SkeletonOwnProps, SkeletonProps, SkeletonRoundedOverrides, } from './skeleton.types';
3
+ export { default as Skeleton } from './Skeleton.vue';
@@ -0,0 +1,3 @@
1
+ import { useSkeleton as e } from "./composables/useSkeleton.js";
2
+ import t from "./Skeleton.js";
3
+ export { t as Skeleton, e 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>;
@@ -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 { useFormField as y } from "./Components/FormField/composables/useFormField.js";
20
- import b from "./Components/FormField/FormField.js";
21
- import { useLabel as x } from "./Components/Label/composables/useLabel.js";
22
- import S from "./Components/Label/Label.js";
23
- import { useLink as C } from "./Components/Link/composables/useLink.js";
24
- import w from "./Components/Link/Link.js";
25
- import { useList as T } from "./Components/List/composables/useList.js";
26
- import E from "./Components/List/List.js";
27
- import { useListbox as D } from "./Components/Listbox/composables/useListbox.js";
28
- import { findFirstEnabledOptionIndex as O, findLastEnabledOptionIndex as k, getListboxActiveDescendantId as A, getListboxOptionId as j, moveListboxHighlight as M, useListboxNavigation as N } from "./Components/Listbox/composables/useListboxNavigation.js";
29
- import P from "./Components/ListItem/ListItem.js";
30
- import { useMenu as F } from "./Components/Menu/composables/useMenu.js";
31
- import I from "./Components/Menu/Menu.js";
32
- import L from "./Components/Listbox/Listbox.js";
33
- import R from "./Components/ListSection/ListSection.js";
34
- import { useModal as z } from "./Components/Modal/composables/useModal.js";
35
- import B from "./Components/Modal/Modal.js";
36
- import { useNumberField as V } from "./Components/NumberField/composables/useNumberField.js";
37
- import H from "./Components/NumberField/NumberField.js";
38
- import { usePasswordField as U } from "./Components/PasswordField/composables/usePasswordField.js";
39
- import W from "./Components/PasswordField/PasswordField.js";
40
- import { useRadio as G } from "./Components/Radio/composables/useRadio.js";
41
- import K from "./Components/Radio/Radio.js";
42
- import q from "./Components/Select/Select.js";
43
- import J from "./Components/Select/SelectOption.js";
44
- import { useSnackbar as Y } from "./Components/Snackbar/composables/useSnackbar.js";
45
- import X from "./Components/Snackbar/Snackbar.js";
46
- import { useSwitch as Z } from "./Components/Switch/composables/useSwitch.js";
47
- import Q from "./Components/Switch/Switch.js";
48
- import { useTextarea as $ } from "./Components/Textarea/composables/useTextarea.js";
49
- import ee from "./Components/Textarea/Textarea.js";
50
- import { useTextField as te } from "./Components/TextField/composables/useTextField.js";
51
- import ne from "./Components/TextField/TextField.js";
52
- import re from "./Provider/BridgeUIProvider.js";
53
- import { createBridgeUI as ie } from "./Provider/createBridgeUI.js";
54
- import { BRIDGE_UI_DEFAULT_GLOBAL as ae, cn as oe, mergeBridgeUIComponents as se, mergeBridgeUIGlobal as ce, resolveBridgeUIOptions as le } from "@bridge-ui/core";
55
- export { a as Alert, o as Avatar, ae as BRIDGE_UI_DEFAULT_GLOBAL, c as Badge, re as BridgeUIProvider, u as Button, f as Card, g as Checkbox, v as Chip, m as FormControl, b as FormField, i as Icon, S as Label, w as Link, E as List, P as ListItem, R as ListSection, L as Listbox, I as Menu, B as Modal, H as NumberField, W as PasswordField, K as Radio, q as Select, J as SelectOption, X as Snackbar, Q as Switch, ne as TextField, ee as Textarea, oe as cn, ie as createBridgeUI, O as findFirstEnabledOptionIndex, k as findLastEnabledOptionIndex, A as getListboxActiveDescendantId, j as getListboxOptionId, se as mergeBridgeUIComponents, ce as mergeBridgeUIGlobal, M as moveListboxHighlight, le 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, p as useFormControl, y as useFormField, x as useLabel, C as useLink, T as useList, D as useListbox, N as useListboxNavigation, F as useMenu, z as useModal, V as useNumberField, U as usePasswordField, G as useRadio, Y as useSnackbar, Z as useSwitch, te as useTextField, $ as useTextarea };
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.3",
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.3",
63
+ "@bridge-ui/core": "^0.0.1-beta.4",
64
64
  "@lucide/vue": ">=1.0.0",
65
65
  "vue": "^3.4.0"
66
66
  },