@bridge-ui/vue 0.0.5 → 0.0.6
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/Adapters/I18n/index.d.ts +1 -0
- package/dist/Adapters/I18n/index.js +2 -0
- package/dist/Adapters/I18n/useI18nAdapter.d.ts +12 -0
- package/dist/Adapters/I18n/useI18nAdapter.js +13 -0
- package/dist/Adapters/Icon/iconSource.types.d.ts +11 -0
- package/dist/Adapters/Icon/index.d.ts +2 -0
- package/dist/Adapters/Icon/index.js +2 -0
- package/dist/Adapters/Icon/useIconAdapter.d.ts +11 -0
- package/dist/Adapters/Icon/useIconAdapter.js +13 -0
- package/dist/Adapters/index.d.ts +3 -0
- package/dist/Adapters/index.js +3 -0
- package/dist/Components/Alert/Alert.vue_vue_type_script_setup_true_lang.js +1 -5
- package/dist/Components/Alert/alert.types.d.ts +2 -2
- package/dist/Components/Alert/alertDefaultIcons.d.ts +2 -2
- package/dist/Components/Alert/alertDefaultIcons.js +9 -10
- package/dist/Components/Alert/composables/useAlert.d.ts +2 -2
- package/dist/Components/Avatar/Avatar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/Avatar/avatar.types.d.ts +2 -2
- package/dist/Components/Avatar/composables/useAvatar.d.ts +1 -1
- package/dist/Components/Avatar/composables/useAvatar.js +43 -44
- package/dist/Components/Button/Button.vue_vue_type_script_setup_true_lang.js +24 -25
- package/dist/Components/Button/button.types.d.ts +4 -4
- package/dist/Components/Button/composables/useButton.d.ts +1 -1
- package/dist/Components/Checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +25 -25
- package/dist/Components/Checkbox/composables/useCheckbox.d.ts +3 -3
- package/dist/Components/Chip/Chip.vue_vue_type_script_setup_true_lang.js +8 -9
- package/dist/Components/FormControl/composables/useFormControl.d.ts +1 -1
- package/dist/Components/FormField/composables/useFormField.d.ts +4 -4
- package/dist/Components/FormField/composables/useFormField.js +98 -99
- package/dist/Components/FormField/formField.types.d.ts +5 -5
- package/dist/Components/Icon/Icon.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/Components/Icon/composables/useIcon.d.ts +2 -0
- package/dist/Components/Icon/composables/useIcon.js +20 -18
- package/dist/Components/Icon/icon.types.d.ts +3 -3
- package/dist/Components/Label/composables/useLabel.d.ts +1 -1
- package/dist/Components/Link/Link.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/Link/link.types.d.ts +3 -3
- package/dist/Components/ListItem/composables/useListItem.d.ts +2 -2
- package/dist/Components/ListItem/composables/useListItem.js +75 -76
- package/dist/Components/ListItem/listItem.types.d.ts +2 -2
- package/dist/Components/Listbox/Listbox.vue.d.ts +0 -2
- package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +73 -72
- package/dist/Components/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js +40 -40
- package/dist/Components/NumberField/composables/useNumberField.d.ts +6 -6
- package/dist/Components/PasswordField/PasswordField.vue_vue_type_script_setup_true_lang.js +24 -24
- package/dist/Components/PasswordField/composables/usePasswordField.d.ts +6 -6
- package/dist/Components/Radio/composables/useRadio.d.ts +3 -3
- package/dist/Components/Select/Select.vue.d.ts +0 -1
- package/dist/Components/Select/Select.vue_vue_type_script_setup_true_lang.js +62 -61
- package/dist/Components/Select/composables/useSelect.d.ts +8 -8
- package/dist/Components/Select/composables/useSelect.js +214 -214
- package/dist/Components/Snackbar/Snackbar.vue_vue_type_script_setup_true_lang.js +81 -75
- package/dist/Components/Snackbar/composables/useSnackbar.d.ts +4 -4
- package/dist/Components/Snackbar/snackbar.types.d.ts +2 -2
- package/dist/Components/Snackbar/snackbarDefaultIcons.d.ts +3 -3
- package/dist/Components/Snackbar/snackbarDefaultIcons.js +9 -10
- package/dist/Components/Switch/composables/useSwitch.d.ts +3 -3
- package/dist/Components/Tab/Tab.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/Tab/tab.types.d.ts +3 -3
- package/dist/Components/TabItem/TabItem.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/TabItem/tabItem.types.d.ts +3 -3
- package/dist/Components/Tabs/composables/useTabs.d.ts +468 -4
- package/dist/Components/Tabs/tabsInjectionKey.d.ts +5 -5
- package/dist/Components/TextField/composables/useTextField.d.ts +6 -6
- package/dist/Components/Textarea/composables/useTextarea.d.ts +6 -6
- package/dist/Components/Tooltip/Tooltip.js +5 -0
- package/dist/Components/Tooltip/Tooltip.vue.d.ts +35 -0
- package/dist/Components/Tooltip/Tooltip.vue_vue_type_script_setup_true_lang.js +73 -0
- package/dist/Components/Tooltip/composables/useTooltip.d.ts +50 -0
- package/dist/Components/Tooltip/composables/useTooltip.js +208 -0
- package/dist/Components/Tooltip/index.d.ts +4 -0
- package/dist/Components/Tooltip/index.js +3 -0
- package/dist/Components/Tooltip/tooltip.types.d.ts +166 -0
- package/dist/Provider/createBridgeUIApi.js +2 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +80 -76
- package/package.json +20 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { setI18nAdapterForTests, useI18nAdapter, } from './useI18nAdapter';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import { I18nAdapter } from '@bridge-ui/core';
|
|
3
|
+
/**
|
|
4
|
+
* Sets a process-wide i18n adapter fallback. For tests only.
|
|
5
|
+
*/
|
|
6
|
+
export declare function setI18nAdapterForTests(adapter: undefined | I18nAdapter): void;
|
|
7
|
+
/**
|
|
8
|
+
* Returns the active i18n adapter from {@link BridgeUIProvider}.
|
|
9
|
+
* When unset, `resolveMessage` returns the English source string
|
|
10
|
+
* (see `examples/adapters/vue`).
|
|
11
|
+
*/
|
|
12
|
+
export declare function useI18nAdapter(): ComputedRef<undefined | I18nAdapter>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useBridgeUI as e } from "../../Provider/useBridgeUI.js";
|
|
2
|
+
import { computed as t } from "vue";
|
|
3
|
+
//#region src/Adapters/I18n/useI18nAdapter.ts
|
|
4
|
+
var n;
|
|
5
|
+
function r(e) {
|
|
6
|
+
n = e;
|
|
7
|
+
}
|
|
8
|
+
function i() {
|
|
9
|
+
let r = e();
|
|
10
|
+
return t(() => r?.global.value.i18n ?? n);
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { r as setI18nAdapterForTests, i as useI18nAdapter };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { IconSource as CoreIconSource, IconSourceValueOverrides, SemanticIconName } from '@bridge-ui/core';
|
|
3
|
+
/**
|
|
4
|
+
* Renderable icon component accepted by Bridge Icon props.
|
|
5
|
+
*/
|
|
6
|
+
export type IconElement = Component;
|
|
7
|
+
/**
|
|
8
|
+
* Semantic icon name, concrete icon component, or an augmented native value.
|
|
9
|
+
*/
|
|
10
|
+
export type IconSource = CoreIconSource<IconElement>;
|
|
11
|
+
export type { IconSourceValueOverrides, SemanticIconName };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import { IconAdapter } from '@bridge-ui/core';
|
|
3
|
+
/**
|
|
4
|
+
* Sets a process-wide icon adapter fallback. For tests only.
|
|
5
|
+
*/
|
|
6
|
+
export declare function setIconAdapterForTests(adapter: undefined | IconAdapter): void;
|
|
7
|
+
/**
|
|
8
|
+
* Returns the active icon adapter from {@link BridgeUIProvider}.
|
|
9
|
+
* Semantic icon names require `global.icons` (see `examples/adapters/vue`).
|
|
10
|
+
*/
|
|
11
|
+
export declare function useIconAdapter(): ComputedRef<undefined | IconAdapter>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useBridgeUI as e } from "../../Provider/useBridgeUI.js";
|
|
2
|
+
import { computed as t } from "vue";
|
|
3
|
+
//#region src/Adapters/Icon/useIconAdapter.ts
|
|
4
|
+
var n;
|
|
5
|
+
function r(e) {
|
|
6
|
+
n = e;
|
|
7
|
+
}
|
|
8
|
+
function i() {
|
|
9
|
+
let r = e();
|
|
10
|
+
return t(() => r?.global.value.icons ?? n);
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { r as setIconAdapterForTests, i as useIconAdapter };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { setI18nAdapterForTests as e, useI18nAdapter as t } from "./I18n/useI18nAdapter.js";
|
|
2
|
+
import { setIconAdapterForTests as n, useIconAdapter as r } from "./Icon/useIconAdapter.js";
|
|
3
|
+
export { e as setI18nAdapterForTests, n as setIconAdapterForTests, t as useI18nAdapter, r as useIconAdapter };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LucideIcon } from '@lucide/vue';
|
|
2
1
|
import { HTMLAttributes, Slot } from 'vue';
|
|
3
2
|
import { AlertColor, AlertPadding, AlertRounded, AlertShadow, AlertVariant, MergeHtmlProps, MergeProps } from '@bridge-ui/core';
|
|
3
|
+
import { IconSource } from '../../Adapters/Icon';
|
|
4
4
|
import { IconProps } from '../Icon';
|
|
5
5
|
export interface AlertColorOverrides {}
|
|
6
6
|
export interface AlertShadowOverrides {}
|
|
@@ -73,7 +73,7 @@ export interface AlertOwnProps {
|
|
|
73
73
|
*
|
|
74
74
|
* @default undefined
|
|
75
75
|
*/
|
|
76
|
-
icon?: null |
|
|
76
|
+
icon?: null | IconSource;
|
|
77
77
|
/**
|
|
78
78
|
* The padding to apply to the alert.
|
|
79
79
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LucideIcon } from '@lucide/vue';
|
|
2
1
|
import { AlertColor } from '@bridge-ui/core/Tokens/Alert';
|
|
2
|
+
import { IconSource } from '../../Adapters/Icon';
|
|
3
3
|
/** Library fallbacks when neither the `icon` prop nor theme `icon` is set. */
|
|
4
|
-
export declare const alertDefaultIcons: Record<keyof AlertColor,
|
|
4
|
+
export declare const alertDefaultIcons: Record<keyof AlertColor, IconSource>;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { Bell as e, CircleAlert as t, CircleCheck as n, CircleX as r, Info as i, TriangleAlert as a } from "@lucide/vue";
|
|
2
1
|
//#region src/Components/Alert/alertDefaultIcons.ts
|
|
3
|
-
var
|
|
4
|
-
dark:
|
|
5
|
-
|
|
6
|
-
error:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
success:
|
|
10
|
-
warning:
|
|
2
|
+
var e = {
|
|
3
|
+
dark: "info",
|
|
4
|
+
info: "alert",
|
|
5
|
+
error: "error",
|
|
6
|
+
primary: "bell",
|
|
7
|
+
secondary: "info",
|
|
8
|
+
success: "success",
|
|
9
|
+
warning: "warning"
|
|
11
10
|
};
|
|
12
11
|
//#endregion
|
|
13
|
-
export {
|
|
12
|
+
export { e as alertDefaultIcons };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LucideIcon } from '@lucide/vue';
|
|
2
1
|
import { LibDefaultsShape, MergeLibDefaults } from '@bridge-ui/core';
|
|
2
|
+
import { IconSource } from '../../../Adapters/Icon';
|
|
3
3
|
import { AlertOwnProps, AlertProps } from '..';
|
|
4
4
|
type AlertLibDefaults = LibDefaultsShape<AlertOwnProps, "color" | "shadow" | "padding" | "rounded" | "variant">;
|
|
5
5
|
type AlertMerged = MergeLibDefaults<AlertOwnProps, AlertLibDefaults>;
|
|
@@ -12,7 +12,7 @@ export declare function useAlert(props: AlertOwnProps, libDefaults: AlertLibDefa
|
|
|
12
12
|
iconBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", Partial<Omit<import('../../Icon').IconProps, "icon">> | undefined, {}>>;
|
|
13
13
|
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Omit<AlertProps, "color" | "icon" | "classes" | "customProps" | "title" | "padding" | "rounded" | "shadow" | "variant">>>;
|
|
14
14
|
titleBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
15
|
-
resolvedIcon: import('vue').ComputedRef<
|
|
15
|
+
resolvedIcon: import('vue').ComputedRef<IconSource | null>;
|
|
16
16
|
hasDefaultBody: import('vue').ComputedRef<boolean>;
|
|
17
17
|
};
|
|
18
18
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LucideIcon } from '@lucide/vue';
|
|
2
1
|
import { HTMLAttributes, ImgHTMLAttributes, Slot } from 'vue';
|
|
3
2
|
import { AvatarColor, AvatarRounded, AvatarSize, MergeHtmlProps, MergeProps } from '@bridge-ui/core';
|
|
3
|
+
import { IconSource } from '../../Adapters/Icon';
|
|
4
4
|
import { IconProps } from '../Icon';
|
|
5
5
|
export interface AvatarSizeOverrides {}
|
|
6
6
|
export interface AvatarColorOverrides {}
|
|
@@ -81,7 +81,7 @@ export interface AvatarOwnProps {
|
|
|
81
81
|
*
|
|
82
82
|
* @default undefined
|
|
83
83
|
*/
|
|
84
|
-
icon?:
|
|
84
|
+
icon?: IconSource;
|
|
85
85
|
/**
|
|
86
86
|
* The roundedness of the avatar.
|
|
87
87
|
*
|
|
@@ -15,7 +15,7 @@ export declare function useAvatar(props: AvatarProps, libDefaults: AvatarLibDefa
|
|
|
15
15
|
src: string | undefined;
|
|
16
16
|
}>>;
|
|
17
17
|
fallbackBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
18
|
-
resolvedIcon: import('vue').ComputedRef<import('
|
|
18
|
+
resolvedIcon: import('vue').ComputedRef<import('../../..').IconSource>;
|
|
19
19
|
hasFallbackSlot: import('vue').ComputedRef<boolean>;
|
|
20
20
|
hasFallbackText: import('vue').ComputedRef<boolean>;
|
|
21
21
|
hasCustomContent: import('vue').ComputedRef<boolean>;
|
|
@@ -3,10 +3,9 @@ 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, 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
|
-
import {
|
|
7
|
-
import { colorProps as m, iconSizeProps as h, roundedProps as g, sizeProps as _ } from "@bridge-ui/core/Tokens/Avatar";
|
|
6
|
+
import { colorProps as p, iconSizeProps as m, roundedProps as h, sizeProps as g } from "@bridge-ui/core/Tokens/Avatar";
|
|
8
7
|
//#region src/Components/Avatar/composables/useAvatar.ts
|
|
9
|
-
var
|
|
8
|
+
var _ = [
|
|
10
9
|
"alt",
|
|
11
10
|
"src",
|
|
12
11
|
"icon",
|
|
@@ -17,58 +16,58 @@ var v = [
|
|
|
17
16
|
"fallback",
|
|
18
17
|
"customProps"
|
|
19
18
|
];
|
|
20
|
-
function
|
|
21
|
-
let
|
|
22
|
-
bridgeKeys:
|
|
19
|
+
function v(v, y) {
|
|
20
|
+
let b = a(), x = o(), S = i(() => f({
|
|
21
|
+
bridgeKeys: _,
|
|
23
22
|
props: {
|
|
24
|
-
...
|
|
25
|
-
...
|
|
23
|
+
...b,
|
|
24
|
+
...v
|
|
26
25
|
}
|
|
27
|
-
})), { merged:
|
|
28
|
-
libDefaults:
|
|
26
|
+
})), { merged: C, entry: w } = n({
|
|
27
|
+
libDefaults: y,
|
|
29
28
|
componentName: "Avatar",
|
|
30
|
-
props: () =>
|
|
31
|
-
}),
|
|
32
|
-
entry:
|
|
33
|
-
props: () =>
|
|
34
|
-
}),
|
|
29
|
+
props: () => S.value.componentProps
|
|
30
|
+
}), T = r({
|
|
31
|
+
entry: w,
|
|
32
|
+
props: () => S.value.componentProps
|
|
33
|
+
}), E = i(() => e(x, "default")), D = i(() => !l(C.value.src) && !c(C.value.src)), O = i(() => e(x, "fallback")), k = i(() => !l(C.value.fallback) && !c(C.value.fallback)), A = i(() => C.value.icon ?? "user"), j = i(() => !D.value && !E.value), M = i(() => s(d(g, w.value?.tokens?.size), C.value.size)), N = i(() => s(d(p, w.value?.tokens?.color), C.value.color)), P = i(() => s(d(h, w.value?.tokens?.rounded), C.value.rounded)), F = i(() => s(d(m, w.value?.tokens?.iconSize), C.value.size)), I = i(() => C.value.customProps), L = i(() => t(I.value?.root, S.value.inheritedAttrs, u({
|
|
35
34
|
"inline-flex shrink-0 items-center justify-center overflow-hidden": !0,
|
|
36
|
-
[
|
|
37
|
-
[
|
|
38
|
-
[
|
|
39
|
-
[s(
|
|
40
|
-
[s(
|
|
41
|
-
}))),
|
|
42
|
-
alt:
|
|
43
|
-
src:
|
|
35
|
+
[T.value.root ?? ""]: !0,
|
|
36
|
+
[P.value ?? ""]: !0,
|
|
37
|
+
[M.value ?? ""]: j.value || E.value || D.value,
|
|
38
|
+
[s(N.value, "background") ?? ""]: j.value,
|
|
39
|
+
[s(N.value, "text") ?? ""]: j.value
|
|
40
|
+
}))), R = i(() => t(I.value?.image, {
|
|
41
|
+
alt: C.value.alt,
|
|
42
|
+
src: C.value.src
|
|
44
43
|
}, u({
|
|
45
44
|
"shrink-0 object-cover object-center": !0,
|
|
46
|
-
[
|
|
47
|
-
[
|
|
48
|
-
[
|
|
49
|
-
}))),
|
|
45
|
+
[M.value ?? ""]: !0,
|
|
46
|
+
[P.value ?? ""]: !0,
|
|
47
|
+
[T.value.image ?? ""]: !0
|
|
48
|
+
}))), z = i(() => t(I.value?.fallback, {}, u({
|
|
50
49
|
"font-medium": !0,
|
|
51
|
-
[s(
|
|
52
|
-
[s(
|
|
53
|
-
[
|
|
50
|
+
[s(F.value, "label") ?? ""]: !0,
|
|
51
|
+
[s(N.value, "text") ?? ""]: !0,
|
|
52
|
+
[T.value.fallback ?? ""]: !0
|
|
54
53
|
})));
|
|
55
54
|
return {
|
|
56
|
-
slots:
|
|
57
|
-
merged:
|
|
58
|
-
rootBind:
|
|
59
|
-
iconBind: i(() => t(
|
|
55
|
+
slots: x,
|
|
56
|
+
merged: C,
|
|
57
|
+
rootBind: L,
|
|
58
|
+
iconBind: i(() => t(I.value?.icon, {}, u({
|
|
60
59
|
"shrink-0": !0,
|
|
61
|
-
[s(
|
|
62
|
-
[s(
|
|
60
|
+
[s(F.value, "icon") ?? ""]: !0,
|
|
61
|
+
[s(N.value, "text") ?? ""]: !0
|
|
63
62
|
}))),
|
|
64
|
-
hasImage:
|
|
65
|
-
imageBind:
|
|
66
|
-
fallbackBind:
|
|
67
|
-
resolvedIcon:
|
|
68
|
-
hasFallbackSlot:
|
|
69
|
-
hasFallbackText:
|
|
70
|
-
hasCustomContent:
|
|
63
|
+
hasImage: D,
|
|
64
|
+
imageBind: R,
|
|
65
|
+
fallbackBind: z,
|
|
66
|
+
resolvedIcon: A,
|
|
67
|
+
hasFallbackSlot: O,
|
|
68
|
+
hasFallbackText: k,
|
|
69
|
+
hasCustomContent: E
|
|
71
70
|
};
|
|
72
71
|
}
|
|
73
72
|
//#endregion
|
|
74
|
-
export {
|
|
73
|
+
export { v as useAvatar };
|
|
@@ -2,9 +2,8 @@ import { hasNamedSlot as e, isPropPresent as t, resolveNamedSlot as n } from "..
|
|
|
2
2
|
import r from "../Icon/Icon.js";
|
|
3
3
|
import { useButton as i } from "./composables/useButton.js";
|
|
4
4
|
import { Fragment as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createTextVNode as l, defineComponent as u, mergeProps as d, normalizeProps as f, openBlock as p, resolveDynamicComponent as m, toDisplayString as h, unref as g, useSlots as _, withCtx as v } from "vue";
|
|
5
|
-
import { Loader2 as y } from "@lucide/vue";
|
|
6
5
|
//#region src/Components/Button/Button.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
6
|
+
var y = /* @__PURE__ */ u({
|
|
8
7
|
inheritAttrs: !1,
|
|
9
8
|
__name: "Button",
|
|
10
9
|
props: {
|
|
@@ -14,19 +13,19 @@ var b = /* @__PURE__ */ u({
|
|
|
14
13
|
customProps: {},
|
|
15
14
|
density: {},
|
|
16
15
|
disabled: { type: Boolean },
|
|
17
|
-
endIcon: {
|
|
16
|
+
endIcon: {},
|
|
18
17
|
full: { type: Boolean },
|
|
19
18
|
href: {},
|
|
20
|
-
icon: {
|
|
19
|
+
icon: {},
|
|
21
20
|
loading: { type: Boolean },
|
|
22
21
|
rounded: {},
|
|
23
22
|
size: {},
|
|
24
|
-
startIcon: {
|
|
23
|
+
startIcon: {},
|
|
25
24
|
text: {},
|
|
26
25
|
variant: {}
|
|
27
26
|
},
|
|
28
27
|
setup(u) {
|
|
29
|
-
let
|
|
28
|
+
let y = u, b = _(), { tag: x, merged: S, isMini: C, iconBind: w, rootBind: T, rootHref: E, rootType: D, endIconBind: O, endSlotBind: k, rootAriaBusy: A, rootDisabled: j, startIconBind: M, startSlotBind: N, loadingIconBind: P, rootAriaDisabled: F } = i(y, {
|
|
30
29
|
size: "md",
|
|
31
30
|
as: "button",
|
|
32
31
|
rounded: "md",
|
|
@@ -34,29 +33,29 @@ var b = /* @__PURE__ */ u({
|
|
|
34
33
|
variant: "solid",
|
|
35
34
|
density: "default"
|
|
36
35
|
});
|
|
37
|
-
return (i, u) => (p(), o(m(g(
|
|
38
|
-
type: g(
|
|
39
|
-
disabled: g(
|
|
40
|
-
"aria-busy": g(
|
|
41
|
-
"aria-disabled": g(
|
|
36
|
+
return (i, u) => (p(), o(m(g(x)), d({ href: g(E) }, g(T), {
|
|
37
|
+
type: g(D),
|
|
38
|
+
disabled: g(j),
|
|
39
|
+
"aria-busy": g(A),
|
|
40
|
+
"aria-disabled": g(F)
|
|
42
41
|
}), {
|
|
43
|
-
default: v(() => [g(
|
|
42
|
+
default: v(() => [g(S).loading ? (p(), o(g(r), d({
|
|
44
43
|
key: 0,
|
|
45
|
-
icon:
|
|
46
|
-
size: g(
|
|
47
|
-
}, g(
|
|
48
|
-
icon: g(
|
|
49
|
-
size: g(
|
|
44
|
+
icon: "loader",
|
|
45
|
+
size: g(S).size
|
|
46
|
+
}, g(P)), null, 16, ["size"])) : g(C) ? (p(), c(a, { key: 1 }, [g(e)(g(b), "default") ? (p(), o(m(g(n)(g(b), "default")), { key: 0 })) : g(S).icon ? (p(), o(g(r), d({ key: 1 }, g(w), {
|
|
47
|
+
icon: g(S).icon,
|
|
48
|
+
size: g(S).size
|
|
50
49
|
}), null, 16, ["icon", "size"])) : s("", !0)], 64)) : (p(), c(a, { key: 2 }, [
|
|
51
|
-
g(
|
|
50
|
+
g(S).startIcon ? (p(), o(g(r), d({
|
|
52
51
|
key: 0,
|
|
53
|
-
size: g(
|
|
54
|
-
}, g(
|
|
55
|
-
g(t)(g(
|
|
56
|
-
g(
|
|
52
|
+
size: g(S).size
|
|
53
|
+
}, g(M), { icon: g(S).startIcon }), null, 16, ["size", "icon"])) : g(e)(g(b), "start") ? (p(), c("div", f(d({ key: 1 }, g(N))), [(p(), o(m(g(n)(g(b), "start"))))], 16)) : s("", !0),
|
|
54
|
+
g(t)(g(S).text) ? (p(), c(a, { key: 2 }, [l(h(g(S).text), 1)], 64)) : g(e)(g(b), "default") ? (p(), o(m(g(n)(g(b), "default")), { key: 3 })) : s("", !0),
|
|
55
|
+
g(S).endIcon ? (p(), o(g(r), d({
|
|
57
56
|
key: 4,
|
|
58
|
-
size: g(
|
|
59
|
-
}, g(
|
|
57
|
+
size: g(S).size
|
|
58
|
+
}, g(O), { icon: g(S).endIcon }), null, 16, ["size", "icon"])) : g(e)(g(b), "end") ? (p(), c("div", f(d({ key: 5 }, g(k))), [(p(), o(m(g(n)(g(b), "end"))))], 16)) : s("", !0)
|
|
60
59
|
], 64))]),
|
|
61
60
|
_: 1
|
|
62
61
|
}, 16, [
|
|
@@ -69,4 +68,4 @@ var b = /* @__PURE__ */ u({
|
|
|
69
68
|
}
|
|
70
69
|
});
|
|
71
70
|
//#endregion
|
|
72
|
-
export {
|
|
71
|
+
export { y as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LucideIcon } from '@lucide/vue';
|
|
2
1
|
import { AnchorHTMLAttributes, ButtonHTMLAttributes, HTMLAttributes, Slot } from 'vue';
|
|
3
2
|
import { ButtonColor, ButtonDensity, ButtonRounded, ButtonSize, ButtonVariant, MergeHtmlProps, MergeProps } from '@bridge-ui/core';
|
|
3
|
+
import { IconSource } from '../../Adapters/Icon';
|
|
4
4
|
import { IconProps } from '../Icon';
|
|
5
5
|
export interface ButtonSizeOverrides {}
|
|
6
6
|
export interface ButtonColorOverrides {}
|
|
@@ -102,7 +102,7 @@ export interface ButtonOwnProps {
|
|
|
102
102
|
*
|
|
103
103
|
* @default undefined
|
|
104
104
|
*/
|
|
105
|
-
endIcon?:
|
|
105
|
+
endIcon?: IconSource;
|
|
106
106
|
/**
|
|
107
107
|
* Whether the button is full width.
|
|
108
108
|
*
|
|
@@ -120,7 +120,7 @@ export interface ButtonOwnProps {
|
|
|
120
120
|
*
|
|
121
121
|
* @default undefined
|
|
122
122
|
*/
|
|
123
|
-
icon?:
|
|
123
|
+
icon?: IconSource;
|
|
124
124
|
/**
|
|
125
125
|
* Whether the button is loading.
|
|
126
126
|
*
|
|
@@ -144,7 +144,7 @@ export interface ButtonOwnProps {
|
|
|
144
144
|
*
|
|
145
145
|
* @default undefined
|
|
146
146
|
*/
|
|
147
|
-
startIcon?:
|
|
147
|
+
startIcon?: IconSource;
|
|
148
148
|
/**
|
|
149
149
|
* Label text when the default slot is not used.
|
|
150
150
|
*
|
|
@@ -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" | "
|
|
10
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Omit<ButtonProps, "color" | "href" | "icon" | "size" | "classes" | "customProps" | "full" | "rounded" | "variant" | "text" | "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, {}>>;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { useIconAdapter as e } from "../../Adapters/Icon/useIconAdapter.js";
|
|
2
|
+
import t from "../FormControl/FormControl.js";
|
|
3
|
+
import { useCheckbox as n } from "./composables/useCheckbox.js";
|
|
4
|
+
import { computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, defineComponent as c, guardReactiveProps as l, mergeModels as u, mergeProps as d, normalizeClass as f, normalizeProps as p, openBlock as m, ref as h, resolveDynamicComponent as g, unref as _, useAttrs as v, useModel as y, withCtx as b } from "vue";
|
|
5
|
+
import { cn as x, resolveIconSource as S } from "@bridge-ui/core";
|
|
6
6
|
//#region src/Components/Checkbox/Checkbox.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
7
|
+
var C = ["for"], w = ["checked"], T = {
|
|
8
8
|
key: 1,
|
|
9
9
|
class: "block h-0.5 w-[55%] rounded-full bg-white"
|
|
10
|
-
},
|
|
10
|
+
}, E = /* @__PURE__ */ c({
|
|
11
11
|
inheritAttrs: !1,
|
|
12
12
|
__name: "Checkbox",
|
|
13
|
-
props: /* @__PURE__ */
|
|
13
|
+
props: /* @__PURE__ */ u({
|
|
14
14
|
classes: {},
|
|
15
15
|
color: {},
|
|
16
16
|
customProps: {},
|
|
@@ -37,34 +37,34 @@ var x = ["for"], S = ["checked"], C = {
|
|
|
37
37
|
modelModifiers: {}
|
|
38
38
|
}),
|
|
39
39
|
emits: ["update:modelValue"],
|
|
40
|
-
setup(
|
|
41
|
-
let
|
|
42
|
-
...
|
|
43
|
-
...
|
|
40
|
+
setup(c) {
|
|
41
|
+
let u = v(), E = c, D = h(!!E.defaultChecked), O = y(c, "modelValue"), k = r(() => O.value ?? D.value), A = e(), j = r(() => S("check", A.value)), { merged: M, iconBind: N, inputRef: P, fieldBind: F, inputBind: I, isChecked: L, formControl: R, controlBind: z } = n(() => ({
|
|
42
|
+
...u,
|
|
43
|
+
...E
|
|
44
44
|
}), {
|
|
45
45
|
size: "md",
|
|
46
46
|
rounded: "sm",
|
|
47
47
|
color: "primary"
|
|
48
|
-
},
|
|
49
|
-
function
|
|
48
|
+
}, k);
|
|
49
|
+
function B(e) {
|
|
50
50
|
let t = e.target;
|
|
51
|
-
|
|
51
|
+
O.value = t.checked, D.value = t.checked;
|
|
52
52
|
}
|
|
53
|
-
return (
|
|
54
|
-
default:
|
|
53
|
+
return (e, n) => (m(), i(_(t), { field: _(R) }, {
|
|
54
|
+
default: b(() => [s("label", d(_(F), { for: _(R).controlId.value }), [s("input", d({
|
|
55
55
|
ref_key: "inputRef",
|
|
56
|
-
ref:
|
|
57
|
-
},
|
|
58
|
-
checked:
|
|
59
|
-
onChange:
|
|
60
|
-
}), null, 16,
|
|
56
|
+
ref: P
|
|
57
|
+
}, _(I), {
|
|
58
|
+
checked: _(L),
|
|
59
|
+
onChange: B
|
|
60
|
+
}), null, 16, w), s("span", p(l(_(z))), [_(L) && !_(M).indeterminate ? (m(), i(g(j.value), {
|
|
61
61
|
key: 0,
|
|
62
62
|
"stroke-width": 3,
|
|
63
|
-
class:
|
|
64
|
-
}, null, 8, ["class"])) :
|
|
63
|
+
class: f(_(x)("h-[65%] w-[65%]", _(N).class))
|
|
64
|
+
}, null, 8, ["class"])) : _(M).indeterminate ? (m(), o("span", T)) : a("", !0)], 16)], 16, C)]),
|
|
65
65
|
_: 1
|
|
66
66
|
}, 8, ["field"]));
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
69
|
//#endregion
|
|
70
|
-
export {
|
|
70
|
+
export { E as default };
|
|
@@ -235,13 +235,13 @@ export declare function useCheckbox(props: MaybeRefOrGetter<CheckboxOwnProps>, l
|
|
|
235
235
|
slots: Readonly<{
|
|
236
236
|
[name: string]: import('vue').Slot<any> | undefined;
|
|
237
237
|
}>;
|
|
238
|
-
merged: import('vue').ComputedRef<Omit<import('../../FormControl').FormControlOwnProps, "
|
|
239
|
-
size: NonNullable<keyof import('@bridge-ui/core').LabelSize | undefined>;
|
|
238
|
+
merged: import('vue').ComputedRef<Omit<import('../../FormControl').FormControlOwnProps, "error" | "size" | "withoutErrorMessage"> & {
|
|
240
239
|
error: NonNullable<boolean | undefined>;
|
|
240
|
+
size: NonNullable<keyof import('@bridge-ui/core').LabelSize | undefined>;
|
|
241
241
|
withoutErrorMessage: NonNullable<boolean | undefined>;
|
|
242
242
|
}>;
|
|
243
243
|
rowBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
244
|
-
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Partial<Omit<Omit<import('../../FormControl').FormControlOwnProps, "field">, "
|
|
244
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Partial<Omit<Omit<import('../../FormControl').FormControlOwnProps, "field">, "error" | "size" | "classes" | "customProps" | "disabled" | "required" | "controlId" | "description" | "endLabel" | "errorMessage" | "readonly" | "startLabel" | "withoutErrorMessage">>>>;
|
|
245
245
|
controlId: import('vue').ComputedRef<string>;
|
|
246
246
|
isDisabled: import('vue').ComputedRef<boolean>;
|
|
247
247
|
isReadonly: import('vue').ComputedRef<boolean>;
|
|
@@ -2,9 +2,8 @@ import { hasNamedSlot as e, resolveNamedSlot as t } from "../../Utils/slotOrProp
|
|
|
2
2
|
import n from "../Icon/Icon.js";
|
|
3
3
|
import { useChip as r } from "./composables/useChip.js";
|
|
4
4
|
import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createTextVNode as l, createVNode as u, defineComponent as d, guardReactiveProps as f, mergeProps as p, normalizeProps as m, openBlock as h, resolveDynamicComponent as g, toDisplayString as _, unref as v, useSlots as y } from "vue";
|
|
5
|
-
import { X as b } from "@lucide/vue";
|
|
6
5
|
//#region src/Components/Chip/Chip.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
6
|
+
var b = /* @__PURE__ */ d({
|
|
8
7
|
inheritAttrs: !1,
|
|
9
8
|
__name: "Chip",
|
|
10
9
|
props: {
|
|
@@ -23,13 +22,13 @@ var x = /* @__PURE__ */ d({
|
|
|
23
22
|
size: { default: "md" }
|
|
24
23
|
},
|
|
25
24
|
emits: ["dismiss"],
|
|
26
|
-
setup(d, { emit:
|
|
27
|
-
let
|
|
28
|
-
return (r, a) => (h(), c("span", m(f(v(
|
|
29
|
-
onClick: a[0] ||= (...e) => v(
|
|
30
|
-
onKeydown: a[1] ||= (...e) => v(
|
|
31
|
-
}), [u(v(n), p({ icon:
|
|
25
|
+
setup(d, { emit: b }) {
|
|
26
|
+
let x = y(), { merged: S, rootBind: C, labelBind: w, clearBind: T, clearIconSize: E, handleDismiss: D, handleClearKeyDown: O } = r(d, { size: "md" }, b), k = a(() => S.value.customProps?.clearIcon), A = a(() => E.value), j = a(() => e(x, "default") || !!S.value.label);
|
|
27
|
+
return (r, a) => (h(), c("span", m(f(v(C))), [j.value ? (h(), c("span", m(p({ key: 0 }, v(w))), [v(e)(v(x), "default") ? (h(), o(g(v(t)(v(x), "default")), { key: 0 })) : (h(), c(i, { key: 1 }, [l(_(d.label), 1)], 64))], 16)) : s("", !0), d.dismissible ? (h(), c("span", p({ key: 1 }, v(T), {
|
|
28
|
+
onClick: a[0] ||= (...e) => v(D) && v(D)(...e),
|
|
29
|
+
onKeydown: a[1] ||= (...e) => v(O) && v(O)(...e)
|
|
30
|
+
}), [u(v(n), p({ icon: "clear" }, k.value, { size: A.value }), null, 16, ["size"])], 16)) : s("", !0)], 16));
|
|
32
31
|
}
|
|
33
32
|
});
|
|
34
33
|
//#endregion
|
|
35
|
-
export {
|
|
34
|
+
export { b as default };
|
|
@@ -11,7 +11,7 @@ export declare function useFormControl(props: MaybeRefOrGetter<Omit<FormControlO
|
|
|
11
11
|
}>;
|
|
12
12
|
merged: import('vue').ComputedRef<FormControlMerged>;
|
|
13
13
|
rowBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", HTMLAttributes | undefined, {}>>;
|
|
14
|
-
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", HTMLAttributes | undefined, Partial<Omit<Omit<FormControlOwnProps, "field">, "
|
|
14
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", HTMLAttributes | undefined, Partial<Omit<Omit<FormControlOwnProps, "field">, "error" | "size" | "classes" | "customProps" | "disabled" | "required" | "controlId" | "description" | "endLabel" | "errorMessage" | "readonly" | "startLabel" | "withoutErrorMessage">>>>;
|
|
15
15
|
controlId: import('vue').ComputedRef<string>;
|
|
16
16
|
isDisabled: import('vue').ComputedRef<boolean>;
|
|
17
17
|
isReadonly: import('vue').ComputedRef<boolean>;
|