@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
|
@@ -181,13 +181,13 @@ export declare function useFormField(props: MaybeRefOrGetter<Omit<FormFieldOwnPr
|
|
|
181
181
|
'aria-valuenow'?: (string | number) | undefined;
|
|
182
182
|
'aria-valuetext'?: string | undefined | undefined;
|
|
183
183
|
accesskey?: string | undefined | undefined;
|
|
184
|
-
contenteditable?:
|
|
184
|
+
contenteditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
185
185
|
contextmenu?: string | undefined | undefined;
|
|
186
186
|
dir?: string | undefined | undefined;
|
|
187
187
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
188
188
|
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
189
189
|
enterKeyHint?: "done" | "enter" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
190
|
-
hidden?: "" | "until-found" | (boolean | "true" | "false") |
|
|
190
|
+
hidden?: "" | "until-found" | "hidden" | (boolean | "true" | "false") | undefined;
|
|
191
191
|
inert?: (boolean | "true" | "false") | undefined;
|
|
192
192
|
placeholder?: string | undefined | undefined;
|
|
193
193
|
spellcheck?: (boolean | "true" | "false") | undefined;
|
|
@@ -221,7 +221,7 @@ export declare function useFormField(props: MaybeRefOrGetter<Omit<FormFieldOwnPr
|
|
|
221
221
|
}>>;
|
|
222
222
|
controlId: import('vue').ComputedRef<string>;
|
|
223
223
|
errorBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", HTMLAttributes | undefined, {}>>;
|
|
224
|
-
errorIcon: import('vue').ComputedRef<import('
|
|
224
|
+
errorIcon: import('vue').ComputedRef<NonNullable<import('../../..').IconSource | undefined>>;
|
|
225
225
|
inputBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", {
|
|
226
226
|
id: string;
|
|
227
227
|
disabled: boolean;
|
|
@@ -443,7 +443,7 @@ export declare function useFormField(props: MaybeRefOrGetter<Omit<FormFieldOwnPr
|
|
|
443
443
|
onTransitionend?: ((payload: TransitionEvent) => void) | undefined;
|
|
444
444
|
onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
|
|
445
445
|
onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
|
|
446
|
-
}, Partial<Omit<Omit<FormFieldOwnProps, "field">, "color" | "end" | "size" | "classes" | "customProps" | "
|
|
446
|
+
}, Partial<Omit<Omit<FormFieldOwnProps, "field">, "error" | "color" | "end" | "size" | "classes" | "customProps" | "rounded" | "variant" | "label" | "disabled" | "endIcon" | "startIcon" | "start" | "required" | "description" | "errorMessage" | "readonly" | "withoutErrorMessage" | "errorIcon" | "withErrorIcon" | "corner">>>>;
|
|
447
447
|
isNotched: import('vue').ComputedRef<boolean>;
|
|
448
448
|
isStacked: import('vue').ComputedRef<boolean>;
|
|
449
449
|
startBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", HTMLAttributes | undefined, {}>>;
|
|
@@ -3,10 +3,9 @@ import { mergeNestedComponentProps as n, mergePartBind as r, useBridgeUIComponen
|
|
|
3
3
|
import { computed as o, toValue as s, useId as c, useSlots as l } from "vue";
|
|
4
4
|
import { get as u, omit as d } from "es-toolkit/compat";
|
|
5
5
|
import { cn as f, mergeBridgeUILayeredClasses as p, splitComponentProps as m } from "@bridge-ui/core";
|
|
6
|
-
import {
|
|
7
|
-
import { colorProps as g, invalidatedProps as _, roundedProps as v, sizeProps as y, variantProps as b } from "@bridge-ui/core/Tokens/FormField";
|
|
6
|
+
import { colorProps as h, invalidatedProps as g, roundedProps as _, sizeProps as v, variantProps as y } from "@bridge-ui/core/Tokens/FormField";
|
|
8
7
|
//#region src/Components/FormField/composables/useFormField.ts
|
|
9
|
-
var
|
|
8
|
+
var b = [
|
|
10
9
|
"end",
|
|
11
10
|
"size",
|
|
12
11
|
"color",
|
|
@@ -29,70 +28,70 @@ var x = [
|
|
|
29
28
|
"withErrorIcon",
|
|
30
29
|
"withoutErrorMessage"
|
|
31
30
|
];
|
|
32
|
-
function
|
|
33
|
-
let
|
|
34
|
-
props: s(
|
|
35
|
-
bridgeKeys:
|
|
36
|
-
})), { merged:
|
|
37
|
-
libDefaults:
|
|
31
|
+
function x(x, S, C = {}) {
|
|
32
|
+
let ee = c(), w = l(), T = o(() => m({
|
|
33
|
+
props: s(x),
|
|
34
|
+
bridgeKeys: b
|
|
35
|
+
})), { merged: E, entry: D } = i({
|
|
36
|
+
libDefaults: S,
|
|
38
37
|
componentName: "FormField",
|
|
39
|
-
props: () =>
|
|
40
|
-
}),
|
|
41
|
-
entry:
|
|
42
|
-
props: () =>
|
|
43
|
-
}),
|
|
44
|
-
let e =
|
|
45
|
-
return
|
|
46
|
-
}), U = o(() =>
|
|
38
|
+
props: () => T.value.componentProps
|
|
39
|
+
}), O = o(() => E.value.customProps), k = o(() => C.control?.() ?? "input"), A = a({
|
|
40
|
+
entry: D,
|
|
41
|
+
props: () => T.value.componentProps
|
|
42
|
+
}), j = o(() => E.value.error === !0), M = o(() => !!E.value.disabled), N = o(() => !!E.value.readonly), P = o(() => E.value.variant ?? "outline"), F = o(() => E.value.errorIcon ?? "alert"), I = o(() => P.value === "notched"), L = o(() => P.value === "stacked"), R = o(() => P.value === "underlined"), z = o(() => k.value === "textarea"), B = o(() => z.value && !!C.likeInput?.()), V = o(() => !E.value.withoutErrorMessage), H = o(() => {
|
|
43
|
+
let e = T.value.inheritedAttrs.id;
|
|
44
|
+
return E.value.controlId ?? e ?? ee;
|
|
45
|
+
}), U = o(() => j.value && t(w, "errorMessage", E.value.errorMessage)), W = o(() => (I.value || L.value) && (t(w, "label", E.value.label) || t(w, "corner", E.value.corner))), G = o(() => t(w, "label", E.value.label) ? "justify-between items-end" : "justify-end"), K = o(() => {
|
|
47
46
|
let e = [];
|
|
48
|
-
return !
|
|
49
|
-
}), q = o(() => u(p(
|
|
50
|
-
let e =
|
|
47
|
+
return !j.value && t(w, "description", E.value.description) && e.push(`${H.value}-description`), j.value && !E.value.withoutErrorMessage && t(w, "errorMessage", E.value.errorMessage) && e.push(`${H.value}-error`), e.length > 0 ? e.join(" ") : void 0;
|
|
48
|
+
}), q = o(() => u(p(v, D.value?.tokens?.size), [E.value.size, P.value])), J = o(() => u(p(h, D.value?.tokens?.color), E.value.color ?? "primary")), Y = o(() => p(g, D.value?.tokens?.invalidated, E.value.customProps?.invalidated)), X = o(() => j.value ? Y.value : void 0), Z = o(() => u(p(_, D.value?.tokens?.rounded), E.value.rounded)), Q = o(() => u(p(y, D.value?.tokens?.variant), P.value)), te = o(() => {
|
|
49
|
+
let e = j.value ? Y.value : J.value;
|
|
51
50
|
return R.value ? e?.underlined : e?.input;
|
|
52
|
-
}),
|
|
51
|
+
}), ne = o(() => {
|
|
53
52
|
if (L.value) return f({
|
|
54
53
|
[q.value?.insetTop ?? ""]: !0,
|
|
55
54
|
[q.value?.insetStart ?? ""]: !0,
|
|
56
55
|
[q.value?.insetEnd ?? ""]: !0
|
|
57
56
|
});
|
|
58
|
-
}),
|
|
59
|
-
let t = C.reservedSlots?.() ?? [], n = e(
|
|
57
|
+
}), re = o(() => {
|
|
58
|
+
let t = C.reservedSlots?.() ?? [], n = e(w, "end") || t.includes("end"), r = e(w, "start") || t.includes("start");
|
|
60
59
|
if (!L.value) return !r && !n ? q.value?.padding : f({
|
|
61
60
|
[q.value?.insetStart ?? ""]: !r,
|
|
62
61
|
[q.value?.insetEnd ?? ""]: !n
|
|
63
62
|
});
|
|
64
|
-
}),
|
|
63
|
+
}), ie = o(() => r(O.value?.end, {}, f({
|
|
65
64
|
"shrink-0 self-center flex items-center whitespace-nowrap select-none pointer-events-none": !0,
|
|
66
|
-
"text-gray-500": !
|
|
65
|
+
"text-gray-500": !j.value,
|
|
67
66
|
[Z.value?.end ?? ""]: !R.value && !L.value,
|
|
68
|
-
[J.value?.end ?? ""]: !
|
|
69
|
-
[X.value?.adornment ?? ""]:
|
|
70
|
-
[
|
|
71
|
-
}))),
|
|
72
|
-
let e =
|
|
73
|
-
return r(
|
|
67
|
+
[J.value?.end ?? ""]: !j.value,
|
|
68
|
+
[X.value?.adornment ?? ""]: j.value,
|
|
69
|
+
[A.value.end ?? ""]: !0
|
|
70
|
+
}))), ae = o(() => {
|
|
71
|
+
let e = T.value.inheritedAttrs;
|
|
72
|
+
return r(O.value?.root, {
|
|
74
73
|
class: f(e.class),
|
|
75
74
|
...d(e, ["class"])
|
|
76
75
|
}, f({
|
|
77
76
|
"group w-full relative": !0,
|
|
78
77
|
"aria-disabled:pointer-events-none aria-disabled:select-none aria-disabled:opacity-60": !0,
|
|
79
78
|
"aria-readonly:pointer-events-none aria-readonly:select-none": !0,
|
|
80
|
-
[
|
|
79
|
+
[A.value.root ?? ""]: !0
|
|
81
80
|
}));
|
|
82
|
-
}),
|
|
81
|
+
}), oe = o(() => r(O.value?.errorMessage, {}, f({
|
|
83
82
|
"mt-2": !0,
|
|
84
83
|
"min-h-[1lh]": V.value,
|
|
85
84
|
[X.value?.errorMessage ?? ""]: !0,
|
|
86
85
|
[q.value?.text ?? ""]: !0,
|
|
87
|
-
[
|
|
88
|
-
}))),
|
|
89
|
-
...
|
|
86
|
+
[A.value.errorMessage ?? ""]: !0
|
|
87
|
+
}))), $ = o(() => r({
|
|
88
|
+
...O.value?.input,
|
|
90
89
|
id: H.value,
|
|
91
|
-
disabled:
|
|
92
|
-
readonly:
|
|
90
|
+
disabled: M.value,
|
|
91
|
+
readonly: N.value,
|
|
93
92
|
"aria-describedby": K.value,
|
|
94
|
-
"aria-invalid":
|
|
95
|
-
}, d(
|
|
93
|
+
"aria-invalid": j.value || void 0
|
|
94
|
+
}, d(T.value.inheritedAttrs, ["class"]), f({
|
|
96
95
|
"flex-1 min-w-0 min-h-0 bg-transparent border-0 shadow-none": !0,
|
|
97
96
|
"h-full": !z.value && !L.value,
|
|
98
97
|
"max-h-none": z.value,
|
|
@@ -102,34 +101,34 @@ function S(S, ee, C = {}) {
|
|
|
102
101
|
[q.value?.input ?? ""]: !z.value,
|
|
103
102
|
[q.value?.textarea ?? ""]: z.value,
|
|
104
103
|
[q.value?.textareaLikeInput ?? ""]: B.value,
|
|
105
|
-
[
|
|
106
|
-
}))),
|
|
104
|
+
[A.value.input ?? ""]: !0
|
|
105
|
+
}))), se = o(() => n(O.value?.label, {
|
|
107
106
|
for: H.value,
|
|
108
|
-
size:
|
|
109
|
-
error:
|
|
110
|
-
required:
|
|
107
|
+
size: E.value.size,
|
|
108
|
+
error: j.value,
|
|
109
|
+
required: E.value.required,
|
|
111
110
|
classes: {
|
|
112
|
-
required:
|
|
111
|
+
required: A.value.required,
|
|
113
112
|
root: f({
|
|
114
113
|
[Q.value?.label ?? ""]: I.value,
|
|
115
|
-
[
|
|
114
|
+
[A.value.label ?? ""]: !0
|
|
116
115
|
})
|
|
117
116
|
}
|
|
118
|
-
})),
|
|
117
|
+
})), ce = o(() => r(O.value?.start, {}, f({
|
|
119
118
|
"shrink-0 self-center flex items-center whitespace-nowrap select-none pointer-events-none": !0,
|
|
120
|
-
"text-gray-400": !
|
|
119
|
+
"text-gray-400": !j.value,
|
|
121
120
|
[Z.value?.start ?? ""]: !R.value && !L.value,
|
|
122
|
-
[J.value?.start ?? ""]: !
|
|
123
|
-
[X.value?.adornment ?? ""]:
|
|
124
|
-
[
|
|
125
|
-
}))),
|
|
121
|
+
[J.value?.start ?? ""]: !j.value,
|
|
122
|
+
[X.value?.adornment ?? ""]: j.value,
|
|
123
|
+
[A.value.start ?? ""]: !0
|
|
124
|
+
}))), le = o(() => r(O.value?.corner, {}, f({
|
|
126
125
|
"text-gray-500 dark:text-gray-400": !I.value,
|
|
127
126
|
[q.value?.text ?? ""]: !0,
|
|
128
127
|
[Q.value?.corner ?? ""]: I.value,
|
|
129
|
-
[
|
|
130
|
-
}))),
|
|
131
|
-
let e = t(
|
|
132
|
-
return r(
|
|
128
|
+
[A.value.corner ?? ""]: !0
|
|
129
|
+
}))), ue = o(() => {
|
|
130
|
+
let e = t(w, "label", E.value.label);
|
|
131
|
+
return r(O.value?.header, {}, f({
|
|
133
132
|
flex: !0,
|
|
134
133
|
"w-full shrink-0": !0,
|
|
135
134
|
"justify-between": e,
|
|
@@ -137,84 +136,84 @@ function S(S, ee, C = {}) {
|
|
|
137
136
|
"items-center": I.value,
|
|
138
137
|
"items-end": L.value,
|
|
139
138
|
[Q.value?.labelRow ?? ""]: W.value,
|
|
140
|
-
[
|
|
139
|
+
[A.value.header ?? ""]: !0
|
|
141
140
|
}));
|
|
142
|
-
}),
|
|
141
|
+
}), de = o(() => r(O.value?.header, {}, f({
|
|
143
142
|
flex: !0,
|
|
144
143
|
"mb-1": !0,
|
|
145
144
|
[G.value]: !0,
|
|
146
|
-
[
|
|
147
|
-
}))),
|
|
145
|
+
[A.value.header ?? ""]: !0
|
|
146
|
+
}))), fe = o(() => r(O.value?.endIcon, {}, f({ "inline-flex shrink-0 items-center justify-center self-center": L.value }))), pe = o(() => r(O.value?.end, {}, f({
|
|
148
147
|
"group/end wrapper-end-slot shrink-0 flex w-auto items-stretch self-stretch [&>*]:min-h-0": !0,
|
|
149
148
|
"self-stretch min-h-0 overflow-hidden py-0.5 pe-0.5": L.value,
|
|
150
149
|
"h-full min-h-0 overflow-hidden py-0.5 pe-0.5": !L.value,
|
|
151
|
-
[
|
|
152
|
-
}))),
|
|
150
|
+
[A.value.end ?? ""]: !0
|
|
151
|
+
}))), me = o(() => r({}, {}, f({
|
|
153
152
|
"flex min-h-0 min-w-0 flex-1 flex-col": !0,
|
|
154
|
-
[
|
|
155
|
-
}))),
|
|
153
|
+
[ne.value ?? ""]: !0
|
|
154
|
+
}))), he = o(() => r({}, {}, f({
|
|
156
155
|
"flex w-full min-w-0 flex-1 items-stretch gap-x-2": !0,
|
|
157
156
|
[q.value?.controlRow ?? ""]: !0
|
|
158
157
|
})));
|
|
159
158
|
return {
|
|
160
|
-
slots:
|
|
161
|
-
merged:
|
|
162
|
-
control:
|
|
163
|
-
endBind:
|
|
164
|
-
rootBind:
|
|
159
|
+
slots: w,
|
|
160
|
+
merged: E,
|
|
161
|
+
control: k,
|
|
162
|
+
endBind: ie,
|
|
163
|
+
rootBind: ae,
|
|
165
164
|
controlId: H,
|
|
166
|
-
errorBind:
|
|
167
|
-
errorIcon:
|
|
168
|
-
inputBind:
|
|
165
|
+
errorBind: oe,
|
|
166
|
+
errorIcon: F,
|
|
167
|
+
inputBind: $,
|
|
169
168
|
isNotched: I,
|
|
170
169
|
isStacked: L,
|
|
171
|
-
startBind:
|
|
172
|
-
cornerBind:
|
|
173
|
-
headerBind:
|
|
174
|
-
isDisabled:
|
|
175
|
-
isReadonly:
|
|
176
|
-
variantKey:
|
|
177
|
-
endIconBind:
|
|
178
|
-
endSlotBind:
|
|
179
|
-
invalidated:
|
|
180
|
-
containerBind: o(() => r(
|
|
170
|
+
startBind: ce,
|
|
171
|
+
cornerBind: le,
|
|
172
|
+
headerBind: de,
|
|
173
|
+
isDisabled: M,
|
|
174
|
+
isReadonly: N,
|
|
175
|
+
variantKey: P,
|
|
176
|
+
endIconBind: fe,
|
|
177
|
+
endSlotBind: pe,
|
|
178
|
+
invalidated: j,
|
|
179
|
+
containerBind: o(() => r(O.value?.container, { "data-bridge-rounded": E.value.rounded ?? "md" }, f({
|
|
181
180
|
"group/field relative flex flex-row items-stretch overflow-hidden": L.value,
|
|
182
181
|
"group/field relative flex justify-start gap-x-2 items-stretch": !L.value,
|
|
183
182
|
"transition-all ease-in-out duration-150 outline-none": !0,
|
|
184
|
-
"bg-gray-100 dark:bg-gray-800":
|
|
183
|
+
"bg-gray-100 dark:bg-gray-800": M.value && !j.value,
|
|
185
184
|
[q.value?.container ?? ""]: !z.value,
|
|
186
185
|
[q.value?.containerTextareaLikeInput ?? ""]: B.value,
|
|
187
186
|
[q.value?.containerTextarea ?? ""]: z.value && !B.value,
|
|
188
187
|
[Q.value?.container ?? ""]: !0,
|
|
189
188
|
[Z.value?.input ?? ""]: !R.value,
|
|
190
|
-
[
|
|
191
|
-
[
|
|
189
|
+
[re.value ?? ""]: !0,
|
|
190
|
+
[te.value ?? ""]: !0,
|
|
192
191
|
"rounded-none": R.value,
|
|
193
|
-
[X.value?.container ?? ""]:
|
|
194
|
-
[X.value?.containerUnderlined ?? ""]:
|
|
195
|
-
[
|
|
192
|
+
[X.value?.container ?? ""]: j.value && !R.value,
|
|
193
|
+
[X.value?.containerUnderlined ?? ""]: j.value && R.value,
|
|
194
|
+
[A.value.container ?? ""]: !0
|
|
196
195
|
}))),
|
|
197
|
-
startIconBind: o(() => r(
|
|
198
|
-
startSlotBind: o(() => r(
|
|
196
|
+
startIconBind: o(() => r(O.value?.startIcon, {}, f({ "inline-flex shrink-0 items-center justify-center self-center": L.value }))),
|
|
197
|
+
startSlotBind: o(() => r(O.value?.start, {}, f({
|
|
199
198
|
"group/start wrapper-start-slot shrink-0 flex w-auto items-stretch self-stretch [&>*]:min-h-0": !0,
|
|
200
199
|
"self-stretch min-h-0 overflow-hidden py-0.5 ps-0.5": L.value,
|
|
201
200
|
"h-full min-h-0 overflow-hidden py-0.5 ps-0.5": !L.value,
|
|
202
|
-
[
|
|
201
|
+
[A.value.start ?? ""]: !0
|
|
203
202
|
}))),
|
|
204
|
-
fieldLabelProps:
|
|
203
|
+
fieldLabelProps: se,
|
|
205
204
|
ariaDescribedBy: K,
|
|
206
|
-
descriptionBind: o(() => r(
|
|
205
|
+
descriptionBind: o(() => r(O.value?.description, {}, f({
|
|
207
206
|
"mt-2 text-gray-500 dark:text-gray-400": !0,
|
|
208
207
|
[q.value?.text ?? ""]: !0,
|
|
209
|
-
[
|
|
208
|
+
[A.value.description ?? ""]: !0
|
|
210
209
|
}))),
|
|
211
|
-
stackedBodyBind:
|
|
210
|
+
stackedBodyBind: me,
|
|
212
211
|
hasInsetLabelRow: W,
|
|
213
|
-
insetLabelRowBind:
|
|
214
|
-
stackedInputRowBind:
|
|
212
|
+
insetLabelRowBind: ue,
|
|
213
|
+
stackedInputRowBind: he,
|
|
215
214
|
showErrorMessageContent: U,
|
|
216
215
|
reservesErrorMessageSpace: V
|
|
217
216
|
};
|
|
218
217
|
}
|
|
219
218
|
//#endregion
|
|
220
|
-
export {
|
|
219
|
+
export { b as formFieldBridgeKeys, x as useFormField };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LucideIcon } from '@lucide/vue';
|
|
2
1
|
import { HTMLAttributes, InputHTMLAttributes, Slot } from 'vue';
|
|
3
2
|
import { FormFieldColor, FormFieldInvalidated, FormFieldRounded, FormFieldSize, FormFieldVariant, MergeHtmlProps, MergeProps } from '@bridge-ui/core';
|
|
3
|
+
import { IconSource } from '../../Adapters/Icon';
|
|
4
4
|
import { UseFormFieldReturn } from './composables/useFormField';
|
|
5
5
|
import { IconProps } from '../Icon';
|
|
6
6
|
import { LabelProps } from '../Label/label.types';
|
|
@@ -167,7 +167,7 @@ export interface FormFieldOwnProps {
|
|
|
167
167
|
*
|
|
168
168
|
* @default undefined
|
|
169
169
|
*/
|
|
170
|
-
endIcon?:
|
|
170
|
+
endIcon?: IconSource;
|
|
171
171
|
/**
|
|
172
172
|
* When `true`, applies invalid styling on the label and hides description.
|
|
173
173
|
*
|
|
@@ -177,9 +177,9 @@ export interface FormFieldOwnProps {
|
|
|
177
177
|
/**
|
|
178
178
|
* Icon used when `withErrorIcon` is enabled and the field is invalid.
|
|
179
179
|
*
|
|
180
|
-
* @default
|
|
180
|
+
* @default "alert"
|
|
181
181
|
*/
|
|
182
|
-
errorIcon?:
|
|
182
|
+
errorIcon?: IconSource;
|
|
183
183
|
/**
|
|
184
184
|
* Error message below the control. Shown only when set (or via `#errorMessage`
|
|
185
185
|
* slot).
|
|
@@ -241,7 +241,7 @@ export interface FormFieldOwnProps {
|
|
|
241
241
|
*
|
|
242
242
|
* @default undefined
|
|
243
243
|
*/
|
|
244
|
-
startIcon?:
|
|
244
|
+
startIcon?: IconSource;
|
|
245
245
|
/**
|
|
246
246
|
* The visual variant of the field shell and control.
|
|
247
247
|
*
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { useIcon as e } from "./composables/useIcon.js";
|
|
2
|
-
import { createBlock as t,
|
|
2
|
+
import { createBlock as t, createCommentVNode as n, defineComponent as r, mergeProps as i, normalizeProps as a, openBlock as o, resolveDynamicComponent as s, unref as c } from "vue";
|
|
3
3
|
//#region src/Components/Icon/Icon.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var
|
|
4
|
+
var l = /* @__PURE__ */ r({
|
|
5
5
|
inheritAttrs: !1,
|
|
6
6
|
__name: "Icon",
|
|
7
7
|
props: {
|
|
8
|
-
icon: {
|
|
8
|
+
icon: {},
|
|
9
9
|
size: {}
|
|
10
10
|
},
|
|
11
|
-
setup(
|
|
12
|
-
let {
|
|
13
|
-
return (e,
|
|
11
|
+
setup(r) {
|
|
12
|
+
let { rootBind: l, resolvedIcon: u } = e(r, { size: "md" });
|
|
13
|
+
return (e, r) => c(u) ? (o(), t(s(c(u)), a(i({ key: 0 }, c(l))), null, 16)) : n("", !0);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
//#endregion
|
|
17
|
-
export {
|
|
17
|
+
export { l as default };
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { LibDefaultsShape, MergeLibDefaults } from '@bridge-ui/core';
|
|
2
|
+
import { IconElement } from '../../../Adapters/Icon';
|
|
2
3
|
import { IconOwnProps, IconProps } from '../icon.types';
|
|
3
4
|
type IconLibDefaults = LibDefaultsShape<IconOwnProps, "size">;
|
|
4
5
|
type IconMerged = MergeLibDefaults<IconOwnProps, IconLibDefaults>;
|
|
5
6
|
export declare function useIcon(props: IconOwnProps, libDefaults: IconLibDefaults): {
|
|
6
7
|
merged: import('vue').ComputedRef<IconMerged>;
|
|
7
8
|
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", {}, Omit<IconProps, "icon" | "size">>>;
|
|
9
|
+
resolvedIcon: import('vue').ComputedRef<IconElement | null | undefined>;
|
|
8
10
|
};
|
|
9
11
|
export {};
|
|
@@ -1,26 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { useIconAdapter as e } from "../../../Adapters/Icon/useIconAdapter.js";
|
|
2
|
+
import { mergePartBind as t, useBridgeUIComponent as n } from "../../../Utils/index.js";
|
|
3
|
+
import { computed as r, useAttrs as i } from "vue";
|
|
4
|
+
import { get as a } from "es-toolkit/compat";
|
|
5
|
+
import { cn as o, mergeBridgeUILayeredClasses as s, resolveIconSource as c, splitComponentProps as l } from "@bridge-ui/core";
|
|
6
|
+
import { sizeProps as u } from "@bridge-ui/core/Tokens/Icon";
|
|
6
7
|
//#region src/Components/Icon/composables/useIcon.ts
|
|
7
|
-
var
|
|
8
|
-
function
|
|
9
|
-
let
|
|
10
|
-
bridgeKeys:
|
|
8
|
+
var d = ["icon", "size"];
|
|
9
|
+
function f(f, p) {
|
|
10
|
+
let m = i(), h = r(() => l({
|
|
11
|
+
bridgeKeys: d,
|
|
11
12
|
props: {
|
|
12
|
-
...
|
|
13
|
-
...
|
|
13
|
+
...m,
|
|
14
|
+
...f
|
|
14
15
|
}
|
|
15
|
-
})), { merged:
|
|
16
|
-
libDefaults:
|
|
16
|
+
})), { merged: g, entry: _ } = n({
|
|
17
|
+
libDefaults: p,
|
|
17
18
|
componentName: "Icon",
|
|
18
|
-
props: () =>
|
|
19
|
-
}), g =
|
|
19
|
+
props: () => h.value.componentProps
|
|
20
|
+
}), v = e(), y = r(() => c(g.value.icon, v.value)), b = r(() => a(s(u, _.value?.tokens?.size), g.value.size));
|
|
20
21
|
return {
|
|
21
|
-
merged:
|
|
22
|
-
rootBind:
|
|
22
|
+
merged: g,
|
|
23
|
+
rootBind: r(() => t({}, h.value.inheritedAttrs, o({ [b.value ?? ""]: !0 }))),
|
|
24
|
+
resolvedIcon: y
|
|
23
25
|
};
|
|
24
26
|
}
|
|
25
27
|
//#endregion
|
|
26
|
-
export {
|
|
28
|
+
export { f as useIcon };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { LucideIcon } from '@lucide/vue';
|
|
2
1
|
import { SVGAttributes } from 'vue';
|
|
3
2
|
import { IconSize, MergeHtmlProps, MergeProps } from '@bridge-ui/core';
|
|
3
|
+
import { IconSource } from '../../Adapters/Icon';
|
|
4
4
|
export interface IconSizeOverrides {}
|
|
5
5
|
export interface IconOwnProps {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Semantic icon name, icon component, or adapter-normalized native value.
|
|
8
8
|
*/
|
|
9
|
-
icon:
|
|
9
|
+
icon: IconSource;
|
|
10
10
|
/**
|
|
11
11
|
* The size of the icon.
|
|
12
12
|
*
|
|
@@ -4,7 +4,7 @@ type LabelLibDefaults = LibDefaultsShape<LabelOwnProps, "size">;
|
|
|
4
4
|
type LabelMerged = MergeLibDefaults<LabelOwnProps, LabelLibDefaults>;
|
|
5
5
|
export declare function useLabel(props: LabelOwnProps, libDefaults: LabelLibDefaults): {
|
|
6
6
|
merged: import('vue').ComputedRef<LabelMerged>;
|
|
7
|
-
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", {}, Omit<LabelProps, "
|
|
7
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", {}, Omit<LabelProps, "error" | "size" | "classes" | "required">>>;
|
|
8
8
|
requiredBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", {}, {}>>;
|
|
9
9
|
};
|
|
10
10
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LucideIcon } from '@lucide/vue';
|
|
2
1
|
import { AnchorHTMLAttributes, HTMLAttributes, Slot } from 'vue';
|
|
3
2
|
import { LinkColor, LinkSize, LinkUnderline, MergeHtmlProps, MergeProps } from '@bridge-ui/core';
|
|
3
|
+
import { IconSource } from '../../Adapters/Icon';
|
|
4
4
|
import { IconProps } from '../Icon';
|
|
5
5
|
export interface LinkSizeOverrides {}
|
|
6
6
|
export interface LinkColorOverrides {}
|
|
@@ -76,13 +76,13 @@ export interface LinkOwnProps {
|
|
|
76
76
|
*
|
|
77
77
|
* @default undefined
|
|
78
78
|
*/
|
|
79
|
-
leftIcon?:
|
|
79
|
+
leftIcon?: IconSource;
|
|
80
80
|
/**
|
|
81
81
|
* The icon to display after the link text.
|
|
82
82
|
*
|
|
83
83
|
* @default undefined
|
|
84
84
|
*/
|
|
85
|
-
rightIcon?:
|
|
85
|
+
rightIcon?: IconSource;
|
|
86
86
|
/**
|
|
87
87
|
* The size of the link.
|
|
88
88
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LucideIcon } from '@lucide/vue';
|
|
2
1
|
import { useSlots, Slot } from 'vue';
|
|
3
2
|
import { LibDefaultsShape, MergeLibDefaults } from '@bridge-ui/core';
|
|
3
|
+
import { IconSource } from '../../../Adapters/Icon';
|
|
4
4
|
import { ListItemOwnProps, ListItemProps } from '../listItem.types';
|
|
5
5
|
type ListItemLibDefaults = LibDefaultsShape<ListItemOwnProps, "role">;
|
|
6
6
|
type ListItemMerged = MergeLibDefaults<ListItemOwnProps, ListItemLibDefaults>;
|
|
@@ -34,7 +34,7 @@ export declare function useListItem(props: ListItemOwnProps, libDefaults: ListIt
|
|
|
34
34
|
size: "sm";
|
|
35
35
|
class: string;
|
|
36
36
|
}, "class", Partial<Omit<import('../../Icon').IconProps, "icon">> | undefined, {}>>;
|
|
37
|
-
resolvedSelectedIcon: import('vue').ComputedRef<
|
|
37
|
+
resolvedSelectedIcon: import('vue').ComputedRef<IconSource | null>;
|
|
38
38
|
};
|
|
39
39
|
export declare function resolveListItemPrimary(slots: ReturnType<typeof useSlots>, primary?: string): Slot | (() => null | string);
|
|
40
40
|
export {};
|