@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,12 +1,12 @@
|
|
|
1
1
|
import { hasNamedSlot as e, hasSlotOrProp as t } from "../../../Utils/slotOrProp.js";
|
|
2
|
-
import {
|
|
3
|
-
import { computed as
|
|
4
|
-
import { get as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { CircleAlert as
|
|
7
|
-
import { colorProps as
|
|
2
|
+
import { mergeNestedComponentProps as n, mergePartBind as r, useBridgeUIComponent as i, useBridgeUIMergedRegistryClasses as a } from "../../../Utils/index.js";
|
|
3
|
+
import { computed as o, toValue as s, useId as c, useSlots as l } from "vue";
|
|
4
|
+
import { get as u, omit as d } from "es-toolkit/compat";
|
|
5
|
+
import { cn as f, mergeBridgeUILayeredClasses as p, splitComponentProps as m } from "@bridge-ui/core";
|
|
6
|
+
import { CircleAlert as h } from "@lucide/vue";
|
|
7
|
+
import { colorProps as g, invalidatedProps as _, roundedProps as v, sizeProps as y, variantProps as b } from "@bridge-ui/core/Tokens/FormField";
|
|
8
8
|
//#region src/Components/FormField/composables/useFormField.ts
|
|
9
|
-
var
|
|
9
|
+
var x = [
|
|
10
10
|
"end",
|
|
11
11
|
"size",
|
|
12
12
|
"color",
|
|
@@ -29,70 +29,70 @@ var b = [
|
|
|
29
29
|
"withErrorIcon",
|
|
30
30
|
"withoutErrorMessage"
|
|
31
31
|
];
|
|
32
|
-
function
|
|
33
|
-
let
|
|
34
|
-
props:
|
|
35
|
-
bridgeKeys:
|
|
36
|
-
})), { merged:
|
|
37
|
-
libDefaults:
|
|
32
|
+
function S(S, ee, C = {}) {
|
|
33
|
+
let w = c(), T = l(), E = o(() => m({
|
|
34
|
+
props: s(S),
|
|
35
|
+
bridgeKeys: x
|
|
36
|
+
})), { merged: D, entry: O } = i({
|
|
37
|
+
libDefaults: ee,
|
|
38
38
|
componentName: "FormField",
|
|
39
|
-
props: () =>
|
|
40
|
-
}),
|
|
41
|
-
entry:
|
|
42
|
-
props: () =>
|
|
43
|
-
}),
|
|
44
|
-
let e =
|
|
45
|
-
return
|
|
46
|
-
}), U =
|
|
39
|
+
props: () => E.value.componentProps
|
|
40
|
+
}), k = o(() => D.value.customProps), A = o(() => C.control?.() ?? "input"), j = a({
|
|
41
|
+
entry: O,
|
|
42
|
+
props: () => E.value.componentProps
|
|
43
|
+
}), M = o(() => D.value.error === !0), N = o(() => !!D.value.disabled), P = o(() => !!D.value.readonly), F = o(() => D.value.variant ?? "outline"), te = o(() => D.value.errorIcon ?? h), I = o(() => F.value === "notched"), L = o(() => F.value === "stacked"), R = o(() => F.value === "underlined"), z = o(() => A.value === "textarea"), B = o(() => z.value && !!C.likeInput?.()), V = o(() => !D.value.withoutErrorMessage), H = o(() => {
|
|
44
|
+
let e = E.value.inheritedAttrs.id;
|
|
45
|
+
return D.value.controlId ?? e ?? w;
|
|
46
|
+
}), U = o(() => M.value && t(T, "errorMessage", D.value.errorMessage)), W = o(() => (I.value || L.value) && (t(T, "label", D.value.label) || t(T, "corner", D.value.corner))), G = o(() => t(T, "label", D.value.label) ? "justify-between items-end" : "justify-end"), K = o(() => {
|
|
47
47
|
let e = [];
|
|
48
|
-
return !
|
|
49
|
-
}), q =
|
|
50
|
-
let e =
|
|
48
|
+
return !M.value && t(T, "description", D.value.description) && e.push(`${H.value}-description`), M.value && !D.value.withoutErrorMessage && t(T, "errorMessage", D.value.errorMessage) && e.push(`${H.value}-error`), e.length > 0 ? e.join(" ") : void 0;
|
|
49
|
+
}), q = o(() => u(p(y, O.value?.tokens?.size), [D.value.size, F.value])), J = o(() => u(p(g, O.value?.tokens?.color), D.value.color ?? "primary")), Y = o(() => p(_, O.value?.tokens?.invalidated, D.value.customProps?.invalidated)), X = o(() => M.value ? Y.value : void 0), Z = o(() => u(p(v, O.value?.tokens?.rounded), D.value.rounded)), Q = o(() => u(p(b, O.value?.tokens?.variant), F.value)), ne = o(() => {
|
|
50
|
+
let e = M.value ? Y.value : J.value;
|
|
51
51
|
return R.value ? e?.underlined : e?.input;
|
|
52
|
-
}),
|
|
53
|
-
if (L.value) return
|
|
52
|
+
}), re = o(() => {
|
|
53
|
+
if (L.value) return f({
|
|
54
54
|
[q.value?.insetTop ?? ""]: !0,
|
|
55
55
|
[q.value?.insetStart ?? ""]: !0,
|
|
56
56
|
[q.value?.insetEnd ?? ""]: !0
|
|
57
57
|
});
|
|
58
|
-
}),
|
|
59
|
-
let t = C.reservedSlots?.() ?? [], n = e(
|
|
60
|
-
if (!L.value) return !r && !n ? q.value?.padding :
|
|
58
|
+
}), ie = o(() => {
|
|
59
|
+
let t = C.reservedSlots?.() ?? [], n = e(T, "end") || t.includes("end"), r = e(T, "start") || t.includes("start");
|
|
60
|
+
if (!L.value) return !r && !n ? q.value?.padding : f({
|
|
61
61
|
[q.value?.insetStart ?? ""]: !r,
|
|
62
62
|
[q.value?.insetEnd ?? ""]: !n
|
|
63
63
|
});
|
|
64
|
-
}),
|
|
64
|
+
}), ae = o(() => r(k.value?.end, {}, f({
|
|
65
65
|
"shrink-0 self-center flex items-center whitespace-nowrap select-none pointer-events-none": !0,
|
|
66
|
-
"text-gray-500": !
|
|
66
|
+
"text-gray-500": !M.value,
|
|
67
67
|
[Z.value?.end ?? ""]: !R.value && !L.value,
|
|
68
|
-
[J.value?.end ?? ""]: !
|
|
69
|
-
[X.value?.adornment ?? ""]:
|
|
70
|
-
[
|
|
71
|
-
}))),
|
|
72
|
-
let e =
|
|
73
|
-
return
|
|
74
|
-
class:
|
|
75
|
-
...
|
|
76
|
-
},
|
|
68
|
+
[J.value?.end ?? ""]: !M.value,
|
|
69
|
+
[X.value?.adornment ?? ""]: M.value,
|
|
70
|
+
[j.value.end ?? ""]: !0
|
|
71
|
+
}))), oe = o(() => {
|
|
72
|
+
let e = E.value.inheritedAttrs;
|
|
73
|
+
return r(k.value?.root, {
|
|
74
|
+
class: f(e.class),
|
|
75
|
+
...d(e, ["class"])
|
|
76
|
+
}, f({
|
|
77
77
|
"group w-full relative": !0,
|
|
78
78
|
"aria-disabled:pointer-events-none aria-disabled:select-none aria-disabled:opacity-60": !0,
|
|
79
79
|
"aria-readonly:pointer-events-none aria-readonly:select-none": !0,
|
|
80
|
-
[
|
|
80
|
+
[j.value.root ?? ""]: !0
|
|
81
81
|
}));
|
|
82
|
-
}),
|
|
82
|
+
}), $ = o(() => r(k.value?.errorMessage, {}, f({
|
|
83
83
|
"mt-2": !0,
|
|
84
84
|
"min-h-[1lh]": V.value,
|
|
85
85
|
[X.value?.errorMessage ?? ""]: !0,
|
|
86
86
|
[q.value?.text ?? ""]: !0,
|
|
87
|
-
[
|
|
88
|
-
}))),
|
|
89
|
-
...
|
|
87
|
+
[j.value.errorMessage ?? ""]: !0
|
|
88
|
+
}))), se = o(() => r({
|
|
89
|
+
...k.value?.input,
|
|
90
90
|
id: H.value,
|
|
91
|
-
disabled:
|
|
92
|
-
readonly:
|
|
91
|
+
disabled: N.value,
|
|
92
|
+
readonly: P.value,
|
|
93
93
|
"aria-describedby": K.value,
|
|
94
|
-
"aria-invalid":
|
|
95
|
-
},
|
|
94
|
+
"aria-invalid": M.value || void 0
|
|
95
|
+
}, d(E.value.inheritedAttrs, ["class"]), f({
|
|
96
96
|
"flex-1 min-w-0 min-h-0 bg-transparent border-0 shadow-none": !0,
|
|
97
97
|
"h-full": !z.value && !L.value,
|
|
98
98
|
"max-h-none": z.value,
|
|
@@ -102,29 +102,34 @@ function x(x, S, C = {}) {
|
|
|
102
102
|
[q.value?.input ?? ""]: !z.value,
|
|
103
103
|
[q.value?.textarea ?? ""]: z.value,
|
|
104
104
|
[q.value?.textareaLikeInput ?? ""]: B.value,
|
|
105
|
-
[
|
|
106
|
-
}))),
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
105
|
+
[j.value.input ?? ""]: !0
|
|
106
|
+
}))), ce = o(() => n(k.value?.label, {
|
|
107
|
+
for: H.value,
|
|
108
|
+
size: D.value.size,
|
|
109
|
+
error: M.value,
|
|
110
|
+
required: D.value.required,
|
|
111
|
+
classes: {
|
|
112
|
+
required: j.value.required,
|
|
113
|
+
root: f({
|
|
114
|
+
[Q.value?.label ?? ""]: I.value,
|
|
115
|
+
[j.value.label ?? ""]: !0
|
|
116
|
+
})
|
|
117
|
+
}
|
|
118
|
+
})), le = o(() => r(k.value?.start, {}, f({
|
|
114
119
|
"shrink-0 self-center flex items-center whitespace-nowrap select-none pointer-events-none": !0,
|
|
115
|
-
"text-gray-400": !
|
|
120
|
+
"text-gray-400": !M.value,
|
|
116
121
|
[Z.value?.start ?? ""]: !R.value && !L.value,
|
|
117
|
-
[J.value?.start ?? ""]: !
|
|
118
|
-
[X.value?.adornment ?? ""]:
|
|
119
|
-
[
|
|
120
|
-
}))),
|
|
122
|
+
[J.value?.start ?? ""]: !M.value,
|
|
123
|
+
[X.value?.adornment ?? ""]: M.value,
|
|
124
|
+
[j.value.start ?? ""]: !0
|
|
125
|
+
}))), ue = o(() => r(k.value?.corner, {}, f({
|
|
121
126
|
"text-gray-500 dark:text-gray-400": !I.value,
|
|
122
127
|
[q.value?.text ?? ""]: !0,
|
|
123
128
|
[Q.value?.corner ?? ""]: I.value,
|
|
124
|
-
[
|
|
125
|
-
}))),
|
|
126
|
-
let e = t(
|
|
127
|
-
return
|
|
129
|
+
[j.value.corner ?? ""]: !0
|
|
130
|
+
}))), de = o(() => {
|
|
131
|
+
let e = t(T, "label", D.value.label);
|
|
132
|
+
return r(k.value?.header, {}, f({
|
|
128
133
|
flex: !0,
|
|
129
134
|
"w-full shrink-0": !0,
|
|
130
135
|
"justify-between": e,
|
|
@@ -132,88 +137,84 @@ function x(x, S, C = {}) {
|
|
|
132
137
|
"items-center": I.value,
|
|
133
138
|
"items-end": L.value,
|
|
134
139
|
[Q.value?.labelRow ?? ""]: W.value,
|
|
135
|
-
[
|
|
140
|
+
[j.value.header ?? ""]: !0
|
|
136
141
|
}));
|
|
137
|
-
}),
|
|
142
|
+
}), fe = o(() => r(k.value?.header, {}, f({
|
|
138
143
|
flex: !0,
|
|
139
144
|
"mb-1": !0,
|
|
140
145
|
[G.value]: !0,
|
|
141
|
-
[
|
|
142
|
-
}))),
|
|
146
|
+
[j.value.header ?? ""]: !0
|
|
147
|
+
}))), pe = o(() => r(k.value?.endIcon, {}, f({ "inline-flex shrink-0 items-center justify-center self-center": L.value }))), me = o(() => r(k.value?.end, {}, f({
|
|
143
148
|
"group/end wrapper-end-slot shrink-0 flex w-auto items-stretch self-stretch [&>*]:min-h-0": !0,
|
|
144
149
|
"self-stretch min-h-0 overflow-hidden py-0.5 pe-0.5": L.value,
|
|
145
150
|
"h-full min-h-0 overflow-hidden py-0.5 pe-0.5": !L.value,
|
|
146
|
-
[
|
|
147
|
-
}))),
|
|
148
|
-
[Y.value?.required ?? ""]: !0,
|
|
149
|
-
[A.value.required ?? ""]: !0
|
|
150
|
-
}))), he = a(() => n({}, {}, d({
|
|
151
|
+
[j.value.end ?? ""]: !0
|
|
152
|
+
}))), he = o(() => r({}, {}, f({
|
|
151
153
|
"flex min-h-0 min-w-0 flex-1 flex-col": !0,
|
|
152
|
-
[
|
|
153
|
-
}))), ge =
|
|
154
|
+
[re.value ?? ""]: !0
|
|
155
|
+
}))), ge = o(() => r({}, {}, f({
|
|
154
156
|
"flex w-full min-w-0 flex-1 items-stretch gap-x-2": !0,
|
|
155
157
|
[q.value?.controlRow ?? ""]: !0
|
|
156
158
|
})));
|
|
157
159
|
return {
|
|
158
|
-
slots:
|
|
159
|
-
merged:
|
|
160
|
-
control:
|
|
161
|
-
endBind:
|
|
162
|
-
rootBind:
|
|
160
|
+
slots: T,
|
|
161
|
+
merged: D,
|
|
162
|
+
control: A,
|
|
163
|
+
endBind: ae,
|
|
164
|
+
rootBind: oe,
|
|
163
165
|
controlId: H,
|
|
164
|
-
errorBind:
|
|
165
|
-
errorIcon:
|
|
166
|
-
inputBind:
|
|
166
|
+
errorBind: $,
|
|
167
|
+
errorIcon: te,
|
|
168
|
+
inputBind: se,
|
|
167
169
|
isNotched: I,
|
|
168
170
|
isStacked: L,
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
requiredBind: me,
|
|
180
|
-
containerBind: a(() => n(O.value?.container, { "data-bridge-rounded": E.value.rounded ?? "md" }, d({
|
|
171
|
+
startBind: le,
|
|
172
|
+
cornerBind: ue,
|
|
173
|
+
headerBind: fe,
|
|
174
|
+
isDisabled: N,
|
|
175
|
+
isReadonly: P,
|
|
176
|
+
variantKey: F,
|
|
177
|
+
endIconBind: pe,
|
|
178
|
+
endSlotBind: me,
|
|
179
|
+
invalidated: M,
|
|
180
|
+
containerBind: o(() => r(k.value?.container, { "data-bridge-rounded": D.value.rounded ?? "md" }, f({
|
|
181
181
|
"group/field relative flex flex-row items-stretch overflow-hidden": L.value,
|
|
182
182
|
"group/field relative flex justify-start gap-x-2 items-stretch": !L.value,
|
|
183
183
|
"transition-all ease-in-out duration-150 outline-none": !0,
|
|
184
|
-
"bg-gray-100 dark:bg-gray-800":
|
|
184
|
+
"bg-gray-100 dark:bg-gray-800": N.value && !M.value,
|
|
185
185
|
[q.value?.container ?? ""]: !z.value,
|
|
186
186
|
[q.value?.containerTextareaLikeInput ?? ""]: B.value,
|
|
187
187
|
[q.value?.containerTextarea ?? ""]: z.value && !B.value,
|
|
188
188
|
[Q.value?.container ?? ""]: !0,
|
|
189
189
|
[Z.value?.input ?? ""]: !R.value,
|
|
190
|
-
[
|
|
191
|
-
[
|
|
190
|
+
[ie.value ?? ""]: !0,
|
|
191
|
+
[ne.value ?? ""]: !0,
|
|
192
192
|
"rounded-none": R.value,
|
|
193
|
-
[X.value?.container ?? ""]:
|
|
194
|
-
[X.value?.containerUnderlined ?? ""]:
|
|
195
|
-
[
|
|
193
|
+
[X.value?.container ?? ""]: M.value && !R.value,
|
|
194
|
+
[X.value?.containerUnderlined ?? ""]: M.value && R.value,
|
|
195
|
+
[j.value.container ?? ""]: !0
|
|
196
196
|
}))),
|
|
197
|
-
startIconBind:
|
|
198
|
-
startSlotBind:
|
|
197
|
+
startIconBind: o(() => r(k.value?.startIcon, {}, f({ "inline-flex shrink-0 items-center justify-center self-center": L.value }))),
|
|
198
|
+
startSlotBind: o(() => r(k.value?.start, {}, f({
|
|
199
199
|
"group/start wrapper-start-slot shrink-0 flex w-auto items-stretch self-stretch [&>*]:min-h-0": !0,
|
|
200
200
|
"self-stretch min-h-0 overflow-hidden py-0.5 ps-0.5": L.value,
|
|
201
201
|
"h-full min-h-0 overflow-hidden py-0.5 ps-0.5": !L.value,
|
|
202
|
-
[
|
|
202
|
+
[j.value.start ?? ""]: !0
|
|
203
203
|
}))),
|
|
204
|
+
fieldLabelProps: ce,
|
|
204
205
|
ariaDescribedBy: K,
|
|
205
|
-
descriptionBind:
|
|
206
|
+
descriptionBind: o(() => r(k.value?.description, {}, f({
|
|
206
207
|
"mt-2 text-gray-500 dark:text-gray-400": !0,
|
|
207
208
|
[q.value?.text ?? ""]: !0,
|
|
208
|
-
[
|
|
209
|
+
[j.value.description ?? ""]: !0
|
|
209
210
|
}))),
|
|
210
211
|
stackedBodyBind: he,
|
|
211
212
|
hasInsetLabelRow: W,
|
|
212
|
-
insetLabelRowBind:
|
|
213
|
+
insetLabelRowBind: de,
|
|
213
214
|
stackedInputRowBind: ge,
|
|
214
215
|
showErrorMessageContent: U,
|
|
215
216
|
reservesErrorMessageSpace: V
|
|
216
217
|
};
|
|
217
218
|
}
|
|
218
219
|
//#endregion
|
|
219
|
-
export {
|
|
220
|
+
export { x as formFieldBridgeKeys, S as useFormField };
|
|
@@ -3,6 +3,7 @@ import { HTMLAttributes, InputHTMLAttributes, Slot } from 'vue';
|
|
|
3
3
|
import { FormFieldColor, FormFieldInvalidated, FormFieldRounded, FormFieldSize, FormFieldVariant, MergeHtmlProps, MergeProps } from '@bridge-ui/core';
|
|
4
4
|
import { UseFormFieldReturn } from './composables/useFormField';
|
|
5
5
|
import { IconProps } from '../Icon';
|
|
6
|
+
import { LabelProps } from '../Label/label.types';
|
|
6
7
|
export interface FormFieldSizeOverrides {}
|
|
7
8
|
export interface FormFieldColorOverrides {}
|
|
8
9
|
export interface FormFieldRoundedOverrides {}
|
|
@@ -87,15 +88,17 @@ export interface FormFieldCustomProps {
|
|
|
87
88
|
*/
|
|
88
89
|
input?: Partial<InputHTMLAttributes>;
|
|
89
90
|
/**
|
|
90
|
-
* Error-state field chrome colors (
|
|
91
|
+
* Error-state field chrome colors (container, adornments, input, …). Label colors come from `Label` when `error` is set.
|
|
91
92
|
*
|
|
92
93
|
* @default undefined
|
|
93
94
|
*/
|
|
94
95
|
invalidated?: Partial<FormFieldInvalidated>;
|
|
95
96
|
/**
|
|
96
|
-
* Props forwarded to the primary
|
|
97
|
+
* Props forwarded to the primary `Label` (content stays owned by `FormField`).
|
|
98
|
+
*
|
|
99
|
+
* @default undefined
|
|
97
100
|
*/
|
|
98
|
-
label?:
|
|
101
|
+
label?: Partial<LabelProps>;
|
|
99
102
|
/**
|
|
100
103
|
* Props forwarded to the root wrapper.
|
|
101
104
|
*/
|
|
@@ -2,7 +2,7 @@ import { mergePartBind as e, useBridgeUIComponent as t } from "../../../Utils/in
|
|
|
2
2
|
import { computed as n, useAttrs as r } from "vue";
|
|
3
3
|
import { get as i } from "es-toolkit/compat";
|
|
4
4
|
import { cn as a, mergeBridgeUILayeredClasses as o, splitComponentProps as s } from "@bridge-ui/core";
|
|
5
|
-
import { sizeProps as c } from "@bridge-ui/core/
|
|
5
|
+
import { sizeProps as c } from "@bridge-ui/core/Tokens/Icon";
|
|
6
6
|
//#region src/Components/Icon/composables/useIcon.ts
|
|
7
7
|
var l = ["icon", "size"];
|
|
8
8
|
function u(u, d) {
|
|
@@ -16,7 +16,7 @@ function u(u, d) {
|
|
|
16
16
|
libDefaults: d,
|
|
17
17
|
componentName: "Icon",
|
|
18
18
|
props: () => p.value.componentProps
|
|
19
|
-
}), g = n(() => i(o(c, h.value?.
|
|
19
|
+
}), g = n(() => i(o(c, h.value?.tokens?.size), m.value.size));
|
|
20
20
|
return {
|
|
21
21
|
merged: m,
|
|
22
22
|
rootBind: n(() => e({}, p.value.inheritedAttrs, a({ [g.value ?? ""]: !0 })))
|
|
@@ -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 { invalidatedProps as l, sizeProps as u } from "@bridge-ui/core/
|
|
5
|
+
import { invalidatedProps as l, sizeProps as u } from "@bridge-ui/core/Tokens/Label";
|
|
6
6
|
//#region src/Components/Label/composables/useLabel.ts
|
|
7
7
|
var d = [
|
|
8
8
|
"size",
|
|
@@ -24,7 +24,7 @@ function f(f, p) {
|
|
|
24
24
|
}), v = n({
|
|
25
25
|
entry: _,
|
|
26
26
|
props: () => h.value.componentProps
|
|
27
|
-
}), y = r(() => a(s(u, _.value?.
|
|
27
|
+
}), y = r(() => a(s(u, _.value?.tokens?.size), g.value.size)), b = r(() => s(l, _.value?.tokens?.invalidated)), x = r(() => e({}, {}, o({
|
|
28
28
|
[b.value.required ?? ""]: !0,
|
|
29
29
|
[v.value.required ?? ""]: !0
|
|
30
30
|
})));
|
|
@@ -2,7 +2,7 @@ import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistr
|
|
|
2
2
|
import { computed as r, useAttrs as i, useSlots as a } from "vue";
|
|
3
3
|
import { get as o } from "es-toolkit/compat";
|
|
4
4
|
import { cn as s, mergeBridgeUILayeredClasses as c, splitComponentProps as l } from "@bridge-ui/core";
|
|
5
|
-
import { colorProps as u, sizeProps as d, underlineProps as f } from "@bridge-ui/core/
|
|
5
|
+
import { colorProps as u, sizeProps as d, underlineProps as f } from "@bridge-ui/core/Tokens/Link";
|
|
6
6
|
//#region src/Components/Link/composables/useLink.ts
|
|
7
7
|
var p = [
|
|
8
8
|
"href",
|
|
@@ -34,7 +34,7 @@ function m(m, h) {
|
|
|
34
34
|
if (y.value.external && !C.value) return "_blank";
|
|
35
35
|
}), D = r(() => {
|
|
36
36
|
if (y.value.external && !C.value) return "noopener noreferrer";
|
|
37
|
-
}), O = r(() => o(c(d, b.value?.
|
|
37
|
+
}), O = r(() => o(c(d, b.value?.tokens?.size), y.value.size)), k = r(() => o(c(u, b.value?.tokens?.color), y.value.color)), A = r(() => o(c(f, b.value?.tokens?.underline), y.value.underline));
|
|
38
38
|
return {
|
|
39
39
|
slots: _,
|
|
40
40
|
merged: y,
|
|
@@ -22,11 +22,11 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {
|
|
|
22
22
|
loading: boolean;
|
|
23
23
|
multiple: boolean;
|
|
24
24
|
disableAutoFocus: boolean;
|
|
25
|
+
placement: import('@floating-ui/utils').Placement;
|
|
25
26
|
emptyMessage: string;
|
|
26
27
|
hideEmptyMessage: boolean;
|
|
27
28
|
highlightedIndex: number;
|
|
28
29
|
loadingMessage: string;
|
|
29
|
-
placement: import('@floating-ui/utils').Placement;
|
|
30
30
|
showCheckmark: boolean;
|
|
31
31
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
32
32
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|