@synerise/ds-field-set 1.0.10 → 1.0.12
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/FieldSet.js +7 -8
- package/dist/FieldSet.styles.d.ts +5 -7
- package/dist/FieldSet.styles.js +6 -12
- 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
|
+
## [1.0.12](https://github.com/Synerise/synerise-design/compare/@synerise/ds-field-set@1.0.11...@synerise/ds-field-set@1.0.12) (2025-06-11)
|
7
|
+
|
8
|
+
|
9
|
+
### Bug Fixes
|
10
|
+
|
11
|
+
* **field-set:** vertical alignment without title ([5b94780](https://github.com/Synerise/synerise-design/commit/5b94780758c08371555d61d89a3461ba717a7784))
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
## [1.0.11](https://github.com/Synerise/synerise-design/compare/@synerise/ds-field-set@1.0.10...@synerise/ds-field-set@1.0.11) (2025-06-05)
|
18
|
+
|
19
|
+
**Note:** Version bump only for package @synerise/ds-field-set
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
|
6
25
|
## [1.0.10](https://github.com/Synerise/synerise-design/compare/@synerise/ds-field-set@1.0.9...@synerise/ds-field-set@1.0.10) (2025-06-03)
|
7
26
|
|
8
27
|
**Note:** Version bump only for package @synerise/ds-field-set
|
package/dist/FieldSet.js
CHANGED
@@ -39,9 +39,7 @@ var FieldSet = function FieldSet(_ref) {
|
|
39
39
|
}, [defaultExpanded]);
|
40
40
|
var headerPrefix = useMemo(function () {
|
41
41
|
if (expandable) {
|
42
|
-
return /*#__PURE__*/React.createElement(S.ButtonWrapper, null, /*#__PURE__*/React.createElement(S.ExpanderWrapper, {
|
43
|
-
description: !!description
|
44
|
-
}, /*#__PURE__*/React.createElement(Button.Expander, {
|
42
|
+
return /*#__PURE__*/React.createElement(S.ButtonWrapper, null, /*#__PURE__*/React.createElement(S.ExpanderWrapper, null, /*#__PURE__*/React.createElement(Button.Expander, {
|
45
43
|
expanded: expanded,
|
46
44
|
onClick: function onClick() {
|
47
45
|
return setExpanded(!expanded);
|
@@ -49,20 +47,21 @@ var FieldSet = function FieldSet(_ref) {
|
|
49
47
|
})));
|
50
48
|
}
|
51
49
|
return prefix && /*#__PURE__*/React.createElement(S.ButtonWrapper, null, prefix);
|
52
|
-
}, [expandable, prefix,
|
50
|
+
}, [expandable, prefix, expanded]);
|
53
51
|
var handleTitleClick = useCallback(function (event) {
|
54
52
|
expandable && setExpanded(!expanded);
|
55
53
|
onTitleClick && onTitleClick(event);
|
56
54
|
}, [onTitleClick, expandable, expanded]);
|
55
|
+
var hasTitleAndDescription = Boolean(title && description);
|
57
56
|
return /*#__PURE__*/React.createElement(S.ContainerWrapper, _extends({
|
58
57
|
className: "ds-field-set " + className
|
59
|
-
}, htmlAttributes), /*#__PURE__*/React.createElement(S.HeaderWrapper,
|
60
|
-
|
61
|
-
}, /*#__PURE__*/React.createElement(S.Title, {
|
58
|
+
}, htmlAttributes), /*#__PURE__*/React.createElement(S.HeaderWrapper, {
|
59
|
+
topAlign: Boolean(hasTitleAndDescription)
|
60
|
+
}, headerPrefix, /*#__PURE__*/React.createElement(S.FieldSetTitle, null, title && /*#__PURE__*/React.createElement(S.Title, {
|
62
61
|
onClick: handleTitleClick,
|
63
62
|
isClickable: Boolean(onTitleClick || expandable),
|
64
63
|
description: Boolean(description)
|
65
|
-
}, title), /*#__PURE__*/React.createElement(S.Description, null, description))), divider && /*#__PURE__*/React.createElement(Divider, null), (component || button) && /*#__PURE__*/React.createElement(S.CollapsibleContent, {
|
64
|
+
}, title), description && /*#__PURE__*/React.createElement(S.Description, null, description))), divider && /*#__PURE__*/React.createElement(Divider, null), (component || button) && /*#__PURE__*/React.createElement(S.CollapsibleContent, {
|
66
65
|
"data-testid": "field-set-collapsible",
|
67
66
|
ref: containerRef,
|
68
67
|
expandable: expandable,
|
@@ -3,15 +3,13 @@ export declare const Title: import("styled-components").StyledComponent<"div", a
|
|
3
3
|
isClickable?: boolean | undefined;
|
4
4
|
}, never>;
|
5
5
|
export declare const ContainerWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
6
|
-
export declare const HeaderWrapper: import("styled-components").StyledComponent<"div", any, {
|
6
|
+
export declare const HeaderWrapper: import("styled-components").StyledComponent<"div", any, {
|
7
|
+
topAlign?: boolean | undefined;
|
8
|
+
}, never>;
|
7
9
|
export declare const ButtonWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
8
10
|
export declare const ActionButton: import("styled-components").StyledComponent<"div", any, {}, never>;
|
9
|
-
export declare const ExpanderWrapper: import("styled-components").StyledComponent<"div", any, {
|
10
|
-
|
11
|
-
}, never>;
|
12
|
-
export declare const FieldSetTitle: import("styled-components").StyledComponent<"div", any, {
|
13
|
-
description?: boolean | undefined;
|
14
|
-
}, never>;
|
11
|
+
export declare const ExpanderWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
12
|
+
export declare const FieldSetTitle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
15
13
|
export declare const ComponentWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
16
14
|
export declare const Description: import("styled-components").StyledComponent<"div", any, {}, never>;
|
17
15
|
export declare const CollapsibleContent: import("styled-components").StyledComponent<"div", any, {
|
package/dist/FieldSet.styles.js
CHANGED
@@ -2,9 +2,7 @@ import styled, { css } from 'styled-components';
|
|
2
2
|
export var Title = styled.div.withConfig({
|
3
3
|
displayName: "FieldSetstyles__Title",
|
4
4
|
componentId: "sc-1hezedi-0"
|
5
|
-
})(["display:flex;line-height:16px;
|
6
|
-
return props.description ? '8px' : '0';
|
7
|
-
}, function (props) {
|
5
|
+
})(["display:flex;line-height:16px;max-width:800px;font-size:16px;font-weight:500;word-wrap:break-word;align-items:center;color:", ";cursor:", ";"], function (props) {
|
8
6
|
return props.theme.palette['grey-800'];
|
9
7
|
}, function (props) {
|
10
8
|
return props.isClickable ? 'pointer' : 'default';
|
@@ -16,7 +14,9 @@ export var ContainerWrapper = styled.div.withConfig({
|
|
16
14
|
export var HeaderWrapper = styled.div.withConfig({
|
17
15
|
displayName: "FieldSetstyles__HeaderWrapper",
|
18
16
|
componentId: "sc-1hezedi-2"
|
19
|
-
})(["display:flex;"])
|
17
|
+
})(["display:flex;align-items:center;gap:16px;align-items:", ";"], function (props) {
|
18
|
+
return props.topAlign ? 'flex-start' : 'center';
|
19
|
+
});
|
20
20
|
export var ButtonWrapper = styled.div.withConfig({
|
21
21
|
displayName: "FieldSetstyles__ButtonWrapper",
|
22
22
|
componentId: "sc-1hezedi-3"
|
@@ -28,17 +28,11 @@ export var ActionButton = styled.div.withConfig({
|
|
28
28
|
export var ExpanderWrapper = styled.div.withConfig({
|
29
29
|
displayName: "FieldSetstyles__ExpanderWrapper",
|
30
30
|
componentId: "sc-1hezedi-5"
|
31
|
-
})(["display:flex;
|
32
|
-
return props.description ? '' : 'center';
|
33
|
-
});
|
31
|
+
})(["display:flex;"]);
|
34
32
|
export var FieldSetTitle = styled.div.withConfig({
|
35
33
|
displayName: "FieldSetstyles__FieldSetTitle",
|
36
34
|
componentId: "sc-1hezedi-6"
|
37
|
-
})(["display:
|
38
|
-
return props.description ? '' : 'flex';
|
39
|
-
}, function (props) {
|
40
|
-
return props.description ? '' : 'center';
|
41
|
-
});
|
35
|
+
})(["display:flex;flex-direction:column;gap:8px;"]);
|
42
36
|
export var ComponentWrapper = styled.div.withConfig({
|
43
37
|
displayName: "FieldSetstyles__ComponentWrapper",
|
44
38
|
componentId: "sc-1hezedi-7"
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@synerise/ds-field-set",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.12",
|
4
4
|
"description": "FieldSet UI Component for the Synerise Design System",
|
5
5
|
"license": "ISC",
|
6
6
|
"repository": "Synerise/synerise-design",
|
@@ -34,9 +34,9 @@
|
|
34
34
|
],
|
35
35
|
"types": "dist/index.d.ts",
|
36
36
|
"dependencies": {
|
37
|
-
"@synerise/ds-button": "^1.3.
|
38
|
-
"@synerise/ds-divider": "^1.0.
|
39
|
-
"@synerise/ds-utils": "^1.
|
37
|
+
"@synerise/ds-button": "^1.3.3",
|
38
|
+
"@synerise/ds-divider": "^1.0.10",
|
39
|
+
"@synerise/ds-utils": "^1.2.0"
|
40
40
|
},
|
41
41
|
"peerDependencies": {
|
42
42
|
"@synerise/ds-core": "*",
|
@@ -44,5 +44,5 @@
|
|
44
44
|
"react": ">=16.9.0 <= 18.3.1",
|
45
45
|
"styled-components": "^5.3.3"
|
46
46
|
},
|
47
|
-
"gitHead": "
|
47
|
+
"gitHead": "35c8f09d6a248f199237766c1f5181f4b3fc88af"
|
48
48
|
}
|