@matbea-ui/matbea-ui 0.2.0-dev.963809 → 0.2.0-dev.976304

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.
@@ -165,6 +165,7 @@ const StyledButton = styled.button `
165
165
  const IconSlot = styled.span `
166
166
  display: inline-flex;
167
167
  align-items: center;
168
+ width: max-content;
168
169
  justify-content: center;
169
170
  line-height: 0;
170
171
  ${({ $iconOnly }) => $iconOnly &&
@@ -573,8 +574,9 @@ const StyledTypography = styled$1.span `
573
574
  const Typography = ({ as = "span", forwardedAs, variant = "body-m-semibold", color, align, uppercase = false, truncate = false, inline = false, children, ...rest }) => (jsx(StyledTypography, { as: as, forwardedAs: forwardedAs, "$variant": variant, "$color": color, "$align": align, "$uppercase": uppercase, "$truncate": truncate, "$inline": inline, ...rest, children: children }));
574
575
 
575
576
  const Icon = ({ size = 24, children, ...rest }) => {
576
- return (jsx("svg", { width: size, height: size, style: {
577
- display: "inline-flex",
577
+ return (jsx("svg", { style: {
578
+ width: size,
579
+ height: size,
578
580
  }, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: children }));
579
581
  };
580
582
 
@@ -928,14 +930,13 @@ const Informer = ({ label, description, type, icon, }) => {
928
930
  const Wrapper$1 = styled$1.div `
929
931
  display: flex;
930
932
  flex-direction: column;
931
- gap: 4px;
933
+ gap: 12px;
932
934
  width: 100%;
933
935
  `;
934
936
  const Label$2 = styled$1(Typography).attrs({
935
- variant: "form-input",
936
937
  forwardedAs: "label",
937
938
  }) `
938
- color: ${({ theme }) => theme.colors.primary.darkBlue};
939
+ color: ${({ theme, $color }) => $color || theme.colors.primary.darkBlue};
939
940
  `;
940
941
  const FieldContainer$1 = styled$1.div `
941
942
  display: flex;
@@ -1008,7 +1009,7 @@ const ErrorText$1 = styled$1.span `
1008
1009
  color: ${({ theme }) => theme.colors.accent.red};
1009
1010
  `;
1010
1011
 
1011
- const TextField = forwardRef(({ value, defaultValue, placeholder = "Text", label, error, disabled = false, icon, action, name, type = "text", onChange, onFocus, onBlur, className, }, ref) => {
1012
+ const TextField = forwardRef(({ value, defaultValue, placeholder = "Text", label, error, disabled = false, icon, action, name, type = "text", onChange, onFocus, onBlur, className, labelVariant, labelColor, }, ref) => {
1012
1013
  const [focused, setFocused] = useState(false);
1013
1014
  const hasError = Boolean(error);
1014
1015
  const handleFocus = (evt) => {
@@ -1019,7 +1020,7 @@ const TextField = forwardRef(({ value, defaultValue, placeholder = "Text", label
1019
1020
  setFocused(false);
1020
1021
  onBlur?.(evt);
1021
1022
  };
1022
- return (jsxs(Wrapper$1, { className: className, children: [label && jsx(Label$2, { children: label }), jsxs(FieldContainer$1, { "$hasError": hasError, "$disabled": disabled, "data-state": hasError ? "error" : focused ? "active" : undefined, children: [icon && jsx(LeadingIcon$1, { children: icon }), jsx(Input, { ref: ref, type: type, name: name, value: value, defaultValue: defaultValue, placeholder: placeholder, disabled: disabled, onChange: onChange, onFocus: handleFocus, onBlur: handleBlur }), action && jsx(ActionSlot, { children: action })] }), error && jsx(ErrorText$1, { children: error })] }));
1023
+ return (jsxs(Wrapper$1, { className: className, children: [label && (jsx(Label$2, { variant: labelVariant || "form-input", color: labelColor, children: label })), jsxs(FieldContainer$1, { "$hasError": hasError, "$disabled": disabled, "data-state": hasError ? "error" : focused ? "active" : undefined, children: [icon && jsx(LeadingIcon$1, { children: icon }), jsx(Input, { ref: ref, type: type, name: name, value: value, defaultValue: defaultValue, placeholder: placeholder, disabled: disabled, onChange: onChange, onFocus: handleFocus, onBlur: handleBlur }), action && jsx(ActionSlot, { children: action })] }), error && jsx(ErrorText$1, { children: error })] }));
1023
1024
  });
1024
1025
  TextField.displayName = "TextField";
1025
1026