@eldrajs/ui 0.3.6 → 0.3.7
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/CHANGELOG.md +6 -0
- package/README.md +153 -16
- package/dist/{VariantPicker-BB-2Cj32.js → VariantPicker-Cr_AkX47.js} +113 -43
- package/dist/componentNames.d.ts +1 -1
- package/dist/components/badge/StockBadge.vue.d.ts +1 -1
- package/dist/components/chip/Chip.vue.d.ts +2 -0
- package/dist/components/dialog/Dialog.vue.d.ts +2 -0
- package/dist/components/drawer/Drawer.vue.d.ts +2 -0
- package/dist/components/filter-panel/FilterGroup.vue.d.ts +2 -0
- package/dist/components/filter-panel/FilterPanel.vue.d.ts +2 -0
- package/dist/components/filter-panel/facets/ColourFacet.vue.d.ts +2 -0
- package/dist/components/filter-panel/facets/ListFacet.vue.d.ts +2 -0
- package/dist/components/filter-panel/facets/RangeFacet.vue.d.ts +2 -0
- package/dist/components/filter-panel/facets/SizeFacet.vue.d.ts +2 -0
- package/dist/components/filter-panel/facets/ToggleFacet.vue.d.ts +2 -0
- package/dist/components/lightbox/Lightbox.vue.d.ts +2 -0
- package/dist/components/nav-menu/NavMenu.vue.d.ts +2 -0
- package/dist/components/notice/Notice.vue.d.ts +28 -0
- package/dist/components/notice/types.d.ts +38 -0
- package/dist/components/pagination/Pagination.vue.d.ts +2 -0
- package/dist/components/price/Price.vue.d.ts +1 -1
- package/dist/components/product-card/ProductCard.vue.d.ts +1 -1
- package/dist/components/radio/RadioGroup.vue.d.ts +4 -0
- package/dist/components/radio/recipes.d.ts +4 -2
- package/dist/components/radio/types.d.ts +8 -1
- package/dist/components/range-slider/RangeSlider.vue.d.ts +2 -0
- package/dist/components/search-bar/SearchBar.vue.d.ts +2 -0
- package/dist/components/search-modal/SearchModal.vue.d.ts +2 -0
- package/dist/components/select/MultiSelect.vue.d.ts +2 -0
- package/dist/components/select/Select.vue.d.ts +2 -0
- package/dist/components/site-form/SiteForm.vue.d.ts +2 -0
- package/dist/components/spinner/Spinner.vue.d.ts +4 -1
- package/dist/components/spinner/types.d.ts +9 -0
- package/dist/components/step-indicator/StepIndicator.vue.d.ts +7 -0
- package/dist/components/step-indicator/types.d.ts +30 -0
- package/dist/components/toast/Toast.vue.d.ts +2 -0
- package/dist/components/toast/Toaster.vue.d.ts +2 -0
- package/dist/components.css +89 -0
- package/dist/icons/paths.d.ts +8 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +620 -302
- package/dist/messages/en-US.d.ts +8 -0
- package/dist/messages/is-IS.js +3 -1
- package/dist/resolver.js +3 -0
- package/dist/style.css +89 -0
- package/dist/{useMessages-B5nzZghs.js → useMessages-DOHGfip_.js} +9 -1
- package/dist/vee-validate/FieldCheckbox.vue.d.ts +5 -1
- package/dist/vee-validate/FieldCheckboxGroup.vue.d.ts +5 -1
- package/dist/vee-validate/FieldCurrencyInput.vue.d.ts +5 -1
- package/dist/vee-validate/FieldInput.vue.d.ts +5 -1
- package/dist/vee-validate/FieldMultiSelect.vue.d.ts +5 -1
- package/dist/vee-validate/FieldQuantityStepper.vue.d.ts +5 -1
- package/dist/vee-validate/FieldRadioGroup.vue.d.ts +5 -1
- package/dist/vee-validate/FieldSearchBar.vue.d.ts +5 -1
- package/dist/vee-validate/FieldSelect.vue.d.ts +5 -1
- package/dist/vee-validate/FieldSwitch.vue.d.ts +5 -1
- package/dist/vee-validate/FieldTextarea.vue.d.ts +5 -1
- package/dist/vee-validate/FieldUnitInput.vue.d.ts +5 -1
- package/dist/vee-validate/FieldVariantPicker.vue.d.ts +5 -1
- package/dist/vee-validate/context.d.ts +32 -7
- package/dist/vee-validate/index.d.ts +8 -5
- package/dist/vee-validate/types.d.ts +26 -0
- package/dist/vee-validate/useFieldControl.d.ts +59 -10
- package/dist/vee-validate.js +258 -74
- package/dist/vue-i18n.js +1 -1
- package/package.json +2 -2
package/dist/messages/en-US.d.ts
CHANGED
|
@@ -512,6 +512,14 @@ export declare const enUS: {
|
|
|
512
512
|
/** A subscribing form's success: the address is confirmed from an email. */
|
|
513
513
|
formPendingTitle: string;
|
|
514
514
|
formPendingMessage: string;
|
|
515
|
+
/**
|
|
516
|
+
* `StepIndicator`: what a screen reader hears, in brackets after a step's label, for a step
|
|
517
|
+
* before the current one. The current step says so with `aria-current="step"`, so it has no
|
|
518
|
+
* message of its own.
|
|
519
|
+
*/
|
|
520
|
+
stepCompleted: string;
|
|
521
|
+
/** `StepIndicator`: the same, for a step after the current one. */
|
|
522
|
+
stepNotStarted: string;
|
|
515
523
|
};
|
|
516
524
|
/**
|
|
517
525
|
* Every message a component can emit. A consumer overrides any subset of it,
|
package/dist/messages/is-IS.js
CHANGED
|
@@ -190,6 +190,8 @@ var isIS = {
|
|
|
190
190
|
formSpamCheckFailed: "Ekki tókst að hlaða öryggisathuguninni. Endurnýjaðu síðuna og reyndu aftur.",
|
|
191
191
|
formSuccessTitle: "Takk fyrir",
|
|
192
192
|
formPendingTitle: "Kíktu í pósthólfið",
|
|
193
|
-
formPendingMessage: "Við sendum þér tölvupóst. Smelltu á hlekkinn í honum til að staðfesta."
|
|
193
|
+
formPendingMessage: "Við sendum þér tölvupóst. Smelltu á hlekkinn í honum til að staðfesta.",
|
|
194
|
+
stepCompleted: "lokið",
|
|
195
|
+
stepNotStarted: "ekki hafið"
|
|
194
196
|
};
|
|
195
197
|
export { isIS as default, isIS };
|
package/dist/resolver.js
CHANGED
|
@@ -50,6 +50,7 @@ var componentNames = [
|
|
|
50
50
|
"LogoItem",
|
|
51
51
|
"MultiSelect",
|
|
52
52
|
"NavMenu",
|
|
53
|
+
"Notice",
|
|
53
54
|
"Pagination",
|
|
54
55
|
"Popover",
|
|
55
56
|
"Price",
|
|
@@ -65,6 +66,8 @@ var componentNames = [
|
|
|
65
66
|
"Select",
|
|
66
67
|
"SiteForm",
|
|
67
68
|
"Skeleton",
|
|
69
|
+
"Spinner",
|
|
70
|
+
"StepIndicator",
|
|
68
71
|
"StockBadge",
|
|
69
72
|
"Switch",
|
|
70
73
|
"Tab",
|
package/dist/style.css
CHANGED
|
@@ -685,6 +685,18 @@
|
|
|
685
685
|
grid-column-start: 3;
|
|
686
686
|
}
|
|
687
687
|
|
|
688
|
+
.eldra\:col-start-4 {
|
|
689
|
+
grid-column-start: 4;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
.eldra\:row-span-1 {
|
|
693
|
+
grid-row: span 1 / span 1;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
.eldra\:row-span-2 {
|
|
697
|
+
grid-row: span 2 / span 2;
|
|
698
|
+
}
|
|
699
|
+
|
|
688
700
|
.eldra\:row-start-1 {
|
|
689
701
|
grid-row-start: 1;
|
|
690
702
|
}
|
|
@@ -1716,6 +1728,14 @@
|
|
|
1716
1728
|
appearance: none;
|
|
1717
1729
|
}
|
|
1718
1730
|
|
|
1731
|
+
.eldra\:auto-cols-fr {
|
|
1732
|
+
grid-auto-columns: minmax(0, 1fr);
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
.eldra\:grid-flow-col {
|
|
1736
|
+
grid-auto-flow: column;
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1719
1739
|
.eldra\:eldra-nav-menu-columns {
|
|
1720
1740
|
grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--eldra-nav-menu-column-min, 12rem)), 1fr));
|
|
1721
1741
|
}
|
|
@@ -1744,6 +1764,10 @@
|
|
|
1744
1764
|
grid-template-columns: auto 1fr auto;
|
|
1745
1765
|
}
|
|
1746
1766
|
|
|
1767
|
+
.eldra\:grid-cols-\[auto_auto_1fr_auto\] {
|
|
1768
|
+
grid-template-columns: auto auto 1fr auto;
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1747
1771
|
.eldra\:grid-cols-\[auto_minmax\(0\,1fr\)\] {
|
|
1748
1772
|
grid-template-columns: auto minmax(0, 1fr);
|
|
1749
1773
|
}
|
|
@@ -2068,6 +2092,11 @@
|
|
|
2068
2092
|
border-width: 0;
|
|
2069
2093
|
}
|
|
2070
2094
|
|
|
2095
|
+
.eldra\:border-2 {
|
|
2096
|
+
border-style: var(--tw-border-style);
|
|
2097
|
+
border-width: 2px;
|
|
2098
|
+
}
|
|
2099
|
+
|
|
2071
2100
|
.eldra\:eldra-filter-swatch-edge {
|
|
2072
2101
|
border-width: var(--eldra-filter-swatch-edge-width, 1px);
|
|
2073
2102
|
border-color: var(--eldra-color-text);
|
|
@@ -2164,6 +2193,36 @@
|
|
|
2164
2193
|
}
|
|
2165
2194
|
}
|
|
2166
2195
|
|
|
2196
|
+
.eldra\:border-\[color-mix\(in_oklab\,var\(--eldra-color-danger\)\,var\(--eldra-color-background\)_60\%\)\] {
|
|
2197
|
+
border-color: var(--eldra-color-danger);
|
|
2198
|
+
}
|
|
2199
|
+
|
|
2200
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
2201
|
+
.eldra\:border-\[color-mix\(in_oklab\,var\(--eldra-color-danger\)\,var\(--eldra-color-background\)_60\%\)\] {
|
|
2202
|
+
border-color: color-mix(in oklab,var(--eldra-color-danger),var(--eldra-color-background) 60%);
|
|
2203
|
+
}
|
|
2204
|
+
}
|
|
2205
|
+
|
|
2206
|
+
.eldra\:border-\[color-mix\(in_oklab\,var\(--eldra-color-success\)\,var\(--eldra-color-background\)_60\%\)\] {
|
|
2207
|
+
border-color: var(--eldra-color-success);
|
|
2208
|
+
}
|
|
2209
|
+
|
|
2210
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
2211
|
+
.eldra\:border-\[color-mix\(in_oklab\,var\(--eldra-color-success\)\,var\(--eldra-color-background\)_60\%\)\] {
|
|
2212
|
+
border-color: color-mix(in oklab,var(--eldra-color-success),var(--eldra-color-background) 60%);
|
|
2213
|
+
}
|
|
2214
|
+
}
|
|
2215
|
+
|
|
2216
|
+
.eldra\:border-\[color-mix\(in_oklab\,var\(--eldra-color-warning\)\,var\(--eldra-color-background\)_60\%\)\] {
|
|
2217
|
+
border-color: var(--eldra-color-warning);
|
|
2218
|
+
}
|
|
2219
|
+
|
|
2220
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
2221
|
+
.eldra\:border-\[color-mix\(in_oklab\,var\(--eldra-color-warning\)\,var\(--eldra-color-background\)_60\%\)\] {
|
|
2222
|
+
border-color: color-mix(in oklab,var(--eldra-color-warning),var(--eldra-color-background) 60%);
|
|
2223
|
+
}
|
|
2224
|
+
}
|
|
2225
|
+
|
|
2167
2226
|
.eldra\:border-\[color\:var\(--eldra-dialog-border\,var\(--eldra-color-border\)\)\] {
|
|
2168
2227
|
border-color: var(--eldra-dialog-border, var(--eldra-color-border));
|
|
2169
2228
|
}
|
|
@@ -2234,6 +2293,26 @@
|
|
|
2234
2293
|
}
|
|
2235
2294
|
}
|
|
2236
2295
|
|
|
2296
|
+
.eldra\:bg-\[color-mix\(in_oklab\,var\(--eldra-color-danger\)\,var\(--eldra-color-background\)_92\%\)\] {
|
|
2297
|
+
background-color: var(--eldra-color-danger);
|
|
2298
|
+
}
|
|
2299
|
+
|
|
2300
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
2301
|
+
.eldra\:bg-\[color-mix\(in_oklab\,var\(--eldra-color-danger\)\,var\(--eldra-color-background\)_92\%\)\] {
|
|
2302
|
+
background-color: color-mix(in oklab,var(--eldra-color-danger),var(--eldra-color-background) 92%);
|
|
2303
|
+
}
|
|
2304
|
+
}
|
|
2305
|
+
|
|
2306
|
+
.eldra\:bg-\[color-mix\(in_oklab\,var\(--eldra-color-success\)\,var\(--eldra-color-background\)_92\%\)\] {
|
|
2307
|
+
background-color: var(--eldra-color-success);
|
|
2308
|
+
}
|
|
2309
|
+
|
|
2310
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
2311
|
+
.eldra\:bg-\[color-mix\(in_oklab\,var\(--eldra-color-success\)\,var\(--eldra-color-background\)_92\%\)\] {
|
|
2312
|
+
background-color: color-mix(in oklab,var(--eldra-color-success),var(--eldra-color-background) 92%);
|
|
2313
|
+
}
|
|
2314
|
+
}
|
|
2315
|
+
|
|
2237
2316
|
.eldra\:bg-\[color-mix\(in_oklab\,var\(--eldra-color-text\)_94\%\,transparent\)\] {
|
|
2238
2317
|
background-color: var(--eldra-color-text);
|
|
2239
2318
|
}
|
|
@@ -2244,6 +2323,16 @@
|
|
|
2244
2323
|
}
|
|
2245
2324
|
}
|
|
2246
2325
|
|
|
2326
|
+
.eldra\:bg-\[color-mix\(in_oklab\,var\(--eldra-color-warning\)\,var\(--eldra-color-background\)_92\%\)\] {
|
|
2327
|
+
background-color: var(--eldra-color-warning);
|
|
2328
|
+
}
|
|
2329
|
+
|
|
2330
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
2331
|
+
.eldra\:bg-\[color-mix\(in_oklab\,var\(--eldra-color-warning\)\,var\(--eldra-color-background\)_92\%\)\] {
|
|
2332
|
+
background-color: color-mix(in oklab,var(--eldra-color-warning),var(--eldra-color-background) 92%);
|
|
2333
|
+
}
|
|
2334
|
+
}
|
|
2335
|
+
|
|
2247
2336
|
.eldra\:bg-\[color\:var\(--eldra-popover-background\,var\(--eldra-color-background\)\)\] {
|
|
2248
2337
|
background-color: var(--eldra-popover-background, var(--eldra-color-background));
|
|
2249
2338
|
}
|
|
@@ -540,7 +540,15 @@ var enUS = {
|
|
|
540
540
|
formSuccessTitle: "Thank you",
|
|
541
541
|
/** A subscribing form's success: the address is confirmed from an email. */
|
|
542
542
|
formPendingTitle: "Check your inbox",
|
|
543
|
-
formPendingMessage: "We sent you an email. Open the link in it to confirm."
|
|
543
|
+
formPendingMessage: "We sent you an email. Open the link in it to confirm.",
|
|
544
|
+
/**
|
|
545
|
+
* `StepIndicator`: what a screen reader hears, in brackets after a step's label, for a step
|
|
546
|
+
* before the current one. The current step says so with `aria-current="step"`, so it has no
|
|
547
|
+
* message of its own.
|
|
548
|
+
*/
|
|
549
|
+
stepCompleted: "completed",
|
|
550
|
+
/** `StepIndicator`: the same, for a step after the current one. */
|
|
551
|
+
stepNotStarted: "not started"
|
|
544
552
|
};
|
|
545
553
|
// src/composables/useMessages.ts
|
|
546
554
|
/**
|
|
@@ -5,7 +5,11 @@ declare const __VLS_template: () => {
|
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
8
|
-
declare const __VLS_base: import('vue').DefineComponent<FieldCheckboxProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FieldCheckboxProps> & Readonly<{}>, {
|
|
8
|
+
declare const __VLS_base: import('vue').DefineComponent<FieldCheckboxProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FieldCheckboxProps> & Readonly<{}>, {
|
|
9
|
+
validateOnMount: boolean;
|
|
10
|
+
validateOnBlur: boolean;
|
|
11
|
+
validateOnValueUpdate: boolean;
|
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
14
|
declare const _default: typeof __VLS_export;
|
|
11
15
|
export default _default;
|
|
@@ -5,7 +5,11 @@ declare const __VLS_template: () => {
|
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
8
|
-
declare const __VLS_base: import('vue').DefineComponent<FieldCheckboxGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FieldCheckboxGroupProps> & Readonly<{}>, {
|
|
8
|
+
declare const __VLS_base: import('vue').DefineComponent<FieldCheckboxGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FieldCheckboxGroupProps> & Readonly<{}>, {
|
|
9
|
+
validateOnMount: boolean;
|
|
10
|
+
validateOnBlur: boolean;
|
|
11
|
+
validateOnValueUpdate: boolean;
|
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
14
|
declare const _default: typeof __VLS_export;
|
|
11
15
|
export default _default;
|
|
@@ -5,7 +5,11 @@ declare const __VLS_template: () => {
|
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
8
|
-
declare const __VLS_base: import('vue').DefineComponent<FieldCurrencyInputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FieldCurrencyInputProps> & Readonly<{}>, {
|
|
8
|
+
declare const __VLS_base: import('vue').DefineComponent<FieldCurrencyInputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FieldCurrencyInputProps> & Readonly<{}>, {
|
|
9
|
+
validateOnMount: boolean;
|
|
10
|
+
validateOnBlur: boolean;
|
|
11
|
+
validateOnValueUpdate: boolean;
|
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
14
|
declare const _default: typeof __VLS_export;
|
|
11
15
|
export default _default;
|
|
@@ -5,7 +5,11 @@ declare const __VLS_template: () => {
|
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
8
|
-
declare const __VLS_base: import('vue').DefineComponent<FieldInputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FieldInputProps> & Readonly<{}>, {
|
|
8
|
+
declare const __VLS_base: import('vue').DefineComponent<FieldInputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FieldInputProps> & Readonly<{}>, {
|
|
9
|
+
validateOnMount: boolean;
|
|
10
|
+
validateOnBlur: boolean;
|
|
11
|
+
validateOnValueUpdate: boolean;
|
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
14
|
declare const _default: typeof __VLS_export;
|
|
11
15
|
export default _default;
|
|
@@ -5,7 +5,11 @@ declare const __VLS_template: () => {
|
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
8
|
-
declare const __VLS_base: import('vue').DefineComponent<FieldMultiSelectProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FieldMultiSelectProps> & Readonly<{}>, {
|
|
8
|
+
declare const __VLS_base: import('vue').DefineComponent<FieldMultiSelectProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FieldMultiSelectProps> & Readonly<{}>, {
|
|
9
|
+
validateOnMount: boolean;
|
|
10
|
+
validateOnBlur: boolean;
|
|
11
|
+
validateOnValueUpdate: boolean;
|
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
14
|
declare const _default: typeof __VLS_export;
|
|
11
15
|
export default _default;
|
|
@@ -5,7 +5,11 @@ declare const __VLS_template: () => {
|
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
8
|
-
declare const __VLS_base: import('vue').DefineComponent<FieldQuantityStepperProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FieldQuantityStepperProps> & Readonly<{}>, {
|
|
8
|
+
declare const __VLS_base: import('vue').DefineComponent<FieldQuantityStepperProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FieldQuantityStepperProps> & Readonly<{}>, {
|
|
9
|
+
validateOnMount: boolean;
|
|
10
|
+
validateOnBlur: boolean;
|
|
11
|
+
validateOnValueUpdate: boolean;
|
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
14
|
declare const _default: typeof __VLS_export;
|
|
11
15
|
export default _default;
|
|
@@ -5,7 +5,11 @@ declare const __VLS_template: () => {
|
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
8
|
-
declare const __VLS_base: import('vue').DefineComponent<FieldRadioGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FieldRadioGroupProps> & Readonly<{}>, {
|
|
8
|
+
declare const __VLS_base: import('vue').DefineComponent<FieldRadioGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FieldRadioGroupProps> & Readonly<{}>, {
|
|
9
|
+
validateOnMount: boolean;
|
|
10
|
+
validateOnBlur: boolean;
|
|
11
|
+
validateOnValueUpdate: boolean;
|
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
14
|
declare const _default: typeof __VLS_export;
|
|
11
15
|
export default _default;
|
|
@@ -5,7 +5,11 @@ declare const __VLS_template: () => {
|
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
8
|
-
declare const __VLS_base: import('vue').DefineComponent<FieldSearchBarProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FieldSearchBarProps> & Readonly<{}>, {
|
|
8
|
+
declare const __VLS_base: import('vue').DefineComponent<FieldSearchBarProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FieldSearchBarProps> & Readonly<{}>, {
|
|
9
|
+
validateOnMount: boolean;
|
|
10
|
+
validateOnBlur: boolean;
|
|
11
|
+
validateOnValueUpdate: boolean;
|
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
14
|
declare const _default: typeof __VLS_export;
|
|
11
15
|
export default _default;
|
|
@@ -5,7 +5,11 @@ declare const __VLS_template: () => {
|
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
8
|
-
declare const __VLS_base: import('vue').DefineComponent<FieldSelectProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FieldSelectProps> & Readonly<{}>, {
|
|
8
|
+
declare const __VLS_base: import('vue').DefineComponent<FieldSelectProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FieldSelectProps> & Readonly<{}>, {
|
|
9
|
+
validateOnMount: boolean;
|
|
10
|
+
validateOnBlur: boolean;
|
|
11
|
+
validateOnValueUpdate: boolean;
|
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
14
|
declare const _default: typeof __VLS_export;
|
|
11
15
|
export default _default;
|
|
@@ -5,7 +5,11 @@ declare const __VLS_template: () => {
|
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
8
|
-
declare const __VLS_base: import('vue').DefineComponent<FieldSwitchProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FieldSwitchProps> & Readonly<{}>, {
|
|
8
|
+
declare const __VLS_base: import('vue').DefineComponent<FieldSwitchProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FieldSwitchProps> & Readonly<{}>, {
|
|
9
|
+
validateOnMount: boolean;
|
|
10
|
+
validateOnBlur: boolean;
|
|
11
|
+
validateOnValueUpdate: boolean;
|
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
14
|
declare const _default: typeof __VLS_export;
|
|
11
15
|
export default _default;
|
|
@@ -5,7 +5,11 @@ declare const __VLS_template: () => {
|
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
8
|
-
declare const __VLS_base: import('vue').DefineComponent<FieldTextareaProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FieldTextareaProps> & Readonly<{}>, {
|
|
8
|
+
declare const __VLS_base: import('vue').DefineComponent<FieldTextareaProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FieldTextareaProps> & Readonly<{}>, {
|
|
9
|
+
validateOnMount: boolean;
|
|
10
|
+
validateOnBlur: boolean;
|
|
11
|
+
validateOnValueUpdate: boolean;
|
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
14
|
declare const _default: typeof __VLS_export;
|
|
11
15
|
export default _default;
|
|
@@ -5,7 +5,11 @@ declare const __VLS_template: () => {
|
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
8
|
-
declare const __VLS_base: import('vue').DefineComponent<FieldUnitInputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FieldUnitInputProps> & Readonly<{}>, {
|
|
8
|
+
declare const __VLS_base: import('vue').DefineComponent<FieldUnitInputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FieldUnitInputProps> & Readonly<{}>, {
|
|
9
|
+
validateOnMount: boolean;
|
|
10
|
+
validateOnBlur: boolean;
|
|
11
|
+
validateOnValueUpdate: boolean;
|
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
14
|
declare const _default: typeof __VLS_export;
|
|
11
15
|
export default _default;
|
|
@@ -5,7 +5,11 @@ declare const __VLS_template: () => {
|
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
8
|
-
declare const __VLS_base: import('vue').DefineComponent<FieldVariantPickerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FieldVariantPickerProps> & Readonly<{}>, {
|
|
8
|
+
declare const __VLS_base: import('vue').DefineComponent<FieldVariantPickerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FieldVariantPickerProps> & Readonly<{}>, {
|
|
9
|
+
validateOnMount: boolean;
|
|
10
|
+
validateOnBlur: boolean;
|
|
11
|
+
validateOnValueUpdate: boolean;
|
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
14
|
declare const _default: typeof __VLS_export;
|
|
11
15
|
export default _default;
|
|
@@ -10,13 +10,13 @@ import { InjectionKey, Ref } from 'vue';
|
|
|
10
10
|
* true as soon as the customer edits it, and nothing else would reliably clear it (a rule that
|
|
11
11
|
* already passes has no new message to overwrite it with).
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* `validationSchema`,
|
|
17
|
-
* (`validated-only`), and a field that now passes has its manually
|
|
18
|
-
*
|
|
19
|
-
* than treating one as sticky
|
|
13
|
+
* A server error on a *different* field stays on screen while this one is edited: each `Field*`
|
|
14
|
+
* holds the message it shows and changes it only at its own moments (its blur, a submit, its own
|
|
15
|
+
* edit of a server error — see `useFieldControl`). Underneath, vee-validate may already have
|
|
16
|
+
* dropped it: with a form-level `validationSchema`, validating one field revalidates every field
|
|
17
|
+
* that has been validated before (`validated-only`), and a field that now passes has its manually
|
|
18
|
+
* set error replaced by that pass. So the entry is gone for good at that field's next blur or the
|
|
19
|
+
* next submit; send the current map with each response rather than treating one as sticky.
|
|
20
20
|
*
|
|
21
21
|
* It is a plain `Ref`, so a consumer can provide one itself and drive server errors from outside a
|
|
22
22
|
* `Form`:
|
|
@@ -46,3 +46,28 @@ export interface FieldAnchorRegistry {
|
|
|
46
46
|
}
|
|
47
47
|
/** The key a `Form` provides its {@link FieldAnchorRegistry} on. Internal to this entry. */
|
|
48
48
|
export declare const FIELD_ANCHORS_KEY: InjectionKey<FieldAnchorRegistry>;
|
|
49
|
+
/**
|
|
50
|
+
* How a `Field*` tells the `Form` above it which message it is **showing**, so the form's error
|
|
51
|
+
* summary and its `errors` slot prop say exactly what the fields say, at the same moment.
|
|
52
|
+
*
|
|
53
|
+
* A field holds its displayed message itself (see `useFieldControl`): it changes on the field's
|
|
54
|
+
* blur, on a submit, and on a value change only when the field asks for that. vee-validate's own
|
|
55
|
+
* `errors` can move at other moments — a form-level schema revalidates already-validated fields
|
|
56
|
+
* whenever any one of them is validated — so the form reads what the fields report rather than
|
|
57
|
+
* `errors`.
|
|
58
|
+
*
|
|
59
|
+
* Internal: not exported from the entry.
|
|
60
|
+
*/
|
|
61
|
+
export interface FieldMessageRegistry {
|
|
62
|
+
/** Record the message the field at `path` is showing; `undefined` while it shows none. */
|
|
63
|
+
report(path: string, message: string | undefined): void;
|
|
64
|
+
/** Forget `path`, when the field unmounts or is renamed. */
|
|
65
|
+
forget(path: string): void;
|
|
66
|
+
/**
|
|
67
|
+
* Counts the submits whose validation has finished. A field reads its message again each time
|
|
68
|
+
* it rises: that is the "on submit" moment, after the form has validated every field.
|
|
69
|
+
*/
|
|
70
|
+
settled: Readonly<Ref<number>>;
|
|
71
|
+
}
|
|
72
|
+
/** The key a `Form` provides its {@link FieldMessageRegistry} on. Internal to this entry. */
|
|
73
|
+
export declare const FIELD_MESSAGES_KEY: InjectionKey<FieldMessageRegistry>;
|
|
@@ -17,11 +17,14 @@ export type { FieldBinding, FieldCheckboxGroupProps, FieldCheckboxProps, FieldCu
|
|
|
17
17
|
/**
|
|
18
18
|
* The building block the thirteen `Field*` components are made of, exported so a consumer wrapping a
|
|
19
19
|
* control this package does not ship — or one of its own — binds it the same way: the value, the
|
|
20
|
-
* message
|
|
21
|
-
* error that clears when the value changes.
|
|
20
|
+
* message shown at the field's own moments (blur, submit, and the two opt-in ones), the `id` the
|
|
21
|
+
* error summary links to, and the server error that clears when the value changes.
|
|
22
22
|
*
|
|
23
23
|
* `FIELD_ONLY` comes with it: the prop names a `Field*` keeps for itself and must **not** forward
|
|
24
|
-
* to the control it wraps (`path`, `rules`, `label`, `id`
|
|
25
|
-
*
|
|
24
|
+
* to the control it wraps (`path`, `rules`, `label`, `id` and the three in
|
|
25
|
+
* `FIELD_VALIDATION_PROPS`). Without it a consumer writing their own wrapper has to rediscover the
|
|
26
|
+
* list by reading this package's source. `FIELD_VALIDATION_DEFAULTS` (a typed control) or
|
|
27
|
+
* `FIELD_CHOICE_VALIDATION_DEFAULTS` (a choice control) is what to hand `withDefaults`, so that
|
|
28
|
+
* wrapper's `validateOnBlur` defaults to `true` like every `Field*`'s.
|
|
26
29
|
*/
|
|
27
|
-
export { FIELD_ONLY, useFieldControl, type UseFieldControlOptions, type UseFieldControlReturn, } from './useFieldControl.js';
|
|
30
|
+
export { FIELD_CHOICE_VALIDATION_DEFAULTS, FIELD_ONLY, FIELD_VALIDATION_DEFAULTS, FIELD_VALIDATION_PROPS, useFieldControl, type UseFieldControlOptions, type UseFieldControlReturn, } from './useFieldControl.js';
|
|
@@ -39,6 +39,32 @@ export interface FieldBinding<TValue = unknown> {
|
|
|
39
39
|
rules?: RuleExpression<TValue>;
|
|
40
40
|
/** The name a rule message uses for this field ("Email address"), not a visible label. */
|
|
41
41
|
label?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Validates the field as soon as it is mounted **and shows the message at once**, without waiting
|
|
44
|
+
* for a blur or a submit — for a form opened on values that are already known to be wrong (an
|
|
45
|
+
* edit form over stored data). Default `false`.
|
|
46
|
+
*/
|
|
47
|
+
validateOnMount?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Validates the field when it loses focus, and shows or clears its message then. Default `true`.
|
|
50
|
+
* `false` leaves validation to the submit (or to `validateOnValueUpdate`): a blur then only marks
|
|
51
|
+
* the field touched.
|
|
52
|
+
*/
|
|
53
|
+
validateOnBlur?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Validates the field on every change of its value, so the message follows each change once the
|
|
56
|
+
* field has been touched or the form submitted.
|
|
57
|
+
*
|
|
58
|
+
* The default depends on the control. **`false`** for a typed one (`FieldInput`, `FieldTextarea`,
|
|
59
|
+
* `FieldCurrencyInput`, `FieldUnitInput`, `FieldSearchBar`): while the customer types, no
|
|
60
|
+
* message appears and a message already showing stays as it is until the next blur or submit.
|
|
61
|
+
* **`true`** for a choice (`FieldCheckbox`, `FieldCheckboxGroup`, `FieldRadioGroup`,
|
|
62
|
+
* `FieldSwitch`, `FieldSelect`, `FieldMultiSelect`, `FieldVariantPicker`,
|
|
63
|
+
* `FieldQuantityStepper`), where one click is the whole value.
|
|
64
|
+
*
|
|
65
|
+
* Read once, when the field is set up — it is vee-validate's own `useField` option.
|
|
66
|
+
*/
|
|
67
|
+
validateOnValueUpdate?: boolean;
|
|
42
68
|
}
|
|
43
69
|
/**
|
|
44
70
|
* Every `Field*` takes its component's own props, minus the ones it owns itself: `modelValue`
|
|
@@ -4,8 +4,40 @@ import { FieldBinding } from './types.js';
|
|
|
4
4
|
type FieldControlProps<TValue> = FieldBinding<TValue> & {
|
|
5
5
|
id?: string;
|
|
6
6
|
};
|
|
7
|
+
/** The three props that decide when a field validates. Never forwarded to the wrapped control. */
|
|
8
|
+
export declare const FIELD_VALIDATION_PROPS: readonly ["validateOnMount", "validateOnBlur", "validateOnValueUpdate"];
|
|
9
|
+
/**
|
|
10
|
+
* Their defaults for a **typed** control — `FieldInput`, `FieldTextarea`, `FieldCurrencyInput`,
|
|
11
|
+
* `FieldUnitInput`, `FieldSearchBar` — handed to `withDefaults(defineProps<…>(), …)`. A value
|
|
12
|
+
* there is built up one keystroke at a time, so validating each change would judge a half-typed
|
|
13
|
+
* value; the field validates when it is left instead.
|
|
14
|
+
*
|
|
15
|
+
* They have to be real defaults: Vue casts an absent boolean prop to `false`, never `undefined`,
|
|
16
|
+
* so without one `validateOnBlur` could not default to `true`.
|
|
17
|
+
*/
|
|
18
|
+
export declare const FIELD_VALIDATION_DEFAULTS: {
|
|
19
|
+
readonly validateOnMount: false;
|
|
20
|
+
readonly validateOnBlur: true;
|
|
21
|
+
readonly validateOnValueUpdate: false;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Their defaults for a **choice** control — `FieldCheckbox`, `FieldCheckboxGroup`,
|
|
25
|
+
* `FieldRadioGroup`, `FieldSwitch`, `FieldSelect`, `FieldMultiSelect`, `FieldVariantPicker`,
|
|
26
|
+
* `FieldQuantityStepper`. One click or selection is the whole value there — there is no typing in
|
|
27
|
+
* between, and often no blur afterwards — so a box that only validated on blur would go on saying
|
|
28
|
+
* "required" after it had been ticked. These validate on each change as well as on blur.
|
|
29
|
+
*
|
|
30
|
+
* `FieldQuantityStepper` belongs here although it has a text field: a `QuantityStepper` writes its
|
|
31
|
+
* value only when a typed number is committed (on blur or `Enter`) or a button is pressed, never
|
|
32
|
+
* per keystroke, so every change it reports is a complete quantity.
|
|
33
|
+
*/
|
|
34
|
+
export declare const FIELD_CHOICE_VALIDATION_DEFAULTS: {
|
|
35
|
+
readonly validateOnMount: false;
|
|
36
|
+
readonly validateOnBlur: true;
|
|
37
|
+
readonly validateOnValueUpdate: true;
|
|
38
|
+
};
|
|
7
39
|
/** The props a `Field*` keeps for itself and never forwards to the component it wraps. */
|
|
8
|
-
export declare const FIELD_ONLY: readonly ["path", "rules", "label", "id"];
|
|
40
|
+
export declare const FIELD_ONLY: readonly ["path", "rules", "label", "id", "validateOnMount", "validateOnBlur", "validateOnValueUpdate"];
|
|
9
41
|
export interface UseFieldControlOptions<TValue> {
|
|
10
42
|
/**
|
|
11
43
|
* What the control is bound to while the field itself holds `undefined` — `''`, `false`, or a
|
|
@@ -36,22 +68,39 @@ export interface UseFieldControlReturn<TValue> {
|
|
|
36
68
|
ownError: ComputedRef<string | undefined>;
|
|
37
69
|
/** The `id` to forward to the control, or `undefined` to leave the control's own wiring alone. */
|
|
38
70
|
id: ComputedRef<string | undefined>;
|
|
39
|
-
/** Marks the field touched,
|
|
71
|
+
/** Marks the field touched and, unless `validateOnBlur` is `false`, validates it. */
|
|
40
72
|
onBlur: (event?: Event) => void;
|
|
41
73
|
}
|
|
42
74
|
/**
|
|
43
75
|
* The whole of what a `Field*` does, minus the one component it renders.
|
|
44
76
|
*
|
|
45
77
|
* Each `Field*` is a thin SFC over this: `useField(name, rules, { label })` for the value and the
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
78
|
+
* validation, the message the field **shows**, the `id` the form's error summary links to, and the
|
|
79
|
+
* server error that stops being true as soon as the value changes. Keeping it here is what makes
|
|
80
|
+
* the thirteen components agree on all of that rather than thirteen files drifting apart.
|
|
81
|
+
*
|
|
82
|
+
* **When a field validates, and when its message changes.** The spec's rule (Form layout →
|
|
83
|
+
* Behaviour & motion) is "Validate on submit, then on blur for fields that were invalid after the
|
|
84
|
+
* first submit"; three props per field say which moments apply, and the message on screen changes
|
|
85
|
+
* at those moments and at no other:
|
|
86
|
+
*
|
|
87
|
+
* - **submit**, always: the form validates every field, and each one then shows its result;
|
|
88
|
+
* - **blur**, unless `validateOnBlur` is `false` (default `true`): the field is validated and
|
|
89
|
+
* shows its result. A blur always marks the field touched;
|
|
90
|
+
* - **a value change**, only with `validateOnValueUpdate`: the message follows every change once
|
|
91
|
+
* the field has been touched or the form submitted. Default `false` for a typed control, `true`
|
|
92
|
+
* for a choice control (see the two defaults objects above);
|
|
93
|
+
* - **mount**, only with `validateOnMount` (default `false`): validated and shown at once.
|
|
94
|
+
*
|
|
95
|
+
* So in a typed control, typing changes nothing the customer sees: no message appears, and one
|
|
96
|
+
* already showing stays until the next blur or submit. A choice control answers a click at once.
|
|
50
97
|
*
|
|
51
|
-
* **
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
98
|
+
* **Why the shown message is held here** rather than read from vee-validate's `errorMessage`. That
|
|
99
|
+
* value can move at moments that are not this field's: with a `validationSchema` on the form,
|
|
100
|
+
* validating one field revalidates every field already validated (`validated-only`), so another
|
|
101
|
+
* field's blur would otherwise clear or change this field's message while it is being typed in.
|
|
102
|
+
* `shown` is a copy taken only at the moments listed above, which is what makes the props true in
|
|
103
|
+
* both setups, per-field `rules` and a form-level schema alike.
|
|
55
104
|
*/
|
|
56
105
|
export declare function useFieldControl<TValue>(props: FieldControlProps<TValue>, options: UseFieldControlOptions<TValue>): UseFieldControlReturn<TValue>;
|
|
57
106
|
/**
|