@bridge-ui/vue 0.26.0 → 0.27.0
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/ai/skills/bridge-ui-components/SKILL.md +2 -1
- package/dist/Components/Autocomplete/Autocomplete.vue_vue_type_script_setup_true_lang.js +4 -3
- package/dist/Components/Autocomplete/composables/useAutocomplete.js +1 -1
- package/dist/Components/BaseField/composables/useBaseField.js +0 -1
- package/dist/Components/Checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/Components/Checkbox/composables/useCheckbox.d.ts +1 -0
- package/dist/Components/Checkbox/composables/useCheckbox.js +2 -1
- package/dist/Components/ColorField/composables/useColorField.js +1 -1
- package/dist/Components/DateField/composables/useDateField.js +1 -1
- package/dist/Components/DateRangeField/composables/useDateRangeField.js +1 -1
- package/dist/Components/DateTimeField/composables/useDateTimeField.js +1 -1
- package/dist/Components/DateTimeRangeField/composables/useDateTimeRangeField.js +1 -1
- package/dist/Components/FormControl/composables/useFormControl.d.ts +1 -0
- package/dist/Components/FormControl/composables/useFormControl.js +14 -11
- package/dist/Components/FormField/composables/useFormField.js +0 -1
- package/dist/Components/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js +30 -30
- package/dist/Components/NumberField/composables/useNumberField.d.ts +1 -0
- package/dist/Components/NumberField/composables/useNumberField.js +11 -10
- package/dist/Components/OtpField/composables/useOtpField.js +7 -1
- package/dist/Components/QrCode/QrCode.js +4 -0
- package/dist/Components/QrCode/QrCode.vue.d.ts +17 -0
- package/dist/Components/QrCode/QrCode.vue_vue_type_script_setup_true_lang.js +45 -0
- package/dist/Components/QrCode/composables/useQrCode.d.ts +881 -0
- package/dist/Components/QrCode/composables/useQrCode.js +137 -0
- package/dist/Components/QrCode/index.d.ts +3 -0
- package/dist/Components/QrCode/index.js +3 -0
- package/dist/Components/QrCode/qrCode.types.d.ts +168 -0
- package/dist/Components/Radio/Radio.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/Components/Radio/composables/useRadio.d.ts +1 -0
- package/dist/Components/Radio/composables/useRadio.js +2 -1
- package/dist/Components/Select/Select.vue_vue_type_script_setup_true_lang.js +4 -3
- package/dist/Components/Select/composables/useSelect.js +1 -1
- package/dist/Components/Switch/Switch.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/Components/Switch/composables/useSwitch.d.ts +1 -0
- package/dist/Components/Switch/composables/useSwitch.js +2 -1
- package/dist/Components/TimeField/composables/useTimeField.js +1 -1
- package/dist/Components/TimeRangeField/composables/useTimeRangeField.js +1 -1
- package/dist/augments.d.ts +5 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +84 -82
- package/docs/README.md +1 -0
- package/docs/components/I18n.md +2 -0
- package/docs/components/QrCode.md +134 -0
- package/package.json +3 -3
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { useResolveMessage as e } from "../../../Adapters/I18n/useI18nAdapter.js";
|
|
2
|
+
import { mergePartBind as t, useBridgeUIComponent as n, useBridgeUIMergedRegistryClasses as r } from "../../../Utils/index.js";
|
|
3
|
+
import { computed as i, getCurrentInstance as a, useAttrs as o, useSlots as s } from "vue";
|
|
4
|
+
import { get as c, isEmpty as l, isNil as u } from "es-toolkit/compat";
|
|
5
|
+
import { buildQrCodePath as d, encodeQrCode as f, getQrCodeLayout as p, resolveQrCodeStatus as m } from "@bridge-ui/core/Domain";
|
|
6
|
+
import { qrCodeRoundedProps as h } from "@bridge-ui/core/Tokens";
|
|
7
|
+
import { cn as g, mergeBridgeUILayeredClasses as _, splitComponentProps as v } from "@bridge-ui/core/Utils";
|
|
8
|
+
// src/Components/QrCode/composables/useQrCode.ts
|
|
9
|
+
var y = [
|
|
10
|
+
"icon",
|
|
11
|
+
"size",
|
|
12
|
+
"color",
|
|
13
|
+
"label",
|
|
14
|
+
"value",
|
|
15
|
+
"status",
|
|
16
|
+
"classes",
|
|
17
|
+
"rounded",
|
|
18
|
+
"bordered",
|
|
19
|
+
"iconSize",
|
|
20
|
+
"background",
|
|
21
|
+
"errorLevel",
|
|
22
|
+
"customProps"
|
|
23
|
+
];
|
|
24
|
+
function b(b, x, S) {
|
|
25
|
+
let C = o(), w = s(), T = a(), E = e(), D = i(() => v({
|
|
26
|
+
bridgeKeys: y,
|
|
27
|
+
props: {
|
|
28
|
+
...C,
|
|
29
|
+
...b
|
|
30
|
+
}
|
|
31
|
+
})), { merged: O, entry: k } = n({
|
|
32
|
+
libDefaults: x,
|
|
33
|
+
componentName: "QrCode",
|
|
34
|
+
props: () => D.value.componentProps
|
|
35
|
+
}), A = r({
|
|
36
|
+
entry: k,
|
|
37
|
+
props: () => D.value.componentProps
|
|
38
|
+
}), j = i(() => O.value.customProps), M = i(() => m(O.value.value, O.value.status)), N = i(() => M.value === "loading"), P = i(() => M.value === "expired"), F = i(() => !u(O.value.icon) && !l(O.value.icon)), I = i(() => {
|
|
39
|
+
let e = T?.vnode.props;
|
|
40
|
+
return u(e) ? !1 : "onRefresh" in e || "onRefreshOnce" in e;
|
|
41
|
+
}), L = i(() => P.value && I.value), R = i(() => E("Code expired")), z = i(() => f(O.value.value, O.value.errorLevel)), B = i(() => p({
|
|
42
|
+
size: O.value.size,
|
|
43
|
+
count: z.value?.count ?? 0,
|
|
44
|
+
iconSize: F.value ? O.value.iconSize : 0
|
|
45
|
+
})), V = i(() => u(z.value) ? "" : d(z.value, B.value.excavation)), H = i(() => {
|
|
46
|
+
let e = _(h, k.value?.tokens?.rounded);
|
|
47
|
+
return c(e, O.value.rounded);
|
|
48
|
+
});
|
|
49
|
+
function U() {
|
|
50
|
+
S("refresh");
|
|
51
|
+
}
|
|
52
|
+
let W = i(() => {
|
|
53
|
+
let { style: e, ...n } = D.value.inheritedAttrs;
|
|
54
|
+
return t(j.value?.root, {
|
|
55
|
+
...n,
|
|
56
|
+
style: [e, {
|
|
57
|
+
background: O.value.background,
|
|
58
|
+
padding: `${B.value.quietZone}px`
|
|
59
|
+
}]
|
|
60
|
+
}, g({
|
|
61
|
+
"relative inline-block shrink-0 overflow-hidden": !0,
|
|
62
|
+
"border border-dark-200 dark:border-dark-600": O.value.bordered,
|
|
63
|
+
[H.value ?? ""]: !0,
|
|
64
|
+
[A.value.root ?? ""]: !0
|
|
65
|
+
}));
|
|
66
|
+
}), G = i(() => t(j.value?.code, {
|
|
67
|
+
role: "img",
|
|
68
|
+
"aria-label": O.value.label,
|
|
69
|
+
"aria-busy": N.value || void 0,
|
|
70
|
+
style: {
|
|
71
|
+
width: `${B.value.size}px`,
|
|
72
|
+
height: `${B.value.size}px`
|
|
73
|
+
}
|
|
74
|
+
}, g({
|
|
75
|
+
"relative block transition-[opacity,filter] duration-200": !0,
|
|
76
|
+
"opacity-15 blur-[2px]": P.value,
|
|
77
|
+
[A.value.code ?? ""]: !0
|
|
78
|
+
}))), K = i(() => {
|
|
79
|
+
let e = z.value?.count ?? 0;
|
|
80
|
+
return {
|
|
81
|
+
width: "100%",
|
|
82
|
+
class: "block",
|
|
83
|
+
height: "100%",
|
|
84
|
+
focusable: "false",
|
|
85
|
+
"aria-hidden": "true",
|
|
86
|
+
"shape-rendering": "crispEdges",
|
|
87
|
+
viewBox: `0 0 ${e} ${e}`
|
|
88
|
+
};
|
|
89
|
+
}), q = i(() => ({
|
|
90
|
+
d: V.value,
|
|
91
|
+
fill: O.value.color
|
|
92
|
+
})), J = i(() => t(j.value?.icon, {
|
|
93
|
+
alt: "",
|
|
94
|
+
src: O.value.icon,
|
|
95
|
+
"aria-hidden": "true",
|
|
96
|
+
style: {
|
|
97
|
+
width: `${B.value.iconSize}px`,
|
|
98
|
+
height: `${B.value.iconSize}px`
|
|
99
|
+
}
|
|
100
|
+
}, g({
|
|
101
|
+
"absolute top-1/2 left-1/2 -translate-1/2 object-contain": !0,
|
|
102
|
+
[A.value.icon ?? ""]: !0
|
|
103
|
+
}))), Y = i(() => ({
|
|
104
|
+
rounded: "md",
|
|
105
|
+
...j.value?.skeleton,
|
|
106
|
+
class: g("size-full dark:bg-dark-200", A.value.skeleton, j.value?.skeleton?.class)
|
|
107
|
+
}));
|
|
108
|
+
return {
|
|
109
|
+
slots: w,
|
|
110
|
+
merged: O,
|
|
111
|
+
hasIcon: F,
|
|
112
|
+
svgBind: K,
|
|
113
|
+
rootBind: W,
|
|
114
|
+
codeBind: G,
|
|
115
|
+
pathBind: q,
|
|
116
|
+
iconBind: J,
|
|
117
|
+
isLoading: N,
|
|
118
|
+
isExpired: P,
|
|
119
|
+
showRefresh: L,
|
|
120
|
+
overlayBind: i(() => t(j.value?.overlay, { "aria-live": "polite" }, g({
|
|
121
|
+
"absolute inset-0 flex flex-col items-center justify-center gap-2 p-3 text-center text-sm font-medium text-dark-900": !0,
|
|
122
|
+
"pointer-events-none": !P.value,
|
|
123
|
+
[A.value.overlay ?? ""]: !0
|
|
124
|
+
}))),
|
|
125
|
+
skeletonBind: Y,
|
|
126
|
+
handleRefresh: U,
|
|
127
|
+
expiredMessage: R,
|
|
128
|
+
refreshButtonBind: i(() => ({
|
|
129
|
+
size: "sm",
|
|
130
|
+
type: "button",
|
|
131
|
+
text: E("Refresh"),
|
|
132
|
+
startIcon: "refresh",
|
|
133
|
+
...j.value?.refreshButton
|
|
134
|
+
}))
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
export { b as useQrCode };
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { HTMLAttributes, ImgHTMLAttributes, Slot } from 'vue';
|
|
2
|
+
import { QrCodeErrorLevel, QrCodeStatus } from '@bridge-ui/core/Domain';
|
|
3
|
+
import { QrCodeRounded } from '@bridge-ui/core/Tokens';
|
|
4
|
+
import { MergeHtmlProps, MergeProps } from '@bridge-ui/core/Utils';
|
|
5
|
+
import { ButtonProps } from '../Button/button.types';
|
|
6
|
+
import { SkeletonProps } from '../Skeleton/skeleton.types';
|
|
7
|
+
export interface QrCodeRoundedOverrides {}
|
|
8
|
+
export interface QrCodeClasses {
|
|
9
|
+
/**
|
|
10
|
+
* The classes to apply to the code (the element with `role="img"`).
|
|
11
|
+
*/
|
|
12
|
+
code?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The classes to apply to the center icon.
|
|
15
|
+
*/
|
|
16
|
+
icon?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The classes to apply to the expired overlay.
|
|
19
|
+
*/
|
|
20
|
+
overlay?: string;
|
|
21
|
+
/**
|
|
22
|
+
* The classes to apply to the root (the frame).
|
|
23
|
+
*/
|
|
24
|
+
root?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The classes to apply to the loading `Skeleton`.
|
|
27
|
+
*/
|
|
28
|
+
skeleton?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface QrCodeCustomProps {
|
|
31
|
+
/**
|
|
32
|
+
* Props forwarded to the code (the element with `role="img"`).
|
|
33
|
+
*
|
|
34
|
+
* @default undefined
|
|
35
|
+
*/
|
|
36
|
+
code?: HTMLAttributes;
|
|
37
|
+
/**
|
|
38
|
+
* Props forwarded to the center icon image.
|
|
39
|
+
*
|
|
40
|
+
* @default undefined
|
|
41
|
+
*/
|
|
42
|
+
icon?: ImgHTMLAttributes;
|
|
43
|
+
/**
|
|
44
|
+
* Props forwarded to the expired overlay.
|
|
45
|
+
*
|
|
46
|
+
* @default undefined
|
|
47
|
+
*/
|
|
48
|
+
overlay?: HTMLAttributes;
|
|
49
|
+
/**
|
|
50
|
+
* Props forwarded to the refresh `Button`.
|
|
51
|
+
*
|
|
52
|
+
* @default undefined
|
|
53
|
+
*/
|
|
54
|
+
refreshButton?: Partial<ButtonProps>;
|
|
55
|
+
/**
|
|
56
|
+
* Props forwarded to the root element.
|
|
57
|
+
*
|
|
58
|
+
* @default undefined
|
|
59
|
+
*/
|
|
60
|
+
root?: HTMLAttributes;
|
|
61
|
+
/**
|
|
62
|
+
* Props forwarded to the loading `Skeleton`.
|
|
63
|
+
*
|
|
64
|
+
* @default undefined
|
|
65
|
+
*/
|
|
66
|
+
skeleton?: Partial<SkeletonProps>;
|
|
67
|
+
}
|
|
68
|
+
export interface QrCodeEmits {
|
|
69
|
+
/**
|
|
70
|
+
* Emitted when the refresh button is pressed. A listener shows the button
|
|
71
|
+
* while `status` is `expired`.
|
|
72
|
+
*/
|
|
73
|
+
refresh: [];
|
|
74
|
+
}
|
|
75
|
+
export interface QrCodeOwnProps {
|
|
76
|
+
/**
|
|
77
|
+
* Background of the code and the frame. Stays light in the dark theme so
|
|
78
|
+
* cameras can read it.
|
|
79
|
+
*
|
|
80
|
+
* @default "#fff"
|
|
81
|
+
*/
|
|
82
|
+
background?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Draws the frame border. Turn off to embed the code in a custom container.
|
|
85
|
+
*
|
|
86
|
+
* @default true
|
|
87
|
+
*/
|
|
88
|
+
bordered?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* The classes to apply to the QR code parts.
|
|
91
|
+
*
|
|
92
|
+
* @default undefined
|
|
93
|
+
*/
|
|
94
|
+
classes?: QrCodeClasses;
|
|
95
|
+
/**
|
|
96
|
+
* Color of the dark modules. Keep a high contrast with `background`.
|
|
97
|
+
*
|
|
98
|
+
* @default "#000"
|
|
99
|
+
*/
|
|
100
|
+
color?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Extra props for internal parts (`root`, `code`, `icon`, `overlay`,
|
|
103
|
+
* `skeleton`, `refreshButton`).
|
|
104
|
+
*
|
|
105
|
+
* @default undefined
|
|
106
|
+
*/
|
|
107
|
+
customProps?: QrCodeCustomProps;
|
|
108
|
+
/**
|
|
109
|
+
* Error correction level. Use `H` with `icon`.
|
|
110
|
+
*
|
|
111
|
+
* @default "M"
|
|
112
|
+
*/
|
|
113
|
+
errorLevel?: QrCodeErrorLevel;
|
|
114
|
+
/**
|
|
115
|
+
* Image URL drawn in the center of the code.
|
|
116
|
+
*
|
|
117
|
+
* @default undefined
|
|
118
|
+
*/
|
|
119
|
+
icon?: string;
|
|
120
|
+
/**
|
|
121
|
+
* Size of the center icon in px.
|
|
122
|
+
*
|
|
123
|
+
* @default size / 5
|
|
124
|
+
*/
|
|
125
|
+
iconSize?: number;
|
|
126
|
+
/**
|
|
127
|
+
* Accessible name of the code. Show the content next to it as well (a copy
|
|
128
|
+
* field), since the code alone is not readable by everyone.
|
|
129
|
+
*/
|
|
130
|
+
label: string;
|
|
131
|
+
/**
|
|
132
|
+
* The roundedness of the frame.
|
|
133
|
+
*
|
|
134
|
+
* @default "xl"
|
|
135
|
+
*/
|
|
136
|
+
rounded?: MergeProps<QrCodeRounded, QrCodeRoundedOverrides>;
|
|
137
|
+
/**
|
|
138
|
+
* Size of the code in px, without the quiet zone around it.
|
|
139
|
+
*
|
|
140
|
+
* @default 160
|
|
141
|
+
*/
|
|
142
|
+
size?: number;
|
|
143
|
+
/**
|
|
144
|
+
* Display state. `loading` shows a `Skeleton`; `expired` dims the code and
|
|
145
|
+
* shows an overlay. A missing `value` is always `loading`.
|
|
146
|
+
*
|
|
147
|
+
* @default "active"
|
|
148
|
+
*/
|
|
149
|
+
status?: QrCodeStatus;
|
|
150
|
+
/**
|
|
151
|
+
* Content encoded in the code. `null` or empty renders the loading state.
|
|
152
|
+
* A value too long for a QR code at `errorLevel` renders an empty frame.
|
|
153
|
+
*
|
|
154
|
+
* @default undefined
|
|
155
|
+
*/
|
|
156
|
+
value?: null | string;
|
|
157
|
+
}
|
|
158
|
+
export interface QrCodeSlots {
|
|
159
|
+
/**
|
|
160
|
+
* Content of the expired overlay, in place of the text and refresh button.
|
|
161
|
+
*/
|
|
162
|
+
expired?: Slot<undefined>;
|
|
163
|
+
/**
|
|
164
|
+
* Placeholder while loading, in place of the `Skeleton`.
|
|
165
|
+
*/
|
|
166
|
+
loading?: Slot<undefined>;
|
|
167
|
+
}
|
|
168
|
+
export type QrCodeProps = MergeHtmlProps<QrCodeOwnProps, HTMLAttributes>;
|
|
@@ -48,7 +48,8 @@ var S = ["for"], C = ["checked"], w = /*@__PURE__*/ c({
|
|
|
48
48
|
return (n, i) => (p(), a(_(t), { field: _(P) }, s({
|
|
49
49
|
default: b(() => [o("label", d(_(j), { for: _(P).controlId.value }), [o("input", d(_(M), {
|
|
50
50
|
checked: _(N),
|
|
51
|
-
onChange: I
|
|
51
|
+
onChange: I,
|
|
52
|
+
onClick: i[0] ||= (...e) => _(P).preventReadonlyChange && _(P).preventReadonlyChange(...e)
|
|
52
53
|
}), null, 16, C), o("span", f(l(_(F))), [o("span", f(l(_(A))), null, 16)], 16)], 16, S)]),
|
|
53
54
|
_: 2
|
|
54
55
|
}, [h(_(r)(_(e), n.$slots), (e) => ({
|
|
@@ -263,6 +263,7 @@ export declare function useRadio(props: MaybeRefOrGetter<RadioOwnProps>, libDefa
|
|
|
263
263
|
errorMessageBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {
|
|
264
264
|
id: string;
|
|
265
265
|
}>>;
|
|
266
|
+
preventReadonlyChange: (event: Event) => void;
|
|
266
267
|
showErrorMessageContent: import('vue').ComputedRef<boolean>;
|
|
267
268
|
reservesErrorMessageSpace: import('vue').ComputedRef<boolean>;
|
|
268
269
|
};
|
|
@@ -86,7 +86,8 @@ function y(y, b, x) {
|
|
|
86
86
|
[O.value.dot ?? ""]: !0
|
|
87
87
|
}))),
|
|
88
88
|
fieldBind: a(() => n({}, {}, m({
|
|
89
|
-
"relative inline-flex shrink-0
|
|
89
|
+
"relative inline-flex shrink-0 items-center": !0,
|
|
90
|
+
"cursor-pointer": !C.isReadonly.value,
|
|
90
91
|
"has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-offset-2": !0,
|
|
91
92
|
[M.value ?? ""]: !0,
|
|
92
93
|
[A.value?.focus ?? ""]: !0
|
|
@@ -116,12 +116,12 @@ var N = {
|
|
|
116
116
|
return (e, r) => (S(), f(l, null, [
|
|
117
117
|
h(D(a), { field: D(J) }, m({
|
|
118
118
|
default: k(() => [D(q) ? (S(), f("div", N, [(S(!0), f(l, null, T(D(me), (t) => (S(), u(D(i), b({
|
|
119
|
-
dismissible: "",
|
|
120
119
|
key: String(t.value),
|
|
121
120
|
size: D(J).merged.value.size,
|
|
122
121
|
disabled: D(J).isDisabled.value,
|
|
123
122
|
"clear-label": `Remove ${t.label}`,
|
|
124
|
-
onDismiss: (e) => D(oe)(t, e)
|
|
123
|
+
onDismiss: (e) => D(oe)(t, e),
|
|
124
|
+
dismissible: !D(J).isReadonly.value
|
|
125
125
|
}, { ref_for: !0 }, D(c)(B.customProps?.chip, {
|
|
126
126
|
customProps: { clear: D(Y) },
|
|
127
127
|
classes: { root: D(M)({
|
|
@@ -135,7 +135,8 @@ var N = {
|
|
|
135
135
|
"size",
|
|
136
136
|
"disabled",
|
|
137
137
|
"clear-label",
|
|
138
|
-
"onDismiss"
|
|
138
|
+
"onDismiss",
|
|
139
|
+
"dismissible"
|
|
139
140
|
]))), 128)), p("textarea", b({ ref: "trigger" }, D(Z)), null, 16)])) : (S(), f("div", P, [p("input", b({
|
|
140
141
|
ref: "trigger",
|
|
141
142
|
class: "min-w-0 flex-1"
|
|
@@ -196,7 +196,7 @@ function m(m, h, g, _, Ne) {
|
|
|
196
196
|
e?.preventDefault(), e?.stopPropagation(), m.disabled || m.readonly || (M.value ? X([]) : X(null), _("clear"), Q());
|
|
197
197
|
}
|
|
198
198
|
function st(e, t) {
|
|
199
|
-
t.preventDefault(), t.stopPropagation(), M.value
|
|
199
|
+
t.preventDefault(), t.stopPropagation(), !M.value || m.disabled || m.readonly || (X(R.value.filter((t) => !f(t, e.value))), _("deselect", e), s(() => Y(g.value)));
|
|
200
200
|
}
|
|
201
201
|
function ct() {
|
|
202
202
|
let e = q.getHighlightedOption();
|
|
@@ -50,7 +50,8 @@ var x = ["checked"], S = /*@__PURE__*/ c({
|
|
|
50
50
|
default: b(() => [o("label", f(l(_(E))), [
|
|
51
51
|
o("input", d(_(D), {
|
|
52
52
|
checked: _(O),
|
|
53
|
-
onChange: M
|
|
53
|
+
onChange: M,
|
|
54
|
+
onClick: i[0] ||= (...e) => _(j).preventReadonlyChange && _(j).preventReadonlyChange(...e)
|
|
54
55
|
}), null, 16, x),
|
|
55
56
|
o("span", f(l(_(A))), null, 16),
|
|
56
57
|
o("span", f(l(_(k))), null, 16)
|
|
@@ -266,6 +266,7 @@ export declare function useSwitch(props: MaybeRefOrGetter<SwitchOwnProps>, libDe
|
|
|
266
266
|
errorMessageBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {
|
|
267
267
|
id: string;
|
|
268
268
|
}>>;
|
|
269
|
+
preventReadonlyChange: (event: Event) => void;
|
|
269
270
|
showErrorMessageContent: import('vue').ComputedRef<boolean>;
|
|
270
271
|
reservesErrorMessageSpace: import('vue').ComputedRef<boolean>;
|
|
271
272
|
};
|
|
@@ -61,7 +61,8 @@ function v(v, y, b) {
|
|
|
61
61
|
"sr-only": !0,
|
|
62
62
|
[D.value.input ?? ""]: !0
|
|
63
63
|
}))), N = a(() => n(E.value?.track, { "aria-hidden": !0 }, p({
|
|
64
|
-
"block
|
|
64
|
+
"block transition ease-in-out duration-100": !0,
|
|
65
|
+
"cursor-pointer": !S.isReadonly.value,
|
|
65
66
|
[A.value?.track ?? ""]: !0,
|
|
66
67
|
[j.value ?? ""]: !0,
|
|
67
68
|
[k.value?.track ?? ""]: !O.value,
|
|
@@ -48,7 +48,7 @@ function T(T, E, D) {
|
|
|
48
48
|
N.value = e instanceof HTMLElement ? e : null;
|
|
49
49
|
};
|
|
50
50
|
function W(e) {
|
|
51
|
-
M.value !== e && (M.value = e, D(e ? "open" : "close"));
|
|
51
|
+
e && (T.disabled || T.readonly) || M.value !== e && (M.value = e, D(e ? "open" : "close"));
|
|
52
52
|
}
|
|
53
53
|
let G = u(() => g(P.value.inheritedAttrs, ["class"])), K = u(() => {
|
|
54
54
|
let e = S({
|
|
@@ -46,7 +46,7 @@ function w(h, w, T) {
|
|
|
46
46
|
j.value = e instanceof HTMLElement ? e : null;
|
|
47
47
|
};
|
|
48
48
|
function z(e) {
|
|
49
|
-
A.value !== e && (A.value = e, T(e ? "open" : "close"));
|
|
49
|
+
e && (h.disabled || h.readonly) || A.value !== e && (A.value = e, T(e ? "open" : "close"));
|
|
50
50
|
}
|
|
51
51
|
let B = u(() => m(M.value.inheritedAttrs, ["class"])), V = u(() => {
|
|
52
52
|
let e = x({
|
package/dist/augments.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ import { OtpFieldClasses, OtpFieldProps } from './Components/OtpField';
|
|
|
34
34
|
import { PasswordFieldClasses, PasswordFieldProps } from './Components/PasswordField';
|
|
35
35
|
import { PopoverClasses, PopoverProps } from './Components/Popover';
|
|
36
36
|
import { ProgressClasses, ProgressProps } from './Components/Progress';
|
|
37
|
+
import { QrCodeClasses, QrCodeProps } from './Components/QrCode';
|
|
37
38
|
import { RadioClasses, RadioProps } from './Components/Radio';
|
|
38
39
|
import { ResizableClasses, ResizableProps } from './Components/Resizable/resizable.types';
|
|
39
40
|
import { ResizableHandleClasses, ResizableHandleProps } from './Components/ResizableHandle/resizableHandle.types';
|
|
@@ -190,6 +191,10 @@ declare module "@bridge-ui/core/Config" {
|
|
|
190
191
|
classes: ProgressClasses;
|
|
191
192
|
defaultProps: Partial<Pick<ProgressProps, "size" | "color" | "rounded" | "variant">>;
|
|
192
193
|
}
|
|
194
|
+
interface QrCodeConfigOverrides {
|
|
195
|
+
classes: QrCodeClasses;
|
|
196
|
+
defaultProps: Partial<Pick<QrCodeProps, "size" | "rounded" | "bordered" | "errorLevel">>;
|
|
197
|
+
}
|
|
193
198
|
interface RadioConfigOverrides {
|
|
194
199
|
classes: RadioClasses;
|
|
195
200
|
defaultProps: Partial<Pick<RadioProps, "size" | "color" | "rounded" | "hideErrorMessage">>;
|
package/dist/index.d.ts
CHANGED
|
@@ -114,6 +114,8 @@ export { Popover, usePopover } from './Components/Popover';
|
|
|
114
114
|
export type { PopoverClasses, PopoverCustomProps, PopoverEmits, PopoverOptions, PopoverOwnProps, PopoverProps, PopoverRoundedOverrides, PopoverShadowOverrides, PopoverSlots, } from './Components/Popover';
|
|
115
115
|
export { Progress, useProgress } from './Components/Progress';
|
|
116
116
|
export type { ProgressClasses, ProgressColorOverrides, ProgressCustomProps, ProgressOwnProps, ProgressProps, ProgressRoundedOverrides, ProgressSizeOverrides, ProgressVariantOverrides, } from './Components/Progress';
|
|
117
|
+
export { QrCode, useQrCode } from './Components/QrCode';
|
|
118
|
+
export type { QrCodeClasses, QrCodeCustomProps, QrCodeEmits, QrCodeOwnProps, QrCodeProps, QrCodeRoundedOverrides, QrCodeSlots, } from './Components/QrCode';
|
|
117
119
|
export { Radio, useRadio } from './Components/Radio';
|
|
118
120
|
export type { RadioClasses, RadioColorOverrides, RadioCustomProps, RadioOwnProps, RadioProps, RadioRoundedOverrides, RadioSizeOverrides, RadioSlots, } from './Components/Radio';
|
|
119
121
|
export { Rating, useRating } from './Components/Rating';
|