@synerise/ds-input 0.18.18 → 0.18.22

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/CHANGELOG.md CHANGED
@@ -3,6 +3,42 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.18.22](https://github.com/synerise/synerise-design/compare/@synerise/ds-input@0.18.20...@synerise/ds-input@0.18.22) (2022-09-07)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-input
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.18.21](https://github.com/synerise/synerise-design/compare/@synerise/ds-input@0.18.20...@synerise/ds-input@0.18.21) (2022-09-07)
15
+
16
+ **Note:** Version bump only for package @synerise/ds-input
17
+
18
+
19
+
20
+
21
+
22
+ ## [0.18.20](https://github.com/synerise/synerise-design/compare/@synerise/ds-input@0.18.19...@synerise/ds-input@0.18.20) (2022-09-05)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * **input:** add option to control width of input in stories ([6c67ecc](https://github.com/synerise/synerise-design/commit/6c67ecc3d97c1a60e5bd6e1a4703a71becd88ea1))
28
+ * **input:** fix styles of propa autoResize ([bb38df3](https://github.com/synerise/synerise-design/commit/bb38df33ebf425947d3a2f3df657d7fe044a09bb))
29
+
30
+
31
+
32
+
33
+
34
+ ## [0.18.19](https://github.com/synerise/synerise-design/compare/@synerise/ds-input@0.18.18...@synerise/ds-input@0.18.19) (2022-08-31)
35
+
36
+ **Note:** Version bump only for package @synerise/ds-input
37
+
38
+
39
+
40
+
41
+
6
42
  ## [0.18.18](https://github.com/synerise/synerise-design/compare/@synerise/ds-input@0.18.17...@synerise/ds-input@0.18.18) (2022-08-29)
7
43
 
8
44
 
@@ -3,9 +3,18 @@ import TextArea from 'antd/lib/input/TextArea';
3
3
  import * as React from 'react';
4
4
  import MaskedInput from 'antd-mask-input';
5
5
  import { SizeType } from 'antd/es/config-provider/SizeContext';
6
+ export declare type AutoResizeProps = {
7
+ autoResize?: boolean | {
8
+ minWidth: string;
9
+ maxWidth: string;
10
+ };
11
+ };
6
12
  export declare const OuterWrapper: import("styled-components").StyledComponent<"div", any, {
7
13
  resetMargin?: boolean | undefined;
8
- autoResize?: boolean | undefined;
14
+ autoResize?: boolean | {
15
+ minWidth: string;
16
+ maxWidth: string;
17
+ } | undefined;
9
18
  }, never>;
10
19
  export declare const Wrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
11
20
  interface InputWrapperProps {
@@ -15,10 +15,21 @@ var errorInputStyle = function errorInputStyle(props) {
15
15
  return "\n &&&, && .ant-input {\n border-color: " + props.theme.palette['red-600'] + ";\n box-shadow: inset 0 0 0 1px " + props.theme.palette['red-600'] + ";\n background: " + props.theme.palette['red-050'] + ";\n }\n";
16
16
  };
17
17
 
18
+ function autoresizeConfObjToCss(_ref) {
19
+ var autoResize = _ref.autoResize;
20
+ if (!autoResize) return '';
21
+
22
+ if (typeof autoResize === 'object') {
23
+ return "max-width: " + autoResize.maxWidth + "; min-width: " + autoResize.minWidth;
24
+ }
25
+
26
+ return "max-width: 400px; min-width: 150px;";
27
+ }
28
+
18
29
  export var OuterWrapper = styled.div.withConfig({
19
30
  displayName: "Inputstyles__OuterWrapper",
20
31
  componentId: "dc57an-0"
21
- })(["margin:", ";&.active{&&{input{box-shadow:inset 0 0 0 1px ", ";border-color:", ";background-color:", ";}}}input{max-width:", ";min-width:", ";}"], function (props) {
32
+ })(["margin:", ";&.active{&&{input{box-shadow:inset 0 0 0 1px ", ";border-color:", ";background-color:", ";}}}input{", "}"], function (props) {
22
33
  return props.resetMargin ? '0' : '0 0 16px 0';
23
34
  }, function (props) {
24
35
  return props.theme.palette['blue-600'];
@@ -27,9 +38,7 @@ export var OuterWrapper = styled.div.withConfig({
27
38
  }, function (props) {
28
39
  return props.theme.palette['blue-050'];
29
40
  }, function (props) {
30
- return props.autoResize ? '400px' : '';
31
- }, function (props) {
32
- return props.autoResize ? '150px' : '';
41
+ return autoresizeConfObjToCss(props);
33
42
  });
34
43
  export var Wrapper = styled.div.withConfig({
35
44
  displayName: "Inputstyles__Wrapper",
@@ -68,9 +77,9 @@ export var IconWrapper = styled.div.withConfig({
68
77
  return props.theme.palette['blue-600'];
69
78
  });
70
79
  export var AntdInput = styled(React.forwardRef( // eslint-disable-next-line
71
- function (_ref, ref) {
72
- var error = _ref.error,
73
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
80
+ function (_ref2, ref) {
81
+ var error = _ref2.error,
82
+ props = _objectWithoutPropertiesLoose(_ref2, _excluded);
74
83
 
75
84
  return (
76
85
  /*#__PURE__*/
@@ -94,10 +103,10 @@ function (_ref, ref) {
94
103
  return props.size === 'large' ? "2.49" : "1.29";
95
104
  });
96
105
  export var AntdMaskedInput = styled(React.forwardRef( // eslint-disable-next-line
97
- function (_ref2, ref) {
98
- var error = _ref2.error,
99
- mask = _ref2.mask,
100
- props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
106
+ function (_ref3, ref) {
107
+ var error = _ref3.error,
108
+ mask = _ref3.mask,
109
+ props = _objectWithoutPropertiesLoose(_ref3, _excluded2);
101
110
 
102
111
  return (
103
112
  /*#__PURE__*/
@@ -120,9 +129,9 @@ function (_ref2, ref) {
120
129
  return props.theme.palette['grey-700'];
121
130
  });
122
131
  export var AntdTextArea = styled(React.forwardRef( // eslint-disable-next-line
123
- function (_ref3, ref) {
124
- var error = _ref3.error,
125
- props = _objectWithoutPropertiesLoose(_ref3, _excluded3);
132
+ function (_ref4, ref) {
133
+ var error = _ref4.error,
134
+ props = _objectWithoutPropertiesLoose(_ref4, _excluded3);
126
135
 
127
136
  return (
128
137
  /*#__PURE__*/
package/dist/index.d.ts CHANGED
@@ -1,2 +1,4 @@
1
+ import type { EnhancedProps } from './Input.types';
1
2
  export { default as Label } from './Label/Label';
2
- export { Input, TextArea, RawInput, RawTextArea, InputGroup, MaskedInput, InputMultivalue, RawMaskedInput } from './Input';
3
+ export { Input, TextArea, RawInput, RawTextArea, InputGroup, MaskedInput, InputMultivalue, RawMaskedInput, } from './Input';
4
+ export type { EnhancedProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-input",
3
- "version": "0.18.18",
3
+ "version": "0.18.22",
4
4
  "description": "Input UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "synerise/synerise-design",
@@ -32,9 +32,9 @@
32
32
  ],
33
33
  "types": "dist/index.d.ts",
34
34
  "dependencies": {
35
- "@synerise/ds-icon": "^0.50.0",
36
- "@synerise/ds-scrollbar": "^0.5.1",
37
- "@synerise/ds-tooltip": "^0.11.16",
35
+ "@synerise/ds-icon": "^0.51.0",
36
+ "@synerise/ds-scrollbar": "^0.5.2",
37
+ "@synerise/ds-tooltip": "^0.11.17",
38
38
  "@synerise/ds-typography": "^0.12.7",
39
39
  "@synerise/ds-utils": "^0.19.0",
40
40
  "antd-mask-input": "^0.1.13",
@@ -45,5 +45,5 @@
45
45
  "antd": "^4",
46
46
  "react": ">=16.9.0 < 17.0.0"
47
47
  },
48
- "gitHead": "c92d02f04157e6b1189eb59bba9dea4c1594c123"
48
+ "gitHead": "c90bb8af07578c7561792537ba59d87bab251b69"
49
49
  }