@bitrix24/b24ui-nuxt 0.5.9 → 0.5.10
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/.nuxt/b24ui/navigation-menu.ts +0 -2
- package/.nuxt/b24ui/popover.ts +1 -1
- package/dist/meta.d.mts +4789 -4897
- package/dist/meta.mjs +4789 -4897
- package/dist/module.json +5 -5
- package/dist/module.mjs +11 -7
- package/dist/runtime/components/Advice.vue +47 -54
- package/dist/runtime/components/Advice.vue.d.ts +170 -0
- package/dist/runtime/components/Alert.vue +71 -96
- package/dist/runtime/components/Alert.vue.d.ts +464 -0
- package/dist/runtime/components/App.vue +37 -34
- package/dist/runtime/components/App.vue.d.ts +23 -0
- package/dist/runtime/components/Avatar.vue +69 -81
- package/dist/runtime/components/Avatar.vue.d.ts +281 -0
- package/dist/runtime/components/AvatarGroup.vue +53 -76
- package/dist/runtime/components/AvatarGroup.vue.d.ts +204 -0
- package/dist/runtime/components/Badge.vue +83 -83
- package/dist/runtime/components/Badge.vue.d.ts +517 -0
- package/dist/runtime/components/Button.vue +219 -149
- package/dist/runtime/components/Button.vue.d.ts +640 -0
- package/dist/runtime/components/ButtonGroup.vue +35 -51
- package/dist/runtime/components/ButtonGroup.vue.d.ts +116 -0
- package/dist/runtime/components/Calendar.vue +186 -152
- package/dist/runtime/components/Calendar.vue.d.ts +437 -0
- package/dist/runtime/components/Checkbox.vue +84 -73
- package/dist/runtime/components/Checkbox.vue.d.ts +354 -0
- package/dist/runtime/components/Chip.vue +59 -74
- package/dist/runtime/components/Chip.vue.d.ts +271 -0
- package/dist/runtime/components/Collapsible.vue +44 -41
- package/dist/runtime/components/Collapsible.vue.d.ts +118 -0
- package/dist/runtime/components/Container.vue +18 -27
- package/dist/runtime/components/Container.vue.d.ts +27 -0
- package/dist/runtime/components/Countdown.vue +198 -378
- package/dist/runtime/components/Countdown.vue.d.ts +356 -0
- package/dist/runtime/components/DescriptionList.vue +102 -149
- package/dist/runtime/components/DescriptionList.vue.d.ts +379 -0
- package/dist/runtime/components/DropdownMenu.vue +83 -139
- package/dist/runtime/components/DropdownMenu.vue.d.ts +533 -0
- package/dist/runtime/components/DropdownMenuContent.vue +137 -81
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +228 -0
- package/dist/runtime/components/Form.vue +162 -216
- package/dist/runtime/components/Form.vue.d.ts +55 -0
- package/dist/runtime/components/FormField.vue +76 -80
- package/dist/runtime/components/FormField.vue.d.ts +282 -0
- package/dist/runtime/components/Input.vue +160 -179
- package/dist/runtime/components/Input.vue.d.ts +755 -0
- package/dist/runtime/components/InputMenu.vue +300 -381
- package/dist/runtime/components/InputMenu.vue.d.ts +1504 -0
- package/dist/runtime/components/InputNumber.vue +178 -175
- package/dist/runtime/components/InputNumber.vue.d.ts +658 -0
- package/dist/runtime/components/Kbd.vue +33 -45
- package/dist/runtime/components/Kbd.vue.d.ts +109 -0
- package/dist/runtime/components/Link.vue +179 -173
- package/dist/runtime/components/Link.vue.d.ts +129 -0
- package/dist/runtime/components/LinkBase.vue +64 -42
- package/dist/runtime/components/LinkBase.vue.d.ts +48 -0
- package/dist/runtime/components/Modal.vue +105 -127
- package/dist/runtime/components/Modal.vue.d.ts +327 -0
- package/dist/runtime/components/ModalDialogClose.vue +4 -8
- package/dist/runtime/components/ModalDialogClose.vue.d.ts +10 -0
- package/dist/runtime/components/Navbar.vue +24 -33
- package/dist/runtime/components/Navbar.vue.d.ts +101 -0
- package/dist/runtime/components/NavbarDivider.vue +24 -33
- package/dist/runtime/components/NavbarDivider.vue.d.ts +101 -0
- package/dist/runtime/components/NavbarSection.vue +24 -33
- package/dist/runtime/components/NavbarSection.vue.d.ts +101 -0
- package/dist/runtime/components/NavbarSpacer.vue +24 -33
- package/dist/runtime/components/NavbarSpacer.vue.d.ts +101 -0
- package/dist/runtime/components/NavigationMenu.vue +152 -216
- package/dist/runtime/components/NavigationMenu.vue.d.ts +824 -0
- package/dist/runtime/components/OverlayProvider.vue +13 -17
- package/dist/runtime/components/OverlayProvider.vue.d.ts +2 -0
- package/dist/runtime/components/Popover.vue +81 -81
- package/dist/runtime/components/Popover.vue.d.ts +147 -0
- package/dist/runtime/components/Progress.vue +109 -136
- package/dist/runtime/components/Progress.vue.d.ts +592 -0
- package/dist/runtime/components/RadioGroup.vue +120 -134
- package/dist/runtime/components/RadioGroup.vue.d.ts +723 -0
- package/dist/runtime/components/Range.vue +94 -85
- package/dist/runtime/components/Range.vue.d.ts +417 -0
- package/dist/runtime/components/Select.vue +212 -260
- package/dist/runtime/components/Select.vue.d.ts +1200 -0
- package/dist/runtime/components/SelectMenu.vue +272 -366
- package/dist/runtime/components/SelectMenu.vue.d.ts +1298 -0
- package/dist/runtime/components/Separator.vue +61 -71
- package/dist/runtime/components/Separator.vue.d.ts +400 -0
- package/dist/runtime/components/Sidebar.vue +24 -33
- package/dist/runtime/components/Sidebar.vue.d.ts +101 -0
- package/dist/runtime/components/SidebarBody.vue +30 -38
- package/dist/runtime/components/SidebarBody.vue.d.ts +90 -0
- package/dist/runtime/components/SidebarFooter.vue +24 -33
- package/dist/runtime/components/SidebarFooter.vue.d.ts +101 -0
- package/dist/runtime/components/SidebarHeader.vue +24 -33
- package/dist/runtime/components/SidebarHeader.vue.d.ts +101 -0
- package/dist/runtime/components/SidebarHeading.vue +24 -33
- package/dist/runtime/components/SidebarHeading.vue.d.ts +101 -0
- package/dist/runtime/components/SidebarLayout.vue +40 -70
- package/dist/runtime/components/SidebarLayout.vue.d.ts +222 -0
- package/dist/runtime/components/SidebarSection.vue +24 -33
- package/dist/runtime/components/SidebarSection.vue.d.ts +101 -0
- package/dist/runtime/components/SidebarSpacer.vue +24 -33
- package/dist/runtime/components/SidebarSpacer.vue.d.ts +101 -0
- package/dist/runtime/components/Skeleton.vue +17 -22
- package/dist/runtime/components/Skeleton.vue.d.ts +26 -0
- package/dist/runtime/components/Slideover.vue +108 -131
- package/dist/runtime/components/Slideover.vue.d.ts +360 -0
- package/dist/runtime/components/StackedLayout.vue +40 -73
- package/dist/runtime/components/StackedLayout.vue.d.ts +192 -0
- package/dist/runtime/components/Switch.vue +100 -95
- package/dist/runtime/components/Switch.vue.d.ts +587 -0
- package/dist/runtime/components/Tabs.vue +83 -105
- package/dist/runtime/components/Tabs.vue.d.ts +453 -0
- package/dist/runtime/components/Textarea.vue +177 -201
- package/dist/runtime/components/Textarea.vue.d.ts +601 -0
- package/dist/runtime/components/Toast.vue +94 -105
- package/dist/runtime/components/Toast.vue.d.ts +438 -0
- package/dist/runtime/components/Toaster.vue +94 -111
- package/dist/runtime/components/Toaster.vue.d.ts +219 -0
- package/dist/runtime/components/Tooltip.vue +78 -64
- package/dist/runtime/components/Tooltip.vue.d.ts +186 -0
- package/dist/runtime/components/content/TableWrapper.vue +58 -70
- package/dist/runtime/components/content/TableWrapper.vue.d.ts +237 -0
- package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
- package/dist/runtime/composables/useButtonGroup.d.ts +2 -2
- package/dist/runtime/composables/useComponentIcons.d.ts +1 -1
- package/dist/runtime/composables/useFormField.d.ts +1 -1
- package/dist/runtime/prose/A.vue +18 -23
- package/dist/runtime/prose/A.vue.d.ts +84 -0
- package/dist/runtime/prose/Blockquote.vue +18 -23
- package/dist/runtime/prose/Blockquote.vue.d.ts +84 -0
- package/dist/runtime/prose/Code.vue +23 -31
- package/dist/runtime/prose/Code.vue.d.ts +97 -0
- package/dist/runtime/prose/Em.vue +18 -23
- package/dist/runtime/prose/Em.vue.d.ts +84 -0
- package/dist/runtime/prose/H1.vue +18 -23
- package/dist/runtime/prose/H1.vue.d.ts +97 -0
- package/dist/runtime/prose/H2.vue +18 -23
- package/dist/runtime/prose/H2.vue.d.ts +123 -0
- package/dist/runtime/prose/H3.vue +18 -23
- package/dist/runtime/prose/H3.vue.d.ts +123 -0
- package/dist/runtime/prose/H4.vue +18 -23
- package/dist/runtime/prose/H4.vue.d.ts +123 -0
- package/dist/runtime/prose/H5.vue +18 -23
- package/dist/runtime/prose/H5.vue.d.ts +123 -0
- package/dist/runtime/prose/H6.vue +18 -23
- package/dist/runtime/prose/H6.vue.d.ts +123 -0
- package/dist/runtime/prose/Hr.vue +18 -19
- package/dist/runtime/prose/Hr.vue.d.ts +74 -0
- package/dist/runtime/prose/Img.vue +18 -23
- package/dist/runtime/prose/Img.vue.d.ts +77 -0
- package/dist/runtime/prose/Li.vue +18 -23
- package/dist/runtime/prose/Li.vue.d.ts +84 -0
- package/dist/runtime/prose/Ol.vue +18 -23
- package/dist/runtime/prose/Ol.vue.d.ts +84 -0
- package/dist/runtime/prose/P.vue +18 -23
- package/dist/runtime/prose/P.vue.d.ts +84 -0
- package/dist/runtime/prose/Pre.vue +28 -33
- package/dist/runtime/prose/Pre.vue.d.ts +117 -0
- package/dist/runtime/prose/Strong.vue +18 -23
- package/dist/runtime/prose/Strong.vue.d.ts +84 -0
- package/dist/runtime/prose/Table.vue +44 -54
- package/dist/runtime/prose/Table.vue.d.ts +144 -0
- package/dist/runtime/prose/Tbody.vue +18 -23
- package/dist/runtime/prose/Tbody.vue.d.ts +84 -0
- package/dist/runtime/prose/Td.vue +18 -23
- package/dist/runtime/prose/Td.vue.d.ts +84 -0
- package/dist/runtime/prose/Th.vue +18 -23
- package/dist/runtime/prose/Th.vue.d.ts +84 -0
- package/dist/runtime/prose/Thead.vue +18 -23
- package/dist/runtime/prose/Thead.vue.d.ts +84 -0
- package/dist/runtime/prose/Tr.vue +18 -23
- package/dist/runtime/prose/Tr.vue.d.ts +84 -0
- package/dist/runtime/prose/Ul.vue +18 -23
- package/dist/runtime/prose/Ul.vue.d.ts +84 -0
- package/dist/runtime/vue/components/Link.vue +201 -202
- package/dist/runtime/vue/components/Link.vue.d.ts +129 -0
- package/dist/runtime/vue/stubs.d.ts +3 -3
- package/dist/shared/{b24ui-nuxt.C1lGF53R.mjs → b24ui-nuxt.CS9Lf0os.mjs} +4 -3
- package/dist/types.d.mts +3 -5
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +59 -32
- package/dist/meta.cjs +0 -72220
- package/dist/meta.d.cts +0 -72218
- package/dist/meta.d.ts +0 -72218
- package/dist/module.cjs +0 -59
- package/dist/module.d.cts +0 -15
- package/dist/module.d.ts +0 -15
- package/dist/shared/b24ui-nuxt.BVg3rkkG.cjs +0 -7720
- package/dist/types.d.ts +0 -7
- package/dist/unplugin.cjs +0 -236
- package/dist/unplugin.d.cts +0 -33
- package/dist/unplugin.d.ts +0 -33
- package/dist/vite.cjs +0 -21
- package/dist/vite.d.cts +0 -14
- package/dist/vite.d.ts +0 -14
|
@@ -1,87 +1,83 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const appConfigFormField = _appConfig as AppConfig & { b24ui: { formField: Partial<typeof theme> } }
|
|
9
|
-
|
|
10
|
-
const formField = tv({ extend: tv(theme), ...(appConfigFormField.b24ui?.formField || {}) })
|
|
11
|
-
|
|
12
|
-
type FormFieldVariants = VariantProps<typeof formField>
|
|
13
|
-
|
|
14
|
-
export interface FormFieldProps {
|
|
15
|
-
/**
|
|
16
|
-
* The element or component this component should render as.
|
|
17
|
-
* @defaultValue 'div'
|
|
18
|
-
*/
|
|
19
|
-
as?: any
|
|
20
|
-
/** The name of the FormField. Also used to match form errors. */
|
|
21
|
-
name?: string
|
|
22
|
-
/** A regular expression to match form error names. */
|
|
23
|
-
errorPattern?: RegExp
|
|
24
|
-
label?: string
|
|
25
|
-
description?: string
|
|
26
|
-
help?: string
|
|
27
|
-
error?: string | boolean
|
|
28
|
-
hint?: string
|
|
29
|
-
/**
|
|
30
|
-
* @defaultValue 'md'
|
|
31
|
-
*/
|
|
32
|
-
size?: FormFieldVariants['size']
|
|
33
|
-
/**
|
|
34
|
-
* @defaultValue false
|
|
35
|
-
*/
|
|
36
|
-
required?: boolean
|
|
37
|
-
/** If true, validation on input will be active immediately instead of waiting for a blur event. */
|
|
38
|
-
eagerValidation?: boolean
|
|
39
|
-
/**
|
|
40
|
-
* Delay in milliseconds before validating the form on input events.
|
|
41
|
-
* @defaultValue `300`
|
|
42
|
-
*/
|
|
43
|
-
validateOnInputDelay?: number
|
|
44
|
-
class?: any
|
|
45
|
-
b24ui?: Partial<typeof formField.slots>
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface FormFieldSlots {
|
|
49
|
-
label(props: { label?: string }): any
|
|
50
|
-
hint(props: { hint?: string }): any
|
|
51
|
-
description(props: { description?: string }): any
|
|
52
|
-
help(props: { help?: string }): any
|
|
53
|
-
error(props: { error?: string | boolean }): any
|
|
54
|
-
default(props: { error?: string | boolean }): any
|
|
55
|
-
}
|
|
1
|
+
<script>
|
|
2
|
+
import _appConfig from "#build/app.config";
|
|
3
|
+
import theme from "#build/b24ui/form-field";
|
|
4
|
+
import { tv } from "../utils/tv";
|
|
5
|
+
const appConfigFormField = _appConfig;
|
|
6
|
+
const formField = tv({ extend: tv(theme), ...appConfigFormField.b24ui?.formField || {} });
|
|
56
7
|
</script>
|
|
57
8
|
|
|
58
|
-
<script setup
|
|
59
|
-
import { computed, ref, inject, provide,
|
|
60
|
-
import {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
9
|
+
<script setup>
|
|
10
|
+
import { computed, ref, inject, provide, useId } from "vue";
|
|
11
|
+
import { formFieldInjectionKey, inputIdInjectionKey } from "../composables/useFormField";
|
|
12
|
+
const props = defineProps({
|
|
13
|
+
as: {
|
|
14
|
+
type: null,
|
|
15
|
+
required: false
|
|
16
|
+
},
|
|
17
|
+
name: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: false
|
|
20
|
+
},
|
|
21
|
+
errorPattern: {
|
|
22
|
+
type: null,
|
|
23
|
+
required: false
|
|
24
|
+
},
|
|
25
|
+
label: {
|
|
26
|
+
type: String,
|
|
27
|
+
required: false
|
|
28
|
+
},
|
|
29
|
+
description: {
|
|
30
|
+
type: String,
|
|
31
|
+
required: false
|
|
32
|
+
},
|
|
33
|
+
help: {
|
|
34
|
+
type: String,
|
|
35
|
+
required: false
|
|
36
|
+
},
|
|
37
|
+
error: {
|
|
38
|
+
type: [String, Boolean],
|
|
39
|
+
required: false
|
|
40
|
+
},
|
|
41
|
+
hint: {
|
|
42
|
+
type: String,
|
|
43
|
+
required: false
|
|
44
|
+
},
|
|
45
|
+
size: {
|
|
46
|
+
type: null,
|
|
47
|
+
required: false
|
|
48
|
+
},
|
|
49
|
+
required: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
required: false
|
|
52
|
+
},
|
|
53
|
+
eagerValidation: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
required: false
|
|
56
|
+
},
|
|
57
|
+
validateOnInputDelay: {
|
|
58
|
+
type: Number,
|
|
59
|
+
required: false
|
|
60
|
+
},
|
|
61
|
+
class: {
|
|
62
|
+
type: null,
|
|
63
|
+
required: false
|
|
64
|
+
},
|
|
65
|
+
b24ui: {
|
|
66
|
+
type: Object,
|
|
67
|
+
required: false
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
const slots = defineSlots();
|
|
68
71
|
const b24ui = computed(() => formField({
|
|
69
72
|
size: props.size,
|
|
70
73
|
required: props.required,
|
|
71
74
|
useDescription: Boolean(props.description) || !!slots.description
|
|
72
|
-
}))
|
|
73
|
-
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
const id = ref(useId())
|
|
79
|
-
// Copies id's initial value to bind aria-attributes such as aria-describedby.
|
|
80
|
-
// This is required for the RadioGroup component which unsets the id value.
|
|
81
|
-
const ariaId = id.value
|
|
82
|
-
|
|
83
|
-
provide(inputIdInjectionKey, id)
|
|
84
|
-
|
|
75
|
+
}));
|
|
76
|
+
const formErrors = inject("form-errors", null);
|
|
77
|
+
const error = computed(() => props.error || formErrors?.value?.find((error2) => error2.name && (error2.name === props.name || props.errorPattern && error2.name.match(props.errorPattern)))?.message);
|
|
78
|
+
const id = ref(useId());
|
|
79
|
+
const ariaId = id.value;
|
|
80
|
+
provide(inputIdInjectionKey, id);
|
|
85
81
|
provide(formFieldInjectionKey, computed(() => ({
|
|
86
82
|
error: error.value,
|
|
87
83
|
name: props.name,
|
|
@@ -93,7 +89,7 @@ provide(formFieldInjectionKey, computed(() => ({
|
|
|
93
89
|
description: props.description,
|
|
94
90
|
help: props.help,
|
|
95
91
|
ariaId
|
|
96
|
-
})
|
|
92
|
+
})));
|
|
97
93
|
</script>
|
|
98
94
|
|
|
99
95
|
<template>
|
|
@@ -122,7 +118,7 @@ provide(formFieldInjectionKey, computed(() => ({
|
|
|
122
118
|
<div :class="[(label || !!slots.label || description || !!slots.description) && b24ui.container({ class: props.b24ui?.container })]">
|
|
123
119
|
<slot :error="error" />
|
|
124
120
|
|
|
125
|
-
<div v-if="
|
|
121
|
+
<div v-if="typeof error === 'string' && error || !!slots.error" :id="`${ariaId}-error`" :class="b24ui.error({ class: props.b24ui?.error })">
|
|
126
122
|
<slot name="error" :error="error">
|
|
127
123
|
<div class="flex flex-row flex-nowrap gap-0.5">
|
|
128
124
|
<WarningIcon :class="b24ui.errorIcon()" />
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
declare const formField: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
useDescription: {
|
|
4
|
+
true: {
|
|
5
|
+
wrapper: string;
|
|
6
|
+
};
|
|
7
|
+
false: {
|
|
8
|
+
wrapper: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
size: {
|
|
12
|
+
xs: {
|
|
13
|
+
root: string;
|
|
14
|
+
errorIcon: string;
|
|
15
|
+
};
|
|
16
|
+
sm: {
|
|
17
|
+
root: string;
|
|
18
|
+
errorIcon: string;
|
|
19
|
+
};
|
|
20
|
+
md: {
|
|
21
|
+
root: string;
|
|
22
|
+
errorIcon: string;
|
|
23
|
+
};
|
|
24
|
+
lg: {
|
|
25
|
+
root: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
required: {
|
|
29
|
+
true: {
|
|
30
|
+
label: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
}, {
|
|
34
|
+
root: string;
|
|
35
|
+
wrapper: string;
|
|
36
|
+
labelWrapper: string;
|
|
37
|
+
label: string;
|
|
38
|
+
hint: string;
|
|
39
|
+
container: string;
|
|
40
|
+
description: string;
|
|
41
|
+
error: string;
|
|
42
|
+
errorIcon: string;
|
|
43
|
+
help: string;
|
|
44
|
+
}, undefined, {
|
|
45
|
+
useDescription: {
|
|
46
|
+
true: {
|
|
47
|
+
wrapper: string;
|
|
48
|
+
};
|
|
49
|
+
false: {
|
|
50
|
+
wrapper: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
size: {
|
|
54
|
+
xs: {
|
|
55
|
+
root: string;
|
|
56
|
+
errorIcon: string;
|
|
57
|
+
};
|
|
58
|
+
sm: {
|
|
59
|
+
root: string;
|
|
60
|
+
errorIcon: string;
|
|
61
|
+
};
|
|
62
|
+
md: {
|
|
63
|
+
root: string;
|
|
64
|
+
errorIcon: string;
|
|
65
|
+
};
|
|
66
|
+
lg: {
|
|
67
|
+
root: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
required: {
|
|
71
|
+
true: {
|
|
72
|
+
label: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
}, {
|
|
76
|
+
root: string;
|
|
77
|
+
wrapper: string;
|
|
78
|
+
labelWrapper: string;
|
|
79
|
+
label: string;
|
|
80
|
+
hint: string;
|
|
81
|
+
container: string;
|
|
82
|
+
description: string;
|
|
83
|
+
error: string;
|
|
84
|
+
errorIcon: string;
|
|
85
|
+
help: string;
|
|
86
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
87
|
+
useDescription: {
|
|
88
|
+
true: {
|
|
89
|
+
wrapper: string;
|
|
90
|
+
};
|
|
91
|
+
false: {
|
|
92
|
+
wrapper: string;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
size: {
|
|
96
|
+
xs: {
|
|
97
|
+
root: string;
|
|
98
|
+
errorIcon: string;
|
|
99
|
+
};
|
|
100
|
+
sm: {
|
|
101
|
+
root: string;
|
|
102
|
+
errorIcon: string;
|
|
103
|
+
};
|
|
104
|
+
md: {
|
|
105
|
+
root: string;
|
|
106
|
+
errorIcon: string;
|
|
107
|
+
};
|
|
108
|
+
lg: {
|
|
109
|
+
root: string;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
required: {
|
|
113
|
+
true: {
|
|
114
|
+
label: string;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
}, {
|
|
118
|
+
root: string;
|
|
119
|
+
wrapper: string;
|
|
120
|
+
labelWrapper: string;
|
|
121
|
+
label: string;
|
|
122
|
+
hint: string;
|
|
123
|
+
container: string;
|
|
124
|
+
description: string;
|
|
125
|
+
error: string;
|
|
126
|
+
errorIcon: string;
|
|
127
|
+
help: string;
|
|
128
|
+
}, undefined, {
|
|
129
|
+
useDescription: {
|
|
130
|
+
true: {
|
|
131
|
+
wrapper: string;
|
|
132
|
+
};
|
|
133
|
+
false: {
|
|
134
|
+
wrapper: string;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
size: {
|
|
138
|
+
xs: {
|
|
139
|
+
root: string;
|
|
140
|
+
errorIcon: string;
|
|
141
|
+
};
|
|
142
|
+
sm: {
|
|
143
|
+
root: string;
|
|
144
|
+
errorIcon: string;
|
|
145
|
+
};
|
|
146
|
+
md: {
|
|
147
|
+
root: string;
|
|
148
|
+
errorIcon: string;
|
|
149
|
+
};
|
|
150
|
+
lg: {
|
|
151
|
+
root: string;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
required: {
|
|
155
|
+
true: {
|
|
156
|
+
label: string;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
}, {
|
|
160
|
+
root: string;
|
|
161
|
+
wrapper: string;
|
|
162
|
+
labelWrapper: string;
|
|
163
|
+
label: string;
|
|
164
|
+
hint: string;
|
|
165
|
+
container: string;
|
|
166
|
+
description: string;
|
|
167
|
+
error: string;
|
|
168
|
+
errorIcon: string;
|
|
169
|
+
help: string;
|
|
170
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
171
|
+
useDescription: {
|
|
172
|
+
true: {
|
|
173
|
+
wrapper: string;
|
|
174
|
+
};
|
|
175
|
+
false: {
|
|
176
|
+
wrapper: string;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
size: {
|
|
180
|
+
xs: {
|
|
181
|
+
root: string;
|
|
182
|
+
errorIcon: string;
|
|
183
|
+
};
|
|
184
|
+
sm: {
|
|
185
|
+
root: string;
|
|
186
|
+
errorIcon: string;
|
|
187
|
+
};
|
|
188
|
+
md: {
|
|
189
|
+
root: string;
|
|
190
|
+
errorIcon: string;
|
|
191
|
+
};
|
|
192
|
+
lg: {
|
|
193
|
+
root: string;
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
required: {
|
|
197
|
+
true: {
|
|
198
|
+
label: string;
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
}, {
|
|
202
|
+
root: string;
|
|
203
|
+
wrapper: string;
|
|
204
|
+
labelWrapper: string;
|
|
205
|
+
label: string;
|
|
206
|
+
hint: string;
|
|
207
|
+
container: string;
|
|
208
|
+
description: string;
|
|
209
|
+
error: string;
|
|
210
|
+
errorIcon: string;
|
|
211
|
+
help: string;
|
|
212
|
+
}, undefined, unknown, unknown, undefined>>>;
|
|
213
|
+
type FormFieldVariants = VariantProps<typeof formField>;
|
|
214
|
+
export interface FormFieldProps {
|
|
215
|
+
/**
|
|
216
|
+
* The element or component this component should render as.
|
|
217
|
+
* @defaultValue 'div'
|
|
218
|
+
*/
|
|
219
|
+
as?: any;
|
|
220
|
+
/** The name of the FormField. Also used to match form errors. */
|
|
221
|
+
name?: string;
|
|
222
|
+
/** A regular expression to match form error names. */
|
|
223
|
+
errorPattern?: RegExp;
|
|
224
|
+
label?: string;
|
|
225
|
+
description?: string;
|
|
226
|
+
help?: string;
|
|
227
|
+
error?: string | boolean;
|
|
228
|
+
hint?: string;
|
|
229
|
+
/**
|
|
230
|
+
* @defaultValue 'md'
|
|
231
|
+
*/
|
|
232
|
+
size?: FormFieldVariants['size'];
|
|
233
|
+
/**
|
|
234
|
+
* @defaultValue false
|
|
235
|
+
*/
|
|
236
|
+
required?: boolean;
|
|
237
|
+
/** If true, validation on input will be active immediately instead of waiting for a blur event. */
|
|
238
|
+
eagerValidation?: boolean;
|
|
239
|
+
/**
|
|
240
|
+
* Delay in milliseconds before validating the form on input events.
|
|
241
|
+
* @defaultValue `300`
|
|
242
|
+
*/
|
|
243
|
+
validateOnInputDelay?: number;
|
|
244
|
+
class?: any;
|
|
245
|
+
b24ui?: Partial<typeof formField.slots>;
|
|
246
|
+
}
|
|
247
|
+
export interface FormFieldSlots {
|
|
248
|
+
label(props: {
|
|
249
|
+
label?: string;
|
|
250
|
+
}): any;
|
|
251
|
+
hint(props: {
|
|
252
|
+
hint?: string;
|
|
253
|
+
}): any;
|
|
254
|
+
description(props: {
|
|
255
|
+
description?: string;
|
|
256
|
+
}): any;
|
|
257
|
+
help(props: {
|
|
258
|
+
help?: string;
|
|
259
|
+
}): any;
|
|
260
|
+
error(props: {
|
|
261
|
+
error?: string | boolean;
|
|
262
|
+
}): any;
|
|
263
|
+
default(props: {
|
|
264
|
+
error?: string | boolean;
|
|
265
|
+
}): any;
|
|
266
|
+
}
|
|
267
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<FormFieldProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<FormFieldProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<FormFieldSlots> & FormFieldSlots>;
|
|
268
|
+
export default _default;
|
|
269
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
270
|
+
type __VLS_TypePropsToOption<T> = {
|
|
271
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
272
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
273
|
+
} : {
|
|
274
|
+
type: import('vue').PropType<T[K]>;
|
|
275
|
+
required: true;
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
279
|
+
new (): {
|
|
280
|
+
$slots: S;
|
|
281
|
+
};
|
|
282
|
+
};
|