@synerise/ds-condition 2.1.3 → 2.2.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/dist/Condition.style.d.ts +1 -1
- package/dist/Condition.style.js +6 -6
- package/dist/ConditionStep/ConditionRow/ConditionRow.js +1 -2
- package/dist/ConditionStep/EmptyCondition/EmptyCondition.js +1 -2
- package/dist/ConditionStep/EmptyCondition/emptyCondition.styles.d.ts +1 -1
- package/package.json +15 -15
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.2.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-condition@2.2.0...@synerise/ds-condition@2.2.1) (2026-11-03)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-condition
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [2.2.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-condition@2.1.3...@synerise/ds-condition@2.2.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.1.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-condition@2.1.2...@synerise/ds-condition@2.1.3) (2026-10-28)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @synerise/ds-condition
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const ErrorWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
2
2
|
export declare const DragIcon: import('styled-components').StyledComponent<import('react').ForwardRefExoticComponent<import('@synerise/ds-icon').BaseIconProps & Omit<import('react').HTMLAttributes<HTMLDivElement>, keyof import('@synerise/ds-icon').BaseIconProps> & import('@synerise/ds-utils').DataAttributes & import('react').RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
3
|
-
export declare const StepConditionCruds: import('styled-components').StyledComponent<import('react').FC<import('@synerise/ds-cruds').CrudsProps> & import('@synerise/ds-cruds/dist/Cruds.types').CrudsSubComponents, any, {}, never>;
|
|
3
|
+
export declare const StepConditionCruds: import('styled-components').StyledComponent<import('react').FC<import('@synerise/ds-cruds').CrudsProps> & import('@synerise/ds-cruds/dist/Cruds.types.js').CrudsSubComponents, any, {}, never>;
|
|
4
4
|
export declare const StepConditions: import('styled-components').StyledComponent<"div", any, {
|
|
5
5
|
withCruds?: boolean;
|
|
6
6
|
}, never>;
|
package/dist/Condition.style.js
CHANGED
|
@@ -6,7 +6,7 @@ import { InputGroupItem } from "@synerise/ds-input/dist/InputGroup.styles";
|
|
|
6
6
|
const ErrorWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
7
7
|
displayName: "Conditionstyle__ErrorWrapper",
|
|
8
8
|
componentId: "sc-1lk06p3-0"
|
|
9
|
-
})(["color:
|
|
9
|
+
})(["color:var(--ds-color-text-danger-default);margin-top:8px;"]);
|
|
10
10
|
const DragIcon = /* @__PURE__ */ styled(Icon).withConfig({
|
|
11
11
|
displayName: "Conditionstyle__DragIcon",
|
|
12
12
|
componentId: "sc-1lk06p3-1"
|
|
@@ -22,7 +22,7 @@ const StepConditions = /* @__PURE__ */ styled.div.withConfig({
|
|
|
22
22
|
const StepName = /* @__PURE__ */ styled.div.withConfig({
|
|
23
23
|
displayName: "Conditionstyle__StepName",
|
|
24
24
|
componentId: "sc-1lk06p3-4"
|
|
25
|
-
})(["font-size:13px;line-height:1.84;color:
|
|
25
|
+
})(["font-size:13px;line-height:1.84;color:var(--ds-color-text-base-default);display:flex;flex-direction:row;align-items:center;justify-content:flex-start;white-space:pre-wrap;gap:8px;&&& input{margin-top:2px;cursor:default;}"]);
|
|
26
26
|
const StepIndexWrapper = /* @__PURE__ */ styled.span.withConfig({
|
|
27
27
|
displayName: "Conditionstyle__StepIndexWrapper",
|
|
28
28
|
componentId: "sc-1lk06p3-5"
|
|
@@ -54,13 +54,13 @@ const StepHeader = /* @__PURE__ */ styled.div.withConfig({
|
|
|
54
54
|
const DraggedLabel = /* @__PURE__ */ styled.span.withConfig({
|
|
55
55
|
displayName: "Conditionstyle__DraggedLabel",
|
|
56
56
|
componentId: "sc-1lk06p3-12"
|
|
57
|
-
})(["width:100%;height:100%;display:none;position:absolute;top:0;left:0;align-items:center;justify-content:flex-start;padding-left:18px;color:
|
|
57
|
+
})(["width:100%;height:100%;display:none;position:absolute;top:0;left:0;align-items:center;justify-content:flex-start;padding-left:18px;color:var(--ds-color-text-base-muted);font-size:13px;"]);
|
|
58
58
|
const Step = /* @__PURE__ */ styled.div.withConfig({
|
|
59
59
|
displayName: "Conditionstyle__Step",
|
|
60
60
|
componentId: "sc-1lk06p3-13"
|
|
61
61
|
})(["padding:", ";position:relative;", " ", " &:hover{", ";", "{opacity:1;visibility:visible;}", "{opacity:1;visibility:visible;}", "{opacity:1;visibility:visible;}}"], ({
|
|
62
62
|
singleStepCondition
|
|
63
|
-
}) => singleStepCondition ? "24px 0" : "12px 0", (props) => props.showSuffix && css(["&:after{display:flex;width:100%;padding:18px 0 18px 24px;bottom:-18px;content:attr(data-conditionSuffix);background-color:
|
|
63
|
+
}) => singleStepCondition ? "24px 0" : "12px 0", (props) => props.showSuffix && css(["&:after{display:flex;width:100%;padding:18px 0 18px 24px;bottom:-18px;content:attr(data-conditionSuffix);background-color:var(--ds-color-background-base-default);position:relative;font-size:16px;font-weight:500;color:var(--ds-color-text-base-default);}"]), (props) => props.active && !props.singleStepCondition && css(["&:hover{background-color:var(--ds-color-background-base-subtle);}"]), (props) => !props.hoverDisabled && `background-color: var(--ds-color-background-base-subtle)`, StepCruds, StepConditionCruds, DragIcon);
|
|
64
64
|
const DropLabel = /* @__PURE__ */ styled.div.withConfig({
|
|
65
65
|
displayName: "Conditionstyle__DropLabel",
|
|
66
66
|
componentId: "sc-1lk06p3-14"
|
|
@@ -76,7 +76,7 @@ const DragLabel = /* @__PURE__ */ styled.div.withConfig({
|
|
|
76
76
|
const StepWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
77
77
|
displayName: "Conditionstyle__StepWrapper",
|
|
78
78
|
componentId: "sc-1lk06p3-17"
|
|
79
|
-
})(["", " ", ""], (props) => props.isDragOverlay && css(["", "{display:none;}height:50px;overflow:hidden;cursor:grabbing;background:
|
|
79
|
+
})(["", " ", ""], (props) => props.isDragOverlay && css(["", "{display:none;}height:50px;overflow:hidden;cursor:grabbing;background:var(--ds-color-background-base-default);box-shadow:var(--ds-shadows-shadow-2);display:flex;align-items:center;", "{display:flex;}"], Step, DragLabel), (props) => props.isDragged && css(["", "{display:none;}", "{display:block;}height:50px;overflow:hidden;display:flex;align-items:center;justify-content:center;background-color:var(--ds-color-background-brand-subtle);color:var(--ds-color-text-brand-default);border-left:2px solid var(--ds-color-border-brand-default);"], Step, DropLabel));
|
|
80
80
|
const Subject = /* @__PURE__ */ styled.div.withConfig({
|
|
81
81
|
displayName: "Conditionstyle__Subject",
|
|
82
82
|
componentId: "sc-1lk06p3-18"
|
|
@@ -122,7 +122,7 @@ const AddConditionRow = /* @__PURE__ */ styled.div.withConfig({
|
|
|
122
122
|
const ConditionConnections = /* @__PURE__ */ styled.span.withConfig({
|
|
123
123
|
displayName: "Conditionstyle__ConditionConnections",
|
|
124
124
|
componentId: "sc-1lk06p3-28"
|
|
125
|
-
})(["display:flex;width:32px;min-width:32px;margin:0 12px;position:relative;height:32px;&:before{position:absolute;content:'';width:", ";height:1px;top:16px;left:", ";background-color:
|
|
125
|
+
})(["display:flex;width:32px;min-width:32px;margin:0 12px;position:relative;height:32px;&:before{position:absolute;content:'';width:", ";height:1px;top:16px;left:", ";background-color:var(--ds-color-border-base-strong);}&:after{display:", ";position:absolute;content:'';width:1px;left:50%;height:auto;top:", ";bottom:", ";background-color:var(--ds-color-border-base-strong);}"], (props) => props.first ? "100%" : "16px", (props) => props.first ? "0" : "16px", (props) => props.first && props.last || props.last && props.readOnly ? "none" : "flex", (props) => props.first ? "16px" : "0", (props) => props.last ? "16px" : "-100%");
|
|
126
126
|
const ConditionRow = /* @__PURE__ */ styled.div.withConfig({
|
|
127
127
|
displayName: "Conditionstyle__ConditionRow",
|
|
128
128
|
componentId: "sc-1lk06p3-29"
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
|
-
import { theme } from "@synerise/ds-core";
|
|
4
3
|
import Factors from "@synerise/ds-factors";
|
|
5
4
|
import Icon, { CloseS } from "@synerise/ds-icon";
|
|
6
5
|
import Operators from "@synerise/ds-operators";
|
|
@@ -53,7 +52,7 @@ const ConditionRow = ({
|
|
|
53
52
|
}
|
|
54
53
|
return errorText ? /* @__PURE__ */ jsx(ErrorWrapper, { children: errorText }) : /* @__PURE__ */ jsx(Fragment, {});
|
|
55
54
|
}, [conditionOperatorErrorText, conditionFactorErrorText, conditionParameterErrorText]);
|
|
56
|
-
const removeConditionTrigger = !readOnly && removeCondition && conditionsNumber > minConditionLength && /* @__PURE__ */ jsx(RemoveIconWrapper, { onClick: () => removeCondition(stepId, conditionId), className: "ds-conditions-remove-row", children: /* @__PURE__ */ jsx(Tooltip, { title: texts.removeConditionRowTooltip, trigger: ["hover"], children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(CloseS, {}), color:
|
|
55
|
+
const removeConditionTrigger = !readOnly && removeCondition && conditionsNumber > minConditionLength && /* @__PURE__ */ jsx(RemoveIconWrapper, { onClick: () => removeCondition(stepId, conditionId), className: "ds-conditions-remove-row", children: /* @__PURE__ */ jsx(Tooltip, { title: texts.removeConditionRowTooltip, trigger: ["hover"], children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(CloseS, {}), color: "var(--ds-color-icon-danger-default)" }) }) });
|
|
57
56
|
const renderConditionParameterWrapper = Boolean(conditionParameter);
|
|
58
57
|
const renderConditionOperatorWrapper = Boolean((!conditionParameter || conditionParameter?.value && (conditionParameter?.value).name !== "") && conditionOperator);
|
|
59
58
|
const renderConditionFactorWrapper = Boolean(conditionFactor !== void 0 && conditionOperator?.value && conditionFactor?.availableFactorTypes !== null);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { theme } from "@synerise/ds-core";
|
|
3
2
|
import Icon, { ClickM } from "@synerise/ds-icon";
|
|
4
3
|
import { EmptyConditionWrapper, LabelWrapper } from "./emptyCondition.styles.js";
|
|
5
4
|
const EmptyCondition = ({
|
|
@@ -7,7 +6,7 @@ const EmptyCondition = ({
|
|
|
7
6
|
label
|
|
8
7
|
}) => {
|
|
9
8
|
return /* @__PURE__ */ jsxs(EmptyConditionWrapper, { children: [
|
|
10
|
-
/* @__PURE__ */ jsx(Icon, { component: icon, color:
|
|
9
|
+
/* @__PURE__ */ jsx(Icon, { component: icon, color: "var(--ds-color-icon-base-subtle)" }),
|
|
11
10
|
/* @__PURE__ */ jsx(LabelWrapper, { size: "small", children: label })
|
|
12
11
|
] });
|
|
13
12
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const LabelWrapper: import('styled-components').StyledComponent<({ size, className, children, ellipsis, style, strong, ...dataAttributes }: import('@synerise/ds-utils').DataAttributes & {
|
|
2
2
|
size?: import('@synerise/ds-typography').TextSize;
|
|
3
|
-
ellipsis?: import('@synerise/ds-typography/dist/Ellipsis').EllipsisProps;
|
|
3
|
+
ellipsis?: import('@synerise/ds-typography/dist/Ellipsis.js').EllipsisProps;
|
|
4
4
|
children?: import('react').ReactNode;
|
|
5
5
|
className?: string;
|
|
6
6
|
style?: import('react').CSSProperties;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-condition",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "Condition UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -42,19 +42,19 @@
|
|
|
42
42
|
],
|
|
43
43
|
"types": "dist/index.d.ts",
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@synerise/ds-button": "^2.1
|
|
46
|
-
"@synerise/ds-context-selector": "^2.1
|
|
47
|
-
"@synerise/ds-cruds": "^2.
|
|
48
|
-
"@synerise/ds-factors": "^2.
|
|
49
|
-
"@synerise/ds-icon": "^2.
|
|
50
|
-
"@synerise/ds-inline-edit": "^2.
|
|
51
|
-
"@synerise/ds-input": "^2.
|
|
52
|
-
"@synerise/ds-operators": "^2.
|
|
53
|
-
"@synerise/ds-sortable": "^2.
|
|
54
|
-
"@synerise/ds-subject": "^2.
|
|
55
|
-
"@synerise/ds-tooltip": "^2.
|
|
56
|
-
"@synerise/ds-typography": "^2.
|
|
57
|
-
"@synerise/ds-utils": "^2.
|
|
45
|
+
"@synerise/ds-button": "^2.2.1",
|
|
46
|
+
"@synerise/ds-context-selector": "^2.2.1",
|
|
47
|
+
"@synerise/ds-cruds": "^2.1.1",
|
|
48
|
+
"@synerise/ds-factors": "^2.4.1",
|
|
49
|
+
"@synerise/ds-icon": "^2.3.1",
|
|
50
|
+
"@synerise/ds-inline-edit": "^2.1.1",
|
|
51
|
+
"@synerise/ds-input": "^2.1.1",
|
|
52
|
+
"@synerise/ds-operators": "^2.1.1",
|
|
53
|
+
"@synerise/ds-sortable": "^2.1.1",
|
|
54
|
+
"@synerise/ds-subject": "^2.1.1",
|
|
55
|
+
"@synerise/ds-tooltip": "^2.1.1",
|
|
56
|
+
"@synerise/ds-typography": "^2.1.1",
|
|
57
|
+
"@synerise/ds-utils": "^2.3.1",
|
|
58
58
|
"lodash.debounce": "^4.0.8"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"react-intl": ">=3.12.0 <= 6.8",
|
|
69
69
|
"styled-components": "^5.3.3"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "2d2a540b35fddf8855da45f0dec2f4612c6d87b6"
|
|
72
72
|
}
|