@7shifts/sous-chef 3.65.1 → 3.65.2
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/index.css +3 -0
- package/dist/index.css.map +1 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +8 -3
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11136,7 +11136,7 @@ var RadioGroupField = function RadioGroupField(_ref) {
|
|
|
11136
11136
|
}, caption), controllers.error && React__default["default"].createElement(ErrorMessage, null, controllers.error))));
|
|
11137
11137
|
};
|
|
11138
11138
|
|
|
11139
|
-
var styles$f = {"text-field":"_6Of1F","text-field--invalid":"_NQPNK","text-field--prefixed":"_BpQWQ","text-field--suffixed":"_cpYWb","password-container":"_pAoib","password-toggle":"_WVvS6"};
|
|
11139
|
+
var styles$f = {"text-field":"_6Of1F","text-field--invalid":"_NQPNK","text-field--prefixed":"_BpQWQ","text-field--suffixed":"_cpYWb","password-container":"_pAoib","password-toggle":"_WVvS6","password-toggle--disabled":"_G29N3"};
|
|
11140
11140
|
|
|
11141
11141
|
var styles$e = {"password-criteria":"_1ruWK","password-criteria--invalid":"_xR7tb"};
|
|
11142
11142
|
|
|
@@ -11187,7 +11187,7 @@ var groupCriterias = function groupCriterias(criterias) {
|
|
|
11187
11187
|
|
|
11188
11188
|
/** It allows show and hide the password as well as displaying the criteria. */
|
|
11189
11189
|
var PasswordField = function PasswordField(_ref) {
|
|
11190
|
-
var _classnames;
|
|
11190
|
+
var _classnames, _classNames;
|
|
11191
11191
|
var name = _ref.name,
|
|
11192
11192
|
inputId = _ref.id,
|
|
11193
11193
|
value = _ref.value,
|
|
@@ -11205,7 +11205,8 @@ var PasswordField = function PasswordField(_ref) {
|
|
|
11205
11205
|
type = _useState[0],
|
|
11206
11206
|
setType = _useState[1];
|
|
11207
11207
|
var toggleType = function toggleType() {
|
|
11208
|
-
|
|
11208
|
+
if (disabled) return;
|
|
11209
|
+
setType(type === 'password' ? 'text' : 'password');
|
|
11209
11210
|
};
|
|
11210
11211
|
var controllers = useFieldControllers({
|
|
11211
11212
|
name: name,
|
|
@@ -11241,7 +11242,7 @@ var PasswordField = function PasswordField(_ref) {
|
|
|
11241
11242
|
onChange: controllers.onChange,
|
|
11242
11243
|
onBlur: controllers.onBlur
|
|
11243
11244
|
}), React__default["default"].createElement("div", {
|
|
11244
|
-
className: styles$f['password-toggle'],
|
|
11245
|
+
className: classnames__default["default"](styles$f['password-toggle'], (_classNames = {}, _classNames[styles$f['password-toggle--disabled']] = disabled, _classNames)),
|
|
11245
11246
|
onClick: toggleType,
|
|
11246
11247
|
onKeyPress: toggleType,
|
|
11247
11248
|
"data-testid": testId && testId + "-toggle",
|