@true-engineering/true-react-common-ui-kit 4.0.0-alpha39 → 4.0.0-alpha40
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/components/ControlWrapper/ControlWrapper.d.ts +2 -0
- package/dist/true-react-common-ui-kit.js +3 -3
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +3 -3
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/src/components/ControlWrapper/ControlWrapper.tsx +4 -3
- package/src/components/Input/InputBase.tsx +1 -0
|
@@ -9239,7 +9239,7 @@
|
|
|
9239
9239
|
return target;
|
|
9240
9240
|
}
|
|
9241
9241
|
var ControlWrapper = function(param) {
|
|
9242
|
-
var label = param.label, icon = param.icon, groupPlacement = param.groupPlacement, isInvalid = param.isInvalid, isFocused = param.isFocused, isRequired = param.isRequired, isLoading = param.isLoading, isFullWidth = param.isFullWidth, isDisabled = param.isDisabled, hasValue = param.hasValue, size = param.size, testId = param.testId, children = param.children, tweakStyles = param.tweakStyles, data = param.data, onClear = param.onClear;
|
|
9242
|
+
var label = param.label, icon = param.icon, groupPlacement = param.groupPlacement, isInvalid = param.isInvalid, isFocused = param.isFocused, isRequired = param.isRequired, isLoading = param.isLoading, isFullWidth = param.isFullWidth, isActive = param.isActive, isDisabled = param.isDisabled, hasValue = param.hasValue, size = param.size, testId = param.testId, children = param.children, tweakStyles = param.tweakStyles, data = param.data, onClear = param.onClear;
|
|
9243
9243
|
var classes = useStyles$J({
|
|
9244
9244
|
theme: tweakStyles
|
|
9245
9245
|
});
|
|
@@ -9247,7 +9247,6 @@
|
|
|
9247
9247
|
var hasIcons = !isLoading && trueReactPlatformHelpers.isArrayNotEmpty(icons);
|
|
9248
9248
|
var hasClearButton = !isDisabled && !isLoading && hasValue && trueReactPlatformHelpers.isNotEmpty(onClear);
|
|
9249
9249
|
var hasControls = hasIcons || hasClearButton || isLoading;
|
|
9250
|
-
var isActive = isFocused || hasValue;
|
|
9251
9250
|
var tweakPreloaderStyles = useTweakStyles({
|
|
9252
9251
|
tweakStyles,
|
|
9253
9252
|
className: "tweakPreloader",
|
|
@@ -9259,7 +9258,7 @@
|
|
|
9259
9258
|
}, trueReactPlatformHelpers.addDataAttributes(data, testId)), {
|
|
9260
9259
|
children: [
|
|
9261
9260
|
trueReactPlatformHelpers.isReactNodeNotEmpty(label) && /* @__PURE__ */ jsx("div", {
|
|
9262
|
-
className: clsx(classes.label, (_obj1 = {}, _define_property$Z(_obj1, classes.requiredLabel, isRequired), _define_property$Z(_obj1, classes.disabledLabel, isDisabled), _define_property$Z(_obj1, classes.activeLabel, isActive), _obj1)),
|
|
9261
|
+
className: clsx(classes.label, (_obj1 = {}, _define_property$Z(_obj1, classes.requiredLabel, isRequired), _define_property$Z(_obj1, classes.disabledLabel, isDisabled), _define_property$Z(_obj1, classes.activeLabel, isFocused || hasValue || isActive), _obj1)),
|
|
9263
9262
|
children: label
|
|
9264
9263
|
}),
|
|
9265
9264
|
/* @__PURE__ */ jsxs("div", {
|
|
@@ -9787,6 +9786,7 @@
|
|
|
9787
9786
|
label,
|
|
9788
9787
|
isDisabled,
|
|
9789
9788
|
isFocused: hasFocus,
|
|
9789
|
+
isActive: hasPlaceholder,
|
|
9790
9790
|
isInvalid,
|
|
9791
9791
|
hasValue,
|
|
9792
9792
|
isFullWidth: !isAutoSized,
|