@snack-uikit/chips 0.13.2 → 0.13.3
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,17 @@
|
|
|
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.13.3 (2024-04-27)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **PDS-0000:** fix disabled item click event ([3e438ca](https://github.com/cloud-ru-tech/snack-uikit/commit/3e438caafcd2906e22ac0ebd22faba7fe5d9deb8))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## 0.13.2 (2024-04-27)
|
|
7
18
|
|
|
8
19
|
### Only dependencies have been changed
|
|
@@ -16,7 +16,8 @@ export function transformOptionsToItems(options, contentRender) {
|
|
|
16
16
|
return options.map(option => {
|
|
17
17
|
if (isAccordionOption(option) || isNextListOption(option)) {
|
|
18
18
|
const { label, options, id, contentRenderProps, disabled } = option, rest = __rest(option, ["label", "options", "id", "contentRenderProps", "disabled"]);
|
|
19
|
-
return Object.assign(Object.assign({}, rest), {
|
|
19
|
+
return Object.assign(Object.assign({}, rest), { disabled,
|
|
20
|
+
id, content: contentRender ? (contentRender({ label, contentRenderProps, disabled })) : (_jsx(ItemContent, Object.assign({ option: label }, contentRenderProps, { disabled: disabled }))), items: transformOptionsToItems(options) });
|
|
20
21
|
}
|
|
21
22
|
if (isGroupSelectOption(option)) {
|
|
22
23
|
const { options } = option, rest = __rest(option, ["options"]);
|
|
@@ -27,6 +28,6 @@ export function transformOptionsToItems(options, contentRender) {
|
|
|
27
28
|
return Object.assign(Object.assign({}, rest), { items: transformOptionsToItems(options) });
|
|
28
29
|
}
|
|
29
30
|
const _a = option, { label, value, contentRenderProps, disabled } = _a, rest = __rest(_a, ["label", "value", "contentRenderProps", "disabled"]);
|
|
30
|
-
return Object.assign(Object.assign({}, rest), { id: value, content: contentRender ? (contentRender({ label, contentRenderProps })) : (_jsx(ItemContent, Object.assign({ option: label }, contentRenderProps, { disabled: disabled }))) });
|
|
31
|
+
return Object.assign(Object.assign({}, rest), { disabled, id: value, content: contentRender ? (contentRender({ label, contentRenderProps, disabled, value })) : (_jsx(ItemContent, Object.assign({ option: label }, contentRenderProps, { disabled: disabled }))) });
|
|
31
32
|
});
|
|
32
33
|
}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"title": "Chips",
|
|
7
|
-
"version": "0.13.
|
|
7
|
+
"version": "0.13.3",
|
|
8
8
|
"sideEffects": [
|
|
9
9
|
"*.css",
|
|
10
10
|
"*.woff",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@snack-uikit/calendar": "0.7.8",
|
|
37
37
|
"@snack-uikit/dropdown": "0.2.2",
|
|
38
38
|
"@snack-uikit/icons": "0.20.1",
|
|
39
|
-
"@snack-uikit/list": "0.11.
|
|
39
|
+
"@snack-uikit/list": "0.11.4",
|
|
40
40
|
"@snack-uikit/loaders": "0.5.2",
|
|
41
41
|
"@snack-uikit/utils": "3.3.0",
|
|
42
42
|
"classnames": "2.3.2",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"@snack-uikit/locale": "*"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "e7cf32fd5b9568bacce1f8cb1958c0ace6b52274"
|
|
54
54
|
}
|
|
@@ -15,9 +15,10 @@ export function transformOptionsToItems<T extends ContentRenderProps = ContentRe
|
|
|
15
15
|
|
|
16
16
|
return {
|
|
17
17
|
...rest,
|
|
18
|
+
disabled,
|
|
18
19
|
id,
|
|
19
20
|
content: contentRender ? (
|
|
20
|
-
contentRender({ label, contentRenderProps })
|
|
21
|
+
contentRender({ label, contentRenderProps, disabled })
|
|
21
22
|
) : (
|
|
22
23
|
<ItemContent option={label} {...contentRenderProps} disabled={disabled} />
|
|
23
24
|
),
|
|
@@ -47,9 +48,10 @@ export function transformOptionsToItems<T extends ContentRenderProps = ContentRe
|
|
|
47
48
|
|
|
48
49
|
return {
|
|
49
50
|
...rest,
|
|
51
|
+
disabled,
|
|
50
52
|
id: value,
|
|
51
53
|
content: contentRender ? (
|
|
52
|
-
contentRender({ label, contentRenderProps })
|
|
54
|
+
contentRender({ label, contentRenderProps, disabled, value })
|
|
53
55
|
) : (
|
|
54
56
|
<ItemContent option={label} {...contentRenderProps} disabled={disabled} />
|
|
55
57
|
),
|