@salutejs/plasma-new-hope 0.68.0-canary.1148.8464224381.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
@@ -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,UAAU,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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A,CAAAC,aAAA,CAACS,SAAS,EAAA;AAACJ,MAAAA,KAAK,EAAEf,UAAAA;KAAaJ,EAAAA,YAAwB,CACxD,CAClB,CAAC,CAAA;AAEf,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAMwB,UAAU,GAAG;AACtBC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEnC,QAAQ;AAChBoC,EAAAA,IAAI,EAAJA,IAAI;AACJC,EAAAA,UAAU,EAAE;AACR/B,IAAAA,IAAI,EAAE;AACFgC,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACDlC,IAAAA,IAAI,EAAE;AACFiC,MAAAA,GAAG,EAAEE,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNnC,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,GAAG;AACTY,IAAAA,UAAU,EAAE,QAAA;AAChB,GAAA;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","CellTextbox","CellRight","cellConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;IAYaA,QAAQ,GAAG,SAAXA,QAAQA,CAAIC,IAA6C,EAAA;AAAA,EAAA,oBAClEC,UAAU,CACN,UAAAC,IAAA,EAgBIC,YAAY,EACX;AAAA,IAAA,IAfGC,IAAI,GAAAF,IAAA,CAAJE,IAAI;MACJC,IAAI,GAAAH,IAAA,CAAJG,IAAI;MACJC,WAAW,GAAAJ,IAAA,CAAXI,WAAW;MACXC,YAAY,GAAAL,IAAA,CAAZK,YAAY;MAAAC,qBAAA,GAAAN,IAAA,CACZO,gBAAgB;AAAhBA,MAAAA,gBAAgB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,qBAAA;MAAAE,qBAAA,GAAAR,IAAA,CAC3BS,iBAAiB;AAAjBA,MAAAA,iBAAiB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,qBAAA;MAC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,iBAAIgB,KAAA,CAAAC,aAAA,CAACS,SAAS,EAAA;AAACJ,MAAAA,KAAK,EAAElB,iBAAAA;KAAoBJ,EAAAA,YAAwB,CAC/D,CAClB,CAAC,CAAA;AAEf,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAM2B,UAAU,GAAG;AACtBC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEtC,QAAQ;AAChBuC,EAAAA,IAAI,EAAJA,IAAI;AACJC,EAAAA,UAAU,EAAE;AACRlC,IAAAA,IAAI,EAAE;AACFmC,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACDrC,IAAAA,IAAI,EAAE;AACFoC,MAAAA,GAAG,EAAEE,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNtC,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { CellTextboxStyled } from './CellTextbox.styles.js';
3
+ import { CellTextboxLabel } from './ui/CellTextLabel.js';
4
+ import { CellTextboxTitle } from './ui/CellTextTitle.js';
5
+ import { CellTextboxSubtitle } from './ui/CellTextSubtitle.js';
6
+
7
+ var CellTextbox = function CellTextbox(_ref) {
8
+ var label = _ref.label,
9
+ title = _ref.title,
10
+ subtitle = _ref.subtitle,
11
+ description = _ref.description,
12
+ children = _ref.children;
13
+ return /*#__PURE__*/React.createElement(CellTextboxStyled, null, label || title || description || subtitle ? /*#__PURE__*/React.createElement(React.Fragment, null, label && /*#__PURE__*/React.createElement(CellTextboxLabel, null, label), (title || description) && /*#__PURE__*/React.createElement(CellTextboxTitle, null, title || description), subtitle && /*#__PURE__*/React.createElement(CellTextboxSubtitle, null, subtitle)) : children);
14
+ };
15
+
16
+ export { CellTextbox };
17
+ //# 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,iBAAiB,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,gBAAgB,EAAET,IAAAA,EAAAA,KAAwB,CAAC,EACrD,CAACC,KAAK,IAAIE,WAAW,kBAAKE,KAAA,CAAAC,aAAA,CAACI,gBAAgB,EAAET,IAAAA,EAAAA,KAAK,IAAIE,WAA8B,CAAC,EACrFD,QAAQ,iBAAIG,KAAA,CAAAC,aAAA,CAACK,mBAAmB,EAAA,IAAA,EAAET,QAA8B,CACnE,CAAC,GAEHE,QAEW,CAAC,CAAA;AAE5B;;;;"}
@@ -0,0 +1,9 @@
1
+ import styled from 'styled-components';
2
+ import { tokens } from '../Cell.tokens.js';
3
+
4
+ var CellTextboxStyled = /*#__PURE__*/styled.div.withConfig({
5
+ componentId: "plasma-new-hope__sc-1t9f5dx-0"
6
+ })(["display:flex;flex-direction:column;gap:var(", ");"], tokens.cellTextboxGap);
7
+
8
+ export { CellTextboxStyled };
9
+ //# 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,MAAM,CAACC,cAAc;;;;"}
@@ -3,11 +3,11 @@ import styled from 'styled-components';
3
3
  import { tokens } from '../../Cell.tokens.js';
4
4
 
5
5
  var StyledTextLabel = /*#__PURE__*/styled.div.withConfig({
6
- componentId: "plasma-new-hope__sc-102c6vv-0"
6
+ componentId: "plasma-new-hope__sc-2pgst1-0"
7
7
  })(["color:var(", ");font-size:var(", ");font-weight:var(", ");font-family:var(", ");font-style:var(", ");line-height:var(", ");letter-spacing:var(", ");"], tokens.cellLabelColor, tokens.cellLabelFontSize, tokens.cellLabelFontWeight, tokens.cellLabelFontFamily, tokens.cellLabelFontStyle, tokens.cellLabelLineHeight, tokens.cellLabelLetterSpacing);
8
- var TextLabel = function TextLabel(props) {
8
+ var CellTextboxLabel = function CellTextboxLabel(props) {
9
9
  return /*#__PURE__*/React.createElement(StyledTextLabel, null, props.children);
10
10
  };
11
11
 
12
- export { TextLabel };
13
- //# sourceMappingURL=TextLabel.js.map
12
+ export { CellTextboxLabel };
13
+ //# 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,MAAM,CAACC,cAAc,EACjBD,MAAM,CAACE,iBAAiB,EACtBF,MAAM,CAACG,mBAAmB,EAC1BH,MAAM,CAACI,mBAAmB,EAC3BJ,MAAM,CAACK,kBAAkB,EACxBL,MAAM,CAACM,mBAAmB,EACvBN,MAAM,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;;;;"}
@@ -3,11 +3,11 @@ import styled from 'styled-components';
3
3
  import { tokens } from '../../Cell.tokens.js';
4
4
 
5
5
  var StyledTextSubtitle = /*#__PURE__*/styled.div.withConfig({
6
- componentId: "plasma-new-hope__sc-1tsgki4-0"
6
+ componentId: "plasma-new-hope__sc-12wzp7p-0"
7
7
  })(["color:var(", ");font-size:var(", ");font-weight:var(", ");font-family:var(", ");font-style:var(", ");line-height:var(", ");letter-spacing:var(", ");"], tokens.cellSubtitleColor, tokens.cellSubtitleFontSize, tokens.cellSubtitleFontWeight, tokens.cellSubtitleFontFamily, tokens.cellSubtitleFontStyle, tokens.cellSubtitleLineHeight, tokens.cellSubtitleLetterSpacing);
8
- var TextSubtitle = function TextSubtitle(props) {
8
+ var CellTextboxSubtitle = function CellTextboxSubtitle(props) {
9
9
  return /*#__PURE__*/React.createElement(StyledTextSubtitle, null, props.children);
10
10
  };
11
11
 
12
- export { TextSubtitle };
13
- //# sourceMappingURL=TextSubtitle.js.map
12
+ export { CellTextboxSubtitle };
13
+ //# 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,MAAM,CAACC,iBAAiB,EACpBD,MAAM,CAACE,oBAAoB,EACzBF,MAAM,CAACG,sBAAsB,EAC7BH,MAAM,CAACI,sBAAsB,EAC9BJ,MAAM,CAACK,qBAAqB,EAC3BL,MAAM,CAACM,sBAAsB,EAC1BN,MAAM,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;;;;"}
@@ -3,11 +3,11 @@ import styled from 'styled-components';
3
3
  import { tokens } from '../../Cell.tokens.js';
4
4
 
5
5
  var StyledTextTitle = /*#__PURE__*/styled.div.withConfig({
6
- componentId: "plasma-new-hope__sc-flfrmq-0"
6
+ componentId: "plasma-new-hope__sc-xt8zbj-0"
7
7
  })(["color:var(", ");font-size:var(", ");font-weight:var(", ");font-family:var(", ");font-style:var(", ");line-height:var(", ");letter-spacing:var(", ");"], tokens.cellTitleColor, tokens.cellTitleFontSize, tokens.cellTitleFontWeight, tokens.cellTitleFontFamily, tokens.cellTitleFontStyle, tokens.cellTitleLineHeight, tokens.cellTitleLetterSpacing);
8
- var TextTitle = function TextTitle(props) {
8
+ var CellTextboxTitle = function CellTextboxTitle(props) {
9
9
  return /*#__PURE__*/React.createElement(StyledTextTitle, null, props.children);
10
10
  };
11
11
 
12
- export { TextTitle };
13
- //# sourceMappingURL=TextTitle.js.map
12
+ export { CellTextboxTitle };
13
+ //# 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,MAAM,CAACC,cAAc,EACjBD,MAAM,CAACE,iBAAiB,EACtBF,MAAM,CAACG,mBAAmB,EAC1BH,MAAM,CAACI,mBAAmB,EAC3BJ,MAAM,CAACK,kBAAkB,EACxBL,MAAM,CAACM,mBAAmB,EACvBN,MAAM,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;;;;"}
@@ -61,6 +61,7 @@ var dropdownRoot = function dropdownRoot(Root) {
61
61
  placement: getPlacements(placement),
62
62
  trigger: trigger,
63
63
  closeOnOverlayClick: closeOnOverlayClick,
64
+ closeOnBeyondTargetHover: false,
64
65
  closeOnEsc: closeOnEsc,
65
66
  isFocusTrapped: isFocusTrapped,
66
67
  frame: frame
@@ -85,7 +86,7 @@ var dropdownConfig = {
85
86
  }
86
87
  },
87
88
  defaults: {
88
- view: 'primary',
89
+ view: 'default',
89
90
  size: 'm'
90
91
  }
91
92
  };
@@ -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,UAAU,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,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,WAAA;MAAA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AA,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,IAAAA;KACR;AACDlD,IAAAA,IAAI,EAAE;AACFiD,MAAAA,GAAG,EAAEE,MAAAA;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,UAAU,CACN,UAAAC,IAAA,EAqBIC,YAAY,EACX;AAAA,IAAA,IApBGC,EAAE,GAAAF,IAAA,CAAFE,EAAE;MACFC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pCE,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,QAAA,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,cAAc,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,IAAAA;KACR;AACDnD,IAAAA,IAAI,EAAE;AACFkD,MAAAA,GAAG,EAAEE,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNtD,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
@@ -8,7 +8,7 @@ import { base } from './variations/_view/base.js';
8
8
  import { StyledWrapper, StyledRoot, StyledPopover, StyledArrow } from './Popover.styles.js';
9
9
  import { classes } from './Popover.tokens.js';
10
10
 
11
- var _excluded = ["target", "children", "isOpen", "trigger", "hasArrow", "frame", "className", "placement", "offset", "zIndex", "isFocusTrapped", "closeOnOverlayClick", "closeOnEsc", "preventOverflow", "usePortal", "view", "onToggle"];
11
+ var _excluded = ["target", "children", "isOpen", "trigger", "hasArrow", "frame", "className", "placement", "offset", "zIndex", "isFocusTrapped", "closeOnEsc", "preventOverflow", "usePortal", "view", "onToggle"];
12
12
  var ESCAPE_KEYCODE = 27;
13
13
  var POPOVER_PORTAL_ID = 'plasma-popover-root';
14
14
 
@@ -17,33 +17,41 @@ var POPOVER_PORTAL_ID = 'plasma-popover-root';
17
17
  * и вызова по клику либо ховеру.
18
18
  */
19
19
  var popoverRoot = function popoverRoot(Root) {
20
- return /*#__PURE__*/forwardRef(function (_ref, outerRootRef) {
21
- var target = _ref.target,
22
- children = _ref.children,
23
- isOpen = _ref.isOpen,
24
- trigger = _ref.trigger,
25
- hasArrow = _ref.hasArrow,
26
- _ref$frame = _ref.frame,
27
- frame = _ref$frame === void 0 ? 'document' : _ref$frame,
28
- className = _ref.className,
29
- _ref$placement = _ref.placement,
30
- placement = _ref$placement === void 0 ? 'auto' : _ref$placement,
31
- _ref$offset = _ref.offset,
32
- offset = _ref$offset === void 0 ? [0, 0] : _ref$offset,
33
- zIndex = _ref.zIndex,
34
- _ref$isFocusTrapped = _ref.isFocusTrapped,
35
- isFocusTrapped = _ref$isFocusTrapped === void 0 ? true : _ref$isFocusTrapped,
36
- _ref$closeOnOverlayCl = _ref.closeOnOverlayClick,
37
- closeOnOverlayClick = _ref$closeOnOverlayCl === void 0 ? true : _ref$closeOnOverlayCl,
38
- _ref$closeOnEsc = _ref.closeOnEsc,
39
- closeOnEsc = _ref$closeOnEsc === void 0 ? true : _ref$closeOnEsc,
40
- _ref$preventOverflow = _ref.preventOverflow,
41
- preventOverflow = _ref$preventOverflow === void 0 ? true : _ref$preventOverflow,
42
- _ref$usePortal = _ref.usePortal,
43
- usePortal = _ref$usePortal === void 0 ? false : _ref$usePortal,
44
- view = _ref.view,
45
- onToggle = _ref.onToggle,
46
- rest = _objectWithoutProperties(_ref, _excluded);
20
+ return /*#__PURE__*/forwardRef(function (props, outerRootRef) {
21
+ var _placement$;
22
+ var target = props.target,
23
+ children = props.children,
24
+ isOpen = props.isOpen,
25
+ _props$trigger = props.trigger,
26
+ trigger = _props$trigger === void 0 ? 'click' : _props$trigger,
27
+ hasArrow = props.hasArrow,
28
+ _props$frame = props.frame,
29
+ frame = _props$frame === void 0 ? 'document' : _props$frame,
30
+ className = props.className,
31
+ _props$placement = props.placement,
32
+ placement = _props$placement === void 0 ? 'auto' : _props$placement,
33
+ _props$offset = props.offset,
34
+ offset = _props$offset === void 0 ? [0, 0] : _props$offset,
35
+ zIndex = props.zIndex,
36
+ _props$isFocusTrapped = props.isFocusTrapped,
37
+ isFocusTrapped = _props$isFocusTrapped === void 0 ? true : _props$isFocusTrapped,
38
+ _props$closeOnEsc = props.closeOnEsc,
39
+ closeOnEsc = _props$closeOnEsc === void 0 ? true : _props$closeOnEsc,
40
+ _props$preventOverflo = props.preventOverflow,
41
+ preventOverflow = _props$preventOverflo === void 0 ? true : _props$preventOverflo,
42
+ _props$usePortal = props.usePortal,
43
+ usePortal = _props$usePortal === void 0 ? false : _props$usePortal,
44
+ view = props.view,
45
+ onToggle = props.onToggle,
46
+ rest = _objectWithoutProperties(props, _excluded);
47
+ var closeOnOverlayClick = true;
48
+ var closeOnBeyondTargetHover = true;
49
+ if (props.trigger === 'click' && props.closeOnOverlayClick === false) {
50
+ closeOnOverlayClick = false;
51
+ }
52
+ if (props.trigger === 'hover' && props.closeOnBeyondTargetHover === false) {
53
+ closeOnBeyondTargetHover = false;
54
+ }
47
55
  var rootRef = useRef(null);
48
56
  var popoverRef = useRef(null);
49
57
  var handleRef = useForkRef(rootRef, outerRootRef);
@@ -64,7 +72,9 @@ var popoverRoot = function popoverRoot(Root) {
64
72
  opacity: isOpen ? 1 : 0
65
73
  };
66
74
  var _usePopper = usePopper(rootRef.current, popoverRef.current, {
67
- placement: isAutoArray ? 'auto' : placement,
75
+ // TODO: #1121
76
+ // eslint-disable-next-line no-nested-ternary
77
+ placement: isAutoArray ? (_placement$ = placement[0]) !== null && _placement$ !== void 0 && _placement$.endsWith('start') ? 'auto-start' : 'auto' : placement,
68
78
  modifiers: [{
69
79
  name: 'preventOverflow',
70
80
  options: {
@@ -200,10 +210,15 @@ var popoverRoot = function popoverRoot(Root) {
200
210
  }, target), children && portalRef.current && /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React.createElement(Root, _extends({
201
211
  view: view,
202
212
  className: className
203
- }, rest), /*#__PURE__*/React.createElement(StyledPopover, _extends({}, attributes.popper, {
213
+ }, rest, {
214
+ onMouseEnter: closeOnBeyondTargetHover ? undefined : onMouseEnter,
215
+ onMouseLeave: closeOnBeyondTargetHover ? undefined : onMouseEnter
216
+ }), /*#__PURE__*/React.createElement(StyledPopover, _extends({}, attributes.popper, {
204
217
  className: classes.root,
205
218
  ref: popoverForkRef,
206
- style: _objectSpread2(_objectSpread2({}, styles.popper), initialStyles),
219
+ style: _objectSpread2(_objectSpread2(_objectSpread2({}, styles.popper), {
220
+ display: isOpen ? 'block' : 'none'
221
+ }), initialStyles),
207
222
  zIndex: zIndex
208
223
  }), hasArrow && /*#__PURE__*/React.createElement(StyledArrow, _extends({
209
224
  className: 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,UAAU,CACN,UAAAC,IAAA,EAqBIC,YAAY,EACX;AAAA,IAAA,IApBGC,MAAM,GAAAF,IAAA,CAANE,MAAM;MACNC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;MACRC,MAAM,GAAAJ,IAAA,CAANI,MAAM;MACNC,OAAO,GAAAL,IAAA,CAAPK,OAAO;MACPC,QAAQ,GAAAN,IAAA,CAARM,QAAQ;MAAAC,UAAA,GAAAP,IAAA,CACRQ,KAAK;AAALA,MAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,UAAU,GAAAA,UAAA;MAClBE,SAAS,GAAAT,IAAA,CAATS,SAAS;MAAAC,cAAA,GAAAV,IAAA,CACTW,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over.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,UAAU,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,YAAA;MAClBE,SAAS,GAWTX,KAAK,CAXLW,SAAS;MAAAC,gBAAA,GAWTZ,KAAK,CAVLa,SAAS;AAATA,MAAAA,SAAS,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,gBAAA;MAAAE,aAAA,GAUlBd,KAAK,CATLe,MAAM;MAANA,MAAM,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,CAAC,CAAC,EAAE,CAAC,CAAC,GAAAA,aAAA;MACfE,MAAM,GAQNhB,KAAK,CARLgB,MAAM;MAAAC,qBAAA,GAQNjB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,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,IAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNxG,IAAAA,IAAI,EAAE,SAAA;AACV,GAAA;AACJ;;;;"}
package/es/index.js CHANGED
@@ -19,12 +19,12 @@ export { buttonGroupConfig, buttonGroupRoot } from './components/ButtonGroup/But
19
19
  export { classes as buttonGroupClasses, tokens as buttonGroupTokens } from './components/ButtonGroup/ButtonGroup.tokens.js';
20
20
  export { chipConfig, chipRoot } from './components/Chip/Chip.js';
21
21
  export { tokens as chipTokens } from './components/Chip/Chip.tokens.js';
22
- export { TextLabel } from './components/Cell/Textbox/ui/TextLabel.js';
23
- export { TextTitle } from './components/Cell/Textbox/ui/TextTitle.js';
24
- export { TextSubtitle } from './components/Cell/Textbox/ui/TextSubtitle.js';
22
+ export { CellTextboxLabel } from './components/Cell/CellTextbox/ui/CellTextLabel.js';
23
+ export { CellTextboxTitle } from './components/Cell/CellTextbox/ui/CellTextTitle.js';
24
+ export { CellTextboxSubtitle } from './components/Cell/CellTextbox/ui/CellTextSubtitle.js';
25
25
  export { cellConfig, cellRoot } from './components/Cell/Cell.js';
26
26
  export { classes as cellClasses, tokens as cellTokens } from './components/Cell/Cell.tokens.js';
27
- export { Textbox } from './components/Cell/Textbox/Textbox.js';
27
+ export { CellTextbox } from './components/Cell/CellTextbox/CellTextbox.js';
28
28
  export { linkConfig, linkRoot } from './components/Link/Link.js';
29
29
  export { spinnerConfig, spinnerRoot } from './components/Spinner/Spinner.js';
30
30
  export { tokens as spinnerTokens } from './components/Spinner/Spinner.tokens.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salutejs/plasma-new-hope",
3
- "version": "0.68.0-canary.1148.8464224381.0",
3
+ "version": "0.68.0-canary.1148.8482525044.0",
4
4
  "description": "Salute Design System blueprint",
5
5
  "main": "cjs/index.js",
6
6
  "module": "es/index.js",
@@ -67,7 +67,7 @@
67
67
  "@rollup/plugin-babel": "^6.0.3",
68
68
  "@rollup/plugin-commonjs": "^25.0.4",
69
69
  "@rollup/plugin-node-resolve": "^15.1.0",
70
- "@salutejs/plasma-sb-utils": "0.153.0-dev.0",
70
+ "@salutejs/plasma-sb-utils": "0.153.0",
71
71
  "@storybook/addon-docs": "^7.6.17",
72
72
  "@storybook/addon-essentials": "^7.6.17",
73
73
  "@storybook/addons": "^7.6.17",
@@ -97,10 +97,10 @@
97
97
  "@linaria/core": "5.0.2",
98
98
  "@linaria/react": "5.0.3",
99
99
  "@popperjs/core": "2.11.8",
100
- "@salutejs/plasma-core": "1.155.0-dev.0",
100
+ "@salutejs/plasma-core": "1.155.0",
101
101
  "focus-visible": "5.2.0",
102
102
  "react-popper": "2.3.0",
103
103
  "storeon": "3.1.5"
104
104
  },
105
- "gitHead": "219983463f6268303cb6260ad066187fc4973761"
105
+ "gitHead": "bec6c8192ff962c867e6480a938fc84d8b10a9bf"
106
106
  }
@@ -11,7 +11,7 @@ var _Cell = /*#__PURE__*/require("./Cell.styles");
11
11
  var _Cell2 = /*#__PURE__*/require("./Cell.tokens");
12
12
  var _base = /*#__PURE__*/require("./variations/_view/base");
13
13
  var _base2 = /*#__PURE__*/require("./variations/_size/base");
14
- var _Textbox = /*#__PURE__*/require("./Textbox/Textbox");
14
+ var _CellTextbox = /*#__PURE__*/require("./CellTextbox/CellTextbox");
15
15
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
16
16
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
17
17
  var cellRoot = exports.cellRoot = function cellRoot(Root) {
@@ -20,15 +20,18 @@ var cellRoot = exports.cellRoot = function cellRoot(Root) {
20
20
  view = _ref.view,
21
21
  contentLeft = _ref.contentLeft,
22
22
  contentRight = _ref.contentRight,
23
- _ref$alignLeft = _ref.alignLeft,
24
- alignLeft = _ref$alignLeft === void 0 ? 'center' : _ref$alignLeft,
25
- _ref$alignRight = _ref.alignRight,
26
- alignRight = _ref$alignRight === void 0 ? 'center' : _ref$alignRight,
23
+ _ref$alignContentLeft = _ref.alignContentLeft,
24
+ alignContentLeft = _ref$alignContentLeft === void 0 ? 'center' : _ref$alignContentLeft,
25
+ _ref$alignContentRigh = _ref.alignContentRight,
26
+ alignContentRight = _ref$alignContentRigh === void 0 ? 'center' : _ref$alignContentRigh,
27
27
  children = _ref.children,
28
28
  title = _ref.title,
29
29
  subtitle = _ref.subtitle,
30
30
  label = _ref.label,
31
- stretching = _ref.stretching;
31
+ description = _ref.description,
32
+ content = _ref.content,
33
+ _ref$stretching = _ref.stretching,
34
+ stretching = _ref$stretching === void 0 ? 'filled' : _ref$stretching;
32
35
  var stretchingClass = _Cell2.classes["".concat(stretching, "Stretching")];
33
36
  return /*#__PURE__*/_react["default"].createElement(Root, {
34
37
  ref: outerRootRef,
@@ -36,13 +39,14 @@ var cellRoot = exports.cellRoot = function cellRoot(Root) {
36
39
  view: view,
37
40
  className: (0, _utils.cx)(stretchingClass, _Cell2.classes.cellRoot)
38
41
  }, contentLeft && /*#__PURE__*/_react["default"].createElement(_Cell.CellLeft, {
39
- align: alignLeft
40
- }, contentLeft), /*#__PURE__*/_react["default"].createElement(_Cell.CellContentWrapper, null, /*#__PURE__*/_react["default"].createElement(_Cell.CellContent, null, title || subtitle || label ? /*#__PURE__*/_react["default"].createElement(_Textbox.Textbox, {
42
+ align: alignContentLeft
43
+ }, contentLeft), /*#__PURE__*/_react["default"].createElement(_Cell.CellContentWrapper, null, /*#__PURE__*/_react["default"].createElement(_Cell.CellContent, null, title || description || subtitle || label ? /*#__PURE__*/_react["default"].createElement(_CellTextbox.CellTextbox, {
41
44
  label: label,
45
+ description: description,
42
46
  title: title,
43
47
  subtitle: subtitle
44
- }) : children && children), contentRight && /*#__PURE__*/_react["default"].createElement(_Cell.CellRight, {
45
- align: alignRight
48
+ }) : children || content), contentRight && /*#__PURE__*/_react["default"].createElement(_Cell.CellRight, {
49
+ align: alignContentRight
46
50
  }, contentRight)));
47
51
  });
48
52
  };
@@ -61,7 +65,6 @@ var cellConfig = exports.cellConfig = {
61
65
  },
62
66
  defaults: {
63
67
  view: 'default',
64
- size: 'm',
65
- stretching: 'filled'
68
+ size: 'm'
66
69
  }
67
70
  };
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.CellTextbox = void 0;
7
+ var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react"));
8
+ var _CellTextbox = /*#__PURE__*/require("./CellTextbox.styles");
9
+ var _CellTextLabel = /*#__PURE__*/require("./ui/CellTextLabel");
10
+ var _CellTextTitle = /*#__PURE__*/require("./ui/CellTextTitle");
11
+ var _CellTextSubtitle = /*#__PURE__*/require("./ui/CellTextSubtitle");
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
+ var CellTextbox = exports.CellTextbox = function CellTextbox(_ref) {
14
+ var label = _ref.label,
15
+ title = _ref.title,
16
+ subtitle = _ref.subtitle,
17
+ description = _ref.description,
18
+ children = _ref.children;
19
+ return /*#__PURE__*/_react["default"].createElement(_CellTextbox.CellTextboxStyled, null, label || title || description || subtitle ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, label && /*#__PURE__*/_react["default"].createElement(_CellTextLabel.CellTextboxLabel, null, label), (title || description) && /*#__PURE__*/_react["default"].createElement(_CellTextTitle.CellTextboxTitle, null, title || description), subtitle && /*#__PURE__*/_react["default"].createElement(_CellTextSubtitle.CellTextboxSubtitle, null, subtitle)) : children);
20
+ };
@@ -3,10 +3,10 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.TextboxStyled = void 0;
6
+ exports.CellTextboxStyled = void 0;
7
7
  var _styledComponents = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("styled-components"));
8
8
  var _Cell = /*#__PURE__*/require("../Cell.tokens");
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
10
- var TextboxStyled = exports.TextboxStyled = /*#__PURE__*/_styledComponents["default"].div.withConfig({
11
- componentId: "plasma-new-hope__sc-t2ald4-0"
10
+ var CellTextboxStyled = exports.CellTextboxStyled = /*#__PURE__*/_styledComponents["default"].div.withConfig({
11
+ componentId: "plasma-new-hope__sc-1ts73cj-0"
12
12
  })(["display:flex;flex-direction:column;gap:var(", ");"], _Cell.tokens.cellTextboxGap);
@@ -3,14 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.TextLabel = void 0;
6
+ exports.CellTextboxLabel = void 0;
7
7
  var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react"));
8
8
  var _styledComponents = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("styled-components"));
9
9
  var _Cell = /*#__PURE__*/require("../../Cell.tokens");
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
11
  var StyledTextLabel = /*#__PURE__*/_styledComponents["default"].div.withConfig({
12
- componentId: "plasma-new-hope__sc-6e2num-0"
12
+ componentId: "plasma-new-hope__sc-1syy9dx-0"
13
13
  })(["color:var(", ");font-size:var(", ");font-weight:var(", ");font-family:var(", ");font-style:var(", ");line-height:var(", ");letter-spacing:var(", ");"], _Cell.tokens.cellLabelColor, _Cell.tokens.cellLabelFontSize, _Cell.tokens.cellLabelFontWeight, _Cell.tokens.cellLabelFontFamily, _Cell.tokens.cellLabelFontStyle, _Cell.tokens.cellLabelLineHeight, _Cell.tokens.cellLabelLetterSpacing);
14
- var TextLabel = exports.TextLabel = function TextLabel(props) {
14
+ var CellTextboxLabel = exports.CellTextboxLabel = function CellTextboxLabel(props) {
15
15
  return /*#__PURE__*/_react["default"].createElement(StyledTextLabel, null, props.children);
16
16
  };