@synerise/ds-autocomplete 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-autocomplete@2.0.12...@synerise/ds-autocomplete@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-autocomplete@2.0.11...@synerise/ds-autocomplete@2.0.12) (2026-10-28)
18
+
19
+ **Note:** Version bump only for package @synerise/ds-autocomplete
20
+
21
+
22
+
23
+
24
+
6
25
  ## [2.0.11](https://github.com/Synerise/synerise-design/compare/@synerise/ds-autocomplete@2.0.10...@synerise/ds-autocomplete@2.0.11) (2026-10-26)
7
26
 
8
27
 
package/CLAUDE.md CHANGED
@@ -153,7 +153,7 @@ import Autocomplete from '@synerise/ds-autocomplete';
153
153
 
154
154
  ## Styling
155
155
 
156
- Styles live in `Autocomplete.styles.ts`. Uses `@synerise/ds-core` theme palette tokens (`blue-600`, `blue-050`, `red-600`, `red-050`, `grey-300`, `grey-400`, `grey-600`, `grey-700`, `white`). No hardcoded colour values. **All selectors are `.ds-*` / styled-components — no `.ant-*`.**
156
+ Styles live in `Autocomplete.styles.ts`. Colours come from `var(--ds-*)` tokens — mainly the shared `--ds-form-field-*` (border/bg/text per state) and `--ds-form-icon-color-*` module tokens, plus `--ds-color-icon-brand-default` and `--ds-opacity-disabled`. No hardcoded colour values. **All selectors are `.ds-*` / styled-components — no `.ant-*`.**
157
157
 
158
158
  Styled components:
159
159
  - `AutocompleteWrapper` — outermost `div`; stretches the `InputContainer` to `100%` when `autoResize` is set.
@@ -171,12 +171,12 @@ const Autocomplete = ({
171
171
  }
172
172
  const icon1WithTooltip = icon1Tooltip ? /* @__PURE__ */ jsx(Tooltip, { title: icon1Tooltip, children: icon1 }) : icon1;
173
173
  const icon2WithTooltip = icon2Tooltip ? /* @__PURE__ */ jsx(Tooltip, { title: icon2Tooltip, children: icon2 }) : icon2;
174
- return /* @__PURE__ */ jsxs(IconWrapper, { onClick: handleIconsClick, children: [
174
+ return /* @__PURE__ */ jsxs(IconWrapper, { onClick: handleIconsClick, $disabled: disabled, children: [
175
175
  icon1WithTooltip,
176
176
  " ",
177
177
  icon2WithTooltip
178
178
  ] });
179
- }, [handleIconsClick, icon1, icon2, icon1Tooltip, icon2Tooltip]);
179
+ }, [handleIconsClick, icon1, icon2, icon1Tooltip, icon2Tooltip, disabled]);
180
180
  const showClear = !!allowClear && !isDisabled && currentValue !== "";
181
181
  const hasDropdownContent = displayedOptions.length > 0 || notFoundContent !== void 0 && notFoundContent !== null;
182
182
  const dropdownOpen = isOpen && hasDropdownContent;
@@ -8,7 +8,9 @@ export declare const NativeInput: import('styled-components').StyledComponent<"i
8
8
  export declare const AutocompleteWrapper: import('styled-components').StyledComponent<"div", any, {
9
9
  autoResize?: AutoResizeProp;
10
10
  }, never>;
11
- export declare const IconWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
11
+ export declare const IconWrapper: import('styled-components').StyledComponent<"div", any, {
12
+ $disabled?: boolean;
13
+ }, never>;
12
14
  export declare const ClearButton: import('styled-components').StyledComponent<"button", any, {}, never>;
13
15
  export declare const ComponentWrapper: import('styled-components').StyledComponent<"div", any, {
14
16
  error?: boolean;
@@ -2,9 +2,9 @@ import styled, { css } from "styled-components";
2
2
  import { ICON_OFFSET, ICON_GAP } from "./Autocomplete.const.js";
3
3
  import { getIconsWidth } from "./utils/getIconsWidth.js";
4
4
  const baseTransition = /* @__PURE__ */ css(["transition:ease-in-out all 0.2s,width 0s,min-width 0s,max-width 0s;"]);
5
- const active = () => css(["", ";box-shadow:inset 0 0 0 1px ", ";border:1px solid ", ";background-color:", ";"], baseTransition, (props) => props.theme.palette["blue-600"], (props) => props.theme.palette["blue-600"], (props) => props.theme.palette["blue-050"]);
6
- const errorStyle = () => css(["", ";box-shadow:inset 0 0 0 1px ", ";background:", ";border:1px solid ", ";"], baseTransition, (props) => props.theme.palette["red-600"], (props) => props.theme.palette["red-050"], (props) => props.theme.palette["red-600"]);
7
- const readonly = () => css(["background-color:", ";color:", ";cursor:auto;"], (props) => props.theme.palette.white, (props) => props.theme.palette["grey-700"]);
5
+ const active = () => 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);"], baseTransition);
6
+ const errorStyle = () => css(["", ";box-shadow:inset 0 0 0 1px var(--ds-form-field-border-validated);background:var(--ds-form-field-bg-validated);border:1px solid var(--ds-form-field-border-validated);"], baseTransition);
7
+ const readonly = () => css(["background-color:var(--ds-form-field-bg-default);color:var(--ds-form-field-text-value);cursor:auto;"]);
8
8
  const InputContainer = /* @__PURE__ */ styled.div.withConfig({
9
9
  displayName: "Autocompletestyles__InputContainer",
10
10
  componentId: "sc-10de6ms-0"
@@ -24,7 +24,7 @@ const InputContainer = /* @__PURE__ */ styled.div.withConfig({
24
24
  const NativeInput = /* @__PURE__ */ styled.input.withConfig({
25
25
  displayName: "Autocompletestyles__NativeInput",
26
26
  componentId: "sc-10de6ms-1"
27
- })(["box-sizing:border-box;width:100%;height:32px;margin:0;&&{padding:0 10px;padding-right:", ";}border:1px solid ", ";border-radius:3px;background-color:", ";color:", ";font-family:inherit;font-size:13px;line-height:1.54;font-feature-settings:'tnum';outline:none;", ";&::placeholder{color:", ";}&:hover:not(:disabled){border-color:", ";}&:disabled{background-color:", ";color:", ";cursor:not-allowed;}&:focus{", ";&:hover{", ";}}"], (props) => `${getIconsWidth(props.iconCount || 0) + 10}px`, (props) => props.theme.palette["grey-300"], (props) => props.theme.palette.white, (props) => props.theme.palette["grey-700"], baseTransition, (props) => props.theme.palette["grey-500"], (props) => props.theme.palette["grey-400"], (props) => props.theme.palette["grey-050"], (props) => props.theme.palette["grey-400"], active(), active());
27
+ })(["box-sizing:border-box;width:100%;height:32px;margin:0;&&{padding:0 10px;padding-right:", ";}border:1px solid var(--ds-form-field-border-default);border-radius:3px;background-color:var(--ds-form-field-bg-default);color:var(--ds-form-field-text-value);font-family:inherit;font-size:13px;line-height:1.54;font-feature-settings:'tnum';outline:none;", ";&::placeholder{color:var(--ds-form-field-text-placeholder);}&:hover:not(:disabled){border-color:var(--ds-form-field-border-hover);}&:disabled{background-color:var(--ds-form-field-bg-disabled);color:var(--ds-form-field-text-disabled);cursor:not-allowed;}&:focus{", ";&:hover{", ";}}"], (props) => `${getIconsWidth(props.iconCount || 0) + 10}px`, baseTransition, active(), active());
28
28
  const AutocompleteWrapper = /* @__PURE__ */ styled.div.withConfig({
29
29
  displayName: "Autocompletestyles__AutocompleteWrapper",
30
30
  componentId: "sc-10de6ms-2"
@@ -32,11 +32,11 @@ const AutocompleteWrapper = /* @__PURE__ */ styled.div.withConfig({
32
32
  const IconWrapper = /* @__PURE__ */ styled.div.withConfig({
33
33
  displayName: "Autocompletestyles__IconWrapper",
34
34
  componentId: "sc-10de6ms-3"
35
- })(["position:absolute;right:", "px;top:0;display:flex;bottom:0;align-items:center;gap:", "px;z-index:5;"], ICON_OFFSET, ICON_GAP);
35
+ })(["position:absolute;right:", "px;top:0;display:flex;bottom:0;align-items:center;gap:", "px;z-index:5;color:var(--ds-form-icon-color-default);> *{transition:0.3s all;opacity:", ";}> *:hover{color:var(--ds-color-icon-brand-default);cursor:pointer;}"], ICON_OFFSET, ICON_GAP, (props) => props.$disabled ? "var(--ds-opacity-disabled)" : "");
36
36
  const ClearButton = /* @__PURE__ */ styled.button.withConfig({
37
37
  displayName: "Autocompletestyles__ClearButton",
38
38
  componentId: "sc-10de6ms-4"
39
- })(["position:absolute;right:8px;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:none;background:transparent;color:", ";font-size:15px;line-height:1;cursor:pointer;z-index:6;&:hover{color:", ";}"], (props) => props.theme.palette["grey-600"], (props) => props.theme.palette["grey-700"]);
39
+ })(["position:absolute;right:8px;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:none;background:transparent;color:var(--ds-form-icon-color-default);font-size:15px;line-height:1;cursor:pointer;z-index:6;"]);
40
40
  const ComponentWrapper = /* @__PURE__ */ styled.div.withConfig({
41
41
  displayName: "Autocompletestyles__ComponentWrapper",
42
42
  componentId: "sc-10de6ms-5"
@@ -15,9 +15,7 @@ const Inner = /* @__PURE__ */ styled.div.withConfig({
15
15
  const NotFound = /* @__PURE__ */ styled.div.withConfig({
16
16
  displayName: "AutocompleteDropdownstyle__NotFound",
17
17
  componentId: "sc-7kdjse-3"
18
- })(["display:flex;align-items:center;justify-content:center;padding:8px 12px;color:", ";font-weight:normal;"], ({
19
- theme
20
- }) => theme.palette["grey-600"]);
18
+ })(["display:flex;align-items:center;justify-content:center;padding:8px 12px;color:var(--ds-dropdown-text-additional);font-weight:normal;"]);
21
19
  const ListItem = /* @__PURE__ */ styled(DSListItem).withConfig({
22
20
  displayName: "AutocompleteDropdownstyle__ListItem",
23
21
  componentId: "sc-7kdjse-4"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-autocomplete",
3
- "version": "2.0.11",
3
+ "version": "2.1.0",
4
4
  "description": "Autocomplete UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -42,12 +42,12 @@
42
42
  ],
43
43
  "types": "dist/index.d.ts",
44
44
  "dependencies": {
45
- "@synerise/ds-dropdown": "^2.1.7",
46
- "@synerise/ds-form-field": "^2.0.10",
47
- "@synerise/ds-input": "^2.0.11",
48
- "@synerise/ds-list-item": "^2.2.3",
49
- "@synerise/ds-scrollbar": "^2.0.9",
50
- "@synerise/ds-tooltip": "^2.0.10"
45
+ "@synerise/ds-dropdown": "^2.2.0",
46
+ "@synerise/ds-form-field": "^2.1.0",
47
+ "@synerise/ds-input": "^2.1.0",
48
+ "@synerise/ds-list-item": "^2.3.0",
49
+ "@synerise/ds-scrollbar": "^2.1.0",
50
+ "@synerise/ds-tooltip": "^2.1.0"
51
51
  },
52
52
  "devDependencies": {
53
53
  "vitest": "4"
@@ -57,5 +57,5 @@
57
57
  "react": ">=16.9.0 <= 18.3.1",
58
58
  "styled-components": "^5.3.3"
59
59
  },
60
- "gitHead": "5ac0f7dcb7c3995b402c86c087d8f32770f80a1d"
60
+ "gitHead": "5c3d61e30289486d14c7d6becb682e2d4a08ce41"
61
61
  }