@salutejs/plasma-new-hope 0.68.0-canary.1148.8452223133.0 → 0.68.0-canary.1151.8450920847.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/index.css +0 -4
- package/cjs/index.js +0 -14
- package/cjs/index.js.map +1 -1
- package/es/index.css +0 -4
- package/es/index.js +0 -6
- package/es/index.js.map +1 -1
- package/package.json +4 -4
- package/styled-components/cjs/index.js +0 -11
- package/styled-components/es/index.js +0 -1
- package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +2 -2
- package/types/examples/plasma_web/components/Combobox/Combobox.d.ts +2 -2
- package/types/index.d.ts +0 -1
- package/types/index.d.ts.map +1 -1
- package/cjs/components/Cell/Cell.css +0 -3
- package/cjs/components/Cell/Cell.js +0 -71
- package/cjs/components/Cell/Cell.js.map +0 -1
- package/cjs/components/Cell/Cell.styles.js +0 -36
- package/cjs/components/Cell/Cell.styles.js.map +0 -1
- package/cjs/components/Cell/Cell.tokens.js +0 -50
- package/cjs/components/Cell/Cell.tokens.js.map +0 -1
- package/cjs/components/Cell/Textbox/Textbox.js +0 -20
- package/cjs/components/Cell/Textbox/Textbox.js.map +0 -1
- package/cjs/components/Cell/Textbox/Textbox.styles.js +0 -13
- package/cjs/components/Cell/Textbox/Textbox.styles.js.map +0 -1
- package/cjs/components/Cell/Textbox/ui/TextLabel.js +0 -17
- package/cjs/components/Cell/Textbox/ui/TextLabel.js.map +0 -1
- package/cjs/components/Cell/Textbox/ui/TextSubtitle.js +0 -17
- package/cjs/components/Cell/Textbox/ui/TextSubtitle.js.map +0 -1
- package/cjs/components/Cell/Textbox/ui/TextTitle.js +0 -17
- package/cjs/components/Cell/Textbox/ui/TextTitle.js.map +0 -1
- package/cjs/components/Cell/variations/_size/base.js +0 -9
- package/cjs/components/Cell/variations/_size/base.js.map +0 -1
- package/cjs/components/Cell/variations/_size/base_x642ct.css +0 -1
- package/cjs/components/Cell/variations/_stretching/base.js +0 -9
- package/cjs/components/Cell/variations/_stretching/base.js.map +0 -1
- package/cjs/components/Cell/variations/_stretching/base_1ryz4br.css +0 -1
- package/cjs/components/Cell/variations/_view/base.js +0 -9
- package/cjs/components/Cell/variations/_view/base.js.map +0 -1
- package/cjs/components/Cell/variations/_view/base_2qgj2i.css +0 -1
- package/es/components/Cell/Cell.css +0 -3
- package/es/components/Cell/Cell.js +0 -66
- package/es/components/Cell/Cell.js.map +0 -1
- package/es/components/Cell/Cell.styles.js +0 -29
- package/es/components/Cell/Cell.styles.js.map +0 -1
- package/es/components/Cell/Cell.tokens.js +0 -45
- package/es/components/Cell/Cell.tokens.js.map +0 -1
- package/es/components/Cell/Textbox/Textbox.js +0 -16
- package/es/components/Cell/Textbox/Textbox.js.map +0 -1
- package/es/components/Cell/Textbox/Textbox.styles.js +0 -9
- package/es/components/Cell/Textbox/Textbox.styles.js.map +0 -1
- package/es/components/Cell/Textbox/ui/TextLabel.js +0 -13
- package/es/components/Cell/Textbox/ui/TextLabel.js.map +0 -1
- package/es/components/Cell/Textbox/ui/TextSubtitle.js +0 -13
- package/es/components/Cell/Textbox/ui/TextSubtitle.js.map +0 -1
- package/es/components/Cell/Textbox/ui/TextTitle.js +0 -13
- package/es/components/Cell/Textbox/ui/TextTitle.js.map +0 -1
- package/es/components/Cell/variations/_size/base.js +0 -5
- package/es/components/Cell/variations/_size/base.js.map +0 -1
- package/es/components/Cell/variations/_size/base_x642ct.css +0 -1
- package/es/components/Cell/variations/_stretching/base.js +0 -5
- package/es/components/Cell/variations/_stretching/base.js.map +0 -1
- package/es/components/Cell/variations/_stretching/base_1ryz4br.css +0 -1
- package/es/components/Cell/variations/_view/base.js +0 -5
- package/es/components/Cell/variations/_view/base.js.map +0 -1
- package/es/components/Cell/variations/_view/base_2qgj2i.css +0 -1
- package/styled-components/cjs/components/Cell/Cell.js +0 -71
- package/styled-components/cjs/components/Cell/Cell.styles.js +0 -32
- package/styled-components/cjs/components/Cell/Cell.tokens.js +0 -48
- package/styled-components/cjs/components/Cell/Cell.types.js +0 -5
- package/styled-components/cjs/components/Cell/Textbox/Textbox.js +0 -19
- package/styled-components/cjs/components/Cell/Textbox/Textbox.styles.js +0 -12
- package/styled-components/cjs/components/Cell/Textbox/Textbox.types.js +0 -5
- package/styled-components/cjs/components/Cell/Textbox/ui/TextLabel.js +0 -16
- package/styled-components/cjs/components/Cell/Textbox/ui/TextSubtitle.js +0 -16
- package/styled-components/cjs/components/Cell/Textbox/ui/TextTitle.js +0 -16
- package/styled-components/cjs/components/Cell/index.js +0 -59
- package/styled-components/cjs/components/Cell/variations/_size/base.js +0 -8
- package/styled-components/cjs/components/Cell/variations/_size/tokens.json +0 -1
- package/styled-components/cjs/components/Cell/variations/_stretching/base.js +0 -9
- package/styled-components/cjs/components/Cell/variations/_stretching/tokens.json +0 -1
- package/styled-components/cjs/components/Cell/variations/_view/base.js +0 -9
- package/styled-components/cjs/components/Cell/variations/_view/tokens.json +0 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Cell/Cell.config.js +0 -31
- package/styled-components/cjs/examples/plasma_b2c/components/Cell/Cell.js +0 -35
- package/styled-components/cjs/examples/plasma_b2c/components/Cell/Cell.stories.tsx +0 -131
- package/styled-components/cjs/examples/plasma_web/components/Cell/Cell.config.js +0 -31
- package/styled-components/cjs/examples/plasma_web/components/Cell/Cell.js +0 -35
- package/styled-components/cjs/examples/plasma_web/components/Cell/Cell.stories.tsx +0 -131
- package/styled-components/es/components/Cell/Cell.js +0 -62
- package/styled-components/es/components/Cell/Cell.styles.js +0 -25
- package/styled-components/es/components/Cell/Cell.tokens.js +0 -42
- package/styled-components/es/components/Cell/Cell.types.js +0 -1
- package/styled-components/es/components/Cell/Textbox/Textbox.js +0 -12
- package/styled-components/es/components/Cell/Textbox/Textbox.styles.js +0 -5
- package/styled-components/es/components/Cell/Textbox/Textbox.types.js +0 -1
- package/styled-components/es/components/Cell/Textbox/ui/TextLabel.js +0 -9
- package/styled-components/es/components/Cell/Textbox/ui/TextSubtitle.js +0 -9
- package/styled-components/es/components/Cell/Textbox/ui/TextTitle.js +0 -9
- package/styled-components/es/components/Cell/index.js +0 -6
- package/styled-components/es/components/Cell/variations/_size/base.js +0 -2
- package/styled-components/es/components/Cell/variations/_size/tokens.json +0 -1
- package/styled-components/es/components/Cell/variations/_stretching/base.js +0 -3
- package/styled-components/es/components/Cell/variations/_stretching/tokens.json +0 -1
- package/styled-components/es/components/Cell/variations/_view/base.js +0 -3
- package/styled-components/es/components/Cell/variations/_view/tokens.json +0 -1
- package/styled-components/es/examples/plasma_b2c/components/Cell/Cell.config.js +0 -25
- package/styled-components/es/examples/plasma_b2c/components/Cell/Cell.js +0 -6
- package/styled-components/es/examples/plasma_b2c/components/Cell/Cell.stories.tsx +0 -131
- package/styled-components/es/examples/plasma_web/components/Cell/Cell.config.js +0 -25
- package/styled-components/es/examples/plasma_web/components/Cell/Cell.js +0 -6
- package/styled-components/es/examples/plasma_web/components/Cell/Cell.stories.tsx +0 -131
- package/types/components/Cell/Cell.d.ts +0 -27
- package/types/components/Cell/Cell.d.ts.map +0 -1
- package/types/components/Cell/Cell.styles.d.ts +0 -10
- package/types/components/Cell/Cell.styles.d.ts.map +0 -1
- package/types/components/Cell/Cell.tokens.d.ts +0 -43
- package/types/components/Cell/Cell.tokens.d.ts.map +0 -1
- package/types/components/Cell/Cell.types.d.ts +0 -46
- package/types/components/Cell/Cell.types.d.ts.map +0 -1
- package/types/components/Cell/Textbox/Textbox.d.ts +0 -4
- package/types/components/Cell/Textbox/Textbox.d.ts.map +0 -1
- package/types/components/Cell/Textbox/Textbox.styles.d.ts +0 -2
- package/types/components/Cell/Textbox/Textbox.styles.d.ts.map +0 -1
- package/types/components/Cell/Textbox/Textbox.types.d.ts +0 -35
- package/types/components/Cell/Textbox/Textbox.types.d.ts.map +0 -1
- package/types/components/Cell/Textbox/ui/TextLabel.d.ts +0 -5
- package/types/components/Cell/Textbox/ui/TextLabel.d.ts.map +0 -1
- package/types/components/Cell/Textbox/ui/TextSubtitle.d.ts +0 -5
- package/types/components/Cell/Textbox/ui/TextSubtitle.d.ts.map +0 -1
- package/types/components/Cell/Textbox/ui/TextTitle.d.ts +0 -5
- package/types/components/Cell/Textbox/ui/TextTitle.d.ts.map +0 -1
- package/types/components/Cell/index.d.ts +0 -9
- package/types/components/Cell/index.d.ts.map +0 -1
- package/types/components/Cell/variations/_size/base.d.ts +0 -2
- package/types/components/Cell/variations/_size/base.d.ts.map +0 -1
- package/types/components/Cell/variations/_stretching/base.d.ts +0 -2
- package/types/components/Cell/variations/_stretching/base.d.ts.map +0 -1
- package/types/components/Cell/variations/_view/base.d.ts +0 -2
- package/types/components/Cell/variations/_view/base.d.ts.map +0 -1
- package/types/examples/plasma_b2c/components/Cell/Cell.config.d.ts +0 -24
- package/types/examples/plasma_b2c/components/Cell/Cell.config.d.ts.map +0 -1
- package/types/examples/plasma_b2c/components/Cell/Cell.d.ts +0 -48
- package/types/examples/plasma_b2c/components/Cell/Cell.d.ts.map +0 -1
- package/types/examples/plasma_web/components/Cell/Cell.config.d.ts +0 -24
- package/types/examples/plasma_web/components/Cell/Cell.config.d.ts.map +0 -1
- package/types/examples/plasma_web/components/Cell/Cell.d.ts +0 -48
- package/types/examples/plasma_web/components/Cell/Cell.d.ts.map +0 -1
@@ -1,59 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
Object.defineProperty(exports, "TextLabel", {
|
7
|
-
enumerable: true,
|
8
|
-
get: function get() {
|
9
|
-
return _TextLabel.TextLabel;
|
10
|
-
}
|
11
|
-
});
|
12
|
-
Object.defineProperty(exports, "TextSubtitle", {
|
13
|
-
enumerable: true,
|
14
|
-
get: function get() {
|
15
|
-
return _TextSubtitle.TextSubtitle;
|
16
|
-
}
|
17
|
-
});
|
18
|
-
Object.defineProperty(exports, "TextTitle", {
|
19
|
-
enumerable: true,
|
20
|
-
get: function get() {
|
21
|
-
return _TextTitle.TextTitle;
|
22
|
-
}
|
23
|
-
});
|
24
|
-
Object.defineProperty(exports, "Textbox", {
|
25
|
-
enumerable: true,
|
26
|
-
get: function get() {
|
27
|
-
return _Textbox.Textbox;
|
28
|
-
}
|
29
|
-
});
|
30
|
-
Object.defineProperty(exports, "cellClasses", {
|
31
|
-
enumerable: true,
|
32
|
-
get: function get() {
|
33
|
-
return _Cell2.classes;
|
34
|
-
}
|
35
|
-
});
|
36
|
-
Object.defineProperty(exports, "cellConfig", {
|
37
|
-
enumerable: true,
|
38
|
-
get: function get() {
|
39
|
-
return _Cell.cellConfig;
|
40
|
-
}
|
41
|
-
});
|
42
|
-
Object.defineProperty(exports, "cellRoot", {
|
43
|
-
enumerable: true,
|
44
|
-
get: function get() {
|
45
|
-
return _Cell.cellRoot;
|
46
|
-
}
|
47
|
-
});
|
48
|
-
Object.defineProperty(exports, "cellTokens", {
|
49
|
-
enumerable: true,
|
50
|
-
get: function get() {
|
51
|
-
return _Cell2.tokens;
|
52
|
-
}
|
53
|
-
});
|
54
|
-
var _TextLabel = /*#__PURE__*/require("./Textbox/ui/TextLabel");
|
55
|
-
var _TextTitle = /*#__PURE__*/require("./Textbox/ui/TextTitle");
|
56
|
-
var _TextSubtitle = /*#__PURE__*/require("./Textbox/ui/TextSubtitle");
|
57
|
-
var _Cell = /*#__PURE__*/require("./Cell");
|
58
|
-
var _Cell2 = /*#__PURE__*/require("./Cell.tokens");
|
59
|
-
var _Textbox = /*#__PURE__*/require("./Textbox/Textbox");
|
@@ -1 +0,0 @@
|
|
1
|
-
["--plasma-cell-left-height", "--plasma-cell-right-height", "--plasma-cell-height"]
|
@@ -1,9 +0,0 @@
|
|
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)(["&.", "{width:var(", ");}&.", "{width:100%;}&.", "{width:auto;}"], _Cell.classes.fixedStretching, _Cell.tokens.cellWidth, _Cell.classes.filledStretching, _Cell.classes.autoStretching);
|
@@ -1 +0,0 @@
|
|
1
|
-
["--plasma-button-width"]
|
@@ -1,9 +0,0 @@
|
|
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(", ");width:100%;display:flex;gap:var(", ");&:focus{outline:0 none;}"], _Cell.tokens.cellColor, _Cell.tokens.cellBackgroundColor, _Cell.tokens.cellGap);
|
@@ -1 +0,0 @@
|
|
1
|
-
["--plasma-cell-color", "--plasma-cell-background-color"]
|
@@ -1,31 +0,0 @@
|
|
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: 'default',
|
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-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);"], _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-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);"], _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-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);"], _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-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);"], _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
|
-
};
|
@@ -1,35 +0,0 @@
|
|
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);
|
@@ -1,131 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import type { ComponentProps } from 'react';
|
3
|
-
import type { StoryObj, Meta } from '@storybook/react';
|
4
|
-
import styled from 'styled-components';
|
5
|
-
|
6
|
-
import { WithTheme } from '../../../_helpers';
|
7
|
-
import { Avatar } from '../Avatar/Avatar';
|
8
|
-
import { IconChevronLeft } from '../../../../components/_Icon';
|
9
|
-
|
10
|
-
import { Cell, Textbox, TextTitle } from './Cell';
|
11
|
-
|
12
|
-
type StoryProps = ComponentProps<typeof Cell> & {
|
13
|
-
itemsCount?: number;
|
14
|
-
enableLeftContent?: boolean;
|
15
|
-
enableRightContent?: boolean;
|
16
|
-
};
|
17
|
-
type Story = StoryObj<StoryProps>;
|
18
|
-
|
19
|
-
const sizes = ['l', 'm', 's', 'xs'];
|
20
|
-
const stretchingValues = ['fixed', 'filled', 'auto'];
|
21
|
-
const alignLeft = ['top', 'center', 'bottom'];
|
22
|
-
const alignRight = ['top', 'center', 'bottom'];
|
23
|
-
|
24
|
-
type SizesCell = 'xs' | 'l' | 'm' | 's' | undefined;
|
25
|
-
type SizesAvatar = 'l' | 'm' | 's';
|
26
|
-
|
27
|
-
const getSize = (size: SizesCell): SizesAvatar => {
|
28
|
-
if (size === 'xs' || !size) {
|
29
|
-
return 's';
|
30
|
-
}
|
31
|
-
|
32
|
-
return size;
|
33
|
-
};
|
34
|
-
|
35
|
-
const meta: Meta<typeof Cell> = {
|
36
|
-
title: 'plasma_b2c/Cell',
|
37
|
-
decorators: [WithTheme],
|
38
|
-
argTypes: {
|
39
|
-
size: {
|
40
|
-
options: sizes,
|
41
|
-
control: {
|
42
|
-
type: 'select',
|
43
|
-
},
|
44
|
-
},
|
45
|
-
stretching: {
|
46
|
-
options: stretchingValues,
|
47
|
-
control: {
|
48
|
-
type: 'select',
|
49
|
-
},
|
50
|
-
},
|
51
|
-
alignLeft: {
|
52
|
-
options: alignLeft,
|
53
|
-
control: {
|
54
|
-
type: 'select',
|
55
|
-
},
|
56
|
-
},
|
57
|
-
alignRight: {
|
58
|
-
options: alignRight,
|
59
|
-
control: {
|
60
|
-
type: 'select',
|
61
|
-
},
|
62
|
-
},
|
63
|
-
},
|
64
|
-
};
|
65
|
-
|
66
|
-
export default meta;
|
67
|
-
|
68
|
-
const ChevronRight = styled(IconChevronLeft)`
|
69
|
-
transform: rotate(180deg);
|
70
|
-
color: var(--text-secondary);
|
71
|
-
`;
|
72
|
-
|
73
|
-
export const Default: Story = {
|
74
|
-
args: {
|
75
|
-
size: 'm',
|
76
|
-
stretching: 'filled',
|
77
|
-
enableLeftContent: false,
|
78
|
-
enableRightContent: false,
|
79
|
-
alignLeft: 'center',
|
80
|
-
alignRight: 'center',
|
81
|
-
title: 'Title',
|
82
|
-
subtitle: 'Subtitle',
|
83
|
-
label: 'Label',
|
84
|
-
},
|
85
|
-
render: ({ ...args }: StoryProps) => {
|
86
|
-
return (
|
87
|
-
<Cell
|
88
|
-
contentLeft={
|
89
|
-
!args.enableLeftContent && (
|
90
|
-
<Avatar size={getSize(args.size)} url="https://avatars.githubusercontent.com/u/1813468?v=4" />
|
91
|
-
)
|
92
|
-
}
|
93
|
-
alignLeft={args.alignLeft}
|
94
|
-
contentRight={!args.enableRightContent && <ChevronRight color="inherit" size="xs" />}
|
95
|
-
alignRight={args.alignRight}
|
96
|
-
title={args.title}
|
97
|
-
subtitle={args.subtitle}
|
98
|
-
label={args.label}
|
99
|
-
{...args}
|
100
|
-
/>
|
101
|
-
);
|
102
|
-
},
|
103
|
-
};
|
104
|
-
|
105
|
-
export const WithContentTextboxCustom: Story = {
|
106
|
-
args: {
|
107
|
-
size: 'm',
|
108
|
-
stretching: 'filled',
|
109
|
-
},
|
110
|
-
render: ({ ...args }: StoryProps) => {
|
111
|
-
const MyStyledText = styled.div`
|
112
|
-
font-size: 12px;
|
113
|
-
font-weight: 600;
|
114
|
-
opacity: 0.5;
|
115
|
-
`;
|
116
|
-
return (
|
117
|
-
<Cell
|
118
|
-
contentLeft={
|
119
|
-
<Avatar size={getSize(args.size)} url="https://avatars.githubusercontent.com/u/1813468?v=4" />
|
120
|
-
}
|
121
|
-
contentRight={<ChevronRight color="inherit" size="xs" />}
|
122
|
-
{...args}
|
123
|
-
>
|
124
|
-
<Textbox>
|
125
|
-
<TextTitle>Title</TextTitle>
|
126
|
-
<MyStyledText>My styled Text</MyStyledText>
|
127
|
-
</Textbox>
|
128
|
-
</Cell>
|
129
|
-
);
|
130
|
-
},
|
131
|
-
};
|
@@ -1,31 +0,0 @@
|
|
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: 'default',
|
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-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);"], _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-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);"], _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-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);"], _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-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);"], _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
|
-
};
|
@@ -1,35 +0,0 @@
|
|
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);
|
@@ -1,131 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import type { ComponentProps } from 'react';
|
3
|
-
import type { StoryObj, Meta } from '@storybook/react';
|
4
|
-
import styled from 'styled-components';
|
5
|
-
|
6
|
-
import { WithTheme } from '../../../_helpers';
|
7
|
-
import { Avatar } from '../Avatar/Avatar';
|
8
|
-
import { IconChevronLeft } from '../../../../components/_Icon';
|
9
|
-
|
10
|
-
import { Cell, Textbox, TextTitle } from './Cell';
|
11
|
-
|
12
|
-
type StoryProps = ComponentProps<typeof Cell> & {
|
13
|
-
itemsCount?: number;
|
14
|
-
enableLeftContent?: boolean;
|
15
|
-
enableRightContent?: boolean;
|
16
|
-
};
|
17
|
-
type Story = StoryObj<StoryProps>;
|
18
|
-
|
19
|
-
const sizes = ['l', 'm', 's', 'xs'];
|
20
|
-
const stretchingValues = ['fixed', 'filled', 'auto'];
|
21
|
-
const alignLeft = ['top', 'center', 'bottom'];
|
22
|
-
const alignRight = ['top', 'center', 'bottom'];
|
23
|
-
|
24
|
-
type SizesCell = 'xs' | 'l' | 'm' | 's' | undefined;
|
25
|
-
type SizesAvatar = 'l' | 'm' | 's';
|
26
|
-
|
27
|
-
const getSize = (size: SizesCell): SizesAvatar => {
|
28
|
-
if (size === 'xs' || !size) {
|
29
|
-
return 's';
|
30
|
-
}
|
31
|
-
|
32
|
-
return size;
|
33
|
-
};
|
34
|
-
|
35
|
-
const meta: Meta<typeof Cell> = {
|
36
|
-
title: 'plasma_web/Cell',
|
37
|
-
decorators: [WithTheme],
|
38
|
-
argTypes: {
|
39
|
-
size: {
|
40
|
-
options: sizes,
|
41
|
-
control: {
|
42
|
-
type: 'select',
|
43
|
-
},
|
44
|
-
},
|
45
|
-
stretching: {
|
46
|
-
options: stretchingValues,
|
47
|
-
control: {
|
48
|
-
type: 'select',
|
49
|
-
},
|
50
|
-
},
|
51
|
-
alignLeft: {
|
52
|
-
options: alignLeft,
|
53
|
-
control: {
|
54
|
-
type: 'select',
|
55
|
-
},
|
56
|
-
},
|
57
|
-
alignRight: {
|
58
|
-
options: alignRight,
|
59
|
-
control: {
|
60
|
-
type: 'select',
|
61
|
-
},
|
62
|
-
},
|
63
|
-
},
|
64
|
-
};
|
65
|
-
|
66
|
-
export default meta;
|
67
|
-
|
68
|
-
const ChevronRight = styled(IconChevronLeft)`
|
69
|
-
transform: rotate(180deg);
|
70
|
-
color: var(--text-secondary);
|
71
|
-
`;
|
72
|
-
|
73
|
-
export const Default: Story = {
|
74
|
-
args: {
|
75
|
-
size: 'm',
|
76
|
-
stretching: 'filled',
|
77
|
-
enableLeftContent: false,
|
78
|
-
enableRightContent: false,
|
79
|
-
alignLeft: 'center',
|
80
|
-
alignRight: 'center',
|
81
|
-
title: 'Title',
|
82
|
-
subtitle: 'Subtitle',
|
83
|
-
label: 'Label',
|
84
|
-
},
|
85
|
-
render: ({ ...args }: StoryProps) => {
|
86
|
-
return (
|
87
|
-
<Cell
|
88
|
-
contentLeft={
|
89
|
-
!args.enableLeftContent && (
|
90
|
-
<Avatar size={getSize(args.size)} url="https://avatars.githubusercontent.com/u/1813468?v=4" />
|
91
|
-
)
|
92
|
-
}
|
93
|
-
alignLeft={args.alignLeft}
|
94
|
-
contentRight={!args.enableRightContent && <ChevronRight color="inherit" size="xs" />}
|
95
|
-
alignRight={args.alignRight}
|
96
|
-
title={args.title}
|
97
|
-
subtitle={args.subtitle}
|
98
|
-
label={args.label}
|
99
|
-
{...args}
|
100
|
-
/>
|
101
|
-
);
|
102
|
-
},
|
103
|
-
};
|
104
|
-
|
105
|
-
export const WithContentTextboxCustom: Story = {
|
106
|
-
args: {
|
107
|
-
size: 'm',
|
108
|
-
stretching: 'filled',
|
109
|
-
},
|
110
|
-
render: ({ ...args }: StoryProps) => {
|
111
|
-
const MyStyledText = styled.div`
|
112
|
-
font-size: 12px;
|
113
|
-
font-weight: 600;
|
114
|
-
opacity: 0.5;
|
115
|
-
`;
|
116
|
-
return (
|
117
|
-
<Cell
|
118
|
-
contentLeft={
|
119
|
-
<Avatar size={getSize(args.size)} url="https://avatars.githubusercontent.com/u/1813468?v=4" />
|
120
|
-
}
|
121
|
-
contentRight={<ChevronRight color="inherit" size="xs" />}
|
122
|
-
{...args}
|
123
|
-
>
|
124
|
-
<Textbox>
|
125
|
-
<TextTitle>Title</TextTitle>
|
126
|
-
<MyStyledText>My styled Text</MyStyledText>
|
127
|
-
</Textbox>
|
128
|
-
</Cell>
|
129
|
-
);
|
130
|
-
},
|
131
|
-
};
|
@@ -1,62 +0,0 @@
|
|
1
|
-
import React, { forwardRef } from 'react';
|
2
|
-
import { cx } from '../../utils';
|
3
|
-
import { CellLeft, CellRight, CellContentWrapper, CellContent } from './Cell.styles';
|
4
|
-
import { classes } from './Cell.tokens';
|
5
|
-
import { base as viewCSS } from './variations/_view/base';
|
6
|
-
import { base as sizeCSS } from './variations/_size/base';
|
7
|
-
import { base as stretchingCSS } from './variations/_stretching/base';
|
8
|
-
import { Textbox } from './Textbox/Textbox';
|
9
|
-
export var cellRoot = function cellRoot(Root) {
|
10
|
-
return /*#__PURE__*/forwardRef(function (_ref, outerRootRef) {
|
11
|
-
var size = _ref.size,
|
12
|
-
view = _ref.view,
|
13
|
-
contentLeft = _ref.contentLeft,
|
14
|
-
contentRight = _ref.contentRight,
|
15
|
-
_ref$alignLeft = _ref.alignLeft,
|
16
|
-
alignLeft = _ref$alignLeft === void 0 ? 'center' : _ref$alignLeft,
|
17
|
-
_ref$alignRight = _ref.alignRight,
|
18
|
-
alignRight = _ref$alignRight === void 0 ? 'center' : _ref$alignRight,
|
19
|
-
children = _ref.children,
|
20
|
-
title = _ref.title,
|
21
|
-
subtitle = _ref.subtitle,
|
22
|
-
label = _ref.label,
|
23
|
-
stretching = _ref.stretching;
|
24
|
-
var stretchingClass = classes["".concat(stretching, "Stretching")];
|
25
|
-
return /*#__PURE__*/React.createElement(Root, {
|
26
|
-
ref: outerRootRef,
|
27
|
-
size: size,
|
28
|
-
view: view,
|
29
|
-
className: cx(stretchingClass, classes.cellRoot)
|
30
|
-
}, contentLeft && /*#__PURE__*/React.createElement(CellLeft, {
|
31
|
-
align: alignLeft
|
32
|
-
}, contentLeft), /*#__PURE__*/React.createElement(CellContentWrapper, null, /*#__PURE__*/React.createElement(CellContent, null, title || subtitle || label ? /*#__PURE__*/React.createElement(Textbox, {
|
33
|
-
label: label,
|
34
|
-
title: title,
|
35
|
-
subtitle: subtitle
|
36
|
-
}) : children && children), contentRight && /*#__PURE__*/React.createElement(CellRight, {
|
37
|
-
align: alignRight
|
38
|
-
}, contentRight)));
|
39
|
-
});
|
40
|
-
};
|
41
|
-
export var cellConfig = {
|
42
|
-
name: 'Cell',
|
43
|
-
tag: 'div',
|
44
|
-
layout: cellRoot,
|
45
|
-
base: '',
|
46
|
-
variations: {
|
47
|
-
view: {
|
48
|
-
css: viewCSS
|
49
|
-
},
|
50
|
-
size: {
|
51
|
-
css: sizeCSS
|
52
|
-
},
|
53
|
-
stretching: {
|
54
|
-
css: stretchingCSS
|
55
|
-
}
|
56
|
-
},
|
57
|
-
defaults: {
|
58
|
-
view: 'default',
|
59
|
-
size: 'm',
|
60
|
-
stretching: 'filled'
|
61
|
-
}
|
62
|
-
};
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import styled from 'styled-components';
|
2
|
-
import { tokens } from './Cell.tokens';
|
3
|
-
var alignToFlex = {
|
4
|
-
center: 'center',
|
5
|
-
top: 'flex-start',
|
6
|
-
bottom: 'flex-end'
|
7
|
-
};
|
8
|
-
export var CellContentWrapper = /*#__PURE__*/styled.div.withConfig({
|
9
|
-
componentId: "plasma-new-hope__sc-16emz3n-0"
|
10
|
-
})(["display:flex;flex:auto;justify-content:space-between;gap:var(", ");"], tokens.cellGap);
|
11
|
-
export var CellContent = /*#__PURE__*/styled.div.withConfig({
|
12
|
-
componentId: "plasma-new-hope__sc-16emz3n-1"
|
13
|
-
})(["display:flex;align-items:center;"]);
|
14
|
-
export var CellLeft = /*#__PURE__*/styled.div.withConfig({
|
15
|
-
componentId: "plasma-new-hope__sc-16emz3n-2"
|
16
|
-
})(["display:flex;align-items:", ";"], function (_ref) {
|
17
|
-
var align = _ref.align;
|
18
|
-
return alignToFlex[align];
|
19
|
-
});
|
20
|
-
export var CellRight = /*#__PURE__*/styled.div.withConfig({
|
21
|
-
componentId: "plasma-new-hope__sc-16emz3n-3"
|
22
|
-
})(["display:flex;align-items:", ";text-align:right;"], function (_ref2) {
|
23
|
-
var align = _ref2.align;
|
24
|
-
return alignToFlex[align];
|
25
|
-
});
|
@@ -1,42 +0,0 @@
|
|
1
|
-
export var tokens = {
|
2
|
-
cellColor: '--plasma-cell-color',
|
3
|
-
cellBackgroundColor: '--plasma-cell-background-color',
|
4
|
-
cellPadding: '--plasma-cell-padding',
|
5
|
-
cellPaddingLeftContent: '--plasma-cell-padding-left-content',
|
6
|
-
cellPaddingContent: '--plasma-cell-padding-content',
|
7
|
-
cellPaddingRightContent: '--plasma-cell-padding-right-content',
|
8
|
-
cellTextboxGap: '--plasma-cell-textbox-gap',
|
9
|
-
cellGap: '--plasma-cell-gap',
|
10
|
-
cellWidth: '--plasma-cell-width',
|
11
|
-
cellLabelColor: '--plasma-cell-label-color',
|
12
|
-
cellLabelFontFamily: '--plasma-cell-label-font-family',
|
13
|
-
cellLabelFontSize: '--plasma-cell-label-font-size',
|
14
|
-
cellLabelFontStyle: '--plasma-cell-label-font-style',
|
15
|
-
cellLabelFontWeight: '--plasma-cell-label-font-weight',
|
16
|
-
cellLabelLetterSpacing: '--plasma-cell-label-letter-spacing',
|
17
|
-
cellLabelLineHeight: '--plasma-cell-label-line-height',
|
18
|
-
cellTitleColor: '--plasma-cell-title-color',
|
19
|
-
cellTitleFontFamily: '--plasma-cell-title-font-family',
|
20
|
-
cellTitleFontSize: '--plasma-cell-title-font-size',
|
21
|
-
cellTitleFontStyle: '--plasma-cell-title-font-style',
|
22
|
-
cellTitleFontWeight: '--plasma-cell-title-font-weight',
|
23
|
-
cellTitleLetterSpacing: '--plasma-cell-title-letter-spacing',
|
24
|
-
cellTitleLineHeight: '--plasma-cell-title-line-height',
|
25
|
-
cellSubtitleColor: '--plasma-cell-subtitle-color',
|
26
|
-
cellSubtitleFontFamily: '--plasma-cell-subtitle-font-family',
|
27
|
-
cellSubtitleFontSize: '--plasma-cell-subtitle-font-size',
|
28
|
-
cellSubtitleFontStyle: '--plasma-cell-subtitle-font-style',
|
29
|
-
cellSubtitleFontWeight: '--plasma-cell-subtitle-font-weight',
|
30
|
-
cellSubtitleLetterSpacing: '--plasma-cell-subtitle-letter-spacing',
|
31
|
-
cellSubtitleLineHeight: '--plasma-cell-subtitle-line-height'
|
32
|
-
};
|
33
|
-
export var classes = {
|
34
|
-
autoStretching: 'cell-stretching-auto',
|
35
|
-
filledStretching: 'cell-stretching-filled',
|
36
|
-
fixedStretching: 'cell-stretching-fixed',
|
37
|
-
cellWrapper: 'cell-wrapper',
|
38
|
-
cellRoot: 'cell-root',
|
39
|
-
cellContent: 'cell-content',
|
40
|
-
cellLeftContent: 'cell-left-content',
|
41
|
-
cellRightContent: 'cell-right-content'
|
42
|
-
};
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|