@salutejs/plasma-new-hope 0.68.0-canary.1104.8452846373.0 → 0.68.0-canary.1148.8452223133.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. package/cjs/components/Cell/Cell.css +3 -0
  2. package/cjs/components/Cell/Cell.js +71 -0
  3. package/cjs/components/Cell/Cell.js.map +1 -0
  4. package/cjs/components/Cell/Cell.styles.js +36 -0
  5. package/cjs/components/Cell/Cell.styles.js.map +1 -0
  6. package/cjs/components/Cell/Cell.tokens.js +50 -0
  7. package/cjs/components/Cell/Cell.tokens.js.map +1 -0
  8. package/cjs/components/Cell/Textbox/Textbox.js +20 -0
  9. package/cjs/components/Cell/Textbox/Textbox.js.map +1 -0
  10. package/cjs/components/Cell/Textbox/Textbox.styles.js +13 -0
  11. package/cjs/components/Cell/Textbox/Textbox.styles.js.map +1 -0
  12. package/cjs/components/Cell/Textbox/ui/TextLabel.js +17 -0
  13. package/cjs/components/Cell/Textbox/ui/TextLabel.js.map +1 -0
  14. package/cjs/components/Cell/Textbox/ui/TextSubtitle.js +17 -0
  15. package/cjs/components/Cell/Textbox/ui/TextSubtitle.js.map +1 -0
  16. package/cjs/components/Cell/Textbox/ui/TextTitle.js +17 -0
  17. package/cjs/components/Cell/Textbox/ui/TextTitle.js.map +1 -0
  18. package/cjs/components/Cell/variations/_size/base.js +9 -0
  19. package/cjs/components/Cell/variations/_size/base.js.map +1 -0
  20. package/cjs/components/Cell/variations/_size/base_x642ct.css +1 -0
  21. package/cjs/components/Cell/variations/_stretching/base.js +9 -0
  22. package/cjs/components/Cell/variations/_stretching/base.js.map +1 -0
  23. package/cjs/components/Cell/variations/_stretching/base_1ryz4br.css +1 -0
  24. package/cjs/components/Cell/variations/_view/base.js +9 -0
  25. package/cjs/components/Cell/variations/_view/base.js.map +1 -0
  26. package/cjs/components/Cell/variations/_view/base_2qgj2i.css +1 -0
  27. package/cjs/components/Dropdown/Dropdown.js +1 -2
  28. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  29. package/cjs/components/Popover/Popover.js +31 -46
  30. package/cjs/components/Popover/Popover.js.map +1 -1
  31. package/cjs/index.css +4 -0
  32. package/cjs/index.js +14 -0
  33. package/cjs/index.js.map +1 -1
  34. package/es/components/Cell/Cell.css +3 -0
  35. package/es/components/Cell/Cell.js +66 -0
  36. package/es/components/Cell/Cell.js.map +1 -0
  37. package/es/components/Cell/Cell.styles.js +29 -0
  38. package/es/components/Cell/Cell.styles.js.map +1 -0
  39. package/es/components/Cell/Cell.tokens.js +45 -0
  40. package/es/components/Cell/Cell.tokens.js.map +1 -0
  41. package/es/components/Cell/Textbox/Textbox.js +16 -0
  42. package/es/components/Cell/Textbox/Textbox.js.map +1 -0
  43. package/es/components/Cell/Textbox/Textbox.styles.js +9 -0
  44. package/es/components/Cell/Textbox/Textbox.styles.js.map +1 -0
  45. package/es/components/Cell/Textbox/ui/TextLabel.js +13 -0
  46. package/es/components/Cell/Textbox/ui/TextLabel.js.map +1 -0
  47. package/es/components/Cell/Textbox/ui/TextSubtitle.js +13 -0
  48. package/es/components/Cell/Textbox/ui/TextSubtitle.js.map +1 -0
  49. package/es/components/Cell/Textbox/ui/TextTitle.js +13 -0
  50. package/es/components/Cell/Textbox/ui/TextTitle.js.map +1 -0
  51. package/es/components/Cell/variations/_size/base.js +5 -0
  52. package/es/components/Cell/variations/_size/base.js.map +1 -0
  53. package/es/components/Cell/variations/_size/base_x642ct.css +1 -0
  54. package/es/components/Cell/variations/_stretching/base.js +5 -0
  55. package/es/components/Cell/variations/_stretching/base.js.map +1 -0
  56. package/es/components/Cell/variations/_stretching/base_1ryz4br.css +1 -0
  57. package/es/components/Cell/variations/_view/base.js +5 -0
  58. package/es/components/Cell/variations/_view/base.js.map +1 -0
  59. package/es/components/Cell/variations/_view/base_2qgj2i.css +1 -0
  60. package/es/components/Dropdown/Dropdown.js +1 -2
  61. package/es/components/Dropdown/Dropdown.js.map +1 -1
  62. package/es/components/Popover/Popover.js +31 -46
  63. package/es/components/Popover/Popover.js.map +1 -1
  64. package/es/index.css +4 -0
  65. package/es/index.js +6 -0
  66. package/es/index.js.map +1 -1
  67. package/package.json +2 -2
  68. package/styled-components/cjs/components/Cell/Cell.js +71 -0
  69. package/styled-components/cjs/components/Cell/Cell.styles.js +32 -0
  70. package/styled-components/cjs/components/Cell/Cell.tokens.js +48 -0
  71. package/styled-components/cjs/components/Cell/Cell.types.js +5 -0
  72. package/styled-components/cjs/components/Cell/Textbox/Textbox.js +19 -0
  73. package/styled-components/cjs/components/Cell/Textbox/Textbox.styles.js +12 -0
  74. package/styled-components/cjs/components/Cell/Textbox/Textbox.types.js +5 -0
  75. package/styled-components/cjs/components/Cell/Textbox/ui/TextLabel.js +16 -0
  76. package/styled-components/cjs/components/Cell/Textbox/ui/TextSubtitle.js +16 -0
  77. package/styled-components/cjs/components/Cell/Textbox/ui/TextTitle.js +16 -0
  78. package/styled-components/cjs/components/Cell/index.js +59 -0
  79. package/styled-components/cjs/components/Cell/variations/_size/base.js +8 -0
  80. package/styled-components/cjs/components/Cell/variations/_size/tokens.json +1 -0
  81. package/styled-components/cjs/components/Cell/variations/_stretching/base.js +9 -0
  82. package/styled-components/cjs/components/Cell/variations/_stretching/tokens.json +1 -0
  83. package/styled-components/cjs/components/Cell/variations/_view/base.js +9 -0
  84. package/styled-components/cjs/components/Cell/variations/_view/tokens.json +1 -0
  85. package/styled-components/cjs/components/Dropdown/Dropdown.js +1 -2
  86. package/styled-components/cjs/components/Popover/Popover.js +31 -46
  87. package/styled-components/cjs/examples/plasma_b2c/components/Cell/Cell.config.js +31 -0
  88. package/styled-components/cjs/examples/plasma_b2c/components/Cell/Cell.js +35 -0
  89. package/styled-components/cjs/examples/plasma_b2c/components/Cell/Cell.stories.tsx +131 -0
  90. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +1 -1
  91. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +1 -1
  92. package/styled-components/cjs/examples/plasma_b2c/components/Popover/Popover.stories.tsx +0 -7
  93. package/styled-components/cjs/examples/plasma_web/components/Cell/Cell.config.js +31 -0
  94. package/styled-components/cjs/examples/plasma_web/components/Cell/Cell.js +35 -0
  95. package/styled-components/cjs/examples/plasma_web/components/Cell/Cell.stories.tsx +131 -0
  96. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +1 -1
  97. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +1 -1
  98. package/styled-components/cjs/index.js +11 -0
  99. package/styled-components/es/components/Cell/Cell.js +62 -0
  100. package/styled-components/es/components/Cell/Cell.styles.js +25 -0
  101. package/styled-components/es/components/Cell/Cell.tokens.js +42 -0
  102. package/styled-components/es/components/Cell/Cell.types.js +1 -0
  103. package/styled-components/es/components/Cell/Textbox/Textbox.js +12 -0
  104. package/styled-components/es/components/Cell/Textbox/Textbox.styles.js +5 -0
  105. package/styled-components/es/components/Cell/Textbox/Textbox.types.js +1 -0
  106. package/styled-components/es/components/Cell/Textbox/ui/TextLabel.js +9 -0
  107. package/styled-components/es/components/Cell/Textbox/ui/TextSubtitle.js +9 -0
  108. package/styled-components/es/components/Cell/Textbox/ui/TextTitle.js +9 -0
  109. package/styled-components/es/components/Cell/index.js +6 -0
  110. package/styled-components/es/components/Cell/variations/_size/base.js +2 -0
  111. package/styled-components/es/components/Cell/variations/_size/tokens.json +1 -0
  112. package/styled-components/es/components/Cell/variations/_stretching/base.js +3 -0
  113. package/styled-components/es/components/Cell/variations/_stretching/tokens.json +1 -0
  114. package/styled-components/es/components/Cell/variations/_view/base.js +3 -0
  115. package/styled-components/es/components/Cell/variations/_view/tokens.json +1 -0
  116. package/styled-components/es/components/Dropdown/Dropdown.js +1 -2
  117. package/styled-components/es/components/Popover/Popover.js +31 -46
  118. package/styled-components/es/examples/plasma_b2c/components/Cell/Cell.config.js +25 -0
  119. package/styled-components/es/examples/plasma_b2c/components/Cell/Cell.js +6 -0
  120. package/styled-components/es/examples/plasma_b2c/components/Cell/Cell.stories.tsx +131 -0
  121. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +1 -1
  122. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +1 -1
  123. package/styled-components/es/examples/plasma_b2c/components/Popover/Popover.stories.tsx +0 -7
  124. package/styled-components/es/examples/plasma_web/components/Cell/Cell.config.js +25 -0
  125. package/styled-components/es/examples/plasma_web/components/Cell/Cell.js +6 -0
  126. package/styled-components/es/examples/plasma_web/components/Cell/Cell.stories.tsx +131 -0
  127. package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +1 -1
  128. package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +1 -1
  129. package/styled-components/es/index.js +1 -0
  130. package/types/components/Cell/Cell.d.ts +27 -0
  131. package/types/components/Cell/Cell.d.ts.map +1 -0
  132. package/types/components/Cell/Cell.styles.d.ts +10 -0
  133. package/types/components/Cell/Cell.styles.d.ts.map +1 -0
  134. package/types/components/Cell/Cell.tokens.d.ts +43 -0
  135. package/types/components/Cell/Cell.tokens.d.ts.map +1 -0
  136. package/types/components/Cell/Cell.types.d.ts +46 -0
  137. package/types/components/Cell/Cell.types.d.ts.map +1 -0
  138. package/types/components/Cell/Textbox/Textbox.d.ts +4 -0
  139. package/types/components/Cell/Textbox/Textbox.d.ts.map +1 -0
  140. package/types/components/Cell/Textbox/Textbox.styles.d.ts +2 -0
  141. package/types/components/Cell/Textbox/Textbox.styles.d.ts.map +1 -0
  142. package/types/components/Cell/Textbox/Textbox.types.d.ts +35 -0
  143. package/types/components/Cell/Textbox/Textbox.types.d.ts.map +1 -0
  144. package/types/components/Cell/Textbox/ui/TextLabel.d.ts +5 -0
  145. package/types/components/Cell/Textbox/ui/TextLabel.d.ts.map +1 -0
  146. package/types/components/Cell/Textbox/ui/TextSubtitle.d.ts +5 -0
  147. package/types/components/Cell/Textbox/ui/TextSubtitle.d.ts.map +1 -0
  148. package/types/components/Cell/Textbox/ui/TextTitle.d.ts +5 -0
  149. package/types/components/Cell/Textbox/ui/TextTitle.d.ts.map +1 -0
  150. package/types/components/Cell/index.d.ts +9 -0
  151. package/types/components/Cell/index.d.ts.map +1 -0
  152. package/types/components/Cell/variations/_size/base.d.ts +2 -0
  153. package/types/components/Cell/variations/_size/base.d.ts.map +1 -0
  154. package/types/components/Cell/variations/_stretching/base.d.ts +2 -0
  155. package/types/components/Cell/variations/_stretching/base.d.ts.map +1 -0
  156. package/types/components/Cell/variations/_view/base.d.ts +2 -0
  157. package/types/components/Cell/variations/_view/base.d.ts.map +1 -0
  158. package/types/components/Combobox/Combobox.styles.d.ts +2 -8
  159. package/types/components/Combobox/Combobox.styles.d.ts.map +1 -1
  160. package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
  161. package/types/components/Dropdown/Dropdown.styles.d.ts +1 -7
  162. package/types/components/Dropdown/Dropdown.styles.d.ts.map +1 -1
  163. package/types/components/Popover/Popover.d.ts +2 -2
  164. package/types/components/Popover/Popover.d.ts.map +1 -1
  165. package/types/components/Popover/Popover.types.d.ts +14 -19
  166. package/types/components/Popover/Popover.types.d.ts.map +1 -1
  167. package/types/components/Select/Select.styles.d.ts +2 -8
  168. package/types/components/Select/Select.styles.d.ts.map +1 -1
  169. package/types/examples/plasma_b2c/components/Cell/Cell.config.d.ts +24 -0
  170. package/types/examples/plasma_b2c/components/Cell/Cell.config.d.ts.map +1 -0
  171. package/types/examples/plasma_b2c/components/Cell/Cell.d.ts +48 -0
  172. package/types/examples/plasma_b2c/components/Cell/Cell.d.ts.map +1 -0
  173. package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +2 -2
  174. package/types/examples/plasma_b2c/components/Popover/Popover.d.ts +1 -7
  175. package/types/examples/plasma_b2c/components/Popover/Popover.d.ts.map +1 -1
  176. package/types/examples/plasma_web/components/Cell/Cell.config.d.ts +24 -0
  177. package/types/examples/plasma_web/components/Cell/Cell.config.d.ts.map +1 -0
  178. package/types/examples/plasma_web/components/Cell/Cell.d.ts +48 -0
  179. package/types/examples/plasma_web/components/Cell/Cell.d.ts.map +1 -0
  180. package/types/examples/plasma_web/components/Combobox/Combobox.d.ts +2 -2
  181. package/types/examples/plasma_web/components/Popover/Popover.d.ts +1 -7
  182. package/types/examples/plasma_web/components/Popover/Popover.d.ts.map +1 -1
  183. package/types/examples/sds_engineer/components/Popover/Popover.d.ts +1 -7
  184. package/types/examples/sds_engineer/components/Popover/Popover.d.ts.map +1 -1
  185. package/types/index.d.ts +1 -0
  186. package/types/index.d.ts.map +1 -1
@@ -0,0 +1,62 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { cx } from '../../utils';
3
+ import { CellLeft, CellRight, CellContentWrapper, CellContent } from './Cell.styles';
4
+ import { classes } from './Cell.tokens';
5
+ import { base as viewCSS } from './variations/_view/base';
6
+ import { base as sizeCSS } from './variations/_size/base';
7
+ import { base as stretchingCSS } from './variations/_stretching/base';
8
+ import { Textbox } from './Textbox/Textbox';
9
+ export var cellRoot = function cellRoot(Root) {
10
+ return /*#__PURE__*/forwardRef(function (_ref, outerRootRef) {
11
+ var size = _ref.size,
12
+ view = _ref.view,
13
+ contentLeft = _ref.contentLeft,
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,
19
+ children = _ref.children,
20
+ title = _ref.title,
21
+ subtitle = _ref.subtitle,
22
+ label = _ref.label,
23
+ stretching = _ref.stretching;
24
+ var stretchingClass = classes["".concat(stretching, "Stretching")];
25
+ return /*#__PURE__*/React.createElement(Root, {
26
+ ref: outerRootRef,
27
+ size: size,
28
+ view: view,
29
+ className: cx(stretchingClass, classes.cellRoot)
30
+ }, 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, {
33
+ label: label,
34
+ title: title,
35
+ subtitle: subtitle
36
+ }) : children && children), contentRight && /*#__PURE__*/React.createElement(CellRight, {
37
+ align: alignRight
38
+ }, contentRight)));
39
+ });
40
+ };
41
+ export var cellConfig = {
42
+ name: 'Cell',
43
+ tag: 'div',
44
+ layout: cellRoot,
45
+ base: '',
46
+ variations: {
47
+ view: {
48
+ css: viewCSS
49
+ },
50
+ size: {
51
+ css: sizeCSS
52
+ },
53
+ stretching: {
54
+ css: stretchingCSS
55
+ }
56
+ },
57
+ defaults: {
58
+ view: 'default',
59
+ size: 'm',
60
+ stretching: 'filled'
61
+ }
62
+ };
@@ -0,0 +1,25 @@
1
+ import styled from 'styled-components';
2
+ import { tokens } from './Cell.tokens';
3
+ var alignToFlex = {
4
+ center: 'center',
5
+ top: 'flex-start',
6
+ bottom: 'flex-end'
7
+ };
8
+ export var CellContentWrapper = /*#__PURE__*/styled.div.withConfig({
9
+ componentId: "plasma-new-hope__sc-16emz3n-0"
10
+ })(["display:flex;flex:auto;justify-content:space-between;gap:var(", ");"], tokens.cellGap);
11
+ export var CellContent = /*#__PURE__*/styled.div.withConfig({
12
+ componentId: "plasma-new-hope__sc-16emz3n-1"
13
+ })(["display:flex;align-items:center;"]);
14
+ export var CellLeft = /*#__PURE__*/styled.div.withConfig({
15
+ componentId: "plasma-new-hope__sc-16emz3n-2"
16
+ })(["display:flex;align-items:", ";"], function (_ref) {
17
+ var align = _ref.align;
18
+ return alignToFlex[align];
19
+ });
20
+ export var CellRight = /*#__PURE__*/styled.div.withConfig({
21
+ componentId: "plasma-new-hope__sc-16emz3n-3"
22
+ })(["display:flex;align-items:", ";text-align:right;"], function (_ref2) {
23
+ var align = _ref2.align;
24
+ return alignToFlex[align];
25
+ });
@@ -0,0 +1,42 @@
1
+ export var tokens = {
2
+ cellColor: '--plasma-cell-color',
3
+ cellBackgroundColor: '--plasma-cell-background-color',
4
+ cellPadding: '--plasma-cell-padding',
5
+ cellPaddingLeftContent: '--plasma-cell-padding-left-content',
6
+ cellPaddingContent: '--plasma-cell-padding-content',
7
+ cellPaddingRightContent: '--plasma-cell-padding-right-content',
8
+ cellTextboxGap: '--plasma-cell-textbox-gap',
9
+ cellGap: '--plasma-cell-gap',
10
+ cellWidth: '--plasma-cell-width',
11
+ cellLabelColor: '--plasma-cell-label-color',
12
+ cellLabelFontFamily: '--plasma-cell-label-font-family',
13
+ cellLabelFontSize: '--plasma-cell-label-font-size',
14
+ cellLabelFontStyle: '--plasma-cell-label-font-style',
15
+ cellLabelFontWeight: '--plasma-cell-label-font-weight',
16
+ cellLabelLetterSpacing: '--plasma-cell-label-letter-spacing',
17
+ cellLabelLineHeight: '--plasma-cell-label-line-height',
18
+ cellTitleColor: '--plasma-cell-title-color',
19
+ cellTitleFontFamily: '--plasma-cell-title-font-family',
20
+ cellTitleFontSize: '--plasma-cell-title-font-size',
21
+ cellTitleFontStyle: '--plasma-cell-title-font-style',
22
+ cellTitleFontWeight: '--plasma-cell-title-font-weight',
23
+ cellTitleLetterSpacing: '--plasma-cell-title-letter-spacing',
24
+ cellTitleLineHeight: '--plasma-cell-title-line-height',
25
+ cellSubtitleColor: '--plasma-cell-subtitle-color',
26
+ cellSubtitleFontFamily: '--plasma-cell-subtitle-font-family',
27
+ cellSubtitleFontSize: '--plasma-cell-subtitle-font-size',
28
+ cellSubtitleFontStyle: '--plasma-cell-subtitle-font-style',
29
+ cellSubtitleFontWeight: '--plasma-cell-subtitle-font-weight',
30
+ cellSubtitleLetterSpacing: '--plasma-cell-subtitle-letter-spacing',
31
+ cellSubtitleLineHeight: '--plasma-cell-subtitle-line-height'
32
+ };
33
+ export var classes = {
34
+ autoStretching: 'cell-stretching-auto',
35
+ filledStretching: 'cell-stretching-filled',
36
+ fixedStretching: 'cell-stretching-fixed',
37
+ cellWrapper: 'cell-wrapper',
38
+ cellRoot: 'cell-root',
39
+ cellContent: 'cell-content',
40
+ cellLeftContent: 'cell-left-content',
41
+ cellRightContent: 'cell-right-content'
42
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { TextboxStyled } from './Textbox.styles';
3
+ import { TextLabel } from './ui/TextLabel';
4
+ import { TextTitle } from './ui/TextTitle';
5
+ import { TextSubtitle } from './ui/TextSubtitle';
6
+ export var Textbox = function Textbox(_ref) {
7
+ var label = _ref.label,
8
+ title = _ref.title,
9
+ subtitle = _ref.subtitle,
10
+ children = _ref.children;
11
+ return /*#__PURE__*/React.createElement(TextboxStyled, null, label || title || subtitle ? /*#__PURE__*/React.createElement(React.Fragment, null, label && /*#__PURE__*/React.createElement(TextLabel, null, label), title && /*#__PURE__*/React.createElement(TextTitle, null, title), subtitle && /*#__PURE__*/React.createElement(TextSubtitle, null, subtitle)) : children);
12
+ };
@@ -0,0 +1,5 @@
1
+ import styled from 'styled-components';
2
+ import { tokens } from '../Cell.tokens';
3
+ export var TextboxStyled = /*#__PURE__*/styled.div.withConfig({
4
+ componentId: "plasma-new-hope__sc-t2ald4-0"
5
+ })(["display:flex;flex-direction:column;gap:var(", ");"], tokens.cellTextboxGap);
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+ import { tokens } from '../../Cell.tokens';
4
+ var StyledTextLabel = /*#__PURE__*/styled.div.withConfig({
5
+ componentId: "plasma-new-hope__sc-6e2num-0"
6
+ })(["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);
7
+ export var TextLabel = function TextLabel(props) {
8
+ return /*#__PURE__*/React.createElement(StyledTextLabel, null, props.children);
9
+ };
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+ import { tokens } from '../../Cell.tokens';
4
+ var StyledTextSubtitle = /*#__PURE__*/styled.div.withConfig({
5
+ componentId: "plasma-new-hope__sc-jj01ut-0"
6
+ })(["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);
7
+ export var TextSubtitle = function TextSubtitle(props) {
8
+ return /*#__PURE__*/React.createElement(StyledTextSubtitle, null, props.children);
9
+ };
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+ import { tokens } from '../../Cell.tokens';
4
+ var StyledTextTitle = /*#__PURE__*/styled.div.withConfig({
5
+ componentId: "plasma-new-hope__sc-1mxjeba-0"
6
+ })(["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);
7
+ export var TextTitle = function TextTitle(props) {
8
+ return /*#__PURE__*/React.createElement(StyledTextTitle, null, props.children);
9
+ };
@@ -0,0 +1,6 @@
1
+ export { TextLabel } from './Textbox/ui/TextLabel';
2
+ export { TextTitle } from './Textbox/ui/TextTitle';
3
+ export { TextSubtitle } from './Textbox/ui/TextSubtitle';
4
+ export { cellRoot, cellConfig } from './Cell';
5
+ export { tokens as cellTokens, classes as cellClasses } from './Cell.tokens';
6
+ export { Textbox } from './Textbox/Textbox';
@@ -0,0 +1,2 @@
1
+ import { css } from 'styled-components';
2
+ export var base = /*#__PURE__*/css([""]);
@@ -0,0 +1 @@
1
+ ["--plasma-cell-left-height", "--plasma-cell-right-height", "--plasma-cell-height"]
@@ -0,0 +1,3 @@
1
+ import { css } from 'styled-components';
2
+ import { classes, tokens } from '../../Cell.tokens';
3
+ export var base = /*#__PURE__*/css(["&.", "{width:var(", ");}&.", "{width:100%;}&.", "{width:auto;}"], classes.fixedStretching, tokens.cellWidth, classes.filledStretching, classes.autoStretching);
@@ -0,0 +1 @@
1
+ ["--plasma-button-width"]
@@ -0,0 +1,3 @@
1
+ import { css } from 'styled-components';
2
+ import { tokens } from '../../Cell.tokens';
3
+ export var base = /*#__PURE__*/css(["color:var(", ");background-color:var(", ");width:100%;display:flex;gap:var(", ");&:focus{outline:0 none;}"], tokens.cellColor, tokens.cellBackgroundColor, tokens.cellGap);
@@ -0,0 +1 @@
1
+ ["--plasma-cell-color", "--plasma-cell-background-color"]
@@ -62,7 +62,6 @@ export var dropdownRoot = function dropdownRoot(Root) {
62
62
  placement: getPlacements(placement),
63
63
  trigger: trigger,
64
64
  closeOnOverlayClick: closeOnOverlayClick,
65
- closeOnBeyondTargetHover: false,
66
65
  closeOnEsc: closeOnEsc,
67
66
  isFocusTrapped: isFocusTrapped,
68
67
  frame: frame
@@ -87,7 +86,7 @@ export var dropdownConfig = {
87
86
  }
88
87
  },
89
88
  defaults: {
90
- view: 'default',
89
+ view: 'primary',
91
90
  size: 'm'
92
91
  }
93
92
  };
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["target", "children", "isOpen", "trigger", "hasArrow", "frame", "className", "placement", "offset", "zIndex", "isFocusTrapped", "closeOnEsc", "preventOverflow", "usePortal", "view", "onToggle"];
2
+ var _excluded = ["target", "children", "isOpen", "trigger", "hasArrow", "frame", "className", "placement", "offset", "zIndex", "isFocusTrapped", "closeOnOverlayClick", "closeOnEsc", "preventOverflow", "usePortal", "view", "onToggle"];
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -30,41 +30,33 @@ export var POPOVER_PORTAL_ID = 'plasma-popover-root';
30
30
  * и вызова по клику либо ховеру.
31
31
  */
32
32
  export var popoverRoot = function popoverRoot(Root) {
33
- return /*#__PURE__*/forwardRef(function (props, outerRootRef) {
34
- var _placement$;
35
- var target = props.target,
36
- children = props.children,
37
- isOpen = props.isOpen,
38
- _props$trigger = props.trigger,
39
- trigger = _props$trigger === void 0 ? 'click' : _props$trigger,
40
- hasArrow = props.hasArrow,
41
- _props$frame = props.frame,
42
- frame = _props$frame === void 0 ? 'document' : _props$frame,
43
- className = props.className,
44
- _props$placement = props.placement,
45
- placement = _props$placement === void 0 ? 'auto' : _props$placement,
46
- _props$offset = props.offset,
47
- offset = _props$offset === void 0 ? [0, 0] : _props$offset,
48
- zIndex = props.zIndex,
49
- _props$isFocusTrapped = props.isFocusTrapped,
50
- isFocusTrapped = _props$isFocusTrapped === void 0 ? true : _props$isFocusTrapped,
51
- _props$closeOnEsc = props.closeOnEsc,
52
- closeOnEsc = _props$closeOnEsc === void 0 ? true : _props$closeOnEsc,
53
- _props$preventOverflo = props.preventOverflow,
54
- preventOverflow = _props$preventOverflo === void 0 ? true : _props$preventOverflo,
55
- _props$usePortal = props.usePortal,
56
- usePortal = _props$usePortal === void 0 ? false : _props$usePortal,
57
- view = props.view,
58
- onToggle = props.onToggle,
59
- rest = _objectWithoutProperties(props, _excluded);
60
- var closeOnOverlayClick = true;
61
- var closeOnBeyondTargetHover = true;
62
- if (props.trigger === 'click' && props.closeOnOverlayClick === false) {
63
- closeOnOverlayClick = false;
64
- }
65
- if (props.trigger === 'hover' && props.closeOnBeyondTargetHover === false) {
66
- closeOnBeyondTargetHover = false;
67
- }
33
+ return /*#__PURE__*/forwardRef(function (_ref, outerRootRef) {
34
+ var target = _ref.target,
35
+ children = _ref.children,
36
+ isOpen = _ref.isOpen,
37
+ trigger = _ref.trigger,
38
+ hasArrow = _ref.hasArrow,
39
+ _ref$frame = _ref.frame,
40
+ frame = _ref$frame === void 0 ? 'document' : _ref$frame,
41
+ className = _ref.className,
42
+ _ref$placement = _ref.placement,
43
+ placement = _ref$placement === void 0 ? 'auto' : _ref$placement,
44
+ _ref$offset = _ref.offset,
45
+ offset = _ref$offset === void 0 ? [0, 0] : _ref$offset,
46
+ zIndex = _ref.zIndex,
47
+ _ref$isFocusTrapped = _ref.isFocusTrapped,
48
+ isFocusTrapped = _ref$isFocusTrapped === void 0 ? true : _ref$isFocusTrapped,
49
+ _ref$closeOnOverlayCl = _ref.closeOnOverlayClick,
50
+ closeOnOverlayClick = _ref$closeOnOverlayCl === void 0 ? true : _ref$closeOnOverlayCl,
51
+ _ref$closeOnEsc = _ref.closeOnEsc,
52
+ closeOnEsc = _ref$closeOnEsc === void 0 ? true : _ref$closeOnEsc,
53
+ _ref$preventOverflow = _ref.preventOverflow,
54
+ preventOverflow = _ref$preventOverflow === void 0 ? true : _ref$preventOverflow,
55
+ _ref$usePortal = _ref.usePortal,
56
+ usePortal = _ref$usePortal === void 0 ? false : _ref$usePortal,
57
+ view = _ref.view,
58
+ onToggle = _ref.onToggle,
59
+ rest = _objectWithoutProperties(_ref, _excluded);
68
60
  var rootRef = useRef(null);
69
61
  var popoverRef = useRef(null);
70
62
  var handleRef = useForkRef(rootRef, outerRootRef);
@@ -85,9 +77,7 @@ export var popoverRoot = function popoverRoot(Root) {
85
77
  opacity: isOpen ? 1 : 0
86
78
  };
87
79
  var _usePopper = usePopper(rootRef.current, popoverRef.current, {
88
- // TODO: #1121
89
- // eslint-disable-next-line no-nested-ternary
90
- placement: isAutoArray ? (_placement$ = placement[0]) !== null && _placement$ !== void 0 && _placement$.endsWith('start') ? 'auto-start' : 'auto' : placement,
80
+ placement: isAutoArray ? 'auto' : placement,
91
81
  modifiers: [{
92
82
  name: 'preventOverflow',
93
83
  options: {
@@ -223,15 +213,10 @@ export var popoverRoot = function popoverRoot(Root) {
223
213
  }, target), children && portalRef.current && /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React.createElement(Root, _extends({
224
214
  view: view,
225
215
  className: className
226
- }, rest, {
227
- onMouseEnter: closeOnBeyondTargetHover ? undefined : onMouseEnter,
228
- onMouseLeave: closeOnBeyondTargetHover ? undefined : onMouseEnter
229
- }), /*#__PURE__*/React.createElement(StyledPopover, _extends({}, attributes.popper, {
216
+ }, rest), /*#__PURE__*/React.createElement(StyledPopover, _extends({}, attributes.popper, {
230
217
  className: classes.root,
231
218
  ref: popoverForkRef,
232
- style: _objectSpread(_objectSpread(_objectSpread({}, styles.popper), {
233
- display: isOpen ? 'block' : 'none'
234
- }), initialStyles),
219
+ style: _objectSpread(_objectSpread({}, styles.popper), initialStyles),
235
220
  zIndex: zIndex
236
221
  }), hasArrow && /*#__PURE__*/React.createElement(StyledArrow, _extends({
237
222
  className: classes.arrow,
@@ -0,0 +1,25 @@
1
+ import { css } from 'styled-components';
2
+ import { cellTokens } from '../../../../components/Cell';
3
+ export var config = {
4
+ defaults: {
5
+ view: 'default',
6
+ size: 'm',
7
+ stretching: 'filled'
8
+ },
9
+ variations: {
10
+ view: {
11
+ "default": /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-secondary);", ":transparent;"], cellTokens.cellColor, cellTokens.cellLabelColor, cellTokens.cellTitleColor, cellTokens.cellSubtitleColor, cellTokens.cellBackgroundColor)
12
+ },
13
+ size: {
14
+ l: /*#__PURE__*/css(["", ":15rem;", ":0rem;", ":0rem;", ":0rem;", ":0rem;", ":0.125rem;", ":0.375rem;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);"], cellTokens.cellWidth, cellTokens.cellPadding, cellTokens.cellPaddingLeftContent, cellTokens.cellPaddingContent, cellTokens.cellPaddingRightContent, cellTokens.cellTextboxGap, cellTokens.cellGap, cellTokens.cellLabelFontFamily, cellTokens.cellLabelFontSize, cellTokens.cellLabelFontStyle, cellTokens.cellLabelFontWeight, cellTokens.cellLabelLetterSpacing, cellTokens.cellLabelLineHeight, cellTokens.cellTitleFontFamily, cellTokens.cellTitleFontSize, cellTokens.cellTitleFontStyle, cellTokens.cellTitleFontWeight, cellTokens.cellTitleLetterSpacing, cellTokens.cellTitleLineHeight, cellTokens.cellSubtitleFontFamily, cellTokens.cellSubtitleFontSize, cellTokens.cellSubtitleFontStyle, cellTokens.cellSubtitleFontWeight, cellTokens.cellSubtitleLetterSpacing, cellTokens.cellSubtitleLineHeight),
15
+ m: /*#__PURE__*/css(["", ":15rem;", ":0rem;", ":0rem;", ":0rem;", ":0rem;", ":0.125rem;", ":0.375rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);"], cellTokens.cellWidth, cellTokens.cellPadding, cellTokens.cellPaddingLeftContent, cellTokens.cellPaddingContent, cellTokens.cellPaddingRightContent, cellTokens.cellTextboxGap, cellTokens.cellGap, cellTokens.cellLabelFontFamily, cellTokens.cellLabelFontSize, cellTokens.cellLabelFontStyle, cellTokens.cellLabelFontWeight, cellTokens.cellLabelLetterSpacing, cellTokens.cellLabelLineHeight, cellTokens.cellTitleFontFamily, cellTokens.cellTitleFontSize, cellTokens.cellTitleFontStyle, cellTokens.cellTitleFontWeight, cellTokens.cellTitleLetterSpacing, cellTokens.cellTitleLineHeight, cellTokens.cellSubtitleFontFamily, cellTokens.cellSubtitleFontSize, cellTokens.cellSubtitleFontStyle, cellTokens.cellSubtitleFontWeight, cellTokens.cellSubtitleLetterSpacing, cellTokens.cellSubtitleLineHeight),
16
+ s: /*#__PURE__*/css(["", ":15rem;", ":0rem;", ":0rem;", ":0rem;", ":0rem;", ":0.125rem;", ":0.375rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);"], cellTokens.cellWidth, cellTokens.cellPadding, cellTokens.cellPaddingLeftContent, cellTokens.cellPaddingContent, cellTokens.cellPaddingRightContent, cellTokens.cellTextboxGap, cellTokens.cellGap, cellTokens.cellLabelFontFamily, cellTokens.cellLabelFontSize, cellTokens.cellLabelFontStyle, cellTokens.cellLabelFontWeight, cellTokens.cellLabelLetterSpacing, cellTokens.cellLabelLineHeight, cellTokens.cellTitleFontFamily, cellTokens.cellTitleFontSize, cellTokens.cellTitleFontStyle, cellTokens.cellTitleFontWeight, cellTokens.cellTitleLetterSpacing, cellTokens.cellTitleLineHeight, cellTokens.cellSubtitleFontFamily, cellTokens.cellSubtitleFontSize, cellTokens.cellSubtitleFontStyle, cellTokens.cellSubtitleFontWeight, cellTokens.cellSubtitleLetterSpacing, cellTokens.cellSubtitleLineHeight),
17
+ xs: /*#__PURE__*/css(["", ":15rem;", ":0rem;", ":0rem;", ":0rem;", ":0rem;", ":0.125rem;", ":0.25rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);"], cellTokens.cellWidth, cellTokens.cellPadding, cellTokens.cellPaddingLeftContent, cellTokens.cellPaddingContent, cellTokens.cellPaddingRightContent, cellTokens.cellTextboxGap, cellTokens.cellGap, cellTokens.cellLabelFontFamily, cellTokens.cellLabelFontSize, cellTokens.cellLabelFontStyle, cellTokens.cellLabelFontWeight, cellTokens.cellLabelLetterSpacing, cellTokens.cellLabelLineHeight, cellTokens.cellTitleFontFamily, cellTokens.cellTitleFontSize, cellTokens.cellTitleFontStyle, cellTokens.cellTitleFontWeight, cellTokens.cellTitleLetterSpacing, cellTokens.cellTitleLineHeight, cellTokens.cellSubtitleFontFamily, cellTokens.cellSubtitleFontSize, cellTokens.cellSubtitleFontStyle, cellTokens.cellSubtitleFontWeight, cellTokens.cellSubtitleLetterSpacing, cellTokens.cellSubtitleLineHeight)
18
+ },
19
+ stretching: {
20
+ auto: /*#__PURE__*/css([""]),
21
+ filled: /*#__PURE__*/css([""]),
22
+ fixed: /*#__PURE__*/css([""])
23
+ }
24
+ }
25
+ };
@@ -0,0 +1,6 @@
1
+ import { cellConfig, Textbox, TextLabel, TextSubtitle, TextTitle } from '../../../../components/Cell';
2
+ import { component, mergeConfig } from '../../../../engines';
3
+ import { config } from './Cell.config';
4
+ var mergedConfig = /*#__PURE__*/mergeConfig(cellConfig, config);
5
+ export var Cell = /*#__PURE__*/component(mergedConfig);
6
+ export { Textbox, TextLabel, TextSubtitle, TextTitle };
@@ -0,0 +1,131 @@
1
+ import React from 'react';
2
+ import type { ComponentProps } from 'react';
3
+ import type { StoryObj, Meta } from '@storybook/react';
4
+ import styled from 'styled-components';
5
+
6
+ import { WithTheme } from '../../../_helpers';
7
+ import { Avatar } from '../Avatar/Avatar';
8
+ import { IconChevronLeft } from '../../../../components/_Icon';
9
+
10
+ import { Cell, Textbox, TextTitle } from './Cell';
11
+
12
+ type StoryProps = ComponentProps<typeof Cell> & {
13
+ itemsCount?: number;
14
+ enableLeftContent?: boolean;
15
+ enableRightContent?: boolean;
16
+ };
17
+ type Story = StoryObj<StoryProps>;
18
+
19
+ const sizes = ['l', 'm', 's', 'xs'];
20
+ const stretchingValues = ['fixed', 'filled', 'auto'];
21
+ const alignLeft = ['top', 'center', 'bottom'];
22
+ const alignRight = ['top', 'center', 'bottom'];
23
+
24
+ type SizesCell = 'xs' | 'l' | 'm' | 's' | undefined;
25
+ type SizesAvatar = 'l' | 'm' | 's';
26
+
27
+ const getSize = (size: SizesCell): SizesAvatar => {
28
+ if (size === 'xs' || !size) {
29
+ return 's';
30
+ }
31
+
32
+ return size;
33
+ };
34
+
35
+ const meta: Meta<typeof Cell> = {
36
+ title: 'plasma_b2c/Cell',
37
+ decorators: [WithTheme],
38
+ argTypes: {
39
+ size: {
40
+ options: sizes,
41
+ control: {
42
+ type: 'select',
43
+ },
44
+ },
45
+ stretching: {
46
+ options: stretchingValues,
47
+ control: {
48
+ type: 'select',
49
+ },
50
+ },
51
+ alignLeft: {
52
+ options: alignLeft,
53
+ control: {
54
+ type: 'select',
55
+ },
56
+ },
57
+ alignRight: {
58
+ options: alignRight,
59
+ control: {
60
+ type: 'select',
61
+ },
62
+ },
63
+ },
64
+ };
65
+
66
+ export default meta;
67
+
68
+ const ChevronRight = styled(IconChevronLeft)`
69
+ transform: rotate(180deg);
70
+ color: var(--text-secondary);
71
+ `;
72
+
73
+ export const Default: Story = {
74
+ args: {
75
+ size: 'm',
76
+ stretching: 'filled',
77
+ enableLeftContent: false,
78
+ enableRightContent: false,
79
+ alignLeft: 'center',
80
+ alignRight: 'center',
81
+ title: 'Title',
82
+ subtitle: 'Subtitle',
83
+ label: 'Label',
84
+ },
85
+ render: ({ ...args }: StoryProps) => {
86
+ return (
87
+ <Cell
88
+ contentLeft={
89
+ !args.enableLeftContent && (
90
+ <Avatar size={getSize(args.size)} url="https://avatars.githubusercontent.com/u/1813468?v=4" />
91
+ )
92
+ }
93
+ alignLeft={args.alignLeft}
94
+ contentRight={!args.enableRightContent && <ChevronRight color="inherit" size="xs" />}
95
+ alignRight={args.alignRight}
96
+ title={args.title}
97
+ subtitle={args.subtitle}
98
+ label={args.label}
99
+ {...args}
100
+ />
101
+ );
102
+ },
103
+ };
104
+
105
+ export const WithContentTextboxCustom: Story = {
106
+ args: {
107
+ size: 'm',
108
+ stretching: 'filled',
109
+ },
110
+ render: ({ ...args }: StoryProps) => {
111
+ const MyStyledText = styled.div`
112
+ font-size: 12px;
113
+ font-weight: 600;
114
+ opacity: 0.5;
115
+ `;
116
+ return (
117
+ <Cell
118
+ contentLeft={
119
+ <Avatar size={getSize(args.size)} url="https://avatars.githubusercontent.com/u/1813468?v=4" />
120
+ }
121
+ contentRight={<ChevronRight color="inherit" size="xs" />}
122
+ {...args}
123
+ >
124
+ <Textbox>
125
+ <TextTitle>Title</TextTitle>
126
+ <MyStyledText>My styled Text</MyStyledText>
127
+ </Textbox>
128
+ </Cell>
129
+ );
130
+ },
131
+ };
@@ -51,7 +51,7 @@ const meta: Meta<StoryDropdownProps> = {
51
51
  closeOnEsc: true,
52
52
  isFocusTrapped: true,
53
53
  skidding: 0,
54
- distance: 0,
54
+ distance: 6,
55
55
  },
56
56
  };
57
57
 
@@ -51,7 +51,7 @@ const meta: Meta<StoryDropdownProps> = {
51
51
  closeOnEsc: true,
52
52
  isFocusTrapped: true,
53
53
  skidding: 0,
54
- distance: 0,
54
+ distance: 6,
55
55
  },
56
56
  };
57
57
 
@@ -33,12 +33,6 @@ const meta: Meta<typeof Popover> = {
33
33
  },
34
34
  table: { defaultValue: { summary: true } },
35
35
  },
36
- closeOnBeyondTargetHover: {
37
- control: {
38
- type: 'boolean',
39
- },
40
- table: { defaultValue: { summary: true } },
41
- },
42
36
  closeOnEsc: {
43
37
  control: {
44
38
  type: 'boolean',
@@ -68,7 +62,6 @@ const meta: Meta<typeof Popover> = {
68
62
  placement: 'bottom',
69
63
  trigger: 'click',
70
64
  closeOnOverlayClick: true,
71
- closeOnBeyondTargetHover: true,
72
65
  closeOnEsc: true,
73
66
  isFocusTrapped: true,
74
67
  skidding: 0,
@@ -0,0 +1,25 @@
1
+ import { css } from 'styled-components';
2
+ import { cellTokens } from '../../../../components/Cell';
3
+ export var config = {
4
+ defaults: {
5
+ view: 'default',
6
+ size: 'm',
7
+ stretching: 'filled'
8
+ },
9
+ variations: {
10
+ view: {
11
+ "default": /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-secondary);", ":transparent;"], cellTokens.cellColor, cellTokens.cellLabelColor, cellTokens.cellTitleColor, cellTokens.cellSubtitleColor, cellTokens.cellBackgroundColor)
12
+ },
13
+ size: {
14
+ l: /*#__PURE__*/css(["", ":15rem;", ":0rem;", ":0rem;", ":0rem;", ":0rem;", ":0.125rem;", ":0.375rem;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);"], cellTokens.cellWidth, cellTokens.cellPadding, cellTokens.cellPaddingLeftContent, cellTokens.cellPaddingContent, cellTokens.cellPaddingRightContent, cellTokens.cellTextboxGap, cellTokens.cellGap, cellTokens.cellLabelFontFamily, cellTokens.cellLabelFontSize, cellTokens.cellLabelFontStyle, cellTokens.cellLabelFontWeight, cellTokens.cellLabelLetterSpacing, cellTokens.cellLabelLineHeight, cellTokens.cellTitleFontFamily, cellTokens.cellTitleFontSize, cellTokens.cellTitleFontStyle, cellTokens.cellTitleFontWeight, cellTokens.cellTitleLetterSpacing, cellTokens.cellTitleLineHeight, cellTokens.cellSubtitleFontFamily, cellTokens.cellSubtitleFontSize, cellTokens.cellSubtitleFontStyle, cellTokens.cellSubtitleFontWeight, cellTokens.cellSubtitleLetterSpacing, cellTokens.cellSubtitleLineHeight),
15
+ m: /*#__PURE__*/css(["", ":15rem;", ":0rem;", ":0rem;", ":0rem;", ":0rem;", ":0.125rem;", ":0.375rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);"], cellTokens.cellWidth, cellTokens.cellPadding, cellTokens.cellPaddingLeftContent, cellTokens.cellPaddingContent, cellTokens.cellPaddingRightContent, cellTokens.cellTextboxGap, cellTokens.cellGap, cellTokens.cellLabelFontFamily, cellTokens.cellLabelFontSize, cellTokens.cellLabelFontStyle, cellTokens.cellLabelFontWeight, cellTokens.cellLabelLetterSpacing, cellTokens.cellLabelLineHeight, cellTokens.cellTitleFontFamily, cellTokens.cellTitleFontSize, cellTokens.cellTitleFontStyle, cellTokens.cellTitleFontWeight, cellTokens.cellTitleLetterSpacing, cellTokens.cellTitleLineHeight, cellTokens.cellSubtitleFontFamily, cellTokens.cellSubtitleFontSize, cellTokens.cellSubtitleFontStyle, cellTokens.cellSubtitleFontWeight, cellTokens.cellSubtitleLetterSpacing, cellTokens.cellSubtitleLineHeight),
16
+ s: /*#__PURE__*/css(["", ":15rem;", ":0rem;", ":0rem;", ":0rem;", ":0rem;", ":0.125rem;", ":0.375rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);"], cellTokens.cellWidth, cellTokens.cellPadding, cellTokens.cellPaddingLeftContent, cellTokens.cellPaddingContent, cellTokens.cellPaddingRightContent, cellTokens.cellTextboxGap, cellTokens.cellGap, cellTokens.cellLabelFontFamily, cellTokens.cellLabelFontSize, cellTokens.cellLabelFontStyle, cellTokens.cellLabelFontWeight, cellTokens.cellLabelLetterSpacing, cellTokens.cellLabelLineHeight, cellTokens.cellTitleFontFamily, cellTokens.cellTitleFontSize, cellTokens.cellTitleFontStyle, cellTokens.cellTitleFontWeight, cellTokens.cellTitleLetterSpacing, cellTokens.cellTitleLineHeight, cellTokens.cellSubtitleFontFamily, cellTokens.cellSubtitleFontSize, cellTokens.cellSubtitleFontStyle, cellTokens.cellSubtitleFontWeight, cellTokens.cellSubtitleLetterSpacing, cellTokens.cellSubtitleLineHeight),
17
+ xs: /*#__PURE__*/css(["", ":15rem;", ":0rem;", ":0rem;", ":0rem;", ":0rem;", ":0.125rem;", ":0.25rem;", ":0.375rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);"], cellTokens.cellWidth, cellTokens.cellPadding, cellTokens.cellPaddingLeftContent, cellTokens.cellPaddingContent, cellTokens.cellPaddingRightContent, cellTokens.cellTextboxGap, cellTokens.cellGap, cellTokens.cellGap, cellTokens.cellLabelFontFamily, cellTokens.cellLabelFontSize, cellTokens.cellLabelFontStyle, cellTokens.cellLabelFontWeight, cellTokens.cellLabelLetterSpacing, cellTokens.cellLabelLineHeight, cellTokens.cellTitleFontFamily, cellTokens.cellTitleFontSize, cellTokens.cellTitleFontStyle, cellTokens.cellTitleFontWeight, cellTokens.cellTitleLetterSpacing, cellTokens.cellTitleLineHeight, cellTokens.cellSubtitleFontFamily, cellTokens.cellSubtitleFontSize, cellTokens.cellSubtitleFontStyle, cellTokens.cellSubtitleFontWeight, cellTokens.cellSubtitleLetterSpacing, cellTokens.cellSubtitleLineHeight)
18
+ },
19
+ stretching: {
20
+ auto: /*#__PURE__*/css([""]),
21
+ filled: /*#__PURE__*/css([""]),
22
+ fixed: /*#__PURE__*/css([""])
23
+ }
24
+ }
25
+ };
@@ -0,0 +1,6 @@
1
+ import { cellConfig, Textbox, TextLabel, TextSubtitle, TextTitle } from '../../../../components/Cell';
2
+ import { component, mergeConfig } from '../../../../engines';
3
+ import { config } from './Cell.config';
4
+ var mergedConfig = /*#__PURE__*/mergeConfig(cellConfig, config);
5
+ export var Cell = /*#__PURE__*/component(mergedConfig);
6
+ export { Textbox, TextLabel, TextSubtitle, TextTitle };