@codacy/ui-components 0.62.0 → 0.62.1

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.
@@ -125,7 +125,7 @@ var Input = React.forwardRef(function (_ref2, ref) {
125
125
  onClick: !disabled ? onClick : undefined
126
126
  })), !label && moreInfo && /*#__PURE__*/React.createElement(MoreInfo, {
127
127
  ml: 2,
128
- title: moreInfo,
128
+ helpContent: moreInfo,
129
129
  textAlignment: "center"
130
130
  })), help && !hasError && /*#__PURE__*/React.createElement(InputHelp, {
131
131
  id: "help-".concat(id)
@@ -3,6 +3,7 @@ import { ControlProps } from '../types';
3
3
  import { Size } from '../theme';
4
4
  import { SpaceProps } from '../system-props/types';
5
5
  import { IconProps, IconFile } from '../Icon/Icon.types';
6
+ import { MoreInfoProps } from '../MoreInfo/types';
6
7
  export declare type InputType = 'text' | 'email' | 'password' | 'number' | 'search' | 'tel' | 'url' | 'date';
7
8
  export interface InputProps extends ControlProps, SpaceProps {
8
9
  /** Display input as a required input field */
@@ -14,7 +15,7 @@ export interface InputProps extends ControlProps, SpaceProps {
14
15
  /** The label of the input */
15
16
  label?: string;
16
17
  /** Display an information icon next to the input */
17
- moreInfo?: string;
18
+ moreInfo?: MoreInfoProps['helpContent'];
18
19
  /** Specifies the maximum number of character for an input field */
19
20
  maxLength?: number;
20
21
  /** Type of input */
@@ -23,7 +23,7 @@ export var Labeled = function Labeled(_ref) {
23
23
  htmlFor: forId
24
24
  }, label, !required && /*#__PURE__*/React.createElement(Optional, null, "(optional)"), moreInfo && /*#__PURE__*/React.createElement(MoreInfo, {
25
25
  ml: 2,
26
- title: moreInfo,
26
+ helpContent: moreInfo,
27
27
  textAlignment: "center"
28
28
  })), children);
29
29
  };
@@ -1,6 +1,7 @@
1
1
  import { ContainerComponentProps } from '../types';
2
2
  import { SpaceProps } from '../system-props/types';
3
3
  import { Size } from '../theme';
4
+ import { MoreInfoProps } from '../MoreInfo/types';
4
5
  export interface LabeledProps extends ContainerComponentProps, SpaceProps {
5
6
  /** Is this control required? */
6
7
  required?: boolean;
@@ -11,5 +12,5 @@ export interface LabeledProps extends ContainerComponentProps, SpaceProps {
11
12
  /** ID of the associated component */
12
13
  forId?: string;
13
14
  /** Display an information icon next to the label */
14
- moreInfo?: string;
15
+ moreInfo?: MoreInfoProps['helpContent'];
15
16
  }
@@ -1,5 +1,5 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
- var _excluded = ["title", "textAlignment", "placement"];
2
+ var _excluded = ["helpContent", "textAlignment", "placement"];
3
3
  import React from 'react';
4
4
  import { Tooltip } from '../Tooltip';
5
5
  import { Icon } from '..';
@@ -31,13 +31,13 @@ var HelpIcon = function HelpIcon() {
31
31
 
32
32
 
33
33
  var MoreInfo = function MoreInfo(_ref) {
34
- var title = _ref.title,
34
+ var helpContent = _ref.helpContent,
35
35
  textAlignment = _ref.textAlignment,
36
36
  placement = _ref.placement,
37
37
  props = _objectWithoutProperties(_ref, _excluded);
38
38
 
39
39
  return /*#__PURE__*/React.createElement(Tooltip, {
40
- content: title,
40
+ content: helpContent,
41
41
  textAlignment: textAlignment,
42
42
  placement: placement
43
43
  }, /*#__PURE__*/React.createElement(Icon, Object.assign({
@@ -1,6 +1,5 @@
1
- import { TooltipPositionProps } from '../Tooltip/types';
1
+ import { TooltipContentProps, TooltipPositionProps } from '../Tooltip/types';
2
2
  import { IconProps } from '../Icon/Icon.types';
3
3
  export interface MoreInfoProps extends TooltipPositionProps, Omit<IconProps, 'icon'> {
4
- /** The content to display whhen hovering the icon */
5
- title: string;
4
+ helpContent: TooltipContentProps['content'];
6
5
  }
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import { MoreInfoProps } from '../MoreInfo/types';
2
3
  import { Size } from '../theme';
3
4
  import { ComponentProps } from '../types';
4
5
  declare type Tags = string[];
@@ -9,7 +10,7 @@ export interface TagsInputProps extends ComponentProps {
9
10
  required?: boolean;
10
11
  label?: string;
11
12
  size?: Size;
12
- moreInfo?: string;
13
+ moreInfo?: MoreInfoProps['helpContent'];
13
14
  }
14
15
  export interface TagsInputPropsState extends TagsInputProps {
15
16
  setTags: (tag: React.SetStateAction<string[]>) => void;
@@ -54,7 +54,7 @@ export var Textarea = function Textarea(_ref) {
54
54
  icon: ErrorIcon
55
55
  })), !label && moreInfo && /*#__PURE__*/React.createElement(MoreInfo, {
56
56
  ml: 2,
57
- title: moreInfo
57
+ helpContent: moreInfo
58
58
  })), help && !hasError && /*#__PURE__*/React.createElement(TextareaHelp, {
59
59
  id: "help-".concat(id)
60
60
  }, help), hasError && /*#__PURE__*/React.createElement(TextareaErrorMessage, {
@@ -2,6 +2,7 @@
2
2
  import { ControlProps } from '../types';
3
3
  import { SpaceProps } from '../system-props/types';
4
4
  import { Size } from '../theme';
5
+ import { MoreInfoProps } from '../MoreInfo/types';
5
6
  export interface TextareaProps extends ControlProps, SpaceProps {
6
7
  /** Display input as a required input field */
7
8
  required?: boolean;
@@ -12,7 +13,7 @@ export interface TextareaProps extends ControlProps, SpaceProps {
12
13
  /** The label of the input */
13
14
  label?: string;
14
15
  /** Display an information icon next to the input */
15
- moreInfo?: string;
16
+ moreInfo?: MoreInfoProps['helpContent'];
16
17
  /** Specifies the maximum number of character for an input field */
17
18
  maxLength?: number;
18
19
  /** Size of input */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codacy/ui-components",
3
- "version": "0.62.0",
3
+ "version": "0.62.1",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "",