@salutejs/plasma-new-hope 0.68.0-canary.1148.8464595999.0 → 0.68.0-canary.1148.8482525044.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. package/cjs/components/Cell/Cell.js +15 -12
  2. package/cjs/components/Cell/Cell.js.map +1 -1
  3. package/cjs/components/Cell/CellTextbox/CellTextbox.js +21 -0
  4. package/cjs/components/Cell/CellTextbox/CellTextbox.js.map +1 -0
  5. package/cjs/components/Cell/{Textbox/Textbox.styles.js → CellTextbox/CellTextbox.styles.js} +4 -4
  6. package/cjs/components/Cell/CellTextbox/CellTextbox.styles.js.map +1 -0
  7. package/cjs/components/Cell/{Textbox/ui/TextLabel.js → CellTextbox/ui/CellTextLabel.js} +4 -4
  8. package/cjs/components/Cell/CellTextbox/ui/CellTextLabel.js.map +1 -0
  9. package/cjs/components/Cell/{Textbox/ui/TextSubtitle.js → CellTextbox/ui/CellTextSubtitle.js} +4 -4
  10. package/cjs/components/Cell/CellTextbox/ui/CellTextSubtitle.js.map +1 -0
  11. package/cjs/components/Cell/{Textbox/ui/TextTitle.js → CellTextbox/ui/CellTextTitle.js} +4 -4
  12. package/cjs/components/Cell/CellTextbox/ui/CellTextTitle.js.map +1 -0
  13. package/cjs/components/Dropdown/Dropdown.js +2 -1
  14. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  15. package/cjs/components/Popover/Popover.js +46 -31
  16. package/cjs/components/Popover/Popover.js.map +1 -1
  17. package/cjs/index.js +8 -8
  18. package/es/components/Cell/Cell.js +15 -12
  19. package/es/components/Cell/Cell.js.map +1 -1
  20. package/es/components/Cell/CellTextbox/CellTextbox.js +17 -0
  21. package/es/components/Cell/CellTextbox/CellTextbox.js.map +1 -0
  22. package/es/components/Cell/CellTextbox/CellTextbox.styles.js +9 -0
  23. package/es/components/Cell/CellTextbox/CellTextbox.styles.js.map +1 -0
  24. package/es/components/Cell/{Textbox/ui/TextLabel.js → CellTextbox/ui/CellTextLabel.js} +4 -4
  25. package/es/components/Cell/CellTextbox/ui/CellTextLabel.js.map +1 -0
  26. package/es/components/Cell/{Textbox/ui/TextSubtitle.js → CellTextbox/ui/CellTextSubtitle.js} +4 -4
  27. package/es/components/Cell/CellTextbox/ui/CellTextSubtitle.js.map +1 -0
  28. package/es/components/Cell/{Textbox/ui/TextTitle.js → CellTextbox/ui/CellTextTitle.js} +4 -4
  29. package/es/components/Cell/CellTextbox/ui/CellTextTitle.js.map +1 -0
  30. package/es/components/Dropdown/Dropdown.js +2 -1
  31. package/es/components/Dropdown/Dropdown.js.map +1 -1
  32. package/es/components/Popover/Popover.js +46 -31
  33. package/es/components/Popover/Popover.js.map +1 -1
  34. package/es/index.js +4 -4
  35. package/package.json +4 -4
  36. package/styled-components/cjs/components/Cell/Cell.js +15 -12
  37. package/styled-components/cjs/components/Cell/CellTextbox/CellTextbox.js +20 -0
  38. package/styled-components/cjs/components/Cell/{Textbox/Textbox.styles.js → CellTextbox/CellTextbox.styles.js} +3 -3
  39. package/styled-components/cjs/components/Cell/{Textbox/ui/TextLabel.js → CellTextbox/ui/CellTextLabel.js} +3 -3
  40. package/styled-components/cjs/components/Cell/{Textbox/ui/TextSubtitle.js → CellTextbox/ui/CellTextSubtitle.js} +3 -3
  41. package/styled-components/cjs/components/Cell/{Textbox/ui/TextTitle.js → CellTextbox/ui/CellTextTitle.js} +3 -3
  42. package/styled-components/cjs/components/Cell/index.js +12 -12
  43. package/styled-components/cjs/components/Dropdown/Dropdown.js +2 -1
  44. package/styled-components/cjs/components/Popover/Popover.js +46 -31
  45. package/styled-components/cjs/examples/plasma_b2c/components/Cell/Cell.config.js +0 -5
  46. package/styled-components/cjs/examples/plasma_b2c/components/Cell/Cell.js +8 -8
  47. package/styled-components/cjs/examples/plasma_b2c/components/Cell/Cell.stories.tsx +12 -15
  48. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +1 -1
  49. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +1 -1
  50. package/styled-components/cjs/examples/plasma_b2c/components/Popover/Popover.stories.tsx +7 -0
  51. package/styled-components/cjs/examples/plasma_web/components/Cell/Cell.config.js +0 -5
  52. package/styled-components/cjs/examples/plasma_web/components/Cell/Cell.js +9 -9
  53. package/styled-components/cjs/examples/plasma_web/components/Cell/Cell.stories.tsx +11 -14
  54. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +1 -1
  55. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +1 -1
  56. package/styled-components/es/components/Cell/Cell.js +15 -12
  57. package/styled-components/es/components/Cell/CellTextbox/CellTextbox.js +13 -0
  58. package/styled-components/es/components/Cell/{Textbox/Textbox.styles.js → CellTextbox/CellTextbox.styles.js} +2 -2
  59. package/styled-components/es/components/Cell/{Textbox/ui/TextLabel.js → CellTextbox/ui/CellTextLabel.js} +2 -2
  60. package/styled-components/es/components/Cell/{Textbox/ui/TextSubtitle.js → CellTextbox/ui/CellTextSubtitle.js} +2 -2
  61. package/styled-components/es/components/Cell/{Textbox/ui/TextTitle.js → CellTextbox/ui/CellTextTitle.js} +2 -2
  62. package/styled-components/es/components/Cell/index.js +4 -4
  63. package/styled-components/es/components/Dropdown/Dropdown.js +2 -1
  64. package/styled-components/es/components/Popover/Popover.js +46 -31
  65. package/styled-components/es/examples/plasma_b2c/components/Cell/Cell.config.js +0 -5
  66. package/styled-components/es/examples/plasma_b2c/components/Cell/Cell.js +2 -2
  67. package/styled-components/es/examples/plasma_b2c/components/Cell/Cell.stories.tsx +12 -15
  68. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +1 -1
  69. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +1 -1
  70. package/styled-components/es/examples/plasma_b2c/components/Popover/Popover.stories.tsx +7 -0
  71. package/styled-components/es/examples/plasma_web/components/Cell/Cell.config.js +0 -5
  72. package/styled-components/es/examples/plasma_web/components/Cell/Cell.js +2 -2
  73. package/styled-components/es/examples/plasma_web/components/Cell/Cell.stories.tsx +11 -14
  74. package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +1 -1
  75. package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +1 -1
  76. package/types/components/Cell/Cell.d.ts +0 -1
  77. package/types/components/Cell/Cell.d.ts.map +1 -1
  78. package/types/components/Cell/Cell.types.d.ts +9 -8
  79. package/types/components/Cell/Cell.types.d.ts.map +1 -1
  80. package/types/components/Cell/CellTextbox/CellTextbox.d.ts +4 -0
  81. package/types/components/Cell/CellTextbox/CellTextbox.d.ts.map +1 -0
  82. package/types/components/Cell/CellTextbox/CellTextbox.styles.d.ts +2 -0
  83. package/types/components/Cell/CellTextbox/CellTextbox.styles.d.ts.map +1 -0
  84. package/types/components/Cell/CellTextbox/CellTextbox.types.d.ts +43 -0
  85. package/types/components/Cell/CellTextbox/CellTextbox.types.d.ts.map +1 -0
  86. package/types/components/Cell/CellTextbox/ui/CellTextLabel.d.ts +5 -0
  87. package/types/components/Cell/CellTextbox/ui/CellTextLabel.d.ts.map +1 -0
  88. package/types/components/Cell/CellTextbox/ui/CellTextSubtitle.d.ts +5 -0
  89. package/types/components/Cell/CellTextbox/ui/CellTextSubtitle.d.ts.map +1 -0
  90. package/types/components/Cell/CellTextbox/ui/CellTextTitle.d.ts +5 -0
  91. package/types/components/Cell/CellTextbox/ui/CellTextTitle.d.ts.map +1 -0
  92. package/types/components/Cell/index.d.ts +5 -5
  93. package/types/components/Cell/index.d.ts.map +1 -1
  94. package/types/components/Combobox/Combobox.styles.d.ts +8 -2
  95. package/types/components/Combobox/Combobox.styles.d.ts.map +1 -1
  96. package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
  97. package/types/components/Dropdown/Dropdown.styles.d.ts +7 -1
  98. package/types/components/Dropdown/Dropdown.styles.d.ts.map +1 -1
  99. package/types/components/Popover/Popover.d.ts +2 -2
  100. package/types/components/Popover/Popover.d.ts.map +1 -1
  101. package/types/components/Popover/Popover.types.d.ts +19 -14
  102. package/types/components/Popover/Popover.types.d.ts.map +1 -1
  103. package/types/components/Select/Select.styles.d.ts +8 -2
  104. package/types/components/Select/Select.styles.d.ts.map +1 -1
  105. package/types/examples/plasma_b2c/components/Cell/Cell.config.d.ts +0 -5
  106. package/types/examples/plasma_b2c/components/Cell/Cell.config.d.ts.map +1 -1
  107. package/types/examples/plasma_b2c/components/Cell/Cell.d.ts +10 -8
  108. package/types/examples/plasma_b2c/components/Cell/Cell.d.ts.map +1 -1
  109. package/types/examples/plasma_b2c/components/Popover/Popover.d.ts +7 -1
  110. package/types/examples/plasma_b2c/components/Popover/Popover.d.ts.map +1 -1
  111. package/types/examples/plasma_web/components/Cell/Cell.config.d.ts +0 -5
  112. package/types/examples/plasma_web/components/Cell/Cell.config.d.ts.map +1 -1
  113. package/types/examples/plasma_web/components/Cell/Cell.d.ts +10 -8
  114. package/types/examples/plasma_web/components/Cell/Cell.d.ts.map +1 -1
  115. package/types/examples/plasma_web/components/Popover/Popover.d.ts +7 -1
  116. package/types/examples/plasma_web/components/Popover/Popover.d.ts.map +1 -1
  117. package/types/examples/sds_engineer/components/Popover/Popover.d.ts +7 -1
  118. package/types/examples/sds_engineer/components/Popover/Popover.d.ts.map +1 -1
  119. package/cjs/components/Cell/Textbox/Textbox.js +0 -20
  120. package/cjs/components/Cell/Textbox/Textbox.js.map +0 -1
  121. package/cjs/components/Cell/Textbox/Textbox.styles.js.map +0 -1
  122. package/cjs/components/Cell/Textbox/ui/TextLabel.js.map +0 -1
  123. package/cjs/components/Cell/Textbox/ui/TextSubtitle.js.map +0 -1
  124. package/cjs/components/Cell/Textbox/ui/TextTitle.js.map +0 -1
  125. package/es/components/Cell/Textbox/Textbox.js +0 -16
  126. package/es/components/Cell/Textbox/Textbox.js.map +0 -1
  127. package/es/components/Cell/Textbox/Textbox.styles.js +0 -9
  128. package/es/components/Cell/Textbox/Textbox.styles.js.map +0 -1
  129. package/es/components/Cell/Textbox/ui/TextLabel.js.map +0 -1
  130. package/es/components/Cell/Textbox/ui/TextSubtitle.js.map +0 -1
  131. package/es/components/Cell/Textbox/ui/TextTitle.js.map +0 -1
  132. package/styled-components/cjs/components/Cell/Textbox/Textbox.js +0 -19
  133. package/styled-components/es/components/Cell/Textbox/Textbox.js +0 -12
  134. package/types/components/Cell/Textbox/Textbox.d.ts +0 -4
  135. package/types/components/Cell/Textbox/Textbox.d.ts.map +0 -1
  136. package/types/components/Cell/Textbox/Textbox.styles.d.ts +0 -2
  137. package/types/components/Cell/Textbox/Textbox.styles.d.ts.map +0 -1
  138. package/types/components/Cell/Textbox/Textbox.types.d.ts +0 -33
  139. package/types/components/Cell/Textbox/Textbox.types.d.ts.map +0 -1
  140. package/types/components/Cell/Textbox/ui/TextLabel.d.ts +0 -5
  141. package/types/components/Cell/Textbox/ui/TextLabel.d.ts.map +0 -1
  142. package/types/components/Cell/Textbox/ui/TextSubtitle.d.ts +0 -5
  143. package/types/components/Cell/Textbox/ui/TextSubtitle.d.ts.map +0 -1
  144. package/types/components/Cell/Textbox/ui/TextTitle.d.ts +0 -5
  145. package/types/components/Cell/Textbox/ui/TextTitle.d.ts.map +0 -1
  146. /package/styled-components/cjs/components/Cell/{Textbox/Textbox.types.js → CellTextbox/CellTextbox.types.js} +0 -0
  147. /package/styled-components/es/components/Cell/{Textbox/Textbox.types.js → CellTextbox/CellTextbox.types.js} +0 -0
@@ -8,7 +8,7 @@ var Cell_styles = require('./Cell.styles.js');
8
8
  var Cell_tokens = require('./Cell.tokens.js');
9
9
  var base = require('./variations/_view/base.js');
10
10
  var base$1 = require('./variations/_size/base.js');
11
- var Textbox = require('./Textbox/Textbox.js');
11
+ var CellTextbox = require('./CellTextbox/CellTextbox.js');
12
12
 
13
13
  var cellRoot = function cellRoot(Root) {
14
14
  return /*#__PURE__*/React.forwardRef(function (_ref, outerRootRef) {
@@ -16,15 +16,18 @@ var cellRoot = function cellRoot(Root) {
16
16
  view = _ref.view,
17
17
  contentLeft = _ref.contentLeft,
18
18
  contentRight = _ref.contentRight,
19
- _ref$alignLeft = _ref.alignLeft,
20
- alignLeft = _ref$alignLeft === void 0 ? 'center' : _ref$alignLeft,
21
- _ref$alignRight = _ref.alignRight,
22
- alignRight = _ref$alignRight === void 0 ? 'center' : _ref$alignRight,
19
+ _ref$alignContentLeft = _ref.alignContentLeft,
20
+ alignContentLeft = _ref$alignContentLeft === void 0 ? 'center' : _ref$alignContentLeft,
21
+ _ref$alignContentRigh = _ref.alignContentRight,
22
+ alignContentRight = _ref$alignContentRigh === void 0 ? 'center' : _ref$alignContentRigh,
23
23
  children = _ref.children,
24
24
  title = _ref.title,
25
25
  subtitle = _ref.subtitle,
26
26
  label = _ref.label,
27
- stretching = _ref.stretching;
27
+ description = _ref.description,
28
+ content = _ref.content,
29
+ _ref$stretching = _ref.stretching,
30
+ stretching = _ref$stretching === void 0 ? 'filled' : _ref$stretching;
28
31
  var stretchingClass = Cell_tokens.classes["".concat(stretching, "Stretching")];
29
32
  return /*#__PURE__*/React.createElement(Root, {
30
33
  ref: outerRootRef,
@@ -32,13 +35,14 @@ var cellRoot = function cellRoot(Root) {
32
35
  view: view,
33
36
  className: index.cx(stretchingClass, Cell_tokens.classes.cellRoot)
34
37
  }, contentLeft && /*#__PURE__*/React.createElement(Cell_styles.CellLeft, {
35
- align: alignLeft
36
- }, contentLeft), /*#__PURE__*/React.createElement(Cell_styles.CellContentWrapper, null, /*#__PURE__*/React.createElement(Cell_styles.CellContent, null, title || subtitle || label ? /*#__PURE__*/React.createElement(Textbox.Textbox, {
38
+ align: alignContentLeft
39
+ }, contentLeft), /*#__PURE__*/React.createElement(Cell_styles.CellContentWrapper, null, /*#__PURE__*/React.createElement(Cell_styles.CellContent, null, title || description || subtitle || label ? /*#__PURE__*/React.createElement(CellTextbox.CellTextbox, {
37
40
  label: label,
41
+ description: description,
38
42
  title: title,
39
43
  subtitle: subtitle
40
- }) : children && children), contentRight && /*#__PURE__*/React.createElement(Cell_styles.CellRight, {
41
- align: alignRight
44
+ }) : children || content), contentRight && /*#__PURE__*/React.createElement(Cell_styles.CellRight, {
45
+ align: alignContentRight
42
46
  }, contentRight)));
43
47
  });
44
48
  };
@@ -57,8 +61,7 @@ var cellConfig = {
57
61
  },
58
62
  defaults: {
59
63
  view: 'default',
60
- size: 'm',
61
- stretching: 'filled'
64
+ size: 'm'
62
65
  }
63
66
  };
64
67
 
@@ -1 +1 @@
1
- {"version":3,"file":"Cell.js","sources":["../../../src/components/Cell/Cell.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { RootProps } from '../../engines';\nimport { cx } from '../../utils';\n\nimport type { CellProps } from './Cell.types';\nimport { base, CellLeft, CellRight, CellContentWrapper, CellContent } from './Cell.styles';\nimport { classes } from './Cell.tokens';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { Textbox } from './Textbox/Textbox';\n\nexport const cellRoot = (Root: RootProps<HTMLSelectElement, CellProps>) =>\n forwardRef<HTMLSelectElement, CellProps>(\n (\n {\n size,\n view,\n contentLeft,\n contentRight,\n alignLeft = 'center',\n alignRight = 'center',\n children,\n title,\n subtitle,\n label,\n stretching,\n },\n outerRootRef,\n ) => {\n const stretchingClass = classes[`${stretching}Stretching` as keyof typeof classes];\n\n return (\n <Root ref={outerRootRef} size={size} view={view} className={cx(stretchingClass, classes.cellRoot)}>\n {contentLeft && <CellLeft align={alignLeft}>{contentLeft}</CellLeft>}\n <CellContentWrapper>\n <CellContent>\n {title || subtitle || label ? (\n <Textbox label={label} title={title} subtitle={subtitle} />\n ) : (\n children && children\n )}\n </CellContent>\n {contentRight && <CellRight align={alignRight}>{contentRight}</CellRight>}\n </CellContentWrapper>\n </Root>\n );\n },\n );\n\nexport const cellConfig = {\n name: 'Cell',\n tag: 'div',\n layout: cellRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n stretching: 'filled',\n },\n};\n"],"names":["cellRoot","Root","forwardRef","_ref","outerRootRef","size","view","contentLeft","contentRight","_ref$alignLeft","alignLeft","_ref$alignRight","alignRight","children","title","subtitle","label","stretching","stretchingClass","classes","concat","React","createElement","ref","className","cx","CellLeft","align","CellContentWrapper","CellContent","Textbox","CellRight","cellConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;IAYaA,QAAQ,GAAG,SAAXA,QAAQA,CAAIC,IAA6C,EAAA;AAAA,EAAA,oBAClEC,gBAAU,CACN,UAAAC,IAAA,EAcIC,YAAY,EACX;AAAA,IAAA,IAbGC,IAAI,GAAAF,IAAA,CAAJE,IAAI;MACJC,IAAI,GAAAH,IAAA,CAAJG,IAAI;MACJC,WAAW,GAAAJ,IAAA,CAAXI,WAAW;MACXC,YAAY,GAAAL,IAAA,CAAZK,YAAY;MAAAC,cAAA,GAAAN,IAAA,CACZO,SAAS;AAATA,MAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,cAAA;MAAAE,eAAA,GAAAR,IAAA,CACpBS,UAAU;AAAVA,MAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,eAAA;MACrBE,QAAQ,GAAAV,IAAA,CAARU,QAAQ;MACRC,KAAK,GAAAX,IAAA,CAALW,KAAK;MACLC,QAAQ,GAAAZ,IAAA,CAARY,QAAQ;MACRC,KAAK,GAAAb,IAAA,CAALa,KAAK;MACLC,UAAU,GAAAd,IAAA,CAAVc,UAAU,CAAA;AAId,IAAA,IAAMC,eAAe,GAAGC,mBAAO,IAAAC,MAAA,CAAIH,UAAU,EAAqC,YAAA,CAAA,CAAA,CAAA;AAElF,IAAA,oBACII,KAAA,CAAAC,aAAA,CAACrB,IAAI,EAAA;AAACsB,MAAAA,GAAG,EAAEnB,YAAa;AAACC,MAAAA,IAAI,EAAEA,IAAK;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AA;AACJ;;;;;"}
1
+ {"version":3,"file":"Cell.js","sources":["../../../src/components/Cell/Cell.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { RootProps } from '../../engines';\nimport { cx } from '../../utils';\n\nimport type { CellProps } from './Cell.types';\nimport { base, CellLeft, CellRight, CellContentWrapper, CellContent } from './Cell.styles';\nimport { classes } from './Cell.tokens';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { CellTextbox } from './CellTextbox/CellTextbox';\n\nexport const cellRoot = (Root: RootProps<HTMLSelectElement, CellProps>) =>\n forwardRef<HTMLSelectElement, CellProps>(\n (\n {\n size,\n view,\n contentLeft,\n contentRight,\n alignContentLeft = 'center',\n alignContentRight = 'center',\n children,\n title,\n subtitle,\n label,\n description,\n content,\n stretching = 'filled',\n },\n outerRootRef,\n ) => {\n const stretchingClass = classes[`${stretching}Stretching` as keyof typeof classes];\n return (\n <Root ref={outerRootRef} size={size} view={view} className={cx(stretchingClass, classes.cellRoot)}>\n {contentLeft && <CellLeft align={alignContentLeft}>{contentLeft}</CellLeft>}\n <CellContentWrapper>\n <CellContent>\n {title || description || subtitle || label ? (\n <CellTextbox\n label={label}\n description={description}\n title={title}\n subtitle={subtitle}\n />\n ) : (\n children || content\n )}\n </CellContent>\n {contentRight && <CellRight align={alignContentRight}>{contentRight}</CellRight>}\n </CellContentWrapper>\n </Root>\n );\n },\n );\n\nexport const cellConfig = {\n name: 'Cell',\n tag: 'div',\n layout: cellRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["cellRoot","Root","forwardRef","_ref","outerRootRef","size","view","contentLeft","contentRight","_ref$alignContentLeft","alignContentLeft","_ref$alignContentRigh","alignContentRight","children","title","subtitle","label","description","content","_ref$stretching","stretching","stretchingClass","classes","concat","React","createElement","ref","className","cx","CellLeft","align","CellContentWrapper","CellContent","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AAA;AACJ;;;;;"}
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React = require('react');
6
+ var CellTextbox_styles = require('./CellTextbox.styles.js');
7
+ var CellTextLabel = require('./ui/CellTextLabel.js');
8
+ var CellTextTitle = require('./ui/CellTextTitle.js');
9
+ var CellTextSubtitle = require('./ui/CellTextSubtitle.js');
10
+
11
+ var CellTextbox = function CellTextbox(_ref) {
12
+ var label = _ref.label,
13
+ title = _ref.title,
14
+ subtitle = _ref.subtitle,
15
+ description = _ref.description,
16
+ children = _ref.children;
17
+ return /*#__PURE__*/React.createElement(CellTextbox_styles.CellTextboxStyled, null, label || title || description || subtitle ? /*#__PURE__*/React.createElement(React.Fragment, null, label && /*#__PURE__*/React.createElement(CellTextLabel.CellTextboxLabel, null, label), (title || description) && /*#__PURE__*/React.createElement(CellTextTitle.CellTextboxTitle, null, title || description), subtitle && /*#__PURE__*/React.createElement(CellTextSubtitle.CellTextboxSubtitle, null, subtitle)) : children);
18
+ };
19
+
20
+ exports.CellTextbox = CellTextbox;
21
+ //# sourceMappingURL=CellTextbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CellTextbox.js","sources":["../../../../src/components/Cell/CellTextbox/CellTextbox.tsx"],"sourcesContent":["import React, { HTMLAttributes } from 'react';\n\nimport type { CellTextboxProps } from './CellTextbox.types';\nimport { CellTextboxStyled } from './CellTextbox.styles';\nimport { CellTextboxLabel } from './ui/CellTextLabel';\nimport { CellTextboxTitle } from './ui/CellTextTitle';\nimport { CellTextboxSubtitle } from './ui/CellTextSubtitle';\n\nexport const CellTextbox: React.FC<HTMLAttributes<HTMLDivElement> & CellTextboxProps> = ({\n label,\n title,\n subtitle,\n description,\n children,\n}) => {\n return (\n <CellTextboxStyled>\n {label || title || description || subtitle ? (\n <>\n {label && <CellTextboxLabel>{label}</CellTextboxLabel>}\n {(title || description) && <CellTextboxTitle>{title || description}</CellTextboxTitle>}\n {subtitle && <CellTextboxSubtitle>{subtitle}</CellTextboxSubtitle>}\n </>\n ) : (\n children\n )}\n </CellTextboxStyled>\n );\n};\n"],"names":["CellTextbox","_ref","label","title","subtitle","description","children","React","createElement","CellTextboxStyled","Fragment","CellTextboxLabel","CellTextboxTitle","CellTextboxSubtitle"],"mappings":";;;;;;;;;;IAQaA,WAAwE,GAAG,SAA3EA,WAAwEA,CAAAC,IAAA,EAM/E;AAAA,EAAA,IALFC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IACRC,WAAW,GAAAJ,IAAA,CAAXI,WAAW;IACXC,QAAQ,GAAAL,IAAA,CAARK,QAAQ,CAAA;AAER,EAAA,oBACIC,KAAA,CAAAC,aAAA,CAACC,oCAAiB,EAAA,IAAA,EACbP,KAAK,IAAIC,KAAK,IAAIE,WAAW,IAAID,QAAQ,gBACtCG,KAAA,CAAAC,aAAA,CAAAD,KAAA,CAAAG,QAAA,EAAA,IAAA,EACKR,KAAK,iBAAIK,KAAA,CAAAC,aAAA,CAACG,8BAAgB,EAAET,IAAAA,EAAAA,KAAwB,CAAC,EACrD,CAACC,KAAK,IAAIE,WAAW,kBAAKE,KAAA,CAAAC,aAAA,CAACI,8BAAgB,EAAET,IAAAA,EAAAA,KAAK,IAAIE,WAA8B,CAAC,EACrFD,QAAQ,iBAAIG,KAAA,CAAAC,aAAA,CAACK,oCAAmB,EAAA,IAAA,EAAET,QAA8B,CACnE,CAAC,GAEHE,QAEW,CAAC,CAAA;AAE5B;;;;"}
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var styled = require('styled-components');
6
6
  var Cell_tokens = require('../Cell.tokens.js');
7
7
 
8
- var TextboxStyled = /*#__PURE__*/styled.div.withConfig({
9
- componentId: "plasma-new-hope__sc-18k78d7-0"
8
+ var CellTextboxStyled = /*#__PURE__*/styled.div.withConfig({
9
+ componentId: "plasma-new-hope__sc-1t9f5dx-0"
10
10
  })(["display:flex;flex-direction:column;gap:var(", ");"], Cell_tokens.tokens.cellTextboxGap);
11
11
 
12
- exports.TextboxStyled = TextboxStyled;
13
- //# sourceMappingURL=Textbox.styles.js.map
12
+ exports.CellTextboxStyled = CellTextboxStyled;
13
+ //# sourceMappingURL=CellTextbox.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CellTextbox.styles.js","sources":["../../../../src/components/Cell/CellTextbox/CellTextbox.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { tokens } from '../Cell.tokens';\n\nexport const CellTextboxStyled = styled.div`\n display: flex;\n flex-direction: column;\n gap: var(${tokens.cellTextboxGap});\n`;\n"],"names":["CellTextboxStyled","styled","div","withConfig","componentId","tokens","cellTextboxGap"],"mappings":";;;;;;;IAIaA,iBAAiB,gBAAGC,MAAM,CAACC,GAAG,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,+BAAA;AAAA,CAG5BC,CAAAA,CAAAA,CAAAA,6CAAAA,EAAAA,IAAAA,CAAAA,EAAAA,kBAAM,CAACC,cAAc;;;;"}
@@ -7,11 +7,11 @@ var styled = require('styled-components');
7
7
  var Cell_tokens = require('../../Cell.tokens.js');
8
8
 
9
9
  var StyledTextLabel = /*#__PURE__*/styled.div.withConfig({
10
- componentId: "plasma-new-hope__sc-102c6vv-0"
10
+ componentId: "plasma-new-hope__sc-2pgst1-0"
11
11
  })(["color:var(", ");font-size:var(", ");font-weight:var(", ");font-family:var(", ");font-style:var(", ");line-height:var(", ");letter-spacing:var(", ");"], Cell_tokens.tokens.cellLabelColor, Cell_tokens.tokens.cellLabelFontSize, Cell_tokens.tokens.cellLabelFontWeight, Cell_tokens.tokens.cellLabelFontFamily, Cell_tokens.tokens.cellLabelFontStyle, Cell_tokens.tokens.cellLabelLineHeight, Cell_tokens.tokens.cellLabelLetterSpacing);
12
- var TextLabel = function TextLabel(props) {
12
+ var CellTextboxLabel = function CellTextboxLabel(props) {
13
13
  return /*#__PURE__*/React.createElement(StyledTextLabel, null, props.children);
14
14
  };
15
15
 
16
- exports.TextLabel = TextLabel;
17
- //# sourceMappingURL=TextLabel.js.map
16
+ exports.CellTextboxLabel = CellTextboxLabel;
17
+ //# sourceMappingURL=CellTextLabel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CellTextLabel.js","sources":["../../../../../src/components/Cell/CellTextbox/ui/CellTextLabel.tsx"],"sourcesContent":["import React, { HTMLAttributes } from 'react';\nimport styled from 'styled-components';\n\nimport { tokens } from '../../Cell.tokens';\n\nconst StyledTextLabel = styled.div`\n color: var(${tokens.cellLabelColor});\n font-size: var(${tokens.cellLabelFontSize});\n font-weight: var(${tokens.cellLabelFontWeight});\n font-family: var(${tokens.cellLabelFontFamily});\n font-style: var(${tokens.cellLabelFontStyle});\n line-height: var(${tokens.cellLabelLineHeight});\n letter-spacing: var(${tokens.cellLabelLetterSpacing});\n`;\n\ntype TextLabelProps = {};\n\nexport const CellTextboxLabel: React.FC<HTMLAttributes<HTMLDivElement> & TextLabelProps> = (props) => {\n return <StyledTextLabel>{props.children}</StyledTextLabel>;\n};\n"],"names":["StyledTextLabel","styled","div","withConfig","componentId","tokens","cellLabelColor","cellLabelFontSize","cellLabelFontWeight","cellLabelFontFamily","cellLabelFontStyle","cellLabelLineHeight","cellLabelLetterSpacing","CellTextboxLabel","props","React","createElement","children"],"mappings":";;;;;;;;AAKA,IAAMA,eAAe,gBAAGC,MAAM,CAACC,GAAG,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,8BAAA;AAAA,CACjBC,CAAAA,CAAAA,CAAAA,YAAAA,EAAAA,kBAAAA,EAAAA,oBAAAA,EAAAA,oBAAAA,EAAAA,mBAAAA,EAAAA,oBAAAA,EAAAA,uBAAAA,EAAAA,IAAAA,CAAAA,EAAAA,kBAAM,CAACC,cAAc,EACjBD,kBAAM,CAACE,iBAAiB,EACtBF,kBAAM,CAACG,mBAAmB,EAC1BH,kBAAM,CAACI,mBAAmB,EAC3BJ,kBAAM,CAACK,kBAAkB,EACxBL,kBAAM,CAACM,mBAAmB,EACvBN,kBAAM,CAACO,sBAAsB,CACtD,CAAA;IAIYC,gBAA2E,GAAG,SAA9EA,gBAA2EA,CAAIC,KAAK,EAAK;EAClG,oBAAOC,KAAA,CAAAC,aAAA,CAAChB,eAAe,EAAEc,IAAAA,EAAAA,KAAK,CAACG,QAA0B,CAAC,CAAA;AAC9D;;;;"}
@@ -7,11 +7,11 @@ var styled = require('styled-components');
7
7
  var Cell_tokens = require('../../Cell.tokens.js');
8
8
 
9
9
  var StyledTextSubtitle = /*#__PURE__*/styled.div.withConfig({
10
- componentId: "plasma-new-hope__sc-1tsgki4-0"
10
+ componentId: "plasma-new-hope__sc-12wzp7p-0"
11
11
  })(["color:var(", ");font-size:var(", ");font-weight:var(", ");font-family:var(", ");font-style:var(", ");line-height:var(", ");letter-spacing:var(", ");"], Cell_tokens.tokens.cellSubtitleColor, Cell_tokens.tokens.cellSubtitleFontSize, Cell_tokens.tokens.cellSubtitleFontWeight, Cell_tokens.tokens.cellSubtitleFontFamily, Cell_tokens.tokens.cellSubtitleFontStyle, Cell_tokens.tokens.cellSubtitleLineHeight, Cell_tokens.tokens.cellSubtitleLetterSpacing);
12
- var TextSubtitle = function TextSubtitle(props) {
12
+ var CellTextboxSubtitle = function CellTextboxSubtitle(props) {
13
13
  return /*#__PURE__*/React.createElement(StyledTextSubtitle, null, props.children);
14
14
  };
15
15
 
16
- exports.TextSubtitle = TextSubtitle;
17
- //# sourceMappingURL=TextSubtitle.js.map
16
+ exports.CellTextboxSubtitle = CellTextboxSubtitle;
17
+ //# sourceMappingURL=CellTextSubtitle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CellTextSubtitle.js","sources":["../../../../../src/components/Cell/CellTextbox/ui/CellTextSubtitle.tsx"],"sourcesContent":["import React, { HTMLAttributes } from 'react';\nimport styled from 'styled-components';\n\nimport { tokens } from '../../Cell.tokens';\n\nconst StyledTextSubtitle = styled.div`\n color: var(${tokens.cellSubtitleColor});\n font-size: var(${tokens.cellSubtitleFontSize});\n font-weight: var(${tokens.cellSubtitleFontWeight});\n font-family: var(${tokens.cellSubtitleFontFamily});\n font-style: var(${tokens.cellSubtitleFontStyle});\n line-height: var(${tokens.cellSubtitleLineHeight});\n letter-spacing: var(${tokens.cellSubtitleLetterSpacing});\n`;\n\ntype TextSubtitleProps = {};\n\nexport const CellTextboxSubtitle: React.FC<HTMLAttributes<HTMLDivElement> & TextSubtitleProps> = (props) => {\n return <StyledTextSubtitle>{props.children}</StyledTextSubtitle>;\n};\n"],"names":["StyledTextSubtitle","styled","div","withConfig","componentId","tokens","cellSubtitleColor","cellSubtitleFontSize","cellSubtitleFontWeight","cellSubtitleFontFamily","cellSubtitleFontStyle","cellSubtitleLineHeight","cellSubtitleLetterSpacing","CellTextboxSubtitle","props","React","createElement","children"],"mappings":";;;;;;;;AAKA,IAAMA,kBAAkB,gBAAGC,MAAM,CAACC,GAAG,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,+BAAA;AAAA,CACpBC,CAAAA,CAAAA,CAAAA,YAAAA,EAAAA,kBAAAA,EAAAA,oBAAAA,EAAAA,oBAAAA,EAAAA,mBAAAA,EAAAA,oBAAAA,EAAAA,uBAAAA,EAAAA,IAAAA,CAAAA,EAAAA,kBAAM,CAACC,iBAAiB,EACpBD,kBAAM,CAACE,oBAAoB,EACzBF,kBAAM,CAACG,sBAAsB,EAC7BH,kBAAM,CAACI,sBAAsB,EAC9BJ,kBAAM,CAACK,qBAAqB,EAC3BL,kBAAM,CAACM,sBAAsB,EAC1BN,kBAAM,CAACO,yBAAyB,CACzD,CAAA;IAIYC,mBAAiF,GAAG,SAApFA,mBAAiFA,CAAIC,KAAK,EAAK;EACxG,oBAAOC,KAAA,CAAAC,aAAA,CAAChB,kBAAkB,EAAEc,IAAAA,EAAAA,KAAK,CAACG,QAA6B,CAAC,CAAA;AACpE;;;;"}
@@ -7,11 +7,11 @@ var styled = require('styled-components');
7
7
  var Cell_tokens = require('../../Cell.tokens.js');
8
8
 
9
9
  var StyledTextTitle = /*#__PURE__*/styled.div.withConfig({
10
- componentId: "plasma-new-hope__sc-flfrmq-0"
10
+ componentId: "plasma-new-hope__sc-xt8zbj-0"
11
11
  })(["color:var(", ");font-size:var(", ");font-weight:var(", ");font-family:var(", ");font-style:var(", ");line-height:var(", ");letter-spacing:var(", ");"], Cell_tokens.tokens.cellTitleColor, Cell_tokens.tokens.cellTitleFontSize, Cell_tokens.tokens.cellTitleFontWeight, Cell_tokens.tokens.cellTitleFontFamily, Cell_tokens.tokens.cellTitleFontStyle, Cell_tokens.tokens.cellTitleLineHeight, Cell_tokens.tokens.cellTitleLetterSpacing);
12
- var TextTitle = function TextTitle(props) {
12
+ var CellTextboxTitle = function CellTextboxTitle(props) {
13
13
  return /*#__PURE__*/React.createElement(StyledTextTitle, null, props.children);
14
14
  };
15
15
 
16
- exports.TextTitle = TextTitle;
17
- //# sourceMappingURL=TextTitle.js.map
16
+ exports.CellTextboxTitle = CellTextboxTitle;
17
+ //# sourceMappingURL=CellTextTitle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CellTextTitle.js","sources":["../../../../../src/components/Cell/CellTextbox/ui/CellTextTitle.tsx"],"sourcesContent":["import React, { HTMLAttributes } from 'react';\nimport styled from 'styled-components';\n\nimport { tokens } from '../../Cell.tokens';\n\nconst StyledTextTitle = styled.div`\n color: var(${tokens.cellTitleColor});\n font-size: var(${tokens.cellTitleFontSize});\n font-weight: var(${tokens.cellTitleFontWeight});\n font-family: var(${tokens.cellTitleFontFamily});\n font-style: var(${tokens.cellTitleFontStyle});\n line-height: var(${tokens.cellTitleLineHeight});\n letter-spacing: var(${tokens.cellTitleLetterSpacing});\n`;\n\ntype TextTitleProps = {};\n\nexport const CellTextboxTitle: React.FC<HTMLAttributes<HTMLDivElement> & TextTitleProps> = (props) => {\n return <StyledTextTitle>{props.children}</StyledTextTitle>;\n};\n"],"names":["StyledTextTitle","styled","div","withConfig","componentId","tokens","cellTitleColor","cellTitleFontSize","cellTitleFontWeight","cellTitleFontFamily","cellTitleFontStyle","cellTitleLineHeight","cellTitleLetterSpacing","CellTextboxTitle","props","React","createElement","children"],"mappings":";;;;;;;;AAKA,IAAMA,eAAe,gBAAGC,MAAM,CAACC,GAAG,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,8BAAA;AAAA,CACjBC,CAAAA,CAAAA,CAAAA,YAAAA,EAAAA,kBAAAA,EAAAA,oBAAAA,EAAAA,oBAAAA,EAAAA,mBAAAA,EAAAA,oBAAAA,EAAAA,uBAAAA,EAAAA,IAAAA,CAAAA,EAAAA,kBAAM,CAACC,cAAc,EACjBD,kBAAM,CAACE,iBAAiB,EACtBF,kBAAM,CAACG,mBAAmB,EAC1BH,kBAAM,CAACI,mBAAmB,EAC3BJ,kBAAM,CAACK,kBAAkB,EACxBL,kBAAM,CAACM,mBAAmB,EACvBN,kBAAM,CAACO,sBAAsB,CACtD,CAAA;IAIYC,gBAA2E,GAAG,SAA9EA,gBAA2EA,CAAIC,KAAK,EAAK;EAClG,oBAAOC,KAAA,CAAAC,aAAA,CAAChB,eAAe,EAAEc,IAAAA,EAAAA,KAAK,CAACG,QAA0B,CAAC,CAAA;AAC9D;;;;"}
@@ -65,6 +65,7 @@ var dropdownRoot = function dropdownRoot(Root) {
65
65
  placement: index.getPlacements(placement),
66
66
  trigger: trigger,
67
67
  closeOnOverlayClick: closeOnOverlayClick,
68
+ closeOnBeyondTargetHover: false,
68
69
  closeOnEsc: closeOnEsc,
69
70
  isFocusTrapped: isFocusTrapped,
70
71
  frame: frame
@@ -89,7 +90,7 @@ var dropdownConfig = {
89
90
  }
90
91
  },
91
92
  defaults: {
92
- view: 'primary',
93
+ view: 'default',
93
94
  size: 'm'
94
95
  }
95
96
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.js","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["import React, { forwardRef, useRef } from 'react';\nimport { useFocusTrap, useForkRef, useUniqId } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../engines';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { StyledDropdown, StyledPopover } from './Dropdown.styles';\nimport { getPlacements } from './utils';\nimport type { DropdownProps } from './Dropdown.types';\n\n/**\n * Выпадающий список без внешнего контроля видимости.\n */\nexport const dropdownRoot = (Root: RootProps<HTMLDivElement, DropdownProps>) =>\n forwardRef<HTMLDivElement, DropdownProps>(\n (\n {\n id,\n target,\n children,\n hasArrow,\n role,\n view,\n size,\n frame,\n onToggle,\n isFocusTrapped = true,\n isOpen = false,\n placement = 'auto',\n trigger = 'click',\n offset = [0, 6],\n preventOverflow = false,\n closeOnOverlayClick = false,\n closeOnEsc = false,\n ...rest\n },\n outerRootRef,\n ) => {\n const uniqId = useUniqId();\n const innerId = id || uniqId;\n\n const rootRef = useRef<HTMLDivElement | null>(null);\n const dropdownRef = useRef<HTMLDivElement | null>(null);\n const handleRef = useForkRef<HTMLDivElement>(rootRef, outerRootRef);\n\n const trapRef = useFocusTrap(isOpen && isFocusTrapped);\n\n const dropdownForkRef = useForkRef<HTMLDivElement>(dropdownRef, trapRef);\n\n return (\n <StyledPopover\n role={role}\n isOpen={isOpen}\n usePortal={false}\n onToggle={(is, event) => onToggle?.(is, event)}\n id={innerId}\n ref={dropdownForkRef}\n target={target}\n offset={offset}\n preventOverflow={preventOverflow}\n hasArrow={hasArrow}\n placement={getPlacements(placement)}\n trigger={trigger}\n closeOnOverlayClick={closeOnOverlayClick}\n closeOnEsc={closeOnEsc}\n isFocusTrapped={isFocusTrapped}\n frame={frame}\n >\n <Root ref={handleRef} view={view} size={size} {...rest}>\n <StyledDropdown>{children}</StyledDropdown>\n </Root>\n </StyledPopover>\n );\n },\n );\n\nexport const dropdownConfig = {\n name: 'Dropdown',\n tag: 'div',\n layout: dropdownRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'primary',\n size: 'm',\n },\n};\n"],"names":["dropdownRoot","Root","forwardRef","_ref","outerRootRef","id","target","children","hasArrow","role","view","size","frame","onToggle","_ref$isFocusTrapped","isFocusTrapped","_ref$isOpen","isOpen","_ref$placement","placement","_ref$trigger","trigger","_ref$offset","offset","_ref$preventOverflow","preventOverflow","_ref$closeOnOverlayCl","closeOnOverlayClick","_ref$closeOnEsc","closeOnEsc","rest","_objectWithoutProperties","_excluded","uniqId","useUniqId","innerId","rootRef","useRef","dropdownRef","handleRef","useForkRef","trapRef","useFocusTrap","dropdownForkRef","React","createElement","StyledPopover","usePortal","is","event","ref","getPlacements","_extends","StyledDropdown","dropdownConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;AAWA;AACA;AACA;IACaA,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAA8C,EAAA;AAAA,EAAA,oBACvEC,gBAAU,CACN,UAAAC,IAAA,EAqBIC,YAAY,EACX;AAAA,IAAA,IApBGC,EAAE,GAAAF,IAAA,CAAFE,EAAE;MACFC,MAAM,GAAAH,IAAA,CAANG,MAAM;MACNC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;MACRC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;MACRC,IAAI,GAAAN,IAAA,CAAJM,IAAI;MACJC,IAAI,GAAAP,IAAA,CAAJO,IAAI;MACJC,IAAI,GAAAR,IAAA,CAAJQ,IAAI;MACJC,KAAK,GAAAT,IAAA,CAALS,KAAK;MACLC,SAAQ,GAAAV,IAAA,CAARU,QAAQ;MAAAC,mBAAA,GAAAX,IAAA,CACRY,cAAc;AAAdA,MAAAA,cAAc,GAAAD,mBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,mBAAA;MAAAE,WAAA,GAAAb,IAAA,CACrBc,MAAM;AAANA,MAAAA,MAAM,GAAAD,WAAA,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,CAAA;AAAA,EAAA;AAEE,IAAM+C,cAAc,GAAG;AAC1BC,EAAAA,IAAI,EAAE,UAAU;AAChBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEzD,YAAY;AACpB0D,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACRjD,IAAAA,IAAI,EAAE;AACFkD,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDlD,IAAAA,IAAI,EAAE;AACFiD,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNrD,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
1
+ {"version":3,"file":"Dropdown.js","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["import React, { forwardRef, useRef } from 'react';\nimport { useFocusTrap, useForkRef, useUniqId } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../engines';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { StyledDropdown, StyledPopover } from './Dropdown.styles';\nimport { getPlacements } from './utils';\nimport type { DropdownProps } from './Dropdown.types';\n\n/**\n * Выпадающий список без внешнего контроля видимости.\n */\nexport const dropdownRoot = (Root: RootProps<HTMLDivElement, DropdownProps>) =>\n forwardRef<HTMLDivElement, DropdownProps>(\n (\n {\n id,\n target,\n children,\n hasArrow,\n role,\n view,\n size,\n frame,\n onToggle,\n isFocusTrapped = true,\n isOpen = false,\n placement = 'auto',\n trigger = 'click',\n offset = [0, 6],\n preventOverflow = false,\n closeOnOverlayClick = false,\n closeOnEsc = false,\n ...rest\n },\n outerRootRef,\n ) => {\n const uniqId = useUniqId();\n const innerId = id || uniqId;\n\n const rootRef = useRef<HTMLDivElement | null>(null);\n const dropdownRef = useRef<HTMLDivElement | null>(null);\n const handleRef = useForkRef<HTMLDivElement>(rootRef, outerRootRef);\n\n const trapRef = useFocusTrap(isOpen && isFocusTrapped);\n\n const dropdownForkRef = useForkRef<HTMLDivElement>(dropdownRef, trapRef);\n\n return (\n <StyledPopover\n role={role}\n isOpen={isOpen}\n usePortal={false}\n onToggle={(is, event) => onToggle?.(is, event)}\n id={innerId}\n ref={dropdownForkRef}\n target={target}\n offset={offset}\n preventOverflow={preventOverflow}\n hasArrow={hasArrow}\n placement={getPlacements(placement)}\n trigger={trigger}\n closeOnOverlayClick={closeOnOverlayClick}\n closeOnBeyondTargetHover={false}\n closeOnEsc={closeOnEsc}\n isFocusTrapped={isFocusTrapped}\n frame={frame}\n >\n <Root ref={handleRef} view={view} size={size} {...rest}>\n <StyledDropdown>{children}</StyledDropdown>\n </Root>\n </StyledPopover>\n );\n },\n );\n\nexport const dropdownConfig = {\n name: 'Dropdown',\n tag: 'div',\n layout: dropdownRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["dropdownRoot","Root","forwardRef","_ref","outerRootRef","id","target","children","hasArrow","role","view","size","frame","onToggle","_ref$isFocusTrapped","isFocusTrapped","_ref$isOpen","isOpen","_ref$placement","placement","_ref$trigger","trigger","_ref$offset","offset","_ref$preventOverflow","preventOverflow","_ref$closeOnOverlayCl","closeOnOverlayClick","_ref$closeOnEsc","closeOnEsc","rest","_objectWithoutProperties","_excluded","uniqId","useUniqId","innerId","rootRef","useRef","dropdownRef","handleRef","useForkRef","trapRef","useFocusTrap","dropdownForkRef","React","createElement","StyledPopover","usePortal","is","event","ref","getPlacements","closeOnBeyondTargetHover","_extends","StyledDropdown","dropdownConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;AAWA;AACA;AACA;IACaA,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAA8C,EAAA;AAAA,EAAA,oBACvEC,gBAAU,CACN,UAAAC,IAAA,EAqBIC,YA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,EAAEA,QAAS;AACnBW,MAAAA,SAAS,EAAEgC,mBAAa,CAAChC,SAAS,CAAE;AACpCE,MAAAA,OAAO,EAAEA,OAAQ;AACjBM,MAAAA,mBAAmB,EAAEA,mBAAoB;AACzCyB,MAAAA,wBAAwB,EAAE,KAAM;AAChCvB,MAAAA,UAAU,EAAEA,UAAW;AACvBd,MAAAA,cAAc,EAAEA,cAAe;AAC/BH,MAAAA,KAAK,EAAEA,KAAAA;AAAM,KAAA,eAEbgC,KAAA,CAAAC,aAAA,CAAC5C,IAAI,EAAAoD,iCAAA,CAAA;AAACH,MAAAA,GAAG,EAAEX,SAAU;AAAC7B,MAAAA,IAAI,EAAEA,IAAK;AAACC,MAAAA,IAAI,EAAEA,IAAAA;KAAUmB,EAAAA,IAAI,CAClDc,eAAAA,KAAA,CAAAC,aAAA,CAACS,8BAAc,EAAE/C,IAAAA,EAAAA,QAAyB,CACxC,CACK,CAAC,CAAA;AAExB,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAMgD,cAAc,GAAG;AAC1BC,EAAAA,IAAI,EAAE,UAAU;AAChBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE1D,YAAY;AACpB2D,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACRlD,IAAAA,IAAI,EAAE;AACFmD,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDnD,IAAAA,IAAI,EAAE;AACFkD,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNtD,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
@@ -12,7 +12,7 @@ var base = require('./variations/_view/base.js');
12
12
  var Popover_styles = require('./Popover.styles.js');
13
13
  var Popover_tokens = require('./Popover.tokens.js');
14
14
 
15
- var _excluded = ["target", "children", "isOpen", "trigger", "hasArrow", "frame", "className", "placement", "offset", "zIndex", "isFocusTrapped", "closeOnOverlayClick", "closeOnEsc", "preventOverflow", "usePortal", "view", "onToggle"];
15
+ var _excluded = ["target", "children", "isOpen", "trigger", "hasArrow", "frame", "className", "placement", "offset", "zIndex", "isFocusTrapped", "closeOnEsc", "preventOverflow", "usePortal", "view", "onToggle"];
16
16
  var ESCAPE_KEYCODE = 27;
17
17
  var POPOVER_PORTAL_ID = 'plasma-popover-root';
18
18
 
@@ -21,33 +21,41 @@ var POPOVER_PORTAL_ID = 'plasma-popover-root';
21
21
  * и вызова по клику либо ховеру.
22
22
  */
23
23
  var popoverRoot = function popoverRoot(Root) {
24
- return /*#__PURE__*/React.forwardRef(function (_ref, outerRootRef) {
25
- var target = _ref.target,
26
- children = _ref.children,
27
- isOpen = _ref.isOpen,
28
- trigger = _ref.trigger,
29
- hasArrow = _ref.hasArrow,
30
- _ref$frame = _ref.frame,
31
- frame = _ref$frame === void 0 ? 'document' : _ref$frame,
32
- className = _ref.className,
33
- _ref$placement = _ref.placement,
34
- placement = _ref$placement === void 0 ? 'auto' : _ref$placement,
35
- _ref$offset = _ref.offset,
36
- offset = _ref$offset === void 0 ? [0, 0] : _ref$offset,
37
- zIndex = _ref.zIndex,
38
- _ref$isFocusTrapped = _ref.isFocusTrapped,
39
- isFocusTrapped = _ref$isFocusTrapped === void 0 ? true : _ref$isFocusTrapped,
40
- _ref$closeOnOverlayCl = _ref.closeOnOverlayClick,
41
- closeOnOverlayClick = _ref$closeOnOverlayCl === void 0 ? true : _ref$closeOnOverlayCl,
42
- _ref$closeOnEsc = _ref.closeOnEsc,
43
- closeOnEsc = _ref$closeOnEsc === void 0 ? true : _ref$closeOnEsc,
44
- _ref$preventOverflow = _ref.preventOverflow,
45
- preventOverflow = _ref$preventOverflow === void 0 ? true : _ref$preventOverflow,
46
- _ref$usePortal = _ref.usePortal,
47
- usePortal = _ref$usePortal === void 0 ? false : _ref$usePortal,
48
- view = _ref.view,
49
- onToggle = _ref.onToggle,
50
- rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
24
+ return /*#__PURE__*/React.forwardRef(function (props, outerRootRef) {
25
+ var _placement$;
26
+ var target = props.target,
27
+ children = props.children,
28
+ isOpen = props.isOpen,
29
+ _props$trigger = props.trigger,
30
+ trigger = _props$trigger === void 0 ? 'click' : _props$trigger,
31
+ hasArrow = props.hasArrow,
32
+ _props$frame = props.frame,
33
+ frame = _props$frame === void 0 ? 'document' : _props$frame,
34
+ className = props.className,
35
+ _props$placement = props.placement,
36
+ placement = _props$placement === void 0 ? 'auto' : _props$placement,
37
+ _props$offset = props.offset,
38
+ offset = _props$offset === void 0 ? [0, 0] : _props$offset,
39
+ zIndex = props.zIndex,
40
+ _props$isFocusTrapped = props.isFocusTrapped,
41
+ isFocusTrapped = _props$isFocusTrapped === void 0 ? true : _props$isFocusTrapped,
42
+ _props$closeOnEsc = props.closeOnEsc,
43
+ closeOnEsc = _props$closeOnEsc === void 0 ? true : _props$closeOnEsc,
44
+ _props$preventOverflo = props.preventOverflow,
45
+ preventOverflow = _props$preventOverflo === void 0 ? true : _props$preventOverflo,
46
+ _props$usePortal = props.usePortal,
47
+ usePortal = _props$usePortal === void 0 ? false : _props$usePortal,
48
+ view = props.view,
49
+ onToggle = props.onToggle,
50
+ rest = _rollupPluginBabelHelpers.objectWithoutProperties(props, _excluded);
51
+ var closeOnOverlayClick = true;
52
+ var closeOnBeyondTargetHover = true;
53
+ if (props.trigger === 'click' && props.closeOnOverlayClick === false) {
54
+ closeOnOverlayClick = false;
55
+ }
56
+ if (props.trigger === 'hover' && props.closeOnBeyondTargetHover === false) {
57
+ closeOnBeyondTargetHover = false;
58
+ }
51
59
  var rootRef = React.useRef(null);
52
60
  var popoverRef = React.useRef(null);
53
61
  var handleRef = plasmaCore.useForkRef(rootRef, outerRootRef);
@@ -68,7 +76,9 @@ var popoverRoot = function popoverRoot(Root) {
68
76
  opacity: isOpen ? 1 : 0
69
77
  };
70
78
  var _usePopper = reactPopper.usePopper(rootRef.current, popoverRef.current, {
71
- placement: isAutoArray ? 'auto' : placement,
79
+ // TODO: #1121
80
+ // eslint-disable-next-line no-nested-ternary
81
+ placement: isAutoArray ? (_placement$ = placement[0]) !== null && _placement$ !== void 0 && _placement$.endsWith('start') ? 'auto-start' : 'auto' : placement,
72
82
  modifiers: [{
73
83
  name: 'preventOverflow',
74
84
  options: {
@@ -204,10 +214,15 @@ var popoverRoot = function popoverRoot(Root) {
204
214
  }, target), children && portalRef.current && /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React.createElement(Root, _rollupPluginBabelHelpers.extends({
205
215
  view: view,
206
216
  className: className
207
- }, rest), /*#__PURE__*/React.createElement(Popover_styles.StyledPopover, _rollupPluginBabelHelpers.extends({}, attributes.popper, {
217
+ }, rest, {
218
+ onMouseEnter: closeOnBeyondTargetHover ? undefined : onMouseEnter,
219
+ onMouseLeave: closeOnBeyondTargetHover ? undefined : onMouseEnter
220
+ }), /*#__PURE__*/React.createElement(Popover_styles.StyledPopover, _rollupPluginBabelHelpers.extends({}, attributes.popper, {
208
221
  className: Popover_tokens.classes.root,
209
222
  ref: popoverForkRef,
210
- style: _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, styles.popper), initialStyles),
223
+ style: _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, styles.popper), {
224
+ display: isOpen ? 'block' : 'none'
225
+ }), initialStyles),
211
226
  zIndex: zIndex
212
227
  }), hasArrow && /*#__PURE__*/React.createElement(Popover_styles.StyledArrow, _rollupPluginBabelHelpers.extends({
213
228
  className: Popover_tokens.classes.arrow,
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.js","sources":["../../../src/components/Popover/Popover.tsx"],"sourcesContent":["import React, { useRef, useCallback, useEffect, useState, forwardRef } from 'react';\nimport type { CSSProperties } from 'react';\nimport ReactDOM from 'react-dom';\nimport { usePopper } from 'react-popper';\nimport { useFocusTrap, useForkRef } from '@salutejs/plasma-core';\n\nimport type { RootProps } from '../../engines/types';\nimport { cx } from '../../utils';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport type { PopoverPlacement, PopoverProps } from './Popover.types';\nimport { StyledArrow, StyledPopover, StyledRoot, StyledWrapper } from './Popover.styles';\nimport { classes } from './Popover.tokens';\n\nexport const ESCAPE_KEYCODE = 27;\nexport const POPOVER_PORTAL_ID = 'plasma-popover-root';\n\n/**\n * Всплывающее окно с возможностью позиционирования\n * и вызова по клику либо ховеру.\n */\nexport const popoverRoot = (Root: RootProps<HTMLDivElement, PopoverProps>) =>\n forwardRef<HTMLDivElement, PopoverProps>(\n (\n {\n target,\n children,\n isOpen,\n trigger,\n hasArrow,\n frame = 'document',\n className,\n placement = 'auto',\n offset = [0, 0],\n zIndex,\n isFocusTrapped = true,\n closeOnOverlayClick = true,\n closeOnEsc = true,\n preventOverflow = true,\n usePortal = false,\n view,\n onToggle,\n ...rest\n },\n outerRootRef,\n ) => {\n const rootRef = useRef<HTMLDivElement | null>(null);\n const popoverRef = useRef<HTMLDivElement | null>(null);\n const handleRef = useForkRef<HTMLDivElement>(rootRef, outerRootRef);\n const portalRef = useRef<HTMLElement | null>(null);\n\n const trapRef = useFocusTrap(isOpen && isFocusTrapped);\n\n const popoverForkRef = useForkRef<HTMLDivElement>(popoverRef, trapRef);\n\n const [arrowElement, setArrowElement] = useState<HTMLSpanElement | null>(null);\n\n const [, forceRender] = useState(false);\n\n const isAutoArray = Array.isArray(placement);\n const isAuto = isAutoArray || (placement as PopoverPlacement).startsWith('auto');\n\n const initialStyles = {\n visibility: isOpen ? 'visible' : 'hidden',\n opacity: isOpen ? 1 : 0,\n } as CSSProperties;\n\n const { styles, attributes, forceUpdate } = usePopper(rootRef.current, popoverRef.current, {\n placement: isAutoArray ? 'auto' : (placement as PopoverPlacement),\n modifiers: [\n {\n name: 'preventOverflow',\n options: {\n mainAxis: preventOverflow,\n },\n },\n { name: 'offset', options: { offset: [offset[0], offset[1]] } },\n {\n name: 'flip',\n enabled: isAuto,\n options: {\n allowedAutoPlacements: isAutoArray ? (placement as PopoverPlacement[]) : [],\n },\n },\n {\n name: 'arrow',\n options: {\n element: arrowElement,\n },\n },\n ],\n });\n\n const onEscape = useCallback(\n (event: KeyboardEvent) => {\n if (isOpen && closeOnEsc && event.keyCode === ESCAPE_KEYCODE) {\n onToggle?.(false, event);\n }\n },\n [closeOnEsc, isOpen, onToggle],\n );\n\n const onDocumentClick = useCallback(\n (event: MouseEvent) => {\n if (isOpen && closeOnOverlayClick && onToggle) {\n const targetIsRoot = event.target === rootRef.current;\n const rootHasTarget = rootRef.current?.contains(event.target as Element);\n\n if (!targetIsRoot && !rootHasTarget) {\n onToggle(false, event);\n }\n }\n },\n [closeOnOverlayClick, isOpen, onToggle],\n );\n\n const onClick = useCallback<React.MouseEventHandler>(\n (event) => {\n if (trigger === 'click') {\n const targetIsPopover = event.target === popoverRef.current;\n const rootHasTarget = popoverRef.current?.contains(event.target as Element);\n\n if (!targetIsPopover && !rootHasTarget) {\n onToggle?.(!isOpen, event);\n }\n }\n },\n [trigger, isOpen, onToggle],\n );\n\n const onMouseEnter = useCallback<React.MouseEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(true, event);\n }\n },\n [trigger, onToggle],\n );\n\n const onMouseLeave = useCallback<React.MouseEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(false, event);\n }\n },\n [trigger, onToggle],\n );\n\n const onFocus = useCallback<React.FocusEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(true, event);\n }\n },\n [trigger, onToggle],\n );\n\n const onBlur = useCallback<React.FocusEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(false, event);\n }\n },\n [trigger, onToggle],\n );\n\n useEffect(() => {\n document.addEventListener('click', onDocumentClick);\n return () => document.removeEventListener('click', onDocumentClick);\n }, [closeOnOverlayClick, isOpen, onToggle]);\n\n useEffect(() => {\n window.addEventListener('keydown', onEscape);\n return () => window.removeEventListener('keydown', onEscape);\n }, [closeOnEsc, isOpen, onToggle]);\n\n useEffect(() => {\n let portal = document.getElementById(POPOVER_PORTAL_ID);\n\n if (typeof frame !== 'string' && frame && frame.current) {\n portal = frame.current;\n }\n\n if (!usePortal) {\n portal = rootRef.current;\n }\n\n if (!portal) {\n portal = document.createElement('div');\n portal.setAttribute('id', POPOVER_PORTAL_ID);\n\n if (typeof frame === 'string' && frame !== 'document') {\n document.getElementById(frame)?.appendChild(portal);\n } else {\n document.body.appendChild(portal);\n }\n }\n\n portalRef.current = portal;\n\n /**\n * Изменение стейта нужно для того, чтобы Popup\n * отобразился после записи DOM элемента в portalRef.current\n */\n forceRender(true);\n }, []);\n\n useEffect(() => {\n if (!isOpen || !forceUpdate) {\n return;\n }\n\n /*\n * INFO: Метод forceUpdate содержит в себе flushSync и приводит\n * к повторному рендеру компонента, который уже находится в процессе рендера.\n * Данный хак, нужен для того, чтобы это поведение избежать и перенаправить\n * вызов метода в очередь микрозадач.\n */\n Promise.resolve().then(forceUpdate);\n }, [isOpen, children, forceUpdate]);\n\n return (\n <StyledWrapper className={classes.wrapper}>\n <StyledRoot\n ref={handleRef}\n onClick={onClick}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n onFocus={onFocus}\n onBlur={onBlur}\n className={cx(className, classes.target)}\n >\n {target}\n </StyledRoot>\n {children &&\n portalRef.current &&\n ReactDOM.createPortal(\n <Root view={view} className={className} {...rest}>\n <StyledPopover\n {...attributes.popper}\n className={classes.root}\n ref={popoverForkRef}\n style={{ ...styles.popper, ...initialStyles }}\n zIndex={zIndex}\n >\n {hasArrow && (\n <StyledArrow\n className={classes.arrow}\n ref={setArrowElement}\n style={styles.arrow}\n {...attributes.arrow}\n />\n )}\n {children}\n </StyledPopover>\n </Root>,\n portalRef.current,\n )}\n </StyledWrapper>\n );\n },\n );\n\nexport const popoverConfig = {\n name: 'Popover',\n tag: 'div',\n layout: popoverRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n },\n defaults: {\n view: 'default',\n },\n};\n"],"names":["ESCAPE_KEYCODE","POPOVER_PORTAL_ID","popoverRoot","Root","forwardRef","_ref","outerRootRef","target","children","isOpen","trigger","hasArrow","_ref$frame","frame","className","_ref$placement","placement","_ref$offset","offset","zIndex","_ref$isFocusTrapped","isFocusTrapped","_ref$closeOnOverlayCl","closeOnOverlayClick","_ref$closeOnEsc","closeOnEsc","_ref$preventOverflow","preventOverflow","_ref$usePortal","usePortal","view","onToggle","rest","_objectWithoutProperties","_excluded","rootRef","useRef","popoverRef","handleRef","useForkRef","portalRef","trapRef","useFocusTrap","popoverForkRef","_useState","useState","_useState2","_slicedToArray","arrowElement","setArrowElement","_useState3","_useState4","forceRender","isAutoArray","Array","isArray","isAuto","startsWith","initialStyles","visibility","opacity","_usePopper","usePopper","current","modifiers","name","options","mainAxis","enabled","allowedAutoPlacements","element","styles","attributes","forceUpdate","onEscape","useCallback","event","keyCode","onDocumentClick","_rootRef$current","targetIsRoot","rootHasTarget","contains","onClick","_popoverRef$current","targetIsPopover","onMouseEnter","onMouseLeave","onFocus","onBlur","useEffect","document","addEventListener","removeEventListener","window","portal","getElementById","createElement","setAttribute","_document$getElementB","appendChild","body","Promise","resolve","then","React","StyledWrapper","classes","wrapper","StyledRoot","ref","cx","ReactDOM","createPortal","_extends","StyledPopover","popper","root","style","_objectSpread","StyledArrow","arrow","popoverConfig","tag","layout","base","variations","css","viewCSS","defaults"],"mappings":";;;;;;;;;;;;;;;AAcO,IAAMA,cAAc,GAAG,GAAE;AACzB,IAAMC,iBAAiB,GAAG,sBAAqB;;AAEtD;AACA;AACA;AACA;IACaC,WAAW,GAAG,SAAdA,WAAWA,CAAIC,IAA6C,EAAA;AAAA,EAAA,oBACrEC,gBAAU,CACN,UAAAC,IAAA,EAqBIC,YAAY,EACX;AAAA,IAAA,IApBGC,MAAM,GAAAF,IAAA,CAANE,MAAM;MACNC,QAAQ,GAAAH,IAAA,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IAAI,EAAE,SAAS;AACf0D,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE1H,WAAW;AACnB2H,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACRhG,IAAAA,IAAI,EAAE;AACFiG,MAAAA,GAAG,EAAEC,SAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNnG,IAAAA,IAAI,EAAE,SAAA;AACV,GAAA;AACJ;;;;;;;"}
1
+ {"version":3,"file":"Popover.js","sources":["../../../src/components/Popover/Popover.tsx"],"sourcesContent":["import React, { useRef, useCallback, useEffect, useState, forwardRef } from 'react';\nimport type { CSSProperties } from 'react';\nimport ReactDOM from 'react-dom';\nimport { usePopper } from 'react-popper';\nimport { useFocusTrap, useForkRef } from '@salutejs/plasma-core';\n\nimport type { RootProps } from '../../engines/types';\nimport { cx } from '../../utils';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport type { PopoverPlacement, PopoverProps } from './Popover.types';\nimport { StyledArrow, StyledPopover, StyledRoot, StyledWrapper } from './Popover.styles';\nimport { classes } from './Popover.tokens';\n\nexport const ESCAPE_KEYCODE = 27;\nexport const POPOVER_PORTAL_ID = 'plasma-popover-root';\n\n/**\n * Всплывающее окно с возможностью позиционирования\n * и вызова по клику либо ховеру.\n */\nexport const popoverRoot = (Root: RootProps<HTMLDivElement, PopoverProps>) =>\n forwardRef<HTMLDivElement, PopoverProps>((props, outerRootRef) => {\n const {\n target,\n children,\n isOpen,\n trigger = 'click',\n hasArrow,\n frame = 'document',\n className,\n placement = 'auto',\n offset = [0, 0],\n zIndex,\n isFocusTrapped = true,\n closeOnEsc = true,\n preventOverflow = true,\n usePortal = false,\n view,\n onToggle,\n ...rest\n } = props;\n\n let closeOnOverlayClick = true;\n let closeOnBeyondTargetHover = true;\n\n if (props.trigger === 'click' && props.closeOnOverlayClick === false) {\n closeOnOverlayClick = false;\n }\n if (props.trigger === 'hover' && props.closeOnBeyondTargetHover === false) {\n closeOnBeyondTargetHover = false;\n }\n\n const rootRef = useRef<HTMLDivElement | null>(null);\n const popoverRef = useRef<HTMLDivElement | null>(null);\n const handleRef = useForkRef<HTMLDivElement>(rootRef, outerRootRef);\n const portalRef = useRef<HTMLElement | null>(null);\n\n const trapRef = useFocusTrap(isOpen && isFocusTrapped);\n\n const popoverForkRef = useForkRef<HTMLDivElement>(popoverRef, trapRef);\n\n const [arrowElement, setArrowElement] = useState<HTMLSpanElement | null>(null);\n\n const [, forceRender] = useState(false);\n\n const isAutoArray = Array.isArray(placement);\n const isAuto = isAutoArray || (placement as PopoverPlacement).startsWith('auto');\n\n const initialStyles = {\n visibility: isOpen ? 'visible' : 'hidden',\n opacity: isOpen ? 1 : 0,\n } as CSSProperties;\n\n const { styles, attributes, forceUpdate } = usePopper(rootRef.current, popoverRef.current, {\n // TODO: #1121\n // eslint-disable-next-line no-nested-ternary\n placement: isAutoArray\n ? placement[0]?.endsWith('start')\n ? 'auto-start'\n : 'auto'\n : (placement as PopoverPlacement),\n modifiers: [\n {\n name: 'preventOverflow',\n options: {\n mainAxis: preventOverflow,\n },\n },\n { name: 'offset', options: { offset: [offset[0], offset[1]] } },\n {\n name: 'flip',\n enabled: isAuto,\n options: {\n allowedAutoPlacements: isAutoArray ? (placement as PopoverPlacement[]) : [],\n },\n },\n {\n name: 'arrow',\n options: {\n element: arrowElement,\n },\n },\n ],\n });\n\n const onEscape = useCallback(\n (event: KeyboardEvent) => {\n if (isOpen && closeOnEsc && event.keyCode === ESCAPE_KEYCODE) {\n onToggle?.(false, event);\n }\n },\n [closeOnEsc, isOpen, onToggle],\n );\n\n const onDocumentClick = useCallback(\n (event: MouseEvent) => {\n if (isOpen && closeOnOverlayClick && onToggle) {\n const targetIsRoot = event.target === rootRef.current;\n const rootHasTarget = rootRef.current?.contains(event.target as Element);\n\n if (!targetIsRoot && !rootHasTarget) {\n onToggle(false, event);\n }\n }\n },\n [closeOnOverlayClick, isOpen, onToggle],\n );\n\n const onClick = useCallback<React.MouseEventHandler>(\n (event) => {\n if (trigger === 'click') {\n const targetIsPopover = event.target === popoverRef.current;\n const rootHasTarget = popoverRef.current?.contains(event.target as Element);\n\n if (!targetIsPopover && !rootHasTarget) {\n onToggle?.(!isOpen, event);\n }\n }\n },\n [trigger, isOpen, onToggle],\n );\n\n const onMouseEnter = useCallback<React.MouseEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(true, event);\n }\n },\n [trigger, onToggle],\n );\n\n const onMouseLeave = useCallback<React.MouseEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(false, event);\n }\n },\n [trigger, onToggle],\n );\n\n const onFocus = useCallback<React.FocusEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(true, event);\n }\n },\n [trigger, onToggle],\n );\n\n const onBlur = useCallback<React.FocusEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(false, event);\n }\n },\n [trigger, onToggle],\n );\n\n useEffect(() => {\n document.addEventListener('click', onDocumentClick);\n return () => document.removeEventListener('click', onDocumentClick);\n }, [closeOnOverlayClick, isOpen, onToggle]);\n\n useEffect(() => {\n window.addEventListener('keydown', onEscape);\n return () => window.removeEventListener('keydown', onEscape);\n }, [closeOnEsc, isOpen, onToggle]);\n\n useEffect(() => {\n let portal = document.getElementById(POPOVER_PORTAL_ID);\n\n if (typeof frame !== 'string' && frame && frame.current) {\n portal = frame.current;\n }\n\n if (!usePortal) {\n portal = rootRef.current;\n }\n\n if (!portal) {\n portal = document.createElement('div');\n portal.setAttribute('id', POPOVER_PORTAL_ID);\n\n if (typeof frame === 'string' && frame !== 'document') {\n document.getElementById(frame)?.appendChild(portal);\n } else {\n document.body.appendChild(portal);\n }\n }\n\n portalRef.current = portal;\n\n /**\n * Изменение стейта нужно для того, чтобы Popup\n * отобразился после записи DOM элемента в portalRef.current\n */\n forceRender(true);\n }, []);\n\n useEffect(() => {\n if (!isOpen || !forceUpdate) {\n return;\n }\n\n /*\n * INFO: Метод forceUpdate содержит в себе flushSync и приводит\n * к повторному рендеру компонента, который уже находится в процессе рендера.\n * Данный хак, нужен для того, чтобы это поведение избежать и перенаправить\n * вызов метода в очередь микрозадач.\n */\n Promise.resolve().then(forceUpdate);\n }, [isOpen, children, forceUpdate]);\n\n return (\n <StyledWrapper className={classes.wrapper}>\n <StyledRoot\n ref={handleRef}\n onClick={onClick}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n onFocus={onFocus}\n onBlur={onBlur}\n className={cx(className, classes.target)}\n >\n {target}\n </StyledRoot>\n {children &&\n portalRef.current &&\n ReactDOM.createPortal(\n <Root\n view={view}\n className={className}\n {...rest}\n onMouseEnter={closeOnBeyondTargetHover ? undefined : onMouseEnter}\n onMouseLeave={closeOnBeyondTargetHover ? undefined : onMouseEnter}\n >\n <StyledPopover\n {...attributes.popper}\n className={classes.root}\n ref={popoverForkRef}\n style={{\n ...styles.popper,\n ...{ display: isOpen ? 'block' : 'none' },\n ...initialStyles,\n }}\n zIndex={zIndex}\n >\n {hasArrow && (\n <StyledArrow\n className={classes.arrow}\n ref={setArrowElement}\n style={styles.arrow}\n {...attributes.arrow}\n />\n )}\n {children}\n </StyledPopover>\n </Root>,\n portalRef.current,\n )}\n </StyledWrapper>\n );\n });\n\nexport const popoverConfig = {\n name: 'Popover',\n tag: 'div',\n layout: popoverRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n },\n defaults: {\n view: 'default',\n },\n};\n"],"names":["ESCAPE_KEYCODE","POPOVER_PORTAL_ID","popoverRoot","Root","forwardRef","props","outerRootRef","_placement$","target","children","isOpen","_props$trigger","trigger","hasArrow","_props$frame","frame","className","_props$placement","placement","_props$offset","offset","zIndex","_props$isFocusTrapped","isFocusTrapped","_props$closeOnEsc","closeOnEsc","_props$preventOverflo","preventOverflow","_props$usePortal","usePortal","view","onToggle","rest","_objectWithoutProperties","_excluded","closeOnOverlayClick","closeOnBeyondTargetHover","rootRef","useRef","popoverRef","handleRef","useForkRef","portalRef","trapRef","useFocusTrap","popoverForkRef","_useState","useState","_useState2","_slicedToArray","arrowElement","setArrowElement","_useState3","_useState4","forceRender","isAutoArray","Array","isArray","isAuto","startsWith","initialStyles","visibility","opacity","_usePopper","usePopper","current","endsWith","modifiers","name","options","mainAxis","enabled","allowedAutoPlacements","element","styles","attributes","forceUpdate","onEscape","useCallback","event","keyCode","onDocumentClick","_rootRef$current","targetIsRoot","rootHasTarget","contains","onClick","_popoverRef$current","targetIsPopover","onMouseEnter","onMouseLeave","onFocus","onBlur","useEffect","document","addEventListener","removeEventListener","window","portal","getElementById","createElement","setAttribute","_document$getElementB","appendChild","body","Promise","resolve","then","React","StyledWrapper","classes","wrapper","StyledRoot","ref","cx","ReactDOM","createPortal","_extends","undefined","StyledPopover","popper","root","style","_objectSpread","display","StyledArrow","arrow","popoverConfig","tag","layout","base","variations","css","viewCSS","defaults"],"mappings":";;;;;;;;;;;;;;;AAcO,IAAMA,cAAc,GAAG,GAAE;AACzB,IAAMC,iBAAiB,GAAG,sBAAqB;;AAEtD;AACA;AACA;AACA;IACaC,WAAW,GAAG,SAAdA,WAAWA,CAAIC,IAA6C,EAAA;AAAA,EAAA,oBACrEC,gBAAU,CAA+B,UAACC,KAAK,EAAEC,YAAY,EAAK;AAAA,IAAA,IAAAC,WAAA,CAAA;AAC9D,IAAA,IACIC,MAAM,GAiBNH,KAAK,CAjBLG,MAAM;MACNC,QAAQ,GAgBRJ,KAAK,CAhBLI,QAAQ;MACRC,MAAM,GAeNL,KAAK,CAfLK,MAAM;MAAAC,cAAA,GAeNN,KAAK,CAdLO,OAAO;AAAPA,MAAAA,OAAO,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,OAAO,GAAAA,cAAA;MACjBE,QAAQ,GAaRR,KAAK,CAbLQ,QAAQ;MAAAC,YAAA,GAaRT,KAAK,CAZLU,KAAK;AAALA,MAAAA,KAAK,GAAAD,YAAA,KAAG,KAAA,CAAA,GAAA,UAAU,GAAAA,YA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AAAA,QAAQ,iBACL+F,KAAA,CAAAR,aAAA,CAACyB,0BAAW,EAAAR,iCAAA,CAAA;MACRrG,SAAS,EAAE8F,sBAAO,CAACgB,KAAM;AACzBb,MAAAA,GAAG,EAAE9D,eAAgB;MACrBuE,KAAK,EAAEhD,MAAM,CAACoD,KAAAA;AAAM,KAAA,EAChBnD,UAAU,CAACmD,KAAK,CACvB,CACJ,EACArH,QACU,CACb,CAAC,EACPiC,SAAS,CAACuB,OACd,CACO,CAAC,CAAA;AAExB,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAM8D,aAAa,GAAG;AACzB3D,EAAAA,IAAI,EAAE,SAAS;AACf4D,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE/H,WAAW;AACnBgI,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACRrG,IAAAA,IAAI,EAAE;AACFsG,MAAAA,GAAG,EAAEC,SAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNxG,IAAAA,IAAI,EAAE,SAAA;AACV,GAAA;AACJ;;;;;;;"}
package/cjs/index.js CHANGED
@@ -23,12 +23,12 @@ var ButtonGroup = require('./components/ButtonGroup/ButtonGroup.js');
23
23
  var ButtonGroup_tokens = require('./components/ButtonGroup/ButtonGroup.tokens.js');
24
24
  var Chip = require('./components/Chip/Chip.js');
25
25
  var Chip_tokens = require('./components/Chip/Chip.tokens.js');
26
- var TextLabel = require('./components/Cell/Textbox/ui/TextLabel.js');
27
- var TextTitle = require('./components/Cell/Textbox/ui/TextTitle.js');
28
- var TextSubtitle = require('./components/Cell/Textbox/ui/TextSubtitle.js');
26
+ var CellTextLabel = require('./components/Cell/CellTextbox/ui/CellTextLabel.js');
27
+ var CellTextTitle = require('./components/Cell/CellTextbox/ui/CellTextTitle.js');
28
+ var CellTextSubtitle = require('./components/Cell/CellTextbox/ui/CellTextSubtitle.js');
29
29
  var Cell = require('./components/Cell/Cell.js');
30
30
  var Cell_tokens = require('./components/Cell/Cell.tokens.js');
31
- var Textbox = require('./components/Cell/Textbox/Textbox.js');
31
+ var CellTextbox = require('./components/Cell/CellTextbox/CellTextbox.js');
32
32
  var Link = require('./components/Link/Link.js');
33
33
  var Spinner = require('./components/Spinner/Spinner.js');
34
34
  var Spinner_tokens = require('./components/Spinner/Spinner.tokens.js');
@@ -244,14 +244,14 @@ exports.buttonGroupTokens = ButtonGroup_tokens.tokens;
244
244
  exports.chipConfig = Chip.chipConfig;
245
245
  exports.chipRoot = Chip.chipRoot;
246
246
  exports.chipTokens = Chip_tokens.tokens;
247
- exports.TextLabel = TextLabel.TextLabel;
248
- exports.TextTitle = TextTitle.TextTitle;
249
- exports.TextSubtitle = TextSubtitle.TextSubtitle;
247
+ exports.CellTextboxLabel = CellTextLabel.CellTextboxLabel;
248
+ exports.CellTextboxTitle = CellTextTitle.CellTextboxTitle;
249
+ exports.CellTextboxSubtitle = CellTextSubtitle.CellTextboxSubtitle;
250
250
  exports.cellConfig = Cell.cellConfig;
251
251
  exports.cellRoot = Cell.cellRoot;
252
252
  exports.cellClasses = Cell_tokens.classes;
253
253
  exports.cellTokens = Cell_tokens.tokens;
254
- exports.Textbox = Textbox.Textbox;
254
+ exports.CellTextbox = CellTextbox.CellTextbox;
255
255
  exports.linkConfig = Link.linkConfig;
256
256
  exports.linkRoot = Link.linkRoot;
257
257
  exports.spinnerConfig = Spinner.spinnerConfig;
@@ -4,7 +4,7 @@ import { CellLeft, CellContentWrapper, CellContent, CellRight, base } from './Ce
4
4
  import { classes } from './Cell.tokens.js';
5
5
  import { base as base$1 } from './variations/_view/base.js';
6
6
  import { base as base$2 } from './variations/_size/base.js';
7
- import { Textbox } from './Textbox/Textbox.js';
7
+ import { CellTextbox } from './CellTextbox/CellTextbox.js';
8
8
 
9
9
  var cellRoot = function cellRoot(Root) {
10
10
  return /*#__PURE__*/forwardRef(function (_ref, outerRootRef) {
@@ -12,15 +12,18 @@ var cellRoot = function cellRoot(Root) {
12
12
  view = _ref.view,
13
13
  contentLeft = _ref.contentLeft,
14
14
  contentRight = _ref.contentRight,
15
- _ref$alignLeft = _ref.alignLeft,
16
- alignLeft = _ref$alignLeft === void 0 ? 'center' : _ref$alignLeft,
17
- _ref$alignRight = _ref.alignRight,
18
- alignRight = _ref$alignRight === void 0 ? 'center' : _ref$alignRight,
15
+ _ref$alignContentLeft = _ref.alignContentLeft,
16
+ alignContentLeft = _ref$alignContentLeft === void 0 ? 'center' : _ref$alignContentLeft,
17
+ _ref$alignContentRigh = _ref.alignContentRight,
18
+ alignContentRight = _ref$alignContentRigh === void 0 ? 'center' : _ref$alignContentRigh,
19
19
  children = _ref.children,
20
20
  title = _ref.title,
21
21
  subtitle = _ref.subtitle,
22
22
  label = _ref.label,
23
- stretching = _ref.stretching;
23
+ description = _ref.description,
24
+ content = _ref.content,
25
+ _ref$stretching = _ref.stretching,
26
+ stretching = _ref$stretching === void 0 ? 'filled' : _ref$stretching;
24
27
  var stretchingClass = classes["".concat(stretching, "Stretching")];
25
28
  return /*#__PURE__*/React.createElement(Root, {
26
29
  ref: outerRootRef,
@@ -28,13 +31,14 @@ var cellRoot = function cellRoot(Root) {
28
31
  view: view,
29
32
  className: cx(stretchingClass, classes.cellRoot)
30
33
  }, contentLeft && /*#__PURE__*/React.createElement(CellLeft, {
31
- align: alignLeft
32
- }, contentLeft), /*#__PURE__*/React.createElement(CellContentWrapper, null, /*#__PURE__*/React.createElement(CellContent, null, title || subtitle || label ? /*#__PURE__*/React.createElement(Textbox, {
34
+ align: alignContentLeft
35
+ }, contentLeft), /*#__PURE__*/React.createElement(CellContentWrapper, null, /*#__PURE__*/React.createElement(CellContent, null, title || description || subtitle || label ? /*#__PURE__*/React.createElement(CellTextbox, {
33
36
  label: label,
37
+ description: description,
34
38
  title: title,
35
39
  subtitle: subtitle
36
- }) : children && children), contentRight && /*#__PURE__*/React.createElement(CellRight, {
37
- align: alignRight
40
+ }) : children || content), contentRight && /*#__PURE__*/React.createElement(CellRight, {
41
+ align: alignContentRight
38
42
  }, contentRight)));
39
43
  });
40
44
  };
@@ -53,8 +57,7 @@ var cellConfig = {
53
57
  },
54
58
  defaults: {
55
59
  view: 'default',
56
- size: 'm',
57
- stretching: 'filled'
60
+ size: 'm'
58
61
  }
59
62
  };
60
63