@salutejs/plasma-new-hope 0.141.0-canary.1422.10721189833.0 → 0.141.0-canary.1424.10769683181.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. package/cjs/components/Badge/Badge.css +2 -0
  2. package/cjs/components/Badge/Badge.js +12 -3
  3. package/cjs/components/Badge/Badge.js.map +1 -1
  4. package/cjs/components/Badge/Badge.tokens.js +3 -1
  5. package/cjs/components/Badge/Badge.tokens.js.map +1 -1
  6. package/cjs/components/Badge/variations/_clear/base.js +9 -0
  7. package/cjs/components/Badge/variations/_clear/base.js.map +1 -0
  8. package/cjs/components/Badge/variations/_clear/base_w6r2lg.css +1 -0
  9. package/cjs/components/Combobox/ComboboxNew/Combobox.js +4 -6
  10. package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  11. package/cjs/components/Combobox/ComboboxOld/Combobox.js +8 -15
  12. package/cjs/components/Combobox/ComboboxOld/Combobox.js.map +1 -1
  13. package/cjs/index.css +2 -0
  14. package/emotion/cjs/components/Badge/Badge.js +12 -3
  15. package/emotion/cjs/components/Badge/Badge.template-doc.mdx +19 -28
  16. package/emotion/cjs/components/Badge/Badge.tokens.js +3 -1
  17. package/emotion/cjs/components/Badge/variations/_clear/base.js +9 -0
  18. package/emotion/cjs/components/Badge/variations/_clear/tokens.json +1 -0
  19. package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +4 -6
  20. package/emotion/cjs/components/Combobox/ComboboxOld/Combobox.js +8 -15
  21. package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +15 -12
  22. package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +1 -0
  23. package/emotion/cjs/examples/plasma_b2c/components/Combobox/ComboboxNew/Combobox.stories.tsx +0 -2
  24. package/emotion/cjs/examples/plasma_b2c/components/Combobox/ComboboxOld/Combobox.stories.tsx +3 -18
  25. package/emotion/cjs/examples/plasma_web/components/Badge/Badge.config.js +15 -12
  26. package/emotion/cjs/examples/plasma_web/components/Badge/Badge.stories.tsx +1 -0
  27. package/emotion/cjs/examples/plasma_web/components/Combobox/ComboboxNew/Combobox.stories.tsx +0 -2
  28. package/emotion/cjs/examples/plasma_web/components/Combobox/ComboboxOld/Combobox.stories.tsx +3 -18
  29. package/emotion/es/components/Badge/Badge.js +12 -3
  30. package/emotion/es/components/Badge/Badge.template-doc.mdx +19 -28
  31. package/emotion/es/components/Badge/Badge.tokens.js +3 -1
  32. package/emotion/es/components/Badge/variations/_clear/base.js +3 -0
  33. package/emotion/es/components/Badge/variations/_clear/tokens.json +1 -0
  34. package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +4 -6
  35. package/emotion/es/components/Combobox/ComboboxOld/Combobox.js +8 -15
  36. package/emotion/es/examples/plasma_b2c/components/Badge/Badge.config.js +15 -12
  37. package/emotion/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +1 -0
  38. package/emotion/es/examples/plasma_b2c/components/Combobox/ComboboxNew/Combobox.stories.tsx +0 -2
  39. package/emotion/es/examples/plasma_b2c/components/Combobox/ComboboxOld/Combobox.stories.tsx +3 -18
  40. package/emotion/es/examples/plasma_web/components/Badge/Badge.config.js +15 -12
  41. package/emotion/es/examples/plasma_web/components/Badge/Badge.stories.tsx +1 -0
  42. package/emotion/es/examples/plasma_web/components/Combobox/ComboboxNew/Combobox.stories.tsx +0 -2
  43. package/emotion/es/examples/plasma_web/components/Combobox/ComboboxOld/Combobox.stories.tsx +3 -18
  44. package/es/components/Badge/Badge.css +2 -0
  45. package/es/components/Badge/Badge.js +12 -3
  46. package/es/components/Badge/Badge.js.map +1 -1
  47. package/es/components/Badge/Badge.tokens.js +3 -1
  48. package/es/components/Badge/Badge.tokens.js.map +1 -1
  49. package/es/components/Badge/variations/_clear/base.js +5 -0
  50. package/es/components/Badge/variations/_clear/base.js.map +1 -0
  51. package/es/components/Badge/variations/_clear/base_w6r2lg.css +1 -0
  52. package/es/components/Combobox/ComboboxNew/Combobox.js +4 -6
  53. package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  54. package/es/components/Combobox/ComboboxOld/Combobox.js +8 -15
  55. package/es/components/Combobox/ComboboxOld/Combobox.js.map +1 -1
  56. package/es/index.css +2 -0
  57. package/package.json +2 -2
  58. package/styled-components/cjs/components/Badge/Badge.js +12 -3
  59. package/styled-components/cjs/components/Badge/Badge.template-doc.mdx +19 -28
  60. package/styled-components/cjs/components/Badge/Badge.tokens.js +3 -1
  61. package/styled-components/cjs/components/Badge/variations/_clear/base.js +9 -0
  62. package/styled-components/cjs/components/Badge/variations/_clear/tokens.json +1 -0
  63. package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +4 -6
  64. package/styled-components/cjs/components/Combobox/ComboboxOld/Combobox.js +8 -15
  65. package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +10 -7
  66. package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +1 -0
  67. package/styled-components/cjs/examples/plasma_b2c/components/Combobox/ComboboxNew/Combobox.stories.tsx +0 -2
  68. package/styled-components/cjs/examples/plasma_b2c/components/Combobox/ComboboxOld/Combobox.stories.tsx +3 -18
  69. package/styled-components/cjs/examples/plasma_web/components/Badge/Badge.config.js +10 -7
  70. package/styled-components/cjs/examples/plasma_web/components/Badge/Badge.stories.tsx +1 -0
  71. package/styled-components/cjs/examples/plasma_web/components/Combobox/ComboboxNew/Combobox.stories.tsx +0 -2
  72. package/styled-components/cjs/examples/plasma_web/components/Combobox/ComboboxOld/Combobox.stories.tsx +3 -18
  73. package/styled-components/es/components/Badge/Badge.js +12 -3
  74. package/styled-components/es/components/Badge/Badge.template-doc.mdx +19 -28
  75. package/styled-components/es/components/Badge/Badge.tokens.js +3 -1
  76. package/styled-components/es/components/Badge/variations/_clear/base.js +3 -0
  77. package/styled-components/es/components/Badge/variations/_clear/tokens.json +1 -0
  78. package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +4 -6
  79. package/styled-components/es/components/Combobox/ComboboxOld/Combobox.js +8 -15
  80. package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.config.js +10 -7
  81. package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +1 -0
  82. package/styled-components/es/examples/plasma_b2c/components/Combobox/ComboboxNew/Combobox.stories.tsx +0 -2
  83. package/styled-components/es/examples/plasma_b2c/components/Combobox/ComboboxOld/Combobox.stories.tsx +3 -18
  84. package/styled-components/es/examples/plasma_web/components/Badge/Badge.config.js +10 -7
  85. package/styled-components/es/examples/plasma_web/components/Badge/Badge.stories.tsx +1 -0
  86. package/styled-components/es/examples/plasma_web/components/Combobox/ComboboxNew/Combobox.stories.tsx +0 -2
  87. package/styled-components/es/examples/plasma_web/components/Combobox/ComboboxOld/Combobox.stories.tsx +3 -18
  88. package/types/components/Badge/Badge.d.ts +6 -0
  89. package/types/components/Badge/Badge.d.ts.map +1 -1
  90. package/types/components/Badge/Badge.tokens.d.ts +2 -0
  91. package/types/components/Badge/Badge.tokens.d.ts.map +1 -1
  92. package/types/components/Badge/Badge.types.d.ts +6 -0
  93. package/types/components/Badge/Badge.types.d.ts.map +1 -1
  94. package/types/components/Badge/variations/_clear/base.d.ts +2 -0
  95. package/types/components/Badge/variations/_clear/base.d.ts.map +1 -0
  96. package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
  97. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +1 -7
  98. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
  99. package/types/components/Combobox/ComboboxOld/Combobox.d.ts.map +1 -1
  100. package/types/components/Combobox/ComboboxOld/Combobox.types.d.ts +0 -6
  101. package/types/components/Combobox/ComboboxOld/Combobox.types.d.ts.map +1 -1
  102. package/types/examples/plasma_b2c/components/Badge/Badge.config.d.ts +3 -0
  103. package/types/examples/plasma_b2c/components/Badge/Badge.config.d.ts.map +1 -1
  104. package/types/examples/plasma_b2c/components/Badge/Badge.d.ts +4 -0
  105. package/types/examples/plasma_b2c/components/Badge/Badge.d.ts.map +1 -1
  106. package/types/examples/plasma_web/components/Badge/Badge.config.d.ts +3 -0
  107. package/types/examples/plasma_web/components/Badge/Badge.config.d.ts.map +1 -1
  108. package/types/examples/plasma_web/components/Badge/Badge.d.ts +4 -0
  109. package/types/examples/plasma_web/components/Badge/Badge.d.ts.map +1 -1
@@ -47,7 +47,6 @@ const meta: Meta<StorySelectProps> = {
47
47
  usePortal: false,
48
48
  disabled: false,
49
49
  readOnly: false,
50
- alwaysOpened: false,
51
50
  label: 'Label',
52
51
  placeholder: 'Placeholder',
53
52
  enumerationType: 'comma',
@@ -82,7 +81,7 @@ const getSelectItems = (slug: string, elemCount: number) =>
82
81
  }));
83
82
 
84
83
  const StorySingle = (args: StorySelectProps) => {
85
- const { usePortal, placement, label, placeholder, readOnly, disabled, alwaysOpened, size = 'm', view } = args;
84
+ const { usePortal, placement, label, placeholder, readOnly, disabled, size = 'm', view } = args;
86
85
 
87
86
  const [value, setValue] = useState<ComboboxPrimitiveValue | undefined>('item_0');
88
87
 
@@ -105,7 +104,6 @@ const StorySingle = (args: StorySelectProps) => {
105
104
  view={view}
106
105
  disabled={disabled}
107
106
  readOnly={readOnly}
108
- alwaysOpened={alwaysOpened}
109
107
  onChangeValue={onChangeValue}
110
108
  >
111
109
  <ComboboxItem value={undefined} text="Clear" />
@@ -131,18 +129,7 @@ export const Single: StoryObj<StorySelectProps> = {
131
129
  };
132
130
 
133
131
  const StoryMultiple = (args: StorySelectProps) => {
134
- const {
135
- usePortal,
136
- placement,
137
- label,
138
- placeholder,
139
- readOnly,
140
- disabled,
141
- enumerationType,
142
- alwaysOpened,
143
- size = 'm',
144
- view,
145
- } = args;
132
+ const { usePortal, placement, label, placeholder, readOnly, disabled, enumerationType, size = 'm', view } = args;
146
133
 
147
134
  const [value, setValue] = useState<Array<ComboboxPrimitiveValue> | undefined>(['item_2', 'item_3']);
148
135
 
@@ -166,7 +153,6 @@ const StoryMultiple = (args: StorySelectProps) => {
166
153
  view={view}
167
154
  disabled={disabled}
168
155
  readOnly={readOnly}
169
- alwaysOpened={alwaysOpened}
170
156
  onChangeValue={onChangeValue}
171
157
  >
172
158
  <ComboboxItem value={undefined} text="Clear" />
@@ -188,7 +174,7 @@ export const Multiple: StoryObj<StorySelectProps> = {
188
174
  };
189
175
 
190
176
  const StoryAddCustomItem = (args: StorySelectProps) => {
191
- const { usePortal, placement, label, placeholder, readOnly, disabled, alwaysOpened, size = 'm', view } = args;
177
+ const { usePortal, placement, label, placeholder, readOnly, disabled, size = 'm', view } = args;
192
178
 
193
179
  const [opened, setOpened] = useState(false);
194
180
  const [items, setItems] = useState(getSelectItems('item', 1));
@@ -239,7 +225,6 @@ const StoryAddCustomItem = (args: StorySelectProps) => {
239
225
  disabled={disabled}
240
226
  readOnly={readOnly}
241
227
  opened={opened}
242
- alwaysOpened={alwaysOpened}
243
228
  onToggle={onToggle}
244
229
  onChangeValue={onChangeValue}
245
230
  onKeyDown={onKeyDown}
@@ -6,6 +6,8 @@
6
6
 
7
7
  .base_1l6036y_binquhc__5cc72580.base_1l6036y_badgeTransparent__5cc72580{color:var(--plasma-badge-color-transparent);background-color:var(--plasma-badge-background-transparent);}
8
8
 
9
+ .base_w6r2lg_b1e1wuvi__c5ac2850.base_w6r2lg_badgeClear__c5ac2850{color:var(--plasma-badge-color-clear);background-color:transparent;}
10
+
9
11
  .Badge_styles_8pi3br_b1t43xoe__783e5f62{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;width:-webkit-max-content;width:-moz-max-content;width:max-content;}
10
12
  .Badge_styles_8pi3br_st1n7hr__783e5f62{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-badge-left-content-margin-left);margin-right:var(--plasma-badge-left-content-margin-right);}
11
13
 
@@ -5,10 +5,11 @@ import { base as base$1 } from './variations/_view/base.js';
5
5
  import { base as base$2 } from './variations/_size/base.js';
6
6
  import { base as base$3 } from './variations/_pilled/base.js';
7
7
  import { base as base$4 } from './variations/_transparent/base.js';
8
+ import { base as base$5 } from './variations/_clear/base.js';
8
9
  import { StyledContentLeft, StyledContentMain, StyledContentRight, base } from './Badge.styles.js';
9
10
  import { classes } from './Badge.tokens.js';
10
11
 
11
- var _excluded = ["children", "className", "text", "contentLeft", "contentRight", "size", "view", "pilled", "transparent"];
12
+ var _excluded = ["children", "className", "text", "contentLeft", "contentRight", "size", "view", "pilled", "transparent", "clear"];
12
13
  var badgeRoot = function badgeRoot(Root) {
13
14
  return /*#__PURE__*/forwardRef(function (props, ref) {
14
15
  var children = props.children,
@@ -22,17 +23,21 @@ var badgeRoot = function badgeRoot(Root) {
22
23
  pilled = _props$pilled === void 0 ? false : _props$pilled,
23
24
  _props$transparent = props.transparent,
24
25
  transparent = _props$transparent === void 0 ? false : _props$transparent,
26
+ _props$clear = props.clear,
27
+ clear = _props$clear === void 0 ? false : _props$clear,
25
28
  rest = _objectWithoutProperties(props, _excluded);
26
29
  var pilledClass = pilled ? classes.badgePilled : undefined;
27
30
  var transparentClass = transparent ? classes.badgeTransparent : undefined;
31
+ var clearClass = clear ? classes.badgeClear : undefined;
28
32
  var txt = !text && typeof children === 'string' ? children : text;
29
33
  return /*#__PURE__*/React.createElement(Root, _extends({
30
34
  ref: ref,
31
- className: cx(pilledClass, transparentClass, className),
35
+ className: cx(pilledClass, transparentClass, clearClass, className),
32
36
  view: view,
33
37
  size: size,
34
38
  pilled: pilled,
35
- transparent: transparent
39
+ transparent: transparent,
40
+ clear: clear
36
41
  }, rest), contentLeft && /*#__PURE__*/React.createElement(StyledContentLeft, null, contentLeft), txt ? /*#__PURE__*/React.createElement(StyledContentMain, null, txt) : children, contentRight && /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight));
37
42
  });
38
43
  };
@@ -55,6 +60,10 @@ var badgeConfig = {
55
60
  transparent: {
56
61
  css: base$4,
57
62
  attrs: true
63
+ },
64
+ clear: {
65
+ css: base$5,
66
+ attrs: true
58
67
  }
59
68
  },
60
69
  defaults: {
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.js","sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport type { RootProps } from '../../engines';\nimport { cx } from '../../utils';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as pilledCSS } from './variations/_pilled/base';\nimport { base as transparentCSS } from './variations/_transparent/base';\nimport type { BadgeProps } from './Badge.types';\nimport { StyledContentLeft, StyledContentMain, StyledContentRight, base } from './Badge.styles';\nimport { classes } from './Badge.tokens';\n\nexport const badgeRoot = (Root: RootProps<HTMLDivElement, BadgeProps>) =>\n forwardRef<HTMLDivElement, BadgeProps>((props, ref) => {\n const {\n children,\n className,\n text,\n contentLeft,\n contentRight,\n size,\n view,\n pilled = false,\n transparent = false,\n ...rest\n } = props;\n\n const pilledClass = pilled ? classes.badgePilled : undefined;\n const transparentClass = transparent ? classes.badgeTransparent : undefined;\n const txt = !text && typeof children === 'string' ? children : text;\n\n return (\n <Root\n ref={ref}\n className={cx(pilledClass, transparentClass, className)}\n view={view}\n size={size}\n pilled={pilled}\n transparent={transparent}\n {...rest}\n >\n {contentLeft && <StyledContentLeft>{contentLeft}</StyledContentLeft>}\n {txt ? <StyledContentMain>{txt}</StyledContentMain> : children}\n {contentRight && <StyledContentRight>{contentRight}</StyledContentRight>}\n </Root>\n );\n });\n\nexport const badgeConfig = {\n name: 'Badge',\n tag: 'div',\n layout: badgeRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n pilled: {\n css: pilledCSS,\n attrs: true,\n },\n transparent: {\n css: transparentCSS,\n attrs: true,\n },\n },\n defaults: {\n view: 'primary',\n size: 'm',\n },\n};\n"],"names":["badgeRoot","Root","forwardRef","props","ref","children","className","text","contentLeft","contentRight","size","view","_props$pilled","pilled","_props$transparent","transparent","rest","_objectWithoutProperties","_excluded","pilledClass","classes","badgePilled","undefined","transparentClass","badgeTransparent","txt","React","createElement","_extends","cx","StyledContentLeft","StyledContentMain","StyledContentRight","badgeConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","pilledCSS","attrs","transparentCSS","defaults"],"mappings":";;;;;;;;;;;IAaaA,SAAS,GAAG,SAAZA,SAASA,CAAIC,IAA2C,EAAA;AAAA,EAAA,oBACjEC,UAAU,CAA6B,UAACC,KAAK,EAAEC,GAAG,EAAK;AACnD,IAAA,IACIC,QAAQ,GAURF,KAAK,CAVLE,QAAQ;MACRC,SAAS,GASTH,KAAK,CATLG,SAAS;MACTC,IAAI,GAQJJ,KAAK,CARLI,IAAI;MACJC,WAAW,GAOXL,KAAK,CAPLK,WAAW;MACXC,YAAY,GAMZN,KAAK,CANLM,YAAY;MACZC,IAAI,GAKJP,KAAK,CALLO,IAAI;MACJC,IAAI,GAIJR,KAAK,CAJLQ,IAAI;MAAAC,aAAA,GAIJT,KAAK,CAHLU,MAAM;AAANA,MAAAA,MAAM,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,aAAA;MAAAE,kBAAA,GAGdX,KAAK,CAFLY,WAAW;AAAXA,MAAAA,WAAW,GAAAD,kBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,kBAAA;AAChBE,MAAAA,IAAI,GAAAC,wBAAA,CACPd,KAAK,EAAAe,SAAA,CAAA,CAAA;IAET,IAAMC,WAAW,GAAGN,MAAM,GAAGO,OAAO,CAACC,WAAW,GAAGC,SAAS,CAAA;IAC5D,IAAMC,gBAAgB,GAAGR,WAAW,GAAGK,OAAO,CAACI,gBAAgB,GAAGF,SAAS,CAAA;AAC3E,IAAA,IAAMG,GAAG,GAAG,CAAClB,IAAI,IAAI,OAAOF,QAAQ,KAAK,QAAQ,GAAGA,QAAQ,GAAGE,IAAI,CAAA;AAEnE,IAAA,oBAC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AAS;AACfD,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"Badge.js","sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport type { RootProps } from '../../engines';\nimport { cx } from '../../utils';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as pilledCSS } from './variations/_pilled/base';\nimport { base as transparentCSS } from './variations/_transparent/base';\nimport { base as clearCSS } from './variations/_clear/base';\nimport type { BadgeProps } from './Badge.types';\nimport { StyledContentLeft, StyledContentMain, StyledContentRight, base } from './Badge.styles';\nimport { classes } from './Badge.tokens';\n\nexport const badgeRoot = (Root: RootProps<HTMLDivElement, BadgeProps>) =>\n forwardRef<HTMLDivElement, BadgeProps>((props, ref) => {\n const {\n children,\n className,\n text,\n contentLeft,\n contentRight,\n size,\n view,\n pilled = false,\n transparent = false,\n clear = false,\n ...rest\n } = props;\n\n const pilledClass = pilled ? classes.badgePilled : undefined;\n const transparentClass = transparent ? classes.badgeTransparent : undefined;\n const clearClass = clear ? classes.badgeClear : undefined;\n const txt = !text && typeof children === 'string' ? children : text;\n\n return (\n <Root\n ref={ref}\n className={cx(pilledClass, transparentClass, clearClass, className)}\n view={view}\n size={size}\n pilled={pilled}\n transparent={transparent}\n clear={clear}\n {...rest}\n >\n {contentLeft && <StyledContentLeft>{contentLeft}</StyledContentLeft>}\n {txt ? <StyledContentMain>{txt}</StyledContentMain> : children}\n {contentRight && <StyledContentRight>{contentRight}</StyledContentRight>}\n </Root>\n );\n });\n\nexport const badgeConfig = {\n name: 'Badge',\n tag: 'div',\n layout: badgeRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n pilled: {\n css: pilledCSS,\n attrs: true,\n },\n transparent: {\n css: transparentCSS,\n attrs: true,\n },\n clear: {\n css: clearCSS,\n attrs: true,\n },\n },\n defaults: {\n view: 'primary',\n size: 'm',\n },\n};\n"],"names":["badgeRoot","Root","forwardRef","props","ref","children","className","text","contentLeft","contentRight","size","view","_props$pilled","pilled","_props$transparent","transparent","_props$clear","clear","rest","_objectWithoutProperties","_excluded","pilledClass","classes","badgePilled","undefined","transparentClass","badgeTransparent","clearClass","badgeClear","txt","React","createElement","_extends","cx","StyledContentLeft","StyledContentMain","StyledContentRight","badgeConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","pilledCSS","attrs","transparentCSS","clearCSS","defaults"],"mappings":";;;;;;;;;;;;IAcaA,SAAS,GAAG,SAAZA,SAASA,CAAIC,IAA2C,EAAA;AAAA,EAAA,oBACjEC,UAAU,CAA6B,UAACC,KAAK,EAAEC,GAAG,EAAK;AACnD,IAAA,IACIC,QAAQ,GAWRF,KAAK,CAXLE,QAAQ;MACRC,SAAS,GAUTH,KAAK,CAVLG,SAAS;MACTC,IAAI,GASJJ,KAAK,CATLI,IAAI;MACJC,WAAW,GAQXL,KAAK,CARLK,WAAW;MACXC,YAAY,GAOZN,KAAK,CAPLM,YAAY;MACZC,IAAI,GAMJP,KAAK,CANLO,IAAI;MACJC,IAAI,GAKJR,KAAK,CALLQ,IAAI;MAAAC,aAAA,GAKJT,KAAK,CAJLU,MAAM;AAANA,MAAAA,MAAM,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,aAAA;MAAAE,kBAAA,GAIdX,KAAK,CAHLY,WAAW;AAAXA,MAAAA,WAAW,GAAAD,kBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,kBAAA;MAAAE,YAAA,GAGnBb,KAAK,CAFLc,KAAK;AAALA,MAAAA,KAAK,GAAAD,YAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,YAAA;AACVE,MAAAA,IAAI,GAAAC,wBAAA,CACPhB,KAAK,EAAAiB,SAAA,CAAA,CAAA;IAET,IAAMC,WAAW,GAAGR,MAAM,GAAGS,OAAO,CAACC,WAAW,GAAGC,SAAS,CAAA;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AAA;KACR;AACDlC,IAAAA,IAAI,EAAE;AACFiC,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACDhC,IAAAA,MAAM,EAAE;AACJ8B,MAAAA,GAAG,EAAEG,MAAS;AACdC,MAAAA,KAAK,EAAE,IAAA;KACV;AACDhC,IAAAA,WAAW,EAAE;AACT4B,MAAAA,GAAG,EAAEK,MAAc;AACnBD,MAAAA,KAAK,EAAE,IAAA;KACV;AACD9B,IAAAA,KAAK,EAAE;AACH0B,MAAAA,GAAG,EAAEM,MAAQ;AACbF,MAAAA,KAAK,EAAE,IAAA;AACX,KAAA;GACH;AACDG,EAAAA,QAAQ,EAAE;AACNvC,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
@@ -1,12 +1,14 @@
1
1
  var classes = {
2
2
  badgePilled: 'badge-pilled',
3
- badgeTransparent: 'badge-transparent'
3
+ badgeTransparent: 'badge-transparent',
4
+ badgeClear: 'badge-clear'
4
5
  };
5
6
  var tokens = {
6
7
  background: '--plasma-badge-background',
7
8
  color: '--plasma-badge-color',
8
9
  backgroundTransparent: '--plasma-badge-background-transparent',
9
10
  colorTransparent: '--plasma-badge-color-transparent',
11
+ colorClear: '--plasma-badge-color-clear',
10
12
  borderRadius: '--plasma-badge-border-radius',
11
13
  pilledBorderRadius: '--plasma-badge-pilled-border-radius',
12
14
  height: '--plasma-badge-height',
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.tokens.js","sources":["../../../src/components/Badge/Badge.tokens.ts"],"sourcesContent":["export const classes = {\n badgePilled: 'badge-pilled',\n badgeTransparent: 'badge-transparent',\n};\n\nexport const tokens = {\n background: '--plasma-badge-background',\n color: '--plasma-badge-color',\n backgroundTransparent: '--plasma-badge-background-transparent',\n colorTransparent: '--plasma-badge-color-transparent',\n\n borderRadius: '--plasma-badge-border-radius',\n pilledBorderRadius: '--plasma-badge-pilled-border-radius',\n height: '--plasma-badge-height',\n paddingTop: '--plasma-badge-padding-top',\n paddingRight: '--plasma-badge-padding-right',\n paddingBottom: '--plasma-badge-padding-bottom',\n paddingLeft: '--plasma-badge-padding-left',\n\n fontFamily: '--plasma-badge-font-family',\n fontSize: '--plasma-badge-font-size',\n fontStyle: '--plasma-badge-font-style',\n fontWeight: '--plasma-badge-font-weight',\n letterSpacing: '--plasma-badge-letter-spacing',\n lineHeight: '--plasma-badge-lineheight',\n\n leftContentMarginLeft: '--plasma-badge-left-content-margin-left',\n leftContentMarginRight: '--plasma-badge-left-content-margin-right',\n rightContentMarginLeft: '--plasma-badge-right-content-margin-left',\n rightContentMarginRight: '--plasma-badge-right-content-margin-right',\n};\n"],"names":["classes","badgePilled","badgeTransparent","tokens","background","color","backgroundTransparent","colorTransparent","borderRadius","pilledBorderRadius","height","paddingTop","paddingRight","paddingBottom","paddingLeft","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","leftContentMarginLeft","leftContentMarginRight","rightContentMarginLeft","rightContentMarginRight"],"mappings":"AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,WAAW,EAAE,cAAc;AAC3BC,EAAAA,gBAAgB,EAAE,mBAAA;AACtB,EAAC;AAEM,IAAMC,MAAM,GAAG;AAClBC,EAAAA,UAAU,EAAE,2BAA2B;AACvCC,EAAAA,KAAK,EAAE,sBAAsB;AAC7BC,EAAAA,qBAAqB,EAAE,uCAAuC;AAC9DC,EAAAA,gBAAgB,EAAE,kCAAkC;AAEpDC,EAAAA,YAAY,EAAE,8BAA8B;AAC5CC,EAAAA,kBAAkB,EAAE,qCAAqC;AACzDC,EAAAA,MAAM,EAAE,uBAAuB;AAC/BC,EAAAA,UAAU,EAAE,4BAA4B;AACxCC,EAAAA,YAAY,EAAE,8BAA8B;AAC5CC,EAAAA,aAAa,EAAE,+BAA+B;AAC9CC,EAAAA,WAAW,EAAE,6BAA6B;AAE1CC,EAAAA,UAAU,EAAE,4BAA4B;AACxCC,EAAAA,QAAQ,EAAE,0BAA0B;AACpCC,EAAAA,SAAS,EAAE,2BAA2B;AACtCC,EAAAA,UAAU,EAAE,4BAA4B;AACxCC,EAAAA,aAAa,EAAE,+BAA+B;AAC9CC,EAAAA,UAAU,EAAE,2BAA2B;AAEvCC,EAAAA,qBAAqB,EAAE,yCAAyC;AAChEC,EAAAA,sBAAsB,EAAE,0CAA0C;AAClEC,EAAAA,sBAAsB,EAAE,0CAA0C;AAClEC,EAAAA,uBAAuB,EAAE,2CAAA;AAC7B;;;;"}
1
+ {"version":3,"file":"Badge.tokens.js","sources":["../../../src/components/Badge/Badge.tokens.ts"],"sourcesContent":["export const classes = {\n badgePilled: 'badge-pilled',\n badgeTransparent: 'badge-transparent',\n badgeClear: 'badge-clear',\n};\n\nexport const tokens = {\n background: '--plasma-badge-background',\n color: '--plasma-badge-color',\n backgroundTransparent: '--plasma-badge-background-transparent',\n colorTransparent: '--plasma-badge-color-transparent',\n colorClear: '--plasma-badge-color-clear',\n\n borderRadius: '--plasma-badge-border-radius',\n pilledBorderRadius: '--plasma-badge-pilled-border-radius',\n height: '--plasma-badge-height',\n paddingTop: '--plasma-badge-padding-top',\n paddingRight: '--plasma-badge-padding-right',\n paddingBottom: '--plasma-badge-padding-bottom',\n paddingLeft: '--plasma-badge-padding-left',\n\n fontFamily: '--plasma-badge-font-family',\n fontSize: '--plasma-badge-font-size',\n fontStyle: '--plasma-badge-font-style',\n fontWeight: '--plasma-badge-font-weight',\n letterSpacing: '--plasma-badge-letter-spacing',\n lineHeight: '--plasma-badge-lineheight',\n\n leftContentMarginLeft: '--plasma-badge-left-content-margin-left',\n leftContentMarginRight: '--plasma-badge-left-content-margin-right',\n rightContentMarginLeft: '--plasma-badge-right-content-margin-left',\n rightContentMarginRight: '--plasma-badge-right-content-margin-right',\n};\n"],"names":["classes","badgePilled","badgeTransparent","badgeClear","tokens","background","color","backgroundTransparent","colorTransparent","colorClear","borderRadius","pilledBorderRadius","height","paddingTop","paddingRight","paddingBottom","paddingLeft","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","leftContentMarginLeft","leftContentMarginRight","rightContentMarginLeft","rightContentMarginRight"],"mappings":"AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,WAAW,EAAE,cAAc;AAC3BC,EAAAA,gBAAgB,EAAE,mBAAmB;AACrCC,EAAAA,UAAU,EAAE,aAAA;AAChB,EAAC;AAEM,IAAMC,MAAM,GAAG;AAClBC,EAAAA,UAAU,EAAE,2BAA2B;AACvCC,EAAAA,KAAK,EAAE,sBAAsB;AAC7BC,EAAAA,qBAAqB,EAAE,uCAAuC;AAC9DC,EAAAA,gBAAgB,EAAE,kCAAkC;AACpDC,EAAAA,UAAU,EAAE,4BAA4B;AAExCC,EAAAA,YAAY,EAAE,8BAA8B;AAC5CC,EAAAA,kBAAkB,EAAE,qCAAqC;AACzDC,EAAAA,MAAM,EAAE,uBAAuB;AAC/BC,EAAAA,UAAU,EAAE,4BAA4B;AACxCC,EAAAA,YAAY,EAAE,8BAA8B;AAC5CC,EAAAA,aAAa,EAAE,+BAA+B;AAC9CC,EAAAA,WAAW,EAAE,6BAA6B;AAE1CC,EAAAA,UAAU,EAAE,4BAA4B;AACxCC,EAAAA,QAAQ,EAAE,0BAA0B;AACpCC,EAAAA,SAAS,EAAE,2BAA2B;AACtCC,EAAAA,UAAU,EAAE,4BAA4B;AACxCC,EAAAA,aAAa,EAAE,+BAA+B;AAC9CC,EAAAA,UAAU,EAAE,2BAA2B;AAEvCC,EAAAA,qBAAqB,EAAE,yCAAyC;AAChEC,EAAAA,sBAAsB,EAAE,0CAA0C;AAClEC,EAAAA,sBAAsB,EAAE,0CAA0C;AAClEC,EAAAA,uBAAuB,EAAE,2CAAA;AAC7B;;;;"}
@@ -0,0 +1,5 @@
1
+ import './base_w6r2lg.css';
2
+ var base = "b1e1wuvi";
3
+
4
+ export { base };
5
+ //# sourceMappingURL=base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.js","sources":["../../../../../src/components/Badge/variations/_clear/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { classes, tokens } from '../../Badge.tokens';\n\nexport const base = css`\n &.${String(classes.badgeClear)} {\n color: var(${tokens.colorClear});\n background-color: transparent;\n }\n`;\n"],"names":["base"],"mappings":"AAIO,IAAMA,IAAI,GAKhB;;;;"}
@@ -0,0 +1 @@
1
+ .b1e1wuvi.badge-clear{color:var(--plasma-badge-color-clear);background-color:transparent;}
@@ -23,7 +23,7 @@ import { IconArrowWrapper, StyledArrow, Ul, StyledEmptyState, base } from './Com
23
23
  import { base as base$1 } from './variations/_view/base.js';
24
24
  import { base as base$2 } from './variations/_size/base.js';
25
25
 
26
- var _excluded = ["multiple", "value", "onChange", "isTargetAmount", "items", "placement", "label", "placeholder", "helperText", "contentLeft", "textBefore", "textAfter", "variant", "listOverflow", "listHeight", "listWidth", "portal", "renderItem", "view", "size", "labelPlacement", "readOnly", "disabled", "alwaysOpened", "filter", "closeAfterSelect"];
26
+ var _excluded = ["multiple", "value", "onChange", "isTargetAmount", "items", "placement", "label", "placeholder", "helperText", "contentLeft", "textBefore", "textAfter", "variant", "listOverflow", "listHeight", "listWidth", "portal", "renderItem", "view", "size", "labelPlacement", "readOnly", "disabled", "filter", "closeAfterSelect"];
27
27
  var Context = /*#__PURE__*/createContext({});
28
28
 
29
29
  /**
@@ -59,8 +59,6 @@ var comboboxRoot = function comboboxRoot(Root) {
59
59
  readOnly = _props$readOnly === void 0 ? false : _props$readOnly,
60
60
  _props$disabled = props.disabled,
61
61
  disabled = _props$disabled === void 0 ? false : _props$disabled,
62
- _props$alwaysOpened = props.alwaysOpened,
63
- alwaysOpened = _props$alwaysOpened === void 0 ? false : _props$alwaysOpened,
64
62
  filter = props.filter,
65
63
  outerCloseAfterSelect = props.closeAfterSelect,
66
64
  rest = _objectWithoutProperties(props, _excluded);
@@ -110,7 +108,7 @@ var comboboxRoot = function comboboxRoot(Root) {
110
108
  _useState6 = _slicedToArray(_useState5, 2),
111
109
  checked = _useState6[0],
112
110
  setChecked = _useState6[1];
113
- var isCurrentListOpen = alwaysOpened || Boolean(path[0]);
111
+ var isCurrentListOpen = Boolean(path[0]);
114
112
  var activeDescendantItemValue = ((_getItemByFocused = getItemByFocused(focusedPath, focusedToValueMap)) === null || _getItemByFocused === void 0 ? void 0 : _getItemByFocused.value) || '';
115
113
  var withArrowInverse = isCurrentListOpen ? classes.arrowInverse : undefined;
116
114
  var closeAfterSelect = outerCloseAfterSelect !== null && outerCloseAfterSelect !== void 0 ? outerCloseAfterSelect : !multiple;
@@ -220,7 +218,7 @@ var comboboxRoot = function comboboxRoot(Root) {
220
218
  newValues.push(item.value);
221
219
  }
222
220
  });
223
- if (!alwaysOpened && closeAfterSelect) {
221
+ if (closeAfterSelect) {
224
222
  dispatchPath({
225
223
  type: 'reset'
226
224
  });
@@ -265,7 +263,7 @@ var comboboxRoot = function comboboxRoot(Root) {
265
263
  updateSingleAncestors(item, checkedCopy, 'dot');
266
264
  }
267
265
  setTextValue(isCurrentChecked ? '' : item.label);
268
- if (!alwaysOpened && closeAfterSelect) {
266
+ if (closeAfterSelect) {
269
267
  dispatchPath({
270
268
  type: 'reset'
271
269
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Combobox.js","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.tsx"],"sourcesContent":["import React, { forwardRef, useState, useReducer, useMemo, createContext, useLayoutEffect, useRef } from 'react';\nimport type { ChangeEvent } from 'react';\nimport { safeUseId, useForkRef } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../../engines';\nimport { isEmpty } from '../../../utils';\nimport { useOutsideClick } from '../../../hooks';\nimport { sizeToIconSize } from '../../Select/utils';\n\nimport { classes } from './Combobox.tokens';\nimport { FloatingPopover } from './FloatingPopover';\nimport { useKeyNavigation, getItemByFocused } from './hooks/useKeyboardNavigation';\nimport {\n initialItemsTransform,\n updateAncestors,\n updateDescendants,\n updateSingleAncestors,\n filterItems,\n getItemId,\n} from './utils';\nimport { Inner, StyledTextField } from './ui';\nimport { pathReducer, focusedPathReducer } from './reducers';\nimport { getPathMap, getTreeMaps } from './hooks/getPathMaps';\nimport { Ul, base, StyledArrow, IconArrowWrapper, StyledEmptyState } from './Combobox.styles';\nimport type { ItemContext, ComboboxProps } from './Combobox.types';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport type { ItemOptionTransformed } from './ui/Inner/ui/Item/Item.types';\n\nexport const Context = createContext<ItemContext>({} as ItemContext);\n\n/**\n * Поле ввода с выпадающим списком и возможностью фильтрации и выбора элементов.\n */\nexport const comboboxRoot = (Root: RootProps<HTMLInputElement, Omit<ComboboxProps, 'items'>>) =>\n forwardRef<HTMLInputElement, ComboboxProps>((props, ref) => {\n const {\n multiple,\n value: outerValue,\n onChange: outerOnChange,\n isTargetAmount,\n items,\n placement = 'bottom-start',\n label,\n placeholder,\n helperText,\n contentLeft,\n textBefore,\n textAfter,\n variant = 'normal',\n listOverflow,\n listHeight,\n listWidth,\n portal,\n renderItem,\n view,\n size,\n labelPlacement,\n readOnly = false,\n disabled = false,\n alwaysOpened = false,\n filter,\n closeAfterSelect: outerCloseAfterSelect,\n ...rest\n } = props;\n const [textValue, setTextValue] = useState('');\n const [internalValue, setInternalValue] = useState<string | string[]>(multiple ? [] : '');\n\n const value = outerValue || internalValue;\n\n const inputRef = useRef<HTMLInputElement>(null);\n const floatingPopoverRef = useRef<HTMLDivElement>(null);\n const inputForkRef = useForkRef(inputRef, ref);\n const treeId = safeUseId();\n\n const transformedItems = useMemo(() => initialItemsTransform(items || []), [items]);\n\n // Создаем структуры для быстрой работы с деревом\n const [valueToCheckedMap, valueToItemMap, labelToItemMap] = useMemo(() => getTreeMaps(items), [items]);\n\n const filteredItems = filterItems(\n transformedItems,\n textValue,\n valueToItemMap.get(value as string)?.label as string,\n filter,\n );\n\n const [pathMap, focusedToValueMap] = useMemo(() => getPathMap(filteredItems), [filteredItems, textValue]);\n\n // Состояния дерева элементов\n const [path, dispatchPath] = useReducer(pathReducer, []);\n const [focusedPath, dispatchFocusedPath] = useReducer(focusedPathReducer, []);\n const [checked, setChecked] = useState(valueToCheckedMap);\n\n const isCurrentListOpen = alwaysOpened || Boolean(path[0]);\n const activeDescendantItemValue = getItemByFocused(focusedPath, focusedToValueMap)?.value || '';\n const withArrowInverse = isCurrentListOpen ? classes.arrowInverse : undefined;\n const closeAfterSelect = outerCloseAfterSelect ?? !multiple;\n\n // Логика работы при клике за пределами выпадающего списка\n const targetRef = useOutsideClick<HTMLUListElement>(() => {\n if (!isCurrentListOpen) {\n return;\n }\n\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n\n // Проверяем, отличается ли значение в инпуте от выбранного value после закрытия дропдауна.\n // Если изменилось, то возвращаем label выбранного айтема.\n // Если нет выбранного элемента, то стираем значение инпута.\n if (textValue !== value) {\n if (isEmpty(value)) {\n setTextValue('');\n } else {\n setTextValue(valueToItemMap.get(value as string)?.label || '');\n }\n }\n }, floatingPopoverRef);\n\n const onChange = (newValue: string | Array<string>) => {\n if (outerOnChange) {\n outerOnChange(newValue as any);\n }\n\n setInternalValue(newValue);\n };\n\n const handleClickArrow = () => {\n if (disabled) {\n return;\n }\n\n if (isCurrentListOpen) {\n dispatchPath({ type: 'reset' });\n } else {\n dispatchPath({ type: 'opened_first_level' });\n }\n\n dispatchFocusedPath({ type: 'reset' });\n };\n\n // Обработчик изменения значения в инпуте\n const handleTextValueChange = (e: ChangeEvent<HTMLInputElement>) => {\n setTextValue(e.target.value);\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'reset' });\n };\n\n // Обработчик чипов\n const handleChipsChange = (chipLabels: any[]) => {\n onChange(chipLabels.map((chipLabel) => labelToItemMap.get(chipLabel)!.value));\n };\n\n // Обработчик открытия/закрытия выпадающего списка\n const handleListToggle = (opened: boolean) => {\n if (disabled) {\n return;\n }\n\n if (opened) {\n dispatchPath({ type: 'opened_first_level' });\n } else {\n dispatchFocusedPath({ type: 'reset' });\n dispatchPath({ type: 'reset' });\n }\n };\n\n // Обработчик выбора чекбоксов (только при multiple)\n const handleCheckboxChange = (item: ItemOptionTransformed) => {\n if (!multiple) {\n return;\n }\n\n const checkedCopy = new Map(checked);\n\n if (!checkedCopy.get(item.value)) {\n checkedCopy.set(item.value, true);\n updateDescendants(item, checkedCopy, true);\n } else {\n checkedCopy.set(item.value, false);\n updateDescendants(item, checkedCopy, false);\n }\n\n updateAncestors(item, checkedCopy);\n\n const newValues: Array<string> = [];\n\n valueToItemMap.forEach((item, key) => {\n if (checkedCopy.get(key)) {\n newValues.push(item.value);\n }\n });\n\n if (!alwaysOpened && closeAfterSelect) {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }\n\n if (onChange) {\n onChange(newValues);\n }\n\n // После выбора/снятия чекбокса скроллим к инпуту\n setTimeout(() => {\n if (inputRef.current) {\n inputRef.current.scrollIntoView({\n behavior: 'smooth',\n inline: 'start',\n });\n }\n }, 1);\n };\n\n // Обработчик клика по айтему выпадающего списка\n const handleItemClick = (item: ItemOptionTransformed, e?: React.MouseEvent<HTMLElement>) => {\n if (!isEmpty(item?.items)) {\n return;\n }\n\n if (multiple) {\n handleCheckboxChange(item);\n return;\n }\n\n if (e) {\n e.stopPropagation();\n }\n\n const checkedCopy = new Map(checked);\n\n const isCurrentChecked = checkedCopy.get(item.value);\n\n checkedCopy.forEach((_, key) => {\n checkedCopy.set(key, false);\n });\n\n if (!isCurrentChecked) {\n checkedCopy.set(item.value, 'done');\n updateSingleAncestors(item, checkedCopy, 'dot');\n }\n\n setTextValue(isCurrentChecked ? '' : item.label);\n\n if (!alwaysOpened && closeAfterSelect) {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }\n\n if (onChange) {\n onChange(isCurrentChecked ? '' : item.value);\n }\n };\n\n const getChips = (): string[] => {\n if (multiple) {\n if (value.length === 0) return [];\n\n if (isTargetAmount) {\n return [`Выбрано ${value.length}`];\n }\n\n return (value as []).map((value) => valueToItemMap.get(value)!.label);\n }\n\n return [];\n };\n\n const handlePressDown = (item: ItemOptionTransformed, e?: React.MouseEvent<HTMLElement>) => {\n if (isEmpty(item.items)) {\n handleItemClick(item, e);\n } else if (multiple) {\n handleCheckboxChange(item);\n }\n };\n\n const { onKeyDown } = useKeyNavigation({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleListToggle,\n handlePressDown,\n multiselect: multiple,\n setTextValue,\n });\n\n // В данном эффекте мы следим за изменениями value снаружи и вносим коррективы в дерево чекбоксов.\n // Пример: когда юзер очистил value извне, тогда нужно пройтись по элементам и выключить все чекбоксы.\n useLayoutEffect(() => {\n const checkedCopy = new Map(checked);\n\n checkedCopy.forEach((_, key) => {\n checkedCopy.set(key, false);\n });\n\n if (!isEmpty(value)) {\n if (Array.isArray(value)) {\n value.forEach((val) => {\n checkedCopy.set(val, true);\n updateDescendants(valueToItemMap.get(val)!, checkedCopy, true);\n updateAncestors(valueToItemMap.get(val)!, checkedCopy);\n });\n } else {\n checkedCopy.set(value, 'done');\n updateSingleAncestors(valueToItemMap.get(value)!, checkedCopy, 'dot');\n }\n }\n\n setChecked(checkedCopy);\n }, [value]);\n\n return (\n <Root size={size} view={view} labelPlacement={labelPlacement} disabled={disabled} readOnly={readOnly}>\n <div>\n <Context.Provider\n value={{\n focusedPath,\n checked,\n multiple,\n size,\n handleCheckboxChange,\n handleItemClick,\n variant,\n renderItem,\n valueToItemMap,\n treeId,\n }}\n >\n <FloatingPopover\n ref={floatingPopoverRef}\n opened={isCurrentListOpen}\n onToggle={(opened: boolean) => opened && handleListToggle(true)}\n placement={placement}\n portal={portal}\n target={(referenceRef) => (\n <StyledTextField\n ref={inputForkRef}\n inputWrapperRef={referenceRef}\n value={textValue}\n onChange={handleTextValueChange}\n size={size}\n view={view}\n labelPlacement={labelPlacement}\n disabled={disabled}\n readOnly={readOnly}\n label={label}\n placeholder={placeholder}\n contentLeft={contentLeft}\n contentRight={\n <IconArrowWrapper disabled={disabled} onClick={handleClickArrow}>\n <StyledArrow\n color=\"inherit\"\n size={sizeToIconSize(size)}\n className={withArrowInverse}\n />\n </IconArrowWrapper>\n }\n textBefore={textBefore}\n textAfter={textAfter}\n onKeyDown={onKeyDown}\n leftHelper={helperText}\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-controls={`${treeId}_tree_level_1`}\n aria-expanded={isCurrentListOpen}\n aria-activedescendant={\n activeDescendantItemValue ? getItemId(treeId, activeDescendantItemValue) : ''\n }\n {...(multiple\n ? {\n enumerationType: 'chip',\n chips: getChips(),\n onChangeChips: handleChipsChange,\n }\n : { enumerationType: 'plain' })}\n {...rest}\n onEnterDisabled // Пропс для отключения обработчика Enter внутри Textfield\n />\n )}\n >\n <Root\n size={size}\n view={view}\n labelPlacement={labelPlacement}\n disabled={disabled}\n readOnly={readOnly}\n >\n <Ul\n role=\"tree\"\n id={`${treeId}_tree_level_1`}\n aria-multiselectable={Boolean(multiple)}\n listHeight={listHeight}\n listOverflow={listOverflow}\n listWidth={listWidth}\n ref={targetRef}\n >\n {isEmpty(filteredItems) ? (\n <StyledEmptyState\n className={classes.emptyStateWrapper}\n size={size}\n description=\"Ничего не найдено\"\n />\n ) : (\n filteredItems.map((item, index) => (\n <Inner\n key={`${index}/0`}\n item={item}\n currentLevel={0}\n path={path}\n dispatchPath={dispatchPath}\n index={index}\n listWidth={listWidth}\n />\n ))\n )}\n </Ul>\n </Root>\n </FloatingPopover>\n </Context.Provider>\n </div>\n </Root>\n );\n });\n\nexport const comboboxConfig = {\n name: 'Select',\n tag: 'div',\n layout: comboboxRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n readOnly: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n labelPlacement: 'outer',\n },\n};\n"],"names":["Context","createContext","comboboxRoot","Root","forwardRef","props","ref","_valueToItemMap$get","_getItemByFocused","multiple","outerValue","value","outerOnChange","onChange","isTargetAmount","items","_props$placement","placement","label","placeholder","helperText","contentLeft","textBefore","textAfter","_props$variant","variant","listOverflow","listHeight","listWidth","portal","renderItem","view","size","labelPlacement","_props$readOnly","readOnly","_props$disabled","disabled","_props$alwaysOpened","alwaysOpened","filter","outerCloseAfterSelect","closeAfterSelect","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","textValue","setTextValue","_useState3","_useState4","internalValue","setInternalValue","inputRef","useRef","floatingPopoverRef","inputForkRef","useForkRef","treeId","safeUseId","transformedItems","useMemo","initialItemsTransform","_useMemo","getTreeMaps","_useMemo2","valueToCheckedMap","valueToItemMap","labelToItemMap","filteredItems","filterItems","get","_useMemo3","getPathMap","_useMemo4","pathMap","focusedToValueMap","_useReducer","useReducer","pathReducer","_useReducer2","path","dispatchPath","_useReducer3","focusedPathReducer","_useReducer4","focusedPath","dispatchFocusedPath","_useState5","_useState6","checked","setChecked","isCurrentListOpen","Boolean","activeDescendantItemValue","getItemByFocused","withArrowInverse","classes","arrowInverse","undefined","targetRef","useOutsideClick","type","isEmpty","_valueToItemMap$get2","newValue","handleClickArrow","handleTextValueChange","e","target","handleChipsChange","chipLabels","map","chipLabel","handleListToggle","opened","handleCheckboxChange","item","checkedCopy","Map","set","updateDescendants","updateAncestors","newValues","forEach","key","push","setTimeout","current","scrollIntoView","behavior","inline","handleItemClick","stopPropagation","isCurrentChecked","_","updateSingleAncestors","getChips","length","concat","handlePressDown","_useKeyNavigation","useKeyNavigation","multiselect","onKeyDown","useLayoutEffect","Array","isArray","val","React","createElement","Provider","FloatingPopover","onToggle","referenceRef","StyledTextField","_extends","inputWrapperRef","contentRight","IconArrowWrapper","onClick","StyledArrow","color","sizeToIconSize","className","leftHelper","role","getItemId","enumerationType","chips","onChangeChips","onEnterDisabled","Ul","id","StyledEmptyState","emptyStateWrapper","description","index","Inner","currentLevel","comboboxConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";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E;AACNjK,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAG;AACTC,IAAAA,cAAc,EAAE,OAAA;AACpB,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"Combobox.js","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.tsx"],"sourcesContent":["import React, { forwardRef, useState, useReducer, useMemo, createContext, useLayoutEffect, useRef } from 'react';\nimport type { ChangeEvent } from 'react';\nimport { safeUseId, useForkRef } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../../engines';\nimport { isEmpty } from '../../../utils';\nimport { useOutsideClick } from '../../../hooks';\nimport { sizeToIconSize } from '../../Select/utils';\n\nimport { classes } from './Combobox.tokens';\nimport { FloatingPopover } from './FloatingPopover';\nimport { useKeyNavigation, getItemByFocused } from './hooks/useKeyboardNavigation';\nimport {\n initialItemsTransform,\n updateAncestors,\n updateDescendants,\n updateSingleAncestors,\n filterItems,\n getItemId,\n} from './utils';\nimport { Inner, StyledTextField } from './ui';\nimport { pathReducer, focusedPathReducer } from './reducers';\nimport { getPathMap, getTreeMaps } from './hooks/getPathMaps';\nimport { Ul, base, StyledArrow, IconArrowWrapper, StyledEmptyState } from './Combobox.styles';\nimport type { ItemContext, ComboboxProps } from './Combobox.types';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport type { ItemOptionTransformed } from './ui/Inner/ui/Item/Item.types';\n\nexport const Context = createContext<ItemContext>({} as ItemContext);\n\n/**\n * Поле ввода с выпадающим списком и возможностью фильтрации и выбора элементов.\n */\nexport const comboboxRoot = (Root: RootProps<HTMLInputElement, Omit<ComboboxProps, 'items'>>) =>\n forwardRef<HTMLInputElement, ComboboxProps>((props, ref) => {\n const {\n multiple,\n value: outerValue,\n onChange: outerOnChange,\n isTargetAmount,\n items,\n placement = 'bottom-start',\n label,\n placeholder,\n helperText,\n contentLeft,\n textBefore,\n textAfter,\n variant = 'normal',\n listOverflow,\n listHeight,\n listWidth,\n portal,\n renderItem,\n view,\n size,\n labelPlacement,\n readOnly = false,\n disabled = false,\n filter,\n closeAfterSelect: outerCloseAfterSelect,\n ...rest\n } = props;\n const [textValue, setTextValue] = useState('');\n const [internalValue, setInternalValue] = useState<string | string[]>(multiple ? [] : '');\n\n const value = outerValue || internalValue;\n\n const inputRef = useRef<HTMLInputElement>(null);\n const floatingPopoverRef = useRef<HTMLDivElement>(null);\n const inputForkRef = useForkRef(inputRef, ref);\n const treeId = safeUseId();\n\n const transformedItems = useMemo(() => initialItemsTransform(items || []), [items]);\n\n // Создаем структуры для быстрой работы с деревом\n const [valueToCheckedMap, valueToItemMap, labelToItemMap] = useMemo(() => getTreeMaps(items), [items]);\n\n const filteredItems = filterItems(\n transformedItems,\n textValue,\n valueToItemMap.get(value as string)?.label as string,\n filter,\n );\n\n const [pathMap, focusedToValueMap] = useMemo(() => getPathMap(filteredItems), [filteredItems, textValue]);\n\n // Состояния дерева элементов\n const [path, dispatchPath] = useReducer(pathReducer, []);\n const [focusedPath, dispatchFocusedPath] = useReducer(focusedPathReducer, []);\n const [checked, setChecked] = useState(valueToCheckedMap);\n\n const isCurrentListOpen = Boolean(path[0]);\n const activeDescendantItemValue = getItemByFocused(focusedPath, focusedToValueMap)?.value || '';\n const withArrowInverse = isCurrentListOpen ? classes.arrowInverse : undefined;\n const closeAfterSelect = outerCloseAfterSelect ?? !multiple;\n\n // Логика работы при клике за пределами выпадающего списка\n const targetRef = useOutsideClick<HTMLUListElement>(() => {\n if (!isCurrentListOpen) {\n return;\n }\n\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n\n // Проверяем, отличается ли значение в инпуте от выбранного value после закрытия дропдауна.\n // Если изменилось, то возвращаем label выбранного айтема.\n // Если нет выбранного элемента, то стираем значение инпута.\n if (textValue !== value) {\n if (isEmpty(value)) {\n setTextValue('');\n } else {\n setTextValue(valueToItemMap.get(value as string)?.label || '');\n }\n }\n }, floatingPopoverRef);\n\n const onChange = (newValue: string | Array<string>) => {\n if (outerOnChange) {\n outerOnChange(newValue as any);\n }\n\n setInternalValue(newValue);\n };\n\n const handleClickArrow = () => {\n if (disabled) {\n return;\n }\n\n if (isCurrentListOpen) {\n dispatchPath({ type: 'reset' });\n } else {\n dispatchPath({ type: 'opened_first_level' });\n }\n\n dispatchFocusedPath({ type: 'reset' });\n };\n\n // Обработчик изменения значения в инпуте\n const handleTextValueChange = (e: ChangeEvent<HTMLInputElement>) => {\n setTextValue(e.target.value);\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'reset' });\n };\n\n // Обработчик чипов\n const handleChipsChange = (chipLabels: any[]) => {\n onChange(chipLabels.map((chipLabel) => labelToItemMap.get(chipLabel)!.value));\n };\n\n // Обработчик открытия/закрытия выпадающего списка\n const handleListToggle = (opened: boolean) => {\n if (disabled) {\n return;\n }\n\n if (opened) {\n dispatchPath({ type: 'opened_first_level' });\n } else {\n dispatchFocusedPath({ type: 'reset' });\n dispatchPath({ type: 'reset' });\n }\n };\n\n // Обработчик выбора чекбоксов (только при multiple)\n const handleCheckboxChange = (item: ItemOptionTransformed) => {\n if (!multiple) {\n return;\n }\n\n const checkedCopy = new Map(checked);\n\n if (!checkedCopy.get(item.value)) {\n checkedCopy.set(item.value, true);\n updateDescendants(item, checkedCopy, true);\n } else {\n checkedCopy.set(item.value, false);\n updateDescendants(item, checkedCopy, false);\n }\n\n updateAncestors(item, checkedCopy);\n\n const newValues: Array<string> = [];\n\n valueToItemMap.forEach((item, key) => {\n if (checkedCopy.get(key)) {\n newValues.push(item.value);\n }\n });\n\n if (closeAfterSelect) {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }\n\n if (onChange) {\n onChange(newValues);\n }\n\n // После выбора/снятия чекбокса скроллим к инпуту\n setTimeout(() => {\n if (inputRef.current) {\n inputRef.current.scrollIntoView({\n behavior: 'smooth',\n inline: 'start',\n });\n }\n }, 1);\n };\n\n // Обработчик клика по айтему выпадающего списка\n const handleItemClick = (item: ItemOptionTransformed, e?: React.MouseEvent<HTMLElement>) => {\n if (!isEmpty(item?.items)) {\n return;\n }\n\n if (multiple) {\n handleCheckboxChange(item);\n return;\n }\n\n if (e) {\n e.stopPropagation();\n }\n\n const checkedCopy = new Map(checked);\n\n const isCurrentChecked = checkedCopy.get(item.value);\n\n checkedCopy.forEach((_, key) => {\n checkedCopy.set(key, false);\n });\n\n if (!isCurrentChecked) {\n checkedCopy.set(item.value, 'done');\n updateSingleAncestors(item, checkedCopy, 'dot');\n }\n\n setTextValue(isCurrentChecked ? '' : item.label);\n\n if (closeAfterSelect) {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }\n\n if (onChange) {\n onChange(isCurrentChecked ? '' : item.value);\n }\n };\n\n const getChips = (): string[] => {\n if (multiple) {\n if (value.length === 0) return [];\n\n if (isTargetAmount) {\n return [`Выбрано ${value.length}`];\n }\n\n return (value as []).map((value) => valueToItemMap.get(value)!.label);\n }\n\n return [];\n };\n\n const handlePressDown = (item: ItemOptionTransformed, e?: React.MouseEvent<HTMLElement>) => {\n if (isEmpty(item.items)) {\n handleItemClick(item, e);\n } else if (multiple) {\n handleCheckboxChange(item);\n }\n };\n\n const { onKeyDown } = useKeyNavigation({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleListToggle,\n handlePressDown,\n multiselect: multiple,\n setTextValue,\n });\n\n // В данном эффекте мы следим за изменениями value снаружи и вносим коррективы в дерево чекбоксов.\n // Пример: когда юзер очистил value извне, тогда нужно пройтись по элементам и выключить все чекбоксы.\n useLayoutEffect(() => {\n const checkedCopy = new Map(checked);\n\n checkedCopy.forEach((_, key) => {\n checkedCopy.set(key, false);\n });\n\n if (!isEmpty(value)) {\n if (Array.isArray(value)) {\n value.forEach((val) => {\n checkedCopy.set(val, true);\n updateDescendants(valueToItemMap.get(val)!, checkedCopy, true);\n updateAncestors(valueToItemMap.get(val)!, checkedCopy);\n });\n } else {\n checkedCopy.set(value, 'done');\n updateSingleAncestors(valueToItemMap.get(value)!, checkedCopy, 'dot');\n }\n }\n\n setChecked(checkedCopy);\n }, [value]);\n\n return (\n <Root size={size} view={view} labelPlacement={labelPlacement} disabled={disabled} readOnly={readOnly}>\n <div>\n <Context.Provider\n value={{\n focusedPath,\n checked,\n multiple,\n size,\n handleCheckboxChange,\n handleItemClick,\n variant,\n renderItem,\n valueToItemMap,\n treeId,\n }}\n >\n <FloatingPopover\n ref={floatingPopoverRef}\n opened={isCurrentListOpen}\n onToggle={(opened: boolean) => opened && handleListToggle(true)}\n placement={placement}\n portal={portal}\n target={(referenceRef) => (\n <StyledTextField\n ref={inputForkRef}\n inputWrapperRef={referenceRef}\n value={textValue}\n onChange={handleTextValueChange}\n size={size}\n view={view}\n labelPlacement={labelPlacement}\n disabled={disabled}\n readOnly={readOnly}\n label={label}\n placeholder={placeholder}\n contentLeft={contentLeft}\n contentRight={\n <IconArrowWrapper disabled={disabled} onClick={handleClickArrow}>\n <StyledArrow\n color=\"inherit\"\n size={sizeToIconSize(size)}\n className={withArrowInverse}\n />\n </IconArrowWrapper>\n }\n textBefore={textBefore}\n textAfter={textAfter}\n onKeyDown={onKeyDown}\n leftHelper={helperText}\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-controls={`${treeId}_tree_level_1`}\n aria-expanded={isCurrentListOpen}\n aria-activedescendant={\n activeDescendantItemValue ? getItemId(treeId, activeDescendantItemValue) : ''\n }\n {...(multiple\n ? {\n enumerationType: 'chip',\n chips: getChips(),\n onChangeChips: handleChipsChange,\n }\n : { enumerationType: 'plain' })}\n {...rest}\n onEnterDisabled // Пропс для отключения обработчика Enter внутри Textfield\n />\n )}\n >\n <Root\n size={size}\n view={view}\n labelPlacement={labelPlacement}\n disabled={disabled}\n readOnly={readOnly}\n >\n <Ul\n role=\"tree\"\n id={`${treeId}_tree_level_1`}\n aria-multiselectable={Boolean(multiple)}\n listHeight={listHeight}\n listOverflow={listOverflow}\n listWidth={listWidth}\n ref={targetRef}\n >\n {isEmpty(filteredItems) ? (\n <StyledEmptyState\n className={classes.emptyStateWrapper}\n size={size}\n description=\"Ничего не найдено\"\n />\n ) : (\n filteredItems.map((item, index) => (\n <Inner\n key={`${index}/0`}\n item={item}\n currentLevel={0}\n path={path}\n dispatchPath={dispatchPath}\n index={index}\n listWidth={listWidth}\n />\n ))\n )}\n </Ul>\n </Root>\n </FloatingPopover>\n </Context.Provider>\n </div>\n </Root>\n );\n });\n\nexport const comboboxConfig = {\n name: 'Select',\n tag: 'div',\n layout: comboboxRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n readOnly: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n labelPlacement: 'outer',\n },\n};\n"],"names":["Context","createContext","comboboxRoot","Root","forwardRef","props","ref","_valueToItemMap$get","_getItemByFocused","multiple","outerValue","value","outerOnChange","onChange","isTargetAmount","items","_props$placement","placement","label","placeholder","helperText","contentLeft","textBefore","textAfter","_props$variant","variant","listOverflow","listHeight","listWidth","portal","renderItem","view","size","labelPlacement","_props$readOnly","readOnly","_props$disabled","disabled","filter","outerCloseAfterSelect","closeAfterSelect","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","textValue","setTextValue","_useState3","_useState4","internalValue","setInternalValue","inputRef","useRef","floatingPopoverRef","inputForkRef","useForkRef","treeId","safeUseId","transformedItems","useMemo","initialItemsTransform","_useMemo","getTreeMaps","_useMemo2","valueToCheckedMap","valueToItemMap","labelToItemMap","filteredItems","filterItems","get","_useMemo3","getPathMap","_useMemo4","pathMap","focusedToValueMap","_useReducer","useReducer","pathReducer","_useReducer2","path","dispatchPath","_useReducer3","focusedPathReducer","_useReducer4","focusedPath","dispatchFocusedPath","_useState5","_useState6","checked","setChecked","isCurrentListOpen","Boolean","activeDescendantItemValue","getItemByFocused","withArrowInverse","classes","arrowInverse","undefined","targetRef","useOutsideClick","type","isEmpty","_valueToItemMap$get2","newValue","handleClickArrow","handleTextValueChange","e","target","handleChipsChange","chipLabels","map","chipLabel","handleListToggle","opened","handleCheckboxChange","item","checkedCopy","Map","set","updateDescendants","updateAncestors","newValues","forEach","key","push","setTimeout","current","scrollIntoView","behavior","inline","handleItemClick","stopPropagation","isCurrentChecked","_","updateSingleAncestors","getChips","length","concat","handlePressDown","_useKeyNavigation","useKeyNavigation","multiselect","onKeyDown","useLayoutEffect","Array","isArray","val","React","createElement","Provider","FloatingPopover","onToggle","referenceRef","StyledTextField","_extends","inputWrapperRef","contentRight","IconArrowWrapper","onClick","StyledArrow","color","sizeToIconSize","className","leftHelper","role","getItemId","enumerationType","chips","onChangeChips","onEnterDisabled","Ul","id","StyledEmptyState","emptyStateWrapper","description","index","Inner","currentLevel","comboboxConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;IA6BaA,OAAO,gBAAGC,aAAa,CAAc,EAAiB,EAAC;;AAEpE;AACA;AACA;IACaC,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAA+D,EAAA;AAAA,EAAA,oBACxFC,UAAU,CAAkC,UAACC,KAAK,EAAEC,GAAG,EAAK;IAAA,IAAAC,mBAAA,EAAAC,iBAAA,CAAA;AACxD,IAAA,IACIC,QAAQ,GA0BRJ,KAAK,CA1BLI,QAAQ;MACDC,UAAU,GAyBjBL,KAAK,CAzBLM,KAAK;MACKC,aAAa,GAwBvBP,KAAK,CAxBLQ,QAAQ;MACRC,cAAc,GAuBdT,KAAK,CAvBLS,cAAc;MACdC,KAAK,GAsBLV,KAAK,CAtBLU,KAAK;MAAAC,gBAAA,GAsBLX,KAAK,CArBLY,SAAS;AAATA,MAAAA,SAAS,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,cAAc,GAAAA,gBAAA;MAC1BE,KAAK,GAoBLb,KAAK,CApBLa,KAAK;MACLC,WAAW,GAmBXd,KAAK,CAnBLc,W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AI,EAAE,QAAQ;AACdC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEtL,YAAY;AACpBuL,EAAAA,IAAI,EAAJA,IAAI;AACJC,EAAAA,UAAU,EAAE;AACR3J,IAAAA,IAAI,EAAE;AACF4J,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACD5J,IAAAA,IAAI,EAAE;AACF2J,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACD1J,IAAAA,QAAQ,EAAE;AACNwJ,MAAAA,GAAG,EAAEE,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN/J,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAG;AACTC,IAAAA,cAAc,EAAE,OAAA;AACpB,GAAA;AACJ;;;;"}
@@ -18,7 +18,7 @@ import { ComboboxTarget } from './ui/ComboboxTarget/ComboboxTarget.js';
18
18
  import { StyledRoot, StyledNativeSelect, StyledPopover, StyledCombobox, ComboboxItemNotFound } from './Combobox.styles.js';
19
19
  import { getPlacements } from '../../../utils/getPopoverPlacement.js';
20
20
 
21
- var _excluded = ["name", "form", "readOnly", "disabled", "label", "placeholder", "id", "children", "role", "view", "size", "frame", "usePortal", "negativeResultContent", "enumerationType", "opened", "alwaysOpened", "placement", "onToggle", "onKeyDown", "filterFunction"];
21
+ var _excluded = ["name", "form", "readOnly", "disabled", "label", "placeholder", "id", "children", "role", "view", "size", "frame", "usePortal", "negativeResultContent", "enumerationType", "opened", "placement", "onToggle", "onKeyDown", "filterFunction"];
22
22
  /**
23
23
  * Выпадающий список без внешнего контроля видимости.
24
24
  */
@@ -44,8 +44,6 @@ var comboboxRoot = function comboboxRoot(Root) {
44
44
  enumerationType = _ref$enumerationType === void 0 ? 'comma' : _ref$enumerationType,
45
45
  _ref$opened = _ref.opened,
46
46
  opened = _ref$opened === void 0 ? false : _ref$opened,
47
- _ref$alwaysOpened = _ref.alwaysOpened,
48
- alwaysOpened = _ref$alwaysOpened === void 0 ? false : _ref$alwaysOpened,
49
47
  _ref$placement = _ref.placement,
50
48
  placement = _ref$placement === void 0 ? 'bottom' : _ref$placement,
51
49
  onToggle = _ref.onToggle,
@@ -76,7 +74,7 @@ var comboboxRoot = function comboboxRoot(Root) {
76
74
  itemsRefs: itemsRefs,
77
75
  inputRef: inputRef
78
76
  };
79
- var _useState3 = useState(alwaysOpened || opened),
77
+ var _useState3 = useState(opened),
80
78
  _useState4 = _slicedToArray(_useState3, 2),
81
79
  isVisible = _useState4[0],
82
80
  setIsVisible = _useState4[1];
@@ -102,11 +100,11 @@ var comboboxRoot = function comboboxRoot(Root) {
102
100
  if (disabled || readOnly) {
103
101
  return;
104
102
  }
105
- setIsVisible(alwaysOpened || opened);
106
- }, [opened, alwaysOpened, disabled, readOnly]);
103
+ setIsVisible(opened);
104
+ }, [opened, disabled, readOnly]);
107
105
  useEffect(function () {
108
106
  // INFO: Для кейсов, когда значение выбрано и нужно вывести весь список
109
- if (alwaysOpened || opened) {
107
+ if (opened) {
110
108
  setFilterValue('');
111
109
  }
112
110
  }, []);
@@ -120,10 +118,10 @@ var comboboxRoot = function comboboxRoot(Root) {
120
118
  setFilterValue('');
121
119
  }
122
120
  if (onToggle) {
123
- onToggle(alwaysOpened || openValue, event);
121
+ onToggle(openValue, event);
124
122
  return;
125
123
  }
126
- setIsVisible(alwaysOpened || openValue);
124
+ setIsVisible(openValue);
127
125
  };
128
126
  var closedWithoutChanges = useRef(true);
129
127
  var updateValue = function updateValue(item, event) {
@@ -137,7 +135,7 @@ var comboboxRoot = function comboboxRoot(Root) {
137
135
  }
138
136
  var newSelected = getNewSelected(rest.value, newValue, 'single');
139
137
  (_rest$onChangeValue2 = rest.onChangeValue) === null || _rest$onChangeValue2 === void 0 || _rest$onChangeValue2.call(rest, newSelected);
140
- onInnerToggle === null || onInnerToggle === void 0 || onInnerToggle(alwaysOpened || false, event);
138
+ onInnerToggle === null || onInnerToggle === void 0 || onInnerToggle(false, event);
141
139
  closedWithoutChanges.current = false;
142
140
  };
143
141
  var onClickChildrenItem = function onClickChildrenItem(event) {
@@ -181,11 +179,6 @@ var comboboxRoot = function comboboxRoot(Root) {
181
179
  onKeyDown === null || onKeyDown === void 0 || onKeyDown(event);
182
180
  onKeyDownTarget(event);
183
181
  };
184
- useEffect(function () {
185
- if (alwaysOpened && rest.valueType === 'single') {
186
- setSearch(String(value));
187
- }
188
- }, [value, alwaysOpened]);
189
182
  return /*#__PURE__*/React.createElement(StyledRoot, {
190
183
  ref: comboboxRef
191
184
  }, /*#__PURE__*/React.createElement(StyledNativeSelect, {