@synerise/ds-field-set 0.1.38 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
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
+ # [0.2.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-field-set@0.1.39...@synerise/ds-field-set@0.2.0) (2023-08-25)
7
+
8
+
9
+ ### Features
10
+
11
+ * **field-set:** added clickability to fieldset title ([cc81e30](https://github.com/Synerise/synerise-design/commit/cc81e306e422f9050a010d5d9de9e2f2e957e51f))
12
+
13
+
14
+
15
+
16
+
17
+ ## [0.1.39](https://github.com/Synerise/synerise-design/compare/@synerise/ds-field-set@0.1.38...@synerise/ds-field-set@0.1.39) (2023-08-20)
18
+
19
+ **Note:** Version bump only for package @synerise/ds-field-set
20
+
21
+
22
+
23
+
24
+
6
25
  ## [0.1.38](https://github.com/Synerise/synerise-design/compare/@synerise/ds-field-set@0.1.37...@synerise/ds-field-set@0.1.38) (2023-07-17)
7
26
 
8
27
  **Note:** Version bump only for package @synerise/ds-field-set
package/README.md CHANGED
@@ -30,6 +30,7 @@ import FieldSet from '@synerise/ds-field-set'
30
30
  | ---------------- | ---------------------------- | ------------------------- | ----------- |
31
31
  | component | prop to set component | React.ReactNode | - |
32
32
  | title | text of title | string | - |
33
+ | onTitleClick | onclick handler for title | () => void | - |
33
34
  | description | text of the description | string | - |
34
35
  | prefix | prop to set prefix item | React.ReactNode | - |
35
36
  | button | prop to set button | React.ReactNode | - |
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ /// <reference types="react" />
2
2
  import { FieldSetProps } from './FieldSet.types';
3
- declare const FieldSet: React.FC<FieldSetProps>;
3
+ declare const FieldSet: ({ prefix, title, description, component, button, onTitleClick }: FieldSetProps) => JSX.Element;
4
4
  export default FieldSet;
package/dist/FieldSet.js CHANGED
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  import Divider from '@synerise/ds-divider';
3
3
  import * as S from './FieldSet.styles';
4
4
 
@@ -7,12 +7,15 @@ var FieldSet = function FieldSet(_ref) {
7
7
  title = _ref.title,
8
8
  description = _ref.description,
9
9
  component = _ref.component,
10
- button = _ref.button;
10
+ button = _ref.button,
11
+ onTitleClick = _ref.onTitleClick;
11
12
  return /*#__PURE__*/React.createElement(S.ContainerWrapper, {
12
13
  className: "ds-field-set"
13
14
  }, /*#__PURE__*/React.createElement(S.HeaderWrapper, null, /*#__PURE__*/React.createElement(S.ButtonWrapper, null, prefix), /*#__PURE__*/React.createElement(S.FieldSetTitle, {
14
15
  description: Boolean(description)
15
16
  }, /*#__PURE__*/React.createElement(S.Title, {
17
+ onClick: onTitleClick,
18
+ isClickable: Boolean(onTitleClick),
16
19
  description: Boolean(description)
17
20
  }, title), /*#__PURE__*/React.createElement(S.Description, {
18
21
  description: Boolean(description)
@@ -1,5 +1,6 @@
1
1
  export declare const Title: import("styled-components").StyledComponent<"div", any, {
2
2
  description?: boolean | undefined;
3
+ isClickable?: boolean | undefined;
3
4
  }, never>;
4
5
  export declare const ContainerWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
5
6
  export declare const HeaderWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -2,10 +2,12 @@ import styled 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;padding-bottom:", ";max-width:800px;font-size:16px;font-weight:500;word-wrap:break-word;align-items:center;color:", ";"], function (props) {
5
+ })(["display:flex;line-height:16px;padding-bottom:", ";max-width:800px;font-size:16px;font-weight:500;word-wrap:break-word;align-items:center;color:", ";cursor:", ";"], function (props) {
6
6
  return props.description ? '8px' : '14px';
7
7
  }, function (props) {
8
8
  return props.theme.palette['grey-800'];
9
+ }, function (props) {
10
+ return props.isClickable ? 'pointer' : 'default';
9
11
  });
10
12
  export var ContainerWrapper = styled.div.withConfig({
11
13
  displayName: "FieldSetstyles__ContainerWrapper",
@@ -5,4 +5,5 @@ export declare type FieldSetProps = {
5
5
  title?: string;
6
6
  description?: string;
7
7
  button?: React.ReactNode;
8
+ onTitleClick?: (ev: React.MouseEvent<HTMLElement, MouseEvent>) => void;
8
9
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-field-set",
3
- "version": "0.1.38",
3
+ "version": "0.2.0",
4
4
  "description": "FieldSet UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -32,11 +32,11 @@
32
32
  ],
33
33
  "types": "dist/index.d.ts",
34
34
  "dependencies": {
35
- "@synerise/ds-divider": "^0.5.38"
35
+ "@synerise/ds-divider": "^0.5.40"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "@synerise/ds-core": "*",
39
39
  "react": ">=16.9.0 < 17.0.0"
40
40
  },
41
- "gitHead": "b2df0b45094602990b6ef46e20fb0eb655baf126"
41
+ "gitHead": "9d424b025fe368bbf3beccea2102f000f4d7e82c"
42
42
  }