@synerise/ds-image 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-image@2.1.0...@synerise/ds-image@2.1.1) (2026-11-03)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-image
9
+
10
+
11
+
12
+
13
+
14
+ # [2.1.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-image@2.0.12...@synerise/ds-image@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-image@2.0.11...@synerise/ds-image@2.0.12) (2026-10-28)
7
26
 
8
27
  **Note:** Version bump only for package @synerise/ds-image
package/CLAUDE.md CHANGED
@@ -77,10 +77,10 @@ tables.
77
77
  radius + background) clips the image and hover overlay. This lets the delete
78
78
  affordance overhang the corner without being cut off.
79
79
  - **Thumbnail states** — *Hover* (interactive tiles): a full-cover `HoverOverlay`
80
- (`grey-900` at ~30%, alpha `4D`) with a centered white `ShowS` icon, faded in on
81
- `:hover`. *Focused* (`:focus-visible`): a 2px `blue-600` ring via outset
80
+ (`--ds-image-hoveroverlay-bg`) with a centered `ShowS` icon (`--ds-image-hoveroverlay-icon`), faded in on
81
+ `:hover`. *Focused* (`:focus-visible`): a 2px `--ds-color-border-brand-default` ring via outset
82
82
  `box-shadow` (no layout shift; the ring is on the non-clipping `Tile`).
83
- *Hover-deletable* (`deletable`): a bare `DeleteButton` (`<button>`, `red-600`)
83
+ *Hover-deletable* (`deletable`): a bare `DeleteButton` (`<button>`, `--ds-color-icon-danger-default`)
84
84
  rendering a `Close3FullBackgroundM` icon (white X on a red disc — the disc is the
85
85
  icon's `currentColor` fill, driven by the button's `color`), whose **center sits
86
86
  on the tile's top-right corner** (24×24, icon-sized — no extra clickable padding —
@@ -153,5 +153,5 @@ tables.
153
153
  - `@synerise/ds-utils` — `useFocusTrap`.
154
154
  - `react-intl` (peer) — control labels/tooltips via `useImageTexts`.
155
155
  - `react-dom` (peer) — `createPortal` for the preview overlay.
156
- - `@synerise/ds-core` (peer) — theme palette, `box-shadow-*` variables and
157
- `useResolvedOverlayZIndex` (overlay stacking).
156
+ - `@synerise/ds-core` (peer) — `ThemeProps` type and `useResolvedOverlayZIndex`
157
+ (overlay stacking); colours and shadows are `var(--ds-*)` tokens.
@@ -1,13 +1,12 @@
1
1
  import styled, { keyframes } from "styled-components";
2
2
  import { PREVIEW_PADDING } from "./ImagePreview.const.js";
3
3
  const imageFadeIn = /* @__PURE__ */ keyframes(["from{opacity:0;}to{opacity:1;}"]);
4
- const BACKDROP_ALPHA = "CC";
5
4
  const CONTROLS_INSET = 16;
6
5
  const IMAGE_BORDER_RADIUS = 8;
7
6
  const Overlay = /* @__PURE__ */ styled.div.withConfig({
8
7
  displayName: "ImagePreviewstyles__Overlay",
9
8
  componentId: "sc-17aatff-0"
10
- })(["position:fixed;inset:0;z-index:", ";display:flex;align-items:center;justify-content:center;outline:none;background-color:", ";opacity:", ";visibility:", ";pointer-events:", ";transition:opacity 160ms ease,visibility 160ms ease;"], (props) => props.$zIndex, (props) => `${props.theme.palette["grey-900"]}${BACKDROP_ALPHA}`, (props) => props.$hidden ? 0 : 1, (props) => props.$hidden ? "hidden" : "visible", (props) => props.$hidden ? "none" : "auto");
9
+ })(["position:fixed;inset:0;z-index:", ";display:flex;align-items:center;justify-content:center;outline:none;background-color:var(--ds-image-preview-backdrop);opacity:", ";visibility:", ";pointer-events:", ";transition:opacity 160ms ease,visibility 160ms ease;"], (props) => props.$zIndex, (props) => props.$hidden ? 0 : 1, (props) => props.$hidden ? "hidden" : "visible", (props) => props.$hidden ? "none" : "auto");
11
10
  const ImageWrapper = /* @__PURE__ */ styled.div.withConfig({
12
11
  displayName: "ImagePreviewstyles__ImageWrapper",
13
12
  componentId: "sc-17aatff-1"
@@ -15,7 +14,7 @@ const ImageWrapper = /* @__PURE__ */ styled.div.withConfig({
15
14
  const Image = /* @__PURE__ */ styled.img.withConfig({
16
15
  displayName: "ImagePreviewstyles__Image",
17
16
  componentId: "sc-17aatff-2"
18
- })(["max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;user-select:none;border-radius:", "px;box-shadow:", ";animation:", " 200ms ease;"], IMAGE_BORDER_RADIUS, (props) => props.theme.variables["box-shadow-4"], imageFadeIn);
17
+ })(["max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;user-select:none;border-radius:", "px;box-shadow:var(--ds-shadows-shadow-4);animation:", " 200ms ease;"], IMAGE_BORDER_RADIUS, imageFadeIn);
19
18
  const Fallback = /* @__PURE__ */ styled.div.withConfig({
20
19
  displayName: "ImagePreviewstyles__Fallback",
21
20
  componentId: "sc-17aatff-3"
@@ -23,7 +22,7 @@ const Fallback = /* @__PURE__ */ styled.div.withConfig({
23
22
  const FallbackBox = /* @__PURE__ */ styled.div.withConfig({
24
23
  displayName: "ImagePreviewstyles__FallbackBox",
25
24
  componentId: "sc-17aatff-4"
26
- })(["display:flex;align-items:center;justify-content:center;width:240px;height:180px;border-radius:", "px;color:", ";background-color:", ";"], IMAGE_BORDER_RADIUS, (props) => props.theme.palette["grey-600"], (props) => props.theme.palette["grey-050"]);
25
+ })(["display:flex;align-items:center;justify-content:center;width:240px;height:180px;border-radius:", "px;color:var(--ds-image-placeholder-fg);background-color:var(--ds-image-placeholder-bg);"], IMAGE_BORDER_RADIUS);
27
26
  const CloseWrapper = /* @__PURE__ */ styled.div.withConfig({
28
27
  displayName: "ImagePreviewstyles__CloseWrapper",
29
28
  componentId: "sc-17aatff-5"
@@ -1,16 +1,15 @@
1
1
  import styled from "styled-components";
2
2
  import ImageContent from "../shared/ImageContent.js";
3
3
  const TILE_BORDER_RADIUS = 4;
4
- const HOVER_OVERLAY_ALPHA = "4D";
5
4
  const DELETE_BUTTON_SIZE = 24;
6
5
  const Tile = /* @__PURE__ */ styled.div.withConfig({
7
6
  displayName: "Thumbnailstyles__Tile",
8
7
  componentId: "sc-jzlfaw-0"
9
- })(["position:relative;display:inline-flex;margin:0;padding:0;border-radius:", "px;height:", "px;", " cursor:", ";&:focus-visible{outline:none;box-shadow:0 0 0 2px ", ";}"], TILE_BORDER_RADIUS, (props) => props.$height, (props) => props.$aspectRatio ? `aspect-ratio: ${props.$aspectRatio};` : "width: auto;", (props) => props.$interactive ? "pointer" : "default", (props) => props.theme.palette["blue-600"]);
8
+ })(["position:relative;display:inline-flex;margin:0;padding:0;border-radius:", "px;height:", "px;", " cursor:", ";&:focus-visible{outline:none;box-shadow:0 0 0 2px var(--ds-color-border-brand-default);}"], TILE_BORDER_RADIUS, (props) => props.$height, (props) => props.$aspectRatio ? `aspect-ratio: ${props.$aspectRatio};` : "width: auto;", (props) => props.$interactive ? "pointer" : "default");
10
9
  const Clip = /* @__PURE__ */ styled.div.withConfig({
11
10
  displayName: "Thumbnailstyles__Clip",
12
11
  componentId: "sc-jzlfaw-1"
13
- })(["position:relative;display:inline-flex;overflow:hidden;height:100%;", " border-radius:", "px;background-color:", ";"], (props) => props.$source ? "width: auto;" : "width: 100%;", TILE_BORDER_RADIUS, (props) => props.$background === "subtle-grey" ? props.theme.palette["grey-050"] : "transparent");
12
+ })(["position:relative;display:inline-flex;overflow:hidden;height:100%;", " border-radius:", "px;background-color:", ";"], (props) => props.$source ? "width: auto;" : "width: 100%;", TILE_BORDER_RADIUS, (props) => props.$background === "subtle-grey" ? "var(--ds-image-thumbnail-bg)" : "transparent");
14
13
  const ThumbnailImage = /* @__PURE__ */ styled(ImageContent).withConfig({
15
14
  displayName: "Thumbnailstyles__ThumbnailImage",
16
15
  componentId: "sc-jzlfaw-2"
@@ -18,15 +17,15 @@ const ThumbnailImage = /* @__PURE__ */ styled(ImageContent).withConfig({
18
17
  const EmptyPlaceholder = /* @__PURE__ */ styled.div.withConfig({
19
18
  displayName: "Thumbnailstyles__EmptyPlaceholder",
20
19
  componentId: "sc-jzlfaw-3"
21
- })(["display:flex;align-items:center;justify-content:center;width:100%;height:100%;color:", ";background-color:", ";"], (props) => props.theme.palette["grey-600"], (props) => props.theme.palette["grey-050"]);
20
+ })(["display:flex;align-items:center;justify-content:center;width:100%;height:100%;color:var(--ds-image-placeholder-fg);background-color:var(--ds-image-placeholder-bg);"]);
22
21
  const HoverOverlay = /* @__PURE__ */ styled.div.withConfig({
23
22
  displayName: "Thumbnailstyles__HoverOverlay",
24
23
  componentId: "sc-jzlfaw-4"
25
- })(["position:absolute;inset:0;z-index:1;display:flex;align-items:center;justify-content:center;color:", ";background-color:", ";opacity:0;transition:opacity 0.15s ease;", ":hover &{opacity:1;}"], (props) => props.theme.palette.white, (props) => `${props.theme.palette["grey-900"]}${HOVER_OVERLAY_ALPHA}`, Tile);
24
+ })(["position:absolute;inset:0;z-index:1;display:flex;align-items:center;justify-content:center;color:var(--ds-image-hoveroverlay-icon);background-color:var(--ds-image-hoveroverlay-bg);opacity:0;transition:opacity 0.15s ease;", ":hover &{opacity:1;}"], Tile);
26
25
  const DeleteButton = /* @__PURE__ */ styled.button.withConfig({
27
26
  displayName: "Thumbnailstyles__DeleteButton",
28
27
  componentId: "sc-jzlfaw-5"
29
- })(["position:absolute;top:0;right:0;z-index:2;transform:translate(50%,-50%);display:flex;align-items:center;justify-content:center;width:", "px;height:", "px;padding:0;border:none;background:none;cursor:pointer;color:", ";opacity:0;transition:opacity 0.15s ease;", ":hover &,", ":focus-within &{opacity:1;}"], DELETE_BUTTON_SIZE, DELETE_BUTTON_SIZE, (props) => props.theme.palette["red-600"], Tile, Tile);
28
+ })(["position:absolute;top:0;right:0;z-index:2;transform:translate(50%,-50%);display:flex;align-items:center;justify-content:center;width:", "px;height:", "px;padding:0;border:none;background:none;cursor:pointer;color:var(--ds-color-icon-danger-default);opacity:0;transition:opacity 0.15s ease;", ":hover &,", ":focus-within &{opacity:1;}"], DELETE_BUTTON_SIZE, DELETE_BUTTON_SIZE, Tile, Tile);
30
29
  export {
31
30
  Clip,
32
31
  DeleteButton,
@@ -2,7 +2,7 @@ import styled from "styled-components";
2
2
  const DefaultFallback = /* @__PURE__ */ styled.div.withConfig({
3
3
  displayName: "ImageContentstyles__DefaultFallback",
4
4
  componentId: "sc-ea3axh-0"
5
- })(["display:flex;align-items:center;justify-content:center;width:100%;height:100%;color:", ";background-color:", ";"], (props) => props.theme.palette["grey-600"], (props) => props.theme.palette["grey-050"]);
5
+ })(["display:flex;align-items:center;justify-content:center;width:100%;height:100%;color:var(--ds-image-placeholder-fg);background-color:var(--ds-image-placeholder-bg);"]);
6
6
  export {
7
7
  DefaultFallback
8
8
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-image",
3
- "version": "2.0.12",
3
+ "version": "2.1.1",
4
4
  "description": "Image UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -42,10 +42,10 @@
42
42
  ],
43
43
  "types": "dist/index.d.ts",
44
44
  "dependencies": {
45
- "@synerise/ds-icon": "^2.2.3",
46
- "@synerise/ds-toolbar": "^2.0.11",
47
- "@synerise/ds-tooltip": "^2.0.11",
48
- "@synerise/ds-utils": "^2.2.2",
45
+ "@synerise/ds-icon": "^2.3.1",
46
+ "@synerise/ds-toolbar": "^2.1.1",
47
+ "@synerise/ds-tooltip": "^2.1.1",
48
+ "@synerise/ds-utils": "^2.3.1",
49
49
  "react-zoom-pan-pinch": "^3.6.1"
50
50
  },
51
51
  "devDependencies": {
@@ -58,5 +58,5 @@
58
58
  "react-intl": ">=3.12.0 <= 6.8",
59
59
  "styled-components": "^5.3.3"
60
60
  },
61
- "gitHead": "c356039703d8826bbbdb6dadcb18bb008fea8bc5"
61
+ "gitHead": "2d2a540b35fddf8855da45f0dec2f4612c6d87b6"
62
62
  }