@synerise/ds-input 1.6.7 → 1.6.9
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 +8 -0
- package/README.md +86 -24
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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
|
+
## [1.6.9](https://github.com/synerise/synerise-design/compare/@synerise/ds-input@1.6.8...@synerise/ds-input@1.6.9) (2026-03-20)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-input
|
|
9
|
+
|
|
10
|
+
## [1.6.8](https://github.com/synerise/synerise-design/compare/@synerise/ds-input@1.6.7...@synerise/ds-input@1.6.8) (2026-03-09)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @synerise/ds-input
|
|
13
|
+
|
|
6
14
|
## [1.6.7](https://github.com/synerise/synerise-design/compare/@synerise/ds-input@1.6.6...@synerise/ds-input@1.6.7) (2026-02-23)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @synerise/ds-input
|
package/README.md
CHANGED
|
@@ -19,44 +19,51 @@ Input UI Component
|
|
|
19
19
|
|
|
20
20
|
| Property | Description | Type | Default |
|
|
21
21
|
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------- | ----------- |
|
|
22
|
-
| addonAfter | The label text displayed after (on the right side of) the input field. | string
|
|
23
|
-
| addonBefore | The label text displayed before (on the left side of) the input field. | string
|
|
22
|
+
| addonAfter | The label text displayed after (on the right side of) the input field. | string\|ReactNode | |
|
|
23
|
+
| addonBefore | The label text displayed before (on the left side of) the input field. | string\|ReactNode | |
|
|
24
24
|
| allowClear | Allow to remove input content with clear icon | boolean | |
|
|
25
|
-
| counterLimit | Maximum input length, if provided counter will be shown
|
|
26
|
-
| renderCustomCounter | render function to display custom char counter instead of counterLimit. counterLimit (max
|
|
25
|
+
| counterLimit | Maximum input length, if provided counter will be shown; input is blocked at the limit | number | - |
|
|
26
|
+
| renderCustomCounter | render function to display custom char counter instead of counterLimit. counterLimit (max allowed chars) does not have to be defined. | `(count?: number) => ReactNode` | - |
|
|
27
27
|
| defaultValue | The initial input content | string | |
|
|
28
28
|
| description | input description | string | - |
|
|
29
29
|
| disabled | Whether the input is disabled. | boolean | `false` |
|
|
30
30
|
| errorText | Error message, if provided input will be set in error state | string | - |
|
|
31
31
|
| error | If provided input will be set in error state, without error message | boolean | - |
|
|
32
32
|
| expandable | If true then user can switch to a multiline field if text overflows the input | boolean | - |
|
|
33
|
-
|
|
|
33
|
+
| expandableTooltip | Tooltip shown on the expand icon | ReactNode | - |
|
|
34
|
+
| handleInputRef | Callback receiving a ref to the underlying `<input>` element after mount. | `(ref: MutableRefObject<HTMLInputElement \| null>) => void` | - |
|
|
35
|
+
| icon1 | Left action icon rendered inside the input (right side) | ReactElement | - |
|
|
36
|
+
| icon1Tooltip | Tooltip for icon1 | ReactElement | - |
|
|
37
|
+
| icon2 | Second action icon (stacks with icon1) | ReactElement | - |
|
|
38
|
+
| icon2Tooltip | Tooltip for icon2 | ReactElement | - |
|
|
34
39
|
| id | The ID for input | string | |
|
|
35
40
|
| label | Input label | string | - |
|
|
36
41
|
| onChange | Callback when user input | function(e) | |
|
|
37
42
|
| onPressEnter | The callback function that is triggered when Enter key is pressed. | function(e) | |
|
|
38
|
-
| prefix | The prefix icon for the Input. | string
|
|
43
|
+
| prefix | The prefix icon for the Input. | string\|ReactNode | |
|
|
44
|
+
| prefixel | Attached left addon block (height matched to input height) | ReactNode | - |
|
|
39
45
|
| resetMargin | Whether input should have margin reset | boolean | - |
|
|
40
|
-
| resize | 'resize' CSS property passed to the input component | `none` / `both` / `horizontal` / `vertical` / `initial` / `inherit` | - |
|
|
41
46
|
| size | The size of the input box. Note: in the context of a form, the `large` size is used. Available: `large` `default` `small` | string | `default` |
|
|
42
|
-
| suffix | The suffix icon for the Input. | string
|
|
47
|
+
| suffix | The suffix icon for the Input. | string\|ReactNode | |
|
|
48
|
+
| suffixel | Attached right addon block (height matched to input height) | ReactNode | - |
|
|
43
49
|
| tooltip | Tooltip content | ReactNode | - |
|
|
44
50
|
| tooltipConfig | Config of tooltip | [TooltipProps](https://design.synerise.com/docs/components/tooltip#api) | - |
|
|
45
51
|
| type | The type of input, see: [MDN](https://developer.mozilla.org/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types)(use `Input.TextArea` instead of `type="textarea"`) | string | `text` |
|
|
46
52
|
| value | The input content value | string | |
|
|
47
53
|
| autoResize | 'resize' width of the input based on width of the text in input | AutoResizeProp (see below) | `undefined` |
|
|
54
|
+
| autoResizeProps | Fine-tuning options for autoResize: `placeholderIsMinWidth`, `wrapperClassName`, `wrapperStyle`, `extraWidth` | `Partial<AutosizeInputProps>` | - |
|
|
48
55
|
|
|
49
56
|
#### AutoResizeProp
|
|
50
57
|
|
|
51
58
|
```
|
|
52
|
-
type AutoResizeProp =
|
|
59
|
+
type AutoResizeProp = boolean | {
|
|
53
60
|
minWidth: string;
|
|
54
61
|
maxWidth?: string;
|
|
55
62
|
stretchToFit?: boolean
|
|
56
63
|
};
|
|
57
64
|
```
|
|
58
65
|
|
|
59
|
-
Setting `stretchToFit: true` will make the field stretch to fit the containing element. The component observes the width of the wrapper and adjusts the maxWidth accordingly.
|
|
66
|
+
Setting `stretchToFit: true` will make the field stretch to fit the containing element. The component observes the width of the wrapper and adjusts the maxWidth accordingly.
|
|
60
67
|
**Important** if the Input is within a flex-item then there is necessary CSS that needs to be applied to the flex-item containers in order for the flex-item to grow to fill the allowed space, but at the same time not stretch the flex container (identical issue happens when text-overflow needs to happen inside a flex-item).
|
|
61
68
|
|
|
62
69
|
```css
|
|
@@ -70,17 +77,72 @@ See https://css-tricks.com/flexbox-truncated-text/ for more details.
|
|
|
70
77
|
|
|
71
78
|
### InputGroup
|
|
72
79
|
|
|
73
|
-
| Property
|
|
74
|
-
|
|
|
75
|
-
| compact
|
|
76
|
-
| size
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
|
81
|
-
|
|
|
82
|
-
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
|
80
|
+
| Property | Description | Type | Default |
|
|
81
|
+
| ------------- | ------------------------------------------------------------------------------------------------------- | ------------ | --------- |
|
|
82
|
+
| compact | Whether use compact style | boolean | `false` |
|
|
83
|
+
| size | The size of Input.Group specifies the size of the included Input fields. Available: large default small | string | `default` |
|
|
84
|
+
| errors | Array of error messages displayed below the group | string[] | - |
|
|
85
|
+
| resetMargin | Whether input group should have margin reset | boolean | - |
|
|
86
|
+
| label | Group label | ReactNode | - |
|
|
87
|
+
| description | Helper text below the group | string | - |
|
|
88
|
+
| tooltip | Tooltip content on the label | ReactNode | - |
|
|
89
|
+
| tooltipConfig | Config of tooltip | TooltipProps | - |
|
|
90
|
+
|
|
91
|
+
### TextArea
|
|
92
|
+
|
|
93
|
+
| Property | Description | Type | Default |
|
|
94
|
+
| ------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------- | ------- |
|
|
95
|
+
| autoSize | Autosizing the height to fit the content | `{ minRows: number; maxRows: number; }` | - |
|
|
96
|
+
| counterLimit | Maximum input length, if provided counter will be shown | number | - |
|
|
97
|
+
| renderCustomCounter | Render function to display custom char counter | `(count?: number) => ReactNode` | - |
|
|
98
|
+
| description | Helper text below the textarea | string | - |
|
|
99
|
+
| errorText | Error message, if provided textarea will be set in error state | string\|ReactNode | - |
|
|
100
|
+
| error | If provided textarea will be set in error state, without error message | boolean | - |
|
|
101
|
+
| handleInputRef | Callback receiving a ref to the underlying `<textarea>` element | `(ref: MutableRefObject<HTMLTextAreaElement \| null>) => void` | - |
|
|
102
|
+
| icon1 | Left action icon rendered inside the textarea (right side) | ReactElement | - |
|
|
103
|
+
| icon1Tooltip | Tooltip for icon1 | ReactElement | - |
|
|
104
|
+
| icon2 | Second action icon | ReactElement | - |
|
|
105
|
+
| icon2Tooltip | Tooltip for icon2 | ReactElement | - |
|
|
106
|
+
| label | Field label | ReactNode | - |
|
|
107
|
+
| prefixel | Attached left addon block | ReactNode | - |
|
|
108
|
+
| resize | 'resize' CSS property passed to the textarea component | `none` / `both` / `horizontal` / `vertical` / `initial` / `inherit` | - |
|
|
109
|
+
| resetMargin | Whether textarea should have margin reset | boolean | - |
|
|
110
|
+
| suffixel | Attached right addon block | ReactNode | - |
|
|
111
|
+
| tooltip | Tooltip content on the label | ReactNode | - |
|
|
112
|
+
| tooltipConfig | Config of tooltip | TooltipProps | - |
|
|
113
|
+
| wrapperStyle | CSS properties passed to the textarea component wrapper | `React.CSSProperties` | - |
|
|
114
|
+
|
|
115
|
+
### PasswordInput
|
|
116
|
+
|
|
117
|
+
Wraps `Input` with a show/hide password toggle. All `InputProps` are accepted except `icon1`, `icon1Tooltip`, `icon2`, `icon2Tooltip`, `suffixel`, `prefixel`, `type`, and `expandableTooltip`.
|
|
118
|
+
|
|
119
|
+
| Property | Description | Type | Default |
|
|
120
|
+
| -------- | -------------------------------- | ----------------------------- | ------- |
|
|
121
|
+
| texts | Override show/hide label strings | `Partial<PasswordInputTexts>` | - |
|
|
122
|
+
|
|
123
|
+
`PasswordInputTexts`:
|
|
124
|
+
|
|
125
|
+
| Property | Description | Type |
|
|
126
|
+
| -------- | ----------------------- | --------- |
|
|
127
|
+
| showText | Label for "show" button | ReactNode |
|
|
128
|
+
| hideText | Label for "hide" button | ReactNode |
|
|
129
|
+
|
|
130
|
+
Default strings come from `react-intl` (`DS.INPUT.SHOW-PASSWORD` / `DS.INPUT.HIDE-PASSWORD`).
|
|
131
|
+
|
|
132
|
+
### InputMultivalue
|
|
133
|
+
|
|
134
|
+
Tag-style input that accumulates string values. Press **Enter** to add the current text as a new tag. Tags can be individually removed.
|
|
135
|
+
|
|
136
|
+
| Property | Description | Type | Default |
|
|
137
|
+
| ----------- | ------------------------------------------------------------------------ | ---------------------------- | ------- |
|
|
138
|
+
| values | **Required.** Array of current tag values | string[] | - |
|
|
139
|
+
| onChange | Called with the updated values array when a tag is added or removed | `(values: string[]) => void` | - |
|
|
140
|
+
| error | Sets error styling | boolean | - |
|
|
141
|
+
| errorText | Error message | ReactNode\|string | - |
|
|
142
|
+
| label | Field label | ReactNode\|string | - |
|
|
143
|
+
| description | Helper text | ReactNode\|string | - |
|
|
144
|
+
| disabled | Disables interaction | boolean | - |
|
|
145
|
+
| onBlur | Called on blur | `() => void` | - |
|
|
146
|
+
| onFocus | Called on focus | `() => void` | - |
|
|
147
|
+
| maxLength | Max length of the current entry being typed (not the total values count) | number | - |
|
|
148
|
+
| className | Applied to the input wrapper | string | - |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-input",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.9",
|
|
4
4
|
"description": "Input UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "synerise/synerise-design",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"types": "dist/index.d.ts",
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@floating-ui/react": "^0.27.16",
|
|
39
|
-
"@synerise/ds-form-field": "^1.3.
|
|
40
|
-
"@synerise/ds-icon": "^1.
|
|
41
|
-
"@synerise/ds-scrollbar": "^1.2.
|
|
42
|
-
"@synerise/ds-tooltip": "^1.4.
|
|
43
|
-
"@synerise/ds-utils": "^1.
|
|
39
|
+
"@synerise/ds-form-field": "^1.3.9",
|
|
40
|
+
"@synerise/ds-icon": "^1.15.0",
|
|
41
|
+
"@synerise/ds-scrollbar": "^1.2.16",
|
|
42
|
+
"@synerise/ds-tooltip": "^1.4.9",
|
|
43
|
+
"@synerise/ds-utils": "^1.7.0",
|
|
44
44
|
"classnames": "^2.3.2",
|
|
45
45
|
"csstype": "^2.6.9",
|
|
46
46
|
"uuid": "^8.3.2"
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"react-intl": ">= 3.12.0 <= 6.8",
|
|
56
56
|
"styled-components": "^5.3.3"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "8efc031fa688c0b87c7b3915bae93546bb63bcac"
|
|
59
59
|
}
|