@synerise/ds-input 1.7.12 → 1.7.14
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 +10 -0
- package/CLAUDE.md +309 -0
- package/dist/InputGroup.styles.js +11 -1
- package/package.json +8 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
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.7.14](https://github.com/synerise/synerise-design/compare/@synerise/ds-input@1.7.13...@synerise/ds-input@1.7.14) (2026-07-24)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **input:** square ds-select corners inside a compact InputGroup ([08cb58c](https://github.com/synerise/synerise-design/commit/08cb58cd7977702c1e31b88c6690db6a7362b5a5))
|
|
11
|
+
|
|
12
|
+
## [1.7.13](https://github.com/synerise/synerise-design/compare/@synerise/ds-input@1.7.12...@synerise/ds-input@1.7.13) (2026-07-23)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @synerise/ds-input
|
|
15
|
+
|
|
6
16
|
## [1.7.12](https://github.com/synerise/synerise-design/compare/@synerise/ds-input@1.7.11...@synerise/ds-input@1.7.12) (2026-07-09)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package @synerise/ds-input
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
# Input (`@synerise/ds-input`)
|
|
2
|
+
|
|
3
|
+
> A family of enhanced input components — text input, textarea, password, multi-value tags, and auto-sizing — each wrapped in a `FormField` shell that adds label, description, error text, counter, and tooltip.
|
|
4
|
+
|
|
5
|
+
## Package structure
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
src/
|
|
9
|
+
Input.tsx — main enhanced input (forwardRef to outer div)
|
|
10
|
+
Input.types.ts — BaseProps, InputProps, AutoResizeProp, StyledInput
|
|
11
|
+
Input.styles.tsx — all styled-components; also exports as InputStyles namespace
|
|
12
|
+
TextArea.tsx — enhanced textarea (FormField wrapper)
|
|
13
|
+
TextArea.types.ts — TextareaProps
|
|
14
|
+
Textarea/
|
|
15
|
+
Textarea.tsx — DSRawTextArea styled component (inner implementation)
|
|
16
|
+
Textarea.types.ts — RawTextAreaProps (TextAreaProps is @deprecated alias)
|
|
17
|
+
Textarea.styles.ts — textarea styled-components
|
|
18
|
+
InputGroup.tsx — group wrapper for multiple inputs
|
|
19
|
+
InputGroup.types.ts — Props (extends Ant GroupProps)
|
|
20
|
+
InputMultivalue/
|
|
21
|
+
InputMultivalue.tsx — tag-style multi-value input; Enter to add values
|
|
22
|
+
InputMultivalue.types.ts — InputMultivalueProps
|
|
23
|
+
Elements/Value.tsx — individual tag chip with remove button
|
|
24
|
+
PasswordInput.tsx — wraps Input with show/hide toggle (uses icon1 slot)
|
|
25
|
+
PasswordInput.types.tsx — PasswordInputProps, PasswordInputTexts
|
|
26
|
+
AutosizeInput/
|
|
27
|
+
AutosizeInput.tsx — standalone auto-resizing <input> (not Ant Design based)
|
|
28
|
+
AutosizeInput.types.ts — AutosizeInputProps, AutosizeWrapperProps, AutosizeInputRefType
|
|
29
|
+
utils/calculateInputWidth.ts
|
|
30
|
+
components/
|
|
31
|
+
AutosizeWrapper.tsx — conditionally wraps input with autosize behaviour
|
|
32
|
+
ElementIcons.tsx — renders icon1/icon2 with Tooltip wrappers and expand icon
|
|
33
|
+
ExpandableWrapper.tsx — expandable textarea overlay shown when input text overflows
|
|
34
|
+
hooks/
|
|
35
|
+
useCounterLimit.tsx — generates the counter display ReactNode (rightSide slot)
|
|
36
|
+
useElementFocus.ts — returns focus handler for icon click
|
|
37
|
+
useInputAddonHeight.ts — measures input height for matching addon/prefixel height
|
|
38
|
+
utils/getCharCount.ts — counts characters from controlled value
|
|
39
|
+
index.ts — public exports
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Public exports
|
|
43
|
+
|
|
44
|
+
### `Input`
|
|
45
|
+
|
|
46
|
+
Enhanced text input with `FormField` wrapper. `forwardRef<HTMLDivElement, InputProps>` — **ref points to the outer wrapper `<div>`, not the `<input>` element**. Use `handleInputRef` to access the underlying `HTMLInputElement`.
|
|
47
|
+
|
|
48
|
+
Props (`InputProps` = `BaseProps & AntdInputProps`):
|
|
49
|
+
|
|
50
|
+
#### DS-specific props (`BaseProps`)
|
|
51
|
+
|
|
52
|
+
| Prop | Type | Default | Description |
|
|
53
|
+
|------|------|---------|-------------|
|
|
54
|
+
| `label` | `ReactNode` | — | Field label (from `FormFieldCommonProps`) |
|
|
55
|
+
| `description` | `string` | — | Helper text below the input |
|
|
56
|
+
| `errorText` | `string` | — | Error message; also sets error styling |
|
|
57
|
+
| `error` | `boolean` | — | Sets error styling without a message |
|
|
58
|
+
| `tooltip` | `ReactNode` | — | Tooltip content on the label |
|
|
59
|
+
| `tooltipConfig` | `TooltipProps` | — | Tooltip configuration object |
|
|
60
|
+
| `counterLimit` | `number` | — | Max chars; shows `current/max` counter; blocks input at limit |
|
|
61
|
+
| `renderCustomCounter` | `(count?: number) => ReactNode` | — | Custom counter renderer (replaces default `current/max`) |
|
|
62
|
+
| `icon1` | `ReactElement` | — | Left action icon (inside the input, right side) |
|
|
63
|
+
| `icon1Tooltip` | `ReactElement` | — | Tooltip for `icon1` |
|
|
64
|
+
| `icon2` | `ReactElement` | — | Second action icon (stacks with `icon1`) |
|
|
65
|
+
| `icon2Tooltip` | `ReactElement` | — | Tooltip for `icon2` |
|
|
66
|
+
| `prefixel` | `ReactNode` | — | Attached left addon block (rendered via `addonBefore`; height matched to input) |
|
|
67
|
+
| `suffixel` | `ReactNode` | — | Attached right addon block (rendered via `addonAfter`; height matched to input) |
|
|
68
|
+
| `handleInputRef` | `(ref: MutableRefObject<HTMLInputElement \| null>) => void` | — | Callback receiving the underlying `<input>` ref after mount |
|
|
69
|
+
| `resetMargin` | `boolean` | — | Removes outer wrapper margin |
|
|
70
|
+
| `expandable` | `boolean` | — | Shows expand icon when text overflows; click opens a textarea overlay |
|
|
71
|
+
| `expandableTooltip` | `ReactNode` | — | Tooltip on the expand icon |
|
|
72
|
+
| `autoResize` | `AutoResizeProp` | — | Auto-sizes input width to its text content |
|
|
73
|
+
| `autoResizeProps` | `Partial<Pick<AutosizeInputProps, 'placeholderIsMinWidth' \| 'wrapperClassName' \| 'wrapperStyle' \| 'extraWidth'>>` | — | Fine-tuning for `autoResize` behaviour |
|
|
74
|
+
| `className` | `string` | — | Applied to the outer wrapper |
|
|
75
|
+
|
|
76
|
+
All standard Ant Design `InputProps` are also accepted and forwarded (e.g. `value`, `onChange`, `disabled`, `size`, `prefix`, `suffix`, `addonBefore`, `addonAfter`, `allowClear`, `defaultValue`, `type`, `onPressEnter`, etc.).
|
|
77
|
+
|
|
78
|
+
#### `AutoResizeProp`
|
|
79
|
+
|
|
80
|
+
```ts
|
|
81
|
+
type AutoResizeProp =
|
|
82
|
+
| boolean
|
|
83
|
+
| { minWidth: string; maxWidth?: string; stretchToFit?: boolean };
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
`stretchToFit: true` makes the input fill its containing element. **Important**: the flex parent must have `min-width: 0; flex-grow: 1` applied to work correctly.
|
|
87
|
+
|
|
88
|
+
### `RawInput`
|
|
89
|
+
|
|
90
|
+
Bare Ant Design `Input` that adds the DS `error` CSS class. No `FormField` wrapper, no label/description/counter.
|
|
91
|
+
|
|
92
|
+
```tsx
|
|
93
|
+
export const RawInput = (props: InputProps) => (
|
|
94
|
+
<S.AntdInput className={props.error ? 'error' : ''} {..props} />
|
|
95
|
+
);
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### `TextArea`
|
|
99
|
+
|
|
100
|
+
Enhanced textarea with `FormField` wrapper. Same label/description/error/counter/icon features as `Input`. Does **not** support `expandable`, `expandableTooltip`, `autoResize`, or `autoResizeProps` (these are omitted from `TextareaProps`).
|
|
101
|
+
|
|
102
|
+
`TextareaProps` = `RawTextAreaProps & Omit<BaseProps<HTMLTextAreaElement>, 'expandable' | 'expandableTooltip' | 'autoResize' | 'autoResizeProps'>`
|
|
103
|
+
|
|
104
|
+
`RawTextAreaProps` = Ant Design `TextAreaProps` + `error?: boolean`, `errorText?: string | ReactNode`, `wrapperStyle?: CSSProperties`, `resize?: ResizeProperty`
|
|
105
|
+
|
|
106
|
+
### `RawTextArea`
|
|
107
|
+
|
|
108
|
+
Styled Ant Design `TextArea` component (exported from `Input.styles.tsx`). No FormField wrapper.
|
|
109
|
+
|
|
110
|
+
### `DSRawTextArea`
|
|
111
|
+
|
|
112
|
+
The inner `Textarea/Textarea.tsx` raw DS textarea. Same API as `RawTextAreaProps`.
|
|
113
|
+
|
|
114
|
+
### `InputGroup`
|
|
115
|
+
|
|
116
|
+
Wraps Ant Design `Input.Group` with `FormField` support. Uses the standard `FormFieldCommonProps.errorText` for its error message. Children are each wrapped in a `ds-input-group-item` div.
|
|
117
|
+
|
|
118
|
+
Props (`Props` = `FormFieldCommonProps` + the below):
|
|
119
|
+
|
|
120
|
+
| Prop | Type | Default | Description |
|
|
121
|
+
|------|------|---------|-------------|
|
|
122
|
+
| `compact` | `boolean` | `false` | Compact adjacent inputs (removes borders between them) |
|
|
123
|
+
| `growItem` | `'first' \| 'last'` | `'last'` | Which item stretches to fill the row (others keep natural width). `'last'` = trailing control grows (e.g. fixed-width Select left, input fills right). `'first'` = flipped: leading input grows, fixed-width trailing control (e.g. ColorPicker) stays compact right. |
|
|
124
|
+
| `size` | `'large' \| 'default' \| 'small'` | `'default'` | Applied to the Ant `Input.Group` |
|
|
125
|
+
| `errorText` | `ReactNode` | — | Error message displayed below the group (from `FormFieldCommonProps`) |
|
|
126
|
+
| `errors` | `string[]` | — | **@deprecated** — use `errorText`. Antd-proprietary array of error strings (each rendered as its own `ErrorText` line); ignored when `errorText` is provided |
|
|
127
|
+
| `resetMargin` | `boolean` | — | Removes outer wrapper margin |
|
|
128
|
+
| `label` | `ReactNode` | — | Group label |
|
|
129
|
+
| `description` | `string` | — | Helper text |
|
|
130
|
+
| `tooltip` | `ReactNode` | — | Tooltip on label |
|
|
131
|
+
| `tooltipConfig` | `TooltipProps` | — | Tooltip configuration |
|
|
132
|
+
|
|
133
|
+
### `InputMultivalue`
|
|
134
|
+
|
|
135
|
+
Tag-style input that accumulates values. Press **Enter** to add the current text as a new tag. Tags can be individually removed.
|
|
136
|
+
|
|
137
|
+
**Semi-controlled bug**: `selectedValues` state is initialised from the `values` prop on first render only. External changes to `values` after mount do **not** update the internal state.
|
|
138
|
+
|
|
139
|
+
Props (`InputMultivalueProps`):
|
|
140
|
+
|
|
141
|
+
| Prop | Type | Default | Description |
|
|
142
|
+
|------|------|---------|-------------|
|
|
143
|
+
| `values` | `string[]` | — | **Required.** Initial set of tag values |
|
|
144
|
+
| `onChange` | `(values: string[]) => void` | — | Called with the updated values array |
|
|
145
|
+
| `error` | `boolean` | — | Sets error styling |
|
|
146
|
+
| `errorText` | `ReactNode \| string` | — | Error message |
|
|
147
|
+
| `label` | `ReactNode \| string` | — | Field label |
|
|
148
|
+
| `description` | `ReactNode \| string` | — | Helper text |
|
|
149
|
+
| `disabled` | `boolean` | — | Disables interaction |
|
|
150
|
+
| `onBlur` | `() => void` | — | Called on blur |
|
|
151
|
+
| `onFocus` | `() => void` | — | Called on focus |
|
|
152
|
+
| `maxLength` | `number` | — | Max length of the current entry (not the total values count) |
|
|
153
|
+
| `className` | `string` | — | Applied to the input wrapper |
|
|
154
|
+
|
|
155
|
+
### `PasswordInput`
|
|
156
|
+
|
|
157
|
+
Wraps `Input` with a show/hide password toggle in the `icon1` slot. Accepts all `InputProps` except `icon1`, `icon1Tooltip`, `icon2`, `icon2Tooltip`, `suffixel`, `prefixel`, `type`, and `expandableTooltip`.
|
|
158
|
+
|
|
159
|
+
Additional prop: `texts?: Partial<PasswordInputTexts>` to override show/hide label strings. Defaults come from `react-intl` (`DS.INPUT.SHOW-PASSWORD` / `DS.INPUT.HIDE-PASSWORD`).
|
|
160
|
+
|
|
161
|
+
### `AutosizeInput`
|
|
162
|
+
|
|
163
|
+
Standalone auto-resizing `<input>` (not Ant Design based). Renders a hidden sizer element to measure text width and adjusts the input accordingly.
|
|
164
|
+
|
|
165
|
+
Props (`AutosizeInputProps`): Extends `InputHTMLAttributes<HTMLInputElement>` (omitting `size`) plus:
|
|
166
|
+
|
|
167
|
+
| Prop | Type | Description |
|
|
168
|
+
|------|------|-------------|
|
|
169
|
+
| `children` | `ReactNode` | **Required.** The actual `<input>` element to resize |
|
|
170
|
+
| `placeholderIsMinWidth` | `boolean` | Use placeholder width as minimum width |
|
|
171
|
+
| `wrapperClassName` | `string` | Class on the wrapper div |
|
|
172
|
+
| `wrapperStyle` | `CSSProperties` | Style on the wrapper div |
|
|
173
|
+
| `extraWidth` | `number \| string` | Extra pixels added to the calculated width |
|
|
174
|
+
| `minWidth` | `number \| string` | Minimum width override |
|
|
175
|
+
| `onAutosize` | `(newWidth: number) => void` | Called after resize |
|
|
176
|
+
| `preAutosize` | `(newWidth: number) => void` | Called before resize |
|
|
177
|
+
|
|
178
|
+
`AutosizeInputRefType` (from `useImperativeHandle`):
|
|
179
|
+
|
|
180
|
+
```ts
|
|
181
|
+
{
|
|
182
|
+
inputRef: MutableRefObject<HTMLInputElement | null>;
|
|
183
|
+
sizerRef: RefObject<HTMLDivElement>;
|
|
184
|
+
wrapperRef: RefObject<HTMLDivElement>;
|
|
185
|
+
inputWrapperRef: RefObject<HTMLElement>;
|
|
186
|
+
placeholderSizerRef: RefObject<HTMLDivElement>;
|
|
187
|
+
copyInputStyles: () => void;
|
|
188
|
+
updateInputWidth: () => void;
|
|
189
|
+
}
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### `AutosizeWrapper`
|
|
193
|
+
|
|
194
|
+
Conditionally applies `AutosizeInput` behaviour when `autoResize` is truthy. Used internally by `Input`.
|
|
195
|
+
|
|
196
|
+
### `Label` _(deprecated)_
|
|
197
|
+
|
|
198
|
+
Re-export of `FormFieldLabel` from `@synerise/ds-form-field`. **Import directly from `@synerise/ds-form-field` instead.**
|
|
199
|
+
|
|
200
|
+
### `InputStyles`
|
|
201
|
+
|
|
202
|
+
Namespace export of all styled-components from `Input.styles.tsx`. Useful for extending via `styled(InputStyles.OuterWrapper)`.
|
|
203
|
+
|
|
204
|
+
### Types exported
|
|
205
|
+
|
|
206
|
+
| Export | Description |
|
|
207
|
+
|--------|-------------|
|
|
208
|
+
| `InputProps` | Main input props (`BaseProps & AntdInputProps`) |
|
|
209
|
+
| `BaseProps` | DS-specific additions to Ant inputs |
|
|
210
|
+
| `AutoResizeProp` | `boolean \| { minWidth, maxWidth?, stretchToFit? }` |
|
|
211
|
+
| `TextareaProps` | Enhanced textarea props |
|
|
212
|
+
| `InputMultivalueProps` | Multi-value tag input props |
|
|
213
|
+
| `AutosizeInputProps` | Standalone autosize input props |
|
|
214
|
+
| `AutosizeWrapperProps` | Autosize wrapper props |
|
|
215
|
+
| `AutosizeInputRefType` | Imperative ref shape for `AutosizeInput` |
|
|
216
|
+
| `PasswordInputProps` | Password input props |
|
|
217
|
+
| `PasswordInputTexts` | Show/hide text labels |
|
|
218
|
+
| `StyledInput` | Helper type for styled-component extensions of `Input` |
|
|
219
|
+
| `EnhancedProps` | **@deprecated** — use `InputProps` or `TextareaProps` |
|
|
220
|
+
| `Props` (from Input.types) | **@deprecated** — use `InputProps` or `TextareaProps` |
|
|
221
|
+
|
|
222
|
+
## Usage patterns
|
|
223
|
+
|
|
224
|
+
```tsx
|
|
225
|
+
import { Input, TextArea, InputGroup, InputMultivalue, PasswordInput } from '@synerise/ds-input';
|
|
226
|
+
|
|
227
|
+
// Basic input with label and counter
|
|
228
|
+
<Input
|
|
229
|
+
label="Email"
|
|
230
|
+
value={value}
|
|
231
|
+
onChange={e => setValue(e.target.value)}
|
|
232
|
+
counterLimit={100}
|
|
233
|
+
errorText={error}
|
|
234
|
+
/>
|
|
235
|
+
|
|
236
|
+
// Password input
|
|
237
|
+
<PasswordInput
|
|
238
|
+
label="Password"
|
|
239
|
+
value={password}
|
|
240
|
+
onChange={e => setPassword(e.target.value)}
|
|
241
|
+
/>
|
|
242
|
+
|
|
243
|
+
// Multi-value tags
|
|
244
|
+
<InputMultivalue
|
|
245
|
+
label="Tags"
|
|
246
|
+
values={tags}
|
|
247
|
+
onChange={setTags}
|
|
248
|
+
/>
|
|
249
|
+
|
|
250
|
+
// Auto-resizing input
|
|
251
|
+
<Input
|
|
252
|
+
value={value}
|
|
253
|
+
onChange={e => setValue(e.target.value)}
|
|
254
|
+
autoResize={{ minWidth: '80px', maxWidth: '400px' }}
|
|
255
|
+
/>
|
|
256
|
+
|
|
257
|
+
// Input with left/right addon blocks
|
|
258
|
+
<Input
|
|
259
|
+
value={value}
|
|
260
|
+
onChange={e => setValue(e.target.value)}
|
|
261
|
+
prefixel={<span>https://</span>}
|
|
262
|
+
suffixel={<span>.com</span>}
|
|
263
|
+
/>
|
|
264
|
+
|
|
265
|
+
// Group of inputs
|
|
266
|
+
<InputGroup label="Address" errorText={error} compact>
|
|
267
|
+
<Input placeholder="Street" />
|
|
268
|
+
<Input placeholder="City" />
|
|
269
|
+
</InputGroup>
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
## Custom hooks
|
|
273
|
+
|
|
274
|
+
### `useCounterLimit`
|
|
275
|
+
|
|
276
|
+
Generates the counter `ReactNode` (rendered in `FormField`'s `rightSide` slot). Returns a `<Counter>` element showing `charCount/counterLimit` or the result of `renderCustomCounter`. Returns `undefined` when neither prop is provided.
|
|
277
|
+
|
|
278
|
+
### `useElementFocus`
|
|
279
|
+
|
|
280
|
+
Returns a click handler that calls `.focus()` on the passed ref. Used to focus the input when an icon is clicked.
|
|
281
|
+
|
|
282
|
+
### `useInputAddonHeight`
|
|
283
|
+
|
|
284
|
+
Reads `inputRef.current.input.offsetHeight` after mount and returns `{ inputAddonHeight }`. Used to match the height of `prefixel`/`suffixel` addon blocks to the input.
|
|
285
|
+
|
|
286
|
+
## Styling
|
|
287
|
+
|
|
288
|
+
Styles live in `Input.styles.tsx` using `@synerise/ds-core` theme tokens. Error state is applied via `.error` CSS class on the Ant Design input. Icon padding is calculated dynamically: each icon adds 24 px + 4 px gap via `getIconsWidth`.
|
|
289
|
+
|
|
290
|
+
## Key dependencies
|
|
291
|
+
|
|
292
|
+
- `antd` — `Input`, `Input.Group`, and `TextArea` base components
|
|
293
|
+
- `@synerise/ds-form-field` — `FormField` wrapper providing label, tooltip, description, errorText slots
|
|
294
|
+
- `@floating-ui/react` — `useMergeRefs` for combining forwarded ref with internal wrapper ref
|
|
295
|
+
- `@synerise/ds-utils` — `useResizeObserver` for `stretchToFit` auto-resize
|
|
296
|
+
- `uuid` — generates a stable `id` per instance for `<label htmlFor>` association
|
|
297
|
+
- `react-intl` — default `showText`/`hideText` strings in `PasswordInput`
|
|
298
|
+
|
|
299
|
+
## Implementation notes
|
|
300
|
+
|
|
301
|
+
- **`Input` ref targets the outer `<div>`**, not the `<input>` element. Pass `handleInputRef` to get the `HTMLInputElement` ref.
|
|
302
|
+
- **`counterLimit` blocks input** — the `onChange` handler returns early when the new value would exceed the limit. The underlying Ant `input.maxLength` is **not** used.
|
|
303
|
+
- **`expandable` overlay**: when text overflows, an expand icon appears. Clicking it focuses a `<textarea>` overlay positioned over the input. On blur the textarea collapses and the value is synced back to the hidden input.
|
|
304
|
+
- **`autoResize` and `expandable` together**: `overflown` is computed from `AutosizeInput`'s reported width vs. `minWidth`, enabling the expand icon to appear correctly.
|
|
305
|
+
- **`InputMultivalue` is semi-controlled**: `selectedValues` initialises from `values` on mount only. To reset the values externally, pass a new `key` prop.
|
|
306
|
+
- **`@ts-expect-error`** in `ExpandableWrapper.tsx` for setting `.value` on `TextAreaRef` — the Ant Design type does not expose `.value` directly.
|
|
307
|
+
- **Uses Vitest** for testing.
|
|
308
|
+
- **`Label` re-export is `@deprecated`**: import `FormFieldLabel` from `@synerise/ds-form-field` directly.
|
|
309
|
+
- **`DSRawTextArea`** (`RawTextArea as DSRawTextArea` in `index.ts`) is a second raw textarea export from the inner `Textarea/Textarea.tsx`; it is distinct from `RawTextArea` which comes from `Input.styles.tsx`.
|
|
@@ -3,7 +3,17 @@ const InputGroupItem = /* @__PURE__ */ styled.div.withConfig({
|
|
|
3
3
|
displayName: "InputGroupstyles__InputGroupItem",
|
|
4
4
|
componentId: "sc-1cn2cc5-0"
|
|
5
5
|
})(["min-width:0;"]);
|
|
6
|
-
const CONTROLS = [
|
|
6
|
+
const CONTROLS = [
|
|
7
|
+
"input",
|
|
8
|
+
"textarea",
|
|
9
|
+
"button",
|
|
10
|
+
".ds-input-number",
|
|
11
|
+
".ds-select",
|
|
12
|
+
// DS-native select trigger box (post-antd rewrite)
|
|
13
|
+
".ant-select-selector",
|
|
14
|
+
// legacy antd select, still rendered inside ds-table
|
|
15
|
+
".ds-button"
|
|
16
|
+
];
|
|
7
17
|
const controlsUnder = (itemSelector) => CONTROLS.map((control) => `${itemSelector} ${control}`).join(", ");
|
|
8
18
|
const notLastControls = controlsUnder(`${InputGroupItem}:not(:only-child):not(:last-child)`);
|
|
9
19
|
const lastControls = controlsUnder(`${InputGroupItem}:not(:only-child):last-child`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-input",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.14",
|
|
4
4
|
"description": "Input UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "synerise/synerise-design",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"files": [
|
|
18
18
|
"/dist",
|
|
19
19
|
"CHANGELOG.md",
|
|
20
|
+
"CLAUDE.md",
|
|
20
21
|
"README.md",
|
|
21
22
|
"package.json",
|
|
22
23
|
"LICENSE.md"
|
|
@@ -39,11 +40,11 @@
|
|
|
39
40
|
"types": "dist/index.d.ts",
|
|
40
41
|
"dependencies": {
|
|
41
42
|
"@floating-ui/react": "^0.27.16",
|
|
42
|
-
"@synerise/ds-form-field": "^1.3.
|
|
43
|
-
"@synerise/ds-icon": "^1.18.
|
|
44
|
-
"@synerise/ds-scrollbar": "^1.5.
|
|
45
|
-
"@synerise/ds-tooltip": "^1.5.
|
|
46
|
-
"@synerise/ds-utils": "^1.10.
|
|
43
|
+
"@synerise/ds-form-field": "^1.3.24",
|
|
44
|
+
"@synerise/ds-icon": "^1.18.5",
|
|
45
|
+
"@synerise/ds-scrollbar": "^1.5.2",
|
|
46
|
+
"@synerise/ds-tooltip": "^1.5.4",
|
|
47
|
+
"@synerise/ds-utils": "^1.10.2",
|
|
47
48
|
"classnames": "^2.3.2",
|
|
48
49
|
"csstype": "^2.6.9",
|
|
49
50
|
"uuid": "^8.3.2"
|
|
@@ -58,5 +59,5 @@
|
|
|
58
59
|
"styled-components": "^5.3.3",
|
|
59
60
|
"vitest": "4"
|
|
60
61
|
},
|
|
61
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "018414e0d7ffd102a07f8aa35fa2e2d3d4ed19e2"
|
|
62
63
|
}
|