@synerise/ds-short-cuts 2.0.11 → 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 +19 -0
- package/CLAUDE.md +2 -2
- package/dist/ShortCuts.js +1 -2
- package/dist/ShortCuts.style.js +1 -1
- package/package.json +5 -5
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-short-cuts@2.1.0...@synerise/ds-short-cuts@2.1.1) (2026-11-03)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-short-cuts
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [2.1.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-short-cuts@2.0.11...@synerise/ds-short-cuts@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.11](https://github.com/Synerise/synerise-design/compare/@synerise/ds-short-cuts@2.0.10...@synerise/ds-short-cuts@2.0.11) (2026-10-28)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @synerise/ds-short-cuts
|
package/CLAUDE.md
CHANGED
|
@@ -23,7 +23,7 @@ src/
|
|
|
23
23
|
| Prop | Type | Default | Description |
|
|
24
24
|
|------|------|---------|-------------|
|
|
25
25
|
| `size` | `'S' \| 'L'` | `'L'` | `L` = 24px height, `S` = 18px height |
|
|
26
|
-
| `color` | `'light' \| 'dark'` | — |
|
|
26
|
+
| `color` | `'light' \| 'dark'` | — | Selects the `--ds-shortcut-theme-light-*` or `--ds-shortcut-theme-dark-*` token set (bg, border, text, shadow) |
|
|
27
27
|
| `autoWidth` | `boolean` | — | When `false` (default), width equals height (square); when `true`, width is `auto` |
|
|
28
28
|
| `icon` | `ReactNode` | — | Icon to display (mutually exclusive with `children`) |
|
|
29
29
|
| `children` | `ReactNode` | — | Text label to display (mutually exclusive with `icon`) |
|
|
@@ -52,7 +52,7 @@ import { ArrowUpM } from '@synerise/ds-icon';
|
|
|
52
52
|
|
|
53
53
|
## Styling
|
|
54
54
|
|
|
55
|
-
`ShortCuts.style.ts`. The `Wrapper` is a flex `div` centered on both axes. Padding and width are computed via `getPadding()` and `getWidth()` helper functions based on `size` and `isIcon`.
|
|
55
|
+
`ShortCuts.style.ts`. The `Wrapper` is a flex `div` centered on both axes. Padding and width are computed via `getPadding()` and `getWidth()` helper functions based on `size` and `isIcon`. Background, border, text colour and box-shadow come from `--ds-shortcut-theme-{light|dark}-{bg,border,text,shadow}` tokens (the `theme` name is the Figma variant, not the colour mode). Font size is hardcoded `11px`.
|
|
56
56
|
|
|
57
57
|
## Key dependencies
|
|
58
58
|
|
package/dist/ShortCuts.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { theme } from "@synerise/ds-core";
|
|
3
2
|
import Icon from "@synerise/ds-icon";
|
|
4
3
|
import { Text } from "@synerise/ds-typography";
|
|
5
4
|
import { Wrapper } from "./ShortCuts.style.js";
|
|
@@ -11,7 +10,7 @@ const ShortCuts = ({
|
|
|
11
10
|
autoWidth,
|
|
12
11
|
...htmlAttributes
|
|
13
12
|
}) => {
|
|
14
|
-
return /* @__PURE__ */ jsx(Wrapper, { color, size, autoWidth, isIcon: Boolean(icon), ...htmlAttributes, children: icon ? /* @__PURE__ */ jsx(Icon, { color: color === "dark" ?
|
|
13
|
+
return /* @__PURE__ */ jsx(Wrapper, { color, size, autoWidth, isIcon: Boolean(icon), ...htmlAttributes, children: icon ? /* @__PURE__ */ jsx(Icon, { color: color === "dark" ? "var(--ds-color-icon-base-onsolid)" : "var(--ds-color-icon-base-default)", component: icon, size: 12 }) : /* @__PURE__ */ jsx(Text, { size: "xsmall", children }) });
|
|
15
14
|
};
|
|
16
15
|
export {
|
|
17
16
|
ShortCuts as default
|
package/dist/ShortCuts.style.js
CHANGED
|
@@ -25,7 +25,7 @@ const getWidth = (props) => {
|
|
|
25
25
|
const Wrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
26
26
|
displayName: "ShortCutsstyle__Wrapper",
|
|
27
27
|
componentId: "sc-vo5qxe-0"
|
|
28
|
-
})(["box-sizing:border-box;display:flex;align-items:center;justify-content:center;height:", ";width:", ";background-color:", ";border-bottom:1px solid ", ";border-radius:3px;color:", ";padding:", ";font-size:11px;box-shadow:
|
|
28
|
+
})(["box-sizing:border-box;display:flex;align-items:center;justify-content:center;height:", ";width:", ";background-color:", ";border-bottom:1px solid ", ";border-radius:3px;color:", ";padding:", ";font-size:11px;box-shadow:", ";"], (props) => props.size === "S" ? "18px" : "24px", (props) => getWidth(props), (props) => `var(--ds-shortcut-theme-${props.color === "dark" ? "dark" : "light"}-bg)`, (props) => `var(--ds-shortcut-theme-${props.color === "dark" ? "dark" : "light"}-border)`, (props) => `var(--ds-shortcut-theme-${props.color === "dark" ? "dark" : "light"}-text)`, (props) => getPadding(props), (props) => `var(--ds-shortcut-theme-${props.color === "dark" ? "dark" : "light"}-shadow)`);
|
|
29
29
|
export {
|
|
30
30
|
Wrapper
|
|
31
31
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-short-cuts",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "ShortCuts UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
],
|
|
43
43
|
"types": "dist/index.d.ts",
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@synerise/ds-icon": "^2.
|
|
46
|
-
"@synerise/ds-typography": "^2.
|
|
47
|
-
"@synerise/ds-utils": "^2.
|
|
45
|
+
"@synerise/ds-icon": "^2.3.1",
|
|
46
|
+
"@synerise/ds-typography": "^2.1.1",
|
|
47
|
+
"@synerise/ds-utils": "^2.3.1"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"vitest": "4"
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"react": ">=16.9.0 <= 18.3.1",
|
|
55
55
|
"styled-components": "^5.3.3"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "2d2a540b35fddf8855da45f0dec2f4612c6d87b6"
|
|
58
58
|
}
|