@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,9 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.base = void 0;
|
7
|
+
var _styledComponents = /*#__PURE__*/require("styled-components");
|
8
|
+
var _Cell = /*#__PURE__*/require("../../Cell.tokens");
|
9
|
+
var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(["color:var(", ");background-color:var(", ");"], _Cell.tokens.cellColor, _Cell.tokens.cellBackgroundColor);
|
@@ -0,0 +1 @@
|
|
1
|
+
["--plasma-cell-color", "--plasma-cell-background-color"]
|
@@ -0,0 +1,31 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.config = void 0;
|
7
|
+
var _styledComponents = /*#__PURE__*/require("styled-components");
|
8
|
+
var _Cell = /*#__PURE__*/require("../../../../components/Cell");
|
9
|
+
var config = exports.config = {
|
10
|
+
defaults: {
|
11
|
+
view: 'primary',
|
12
|
+
size: 'm',
|
13
|
+
stretching: 'filled'
|
14
|
+
},
|
15
|
+
variations: {
|
16
|
+
view: {
|
17
|
+
"default": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-primary);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-secondary);", ":transparent;"], _Cell.cellTokens.cellColor, _Cell.cellTokens.cellLabelColor, _Cell.cellTokens.cellTitleColor, _Cell.cellTokens.cellSubtitleColor, _Cell.cellTokens.cellBackgroundColor)
|
18
|
+
},
|
19
|
+
size: {
|
20
|
+
l: /*#__PURE__*/(0, _styledComponents.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);"], _Cell.cellTokens.cellWidth, _Cell.cellTokens.cellPadding, _Cell.cellTokens.cellPaddingLeftContent, _Cell.cellTokens.cellPaddingContent, _Cell.cellTokens.cellPaddingRightContent, _Cell.cellTokens.cellTextboxGap, _Cell.cellTokens.cellGap, _Cell.cellTokens.cellLabelFontFamily, _Cell.cellTokens.cellLabelFontSize, _Cell.cellTokens.cellLabelFontStyle, _Cell.cellTokens.cellLabelFontWeight, _Cell.cellTokens.cellLabelLetterSpacing, _Cell.cellTokens.cellLabelLineHeight, _Cell.cellTokens.cellTitleFontFamily, _Cell.cellTokens.cellTitleFontSize, _Cell.cellTokens.cellTitleFontStyle, _Cell.cellTokens.cellTitleFontWeight, _Cell.cellTokens.cellTitleLetterSpacing, _Cell.cellTokens.cellTitleLineHeight, _Cell.cellTokens.cellSubtitleFontFamily, _Cell.cellTokens.cellSubtitleFontSize, _Cell.cellTokens.cellSubtitleFontStyle, _Cell.cellTokens.cellSubtitleFontWeight, _Cell.cellTokens.cellSubtitleLetterSpacing, _Cell.cellTokens.cellSubtitleLineHeight),
|
21
|
+
m: /*#__PURE__*/(0, _styledComponents.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);"], _Cell.cellTokens.cellWidth, _Cell.cellTokens.cellPadding, _Cell.cellTokens.cellPaddingLeftContent, _Cell.cellTokens.cellPaddingContent, _Cell.cellTokens.cellPaddingRightContent, _Cell.cellTokens.cellTextboxGap, _Cell.cellTokens.cellGap, _Cell.cellTokens.cellLabelFontFamily, _Cell.cellTokens.cellLabelFontSize, _Cell.cellTokens.cellLabelFontStyle, _Cell.cellTokens.cellLabelFontWeight, _Cell.cellTokens.cellLabelLetterSpacing, _Cell.cellTokens.cellLabelLineHeight, _Cell.cellTokens.cellTitleFontFamily, _Cell.cellTokens.cellTitleFontSize, _Cell.cellTokens.cellTitleFontStyle, _Cell.cellTokens.cellTitleFontWeight, _Cell.cellTokens.cellTitleLetterSpacing, _Cell.cellTokens.cellTitleLineHeight, _Cell.cellTokens.cellSubtitleFontFamily, _Cell.cellTokens.cellSubtitleFontSize, _Cell.cellTokens.cellSubtitleFontStyle, _Cell.cellTokens.cellSubtitleFontWeight, _Cell.cellTokens.cellSubtitleLetterSpacing, _Cell.cellTokens.cellSubtitleLineHeight),
|
22
|
+
s: /*#__PURE__*/(0, _styledComponents.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);"], _Cell.cellTokens.cellWidth, _Cell.cellTokens.cellPadding, _Cell.cellTokens.cellPaddingLeftContent, _Cell.cellTokens.cellPaddingContent, _Cell.cellTokens.cellPaddingRightContent, _Cell.cellTokens.cellTextboxGap, _Cell.cellTokens.cellGap, _Cell.cellTokens.cellLabelFontFamily, _Cell.cellTokens.cellLabelFontSize, _Cell.cellTokens.cellLabelFontStyle, _Cell.cellTokens.cellLabelFontWeight, _Cell.cellTokens.cellLabelLetterSpacing, _Cell.cellTokens.cellLabelLineHeight, _Cell.cellTokens.cellTitleFontFamily, _Cell.cellTokens.cellTitleFontSize, _Cell.cellTokens.cellTitleFontStyle, _Cell.cellTokens.cellTitleFontWeight, _Cell.cellTokens.cellTitleLetterSpacing, _Cell.cellTokens.cellTitleLineHeight, _Cell.cellTokens.cellSubtitleFontFamily, _Cell.cellTokens.cellSubtitleFontSize, _Cell.cellTokens.cellSubtitleFontStyle, _Cell.cellTokens.cellSubtitleFontWeight, _Cell.cellTokens.cellSubtitleLetterSpacing, _Cell.cellTokens.cellSubtitleLineHeight),
|
23
|
+
xs: /*#__PURE__*/(0, _styledComponents.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);"], _Cell.cellTokens.cellWidth, _Cell.cellTokens.cellPadding, _Cell.cellTokens.cellPaddingLeftContent, _Cell.cellTokens.cellPaddingContent, _Cell.cellTokens.cellPaddingRightContent, _Cell.cellTokens.cellTextboxGap, _Cell.cellTokens.cellGap, _Cell.cellTokens.cellLabelFontFamily, _Cell.cellTokens.cellLabelFontSize, _Cell.cellTokens.cellLabelFontStyle, _Cell.cellTokens.cellLabelFontWeight, _Cell.cellTokens.cellLabelLetterSpacing, _Cell.cellTokens.cellLabelLineHeight, _Cell.cellTokens.cellTitleFontFamily, _Cell.cellTokens.cellTitleFontSize, _Cell.cellTokens.cellTitleFontStyle, _Cell.cellTokens.cellTitleFontWeight, _Cell.cellTokens.cellTitleLetterSpacing, _Cell.cellTokens.cellTitleLineHeight, _Cell.cellTokens.cellSubtitleFontFamily, _Cell.cellTokens.cellSubtitleFontSize, _Cell.cellTokens.cellSubtitleFontStyle, _Cell.cellTokens.cellSubtitleFontWeight, _Cell.cellTokens.cellSubtitleLetterSpacing, _Cell.cellTokens.cellSubtitleLineHeight)
|
24
|
+
},
|
25
|
+
stretching: {
|
26
|
+
auto: /*#__PURE__*/(0, _styledComponents.css)([""]),
|
27
|
+
filled: /*#__PURE__*/(0, _styledComponents.css)([""]),
|
28
|
+
fixed: /*#__PURE__*/(0, _styledComponents.css)([""])
|
29
|
+
}
|
30
|
+
}
|
31
|
+
};
|
@@ -0,0 +1,35 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.Cell = void 0;
|
7
|
+
Object.defineProperty(exports, "TextLabel", {
|
8
|
+
enumerable: true,
|
9
|
+
get: function get() {
|
10
|
+
return _Cell.TextLabel;
|
11
|
+
}
|
12
|
+
});
|
13
|
+
Object.defineProperty(exports, "TextSubtitle", {
|
14
|
+
enumerable: true,
|
15
|
+
get: function get() {
|
16
|
+
return _Cell.TextSubtitle;
|
17
|
+
}
|
18
|
+
});
|
19
|
+
Object.defineProperty(exports, "TextTitle", {
|
20
|
+
enumerable: true,
|
21
|
+
get: function get() {
|
22
|
+
return _Cell.TextTitle;
|
23
|
+
}
|
24
|
+
});
|
25
|
+
Object.defineProperty(exports, "Textbox", {
|
26
|
+
enumerable: true,
|
27
|
+
get: function get() {
|
28
|
+
return _Cell.Textbox;
|
29
|
+
}
|
30
|
+
});
|
31
|
+
var _Cell = /*#__PURE__*/require("../../../../components/Cell");
|
32
|
+
var _engines = /*#__PURE__*/require("../../../../engines");
|
33
|
+
var _Cell2 = /*#__PURE__*/require("./Cell.config");
|
34
|
+
var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_Cell.cellConfig, _Cell2.config);
|
35
|
+
var Cell = exports.Cell = /*#__PURE__*/(0, _engines.component)(mergedConfig);
|
@@ -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,31 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.config = void 0;
|
7
|
+
var _styledComponents = /*#__PURE__*/require("styled-components");
|
8
|
+
var _Cell = /*#__PURE__*/require("../../../../components/Cell");
|
9
|
+
var config = exports.config = {
|
10
|
+
defaults: {
|
11
|
+
view: 'primary',
|
12
|
+
size: 'm',
|
13
|
+
stretching: 'filled'
|
14
|
+
},
|
15
|
+
variations: {
|
16
|
+
view: {
|
17
|
+
"default": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-primary);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-secondary);", ":transparent;"], _Cell.cellTokens.cellColor, _Cell.cellTokens.cellLabelColor, _Cell.cellTokens.cellTitleColor, _Cell.cellTokens.cellSubtitleColor, _Cell.cellTokens.cellBackgroundColor)
|
18
|
+
},
|
19
|
+
size: {
|
20
|
+
l: /*#__PURE__*/(0, _styledComponents.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);"], _Cell.cellTokens.cellWidth, _Cell.cellTokens.cellPadding, _Cell.cellTokens.cellPaddingLeftContent, _Cell.cellTokens.cellPaddingContent, _Cell.cellTokens.cellPaddingRightContent, _Cell.cellTokens.cellTextboxGap, _Cell.cellTokens.cellGap, _Cell.cellTokens.cellLabelFontFamily, _Cell.cellTokens.cellLabelFontSize, _Cell.cellTokens.cellLabelFontStyle, _Cell.cellTokens.cellLabelFontWeight, _Cell.cellTokens.cellLabelLetterSpacing, _Cell.cellTokens.cellLabelLineHeight, _Cell.cellTokens.cellTitleFontFamily, _Cell.cellTokens.cellTitleFontSize, _Cell.cellTokens.cellTitleFontStyle, _Cell.cellTokens.cellTitleFontWeight, _Cell.cellTokens.cellTitleLetterSpacing, _Cell.cellTokens.cellTitleLineHeight, _Cell.cellTokens.cellSubtitleFontFamily, _Cell.cellTokens.cellSubtitleFontSize, _Cell.cellTokens.cellSubtitleFontStyle, _Cell.cellTokens.cellSubtitleFontWeight, _Cell.cellTokens.cellSubtitleLetterSpacing, _Cell.cellTokens.cellSubtitleLineHeight),
|
21
|
+
m: /*#__PURE__*/(0, _styledComponents.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);"], _Cell.cellTokens.cellWidth, _Cell.cellTokens.cellPadding, _Cell.cellTokens.cellPaddingLeftContent, _Cell.cellTokens.cellPaddingContent, _Cell.cellTokens.cellPaddingRightContent, _Cell.cellTokens.cellTextboxGap, _Cell.cellTokens.cellGap, _Cell.cellTokens.cellLabelFontFamily, _Cell.cellTokens.cellLabelFontSize, _Cell.cellTokens.cellLabelFontStyle, _Cell.cellTokens.cellLabelFontWeight, _Cell.cellTokens.cellLabelLetterSpacing, _Cell.cellTokens.cellLabelLineHeight, _Cell.cellTokens.cellTitleFontFamily, _Cell.cellTokens.cellTitleFontSize, _Cell.cellTokens.cellTitleFontStyle, _Cell.cellTokens.cellTitleFontWeight, _Cell.cellTokens.cellTitleLetterSpacing, _Cell.cellTokens.cellTitleLineHeight, _Cell.cellTokens.cellSubtitleFontFamily, _Cell.cellTokens.cellSubtitleFontSize, _Cell.cellTokens.cellSubtitleFontStyle, _Cell.cellTokens.cellSubtitleFontWeight, _Cell.cellTokens.cellSubtitleLetterSpacing, _Cell.cellTokens.cellSubtitleLineHeight),
|
22
|
+
s: /*#__PURE__*/(0, _styledComponents.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);"], _Cell.cellTokens.cellWidth, _Cell.cellTokens.cellPadding, _Cell.cellTokens.cellPaddingLeftContent, _Cell.cellTokens.cellPaddingContent, _Cell.cellTokens.cellPaddingRightContent, _Cell.cellTokens.cellTextboxGap, _Cell.cellTokens.cellGap, _Cell.cellTokens.cellLabelFontFamily, _Cell.cellTokens.cellLabelFontSize, _Cell.cellTokens.cellLabelFontStyle, _Cell.cellTokens.cellLabelFontWeight, _Cell.cellTokens.cellLabelLetterSpacing, _Cell.cellTokens.cellLabelLineHeight, _Cell.cellTokens.cellTitleFontFamily, _Cell.cellTokens.cellTitleFontSize, _Cell.cellTokens.cellTitleFontStyle, _Cell.cellTokens.cellTitleFontWeight, _Cell.cellTokens.cellTitleLetterSpacing, _Cell.cellTokens.cellTitleLineHeight, _Cell.cellTokens.cellSubtitleFontFamily, _Cell.cellTokens.cellSubtitleFontSize, _Cell.cellTokens.cellSubtitleFontStyle, _Cell.cellTokens.cellSubtitleFontWeight, _Cell.cellTokens.cellSubtitleLetterSpacing, _Cell.cellTokens.cellSubtitleLineHeight),
|
23
|
+
xs: /*#__PURE__*/(0, _styledComponents.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);"], _Cell.cellTokens.cellWidth, _Cell.cellTokens.cellPadding, _Cell.cellTokens.cellPaddingLeftContent, _Cell.cellTokens.cellPaddingContent, _Cell.cellTokens.cellPaddingRightContent, _Cell.cellTokens.cellTextboxGap, _Cell.cellTokens.cellGap, _Cell.cellTokens.cellGap, _Cell.cellTokens.cellLabelFontFamily, _Cell.cellTokens.cellLabelFontSize, _Cell.cellTokens.cellLabelFontStyle, _Cell.cellTokens.cellLabelFontWeight, _Cell.cellTokens.cellLabelLetterSpacing, _Cell.cellTokens.cellLabelLineHeight, _Cell.cellTokens.cellTitleFontFamily, _Cell.cellTokens.cellTitleFontSize, _Cell.cellTokens.cellTitleFontStyle, _Cell.cellTokens.cellTitleFontWeight, _Cell.cellTokens.cellTitleLetterSpacing, _Cell.cellTokens.cellTitleLineHeight, _Cell.cellTokens.cellSubtitleFontFamily, _Cell.cellTokens.cellSubtitleFontSize, _Cell.cellTokens.cellSubtitleFontStyle, _Cell.cellTokens.cellSubtitleFontWeight, _Cell.cellTokens.cellSubtitleLetterSpacing, _Cell.cellTokens.cellSubtitleLineHeight)
|
24
|
+
},
|
25
|
+
stretching: {
|
26
|
+
auto: /*#__PURE__*/(0, _styledComponents.css)([""]),
|
27
|
+
filled: /*#__PURE__*/(0, _styledComponents.css)([""]),
|
28
|
+
fixed: /*#__PURE__*/(0, _styledComponents.css)([""])
|
29
|
+
}
|
30
|
+
}
|
31
|
+
};
|
@@ -0,0 +1,35 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.Cell = void 0;
|
7
|
+
Object.defineProperty(exports, "TextLabel", {
|
8
|
+
enumerable: true,
|
9
|
+
get: function get() {
|
10
|
+
return _Cell.TextLabel;
|
11
|
+
}
|
12
|
+
});
|
13
|
+
Object.defineProperty(exports, "TextSubtitle", {
|
14
|
+
enumerable: true,
|
15
|
+
get: function get() {
|
16
|
+
return _Cell.TextSubtitle;
|
17
|
+
}
|
18
|
+
});
|
19
|
+
Object.defineProperty(exports, "TextTitle", {
|
20
|
+
enumerable: true,
|
21
|
+
get: function get() {
|
22
|
+
return _Cell.TextTitle;
|
23
|
+
}
|
24
|
+
});
|
25
|
+
Object.defineProperty(exports, "Textbox", {
|
26
|
+
enumerable: true,
|
27
|
+
get: function get() {
|
28
|
+
return _Cell.Textbox;
|
29
|
+
}
|
30
|
+
});
|
31
|
+
var _Cell = /*#__PURE__*/require("../../../../components/Cell");
|
32
|
+
var _engines = /*#__PURE__*/require("../../../../engines");
|
33
|
+
var _Cell2 = /*#__PURE__*/require("./Cell.config");
|
34
|
+
var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_Cell.cellConfig, _Cell2.config);
|
35
|
+
var Cell = exports.Cell = /*#__PURE__*/(0, _engines.component)(mergedConfig);
|
@@ -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
|
+
};
|
@@ -69,6 +69,17 @@ Object.keys(_Chip).forEach(function (key) {
|
|
69
69
|
}
|
70
70
|
});
|
71
71
|
});
|
72
|
+
var _Cell = /*#__PURE__*/require("./components/Cell");
|
73
|
+
Object.keys(_Cell).forEach(function (key) {
|
74
|
+
if (key === "default" || key === "__esModule") return;
|
75
|
+
if (key in exports && exports[key] === _Cell[key]) return;
|
76
|
+
Object.defineProperty(exports, key, {
|
77
|
+
enumerable: true,
|
78
|
+
get: function get() {
|
79
|
+
return _Cell[key];
|
80
|
+
}
|
81
|
+
});
|
82
|
+
});
|
72
83
|
var _Link = /*#__PURE__*/require("./components/Link");
|
73
84
|
Object.keys(_Link).forEach(function (key) {
|
74
85
|
if (key === "default" || key === "__esModule") return;
|
@@ -0,0 +1,63 @@
|
|
1
|
+
import React, { forwardRef } from 'react';
|
2
|
+
import { cx } from '../../utils';
|
3
|
+
import { CellRoot, CellLeft, CellRight, CellContentWrapper, CellContent } from './Cell.styles';
|
4
|
+
import { classes } from './Cell.tokens';
|
5
|
+
import { base as viewCSS } from './variations/_view/base';
|
6
|
+
import { base as sizeCSS } from './variations/_size/base';
|
7
|
+
import { base as stretchingCSS } from './variations/_stretching/base';
|
8
|
+
import { Textbox } from './Textbox/Textbox';
|
9
|
+
import { TextLabel } from './Textbox/ui/TextLabel';
|
10
|
+
import { TextTitle } from './Textbox/ui/TextTitle';
|
11
|
+
import { TextSubtitle } from './Textbox/ui/TextSubtitle';
|
12
|
+
export var cellRoot = function cellRoot(Root) {
|
13
|
+
return /*#__PURE__*/forwardRef(function (props, outerRootRef) {
|
14
|
+
var _props$size = props.size,
|
15
|
+
size = _props$size === void 0 ? 'm' : _props$size,
|
16
|
+
left = props.contentLeft,
|
17
|
+
right = props.contentRight,
|
18
|
+
_props$alignLeft = props.alignLeft,
|
19
|
+
alignLeft = _props$alignLeft === void 0 ? 'center' : _props$alignLeft,
|
20
|
+
_props$alignRight = props.alignRight,
|
21
|
+
alignRight = _props$alignRight === void 0 ? 'center' : _props$alignRight,
|
22
|
+
_props$stretching = props.stretching,
|
23
|
+
stretching = _props$stretching === void 0 ? 'filled' : _props$stretching,
|
24
|
+
children = props.children,
|
25
|
+
title = props.title,
|
26
|
+
subtitle = props.subtitle,
|
27
|
+
label = props.label;
|
28
|
+
var stretchingClass = classes["".concat(stretching, "Stretching")];
|
29
|
+
return /*#__PURE__*/React.createElement(Root, {
|
30
|
+
ref: outerRootRef,
|
31
|
+
size: size,
|
32
|
+
className: cx(stretchingClass)
|
33
|
+
}, /*#__PURE__*/React.createElement(CellRoot, {
|
34
|
+
className: classes.cellRoot
|
35
|
+
}, left && /*#__PURE__*/React.createElement(CellLeft, {
|
36
|
+
align: alignLeft
|
37
|
+
}, left), /*#__PURE__*/React.createElement(CellContentWrapper, null, /*#__PURE__*/React.createElement(CellContent, null, title || subtitle || label ? /*#__PURE__*/React.createElement(Textbox, null, label && /*#__PURE__*/React.createElement(TextLabel, null, label), title && /*#__PURE__*/React.createElement(TextTitle, null, title), subtitle && /*#__PURE__*/React.createElement(TextSubtitle, null, subtitle)) : children && children), right && /*#__PURE__*/React.createElement(CellRight, {
|
38
|
+
align: alignRight
|
39
|
+
}, right))));
|
40
|
+
});
|
41
|
+
};
|
42
|
+
export var cellConfig = {
|
43
|
+
name: 'Cell',
|
44
|
+
tag: 'div',
|
45
|
+
layout: cellRoot,
|
46
|
+
base: '',
|
47
|
+
variations: {
|
48
|
+
view: {
|
49
|
+
css: viewCSS
|
50
|
+
},
|
51
|
+
size: {
|
52
|
+
css: sizeCSS
|
53
|
+
},
|
54
|
+
stretching: {
|
55
|
+
css: stretchingCSS
|
56
|
+
}
|
57
|
+
},
|
58
|
+
defaults: {
|
59
|
+
view: 'default',
|
60
|
+
size: 'm',
|
61
|
+
stretching: 'filled'
|
62
|
+
}
|
63
|
+
};
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import styled from 'styled-components';
|
2
|
+
import { tokens } from './Cell.tokens';
|
3
|
+
var alignToFlex = {
|
4
|
+
center: 'center',
|
5
|
+
top: 'flex-start',
|
6
|
+
bottom: 'flex-end'
|
7
|
+
};
|
8
|
+
export var CellRoot = /*#__PURE__*/styled.div.withConfig({
|
9
|
+
componentId: "plasma-new-hope__sc-16emz3n-0"
|
10
|
+
})(["width:100%;display:flex;gap:var(", ");&:focus{outline:0 none;}"], tokens.cellGap);
|
11
|
+
export var CellContentWrapper = /*#__PURE__*/styled.div.withConfig({
|
12
|
+
componentId: "plasma-new-hope__sc-16emz3n-1"
|
13
|
+
})(["display:flex;flex:auto;justify-content:space-between;gap:var(", ");"], tokens.cellGap);
|
14
|
+
export var CellContent = /*#__PURE__*/styled.div.withConfig({
|
15
|
+
componentId: "plasma-new-hope__sc-16emz3n-2"
|
16
|
+
})(["display:flex;align-items:center;"]);
|
17
|
+
export var CellLeft = /*#__PURE__*/styled.div.withConfig({
|
18
|
+
componentId: "plasma-new-hope__sc-16emz3n-3"
|
19
|
+
})(["display:flex;align-items:", ";"], function (_ref) {
|
20
|
+
var _ref$align = _ref.align,
|
21
|
+
align = _ref$align === void 0 ? 'center' : _ref$align;
|
22
|
+
return alignToFlex[align];
|
23
|
+
});
|
24
|
+
export var CellRight = /*#__PURE__*/styled.div.withConfig({
|
25
|
+
componentId: "plasma-new-hope__sc-16emz3n-4"
|
26
|
+
})(["display:flex;align-items:", ";text-align:right;"], function (_ref2) {
|
27
|
+
var _ref2$align = _ref2.align,
|
28
|
+
align = _ref2$align === void 0 ? 'center' : _ref2$align;
|
29
|
+
return alignToFlex[align];
|
30
|
+
});
|
@@ -0,0 +1,43 @@
|
|
1
|
+
export var tokens = {
|
2
|
+
cellColor: '--plasma-cell-color',
|
3
|
+
cellBackgroundColor: '--plasma-cell-background-color',
|
4
|
+
cellPadding: '--plasma-cell-padding',
|
5
|
+
cellPaddingLeftContent: '--plasma-cell-left-padding',
|
6
|
+
cellPaddingContent: '--plasma-cell-padding',
|
7
|
+
cellPaddingRightContent: '--plasma-cell-right-padding',
|
8
|
+
cellTextboxGap: '--plasma-cell-textbox-gap',
|
9
|
+
cellGap: '--plasma-cell-gap',
|
10
|
+
cellWidth: '--plasma-cell-width',
|
11
|
+
cellLabelColor: '--plasma-cell-label-color',
|
12
|
+
cellLabelFontFamily: '--plasma-cell-label-font-family',
|
13
|
+
cellLabelFontSize: '--plasma-cell-label-font-size',
|
14
|
+
cellLabelFontStyle: '--plasma-cell-label-font-style',
|
15
|
+
cellLabelFontWeight: '--plasma-cell-label-font-weight',
|
16
|
+
cellLabelLetterSpacing: '--plasma-cell-label-letter-spacing',
|
17
|
+
cellLabelLineHeight: '--plasma-cell-label-line-height',
|
18
|
+
cellTitleColor: '--plasma-cell-title-color',
|
19
|
+
cellTitleFontFamily: '--plasma-cell-title-font-family',
|
20
|
+
cellTitleFontSize: '--plasma-cell-title-font-size',
|
21
|
+
cellTitleFontStyle: '--plasma-cell-title-font-style',
|
22
|
+
cellTitleFontWeight: '--plasma-cell-title-font-weight',
|
23
|
+
cellTitleLetterSpacing: '--plasma-cell-title-letter-spacing',
|
24
|
+
cellTitleLineHeight: '--plasma-cell-title-line-height',
|
25
|
+
cellSubtitleColor: '--plasma-cell-subtitle-color',
|
26
|
+
cellSubtitleFontFamily: '--plasma-cell-subtitle-font-family',
|
27
|
+
cellSubtitleFontSize: '--plasma-cell-subtitle-font-size',
|
28
|
+
cellSubtitleFontStyle: '--plasma-cell-subtitle-font-style',
|
29
|
+
cellSubtitleFontWeight: '--plasma-cell-subtitle-font-weight',
|
30
|
+
cellSubtitleLetterSpacing: '--plasma-cell-subtitle-letter-spacing',
|
31
|
+
cellSubtitleLineHeight: '--plasma-cell-subtitle-line-height'
|
32
|
+
};
|
33
|
+
export var classes = {
|
34
|
+
cellStretch: 'cell-stretch',
|
35
|
+
autoStretching: 'cell-stretching-auto',
|
36
|
+
filledStretching: 'cell-stretching-filled',
|
37
|
+
fixedStretching: 'cell-stretching-fixed',
|
38
|
+
cellWrapper: 'cell-wrapper',
|
39
|
+
cellRoot: 'cell-root',
|
40
|
+
cellContent: 'cell-content',
|
41
|
+
cellLeftContent: 'cell-left-content',
|
42
|
+
cellRightContent: 'cell-right-content'
|
43
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { TextboxStyled } from './Textbox.styles';
|
3
|
+
import { TextLabel } from './ui/TextLabel';
|
4
|
+
import { TextTitle } from './ui/TextTitle';
|
5
|
+
import { TextSubtitle } from './ui/TextSubtitle';
|
6
|
+
export var Textbox = function Textbox(props) {
|
7
|
+
var label = props.label,
|
8
|
+
title = props.title,
|
9
|
+
subtitle = props.subtitle,
|
10
|
+
children = props.children;
|
11
|
+
return /*#__PURE__*/React.createElement(TextboxStyled, null, label || title || subtitle ? /*#__PURE__*/React.createElement(React.Fragment, null, label && /*#__PURE__*/React.createElement(TextLabel, null, label), title && /*#__PURE__*/React.createElement(TextTitle, null, title), subtitle && /*#__PURE__*/React.createElement(TextSubtitle, null, subtitle)) : children);
|
12
|
+
};
|