@synerise/ds-action-area 1.0.47 → 1.0.49

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.49](https://github.com/Synerise/synerise-design/compare/@synerise/ds-action-area@1.0.48...@synerise/ds-action-area@1.0.49) (2026-04-01)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-action-area
9
+
10
+ ## [1.0.48](https://github.com/Synerise/synerise-design/compare/@synerise/ds-action-area@1.0.47...@synerise/ds-action-area@1.0.48) (2026-03-24)
11
+
12
+ **Note:** Version bump only for package @synerise/ds-action-area
13
+
6
14
  ## [1.0.47](https://github.com/Synerise/synerise-design/compare/@synerise/ds-action-area@1.0.46...@synerise/ds-action-area@1.0.47) (2026-03-20)
7
15
 
8
16
  **Note:** Version bump only for package @synerise/ds-action-area
@@ -1,13 +1,13 @@
1
- import React from 'react';
2
- import type { ActionAreaProps } from './ActionArea.types';
1
+ import { default as React } from 'react';
2
+ import { ActionAreaProps } from './ActionArea.types';
3
3
  declare const ActionArea: {
4
4
  ({ label, description, isFullWidth, isError, errorText, className, style, ...rest }: ActionAreaProps): React.JSX.Element;
5
- ActionAreaWrapper: import("styled-components").StyledComponent<"div", any, {
5
+ ActionAreaWrapper: import('styled-components').StyledComponent<"div", any, {
6
6
  isFullWidth?: boolean;
7
7
  }, never>;
8
- ActionAreaContent: import("styled-components").StyledComponent<"div", any, {
8
+ ActionAreaContent: import('styled-components').StyledComponent<"div", any, {
9
9
  isError?: boolean;
10
10
  }, never>;
11
- ErrorText: import("styled-components").StyledComponent<"div", any, {}, never>;
11
+ ErrorText: import('styled-components').StyledComponent<"div", any, {}, never>;
12
12
  };
13
13
  export default ActionArea;
@@ -1,35 +1,32 @@
1
- var _excluded = ["label", "description", "isFullWidth", "isError", "errorText", "className", "style"];
2
- 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; }
3
- import classnames from 'classnames';
4
- import React from 'react';
5
- import { Description, Title } from '@synerise/ds-typography';
6
- import * as S from './ActionArea.styles';
7
- import { renderAction } from './ActionArea.utils';
8
- var ActionArea = function ActionArea(_ref) {
9
- var label = _ref.label,
10
- description = _ref.description,
11
- _ref$isFullWidth = _ref.isFullWidth,
12
- isFullWidth = _ref$isFullWidth === void 0 ? false : _ref$isFullWidth,
13
- _ref$isError = _ref.isError,
14
- isError = _ref$isError === void 0 ? false : _ref$isError,
15
- errorText = _ref.errorText,
16
- className = _ref.className,
17
- style = _ref.style,
18
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
19
- var isErrorText = isError && Boolean(errorText);
20
- var actionContent = renderAction(rest);
21
- return /*#__PURE__*/React.createElement(S.ActionAreaWrapper, {
22
- style: style,
23
- className: classnames('ds-action-area', className),
24
- isFullWidth: isFullWidth
25
- }, /*#__PURE__*/React.createElement(S.ActionAreaContent, {
26
- isError: isError,
27
- "data-testid": "action-area-content"
28
- }, label && /*#__PURE__*/React.createElement(Title, {
29
- level: 6
30
- }, label), /*#__PURE__*/React.createElement(Description, null, description), /*#__PURE__*/React.createElement(S.ActionAreaAction, null, actionContent)), isErrorText && /*#__PURE__*/React.createElement(S.ErrorText, null, errorText));
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import classnames from "classnames";
3
+ import { Title, Description } from "@synerise/ds-typography";
4
+ import { ActionAreaWrapper, ActionAreaContent, ActionAreaAction, ErrorText } from "./ActionArea.styles.js";
5
+ import { renderAction } from "./ActionArea.utils.js";
6
+ const ActionArea = ({
7
+ label,
8
+ description,
9
+ isFullWidth = false,
10
+ isError = false,
11
+ errorText,
12
+ className,
13
+ style,
14
+ ...rest
15
+ }) => {
16
+ const isErrorText = isError && Boolean(errorText);
17
+ const actionContent = renderAction(rest);
18
+ return /* @__PURE__ */ jsxs(ActionAreaWrapper, { style, className: classnames("ds-action-area", className), isFullWidth, children: [
19
+ /* @__PURE__ */ jsxs(ActionAreaContent, { isError, "data-testid": "action-area-content", children: [
20
+ label && /* @__PURE__ */ jsx(Title, { level: 6, children: label }),
21
+ /* @__PURE__ */ jsx(Description, { children: description }),
22
+ /* @__PURE__ */ jsx(ActionAreaAction, { children: actionContent })
23
+ ] }),
24
+ isErrorText && /* @__PURE__ */ jsx(ErrorText, { children: errorText })
25
+ ] });
26
+ };
27
+ ActionArea.ActionAreaWrapper = ActionAreaWrapper;
28
+ ActionArea.ActionAreaContent = ActionAreaContent;
29
+ ActionArea.ErrorText = ErrorText;
30
+ export {
31
+ ActionArea as default
31
32
  };
32
- ActionArea.ActionAreaWrapper = S.ActionAreaWrapper;
33
- ActionArea.ActionAreaContent = S.ActionAreaContent;
34
- ActionArea.ErrorText = S.ErrorText;
35
- export default ActionArea;
@@ -1,8 +1,8 @@
1
- export declare const ActionAreaWrapper: import("styled-components").StyledComponent<"div", any, {
1
+ export declare const ActionAreaWrapper: import('styled-components').StyledComponent<"div", any, {
2
2
  isFullWidth?: boolean;
3
3
  }, never>;
4
- export declare const ActionAreaContent: import("styled-components").StyledComponent<"div", any, {
4
+ export declare const ActionAreaContent: import('styled-components').StyledComponent<"div", any, {
5
5
  isError?: boolean;
6
6
  }, never>;
7
- export declare const ActionAreaAction: import("styled-components").StyledComponent<"div", any, {}, never>;
8
- export declare const ErrorText: import("styled-components").StyledComponent<"div", any, {}, never>;
7
+ export declare const ActionAreaAction: import('styled-components').StyledComponent<"div", any, {}, never>;
8
+ export declare const ErrorText: import('styled-components').StyledComponent<"div", any, {}, never>;
@@ -1,35 +1,36 @@
1
- import styled from 'styled-components';
2
- import { Description } from '@synerise/ds-typography';
3
- export var ActionAreaWrapper = styled.div.withConfig({
1
+ import styled from "styled-components";
2
+ import { Description } from "@synerise/ds-typography";
3
+ const ActionAreaWrapper = /* @__PURE__ */ styled.div.withConfig({
4
4
  displayName: "ActionAreastyles__ActionAreaWrapper",
5
5
  componentId: "sc-10ey0kr-0"
6
- })(["max-width:100%;width:", ";"], function (_ref) {
7
- var isFullWidth = _ref.isFullWidth;
8
- return isFullWidth ? '100%;' : '588px;';
9
- });
10
- export var ActionAreaContent = styled.div.withConfig({
6
+ })(["max-width:100%;width:", ";"], ({
7
+ isFullWidth
8
+ }) => isFullWidth ? "100%;" : "588px;");
9
+ const ActionAreaContent = /* @__PURE__ */ styled.div.withConfig({
11
10
  displayName: "ActionAreastyles__ActionAreaContent",
12
11
  componentId: "sc-10ey0kr-1"
13
- })(["width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:28px 24px;border-radius:3px;background-color:", ";border:1px dashed ", ";", " .ds-title{margin-bottom:8px;text-align:center;word-break:break-word;}", "{text-align:center;margin-bottom:16px;word-break:break-word;}"], function (_ref2) {
14
- var isError = _ref2.isError,
15
- theme = _ref2.theme;
16
- return isError ? theme.palette['red-050'] : 'none';
17
- }, function (_ref3) {
18
- var theme = _ref3.theme;
19
- return theme.palette['grey-300'];
20
- }, function (_ref4) {
21
- var isError = _ref4.isError,
22
- theme = _ref4.theme;
23
- return isError && "border-color: " + theme.palette['red-600'] + ";";
24
- }, Description);
25
- export var ActionAreaAction = styled.div.withConfig({
12
+ })(["width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:28px 24px;border-radius:3px;background-color:", ";border:1px dashed ", ";", " .ds-title{margin-bottom:8px;text-align:center;word-break:break-word;}", "{text-align:center;margin-bottom:16px;word-break:break-word;}"], ({
13
+ isError,
14
+ theme
15
+ }) => isError ? theme.palette["red-050"] : "none", ({
16
+ theme
17
+ }) => theme.palette["grey-300"], ({
18
+ isError,
19
+ theme
20
+ }) => isError && `border-color: ${theme.palette["red-600"]};`, Description);
21
+ const ActionAreaAction = /* @__PURE__ */ styled.div.withConfig({
26
22
  displayName: "ActionAreastyles__ActionAreaAction",
27
23
  componentId: "sc-10ey0kr-2"
28
24
  })([""]);
29
- export var ErrorText = styled.div.withConfig({
25
+ const ErrorText = /* @__PURE__ */ styled.div.withConfig({
30
26
  displayName: "ActionAreastyles__ErrorText",
31
27
  componentId: "sc-10ey0kr-3"
32
- })(["margin-top:8px;color:", ";"], function (_ref5) {
33
- var theme = _ref5.theme;
34
- return theme.palette['red-600'];
35
- });
28
+ })(["margin-top:8px;color:", ";"], ({
29
+ theme
30
+ }) => theme.palette["red-600"]);
31
+ export {
32
+ ActionAreaAction,
33
+ ActionAreaContent,
34
+ ActionAreaWrapper,
35
+ ErrorText
36
+ };
@@ -1,5 +1,5 @@
1
- import { type CSSProperties, type ReactNode } from 'react';
2
- import { type ButtonProps } from '@synerise/ds-button';
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ import { ButtonProps } from '@synerise/ds-button';
3
3
  type CommonProps = {
4
4
  className?: string;
5
5
  description: ReactNode;
@@ -1 +1 @@
1
- export {};
1
+
@@ -1,3 +1,3 @@
1
- import { type ReactNode } from 'react';
2
- import { type ActionAreaWithCustomActionProps, type ActionAreaWithStandardActionProps } from './ActionArea.types';
1
+ import { ReactNode } from 'react';
2
+ import { ActionAreaWithCustomActionProps, ActionAreaWithStandardActionProps } from './ActionArea.types';
3
3
  export declare const renderAction: (props: ActionAreaWithCustomActionProps | ActionAreaWithStandardActionProps) => ReactNode;
@@ -1,19 +1,22 @@
1
- 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); }
2
- import React from 'react';
3
- import Button from '@synerise/ds-button';
4
- var isCustomActionArea = function isCustomActionArea(props) {
5
- return 'customAction' in props;
1
+ import { jsx } from "react/jsx-runtime";
2
+ import Button from "@synerise/ds-button";
3
+ const isCustomActionArea = (props) => {
4
+ return "customAction" in props;
6
5
  };
7
- export var renderAction = function renderAction(props) {
6
+ const renderAction = (props) => {
8
7
  if (isCustomActionArea(props)) {
9
- var customAction = props.customAction;
8
+ const {
9
+ customAction
10
+ } = props;
10
11
  return customAction;
11
12
  }
12
- var action = props.action,
13
- actionLabel = props.actionLabel,
14
- buttonProps = props.buttonProps;
15
- return /*#__PURE__*/React.createElement(Button, _extends({
16
- type: "primary",
17
- onClick: action
18
- }, buttonProps), actionLabel);
19
- };
13
+ const {
14
+ action,
15
+ actionLabel,
16
+ buttonProps
17
+ } = props;
18
+ return /* @__PURE__ */ jsx(Button, { type: "primary", onClick: action, ...buttonProps, children: actionLabel });
19
+ };
20
+ export {
21
+ renderAction
22
+ };
package/dist/index.js CHANGED
@@ -1 +1,4 @@
1
- export { default } from './ActionArea';
1
+ import { default as default2 } from "./ActionArea.js";
2
+ export {
3
+ default2 as default
4
+ };
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-action-area",
3
- "version": "1.0.47",
3
+ "version": "1.0.49",
4
4
  "description": "ActionArea 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,8 +35,8 @@
35
35
  ],
36
36
  "types": "dist/index.d.ts",
37
37
  "dependencies": {
38
- "@synerise/ds-button": "^1.5.17",
39
- "@synerise/ds-typography": "^1.1.12",
38
+ "@synerise/ds-button": "^1.5.19",
39
+ "@synerise/ds-typography": "^1.1.14",
40
40
  "classnames": "^2.5.1"
41
41
  },
42
42
  "peerDependencies": {
@@ -45,5 +45,5 @@
45
45
  "styled-components": "^5.3.3",
46
46
  "vitest": "4"
47
47
  },
48
- "gitHead": "8efc031fa688c0b87c7b3915bae93546bb63bcac"
48
+ "gitHead": "c2384982c3533a31eb5e5e0408f8dcecb2b0f399"
49
49
  }
@@ -1 +0,0 @@
1
- export {};
@@ -1,66 +0,0 @@
1
- import figma from '@figma/code-connect';
2
- import ActionArea from './ActionArea';
3
- var FIGMA_URL = 'https://www.figma.com/design/fsSZONXpVvtrDsCgtu01Jb/Synerise-Design-System?node-id=1302:19040&m=dev';
4
- var baseProps = {
5
- label: figma["boolean"]('Show Header', {
6
- "true": figma.string('✏️Header Text'),
7
- "false": undefined
8
- }),
9
- description: figma["boolean"]('Show description', {
10
- "true": figma.string('✏️Description Text'),
11
- "false": undefined
12
- })
13
- };
14
- figma.connect(ActionArea, FIGMA_URL, {
15
- variant: {
16
- State: 'Default'
17
- },
18
- props: baseProps,
19
- example: function example(_ref) {
20
- var label = _ref.label,
21
- description = _ref.description;
22
- return /*#__PURE__*/React.createElement(ActionArea, {
23
- label: label,
24
- description: description,
25
- action: function action() {},
26
- actionLabel: "Select template"
27
- });
28
- }
29
- });
30
- figma.connect(ActionArea, FIGMA_URL, {
31
- variant: {
32
- State: 'Disabled'
33
- },
34
- props: baseProps,
35
- example: function example(_ref2) {
36
- var label = _ref2.label,
37
- description = _ref2.description;
38
- return /*#__PURE__*/React.createElement(ActionArea, {
39
- label: label,
40
- description: description,
41
- action: function action() {},
42
- actionLabel: "Select template",
43
- buttonProps: {
44
- disabled: true
45
- }
46
- });
47
- }
48
- });
49
- figma.connect(ActionArea, FIGMA_URL, {
50
- variant: {
51
- State: 'Error'
52
- },
53
- props: baseProps,
54
- example: function example(_ref3) {
55
- var label = _ref3.label,
56
- description = _ref3.description;
57
- return /*#__PURE__*/React.createElement(ActionArea, {
58
- label: label,
59
- description: description,
60
- action: function action() {},
61
- actionLabel: "Select template",
62
- isError: true,
63
- errorText: "Error message"
64
- });
65
- }
66
- });