@salutejs/sdds-dfa 0.174.0-canary.1562.11851866538.0 → 0.174.0-canary.1562.11857238836.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -88,7 +88,8 @@ import { DrawerContentProps } from '@salutejs/plasma-new-hope/styled-components'
88
88
  import { DrawerFooterProps } from '@salutejs/plasma-new-hope/styled-components';
89
89
  import { DrawerHeaderProps } from '@salutejs/plasma-new-hope/styled-components';
90
90
  import { DrawerProps } from '@salutejs/plasma-new-hope/styled-components';
91
- import { DropdownItemOption } from '@salutejs/plasma-new-hope/styled-components';
91
+ import type { DropdownItemOption } from '@salutejs/plasma-new-hope';
92
+ import type { DropdownNewProps } from '@salutejs/plasma-new-hope';
92
93
  import { DropdownNodeSelect } from '@salutejs/plasma-new-hope/styled-components';
93
94
  import { DropdownPlacement } from '@salutejs/plasma-new-hope/types/components/Dropdown/Dropdown.types';
94
95
  import { DropdownTrigger } from '@salutejs/plasma-new-hope/types/components/Dropdown/Dropdown.types';
@@ -1190,7 +1191,7 @@ export { DrawerHeaderProps }
1190
1191
  export { DrawerProps }
1191
1192
 
1192
1193
  // @public (undocumented)
1193
- export const Dropdown: FunctionComponent<PropsType< {
1194
+ export const Dropdown: <T extends DropdownItemOption>(props: Omit<DropdownNewProps<T>, "view" | "size"> & Pick<PropsType< {
1194
1195
  size: {
1195
1196
  l: PolymorphicClassName;
1196
1197
  m: PolymorphicClassName;
@@ -1201,30 +1202,30 @@ view: {
1201
1202
  default: PolymorphicClassName;
1202
1203
  };
1203
1204
  }> & {
1204
- items: DropdownItemOption[];
1205
- alwaysOpened?: boolean | undefined;
1206
- children?: ReactNode;
1207
- itemRole?: string | undefined;
1208
- onHover?: ((index: number) => void) | undefined;
1209
- onItemSelect?: ((item: DropdownItemOption, event: SyntheticEvent<Element, Event>) => void) | undefined;
1210
- trigger?: DropdownTrigger | undefined;
1211
- placement?: DropdownPlacement | undefined;
1212
- offset?: [number, number] | undefined;
1213
- listWidth?: Property.Width<string | number> | undefined;
1214
- hasArrow?: boolean | undefined;
1215
- closeOnSelect?: boolean | undefined;
1216
- closeOnOverlayClick?: boolean | undefined;
1217
- onToggle?: ((isOpen: boolean, event: Event | SyntheticEvent<Element, Event>) => void) | undefined;
1218
- size?: string | undefined;
1219
- view?: string | undefined;
1220
- variant?: "normal" | "tight" | undefined;
1221
- portal?: string | RefObject<HTMLElement> | undefined;
1222
- renderItem?: ((item: DropdownItemOption) => ReactNode) | undefined;
1223
- onItemClick?: ((item: DropdownItemOption, event: SyntheticEvent<Element, Event>) => void) | undefined;
1224
- listOverflow?: Property.Overflow | undefined;
1225
- listHeight?: Property.Height<string | number> | undefined;
1226
- hoverIndex?: number | undefined;
1227
- } & HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>>;
1205
+ items: DropdownItemOption[];
1206
+ alwaysOpened?: boolean | undefined;
1207
+ children?: React_2.ReactNode;
1208
+ itemRole?: string | undefined;
1209
+ onHover?: ((index: number) => void) | undefined;
1210
+ onItemSelect?: ((item: DropdownItemOption, event: React_2.SyntheticEvent<Element, Event>) => void) | undefined;
1211
+ trigger?: DropdownTrigger | undefined;
1212
+ placement?: DropdownPlacement | undefined;
1213
+ offset?: [number, number] | undefined;
1214
+ listWidth?: Property.Width<string | number> | undefined;
1215
+ hasArrow?: boolean | undefined;
1216
+ closeOnSelect?: boolean | undefined;
1217
+ closeOnOverlayClick?: boolean | undefined;
1218
+ onToggle?: ((isOpen: boolean, event: Event | React_2.SyntheticEvent<Element, Event>) => void) | undefined;
1219
+ size?: string | undefined;
1220
+ view?: string | undefined;
1221
+ variant?: "normal" | "tight" | undefined;
1222
+ portal?: string | React_2.RefObject<HTMLElement> | undefined;
1223
+ renderItem?: ((item: DropdownItemOption) => React_2.ReactNode) | undefined;
1224
+ onItemClick?: ((item: DropdownItemOption, event: React_2.SyntheticEvent<Element, Event>) => void) | undefined;
1225
+ listOverflow?: Property.Overflow | undefined;
1226
+ listHeight?: Property.Height<string | number> | undefined;
1227
+ hoverIndex?: number | undefined;
1228
+ } & React_2.HTMLAttributes<HTMLDivElement> & React_2.RefAttributes<HTMLDivElement>, "view" | "size"> & React_2.RefAttributes<HTMLButtonElement>) => React_2.ReactElement<any, string | React_2.JSXElementConstructor<any>> | null;
1228
1229
 
1229
1230
  // @public (undocumented)
1230
1231
  export const DsplL: FunctionComponent<PropsType< {
@@ -1,5 +1,6 @@
1
- /// <reference types="react" />
2
- declare const Dropdown: import("react").FunctionComponent<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
1
+ import type { DropdownItemOption, DropdownNewProps } from '@salutejs/plasma-new-hope';
2
+ import React from 'react';
3
+ declare const Dropdown: <T extends DropdownItemOption>(props: Omit<DropdownNewProps<T>, "view" | "size"> & Pick<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
3
4
  size: {
4
5
  l: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
5
6
  m: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
@@ -10,12 +11,12 @@ declare const Dropdown: import("react").FunctionComponent<import("@salutejs/plas
10
11
  default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
11
12
  };
12
13
  }> & {
13
- items: import("@salutejs/plasma-new-hope/styled-components").DropdownItemOption[];
14
+ items: DropdownItemOption[];
14
15
  alwaysOpened?: boolean | undefined;
15
- children?: import("react").ReactNode;
16
+ children?: React.ReactNode;
16
17
  itemRole?: string | undefined;
17
18
  onHover?: ((index: number) => void) | undefined;
18
- onItemSelect?: ((item: import("@salutejs/plasma-new-hope/styled-components").DropdownItemOption, event: import("react").SyntheticEvent<Element, Event>) => void) | undefined;
19
+ onItemSelect?: ((item: DropdownItemOption, event: React.SyntheticEvent<Element, Event>) => void) | undefined;
19
20
  trigger?: import("@salutejs/plasma-new-hope/types/components/Dropdown/Dropdown.types").DropdownTrigger | undefined;
20
21
  placement?: import("@salutejs/plasma-new-hope/types/components/Dropdown/Dropdown.types").DropdownPlacement | undefined;
21
22
  offset?: [number, number] | undefined;
@@ -23,15 +24,15 @@ declare const Dropdown: import("react").FunctionComponent<import("@salutejs/plas
23
24
  hasArrow?: boolean | undefined;
24
25
  closeOnSelect?: boolean | undefined;
25
26
  closeOnOverlayClick?: boolean | undefined;
26
- onToggle?: ((isOpen: boolean, event: Event | import("react").SyntheticEvent<Element, Event>) => void) | undefined;
27
+ onToggle?: ((isOpen: boolean, event: Event | React.SyntheticEvent<Element, Event>) => void) | undefined;
27
28
  size?: string | undefined;
28
29
  view?: string | undefined;
29
30
  variant?: "normal" | "tight" | undefined;
30
- portal?: string | import("react").RefObject<HTMLElement> | undefined;
31
- renderItem?: ((item: import("@salutejs/plasma-new-hope/styled-components").DropdownItemOption) => import("react").ReactNode) | undefined;
32
- onItemClick?: ((item: import("@salutejs/plasma-new-hope/styled-components").DropdownItemOption, event: import("react").SyntheticEvent<Element, Event>) => void) | undefined;
31
+ portal?: string | React.RefObject<HTMLElement> | undefined;
32
+ renderItem?: ((item: DropdownItemOption) => React.ReactNode) | undefined;
33
+ onItemClick?: ((item: DropdownItemOption, event: React.SyntheticEvent<Element, Event>) => void) | undefined;
33
34
  listOverflow?: import("csstype").Property.Overflow | undefined;
34
35
  listHeight?: import("csstype").Property.Height<string | number> | undefined;
35
36
  hoverIndex?: number | undefined;
36
- } & import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
37
+ } & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>, "view" | "size"> & React.RefAttributes<HTMLButtonElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
37
38
  export { Dropdown };
@@ -5,6 +5,15 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.Dropdown = void 0;
7
7
  var _styledComponents = /*#__PURE__*/require("@salutejs/plasma-new-hope/styled-components");
8
+ var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react"));
8
9
  var _Dropdown = /*#__PURE__*/require("./Dropdown.config");
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+ 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); }
9
12
  var mergedConfig = /*#__PURE__*/(0, _styledComponents.mergeConfig)(_styledComponents.dropdownConfig, _Dropdown.config);
10
- var Dropdown = exports.Dropdown = /*#__PURE__*/(0, _styledComponents.component)(mergedConfig);
13
+ var DropdownNewHope = /*#__PURE__*/(0, _styledComponents.component)(mergedConfig);
14
+ var DropdownComponent = function DropdownComponent(props, ref) {
15
+ return /*#__PURE__*/_react["default"].createElement(DropdownNewHope, _extends({
16
+ ref: ref
17
+ }, props));
18
+ };
19
+ var Dropdown = exports.Dropdown = /*#__PURE__*/(0, _styledComponents.fixedForwardRef)(DropdownComponent);
@@ -1,5 +1,13 @@
1
- import { dropdownConfig, component, mergeConfig } from '@salutejs/plasma-new-hope/styled-components';
1
+ 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); }
2
+ import { dropdownConfig, component, mergeConfig, fixedForwardRef } from '@salutejs/plasma-new-hope/styled-components';
3
+ import React from 'react';
2
4
  import { config } from './Dropdown.config';
3
5
  var mergedConfig = /*#__PURE__*/mergeConfig(dropdownConfig, config);
4
- var Dropdown = /*#__PURE__*/component(mergedConfig);
6
+ var DropdownNewHope = /*#__PURE__*/component(mergedConfig);
7
+ var DropdownComponent = function DropdownComponent(props, ref) {
8
+ return /*#__PURE__*/React.createElement(DropdownNewHope, _extends({
9
+ ref: ref
10
+ }, props));
11
+ };
12
+ var Dropdown = /*#__PURE__*/fixedForwardRef(DropdownComponent);
5
13
  export { Dropdown };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salutejs/sdds-dfa",
3
- "version": "0.174.0-canary.1562.11851866538.0",
3
+ "version": "0.174.0-canary.1562.11857238836.0",
4
4
  "description": "Salute Design System / React UI kit for SDDS DFA web applications",
5
5
  "author": "Salute Frontend Team <salute.developers@gmail.com>",
6
6
  "license": "MIT",
@@ -19,7 +19,7 @@
19
19
  "directory": "packages/sdds-dfa"
20
20
  },
21
21
  "dependencies": {
22
- "@salutejs/plasma-new-hope": "0.194.0-canary.1562.11851866538.0",
22
+ "@salutejs/plasma-new-hope": "0.194.0-canary.1562.11857238836.0",
23
23
  "@salutejs/sdds-themes": "0.27.0"
24
24
  },
25
25
  "peerDependencies": {
@@ -95,5 +95,5 @@
95
95
  "Anton Vinogradov"
96
96
  ],
97
97
  "sideEffects": false,
98
- "gitHead": "31a26f7b2e4fdc07bee9b216f1d201b67be3a85b"
98
+ "gitHead": "ab766838da1cd0dac89f2b4ee0601a7f1cf7a210"
99
99
  }
@@ -88,7 +88,8 @@ import { DrawerContentProps } from '@salutejs/plasma-new-hope/styled-components'
88
88
  import { DrawerFooterProps } from '@salutejs/plasma-new-hope/styled-components';
89
89
  import { DrawerHeaderProps } from '@salutejs/plasma-new-hope/styled-components';
90
90
  import { DrawerProps } from '@salutejs/plasma-new-hope/styled-components';
91
- import { DropdownItemOption } from '@salutejs/plasma-new-hope/styled-components';
91
+ import type { DropdownItemOption } from '@salutejs/plasma-new-hope';
92
+ import type { DropdownNewProps } from '@salutejs/plasma-new-hope';
92
93
  import { DropdownNodeSelect } from '@salutejs/plasma-new-hope/styled-components';
93
94
  import { DropdownPlacement } from '@salutejs/plasma-new-hope/types/components/Dropdown/Dropdown.types';
94
95
  import { DropdownTrigger } from '@salutejs/plasma-new-hope/types/components/Dropdown/Dropdown.types';
@@ -1190,7 +1191,7 @@ export { DrawerHeaderProps }
1190
1191
  export { DrawerProps }
1191
1192
 
1192
1193
  // @public (undocumented)
1193
- export const Dropdown: FunctionComponent<PropsType< {
1194
+ export const Dropdown: <T extends DropdownItemOption>(props: Omit<DropdownNewProps<T>, "view" | "size"> & Pick<PropsType< {
1194
1195
  size: {
1195
1196
  l: PolymorphicClassName;
1196
1197
  m: PolymorphicClassName;
@@ -1201,30 +1202,30 @@ view: {
1201
1202
  default: PolymorphicClassName;
1202
1203
  };
1203
1204
  }> & {
1204
- items: DropdownItemOption[];
1205
- alwaysOpened?: boolean | undefined;
1206
- children?: ReactNode;
1207
- itemRole?: string | undefined;
1208
- onHover?: ((index: number) => void) | undefined;
1209
- onItemSelect?: ((item: DropdownItemOption, event: SyntheticEvent<Element, Event>) => void) | undefined;
1210
- trigger?: DropdownTrigger | undefined;
1211
- placement?: DropdownPlacement | undefined;
1212
- offset?: [number, number] | undefined;
1213
- listWidth?: Property.Width<string | number> | undefined;
1214
- hasArrow?: boolean | undefined;
1215
- closeOnSelect?: boolean | undefined;
1216
- closeOnOverlayClick?: boolean | undefined;
1217
- onToggle?: ((isOpen: boolean, event: Event | SyntheticEvent<Element, Event>) => void) | undefined;
1218
- size?: string | undefined;
1219
- view?: string | undefined;
1220
- variant?: "normal" | "tight" | undefined;
1221
- portal?: string | RefObject<HTMLElement> | undefined;
1222
- renderItem?: ((item: DropdownItemOption) => ReactNode) | undefined;
1223
- onItemClick?: ((item: DropdownItemOption, event: SyntheticEvent<Element, Event>) => void) | undefined;
1224
- listOverflow?: Property.Overflow | undefined;
1225
- listHeight?: Property.Height<string | number> | undefined;
1226
- hoverIndex?: number | undefined;
1227
- } & HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>>;
1205
+ items: DropdownItemOption[];
1206
+ alwaysOpened?: boolean | undefined;
1207
+ children?: React_2.ReactNode;
1208
+ itemRole?: string | undefined;
1209
+ onHover?: ((index: number) => void) | undefined;
1210
+ onItemSelect?: ((item: DropdownItemOption, event: React_2.SyntheticEvent<Element, Event>) => void) | undefined;
1211
+ trigger?: DropdownTrigger | undefined;
1212
+ placement?: DropdownPlacement | undefined;
1213
+ offset?: [number, number] | undefined;
1214
+ listWidth?: Property.Width<string | number> | undefined;
1215
+ hasArrow?: boolean | undefined;
1216
+ closeOnSelect?: boolean | undefined;
1217
+ closeOnOverlayClick?: boolean | undefined;
1218
+ onToggle?: ((isOpen: boolean, event: Event | React_2.SyntheticEvent<Element, Event>) => void) | undefined;
1219
+ size?: string | undefined;
1220
+ view?: string | undefined;
1221
+ variant?: "normal" | "tight" | undefined;
1222
+ portal?: string | React_2.RefObject<HTMLElement> | undefined;
1223
+ renderItem?: ((item: DropdownItemOption) => React_2.ReactNode) | undefined;
1224
+ onItemClick?: ((item: DropdownItemOption, event: React_2.SyntheticEvent<Element, Event>) => void) | undefined;
1225
+ listOverflow?: Property.Overflow | undefined;
1226
+ listHeight?: Property.Height<string | number> | undefined;
1227
+ hoverIndex?: number | undefined;
1228
+ } & React_2.HTMLAttributes<HTMLDivElement> & React_2.RefAttributes<HTMLDivElement>, "view" | "size"> & React_2.RefAttributes<HTMLButtonElement>) => React_2.ReactElement<any, string | React_2.JSXElementConstructor<any>> | null;
1228
1229
 
1229
1230
  // @public (undocumented)
1230
1231
  export const DsplL: FunctionComponent<PropsType< {