@synerise/ds-empty-states 1.0.34 → 1.0.36

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.36](https://github.com/Synerise/synerise-design/compare/@synerise/ds-empty-states@1.0.35...@synerise/ds-empty-states@1.0.36) (2026-03-24)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-empty-states
9
+
10
+ ## [1.0.35](https://github.com/Synerise/synerise-design/compare/@synerise/ds-empty-states@1.0.34...@synerise/ds-empty-states@1.0.35) (2026-03-20)
11
+
12
+ **Note:** Version bump only for package @synerise/ds-empty-states
13
+
6
14
  ## [1.0.34](https://github.com/Synerise/synerise-design/compare/@synerise/ds-empty-states@1.0.33...@synerise/ds-empty-states@1.0.34) (2026-02-19)
7
15
 
8
16
  **Note:** Version bump only for package @synerise/ds-empty-states
package/README.md CHANGED
@@ -28,13 +28,16 @@ import EmptyStates from '@synerise/ds-empty-states'
28
28
 
29
29
  ## API
30
30
 
31
- | Property | Description | Type | Default |
32
- | ------------- | ---------------------------------- | --------------------------------------- | ------- |
33
- | size | Changing size on Icon | 'Xl' / 'L' | M |
34
- | label | text of empty states | string / React.ReactNode | - |
35
- | labelPosition | Defines the position of text | right / bottom | right |
36
- | text | text of Header | string / React.ReactNode | - |
37
- | type | type of icon | `Add` / `NoResults` / `SearchNoResults` | - |
38
- | button | render button | string / React.ReactNode | - |
39
- | fontSize | set size of Header | string / React.ReactNode | - |
40
- | mode | prop to set empty states in center | absolute / undefined | - |
31
+ | Property | Description | Type | Default |
32
+ | ------------- | --------------------------------------------------------- | --------------------------------------- | -------- |
33
+ | size | Icon size | `small` / `medium` | `small` |
34
+ | label | Secondary label text | string / React.ReactNode | - |
35
+ | labelPosition | **@deprecated** has no effect on rendering | `right` / `bottom` | - |
36
+ | text | Header / primary text | string / React.ReactNode | - |
37
+ | button | Action button rendered below label | React.ReactNode | - |
38
+ | fontSize | Header font size (`small` = 14px, `medium` = 18px) | `small` / `medium` | `small` |
39
+ | customIcon | Icon element rendered via `@synerise/ds-icon` | React.ReactElement | - |
40
+ | iconPosition | Position of icon relative to content | `top` / `left` / `right` | `top` |
41
+ | textAlign | Text alignment of the content area | `left` / `center` / `right` / `justify` | `center` |
42
+ | mode | `absolute` positions wrapper at top:50% left:50% | `absolute` | - |
43
+ | className | Additional CSS class (merged with `ds-empty-states`) | string | - |
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { type EmptyStatesProps } from './EmptyStates.types';
1
+ import { default as React } from 'react';
2
+ import { EmptyStatesProps } from './EmptyStates.types';
3
3
  declare const EmptyStates: ({ size, label, text, button, fontSize, customIcon, className, mode, iconPosition, textAlign, }: EmptyStatesProps) => React.JSX.Element;
4
4
  export default EmptyStates;
@@ -1,40 +1,32 @@
1
- var _mapSizeToPx;
2
- import React from 'react';
3
- import Icon from '@synerise/ds-icon';
4
- import * as S from './EmptyStates.styles';
5
- import { EmptyStatesSize } from './EmptyStates.types';
6
- var mapSizeToPx = (_mapSizeToPx = {}, _mapSizeToPx[EmptyStatesSize.SMALL] = 48, _mapSizeToPx[EmptyStatesSize.MEDIUM] = 96, _mapSizeToPx);
7
- var EmptyStates = function EmptyStates(_ref) {
8
- var _ref$size = _ref.size,
9
- size = _ref$size === void 0 ? EmptyStatesSize.SMALL : _ref$size,
10
- label = _ref.label,
11
- text = _ref.text,
12
- button = _ref.button,
13
- fontSize = _ref.fontSize,
14
- customIcon = _ref.customIcon,
15
- className = _ref.className,
16
- mode = _ref.mode,
17
- _ref$iconPosition = _ref.iconPosition,
18
- iconPosition = _ref$iconPosition === void 0 ? 'top' : _ref$iconPosition,
19
- _ref$textAlign = _ref.textAlign,
20
- textAlign = _ref$textAlign === void 0 ? 'center' : _ref$textAlign;
21
- return /*#__PURE__*/React.createElement(S.EmptyStatesWrapper, {
22
- iconPosition: iconPosition,
23
- mode: mode,
24
- className: "ds-empty-states " + className
25
- }, customIcon && /*#__PURE__*/React.createElement(S.EmptyStatesIconContainer, null, /*#__PURE__*/React.createElement(Icon, {
26
- "data-testid": "empty-states-custom-icon",
27
- component: customIcon,
28
- size: mapSizeToPx[size]
29
- })), /*#__PURE__*/React.createElement(S.EmptyStatesContent, {
30
- textAlign: textAlign
31
- }, text && /*#__PURE__*/React.createElement(S.HeaderWrapper, {
32
- hasIcon: Boolean(customIcon),
33
- "data-testid": "empty-states-header",
34
- size: size,
35
- fontSize: fontSize
36
- }, text), label && /*#__PURE__*/React.createElement(S.TextWrapper, {
37
- "data-testid": "empty-states-label"
38
- }, label), button && /*#__PURE__*/React.createElement(S.ButtonWrapper, null, button)));
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import Icon from "@synerise/ds-icon";
3
+ import { EmptyStatesWrapper, EmptyStatesIconContainer, EmptyStatesContent, HeaderWrapper, TextWrapper, ButtonWrapper } from "./EmptyStates.styles.js";
4
+ import { EmptyStatesSize } from "./EmptyStates.types.js";
5
+ const mapSizeToPx = {
6
+ [EmptyStatesSize.SMALL]: 48,
7
+ [EmptyStatesSize.MEDIUM]: 96
8
+ };
9
+ const EmptyStates = ({
10
+ size = EmptyStatesSize.SMALL,
11
+ label,
12
+ text,
13
+ button,
14
+ fontSize,
15
+ customIcon,
16
+ className,
17
+ mode,
18
+ iconPosition = "top",
19
+ textAlign = "center"
20
+ }) => {
21
+ return /* @__PURE__ */ jsxs(EmptyStatesWrapper, { iconPosition, mode, className: `ds-empty-states ${className}`, children: [
22
+ customIcon && /* @__PURE__ */ jsx(EmptyStatesIconContainer, { children: /* @__PURE__ */ jsx(Icon, { "data-testid": "empty-states-custom-icon", component: customIcon, size: mapSizeToPx[size] }) }),
23
+ /* @__PURE__ */ jsxs(EmptyStatesContent, { textAlign, children: [
24
+ text && /* @__PURE__ */ jsx(HeaderWrapper, { hasIcon: Boolean(customIcon), "data-testid": "empty-states-header", size, fontSize, children: text }),
25
+ label && /* @__PURE__ */ jsx(TextWrapper, { "data-testid": "empty-states-label", children: label }),
26
+ button && /* @__PURE__ */ jsx(ButtonWrapper, { children: button })
27
+ ] })
28
+ ] });
29
+ };
30
+ export {
31
+ EmptyStates as default
39
32
  };
40
- export default EmptyStates;
@@ -1,16 +1,16 @@
1
1
  import { EmptyStatesSize } from './EmptyStates.types';
2
- export declare const EmptyStatesIconContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
3
- export declare const TextWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
4
- export declare const HeaderWrapper: import("styled-components").StyledComponent<"div", any, {
2
+ export declare const EmptyStatesIconContainer: import('styled-components').StyledComponent<"div", any, {}, never>;
3
+ export declare const TextWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
4
+ export declare const HeaderWrapper: import('styled-components').StyledComponent<"div", any, {
5
5
  fontSize?: EmptyStatesSize;
6
6
  size?: EmptyStatesSize;
7
7
  hasIcon?: boolean;
8
8
  }, never>;
9
- export declare const ButtonWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
10
- export declare const EmptyStatesWrapper: import("styled-components").StyledComponent<"div", any, {
9
+ export declare const ButtonWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
10
+ export declare const EmptyStatesWrapper: import('styled-components').StyledComponent<"div", any, {
11
11
  iconPosition: "top" | "left" | "right";
12
12
  mode?: "absolute";
13
13
  }, never>;
14
- export declare const EmptyStatesContent: import("styled-components").StyledComponent<"div", any, {
14
+ export declare const EmptyStatesContent: import('styled-components').StyledComponent<"div", any, {
15
15
  textAlign: "left" | "right" | "center" | "justify";
16
16
  }, never>;
@@ -1,57 +1,49 @@
1
- import styled, { css } from 'styled-components';
2
- import { EmptyStatesSize, FontSize } from './EmptyStates.types';
3
- var FONT_SIZE_DEFAULT = 14;
4
- var getFlexStyle = function getFlexStyle(iconPosition) {
5
- return iconPosition === 'top' ? css(["flex-direction:", ";align-items:center;"], mapIconPosition[iconPosition]) : css(["flex-direction:", ";gap:16px;align-items:flex-start;"], mapIconPosition[iconPosition]);
1
+ import styled, { css } from "styled-components";
2
+ import { EmptyStatesSize, FontSize } from "./EmptyStates.types.js";
3
+ const FONT_SIZE_DEFAULT = 14;
4
+ const getFlexStyle = (iconPosition) => {
5
+ return iconPosition === "top" ? css(["flex-direction:", ";align-items:center;"], mapIconPosition[iconPosition]) : css(["flex-direction:", ";gap:16px;align-items:flex-start;"], mapIconPosition[iconPosition]);
6
6
  };
7
- var mapIconPosition = {
8
- right: 'row-reverse',
9
- top: 'column',
10
- left: 'row'
7
+ const mapIconPosition = {
8
+ right: "row-reverse",
9
+ top: "column",
10
+ left: "row"
11
11
  };
12
- var mapTextAlign = {
13
- right: 'flex-end',
14
- left: 'flex-start',
15
- center: 'center',
16
- justify: 'center'
12
+ const mapTextAlign = {
13
+ right: "flex-end",
14
+ left: "flex-start",
15
+ center: "center",
16
+ justify: "center"
17
17
  };
18
- export var EmptyStatesIconContainer = styled.div.withConfig({
18
+ const EmptyStatesIconContainer = /* @__PURE__ */ styled.div.withConfig({
19
19
  displayName: "EmptyStatesstyles__EmptyStatesIconContainer",
20
20
  componentId: "sc-7sb4gr-0"
21
21
  })([""]);
22
- export var TextWrapper = styled.div.withConfig({
22
+ const TextWrapper = /* @__PURE__ */ styled.div.withConfig({
23
23
  displayName: "EmptyStatesstyles__TextWrapper",
24
24
  componentId: "sc-7sb4gr-1"
25
25
  })(["display:flex;line-height:16px;max-width:440px;word-wrap:break-word;padding-bottom:8px;"]);
26
- export var HeaderWrapper = styled.div.withConfig({
26
+ const HeaderWrapper = /* @__PURE__ */ styled.div.withConfig({
27
27
  displayName: "EmptyStatesstyles__HeaderWrapper",
28
28
  componentId: "sc-7sb4gr-2"
29
- })(["display:flex;line-height:16px;margin-top:", ";color:", ";font-size:", "px;font-weight:500;padding-bottom:", ";"], function (props) {
30
- return props.hasIcon && props.size === EmptyStatesSize.SMALL ? '12px' : '';
31
- }, function (props) {
32
- return props.theme.palette['grey-800'];
33
- }, function (props) {
34
- return props.fontSize ? FontSize[props.fontSize] : FONT_SIZE_DEFAULT;
35
- }, function (props) {
36
- return props.fontSize === EmptyStatesSize.SMALL ? '12px' : '18px';
37
- });
38
- export var ButtonWrapper = styled.div.withConfig({
29
+ })(["display:flex;line-height:16px;margin-top:", ";color:", ";font-size:", "px;font-weight:500;padding-bottom:", ";"], (props) => props.hasIcon && props.size === EmptyStatesSize.SMALL ? "12px" : "", (props) => props.theme.palette["grey-800"], (props) => props.fontSize ? FontSize[props.fontSize] : FONT_SIZE_DEFAULT, (props) => props.fontSize === EmptyStatesSize.SMALL ? "12px" : "18px");
30
+ const ButtonWrapper = /* @__PURE__ */ styled.div.withConfig({
39
31
  displayName: "EmptyStatesstyles__ButtonWrapper",
40
32
  componentId: "sc-7sb4gr-3"
41
33
  })(["padding-top:12px;display:flex;"]);
42
- export var EmptyStatesWrapper = styled.div.withConfig({
34
+ const EmptyStatesWrapper = /* @__PURE__ */ styled.div.withConfig({
43
35
  displayName: "EmptyStatesstyles__EmptyStatesWrapper",
44
36
  componentId: "sc-7sb4gr-4"
45
- })(["display:flex;", " ", ";"], function (props) {
46
- return getFlexStyle(props.iconPosition);
47
- }, function (props) {
48
- return props.mode === 'absolute' && css(["position:absolute;top:50%;left:50%;"]);
49
- });
50
- export var EmptyStatesContent = styled.div.withConfig({
37
+ })(["display:flex;", " ", ";"], (props) => getFlexStyle(props.iconPosition), (props) => props.mode === "absolute" && css(["position:absolute;top:50%;left:50%;"]));
38
+ const EmptyStatesContent = /* @__PURE__ */ styled.div.withConfig({
51
39
  displayName: "EmptyStatesstyles__EmptyStatesContent",
52
40
  componentId: "sc-7sb4gr-5"
53
- })(["display:flex;flex-direction:column;text-align:", ";> *{justify-content:", ";}"], function (props) {
54
- return props.textAlign;
55
- }, function (props) {
56
- return mapTextAlign[props.textAlign];
57
- });
41
+ })(["display:flex;flex-direction:column;text-align:", ";> *{justify-content:", ";}"], (props) => props.textAlign, (props) => mapTextAlign[props.textAlign]);
42
+ export {
43
+ ButtonWrapper,
44
+ EmptyStatesContent,
45
+ EmptyStatesIconContainer,
46
+ EmptyStatesWrapper,
47
+ HeaderWrapper,
48
+ TextWrapper
49
+ };
@@ -1,4 +1,4 @@
1
- import { type ReactElement, type ReactNode } from 'react';
1
+ import { ReactElement, ReactNode } from 'react';
2
2
  export type EmptyStatesProps = {
3
3
  size?: EmptyStatesSize;
4
4
  fontSize?: EmptyStatesSize;
@@ -1,8 +1,30 @@
1
- var _IconSize, _FontSize;
2
- export var EmptyStatesSize = /*#__PURE__*/function (EmptyStatesSize) {
3
- EmptyStatesSize["SMALL"] = "small";
4
- EmptyStatesSize["MEDIUM"] = "medium";
5
- return EmptyStatesSize;
6
- }({});
7
- export var IconSize = (_IconSize = {}, _IconSize[EmptyStatesSize.SMALL] = 48, _IconSize[EmptyStatesSize.MEDIUM] = 96, _IconSize);
8
- export var FontSize = (_FontSize = {}, _FontSize[EmptyStatesSize.SMALL] = 14, _FontSize[EmptyStatesSize.MEDIUM] = 18, _FontSize);
1
+ var EmptyStatesSize = /* @__PURE__ */ ((EmptyStatesSize2) => {
2
+ EmptyStatesSize2["SMALL"] = "small";
3
+ EmptyStatesSize2["MEDIUM"] = "medium";
4
+ return EmptyStatesSize2;
5
+ })(EmptyStatesSize || {});
6
+ const IconSize = {
7
+ [
8
+ "small"
9
+ /* SMALL */
10
+ ]: 48,
11
+ [
12
+ "medium"
13
+ /* MEDIUM */
14
+ ]: 96
15
+ };
16
+ const FontSize = {
17
+ [
18
+ "small"
19
+ /* SMALL */
20
+ ]: 14,
21
+ [
22
+ "medium"
23
+ /* MEDIUM */
24
+ ]: 18
25
+ };
26
+ export {
27
+ EmptyStatesSize,
28
+ FontSize,
29
+ IconSize
30
+ };
package/dist/index.js CHANGED
@@ -1,2 +1,8 @@
1
- export { default } from './EmptyStates';
2
- export * from './EmptyStates.types';
1
+ import { default as default2 } from "./EmptyStates.js";
2
+ import { EmptyStatesSize, FontSize, IconSize } from "./EmptyStates.types.js";
3
+ export {
4
+ EmptyStatesSize,
5
+ FontSize,
6
+ IconSize,
7
+ default2 as default
8
+ };
package/dist/modules.d.js CHANGED
@@ -1 +1 @@
1
- import '@testing-library/jest-dom';
1
+ import "@testing-library/jest-dom";
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-empty-states",
3
- "version": "1.0.34",
3
+ "version": "1.0.36",
4
4
  "description": "EmptyStates 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,12 +35,12 @@
35
35
  ],
36
36
  "types": "dist/index.d.ts",
37
37
  "dependencies": {
38
- "@synerise/ds-icon": "^1.14.1"
38
+ "@synerise/ds-icon": "^1.15.1"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@synerise/ds-core": "*",
42
42
  "react": ">=16.9.0 <= 18.3.1",
43
43
  "styled-components": "^5.3.3"
44
44
  },
45
- "gitHead": "b3d1312cbfbe69aba1cb5667b54be7f76938156c"
45
+ "gitHead": "e4ecca8944fc9b41c1b9d59c8bcad5e5e2013225"
46
46
  }