@bitrix24/b24ui-nuxt 2.0.8 → 2.1.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/dist/meta.d.mts +84957 -50082
- package/dist/meta.mjs +84957 -50082
- package/dist/module.d.mts +13 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +8 -7
- package/dist/runtime/air-design-tokens/001_b24_global.css +1 -1
- package/dist/runtime/air-design-tokens/003_b24_context_light.css +1 -1
- package/dist/runtime/air-design-tokens/004_b24_context_dark.css +1 -1
- package/dist/runtime/air-design-tokens/005_b24_context_edge-light.css +1 -1
- package/dist/runtime/air-design-tokens/006_b24_context_edge-dark.css +1 -1
- package/dist/runtime/air-design-tokens/007_b24_global.css +1 -1
- package/dist/runtime/air-design-tokens/008_ui_global.css +1 -1
- package/dist/runtime/air-design-tokens/009_b24_tools.css +1 -1
- package/dist/runtime/air-design-tokens/components/badge-counter.css +1 -1
- package/dist/runtime/air-design-tokens/components/button.css +1 -1
- package/dist/runtime/air-design-tokens/components/navigation-menu.css +1 -1
- package/dist/runtime/air-design-tokens/components/popup.css +1 -1
- package/dist/runtime/air-design-tokens/components/scrollbar.css +1 -2
- package/dist/runtime/air-design-tokens/index.css +1 -1
- package/dist/runtime/components/Advice.d.vue.ts +1 -1
- package/dist/runtime/components/Advice.vue +1 -3
- package/dist/runtime/components/Advice.vue.d.ts +1 -1
- package/dist/runtime/components/App.d.vue.ts +1 -1
- package/dist/runtime/components/App.vue +2 -1
- package/dist/runtime/components/App.vue.d.ts +1 -1
- package/dist/runtime/components/Avatar.d.vue.ts +2 -1
- package/dist/runtime/components/Avatar.vue.d.ts +2 -1
- package/dist/runtime/components/Button.vue +1 -0
- package/dist/runtime/components/ChatPrompt.d.vue.ts +2 -2
- package/dist/runtime/components/ChatPrompt.vue +5 -5
- package/dist/runtime/components/ChatPrompt.vue.d.ts +2 -2
- package/dist/runtime/components/ChatPromptSubmit.d.vue.ts +5 -5
- package/dist/runtime/components/ChatPromptSubmit.vue +53 -4
- package/dist/runtime/components/ChatPromptSubmit.vue.d.ts +5 -5
- package/dist/runtime/components/Checkbox.d.vue.ts +2 -1
- package/dist/runtime/components/Checkbox.vue.d.ts +2 -1
- package/dist/runtime/components/CommandPalette.vue +5 -4
- package/dist/runtime/components/DashboardSearch.d.vue.ts +3 -6
- package/dist/runtime/components/DashboardSearch.vue +2 -3
- package/dist/runtime/components/DashboardSearch.vue.d.ts +3 -6
- package/dist/runtime/components/DashboardSearchButton.d.vue.ts +2 -3
- package/dist/runtime/components/DashboardSearchButton.vue +44 -6
- package/dist/runtime/components/DashboardSearchButton.vue.d.ts +2 -3
- package/dist/runtime/components/Error.d.vue.ts +1 -1
- package/dist/runtime/components/Error.vue.d.ts +1 -1
- package/dist/runtime/components/FileUpload.d.vue.ts +3 -2
- package/dist/runtime/components/FileUpload.vue +9 -9
- package/dist/runtime/components/FileUpload.vue.d.ts +3 -2
- package/dist/runtime/components/Form.d.vue.ts +3 -2
- package/dist/runtime/components/Form.vue +3 -4
- package/dist/runtime/components/Form.vue.d.ts +3 -2
- package/dist/runtime/components/Input.d.vue.ts +7 -7
- package/dist/runtime/components/Input.vue +2 -2
- package/dist/runtime/components/Input.vue.d.ts +7 -7
- package/dist/runtime/components/InputDate.d.vue.ts +115 -0
- package/dist/runtime/components/InputDate.vue +198 -0
- package/dist/runtime/components/InputDate.vue.d.ts +115 -0
- package/dist/runtime/components/InputMenu.d.vue.ts +7 -128
- package/dist/runtime/components/InputMenu.vue +3 -3
- package/dist/runtime/components/InputMenu.vue.d.ts +7 -128
- package/dist/runtime/components/InputNumber.d.vue.ts +25 -124
- package/dist/runtime/components/InputNumber.vue +3 -3
- package/dist/runtime/components/InputNumber.vue.d.ts +25 -124
- package/dist/runtime/components/InputTags.d.vue.ts +6 -109
- package/dist/runtime/components/InputTags.vue +8 -8
- package/dist/runtime/components/InputTags.vue.d.ts +6 -109
- package/dist/runtime/components/InputTime.d.vue.ts +99 -0
- package/dist/runtime/components/InputTime.vue +170 -0
- package/dist/runtime/components/InputTime.vue.d.ts +99 -0
- package/dist/runtime/components/Link.d.vue.ts +4 -49
- package/dist/runtime/components/Link.vue +1 -0
- package/dist/runtime/components/Link.vue.d.ts +4 -49
- package/dist/runtime/components/Modal.d.vue.ts +6 -1
- package/dist/runtime/components/Modal.vue +37 -9
- package/dist/runtime/components/Modal.vue.d.ts +6 -1
- package/dist/runtime/components/Pagination.d.vue.ts +2 -2
- package/dist/runtime/components/Pagination.vue.d.ts +2 -2
- package/dist/runtime/components/PinInput.d.vue.ts +3 -3
- package/dist/runtime/components/PinInput.vue.d.ts +3 -3
- package/dist/runtime/components/Progress.d.vue.ts +1 -1
- package/dist/runtime/components/Progress.vue.d.ts +1 -1
- package/dist/runtime/components/Select.d.vue.ts +6 -107
- package/dist/runtime/components/Select.vue +3 -3
- package/dist/runtime/components/Select.vue.d.ts +6 -107
- package/dist/runtime/components/SelectMenu.d.vue.ts +7 -106
- package/dist/runtime/components/SelectMenu.vue +3 -3
- package/dist/runtime/components/SelectMenu.vue.d.ts +7 -106
- package/dist/runtime/components/Slideover.d.vue.ts +1 -1
- package/dist/runtime/components/Slideover.vue.d.ts +1 -1
- package/dist/runtime/components/Switch.d.vue.ts +2 -1
- package/dist/runtime/components/Switch.vue.d.ts +2 -1
- package/dist/runtime/components/Table.d.vue.ts +5 -4
- package/dist/runtime/components/Table.vue +4 -3
- package/dist/runtime/components/Table.vue.d.ts +5 -4
- package/dist/runtime/components/Textarea.d.vue.ts +7 -6
- package/dist/runtime/components/Textarea.vue +2 -2
- package/dist/runtime/components/Textarea.vue.d.ts +7 -6
- package/dist/runtime/components/Toast.vue +5 -5
- package/dist/runtime/components/Toaster.d.vue.ts +1 -1
- package/dist/runtime/components/Toaster.vue.d.ts +1 -1
- package/dist/runtime/components/color-mode/ColorModeAvatar.d.vue.ts +3 -3
- package/dist/runtime/components/color-mode/ColorModeAvatar.vue +16 -4
- package/dist/runtime/components/color-mode/ColorModeAvatar.vue.d.ts +3 -3
- package/dist/runtime/components/color-mode/ColorModeButton.d.vue.ts +3 -3
- package/dist/runtime/components/color-mode/ColorModeButton.vue +54 -6
- package/dist/runtime/components/color-mode/ColorModeButton.vue.d.ts +3 -3
- package/dist/runtime/components/color-mode/ColorModeImage.d.vue.ts +4 -3
- package/dist/runtime/components/color-mode/ColorModeImage.vue +4 -0
- package/dist/runtime/components/color-mode/ColorModeImage.vue.d.ts +4 -3
- package/dist/runtime/components/color-mode/ColorModeSelect.d.vue.ts +5 -3
- package/dist/runtime/components/color-mode/ColorModeSelect.vue +47 -5
- package/dist/runtime/components/color-mode/ColorModeSelect.vue.d.ts +5 -3
- package/dist/runtime/components/color-mode/ColorModeSwitch.d.vue.ts +2 -2
- package/dist/runtime/components/color-mode/ColorModeSwitch.vue +29 -5
- package/dist/runtime/components/color-mode/ColorModeSwitch.vue.d.ts +2 -2
- package/dist/runtime/components/content/ContentSearch.d.vue.ts +3 -6
- package/dist/runtime/components/content/ContentSearch.vue +2 -3
- package/dist/runtime/components/content/ContentSearch.vue.d.ts +3 -6
- package/dist/runtime/components/content/ContentSearchButton.d.vue.ts +2 -3
- package/dist/runtime/components/content/ContentSearchButton.vue +43 -5
- package/dist/runtime/components/content/ContentSearchButton.vue.d.ts +2 -3
- package/dist/runtime/components/content/ContentSurround.vue +7 -1
- package/dist/runtime/components/locale/LocaleSelect.d.vue.ts +11 -7
- package/dist/runtime/components/locale/LocaleSelect.vue +50 -6
- package/dist/runtime/components/locale/LocaleSelect.vue.d.ts +11 -7
- package/dist/runtime/components/prose/Callout.vue +4 -0
- package/dist/runtime/composables/index.d.ts +8 -0
- package/dist/runtime/composables/index.js +8 -0
- package/dist/runtime/composables/useFileUpload.d.ts +2 -1
- package/dist/runtime/composables/useFileUpload.js +13 -4
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/inertia/components/Link.d.vue.ts +17 -10
- package/dist/runtime/inertia/components/Link.vue +8 -6
- package/dist/runtime/inertia/components/Link.vue.d.ts +17 -10
- package/dist/runtime/inertia/stubs.d.ts +1 -1
- package/dist/runtime/plugins/colors.js +4 -8
- package/dist/runtime/types/html.d.ts +8 -0
- package/dist/runtime/types/index.d.ts +2 -0
- package/dist/runtime/types/index.js +2 -0
- package/dist/runtime/types/input.d.ts +5 -5
- package/dist/runtime/types/utils.d.ts +2 -0
- package/dist/runtime/utils/content.d.ts +2 -2
- package/dist/runtime/utils/dashboard.d.ts +1 -1
- package/dist/runtime/utils/link.d.ts +1 -0
- package/dist/runtime/utils/link.js +40 -24
- package/dist/runtime/vue/components/Link.d.vue.ts +8 -37
- package/dist/runtime/vue/components/Link.vue +6 -11
- package/dist/runtime/vue/components/Link.vue.d.ts +8 -37
- package/dist/runtime/vue/components/color-mode/ColorModeButton.d.vue.ts +2 -2
- package/dist/runtime/vue/components/color-mode/ColorModeButton.vue +55 -5
- package/dist/runtime/vue/components/color-mode/ColorModeButton.vue.d.ts +2 -2
- package/dist/runtime/vue/components/color-mode/ColorModeSelect.d.vue.ts +5 -3
- package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue +46 -3
- package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue.d.ts +5 -3
- package/dist/runtime/vue/components/color-mode/ColorModeSwitch.d.vue.ts +1 -1
- package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue +24 -3
- package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue.d.ts +1 -1
- package/dist/runtime/vue/stubs.d.ts +2 -2
- package/dist/runtime/vue/stubs.js +1 -1
- package/dist/shared/{b24ui-nuxt.CEMVb5Ee.mjs → b24ui-nuxt.CXLCGBie.mjs} +353 -128
- package/dist/unplugin.d.mts +3 -1
- package/dist/unplugin.mjs +4 -3
- package/dist/vite.mjs +3 -3
- package/package.json +27 -17
- /package/dist/runtime/{air-design-tokens/002_b24_context_utility.css → types/html.js} +0 -0
|
@@ -2,10 +2,12 @@ import type { NumberFieldRootProps } from 'reka-ui';
|
|
|
2
2
|
import type { AppConfig } from '@nuxt/schema';
|
|
3
3
|
import theme from '#build/b24ui/input-number';
|
|
4
4
|
import type { ButtonProps, BadgeProps, IconComponent } from '../types';
|
|
5
|
+
import type { InputHTMLAttributes } from '../types/html';
|
|
5
6
|
import type { ModelModifiers } from '../types/input';
|
|
6
7
|
import type { ComponentConfig } from '../types/tv';
|
|
7
8
|
type InputNumber = ComponentConfig<typeof theme, AppConfig, 'inputNumber'>;
|
|
8
|
-
|
|
9
|
+
type InputNumberValue = number | null;
|
|
10
|
+
export interface InputNumberProps<T extends InputNumberValue = InputNumberValue> extends Pick<NumberFieldRootProps, 'modelValue' | 'defaultValue' | 'min' | 'max' | 'step' | 'stepSnapping' | 'disabled' | 'required' | 'id' | 'name' | 'formatOptions' | 'disableWheelChange' | 'invertWheelChange' | 'readonly'>, /** @vue-ignore */ Omit<InputHTMLAttributes, 'disabled' | 'min' | 'max' | 'readonly' | 'required' | 'step' | 'name' | 'placeholder' | 'type' | 'autofocus' | 'maxlength' | 'minlength' | 'pattern' | 'size'> {
|
|
9
11
|
/**
|
|
10
12
|
* The element or component this component should render as.
|
|
11
13
|
* @defaultValue 'div'
|
|
@@ -32,7 +34,7 @@ export interface InputNumberProps extends Pick<NumberFieldRootProps, 'modelValue
|
|
|
32
34
|
*/
|
|
33
35
|
underline?: boolean;
|
|
34
36
|
/**
|
|
35
|
-
* Rounds the corners of the
|
|
37
|
+
* Rounds the corners of the input
|
|
36
38
|
* @defaultValue false
|
|
37
39
|
*/
|
|
38
40
|
rounded?: boolean;
|
|
@@ -76,7 +78,7 @@ export interface InputNumberProps extends Pick<NumberFieldRootProps, 'modelValue
|
|
|
76
78
|
decrementDisabled?: boolean;
|
|
77
79
|
autofocus?: boolean;
|
|
78
80
|
autofocusDelay?: number;
|
|
79
|
-
modelModifiers?: Pick<ModelModifiers
|
|
81
|
+
modelModifiers?: Pick<ModelModifiers<T>, 'optional'>;
|
|
80
82
|
/**
|
|
81
83
|
* The locale to use for formatting and parsing numbers.
|
|
82
84
|
* @defaultValue B24App.locale.code
|
|
@@ -85,8 +87,8 @@ export interface InputNumberProps extends Pick<NumberFieldRootProps, 'modelValue
|
|
|
85
87
|
class?: any;
|
|
86
88
|
b24ui?: InputNumber['slots'];
|
|
87
89
|
}
|
|
88
|
-
export interface InputNumberEmits {
|
|
89
|
-
'update:modelValue': [value:
|
|
90
|
+
export interface InputNumberEmits<T extends InputNumberValue = InputNumberValue> {
|
|
91
|
+
'update:modelValue': [value: T];
|
|
90
92
|
'blur': [event: FocusEvent];
|
|
91
93
|
'change': [event: Event];
|
|
92
94
|
}
|
|
@@ -94,124 +96,23 @@ export interface InputNumberSlots {
|
|
|
94
96
|
increment(props?: {}): any;
|
|
95
97
|
decrement(props?: {}): any;
|
|
96
98
|
}
|
|
97
|
-
declare const __VLS_export:
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
[name: string]: import("vue").Slot<any> | undefined;
|
|
113
|
-
}>;
|
|
114
|
-
$root: import("vue").ComponentPublicInstance | null;
|
|
115
|
-
$parent: import("vue").ComponentPublicInstance | null;
|
|
116
|
-
$host: Element | null;
|
|
117
|
-
$emit: (event: string, ...args: any[]) => void;
|
|
118
|
-
$el: any;
|
|
119
|
-
$options: import("vue").ComponentOptionsBase<Readonly<import("reka-ui").NumberFieldInputProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
120
|
-
as: import("reka-ui").AsTag | import("vue").Component;
|
|
121
|
-
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
122
|
-
beforeCreate?: (() => void) | (() => void)[];
|
|
123
|
-
created?: (() => void) | (() => void)[];
|
|
124
|
-
beforeMount?: (() => void) | (() => void)[];
|
|
125
|
-
mounted?: (() => void) | (() => void)[];
|
|
126
|
-
beforeUpdate?: (() => void) | (() => void)[];
|
|
127
|
-
updated?: (() => void) | (() => void)[];
|
|
128
|
-
activated?: (() => void) | (() => void)[];
|
|
129
|
-
deactivated?: (() => void) | (() => void)[];
|
|
130
|
-
beforeDestroy?: (() => void) | (() => void)[];
|
|
131
|
-
beforeUnmount?: (() => void) | (() => void)[];
|
|
132
|
-
destroyed?: (() => void) | (() => void)[];
|
|
133
|
-
unmounted?: (() => void) | (() => void)[];
|
|
134
|
-
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
135
|
-
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
136
|
-
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
137
|
-
};
|
|
138
|
-
$forceUpdate: () => void;
|
|
139
|
-
$nextTick: typeof import("vue").nextTick;
|
|
140
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
141
|
-
} & Readonly<{
|
|
142
|
-
as: import("reka-ui").AsTag | import("vue").Component;
|
|
143
|
-
}> & Omit<Readonly<import("reka-ui").NumberFieldInputProps> & Readonly<{}>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
144
|
-
$slots: {
|
|
145
|
-
default?: (props: {}) => any;
|
|
146
|
-
};
|
|
147
|
-
}) | null, ({
|
|
148
|
-
$: import("vue").ComponentInternalInstance;
|
|
149
|
-
$data: {};
|
|
150
|
-
$props: {
|
|
151
|
-
readonly asChild?: boolean | undefined;
|
|
152
|
-
readonly as?: (import("reka-ui").AsTag | import("vue").Component) | undefined;
|
|
153
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
154
|
-
$attrs: {
|
|
155
|
-
[x: string]: unknown;
|
|
156
|
-
};
|
|
157
|
-
$refs: {
|
|
158
|
-
[x: string]: unknown;
|
|
159
|
-
};
|
|
160
|
-
$slots: Readonly<{
|
|
161
|
-
[name: string]: import("vue").Slot<any> | undefined;
|
|
162
|
-
}>;
|
|
163
|
-
$root: import("vue").ComponentPublicInstance | null;
|
|
164
|
-
$parent: import("vue").ComponentPublicInstance | null;
|
|
165
|
-
$host: Element | null;
|
|
166
|
-
$emit: (event: string, ...args: any[]) => void;
|
|
167
|
-
$el: any;
|
|
168
|
-
$options: import("vue").ComponentOptionsBase<Readonly<import("reka-ui").NumberFieldInputProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
169
|
-
as: import("reka-ui").AsTag | import("vue").Component;
|
|
170
|
-
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
171
|
-
beforeCreate?: (() => void) | (() => void)[];
|
|
172
|
-
created?: (() => void) | (() => void)[];
|
|
173
|
-
beforeMount?: (() => void) | (() => void)[];
|
|
174
|
-
mounted?: (() => void) | (() => void)[];
|
|
175
|
-
beforeUpdate?: (() => void) | (() => void)[];
|
|
176
|
-
updated?: (() => void) | (() => void)[];
|
|
177
|
-
activated?: (() => void) | (() => void)[];
|
|
178
|
-
deactivated?: (() => void) | (() => void)[];
|
|
179
|
-
beforeDestroy?: (() => void) | (() => void)[];
|
|
180
|
-
beforeUnmount?: (() => void) | (() => void)[];
|
|
181
|
-
destroyed?: (() => void) | (() => void)[];
|
|
182
|
-
unmounted?: (() => void) | (() => void)[];
|
|
183
|
-
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
184
|
-
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
185
|
-
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
186
|
-
};
|
|
187
|
-
$forceUpdate: () => void;
|
|
188
|
-
$nextTick: typeof import("vue").nextTick;
|
|
189
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
190
|
-
} & Readonly<{
|
|
191
|
-
as: import("reka-ui").AsTag | import("vue").Component;
|
|
192
|
-
}> & Omit<Readonly<import("reka-ui").NumberFieldInputProps> & Readonly<{}>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
193
|
-
$slots: {
|
|
194
|
-
default?: (props: {}) => any;
|
|
195
|
-
};
|
|
196
|
-
}) | null>;
|
|
197
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
198
|
-
blur: (event: FocusEvent) => any;
|
|
199
|
-
change: (event: Event) => any;
|
|
200
|
-
"update:modelValue": (value: number) => any;
|
|
201
|
-
}, string, import("vue").PublicProps, Readonly<InputNumberProps> & Readonly<{
|
|
202
|
-
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
203
|
-
onChange?: ((event: Event) => any) | undefined;
|
|
204
|
-
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
205
|
-
}>, {
|
|
206
|
-
color: InputNumber["variants"]["color"];
|
|
207
|
-
decrement: boolean | ButtonProps;
|
|
208
|
-
increment: boolean | ButtonProps;
|
|
209
|
-
orientation: "vertical" | "horizontal";
|
|
210
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, InputNumberSlots>;
|
|
99
|
+
declare const __VLS_export: <T extends InputNumberValue = InputNumberValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
100
|
+
props: __VLS_PrettifyLocal<InputNumberProps<T> & {
|
|
101
|
+
onChange?: ((event: Event) => any) | undefined;
|
|
102
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
103
|
+
"onUpdate:modelValue"?: ((value: T) => any) | undefined;
|
|
104
|
+
}> & import("vue").PublicProps;
|
|
105
|
+
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
106
|
+
inputRef: Readonly<import("vue").Ref<HTMLInputElement, HTMLInputElement>>;
|
|
107
|
+
}>) => void;
|
|
108
|
+
attrs: any;
|
|
109
|
+
slots: InputNumberSlots;
|
|
110
|
+
emit: ((evt: "change", event: Event) => void) & ((evt: "blur", event: FocusEvent) => void) & ((evt: "update:modelValue", value: T) => void);
|
|
111
|
+
}>) => import("vue").VNode & {
|
|
112
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
113
|
+
};
|
|
211
114
|
declare const _default: typeof __VLS_export;
|
|
212
115
|
export default _default;
|
|
213
|
-
type
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
};
|
|
217
|
-
};
|
|
116
|
+
type __VLS_PrettifyLocal<T> = {
|
|
117
|
+
[K in keyof T as K]: T[K];
|
|
118
|
+
} & {};
|
|
@@ -3,7 +3,7 @@ import theme from "#build/b24ui/input-number";
|
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
6
|
-
import { onMounted,
|
|
6
|
+
import { onMounted, computed, useTemplateRef, toRef } from "vue";
|
|
7
7
|
import { NumberFieldRoot, NumberFieldInput, NumberFieldDecrement, NumberFieldIncrement, useForwardPropsEmits } from "reka-ui";
|
|
8
8
|
import { reactivePick, useVModel } from "@vueuse/core";
|
|
9
9
|
import { useAppConfig } from "#imports";
|
|
@@ -81,7 +81,7 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.inputNu
|
|
|
81
81
|
}));
|
|
82
82
|
const incrementIcon = computed(() => props.incrementIcon || (props.orientation === "horizontal" ? icons.plus : icons.chevronUp));
|
|
83
83
|
const decrementIcon = computed(() => props.decrementIcon || (props.orientation === "horizontal" ? icons.minus : icons.chevronDown));
|
|
84
|
-
const inputRef =
|
|
84
|
+
const inputRef = useTemplateRef("inputRef");
|
|
85
85
|
function onUpdate(value) {
|
|
86
86
|
if (props.modelModifiers?.optional) {
|
|
87
87
|
value = value ?? void 0;
|
|
@@ -106,7 +106,7 @@ onMounted(() => {
|
|
|
106
106
|
}, props.autofocusDelay);
|
|
107
107
|
});
|
|
108
108
|
defineExpose({
|
|
109
|
-
inputRef
|
|
109
|
+
inputRef: toRef(() => inputRef.value?.$el)
|
|
110
110
|
});
|
|
111
111
|
</script>
|
|
112
112
|
|
|
@@ -2,10 +2,12 @@ import type { NumberFieldRootProps } from 'reka-ui';
|
|
|
2
2
|
import type { AppConfig } from '@nuxt/schema';
|
|
3
3
|
import theme from '#build/b24ui/input-number';
|
|
4
4
|
import type { ButtonProps, BadgeProps, IconComponent } from '../types';
|
|
5
|
+
import type { InputHTMLAttributes } from '../types/html';
|
|
5
6
|
import type { ModelModifiers } from '../types/input';
|
|
6
7
|
import type { ComponentConfig } from '../types/tv';
|
|
7
8
|
type InputNumber = ComponentConfig<typeof theme, AppConfig, 'inputNumber'>;
|
|
8
|
-
|
|
9
|
+
type InputNumberValue = number | null;
|
|
10
|
+
export interface InputNumberProps<T extends InputNumberValue = InputNumberValue> extends Pick<NumberFieldRootProps, 'modelValue' | 'defaultValue' | 'min' | 'max' | 'step' | 'stepSnapping' | 'disabled' | 'required' | 'id' | 'name' | 'formatOptions' | 'disableWheelChange' | 'invertWheelChange' | 'readonly'>, /** @vue-ignore */ Omit<InputHTMLAttributes, 'disabled' | 'min' | 'max' | 'readonly' | 'required' | 'step' | 'name' | 'placeholder' | 'type' | 'autofocus' | 'maxlength' | 'minlength' | 'pattern' | 'size'> {
|
|
9
11
|
/**
|
|
10
12
|
* The element or component this component should render as.
|
|
11
13
|
* @defaultValue 'div'
|
|
@@ -32,7 +34,7 @@ export interface InputNumberProps extends Pick<NumberFieldRootProps, 'modelValue
|
|
|
32
34
|
*/
|
|
33
35
|
underline?: boolean;
|
|
34
36
|
/**
|
|
35
|
-
* Rounds the corners of the
|
|
37
|
+
* Rounds the corners of the input
|
|
36
38
|
* @defaultValue false
|
|
37
39
|
*/
|
|
38
40
|
rounded?: boolean;
|
|
@@ -76,7 +78,7 @@ export interface InputNumberProps extends Pick<NumberFieldRootProps, 'modelValue
|
|
|
76
78
|
decrementDisabled?: boolean;
|
|
77
79
|
autofocus?: boolean;
|
|
78
80
|
autofocusDelay?: number;
|
|
79
|
-
modelModifiers?: Pick<ModelModifiers
|
|
81
|
+
modelModifiers?: Pick<ModelModifiers<T>, 'optional'>;
|
|
80
82
|
/**
|
|
81
83
|
* The locale to use for formatting and parsing numbers.
|
|
82
84
|
* @defaultValue B24App.locale.code
|
|
@@ -85,8 +87,8 @@ export interface InputNumberProps extends Pick<NumberFieldRootProps, 'modelValue
|
|
|
85
87
|
class?: any;
|
|
86
88
|
b24ui?: InputNumber['slots'];
|
|
87
89
|
}
|
|
88
|
-
export interface InputNumberEmits {
|
|
89
|
-
'update:modelValue': [value:
|
|
90
|
+
export interface InputNumberEmits<T extends InputNumberValue = InputNumberValue> {
|
|
91
|
+
'update:modelValue': [value: T];
|
|
90
92
|
'blur': [event: FocusEvent];
|
|
91
93
|
'change': [event: Event];
|
|
92
94
|
}
|
|
@@ -94,124 +96,23 @@ export interface InputNumberSlots {
|
|
|
94
96
|
increment(props?: {}): any;
|
|
95
97
|
decrement(props?: {}): any;
|
|
96
98
|
}
|
|
97
|
-
declare const __VLS_export:
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
[name: string]: import("vue").Slot<any> | undefined;
|
|
113
|
-
}>;
|
|
114
|
-
$root: import("vue").ComponentPublicInstance | null;
|
|
115
|
-
$parent: import("vue").ComponentPublicInstance | null;
|
|
116
|
-
$host: Element | null;
|
|
117
|
-
$emit: (event: string, ...args: any[]) => void;
|
|
118
|
-
$el: any;
|
|
119
|
-
$options: import("vue").ComponentOptionsBase<Readonly<import("reka-ui").NumberFieldInputProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
120
|
-
as: import("reka-ui").AsTag | import("vue").Component;
|
|
121
|
-
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
122
|
-
beforeCreate?: (() => void) | (() => void)[];
|
|
123
|
-
created?: (() => void) | (() => void)[];
|
|
124
|
-
beforeMount?: (() => void) | (() => void)[];
|
|
125
|
-
mounted?: (() => void) | (() => void)[];
|
|
126
|
-
beforeUpdate?: (() => void) | (() => void)[];
|
|
127
|
-
updated?: (() => void) | (() => void)[];
|
|
128
|
-
activated?: (() => void) | (() => void)[];
|
|
129
|
-
deactivated?: (() => void) | (() => void)[];
|
|
130
|
-
beforeDestroy?: (() => void) | (() => void)[];
|
|
131
|
-
beforeUnmount?: (() => void) | (() => void)[];
|
|
132
|
-
destroyed?: (() => void) | (() => void)[];
|
|
133
|
-
unmounted?: (() => void) | (() => void)[];
|
|
134
|
-
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
135
|
-
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
136
|
-
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
137
|
-
};
|
|
138
|
-
$forceUpdate: () => void;
|
|
139
|
-
$nextTick: typeof import("vue").nextTick;
|
|
140
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
141
|
-
} & Readonly<{
|
|
142
|
-
as: import("reka-ui").AsTag | import("vue").Component;
|
|
143
|
-
}> & Omit<Readonly<import("reka-ui").NumberFieldInputProps> & Readonly<{}>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
144
|
-
$slots: {
|
|
145
|
-
default?: (props: {}) => any;
|
|
146
|
-
};
|
|
147
|
-
}) | null, ({
|
|
148
|
-
$: import("vue").ComponentInternalInstance;
|
|
149
|
-
$data: {};
|
|
150
|
-
$props: {
|
|
151
|
-
readonly asChild?: boolean | undefined;
|
|
152
|
-
readonly as?: (import("reka-ui").AsTag | import("vue").Component) | undefined;
|
|
153
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
154
|
-
$attrs: {
|
|
155
|
-
[x: string]: unknown;
|
|
156
|
-
};
|
|
157
|
-
$refs: {
|
|
158
|
-
[x: string]: unknown;
|
|
159
|
-
};
|
|
160
|
-
$slots: Readonly<{
|
|
161
|
-
[name: string]: import("vue").Slot<any> | undefined;
|
|
162
|
-
}>;
|
|
163
|
-
$root: import("vue").ComponentPublicInstance | null;
|
|
164
|
-
$parent: import("vue").ComponentPublicInstance | null;
|
|
165
|
-
$host: Element | null;
|
|
166
|
-
$emit: (event: string, ...args: any[]) => void;
|
|
167
|
-
$el: any;
|
|
168
|
-
$options: import("vue").ComponentOptionsBase<Readonly<import("reka-ui").NumberFieldInputProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
169
|
-
as: import("reka-ui").AsTag | import("vue").Component;
|
|
170
|
-
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
171
|
-
beforeCreate?: (() => void) | (() => void)[];
|
|
172
|
-
created?: (() => void) | (() => void)[];
|
|
173
|
-
beforeMount?: (() => void) | (() => void)[];
|
|
174
|
-
mounted?: (() => void) | (() => void)[];
|
|
175
|
-
beforeUpdate?: (() => void) | (() => void)[];
|
|
176
|
-
updated?: (() => void) | (() => void)[];
|
|
177
|
-
activated?: (() => void) | (() => void)[];
|
|
178
|
-
deactivated?: (() => void) | (() => void)[];
|
|
179
|
-
beforeDestroy?: (() => void) | (() => void)[];
|
|
180
|
-
beforeUnmount?: (() => void) | (() => void)[];
|
|
181
|
-
destroyed?: (() => void) | (() => void)[];
|
|
182
|
-
unmounted?: (() => void) | (() => void)[];
|
|
183
|
-
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
184
|
-
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
185
|
-
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
186
|
-
};
|
|
187
|
-
$forceUpdate: () => void;
|
|
188
|
-
$nextTick: typeof import("vue").nextTick;
|
|
189
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
190
|
-
} & Readonly<{
|
|
191
|
-
as: import("reka-ui").AsTag | import("vue").Component;
|
|
192
|
-
}> & Omit<Readonly<import("reka-ui").NumberFieldInputProps> & Readonly<{}>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
193
|
-
$slots: {
|
|
194
|
-
default?: (props: {}) => any;
|
|
195
|
-
};
|
|
196
|
-
}) | null>;
|
|
197
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
198
|
-
blur: (event: FocusEvent) => any;
|
|
199
|
-
change: (event: Event) => any;
|
|
200
|
-
"update:modelValue": (value: number) => any;
|
|
201
|
-
}, string, import("vue").PublicProps, Readonly<InputNumberProps> & Readonly<{
|
|
202
|
-
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
203
|
-
onChange?: ((event: Event) => any) | undefined;
|
|
204
|
-
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
205
|
-
}>, {
|
|
206
|
-
color: InputNumber["variants"]["color"];
|
|
207
|
-
decrement: boolean | ButtonProps;
|
|
208
|
-
increment: boolean | ButtonProps;
|
|
209
|
-
orientation: "vertical" | "horizontal";
|
|
210
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, InputNumberSlots>;
|
|
99
|
+
declare const __VLS_export: <T extends InputNumberValue = InputNumberValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
100
|
+
props: __VLS_PrettifyLocal<InputNumberProps<T> & {
|
|
101
|
+
onChange?: ((event: Event) => any) | undefined;
|
|
102
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
103
|
+
"onUpdate:modelValue"?: ((value: T) => any) | undefined;
|
|
104
|
+
}> & import("vue").PublicProps;
|
|
105
|
+
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
106
|
+
inputRef: Readonly<import("vue").Ref<HTMLInputElement, HTMLInputElement>>;
|
|
107
|
+
}>) => void;
|
|
108
|
+
attrs: any;
|
|
109
|
+
slots: InputNumberSlots;
|
|
110
|
+
emit: ((evt: "change", event: Event) => void) & ((evt: "blur", event: FocusEvent) => void) & ((evt: "update:modelValue", value: T) => void);
|
|
111
|
+
}>) => import("vue").VNode & {
|
|
112
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
113
|
+
};
|
|
211
114
|
declare const _default: typeof __VLS_export;
|
|
212
115
|
export default _default;
|
|
213
|
-
type
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
};
|
|
217
|
-
};
|
|
116
|
+
type __VLS_PrettifyLocal<T> = {
|
|
117
|
+
[K in keyof T as K]: T[K];
|
|
118
|
+
} & {};
|
|
@@ -3,10 +3,11 @@ import type { TagsInputRootProps, TagsInputRootEmits, AcceptableInputValue } fro
|
|
|
3
3
|
import theme from '#build/b24ui/input-tags';
|
|
4
4
|
import type { UseComponentIconsProps } from '../composables/useComponentIcons';
|
|
5
5
|
import type { BadgeProps, IconComponent } from '../types';
|
|
6
|
+
import type { InputHTMLAttributes } from '../types/html';
|
|
6
7
|
import type { ComponentConfig } from '../types/tv';
|
|
7
8
|
type InputTags = ComponentConfig<typeof theme, AppConfig, 'inputTags'>;
|
|
8
9
|
export type InputTagItem = AcceptableInputValue;
|
|
9
|
-
export interface InputTagsProps<T extends InputTagItem = InputTagItem> extends Pick<TagsInputRootProps<T>, 'modelValue' | 'defaultValue' | 'addOnPaste' | 'addOnTab' | 'addOnBlur' | 'duplicate' | 'disabled' | 'delimiter' | 'max' | 'id' | 'convertValue' | 'displayValue' | 'name' | 'required'>, UseComponentIconsProps {
|
|
10
|
+
export interface InputTagsProps<T extends InputTagItem = InputTagItem> extends Pick<TagsInputRootProps<T>, 'modelValue' | 'defaultValue' | 'addOnPaste' | 'addOnTab' | 'addOnBlur' | 'duplicate' | 'disabled' | 'delimiter' | 'max' | 'id' | 'convertValue' | 'displayValue' | 'name' | 'required'>, UseComponentIconsProps, /** @vue-ignore */ Omit<InputHTMLAttributes, 'disabled' | 'max' | 'required' | 'name' | 'placeholder' | 'type' | 'autofocus' | 'maxlength' | 'minlength' | 'pattern' | 'size' | 'min' | 'step'> {
|
|
10
11
|
/**
|
|
11
12
|
* The element or component this component should render as.
|
|
12
13
|
* @defaultValue 'div'
|
|
@@ -35,7 +36,7 @@ export interface InputTagsProps<T extends InputTagItem = InputTagItem> extends P
|
|
|
35
36
|
*/
|
|
36
37
|
underline?: boolean;
|
|
37
38
|
/**
|
|
38
|
-
* Rounds the corners of the
|
|
39
|
+
* Rounds the corners of the input
|
|
39
40
|
* @defaultValue false
|
|
40
41
|
*/
|
|
41
42
|
rounded?: boolean;
|
|
@@ -82,8 +83,8 @@ export interface InputTagsSlots<T extends InputTagItem = InputTagItem> {
|
|
|
82
83
|
}
|
|
83
84
|
declare const __VLS_export: <T extends InputTagItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
84
85
|
props: __VLS_PrettifyLocal<InputTagsProps<T> & {
|
|
85
|
-
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
86
86
|
onChange?: ((event: Event) => any) | undefined;
|
|
87
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
87
88
|
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
88
89
|
onInvalid?: ((payload: T) => any) | undefined;
|
|
89
90
|
"onUpdate:modelValue"?: ((payload: T[]) => any) | undefined;
|
|
@@ -91,115 +92,11 @@ declare const __VLS_export: <T extends InputTagItem>(__VLS_props: NonNullable<Aw
|
|
|
91
92
|
onRemoveTag?: ((payload: T) => any) | undefined;
|
|
92
93
|
}> & import("vue").PublicProps;
|
|
93
94
|
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
94
|
-
inputRef: import("vue").Ref<
|
|
95
|
-
$: import("vue").ComponentInternalInstance;
|
|
96
|
-
$data: {};
|
|
97
|
-
$props: {
|
|
98
|
-
readonly placeholder?: string | undefined;
|
|
99
|
-
readonly autoFocus?: boolean | undefined;
|
|
100
|
-
readonly maxLength?: number | undefined;
|
|
101
|
-
readonly asChild?: boolean | undefined;
|
|
102
|
-
readonly as?: (import("reka-ui").AsTag | import("vue").Component) | undefined;
|
|
103
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
104
|
-
$attrs: {
|
|
105
|
-
[x: string]: unknown;
|
|
106
|
-
};
|
|
107
|
-
$refs: {
|
|
108
|
-
[x: string]: unknown;
|
|
109
|
-
};
|
|
110
|
-
$slots: Readonly<{
|
|
111
|
-
[name: string]: import("vue").Slot<any> | undefined;
|
|
112
|
-
}>;
|
|
113
|
-
$root: import("vue").ComponentPublicInstance | null;
|
|
114
|
-
$parent: import("vue").ComponentPublicInstance | null;
|
|
115
|
-
$host: Element | null;
|
|
116
|
-
$emit: (event: string, ...args: any[]) => void;
|
|
117
|
-
$el: any;
|
|
118
|
-
$options: import("vue").ComponentOptionsBase<Readonly<import("reka-ui").TagsInputInputProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
119
|
-
as: import("reka-ui").AsTag | import("vue").Component;
|
|
120
|
-
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
121
|
-
beforeCreate?: (() => void) | (() => void)[];
|
|
122
|
-
created?: (() => void) | (() => void)[];
|
|
123
|
-
beforeMount?: (() => void) | (() => void)[];
|
|
124
|
-
mounted?: (() => void) | (() => void)[];
|
|
125
|
-
beforeUpdate?: (() => void) | (() => void)[];
|
|
126
|
-
updated?: (() => void) | (() => void)[];
|
|
127
|
-
activated?: (() => void) | (() => void)[];
|
|
128
|
-
deactivated?: (() => void) | (() => void)[];
|
|
129
|
-
beforeDestroy?: (() => void) | (() => void)[];
|
|
130
|
-
beforeUnmount?: (() => void) | (() => void)[];
|
|
131
|
-
destroyed?: (() => void) | (() => void)[];
|
|
132
|
-
unmounted?: (() => void) | (() => void)[];
|
|
133
|
-
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
134
|
-
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
135
|
-
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
136
|
-
};
|
|
137
|
-
$forceUpdate: () => void;
|
|
138
|
-
$nextTick: typeof import("vue").nextTick;
|
|
139
|
-
$watch<T_1 extends string | ((...args: any) => any)>(source: T_1, cb: T_1 extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
140
|
-
} & Readonly<{
|
|
141
|
-
as: import("reka-ui").AsTag | import("vue").Component;
|
|
142
|
-
}> & Omit<Readonly<import("reka-ui").TagsInputInputProps> & Readonly<{}>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
143
|
-
$slots: {
|
|
144
|
-
default?: (props: {}) => any;
|
|
145
|
-
};
|
|
146
|
-
}) | null, ({
|
|
147
|
-
$: import("vue").ComponentInternalInstance;
|
|
148
|
-
$data: {};
|
|
149
|
-
$props: {
|
|
150
|
-
readonly placeholder?: string | undefined;
|
|
151
|
-
readonly autoFocus?: boolean | undefined;
|
|
152
|
-
readonly maxLength?: number | undefined;
|
|
153
|
-
readonly asChild?: boolean | undefined;
|
|
154
|
-
readonly as?: (import("reka-ui").AsTag | import("vue").Component) | undefined;
|
|
155
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
156
|
-
$attrs: {
|
|
157
|
-
[x: string]: unknown;
|
|
158
|
-
};
|
|
159
|
-
$refs: {
|
|
160
|
-
[x: string]: unknown;
|
|
161
|
-
};
|
|
162
|
-
$slots: Readonly<{
|
|
163
|
-
[name: string]: import("vue").Slot<any> | undefined;
|
|
164
|
-
}>;
|
|
165
|
-
$root: import("vue").ComponentPublicInstance | null;
|
|
166
|
-
$parent: import("vue").ComponentPublicInstance | null;
|
|
167
|
-
$host: Element | null;
|
|
168
|
-
$emit: (event: string, ...args: any[]) => void;
|
|
169
|
-
$el: any;
|
|
170
|
-
$options: import("vue").ComponentOptionsBase<Readonly<import("reka-ui").TagsInputInputProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
171
|
-
as: import("reka-ui").AsTag | import("vue").Component;
|
|
172
|
-
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
173
|
-
beforeCreate?: (() => void) | (() => void)[];
|
|
174
|
-
created?: (() => void) | (() => void)[];
|
|
175
|
-
beforeMount?: (() => void) | (() => void)[];
|
|
176
|
-
mounted?: (() => void) | (() => void)[];
|
|
177
|
-
beforeUpdate?: (() => void) | (() => void)[];
|
|
178
|
-
updated?: (() => void) | (() => void)[];
|
|
179
|
-
activated?: (() => void) | (() => void)[];
|
|
180
|
-
deactivated?: (() => void) | (() => void)[];
|
|
181
|
-
beforeDestroy?: (() => void) | (() => void)[];
|
|
182
|
-
beforeUnmount?: (() => void) | (() => void)[];
|
|
183
|
-
destroyed?: (() => void) | (() => void)[];
|
|
184
|
-
unmounted?: (() => void) | (() => void)[];
|
|
185
|
-
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
186
|
-
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
187
|
-
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
188
|
-
};
|
|
189
|
-
$forceUpdate: () => void;
|
|
190
|
-
$nextTick: typeof import("vue").nextTick;
|
|
191
|
-
$watch<T_1 extends string | ((...args: any) => any)>(source: T_1, cb: T_1 extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
192
|
-
} & Readonly<{
|
|
193
|
-
as: import("reka-ui").AsTag | import("vue").Component;
|
|
194
|
-
}> & Omit<Readonly<import("reka-ui").TagsInputInputProps> & Readonly<{}>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
195
|
-
$slots: {
|
|
196
|
-
default?: (props: {}) => any;
|
|
197
|
-
};
|
|
198
|
-
}) | null>;
|
|
95
|
+
inputRef: Readonly<import("vue").Ref<HTMLInputElement, HTMLInputElement>>;
|
|
199
96
|
}>) => void;
|
|
200
97
|
attrs: any;
|
|
201
98
|
slots: InputTagsSlots<T>;
|
|
202
|
-
emit: ((evt: "
|
|
99
|
+
emit: ((evt: "change", event: Event) => void) & ((evt: "blur", event: FocusEvent) => void) & ((evt: "focus", event: FocusEvent) => void) & ((evt: "invalid", payload: T) => void) & ((evt: "update:modelValue", payload: T[]) => void) & ((evt: "addTag", payload: T) => void) & ((evt: "removeTag", payload: T) => void);
|
|
203
100
|
}>) => import("vue").VNode & {
|
|
204
101
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
205
102
|
};
|
|
@@ -3,7 +3,7 @@ import theme from "#build/b24ui/input-tags";
|
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
6
|
-
import { computed,
|
|
6
|
+
import { computed, useTemplateRef, onMounted, toRaw, toRef } from "vue";
|
|
7
7
|
import { TagsInputRoot, TagsInputItem, TagsInputItemText, TagsInputItemDelete, TagsInputInput, useForwardPropsEmits } from "reka-ui";
|
|
8
8
|
import { reactivePick } from "@vueuse/core";
|
|
9
9
|
import { useAppConfig } from "#imports";
|
|
@@ -75,17 +75,17 @@ const b24ui = computed(() => tv({ extend: tv(theme), ...appConfig.b24ui?.inputTa
|
|
|
75
75
|
trailing: Boolean(isTrailing.value || !!slots.trailing),
|
|
76
76
|
fieldGroup: orientation.value
|
|
77
77
|
}));
|
|
78
|
-
const inputRef =
|
|
79
|
-
onMounted(() => {
|
|
80
|
-
setTimeout(() => {
|
|
81
|
-
autoFocus();
|
|
82
|
-
}, props.autofocusDelay);
|
|
83
|
-
});
|
|
78
|
+
const inputRef = useTemplateRef("inputRef");
|
|
84
79
|
function autoFocus() {
|
|
85
80
|
if (props.autofocus) {
|
|
86
81
|
inputRef.value?.$el?.focus();
|
|
87
82
|
}
|
|
88
83
|
}
|
|
84
|
+
onMounted(() => {
|
|
85
|
+
setTimeout(() => {
|
|
86
|
+
autoFocus();
|
|
87
|
+
}, props.autofocusDelay);
|
|
88
|
+
});
|
|
89
89
|
function onUpdate(value) {
|
|
90
90
|
if (toRaw(props.modelValue) === value) {
|
|
91
91
|
return;
|
|
@@ -104,7 +104,7 @@ function onFocus(event) {
|
|
|
104
104
|
emitFormFocus();
|
|
105
105
|
}
|
|
106
106
|
defineExpose({
|
|
107
|
-
inputRef
|
|
107
|
+
inputRef: toRef(() => inputRef.value?.$el)
|
|
108
108
|
});
|
|
109
109
|
</script>
|
|
110
110
|
|