@salutejs/sdds-dfa 0.175.0-canary.1572.11914481185.0 → 0.175.0-dev.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -88,8 +88,11 @@ 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 type { DropdownItemOption } from '@salutejs/plasma-new-hope';
92
+ import type { DropdownNewProps } from '@salutejs/plasma-new-hope';
91
93
  import { DropdownNodeSelect } from '@salutejs/plasma-new-hope/styled-components';
92
- import { DropdownProps } from '@salutejs/plasma-new-hope/types/components/Dropdown/Dropdown.types';
94
+ import { DropdownPlacement } from '@salutejs/plasma-new-hope/types/components/Dropdown/Dropdown.types';
95
+ import { DropdownTrigger } from '@salutejs/plasma-new-hope/types/components/Dropdown/Dropdown.types';
93
96
  import { dsplL } from '@salutejs/sdds-themes/tokens';
94
97
  import { dsplLBold } from '@salutejs/sdds-themes/tokens';
95
98
  import { dsplM } from '@salutejs/sdds-themes/tokens';
@@ -542,12 +545,15 @@ true: PolymorphicClassName;
542
545
  };
543
546
  }> & ((HTMLAttributes<HTMLDivElement> & {
544
547
  text?: string | undefined;
545
- contentLeft?: ReactNode;
546
- contentRight?: ReactNode;
548
+ customColor?: string | undefined;
549
+ customBackgroundColor?: string | undefined;
547
550
  maxWidth?: Property.Width<string | number> | undefined;
548
551
  size?: string | undefined;
549
552
  view?: string | undefined;
550
553
  } & {
554
+ contentLeft?: ReactNode;
555
+ contentRight?: undefined;
556
+ } & {
551
557
  children?: ReactNode;
552
558
  } & {
553
559
  clear?: true | undefined;
@@ -555,12 +561,15 @@ pilled?: false | undefined;
555
561
  transparent?: false | undefined;
556
562
  } & RefAttributes<HTMLDivElement>) | (HTMLAttributes<HTMLDivElement> & {
557
563
  text?: string | undefined;
558
- contentLeft?: ReactNode;
559
- contentRight?: ReactNode;
564
+ customColor?: string | undefined;
565
+ customBackgroundColor?: string | undefined;
560
566
  maxWidth?: Property.Width<string | number> | undefined;
561
567
  size?: string | undefined;
562
568
  view?: string | undefined;
563
569
  } & {
570
+ contentLeft?: ReactNode;
571
+ contentRight?: undefined;
572
+ } & {
564
573
  children?: ReactNode;
565
574
  } & {
566
575
  pilled?: true | undefined;
@@ -568,12 +577,63 @@ transparent?: boolean | undefined;
568
577
  clear?: false | undefined;
569
578
  } & RefAttributes<HTMLDivElement>) | (HTMLAttributes<HTMLDivElement> & {
570
579
  text?: string | undefined;
580
+ customColor?: string | undefined;
581
+ customBackgroundColor?: string | undefined;
582
+ maxWidth?: Property.Width<string | number> | undefined;
583
+ size?: string | undefined;
584
+ view?: string | undefined;
585
+ } & {
571
586
  contentLeft?: ReactNode;
587
+ contentRight?: undefined;
588
+ } & {
589
+ children?: ReactNode;
590
+ } & {
591
+ pilled?: boolean | undefined;
592
+ transparent?: true | undefined;
593
+ clear?: false | undefined;
594
+ } & RefAttributes<HTMLDivElement>) | (HTMLAttributes<HTMLDivElement> & {
595
+ text?: string | undefined;
596
+ customColor?: string | undefined;
597
+ customBackgroundColor?: string | undefined;
598
+ maxWidth?: Property.Width<string | number> | undefined;
599
+ size?: string | undefined;
600
+ view?: string | undefined;
601
+ } & {
602
+ contentLeft?: undefined;
572
603
  contentRight?: ReactNode;
604
+ } & {
605
+ children?: ReactNode;
606
+ } & {
607
+ clear?: true | undefined;
608
+ pilled?: false | undefined;
609
+ transparent?: false | undefined;
610
+ } & RefAttributes<HTMLDivElement>) | (HTMLAttributes<HTMLDivElement> & {
611
+ text?: string | undefined;
612
+ customColor?: string | undefined;
613
+ customBackgroundColor?: string | undefined;
573
614
  maxWidth?: Property.Width<string | number> | undefined;
574
615
  size?: string | undefined;
575
616
  view?: string | undefined;
576
617
  } & {
618
+ contentLeft?: undefined;
619
+ contentRight?: ReactNode;
620
+ } & {
621
+ children?: ReactNode;
622
+ } & {
623
+ pilled?: true | undefined;
624
+ transparent?: boolean | undefined;
625
+ clear?: false | undefined;
626
+ } & RefAttributes<HTMLDivElement>) | (HTMLAttributes<HTMLDivElement> & {
627
+ text?: string | undefined;
628
+ customColor?: string | undefined;
629
+ customBackgroundColor?: string | undefined;
630
+ maxWidth?: Property.Width<string | number> | undefined;
631
+ size?: string | undefined;
632
+ view?: string | undefined;
633
+ } & {
634
+ contentLeft?: undefined;
635
+ contentRight?: ReactNode;
636
+ } & {
577
637
  children?: ReactNode;
578
638
  } & {
579
639
  pilled?: boolean | undefined;
@@ -1188,7 +1248,7 @@ export { DrawerHeaderProps }
1188
1248
  export { DrawerProps }
1189
1249
 
1190
1250
  // @public (undocumented)
1191
- export const Dropdown: FunctionComponent<PropsType< {
1251
+ export const Dropdown: <T extends DropdownItemOption>(props: Omit<DropdownNewProps<T>, "view" | "size"> & Pick<PropsType< {
1192
1252
  size: {
1193
1253
  l: PolymorphicClassName;
1194
1254
  m: PolymorphicClassName;
@@ -1198,7 +1258,31 @@ xs: PolymorphicClassName;
1198
1258
  view: {
1199
1259
  default: PolymorphicClassName;
1200
1260
  };
1201
- }> & DropdownProps & RefAttributes<HTMLDivElement>>;
1261
+ }> & {
1262
+ items: DropdownItemOption[];
1263
+ alwaysOpened?: boolean | undefined;
1264
+ children?: React_2.ReactNode;
1265
+ itemRole?: string | undefined;
1266
+ onHover?: ((index: number) => void) | undefined;
1267
+ onItemSelect?: ((item: DropdownItemOption, event: React_2.SyntheticEvent<Element, Event>) => void) | undefined;
1268
+ trigger?: DropdownTrigger | undefined;
1269
+ placement?: DropdownPlacement | undefined;
1270
+ offset?: [number, number] | undefined;
1271
+ listWidth?: Property.Width<string | number> | undefined;
1272
+ hasArrow?: boolean | undefined;
1273
+ closeOnSelect?: boolean | undefined;
1274
+ closeOnOverlayClick?: boolean | undefined;
1275
+ onToggle?: ((isOpen: boolean, event: Event | React_2.SyntheticEvent<Element, Event>) => void) | undefined;
1276
+ size?: string | undefined;
1277
+ view?: string | undefined;
1278
+ variant?: "normal" | "tight" | undefined;
1279
+ portal?: string | React_2.RefObject<HTMLElement> | undefined;
1280
+ renderItem?: ((item: DropdownItemOption) => React_2.ReactNode) | undefined;
1281
+ onItemClick?: ((item: DropdownItemOption, event: React_2.SyntheticEvent<Element, Event>) => void) | undefined;
1282
+ listOverflow?: Property.Overflow | undefined;
1283
+ listHeight?: Property.Height<string | number> | undefined;
1284
+ hoverIndex?: number | undefined;
1285
+ } & React_2.HTMLAttributes<HTMLDivElement> & React_2.RefAttributes<HTMLDivElement>, "view" | "size"> & React_2.RefAttributes<HTMLButtonElement>) => React_2.ReactElement<any, string | React_2.JSXElementConstructor<any>> | null;
1202
1286
 
1203
1287
  // @public (undocumented)
1204
1288
  export const DsplL: FunctionComponent<PropsType< {
@@ -23,10 +23,10 @@ var config = exports.config = {
23
23
  light: /*#__PURE__*/(0, _styledComponents.css)(_templateObject7 || (_templateObject7 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--on-light-text-primary);\n ", ": var(--on-dark-surface-solid-default);\n\n ", ": var(--on-dark-text-primary);\n ", ": var(--on-dark-surface-transparent-card);\n\n ", ": var(--on-dark-text-primary);\n "])), _styledComponents.badgeTokens.color, _styledComponents.badgeTokens.background, _styledComponents.badgeTokens.colorTransparent, _styledComponents.badgeTokens.backgroundTransparent, _styledComponents.badgeTokens.colorClear)
24
24
  },
25
25
  size: {
26
- l: /*#__PURE__*/(0, _styledComponents.css)(_templateObject8 || (_templateObject8 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 0.5rem;\n ", ": 1.75rem;\n ", ": 0.6875rem;\n ", ": 0.6875rem;\n\n ", ": var(--plasma-typo-body-s-font-family);\n ", ": var(--plasma-typo-body-s-font-size);\n ", ": var(--plasma-typo-body-s-font-style);\n ", ": var(--plasma-typo-body-s-font-weight);\n ", ": var(--plasma-typo-body-s-letter-spacing);\n ", ": var(--plasma-typo-body-s-line-height);\n\n ", ": -0.0625rem;\n ", ": 0.25rem;\n\n ", ": 0.25rem;\n ", ": -0.0625rem;\n "])), _styledComponents.badgeTokens.borderRadius, _styledComponents.badgeTokens.height, _styledComponents.badgeTokens.paddingRight, _styledComponents.badgeTokens.paddingLeft, _styledComponents.badgeTokens.fontFamily, _styledComponents.badgeTokens.fontSize, _styledComponents.badgeTokens.fontStyle, _styledComponents.badgeTokens.fontWeight, _styledComponents.badgeTokens.letterSpacing, _styledComponents.badgeTokens.lineHeight, _styledComponents.badgeTokens.leftContentMarginLeft, _styledComponents.badgeTokens.leftContentMarginRight, _styledComponents.badgeTokens.rightContentMarginLeft, _styledComponents.badgeTokens.rightContentMarginRight),
27
- m: /*#__PURE__*/(0, _styledComponents.css)(_templateObject9 || (_templateObject9 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 0.375rem;\n ", ": 1.5rem;\n ", ": 0.5625rem;\n ", ": 0.5625rem;\n\n ", ": var(--plasma-typo-body-xs-font-family);\n ", ": var(--plasma-typo-body-xs-font-size);\n ", ": var(--plasma-typo-body-xs-font-style);\n ", ": var(--plasma-typo-body-xs-font-weight);\n ", ": var(--plasma-typo-body-xs-letter-spacing);\n ", ": var(--plasma-typo-body-xs-line-height);\n\n ", ": -0.0625rem;\n ", ": 0.1875rem;\n\n ", ": 0.1875rem;\n ", ": -0.0625rem;\n "])), _styledComponents.badgeTokens.borderRadius, _styledComponents.badgeTokens.height, _styledComponents.badgeTokens.paddingRight, _styledComponents.badgeTokens.paddingLeft, _styledComponents.badgeTokens.fontFamily, _styledComponents.badgeTokens.fontSize, _styledComponents.badgeTokens.fontStyle, _styledComponents.badgeTokens.fontWeight, _styledComponents.badgeTokens.letterSpacing, _styledComponents.badgeTokens.lineHeight, _styledComponents.badgeTokens.leftContentMarginLeft, _styledComponents.badgeTokens.leftContentMarginRight, _styledComponents.badgeTokens.rightContentMarginLeft, _styledComponents.badgeTokens.rightContentMarginRight),
28
- s: /*#__PURE__*/(0, _styledComponents.css)(_templateObject10 || (_templateObject10 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 0.375rem;\n ", ": 1.25rem;\n ", ": 0.4375rem;\n ", ": 0.4375rem;\n\n ", ": var(--plasma-typo-body-xxs-font-family);\n ", ": var(--plasma-typo-body-xxs-font-size);\n ", ": var(--plasma-typo-body-xxs-font-style);\n ", ": var(--plasma-typo-body-xxs-font-weight);\n ", ": var(--plasma-typo-body-xxs-letter-spacing);\n ", ": var(--plasma-typo-body-xxs-line-height);\n\n ", ": -0.0625rem;\n ", ": 0.125rem;\n\n ", ": 0.125rem;\n ", ": -0.0625rem;\n "])), _styledComponents.badgeTokens.borderRadius, _styledComponents.badgeTokens.height, _styledComponents.badgeTokens.paddingRight, _styledComponents.badgeTokens.paddingLeft, _styledComponents.badgeTokens.fontFamily, _styledComponents.badgeTokens.fontSize, _styledComponents.badgeTokens.fontStyle, _styledComponents.badgeTokens.fontWeight, _styledComponents.badgeTokens.letterSpacing, _styledComponents.badgeTokens.lineHeight, _styledComponents.badgeTokens.leftContentMarginLeft, _styledComponents.badgeTokens.leftContentMarginRight, _styledComponents.badgeTokens.rightContentMarginLeft, _styledComponents.badgeTokens.rightContentMarginRight),
29
- xs: /*#__PURE__*/(0, _styledComponents.css)(_templateObject11 || (_templateObject11 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 0.25rem;\n ", ": 1rem;\n ", ": 0.25rem;\n ", ": 0.25rem;\n\n ", ": var(--plasma-typo-body-xxs-font-family);\n ", ": var(--plasma-typo-body-xxs-font-size);\n ", ": var(--plasma-typo-body-xxs-font-style);\n ", ": var(--plasma-typo-body-xxs-font-weight);\n ", ": var(--plasma-typo-body-xxs-letter-spacing);\n ", ": var(--plasma-typo-body-xxs-line-height);\n\n ", ": -0.0625rem;\n ", ": 0.125rem;\n\n ", ": 0.125rem;\n ", ": -0.0625rem;\n "])), _styledComponents.badgeTokens.borderRadius, _styledComponents.badgeTokens.height, _styledComponents.badgeTokens.paddingRight, _styledComponents.badgeTokens.paddingLeft, _styledComponents.badgeTokens.fontFamily, _styledComponents.badgeTokens.fontSize, _styledComponents.badgeTokens.fontStyle, _styledComponents.badgeTokens.fontWeight, _styledComponents.badgeTokens.letterSpacing, _styledComponents.badgeTokens.lineHeight, _styledComponents.badgeTokens.leftContentMarginLeft, _styledComponents.badgeTokens.leftContentMarginRight, _styledComponents.badgeTokens.rightContentMarginLeft, _styledComponents.badgeTokens.rightContentMarginRight)
26
+ l: /*#__PURE__*/(0, _styledComponents.css)(_templateObject8 || (_templateObject8 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 0.5rem;\n ", ": 1.75rem;\n ", ": 0 0.6875rem;\n ", ": 0 0.375rem;\n\n ", ": var(--plasma-typo-body-s-font-family);\n ", ": var(--plasma-typo-body-s-font-size);\n ", ": var(--plasma-typo-body-s-font-style);\n ", ": var(--plasma-typo-body-s-font-weight);\n ", ": var(--plasma-typo-body-s-letter-spacing);\n ", ": var(--plasma-typo-body-s-line-height);\n\n ", ": -0.0625rem;\n ", ": 0.25rem;\n\n ", ": 0.25rem;\n ", ": -0.0625rem;\n "])), _styledComponents.badgeTokens.borderRadius, _styledComponents.badgeTokens.height, _styledComponents.badgeTokens.padding, _styledComponents.badgeTokens.paddingIconOnly, _styledComponents.badgeTokens.fontFamily, _styledComponents.badgeTokens.fontSize, _styledComponents.badgeTokens.fontStyle, _styledComponents.badgeTokens.fontWeight, _styledComponents.badgeTokens.letterSpacing, _styledComponents.badgeTokens.lineHeight, _styledComponents.badgeTokens.leftContentMarginLeft, _styledComponents.badgeTokens.leftContentMarginRight, _styledComponents.badgeTokens.rightContentMarginLeft, _styledComponents.badgeTokens.rightContentMarginRight),
27
+ m: /*#__PURE__*/(0, _styledComponents.css)(_templateObject9 || (_templateObject9 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 0.375rem;\n ", ": 1.5rem;\n ", ": 0 0.5625rem;\n ", ": 0 0.375rem;\n\n ", ": var(--plasma-typo-body-xs-font-family);\n ", ": var(--plasma-typo-body-xs-font-size);\n ", ": var(--plasma-typo-body-xs-font-style);\n ", ": var(--plasma-typo-body-xs-font-weight);\n ", ": var(--plasma-typo-body-xs-letter-spacing);\n ", ": var(--plasma-typo-body-xs-line-height);\n\n ", ": -0.0625rem;\n ", ": 0.1875rem;\n\n ", ": 0.1875rem;\n ", ": -0.0625rem;\n "])), _styledComponents.badgeTokens.borderRadius, _styledComponents.badgeTokens.height, _styledComponents.badgeTokens.padding, _styledComponents.badgeTokens.paddingIconOnly, _styledComponents.badgeTokens.fontFamily, _styledComponents.badgeTokens.fontSize, _styledComponents.badgeTokens.fontStyle, _styledComponents.badgeTokens.fontWeight, _styledComponents.badgeTokens.letterSpacing, _styledComponents.badgeTokens.lineHeight, _styledComponents.badgeTokens.leftContentMarginLeft, _styledComponents.badgeTokens.leftContentMarginRight, _styledComponents.badgeTokens.rightContentMarginLeft, _styledComponents.badgeTokens.rightContentMarginRight),
28
+ s: /*#__PURE__*/(0, _styledComponents.css)(_templateObject10 || (_templateObject10 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 0.375rem;\n ", ": 1.25rem;\n ", ": 0 0.4375rem;\n ", ": 0 0.25rem;\n\n ", ": var(--plasma-typo-body-xxs-font-family);\n ", ": var(--plasma-typo-body-xxs-font-size);\n ", ": var(--plasma-typo-body-xxs-font-style);\n ", ": var(--plasma-typo-body-xxs-font-weight);\n ", ": var(--plasma-typo-body-xxs-letter-spacing);\n ", ": var(--plasma-typo-body-xxs-line-height);\n\n ", ": -0.0625rem;\n ", ": 0.125rem;\n\n ", ": 0.125rem;\n ", ": -0.0625rem;\n "])), _styledComponents.badgeTokens.borderRadius, _styledComponents.badgeTokens.height, _styledComponents.badgeTokens.padding, _styledComponents.badgeTokens.paddingIconOnly, _styledComponents.badgeTokens.fontFamily, _styledComponents.badgeTokens.fontSize, _styledComponents.badgeTokens.fontStyle, _styledComponents.badgeTokens.fontWeight, _styledComponents.badgeTokens.letterSpacing, _styledComponents.badgeTokens.lineHeight, _styledComponents.badgeTokens.leftContentMarginLeft, _styledComponents.badgeTokens.leftContentMarginRight, _styledComponents.badgeTokens.rightContentMarginLeft, _styledComponents.badgeTokens.rightContentMarginRight),
29
+ xs: /*#__PURE__*/(0, _styledComponents.css)(_templateObject11 || (_templateObject11 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 0.25rem;\n ", ": 1rem;\n ", ": 0 0.25rem;\n ", ": 0 0.188rem;\n\n ", ": var(--plasma-typo-body-xxs-font-family);\n ", ": var(--plasma-typo-body-xxs-font-size);\n ", ": var(--plasma-typo-body-xxs-font-style);\n ", ": var(--plasma-typo-body-xxs-font-weight);\n ", ": var(--plasma-typo-body-xxs-letter-spacing);\n ", ": var(--plasma-typo-body-xxs-line-height);\n\n ", ": -0.0625rem;\n ", ": 0.125rem;\n\n ", ": 0.125rem;\n ", ": -0.0625rem;\n "])), _styledComponents.badgeTokens.borderRadius, _styledComponents.badgeTokens.height, _styledComponents.badgeTokens.padding, _styledComponents.badgeTokens.paddingIconOnly, _styledComponents.badgeTokens.fontFamily, _styledComponents.badgeTokens.fontSize, _styledComponents.badgeTokens.fontStyle, _styledComponents.badgeTokens.fontWeight, _styledComponents.badgeTokens.letterSpacing, _styledComponents.badgeTokens.lineHeight, _styledComponents.badgeTokens.leftContentMarginLeft, _styledComponents.badgeTokens.leftContentMarginRight, _styledComponents.badgeTokens.rightContentMarginLeft, _styledComponents.badgeTokens.rightContentMarginRight)
30
30
  },
31
31
  pilled: {
32
32
  "true": /*#__PURE__*/(0, _styledComponents.css)(_templateObject12 || (_templateObject12 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 1.25rem;\n "])), _styledComponents.badgeTokens.pilledBorderRadius)
@@ -35,7 +35,7 @@ var config = exports.config = {
35
35
  "true": /*#__PURE__*/(0, _styledComponents.css)(_templateObject13 || (_templateObject13 = /*#__PURE__*/_taggedTemplateLiteral([""])))
36
36
  },
37
37
  clear: {
38
- "true": /*#__PURE__*/(0, _styledComponents.css)(_templateObject14 || (_templateObject14 = /*#__PURE__*/_taggedTemplateLiteral([""])))
38
+ "true": /*#__PURE__*/(0, _styledComponents.css)(_templateObject14 || (_templateObject14 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--surface-clear);\n "])), _styledComponents.badgeTokens.backgroundClear)
39
39
  }
40
40
  }
41
41
  };
@@ -29,11 +29,14 @@ export declare const Badge: import("react").FunctionComponent<import("@salutejs/
29
29
  };
30
30
  }> & ((import("react").HTMLAttributes<HTMLDivElement> & {
31
31
  text?: string | undefined;
32
- contentLeft?: import("react").ReactNode;
33
- contentRight?: import("react").ReactNode;
32
+ customColor?: string | undefined;
33
+ customBackgroundColor?: string | undefined;
34
34
  maxWidth?: import("csstype").Property.Width<string | number> | undefined;
35
35
  size?: string | undefined;
36
36
  view?: string | undefined;
37
+ } & {
38
+ contentLeft?: import("react").ReactNode;
39
+ contentRight?: undefined;
37
40
  } & {
38
41
  children?: import("react").ReactNode;
39
42
  } & {
@@ -42,11 +45,14 @@ export declare const Badge: import("react").FunctionComponent<import("@salutejs/
42
45
  transparent?: false | undefined;
43
46
  } & import("react").RefAttributes<HTMLDivElement>) | (import("react").HTMLAttributes<HTMLDivElement> & {
44
47
  text?: string | undefined;
45
- contentLeft?: import("react").ReactNode;
46
- contentRight?: import("react").ReactNode;
48
+ customColor?: string | undefined;
49
+ customBackgroundColor?: string | undefined;
47
50
  maxWidth?: import("csstype").Property.Width<string | number> | undefined;
48
51
  size?: string | undefined;
49
52
  view?: string | undefined;
53
+ } & {
54
+ contentLeft?: import("react").ReactNode;
55
+ contentRight?: undefined;
50
56
  } & {
51
57
  children?: import("react").ReactNode;
52
58
  } & {
@@ -55,11 +61,62 @@ export declare const Badge: import("react").FunctionComponent<import("@salutejs/
55
61
  clear?: false | undefined;
56
62
  } & import("react").RefAttributes<HTMLDivElement>) | (import("react").HTMLAttributes<HTMLDivElement> & {
57
63
  text?: string | undefined;
64
+ customColor?: string | undefined;
65
+ customBackgroundColor?: string | undefined;
66
+ maxWidth?: import("csstype").Property.Width<string | number> | undefined;
67
+ size?: string | undefined;
68
+ view?: string | undefined;
69
+ } & {
58
70
  contentLeft?: import("react").ReactNode;
71
+ contentRight?: undefined;
72
+ } & {
73
+ children?: import("react").ReactNode;
74
+ } & {
75
+ pilled?: boolean | undefined;
76
+ transparent?: true | undefined;
77
+ clear?: false | undefined;
78
+ } & import("react").RefAttributes<HTMLDivElement>) | (import("react").HTMLAttributes<HTMLDivElement> & {
79
+ text?: string | undefined;
80
+ customColor?: string | undefined;
81
+ customBackgroundColor?: string | undefined;
82
+ maxWidth?: import("csstype").Property.Width<string | number> | undefined;
83
+ size?: string | undefined;
84
+ view?: string | undefined;
85
+ } & {
86
+ contentLeft?: undefined;
59
87
  contentRight?: import("react").ReactNode;
88
+ } & {
89
+ children?: import("react").ReactNode;
90
+ } & {
91
+ clear?: true | undefined;
92
+ pilled?: false | undefined;
93
+ transparent?: false | undefined;
94
+ } & import("react").RefAttributes<HTMLDivElement>) | (import("react").HTMLAttributes<HTMLDivElement> & {
95
+ text?: string | undefined;
96
+ customColor?: string | undefined;
97
+ customBackgroundColor?: string | undefined;
60
98
  maxWidth?: import("csstype").Property.Width<string | number> | undefined;
61
99
  size?: string | undefined;
62
100
  view?: string | undefined;
101
+ } & {
102
+ contentLeft?: undefined;
103
+ contentRight?: import("react").ReactNode;
104
+ } & {
105
+ children?: import("react").ReactNode;
106
+ } & {
107
+ pilled?: true | undefined;
108
+ transparent?: boolean | undefined;
109
+ clear?: false | undefined;
110
+ } & import("react").RefAttributes<HTMLDivElement>) | (import("react").HTMLAttributes<HTMLDivElement> & {
111
+ text?: string | undefined;
112
+ customColor?: string | undefined;
113
+ customBackgroundColor?: string | undefined;
114
+ maxWidth?: import("csstype").Property.Width<string | number> | undefined;
115
+ size?: string | undefined;
116
+ view?: string | undefined;
117
+ } & {
118
+ contentLeft?: undefined;
119
+ contentRight?: import("react").ReactNode;
63
120
  } & {
64
121
  children?: import("react").ReactNode;
65
122
  } & {
@@ -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;
@@ -9,5 +10,29 @@ declare const Dropdown: import("react").FunctionComponent<import("@salutejs/plas
9
10
  view: {
10
11
  default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
11
12
  };
12
- }> & import("@salutejs/plasma-new-hope/types/components/Dropdown/Dropdown.types").DropdownProps & import("react").RefAttributes<HTMLDivElement>>;
13
+ }> & {
14
+ items: DropdownItemOption[];
15
+ alwaysOpened?: boolean | undefined;
16
+ children?: React.ReactNode;
17
+ itemRole?: string | undefined;
18
+ onHover?: ((index: number) => void) | undefined;
19
+ onItemSelect?: ((item: DropdownItemOption, event: React.SyntheticEvent<Element, Event>) => void) | undefined;
20
+ trigger?: import("@salutejs/plasma-new-hope/types/components/Dropdown/Dropdown.types").DropdownTrigger | undefined;
21
+ placement?: import("@salutejs/plasma-new-hope/types/components/Dropdown/Dropdown.types").DropdownPlacement | undefined;
22
+ offset?: [number, number] | undefined;
23
+ listWidth?: import("csstype").Property.Width<string | number> | undefined;
24
+ hasArrow?: boolean | undefined;
25
+ closeOnSelect?: boolean | undefined;
26
+ closeOnOverlayClick?: boolean | undefined;
27
+ onToggle?: ((isOpen: boolean, event: Event | React.SyntheticEvent<Element, Event>) => void) | undefined;
28
+ size?: string | undefined;
29
+ view?: string | undefined;
30
+ variant?: "normal" | "tight" | 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;
34
+ listOverflow?: import("csstype").Property.Overflow | undefined;
35
+ listHeight?: import("csstype").Property.Height<string | number> | undefined;
36
+ hoverIndex?: number | undefined;
37
+ } & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>, "view" | "size"> & React.RefAttributes<HTMLButtonElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
13
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);
@@ -17,10 +17,10 @@ export var config = {
17
17
  light: /*#__PURE__*/css(_templateObject7 || (_templateObject7 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--on-light-text-primary);\n ", ": var(--on-dark-surface-solid-default);\n\n ", ": var(--on-dark-text-primary);\n ", ": var(--on-dark-surface-transparent-card);\n\n ", ": var(--on-dark-text-primary);\n "])), badgeTokens.color, badgeTokens.background, badgeTokens.colorTransparent, badgeTokens.backgroundTransparent, badgeTokens.colorClear)
18
18
  },
19
19
  size: {
20
- l: /*#__PURE__*/css(_templateObject8 || (_templateObject8 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 0.5rem;\n ", ": 1.75rem;\n ", ": 0.6875rem;\n ", ": 0.6875rem;\n\n ", ": var(--plasma-typo-body-s-font-family);\n ", ": var(--plasma-typo-body-s-font-size);\n ", ": var(--plasma-typo-body-s-font-style);\n ", ": var(--plasma-typo-body-s-font-weight);\n ", ": var(--plasma-typo-body-s-letter-spacing);\n ", ": var(--plasma-typo-body-s-line-height);\n\n ", ": -0.0625rem;\n ", ": 0.25rem;\n\n ", ": 0.25rem;\n ", ": -0.0625rem;\n "])), badgeTokens.borderRadius, badgeTokens.height, badgeTokens.paddingRight, badgeTokens.paddingLeft, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight),
21
- m: /*#__PURE__*/css(_templateObject9 || (_templateObject9 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 0.375rem;\n ", ": 1.5rem;\n ", ": 0.5625rem;\n ", ": 0.5625rem;\n\n ", ": var(--plasma-typo-body-xs-font-family);\n ", ": var(--plasma-typo-body-xs-font-size);\n ", ": var(--plasma-typo-body-xs-font-style);\n ", ": var(--plasma-typo-body-xs-font-weight);\n ", ": var(--plasma-typo-body-xs-letter-spacing);\n ", ": var(--plasma-typo-body-xs-line-height);\n\n ", ": -0.0625rem;\n ", ": 0.1875rem;\n\n ", ": 0.1875rem;\n ", ": -0.0625rem;\n "])), badgeTokens.borderRadius, badgeTokens.height, badgeTokens.paddingRight, badgeTokens.paddingLeft, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight),
22
- s: /*#__PURE__*/css(_templateObject10 || (_templateObject10 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 0.375rem;\n ", ": 1.25rem;\n ", ": 0.4375rem;\n ", ": 0.4375rem;\n\n ", ": var(--plasma-typo-body-xxs-font-family);\n ", ": var(--plasma-typo-body-xxs-font-size);\n ", ": var(--plasma-typo-body-xxs-font-style);\n ", ": var(--plasma-typo-body-xxs-font-weight);\n ", ": var(--plasma-typo-body-xxs-letter-spacing);\n ", ": var(--plasma-typo-body-xxs-line-height);\n\n ", ": -0.0625rem;\n ", ": 0.125rem;\n\n ", ": 0.125rem;\n ", ": -0.0625rem;\n "])), badgeTokens.borderRadius, badgeTokens.height, badgeTokens.paddingRight, badgeTokens.paddingLeft, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight),
23
- xs: /*#__PURE__*/css(_templateObject11 || (_templateObject11 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 0.25rem;\n ", ": 1rem;\n ", ": 0.25rem;\n ", ": 0.25rem;\n\n ", ": var(--plasma-typo-body-xxs-font-family);\n ", ": var(--plasma-typo-body-xxs-font-size);\n ", ": var(--plasma-typo-body-xxs-font-style);\n ", ": var(--plasma-typo-body-xxs-font-weight);\n ", ": var(--plasma-typo-body-xxs-letter-spacing);\n ", ": var(--plasma-typo-body-xxs-line-height);\n\n ", ": -0.0625rem;\n ", ": 0.125rem;\n\n ", ": 0.125rem;\n ", ": -0.0625rem;\n "])), badgeTokens.borderRadius, badgeTokens.height, badgeTokens.paddingRight, badgeTokens.paddingLeft, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight)
20
+ l: /*#__PURE__*/css(_templateObject8 || (_templateObject8 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 0.5rem;\n ", ": 1.75rem;\n ", ": 0 0.6875rem;\n ", ": 0 0.375rem;\n\n ", ": var(--plasma-typo-body-s-font-family);\n ", ": var(--plasma-typo-body-s-font-size);\n ", ": var(--plasma-typo-body-s-font-style);\n ", ": var(--plasma-typo-body-s-font-weight);\n ", ": var(--plasma-typo-body-s-letter-spacing);\n ", ": var(--plasma-typo-body-s-line-height);\n\n ", ": -0.0625rem;\n ", ": 0.25rem;\n\n ", ": 0.25rem;\n ", ": -0.0625rem;\n "])), badgeTokens.borderRadius, badgeTokens.height, badgeTokens.padding, badgeTokens.paddingIconOnly, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight),
21
+ m: /*#__PURE__*/css(_templateObject9 || (_templateObject9 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 0.375rem;\n ", ": 1.5rem;\n ", ": 0 0.5625rem;\n ", ": 0 0.375rem;\n\n ", ": var(--plasma-typo-body-xs-font-family);\n ", ": var(--plasma-typo-body-xs-font-size);\n ", ": var(--plasma-typo-body-xs-font-style);\n ", ": var(--plasma-typo-body-xs-font-weight);\n ", ": var(--plasma-typo-body-xs-letter-spacing);\n ", ": var(--plasma-typo-body-xs-line-height);\n\n ", ": -0.0625rem;\n ", ": 0.1875rem;\n\n ", ": 0.1875rem;\n ", ": -0.0625rem;\n "])), badgeTokens.borderRadius, badgeTokens.height, badgeTokens.padding, badgeTokens.paddingIconOnly, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight),
22
+ s: /*#__PURE__*/css(_templateObject10 || (_templateObject10 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 0.375rem;\n ", ": 1.25rem;\n ", ": 0 0.4375rem;\n ", ": 0 0.25rem;\n\n ", ": var(--plasma-typo-body-xxs-font-family);\n ", ": var(--plasma-typo-body-xxs-font-size);\n ", ": var(--plasma-typo-body-xxs-font-style);\n ", ": var(--plasma-typo-body-xxs-font-weight);\n ", ": var(--plasma-typo-body-xxs-letter-spacing);\n ", ": var(--plasma-typo-body-xxs-line-height);\n\n ", ": -0.0625rem;\n ", ": 0.125rem;\n\n ", ": 0.125rem;\n ", ": -0.0625rem;\n "])), badgeTokens.borderRadius, badgeTokens.height, badgeTokens.padding, badgeTokens.paddingIconOnly, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight),
23
+ xs: /*#__PURE__*/css(_templateObject11 || (_templateObject11 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 0.25rem;\n ", ": 1rem;\n ", ": 0 0.25rem;\n ", ": 0 0.188rem;\n\n ", ": var(--plasma-typo-body-xxs-font-family);\n ", ": var(--plasma-typo-body-xxs-font-size);\n ", ": var(--plasma-typo-body-xxs-font-style);\n ", ": var(--plasma-typo-body-xxs-font-weight);\n ", ": var(--plasma-typo-body-xxs-letter-spacing);\n ", ": var(--plasma-typo-body-xxs-line-height);\n\n ", ": -0.0625rem;\n ", ": 0.125rem;\n\n ", ": 0.125rem;\n ", ": -0.0625rem;\n "])), badgeTokens.borderRadius, badgeTokens.height, badgeTokens.padding, badgeTokens.paddingIconOnly, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight)
24
24
  },
25
25
  pilled: {
26
26
  "true": /*#__PURE__*/css(_templateObject12 || (_templateObject12 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 1.25rem;\n "])), badgeTokens.pilledBorderRadius)
@@ -29,7 +29,7 @@ export var config = {
29
29
  "true": /*#__PURE__*/css(_templateObject13 || (_templateObject13 = /*#__PURE__*/_taggedTemplateLiteral([""])))
30
30
  },
31
31
  clear: {
32
- "true": /*#__PURE__*/css(_templateObject14 || (_templateObject14 = /*#__PURE__*/_taggedTemplateLiteral([""])))
32
+ "true": /*#__PURE__*/css(_templateObject14 || (_templateObject14 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--surface-clear);\n "])), badgeTokens.backgroundClear)
33
33
  }
34
34
  }
35
35
  };
@@ -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.175.0-canary.1572.11914481185.0",
3
+ "version": "0.175.0-dev.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.195.0-canary.1572.11914481185.0",
22
+ "@salutejs/plasma-new-hope": "0.195.0-dev.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": "50d076dd32feb9ea99a9d0809b37cc7e7f2c83fe"
98
+ "gitHead": "e8c1ee1545b8ffd1422c8974c9191f2fa2c7a528"
99
99
  }