@bridge-ui/vue 0.0.2 → 0.0.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/Actions/Dialog/BridgeDialogAction.vue_vue_type_script_setup_true_lang.js +19 -35
- package/dist/Actions/Snackbar/BridgeSnackbarAction.vue_vue_type_script_setup_true_lang.js +41 -54
- package/dist/Actions/Snackbar/BridgeSnackbarHost.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/Alert/alertDefaultIcons.d.ts +1 -1
- package/dist/Components/Alert/composables/useAlert.js +2 -2
- package/dist/Components/Avatar/Avatar.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/Components/Avatar/avatar.types.d.ts +34 -1
- package/dist/Components/Avatar/composables/useAvatar.d.ts +4 -4
- package/dist/Components/Avatar/composables/useAvatar.js +10 -9
- package/dist/Components/Avatar/index.d.ts +1 -1
- package/dist/Components/Badge/composables/useBadge.js +2 -2
- package/dist/Components/Button/composables/useButton.d.ts +1 -1
- package/dist/Components/Button/composables/useButton.js +2 -2
- package/dist/Components/Card/composables/useCard.js +4 -4
- package/dist/Components/Checkbox/Checkbox.vue.d.ts +3 -3
- package/dist/Components/Checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +23 -23
- package/dist/Components/Checkbox/checkbox.types.d.ts +7 -6
- package/dist/Components/Checkbox/composables/useCheckbox.d.ts +6 -11
- package/dist/Components/Checkbox/composables/useCheckbox.js +4 -3
- package/dist/Components/Chip/composables/useChip.js +2 -2
- package/dist/Components/Divider/composables/useDivider.js +2 -2
- package/dist/Components/Drawer/Drawer.vue.d.ts +1 -1
- package/dist/Components/Drawer/composables/useDrawer.d.ts +1 -1
- package/dist/Components/Drawer/composables/useDrawer.js +2 -2
- package/dist/Components/FormControl/FormControl.vue_vue_type_script_setup_true_lang.js +24 -18
- package/dist/Components/FormControl/FormControlLabel.js +5 -0
- package/dist/Components/FormControl/FormControlLabel.vue.d.ts +8 -0
- package/dist/Components/FormControl/FormControlLabel.vue_vue_type_script_setup_true_lang.js +19 -0
- package/dist/Components/FormControl/composables/useFormControl.d.ts +7 -11
- package/dist/Components/FormControl/composables/useFormControl.js +62 -68
- package/dist/Components/FormControl/formControl.types.d.ts +19 -30
- package/dist/Components/FormField/FilledFormField.vue_vue_type_script_setup_true_lang.js +23 -25
- package/dist/Components/FormField/FormFieldLabel.js +5 -0
- package/dist/Components/FormField/FormFieldLabel.vue.d.ts +7 -0
- package/dist/Components/FormField/FormFieldLabel.vue_vue_type_script_setup_true_lang.js +16 -0
- package/dist/Components/FormField/NotchedFormField.vue_vue_type_script_setup_true_lang.js +22 -24
- package/dist/Components/FormField/OutlinedFormField.vue_vue_type_script_setup_true_lang.js +23 -25
- package/dist/Components/FormField/StackedFormField.vue_vue_type_script_setup_true_lang.js +25 -27
- package/dist/Components/FormField/UnderlinedFormField.vue_vue_type_script_setup_true_lang.js +23 -25
- package/dist/Components/FormField/composables/useFormField.d.ts +3 -3
- package/dist/Components/FormField/composables/useFormField.js +112 -111
- package/dist/Components/FormField/formField.types.d.ts +6 -3
- package/dist/Components/Icon/composables/useIcon.js +2 -2
- package/dist/Components/Label/composables/useLabel.js +2 -2
- package/dist/Components/Link/composables/useLink.js +2 -2
- package/dist/Components/Listbox/Listbox.vue.d.ts +1 -1
- package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +82 -118
- package/dist/Components/Listbox/composables/useListbox.js +2 -2
- package/dist/Components/Listbox/listbox.types.d.ts +39 -5
- package/dist/Components/Menu/Menu.vue.d.ts +2 -2
- package/dist/Components/Menu/composables/useMenu.d.ts +1 -1
- package/dist/Components/Menu/composables/useMenu.js +2 -2
- package/dist/Components/Modal/composables/useModal.js +2 -2
- package/dist/Components/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js +52 -47
- package/dist/Components/NumberField/composables/useNumberField.d.ts +3 -4
- package/dist/Components/NumberField/composables/useNumberField.js +2 -2
- package/dist/Components/NumberField/numberField.types.d.ts +41 -2
- package/dist/Components/PasswordField/PasswordField.vue_vue_type_script_setup_true_lang.js +35 -29
- package/dist/Components/PasswordField/composables/usePasswordField.d.ts +3 -4
- package/dist/Components/PasswordField/composables/usePasswordField.js +2 -2
- package/dist/Components/PasswordField/passwordField.types.d.ts +29 -2
- package/dist/Components/Progress/composables/useProgress.js +2 -2
- package/dist/Components/Radio/Radio.vue_vue_type_script_setup_true_lang.js +15 -16
- package/dist/Components/Radio/composables/useRadio.d.ts +6 -11
- package/dist/Components/Radio/composables/useRadio.js +4 -3
- package/dist/Components/Radio/radio.types.d.ts +7 -6
- package/dist/Components/Select/Select.vue_vue_type_script_setup_true_lang.js +64 -57
- package/dist/Components/Select/composables/useSelect.d.ts +16 -16
- package/dist/Components/Select/composables/useSelect.js +13 -13
- package/dist/Components/Select/select.types.d.ts +23 -4
- package/dist/Components/Skeleton/composables/useSkeleton.js +2 -2
- package/dist/Components/Snackbar/composables/useSnackbar.js +1 -1
- package/dist/Components/Spinner/composables/useSpinner.js +2 -2
- package/dist/Components/Switch/Switch.vue.d.ts +3 -3
- package/dist/Components/Switch/Switch.vue_vue_type_script_setup_true_lang.js +19 -19
- package/dist/Components/Switch/composables/useSwitch.d.ts +6 -11
- package/dist/Components/Switch/composables/useSwitch.js +4 -3
- package/dist/Components/Switch/switch.types.d.ts +7 -6
- package/dist/Components/Tabs/Tabs.vue_vue_type_script_setup_true_lang.js +16 -16
- package/dist/Components/Tabs/composables/useTabs.js +2 -2
- package/dist/Components/Tabs/tabs.types.d.ts +27 -1
- package/dist/Components/TextField/TextField.vue_vue_type_script_setup_true_lang.js +15 -8
- package/dist/Components/TextField/composables/useTextField.d.ts +3 -4
- package/dist/Components/TextField/composables/useTextField.js +7 -4
- package/dist/Components/TextField/textField.types.d.ts +9 -1
- package/dist/Components/Textarea/Textarea.vue_vue_type_script_setup_true_lang.js +19 -12
- package/dist/Components/Textarea/composables/useTextarea.d.ts +3 -4
- package/dist/Components/Textarea/composables/useTextarea.js +4 -3
- package/dist/Components/Textarea/textarea.types.d.ts +7 -0
- package/dist/Utils/index.d.ts +9 -2
- package/dist/Utils/index.js +11 -11
- package/dist/index.d.ts +1 -1
- package/dist/index.js +14 -14
- package/dist/theme.css +1 -1
- package/package.json +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import e from "../../
|
|
2
|
-
import t from "../../Components/
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import { mergeNestedComponentProps as e } from "../../Utils/index.js";
|
|
2
|
+
import t from "../../Components/Button/Button.js";
|
|
3
|
+
import n from "../../Components/Link/Link.js";
|
|
4
|
+
import { computed as r, createBlock as i, createTextVNode as a, defineComponent as o, mergeProps as s, openBlock as c, toDisplayString as l, unref as u, withCtx as d } from "vue";
|
|
5
5
|
//#region src/Actions/Dialog/BridgeDialogAction.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var f = /* @__PURE__ */
|
|
6
|
+
var f = /* @__PURE__ */ o({
|
|
7
7
|
__name: "BridgeDialogAction",
|
|
8
8
|
props: {
|
|
9
9
|
acceptColor: {},
|
|
@@ -11,51 +11,35 @@ var f = /* @__PURE__ */ a({
|
|
|
11
11
|
role: {}
|
|
12
12
|
},
|
|
13
13
|
emits: ["run"],
|
|
14
|
-
setup(
|
|
15
|
-
let p =
|
|
14
|
+
setup(o, { emit: f }) {
|
|
15
|
+
let p = o, m = f, h = r(() => p.role === "accept" ? p.acceptColor : "secondary"), g = r(() => h.value), _ = r(() => {
|
|
16
16
|
if (!p.action.link) return {};
|
|
17
17
|
let { onClick: e, ...t } = p.action.link;
|
|
18
18
|
return t;
|
|
19
|
-
});
|
|
20
|
-
function
|
|
19
|
+
}), v = r(() => e(_.value, { classes: { root: p.action.className } })), y = r(() => e(p.action.button, { classes: { root: p.action.className } }));
|
|
20
|
+
function b() {
|
|
21
21
|
m("run");
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
e.preventDefault(), p.action.link?.onClick?.(e),
|
|
23
|
+
function x(e) {
|
|
24
|
+
e.preventDefault(), p.action.link?.onClick?.(e), b();
|
|
25
25
|
}
|
|
26
|
-
return (
|
|
26
|
+
return (e, r) => o.action.link ? (c(), i(u(n), s({
|
|
27
27
|
key: 0,
|
|
28
28
|
size: "sm",
|
|
29
29
|
underline: "hover",
|
|
30
30
|
color: g.value
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
classes: {
|
|
34
|
-
...a.action.link.classes,
|
|
35
|
-
root: l(d)(a.action.className, a.action.link.classes?.root)
|
|
36
|
-
}
|
|
37
|
-
}), {
|
|
38
|
-
default: u(() => [i(c(a.action.label), 1)]),
|
|
31
|
+
}, v.value, { onClick: x }), {
|
|
32
|
+
default: d(() => [a(l(o.action.label), 1)]),
|
|
39
33
|
_: 1
|
|
40
|
-
}, 16, ["color"
|
|
34
|
+
}, 16, ["color"])) : (c(), i(u(t), s({
|
|
41
35
|
key: 1,
|
|
42
36
|
size: "sm",
|
|
43
|
-
onClick:
|
|
37
|
+
onClick: b,
|
|
44
38
|
color: h.value
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
classes: {
|
|
48
|
-
...a.action.button?.classes,
|
|
49
|
-
root: l(d)(a.action.className, a.action.button?.classes?.root)
|
|
50
|
-
}
|
|
51
|
-
}), {
|
|
52
|
-
default: u(() => [i(c(a.action.label), 1)]),
|
|
39
|
+
}, y.value, { variant: o.action.solid ? "outline" : "flat" }), {
|
|
40
|
+
default: d(() => [a(l(o.action.label), 1)]),
|
|
53
41
|
_: 1
|
|
54
|
-
}, 16, [
|
|
55
|
-
"color",
|
|
56
|
-
"variant",
|
|
57
|
-
"classes"
|
|
58
|
-
]));
|
|
42
|
+
}, 16, ["color", "variant"]));
|
|
59
43
|
}
|
|
60
44
|
});
|
|
61
45
|
//#endregion
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import e from "../../
|
|
2
|
-
import t from "../../Components/
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { mergeNestedComponentProps as e } from "../../Utils/index.js";
|
|
2
|
+
import t from "../../Components/Button/Button.js";
|
|
3
|
+
import n from "../../Components/Link/Link.js";
|
|
4
|
+
import { computed as r, createBlock as i, createTextVNode as a, defineComponent as o, mergeProps as s, openBlock as c, toDisplayString as l, unref as u, withCtx as d } from "vue";
|
|
5
|
+
import { get as f } from "es-toolkit/compat";
|
|
6
|
+
import { cn as p, snackbarRoundedProps as m } from "@bridge-ui/core";
|
|
6
7
|
//#region src/Actions/Snackbar/BridgeSnackbarAction.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
8
|
+
var h = /* @__PURE__ */ o({
|
|
8
9
|
__name: "BridgeSnackbarAction",
|
|
9
10
|
props: {
|
|
10
11
|
action: {},
|
|
@@ -16,71 +17,57 @@ var m = /* @__PURE__ */ a({
|
|
|
16
17
|
snackbarRounded: {}
|
|
17
18
|
},
|
|
18
19
|
emits: ["run"],
|
|
19
|
-
setup(
|
|
20
|
-
let
|
|
21
|
-
if (!
|
|
22
|
-
let { onClick: e, ...t } =
|
|
20
|
+
setup(o, { emit: h }) {
|
|
21
|
+
let g = o, _ = h, v = r(() => g.role === "accept" ? g.snackbarColor : "secondary"), y = r(() => v.value), b = r(() => {
|
|
22
|
+
if (!g.action.link) return {};
|
|
23
|
+
let { onClick: e, ...t } = g.action.link;
|
|
23
24
|
return t;
|
|
24
|
-
}),
|
|
25
|
-
let e =
|
|
26
|
-
return
|
|
25
|
+
}), x = r(() => {
|
|
26
|
+
let e = f(m, g.snackbarRounded ?? "lg"), t = f(e, "tr"), n = f(e, "br");
|
|
27
|
+
return f({
|
|
27
28
|
trailing: "mr-4 shrink-0",
|
|
28
|
-
"right-accept":
|
|
29
|
+
"right-accept": p({
|
|
29
30
|
"w-full rounded-none": !0,
|
|
30
31
|
[t ?? ""]: !0,
|
|
31
|
-
[n ?? ""]: !
|
|
32
|
+
[n ?? ""]: !g.hasReject
|
|
32
33
|
}),
|
|
33
|
-
"right-reject":
|
|
34
|
+
"right-reject": p({
|
|
34
35
|
"w-full rounded-none": !0,
|
|
35
36
|
[n ?? ""]: !0,
|
|
36
|
-
[t ?? ""]: !
|
|
37
|
+
[t ?? ""]: !g.hasAccept
|
|
37
38
|
})
|
|
38
|
-
},
|
|
39
|
-
}),
|
|
40
|
-
[
|
|
41
|
-
[
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
}, g.layout, "");
|
|
40
|
+
}), S = r(() => p({
|
|
41
|
+
[x.value]: !0,
|
|
42
|
+
[g.action.className ?? ""]: !0
|
|
43
|
+
})), C = r(() => e(b.value, { classes: { root: S.value } })), w = r(() => e(g.action.button, { classes: { root: p({
|
|
44
|
+
[S.value]: !0,
|
|
45
|
+
"w-full": g.layout === "right-accept" || g.layout === "right-reject"
|
|
46
|
+
}) } }));
|
|
47
|
+
function T() {
|
|
48
|
+
_("run");
|
|
46
49
|
}
|
|
47
|
-
function
|
|
48
|
-
e.preventDefault(),
|
|
50
|
+
function E(e) {
|
|
51
|
+
e.preventDefault(), g.action.link?.onClick?.(e), T();
|
|
49
52
|
}
|
|
50
|
-
return (
|
|
53
|
+
return (e, r) => o.action.link ? (c(), i(u(n), s({
|
|
51
54
|
key: 0,
|
|
52
55
|
size: "sm",
|
|
53
56
|
underline: "hover",
|
|
54
|
-
color:
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
classes: {
|
|
58
|
-
...a.action.link.classes,
|
|
59
|
-
root: l(f)(x.value, a.action.link.classes?.root)
|
|
60
|
-
}
|
|
61
|
-
}), {
|
|
62
|
-
default: u(() => [i(c(a.action.label), 1)]),
|
|
57
|
+
color: y.value
|
|
58
|
+
}, C.value, { onClick: E }), {
|
|
59
|
+
default: d(() => [a(l(o.action.label), 1)]),
|
|
63
60
|
_: 1
|
|
64
|
-
}, 16, ["color"
|
|
61
|
+
}, 16, ["color"])) : (c(), i(u(t), s({
|
|
65
62
|
key: 1,
|
|
66
63
|
size: "sm",
|
|
67
|
-
onClick:
|
|
68
|
-
color:
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
classes: {
|
|
72
|
-
...a.action.button?.classes,
|
|
73
|
-
root: l(f)(x.value, a.action.button?.classes?.root)
|
|
74
|
-
}
|
|
75
|
-
}), {
|
|
76
|
-
default: u(() => [i(c(a.action.label), 1)]),
|
|
64
|
+
onClick: T,
|
|
65
|
+
color: v.value
|
|
66
|
+
}, w.value, { variant: o.action.solid ? "outline" : "flat" }), {
|
|
67
|
+
default: d(() => [a(l(o.action.label), 1)]),
|
|
77
68
|
_: 1
|
|
78
|
-
}, 16, [
|
|
79
|
-
"color",
|
|
80
|
-
"variant",
|
|
81
|
-
"classes"
|
|
82
|
-
]));
|
|
69
|
+
}, 16, ["color", "variant"]));
|
|
83
70
|
}
|
|
84
71
|
});
|
|
85
72
|
//#endregion
|
|
86
|
-
export {
|
|
73
|
+
export { h as default };
|
|
@@ -26,7 +26,7 @@ var S = "[Bridge UI] Nested <BridgeSnackbarHost /> detected. useSnackbarAction()
|
|
|
26
26
|
timeout: C.timeout
|
|
27
27
|
}), T = e();
|
|
28
28
|
m(t, w);
|
|
29
|
-
let E = o(() => w.entries.value), D = o(() => T?.components.value.Snackbar), O = o(() => C.position ?? D.value?.defaultProps?.position ?? "bottom-center"), k = o(() => v(b(x, D.value?.
|
|
29
|
+
let E = o(() => w.entries.value), D = o(() => T?.components.value.Snackbar), O = o(() => C.position ?? D.value?.defaultProps?.position ?? "bottom-center"), k = o(() => v(b(x, D.value?.tokens?.position), O.value)), A = o(() => C.teleportTo === !1), j = o(() => C.teleportTo === !1 ? "body" : C.teleportTo), M = o(() => O.value.startsWith("top") ? "flex-col" : "flex-col-reverse");
|
|
30
30
|
return (e, t) => (p(), c(i, null, [g(e.$slots, "default"), (p(), s(a, {
|
|
31
31
|
to: j.value,
|
|
32
32
|
disabled: A.value
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { LucideIcon } from '@lucide/vue';
|
|
2
|
-
import { AlertColor } from '@bridge-ui/core/
|
|
2
|
+
import { AlertColor } from '@bridge-ui/core/Tokens/Alert';
|
|
3
3
|
/** Library fallbacks when neither the `icon` prop nor theme `icon` is set. */
|
|
4
4
|
export declare const alertDefaultIcons: Record<keyof AlertColor, LucideIcon>;
|
|
@@ -3,7 +3,7 @@ import { mergePartBind as t, useBridgeUIComponent as n, useBridgeUIMergedRegistr
|
|
|
3
3
|
import { computed as i, useAttrs as a, useSlots as o } from "vue";
|
|
4
4
|
import { get as s, isNull as c } from "es-toolkit/compat";
|
|
5
5
|
import { cn as l, mergeBridgeUILayeredClasses as u, splitComponentProps as d } from "@bridge-ui/core";
|
|
6
|
-
import { paddingProps as f, roundedProps as p, shadowProps as m, variantProps as h } from "@bridge-ui/core/
|
|
6
|
+
import { paddingProps as f, roundedProps as p, shadowProps as m, variantProps as h } from "@bridge-ui/core/Tokens/Alert";
|
|
7
7
|
//#region src/Components/Alert/composables/useAlert.ts
|
|
8
8
|
var g = [
|
|
9
9
|
"icon",
|
|
@@ -33,7 +33,7 @@ function _(_, v) {
|
|
|
33
33
|
}), E = i(() => {
|
|
34
34
|
let e = b.default?.();
|
|
35
35
|
return !!(e && e.length > 0);
|
|
36
|
-
}), D = i(() => s(u(h, C.value?.
|
|
36
|
+
}), D = i(() => s(u(h, C.value?.tokens?.variant), [S.value.variant, S.value.color])), O = i(() => s(u(m, C.value?.tokens?.shadow), S.value.shadow)), k = i(() => s(u(f, C.value?.tokens?.padding), S.value.padding)), A = i(() => s(u(p, C.value?.tokens?.rounded), S.value.rounded)), j = i(() => c(S.value.icon) ? null : S.value.icon ? S.value.icon : s(D.value, "icon") ?? s(e, S.value.color));
|
|
37
37
|
return {
|
|
38
38
|
slots: b,
|
|
39
39
|
merged: S,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LucideIcon } from '@lucide/vue';
|
|
2
|
-
import { HTMLAttributes, Slot } from 'vue';
|
|
2
|
+
import { HTMLAttributes, ImgHTMLAttributes, Slot } from 'vue';
|
|
3
3
|
import { AvatarColor, AvatarRounded, AvatarSize, MergeHtmlProps, MergeProps } from '@bridge-ui/core';
|
|
4
|
+
import { IconProps } from '../Icon';
|
|
4
5
|
export interface AvatarSizeOverrides {}
|
|
5
6
|
export interface AvatarColorOverrides {}
|
|
6
7
|
export interface AvatarRoundedOverrides {}
|
|
@@ -18,6 +19,32 @@ export interface AvatarClasses {
|
|
|
18
19
|
*/
|
|
19
20
|
root?: string;
|
|
20
21
|
}
|
|
22
|
+
export interface AvatarCustomProps {
|
|
23
|
+
/**
|
|
24
|
+
* Props forwarded to the fallback text element.
|
|
25
|
+
*
|
|
26
|
+
* @default undefined
|
|
27
|
+
*/
|
|
28
|
+
fallback?: HTMLAttributes;
|
|
29
|
+
/**
|
|
30
|
+
* Props forwarded to the fallback `Icon` (`icon` is set by the avatar).
|
|
31
|
+
*
|
|
32
|
+
* @default undefined
|
|
33
|
+
*/
|
|
34
|
+
icon?: Partial<Omit<IconProps, "icon">>;
|
|
35
|
+
/**
|
|
36
|
+
* Props forwarded to the image element.
|
|
37
|
+
*
|
|
38
|
+
* @default undefined
|
|
39
|
+
*/
|
|
40
|
+
image?: ImgHTMLAttributes;
|
|
41
|
+
/**
|
|
42
|
+
* Props forwarded to the root element.
|
|
43
|
+
*
|
|
44
|
+
* @default undefined
|
|
45
|
+
*/
|
|
46
|
+
root?: HTMLAttributes;
|
|
47
|
+
}
|
|
21
48
|
export interface AvatarOwnProps {
|
|
22
49
|
/**
|
|
23
50
|
* The alt text for the avatar image.
|
|
@@ -37,6 +64,12 @@ export interface AvatarOwnProps {
|
|
|
37
64
|
* @default "primary"
|
|
38
65
|
*/
|
|
39
66
|
color?: MergeProps<AvatarColor, AvatarColorOverrides>;
|
|
67
|
+
/**
|
|
68
|
+
* Extra props for internal parts (`root`, `image`, `fallback`, `icon`).
|
|
69
|
+
*
|
|
70
|
+
* @default undefined
|
|
71
|
+
*/
|
|
72
|
+
customProps?: AvatarCustomProps;
|
|
40
73
|
/**
|
|
41
74
|
* The fallback text to display when no image is available.
|
|
42
75
|
*
|
|
@@ -7,14 +7,14 @@ export declare function useAvatar(props: AvatarProps, libDefaults: AvatarLibDefa
|
|
|
7
7
|
[name: string]: import('vue').Slot<any> | undefined;
|
|
8
8
|
}>;
|
|
9
9
|
merged: import('vue').ComputedRef<AvatarMerged>;
|
|
10
|
-
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class",
|
|
11
|
-
iconBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class",
|
|
10
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Omit<AvatarProps, "color" | "icon" | "size" | "classes" | "customProps" | "rounded" | "alt" | "fallback" | "src">>>;
|
|
11
|
+
iconBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", Partial<Omit<import('../../Icon').IconProps, "icon">> | undefined, {}>>;
|
|
12
12
|
hasImage: import('vue').ComputedRef<boolean>;
|
|
13
|
-
imageBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class",
|
|
13
|
+
imageBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').ImgHTMLAttributes | undefined, {
|
|
14
14
|
alt: string | undefined;
|
|
15
15
|
src: string | undefined;
|
|
16
16
|
}>>;
|
|
17
|
-
fallbackBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class",
|
|
17
|
+
fallbackBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
18
18
|
resolvedIcon: import('vue').ComputedRef<import('@lucide/vue').LucideIcon>;
|
|
19
19
|
hasFallbackSlot: import('vue').ComputedRef<boolean>;
|
|
20
20
|
hasFallbackText: import('vue').ComputedRef<boolean>;
|
|
@@ -4,7 +4,7 @@ import { computed as i, useAttrs as a, useSlots as o } from "vue";
|
|
|
4
4
|
import { get as s, isEmpty as c, isNil as l } from "es-toolkit/compat";
|
|
5
5
|
import { cn as u, mergeBridgeUILayeredClasses as d, splitComponentProps as f } from "@bridge-ui/core";
|
|
6
6
|
import { User as p } from "@lucide/vue";
|
|
7
|
-
import { colorProps as m, iconSizeProps as h, roundedProps as g, sizeProps as _ } from "@bridge-ui/core/
|
|
7
|
+
import { colorProps as m, iconSizeProps as h, roundedProps as g, sizeProps as _ } from "@bridge-ui/core/Tokens/Avatar";
|
|
8
8
|
//#region src/Components/Avatar/composables/useAvatar.ts
|
|
9
9
|
var v = [
|
|
10
10
|
"alt",
|
|
@@ -14,7 +14,8 @@ var v = [
|
|
|
14
14
|
"color",
|
|
15
15
|
"classes",
|
|
16
16
|
"rounded",
|
|
17
|
-
"fallback"
|
|
17
|
+
"fallback",
|
|
18
|
+
"customProps"
|
|
18
19
|
];
|
|
19
20
|
function y(y, b) {
|
|
20
21
|
let x = a(), S = o(), C = i(() => f({
|
|
@@ -30,14 +31,14 @@ function y(y, b) {
|
|
|
30
31
|
}), E = r({
|
|
31
32
|
entry: T,
|
|
32
33
|
props: () => C.value.componentProps
|
|
33
|
-
}), D = i(() => e(S, "default")), O = i(() => !l(w.value.src) && !c(w.value.src)), k = i(() => e(S, "fallback")), A = i(() => !l(w.value.fallback) && !c(w.value.fallback)), j = i(() => w.value.icon ?? p), M = i(() => !O.value && !D.value), N = i(() => s(d(_, T.value?.
|
|
34
|
+
}), D = i(() => e(S, "default")), O = i(() => !l(w.value.src) && !c(w.value.src)), k = i(() => e(S, "fallback")), A = i(() => !l(w.value.fallback) && !c(w.value.fallback)), j = i(() => w.value.icon ?? p), M = i(() => !O.value && !D.value), N = i(() => s(d(_, T.value?.tokens?.size), w.value.size)), P = i(() => s(d(m, T.value?.tokens?.color), w.value.color)), F = i(() => s(d(g, T.value?.tokens?.rounded), w.value.rounded)), I = i(() => s(d(h, T.value?.tokens?.iconSize), w.value.size)), L = i(() => w.value.customProps), R = i(() => t(L.value?.root, C.value.inheritedAttrs, u({
|
|
34
35
|
"inline-flex shrink-0 items-center justify-center overflow-hidden": !0,
|
|
35
36
|
[E.value.root ?? ""]: !0,
|
|
36
37
|
[F.value ?? ""]: !0,
|
|
37
38
|
[N.value ?? ""]: M.value || D.value || O.value,
|
|
38
39
|
[s(P.value, "background") ?? ""]: M.value,
|
|
39
40
|
[s(P.value, "text") ?? ""]: M.value
|
|
40
|
-
}))),
|
|
41
|
+
}))), z = i(() => t(L.value?.image, {
|
|
41
42
|
alt: w.value.alt,
|
|
42
43
|
src: w.value.src
|
|
43
44
|
}, u({
|
|
@@ -45,7 +46,7 @@ function y(y, b) {
|
|
|
45
46
|
[N.value ?? ""]: !0,
|
|
46
47
|
[F.value ?? ""]: !0,
|
|
47
48
|
[E.value.image ?? ""]: !0
|
|
48
|
-
}))),
|
|
49
|
+
}))), B = i(() => t(L.value?.fallback, {}, u({
|
|
49
50
|
"font-medium": !0,
|
|
50
51
|
[s(I.value, "label") ?? ""]: !0,
|
|
51
52
|
[s(P.value, "text") ?? ""]: !0,
|
|
@@ -54,15 +55,15 @@ function y(y, b) {
|
|
|
54
55
|
return {
|
|
55
56
|
slots: S,
|
|
56
57
|
merged: w,
|
|
57
|
-
rootBind:
|
|
58
|
-
iconBind: i(() => t(
|
|
58
|
+
rootBind: R,
|
|
59
|
+
iconBind: i(() => t(L.value?.icon, {}, u({
|
|
59
60
|
"shrink-0": !0,
|
|
60
61
|
[s(I.value, "icon") ?? ""]: !0,
|
|
61
62
|
[s(P.value, "text") ?? ""]: !0
|
|
62
63
|
}))),
|
|
63
64
|
hasImage: O,
|
|
64
|
-
imageBind:
|
|
65
|
-
fallbackBind:
|
|
65
|
+
imageBind: z,
|
|
66
|
+
fallbackBind: B,
|
|
66
67
|
resolvedIcon: j,
|
|
67
68
|
hasFallbackSlot: k,
|
|
68
69
|
hasFallbackText: A,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { AvatarClasses, AvatarColorOverrides, AvatarOwnProps, AvatarProps, AvatarRoundedOverrides, AvatarSizeOverrides, AvatarSlots, } from './avatar.types';
|
|
1
|
+
export type { AvatarClasses, AvatarColorOverrides, AvatarCustomProps, AvatarOwnProps, AvatarProps, AvatarRoundedOverrides, AvatarSizeOverrides, AvatarSlots, } from './avatar.types';
|
|
2
2
|
export { default as Avatar } from './Avatar.vue';
|
|
3
3
|
export { useAvatar } from './composables/useAvatar';
|
|
@@ -2,7 +2,7 @@ import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistr
|
|
|
2
2
|
import { computed as r, useAttrs as i } from "vue";
|
|
3
3
|
import { get as a } from "es-toolkit/compat";
|
|
4
4
|
import { cn as o, mergeBridgeUILayeredClasses as s, splitComponentProps as c } from "@bridge-ui/core";
|
|
5
|
-
import { densityProps as l, roundedProps as u, variantProps as d } from "@bridge-ui/core/
|
|
5
|
+
import { densityProps as l, roundedProps as u, variantProps as d } from "@bridge-ui/core/Tokens/Badge";
|
|
6
6
|
//#region src/Components/Badge/composables/useBadge.ts
|
|
7
7
|
var f = [
|
|
8
8
|
"full",
|
|
@@ -27,7 +27,7 @@ function p(p, m) {
|
|
|
27
27
|
}), y = n({
|
|
28
28
|
entry: v,
|
|
29
29
|
props: () => g.value.componentProps
|
|
30
|
-
}), b = r(() => _.value.density === "mini"), x = r(() => a(s(l, v.value?.
|
|
30
|
+
}), b = r(() => _.value.density === "mini"), x = r(() => a(s(l, v.value?.tokens?.density), [_.value.density, _.value.size])), S = r(() => a(s(d, v.value?.tokens?.variant), [_.value.variant, _.value.color])), C = r(() => a(s(u, v.value?.tokens?.rounded), _.value.rounded));
|
|
31
31
|
return {
|
|
32
32
|
merged: _,
|
|
33
33
|
rootBind: r(() => e({}, g.value.inheritedAttrs, o({
|
|
@@ -7,7 +7,7 @@ export declare function useButton(props: ButtonOwnProps, libDefaults: ButtonLibD
|
|
|
7
7
|
merged: import('vue').ComputedRef<ButtonMerged>;
|
|
8
8
|
isMini: import('vue').ComputedRef<boolean>;
|
|
9
9
|
iconBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", Partial<Omit<import('../../Icon').IconProps, "icon">> | undefined, {}>>;
|
|
10
|
-
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Omit<ButtonProps, "color" | "href" | "icon" | "size" | "classes" | "customProps" | "text" | "full" | "rounded" | "variant" | "
|
|
10
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Omit<ButtonProps, "color" | "href" | "icon" | "size" | "classes" | "customProps" | "text" | "full" | "rounded" | "variant" | "loading" | "density" | "as" | "disabled" | "endIcon" | "startIcon">>>;
|
|
11
11
|
rootHref: import('vue').ComputedRef<string | undefined>;
|
|
12
12
|
rootType: import('vue').ComputedRef<"button" | undefined>;
|
|
13
13
|
endIconBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", Partial<Omit<import('../../Icon').IconProps, "icon">> | undefined, {}>>;
|
|
@@ -2,7 +2,7 @@ import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistr
|
|
|
2
2
|
import { computed as r, useAttrs as i } from "vue";
|
|
3
3
|
import { get as a, includes as o, isNil as s } from "es-toolkit/compat";
|
|
4
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/
|
|
5
|
+
import { densityProps as d, roundedProps as f, variantProps as p } from "@bridge-ui/core/Tokens/Button";
|
|
6
6
|
//#region src/Components/Button/composables/useButton.ts
|
|
7
7
|
var m = [
|
|
8
8
|
"as",
|
|
@@ -46,7 +46,7 @@ function h(h, g) {
|
|
|
46
46
|
"reset",
|
|
47
47
|
"button"
|
|
48
48
|
], e) ? e : "button";
|
|
49
|
-
}), N = r(() => a(l(d, b.value?.
|
|
49
|
+
}), N = r(() => a(l(d, b.value?.tokens?.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?.tokens?.variant), [P.value, y.value.color])), I = r(() => a(l(f, b.value?.tokens?.rounded), y.value.rounded));
|
|
50
50
|
return {
|
|
51
51
|
tag: C,
|
|
52
52
|
merged: y,
|
|
@@ -3,7 +3,7 @@ import { mergePartBind as t, useBridgeUIComponent as n, useBridgeUIMergedRegistr
|
|
|
3
3
|
import { computed as i, useAttrs as a, useSlots as o } from "vue";
|
|
4
4
|
import { get as s } from "es-toolkit/compat";
|
|
5
5
|
import { cn as c, mergeBridgeUILayeredClasses as l, splitComponentProps as u } from "@bridge-ui/core";
|
|
6
|
-
import { paddingProps as d, roundedProps as f, shadowProps as p, variantProps as m } from "@bridge-ui/core/
|
|
6
|
+
import { paddingProps as d, roundedProps as f, shadowProps as p, variantProps as m } from "@bridge-ui/core/Tokens/Card";
|
|
7
7
|
//#region src/Components/Card/composables/useCard.ts
|
|
8
8
|
var h = [
|
|
9
9
|
"title",
|
|
@@ -32,9 +32,9 @@ function g(g, _) {
|
|
|
32
32
|
}), T = i(() => {
|
|
33
33
|
let e = y.default?.();
|
|
34
34
|
return !!(e && e.length > 0);
|
|
35
|
-
}), E = i(() => e(y, "footer")), D = i(() => s(l(m, S.value?.
|
|
36
|
-
if (x.value.variant === "elevated") return s(l(p, S.value?.
|
|
37
|
-
}), A = i(() => s(l(d, S.value?.
|
|
35
|
+
}), E = i(() => e(y, "footer")), D = i(() => s(l(m, S.value?.tokens?.variant), x.value.variant)), O = i(() => x.value.borderless ? !1 : !!s(D.value, "border")), k = i(() => {
|
|
36
|
+
if (x.value.variant === "elevated") return s(l(p, S.value?.tokens?.shadow), x.value.shadow);
|
|
37
|
+
}), A = i(() => s(l(d, S.value?.tokens?.padding), x.value.padding)), j = i(() => s(l(f, S.value?.tokens?.rounded), x.value.rounded)), M = i(() => t(C.value?.body, {}, c({
|
|
38
38
|
grow: !0,
|
|
39
39
|
[s(A.value, "body") ?? ""]: !0,
|
|
40
40
|
[s(D.value, "text") ?? ""]: !0,
|
|
@@ -2,13 +2,13 @@ import { CheckboxOwnProps, CheckboxSlots } from './checkbox.types';
|
|
|
2
2
|
type __VLS_Slots = CheckboxSlots;
|
|
3
3
|
type __VLS_Props = CheckboxOwnProps;
|
|
4
4
|
type __VLS_ModelProps = {
|
|
5
|
-
modelValue?: boolean;
|
|
5
|
+
modelValue?: boolean | undefined;
|
|
6
6
|
};
|
|
7
7
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
8
8
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
|
-
"update:modelValue": (value: boolean) => any;
|
|
9
|
+
"update:modelValue": (value: boolean | undefined) => any;
|
|
10
10
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
11
|
-
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
11
|
+
"onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
|
|
12
12
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
14
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import e from "../FormControl/FormControl.js";
|
|
2
2
|
import { useCheckbox as t } from "./composables/useCheckbox.js";
|
|
3
|
-
import { computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, defineComponent as s, guardReactiveProps as c, mergeModels as l, mergeProps as u, normalizeClass as d, normalizeProps as f, openBlock as p,
|
|
4
|
-
import { cn as
|
|
5
|
-
import { Check as
|
|
3
|
+
import { computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, defineComponent as s, guardReactiveProps as c, mergeModels as l, mergeProps as u, normalizeClass as d, normalizeProps as f, openBlock as p, ref as m, unref as h, useAttrs as g, useModel as _, withCtx as v } from "vue";
|
|
4
|
+
import { cn as y } from "@bridge-ui/core";
|
|
5
|
+
import { Check as b } from "@lucide/vue";
|
|
6
6
|
//#region src/Components/Checkbox/Checkbox.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
7
|
+
var x = ["for"], S = ["checked"], C = {
|
|
8
8
|
key: 1,
|
|
9
9
|
class: "block h-0.5 w-[55%] rounded-full bg-white"
|
|
10
|
-
},
|
|
10
|
+
}, w = /* @__PURE__ */ s({
|
|
11
11
|
inheritAttrs: !1,
|
|
12
12
|
__name: "Checkbox",
|
|
13
13
|
props: /* @__PURE__ */ l({
|
|
14
|
-
checked: { type: Boolean },
|
|
15
14
|
classes: {},
|
|
16
15
|
color: {},
|
|
17
16
|
customProps: {},
|
|
17
|
+
defaultChecked: { type: Boolean },
|
|
18
18
|
indeterminate: { type: Boolean },
|
|
19
19
|
rounded: {},
|
|
20
20
|
size: {},
|
|
@@ -25,7 +25,6 @@ var b = ["for"], x = ["checked"], S = {
|
|
|
25
25
|
endLabel: {},
|
|
26
26
|
error: { type: Boolean },
|
|
27
27
|
errorMessage: {},
|
|
28
|
-
mainLabel: {},
|
|
29
28
|
readonly: { type: Boolean },
|
|
30
29
|
required: { type: Boolean },
|
|
31
30
|
startLabel: {},
|
|
@@ -33,38 +32,39 @@ var b = ["for"], x = ["checked"], S = {
|
|
|
33
32
|
}, {
|
|
34
33
|
modelValue: {
|
|
35
34
|
type: Boolean,
|
|
36
|
-
default:
|
|
35
|
+
default: void 0
|
|
37
36
|
},
|
|
38
37
|
modelModifiers: {}
|
|
39
38
|
}),
|
|
40
39
|
emits: ["update:modelValue"],
|
|
41
40
|
setup(s) {
|
|
42
|
-
let l =
|
|
41
|
+
let l = g(), w = s, T = m(!!w.defaultChecked), E = _(s, "modelValue"), { merged: D, iconBind: O, inputRef: k, fieldBind: A, inputBind: j, isChecked: M, formControl: N, controlBind: P } = t(() => ({
|
|
43
42
|
...l,
|
|
44
|
-
...
|
|
43
|
+
...w
|
|
45
44
|
}), {
|
|
46
45
|
size: "md",
|
|
47
46
|
rounded: "sm",
|
|
48
47
|
color: "primary"
|
|
49
|
-
}, n(() =>
|
|
50
|
-
function
|
|
51
|
-
|
|
48
|
+
}, n(() => E.value ?? T.value));
|
|
49
|
+
function F(e) {
|
|
50
|
+
let t = e.target;
|
|
51
|
+
E.value = t.checked, T.value = t.checked;
|
|
52
52
|
}
|
|
53
|
-
return (t, n) => (p(), r(
|
|
54
|
-
default:
|
|
53
|
+
return (t, n) => (p(), r(h(e), { field: h(N) }, {
|
|
54
|
+
default: v(() => [o("label", u(h(A), { for: h(N).controlId.value }), [o("input", u({
|
|
55
55
|
ref_key: "inputRef",
|
|
56
|
-
ref:
|
|
57
|
-
},
|
|
58
|
-
checked:
|
|
59
|
-
onChange:
|
|
60
|
-
}), null, 16,
|
|
56
|
+
ref: k
|
|
57
|
+
}, h(j), {
|
|
58
|
+
checked: h(M),
|
|
59
|
+
onChange: F
|
|
60
|
+
}), null, 16, S), o("span", f(c(h(P))), [h(M) && !h(D).indeterminate ? (p(), r(h(b), {
|
|
61
61
|
key: 0,
|
|
62
62
|
"stroke-width": 3,
|
|
63
|
-
class: d(
|
|
64
|
-
}, null, 8, ["class"])) :
|
|
63
|
+
class: d(h(y)("h-[65%] w-[65%]", h(O).class))
|
|
64
|
+
}, null, 8, ["class"])) : h(D).indeterminate ? (p(), a("span", C)) : i("", !0)], 16)], 16, x)]),
|
|
65
65
|
_: 1
|
|
66
66
|
}, 8, ["field"]));
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
69
|
//#endregion
|
|
70
|
-
export {
|
|
70
|
+
export { w as default };
|
|
@@ -39,12 +39,6 @@ export interface CheckboxEmits {
|
|
|
39
39
|
"update:modelValue": [value: boolean];
|
|
40
40
|
}
|
|
41
41
|
export interface CheckboxOwnProps extends Omit<FormControlOwnProps, "field" | "slots" | "classes" | "customProps"> {
|
|
42
|
-
/**
|
|
43
|
-
* Whether the checkbox is checked.
|
|
44
|
-
*
|
|
45
|
-
* @default undefined
|
|
46
|
-
*/
|
|
47
|
-
checked?: boolean;
|
|
48
42
|
/**
|
|
49
43
|
* Classes for the form control chrome and the checkbox control.
|
|
50
44
|
*
|
|
@@ -63,6 +57,13 @@ export interface CheckboxOwnProps extends Omit<FormControlOwnProps, "field" | "s
|
|
|
63
57
|
* @default undefined
|
|
64
58
|
*/
|
|
65
59
|
customProps?: CheckboxCustomProps;
|
|
60
|
+
/**
|
|
61
|
+
* Initial checked state for uncontrolled usage (when `v-model` /
|
|
62
|
+
* `modelValue` is not bound).
|
|
63
|
+
*
|
|
64
|
+
* @default false
|
|
65
|
+
*/
|
|
66
|
+
defaultChecked?: boolean;
|
|
66
67
|
/**
|
|
67
68
|
* Whether the checkbox is in an indeterminate state.
|
|
68
69
|
*
|