@salutejs/plasma-new-hope 0.68.1-canary.1154.8509991799.0 → 0.69.0-canary.1148.8507402029.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (158) hide show
  1. package/cjs/components/Cell/Cell.css +3 -0
  2. package/cjs/components/Cell/Cell.js +70 -0
  3. package/cjs/components/Cell/Cell.js.map +1 -0
  4. package/cjs/components/Cell/Cell.styles.js +39 -0
  5. package/cjs/components/Cell/Cell.styles.js.map +1 -0
  6. package/cjs/components/Cell/Cell.styles_ygfo1w.css +1 -0
  7. package/cjs/components/Cell/Cell.tokens.js +50 -0
  8. package/cjs/components/Cell/Cell.tokens.js.map +1 -0
  9. package/cjs/components/Cell/CellTextbox/CellTextbox.js +21 -0
  10. package/cjs/components/Cell/CellTextbox/CellTextbox.js.map +1 -0
  11. package/cjs/components/Cell/CellTextbox/CellTextbox.styles.js +13 -0
  12. package/cjs/components/Cell/CellTextbox/CellTextbox.styles.js.map +1 -0
  13. package/cjs/components/Cell/CellTextbox/ui/CellTextLabel.js +17 -0
  14. package/cjs/components/Cell/CellTextbox/ui/CellTextLabel.js.map +1 -0
  15. package/cjs/components/Cell/CellTextbox/ui/CellTextSubtitle.js +17 -0
  16. package/cjs/components/Cell/CellTextbox/ui/CellTextSubtitle.js.map +1 -0
  17. package/cjs/components/Cell/CellTextbox/ui/CellTextTitle.js +17 -0
  18. package/cjs/components/Cell/CellTextbox/ui/CellTextTitle.js.map +1 -0
  19. package/cjs/components/Cell/variations/_size/base.js +9 -0
  20. package/cjs/components/Cell/variations/_size/base.js.map +1 -0
  21. package/cjs/components/Cell/variations/_size/base_x642ct.css +1 -0
  22. package/cjs/components/Cell/variations/_view/base.js +9 -0
  23. package/cjs/components/Cell/variations/_view/base.js.map +1 -0
  24. package/cjs/components/Cell/variations/_view/base_13f5j4a.css +1 -0
  25. package/cjs/components/Pagination/Pagination.js +13 -14
  26. package/cjs/components/Pagination/Pagination.js.map +1 -1
  27. package/cjs/index.css +4 -0
  28. package/cjs/index.js +14 -0
  29. package/cjs/index.js.map +1 -1
  30. package/es/components/Cell/Cell.css +3 -0
  31. package/es/components/Cell/Cell.js +65 -0
  32. package/es/components/Cell/Cell.js.map +1 -0
  33. package/es/components/Cell/Cell.styles.js +31 -0
  34. package/es/components/Cell/Cell.styles.js.map +1 -0
  35. package/es/components/Cell/Cell.styles_ygfo1w.css +1 -0
  36. package/es/components/Cell/Cell.tokens.js +45 -0
  37. package/es/components/Cell/Cell.tokens.js.map +1 -0
  38. package/es/components/Cell/CellTextbox/CellTextbox.js +17 -0
  39. package/es/components/Cell/CellTextbox/CellTextbox.js.map +1 -0
  40. package/es/components/Cell/CellTextbox/CellTextbox.styles.js +9 -0
  41. package/es/components/Cell/CellTextbox/CellTextbox.styles.js.map +1 -0
  42. package/es/components/Cell/CellTextbox/ui/CellTextLabel.js +13 -0
  43. package/es/components/Cell/CellTextbox/ui/CellTextLabel.js.map +1 -0
  44. package/es/components/Cell/CellTextbox/ui/CellTextSubtitle.js +13 -0
  45. package/es/components/Cell/CellTextbox/ui/CellTextSubtitle.js.map +1 -0
  46. package/es/components/Cell/CellTextbox/ui/CellTextTitle.js +13 -0
  47. package/es/components/Cell/CellTextbox/ui/CellTextTitle.js.map +1 -0
  48. package/es/components/Cell/variations/_size/base.js +5 -0
  49. package/es/components/Cell/variations/_size/base.js.map +1 -0
  50. package/es/components/Cell/variations/_size/base_x642ct.css +1 -0
  51. package/es/components/Cell/variations/_view/base.js +5 -0
  52. package/es/components/Cell/variations/_view/base.js.map +1 -0
  53. package/es/components/Cell/variations/_view/base_13f5j4a.css +1 -0
  54. package/es/components/Pagination/Pagination.js +14 -15
  55. package/es/components/Pagination/Pagination.js.map +1 -1
  56. package/es/index.css +4 -0
  57. package/es/index.js +6 -0
  58. package/es/index.js.map +1 -1
  59. package/package.json +2 -2
  60. package/styled-components/cjs/components/Cell/Cell.js +70 -0
  61. package/styled-components/cjs/components/Cell/Cell.styles.js +35 -0
  62. package/styled-components/cjs/components/Cell/Cell.tokens.js +48 -0
  63. package/styled-components/cjs/components/Cell/Cell.types.js +5 -0
  64. package/styled-components/cjs/components/Cell/CellTextbox/CellTextbox.js +20 -0
  65. package/styled-components/cjs/components/Cell/CellTextbox/CellTextbox.styles.js +12 -0
  66. package/styled-components/cjs/components/Cell/CellTextbox/CellTextbox.types.js +5 -0
  67. package/styled-components/cjs/components/Cell/CellTextbox/ui/CellTextLabel.js +16 -0
  68. package/styled-components/cjs/components/Cell/CellTextbox/ui/CellTextSubtitle.js +16 -0
  69. package/styled-components/cjs/components/Cell/CellTextbox/ui/CellTextTitle.js +16 -0
  70. package/styled-components/cjs/components/Cell/index.js +59 -0
  71. package/styled-components/cjs/components/Cell/variations/_size/base.js +8 -0
  72. package/styled-components/cjs/components/Cell/variations/_size/tokens.json +1 -0
  73. package/styled-components/cjs/components/Cell/variations/_stretching/base.js +9 -0
  74. package/styled-components/cjs/components/Cell/variations/_stretching/tokens.json +1 -0
  75. package/styled-components/cjs/components/Cell/variations/_view/base.js +9 -0
  76. package/styled-components/cjs/components/Cell/variations/_view/tokens.json +1 -0
  77. package/styled-components/cjs/components/Pagination/Pagination.js +13 -14
  78. package/styled-components/cjs/examples/plasma_b2c/components/Cell/Cell.config.js +21 -0
  79. package/styled-components/cjs/examples/plasma_b2c/components/Cell/Cell.js +35 -0
  80. package/styled-components/cjs/examples/plasma_b2c/components/Cell/Cell.stories.tsx +128 -0
  81. package/styled-components/cjs/examples/plasma_b2c/components/Pagination/Pagination.config.js +4 -4
  82. package/styled-components/cjs/examples/plasma_b2c/components/Pagination/Pagination.stories.tsx +7 -14
  83. package/styled-components/cjs/examples/plasma_web/components/Cell/Cell.config.js +21 -0
  84. package/styled-components/cjs/examples/plasma_web/components/Cell/Cell.js +35 -0
  85. package/styled-components/cjs/examples/plasma_web/components/Cell/Cell.stories.tsx +128 -0
  86. package/styled-components/cjs/examples/plasma_web/components/Pagination/Pagination.config.js +4 -4
  87. package/styled-components/cjs/examples/plasma_web/components/Pagination/Pagination.stories.tsx +7 -14
  88. package/styled-components/cjs/index.js +11 -0
  89. package/styled-components/es/components/Cell/Cell.js +61 -0
  90. package/styled-components/es/components/Cell/Cell.styles.js +27 -0
  91. package/styled-components/es/components/Cell/Cell.tokens.js +42 -0
  92. package/styled-components/es/components/Cell/Cell.types.js +1 -0
  93. package/styled-components/es/components/Cell/CellTextbox/CellTextbox.js +13 -0
  94. package/styled-components/es/components/Cell/CellTextbox/CellTextbox.styles.js +5 -0
  95. package/styled-components/es/components/Cell/CellTextbox/CellTextbox.types.js +1 -0
  96. package/styled-components/es/components/Cell/CellTextbox/ui/CellTextLabel.js +9 -0
  97. package/styled-components/es/components/Cell/CellTextbox/ui/CellTextSubtitle.js +9 -0
  98. package/styled-components/es/components/Cell/CellTextbox/ui/CellTextTitle.js +9 -0
  99. package/styled-components/es/components/Cell/index.js +6 -0
  100. package/styled-components/es/components/Cell/variations/_size/base.js +2 -0
  101. package/styled-components/es/components/Cell/variations/_size/tokens.json +1 -0
  102. package/styled-components/es/components/Cell/variations/_stretching/base.js +3 -0
  103. package/styled-components/es/components/Cell/variations/_stretching/tokens.json +1 -0
  104. package/styled-components/es/components/Cell/variations/_view/base.js +3 -0
  105. package/styled-components/es/components/Cell/variations/_view/tokens.json +1 -0
  106. package/styled-components/es/components/Pagination/Pagination.js +13 -14
  107. package/styled-components/es/examples/plasma_b2c/components/Cell/Cell.config.js +15 -0
  108. package/styled-components/es/examples/plasma_b2c/components/Cell/Cell.js +6 -0
  109. package/styled-components/es/examples/plasma_b2c/components/Cell/Cell.stories.tsx +128 -0
  110. package/styled-components/es/examples/plasma_b2c/components/Pagination/Pagination.config.js +4 -4
  111. package/styled-components/es/examples/plasma_b2c/components/Pagination/Pagination.stories.tsx +7 -14
  112. package/styled-components/es/examples/plasma_web/components/Cell/Cell.config.js +15 -0
  113. package/styled-components/es/examples/plasma_web/components/Cell/Cell.js +6 -0
  114. package/styled-components/es/examples/plasma_web/components/Cell/Cell.stories.tsx +128 -0
  115. package/styled-components/es/examples/plasma_web/components/Pagination/Pagination.config.js +4 -4
  116. package/styled-components/es/examples/plasma_web/components/Pagination/Pagination.stories.tsx +7 -14
  117. package/styled-components/es/index.js +1 -0
  118. package/types/components/Cell/Cell.d.ts +23 -0
  119. package/types/components/Cell/Cell.d.ts.map +1 -0
  120. package/types/components/Cell/Cell.styles.d.ts +11 -0
  121. package/types/components/Cell/Cell.styles.d.ts.map +1 -0
  122. package/types/components/Cell/Cell.tokens.d.ts +43 -0
  123. package/types/components/Cell/Cell.tokens.d.ts.map +1 -0
  124. package/types/components/Cell/Cell.types.d.ts +46 -0
  125. package/types/components/Cell/Cell.types.d.ts.map +1 -0
  126. package/types/components/Cell/CellTextbox/CellTextbox.d.ts +4 -0
  127. package/types/components/Cell/CellTextbox/CellTextbox.d.ts.map +1 -0
  128. package/types/components/Cell/CellTextbox/CellTextbox.styles.d.ts +2 -0
  129. package/types/components/Cell/CellTextbox/CellTextbox.styles.d.ts.map +1 -0
  130. package/types/components/Cell/CellTextbox/CellTextbox.types.d.ts +43 -0
  131. package/types/components/Cell/CellTextbox/CellTextbox.types.d.ts.map +1 -0
  132. package/types/components/Cell/CellTextbox/ui/CellTextLabel.d.ts +5 -0
  133. package/types/components/Cell/CellTextbox/ui/CellTextLabel.d.ts.map +1 -0
  134. package/types/components/Cell/CellTextbox/ui/CellTextSubtitle.d.ts +5 -0
  135. package/types/components/Cell/CellTextbox/ui/CellTextSubtitle.d.ts.map +1 -0
  136. package/types/components/Cell/CellTextbox/ui/CellTextTitle.d.ts +5 -0
  137. package/types/components/Cell/CellTextbox/ui/CellTextTitle.d.ts.map +1 -0
  138. package/types/components/Cell/index.d.ts +9 -0
  139. package/types/components/Cell/index.d.ts.map +1 -0
  140. package/types/components/Cell/variations/_size/base.d.ts +2 -0
  141. package/types/components/Cell/variations/_size/base.d.ts.map +1 -0
  142. package/types/components/Cell/variations/_stretching/base.d.ts +2 -0
  143. package/types/components/Cell/variations/_stretching/base.d.ts.map +1 -0
  144. package/types/components/Cell/variations/_view/base.d.ts +2 -0
  145. package/types/components/Cell/variations/_view/base.d.ts.map +1 -0
  146. package/types/components/Pagination/Pagination.d.ts.map +1 -1
  147. package/types/examples/plasma_b2c/components/Cell/Cell.config.d.ts +14 -0
  148. package/types/examples/plasma_b2c/components/Cell/Cell.config.d.ts.map +1 -0
  149. package/types/examples/plasma_b2c/components/Cell/Cell.d.ts +45 -0
  150. package/types/examples/plasma_b2c/components/Cell/Cell.d.ts.map +1 -0
  151. package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +2 -2
  152. package/types/examples/plasma_web/components/Cell/Cell.config.d.ts +14 -0
  153. package/types/examples/plasma_web/components/Cell/Cell.config.d.ts.map +1 -0
  154. package/types/examples/plasma_web/components/Cell/Cell.d.ts +45 -0
  155. package/types/examples/plasma_web/components/Cell/Cell.d.ts.map +1 -0
  156. package/types/examples/plasma_web/components/Combobox/Combobox.d.ts +2 -2
  157. package/types/index.d.ts +1 -0
  158. package/types/index.d.ts.map +1 -1
@@ -58,7 +58,7 @@ export var paginationRoot = function paginationRoot(Root) {
58
58
  onChangePageValue = _ref.onChangePageValue,
59
59
  onChangePerPageValue = _ref.onChangePerPageValue,
60
60
  rest = _objectWithoutProperties(_ref, _excluded);
61
- var _useState = useState(1),
61
+ var _useState = useState(value !== null && value !== void 0 ? value : defaultValues.value),
62
62
  _useState2 = _slicedToArray(_useState, 2),
63
63
  page = _useState2[0],
64
64
  setPageValue = _useState2[1];
@@ -85,22 +85,24 @@ export var paginationRoot = function paginationRoot(Root) {
85
85
  setPagesValue(Math.ceil(count / (newPerPage || (hasPerPage ? defaultValues.perPage : 1))));
86
86
  };
87
87
  var handlerSetPage = function handlerSetPage(newPageValue) {
88
- var pageValue = newPageValue !== null && newPageValue !== void 0 ? newPageValue : defaultValues.value;
89
- if (pageValue > pages) {
90
- pageValue = pages;
88
+ var _newPageValue;
89
+ newPageValue = (_newPageValue = newPageValue) !== null && _newPageValue !== void 0 ? _newPageValue : defaultValues.value;
90
+ if (newPageValue > pages) {
91
+ newPageValue = pages;
91
92
  }
92
- if (pageValue < 1) {
93
- pageValue = 1;
93
+ if (newPageValue < 1) {
94
+ newPageValue = 1;
94
95
  }
95
- if (disabled.includes(pageValue)) {
96
+ if (disabled.includes(newPageValue)) {
96
97
  return;
97
98
  }
98
- setPageValue(pageValue);
99
- onChangePageValue === null || onChangePageValue === void 0 ? void 0 : onChangePageValue(pageValue);
99
+ setPageValue(newPageValue);
100
+ onChangePageValue === null || onChangePageValue === void 0 ? void 0 : onChangePageValue(newPageValue);
100
101
  };
101
102
  var handlerSetPerPage = function handlerSetPerPage(newPerPageValue) {
102
- handlerSetPage(1);
103
+ setPageValue(1);
103
104
  setPerPageValue(newPerPageValue);
105
+ onChangePageValue === null || onChangePageValue === void 0 ? void 0 : onChangePageValue(1);
104
106
  onChangePerPageValue === null || onChangePerPageValue === void 0 ? void 0 : onChangePerPageValue(newPerPageValue);
105
107
  handlerSetPages(newPerPageValue);
106
108
  };
@@ -109,10 +111,7 @@ export var paginationRoot = function paginationRoot(Root) {
109
111
  };
110
112
  useEffect(function () {
111
113
  handlerSetPages(perPage);
112
- }, [perPage, count, handlerSetPages]);
113
- useEffect(function () {
114
- handlerSetPage(value);
115
- }, [value]);
114
+ }, [perPage, handlerSetPages]);
116
115
  useEffect(function () {
117
116
  setSections(getSections(page, pages, slots));
118
117
  }, [page, slots, pages, setSections, getSections]);
@@ -0,0 +1,15 @@
1
+ import { css } from 'styled-components';
2
+ import { cellTokens } from '../../../../components/Cell';
3
+ export var config = {
4
+ variations: {
5
+ view: {
6
+ "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)
7
+ },
8
+ size: {
9
+ 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),
10
+ 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),
11
+ 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),
12
+ 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)
13
+ }
14
+ }
15
+ };
@@ -0,0 +1,6 @@
1
+ import { cellConfig, CellTextbox, CellTextboxLabel, CellTextboxSubtitle, CellTextboxTitle } 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 { CellTextbox, CellTextboxLabel, CellTextboxSubtitle, CellTextboxTitle };
@@ -0,0 +1,128 @@
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, CellTextbox, CellTextboxTitle } 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
+ alignContentLeft: {
52
+ options: alignLeft,
53
+ control: {
54
+ type: 'select',
55
+ },
56
+ },
57
+ alignContentRight: {
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
+ alignContentLeft: 'center',
80
+ alignContentRight: '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
+ contentRight={!args.enableRightContent && <ChevronRight color="inherit" size="xs" />}
94
+ {...args}
95
+ />
96
+ );
97
+ },
98
+ };
99
+
100
+ export const WithContentTextboxCustom: Story = {
101
+ args: {
102
+ size: 'm',
103
+ stretching: 'filled',
104
+ },
105
+ render: ({ ...args }: StoryProps) => {
106
+ const MyStyledText = styled.div`
107
+ font-size: 12px;
108
+ font-weight: 600;
109
+ opacity: 0.5;
110
+ `;
111
+ return (
112
+ <Cell
113
+ view="default"
114
+ size={args.size}
115
+ stretching={args.stretching}
116
+ contentLeft={
117
+ <Avatar size={getSize(args.size)} url="https://avatars.githubusercontent.com/u/1813468?v=4" />
118
+ }
119
+ contentRight={!args.enableRightContent && <ChevronRight color="inherit" size="xs" />}
120
+ >
121
+ <CellTextboxTitle>
122
+ <CellTextbox>Title</CellTextbox>
123
+ <MyStyledText>My styled Text</MyStyledText>
124
+ </CellTextboxTitle>
125
+ </Cell>
126
+ );
127
+ },
128
+ };
@@ -18,10 +18,10 @@ export var config = {
18
18
  clear: /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--surface-clear);", ":var(--text-primary);", ":color-mix(in srgb,var(--text-primary),var(--surface-clear) 95%);", ":var(--text-primary);", ":color-mix(in srgb,var(--text-primary),var(--surface-clear) 90%);"], paginationTokens.paginationCurrentButtonColor, paginationTokens.paginationCurrentButtonBackgroundColor, paginationTokens.paginationCurrentButtonHoverColor, paginationTokens.paginationCurrentButtonHoverBackgroundColor, paginationTokens.paginationCurrentButtonActiveColor, paginationTokens.paginationCurrentButtonActiveBackgroundColor)
19
19
  },
20
20
  size: {
21
- l: /*#__PURE__*/css(["", ":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-bold-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":3.5rem;", ":3rem;", ":2.25rem;", ":4rem;", ":0.875rem;", ":1.2rem;", ":1.45rem;", ":100%;", ":auto;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":auto;", ":1.5rem;", ":1rem;", ":1rem;", ":1rem;", ":1rem;", ":1.875rem;", ":transparent;", ":1rem;", ":100%;", ":0 3.5rem 0 1.5rem;", ":0 3.625rem 0 0.375rem;", ":0 3.625rem 0 0.625rem;", ":0.5rem;", ":0.375rem;", ":0.875rem;", ":4rem;", ":3.5rem;", ":0 0.625rem;", ":0.0625rem;"], paginationTokens.paginationFontFamily, paginationTokens.paginationFontSize, paginationTokens.paginationFontStyle, paginationTokens.paginationFontWeight, paginationTokens.paginationLetterSpacing, paginationTokens.paginationLineHeight, paginationTokens.buttonHeight, paginationTokens.buttonWidth, paginationTokens.buttonWidthShorter, paginationTokens.paginationInputWidth, paginationTokens.buttonRadius, paginationTokens.paginationIconSize, paginationTokens.paginationIconDoubleSize, paginationTokens.selectWidth, paginationTokens.selectHeight, paginationTokens.selectPaddingTop, paginationTokens.selectPaddingRight, paginationTokens.selectPaddingBottom, paginationTokens.selectPaddingLeft, paginationTokens.selectItemWidth, paginationTokens.selectItemHeight, paginationTokens.selectItemPaddingTop, paginationTokens.selectItemPaddingRight, paginationTokens.selectItemPaddingBottom, paginationTokens.selectItemPaddingLeft, paginationTokens.selectItemContentLeftWidth, paginationTokens.selectItemBackground, paginationTokens.selectTargetArrowRight, paginationTokens.selectTargetWidth, paginationTokens.selectTargetPadding, paginationTokens.selectTargetPaddingHasChips, paginationTokens.selectTargetPaddingWithInput, paginationTokens.selectTargetInnerTop, paginationTokens.selectTargetLabelInnerTop, paginationTokens.inputBorderRadius, paginationTokens.inputWidth, paginationTokens.inputHeight, paginationTokens.inputPadding, paginationTokens.inputBorderWidth),
22
- m: /*#__PURE__*/css(["", ":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-bold-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":3rem;", ":3rem;", ":2rem;", ":3.5rem;", ":0.75rem;", ":1.05rem;", ":1.3rem;", ":100%;", ":auto;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":auto;", ":1.5rem;", ":0.75rem;", ":0.75rem;", ":0.75rem;", ":0.75rem;", ":1.75rem;", ":transparent;", ":0.875rem;", ":100%;", ":0 3.25rem 0 1.25rem;", ":0 3.375rem 0 0.375rem;", ":0 3.375rem 0 0.625rem;", ":0.5rem;", ":0.375rem;", ":0.75rem;", ":3.5rem;", ":3rem;", ":0 0.625rem;", ":0.0625rem;"], paginationTokens.paginationFontFamily, paginationTokens.paginationFontSize, paginationTokens.paginationFontStyle, paginationTokens.paginationFontWeight, paginationTokens.paginationLetterSpacing, paginationTokens.paginationLineHeight, paginationTokens.buttonHeight, paginationTokens.buttonWidth, paginationTokens.buttonWidthShorter, paginationTokens.paginationInputWidth, paginationTokens.buttonRadius, paginationTokens.paginationIconSize, paginationTokens.paginationIconDoubleSize, paginationTokens.selectWidth, paginationTokens.selectHeight, paginationTokens.selectPaddingTop, paginationTokens.selectPaddingRight, paginationTokens.selectPaddingBottom, paginationTokens.selectPaddingLeft, paginationTokens.selectItemWidth, paginationTokens.selectItemHeight, paginationTokens.selectItemPaddingTop, paginationTokens.selectItemPaddingRight, paginationTokens.selectItemPaddingBottom, paginationTokens.selectItemPaddingLeft, paginationTokens.selectItemContentLeftWidth, paginationTokens.selectItemBackground, paginationTokens.selectTargetArrowRight, paginationTokens.selectTargetWidth, paginationTokens.selectTargetPadding, paginationTokens.selectTargetPaddingHasChips, paginationTokens.selectTargetPaddingWithInput, paginationTokens.selectTargetInnerTop, paginationTokens.selectTargetLabelInnerTop, paginationTokens.inputBorderRadius, paginationTokens.inputWidth, paginationTokens.inputHeight, paginationTokens.inputPadding, paginationTokens.inputBorderWidth),
23
- s: /*#__PURE__*/css(["", ":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-bold-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":2.5rem;", ":2.5rem;", ":1.75rem;", ":3rem;", ":0.625rem;", ":0.9rem;", ":1.15rem;", ":100%;", ":auto;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":auto;", ":1.5rem;", ":0.5rem;", ":0.75rem;", ":0.5rem;", ":0.75rem;", ":1.75rem;", ":transparent;", ":0.75rem;", ":100%;", ":0 3rem 0 1rem;", ":0 3.125rem 0 0.375rem;", ":0 3.125rem 0 0.625rem;", ":0.5rem;", ":0.375rem;", ":0.625rem;", ":3rem;", ":2.5rem;", ":0 0.625rem;", ":0.0625rem;"], paginationTokens.paginationFontFamily, paginationTokens.paginationFontSize, paginationTokens.paginationFontStyle, paginationTokens.paginationFontWeight, paginationTokens.paginationLetterSpacing, paginationTokens.paginationLineHeight, paginationTokens.buttonHeight, paginationTokens.buttonWidth, paginationTokens.buttonWidthShorter, paginationTokens.paginationInputWidth, paginationTokens.buttonRadius, paginationTokens.paginationIconSize, paginationTokens.paginationIconDoubleSize, paginationTokens.selectWidth, paginationTokens.selectHeight, paginationTokens.selectPaddingTop, paginationTokens.selectPaddingRight, paginationTokens.selectPaddingBottom, paginationTokens.selectPaddingLeft, paginationTokens.selectItemWidth, paginationTokens.selectItemHeight, paginationTokens.selectItemPaddingTop, paginationTokens.selectItemPaddingRight, paginationTokens.selectItemPaddingBottom, paginationTokens.selectItemPaddingLeft, paginationTokens.selectItemContentLeftWidth, paginationTokens.selectItemBackground, paginationTokens.selectTargetArrowRight, paginationTokens.selectTargetWidth, paginationTokens.selectTargetPadding, paginationTokens.selectTargetPaddingHasChips, paginationTokens.selectTargetPaddingWithInput, paginationTokens.selectTargetInnerTop, paginationTokens.selectTargetLabelInnerTop, paginationTokens.inputBorderRadius, paginationTokens.inputWidth, paginationTokens.inputHeight, paginationTokens.inputPadding, paginationTokens.inputBorderWidth),
24
- xs: /*#__PURE__*/css(["", ":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-bold-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":2rem;", ":2.5rem;", ":0.5rem;", ":2rem;", ":1.5rem;", ":0.75rem;", ":1rem;", ":100%;", ":auto;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":auto;", ":1rem;", ":0.5rem;", ":0.5rem;", ":0.5rem;", ":0.5rem;", ":1.25rem;", ":transparent;", ":0.5rem;", ":100%;", ":0 2.5rem 0 0.75rem;", ":0 2.625rem 0 0.375rem;", ":0 2.625rem 0 0.625rem;", ":0.5rem;", ":0.375rem;", ":0.5rem;", ":2.5rem;", ":2rem;", ":0 0.625rem;", ":0.0625rem;"], paginationTokens.paginationFontFamily, paginationTokens.paginationFontSize, paginationTokens.paginationFontStyle, paginationTokens.paginationFontWeight, paginationTokens.paginationLetterSpacing, paginationTokens.paginationLineHeight, paginationTokens.buttonHeight, paginationTokens.paginationInputWidth, paginationTokens.buttonRadius, paginationTokens.buttonWidth, paginationTokens.buttonWidthShorter, paginationTokens.paginationIconSize, paginationTokens.paginationIconDoubleSize, paginationTokens.selectWidth, paginationTokens.selectHeight, paginationTokens.selectPaddingTop, paginationTokens.selectPaddingRight, paginationTokens.selectPaddingBottom, paginationTokens.selectPaddingLeft, paginationTokens.selectItemWidth, paginationTokens.selectItemHeight, paginationTokens.selectItemPaddingTop, paginationTokens.selectItemPaddingRight, paginationTokens.selectItemPaddingBottom, paginationTokens.selectItemPaddingLeft, paginationTokens.selectItemContentLeftWidth, paginationTokens.selectItemBackground, paginationTokens.selectTargetArrowRight, paginationTokens.selectTargetWidth, paginationTokens.selectTargetPadding, paginationTokens.selectTargetPaddingHasChips, paginationTokens.selectTargetPaddingWithInput, paginationTokens.selectTargetInnerTop, paginationTokens.selectTargetLabelInnerTop, paginationTokens.inputBorderRadius, paginationTokens.inputWidth, paginationTokens.inputHeight, paginationTokens.inputPadding, paginationTokens.inputBorderWidth)
21
+ l: /*#__PURE__*/css(["", ":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-bold-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":3.5rem;", ":3rem;", ":2.25rem;", ":4rem;", ":0.875rem;", ":1.2rem;", ":1.45rem;", ":100%;", ":auto;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":auto;", ":1.5rem;", ":1rem;", ":1rem;", ":1rem;", ":1rem;", ":1.875rem;", ":transparent;", ":1rem;", ":100%;", ":0 3.5rem 0 1.5rem;", ":0 3.625rem 0 0.375rem;", ":0 3.625rem 0 0.625rem;", ":0.5rem;", ":0.375rem;", ":0.875rem;", ":4rem;", ":3.5rem;", ":0 0.625rem;", ":0.125rem;"], paginationTokens.paginationFontFamily, paginationTokens.paginationFontSize, paginationTokens.paginationFontStyle, paginationTokens.paginationFontWeight, paginationTokens.paginationLetterSpacing, paginationTokens.paginationLineHeight, paginationTokens.buttonHeight, paginationTokens.buttonWidth, paginationTokens.buttonWidthShorter, paginationTokens.paginationInputWidth, paginationTokens.buttonRadius, paginationTokens.paginationIconSize, paginationTokens.paginationIconDoubleSize, paginationTokens.selectWidth, paginationTokens.selectHeight, paginationTokens.selectPaddingTop, paginationTokens.selectPaddingRight, paginationTokens.selectPaddingBottom, paginationTokens.selectPaddingLeft, paginationTokens.selectItemWidth, paginationTokens.selectItemHeight, paginationTokens.selectItemPaddingTop, paginationTokens.selectItemPaddingRight, paginationTokens.selectItemPaddingBottom, paginationTokens.selectItemPaddingLeft, paginationTokens.selectItemContentLeftWidth, paginationTokens.selectItemBackground, paginationTokens.selectTargetArrowRight, paginationTokens.selectTargetWidth, paginationTokens.selectTargetPadding, paginationTokens.selectTargetPaddingHasChips, paginationTokens.selectTargetPaddingWithInput, paginationTokens.selectTargetInnerTop, paginationTokens.selectTargetLabelInnerTop, paginationTokens.inputBorderRadius, paginationTokens.inputWidth, paginationTokens.inputHeight, paginationTokens.inputPadding, paginationTokens.inputBorderWidth),
22
+ m: /*#__PURE__*/css(["", ":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-bold-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":3rem;", ":3rem;", ":2rem;", ":3.5rem;", ":0.75rem;", ":1.05rem;", ":1.3rem;", ":100%;", ":auto;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":auto;", ":1.5rem;", ":0.75rem;", ":0.75rem;", ":0.75rem;", ":0.75rem;", ":1.75rem;", ":transparent;", ":0.875rem;", ":100%;", ":0 3.25rem 0 1.25rem;", ":0 3.375rem 0 0.375rem;", ":0 3.375rem 0 0.625rem;", ":0.5rem;", ":0.375rem;", ":0.75rem;", ":3.5rem;", ":3rem;", ":0 0.625rem;", ":0.125rem;"], paginationTokens.paginationFontFamily, paginationTokens.paginationFontSize, paginationTokens.paginationFontStyle, paginationTokens.paginationFontWeight, paginationTokens.paginationLetterSpacing, paginationTokens.paginationLineHeight, paginationTokens.buttonHeight, paginationTokens.buttonWidth, paginationTokens.buttonWidthShorter, paginationTokens.paginationInputWidth, paginationTokens.buttonRadius, paginationTokens.paginationIconSize, paginationTokens.paginationIconDoubleSize, paginationTokens.selectWidth, paginationTokens.selectHeight, paginationTokens.selectPaddingTop, paginationTokens.selectPaddingRight, paginationTokens.selectPaddingBottom, paginationTokens.selectPaddingLeft, paginationTokens.selectItemWidth, paginationTokens.selectItemHeight, paginationTokens.selectItemPaddingTop, paginationTokens.selectItemPaddingRight, paginationTokens.selectItemPaddingBottom, paginationTokens.selectItemPaddingLeft, paginationTokens.selectItemContentLeftWidth, paginationTokens.selectItemBackground, paginationTokens.selectTargetArrowRight, paginationTokens.selectTargetWidth, paginationTokens.selectTargetPadding, paginationTokens.selectTargetPaddingHasChips, paginationTokens.selectTargetPaddingWithInput, paginationTokens.selectTargetInnerTop, paginationTokens.selectTargetLabelInnerTop, paginationTokens.inputBorderRadius, paginationTokens.inputWidth, paginationTokens.inputHeight, paginationTokens.inputPadding, paginationTokens.inputBorderWidth),
23
+ s: /*#__PURE__*/css(["", ":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-bold-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":2.5rem;", ":2.5rem;", ":1.75rem;", ":3rem;", ":0.625rem;", ":0.9rem;", ":1.15rem;", ":100%;", ":auto;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":auto;", ":1.5rem;", ":0.5rem;", ":0.75rem;", ":0.5rem;", ":0.75rem;", ":1.75rem;", ":transparent;", ":0.75rem;", ":100%;", ":0 3rem 0 1rem;", ":0 3.125rem 0 0.375rem;", ":0 3.125rem 0 0.625rem;", ":0.5rem;", ":0.375rem;", ":0.625rem;", ":3rem;", ":2.5rem;", ":0 0.625rem;", ":0.125rem;"], paginationTokens.paginationFontFamily, paginationTokens.paginationFontSize, paginationTokens.paginationFontStyle, paginationTokens.paginationFontWeight, paginationTokens.paginationLetterSpacing, paginationTokens.paginationLineHeight, paginationTokens.buttonHeight, paginationTokens.buttonWidth, paginationTokens.buttonWidthShorter, paginationTokens.paginationInputWidth, paginationTokens.buttonRadius, paginationTokens.paginationIconSize, paginationTokens.paginationIconDoubleSize, paginationTokens.selectWidth, paginationTokens.selectHeight, paginationTokens.selectPaddingTop, paginationTokens.selectPaddingRight, paginationTokens.selectPaddingBottom, paginationTokens.selectPaddingLeft, paginationTokens.selectItemWidth, paginationTokens.selectItemHeight, paginationTokens.selectItemPaddingTop, paginationTokens.selectItemPaddingRight, paginationTokens.selectItemPaddingBottom, paginationTokens.selectItemPaddingLeft, paginationTokens.selectItemContentLeftWidth, paginationTokens.selectItemBackground, paginationTokens.selectTargetArrowRight, paginationTokens.selectTargetWidth, paginationTokens.selectTargetPadding, paginationTokens.selectTargetPaddingHasChips, paginationTokens.selectTargetPaddingWithInput, paginationTokens.selectTargetInnerTop, paginationTokens.selectTargetLabelInnerTop, paginationTokens.inputBorderRadius, paginationTokens.inputWidth, paginationTokens.inputHeight, paginationTokens.inputPadding, paginationTokens.inputBorderWidth),
24
+ xs: /*#__PURE__*/css(["", ":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-bold-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":2rem;", ":2.5rem;", ":0.5rem;", ":2rem;", ":1.5rem;", ":0.75rem;", ":1rem;", ":100%;", ":auto;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":auto;", ":1rem;", ":0.5rem;", ":0.5rem;", ":0.5rem;", ":0.5rem;", ":1.25rem;", ":transparent;", ":0.5rem;", ":100%;", ":0 2.5rem 0 0.75rem;", ":0 2.625rem 0 0.375rem;", ":0 2.625rem 0 0.625rem;", ":0.5rem;", ":0.375rem;", ":0.5rem;", ":2.5rem;", ":2rem;", ":0 0.625rem;", ":0.125rem;"], paginationTokens.paginationFontFamily, paginationTokens.paginationFontSize, paginationTokens.paginationFontStyle, paginationTokens.paginationFontWeight, paginationTokens.paginationLetterSpacing, paginationTokens.paginationLineHeight, paginationTokens.buttonHeight, paginationTokens.paginationInputWidth, paginationTokens.buttonRadius, paginationTokens.buttonWidth, paginationTokens.buttonWidthShorter, paginationTokens.paginationIconSize, paginationTokens.paginationIconDoubleSize, paginationTokens.selectWidth, paginationTokens.selectHeight, paginationTokens.selectPaddingTop, paginationTokens.selectPaddingRight, paginationTokens.selectPaddingBottom, paginationTokens.selectPaddingLeft, paginationTokens.selectItemWidth, paginationTokens.selectItemHeight, paginationTokens.selectItemPaddingTop, paginationTokens.selectItemPaddingRight, paginationTokens.selectItemPaddingBottom, paginationTokens.selectItemPaddingLeft, paginationTokens.selectItemContentLeftWidth, paginationTokens.selectItemBackground, paginationTokens.selectTargetArrowRight, paginationTokens.selectTargetWidth, paginationTokens.selectTargetPadding, paginationTokens.selectTargetPaddingHasChips, paginationTokens.selectTargetPaddingWithInput, paginationTokens.selectTargetInnerTop, paginationTokens.selectTargetLabelInnerTop, paginationTokens.inputBorderRadius, paginationTokens.inputWidth, paginationTokens.inputHeight, paginationTokens.inputPadding, paginationTokens.inputBorderWidth)
25
25
  },
26
26
  type: {
27
27
  compact: /*#__PURE__*/css([""]),
@@ -53,7 +53,7 @@ type Story = StoryObj<typeof Pagination>;
53
53
 
54
54
  export const Default: Story = {
55
55
  args: {
56
- count: 2000,
56
+ count: 20,
57
57
  value: 1,
58
58
  slots: 9,
59
59
  type: 'default',
@@ -71,18 +71,12 @@ const PaginationContent = (agrs) => {
71
71
  const [pageValue, setPageValue] = useState(agrs.value);
72
72
  const [perPageValue, setPerPageValue] = useState(agrs.perPage);
73
73
 
74
- const handleChangePage = useCallback(
75
- (page: number) => {
76
- setPageValue(page);
77
- },
78
- [pageValue, setPageValue],
79
- );
80
-
81
- const handleChangePerpage = useCallback(
82
- (perPage: number) => {
74
+ const handleChange = useCallback(
75
+ (page: number, perPage: number) => {
83
76
  setPerPageValue(perPage);
77
+ setPageValue(page);
84
78
  },
85
- [perPageValue, setPerPageValue],
79
+ [pageValue, perPageValue, setPageValue, setPerPageValue],
86
80
  );
87
81
 
88
82
  return (
@@ -109,8 +103,7 @@ const PaginationContent = (agrs) => {
109
103
  Next
110
104
  </Button>
111
105
  }
112
- onChangePageValue={handleChangePage}
113
- onChangePerPageValue={handleChangePerpage}
106
+ onChangeValue={handleChange}
114
107
  />
115
108
  </>
116
109
  );
@@ -118,7 +111,7 @@ const PaginationContent = (agrs) => {
118
111
 
119
112
  export const Content: Story = {
120
113
  args: {
121
- count: 2000,
114
+ count: 20,
122
115
  value: 1,
123
116
  slots: 9,
124
117
  type: 'default',
@@ -0,0 +1,15 @@
1
+ import { css } from 'styled-components';
2
+ import { cellTokens } from '../../../../components/Cell';
3
+ export var config = {
4
+ variations: {
5
+ view: {
6
+ "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)
7
+ },
8
+ size: {
9
+ 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),
10
+ 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),
11
+ 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),
12
+ 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)
13
+ }
14
+ }
15
+ };
@@ -0,0 +1,6 @@
1
+ import { component, mergeConfig } from '../../../../engines';
2
+ import { cellConfig, CellTextbox, CellTextboxLabel, CellTextboxSubtitle, CellTextboxTitle } from '../../../../components/Cell';
3
+ import { config } from './Cell.config';
4
+ var mergedConfig = /*#__PURE__*/mergeConfig(cellConfig, config);
5
+ export var Cell = /*#__PURE__*/component(mergedConfig);
6
+ export { CellTextbox, CellTextboxLabel, CellTextboxSubtitle, CellTextboxTitle };
@@ -0,0 +1,128 @@
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, CellTextbox, CellTextboxTitle } 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_web/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
+ alignContentLeft: {
52
+ options: alignLeft,
53
+ control: {
54
+ type: 'select',
55
+ },
56
+ },
57
+ alignContentRight: {
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
+ alignContentLeft: 'center',
80
+ alignContentRight: '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
+ contentRight={!args.enableRightContent && <ChevronRight color="inherit" size="xs" />}
94
+ {...args}
95
+ />
96
+ );
97
+ },
98
+ };
99
+
100
+ export const WithContentTextboxCustom: Story = {
101
+ args: {
102
+ size: 'm',
103
+ stretching: 'filled',
104
+ },
105
+ render: ({ ...args }: StoryProps) => {
106
+ const MyStyledText = styled.div`
107
+ font-size: 12px;
108
+ font-weight: 600;
109
+ opacity: 0.5;
110
+ `;
111
+ return (
112
+ <Cell
113
+ view="default"
114
+ size={args.size}
115
+ stretching={args.stretching}
116
+ contentLeft={
117
+ <Avatar size={getSize(args.size)} url="https://avatars.githubusercontent.com/u/1813468?v=4" />
118
+ }
119
+ contentRight={<ChevronRight color="inherit" size="xs" />}
120
+ >
121
+ <CellTextbox>
122
+ <CellTextboxTitle>Title</CellTextboxTitle>
123
+ <MyStyledText>My styled Text</MyStyledText>
124
+ </CellTextbox>
125
+ </Cell>
126
+ );
127
+ },
128
+ };
@@ -18,10 +18,10 @@ export var config = {
18
18
  clear: /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--surface-clear);", ":var(--text-primary);", ":color-mix(in srgb,var(--text-primary),var(--surface-clear) 95%);", ":var(--text-primary);", ":color-mix(in srgb,var(--text-primary),var(--surface-clear) 90%);"], paginationTokens.paginationCurrentButtonColor, paginationTokens.paginationCurrentButtonBackgroundColor, paginationTokens.paginationCurrentButtonHoverColor, paginationTokens.paginationCurrentButtonHoverBackgroundColor, paginationTokens.paginationCurrentButtonActiveColor, paginationTokens.paginationCurrentButtonActiveBackgroundColor)
19
19
  },
20
20
  size: {
21
- l: /*#__PURE__*/css(["", ":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-bold-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":3.5rem;", ":3rem;", ":2.25rem;", ":0.875rem;", ":1.2rem;", ":1.45rem;", ":6.375rem;", ":auto;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":6.375rem;", ":1.5rem;", ":1rem;", ":1rem;", ":1rem;", ":1rem;", ":1.875rem;", ":transparent;", ":1rem;", ":6.375rem;", ":0 3.5rem 0 1.5rem;", ":0 3.625rem 0 0.375rem;", ":0 3.625rem 0 0.625rem;", ":0.5rem;", ":0.375rem;", ":0.875rem;", ":4rem;", ":3.5rem;", ":0 0.625rem;", ":0.0625rem;"], paginationTokens.paginationFontFamily, paginationTokens.paginationFontSize, paginationTokens.paginationFontStyle, paginationTokens.paginationFontWeight, paginationTokens.paginationLetterSpacing, paginationTokens.paginationLineHeight, paginationTokens.buttonHeight, paginationTokens.buttonWidth, paginationTokens.buttonWidthShorter, paginationTokens.buttonRadius, paginationTokens.paginationIconSize, paginationTokens.paginationIconDoubleSize, paginationTokens.selectWidth, paginationTokens.selectHeight, paginationTokens.selectPaddingTop, paginationTokens.selectPaddingRight, paginationTokens.selectPaddingBottom, paginationTokens.selectPaddingLeft, paginationTokens.selectItemWidth, paginationTokens.selectItemHeight, paginationTokens.selectItemPaddingTop, paginationTokens.selectItemPaddingRight, paginationTokens.selectItemPaddingBottom, paginationTokens.selectItemPaddingLeft, paginationTokens.selectItemContentLeftWidth, paginationTokens.selectItemBackground, paginationTokens.selectTargetArrowRight, paginationTokens.selectTargetWidth, paginationTokens.selectTargetPadding, paginationTokens.selectTargetPaddingHasChips, paginationTokens.selectTargetPaddingWithInput, paginationTokens.selectTargetInnerTop, paginationTokens.selectTargetLabelInnerTop, paginationTokens.inputBorderRadius, paginationTokens.inputWidth, paginationTokens.inputHeight, paginationTokens.inputPadding, paginationTokens.inputBorderWidth),
22
- m: /*#__PURE__*/css(["", ":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-bold-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":3rem;", ":3rem;", ":2rem;", ":0.75rem;", ":1.05rem;", ":1.3rem;", ":5.875rem;", ":auto;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":5.875rem;", ":1.5rem;", ":0.75rem;", ":0.75rem;", ":0.75rem;", ":0.75rem;", ":1.75rem;", ":transparent;", ":0.875rem;", ":5.875rem;", ":0 3.25rem 0 1.25rem;", ":0 3.375rem 0 0.375rem;", ":0 3.375rem 0 0.625rem;", ":0.5rem;", ":0.375rem;", ":0.75rem;", ":3.5rem;", ":3rem;", ":0 0.625rem;", ":0.0625rem;"], paginationTokens.paginationFontFamily, paginationTokens.paginationFontSize, paginationTokens.paginationFontStyle, paginationTokens.paginationFontWeight, paginationTokens.paginationLetterSpacing, paginationTokens.paginationLineHeight, paginationTokens.buttonHeight, paginationTokens.buttonWidth, paginationTokens.buttonWidthShorter, paginationTokens.buttonRadius, paginationTokens.paginationIconSize, paginationTokens.paginationIconDoubleSize, paginationTokens.selectWidth, paginationTokens.selectHeight, paginationTokens.selectPaddingTop, paginationTokens.selectPaddingRight, paginationTokens.selectPaddingBottom, paginationTokens.selectPaddingLeft, paginationTokens.selectItemWidth, paginationTokens.selectItemHeight, paginationTokens.selectItemPaddingTop, paginationTokens.selectItemPaddingRight, paginationTokens.selectItemPaddingBottom, paginationTokens.selectItemPaddingLeft, paginationTokens.selectItemContentLeftWidth, paginationTokens.selectItemBackground, paginationTokens.selectTargetArrowRight, paginationTokens.selectTargetWidth, paginationTokens.selectTargetPadding, paginationTokens.selectTargetPaddingHasChips, paginationTokens.selectTargetPaddingWithInput, paginationTokens.selectTargetInnerTop, paginationTokens.selectTargetLabelInnerTop, paginationTokens.inputBorderRadius, paginationTokens.inputWidth, paginationTokens.inputHeight, paginationTokens.inputPadding, paginationTokens.inputBorderWidth),
23
- s: /*#__PURE__*/css(["", ":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-bold-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":2.5rem;", ":2.5rem;", ":1.75rem;", ":3rem;", ":0.625rem;", ":0.9rem;", ":1.15rem;", ":5.375rem;", ":auto;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":5.375rem;", ":1.5rem;", ":0.5rem;", ":0.75rem;", ":0.5rem;", ":0.75rem;", ":1.75rem;", ":transparent;", ":0.75rem;", ":5.375rem;", ":0 3rem 0 1rem;", ":0 3.125rem 0 0.375rem;", ":0 3.125rem 0 0.625rem;", ":0.5rem;", ":0.375rem;", ":0.625rem;", ":3rem;", ":2.5rem;", ":0 0.625rem;", ":0.0625rem;"], paginationTokens.paginationFontFamily, paginationTokens.paginationFontSize, paginationTokens.paginationFontStyle, paginationTokens.paginationFontWeight, paginationTokens.paginationLetterSpacing, paginationTokens.paginationLineHeight, paginationTokens.buttonHeight, paginationTokens.buttonWidth, paginationTokens.buttonWidthShorter, paginationTokens.paginationInputWidth, paginationTokens.buttonRadius, paginationTokens.paginationIconSize, paginationTokens.paginationIconDoubleSize, paginationTokens.selectWidth, paginationTokens.selectHeight, paginationTokens.selectPaddingTop, paginationTokens.selectPaddingRight, paginationTokens.selectPaddingBottom, paginationTokens.selectPaddingLeft, paginationTokens.selectItemWidth, paginationTokens.selectItemHeight, paginationTokens.selectItemPaddingTop, paginationTokens.selectItemPaddingRight, paginationTokens.selectItemPaddingBottom, paginationTokens.selectItemPaddingLeft, paginationTokens.selectItemContentLeftWidth, paginationTokens.selectItemBackground, paginationTokens.selectTargetArrowRight, paginationTokens.selectTargetWidth, paginationTokens.selectTargetPadding, paginationTokens.selectTargetPaddingHasChips, paginationTokens.selectTargetPaddingWithInput, paginationTokens.selectTargetInnerTop, paginationTokens.selectTargetLabelInnerTop, paginationTokens.inputBorderRadius, paginationTokens.inputWidth, paginationTokens.inputHeight, paginationTokens.inputPadding, paginationTokens.inputBorderWidth),
24
- xs: /*#__PURE__*/css(["", ":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-bold-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":2rem;", ":2.5rem;", ":0.5rem;", ":2rem;", ":1.5rem;", ":0.75rem;", ":1rem;", ":4.625rem;", ":auto;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":4.625rem;", ":1rem;", ":0.5rem;", ":0.5rem;", ":0.5rem;", ":0.5rem;", ":1.25rem;", ":transparent;", ":0.5rem;", ":4.625rem;", ":0 2.5rem 0 0.75rem;", ":0 2.625rem 0 0.375rem;", ":0 2.625rem 0 0.625rem;", ":0.5rem;", ":0.375rem;", ":0.5rem;", ":2.5rem;", ":2rem;", ":0 0.625rem;", ":0.0625rem;"], paginationTokens.paginationFontFamily, paginationTokens.paginationFontSize, paginationTokens.paginationFontStyle, paginationTokens.paginationFontWeight, paginationTokens.paginationLetterSpacing, paginationTokens.paginationLineHeight, paginationTokens.buttonHeight, paginationTokens.paginationInputWidth, paginationTokens.buttonRadius, paginationTokens.buttonWidth, paginationTokens.buttonWidthShorter, paginationTokens.paginationIconSize, paginationTokens.paginationIconDoubleSize, paginationTokens.selectWidth, paginationTokens.selectHeight, paginationTokens.selectPaddingTop, paginationTokens.selectPaddingRight, paginationTokens.selectPaddingBottom, paginationTokens.selectPaddingLeft, paginationTokens.selectItemWidth, paginationTokens.selectItemHeight, paginationTokens.selectItemPaddingTop, paginationTokens.selectItemPaddingRight, paginationTokens.selectItemPaddingBottom, paginationTokens.selectItemPaddingLeft, paginationTokens.selectItemContentLeftWidth, paginationTokens.selectItemBackground, paginationTokens.selectTargetArrowRight, paginationTokens.selectTargetWidth, paginationTokens.selectTargetPadding, paginationTokens.selectTargetPaddingHasChips, paginationTokens.selectTargetPaddingWithInput, paginationTokens.selectTargetInnerTop, paginationTokens.selectTargetLabelInnerTop, paginationTokens.inputBorderRadius, paginationTokens.inputWidth, paginationTokens.inputHeight, paginationTokens.inputPadding, paginationTokens.inputBorderWidth)
21
+ l: /*#__PURE__*/css(["", ":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-bold-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":3.5rem;", ":3rem;", ":2.25rem;", ":0.875rem;", ":1.2rem;", ":1.45rem;", ":6.375rem;", ":auto;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":6.375rem;", ":1.5rem;", ":1rem;", ":1rem;", ":1rem;", ":1rem;", ":1.875rem;", ":transparent;", ":1rem;", ":6.375rem;", ":0 3.5rem 0 1.5rem;", ":0 3.625rem 0 0.375rem;", ":0 3.625rem 0 0.625rem;", ":0.5rem;", ":0.375rem;", ":0.875rem;", ":4rem;", ":3.5rem;", ":0 0.625rem;", ":0.125rem;"], paginationTokens.paginationFontFamily, paginationTokens.paginationFontSize, paginationTokens.paginationFontStyle, paginationTokens.paginationFontWeight, paginationTokens.paginationLetterSpacing, paginationTokens.paginationLineHeight, paginationTokens.buttonHeight, paginationTokens.buttonWidth, paginationTokens.buttonWidthShorter, paginationTokens.buttonRadius, paginationTokens.paginationIconSize, paginationTokens.paginationIconDoubleSize, paginationTokens.selectWidth, paginationTokens.selectHeight, paginationTokens.selectPaddingTop, paginationTokens.selectPaddingRight, paginationTokens.selectPaddingBottom, paginationTokens.selectPaddingLeft, paginationTokens.selectItemWidth, paginationTokens.selectItemHeight, paginationTokens.selectItemPaddingTop, paginationTokens.selectItemPaddingRight, paginationTokens.selectItemPaddingBottom, paginationTokens.selectItemPaddingLeft, paginationTokens.selectItemContentLeftWidth, paginationTokens.selectItemBackground, paginationTokens.selectTargetArrowRight, paginationTokens.selectTargetWidth, paginationTokens.selectTargetPadding, paginationTokens.selectTargetPaddingHasChips, paginationTokens.selectTargetPaddingWithInput, paginationTokens.selectTargetInnerTop, paginationTokens.selectTargetLabelInnerTop, paginationTokens.inputBorderRadius, paginationTokens.inputWidth, paginationTokens.inputHeight, paginationTokens.inputPadding, paginationTokens.inputBorderWidth),
22
+ m: /*#__PURE__*/css(["", ":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-bold-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":3rem;", ":3rem;", ":2rem;", ":0.75rem;", ":1.05rem;", ":1.3rem;", ":5.875rem;", ":auto;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":5.875rem;", ":1.5rem;", ":0.75rem;", ":0.75rem;", ":0.75rem;", ":0.75rem;", ":1.75rem;", ":transparent;", ":0.875rem;", ":5.875rem;", ":0 3.25rem 0 1.25rem;", ":0 3.375rem 0 0.375rem;", ":0 3.375rem 0 0.625rem;", ":0.5rem;", ":0.375rem;", ":0.75rem;", ":3.5rem;", ":3rem;", ":0 0.625rem;", ":0.125rem;"], paginationTokens.paginationFontFamily, paginationTokens.paginationFontSize, paginationTokens.paginationFontStyle, paginationTokens.paginationFontWeight, paginationTokens.paginationLetterSpacing, paginationTokens.paginationLineHeight, paginationTokens.buttonHeight, paginationTokens.buttonWidth, paginationTokens.buttonWidthShorter, paginationTokens.buttonRadius, paginationTokens.paginationIconSize, paginationTokens.paginationIconDoubleSize, paginationTokens.selectWidth, paginationTokens.selectHeight, paginationTokens.selectPaddingTop, paginationTokens.selectPaddingRight, paginationTokens.selectPaddingBottom, paginationTokens.selectPaddingLeft, paginationTokens.selectItemWidth, paginationTokens.selectItemHeight, paginationTokens.selectItemPaddingTop, paginationTokens.selectItemPaddingRight, paginationTokens.selectItemPaddingBottom, paginationTokens.selectItemPaddingLeft, paginationTokens.selectItemContentLeftWidth, paginationTokens.selectItemBackground, paginationTokens.selectTargetArrowRight, paginationTokens.selectTargetWidth, paginationTokens.selectTargetPadding, paginationTokens.selectTargetPaddingHasChips, paginationTokens.selectTargetPaddingWithInput, paginationTokens.selectTargetInnerTop, paginationTokens.selectTargetLabelInnerTop, paginationTokens.inputBorderRadius, paginationTokens.inputWidth, paginationTokens.inputHeight, paginationTokens.inputPadding, paginationTokens.inputBorderWidth),
23
+ s: /*#__PURE__*/css(["", ":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-bold-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":2.5rem;", ":2.5rem;", ":1.75rem;", ":3rem;", ":0.625rem;", ":0.9rem;", ":1.15rem;", ":5.375rem;", ":auto;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":5.375rem;", ":1.5rem;", ":0.5rem;", ":0.75rem;", ":0.5rem;", ":0.75rem;", ":1.75rem;", ":transparent;", ":0.75rem;", ":5.375rem;", ":0 3rem 0 1rem;", ":0 3.125rem 0 0.375rem;", ":0 3.125rem 0 0.625rem;", ":0.5rem;", ":0.375rem;", ":0.625rem;", ":3rem;", ":2.5rem;", ":0 0.625rem;", ":0.125rem;"], paginationTokens.paginationFontFamily, paginationTokens.paginationFontSize, paginationTokens.paginationFontStyle, paginationTokens.paginationFontWeight, paginationTokens.paginationLetterSpacing, paginationTokens.paginationLineHeight, paginationTokens.buttonHeight, paginationTokens.buttonWidth, paginationTokens.buttonWidthShorter, paginationTokens.paginationInputWidth, paginationTokens.buttonRadius, paginationTokens.paginationIconSize, paginationTokens.paginationIconDoubleSize, paginationTokens.selectWidth, paginationTokens.selectHeight, paginationTokens.selectPaddingTop, paginationTokens.selectPaddingRight, paginationTokens.selectPaddingBottom, paginationTokens.selectPaddingLeft, paginationTokens.selectItemWidth, paginationTokens.selectItemHeight, paginationTokens.selectItemPaddingTop, paginationTokens.selectItemPaddingRight, paginationTokens.selectItemPaddingBottom, paginationTokens.selectItemPaddingLeft, paginationTokens.selectItemContentLeftWidth, paginationTokens.selectItemBackground, paginationTokens.selectTargetArrowRight, paginationTokens.selectTargetWidth, paginationTokens.selectTargetPadding, paginationTokens.selectTargetPaddingHasChips, paginationTokens.selectTargetPaddingWithInput, paginationTokens.selectTargetInnerTop, paginationTokens.selectTargetLabelInnerTop, paginationTokens.inputBorderRadius, paginationTokens.inputWidth, paginationTokens.inputHeight, paginationTokens.inputPadding, paginationTokens.inputBorderWidth),
24
+ xs: /*#__PURE__*/css(["", ":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-bold-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":2rem;", ":2.5rem;", ":0.5rem;", ":2rem;", ":1.5rem;", ":0.75rem;", ":1rem;", ":4.625rem;", ":auto;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":4.625rem;", ":1rem;", ":0.5rem;", ":0.5rem;", ":0.5rem;", ":0.5rem;", ":1.25rem;", ":transparent;", ":0.5rem;", ":4.625rem;", ":0 2.5rem 0 0.75rem;", ":0 2.625rem 0 0.375rem;", ":0 2.625rem 0 0.625rem;", ":0.5rem;", ":0.375rem;", ":0.5rem;", ":2.5rem;", ":2rem;", ":0 0.625rem;", ":0.125rem;"], paginationTokens.paginationFontFamily, paginationTokens.paginationFontSize, paginationTokens.paginationFontStyle, paginationTokens.paginationFontWeight, paginationTokens.paginationLetterSpacing, paginationTokens.paginationLineHeight, paginationTokens.buttonHeight, paginationTokens.paginationInputWidth, paginationTokens.buttonRadius, paginationTokens.buttonWidth, paginationTokens.buttonWidthShorter, paginationTokens.paginationIconSize, paginationTokens.paginationIconDoubleSize, paginationTokens.selectWidth, paginationTokens.selectHeight, paginationTokens.selectPaddingTop, paginationTokens.selectPaddingRight, paginationTokens.selectPaddingBottom, paginationTokens.selectPaddingLeft, paginationTokens.selectItemWidth, paginationTokens.selectItemHeight, paginationTokens.selectItemPaddingTop, paginationTokens.selectItemPaddingRight, paginationTokens.selectItemPaddingBottom, paginationTokens.selectItemPaddingLeft, paginationTokens.selectItemContentLeftWidth, paginationTokens.selectItemBackground, paginationTokens.selectTargetArrowRight, paginationTokens.selectTargetWidth, paginationTokens.selectTargetPadding, paginationTokens.selectTargetPaddingHasChips, paginationTokens.selectTargetPaddingWithInput, paginationTokens.selectTargetInnerTop, paginationTokens.selectTargetLabelInnerTop, paginationTokens.inputBorderRadius, paginationTokens.inputWidth, paginationTokens.inputHeight, paginationTokens.inputPadding, paginationTokens.inputBorderWidth)
25
25
  },
26
26
  type: {
27
27
  compact: /*#__PURE__*/css([""]),
@@ -53,7 +53,7 @@ type Story = StoryObj<typeof Pagination>;
53
53
 
54
54
  export const Default: Story = {
55
55
  args: {
56
- count: 2000,
56
+ count: 20,
57
57
  value: 1,
58
58
  slots: 9,
59
59
  type: 'default',
@@ -72,18 +72,12 @@ const PaginationContent = (agrs) => {
72
72
  const [pageValue, setPageValue] = useState(agrs.value);
73
73
  const [perPageValue, setPerPageValue] = useState(agrs.perPage);
74
74
 
75
- const handleChangePage = useCallback(
76
- (page: number) => {
77
- setPageValue(page);
78
- },
79
- [pageValue, setPageValue],
80
- );
81
-
82
- const handleChangePerpage = useCallback(
83
- (perPage: number) => {
75
+ const handleChange = useCallback(
76
+ (page: number, perPage: number) => {
84
77
  setPerPageValue(perPage);
78
+ setPageValue(page);
85
79
  },
86
- [perPageValue, setPerPageValue],
80
+ [pageValue, perPageValue, setPageValue, setPerPageValue],
87
81
  );
88
82
 
89
83
  return (
@@ -110,8 +104,7 @@ const PaginationContent = (agrs) => {
110
104
  Next
111
105
  </Button>
112
106
  }
113
- onChangePageValue={handleChangePage}
114
- onChangePerPageValue={handleChangePerpage}
107
+ onChangeValue={handleChange}
115
108
  />
116
109
  </>
117
110
  );
@@ -119,7 +112,7 @@ const PaginationContent = (agrs) => {
119
112
 
120
113
  export const Content: Story = {
121
114
  args: {
122
- count: 2000,
115
+ count: 20,
123
116
  value: 1,
124
117
  slots: 9,
125
118
  type: 'default',
@@ -6,6 +6,7 @@ export * from './hooks';
6
6
  export * from './components/Button';
7
7
  export * from './components/ButtonGroup';
8
8
  export * from './components/Chip';
9
+ export * from './components/Cell';
9
10
  export * from './components/Link';
10
11
  export * from './components/Spinner';
11
12
  export * from './components/Checkbox';
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import { RootProps } from '../../engines';
3
+ import type { CellProps } from './Cell.types';
4
+ export declare const cellRoot: (Root: RootProps<HTMLSelectElement, CellProps>) => React.ForwardRefExoticComponent<CellProps & React.RefAttributes<HTMLSelectElement>>;
5
+ export declare const cellConfig: {
6
+ name: string;
7
+ tag: string;
8
+ layout: (Root: RootProps<HTMLSelectElement, CellProps>) => React.ForwardRefExoticComponent<CellProps & React.RefAttributes<HTMLSelectElement>>;
9
+ base: import("@linaria/core").LinariaClassName;
10
+ variations: {
11
+ view: {
12
+ css: import("@linaria/core").LinariaClassName;
13
+ };
14
+ size: {
15
+ css: import("@linaria/core").LinariaClassName;
16
+ };
17
+ };
18
+ defaults: {
19
+ view: string;
20
+ size: string;
21
+ };
22
+ };
23
+ //# sourceMappingURL=Cell.d.ts.map