@salutejs/plasma-new-hope 0.68.0-canary.1148.8464224381.0 → 0.68.0-canary.1148.8482525044.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Cell/Cell.js +15 -12
- package/cjs/components/Cell/Cell.js.map +1 -1
- package/cjs/components/Cell/CellTextbox/CellTextbox.js +21 -0
- package/cjs/components/Cell/CellTextbox/CellTextbox.js.map +1 -0
- package/cjs/components/Cell/{Textbox/Textbox.styles.js → CellTextbox/CellTextbox.styles.js} +4 -4
- package/cjs/components/Cell/CellTextbox/CellTextbox.styles.js.map +1 -0
- package/cjs/components/Cell/{Textbox/ui/TextLabel.js → CellTextbox/ui/CellTextLabel.js} +4 -4
- package/cjs/components/Cell/CellTextbox/ui/CellTextLabel.js.map +1 -0
- package/cjs/components/Cell/{Textbox/ui/TextSubtitle.js → CellTextbox/ui/CellTextSubtitle.js} +4 -4
- package/cjs/components/Cell/CellTextbox/ui/CellTextSubtitle.js.map +1 -0
- package/cjs/components/Cell/{Textbox/ui/TextTitle.js → CellTextbox/ui/CellTextTitle.js} +4 -4
- package/cjs/components/Cell/CellTextbox/ui/CellTextTitle.js.map +1 -0
- package/cjs/components/Dropdown/Dropdown.js +2 -1
- package/cjs/components/Dropdown/Dropdown.js.map +1 -1
- package/cjs/components/Popover/Popover.js +46 -31
- package/cjs/components/Popover/Popover.js.map +1 -1
- package/cjs/index.js +8 -8
- package/es/components/Cell/Cell.js +15 -12
- package/es/components/Cell/Cell.js.map +1 -1
- package/es/components/Cell/CellTextbox/CellTextbox.js +17 -0
- package/es/components/Cell/CellTextbox/CellTextbox.js.map +1 -0
- package/es/components/Cell/CellTextbox/CellTextbox.styles.js +9 -0
- package/es/components/Cell/CellTextbox/CellTextbox.styles.js.map +1 -0
- package/es/components/Cell/{Textbox/ui/TextLabel.js → CellTextbox/ui/CellTextLabel.js} +4 -4
- package/es/components/Cell/CellTextbox/ui/CellTextLabel.js.map +1 -0
- package/es/components/Cell/{Textbox/ui/TextSubtitle.js → CellTextbox/ui/CellTextSubtitle.js} +4 -4
- package/es/components/Cell/CellTextbox/ui/CellTextSubtitle.js.map +1 -0
- package/es/components/Cell/{Textbox/ui/TextTitle.js → CellTextbox/ui/CellTextTitle.js} +4 -4
- package/es/components/Cell/CellTextbox/ui/CellTextTitle.js.map +1 -0
- package/es/components/Dropdown/Dropdown.js +2 -1
- package/es/components/Dropdown/Dropdown.js.map +1 -1
- package/es/components/Popover/Popover.js +46 -31
- package/es/components/Popover/Popover.js.map +1 -1
- package/es/index.js +4 -4
- package/package.json +4 -4
- package/styled-components/cjs/components/Cell/Cell.js +15 -12
- package/styled-components/cjs/components/Cell/CellTextbox/CellTextbox.js +20 -0
- package/styled-components/cjs/components/Cell/{Textbox/Textbox.styles.js → CellTextbox/CellTextbox.styles.js} +3 -3
- package/styled-components/cjs/components/Cell/{Textbox/ui/TextLabel.js → CellTextbox/ui/CellTextLabel.js} +3 -3
- package/styled-components/cjs/components/Cell/{Textbox/ui/TextSubtitle.js → CellTextbox/ui/CellTextSubtitle.js} +3 -3
- package/styled-components/cjs/components/Cell/{Textbox/ui/TextTitle.js → CellTextbox/ui/CellTextTitle.js} +3 -3
- package/styled-components/cjs/components/Cell/index.js +12 -12
- package/styled-components/cjs/components/Dropdown/Dropdown.js +2 -1
- package/styled-components/cjs/components/Popover/Popover.js +46 -31
- package/styled-components/cjs/examples/plasma_b2c/components/Cell/Cell.config.js +0 -5
- package/styled-components/cjs/examples/plasma_b2c/components/Cell/Cell.js +8 -8
- package/styled-components/cjs/examples/plasma_b2c/components/Cell/Cell.stories.tsx +12 -15
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Popover/Popover.stories.tsx +7 -0
- package/styled-components/cjs/examples/plasma_web/components/Cell/Cell.config.js +0 -5
- package/styled-components/cjs/examples/plasma_web/components/Cell/Cell.js +9 -9
- package/styled-components/cjs/examples/plasma_web/components/Cell/Cell.stories.tsx +11 -14
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +1 -1
- package/styled-components/es/components/Cell/Cell.js +15 -12
- package/styled-components/es/components/Cell/CellTextbox/CellTextbox.js +13 -0
- package/styled-components/es/components/Cell/{Textbox/Textbox.styles.js → CellTextbox/CellTextbox.styles.js} +2 -2
- package/styled-components/es/components/Cell/{Textbox/ui/TextLabel.js → CellTextbox/ui/CellTextLabel.js} +2 -2
- package/styled-components/es/components/Cell/{Textbox/ui/TextSubtitle.js → CellTextbox/ui/CellTextSubtitle.js} +2 -2
- package/styled-components/es/components/Cell/{Textbox/ui/TextTitle.js → CellTextbox/ui/CellTextTitle.js} +2 -2
- package/styled-components/es/components/Cell/index.js +4 -4
- package/styled-components/es/components/Dropdown/Dropdown.js +2 -1
- package/styled-components/es/components/Popover/Popover.js +46 -31
- package/styled-components/es/examples/plasma_b2c/components/Cell/Cell.config.js +0 -5
- package/styled-components/es/examples/plasma_b2c/components/Cell/Cell.js +2 -2
- package/styled-components/es/examples/plasma_b2c/components/Cell/Cell.stories.tsx +12 -15
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Popover/Popover.stories.tsx +7 -0
- package/styled-components/es/examples/plasma_web/components/Cell/Cell.config.js +0 -5
- package/styled-components/es/examples/plasma_web/components/Cell/Cell.js +2 -2
- package/styled-components/es/examples/plasma_web/components/Cell/Cell.stories.tsx +11 -14
- package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +1 -1
- package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +1 -1
- package/types/components/Cell/Cell.d.ts +0 -1
- package/types/components/Cell/Cell.d.ts.map +1 -1
- package/types/components/Cell/Cell.types.d.ts +9 -8
- package/types/components/Cell/Cell.types.d.ts.map +1 -1
- package/types/components/Cell/CellTextbox/CellTextbox.d.ts +4 -0
- package/types/components/Cell/CellTextbox/CellTextbox.d.ts.map +1 -0
- package/types/components/Cell/CellTextbox/CellTextbox.styles.d.ts +2 -0
- package/types/components/Cell/CellTextbox/CellTextbox.styles.d.ts.map +1 -0
- package/types/components/Cell/CellTextbox/CellTextbox.types.d.ts +43 -0
- package/types/components/Cell/CellTextbox/CellTextbox.types.d.ts.map +1 -0
- package/types/components/Cell/CellTextbox/ui/CellTextLabel.d.ts +5 -0
- package/types/components/Cell/CellTextbox/ui/CellTextLabel.d.ts.map +1 -0
- package/types/components/Cell/CellTextbox/ui/CellTextSubtitle.d.ts +5 -0
- package/types/components/Cell/CellTextbox/ui/CellTextSubtitle.d.ts.map +1 -0
- package/types/components/Cell/CellTextbox/ui/CellTextTitle.d.ts +5 -0
- package/types/components/Cell/CellTextbox/ui/CellTextTitle.d.ts.map +1 -0
- package/types/components/Cell/index.d.ts +5 -5
- package/types/components/Cell/index.d.ts.map +1 -1
- package/types/components/Combobox/Combobox.styles.d.ts +8 -2
- package/types/components/Combobox/Combobox.styles.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.styles.d.ts +7 -1
- package/types/components/Dropdown/Dropdown.styles.d.ts.map +1 -1
- package/types/components/Popover/Popover.d.ts +2 -2
- package/types/components/Popover/Popover.d.ts.map +1 -1
- package/types/components/Popover/Popover.types.d.ts +19 -14
- package/types/components/Popover/Popover.types.d.ts.map +1 -1
- package/types/components/Select/Select.styles.d.ts +8 -2
- package/types/components/Select/Select.styles.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Cell/Cell.config.d.ts +0 -5
- package/types/examples/plasma_b2c/components/Cell/Cell.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Cell/Cell.d.ts +10 -8
- package/types/examples/plasma_b2c/components/Cell/Cell.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Popover/Popover.d.ts +7 -1
- package/types/examples/plasma_b2c/components/Popover/Popover.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Cell/Cell.config.d.ts +0 -5
- package/types/examples/plasma_web/components/Cell/Cell.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Cell/Cell.d.ts +10 -8
- package/types/examples/plasma_web/components/Cell/Cell.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Popover/Popover.d.ts +7 -1
- package/types/examples/plasma_web/components/Popover/Popover.d.ts.map +1 -1
- package/types/examples/sds_engineer/components/Popover/Popover.d.ts +7 -1
- package/types/examples/sds_engineer/components/Popover/Popover.d.ts.map +1 -1
- package/cjs/components/Cell/Textbox/Textbox.js +0 -20
- package/cjs/components/Cell/Textbox/Textbox.js.map +0 -1
- package/cjs/components/Cell/Textbox/Textbox.styles.js.map +0 -1
- package/cjs/components/Cell/Textbox/ui/TextLabel.js.map +0 -1
- package/cjs/components/Cell/Textbox/ui/TextSubtitle.js.map +0 -1
- package/cjs/components/Cell/Textbox/ui/TextTitle.js.map +0 -1
- package/es/components/Cell/Textbox/Textbox.js +0 -16
- package/es/components/Cell/Textbox/Textbox.js.map +0 -1
- package/es/components/Cell/Textbox/Textbox.styles.js +0 -9
- package/es/components/Cell/Textbox/Textbox.styles.js.map +0 -1
- package/es/components/Cell/Textbox/ui/TextLabel.js.map +0 -1
- package/es/components/Cell/Textbox/ui/TextSubtitle.js.map +0 -1
- package/es/components/Cell/Textbox/ui/TextTitle.js.map +0 -1
- package/styled-components/cjs/components/Cell/Textbox/Textbox.js +0 -19
- package/styled-components/es/components/Cell/Textbox/Textbox.js +0 -12
- package/types/components/Cell/Textbox/Textbox.d.ts +0 -4
- package/types/components/Cell/Textbox/Textbox.d.ts.map +0 -1
- package/types/components/Cell/Textbox/Textbox.styles.d.ts +0 -2
- package/types/components/Cell/Textbox/Textbox.styles.d.ts.map +0 -1
- package/types/components/Cell/Textbox/Textbox.types.d.ts +0 -33
- package/types/components/Cell/Textbox/Textbox.types.d.ts.map +0 -1
- package/types/components/Cell/Textbox/ui/TextLabel.d.ts +0 -5
- package/types/components/Cell/Textbox/ui/TextLabel.d.ts.map +0 -1
- package/types/components/Cell/Textbox/ui/TextSubtitle.d.ts +0 -5
- package/types/components/Cell/Textbox/ui/TextSubtitle.d.ts.map +0 -1
- package/types/components/Cell/Textbox/ui/TextTitle.d.ts +0 -5
- package/types/components/Cell/Textbox/ui/TextTitle.d.ts.map +0 -1
- /package/styled-components/cjs/components/Cell/{Textbox/Textbox.types.js → CellTextbox/CellTextbox.types.js} +0 -0
- /package/styled-components/es/components/Cell/{Textbox/Textbox.types.js → CellTextbox/CellTextbox.types.js} +0 -0
@@ -3,14 +3,14 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.CellTextboxSubtitle = void 0;
|
7
7
|
var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react"));
|
8
8
|
var _styledComponents = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("styled-components"));
|
9
9
|
var _Cell = /*#__PURE__*/require("../../Cell.tokens");
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
11
11
|
var StyledTextSubtitle = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
12
|
-
componentId: "plasma-new-hope__sc-
|
12
|
+
componentId: "plasma-new-hope__sc-ulqa2a-0"
|
13
13
|
})(["color:var(", ");font-size:var(", ");font-weight:var(", ");font-family:var(", ");font-style:var(", ");line-height:var(", ");letter-spacing:var(", ");"], _Cell.tokens.cellSubtitleColor, _Cell.tokens.cellSubtitleFontSize, _Cell.tokens.cellSubtitleFontWeight, _Cell.tokens.cellSubtitleFontFamily, _Cell.tokens.cellSubtitleFontStyle, _Cell.tokens.cellSubtitleLineHeight, _Cell.tokens.cellSubtitleLetterSpacing);
|
14
|
-
var
|
14
|
+
var CellTextboxSubtitle = exports.CellTextboxSubtitle = function CellTextboxSubtitle(props) {
|
15
15
|
return /*#__PURE__*/_react["default"].createElement(StyledTextSubtitle, null, props.children);
|
16
16
|
};
|
@@ -3,14 +3,14 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.CellTextboxTitle = void 0;
|
7
7
|
var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react"));
|
8
8
|
var _styledComponents = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("styled-components"));
|
9
9
|
var _Cell = /*#__PURE__*/require("../../Cell.tokens");
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
11
11
|
var StyledTextTitle = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
12
|
-
componentId: "plasma-new-hope__sc-
|
12
|
+
componentId: "plasma-new-hope__sc-o4ebas-0"
|
13
13
|
})(["color:var(", ");font-size:var(", ");font-weight:var(", ");font-family:var(", ");font-style:var(", ");line-height:var(", ");letter-spacing:var(", ");"], _Cell.tokens.cellTitleColor, _Cell.tokens.cellTitleFontSize, _Cell.tokens.cellTitleFontWeight, _Cell.tokens.cellTitleFontFamily, _Cell.tokens.cellTitleFontStyle, _Cell.tokens.cellTitleLineHeight, _Cell.tokens.cellTitleLetterSpacing);
|
14
|
-
var
|
14
|
+
var CellTextboxTitle = exports.CellTextboxTitle = function CellTextboxTitle(props) {
|
15
15
|
return /*#__PURE__*/_react["default"].createElement(StyledTextTitle, null, props.children);
|
16
16
|
};
|
@@ -3,28 +3,28 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
Object.defineProperty(exports, "
|
6
|
+
Object.defineProperty(exports, "CellTextbox", {
|
7
7
|
enumerable: true,
|
8
8
|
get: function get() {
|
9
|
-
return
|
9
|
+
return _CellTextbox.CellTextbox;
|
10
10
|
}
|
11
11
|
});
|
12
|
-
Object.defineProperty(exports, "
|
12
|
+
Object.defineProperty(exports, "CellTextboxLabel", {
|
13
13
|
enumerable: true,
|
14
14
|
get: function get() {
|
15
|
-
return
|
15
|
+
return _CellTextLabel.CellTextboxLabel;
|
16
16
|
}
|
17
17
|
});
|
18
|
-
Object.defineProperty(exports, "
|
18
|
+
Object.defineProperty(exports, "CellTextboxSubtitle", {
|
19
19
|
enumerable: true,
|
20
20
|
get: function get() {
|
21
|
-
return
|
21
|
+
return _CellTextSubtitle.CellTextboxSubtitle;
|
22
22
|
}
|
23
23
|
});
|
24
|
-
Object.defineProperty(exports, "
|
24
|
+
Object.defineProperty(exports, "CellTextboxTitle", {
|
25
25
|
enumerable: true,
|
26
26
|
get: function get() {
|
27
|
-
return
|
27
|
+
return _CellTextTitle.CellTextboxTitle;
|
28
28
|
}
|
29
29
|
});
|
30
30
|
Object.defineProperty(exports, "cellClasses", {
|
@@ -51,9 +51,9 @@ Object.defineProperty(exports, "cellTokens", {
|
|
51
51
|
return _Cell2.tokens;
|
52
52
|
}
|
53
53
|
});
|
54
|
-
var
|
55
|
-
var
|
56
|
-
var
|
54
|
+
var _CellTextLabel = /*#__PURE__*/require("./CellTextbox/ui/CellTextLabel");
|
55
|
+
var _CellTextTitle = /*#__PURE__*/require("./CellTextbox/ui/CellTextTitle");
|
56
|
+
var _CellTextSubtitle = /*#__PURE__*/require("./CellTextbox/ui/CellTextSubtitle");
|
57
57
|
var _Cell = /*#__PURE__*/require("./Cell");
|
58
58
|
var _Cell2 = /*#__PURE__*/require("./Cell.tokens");
|
59
|
-
var
|
59
|
+
var _CellTextbox = /*#__PURE__*/require("./CellTextbox/CellTextbox");
|
@@ -71,6 +71,7 @@ var dropdownRoot = exports.dropdownRoot = function dropdownRoot(Root) {
|
|
71
71
|
placement: (0, _utils.getPlacements)(placement),
|
72
72
|
trigger: trigger,
|
73
73
|
closeOnOverlayClick: closeOnOverlayClick,
|
74
|
+
closeOnBeyondTargetHover: false,
|
74
75
|
closeOnEsc: closeOnEsc,
|
75
76
|
isFocusTrapped: isFocusTrapped,
|
76
77
|
frame: frame
|
@@ -95,7 +96,7 @@ var dropdownConfig = exports.dropdownConfig = {
|
|
95
96
|
}
|
96
97
|
},
|
97
98
|
defaults: {
|
98
|
-
view: '
|
99
|
+
view: 'default',
|
99
100
|
size: 'm'
|
100
101
|
}
|
101
102
|
};
|
@@ -13,7 +13,7 @@ var _utils = /*#__PURE__*/require("../../utils");
|
|
13
13
|
var _base = /*#__PURE__*/require("./variations/_view/base");
|
14
14
|
var _Popover = /*#__PURE__*/require("./Popover.styles");
|
15
15
|
var _Popover2 = /*#__PURE__*/require("./Popover.tokens");
|
16
|
-
var _excluded = ["target", "children", "isOpen", "trigger", "hasArrow", "frame", "className", "placement", "offset", "zIndex", "isFocusTrapped", "
|
16
|
+
var _excluded = ["target", "children", "isOpen", "trigger", "hasArrow", "frame", "className", "placement", "offset", "zIndex", "isFocusTrapped", "closeOnEsc", "preventOverflow", "usePortal", "view", "onToggle"];
|
17
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
18
18
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
19
19
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
@@ -39,33 +39,41 @@ var POPOVER_PORTAL_ID = exports.POPOVER_PORTAL_ID = 'plasma-popover-root';
|
|
39
39
|
* и вызова по клику либо ховеру.
|
40
40
|
*/
|
41
41
|
var popoverRoot = exports.popoverRoot = function popoverRoot(Root) {
|
42
|
-
return /*#__PURE__*/(0, _react.forwardRef)(function (
|
43
|
-
var
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
closeOnEsc =
|
62
|
-
|
63
|
-
preventOverflow =
|
64
|
-
|
65
|
-
usePortal =
|
66
|
-
view =
|
67
|
-
onToggle =
|
68
|
-
rest = _objectWithoutProperties(
|
42
|
+
return /*#__PURE__*/(0, _react.forwardRef)(function (props, outerRootRef) {
|
43
|
+
var _placement$;
|
44
|
+
var target = props.target,
|
45
|
+
children = props.children,
|
46
|
+
isOpen = props.isOpen,
|
47
|
+
_props$trigger = props.trigger,
|
48
|
+
trigger = _props$trigger === void 0 ? 'click' : _props$trigger,
|
49
|
+
hasArrow = props.hasArrow,
|
50
|
+
_props$frame = props.frame,
|
51
|
+
frame = _props$frame === void 0 ? 'document' : _props$frame,
|
52
|
+
className = props.className,
|
53
|
+
_props$placement = props.placement,
|
54
|
+
placement = _props$placement === void 0 ? 'auto' : _props$placement,
|
55
|
+
_props$offset = props.offset,
|
56
|
+
offset = _props$offset === void 0 ? [0, 0] : _props$offset,
|
57
|
+
zIndex = props.zIndex,
|
58
|
+
_props$isFocusTrapped = props.isFocusTrapped,
|
59
|
+
isFocusTrapped = _props$isFocusTrapped === void 0 ? true : _props$isFocusTrapped,
|
60
|
+
_props$closeOnEsc = props.closeOnEsc,
|
61
|
+
closeOnEsc = _props$closeOnEsc === void 0 ? true : _props$closeOnEsc,
|
62
|
+
_props$preventOverflo = props.preventOverflow,
|
63
|
+
preventOverflow = _props$preventOverflo === void 0 ? true : _props$preventOverflo,
|
64
|
+
_props$usePortal = props.usePortal,
|
65
|
+
usePortal = _props$usePortal === void 0 ? false : _props$usePortal,
|
66
|
+
view = props.view,
|
67
|
+
onToggle = props.onToggle,
|
68
|
+
rest = _objectWithoutProperties(props, _excluded);
|
69
|
+
var closeOnOverlayClick = true;
|
70
|
+
var closeOnBeyondTargetHover = true;
|
71
|
+
if (props.trigger === 'click' && props.closeOnOverlayClick === false) {
|
72
|
+
closeOnOverlayClick = false;
|
73
|
+
}
|
74
|
+
if (props.trigger === 'hover' && props.closeOnBeyondTargetHover === false) {
|
75
|
+
closeOnBeyondTargetHover = false;
|
76
|
+
}
|
69
77
|
var rootRef = (0, _react.useRef)(null);
|
70
78
|
var popoverRef = (0, _react.useRef)(null);
|
71
79
|
var handleRef = (0, _plasmaCore.useForkRef)(rootRef, outerRootRef);
|
@@ -86,7 +94,9 @@ var popoverRoot = exports.popoverRoot = function popoverRoot(Root) {
|
|
86
94
|
opacity: isOpen ? 1 : 0
|
87
95
|
};
|
88
96
|
var _usePopper = (0, _reactPopper.usePopper)(rootRef.current, popoverRef.current, {
|
89
|
-
|
97
|
+
// TODO: #1121
|
98
|
+
// eslint-disable-next-line no-nested-ternary
|
99
|
+
placement: isAutoArray ? (_placement$ = placement[0]) !== null && _placement$ !== void 0 && _placement$.endsWith('start') ? 'auto-start' : 'auto' : placement,
|
90
100
|
modifiers: [{
|
91
101
|
name: 'preventOverflow',
|
92
102
|
options: {
|
@@ -222,10 +232,15 @@ var popoverRoot = exports.popoverRoot = function popoverRoot(Root) {
|
|
222
232
|
}, target), children && portalRef.current && /*#__PURE__*/_reactDom["default"].createPortal( /*#__PURE__*/_react["default"].createElement(Root, _extends({
|
223
233
|
view: view,
|
224
234
|
className: className
|
225
|
-
}, rest
|
235
|
+
}, rest, {
|
236
|
+
onMouseEnter: closeOnBeyondTargetHover ? undefined : onMouseEnter,
|
237
|
+
onMouseLeave: closeOnBeyondTargetHover ? undefined : onMouseEnter
|
238
|
+
}), /*#__PURE__*/_react["default"].createElement(_Popover.StyledPopover, _extends({}, attributes.popper, {
|
226
239
|
className: _Popover2.classes.root,
|
227
240
|
ref: popoverForkRef,
|
228
|
-
style: _objectSpread(_objectSpread({}, styles.popper),
|
241
|
+
style: _objectSpread(_objectSpread(_objectSpread({}, styles.popper), {
|
242
|
+
display: isOpen ? 'block' : 'none'
|
243
|
+
}), initialStyles),
|
229
244
|
zIndex: zIndex
|
230
245
|
}), hasArrow && /*#__PURE__*/_react["default"].createElement(_Popover.StyledArrow, _extends({
|
231
246
|
className: _Popover2.classes.arrow,
|
@@ -7,11 +7,6 @@ exports.config = void 0;
|
|
7
7
|
var _styledComponents = /*#__PURE__*/require("styled-components");
|
8
8
|
var _Cell = /*#__PURE__*/require("../../../../components/Cell");
|
9
9
|
var config = exports.config = {
|
10
|
-
defaults: {
|
11
|
-
view: 'default',
|
12
|
-
size: 'm',
|
13
|
-
stretching: 'filled'
|
14
|
-
},
|
15
10
|
variations: {
|
16
11
|
view: {
|
17
12
|
"default": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-primary);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-secondary);", ":transparent;"], _Cell.cellTokens.cellColor, _Cell.cellTokens.cellLabelColor, _Cell.cellTokens.cellTitleColor, _Cell.cellTokens.cellSubtitleColor, _Cell.cellTokens.cellBackgroundColor)
|
@@ -4,28 +4,28 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.Cell = void 0;
|
7
|
-
Object.defineProperty(exports, "
|
7
|
+
Object.defineProperty(exports, "CellTextbox", {
|
8
8
|
enumerable: true,
|
9
9
|
get: function get() {
|
10
|
-
return _Cell.
|
10
|
+
return _Cell.CellTextbox;
|
11
11
|
}
|
12
12
|
});
|
13
|
-
Object.defineProperty(exports, "
|
13
|
+
Object.defineProperty(exports, "CellTextboxLabel", {
|
14
14
|
enumerable: true,
|
15
15
|
get: function get() {
|
16
|
-
return _Cell.
|
16
|
+
return _Cell.CellTextboxLabel;
|
17
17
|
}
|
18
18
|
});
|
19
|
-
Object.defineProperty(exports, "
|
19
|
+
Object.defineProperty(exports, "CellTextboxSubtitle", {
|
20
20
|
enumerable: true,
|
21
21
|
get: function get() {
|
22
|
-
return _Cell.
|
22
|
+
return _Cell.CellTextboxSubtitle;
|
23
23
|
}
|
24
24
|
});
|
25
|
-
Object.defineProperty(exports, "
|
25
|
+
Object.defineProperty(exports, "CellTextboxTitle", {
|
26
26
|
enumerable: true,
|
27
27
|
get: function get() {
|
28
|
-
return _Cell.
|
28
|
+
return _Cell.CellTextboxTitle;
|
29
29
|
}
|
30
30
|
});
|
31
31
|
var _Cell = /*#__PURE__*/require("../../../../components/Cell");
|
@@ -7,7 +7,7 @@ import { WithTheme } from '../../../_helpers';
|
|
7
7
|
import { Avatar } from '../Avatar/Avatar';
|
8
8
|
import { IconChevronLeft } from '../../../../components/_Icon';
|
9
9
|
|
10
|
-
import { Cell,
|
10
|
+
import { Cell, CellTextbox, CellTextboxTitle } from './Cell';
|
11
11
|
|
12
12
|
type StoryProps = ComponentProps<typeof Cell> & {
|
13
13
|
itemsCount?: number;
|
@@ -48,13 +48,13 @@ const meta: Meta<typeof Cell> = {
|
|
48
48
|
type: 'select',
|
49
49
|
},
|
50
50
|
},
|
51
|
-
|
51
|
+
alignContentLeft: {
|
52
52
|
options: alignLeft,
|
53
53
|
control: {
|
54
54
|
type: 'select',
|
55
55
|
},
|
56
56
|
},
|
57
|
-
|
57
|
+
alignContentRight: {
|
58
58
|
options: alignRight,
|
59
59
|
control: {
|
60
60
|
type: 'select',
|
@@ -76,8 +76,8 @@ export const Default: Story = {
|
|
76
76
|
stretching: 'filled',
|
77
77
|
enableLeftContent: false,
|
78
78
|
enableRightContent: false,
|
79
|
-
|
80
|
-
|
79
|
+
alignContentLeft: 'center',
|
80
|
+
alignContentRight: 'center',
|
81
81
|
title: 'Title',
|
82
82
|
subtitle: 'Subtitle',
|
83
83
|
label: 'Label',
|
@@ -90,12 +90,7 @@ export const Default: Story = {
|
|
90
90
|
<Avatar size={getSize(args.size)} url="https://avatars.githubusercontent.com/u/1813468?v=4" />
|
91
91
|
)
|
92
92
|
}
|
93
|
-
alignLeft={args.alignLeft}
|
94
93
|
contentRight={!args.enableRightContent && <ChevronRight color="inherit" size="xs" />}
|
95
|
-
alignRight={args.alignRight}
|
96
|
-
title={args.title}
|
97
|
-
subtitle={args.subtitle}
|
98
|
-
label={args.label}
|
99
94
|
{...args}
|
100
95
|
/>
|
101
96
|
);
|
@@ -115,16 +110,18 @@ export const WithContentTextboxCustom: Story = {
|
|
115
110
|
`;
|
116
111
|
return (
|
117
112
|
<Cell
|
113
|
+
view="default"
|
114
|
+
size={args.size}
|
115
|
+
stretching={args.stretching}
|
118
116
|
contentLeft={
|
119
117
|
<Avatar size={getSize(args.size)} url="https://avatars.githubusercontent.com/u/1813468?v=4" />
|
120
118
|
}
|
121
|
-
contentRight={<ChevronRight color="inherit" size="xs" />}
|
122
|
-
{...args}
|
119
|
+
contentRight={!args.enableRightContent && <ChevronRight color="inherit" size="xs" />}
|
123
120
|
>
|
124
|
-
<
|
125
|
-
<
|
121
|
+
<CellTextboxTitle>
|
122
|
+
<CellTextbox>Title</CellTextbox>
|
126
123
|
<MyStyledText>My styled Text</MyStyledText>
|
127
|
-
</
|
124
|
+
</CellTextboxTitle>
|
128
125
|
</Cell>
|
129
126
|
);
|
130
127
|
},
|
@@ -33,6 +33,12 @@ const meta: Meta<typeof Popover> = {
|
|
33
33
|
},
|
34
34
|
table: { defaultValue: { summary: true } },
|
35
35
|
},
|
36
|
+
closeOnBeyondTargetHover: {
|
37
|
+
control: {
|
38
|
+
type: 'boolean',
|
39
|
+
},
|
40
|
+
table: { defaultValue: { summary: true } },
|
41
|
+
},
|
36
42
|
closeOnEsc: {
|
37
43
|
control: {
|
38
44
|
type: 'boolean',
|
@@ -62,6 +68,7 @@ const meta: Meta<typeof Popover> = {
|
|
62
68
|
placement: 'bottom',
|
63
69
|
trigger: 'click',
|
64
70
|
closeOnOverlayClick: true,
|
71
|
+
closeOnBeyondTargetHover: true,
|
65
72
|
closeOnEsc: true,
|
66
73
|
isFocusTrapped: true,
|
67
74
|
skidding: 0,
|
@@ -7,11 +7,6 @@ exports.config = void 0;
|
|
7
7
|
var _styledComponents = /*#__PURE__*/require("styled-components");
|
8
8
|
var _Cell = /*#__PURE__*/require("../../../../components/Cell");
|
9
9
|
var config = exports.config = {
|
10
|
-
defaults: {
|
11
|
-
view: 'default',
|
12
|
-
size: 'm',
|
13
|
-
stretching: 'filled'
|
14
|
-
},
|
15
10
|
variations: {
|
16
11
|
view: {
|
17
12
|
"default": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-primary);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-secondary);", ":transparent;"], _Cell.cellTokens.cellColor, _Cell.cellTokens.cellLabelColor, _Cell.cellTokens.cellTitleColor, _Cell.cellTokens.cellSubtitleColor, _Cell.cellTokens.cellBackgroundColor)
|
@@ -4,32 +4,32 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.Cell = void 0;
|
7
|
-
Object.defineProperty(exports, "
|
7
|
+
Object.defineProperty(exports, "CellTextbox", {
|
8
8
|
enumerable: true,
|
9
9
|
get: function get() {
|
10
|
-
return _Cell.
|
10
|
+
return _Cell.CellTextbox;
|
11
11
|
}
|
12
12
|
});
|
13
|
-
Object.defineProperty(exports, "
|
13
|
+
Object.defineProperty(exports, "CellTextboxLabel", {
|
14
14
|
enumerable: true,
|
15
15
|
get: function get() {
|
16
|
-
return _Cell.
|
16
|
+
return _Cell.CellTextboxLabel;
|
17
17
|
}
|
18
18
|
});
|
19
|
-
Object.defineProperty(exports, "
|
19
|
+
Object.defineProperty(exports, "CellTextboxSubtitle", {
|
20
20
|
enumerable: true,
|
21
21
|
get: function get() {
|
22
|
-
return _Cell.
|
22
|
+
return _Cell.CellTextboxSubtitle;
|
23
23
|
}
|
24
24
|
});
|
25
|
-
Object.defineProperty(exports, "
|
25
|
+
Object.defineProperty(exports, "CellTextboxTitle", {
|
26
26
|
enumerable: true,
|
27
27
|
get: function get() {
|
28
|
-
return _Cell.
|
28
|
+
return _Cell.CellTextboxTitle;
|
29
29
|
}
|
30
30
|
});
|
31
|
-
var _Cell = /*#__PURE__*/require("../../../../components/Cell");
|
32
31
|
var _engines = /*#__PURE__*/require("../../../../engines");
|
32
|
+
var _Cell = /*#__PURE__*/require("../../../../components/Cell");
|
33
33
|
var _Cell2 = /*#__PURE__*/require("./Cell.config");
|
34
34
|
var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_Cell.cellConfig, _Cell2.config);
|
35
35
|
var Cell = exports.Cell = /*#__PURE__*/(0, _engines.component)(mergedConfig);
|
@@ -7,7 +7,7 @@ import { WithTheme } from '../../../_helpers';
|
|
7
7
|
import { Avatar } from '../Avatar/Avatar';
|
8
8
|
import { IconChevronLeft } from '../../../../components/_Icon';
|
9
9
|
|
10
|
-
import { Cell,
|
10
|
+
import { Cell, CellTextbox, CellTextboxTitle } from './Cell';
|
11
11
|
|
12
12
|
type StoryProps = ComponentProps<typeof Cell> & {
|
13
13
|
itemsCount?: number;
|
@@ -48,13 +48,13 @@ const meta: Meta<typeof Cell> = {
|
|
48
48
|
type: 'select',
|
49
49
|
},
|
50
50
|
},
|
51
|
-
|
51
|
+
alignContentLeft: {
|
52
52
|
options: alignLeft,
|
53
53
|
control: {
|
54
54
|
type: 'select',
|
55
55
|
},
|
56
56
|
},
|
57
|
-
|
57
|
+
alignContentRight: {
|
58
58
|
options: alignRight,
|
59
59
|
control: {
|
60
60
|
type: 'select',
|
@@ -76,8 +76,8 @@ export const Default: Story = {
|
|
76
76
|
stretching: 'filled',
|
77
77
|
enableLeftContent: false,
|
78
78
|
enableRightContent: false,
|
79
|
-
|
80
|
-
|
79
|
+
alignContentLeft: 'center',
|
80
|
+
alignContentRight: 'center',
|
81
81
|
title: 'Title',
|
82
82
|
subtitle: 'Subtitle',
|
83
83
|
label: 'Label',
|
@@ -90,12 +90,7 @@ export const Default: Story = {
|
|
90
90
|
<Avatar size={getSize(args.size)} url="https://avatars.githubusercontent.com/u/1813468?v=4" />
|
91
91
|
)
|
92
92
|
}
|
93
|
-
alignLeft={args.alignLeft}
|
94
93
|
contentRight={!args.enableRightContent && <ChevronRight color="inherit" size="xs" />}
|
95
|
-
alignRight={args.alignRight}
|
96
|
-
title={args.title}
|
97
|
-
subtitle={args.subtitle}
|
98
|
-
label={args.label}
|
99
94
|
{...args}
|
100
95
|
/>
|
101
96
|
);
|
@@ -115,16 +110,18 @@ export const WithContentTextboxCustom: Story = {
|
|
115
110
|
`;
|
116
111
|
return (
|
117
112
|
<Cell
|
113
|
+
view="default"
|
114
|
+
size={args.size}
|
115
|
+
stretching={args.stretching}
|
118
116
|
contentLeft={
|
119
117
|
<Avatar size={getSize(args.size)} url="https://avatars.githubusercontent.com/u/1813468?v=4" />
|
120
118
|
}
|
121
119
|
contentRight={<ChevronRight color="inherit" size="xs" />}
|
122
|
-
{...args}
|
123
120
|
>
|
124
|
-
<
|
125
|
-
<
|
121
|
+
<CellTextbox>
|
122
|
+
<CellTextboxTitle>Title</CellTextboxTitle>
|
126
123
|
<MyStyledText>My styled Text</MyStyledText>
|
127
|
-
</
|
124
|
+
</CellTextbox>
|
128
125
|
</Cell>
|
129
126
|
);
|
130
127
|
},
|
@@ -4,22 +4,25 @@ import { base, CellLeft, CellRight, CellContentWrapper, CellContent } from './Ce
|
|
4
4
|
import { classes } from './Cell.tokens';
|
5
5
|
import { base as viewCSS } from './variations/_view/base';
|
6
6
|
import { base as sizeCSS } from './variations/_size/base';
|
7
|
-
import {
|
7
|
+
import { CellTextbox } from './CellTextbox/CellTextbox';
|
8
8
|
export var cellRoot = function cellRoot(Root) {
|
9
9
|
return /*#__PURE__*/forwardRef(function (_ref, outerRootRef) {
|
10
10
|
var size = _ref.size,
|
11
11
|
view = _ref.view,
|
12
12
|
contentLeft = _ref.contentLeft,
|
13
13
|
contentRight = _ref.contentRight,
|
14
|
-
_ref$
|
15
|
-
|
16
|
-
_ref$
|
17
|
-
|
14
|
+
_ref$alignContentLeft = _ref.alignContentLeft,
|
15
|
+
alignContentLeft = _ref$alignContentLeft === void 0 ? 'center' : _ref$alignContentLeft,
|
16
|
+
_ref$alignContentRigh = _ref.alignContentRight,
|
17
|
+
alignContentRight = _ref$alignContentRigh === void 0 ? 'center' : _ref$alignContentRigh,
|
18
18
|
children = _ref.children,
|
19
19
|
title = _ref.title,
|
20
20
|
subtitle = _ref.subtitle,
|
21
21
|
label = _ref.label,
|
22
|
-
|
22
|
+
description = _ref.description,
|
23
|
+
content = _ref.content,
|
24
|
+
_ref$stretching = _ref.stretching,
|
25
|
+
stretching = _ref$stretching === void 0 ? 'filled' : _ref$stretching;
|
23
26
|
var stretchingClass = classes["".concat(stretching, "Stretching")];
|
24
27
|
return /*#__PURE__*/React.createElement(Root, {
|
25
28
|
ref: outerRootRef,
|
@@ -27,13 +30,14 @@ export var cellRoot = function cellRoot(Root) {
|
|
27
30
|
view: view,
|
28
31
|
className: cx(stretchingClass, classes.cellRoot)
|
29
32
|
}, contentLeft && /*#__PURE__*/React.createElement(CellLeft, {
|
30
|
-
align:
|
31
|
-
}, contentLeft), /*#__PURE__*/React.createElement(CellContentWrapper, null, /*#__PURE__*/React.createElement(CellContent, null, title || subtitle || label ? /*#__PURE__*/React.createElement(
|
33
|
+
align: alignContentLeft
|
34
|
+
}, contentLeft), /*#__PURE__*/React.createElement(CellContentWrapper, null, /*#__PURE__*/React.createElement(CellContent, null, title || description || subtitle || label ? /*#__PURE__*/React.createElement(CellTextbox, {
|
32
35
|
label: label,
|
36
|
+
description: description,
|
33
37
|
title: title,
|
34
38
|
subtitle: subtitle
|
35
|
-
}) : children
|
36
|
-
align:
|
39
|
+
}) : children || content), contentRight && /*#__PURE__*/React.createElement(CellRight, {
|
40
|
+
align: alignContentRight
|
37
41
|
}, contentRight)));
|
38
42
|
});
|
39
43
|
};
|
@@ -52,7 +56,6 @@ export var cellConfig = {
|
|
52
56
|
},
|
53
57
|
defaults: {
|
54
58
|
view: 'default',
|
55
|
-
size: 'm'
|
56
|
-
stretching: 'filled'
|
59
|
+
size: 'm'
|
57
60
|
}
|
58
61
|
};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { CellTextboxStyled } from './CellTextbox.styles';
|
3
|
+
import { CellTextboxLabel } from './ui/CellTextLabel';
|
4
|
+
import { CellTextboxTitle } from './ui/CellTextTitle';
|
5
|
+
import { CellTextboxSubtitle } from './ui/CellTextSubtitle';
|
6
|
+
export var CellTextbox = function CellTextbox(_ref) {
|
7
|
+
var label = _ref.label,
|
8
|
+
title = _ref.title,
|
9
|
+
subtitle = _ref.subtitle,
|
10
|
+
description = _ref.description,
|
11
|
+
children = _ref.children;
|
12
|
+
return /*#__PURE__*/React.createElement(CellTextboxStyled, null, label || title || description || subtitle ? /*#__PURE__*/React.createElement(React.Fragment, null, label && /*#__PURE__*/React.createElement(CellTextboxLabel, null, label), (title || description) && /*#__PURE__*/React.createElement(CellTextboxTitle, null, title || description), subtitle && /*#__PURE__*/React.createElement(CellTextboxSubtitle, null, subtitle)) : children);
|
13
|
+
};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import styled from 'styled-components';
|
2
2
|
import { tokens } from '../Cell.tokens';
|
3
|
-
export var
|
4
|
-
componentId: "plasma-new-hope__sc-
|
3
|
+
export var CellTextboxStyled = /*#__PURE__*/styled.div.withConfig({
|
4
|
+
componentId: "plasma-new-hope__sc-1ts73cj-0"
|
5
5
|
})(["display:flex;flex-direction:column;gap:var(", ");"], tokens.cellTextboxGap);
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
3
3
|
import { tokens } from '../../Cell.tokens';
|
4
4
|
var StyledTextLabel = /*#__PURE__*/styled.div.withConfig({
|
5
|
-
componentId: "plasma-new-hope__sc-
|
5
|
+
componentId: "plasma-new-hope__sc-1syy9dx-0"
|
6
6
|
})(["color:var(", ");font-size:var(", ");font-weight:var(", ");font-family:var(", ");font-style:var(", ");line-height:var(", ");letter-spacing:var(", ");"], tokens.cellLabelColor, tokens.cellLabelFontSize, tokens.cellLabelFontWeight, tokens.cellLabelFontFamily, tokens.cellLabelFontStyle, tokens.cellLabelLineHeight, tokens.cellLabelLetterSpacing);
|
7
|
-
export var
|
7
|
+
export var CellTextboxLabel = function CellTextboxLabel(props) {
|
8
8
|
return /*#__PURE__*/React.createElement(StyledTextLabel, null, props.children);
|
9
9
|
};
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
3
3
|
import { tokens } from '../../Cell.tokens';
|
4
4
|
var StyledTextSubtitle = /*#__PURE__*/styled.div.withConfig({
|
5
|
-
componentId: "plasma-new-hope__sc-
|
5
|
+
componentId: "plasma-new-hope__sc-ulqa2a-0"
|
6
6
|
})(["color:var(", ");font-size:var(", ");font-weight:var(", ");font-family:var(", ");font-style:var(", ");line-height:var(", ");letter-spacing:var(", ");"], tokens.cellSubtitleColor, tokens.cellSubtitleFontSize, tokens.cellSubtitleFontWeight, tokens.cellSubtitleFontFamily, tokens.cellSubtitleFontStyle, tokens.cellSubtitleLineHeight, tokens.cellSubtitleLetterSpacing);
|
7
|
-
export var
|
7
|
+
export var CellTextboxSubtitle = function CellTextboxSubtitle(props) {
|
8
8
|
return /*#__PURE__*/React.createElement(StyledTextSubtitle, null, props.children);
|
9
9
|
};
|