@snack-uikit/accordion 0.5.0 → 0.5.2

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,30 @@
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.5.2 (2023-12-18)
7
+
8
+ ### Only dependencies have been changed
9
+ * [@snack-uikit/icons@0.19.2](https://git.sbercloud.tech/sbercloud-ui/tokens-design-system/snack-uikit/-/blob/master/packages/icons/CHANGELOG.md)
10
+ * [@snack-uikit/toggles@0.9.2](https://git.sbercloud.tech/sbercloud-ui/tokens-design-system/snack-uikit/-/blob/master/packages/toggles/CHANGELOG.md)
11
+ * [@snack-uikit/tooltip@0.10.2](https://git.sbercloud.tech/sbercloud-ui/tokens-design-system/snack-uikit/-/blob/master/packages/tooltip/CHANGELOG.md)
12
+ * [@snack-uikit/truncate-string@0.4.2](https://git.sbercloud.tech/sbercloud-ui/tokens-design-system/snack-uikit/-/blob/master/packages/truncate-string/CHANGELOG.md)
13
+
14
+
15
+
16
+
17
+
18
+ ## 0.5.1 (2023-12-14)
19
+
20
+ ### Only dependencies have been changed
21
+ * [@snack-uikit/icons@0.19.1](https://git.sbercloud.tech/sbercloud-ui/tokens-design-system/snack-uikit/-/blob/master/packages/icons/CHANGELOG.md)
22
+ * [@snack-uikit/toggles@0.9.1](https://git.sbercloud.tech/sbercloud-ui/tokens-design-system/snack-uikit/-/blob/master/packages/toggles/CHANGELOG.md)
23
+ * [@snack-uikit/tooltip@0.10.1](https://git.sbercloud.tech/sbercloud-ui/tokens-design-system/snack-uikit/-/blob/master/packages/tooltip/CHANGELOG.md)
24
+ * [@snack-uikit/truncate-string@0.4.1](https://git.sbercloud.tech/sbercloud-ui/tokens-design-system/snack-uikit/-/blob/master/packages/truncate-string/CHANGELOG.md)
25
+
26
+
27
+
28
+
29
+
6
30
  # 0.5.0 (2023-12-14)
7
31
 
8
32
 
@@ -18,5 +18,5 @@ import styles from './styles.module.css';
18
18
  export function CollapseBlockPrimary(_a) {
19
19
  var { id, header, children, actions, className } = _a, rest = __rest(_a, ["id", "header", "children", "actions", "className"]);
20
20
  const { isChecked: isExpanded, handleClick: handleExpandedChange } = useToggleGroup({ value: id });
21
- return (_jsx(CollapseBlockPrivate, Object.assign({ className: cn(styles.container, className), header: _jsx(CollapseBlockHeaderContainer, Object.assign({ expanded: isExpanded, toggleExpanded: handleExpandedChange, actions: actions }, { children: header })), expanded: isExpanded }, extractSupportProps(rest), { children: children })));
21
+ return (_jsx(CollapseBlockPrivate, Object.assign({ className: cn(styles.container, className), header: _jsx(CollapseBlockHeaderContainer, { expanded: isExpanded, toggleExpanded: handleExpandedChange, actions: actions, children: header }), expanded: isExpanded }, extractSupportProps(rest), { children: children })));
22
22
  }
@@ -18,5 +18,5 @@ import styles from './styles.module.css';
18
18
  export function CollapseBlockSecondary(_a) {
19
19
  var { header, children, id, actions, className } = _a, rest = __rest(_a, ["header", "children", "id", "actions", "className"]);
20
20
  const { isChecked: isExpanded, handleClick: handleExpandedChange } = useToggleGroup({ value: id });
21
- return (_jsx(CollapseBlockPrivate, Object.assign({ className: cn(styles.container, className), header: _jsx(CollapseBlockHeaderContainer, Object.assign({ expanded: isExpanded, toggleExpanded: handleExpandedChange, actions: actions }, { children: header })), expanded: isExpanded }, extractSupportProps(rest), { children: children })));
21
+ return (_jsx(CollapseBlockPrivate, Object.assign({ className: cn(styles.container, className), header: _jsx(CollapseBlockHeaderContainer, { expanded: isExpanded, toggleExpanded: handleExpandedChange, actions: actions, children: header }), expanded: isExpanded }, extractSupportProps(rest), { children: children })));
22
22
  }
@@ -17,5 +17,5 @@ export function Accordion(_a) {
17
17
  return (
18
18
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
19
19
  // @ts-ignore
20
- _jsx(ToggleGroup, Object.assign({ value: expanded, defaultValue: expandedDefault, onChange: onExpandedChange, selectionMode: selectionMode }, { children: _jsx("div", Object.assign({ className: className }, extractSupportProps(rest), { children: children })) })));
20
+ _jsx(ToggleGroup, { value: expanded, defaultValue: expandedDefault, onChange: onExpandedChange, selectionMode: selectionMode, children: _jsx("div", Object.assign({ className: className }, extractSupportProps(rest), { children: children })) }));
21
21
  }
@@ -5,5 +5,5 @@ import { Typography } from '@snack-uikit/typography';
5
5
  import { TEST_IDS } from '../../testIds';
6
6
  import styles from './styles.module.css';
7
7
  export function CollapseBlockHeader({ title, description, tip }) {
8
- return (_jsxs(_Fragment, { children: [_jsxs("div", Object.assign({ className: styles.headline }, { children: [_jsx(Typography.SansTitleM, Object.assign({ className: styles.title, "data-test-id": TEST_IDS.title }, { children: _jsx(TruncateString, { text: title, maxLines: 1 }) })), tip && _jsx(QuestionTooltip, { size: 's', tip: tip, triggerDataTestId: TEST_IDS.tooltip })] })), description && (_jsx(Typography.SansBodyM, Object.assign({ className: styles.subtitle, "data-test-id": TEST_IDS.description }, { children: _jsx(TruncateString, { text: description, maxLines: 2 }) })))] }));
8
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: styles.headline, children: [_jsx(Typography.SansTitleM, { className: styles.title, "data-test-id": TEST_IDS.title, children: _jsx(TruncateString, { text: title, maxLines: 1 }) }), tip && _jsx(QuestionTooltip, { size: 's', tip: tip, triggerDataTestId: TEST_IDS.tooltip })] }), description && (_jsx(Typography.SansBodyM, { className: styles.subtitle, "data-test-id": TEST_IDS.description, children: _jsx(TruncateString, { text: description, maxLines: 2 }) }))] }));
9
9
  }
@@ -17,5 +17,5 @@ export function CollapseBlockHeaderContainer({ children, toggleExpanded, expande
17
17
  }, [functionLayoutRef]);
18
18
  return (
19
19
  // eslint-disable-next-line jsx-a11y/no-static-element-interactions
20
- _jsxs("div", Object.assign({ className: styles.header, "data-test-id": TEST_IDS.header, onClick: toggleExpanded }, { children: [_jsx("div", Object.assign({ className: styles.text, style: { '--width': width } }, { children: children })), _jsxs("div", Object.assign({ className: styles.functionLayout, ref: functionLayoutRef }, { children: [actions, _jsx(ButtonFunction, { className: styles.button, "data-expanded": expanded || undefined, icon: _jsx(ChevronDownSVG, {}), size: 'xs', "data-test-id": TEST_IDS.chevron })] }))] })));
20
+ _jsxs("div", { className: styles.header, "data-test-id": TEST_IDS.header, onClick: toggleExpanded, children: [_jsx("div", { className: styles.text, style: { '--width': width }, children: children }), _jsxs("div", { className: styles.functionLayout, ref: functionLayoutRef, children: [actions, _jsx(ButtonFunction, { className: styles.button, "data-expanded": expanded || undefined, icon: _jsx(ChevronDownSVG, {}), size: 'xs', "data-test-id": TEST_IDS.chevron })] })] }));
21
21
  }
@@ -18,5 +18,5 @@ export function CollapseBlockPrivate(_a) {
18
18
  var { children, expanded, className, header } = _a, rest = __rest(_a, ["children", "expanded", "className", "header"]);
19
19
  return (_jsxs("div", Object.assign({ className: cn(styles.accordion, className),
20
20
  // eslint-disable-next-line jsx-a11y/aria-role
21
- role: 'accordion', "aria-expanded": expanded }, extractSupportProps(rest), { children: [header, _jsx("div", Object.assign({ className: styles.contentWrapper, "aria-hidden": !expanded, "data-test-id": TEST_IDS.content }, { children: _jsx("div", Object.assign({ className: styles.content, "data-content": true }, { children: children })) }))] })));
21
+ role: 'accordion', "aria-expanded": expanded }, extractSupportProps(rest), { children: [header, _jsx("div", { className: styles.contentWrapper, "aria-hidden": !expanded, "data-test-id": TEST_IDS.content, children: _jsx("div", { className: styles.content, "data-content": true, children: children }) })] })));
22
22
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "title": "Accordion",
7
- "version": "0.5.0",
7
+ "version": "0.5.2",
8
8
  "sideEffects": [
9
9
  "*.css",
10
10
  "*.woff",
@@ -33,13 +33,13 @@
33
33
  "scripts": {},
34
34
  "dependencies": {
35
35
  "@snack-uikit/button": "0.15.0",
36
- "@snack-uikit/icons": "0.19.0",
37
- "@snack-uikit/toggles": "0.9.0",
38
- "@snack-uikit/tooltip": "0.10.0",
39
- "@snack-uikit/truncate-string": "0.4.0",
36
+ "@snack-uikit/icons": "0.19.2",
37
+ "@snack-uikit/toggles": "0.9.2",
38
+ "@snack-uikit/tooltip": "0.10.2",
39
+ "@snack-uikit/truncate-string": "0.4.2",
40
40
  "@snack-uikit/typography": "0.6.0",
41
41
  "@snack-uikit/utils": "3.2.0",
42
42
  "classnames": "2.3.2"
43
43
  },
44
- "gitHead": "bd39c5e674f3b91b0e2487782a04b15034cf3d8b"
44
+ "gitHead": "50ef9bb113ec40897ffb3eeae62539ce82ade899"
45
45
  }