@salutejs/plasma-new-hope 0.67.1-canary.1154.8466220068.0 → 0.67.1-dev.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Dropdown/Dropdown.js +2 -1
- package/cjs/components/Dropdown/Dropdown.js.map +1 -1
- package/cjs/components/Pagination/Pagination.js +4 -7
- package/cjs/components/Pagination/Pagination.js.map +1 -1
- package/cjs/components/Popover/Popover.js +46 -31
- package/cjs/components/Popover/Popover.js.map +1 -1
- package/es/components/Dropdown/Dropdown.js +2 -1
- package/es/components/Dropdown/Dropdown.js.map +1 -1
- package/es/components/Pagination/Pagination.js +5 -8
- package/es/components/Pagination/Pagination.js.map +1 -1
- package/es/components/Popover/Popover.js +46 -31
- package/es/components/Popover/Popover.js.map +1 -1
- package/package.json +4 -4
- package/styled-components/cjs/components/Dropdown/Dropdown.js +2 -1
- package/styled-components/cjs/components/Pagination/Pagination.js +4 -7
- package/styled-components/cjs/components/Popover/Popover.js +46 -31
- 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/Pagination/Pagination.stories.tsx +5 -12
- package/styled-components/cjs/examples/plasma_b2c/components/Popover/Popover.stories.tsx +7 -0
- 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/cjs/examples/plasma_web/components/Pagination/Pagination.stories.tsx +5 -12
- package/styled-components/es/components/Dropdown/Dropdown.js +2 -1
- package/styled-components/es/components/Pagination/Pagination.js +4 -7
- package/styled-components/es/components/Popover/Popover.js +46 -31
- 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/Pagination/Pagination.stories.tsx +5 -12
- package/styled-components/es/examples/plasma_b2c/components/Popover/Popover.stories.tsx +7 -0
- 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/styled-components/es/examples/plasma_web/components/Pagination/Pagination.stories.tsx +5 -12
- 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/Pagination/Pagination.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/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/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/styled-components/cjs/examples/plasma_web/components/Pagination/Pagination.stories.tsx
CHANGED
@@ -72,18 +72,12 @@ const PaginationContent = (agrs) => {
|
|
72
72
|
const [pageValue, setPageValue] = useState(agrs.value);
|
73
73
|
const [perPageValue, setPerPageValue] = useState(agrs.perPage);
|
74
74
|
|
75
|
-
const
|
76
|
-
(page: number) => {
|
77
|
-
setPageValue(page);
|
78
|
-
},
|
79
|
-
[pageValue, setPageValue],
|
80
|
-
);
|
81
|
-
|
82
|
-
const handleChangePerpage = useCallback(
|
83
|
-
(perPage: number) => {
|
75
|
+
const handleChange = useCallback(
|
76
|
+
(page: number, perPage: number) => {
|
84
77
|
setPerPageValue(perPage);
|
78
|
+
setPageValue(page);
|
85
79
|
},
|
86
|
-
[perPageValue, setPerPageValue],
|
80
|
+
[pageValue, perPageValue, setPageValue, setPerPageValue],
|
87
81
|
);
|
88
82
|
|
89
83
|
return (
|
@@ -110,8 +104,7 @@ const PaginationContent = (agrs) => {
|
|
110
104
|
Next
|
111
105
|
</Button>
|
112
106
|
}
|
113
|
-
|
114
|
-
onChangePerPageValue={handleChangePerpage}
|
107
|
+
onChangeValue={handleChange}
|
115
108
|
/>
|
116
109
|
</>
|
117
110
|
);
|
@@ -62,6 +62,7 @@ export var dropdownRoot = function dropdownRoot(Root) {
|
|
62
62
|
placement: getPlacements(placement),
|
63
63
|
trigger: trigger,
|
64
64
|
closeOnOverlayClick: closeOnOverlayClick,
|
65
|
+
closeOnBeyondTargetHover: false,
|
65
66
|
closeOnEsc: closeOnEsc,
|
66
67
|
isFocusTrapped: isFocusTrapped,
|
67
68
|
frame: frame
|
@@ -86,7 +87,7 @@ export var dropdownConfig = {
|
|
86
87
|
}
|
87
88
|
},
|
88
89
|
defaults: {
|
89
|
-
view: '
|
90
|
+
view: 'default',
|
90
91
|
size: 'm'
|
91
92
|
}
|
92
93
|
};
|
@@ -58,7 +58,7 @@ export var paginationRoot = function paginationRoot(Root) {
|
|
58
58
|
onChangePageValue = _ref.onChangePageValue,
|
59
59
|
onChangePerPageValue = _ref.onChangePerPageValue,
|
60
60
|
rest = _objectWithoutProperties(_ref, _excluded);
|
61
|
-
var _useState = useState(
|
61
|
+
var _useState = useState(value !== null && value !== void 0 ? value : defaultValues.value),
|
62
62
|
_useState2 = _slicedToArray(_useState, 2),
|
63
63
|
page = _useState2[0],
|
64
64
|
setPageValue = _useState2[1];
|
@@ -100,8 +100,9 @@ export var paginationRoot = function paginationRoot(Root) {
|
|
100
100
|
onChangePageValue === null || onChangePageValue === void 0 ? void 0 : onChangePageValue(newPageValue);
|
101
101
|
};
|
102
102
|
var handlerSetPerPage = function handlerSetPerPage(newPerPageValue) {
|
103
|
-
|
103
|
+
setPageValue(1);
|
104
104
|
setPerPageValue(newPerPageValue);
|
105
|
+
onChangePageValue === null || onChangePageValue === void 0 ? void 0 : onChangePageValue(1);
|
105
106
|
onChangePerPageValue === null || onChangePerPageValue === void 0 ? void 0 : onChangePerPageValue(newPerPageValue);
|
106
107
|
handlerSetPages(newPerPageValue);
|
107
108
|
};
|
@@ -110,14 +111,10 @@ export var paginationRoot = function paginationRoot(Root) {
|
|
110
111
|
};
|
111
112
|
useEffect(function () {
|
112
113
|
handlerSetPages(perPage);
|
113
|
-
}, [perPage,
|
114
|
-
useEffect(function () {
|
115
|
-
handlerSetPage(value !== null && value !== void 0 ? value : defaultValues.value);
|
116
|
-
}, [value, setPageValue]);
|
114
|
+
}, [perPage, handlerSetPages]);
|
117
115
|
useEffect(function () {
|
118
116
|
setSections(getSections(page, pages, slots));
|
119
117
|
}, [page, slots, pages, setSections, getSections]);
|
120
|
-
console.log(value, page);
|
121
118
|
return /*#__PURE__*/React.createElement(Root, _extends({
|
122
119
|
size: size,
|
123
120
|
view: view,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
|
-
var _excluded = ["target", "children", "isOpen", "trigger", "hasArrow", "frame", "className", "placement", "offset", "zIndex", "isFocusTrapped", "
|
2
|
+
var _excluded = ["target", "children", "isOpen", "trigger", "hasArrow", "frame", "className", "placement", "offset", "zIndex", "isFocusTrapped", "closeOnEsc", "preventOverflow", "usePortal", "view", "onToggle"];
|
3
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
4
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
5
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
@@ -30,33 +30,41 @@ export var POPOVER_PORTAL_ID = 'plasma-popover-root';
|
|
30
30
|
* и вызова по клику либо ховеру.
|
31
31
|
*/
|
32
32
|
export var popoverRoot = function popoverRoot(Root) {
|
33
|
-
return /*#__PURE__*/forwardRef(function (
|
34
|
-
var
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
closeOnEsc =
|
53
|
-
|
54
|
-
preventOverflow =
|
55
|
-
|
56
|
-
usePortal =
|
57
|
-
view =
|
58
|
-
onToggle =
|
59
|
-
rest = _objectWithoutProperties(
|
33
|
+
return /*#__PURE__*/forwardRef(function (props, outerRootRef) {
|
34
|
+
var _placement$;
|
35
|
+
var target = props.target,
|
36
|
+
children = props.children,
|
37
|
+
isOpen = props.isOpen,
|
38
|
+
_props$trigger = props.trigger,
|
39
|
+
trigger = _props$trigger === void 0 ? 'click' : _props$trigger,
|
40
|
+
hasArrow = props.hasArrow,
|
41
|
+
_props$frame = props.frame,
|
42
|
+
frame = _props$frame === void 0 ? 'document' : _props$frame,
|
43
|
+
className = props.className,
|
44
|
+
_props$placement = props.placement,
|
45
|
+
placement = _props$placement === void 0 ? 'auto' : _props$placement,
|
46
|
+
_props$offset = props.offset,
|
47
|
+
offset = _props$offset === void 0 ? [0, 0] : _props$offset,
|
48
|
+
zIndex = props.zIndex,
|
49
|
+
_props$isFocusTrapped = props.isFocusTrapped,
|
50
|
+
isFocusTrapped = _props$isFocusTrapped === void 0 ? true : _props$isFocusTrapped,
|
51
|
+
_props$closeOnEsc = props.closeOnEsc,
|
52
|
+
closeOnEsc = _props$closeOnEsc === void 0 ? true : _props$closeOnEsc,
|
53
|
+
_props$preventOverflo = props.preventOverflow,
|
54
|
+
preventOverflow = _props$preventOverflo === void 0 ? true : _props$preventOverflo,
|
55
|
+
_props$usePortal = props.usePortal,
|
56
|
+
usePortal = _props$usePortal === void 0 ? false : _props$usePortal,
|
57
|
+
view = props.view,
|
58
|
+
onToggle = props.onToggle,
|
59
|
+
rest = _objectWithoutProperties(props, _excluded);
|
60
|
+
var closeOnOverlayClick = true;
|
61
|
+
var closeOnBeyondTargetHover = true;
|
62
|
+
if (props.trigger === 'click' && props.closeOnOverlayClick === false) {
|
63
|
+
closeOnOverlayClick = false;
|
64
|
+
}
|
65
|
+
if (props.trigger === 'hover' && props.closeOnBeyondTargetHover === false) {
|
66
|
+
closeOnBeyondTargetHover = false;
|
67
|
+
}
|
60
68
|
var rootRef = useRef(null);
|
61
69
|
var popoverRef = useRef(null);
|
62
70
|
var handleRef = useForkRef(rootRef, outerRootRef);
|
@@ -77,7 +85,9 @@ export var popoverRoot = function popoverRoot(Root) {
|
|
77
85
|
opacity: isOpen ? 1 : 0
|
78
86
|
};
|
79
87
|
var _usePopper = usePopper(rootRef.current, popoverRef.current, {
|
80
|
-
|
88
|
+
// TODO: #1121
|
89
|
+
// eslint-disable-next-line no-nested-ternary
|
90
|
+
placement: isAutoArray ? (_placement$ = placement[0]) !== null && _placement$ !== void 0 && _placement$.endsWith('start') ? 'auto-start' : 'auto' : placement,
|
81
91
|
modifiers: [{
|
82
92
|
name: 'preventOverflow',
|
83
93
|
options: {
|
@@ -213,10 +223,15 @@ export var popoverRoot = function popoverRoot(Root) {
|
|
213
223
|
}, target), children && portalRef.current && /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React.createElement(Root, _extends({
|
214
224
|
view: view,
|
215
225
|
className: className
|
216
|
-
}, rest
|
226
|
+
}, rest, {
|
227
|
+
onMouseEnter: closeOnBeyondTargetHover ? undefined : onMouseEnter,
|
228
|
+
onMouseLeave: closeOnBeyondTargetHover ? undefined : onMouseEnter
|
229
|
+
}), /*#__PURE__*/React.createElement(StyledPopover, _extends({}, attributes.popper, {
|
217
230
|
className: classes.root,
|
218
231
|
ref: popoverForkRef,
|
219
|
-
style: _objectSpread(_objectSpread({}, styles.popper),
|
232
|
+
style: _objectSpread(_objectSpread(_objectSpread({}, styles.popper), {
|
233
|
+
display: isOpen ? 'block' : 'none'
|
234
|
+
}), initialStyles),
|
220
235
|
zIndex: zIndex
|
221
236
|
}), hasArrow && /*#__PURE__*/React.createElement(StyledArrow, _extends({
|
222
237
|
className: classes.arrow,
|
package/styled-components/es/examples/plasma_b2c/components/Pagination/Pagination.stories.tsx
CHANGED
@@ -71,18 +71,12 @@ const PaginationContent = (agrs) => {
|
|
71
71
|
const [pageValue, setPageValue] = useState(agrs.value);
|
72
72
|
const [perPageValue, setPerPageValue] = useState(agrs.perPage);
|
73
73
|
|
74
|
-
const
|
75
|
-
(page: number) => {
|
76
|
-
setPageValue(page);
|
77
|
-
},
|
78
|
-
[pageValue, setPageValue],
|
79
|
-
);
|
80
|
-
|
81
|
-
const handleChangePerpage = useCallback(
|
82
|
-
(perPage: number) => {
|
74
|
+
const handleChange = useCallback(
|
75
|
+
(page: number, perPage: number) => {
|
83
76
|
setPerPageValue(perPage);
|
77
|
+
setPageValue(page);
|
84
78
|
},
|
85
|
-
[perPageValue, setPerPageValue],
|
79
|
+
[pageValue, perPageValue, setPageValue, setPerPageValue],
|
86
80
|
);
|
87
81
|
|
88
82
|
return (
|
@@ -109,8 +103,7 @@ const PaginationContent = (agrs) => {
|
|
109
103
|
Next
|
110
104
|
</Button>
|
111
105
|
}
|
112
|
-
|
113
|
-
onChangePerPageValue={handleChangePerpage}
|
106
|
+
onChangeValue={handleChange}
|
114
107
|
/>
|
115
108
|
</>
|
116
109
|
);
|
@@ -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,
|
package/styled-components/es/examples/plasma_web/components/Pagination/Pagination.stories.tsx
CHANGED
@@ -72,18 +72,12 @@ const PaginationContent = (agrs) => {
|
|
72
72
|
const [pageValue, setPageValue] = useState(agrs.value);
|
73
73
|
const [perPageValue, setPerPageValue] = useState(agrs.perPage);
|
74
74
|
|
75
|
-
const
|
76
|
-
(page: number) => {
|
77
|
-
setPageValue(page);
|
78
|
-
},
|
79
|
-
[pageValue, setPageValue],
|
80
|
-
);
|
81
|
-
|
82
|
-
const handleChangePerpage = useCallback(
|
83
|
-
(perPage: number) => {
|
75
|
+
const handleChange = useCallback(
|
76
|
+
(page: number, perPage: number) => {
|
84
77
|
setPerPageValue(perPage);
|
78
|
+
setPageValue(page);
|
85
79
|
},
|
86
|
-
[perPageValue, setPerPageValue],
|
80
|
+
[pageValue, perPageValue, setPageValue, setPerPageValue],
|
87
81
|
);
|
88
82
|
|
89
83
|
return (
|
@@ -110,8 +104,7 @@ const PaginationContent = (agrs) => {
|
|
110
104
|
Next
|
111
105
|
</Button>
|
112
106
|
}
|
113
|
-
|
114
|
-
onChangePerPageValue={handleChangePerpage}
|
107
|
+
onChangeValue={handleChange}
|
115
108
|
/>
|
116
109
|
</>
|
117
110
|
);
|
@@ -3,11 +3,17 @@ export declare const StyledRoot: import("@linaria/react").StyledComponent<import
|
|
3
3
|
export declare const StyledCombobox: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
4
4
|
export declare const StyledPopover: import("@linaria/react").StyledComponent<{
|
5
5
|
selectWidth?: number | undefined;
|
6
|
-
} & import("../../engines/types").PropsType<{
|
6
|
+
} & (import("../../engines/types").PropsType<{
|
7
7
|
view: {
|
8
8
|
css: import("@linaria/core").LinariaClassName;
|
9
9
|
};
|
10
|
-
}> & import("react").HTMLAttributes<HTMLDivElement> & import("../Popover/Popover.types").CustomPopoverProps &
|
10
|
+
}> & ((import("react").HTMLAttributes<HTMLDivElement> & import("../Popover/Popover.types").CustomPopoverProps & {
|
11
|
+
trigger?: "click" | undefined;
|
12
|
+
closeOnOverlayClick?: boolean | undefined;
|
13
|
+
} & import("react").RefAttributes<HTMLDivElement>) | (import("react").HTMLAttributes<HTMLDivElement> & import("../Popover/Popover.types").CustomPopoverProps & {
|
14
|
+
trigger?: "hover" | undefined;
|
15
|
+
closeOnBeyondTargetHover?: boolean | undefined;
|
16
|
+
} & import("react").RefAttributes<HTMLDivElement>)))>;
|
11
17
|
export declare const ComboboxItemNotFound: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
12
18
|
export declare const StyledNativeSelect: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSelectElement> & import("react").SelectHTMLAttributes<HTMLSelectElement> & Record<never, unknown>>;
|
13
19
|
//# sourceMappingURL=Combobox.styles.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Combobox.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/Combobox.styles.ts"],"names":[],"mappings":";AAOA,eAAO,MAAM,UAAU,qKAGtB,CAAC;AAEF,eAAO,MAAM,cAAc,qKAY1B,CAAC;AAKF,eAAO,MAAM,aAAa
|
1
|
+
{"version":3,"file":"Combobox.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/Combobox.styles.ts"],"names":[],"mappings":";AAOA,eAAO,MAAM,UAAU,qKAGtB,CAAC;AAEF,eAAO,MAAM,cAAc,qKAY1B,CAAC;AAKF,eAAO,MAAM,aAAa;;;;;;;;;;;;qDAMzB,CAAC;AAEF,eAAO,MAAM,oBAAoB,qKAUhC,CAAC;AAEF,eAAO,MAAM,kBAAkB,iLAY9B,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAGlD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAM1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,YAAY,SAAU,UAAU,cAAc,EAAE,aAAa,CAAC,
|
1
|
+
{"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAGlD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAM1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,YAAY,SAAU,UAAU,cAAc,EAAE,aAAa,CAAC,iKA8DtE,CAAC;AAEN,eAAO,MAAM,cAAc;;;mBAhEQ,UAAU,cAAc,EAAE,aAAa,CAAC;;;;;;;;;;;;;;CAiF1E,CAAC"}
|
@@ -3,6 +3,12 @@ export declare const StyledPopover: import("@linaria/react").StyledMeta & import
|
|
3
3
|
view: {
|
4
4
|
css: import("@linaria/core").LinariaClassName;
|
5
5
|
};
|
6
|
-
}> & import("react").HTMLAttributes<HTMLDivElement> & import("../Popover/Popover.types").CustomPopoverProps &
|
6
|
+
}> & ((import("react").HTMLAttributes<HTMLDivElement> & import("../Popover/Popover.types").CustomPopoverProps & {
|
7
|
+
trigger?: "click" | undefined;
|
8
|
+
closeOnOverlayClick?: boolean | undefined;
|
9
|
+
} & import("react").RefAttributes<HTMLDivElement>) | (import("react").HTMLAttributes<HTMLDivElement> & import("../Popover/Popover.types").CustomPopoverProps & {
|
10
|
+
trigger?: "hover" | undefined;
|
11
|
+
closeOnBeyondTargetHover?: boolean | undefined;
|
12
|
+
} & import("react").RefAttributes<HTMLDivElement>))>;
|
7
13
|
export declare const StyledDropdown: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
8
14
|
//# sourceMappingURL=Dropdown.styles.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Dropdown.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/Dropdown.styles.ts"],"names":[],"mappings":";AAUA,eAAO,MAAM,aAAa
|
1
|
+
{"version":3,"file":"Dropdown.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/Dropdown.styles.ts"],"names":[],"mappings":";AAUA,eAAO,MAAM,aAAa;;;;;;;;;;oDAIzB,CAAC;AAEF,eAAO,MAAM,cAAc,qKAY1B,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/Pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAG/D,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAW1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAS1D,eAAO,MAAM,cAAc,SAAU,UAAU,cAAc,EAAE,eAAe,CAAC,
|
1
|
+
{"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/Pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAG/D,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAW1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAS1D,eAAO,MAAM,cAAc,SAAU,UAAU,cAAc,EAAE,eAAe,CAAC,2FAiK1E,CAAC;AAEN,eAAO,MAAM,gBAAgB;;;mBAnKQ,UAAU,cAAc,EAAE,eAAe,CAAC;;;;;;;;;;;;;;;;;CAuL9E,CAAC"}
|
@@ -7,11 +7,11 @@ export declare const POPOVER_PORTAL_ID = "plasma-popover-root";
|
|
7
7
|
* Всплывающее окно с возможностью позиционирования
|
8
8
|
* и вызова по клику либо ховеру.
|
9
9
|
*/
|
10
|
-
export declare const popoverRoot: (Root: RootProps<HTMLDivElement, PopoverProps>) => React.ForwardRefExoticComponent<
|
10
|
+
export declare const popoverRoot: (Root: RootProps<HTMLDivElement, PopoverProps>) => React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<HTMLDivElement>>;
|
11
11
|
export declare const popoverConfig: {
|
12
12
|
name: string;
|
13
13
|
tag: string;
|
14
|
-
layout: (Root: RootProps<HTMLDivElement, PopoverProps>) => React.ForwardRefExoticComponent<
|
14
|
+
layout: (Root: RootProps<HTMLDivElement, PopoverProps>) => React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<HTMLDivElement>>;
|
15
15
|
base: string;
|
16
16
|
variations: {
|
17
17
|
view: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+D,MAAM,OAAO,CAAC;AAMpF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAIrD,OAAO,KAAK,EAAoB,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAItE,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,WAAW,SAAU,UAAU,cAAc,EAAE,YAAY,CAAC
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+D,MAAM,OAAO,CAAC;AAMpF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAIrD,OAAO,KAAK,EAAoB,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAItE,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,WAAW,SAAU,UAAU,cAAc,EAAE,YAAY,CAAC,wFAsQnE,CAAC;AAEP,eAAO,MAAM,aAAa;;;mBAxQQ,UAAU,cAAc,EAAE,YAAY,CAAC;;;;;;;;;;CAqRxE,CAAC"}
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { Placement, ComputedPlacement } from '@popperjs/core';
|
2
2
|
import type { HTMLAttributes, ReactNode, SyntheticEvent } from 'react';
|
3
|
-
export declare type PopoverTrigger = 'hover' | 'click';
|
4
3
|
export declare type PopoverPlacementBasic = ComputedPlacement;
|
5
4
|
export declare type PopoverPlacement = Placement;
|
6
5
|
export declare type CustomPopoverProps = {
|
@@ -8,12 +7,6 @@ export declare type CustomPopoverProps = {
|
|
8
7
|
* Всплывающее окно раскрыто или нет.
|
9
8
|
*/
|
10
9
|
isOpen?: boolean;
|
11
|
-
/**
|
12
|
-
* Способ открытия всплывающего окна - наведение или клик мышью.
|
13
|
-
* @default
|
14
|
-
* click
|
15
|
-
*/
|
16
|
-
trigger?: PopoverTrigger;
|
17
10
|
/**
|
18
11
|
* Сторона открытия окна относительно target элемента.
|
19
12
|
* @default
|
@@ -60,12 +53,6 @@ export declare type CustomPopoverProps = {
|
|
60
53
|
* Событие сворачивания/разворачивания всплывающего окна.
|
61
54
|
*/
|
62
55
|
onToggle?: (isOpen: boolean, event: SyntheticEvent | Event) => void;
|
63
|
-
/**
|
64
|
-
* Закрывать окно при нажатии вне области окна.
|
65
|
-
* @default
|
66
|
-
* true
|
67
|
-
*/
|
68
|
-
closeOnOverlayClick?: boolean;
|
69
56
|
/**
|
70
57
|
* Закрывать окно при нажатии ESC.
|
71
58
|
* @default
|
@@ -80,5 +67,23 @@ export declare type CustomPopoverProps = {
|
|
80
67
|
usePortal?: boolean;
|
81
68
|
view?: string;
|
82
69
|
};
|
83
|
-
export declare type
|
70
|
+
export declare type PopoverTrigger = {
|
71
|
+
/**
|
72
|
+
* Способ открытия всплывающего окна - наведение или клик мышью.
|
73
|
+
* @default
|
74
|
+
* click
|
75
|
+
*/
|
76
|
+
trigger?: 'click';
|
77
|
+
/**
|
78
|
+
* Закрывать окно при нажатии вне области окна. (Если trigger === 'click')
|
79
|
+
*/
|
80
|
+
closeOnOverlayClick?: boolean;
|
81
|
+
} | {
|
82
|
+
trigger?: 'hover';
|
83
|
+
/**
|
84
|
+
* Закрывать окно при наведении вне области target-элемента. (Если trigger === 'hover')
|
85
|
+
*/
|
86
|
+
closeOnBeyondTargetHover?: boolean;
|
87
|
+
};
|
88
|
+
export declare type PopoverProps = HTMLAttributes<HTMLDivElement> & CustomPopoverProps & PopoverTrigger;
|
84
89
|
//# sourceMappingURL=Popover.types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Popover.types.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvE,oBAAY,
|
1
|
+
{"version":3,"file":"Popover.types.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvE,oBAAY,qBAAqB,GAAG,iBAAiB,CAAC;AACtD,oBAAY,gBAAgB,GAAG,SAAS,CAAC;AAEzC,oBAAY,kBAAkB,GAAG;IAC7B;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,gBAAgB,GAAG,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAC5D;;;;OAIG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAC3D;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,cAAc,GAAG,KAAK,KAAK,IAAI,CAAC;IACpE;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,oBAAY,cAAc,GACpB;IACI;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACjC,GACD;IACI,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACtC,CAAC;AAER,oBAAY,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG,kBAAkB,GAAG,cAAc,CAAC"}
|
@@ -3,10 +3,16 @@ export declare const StyledRoot: import("@linaria/react").StyledComponent<import
|
|
3
3
|
export declare const StyledSelect: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
4
4
|
export declare const StyledPopover: import("@linaria/react").StyledComponent<{
|
5
5
|
selectWidth?: number | undefined;
|
6
|
-
} & import("../../engines/types").PropsType<{
|
6
|
+
} & (import("../../engines/types").PropsType<{
|
7
7
|
view: {
|
8
8
|
css: import("@linaria/core").LinariaClassName;
|
9
9
|
};
|
10
|
-
}> & import("react").HTMLAttributes<HTMLDivElement> & import("../Popover/Popover.types").CustomPopoverProps &
|
10
|
+
}> & ((import("react").HTMLAttributes<HTMLDivElement> & import("../Popover/Popover.types").CustomPopoverProps & {
|
11
|
+
trigger?: "click" | undefined;
|
12
|
+
closeOnOverlayClick?: boolean | undefined;
|
13
|
+
} & import("react").RefAttributes<HTMLDivElement>) | (import("react").HTMLAttributes<HTMLDivElement> & import("../Popover/Popover.types").CustomPopoverProps & {
|
14
|
+
trigger?: "hover" | undefined;
|
15
|
+
closeOnBeyondTargetHover?: boolean | undefined;
|
16
|
+
} & import("react").RefAttributes<HTMLDivElement>)))>;
|
11
17
|
export declare const StyledNativeSelect: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSelectElement> & import("react").SelectHTMLAttributes<HTMLSelectElement> & Record<never, unknown>>;
|
12
18
|
//# sourceMappingURL=Select.styles.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Select.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.styles.ts"],"names":[],"mappings":";AASA,eAAO,MAAM,UAAU,qKAOtB,CAAC;AAEF,eAAO,MAAM,YAAY,qKAaxB,CAAC;AAKF,eAAO,MAAM,aAAa
|
1
|
+
{"version":3,"file":"Select.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.styles.ts"],"names":[],"mappings":";AASA,eAAO,MAAM,UAAU,qKAOtB,CAAC;AAEF,eAAO,MAAM,YAAY,qKAaxB,CAAC;AAKF,eAAO,MAAM,aAAa;;;;;;;;;;;;qDAMzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,iLAwB9B,CAAC"}
|
@@ -4,5 +4,11 @@ export declare const Popover: import("react").FunctionComponent<import("../../..
|
|
4
4
|
view: {
|
5
5
|
default: import("@linaria/core").LinariaClassName;
|
6
6
|
};
|
7
|
-
}> & import("react").HTMLAttributes<HTMLDivElement> & import("../../../../components/Popover/Popover.types").CustomPopoverProps &
|
7
|
+
}> & ((import("react").HTMLAttributes<HTMLDivElement> & import("../../../../components/Popover/Popover.types").CustomPopoverProps & {
|
8
|
+
trigger?: "click" | undefined;
|
9
|
+
closeOnOverlayClick?: boolean | undefined;
|
10
|
+
} & import("react").RefAttributes<HTMLDivElement>) | (import("react").HTMLAttributes<HTMLDivElement> & import("../../../../components/Popover/Popover.types").CustomPopoverProps & {
|
11
|
+
trigger?: "hover" | undefined;
|
12
|
+
closeOnBeyondTargetHover?: boolean | undefined;
|
13
|
+
} & import("react").RefAttributes<HTMLDivElement>))>;
|
8
14
|
//# sourceMappingURL=Popover.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_b2c/components/Popover/Popover.ts"],"names":[],"mappings":";AAKA,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIlF,eAAO,MAAM,OAAO
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_b2c/components/Popover/Popover.ts"],"names":[],"mappings":";AAKA,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIlF,eAAO,MAAM,OAAO;;;;;;;;;;oDAA0B,CAAC"}
|
@@ -4,5 +4,11 @@ export declare const Popover: import("react").FunctionComponent<import("../../..
|
|
4
4
|
view: {
|
5
5
|
default: import("@linaria/core").LinariaClassName;
|
6
6
|
};
|
7
|
-
}> & import("react").HTMLAttributes<HTMLDivElement> & import("../../../../components/Popover/Popover.types").CustomPopoverProps &
|
7
|
+
}> & ((import("react").HTMLAttributes<HTMLDivElement> & import("../../../../components/Popover/Popover.types").CustomPopoverProps & {
|
8
|
+
trigger?: "click" | undefined;
|
9
|
+
closeOnOverlayClick?: boolean | undefined;
|
10
|
+
} & import("react").RefAttributes<HTMLDivElement>) | (import("react").HTMLAttributes<HTMLDivElement> & import("../../../../components/Popover/Popover.types").CustomPopoverProps & {
|
11
|
+
trigger?: "hover" | undefined;
|
12
|
+
closeOnBeyondTargetHover?: boolean | undefined;
|
13
|
+
} & import("react").RefAttributes<HTMLDivElement>))>;
|
8
14
|
//# sourceMappingURL=Popover.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_web/components/Popover/Popover.ts"],"names":[],"mappings":";AAKA,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIlF,eAAO,MAAM,OAAO
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_web/components/Popover/Popover.ts"],"names":[],"mappings":";AAKA,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIlF,eAAO,MAAM,OAAO;;;;;;;;;;oDAA0B,CAAC"}
|
@@ -4,5 +4,11 @@ export declare const Popover: import("react").FunctionComponent<import("../../..
|
|
4
4
|
view: {
|
5
5
|
default: import("@linaria/core").LinariaClassName;
|
6
6
|
};
|
7
|
-
}> & import("react").HTMLAttributes<HTMLDivElement> & import("../../../../components/Popover/Popover.types").CustomPopoverProps &
|
7
|
+
}> & ((import("react").HTMLAttributes<HTMLDivElement> & import("../../../../components/Popover/Popover.types").CustomPopoverProps & {
|
8
|
+
trigger?: "click" | undefined;
|
9
|
+
closeOnOverlayClick?: boolean | undefined;
|
10
|
+
} & import("react").RefAttributes<HTMLDivElement>) | (import("react").HTMLAttributes<HTMLDivElement> & import("../../../../components/Popover/Popover.types").CustomPopoverProps & {
|
11
|
+
trigger?: "hover" | undefined;
|
12
|
+
closeOnBeyondTargetHover?: boolean | undefined;
|
13
|
+
} & import("react").RefAttributes<HTMLDivElement>))>;
|
8
14
|
//# sourceMappingURL=Popover.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../../../src/examples/sds_engineer/components/Popover/Popover.ts"],"names":[],"mappings":";AAKA,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIlF,eAAO,MAAM,OAAO
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../../../src/examples/sds_engineer/components/Popover/Popover.ts"],"names":[],"mappings":";AAKA,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIlF,eAAO,MAAM,OAAO;;;;;;;;;;oDAA0B,CAAC"}
|