@synerise/ds-input 2.0.11 → 2.1.0

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,25 @@
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
+ # [2.1.0](https://github.com/synerise/synerise-design/compare/@synerise/ds-input@2.0.12...@synerise/ds-input@2.1.0) (2026-10-29)
7
+
8
+
9
+ ### Features
10
+
11
+ * integrate Token Studio design tokens across the design system ([aabb447](https://github.com/synerise/synerise-design/commit/aabb447edfb2d0c85e3de1f07e809ef84083453b))
12
+
13
+
14
+
15
+
16
+
17
+ ## [2.0.12](https://github.com/synerise/synerise-design/compare/@synerise/ds-input@2.0.11...@synerise/ds-input@2.0.12) (2026-10-28)
18
+
19
+ **Note:** Version bump only for package @synerise/ds-input
20
+
21
+
22
+
23
+
24
+
6
25
  ## [2.0.11](https://github.com/synerise/synerise-design/compare/@synerise/ds-input@2.0.10...@synerise/ds-input@2.0.11) (2026-10-26)
7
26
 
8
27
 
package/CLAUDE.md CHANGED
@@ -103,9 +103,11 @@ Enhanced textarea with `FormField` wrapper. Same label/description/error/counter
103
103
 
104
104
  `RawTextAreaProps` = Ant Design `TextAreaProps` + `error?: boolean`, `errorText?: string | ReactNode`, `wrapperStyle?: CSSProperties`, `resize?: ResizeProperty`
105
105
 
106
- ### `RawTextArea`
106
+ ### `RawTextArea` _(deprecated)_
107
107
 
108
- Styled Ant Design `TextArea` component (exported from `Input.styles.tsx`). No FormField wrapper.
108
+ Bare styled `<textarea>` (`StandaloneRawTextArea` in `Input.styles.tsx`), with no FormField and no
109
+ `.ds-textarea` wrapper; it draws its own `error` surface. Unused in the DS and the portal repos and due for
110
+ removal: use `DSRawTextArea` for a bare DS textarea, or `TextArea` for the FormField version.
109
111
 
110
112
  ### `DSRawTextArea`
111
113
 
@@ -201,6 +203,16 @@ Re-export of `FormFieldLabel` from `@synerise/ds-form-field`. **Import directly
201
203
 
202
204
  Namespace export of all styled-components from `Input.styles.tsx`. Useful for extending via `styled(InputStyles.OuterWrapper)`.
203
205
 
206
+ **Deprecated field-chrome exports** (still imported by portal-ui-bridge via `@synerise/ds-input/dist/Input.styles`). Use `@synerise/ds-form-field` instead:
207
+
208
+ | Export | Replacement in `@synerise/ds-form-field` |
209
+ |---|---|
210
+ | `Label` | `FormFieldLabel`, or `FormField` `label` |
211
+ | `ContentAbove` | `ContentAboveElement` (`label`, `rightSide`), or `FormField` `label` |
212
+ | `ContentBelow` | `ContentBelowElement` (`description`, `errorText`), or `FormField` `description` / `errorText` |
213
+ | `Description` | `ContentBelowElement` / `FormField` `description` |
214
+ | `ErrorText` | `ContentBelowElement` / `FormField` `errorText` (still used internally by `InputGroup`) |
215
+
204
216
  ### Types exported
205
217
 
206
218
  | Export | Description |
@@ -285,7 +297,7 @@ Reads `inputRef.current.input.offsetHeight` after mount and returns `{ inputAddo
285
297
 
286
298
  ## Styling
287
299
 
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`.
300
+ Styles live in `Input.styles.tsx` using `var(--ds-*)` tokens (mainly the shared `--ds-form-field-*` set). Error state is applied via the `error` styled prop (`errorInputStyle`: `--ds-form-field-border-validated` / `--ds-form-field-bg-validated`). Icon padding is calculated dynamically: each icon adds 24 px + 4 px gap via `getIconsWidth`.
289
301
 
290
302
  ## Key dependencies
291
303
 
@@ -59,16 +59,41 @@ export declare const RawTextArea: import('styled-components').StyledComponent<Re
59
59
  } & React.RefAttributes<HTMLTextAreaElement>>, any, {
60
60
  error?: boolean;
61
61
  }, never>;
62
+ /**
63
+ * @deprecated Backs the deprecated public `RawTextArea` export, which has no .ds-textarea wrapper and so
64
+ * draws its own error surface. Use `DSRawTextArea` or `TextArea`.
65
+ */
66
+ export declare const StandaloneRawTextArea: import('styled-components').StyledComponent<React.ForwardRefExoticComponent<React.TextareaHTMLAttributes<HTMLTextAreaElement> & {
67
+ error?: boolean;
68
+ } & React.RefAttributes<HTMLTextAreaElement>>, any, {
69
+ error?: boolean;
70
+ }, never>;
62
71
  export declare const ExpandableWrapper: import('styled-components').StyledComponent<"div", any, {
63
72
  expanded: boolean;
64
73
  }, never>;
74
+ /**
75
+ * @deprecated Use `ContentBelowElement` (`description`, `errorText`) from `@synerise/ds-form-field`,
76
+ * or the `description` / `errorText` props of its `FormField`.
77
+ */
65
78
  export declare const ContentBelow: import('styled-components').StyledComponent<"div", any, {}, never>;
79
+ /**
80
+ * @deprecated Use `ContentBelowElement` with `errorText` from `@synerise/ds-form-field`,
81
+ * or the `errorText` prop of its `FormField`.
82
+ */
66
83
  export declare const ErrorText: import('styled-components').StyledComponent<"div", any, {}, never>;
84
+ /**
85
+ * @deprecated Use `FormFieldLabel` from `@synerise/ds-form-field`, or the `label` prop of its `FormField`.
86
+ */
67
87
  export declare const Label: import('styled-components').StyledComponent<"label", any, {}, never>;
68
88
  export declare const Counter: import('styled-components').StyledComponent<"div", any, {}, never>;
89
+ /**
90
+ * @deprecated Use `ContentBelowElement` with `description` from `@synerise/ds-form-field`,
91
+ * or the `description` prop of its `FormField`.
92
+ */
69
93
  export declare const Description: import('styled-components').StyledComponent<"div", any, {}, never>;
94
+ /**
95
+ * @deprecated Use `ContentAboveElement` (`label`, `rightSide`) from `@synerise/ds-form-field`,
96
+ * or the `label` prop of its `FormField`.
97
+ */
70
98
  export declare const ContentAbove: import('styled-components').StyledComponent<"div", any, {}, never>;
71
- export declare const AddonWrapper: import('styled-components').StyledComponent<"div", any, {
72
- height: number;
73
- }, never>;
74
99
  export {};
@@ -2,11 +2,11 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
3
  import styled, { css } from "styled-components";
4
4
  import { TextareaWrapper } from "./Textarea/Textarea.styles.js";
5
- const errorInputStyle = (props) => `
5
+ const errorInputStyle = () => `
6
6
  &&& {
7
- border-color: ${props.theme.palette["red-600"]};
8
- box-shadow: inset 0 0 0 1px ${props.theme.palette["red-600"]};
9
- background: ${props.theme.palette["red-050"]};
7
+ border-color: var(--ds-form-field-border-validated);
8
+ box-shadow: inset 0 0 0 1px var(--ds-form-field-border-validated);
9
+ background: var(--ds-form-field-bg-validated);
10
10
  }
11
11
  `;
12
12
  const INPUT_PADDING = 12;
@@ -43,14 +43,14 @@ const InputWrapper = /* @__PURE__ */ styled.div.withConfig({
43
43
  const OuterWrapper = /* @__PURE__ */ styled.div.withConfig({
44
44
  displayName: "Inputstyles__OuterWrapper",
45
45
  componentId: "sc-dc57an-2"
46
- })(["margin:", ";&.active{&&{input{box-shadow:inset 0 0 0 1px ", ";border-color:", ";background-color:", ";}}}input{", "}", ""], (props) => props.resetMargin ? "0" : "0 0 16px 0", (props) => props.theme.palette["blue-600"], (props) => props.theme.palette["blue-600"], (props) => props.theme.palette["blue-050"], (props) => autoresizeConfObjToCss(props), (props) => props.autoResize && `
46
+ })(["margin:", ";&.active{&&{input{box-shadow:inset 0 0 0 1px var(--ds-form-field-border-focus);border-color:var(--ds-form-field-border-focus);background-color:var(--ds-form-field-bg-focus);}}}input{", "}", ""], (props) => props.resetMargin ? "0" : "0 0 16px 0", (props) => autoresizeConfObjToCss(props), (props) => props.autoResize && `
47
47
  ${InputWrapper} {
48
48
  display: inline-block;
49
49
  }`);
50
50
  const IconsWrapper = /* @__PURE__ */ styled.div.withConfig({
51
51
  displayName: "Inputstyles__IconsWrapper",
52
52
  componentId: "sc-dc57an-3"
53
- })(["position:absolute;right:8px;top:0;z-index:2;height:100%;.icon{svg{transition:0.3s all;fill:", ";opacity:", ";}}"], (props) => props.theme.palette["grey-600"], (props) => props.disabled ? "0.4" : "");
53
+ })(["position:absolute;right:8px;top:0;z-index:2;height:100%;color:var(--ds-form-icon-color-default);.icon{transition:0.3s all;opacity:", ";}"], (props) => props.disabled ? "var(--ds-opacity-disabled)" : "");
54
54
  const IconsFlexContainer = /* @__PURE__ */ styled.div.withConfig({
55
55
  displayName: "Inputstyles__IconsFlexContainer",
56
56
  componentId: "sc-dc57an-4"
@@ -63,7 +63,7 @@ const IconsFlexContainer = /* @__PURE__ */ styled.div.withConfig({
63
63
  const IconWrapper = /* @__PURE__ */ styled.div.withConfig({
64
64
  displayName: "Inputstyles__IconWrapper",
65
65
  componentId: "sc-dc57an-5"
66
- })([".icon:hover{svg{fill:", ";cursor:pointer;}}"], (props) => props.theme.palette["blue-600"]);
66
+ })([".icon:hover{color:var(--ds-color-icon-brand-default);cursor:pointer;}"]);
67
67
  const NativeInput = /* @__PURE__ */ styled(forwardRef(({
68
68
  error,
69
69
  autoResize,
@@ -75,17 +75,17 @@ const NativeInput = /* @__PURE__ */ styled(forwardRef(({
75
75
  }, ref) => /* @__PURE__ */ jsx("input", { autoComplete: "off", ...props, ref }))).withConfig({
76
76
  displayName: "Inputstyles__NativeInput",
77
77
  componentId: "sc-dc57an-6"
78
- })(["box-sizing:", ";width:100%;", " margin:0;padding:7px ", "px;", " color:", ";background-color:", ";border:", "px solid ", ";border-radius:3px;font-family:inherit;font-size:13px;outline:0;grid-area:1 / 1;transition:all 0.3s,width 0ms,min-width 0ms,max-width 0ms;", " ", " &::placeholder{color:", ";line-height:1.29;}&:hover:not(:disabled){border-color:", ";}&:focus{box-shadow:inset 0 0 0 1px ", ";border-color:", ";background-color:", ";}&:disabled{cursor:not-allowed;background-color:", ";}", ";", ";", ""], (props) => props.autoResize ? "content-box" : "border-box", (props) => props.autoResize ? `height: ${props.$size === "large" ? "32" : "16"}px;` : `height: ${props.$size === "large" ? "48" : "32"}px;`, INPUT_PADDING, (props) => props.$hasInnerPrefix && "padding-left: 32px;", (props) => props.disabled ? props.theme.palette["grey-400"] : props.theme.palette["grey-700"], (props) => props.theme.palette.white, INPUT_BORDER, (props) => props.theme.palette["grey-300"], (props) => props.$hasPrefixel && "border-top-left-radius: 0; border-bottom-left-radius: 0;", (props) => props.$hasSuffixel && "border-top-right-radius: 0; border-bottom-right-radius: 0;", (props) => props.theme.palette["grey-500"], (props) => props.theme.palette["grey-400"], (props) => props.theme.palette["blue-600"], (props) => props.theme.palette["blue-600"], (props) => props.theme.palette["blue-050"], (props) => props.theme.palette["grey-050"], (props) => props.error ? errorInputStyle(props) : "", (props) => autoresizeConfObjToCss({
78
+ })(["box-sizing:", ";width:100%;", " margin:0;padding:7px ", "px;", " color:", ";background-color:var(--ds-form-field-bg-default);border:", "px solid var(--ds-form-field-border-default);border-radius:3px;font-family:inherit;font-size:13px;outline:0;grid-area:1 / 1;transition:all 0.3s,width 0ms,min-width 0ms,max-width 0ms;", " ", " &::placeholder{color:var(--ds-form-field-text-placeholder);line-height:1.29;}&:hover:not(:disabled){border-color:var(--ds-form-field-border-hover);}&:focus{box-shadow:inset 0 0 0 1px var(--ds-form-field-border-focus);border-color:var(--ds-form-field-border-focus);background-color:var(--ds-form-field-bg-focus);}&:disabled{cursor:not-allowed;background-color:var(--ds-form-field-bg-disabled);}", ";", ";", ""], (props) => props.autoResize ? "content-box" : "border-box", (props) => props.autoResize ? `height: ${props.$size === "large" ? "32" : "16"}px;` : `height: ${props.$size === "large" ? "48" : "32"}px;`, INPUT_PADDING, (props) => props.$hasInnerPrefix && "padding-left: 32px;", (props) => props.disabled ? "var(--ds-form-field-text-disabled)" : "var(--ds-form-field-text-value)", INPUT_BORDER, (props) => props.$hasPrefixel && "border-top-left-radius: 0; border-bottom-left-radius: 0;", (props) => props.$hasSuffixel && "border-top-right-radius: 0; border-bottom-right-radius: 0;", (props) => props.error ? errorInputStyle() : "", (props) => autoresizeConfObjToCss({
79
79
  autoResize: props.autoResize
80
80
  }), (props) => props.readOnly && `
81
81
  &&& {
82
82
  &:hover {
83
- border-color: ${props.theme.palette["grey-300"]};
83
+ border-color: var(--ds-form-field-border-default);
84
84
  }
85
85
  &:focus {
86
- border-color: ${props.theme.palette["grey-300"]};
86
+ border-color: var(--ds-form-field-border-default);
87
87
  box-shadow: none;
88
- background: ${props.theme.palette.white};
88
+ background: var(--ds-form-field-bg-default);
89
89
  }
90
90
  }
91
91
  `);
@@ -96,11 +96,11 @@ const InputGroupRow = /* @__PURE__ */ styled.div.withConfig({
96
96
  const Addon = /* @__PURE__ */ styled.div.withConfig({
97
97
  displayName: "Inputstyles__Addon",
98
98
  componentId: "sc-dc57an-8"
99
- })(["box-sizing:border-box;height:", "px;display:flex;align-items:center;flex-shrink:0;overflow:hidden;padding:0;white-space:nowrap;color:", ";background-color:", ";border:", "px solid ", ";", ""], (props) => props.$size === "large" ? "48" : "32", (props) => props.theme.palette["grey-700"], (props) => props.theme.palette["grey-050"], INPUT_BORDER, (props) => props.theme.palette["grey-300"], (props) => props.$position === "before" ? "border-right: 0; border-radius: 3px 0 0 3px;" : "border-left: 0; border-radius: 0 3px 3px 0;");
99
+ })(["box-sizing:border-box;height:", "px;display:flex;align-items:center;flex-shrink:0;overflow:hidden;padding:0;white-space:nowrap;color:var(--ds-form-field-affix-text);background-color:var(--ds-form-field-affix-bg);border:", "px solid var(--ds-form-field-affix-border);", ""], (props) => props.$size === "large" ? "48" : "32", INPUT_BORDER, (props) => props.$position === "before" ? "border-right: 0; border-radius: 3px 0 0 3px;" : "border-left: 0; border-radius: 0 3px 3px 0;");
100
100
  const ClearButton = /* @__PURE__ */ styled.button.withConfig({
101
101
  displayName: "Inputstyles__ClearButton",
102
102
  componentId: "sc-dc57an-9"
103
- })(["position:absolute;top:50%;right:", "px;transform:translateY(-50%);z-index:2;display:flex;align-items:center;justify-content:center;padding:0;border:0;background:transparent;cursor:pointer;color:", ";&:hover{color:", ";}"], (props) => props.$offset, (props) => props.theme.palette["grey-500"], (props) => props.theme.palette["grey-700"]);
103
+ })(["position:absolute;top:50%;right:", "px;transform:translateY(-50%);z-index:2;display:flex;align-items:center;justify-content:center;padding:0;border:0;background:transparent;cursor:pointer;color:var(--ds-form-clear-icon);"], (props) => props.$offset);
104
104
  const InnerAffix = /* @__PURE__ */ styled.div.withConfig({
105
105
  displayName: "Inputstyles__InnerAffix",
106
106
  componentId: "sc-dc57an-10"
@@ -111,14 +111,14 @@ const RawTextArea = /* @__PURE__ */ styled(forwardRef(({
111
111
  }, ref) => /* @__PURE__ */ jsx("textarea", { autoComplete: "off", ...props, ref }))).withConfig({
112
112
  displayName: "Inputstyles__RawTextArea",
113
113
  componentId: "sc-dc57an-11"
114
- })(["&&{box-sizing:border-box;width:100%;color:", ";font-family:inherit;font-size:13px;padding:8px 12px;", "}"], (props) => props.theme.palette["grey-700"], (props) => props.error ? `
115
- box-shadow: inset 0 0 0 1px ${props.theme.palette["red-600"]};
116
- background: ${props.theme.palette["red-050"]};
117
- border-color: ${props.theme.palette["red-600"]};
118
- ` : "");
114
+ })(["&&{box-sizing:border-box;width:100%;color:var(--ds-form-field-text-value);font-family:inherit;font-size:13px;padding:8px 12px;}"]);
115
+ const StandaloneRawTextArea = /* @__PURE__ */ styled(RawTextArea).withConfig({
116
+ displayName: "Inputstyles__StandaloneRawTextArea",
117
+ componentId: "sc-dc57an-12"
118
+ })(["", ""], (props) => props.error ? errorInputStyle() : "");
119
119
  const ExpandableWrapper = /* @__PURE__ */ styled.div.withConfig({
120
120
  displayName: "Inputstyles__ExpandableWrapper",
121
- componentId: "sc-dc57an-12"
121
+ componentId: "sc-dc57an-13"
122
122
  })(["position:relative;overflow:visible;", "{position:absolute;top:0;left:0;right:0;z-index:999;resize:none;max-height:124px;min-height:65px;min-width:282px;", "}"], TextareaWrapper, (props) => {
123
123
  if (props.expanded) {
124
124
  return css(["pointer-events:initial;display:block;"]);
@@ -127,35 +127,30 @@ const ExpandableWrapper = /* @__PURE__ */ styled.div.withConfig({
127
127
  });
128
128
  const ContentBelow = /* @__PURE__ */ styled.div.withConfig({
129
129
  displayName: "Inputstyles__ContentBelow",
130
- componentId: "sc-dc57an-13"
130
+ componentId: "sc-dc57an-14"
131
131
  })(["margin-top:8px;"]);
132
132
  const ErrorText = /* @__PURE__ */ styled.div.withConfig({
133
133
  displayName: "Inputstyles__ErrorText",
134
- componentId: "sc-dc57an-14"
135
- })(["color:", ";margin-bottom:4px;"], (props) => props.theme.palette["red-600"]);
134
+ componentId: "sc-dc57an-15"
135
+ })(["color:var(--ds-form-error-text-color);margin-bottom:4px;"]);
136
136
  const Label = /* @__PURE__ */ styled.label.withConfig({
137
137
  displayName: "Inputstyles__Label",
138
- componentId: "sc-dc57an-15"
139
- })(["color:", ";font-weight:500;display:block;"], (props) => props.theme.palette["grey-800"]);
138
+ componentId: "sc-dc57an-16"
139
+ })(["color:var(--ds-form-label-text-color);font-weight:500;display:block;"]);
140
140
  const Counter = /* @__PURE__ */ styled.div.withConfig({
141
141
  displayName: "Inputstyles__Counter",
142
- componentId: "sc-dc57an-16"
143
- })(["font-weight:500;flex:1 0 auto;text-align:end;color:", ";"], (props) => props.theme.palette["grey-500"]);
142
+ componentId: "sc-dc57an-17"
143
+ })(["font-weight:500;flex:1 0 auto;text-align:end;color:var(--ds-form-field-text-counter);"]);
144
144
  const Description = /* @__PURE__ */ styled.div.withConfig({
145
145
  displayName: "Inputstyles__Description",
146
- componentId: "sc-dc57an-17"
147
- })(["color:", ";"], (props) => props.theme.palette["grey-600"]);
146
+ componentId: "sc-dc57an-18"
147
+ })(["color:var(--ds-form-description-text-color);"]);
148
148
  const ContentAbove = /* @__PURE__ */ styled.div.withConfig({
149
149
  displayName: "Inputstyles__ContentAbove",
150
- componentId: "sc-dc57an-18"
151
- })(["display:flex;justify-content:space-between;margin-bottom:8px;min-height:18px;"]);
152
- const AddonWrapper = /* @__PURE__ */ styled.div.withConfig({
153
- displayName: "Inputstyles__AddonWrapper",
154
150
  componentId: "sc-dc57an-19"
155
- })(["background:", ";display:flex;align-items:center;height:", ";"], (props) => props.theme.palette["grey-050"], (props) => props.height ? `${props.height}px` : "30px");
151
+ })(["display:flex;justify-content:space-between;margin-bottom:8px;min-height:18px;"]);
156
152
  export {
157
153
  Addon,
158
- AddonWrapper,
159
154
  ClearButton,
160
155
  ContentAbove,
161
156
  ContentBelow,
@@ -173,6 +168,7 @@ export {
173
168
  NativeInput,
174
169
  OuterWrapper,
175
170
  RawTextArea,
171
+ StandaloneRawTextArea,
176
172
  Wrapper,
177
173
  autoresizeConfObjToCss
178
174
  };
@@ -1,22 +1,23 @@
1
1
  import styled, { css } from "styled-components";
2
- const errorInputStyle = (props) => `
2
+ const errorInputStyle = () => `
3
3
  && {
4
- border-color: ${props.theme.palette["red-600"]};
5
- box-shadow: inset 0 0 0 2px ${props.theme.palette["red-600"]};
6
- background: ${props.theme.palette["red-050"]};
4
+ border-color: var(--ds-form-field-border-validated);
5
+ box-shadow: inset 0 0 0 2px var(--ds-form-field-border-validated);
6
+ background: var(--ds-form-field-bg-validated);
7
7
  border-radius: 4px;
8
8
  }
9
9
  `;
10
- const focusStyle = (props) => `
10
+ const focusStyle = () => `
11
11
  && {
12
- box-shadow: inset 0 0 0 2px ${props.theme.palette["blue-600"]};
13
- border-color: ${props.theme.palette["blue-600"]};
14
- background: ${props.theme.palette["blue-050"]};
12
+ box-shadow: inset 0 0 0 2px var(--ds-form-field-border-focus);
13
+ border-color: var(--ds-form-field-border-focus);
14
+ background: var(--ds-form-field-bg-focus);
15
15
  }
16
16
  `;
17
17
  const contentShrinkStyle = () => css(["&&{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;}"]);
18
- const disabledStyled = (props) => css(["&:hover,&,&& > *{cursor:not-allowed;}opacity:0.8;color:", ";background:", ";"], props.theme.palette[`grey-600`], props.theme.palette["grey-050"]);
19
- const hoverStyle = (props) => css(["&:hover{border-color:", ";box-shadow:inset 0 0 0 1px ", ";}"], props.theme.palette["grey-200"], props.theme.palette["grey-400"]);
18
+ const fieldDisabledStyle = () => css(["&:hover,&,&& > *{cursor:not-allowed;}color:var(--ds-form-field-text-disabled);background-color:var(--ds-form-field-bg-disabled);box-shadow:inset 0 0 0 1px var(--ds-form-field-border-default);"]);
19
+ const chipDisabledStyle = () => css(["&:hover,&,&& > *{cursor:not-allowed;}color:var(--ds-form-chip-text-disabled);"]);
20
+ const hoverStyle = () => css(["&:hover{border-color:var(--ds-color-border-base-default);box-shadow:inset 0 0 0 1px var(--ds-form-field-border-hover);}"]);
20
21
  const ContentBelow = /* @__PURE__ */ styled.div.withConfig({
21
22
  displayName: "InputMultivaluestyles__ContentBelow",
22
23
  componentId: "sc-1vmqtuf-0"
@@ -24,15 +25,15 @@ const ContentBelow = /* @__PURE__ */ styled.div.withConfig({
24
25
  const ErrorText = /* @__PURE__ */ styled.div.withConfig({
25
26
  displayName: "InputMultivaluestyles__ErrorText",
26
27
  componentId: "sc-1vmqtuf-1"
27
- })(["color:", ";margin-bottom:4px;"], (props) => props.theme.palette["red-600"]);
28
+ })(["color:var(--ds-form-error-text-color);margin-bottom:4px;"]);
28
29
  const Label = /* @__PURE__ */ styled.label.withConfig({
29
30
  displayName: "InputMultivaluestyles__Label",
30
31
  componentId: "sc-1vmqtuf-2"
31
- })(["color:", ";font-weight:500;display:block;white-space:nowrap;"], (props) => props.theme.palette["grey-800"]);
32
+ })(["color:var(--ds-form-label-text-color);font-weight:500;display:block;white-space:nowrap;"]);
32
33
  const Description = /* @__PURE__ */ styled.div.withConfig({
33
34
  displayName: "InputMultivaluestyles__Description",
34
35
  componentId: "sc-1vmqtuf-3"
35
- })(["color:", ";"], (props) => props.theme.palette["grey-600"]);
36
+ })(["color:var(--ds-form-description-text-color);"]);
36
37
  const ContentAbove = /* @__PURE__ */ styled.div.withConfig({
37
38
  displayName: "InputMultivaluestyles__ContentAbove",
38
39
  componentId: "sc-1vmqtuf-4"
@@ -40,7 +41,7 @@ const ContentAbove = /* @__PURE__ */ styled.div.withConfig({
40
41
  const IconWrapper = /* @__PURE__ */ styled.div.withConfig({
41
42
  displayName: "InputMultivaluestyles__IconWrapper",
42
43
  componentId: "sc-1vmqtuf-5"
43
- })(["overflow:hidden;width:24px;margin-left:-16px;display:none;color:", ";"], (props) => props.theme.palette["red-600"]);
44
+ })(["overflow:hidden;width:24px;margin-left:-16px;display:none;color:var(--ds-form-clear-icon);"]);
44
45
  const ValueText = /* @__PURE__ */ styled.div.withConfig({
45
46
  displayName: "InputMultivaluestyles__ValueText",
46
47
  componentId: "sc-1vmqtuf-6"
@@ -48,15 +49,15 @@ const ValueText = /* @__PURE__ */ styled.div.withConfig({
48
49
  const InputWrapper = /* @__PURE__ */ styled.div.withConfig({
49
50
  displayName: "InputMultivaluestyles__InputWrapper",
50
51
  componentId: "sc-1vmqtuf-7"
51
- })(["box-shadow:inset 0 0 0 1px ", ";background-color:", ";width:100%;border-radius:3px;display:flex;padding:2px 12px;min-height:32px;flex-wrap:wrap;transition:0.3s all;", " ", " ", " ", ""], (props) => props.theme.palette["grey-300"], (props) => props.theme.palette.white, (props) => !props.disabled && hoverStyle(props), (props) => props.focus && !props.disabled ? focusStyle(props) : "", (props) => props.error ? errorInputStyle(props) : "", (props) => !!props.disabled && disabledStyled(props));
52
+ })(["box-shadow:inset 0 0 0 1px var(--ds-form-field-border-default);background-color:var(--ds-form-field-bg-default);width:100%;border-radius:3px;display:flex;padding:2px 12px;min-height:32px;flex-wrap:wrap;transition:0.3s all;", " ", " ", " ", ""], (props) => !props.disabled && hoverStyle(), (props) => props.focus && !props.disabled ? focusStyle() : "", (props) => props.error ? errorInputStyle() : "", (props) => !!props.disabled && fieldDisabledStyle());
52
53
  const ValueWrapper = /* @__PURE__ */ styled.div.withConfig({
53
54
  displayName: "InputMultivaluestyles__ValueWrapper",
54
55
  componentId: "sc-1vmqtuf-8"
55
- })(["display:grid;height:24px;&{background-color:", ";}border-radius:3px;border:none;margin:2px;white-space:nowrap;position:relative;padding:0 8px;right:8px;overflow:hidden;grid-template-columns:calc(100%) 0px;transition:background-color 0.1s ease-in-out,color 0.1s ease-in-out;&:hover{", " background-color:", ";color:", ";cursor:pointer;}", ""], (props) => props.disabled ? props.theme.palette["grey-200"] : props.theme.palette["grey-100"], (props) => !props.disabled && css(["", "{max-width:calc(100% - 16px);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}", "{display:block;}", ""], ValueText, IconWrapper, contentShrinkStyle()), (props) => props.theme.palette["grey-200"], (props) => !props.disabled && props.theme.palette["grey-800"], (props) => !!props.disabled && disabledStyled(props));
56
+ })(["display:grid;height:24px;&{background-color:", ";}border-radius:3px;border:none;margin:2px;white-space:nowrap;position:relative;padding:0 8px;right:8px;overflow:hidden;grid-template-columns:calc(100%) 0px;transition:background-color 0.1s ease-in-out,color 0.1s ease-in-out;&:hover{", " ", "}", ""], (props) => props.disabled ? "var(--ds-form-chip-bg-disabled)" : "var(--ds-form-chip-bg-default)", (props) => !props.disabled && css(["", "{max-width:calc(100% - 16px);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}", "{display:block;}", ""], ValueText, IconWrapper, contentShrinkStyle()), (props) => !props.disabled && css(["background-color:var(--ds-form-chip-bg-hover);color:var(--ds-form-chip-text-default);cursor:pointer;"]), (props) => !!props.disabled && chipDisabledStyle());
56
57
  const BorderLessInput = /* @__PURE__ */ styled.input.withConfig({
57
58
  displayName: "InputMultivaluestyles__BorderLessInput",
58
59
  componentId: "sc-1vmqtuf-9"
59
- })(["box-shadow:none;border:none;min-width:0;display:flex;flex:1;margin-left:-8px;&&{background-color:rgba(255,255,255,0);}&::placeholder{color:", ";}", ""], (props) => props.theme.palette["grey-500"], (props) => !!props.disabled && disabledStyled(props));
60
+ })(["box-shadow:none;border:none;min-width:0;display:flex;flex:1;margin-left:-8px;&&{background-color:transparent;}&::placeholder{color:var(--ds-form-field-text-placeholder);}", ""], (props) => !!props.disabled && css(["cursor:not-allowed;color:var(--ds-form-field-text-disabled);"]));
60
61
  export {
61
62
  BorderLessInput,
62
63
  ContentAbove,
@@ -1,6 +1,10 @@
1
1
  import { default as React } from 'react';
2
2
  import { TextareaProps } from './TextArea.types';
3
3
  export declare const TextArea: ({ className, errorText, label, description, counterLimit, tooltip, tooltipConfig, icon1, icon1Tooltip, icon2, icon2Tooltip, resetMargin, handleInputRef, prefixel, suffixel, error, renderCustomCounter, ...antdTextareaProps }: TextareaProps) => React.JSX.Element;
4
+ /**
5
+ * @deprecated Unused and due for removal. Use `DSRawTextArea` for a bare DS textarea, or `TextArea` for
6
+ * one with label, description, error text and counter.
7
+ */
4
8
  export declare const RawTextArea: import('styled-components').StyledComponent<React.ForwardRefExoticComponent<React.TextareaHTMLAttributes<HTMLTextAreaElement> & {
5
9
  error?: boolean;
6
10
  } & React.RefAttributes<HTMLTextAreaElement>>, any, {
package/dist/TextArea.js CHANGED
@@ -5,8 +5,8 @@ import { generateUuid } from "@synerise/ds-utils";
5
5
  import { ElementIcons } from "./components/ElementIcons.js";
6
6
  import { useElementFocus } from "./hooks/useElementFocus.js";
7
7
  import { useCounterLimit } from "./hooks/useCounterLimit.js";
8
- import { RawTextArea as RawTextArea$1, OuterWrapper, InputWrapper } from "./Input.styles.js";
9
- import { RawTextArea as RawTextArea$2 } from "./Textarea/Textarea.js";
8
+ import { StandaloneRawTextArea, OuterWrapper, InputWrapper } from "./Input.styles.js";
9
+ import { RawTextArea as RawTextArea$1 } from "./Textarea/Textarea.js";
10
10
  import { getCharCount } from "./utils/getCharCount.js";
11
11
  const TextArea = ({
12
12
  className,
@@ -52,10 +52,10 @@ const TextArea = ({
52
52
  });
53
53
  return /* @__PURE__ */ jsx(OuterWrapper, { className, resetMargin, children: /* @__PURE__ */ jsx(FormField, { label, rightSide, id, tooltip, tooltipConfig, description, errorText, children: /* @__PURE__ */ jsxs(InputWrapper, { children: [
54
54
  /* @__PURE__ */ jsx(ElementIcons, { handleIconsClick, disabled: antdTextareaProps.disabled, icon1Tooltip, icon1, icon2, icon2Tooltip, className, type: "textArea" }),
55
- /* @__PURE__ */ jsx(RawTextArea$2, { ...antdTextareaProps, className: hasErrorMessage || error ? "error" : void 0, error: hasErrorMessage || error, onChange: handleChange, value: antdTextareaProps.value, id, autoComplete: "off" })
55
+ /* @__PURE__ */ jsx(RawTextArea$1, { ...antdTextareaProps, className: hasErrorMessage || error ? "error" : void 0, error: hasErrorMessage || error, onChange: handleChange, value: antdTextareaProps.value, id, autoComplete: "off" })
56
56
  ] }) }) });
57
57
  };
58
- const RawTextArea = RawTextArea$1;
58
+ const RawTextArea = StandaloneRawTextArea;
59
59
  export {
60
60
  RawTextArea,
61
61
  TextArea
@@ -2,21 +2,21 @@ import styled, { css } from "styled-components";
2
2
  const TextareaWrapper = /* @__PURE__ */ styled.div.withConfig({
3
3
  displayName: "Textareastyles__TextareaWrapper",
4
4
  componentId: "sc-23480t-0"
5
- })(["position:relative;overflow:hidden;resize:", ";border-radius:3px;transition:background-color 0.3s ease-in-out,border 0.3s ease-in-out,box-shadow 0.3s ease-in-out;", " .scrollbar-container{height:100%;top:1px;bottom:0;right:1px;.ps__rail-y,.ps__thumb-x,.ps__rail-x{height:calc(100% - 1px);max-height:9px;}& > .textarea-scrollbar{&,& > div{height:calc(100% - 2px);}}}&&&{textarea{position:relative;min-height:100%;resize:none;background:transparent;border:0;box-shadow:none;outline:0;word-wrap:break-word;overflow-wrap:break-word;font-family:inherit;font-size:13px;font-variant-numeric:normal;&::placeholder,&::-webkit-input-placeholder{color:", ";line-height:1.38;}&:-ms-input-placeholder{color:", ";line-height:1.38;}}}"], (props) => props.resize ? props.resize : "vertical", (props) => {
5
+ })(["position:relative;overflow:hidden;resize:", ";border-radius:3px;transition:background-color 0.3s ease-in-out,border 0.3s ease-in-out,box-shadow 0.3s ease-in-out;", " .scrollbar-container{height:100%;top:1px;bottom:0;right:1px;.ps__rail-y,.ps__thumb-x,.ps__rail-x{height:calc(100% - 1px);max-height:9px;}& > .textarea-scrollbar{&,& > div{height:calc(100% - 2px);}}}&&&{textarea{position:relative;min-height:100%;resize:none;background:transparent;border:0;box-shadow:none;outline:0;word-wrap:break-word;overflow-wrap:break-word;font-family:inherit;font-size:13px;font-variant-numeric:normal;&::placeholder,&::-webkit-input-placeholder{color:var(--ds-form-field-text-placeholder);line-height:1.38;}&:-ms-input-placeholder{color:var(--ds-form-field-text-placeholder);line-height:1.38;}}}"], (props) => props.resize ? props.resize : "vertical", (props) => {
6
6
  if (props.isReadOnly) {
7
- return css(["border:1px solid ", ";background-color:", ";"], props.theme.palette["grey-300"], props.theme.palette["grey-050"]);
7
+ return css(["border:1px solid var(--ds-form-field-border-default);background-color:var(--ds-form-field-bg-default);"]);
8
8
  }
9
9
  if (props.isDisabled) {
10
- return css(["border:1px solid #dbe0e3;background-color:#f9fafb;cursor:not-allowed;"]);
10
+ return css(["border:1px solid var(--ds-form-field-border-default);background-color:var(--ds-form-field-bg-disabled);cursor:not-allowed;"]);
11
11
  }
12
12
  if (props.isFocused) {
13
- return css(["box-shadow:inset 0 0 0 1px ", ";border:1px solid ", ";background-color:", ";&&&{textarea{&::-webkit-scrollbar-thumb{background-color:#e1e3e6;border:4px solid ", " !important;}}}"], props.theme.palette["blue-600"], props.theme.palette["blue-600"], props.theme.palette["blue-050"], props.theme.palette["blue-050"]);
13
+ return css(["box-shadow:inset 0 0 0 1px var(--ds-form-field-border-focus);border:1px solid var(--ds-form-field-border-focus);background-color:var(--ds-form-field-bg-focus);&&&{textarea{&::-webkit-scrollbar-thumb{background-color:var(--ds-color-border-base-strong);border:4px solid var(--ds-form-field-bg-focus) !important;}}}"]);
14
14
  }
15
15
  if (props.hasError) {
16
- return css(["background-color:", ";box-shadow:inset 0 0 0 1px ", ";border:1px solid ", ";"], props.theme.palette["red-050"], props.theme.palette["red-600"], props.theme.palette["red-600"]);
16
+ return css(["background-color:var(--ds-form-field-bg-validated);box-shadow:inset 0 0 0 1px var(--ds-form-field-border-validated);border:1px solid var(--ds-form-field-border-validated);"]);
17
17
  }
18
- return css(["border:1px solid #dbe0e3;background-color:#fff;"]);
19
- }, (props) => props.theme.palette["grey-500"], (props) => props.theme.palette["grey-500"]);
18
+ return css(["border:1px solid var(--ds-form-field-border-default);background-color:var(--ds-form-field-bg-default);&:hover{border-color:var(--ds-form-field-border-hover);}"]);
19
+ });
20
20
  export {
21
21
  TextareaWrapper
22
22
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-input",
3
- "version": "2.0.11",
3
+ "version": "2.1.0",
4
4
  "description": "Input UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "synerise/synerise-design",
@@ -40,11 +40,11 @@
40
40
  "types": "dist/index.d.ts",
41
41
  "dependencies": {
42
42
  "@floating-ui/react": "^0.27.16",
43
- "@synerise/ds-form-field": "^2.0.10",
44
- "@synerise/ds-icon": "^2.2.3",
45
- "@synerise/ds-scrollbar": "^2.0.9",
46
- "@synerise/ds-tooltip": "^2.0.10",
47
- "@synerise/ds-utils": "^2.2.2",
43
+ "@synerise/ds-form-field": "^2.1.0",
44
+ "@synerise/ds-icon": "^2.3.0",
45
+ "@synerise/ds-scrollbar": "^2.1.0",
46
+ "@synerise/ds-tooltip": "^2.1.0",
47
+ "@synerise/ds-utils": "^2.3.0",
48
48
  "classnames": "^2.3.2",
49
49
  "csstype": "^2.6.9"
50
50
  },
@@ -58,5 +58,5 @@
58
58
  "react-intl": ">= 3.12.0 <= 6.8",
59
59
  "styled-components": "^5.3.3"
60
60
  },
61
- "gitHead": "5ac0f7dcb7c3995b402c86c087d8f32770f80a1d"
61
+ "gitHead": "5c3d61e30289486d14c7d6becb682e2d4a08ce41"
62
62
  }