@wix/editor-react-components 1.2355.0 → 1.2357.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/site/components/DatePicker/component.js +2 -1
- package/dist/site/components/RadioButtons/RadioButtons.types.d.ts +2 -1
- package/dist/site/components/RadioButtons/component.js +54 -7
- package/dist/site/components/RadioButtons/constants.d.ts +3 -0
- package/dist/site/components/RadioButtons/css.css +6 -0
- package/dist/site/components/RadioButtons/manifest.js +3 -1
- package/dist/site/components/TextBox/TextBox.types.d.ts +2 -1
- package/dist/site/components/TextBox/component.js +139 -69
- package/dist/site/components/TextBox/constants.d.ts +7 -0
- package/dist/site/components/TextBox/css.css +11 -6
- package/dist/site/components/TextBox/manifest.js +3 -1
- package/dist/site/components/TextInput/component.js +2 -1
- package/dist/site/components/TimePicker/component.js +2 -1
- package/dist/site/components/chunks/DateField.js +1 -1
- package/dist/site/components/chunks/Tooltip.js +1334 -0
- package/dist/site/components/chunks/constants18.js +10 -2
- package/dist/site/components/chunks/constants24.js +6 -2
- package/dist/site/components/chunks/useValidatedField.js +2 -1333
- package/package.json +2 -2
|
@@ -65,13 +65,19 @@ const defaultValues = {
|
|
|
65
65
|
readOnly: false,
|
|
66
66
|
disabled: false
|
|
67
67
|
};
|
|
68
|
+
const VALIDATION_MESSAGES = {
|
|
69
|
+
valueMissing: "This field is required",
|
|
70
|
+
tooShort: (minLength) => `Please use at least ${minLength} characters`,
|
|
71
|
+
tooLong: (maxLength) => `Please use no more than ${maxLength} characters`
|
|
72
|
+
};
|
|
68
73
|
const TestIds = {
|
|
69
74
|
root: "textbox-root",
|
|
70
75
|
input: "textbox-input",
|
|
71
76
|
label: "textbox-label",
|
|
72
77
|
requiredIndicator: "textbox-required-indicator",
|
|
73
78
|
tooltipButton: "textbox-tooltip-button",
|
|
74
|
-
description: "textbox-description"
|
|
79
|
+
description: "textbox-description",
|
|
80
|
+
errorMessage: "textbox-error-message"
|
|
75
81
|
};
|
|
76
82
|
const selectors = {
|
|
77
83
|
root: "textbox",
|
|
@@ -83,11 +89,13 @@ const semanticClassNames = {
|
|
|
83
89
|
input: "textbox__input",
|
|
84
90
|
label: "textbox__label",
|
|
85
91
|
requiredIndicator: "textbox__required-indicator",
|
|
86
|
-
description: "textbox__description"
|
|
92
|
+
description: "textbox__description",
|
|
93
|
+
errorMessage: "textbox__error-message"
|
|
87
94
|
};
|
|
88
95
|
export {
|
|
89
96
|
DesignStates as D,
|
|
90
97
|
TestIds as T,
|
|
98
|
+
VALIDATION_MESSAGES as V,
|
|
91
99
|
semanticClassNames as a,
|
|
92
100
|
DisplayNames as b,
|
|
93
101
|
defaultValues as d,
|
|
@@ -70,6 +70,7 @@ const defaultValues = {
|
|
|
70
70
|
readOnly: false,
|
|
71
71
|
disabled: false
|
|
72
72
|
};
|
|
73
|
+
const VALUE_MISSING_MESSAGE = "This field is required";
|
|
73
74
|
const TestIds = {
|
|
74
75
|
root: "radio-buttons-root",
|
|
75
76
|
group: "radio-buttons-group",
|
|
@@ -79,7 +80,8 @@ const TestIds = {
|
|
|
79
80
|
option: "radio-buttons-option",
|
|
80
81
|
control: "radio-buttons-control",
|
|
81
82
|
indicator: "radio-buttons-indicator",
|
|
82
|
-
optionLabel: "radio-buttons-option-label"
|
|
83
|
+
optionLabel: "radio-buttons-option-label",
|
|
84
|
+
errorMessage: "radio-buttons-error-message"
|
|
83
85
|
};
|
|
84
86
|
const selectors = {
|
|
85
87
|
root: "radio-buttons",
|
|
@@ -94,11 +96,13 @@ const semanticClassNames = {
|
|
|
94
96
|
option: "radio-buttons__option",
|
|
95
97
|
radio: "radio-buttons__radio",
|
|
96
98
|
indicator: "radio-buttons__indicator",
|
|
97
|
-
label: "radio-buttons__label"
|
|
99
|
+
label: "radio-buttons__label",
|
|
100
|
+
errorMessage: "radio-buttons__error-message"
|
|
98
101
|
};
|
|
99
102
|
export {
|
|
100
103
|
DesignStates as D,
|
|
101
104
|
TestIds as T,
|
|
105
|
+
VALUE_MISSING_MESSAGE as V,
|
|
102
106
|
defaultOptions as a,
|
|
103
107
|
semanticClassNames as b,
|
|
104
108
|
DisplayNames as c,
|