@salutejs/plasma-new-hope 0.339.0-canary.2286.18651387499.0 → 0.339.0-canary.2286.18719037766.0

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.
Files changed (34) hide show
  1. package/cjs/components/Select/ui/TreeList/ui/Item/Item.js +76 -17
  2. package/cjs/components/Select/ui/TreeList/ui/Item/Item.js.map +1 -1
  3. package/emotion/cjs/components/Select/ui/TreeList/ui/Item/Item.js +66 -17
  4. package/emotion/cjs/examples/components/Combobox/Combobox.js +15 -0
  5. package/emotion/es/components/Select/ui/TreeList/ui/Item/Item.js +67 -18
  6. package/emotion/es/examples/components/Combobox/Combobox.js +0 -7
  7. package/es/components/Select/ui/TreeList/ui/Item/Item.js +77 -18
  8. package/es/components/Select/ui/TreeList/ui/Item/Item.js.map +1 -1
  9. package/package.json +4 -4
  10. package/styled-components/cjs/components/Select/ui/TreeList/ui/Item/Item.js +66 -17
  11. package/styled-components/cjs/examples/components/Combobox/Combobox.js +0 -15
  12. package/styled-components/es/components/Select/ui/TreeList/ui/Item/Item.js +67 -18
  13. package/styled-components/es/examples/components/Combobox/Combobox.js +0 -7
  14. package/types/components/Select/ui/TreeList/ui/Item/Item.d.ts.map +1 -1
  15. package/cjs/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.js +0 -89
  16. package/cjs/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.js.map +0 -1
  17. package/cjs/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.js +0 -89
  18. package/cjs/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.js.map +0 -1
  19. package/emotion/cjs/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.js +0 -112
  20. package/emotion/cjs/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.js +0 -112
  21. package/emotion/es/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.js +0 -61
  22. package/emotion/es/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.js +0 -61
  23. package/es/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.js +0 -81
  24. package/es/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.js.map +0 -1
  25. package/es/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.js +0 -81
  26. package/es/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.js.map +0 -1
  27. package/styled-components/cjs/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.js +0 -112
  28. package/styled-components/cjs/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.js +0 -112
  29. package/styled-components/es/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.js +0 -61
  30. package/styled-components/es/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.js +0 -61
  31. package/types/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.d.ts +0 -4
  32. package/types/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.d.ts.map +0 -1
  33. package/types/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.d.ts +0 -4
  34. package/types/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.d.ts.map +0 -1
@@ -1,112 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "ItemArrowRight", {
6
- enumerable: true,
7
- get: function() {
8
- return ItemArrowRight;
9
- }
10
- });
11
- var _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
12
- var _utils = require("../../../../../../utils");
13
- var _Selectcontext = require("../../../../../../Select.context");
14
- var _Selecttokens = require("../../../../../../Select.tokens");
15
- var _Itemstyles = require("../../Item.styles");
16
- function _getRequireWildcardCache(nodeInterop) {
17
- if (typeof WeakMap !== "function") return null;
18
- var cacheBabelInterop = new WeakMap();
19
- var cacheNodeInterop = new WeakMap();
20
- return (_getRequireWildcardCache = function(nodeInterop) {
21
- return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
22
- })(nodeInterop);
23
- }
24
- function _interop_require_wildcard(obj, nodeInterop) {
25
- if (!nodeInterop && obj && obj.__esModule) {
26
- return obj;
27
- }
28
- if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
29
- return {
30
- default: obj
31
- };
32
- }
33
- var cache = _getRequireWildcardCache(nodeInterop);
34
- if (cache && cache.has(obj)) {
35
- return cache.get(obj);
36
- }
37
- var newObj = {
38
- __proto__: null
39
- };
40
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
41
- for(var key in obj){
42
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
43
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
44
- if (desc && (desc.get || desc.set)) {
45
- Object.defineProperty(newObj, key, desc);
46
- } else {
47
- newObj[key] = obj[key];
48
- }
49
- }
50
- }
51
- newObj.default = obj;
52
- if (cache) {
53
- cache.set(obj, newObj);
54
- }
55
- return newObj;
56
- }
57
- var ItemArrowRight = function(param) {
58
- var item = param.item, index = param.index, onClick = param.onClick, onChange = param.onChange, isCurrentLevelOpened = param.isCurrentLevelOpened;
59
- var _valueToPathMap_get;
60
- var label = item.label, disabled = item.disabled, isDisabled = item.isDisabled, contentLeft = item.contentLeft, contentRight = item.contentRight;
61
- var isLeaf = !(item === null || item === void 0 ? void 0 : item.items);
62
- var _useContext = (0, _react.useContext)(_Selectcontext.Context), checked = _useContext.checked, multiselect = _useContext.multiselect, size = _useContext.size, variant = _useContext.variant, renderItem = _useContext.renderItem, // eslint-disable-next-line @typescript-eslint/ban-ts-comment
63
- // @ts-ignore
64
- _checkboxAppearance = _useContext._checkboxAppearance, focusedPath = _useContext.focusedPath, valueToPathMap = _useContext.valueToPathMap;
65
- var itemDisabled = Boolean(disabled || isDisabled);
66
- var currentItemDepth = (((_valueToPathMap_get = valueToPathMap.get(item.value.toString())) === null || _valueToPathMap_get === void 0 ? void 0 : _valueToPathMap_get.length) || 0) - 1;
67
- var withArrowInverse = isCurrentLevelOpened ? _Selecttokens.classes.arrowInverse : undefined;
68
- var focusedClass = currentItemDepth === focusedPath.length - 1 && index === (focusedPath === null || focusedPath === void 0 ? void 0 : focusedPath[currentItemDepth]) ? _Selecttokens.classes.dropdownItemIsFocused : undefined;
69
- return /*#__PURE__*/ _react.default.createElement(_Itemstyles.Wrapper, {
70
- className: focusedClass,
71
- onClick: onClick,
72
- variant: variant,
73
- role: "treeitem"
74
- }, /*#__PURE__*/ _react.default.createElement(_Itemstyles.Offset, {
75
- depth: currentItemDepth
76
- }), multiselect && /*#__PURE__*/ _react.default.createElement(_Itemstyles.IconWrapper, {
77
- variant: variant
78
- }, /*#__PURE__*/ _react.default.createElement(_Itemstyles.StyledCheckboxWrapper, {
79
- onClick: function(e) {
80
- return e.stopPropagation();
81
- }
82
- }, /*#__PURE__*/ _react.default.createElement(_Itemstyles.StyledCheckbox, {
83
- disabled: itemDisabled,
84
- checked: Boolean(checked.get(item.value)),
85
- indeterminate: checked.get(item.value) === 'indeterminate',
86
- onChange: onChange,
87
- appearance: _checkboxAppearance !== null && _checkboxAppearance !== void 0 ? _checkboxAppearance : 'default'
88
- }))), !multiselect && /*#__PURE__*/ _react.default.createElement(_Itemstyles.IconWrapper, {
89
- variant: variant
90
- }, checked.get(item.value) === 'dot' && /*#__PURE__*/ _react.default.createElement(_Itemstyles.StyledIndicator, {
91
- size: "s",
92
- view: "default"
93
- }), checked.get(item.value) === 'done' && /*#__PURE__*/ _react.default.createElement(_Itemstyles.StyledIconDone, {
94
- size: (0, _utils.sizeToIconSize)(size, variant),
95
- color: "inherit"
96
- })), renderItem ? /*#__PURE__*/ _react.default.createElement(_Itemstyles.StyledText, null, renderItem(item)) : /*#__PURE__*/ _react.default.createElement(_Itemstyles.StyledWrapper, {
97
- disabled: itemDisabled
98
- }, /*#__PURE__*/ _react.default.createElement(_Itemstyles.StyledCell, {
99
- contentLeft: contentLeft,
100
- contentRight: contentRight,
101
- // TODO: #1548
102
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
103
- // @ts-ignore
104
- title: /*#__PURE__*/ _react.default.createElement("span", null, label)
105
- })), /*#__PURE__*/ _react.default.createElement(_Itemstyles.DisclosureIconWrapper, {
106
- visibility: isLeaf ? 'hidden' : 'visible'
107
- }, /*#__PURE__*/ _react.default.createElement(_Itemstyles.StyledArrowRight, {
108
- size: (0, _utils.sizeToIconSize)(size, variant),
109
- color: "inherit",
110
- className: withArrowInverse
111
- })));
112
- };
@@ -1,61 +0,0 @@
1
- import React, { useContext } from "react";
2
- import { sizeToIconSize } from "../../../../../../utils";
3
- import { Context } from "../../../../../../Select.context";
4
- import { classes } from "../../../../../../Select.tokens";
5
- import { DisclosureIconWrapper, IconWrapper, StyledArrowLeft, StyledCell, StyledCheckbox, StyledCheckboxWrapper, StyledIconDone, StyledIndicator, StyledText, StyledWrapper, Wrapper, Offset } from "../../Item.styles";
6
- export var ItemArrowLeft = function(param) {
7
- var item = param.item, index = param.index, onClick = param.onClick, onChange = param.onChange, isCurrentLevelOpened = param.isCurrentLevelOpened;
8
- var _valueToPathMap_get;
9
- var label = item.label, disabled = item.disabled, isDisabled = item.isDisabled, contentLeft = item.contentLeft, contentRight = item.contentRight;
10
- var isLeaf = !(item === null || item === void 0 ? void 0 : item.items);
11
- var _useContext = useContext(Context), checked = _useContext.checked, multiselect = _useContext.multiselect, size = _useContext.size, variant = _useContext.variant, renderItem = _useContext.renderItem, // eslint-disable-next-line @typescript-eslint/ban-ts-comment
12
- // @ts-ignore
13
- _checkboxAppearance = _useContext._checkboxAppearance, focusedPath = _useContext.focusedPath, valueToPathMap = _useContext.valueToPathMap;
14
- var itemDisabled = Boolean(disabled || isDisabled);
15
- var currentItemDepth = (((_valueToPathMap_get = valueToPathMap.get(item.value.toString())) === null || _valueToPathMap_get === void 0 ? void 0 : _valueToPathMap_get.length) || 0) - 1;
16
- var withArrowInverse = isCurrentLevelOpened ? classes.arrowInverse : undefined;
17
- var focusedClass = currentItemDepth === focusedPath.length - 1 && index === (focusedPath === null || focusedPath === void 0 ? void 0 : focusedPath[currentItemDepth]) ? classes.dropdownItemIsFocused : undefined;
18
- return /*#__PURE__*/ React.createElement(Wrapper, {
19
- className: focusedClass,
20
- onClick: onClick,
21
- variant: variant,
22
- role: "treeitem"
23
- }, /*#__PURE__*/ React.createElement(Offset, {
24
- depth: currentItemDepth
25
- }), /*#__PURE__*/ React.createElement(DisclosureIconWrapper, {
26
- visibility: isLeaf ? 'hidden' : 'visible'
27
- }, /*#__PURE__*/ React.createElement(StyledArrowLeft, {
28
- size: sizeToIconSize(size, variant),
29
- color: "inherit",
30
- className: withArrowInverse
31
- })), multiselect && /*#__PURE__*/ React.createElement(IconWrapper, {
32
- variant: variant
33
- }, /*#__PURE__*/ React.createElement(StyledCheckboxWrapper, {
34
- onClick: function(e) {
35
- return e.stopPropagation();
36
- }
37
- }, /*#__PURE__*/ React.createElement(StyledCheckbox, {
38
- disabled: itemDisabled,
39
- checked: Boolean(checked.get(item.value)),
40
- indeterminate: checked.get(item.value) === 'indeterminate',
41
- onChange: onChange,
42
- appearance: _checkboxAppearance !== null && _checkboxAppearance !== void 0 ? _checkboxAppearance : 'default'
43
- }))), renderItem ? /*#__PURE__*/ React.createElement(StyledText, null, renderItem(item)) : /*#__PURE__*/ React.createElement(StyledWrapper, {
44
- disabled: itemDisabled
45
- }, /*#__PURE__*/ React.createElement(StyledCell, {
46
- contentLeft: contentLeft,
47
- contentRight: contentRight,
48
- // TODO: #1548
49
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
50
- // @ts-ignore
51
- title: /*#__PURE__*/ React.createElement("span", null, label)
52
- })), !multiselect && /*#__PURE__*/ React.createElement(IconWrapper, {
53
- variant: variant
54
- }, checked.get(item.value) === 'dot' && /*#__PURE__*/ React.createElement(StyledIndicator, {
55
- size: "s",
56
- view: "default"
57
- }), checked.get(item.value) === 'done' && /*#__PURE__*/ React.createElement(StyledIconDone, {
58
- size: sizeToIconSize(size, variant),
59
- color: "inherit"
60
- })));
61
- };
@@ -1,61 +0,0 @@
1
- import React, { useContext } from "react";
2
- import { sizeToIconSize } from "../../../../../../utils";
3
- import { Context } from "../../../../../../Select.context";
4
- import { classes } from "../../../../../../Select.tokens";
5
- import { DisclosureIconWrapper, IconWrapper, StyledArrowRight, StyledCell, StyledCheckbox, StyledCheckboxWrapper, StyledIconDone, StyledIndicator, StyledText, StyledWrapper, Wrapper, Offset } from "../../Item.styles";
6
- export var ItemArrowRight = function(param) {
7
- var item = param.item, index = param.index, onClick = param.onClick, onChange = param.onChange, isCurrentLevelOpened = param.isCurrentLevelOpened;
8
- var _valueToPathMap_get;
9
- var label = item.label, disabled = item.disabled, isDisabled = item.isDisabled, contentLeft = item.contentLeft, contentRight = item.contentRight;
10
- var isLeaf = !(item === null || item === void 0 ? void 0 : item.items);
11
- var _useContext = useContext(Context), checked = _useContext.checked, multiselect = _useContext.multiselect, size = _useContext.size, variant = _useContext.variant, renderItem = _useContext.renderItem, // eslint-disable-next-line @typescript-eslint/ban-ts-comment
12
- // @ts-ignore
13
- _checkboxAppearance = _useContext._checkboxAppearance, focusedPath = _useContext.focusedPath, valueToPathMap = _useContext.valueToPathMap;
14
- var itemDisabled = Boolean(disabled || isDisabled);
15
- var currentItemDepth = (((_valueToPathMap_get = valueToPathMap.get(item.value.toString())) === null || _valueToPathMap_get === void 0 ? void 0 : _valueToPathMap_get.length) || 0) - 1;
16
- var withArrowInverse = isCurrentLevelOpened ? classes.arrowInverse : undefined;
17
- var focusedClass = currentItemDepth === focusedPath.length - 1 && index === (focusedPath === null || focusedPath === void 0 ? void 0 : focusedPath[currentItemDepth]) ? classes.dropdownItemIsFocused : undefined;
18
- return /*#__PURE__*/ React.createElement(Wrapper, {
19
- className: focusedClass,
20
- onClick: onClick,
21
- variant: variant,
22
- role: "treeitem"
23
- }, /*#__PURE__*/ React.createElement(Offset, {
24
- depth: currentItemDepth
25
- }), multiselect && /*#__PURE__*/ React.createElement(IconWrapper, {
26
- variant: variant
27
- }, /*#__PURE__*/ React.createElement(StyledCheckboxWrapper, {
28
- onClick: function(e) {
29
- return e.stopPropagation();
30
- }
31
- }, /*#__PURE__*/ React.createElement(StyledCheckbox, {
32
- disabled: itemDisabled,
33
- checked: Boolean(checked.get(item.value)),
34
- indeterminate: checked.get(item.value) === 'indeterminate',
35
- onChange: onChange,
36
- appearance: _checkboxAppearance !== null && _checkboxAppearance !== void 0 ? _checkboxAppearance : 'default'
37
- }))), !multiselect && /*#__PURE__*/ React.createElement(IconWrapper, {
38
- variant: variant
39
- }, checked.get(item.value) === 'dot' && /*#__PURE__*/ React.createElement(StyledIndicator, {
40
- size: "s",
41
- view: "default"
42
- }), checked.get(item.value) === 'done' && /*#__PURE__*/ React.createElement(StyledIconDone, {
43
- size: sizeToIconSize(size, variant),
44
- color: "inherit"
45
- })), renderItem ? /*#__PURE__*/ React.createElement(StyledText, null, renderItem(item)) : /*#__PURE__*/ React.createElement(StyledWrapper, {
46
- disabled: itemDisabled
47
- }, /*#__PURE__*/ React.createElement(StyledCell, {
48
- contentLeft: contentLeft,
49
- contentRight: contentRight,
50
- // TODO: #1548
51
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
52
- // @ts-ignore
53
- title: /*#__PURE__*/ React.createElement("span", null, label)
54
- })), /*#__PURE__*/ React.createElement(DisclosureIconWrapper, {
55
- visibility: isLeaf ? 'hidden' : 'visible'
56
- }, /*#__PURE__*/ React.createElement(StyledArrowRight, {
57
- size: sizeToIconSize(size, variant),
58
- color: "inherit",
59
- className: withArrowInverse
60
- })));
61
- };
@@ -1,4 +0,0 @@
1
- import type { FC } from 'react';
2
- import { ItemArrowProps } from '../../Item.types';
3
- export declare const ItemArrowLeft: FC<ItemArrowProps>;
4
- //# sourceMappingURL=ItemArrowLeft.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ItemArrowLeft.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAmBhC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,cAAc,CA6E5C,CAAC"}
@@ -1,4 +0,0 @@
1
- import type { FC } from 'react';
2
- import { ItemArrowProps } from '../../Item.types';
3
- export declare const ItemArrowRight: FC<ItemArrowProps>;
4
- //# sourceMappingURL=ItemArrowRight.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ItemArrowRight.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAmBhC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,cAAc,CA6E7C,CAAC"}