@synerise/ds-input 0.18.50 → 0.18.51
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 +11 -0
- package/dist/InputGroup.d.ts +2 -2
- package/dist/InputGroup.js +8 -2
- package/dist/InputGroup.styles.d.ts +4 -0
- package/dist/InputGroup.styles.js +13 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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.51](https://github.com/synerise/synerise-design/compare/@synerise/ds-input@0.18.50...@synerise/ds-input@0.18.51) (2023-09-08)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **input:** fixed styles for input group ([ce30745](https://github.com/synerise/synerise-design/commit/ce3074527dd6408bd87ea1e0a5f867f283c61f93))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [0.18.50](https://github.com/synerise/synerise-design/compare/@synerise/ds-input@0.18.49...@synerise/ds-input@0.18.50) (2023-09-05)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @synerise/ds-input
|
package/dist/InputGroup.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { Props } from './InputGroup.types';
|
|
3
|
-
declare const InputGroup:
|
|
3
|
+
declare const InputGroup: ({ children, label, errors, description, resetMargin, tooltip, ...antdInputGroupProps }: Props) => JSX.Element;
|
|
4
4
|
export default InputGroup;
|
package/dist/InputGroup.js
CHANGED
|
@@ -2,9 +2,10 @@ var _excluded = ["children", "label", "errors", "description", "resetMargin", "t
|
|
|
2
2
|
|
|
3
3
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import React, { Children } from 'react';
|
|
6
6
|
import Input from 'antd/lib/input';
|
|
7
7
|
import * as InputStyles from './Input.styles';
|
|
8
|
+
import * as S from './InputGroup.styles';
|
|
8
9
|
import Label from './Label/Label';
|
|
9
10
|
|
|
10
11
|
var InputGroup = function InputGroup(_ref) {
|
|
@@ -16,12 +17,17 @@ var InputGroup = function InputGroup(_ref) {
|
|
|
16
17
|
tooltip = _ref.tooltip,
|
|
17
18
|
antdInputGroupProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
18
19
|
|
|
20
|
+
var childrenArray = Children.toArray(children);
|
|
19
21
|
return /*#__PURE__*/React.createElement(InputStyles.OuterWrapper, {
|
|
20
22
|
resetMargin: resetMargin
|
|
21
23
|
}, label && /*#__PURE__*/React.createElement(InputStyles.ContentAbove, null, /*#__PURE__*/React.createElement(Label, {
|
|
22
24
|
label: label,
|
|
23
25
|
tooltip: tooltip
|
|
24
|
-
})), /*#__PURE__*/React.createElement(Input.Group, antdInputGroupProps,
|
|
26
|
+
})), /*#__PURE__*/React.createElement(Input.Group, antdInputGroupProps, /*#__PURE__*/React.createElement(S.InputGroupWrapper, {
|
|
27
|
+
compact: antdInputGroupProps.compact
|
|
28
|
+
}, Children.map(childrenArray, function (child) {
|
|
29
|
+
return /*#__PURE__*/React.createElement(S.InputGroupItem, null, child);
|
|
30
|
+
}))), (errors && errors.length > 0 || description) && /*#__PURE__*/React.createElement(InputStyles.ContentBelow, null, errors && errors.map(function (error) {
|
|
25
31
|
return /*#__PURE__*/React.createElement(InputStyles.ErrorText, {
|
|
26
32
|
key: "error"
|
|
27
33
|
}, error);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
export var InputGroupItem = styled.div.withConfig({
|
|
3
|
+
displayName: "InputGroupstyles__InputGroupItem",
|
|
4
|
+
componentId: "sc-1cn2cc5-0"
|
|
5
|
+
})(["&:not(:last-child){margin-right:12px;}&:last-child{flex-grow:1;}"]);
|
|
6
|
+
export var InputGroupWrapper = styled.div.withConfig({
|
|
7
|
+
displayName: "InputGroupstyles__InputGroupWrapper",
|
|
8
|
+
componentId: "sc-1cn2cc5-1"
|
|
9
|
+
})(["&&{display:flex;align-items:", ";", "}"], function (props) {
|
|
10
|
+
return props.compact ? '' : 'stretch';
|
|
11
|
+
}, function (props) {
|
|
12
|
+
return !!props.compact && css(["", ":not(:last-child){margin-right:-1px;.ant-input,.ant-input-number,.ant-select-selector{border-top-right-radius:0px;border-bottom-right-radius:0px;}}", ":last-child{.ant-input,.ant-input-number,.ant-select-selector{border-top-left-radius:0px;border-bottom-left-radius:0px;}flex-grow:0;}"], InputGroupItem, InputGroupItem);
|
|
13
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-input",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.51",
|
|
4
4
|
"description": "Input UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "synerise/synerise-design",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@synerise/ds-icon": "^0.58.1",
|
|
36
36
|
"@synerise/ds-scrollbar": "^0.6.6",
|
|
37
37
|
"@synerise/ds-tooltip": "^0.14.3",
|
|
38
|
-
"@synerise/ds-typography": "^0.12.
|
|
38
|
+
"@synerise/ds-typography": "^0.12.10",
|
|
39
39
|
"@synerise/ds-utils": "^0.24.15",
|
|
40
40
|
"antd-mask-input": "^0.1.13",
|
|
41
41
|
"csstype": "2.6.9",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@testing-library/react": "10.0.1"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "955a885f58b3fca4caa4f879deb147fe5b9dc6d8"
|
|
54
54
|
}
|