@salutejs/plasma-new-hope 0.66.0-dev.0 → 0.67.0-canary.1148.8443817650.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Cell/Cell.css +3 -0
- package/cjs/components/Cell/Cell.js +72 -0
- package/cjs/components/Cell/Cell.js.map +1 -0
- package/cjs/components/Cell/Cell.styles.js +42 -0
- package/cjs/components/Cell/Cell.styles.js.map +1 -0
- package/cjs/components/Cell/Cell.tokens.js +51 -0
- package/cjs/components/Cell/Cell.tokens.js.map +1 -0
- package/cjs/components/Cell/Textbox/Textbox.js +20 -0
- package/cjs/components/Cell/Textbox/Textbox.js.map +1 -0
- package/cjs/components/Cell/Textbox/Textbox.styles.js +13 -0
- package/cjs/components/Cell/Textbox/Textbox.styles.js.map +1 -0
- package/cjs/components/Cell/Textbox/ui/TextLabel.js +17 -0
- package/cjs/components/Cell/Textbox/ui/TextLabel.js.map +1 -0
- package/cjs/components/Cell/Textbox/ui/TextSubtitle.js +17 -0
- package/cjs/components/Cell/Textbox/ui/TextSubtitle.js.map +1 -0
- package/cjs/components/Cell/Textbox/ui/TextTitle.js +17 -0
- package/cjs/components/Cell/Textbox/ui/TextTitle.js.map +1 -0
- package/cjs/components/Cell/variations/_size/base.js +9 -0
- package/cjs/components/Cell/variations/_size/base.js.map +1 -0
- package/cjs/components/Cell/variations/_size/base_x642ct.css +1 -0
- package/cjs/components/Cell/variations/_stretching/base.js +9 -0
- package/cjs/components/Cell/variations/_stretching/base.js.map +1 -0
- package/cjs/components/Cell/variations/_stretching/base_1ryz4br.css +1 -0
- package/cjs/components/Cell/variations/_view/base.js +9 -0
- package/cjs/components/Cell/variations/_view/base.js.map +1 -0
- package/cjs/components/Cell/variations/_view/base_c5qh0x.css +1 -0
- package/cjs/index.css +4 -0
- package/cjs/index.js +14 -0
- package/cjs/index.js.map +1 -1
- package/es/components/Cell/Cell.css +3 -0
- package/es/components/Cell/Cell.js +67 -0
- package/es/components/Cell/Cell.js.map +1 -0
- package/es/components/Cell/Cell.styles.js +34 -0
- package/es/components/Cell/Cell.styles.js.map +1 -0
- package/es/components/Cell/Cell.tokens.js +46 -0
- package/es/components/Cell/Cell.tokens.js.map +1 -0
- package/es/components/Cell/Textbox/Textbox.js +16 -0
- package/es/components/Cell/Textbox/Textbox.js.map +1 -0
- package/es/components/Cell/Textbox/Textbox.styles.js +9 -0
- package/es/components/Cell/Textbox/Textbox.styles.js.map +1 -0
- package/es/components/Cell/Textbox/ui/TextLabel.js +13 -0
- package/es/components/Cell/Textbox/ui/TextLabel.js.map +1 -0
- package/es/components/Cell/Textbox/ui/TextSubtitle.js +13 -0
- package/es/components/Cell/Textbox/ui/TextSubtitle.js.map +1 -0
- package/es/components/Cell/Textbox/ui/TextTitle.js +13 -0
- package/es/components/Cell/Textbox/ui/TextTitle.js.map +1 -0
- package/es/components/Cell/variations/_size/base.js +5 -0
- package/es/components/Cell/variations/_size/base.js.map +1 -0
- package/es/components/Cell/variations/_size/base_x642ct.css +1 -0
- package/es/components/Cell/variations/_stretching/base.js +5 -0
- package/es/components/Cell/variations/_stretching/base.js.map +1 -0
- package/es/components/Cell/variations/_stretching/base_1ryz4br.css +1 -0
- package/es/components/Cell/variations/_view/base.js +5 -0
- package/es/components/Cell/variations/_view/base.js.map +1 -0
- package/es/components/Cell/variations/_view/base_c5qh0x.css +1 -0
- package/es/index.css +4 -0
- package/es/index.js +6 -0
- package/es/index.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Cell/Cell.js +72 -0
- package/styled-components/cjs/components/Cell/Cell.styles.js +37 -0
- package/styled-components/cjs/components/Cell/Cell.tokens.js +49 -0
- package/styled-components/cjs/components/Cell/Cell.types.js +5 -0
- package/styled-components/cjs/components/Cell/Textbox/Textbox.js +19 -0
- package/styled-components/cjs/components/Cell/Textbox/Textbox.styles.js +12 -0
- package/styled-components/cjs/components/Cell/Textbox/Textbox.types.js +5 -0
- package/styled-components/cjs/components/Cell/Textbox/ui/TextLabel.js +16 -0
- package/styled-components/cjs/components/Cell/Textbox/ui/TextSubtitle.js +16 -0
- package/styled-components/cjs/components/Cell/Textbox/ui/TextTitle.js +16 -0
- package/styled-components/cjs/components/Cell/index.js +59 -0
- package/styled-components/cjs/components/Cell/variations/_size/base.js +8 -0
- package/styled-components/cjs/components/Cell/variations/_size/tokens.json +1 -0
- package/styled-components/cjs/components/Cell/variations/_stretching/base.js +9 -0
- package/styled-components/cjs/components/Cell/variations/_stretching/tokens.json +1 -0
- package/styled-components/cjs/components/Cell/variations/_view/base.js +9 -0
- package/styled-components/cjs/components/Cell/variations/_view/tokens.json +1 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Cell/Cell.config.js +31 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Cell/Cell.js +35 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Cell/Cell.stories.tsx +157 -0
- package/styled-components/cjs/examples/plasma_web/components/Cell/Cell.config.js +31 -0
- package/styled-components/cjs/examples/plasma_web/components/Cell/Cell.js +35 -0
- package/styled-components/cjs/examples/plasma_web/components/Cell/Cell.stories.tsx +157 -0
- package/styled-components/cjs/index.js +11 -0
- package/styled-components/es/components/Cell/Cell.js +63 -0
- package/styled-components/es/components/Cell/Cell.styles.js +30 -0
- package/styled-components/es/components/Cell/Cell.tokens.js +43 -0
- package/styled-components/es/components/Cell/Cell.types.js +1 -0
- package/styled-components/es/components/Cell/Textbox/Textbox.js +12 -0
- package/styled-components/es/components/Cell/Textbox/Textbox.styles.js +5 -0
- package/styled-components/es/components/Cell/Textbox/Textbox.types.js +1 -0
- package/styled-components/es/components/Cell/Textbox/ui/TextLabel.js +9 -0
- package/styled-components/es/components/Cell/Textbox/ui/TextSubtitle.js +9 -0
- package/styled-components/es/components/Cell/Textbox/ui/TextTitle.js +9 -0
- package/styled-components/es/components/Cell/index.js +6 -0
- package/styled-components/es/components/Cell/variations/_size/base.js +2 -0
- package/styled-components/es/components/Cell/variations/_size/tokens.json +1 -0
- package/styled-components/es/components/Cell/variations/_stretching/base.js +3 -0
- package/styled-components/es/components/Cell/variations/_stretching/tokens.json +1 -0
- package/styled-components/es/components/Cell/variations/_view/base.js +3 -0
- package/styled-components/es/components/Cell/variations/_view/tokens.json +1 -0
- package/styled-components/es/examples/plasma_b2c/components/Cell/Cell.config.js +25 -0
- package/styled-components/es/examples/plasma_b2c/components/Cell/Cell.js +6 -0
- package/styled-components/es/examples/plasma_b2c/components/Cell/Cell.stories.tsx +157 -0
- package/styled-components/es/examples/plasma_web/components/Cell/Cell.config.js +25 -0
- package/styled-components/es/examples/plasma_web/components/Cell/Cell.js +6 -0
- package/styled-components/es/examples/plasma_web/components/Cell/Cell.stories.tsx +157 -0
- package/styled-components/es/index.js +1 -0
- package/types/components/Cell/Cell.d.ts +49 -0
- package/types/components/Cell/Cell.d.ts.map +1 -0
- package/types/components/Cell/Cell.styles.d.ts +11 -0
- package/types/components/Cell/Cell.styles.d.ts.map +1 -0
- package/types/components/Cell/Cell.tokens.d.ts +44 -0
- package/types/components/Cell/Cell.tokens.d.ts.map +1 -0
- package/types/components/Cell/Cell.types.d.ts +54 -0
- package/types/components/Cell/Cell.types.d.ts.map +1 -0
- package/types/components/Cell/Textbox/Textbox.d.ts +4 -0
- package/types/components/Cell/Textbox/Textbox.d.ts.map +1 -0
- package/types/components/Cell/Textbox/Textbox.styles.d.ts +2 -0
- package/types/components/Cell/Textbox/Textbox.styles.d.ts.map +1 -0
- package/types/components/Cell/Textbox/Textbox.types.d.ts +20 -0
- package/types/components/Cell/Textbox/Textbox.types.d.ts.map +1 -0
- package/types/components/Cell/Textbox/ui/TextLabel.d.ts +7 -0
- package/types/components/Cell/Textbox/ui/TextLabel.d.ts.map +1 -0
- package/types/components/Cell/Textbox/ui/TextSubtitle.d.ts +7 -0
- package/types/components/Cell/Textbox/ui/TextSubtitle.d.ts.map +1 -0
- package/types/components/Cell/Textbox/ui/TextTitle.d.ts +7 -0
- package/types/components/Cell/Textbox/ui/TextTitle.d.ts.map +1 -0
- package/types/components/Cell/index.d.ts +9 -0
- package/types/components/Cell/index.d.ts.map +1 -0
- package/types/components/Cell/variations/_size/base.d.ts +2 -0
- package/types/components/Cell/variations/_size/base.d.ts.map +1 -0
- package/types/components/Cell/variations/_stretching/base.d.ts +2 -0
- package/types/components/Cell/variations/_stretching/base.d.ts.map +1 -0
- package/types/components/Cell/variations/_view/base.d.ts +2 -0
- package/types/components/Cell/variations/_view/base.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/Cell/Cell.config.d.ts +24 -0
- package/types/examples/plasma_b2c/components/Cell/Cell.config.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/Cell/Cell.d.ts +31 -0
- package/types/examples/plasma_b2c/components/Cell/Cell.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +2 -2
- package/types/examples/plasma_web/components/Cell/Cell.config.d.ts +24 -0
- package/types/examples/plasma_web/components/Cell/Cell.config.d.ts.map +1 -0
- package/types/examples/plasma_web/components/Cell/Cell.d.ts +31 -0
- package/types/examples/plasma_web/components/Cell/Cell.d.ts.map +1 -0
- package/types/examples/plasma_web/components/Combobox/Combobox.d.ts +2 -2
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
@@ -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 @@
|
|
1
|
+
export {};
|
@@ -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 @@
|
|
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 @@
|
|
1
|
+
["--plasma-cell-color", "--plasma-cell-background-color"]
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { css } from 'styled-components';
|
2
|
+
import { cellTokens } from '../../../../components/Cell';
|
3
|
+
export var config = {
|
4
|
+
defaults: {
|
5
|
+
view: 'primary',
|
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-regular-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-regular-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-regular-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-regular-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-regular-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-regular-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-regular-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-regular-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-regular-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-regular-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-regular-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-regular-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,157 @@
|
|
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, TextLabel, TextTitle, TextSubtitle } from './Cell';
|
11
|
+
|
12
|
+
type StoryProps = ComponentProps<typeof Cell> & { itemsCount?: number };
|
13
|
+
type Story = StoryObj<StoryProps>;
|
14
|
+
|
15
|
+
const views = ['default'];
|
16
|
+
const sizes = ['l', 'm', 's', 'xs'];
|
17
|
+
const stretchingValues = ['fixed', 'filled'];
|
18
|
+
|
19
|
+
type sizesCell = 'xs' | 'l' | 'm' | 's';
|
20
|
+
type sizesAvatar = 'l' | 'm' | 's';
|
21
|
+
|
22
|
+
const getSize = (size: sizesCell): sizesAvatar => {
|
23
|
+
if (size === 'xs') {
|
24
|
+
return 's';
|
25
|
+
}
|
26
|
+
|
27
|
+
return size;
|
28
|
+
};
|
29
|
+
|
30
|
+
const meta: Meta<typeof Cell> = {
|
31
|
+
title: 'plasma_b2c/Cell',
|
32
|
+
decorators: [WithTheme],
|
33
|
+
argTypes: {
|
34
|
+
size: {
|
35
|
+
options: sizes,
|
36
|
+
control: {
|
37
|
+
type: 'select',
|
38
|
+
},
|
39
|
+
},
|
40
|
+
view: {
|
41
|
+
options: views,
|
42
|
+
control: {
|
43
|
+
type: 'select',
|
44
|
+
},
|
45
|
+
},
|
46
|
+
stretching: {
|
47
|
+
options: stretchingValues,
|
48
|
+
control: {
|
49
|
+
type: 'select',
|
50
|
+
},
|
51
|
+
},
|
52
|
+
},
|
53
|
+
};
|
54
|
+
|
55
|
+
export default meta;
|
56
|
+
|
57
|
+
const ChevronRight = styled(IconChevronLeft)`
|
58
|
+
transform: rotate(180deg);
|
59
|
+
color: var(--text-secondary);
|
60
|
+
`;
|
61
|
+
|
62
|
+
export const Default: Story = {
|
63
|
+
args: {
|
64
|
+
view: 'default',
|
65
|
+
size: 'm',
|
66
|
+
stretching: 'filled',
|
67
|
+
},
|
68
|
+
render: ({ ...args }: StoryProps) => {
|
69
|
+
return (
|
70
|
+
<Cell
|
71
|
+
contentLeft={
|
72
|
+
<Avatar size={getSize(args.size)} url="https://avatars.githubusercontent.com/u/1813468?v=4" />
|
73
|
+
}
|
74
|
+
contentRight={<ChevronRight color="inherit" size="xs" />}
|
75
|
+
title="Title"
|
76
|
+
subtitle="Subtitle"
|
77
|
+
label="Label"
|
78
|
+
{...args}
|
79
|
+
/>
|
80
|
+
);
|
81
|
+
},
|
82
|
+
};
|
83
|
+
|
84
|
+
export const WithContentTextbox: Story = {
|
85
|
+
args: {
|
86
|
+
view: 'default',
|
87
|
+
size: 'm',
|
88
|
+
stretching: 'filled',
|
89
|
+
},
|
90
|
+
render: ({ ...args }: StoryProps) => {
|
91
|
+
return (
|
92
|
+
<Cell
|
93
|
+
contentLeft={
|
94
|
+
<Avatar size={getSize(args.size)} url="https://avatars.githubusercontent.com/u/1813468?v=4" />
|
95
|
+
}
|
96
|
+
contentRight={<ChevronRight color="inherit" size="xs" />}
|
97
|
+
{...args}
|
98
|
+
>
|
99
|
+
<Textbox title="Title" subtitle="Subtitle" label="Label" />
|
100
|
+
</Cell>
|
101
|
+
);
|
102
|
+
},
|
103
|
+
};
|
104
|
+
|
105
|
+
export const WithContentTextboxWithTags: Story = {
|
106
|
+
args: {
|
107
|
+
view: 'default',
|
108
|
+
size: 'm',
|
109
|
+
stretching: 'filled',
|
110
|
+
},
|
111
|
+
render: ({ ...args }: StoryProps) => {
|
112
|
+
return (
|
113
|
+
<Cell
|
114
|
+
contentLeft={
|
115
|
+
<Avatar size={getSize(args.size)} url="https://avatars.githubusercontent.com/u/1813468?v=4" />
|
116
|
+
}
|
117
|
+
contentRight={<ChevronRight color="inherit" size="xs" />}
|
118
|
+
{...args}
|
119
|
+
>
|
120
|
+
<Textbox>
|
121
|
+
<TextLabel>Label</TextLabel>
|
122
|
+
<TextTitle>Title</TextTitle>
|
123
|
+
<TextSubtitle>Subtitle</TextSubtitle>
|
124
|
+
</Textbox>
|
125
|
+
</Cell>
|
126
|
+
);
|
127
|
+
},
|
128
|
+
};
|
129
|
+
|
130
|
+
export const WithContentTextboxCustom: Story = {
|
131
|
+
args: {
|
132
|
+
view: 'default',
|
133
|
+
size: 'm',
|
134
|
+
stretching: 'filled',
|
135
|
+
},
|
136
|
+
render: ({ ...args }: StoryProps) => {
|
137
|
+
const MyStyledText = styled.div`
|
138
|
+
font-size: 12px;
|
139
|
+
font-weight: 600;
|
140
|
+
opacity: 0.5;
|
141
|
+
`;
|
142
|
+
return (
|
143
|
+
<Cell
|
144
|
+
contentLeft={
|
145
|
+
<Avatar size={getSize(args.size)} url="https://avatars.githubusercontent.com/u/1813468?v=4" />
|
146
|
+
}
|
147
|
+
contentRight={<ChevronRight color="inherit" size="xs" />}
|
148
|
+
{...args}
|
149
|
+
>
|
150
|
+
<Textbox>
|
151
|
+
<TextTitle>Title</TextTitle>
|
152
|
+
<MyStyledText>My styled Text</MyStyledText>
|
153
|
+
</Textbox>
|
154
|
+
</Cell>
|
155
|
+
);
|
156
|
+
},
|
157
|
+
};
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { css } from 'styled-components';
|
2
|
+
import { cellTokens } from '../../../../components/Cell';
|
3
|
+
export var config = {
|
4
|
+
defaults: {
|
5
|
+
view: 'primary',
|
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-regular-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-regular-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-regular-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-regular-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-regular-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-regular-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-regular-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-regular-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-regular-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-regular-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-regular-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-regular-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 };
|
@@ -0,0 +1,157 @@
|
|
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, TextLabel, TextTitle, TextSubtitle } from './Cell';
|
11
|
+
|
12
|
+
type StoryProps = ComponentProps<typeof Cell> & { itemsCount?: number };
|
13
|
+
type Story = StoryObj<StoryProps>;
|
14
|
+
|
15
|
+
const views = ['default'];
|
16
|
+
const sizes = ['l', 'm', 's', 'xs'];
|
17
|
+
const stretchingValues = ['fixed', 'filled'];
|
18
|
+
|
19
|
+
type sizesCell = 'xs' | 'l' | 'm' | 's';
|
20
|
+
type sizesAvatar = 'l' | 'm' | 's';
|
21
|
+
|
22
|
+
const getSize = (size: sizesCell): sizesAvatar => {
|
23
|
+
if (size === 'xs') {
|
24
|
+
return 's';
|
25
|
+
}
|
26
|
+
|
27
|
+
return size;
|
28
|
+
};
|
29
|
+
|
30
|
+
const meta: Meta<typeof Cell> = {
|
31
|
+
title: 'plasma_web/Cell',
|
32
|
+
decorators: [WithTheme],
|
33
|
+
argTypes: {
|
34
|
+
size: {
|
35
|
+
options: sizes,
|
36
|
+
control: {
|
37
|
+
type: 'select',
|
38
|
+
},
|
39
|
+
},
|
40
|
+
view: {
|
41
|
+
options: views,
|
42
|
+
control: {
|
43
|
+
type: 'select',
|
44
|
+
},
|
45
|
+
},
|
46
|
+
stretching: {
|
47
|
+
options: stretchingValues,
|
48
|
+
control: {
|
49
|
+
type: 'select',
|
50
|
+
},
|
51
|
+
},
|
52
|
+
},
|
53
|
+
};
|
54
|
+
|
55
|
+
export default meta;
|
56
|
+
|
57
|
+
const ChevronRight = styled(IconChevronLeft)`
|
58
|
+
transform: rotate(180deg);
|
59
|
+
color: var(--text-secondary);
|
60
|
+
`;
|
61
|
+
|
62
|
+
export const Default: Story = {
|
63
|
+
args: {
|
64
|
+
view: 'default',
|
65
|
+
size: 'm',
|
66
|
+
stretching: 'filled',
|
67
|
+
},
|
68
|
+
render: ({ ...args }: StoryProps) => {
|
69
|
+
return (
|
70
|
+
<Cell
|
71
|
+
contentLeft={
|
72
|
+
<Avatar size={getSize(args.size)} url="https://avatars.githubusercontent.com/u/1813468?v=4" />
|
73
|
+
}
|
74
|
+
contentRight={<ChevronRight color="inherit" size="xs" />}
|
75
|
+
title="Title"
|
76
|
+
subtitle="Subtitle"
|
77
|
+
label="Label"
|
78
|
+
{...args}
|
79
|
+
/>
|
80
|
+
);
|
81
|
+
},
|
82
|
+
};
|
83
|
+
|
84
|
+
export const WithContentTextbox: Story = {
|
85
|
+
args: {
|
86
|
+
view: 'default',
|
87
|
+
size: 'm',
|
88
|
+
stretching: 'filled',
|
89
|
+
},
|
90
|
+
render: ({ ...args }: StoryProps) => {
|
91
|
+
return (
|
92
|
+
<Cell
|
93
|
+
contentLeft={
|
94
|
+
<Avatar size={getSize(args.size)} url="https://avatars.githubusercontent.com/u/1813468?v=4" />
|
95
|
+
}
|
96
|
+
contentRight={<ChevronRight color="inherit" size="xs" />}
|
97
|
+
{...args}
|
98
|
+
>
|
99
|
+
<Textbox title="Title" subtitle="Subtitle" label="Label" />
|
100
|
+
</Cell>
|
101
|
+
);
|
102
|
+
},
|
103
|
+
};
|
104
|
+
|
105
|
+
export const WithContentTextboxWithTags: Story = {
|
106
|
+
args: {
|
107
|
+
view: 'default',
|
108
|
+
size: 'm',
|
109
|
+
stretching: 'filled',
|
110
|
+
},
|
111
|
+
render: ({ ...args }: StoryProps) => {
|
112
|
+
return (
|
113
|
+
<Cell
|
114
|
+
contentLeft={
|
115
|
+
<Avatar size={getSize(args.size)} url="https://avatars.githubusercontent.com/u/1813468?v=4" />
|
116
|
+
}
|
117
|
+
contentRight={<ChevronRight color="inherit" size="xs" />}
|
118
|
+
{...args}
|
119
|
+
>
|
120
|
+
<Textbox>
|
121
|
+
<TextLabel>Label</TextLabel>
|
122
|
+
<TextTitle>Title</TextTitle>
|
123
|
+
<TextSubtitle>Subtitle</TextSubtitle>
|
124
|
+
</Textbox>
|
125
|
+
</Cell>
|
126
|
+
);
|
127
|
+
},
|
128
|
+
};
|
129
|
+
|
130
|
+
export const WithContentTextboxCustom: Story = {
|
131
|
+
args: {
|
132
|
+
view: 'default',
|
133
|
+
size: 'm',
|
134
|
+
stretching: 'filled',
|
135
|
+
},
|
136
|
+
render: ({ ...args }: StoryProps) => {
|
137
|
+
const MyStyledText = styled.div`
|
138
|
+
font-size: 12px;
|
139
|
+
font-weight: 600;
|
140
|
+
opacity: 0.5;
|
141
|
+
`;
|
142
|
+
return (
|
143
|
+
<Cell
|
144
|
+
contentLeft={
|
145
|
+
<Avatar size={getSize(args.size)} url="https://avatars.githubusercontent.com/u/1813468?v=4" />
|
146
|
+
}
|
147
|
+
contentRight={<ChevronRight color="inherit" size="xs" />}
|
148
|
+
{...args}
|
149
|
+
>
|
150
|
+
<Textbox>
|
151
|
+
<TextTitle>Title</TextTitle>
|
152
|
+
<MyStyledText>My styled Text</MyStyledText>
|
153
|
+
</Textbox>
|
154
|
+
</Cell>
|
155
|
+
);
|
156
|
+
},
|
157
|
+
};
|
@@ -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,49 @@
|
|
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<React.HTMLAttributes<HTMLDivElement> & {
|
5
|
+
size: import("./Cell.types").Sizes;
|
6
|
+
contentLeft?: React.ReactNode;
|
7
|
+
contentRight?: React.ReactNode;
|
8
|
+
content?: React.ReactNode;
|
9
|
+
alignLeft?: import("./Cell.types").AlignLeftProp | undefined;
|
10
|
+
alignRight?: import("./Cell.types").AlignRightProp | undefined;
|
11
|
+
stretching?: "fixed" | "auto" | "filled" | undefined;
|
12
|
+
title?: React.ReactNode;
|
13
|
+
subtitle?: React.ReactNode;
|
14
|
+
label?: React.ReactNode;
|
15
|
+
} & React.RefAttributes<HTMLSelectElement>>;
|
16
|
+
export declare const cellConfig: {
|
17
|
+
name: string;
|
18
|
+
tag: string;
|
19
|
+
layout: (Root: RootProps<HTMLSelectElement, CellProps>) => React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
20
|
+
size: import("./Cell.types").Sizes;
|
21
|
+
contentLeft?: React.ReactNode;
|
22
|
+
contentRight?: React.ReactNode;
|
23
|
+
content?: React.ReactNode;
|
24
|
+
alignLeft?: import("./Cell.types").AlignLeftProp | undefined;
|
25
|
+
alignRight?: import("./Cell.types").AlignRightProp | undefined;
|
26
|
+
stretching?: "fixed" | "auto" | "filled" | undefined;
|
27
|
+
title?: React.ReactNode;
|
28
|
+
subtitle?: React.ReactNode;
|
29
|
+
label?: React.ReactNode;
|
30
|
+
} & React.RefAttributes<HTMLSelectElement>>;
|
31
|
+
base: string;
|
32
|
+
variations: {
|
33
|
+
view: {
|
34
|
+
css: import("@linaria/core").LinariaClassName;
|
35
|
+
};
|
36
|
+
size: {
|
37
|
+
css: import("@linaria/core").LinariaClassName;
|
38
|
+
};
|
39
|
+
stretching: {
|
40
|
+
css: import("@linaria/core").LinariaClassName;
|
41
|
+
};
|
42
|
+
};
|
43
|
+
defaults: {
|
44
|
+
view: string;
|
45
|
+
size: string;
|
46
|
+
stretching: string;
|
47
|
+
};
|
48
|
+
};
|
49
|
+
//# sourceMappingURL=Cell.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Cell.d.ts","sourceRoot":"","sources":["../../../src/components/Cell/Cell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAW9C,eAAO,MAAM,QAAQ,SAAU,UAAU,iBAAiB,EAAE,SAAS,CAAC;;;;;;;;;;;2CAsChE,CAAC;AAEP,eAAO,MAAM,UAAU;;;mBAxCQ,UAAU,iBAAiB,EAAE,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6DrE,CAAC"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { AlignLeftProp, AlignRightProp } from './Cell.types';
|
2
|
+
export declare const CellRoot: import("styled-components").StyledComponent<"div", any, {}, never>;
|
3
|
+
export declare const CellContentWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
4
|
+
export declare const CellContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
5
|
+
export declare const CellLeft: import("styled-components").StyledComponent<"div", any, {
|
6
|
+
align: AlignLeftProp;
|
7
|
+
}, never>;
|
8
|
+
export declare const CellRight: import("styled-components").StyledComponent<"div", any, {
|
9
|
+
align: AlignRightProp;
|
10
|
+
}, never>;
|
11
|
+
//# sourceMappingURL=Cell.styles.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Cell.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Cell/Cell.styles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AASlE,eAAO,MAAM,QAAQ,oEAQpB,CAAC;AAEF,eAAO,MAAM,kBAAkB,oEAK9B,CAAC;AAEF,eAAO,MAAM,WAAW,oEAGvB,CAAC;AAEF,eAAO,MAAM,QAAQ;WAAuB,aAAa;SAGxD,CAAC;AAEF,eAAO,MAAM,SAAS;WAAuB,cAAc;SAI1D,CAAC"}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
export declare const tokens: {
|
2
|
+
cellColor: string;
|
3
|
+
cellBackgroundColor: string;
|
4
|
+
cellPadding: string;
|
5
|
+
cellPaddingLeftContent: string;
|
6
|
+
cellPaddingContent: string;
|
7
|
+
cellPaddingRightContent: string;
|
8
|
+
cellTextboxGap: string;
|
9
|
+
cellGap: string;
|
10
|
+
cellWidth: string;
|
11
|
+
cellLabelColor: string;
|
12
|
+
cellLabelFontFamily: string;
|
13
|
+
cellLabelFontSize: string;
|
14
|
+
cellLabelFontStyle: string;
|
15
|
+
cellLabelFontWeight: string;
|
16
|
+
cellLabelLetterSpacing: string;
|
17
|
+
cellLabelLineHeight: string;
|
18
|
+
cellTitleColor: string;
|
19
|
+
cellTitleFontFamily: string;
|
20
|
+
cellTitleFontSize: string;
|
21
|
+
cellTitleFontStyle: string;
|
22
|
+
cellTitleFontWeight: string;
|
23
|
+
cellTitleLetterSpacing: string;
|
24
|
+
cellTitleLineHeight: string;
|
25
|
+
cellSubtitleColor: string;
|
26
|
+
cellSubtitleFontFamily: string;
|
27
|
+
cellSubtitleFontSize: string;
|
28
|
+
cellSubtitleFontStyle: string;
|
29
|
+
cellSubtitleFontWeight: string;
|
30
|
+
cellSubtitleLetterSpacing: string;
|
31
|
+
cellSubtitleLineHeight: string;
|
32
|
+
};
|
33
|
+
export declare const classes: {
|
34
|
+
cellStretch: string;
|
35
|
+
autoStretching: string;
|
36
|
+
filledStretching: string;
|
37
|
+
fixedStretching: string;
|
38
|
+
cellWrapper: string;
|
39
|
+
cellRoot: string;
|
40
|
+
cellContent: string;
|
41
|
+
cellLeftContent: string;
|
42
|
+
cellRightContent: string;
|
43
|
+
};
|
44
|
+
//# sourceMappingURL=Cell.tokens.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Cell.tokens.d.ts","sourceRoot":"","sources":["../../../src/components/Cell/Cell.tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqClB,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;;;;;CAWnB,CAAC"}
|