@synerise/ds-color-picker 2.0.13 → 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-color-picker@2.0.14...@synerise/ds-color-picker@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.14](https://github.com/Synerise/synerise-design/compare/@synerise/ds-color-picker@2.0.13...@synerise/ds-color-picker@2.0.14) (2026-10-28)
18
+
19
+ **Note:** Version bump only for package @synerise/ds-color-picker
20
+
21
+
22
+
23
+
24
+
6
25
  ## [2.0.13](https://github.com/Synerise/synerise-design/compare/@synerise/ds-color-picker@2.0.12...@synerise/ds-color-picker@2.0.13) (2026-10-26)
7
26
 
8
27
  **Note:** Version bump only for package @synerise/ds-color-picker
package/CLAUDE.md CHANGED
@@ -85,11 +85,11 @@ const [savedColors, setSavedColors] = useState<string[]>([]);
85
85
 
86
86
  ## Styling
87
87
 
88
- All styles are in `ColorPicker.styles.ts`. Uses `theme.palette` tokens for borders, backgrounds, and text. `react-colorful` internal class names (`.react-colorful__*`) are overridden directly inside the `Container` styled-component.
88
+ All styles are in `ColorPicker.styles.ts`. Uses `var(--ds-*)` tokens (mostly the shared `--ds-form-field-*` ones, plus `--ds-dropdown-bg`) for borders, backgrounds, and text. `react-colorful` internal class names (`.react-colorful__*`) are overridden directly inside the `Container` styled-component.
89
89
 
90
90
  `ColorPickerModalStyle` is a `createGlobalStyle` that targets `.color-picker-overlay` — it is only injected into the DOM when `maxWidth >= 228`. This is a **global CSS side-effect**.
91
91
 
92
- The saved-colour **swatch section** is built from plain styled elements matching the Figma spec (16×16, `border-radius: 3px`): `SwatchCreatorButton` (the "+" button, `<button>` — hover shows a `grey-200` background), `Swatch` (a filled `<button>` whose `background-color` is the saved colour; the selected one renders a centred `SwatchDot`), and `SwatchPlaceholder` (an empty `<div>` slot with a `grey-300` border, `grey-400` on hover). It does **not** use `ds-tags`/`ds-button` for swatches. Filled swatches carry `.ds-color-swatch`; empty slots carry `.ds-color-swatch-placeholder`.
92
+ The saved-colour **swatch section** is built from plain styled elements matching the Figma spec (16×16, `border-radius: 3px`): `SwatchCreatorButton` (the "+" button, `<button>` — hover shows a `--ds-color-background-base-mutedhover` background), `Swatch` (a filled `<button>` whose `background-color` is the saved colour; the selected one renders a centred `SwatchDot`), and `SwatchPlaceholder` (an empty `<div>` slot with a `--ds-form-field-affix-border` border, no hover change). It does **not** use `ds-tags`/`ds-button` for swatches. Filled swatches carry `.ds-color-swatch`; empty slots carry `.ds-color-swatch-placeholder`.
93
93
 
94
94
  ## Key dependencies
95
95
 
@@ -7,7 +7,7 @@ const SIZE_DEFAULT = 168;
7
7
  const Container = /* @__PURE__ */ styled.div.withConfig({
8
8
  displayName: "ColorPickerstyles__Container",
9
9
  componentId: "sc-1iu8b6j-0"
10
- })(["width:100%;@media (min-width:200px){min-width:200px;background-color:", ";}.react-colorful__last-control{margin:24px 56px 8px 17px;border-radius:4px;height:8px;}.react-colorful__saturation{border-bottom:0px;border-radius:4px 4px 0 0;height:96px;.react-colorful__interactive{width:100%;height:100%;}}.react-colorful__pointer{width:16px;height:16px;}.react-colorful{width:100%;height:", "px;}.react-colorful__hue-pointer{border:1px solid ", ";box-shadow:none !important;.react-colorful__pointer-fill{background-color:", " !important;}}.ant-divider-horizontal{margin:16px 0px;}"], (props) => props.theme.palette.white, (props) => props.size ? ColorPickerSize[props.size] : SIZE_DEFAULT, (props) => props.theme.palette["grey-300"], (props) => props.theme.palette.white);
10
+ })(["width:100%;@media (min-width:200px){min-width:200px;background-color:var(--ds-dropdown-bg);}.react-colorful__last-control{margin:24px 56px 8px 17px;border-radius:4px;height:8px;}.react-colorful__saturation{border-bottom:0px;border-radius:4px 4px 0 0;height:96px;.react-colorful__interactive{width:100%;height:100%;}}.react-colorful__pointer{width:16px;height:16px;}.react-colorful{width:100%;height:", "px;}.react-colorful__hue-pointer{border:1px solid var(--ds-form-field-affix-border);box-shadow:none !important;.react-colorful__pointer-fill{background-color:var(--ds-form-field-bg-default) !important;}}.ant-divider-horizontal{margin:16px 0px;}"], (props) => props.size ? ColorPickerSize[props.size] : SIZE_DEFAULT);
11
11
  const SubContainer = /* @__PURE__ */ styled.div.withConfig({
12
12
  displayName: "ColorPickerstyles__SubContainer",
13
13
  componentId: "sc-1iu8b6j-1"
@@ -15,24 +15,24 @@ const SubContainer = /* @__PURE__ */ styled.div.withConfig({
15
15
  const ColorTag = /* @__PURE__ */ styled(Tag).withConfig({
16
16
  displayName: "ColorPickerstyles__ColorTag",
17
17
  componentId: "sc-1iu8b6j-2"
18
- })(["width:16px;height:16px;border:1px solid ", ";"], (props) => props.theme.palette["grey-300"]);
18
+ })(["width:16px;height:16px;border:1px solid var(--ds-form-field-affix-border);"]);
19
19
  const SWATCH_SIZE = 16;
20
20
  const SwatchCreatorButton = /* @__PURE__ */ styled.button.withConfig({
21
21
  displayName: "ColorPickerstyles__SwatchCreatorButton",
22
22
  componentId: "sc-1iu8b6j-3"
23
- })(["display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:", "px;height:", "px;padding:0;border:none;border-radius:3px;background-color:transparent;color:", ";cursor:pointer;transition:background-color 0.2s ease;&:hover{background-color:", ";}&:focus-visible{outline:1px solid ", ";outline-offset:1px;}"], SWATCH_SIZE, SWATCH_SIZE, (props) => props.theme.palette["grey-800"], (props) => props.theme.palette["grey-200"], (props) => props.theme.palette["blue-600"]);
23
+ })(["display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:", "px;height:", "px;padding:0;border:none;border-radius:3px;background-color:transparent;color:var(--ds-color-icon-base-default);cursor:pointer;transition:background-color 0.2s ease;&:hover{background-color:var(--ds-color-background-base-mutedhover);}&:focus-visible{outline:1px solid var(--ds-form-field-border-focus);outline-offset:1px;}"], SWATCH_SIZE, SWATCH_SIZE);
24
24
  const Swatch = /* @__PURE__ */ styled.button.withConfig({
25
25
  displayName: "ColorPickerstyles__Swatch",
26
26
  componentId: "sc-1iu8b6j-4"
27
- })(["display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:", "px;height:", "px;padding:0;border:1px solid transparent;border-radius:3px;cursor:pointer;&:focus-visible{outline:1px solid ", ";outline-offset:1px;}"], SWATCH_SIZE, SWATCH_SIZE, (props) => props.theme.palette["blue-600"]);
27
+ })(["display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:", "px;height:", "px;padding:0;border:1px solid transparent;border-radius:3px;cursor:pointer;&:focus-visible{outline:1px solid var(--ds-form-field-border-focus);outline-offset:1px;}"], SWATCH_SIZE, SWATCH_SIZE);
28
28
  const SwatchDot = /* @__PURE__ */ styled.span.withConfig({
29
29
  displayName: "ColorPickerstyles__SwatchDot",
30
30
  componentId: "sc-1iu8b6j-5"
31
- })(["width:4px;height:4px;border-radius:50%;background-color:", ";"], (props) => props.theme.palette.white);
31
+ })(["width:4px;height:4px;border-radius:50%;background-color:var(--ds-color-icon-base-onsolid);"]);
32
32
  const SwatchPlaceholder = /* @__PURE__ */ styled.div.withConfig({
33
33
  displayName: "ColorPickerstyles__SwatchPlaceholder",
34
34
  componentId: "sc-1iu8b6j-6"
35
- })(["flex:0 0 auto;width:", "px;height:", "px;border:1px solid ", ";border-radius:3px;"], SWATCH_SIZE, SWATCH_SIZE, (props) => props.theme.palette["grey-300"]);
35
+ })(["flex:0 0 auto;width:", "px;height:", "px;border:1px solid var(--ds-form-field-affix-border);border-radius:3px;"], SWATCH_SIZE, SWATCH_SIZE);
36
36
  const StyledCopyIcon = /* @__PURE__ */ styled(CopyIcon).withConfig({
37
37
  displayName: "ColorPickerstyles__StyledCopyIcon",
38
38
  componentId: "sc-1iu8b6j-7"
@@ -44,11 +44,11 @@ const ColorPickerInput = /* @__PURE__ */ styled(Input).withConfig({
44
44
  const ColorPickerSelect = /* @__PURE__ */ styled(Input).withConfig({
45
45
  displayName: "ColorPickerstyles__ColorPickerSelect",
46
46
  componentId: "sc-1iu8b6j-9"
47
- })(["&&&{width:100px;input{box-shadow:none;font-variant-numeric:tabular-nums;}}"]);
47
+ })(["&&&{width:100px;input{font-variant-numeric:tabular-nums;}}"]);
48
48
  const PrefixTag = /* @__PURE__ */ styled.div.withConfig({
49
49
  displayName: "ColorPickerstyles__PrefixTag",
50
50
  componentId: "sc-1iu8b6j-10"
51
- })(["&&& .ds-tag{margin:0;width:24px;height:24px;border:1px solid ", ";cursor:auto;&:hover:before{cursor:auto;filter:brightness(100%);}}position:absolute;right:16px;top:", "px;z-index:2;cursor:auto;"], (props) => props.theme.palette["grey-300"], (props) => (props.size ? ColorPickerSize[props.size] : SIZE_DEFAULT) - 25);
51
+ })(["&&& .ds-tag{margin:0;width:24px;height:24px;border:1px solid var(--ds-form-field-affix-border);cursor:auto;&:hover:before{cursor:auto;filter:brightness(100%);}}position:absolute;right:16px;top:", "px;z-index:2;cursor:auto;"], (props) => (props.size ? ColorPickerSize[props.size] : SIZE_DEFAULT) - 25);
52
52
  const SwatchSectionWrapper = /* @__PURE__ */ styled.div.withConfig({
53
53
  displayName: "ColorPickerstyles__SwatchSectionWrapper",
54
54
  componentId: "sc-1iu8b6j-11"
@@ -56,7 +56,7 @@ const SwatchSectionWrapper = /* @__PURE__ */ styled.div.withConfig({
56
56
  const PreffixWrapper = /* @__PURE__ */ styled.div.withConfig({
57
57
  displayName: "ColorPickerstyles__PreffixWrapper",
58
58
  componentId: "sc-1iu8b6j-12"
59
- })(["margin:0px 12px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:", ";"], (props) => props.theme.palette["grey-500"]);
59
+ })(["margin:0px 12px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--ds-form-field-affix-text);"]);
60
60
  const ValueWrapper = /* @__PURE__ */ styled.div.withConfig({
61
61
  displayName: "ColorPickerstyles__ValueWrapper",
62
62
  componentId: "sc-1iu8b6j-13"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-color-picker",
3
- "version": "2.0.13",
3
+ "version": "2.1.0",
4
4
  "description": "Color-Picker Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -42,15 +42,15 @@
42
42
  ],
43
43
  "types": "dist/index.d.ts",
44
44
  "dependencies": {
45
- "@synerise/ds-copy-icon": "^2.0.10",
46
- "@synerise/ds-divider": "^2.0.10",
47
- "@synerise/ds-dropdown": "^2.1.7",
48
- "@synerise/ds-form-field": "^2.0.10",
49
- "@synerise/ds-icon": "^2.2.3",
50
- "@synerise/ds-input": "^2.0.11",
51
- "@synerise/ds-tags": "^2.0.13",
52
- "@synerise/ds-tooltip": "^2.0.10",
53
- "@synerise/ds-utils": "^2.2.2",
45
+ "@synerise/ds-copy-icon": "^2.1.0",
46
+ "@synerise/ds-divider": "^2.1.0",
47
+ "@synerise/ds-dropdown": "^2.2.0",
48
+ "@synerise/ds-form-field": "^2.1.0",
49
+ "@synerise/ds-icon": "^2.3.0",
50
+ "@synerise/ds-input": "^2.1.0",
51
+ "@synerise/ds-tags": "^2.1.0",
52
+ "@synerise/ds-tooltip": "^2.1.0",
53
+ "@synerise/ds-utils": "^2.3.0",
54
54
  "react-colorful": "^5.2.0"
55
55
  },
56
56
  "devDependencies": {
@@ -61,5 +61,5 @@
61
61
  "react": ">=16.9.0 <= 18.3.1",
62
62
  "styled-components": "^5.3.3"
63
63
  },
64
- "gitHead": "5ac0f7dcb7c3995b402c86c087d8f32770f80a1d"
64
+ "gitHead": "5c3d61e30289486d14c7d6becb682e2d4a08ce41"
65
65
  }