@codacy/ui-components 0.64.16 → 0.64.17
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/lib/Avatar/Avatar.js +25 -19
- package/lib/Avatar/Avatar.types.js +5 -1
- package/lib/Avatar/gravatar.js +17 -13
- package/lib/Avatar/index.js +16 -1
- package/lib/Banner/Banner.js +45 -32
- package/lib/Banner/Banner.styles.d.ts +11 -12
- package/lib/Banner/Banner.styles.js +26 -15
- package/lib/Banner/Banner.types.js +5 -1
- package/lib/Banner/index.js +27 -2
- package/lib/Button/Button.js +54 -51
- package/lib/Button/index.js +27 -2
- package/lib/Button/styles.d.ts +16 -12
- package/lib/Button/styles.js +58 -44
- package/lib/Button/types.js +5 -1
- package/lib/Checkbox/Checkbox.js +63 -54
- package/lib/Checkbox/CheckboxFilterList.js +46 -32
- package/lib/Checkbox/index.js +38 -3
- package/lib/Checkbox/styles.d.ts +25 -22
- package/lib/Checkbox/styles.js +52 -37
- package/lib/Checkbox/types.js +5 -1
- package/lib/CloseButton/index.js +27 -16
- package/lib/Divider/Divider.js +23 -13
- package/lib/Divider/Divider.styles.d.ts +16 -19
- package/lib/Divider/Divider.styles.js +24 -11
- package/lib/Divider/Divider.types.js +5 -1
- package/lib/Divider/index.js +16 -1
- package/lib/Dropdown/Content/DropdownInput.js +20 -8
- package/lib/Dropdown/Content/DropdownItem.js +29 -21
- package/lib/Dropdown/Content/DropdownSeparator.js +19 -7
- package/lib/Dropdown/Content/index.js +38 -3
- package/lib/Dropdown/Dropdown.js +89 -85
- package/lib/Dropdown/Dropdown.styles.d.ts +37 -34
- package/lib/Dropdown/Dropdown.styles.js +62 -43
- package/lib/Dropdown/Dropdown.types.js +5 -1
- package/lib/Dropdown/Triggers/DropdownButtonTrigger.js +30 -20
- package/lib/Dropdown/Triggers/DropdownLinkTrigger.js +29 -19
- package/lib/Dropdown/Triggers/InputTrigger.js +18 -10
- package/lib/Dropdown/Triggers/SelectTrigger.js +19 -12
- package/lib/Dropdown/Triggers/hooks.js +18 -14
- package/lib/Dropdown/Triggers/index.js +60 -5
- package/lib/Dropdown/Triggers/types.js +5 -1
- package/lib/Dropdown/index.js +49 -4
- package/lib/Flexbox/Flexbox.d.ts +31 -17
- package/lib/Flexbox/Flexbox.js +36 -16
- package/lib/Flexbox/index.js +16 -1
- package/lib/Group/Group.js +17 -8
- package/lib/Group/Group.styles.d.ts +8 -10
- package/lib/Group/Group.styles.js +17 -7
- package/lib/Group/Group.types.js +5 -1
- package/lib/Group/index.js +16 -1
- package/lib/Icon/Icon.js +24 -14
- package/lib/Icon/Icon.styles.d.ts +9 -11
- package/lib/Icon/Icon.styles.js +39 -44
- package/lib/Icon/Icon.types.js +5 -1
- package/lib/Icon/index.js +16 -1
- package/lib/IconAndText/IconAndText.js +33 -21
- package/lib/IconAndText/IconAndText.styles.d.ts +8 -10
- package/lib/IconAndText/IconAndText.styles.js +20 -10
- package/lib/IconAndText/IconAndText.types.js +5 -1
- package/lib/IconAndText/index.js +16 -1
- package/lib/Icons/Chevrons.js +53 -41
- package/lib/Icons/CodacyIcon.js +17 -8
- package/lib/Icons/Messages.js +54 -35
- package/lib/Icons/Search.js +16 -7
- package/lib/Icons/Severities.js +117 -106
- package/lib/Icons/Sorting.js +23 -13
- package/lib/Icons/Spinner.js +19 -10
- package/lib/Icons/Symbols.js +73 -58
- package/lib/Icons/index.js +93 -8
- package/lib/Img/Img.js +44 -37
- package/lib/Img/Img.styles.d.ts +12 -11
- package/lib/Img/Img.styles.js +37 -32
- package/lib/Img/Img.types.js +5 -1
- package/lib/Img/index.js +16 -1
- package/lib/InlineMessage/InlineMessage.js +47 -34
- package/lib/InlineMessage/index.js +16 -1
- package/lib/InlineMessage/types.js +5 -1
- package/lib/Input/Input.js +148 -126
- package/lib/Input/hooks.js +149 -178
- package/lib/Input/index.js +27 -2
- package/lib/Input/styles.d.ts +55 -104
- package/lib/Input/styles.js +85 -54
- package/lib/Input/types.js +5 -1
- package/lib/Labeled/Labeled.js +34 -22
- package/lib/Labeled/index.js +16 -1
- package/lib/Labeled/styles.d.ts +16 -12
- package/lib/Labeled/styles.js +27 -11
- package/lib/Labeled/types.js +5 -1
- package/lib/LeftMenu/LeftMenu.js +20 -11
- package/lib/LeftMenu/LeftMenu.styles.d.ts +8 -10
- package/lib/LeftMenu/LeftMenu.styles.js +20 -10
- package/lib/LeftMenu/LeftMenu.types.js +5 -1
- package/lib/LeftMenu/index.js +16 -1
- package/lib/Link/Link.js +43 -33
- package/lib/Link/Link.styles.d.ts +4 -1
- package/lib/Link/Link.styles.js +21 -11
- package/lib/Link/Link.types.js +5 -1
- package/lib/Link/index.js +38 -3
- package/lib/Message/Message.js +32 -24
- package/lib/Message/Message.styles.d.ts +8 -10
- package/lib/Message/Message.styles.js +17 -7
- package/lib/Message/Message.types.js +5 -1
- package/lib/Message/index.js +16 -1
- package/lib/Modal/ConfirmationModal.js +64 -40
- package/lib/Modal/Modal.js +120 -107
- package/lib/Modal/index.js +27 -2
- package/lib/Modal/styles.d.ts +44 -61
- package/lib/Modal/styles.js +97 -85
- package/lib/Modal/types.js +5 -1
- package/lib/MoreInfo/MoreInfo.js +45 -39
- package/lib/MoreInfo/index.js +16 -1
- package/lib/MoreInfo/types.js +5 -1
- package/lib/Panel/Panel.js +18 -9
- package/lib/Panel/Panel.styles.d.ts +8 -11
- package/lib/Panel/Panel.styles.js +15 -5
- package/lib/Panel/Panel.types.js +5 -1
- package/lib/Panel/index.js +27 -2
- package/lib/PillLabel/PillLabel.js +28 -21
- package/lib/PillLabel/PillLabel.styles.d.ts +8 -10
- package/lib/PillLabel/PillLabel.styles.js +25 -16
- package/lib/PillLabel/PillLabel.types.js +5 -1
- package/lib/PillLabel/index.js +16 -1
- package/lib/Popup/Popup.js +55 -45
- package/lib/Popup/index.js +16 -1
- package/lib/Popup/styles.d.ts +12 -11
- package/lib/Popup/styles.js +21 -8
- package/lib/Popup/types.js +5 -1
- package/lib/ProgressBar/ProgressBar.js +30 -20
- package/lib/ProgressBar/index.js +27 -2
- package/lib/ProgressBar/styles.d.ts +24 -28
- package/lib/ProgressBar/styles.js +30 -14
- package/lib/ProgressBar/types.js +5 -1
- package/lib/Radio/Radio.js +53 -48
- package/lib/Radio/index.js +16 -1
- package/lib/Radio/styles.d.ts +25 -22
- package/lib/Radio/styles.js +49 -30
- package/lib/Radio/types.js +5 -1
- package/lib/ScrollableContent/ScrollableContent.js +35 -24
- package/lib/ScrollableContent/ScrollableContent.styles.d.ts +9 -11
- package/lib/ScrollableContent/ScrollableContent.styles.js +23 -13
- package/lib/ScrollableContent/ScrollableContent.types.js +5 -1
- package/lib/ScrollableContent/index.js +27 -2
- package/lib/ScrollableContent/useScrollContainer.js +29 -24
- package/lib/Select/Select.js +31 -20
- package/lib/Select/index.js +16 -1
- package/lib/Select/types.js +5 -1
- package/lib/Skeleton/Skeleton.js +30 -25
- package/lib/Skeleton/Skeleton.styles.d.ts +8 -10
- package/lib/Skeleton/Skeleton.styles.js +21 -14
- package/lib/Skeleton/Skeleton.types.js +5 -1
- package/lib/Skeleton/index.js +20 -2
- package/lib/Stepper/Stepper.js +49 -40
- package/lib/Stepper/Stepper.styles.d.ts +24 -29
- package/lib/Stepper/Stepper.styles.js +35 -19
- package/lib/Stepper/Stepper.types.js +5 -1
- package/lib/Stepper/index.js +16 -1
- package/lib/Switcher/Switcher.js +32 -23
- package/lib/Switcher/Switcher.styles.d.ts +13 -13
- package/lib/Switcher/Switcher.styles.js +27 -15
- package/lib/Switcher/Switcher.types.js +5 -1
- package/lib/Switcher/index.js +16 -1
- package/lib/Tab/Tab.js +31 -23
- package/lib/Tab/Tab.styles.d.ts +13 -12
- package/lib/Tab/Tab.styles.js +30 -21
- package/lib/Tab/Tab.types.js +5 -1
- package/lib/Tab/index.js +16 -1
- package/lib/Table/NewSelectableTable.js +77 -56
- package/lib/Table/SelectableTable.js +138 -118
- package/lib/Table/Table.js +126 -111
- package/lib/Table/Table.styles.d.ts +32 -16
- package/lib/Table/Table.styles.js +79 -59
- package/lib/Table/Table.types.js +5 -1
- package/lib/Table/index.js +27 -2
- package/lib/TagsInput/TagsInput.js +44 -33
- package/lib/TagsInput/index.js +16 -1
- package/lib/TagsInput/style.d.ts +16 -19
- package/lib/TagsInput/style.js +22 -9
- package/lib/TagsInput/types.js +5 -1
- package/lib/Textarea/Textarea.js +75 -58
- package/lib/Textarea/Textarea.styles.d.ts +28 -22
- package/lib/Textarea/Textarea.styles.js +55 -32
- package/lib/Textarea/Textarea.types.js +5 -1
- package/lib/Textarea/index.js +16 -1
- package/lib/ThemeProvider/ThemeProvider.d.ts +5 -2
- package/lib/ThemeProvider/ThemeProvider.js +48 -30
- package/lib/ThemeProvider/index.js +16 -1
- package/lib/Toast/Toast.js +56 -53
- package/lib/Toast/index.js +16 -1
- package/lib/Toast/styles.d.ts +4 -2
- package/lib/Toast/styles.js +13 -3
- package/lib/Toast/types.js +5 -1
- package/lib/Toggle/Toggle.js +59 -50
- package/lib/Toggle/index.js +16 -1
- package/lib/Toggle/styles.d.ts +21 -14
- package/lib/Toggle/styles.js +51 -34
- package/lib/Toggle/types.js +5 -1
- package/lib/Tooltip/Tooltip.js +100 -102
- package/lib/Tooltip/index.js +16 -1
- package/lib/Tooltip/styles.d.ts +14 -8
- package/lib/Tooltip/styles.js +33 -25
- package/lib/Tooltip/types.js +5 -1
- package/lib/Typography/Typography.js +96 -85
- package/lib/Typography/Typography.styles.d.ts +48 -54
- package/lib/Typography/Typography.styles.js +70 -45
- package/lib/Typography/Typography.types.js +5 -1
- package/lib/Typography/index.js +38 -3
- package/lib/emotion.d.js +3 -0
- package/lib/hooks/index.js +38 -3
- package/lib/hooks/useForwardedRef.js +11 -6
- package/lib/hooks/useInfiniteScroll.js +24 -20
- package/lib/hooks/useStatefulRef.js +18 -14
- package/lib/index.js +489 -44
- package/lib/system-props/color.js +8 -2
- package/lib/system-props/index.js +27 -2
- package/lib/system-props/types.js +5 -1
- package/lib/theme/ColorSchemes/codacy.js +11 -4
- package/lib/theme/ColorSchemes/pulse.js +17 -9
- package/lib/theme/index.js +38 -3
- package/lib/theme/theme.js +42 -69
- package/lib/types.js +5 -1
- package/lib/utils/hash.js +8 -6
- package/lib/utils/reactNodeToText.js +13 -14
- package/package.json +32 -32
package/lib/TagsInput/index.js
CHANGED
|
@@ -1 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _TagsInput = require("./TagsInput");
|
|
7
|
+
Object.keys(_TagsInput).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _TagsInput[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _TagsInput[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
package/lib/TagsInput/style.d.ts
CHANGED
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { BoxProps } from '../Flexbox';
|
|
3
|
-
import { CodacyTheme } from '../theme';
|
|
4
3
|
import { TagsInputProps } from './types';
|
|
5
|
-
export declare const TagsInputWrapper: import("@emotion/styled
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
} &
|
|
21
|
-
theme?: object | undefined;
|
|
22
|
-
}, Pick<BoxProps, "height">, CodacyTheme>;
|
|
4
|
+
export declare const TagsInputWrapper: import("@emotion/styled").StyledComponent<{
|
|
5
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
6
|
+
as?: import("react").ElementType<any> | undefined;
|
|
7
|
+
} & import("..").ColorProps & Omit<import("..").LayoutProps, "size"> & import("..").SpaceProps & import("..").BorderProps & import("..").PositionProps & import("..").ShadowProps & import("..").TextAlignProps & Omit<import("..").TypographyProps, "fontWeight"> & import("..").As & {
|
|
8
|
+
fontWeight?: import("styled-system").ResponsiveValue<number | import("..").FontWeights, import("..").CodacyTheme> | undefined;
|
|
9
|
+
} & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
10
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
11
|
+
} & import("..").FlexboxProps & import("..").GridboxProps & Pick<TagsInputProps, "size">, {}, {}>;
|
|
12
|
+
export declare const StyledTagsInput: import("@emotion/styled").StyledComponent<{
|
|
13
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
14
|
+
as?: import("react").ElementType<any> | undefined;
|
|
15
|
+
} & import("..").ColorProps & Omit<import("..").LayoutProps, "size"> & import("..").SpaceProps & import("..").BorderProps & import("..").PositionProps & import("..").ShadowProps & import("..").TextAlignProps & Omit<import("..").TypographyProps, "fontWeight"> & import("..").As & {
|
|
16
|
+
fontWeight?: import("styled-system").ResponsiveValue<number | import("..").FontWeights, import("..").CodacyTheme> | undefined;
|
|
17
|
+
} & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
18
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
19
|
+
} & import("..").FlexboxProps & import("..").GridboxProps & Pick<BoxProps, "height">, {}, {}>;
|
package/lib/TagsInput/style.js
CHANGED
|
@@ -1,14 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.TagsInputWrapper = exports.StyledTagsInput = void 0;
|
|
8
|
+
var _base = _interopRequireDefault(require("@emotion/styled/base"));
|
|
9
|
+
var _ = require("..");
|
|
10
|
+
var TagsInputWrapper = exports.TagsInputWrapper = /*#__PURE__*/(0, _base["default"])(_.Box, process.env.NODE_ENV === "production" ? {
|
|
11
|
+
target: "e10h23jx1"
|
|
12
|
+
} : {
|
|
13
|
+
target: "e10h23jx1",
|
|
14
|
+
label: "codacy"
|
|
5
15
|
})("width:", function (_ref) {
|
|
6
16
|
var theme = _ref.theme,
|
|
7
|
-
|
|
17
|
+
size = _ref.size;
|
|
8
18
|
return !!size ? theme.controlSize[size] : '100%';
|
|
9
|
-
}, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
10
|
-
|
|
11
|
-
target: "
|
|
19
|
+
}, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9UYWdzSW5wdXQvc3R5bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS3lFIiwiZmlsZSI6Ii4uLy4uL3NyYy9UYWdzSW5wdXQvc3R5bGUudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCdcbmltcG9ydCB7IEJveCB9IGZyb20gJy4uJ1xuaW1wb3J0IHsgQm94UHJvcHMgfSBmcm9tICcuLi9GbGV4Ym94J1xuaW1wb3J0IHsgVGFnc0lucHV0UHJvcHMgfSBmcm9tICcuL3R5cGVzJ1xuXG5leHBvcnQgY29uc3QgVGFnc0lucHV0V3JhcHBlciA9IHN0eWxlZChCb3gpPFBpY2s8VGFnc0lucHV0UHJvcHMsICdzaXplJz4+YFxuICB3aWR0aDogJHsoeyB0aGVtZSwgc2l6ZSB9KSA9PiAoISFzaXplID8gdGhlbWUuY29udHJvbFNpemVbc2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zNdfSAwIDAgJHt0aGVtZS5zcGFjZVszXX1gfTtcbiAgICAgIHBhZGRpbmc6IDA7XG4gICAgICBmb250LXNpemU6ICR7KHsgdGhlbWUgfSkgPT4gdGhlbWUuZm9udFNpemVzWzJdfTtcbiAgICAgIGZvbnQtZmFtaWx5OiAkeyh7IHRoZW1lIH0pID0+IHRoZW1lLmZvbnRzWydub3JtYWwnXX07XG4gICAgICBjb2xvcjogJHsoeyB0aGVtZSB9KSA9PiB0aGVtZS5jb2xvcnNbJ3RleHQtcHJpbWFyeSddfTtcblxuICAgICAgOjpwbGFjZWhvbGRlciB7XG4gICAgICAgIGNvbG9yOiAkeyh7IHRoZW1lIH0pID0+IHRoZW1lLmNvbG9yc1sndGV4dC1wbGFjZWhvbGRlciddfTtcbiAgICAgIH1cbiAgICB9XG4gIH1cbmBcbiJdfQ== */"));
|
|
20
|
+
var StyledTagsInput = exports.StyledTagsInput = /*#__PURE__*/(0, _base["default"])(_.Box, process.env.NODE_ENV === "production" ? {
|
|
21
|
+
target: "e10h23jx0"
|
|
22
|
+
} : {
|
|
23
|
+
target: "e10h23jx0",
|
|
24
|
+
label: "codacy"
|
|
12
25
|
})(".react-tag-input{display:flex;flex-wrap:wrap;overflow-y:auto;border:1px solid ", function (_ref2) {
|
|
13
26
|
var theme = _ref2.theme;
|
|
14
27
|
return theme.colors['control-border'];
|
|
@@ -54,4 +67,4 @@ export var StyledTagsInput = /*#__PURE__*/_styled(Box, {
|
|
|
54
67
|
}, ";::placeholder{color:", function (_ref16) {
|
|
55
68
|
var theme = _ref16.theme;
|
|
56
69
|
return theme.colors['text-placeholder'];
|
|
57
|
-
}, ";}}}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
70
|
+
}, ";}}}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9U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47XG4gICAgICAgIHBhZGRpbmc6IDA7XG4gICAgICAgIG1hcmdpbi1yaWdodDogJHsoeyB0aGVtZSB9KSA9PiB0aGVtZS5zcGFjZVszXX07XG4gICAgICAgIG91dGxpbmU6IDA7XG5cbiAgICAgICAgJjpub3QoOmZvY3VzKSB7XG4gICAgICAgICAgdGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG5cbiAgICAucmVhY3QtdGFnLWlucHV0X19pbnB1dCB7XG4gICAgICBib3JkZXI6IDA7XG4gICAgICBvdXRsaW5lOiAwO1xuICAgICAgd2lkdGg6IGF1dG87XG4gICAgICBmbGV4LWdyb3c6IDE7XG4gICAgICBoZWlnaHQ6IDEuNjI1cmVtO1xuICAgICAgbGluZS1oZWlnaHQ6IDEuNjI1cmVtO1xuICAgICAgbWFyZ2luOiAkeyh7IHRoZW1lIH0pID0+IGAke3RoZW1lLnNwYWNlWzNdfSAwIDAgJHt0aGVtZS5zcGFjZVszXX1gfTtcbiAgICAgIHBhZGRpbmc6IDA7XG4gICAgICBmb250LXNpemU6ICR7KHsgdGhlbWUgfSkgPT4gdGhlbWUuZm9udFNpemVzWzJdfTtcbiAgICAgIGZvbnQtZmFtaWx5OiAkeyh7IHRoZW1lIH0pID0+IHRoZW1lLmZvbnRzWydub3JtYWwnXX07XG4gICAgICBjb2xvcjogJHsoeyB0aGVtZSB9KSA9PiB0aGVtZS5jb2xvcnNbJ3RleHQtcHJpbWFyeSddfTtcblxuICAgICAgOjpwbGFjZWhvbGRlciB7XG4gICAgICAgIGNvbG9yOiAkeyh7IHRoZW1lIH0pID0+IHRoZW1lLmNvbG9yc1sndGV4dC1wbGFjZWhvbGRlciddfTtcbiAgICAgIH1cbiAgICB9XG4gIH1cbmBcbiJdfQ== */"));
|
package/lib/TagsInput/types.js
CHANGED
package/lib/Textarea/Textarea.js
CHANGED
|
@@ -1,74 +1,91 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard")["default"];
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.Textarea = void 0;
|
|
9
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _Textarea = require("./Textarea.styles");
|
|
13
|
+
var _ = require("../");
|
|
14
|
+
var _autosize = _interopRequireDefault(require("autosize"));
|
|
15
|
+
var _Icon = require("../Icon");
|
|
16
|
+
var _Icons = require("../Icons");
|
|
17
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
2
18
|
var _excluded = ["id", "disabled", "required", "name", "maxLength", "value", "label", "placeholder", "help", "hasError", "errorMessage", "onChange", "moreInfo"];
|
|
3
|
-
import React, { useRef, useEffect } from 'react';
|
|
4
|
-
import { TextareaWrapper, StyledTextarea, IconRight, TextareaHelp, TextareaErrorMessage } from './Textarea.styles';
|
|
5
|
-
import { MoreInfo, Labeled } from '../';
|
|
6
|
-
import autosize from 'autosize';
|
|
7
|
-
import { Icon } from '../Icon';
|
|
8
|
-
import { ErrorIcon } from '../Icons';
|
|
9
19
|
/**
|
|
10
20
|
* Description for Textarea
|
|
11
21
|
*/
|
|
12
|
-
|
|
13
|
-
export var Textarea = function Textarea(_ref) {
|
|
22
|
+
var Textarea = exports.Textarea = function Textarea(_ref) {
|
|
14
23
|
var id = _ref.id,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
useEffect(function () {
|
|
24
|
+
disabled = _ref.disabled,
|
|
25
|
+
required = _ref.required,
|
|
26
|
+
name = _ref.name,
|
|
27
|
+
maxLength = _ref.maxLength,
|
|
28
|
+
value = _ref.value,
|
|
29
|
+
label = _ref.label,
|
|
30
|
+
placeholder = _ref.placeholder,
|
|
31
|
+
help = _ref.help,
|
|
32
|
+
hasError = _ref.hasError,
|
|
33
|
+
errorMessage = _ref.errorMessage,
|
|
34
|
+
onChange = _ref.onChange,
|
|
35
|
+
moreInfo = _ref.moreInfo,
|
|
36
|
+
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
37
|
+
var Textarea = (0, _react.useRef)(null);
|
|
38
|
+
(0, _react.useEffect)(function () {
|
|
31
39
|
var currentRef = Textarea.current;
|
|
32
|
-
if (currentRef)
|
|
40
|
+
if (currentRef) (0, _autosize["default"])(currentRef);
|
|
33
41
|
return function () {
|
|
34
|
-
if (currentRef)
|
|
42
|
+
if (currentRef) _autosize["default"].destroy(currentRef);
|
|
35
43
|
};
|
|
36
44
|
}, [Textarea]);
|
|
37
|
-
var content = /*#__PURE__*/
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
45
|
+
var content = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
46
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Textarea.TextareaWrapper, {
|
|
47
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Textarea.StyledTextarea, {
|
|
48
|
+
id: id,
|
|
49
|
+
ref: Textarea,
|
|
50
|
+
name: name,
|
|
51
|
+
maxLength: maxLength,
|
|
52
|
+
disabled: disabled,
|
|
53
|
+
placeholder: placeholder,
|
|
54
|
+
required: required,
|
|
55
|
+
"aria-describedby": "help-".concat(id),
|
|
56
|
+
"aria-errormessage": "error-".concat(id),
|
|
57
|
+
hasError: hasError,
|
|
58
|
+
onChange: !disabled ? onChange : undefined,
|
|
59
|
+
readOnly: disabled || !onChange,
|
|
60
|
+
value: !value ? '' : value
|
|
61
|
+
}), hasError && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Textarea.IconRight, {
|
|
62
|
+
hasError: hasError,
|
|
63
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
64
|
+
icon: _Icons.ErrorIcon
|
|
65
|
+
})
|
|
66
|
+
}), !label && moreInfo && /*#__PURE__*/(0, _jsxRuntime.jsx)(_.MoreInfo, {
|
|
67
|
+
ml: 2,
|
|
68
|
+
helpContent: moreInfo
|
|
69
|
+
})]
|
|
70
|
+
}), help && !hasError && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Textarea.TextareaHelp, {
|
|
71
|
+
id: "help-".concat(id),
|
|
72
|
+
children: help
|
|
73
|
+
}), hasError && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Textarea.TextareaErrorMessage, {
|
|
74
|
+
id: "error-".concat(id),
|
|
75
|
+
children: errorMessage
|
|
76
|
+
})]
|
|
77
|
+
});
|
|
64
78
|
if (!!label) {
|
|
65
|
-
return /*#__PURE__*/
|
|
79
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Labeled, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({
|
|
66
80
|
forId: id,
|
|
67
81
|
moreInfo: moreInfo,
|
|
68
82
|
label: label,
|
|
69
83
|
required: required
|
|
70
|
-
}, props),
|
|
84
|
+
}, props), {}, {
|
|
85
|
+
children: content
|
|
86
|
+
}));
|
|
71
87
|
}
|
|
72
|
-
|
|
73
|
-
|
|
88
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Textarea.TextareaWrapper, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, props), {}, {
|
|
89
|
+
children: content
|
|
90
|
+
}));
|
|
74
91
|
};
|
|
@@ -1,24 +1,30 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { CodacyTheme } from '../theme';
|
|
3
2
|
import { TextareaProps } from './Textarea.types';
|
|
4
|
-
export declare const TextareaWrapper: import("@emotion/styled
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
theme?:
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
3
|
+
export declare const TextareaWrapper: import("@emotion/styled").StyledComponent<{
|
|
4
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
+
as?: import("react").ElementType<any> | undefined;
|
|
6
|
+
} & import("..").ColorProps & Omit<import("..").LayoutProps, "size"> & import("..").SpaceProps & import("..").BorderProps & import("..").PositionProps & import("..").ShadowProps & import("..").TextAlignProps & Omit<import("..").TypographyProps, "fontWeight"> & import("../Flexbox").As & {
|
|
7
|
+
fontWeight?: import("styled-system").ResponsiveValue<number | import("../theme").FontWeights, import("../theme").CodacyTheme> | undefined;
|
|
8
|
+
} & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
9
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
10
|
+
} & import("..").FlexboxProps & import("..").GridboxProps & Pick<TextareaProps, "size">, {}, {}>;
|
|
11
|
+
export declare const StyledTextarea: import("@emotion/styled").StyledComponent<{
|
|
12
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
13
|
+
as?: import("react").ElementType<any> | undefined;
|
|
14
|
+
} & Pick<TextareaProps, "disabled" | "hasError">, import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, {}>;
|
|
15
|
+
export declare const TextareaHelp: import("@emotion/styled").StyledComponent<{
|
|
16
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
17
|
+
as?: import("react").ElementType<any> | undefined;
|
|
18
|
+
} & Record<string, unknown> & import("react").ClassAttributes<HTMLParagraphElement> & import("react").HTMLAttributes<HTMLParagraphElement> & {
|
|
19
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
20
|
+
}, {}, {}>;
|
|
21
|
+
export declare const TextareaErrorMessage: import("@emotion/styled").StyledComponent<{
|
|
22
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
23
|
+
as?: import("react").ElementType<any> | undefined;
|
|
24
|
+
} & Record<string, unknown> & import("react").ClassAttributes<HTMLParagraphElement> & import("react").HTMLAttributes<HTMLParagraphElement> & {
|
|
25
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
26
|
+
}, {}, {}>;
|
|
27
|
+
export declare const IconRight: import("@emotion/styled").StyledComponent<{
|
|
28
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
29
|
+
as?: import("react").ElementType<any> | undefined;
|
|
30
|
+
} & Pick<TextareaProps, "hasError">, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|