@synerise/ds-short-cuts 1.0.40 → 1.0.42

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,14 @@
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
+ ## [1.0.42](https://github.com/Synerise/synerise-design/compare/@synerise/ds-short-cuts@1.0.41...@synerise/ds-short-cuts@1.0.42) (2026-03-24)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-short-cuts
9
+
10
+ ## [1.0.41](https://github.com/Synerise/synerise-design/compare/@synerise/ds-short-cuts@1.0.40...@synerise/ds-short-cuts@1.0.41) (2026-03-20)
11
+
12
+ **Note:** Version bump only for package @synerise/ds-short-cuts
13
+
6
14
  ## [1.0.40](https://github.com/Synerise/synerise-design/compare/@synerise/ds-short-cuts@1.0.39...@synerise/ds-short-cuts@1.0.40) (2026-03-09)
7
15
 
8
16
  **Note:** Version bump only for package @synerise/ds-short-cuts
package/README.md CHANGED
@@ -28,9 +28,10 @@ import ShortCuts from '@synerise/ds-short-cuts'
28
28
 
29
29
  ## API
30
30
 
31
- | Property | Description | Type | Default |
32
- | size | sizes of short cut | `S` , `L` | `L` |
33
- | children | content to display | ReactNode | - |
34
- | color | type of colors | string | - |
35
- | icon | icon to display | ReactNode | - |
36
- | autoWidth | auto width for more text | boolean | `false` |
31
+ | Property | Description | Type | Default |
32
+ | --------- | ---------------------------------------------------------- | ---------------------- | ------- |
33
+ | size | Size of the shortcut badge | `'S'` \| `'L'` | `L` |
34
+ | color | Color variant | `'light'` \| `'dark'` | - |
35
+ | children | Text label to display (mutually exclusive with `icon`) | ReactNode | - |
36
+ | icon | Icon to display (mutually exclusive with `children`) | ReactNode | - |
37
+ | autoWidth | When true, width is `auto`; when false, width equals height | boolean | `false` |
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { type ShortCutsProps } from './ShortCuts.types';
1
+ import { default as React } from 'react';
2
+ import { ShortCutsProps } from './ShortCuts.types';
3
3
  declare const ShortCuts: ({ size, children, color, icon, autoWidth, ...htmlAttributes }: ShortCutsProps) => React.JSX.Element;
4
4
  export default ShortCuts;
package/dist/ShortCuts.js CHANGED
@@ -1,30 +1,18 @@
1
- var _excluded = ["size", "children", "color", "icon", "autoWidth"];
2
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
- import React from 'react';
5
- import { theme } from '@synerise/ds-core';
6
- import Icon from '@synerise/ds-icon';
7
- import { Text } from '@synerise/ds-typography';
8
- import * as S from './ShortCuts.style';
9
- var ShortCuts = function ShortCuts(_ref) {
10
- var _ref$size = _ref.size,
11
- size = _ref$size === void 0 ? 'L' : _ref$size,
12
- children = _ref.children,
13
- color = _ref.color,
14
- icon = _ref.icon,
15
- autoWidth = _ref.autoWidth,
16
- htmlAttributes = _objectWithoutPropertiesLoose(_ref, _excluded);
17
- return /*#__PURE__*/React.createElement(S.Wrapper, _extends({
18
- color: color,
19
- size: size,
20
- autoWidth: autoWidth,
21
- isIcon: Boolean(icon)
22
- }, htmlAttributes), icon ? /*#__PURE__*/React.createElement(Icon, {
23
- color: color === 'dark' ? theme.palette.white : theme.palette['grey-600'],
24
- component: icon,
25
- size: 12
26
- }) : /*#__PURE__*/React.createElement(Text, {
27
- size: "xsmall"
28
- }, children));
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { theme } from "@synerise/ds-core";
3
+ import Icon from "@synerise/ds-icon";
4
+ import { Text } from "@synerise/ds-typography";
5
+ import { Wrapper } from "./ShortCuts.style.js";
6
+ const ShortCuts = ({
7
+ size = "L",
8
+ children,
9
+ color,
10
+ icon,
11
+ autoWidth,
12
+ ...htmlAttributes
13
+ }) => {
14
+ return /* @__PURE__ */ jsx(Wrapper, { color, size, autoWidth, isIcon: Boolean(icon), ...htmlAttributes, children: icon ? /* @__PURE__ */ jsx(Icon, { color: color === "dark" ? theme.palette.white : theme.palette["grey-600"], component: icon, size: 12 }) : /* @__PURE__ */ jsx(Text, { size: "xsmall", children }) });
15
+ };
16
+ export {
17
+ ShortCuts as default
29
18
  };
30
- export default ShortCuts;
@@ -1,4 +1,4 @@
1
- export declare const Wrapper: import("styled-components").StyledComponent<"div", any, {
1
+ export declare const Wrapper: import('styled-components').StyledComponent<"div", any, {
2
2
  size?: "S" | "L";
3
3
  color?: "dark" | "light";
4
4
  autoWidth?: boolean;
@@ -1,42 +1,31 @@
1
- import styled from 'styled-components';
2
- var getPadding = function getPadding(props) {
3
- if (props.size === 'S') {
1
+ import styled from "styled-components";
2
+ const getPadding = (props) => {
3
+ if (props.size === "S") {
4
4
  if (props.isIcon) {
5
- return '3px 3px 2px';
5
+ return "3px 3px 2px";
6
6
  }
7
- return '1px 4px 0';
7
+ return "1px 4px 0";
8
8
  }
9
9
  if (props.isIcon) {
10
- return '6px 6px 5px';
10
+ return "6px 6px 5px";
11
11
  }
12
- return '4px 8px 3px';
12
+ return "4px 8px 3px";
13
13
  };
14
- var getWidth = function getWidth(props) {
14
+ const getWidth = (props) => {
15
15
  if (!props.autoWidth) {
16
- if (props.size === 'L') {
17
- return '24px';
16
+ if (props.size === "L") {
17
+ return "24px";
18
18
  }
19
- if (props.size === 'S') {
20
- return '18px';
19
+ if (props.size === "S") {
20
+ return "18px";
21
21
  }
22
22
  }
23
- return 'auto';
23
+ return "auto";
24
24
  };
25
- export var Wrapper = styled.div.withConfig({
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:0px 1px 8px 0px rgba( 35,41,54,", " );"], function (props) {
29
- return props.size === 'S' ? '18px' : '24px';
30
- }, function (props) {
31
- return getWidth(props);
32
- }, function (props) {
33
- return props.color === 'dark' ? props.theme.palette['grey-600'] : props.theme.palette.white;
34
- }, function (props) {
35
- return props.color === 'dark' ? props.theme.palette['grey-500'] : props.theme.palette['grey-300'];
36
- }, function (props) {
37
- return props.color === 'dark' ? props.theme.palette.white : props.theme.palette['grey-600'];
38
- }, function (props) {
39
- return getPadding(props);
40
- }, function (props) {
41
- return props.color === 'dark' ? '0.5' : '0.08';
42
- });
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:0px 1px 8px 0px rgba( 35,41,54,", " );"], (props) => props.size === "S" ? "18px" : "24px", (props) => getWidth(props), (props) => props.color === "dark" ? props.theme.palette["grey-600"] : props.theme.palette.white, (props) => props.color === "dark" ? props.theme.palette["grey-500"] : props.theme.palette["grey-300"], (props) => props.color === "dark" ? props.theme.palette.white : props.theme.palette["grey-600"], (props) => getPadding(props), (props) => props.color === "dark" ? "0.5" : "0.08");
29
+ export {
30
+ Wrapper
31
+ };
@@ -1,5 +1,5 @@
1
- import { type ReactNode } from 'react';
2
- import { type ExactlyOne, type WithHTMLAttributes } from '@synerise/ds-utils';
1
+ import { ReactNode } from 'react';
2
+ import { ExactlyOne, WithHTMLAttributes } from '@synerise/ds-utils';
3
3
  export type ShortCutsProps = WithHTMLAttributes<HTMLDivElement, {
4
4
  size?: 'S' | 'L';
5
5
  color?: 'light' | 'dark';
@@ -1 +1 @@
1
- export {};
1
+
package/dist/index.js CHANGED
@@ -1 +1,4 @@
1
- export { default } from './ShortCuts';
1
+ import { default as default2 } from "./ShortCuts.js";
2
+ export {
3
+ default2 as default
4
+ };
package/dist/modules.d.js CHANGED
@@ -1 +1 @@
1
- import '@testing-library/jest-dom/extend-expect';
1
+ import "@testing-library/jest-dom/extend-expect";
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-short-cuts",
3
- "version": "1.0.40",
3
+ "version": "1.0.42",
4
4
  "description": "ShortCuts UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -16,10 +16,10 @@
16
16
  "access": "public"
17
17
  },
18
18
  "scripts": {
19
- "build": "pnpm run build:js && pnpm run build:css && pnpm run defs",
19
+ "build": "vite build",
20
20
  "build:css": "node ../../../scripts/style/less.js",
21
21
  "build:js": "babel --delete-dir-on-start --root-mode upward src --out-dir dist --extensions '.js,.ts,.tsx'",
22
- "build:watch": "pnpm run build:js -- --watch",
22
+ "build:watch": "vite build --watch",
23
23
  "defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
24
24
  "pack:ci": "pnpm pack --pack-destination ../../storybook/storybook-static/static",
25
25
  "prepublish": "pnpm run build",
@@ -35,15 +35,16 @@
35
35
  ],
36
36
  "types": "dist/index.d.ts",
37
37
  "dependencies": {
38
- "@synerise/ds-icon": "^1.14.1",
39
- "@synerise/ds-typography": "^1.1.11"
38
+ "@synerise/ds-icon": "^1.15.1",
39
+ "@synerise/ds-typography": "^1.1.13"
40
40
  },
41
41
  "devDependencies": {
42
- "@synerise/ds-utils": "^1.6.0"
42
+ "@synerise/ds-utils": "^1.7.1"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "@synerise/ds-core": "*",
46
- "react": ">=16.9.0 <= 18.3.1"
46
+ "react": ">=16.9.0 <= 18.3.1",
47
+ "styled-components": "^5.3.3"
47
48
  },
48
- "gitHead": "8dfafc5d7278f09d430f1e7499782d05c76b47c0"
49
+ "gitHead": "e4ecca8944fc9b41c1b9d59c8bcad5e5e2013225"
49
50
  }