@synerise/ds-icon-picker 2.0.12 → 2.1.1

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.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-icon-picker@2.1.0...@synerise/ds-icon-picker@2.1.1) (2026-11-03)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-icon-picker
9
+
10
+
11
+
12
+
13
+
14
+ # [2.1.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-icon-picker@2.0.12...@synerise/ds-icon-picker@2.1.0) (2026-10-29)
15
+
16
+
17
+ ### Features
18
+
19
+ * integrate Token Studio design tokens across the design system ([aabb447](https://github.com/Synerise/synerise-design/commit/aabb447edfb2d0c85e3de1f07e809ef84083453b))
20
+
21
+
22
+
23
+
24
+
6
25
  ## [2.0.12](https://github.com/Synerise/synerise-design/compare/@synerise/ds-icon-picker@2.0.11...@synerise/ds-icon-picker@2.0.12) (2026-10-28)
7
26
 
8
27
  **Note:** Version bump only for package @synerise/ds-icon-picker
package/CLAUDE.md CHANGED
@@ -125,7 +125,7 @@ const myIcons: DataSource[] = [
125
125
  ### `useIconSourceLoader`
126
126
 
127
127
  Loads icons based on the `data` prop and returns `FilterElement[]`.
128
- - `'design-system'` → synchronously imports `@synerise/ds-icon/dist/icons/M` (deep import) and sets state
128
+ - `'design-system'` → synchronously imports `@synerise/ds-icon/dist/icons/M/index` (deep import) and sets state
129
129
  - `'font-awesome'` → dynamically imports all FA packs via `Promise.all` (async, icons appear after load)
130
130
  - `DataSource[]` → runs `prepareItems()` synchronously
131
131
 
@@ -150,6 +150,6 @@ Flattens `FilterElement[]` into `GroupedFilterElement[]` for react-window. Each
150
150
  - **Selection state is fully controlled** — the component has no internal selection state. Pass `selectedIcon` and handle `onClear` to control the selected-state UI.
151
151
  - **`selectedIcon` toggles the trigger entirely** — when truthy, the default trigger button is replaced with `ButtonGroup` (selected icon + clear button). The `button` prop is ignored in this state.
152
152
  - **`ListItem` has a fragile Avatar check** — `(element.item as any).type.name === 'Avatar'` detects Avatar items by component name. Minification or renaming will break this.
153
- - **Deep import for DS icons** — `import * as medium from '@synerise/ds-icon/dist/icons/M'` is a fragile path that may break if `@synerise/ds-icon` restructures its dist output.
153
+ - **Deep import for DS icons** — `import * as medium from '@synerise/ds-icon/dist/icons/M/index'` is a fragile path that may break if `@synerise/ds-icon` restructures its dist output. Keep the `/index`: ds-icon's `exports` map turns `dist/icons/M` into `dist/icons/M.js`, which does not exist, so TypeScript's `bundler` resolution and any bundler that honours `exports` fail without it.
154
154
  - **Uses Vitest** — `package.json` has `"test": "jest"`. Spec also uses `vi.fn()`. Not yet migrated.
155
155
  - **`react-intl` is required** — `IntlProvider` must be present for the default `noResultMsg`. Tests use `renderWithProvider` from `@synerise/ds-core/testing`.
@@ -8,7 +8,7 @@ const List = /* @__PURE__ */ styled.div.withConfig({
8
8
  const ClearIcon = /* @__PURE__ */ styled(Icon).withConfig({
9
9
  displayName: "IconPickerstyles__ClearIcon",
10
10
  componentId: "sc-iun0xm-1"
11
- })(["&&&&&,&&&&&:hover{svg{color:", ";fill:", ";}}"], (props) => props.theme.palette["red-600"], (props) => props.theme.palette["red-600"]);
11
+ })(["&&&,&&&:hover{color:var(--ds-color-icon-danger-default);}"]);
12
12
  const ListItem = /* @__PURE__ */ styled.div.withConfig({
13
13
  displayName: "IconPickerstyles__ListItem",
14
14
  componentId: "sc-iun0xm-2"
@@ -24,15 +24,11 @@ const VirtualList = /* @__PURE__ */ styled(FixedSizeList).withConfig({
24
24
  const Overlay = /* @__PURE__ */ styled.span.withConfig({
25
25
  displayName: "IconPickerstyles__Overlay",
26
26
  componentId: "sc-iun0xm-5"
27
- })(["width:250px;background-color:", ";position:relative;display:block;border-radius:3px;", ":not(:last-child){&::after{content:'';display:flex;width:calc(100% - 6px);height:1px;background-image:linear-gradient( to right,", " 40%,", " 100%,transparent 0% );background-position:0 bottom;background-size:4px 1px;background-repeat:repeat-x;margin:4px auto 0;}}", ":first-child{padding-top:16px;}"], (props) => props.theme.palette.white, OverlayWrapper, ({
28
- theme
29
- }) => theme.palette.white, ({
30
- theme
31
- }) => theme.palette["grey-300"], OverlayWrapper);
27
+ })(["width:250px;background-color:var(--ds-dropdown-bg);position:relative;display:block;border-radius:3px;"]);
32
28
  const Title = /* @__PURE__ */ styled.div.withConfig({
33
29
  displayName: "IconPickerstyles__Title",
34
30
  componentId: "sc-iun0xm-6"
35
- })(["font-size:10px;line-height:1.6;font-weight:500;text-transform:uppercase;color:", ";padding:0 12px;flex-basis:100%;height:", ";line-height:", ";"], (props) => props.theme.palette["grey-500"], (props) => props.elementSize, (props) => props.elementSize);
31
+ })(["font-size:10px;line-height:1.6;font-weight:500;text-transform:uppercase;color:var(--ds-divider-header-text-color);padding:0 12px;flex-basis:100%;height:", ";line-height:", ";"], (props) => props.elementSize, (props) => props.elementSize);
36
32
  const FontIcon = /* @__PURE__ */ styled.div.withConfig({
37
33
  displayName: "IconPickerstyles__FontIcon",
38
34
  componentId: "sc-iun0xm-7"
@@ -56,7 +52,7 @@ const ListRow = /* @__PURE__ */ styled.div.withConfig({
56
52
  const NoResultIcon = /* @__PURE__ */ styled.div.withConfig({
57
53
  displayName: "IconPickerstyles__NoResultIcon",
58
54
  componentId: "sc-iun0xm-12"
59
- })(["width:40px;height:40px;background:rgba(148,158,166,0.05);border-radius:50%;display:flex;align-items:center;justify-content:center;margin:0 auto;"]);
55
+ })(["width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;margin:0 auto;"]);
60
56
  export {
61
57
  ClearIcon,
62
58
  Content,
@@ -1,7 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useRef } from "react";
3
3
  import { FormattedMessage } from "react-intl";
4
- import { useTheme } from "@synerise/ds-core";
5
4
  import Icon, { SearchNoResultsM } from "@synerise/ds-icon";
6
5
  import Scrollbar from "@synerise/ds-scrollbar";
7
6
  import { useGroupItems } from "../../hooks/useGroupItems.js";
@@ -14,7 +13,6 @@ const List = ({
14
13
  onSelect,
15
14
  noResultMsg = /* @__PURE__ */ jsx(FormattedMessage, { id: "DS.ICON-PICKER.NO-RESULTS" })
16
15
  }) => {
17
- const theme = useTheme();
18
16
  const groupedData = useGroupItems(data, ITEMS_PER_ROW);
19
17
  const listRef = useRef(null);
20
18
  const handleScroll = ({
@@ -29,7 +27,7 @@ const List = ({
29
27
  };
30
28
  const itemData = createItemData(groupedData, ELEMENT_HEIGHT, onSelect, ITEMS_PER_ROW);
31
29
  return /* @__PURE__ */ jsx(Scrollbar, { absolute: true, "data-testid": "icon-list", maxHeight: 330, onScroll: handleScroll, children: !data.length ? /* @__PURE__ */ jsx(OverlayWrapper, { children: /* @__PURE__ */ jsx(NoResults, { children: /* @__PURE__ */ jsxs(Content, { children: [
32
- /* @__PURE__ */ jsx(NoResultIcon, { children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(SearchNoResultsM, {}), color: theme.palette["grey-600"] }) }),
30
+ /* @__PURE__ */ jsx(NoResultIcon, { children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(SearchNoResultsM, {}) }) }),
33
31
  /* @__PURE__ */ jsx("p", { children: noResultMsg })
34
32
  ] }) }) }) : /* @__PURE__ */ jsx(VirtualList, { listHeight: 330, ref: listRef, height: 330, itemCount: groupedData.length, itemData, itemSize: ELEMENT_HEIGHT, width: "100%", children: (props) => /* @__PURE__ */ jsx(RowItem, { ...props }) }) });
35
33
  };
@@ -1,5 +1,4 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
- import { useTheme } from "@synerise/ds-core";
3
2
  import Dropdown from "@synerise/ds-dropdown";
4
3
  import Icon, { SearchM } from "@synerise/ds-icon";
5
4
  import List from "../List/List.js";
@@ -13,9 +12,8 @@ const Overlay = ({
13
12
  focus,
14
13
  noResultMsg
15
14
  }) => {
16
- const theme = useTheme();
17
15
  return /* @__PURE__ */ jsxs(Fragment, { children: [
18
- /* @__PURE__ */ jsx(Dropdown.SearchInput, { onSearchChange, onClearInput, placeholder, value, autofocus: focus, iconLeft: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(SearchM, {}), color: theme.palette["grey-600"] }) }),
16
+ /* @__PURE__ */ jsx(Dropdown.SearchInput, { onSearchChange, onClearInput, placeholder, value, autofocus: focus, iconLeft: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(SearchM, {}) }) }),
19
17
  /* @__PURE__ */ jsx(List, { onSelect, data, noResultMsg })
20
18
  ] });
21
19
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { useState, useCallback } from "react";
3
3
  import Icon from "@synerise/ds-icon";
4
- import * as medium from "@synerise/ds-icon/dist/icons/M";
4
+ import * as medium from "@synerise/ds-icon/dist/icons/M/index";
5
5
  import { loadFontAwesome } from "../utils/loadFontAwesome.js";
6
6
  import { prepareItems } from "../utils/prepareItems.js";
7
7
  import { isDSSourceType, isFASourceType } from "../utils/typeguards.utils.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-icon-picker",
3
- "version": "2.0.12",
3
+ "version": "2.1.1",
4
4
  "description": "IconPicker UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -39,14 +39,14 @@
39
39
  "sideEffects": false,
40
40
  "types": "dist/index.d.ts",
41
41
  "dependencies": {
42
- "@synerise/ds-button": "^2.1.6",
43
- "@synerise/ds-button-group": "^2.0.11",
44
- "@synerise/ds-dropdown": "^2.1.8",
45
- "@synerise/ds-icon": "^2.2.3",
46
- "@synerise/ds-popover": "^2.1.0",
47
- "@synerise/ds-scrollbar": "^2.0.9",
48
- "@synerise/ds-tooltip": "^2.0.11",
49
- "@synerise/ds-utils": "^2.2.2",
42
+ "@synerise/ds-button": "^2.2.1",
43
+ "@synerise/ds-button-group": "^2.1.1",
44
+ "@synerise/ds-dropdown": "^2.2.1",
45
+ "@synerise/ds-icon": "^2.3.1",
46
+ "@synerise/ds-popover": "^2.3.0",
47
+ "@synerise/ds-scrollbar": "^2.1.1",
48
+ "@synerise/ds-tooltip": "^2.1.1",
49
+ "@synerise/ds-utils": "^2.3.1",
50
50
  "memoize-one": "^5.1.1",
51
51
  "react-window": "^1.8.11"
52
52
  },
@@ -64,5 +64,5 @@
64
64
  "react-intl": ">=3.12.0 <= 6.8",
65
65
  "styled-components": "^5.3.3"
66
66
  },
67
- "gitHead": "c356039703d8826bbbdb6dadcb18bb008fea8bc5"
67
+ "gitHead": "2d2a540b35fddf8855da45f0dec2f4612c6d87b6"
68
68
  }