@salutejs/plasma-new-hope 0.68.0-canary.1104.8452846373.0 → 0.68.0-canary.1148.8452223133.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Cell/Cell.css +3 -0
- package/cjs/components/Cell/Cell.js +71 -0
- package/cjs/components/Cell/Cell.js.map +1 -0
- package/cjs/components/Cell/Cell.styles.js +36 -0
- package/cjs/components/Cell/Cell.styles.js.map +1 -0
- package/cjs/components/Cell/Cell.tokens.js +50 -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_2qgj2i.css +1 -0
- package/cjs/components/Dropdown/Dropdown.js +1 -2
- package/cjs/components/Dropdown/Dropdown.js.map +1 -1
- package/cjs/components/Popover/Popover.js +31 -46
- package/cjs/components/Popover/Popover.js.map +1 -1
- 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 +66 -0
- package/es/components/Cell/Cell.js.map +1 -0
- package/es/components/Cell/Cell.styles.js +29 -0
- package/es/components/Cell/Cell.styles.js.map +1 -0
- package/es/components/Cell/Cell.tokens.js +45 -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_2qgj2i.css +1 -0
- package/es/components/Dropdown/Dropdown.js +1 -2
- package/es/components/Dropdown/Dropdown.js.map +1 -1
- package/es/components/Popover/Popover.js +31 -46
- package/es/components/Popover/Popover.js.map +1 -1
- 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 +71 -0
- package/styled-components/cjs/components/Cell/Cell.styles.js +32 -0
- package/styled-components/cjs/components/Cell/Cell.tokens.js +48 -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/components/Dropdown/Dropdown.js +1 -2
- package/styled-components/cjs/components/Popover/Popover.js +31 -46
- 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 +131 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Popover/Popover.stories.tsx +0 -7
- 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 +131 -0
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +1 -1
- package/styled-components/cjs/index.js +11 -0
- package/styled-components/es/components/Cell/Cell.js +62 -0
- package/styled-components/es/components/Cell/Cell.styles.js +25 -0
- package/styled-components/es/components/Cell/Cell.tokens.js +42 -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/components/Dropdown/Dropdown.js +1 -2
- package/styled-components/es/components/Popover/Popover.js +31 -46
- 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 +131 -0
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Popover/Popover.stories.tsx +0 -7
- 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 +131 -0
- package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +1 -1
- package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +1 -1
- package/styled-components/es/index.js +1 -0
- package/types/components/Cell/Cell.d.ts +27 -0
- package/types/components/Cell/Cell.d.ts.map +1 -0
- package/types/components/Cell/Cell.styles.d.ts +10 -0
- package/types/components/Cell/Cell.styles.d.ts.map +1 -0
- package/types/components/Cell/Cell.tokens.d.ts +43 -0
- package/types/components/Cell/Cell.tokens.d.ts.map +1 -0
- package/types/components/Cell/Cell.types.d.ts +46 -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 +35 -0
- package/types/components/Cell/Textbox/Textbox.types.d.ts.map +1 -0
- package/types/components/Cell/Textbox/ui/TextLabel.d.ts +5 -0
- package/types/components/Cell/Textbox/ui/TextLabel.d.ts.map +1 -0
- package/types/components/Cell/Textbox/ui/TextSubtitle.d.ts +5 -0
- package/types/components/Cell/Textbox/ui/TextSubtitle.d.ts.map +1 -0
- package/types/components/Cell/Textbox/ui/TextTitle.d.ts +5 -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/components/Combobox/Combobox.styles.d.ts +2 -8
- package/types/components/Combobox/Combobox.styles.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.styles.d.ts +1 -7
- package/types/components/Dropdown/Dropdown.styles.d.ts.map +1 -1
- package/types/components/Popover/Popover.d.ts +2 -2
- package/types/components/Popover/Popover.d.ts.map +1 -1
- package/types/components/Popover/Popover.types.d.ts +14 -19
- package/types/components/Popover/Popover.types.d.ts.map +1 -1
- package/types/components/Select/Select.styles.d.ts +2 -8
- package/types/components/Select/Select.styles.d.ts.map +1 -1
- 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 +48 -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_b2c/components/Popover/Popover.d.ts +1 -7
- package/types/examples/plasma_b2c/components/Popover/Popover.d.ts.map +1 -1
- 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 +48 -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/examples/plasma_web/components/Popover/Popover.d.ts +1 -7
- package/types/examples/plasma_web/components/Popover/Popover.d.ts.map +1 -1
- package/types/examples/sds_engineer/components/Popover/Popover.d.ts +1 -7
- package/types/examples/sds_engineer/components/Popover/Popover.d.ts.map +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
@@ -0,0 +1,3 @@
|
|
1
|
+
.base_2qgj2i_b1sr9i7l__db33292d{color:var(--plasma-cell-color);background-color:var(--plasma-cell-background-color);width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-cell-gap);}.base_2qgj2i_b1sr9i7l__db33292d:focus{outline:0 none;}
|
2
|
+
|
3
|
+
.base_1ryz4br_b1ppwsal__56529027.base_1ryz4br_cellStretchingFixed__56529027{width:var(--plasma-cell-width);}.base_1ryz4br_b1ppwsal__56529027.base_1ryz4br_cellStretchingFilled__56529027{width:100%;}.base_1ryz4br_b1ppwsal__56529027.base_1ryz4br_cellStretchingAuto__56529027{width:auto;}
|
@@ -0,0 +1,71 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var React = require('react');
|
6
|
+
var index = require('../../utils/index.js');
|
7
|
+
var Cell_styles = require('./Cell.styles.js');
|
8
|
+
var Cell_tokens = require('./Cell.tokens.js');
|
9
|
+
var base = require('./variations/_view/base.js');
|
10
|
+
var base$1 = require('./variations/_size/base.js');
|
11
|
+
var base$2 = require('./variations/_stretching/base.js');
|
12
|
+
var Textbox = require('./Textbox/Textbox.js');
|
13
|
+
|
14
|
+
var cellRoot = function cellRoot(Root) {
|
15
|
+
return /*#__PURE__*/React.forwardRef(function (_ref, outerRootRef) {
|
16
|
+
var size = _ref.size,
|
17
|
+
view = _ref.view,
|
18
|
+
contentLeft = _ref.contentLeft,
|
19
|
+
contentRight = _ref.contentRight,
|
20
|
+
_ref$alignLeft = _ref.alignLeft,
|
21
|
+
alignLeft = _ref$alignLeft === void 0 ? 'center' : _ref$alignLeft,
|
22
|
+
_ref$alignRight = _ref.alignRight,
|
23
|
+
alignRight = _ref$alignRight === void 0 ? 'center' : _ref$alignRight,
|
24
|
+
children = _ref.children,
|
25
|
+
title = _ref.title,
|
26
|
+
subtitle = _ref.subtitle,
|
27
|
+
label = _ref.label,
|
28
|
+
stretching = _ref.stretching;
|
29
|
+
var stretchingClass = Cell_tokens.classes["".concat(stretching, "Stretching")];
|
30
|
+
return /*#__PURE__*/React.createElement(Root, {
|
31
|
+
ref: outerRootRef,
|
32
|
+
size: size,
|
33
|
+
view: view,
|
34
|
+
className: index.cx(stretchingClass, Cell_tokens.classes.cellRoot)
|
35
|
+
}, contentLeft && /*#__PURE__*/React.createElement(Cell_styles.CellLeft, {
|
36
|
+
align: alignLeft
|
37
|
+
}, contentLeft), /*#__PURE__*/React.createElement(Cell_styles.CellContentWrapper, null, /*#__PURE__*/React.createElement(Cell_styles.CellContent, null, title || subtitle || label ? /*#__PURE__*/React.createElement(Textbox.Textbox, {
|
38
|
+
label: label,
|
39
|
+
title: title,
|
40
|
+
subtitle: subtitle
|
41
|
+
}) : children && children), contentRight && /*#__PURE__*/React.createElement(Cell_styles.CellRight, {
|
42
|
+
align: alignRight
|
43
|
+
}, contentRight)));
|
44
|
+
});
|
45
|
+
};
|
46
|
+
var cellConfig = {
|
47
|
+
name: 'Cell',
|
48
|
+
tag: 'div',
|
49
|
+
layout: cellRoot,
|
50
|
+
base: '',
|
51
|
+
variations: {
|
52
|
+
view: {
|
53
|
+
css: base.base
|
54
|
+
},
|
55
|
+
size: {
|
56
|
+
css: base$1.base
|
57
|
+
},
|
58
|
+
stretching: {
|
59
|
+
css: base$2.base
|
60
|
+
}
|
61
|
+
},
|
62
|
+
defaults: {
|
63
|
+
view: 'default',
|
64
|
+
size: 'm',
|
65
|
+
stretching: 'filled'
|
66
|
+
}
|
67
|
+
};
|
68
|
+
|
69
|
+
exports.cellConfig = cellConfig;
|
70
|
+
exports.cellRoot = cellRoot;
|
71
|
+
//# sourceMappingURL=Cell.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Cell.js","sources":["../../../src/components/Cell/Cell.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { RootProps } from '../../engines';\nimport { cx } from '../../utils';\n\nimport type { CellProps } from './Cell.types';\nimport { CellLeft, CellRight, CellContentWrapper, CellContent } from './Cell.styles';\nimport { classes } from './Cell.tokens';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as stretchingCSS } from './variations/_stretching/base';\nimport { Textbox } from './Textbox/Textbox';\n\nexport const cellRoot = (Root: RootProps<HTMLSelectElement, CellProps>) =>\n forwardRef<HTMLSelectElement, CellProps>(\n (\n {\n size,\n view,\n contentLeft,\n contentRight,\n alignLeft = 'center',\n alignRight = 'center',\n children,\n title,\n subtitle,\n label,\n stretching,\n },\n outerRootRef,\n ) => {\n const stretchingClass = classes[`${stretching}Stretching` as keyof typeof classes];\n\n return (\n <Root ref={outerRootRef} size={size} view={view} className={cx(stretchingClass, classes.cellRoot)}>\n {contentLeft && <CellLeft align={alignLeft}>{contentLeft}</CellLeft>}\n <CellContentWrapper>\n <CellContent>\n {title || subtitle || label ? (\n <Textbox label={label} title={title} subtitle={subtitle} />\n ) : (\n children && children\n )}\n </CellContent>\n {contentRight && <CellRight align={alignRight}>{contentRight}</CellRight>}\n </CellContentWrapper>\n </Root>\n );\n },\n );\n\nexport const cellConfig = {\n name: 'Cell',\n tag: 'div',\n layout: cellRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n stretching: {\n css: stretchingCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n stretching: 'filled',\n },\n};\n"],"names":["cellRoot","Root","forwardRef","_ref","outerRootRef","size","view","contentLeft","contentRight","_ref$alignLeft","alignLeft","_ref$alignRight","alignRight","children","title","subtitle","label","stretching","stretchingClass","classes","concat","React","createElement","ref","className","cx","CellLeft","align","CellContentWrapper","CellContent","Textbox","CellRight","cellConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","stretchingCSS","defaults"],"mappings":";;;;;;;;;;;;;IAaaA,QAAQ,GAAG,SAAXA,QAAQA,CAAIC,IAA6C,EAAA;AAAA,EAAA,oBAClEC,gBAAU,CACN,UAAAC,IAAA,EAcIC,YAAY,EACX;AAAA,IAAA,IAbGC,IAAI,G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,EAAA;AAACd,MAAAA,KAAK,EAAEA,KAAM;AAACF,MAAAA,KAAK,EAAEA,KAAM;AAACC,MAAAA,QAAQ,EAAEA,QAAAA;AAAS,KAAE,CAAC,GAE3DF,QAAQ,IAAIA,QAEP,CAAC,EACbL,YAAY,iBAAIa,KAAA,CAAAC,aAAA,CAACS,qBAAS,EAAA;AAACJ,MAAAA,KAAK,EAAEf,UAAAA;KAAaJ,EAAAA,YAAwB,CACxD,CAClB,CAAC,CAAA;AAEf,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAMwB,UAAU,GAAG;AACtBC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEnC,QAAQ;AAChBoC,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACR/B,IAAAA,IAAI,EAAE;AACFgC,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDlC,IAAAA,IAAI,EAAE;AACFiC,MAAAA,GAAG,EAAEE,WAAAA;KACR;AACDvB,IAAAA,UAAU,EAAE;AACRqB,MAAAA,GAAG,EAAEG,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNpC,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,GAAG;AACTY,IAAAA,UAAU,EAAE,QAAA;AAChB,GAAA;AACJ;;;;;"}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var styled = require('styled-components');
|
6
|
+
var Cell_tokens = require('./Cell.tokens.js');
|
7
|
+
|
8
|
+
var alignToFlex = {
|
9
|
+
center: 'center',
|
10
|
+
top: 'flex-start',
|
11
|
+
bottom: 'flex-end'
|
12
|
+
};
|
13
|
+
var CellContentWrapper = /*#__PURE__*/styled.div.withConfig({
|
14
|
+
componentId: "plasma-new-hope__sc-taup5i-0"
|
15
|
+
})(["display:flex;flex:auto;justify-content:space-between;gap:var(", ");"], Cell_tokens.tokens.cellGap);
|
16
|
+
var CellContent = /*#__PURE__*/styled.div.withConfig({
|
17
|
+
componentId: "plasma-new-hope__sc-taup5i-1"
|
18
|
+
})(["display:flex;align-items:center;"]);
|
19
|
+
var CellLeft = /*#__PURE__*/styled.div.withConfig({
|
20
|
+
componentId: "plasma-new-hope__sc-taup5i-2"
|
21
|
+
})(["display:flex;align-items:", ";"], function (_ref) {
|
22
|
+
var align = _ref.align;
|
23
|
+
return alignToFlex[align];
|
24
|
+
});
|
25
|
+
var CellRight = /*#__PURE__*/styled.div.withConfig({
|
26
|
+
componentId: "plasma-new-hope__sc-taup5i-3"
|
27
|
+
})(["display:flex;align-items:", ";text-align:right;"], function (_ref2) {
|
28
|
+
var align = _ref2.align;
|
29
|
+
return alignToFlex[align];
|
30
|
+
});
|
31
|
+
|
32
|
+
exports.CellContent = CellContent;
|
33
|
+
exports.CellContentWrapper = CellContentWrapper;
|
34
|
+
exports.CellLeft = CellLeft;
|
35
|
+
exports.CellRight = CellRight;
|
36
|
+
//# sourceMappingURL=Cell.styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Cell.styles.js","sources":["../../../src/components/Cell/Cell.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport type { AlignLeftProp, AlignRightProp } from './Cell.types';\nimport { tokens } from './Cell.tokens';\n\nconst alignToFlex = {\n center: 'center',\n top: 'flex-start',\n bottom: 'flex-end',\n};\n\nexport const CellContentWrapper = styled.div`\n display: flex;\n flex: auto;\n justify-content: space-between;\n gap: var(${tokens.cellGap});\n`;\n\nexport const CellContent = styled.div`\n display: flex;\n align-items: center;\n`;\n\nexport const CellLeft = styled.div<{ align: AlignLeftProp }>`\n display: flex;\n align-items: ${({ align }) => alignToFlex[align]};\n`;\n\nexport const CellRight = styled.div<{ align: AlignRightProp }>`\n display: flex;\n align-items: ${({ align }) => alignToFlex[align]};\n text-align: right;\n`;\n"],"names":["alignToFlex","center","top","bottom","CellContentWrapper","styled","div","withConfig","componentId","tokens","cellGap","CellContent","CellLeft","_ref","align","CellRight","_ref2"],"mappings":";;;;;;;AAKA,IAAMA,WAAW,GAAG;AAChBC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,GAAG,EAAE,YAAY;AACjBC,EAAAA,MAAM,EAAE,UAAA;AACZ,CAAC,CAAA;IAEYC,kBAAkB,gBAAGC,MAAM,CAACC,GAAG,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,8BAAA;AAAA,CAI7BC,CAAAA,CAAAA,CAAAA,+DAAAA,EAAAA,IAAAA,CAAAA,EAAAA,kBAAM,CAACC,OAAO,EAC5B;IAEYC,WAAW,gBAAGN,MAAM,CAACC,GAAG,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,8BAAA;AAAA,CAGpC,CAAA,CAAA,CAAA,kCAAA,CAAA,EAAA;IAEYI,QAAQ,gBAAGP,MAAM,CAACC,GAAG,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,8BAAA;AAAA,CAAA,CAAA,CAAA,CAAA,2BAAA,EAAA,GAAA,CAAA,EAEf,UAAAK,IAAA,EAAA;AAAA,EAAA,IAAGC,KAAK,GAAAD,IAAA,CAALC,KAAK,CAAA;EAAA,OAAOd,WAAW,CAACc,KAAK,CAAC,CAAA;AAAA,CACnD,EAAA;IAEYC,SAAS,gBAAGV,MAAM,CAACC,GAAG,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,8BAAA;AAAA,CAAA,CAAA,CAAA,CAAA,2BAAA,EAAA,oBAAA,CAAA,EAEhB,UAAAQ,KAAA,EAAA;AAAA,EAAA,IAAGF,KAAK,GAAAE,KAAA,CAALF,KAAK,CAAA;EAAA,OAAOd,WAAW,CAACc,KAAK,CAAC,CAAA;AAAA,CAEnD;;;;;;;"}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var tokens = {
|
6
|
+
cellColor: '--plasma-cell-color',
|
7
|
+
cellBackgroundColor: '--plasma-cell-background-color',
|
8
|
+
cellPadding: '--plasma-cell-padding',
|
9
|
+
cellPaddingLeftContent: '--plasma-cell-padding-left-content',
|
10
|
+
cellPaddingContent: '--plasma-cell-padding-content',
|
11
|
+
cellPaddingRightContent: '--plasma-cell-padding-right-content',
|
12
|
+
cellTextboxGap: '--plasma-cell-textbox-gap',
|
13
|
+
cellGap: '--plasma-cell-gap',
|
14
|
+
cellWidth: '--plasma-cell-width',
|
15
|
+
cellLabelColor: '--plasma-cell-label-color',
|
16
|
+
cellLabelFontFamily: '--plasma-cell-label-font-family',
|
17
|
+
cellLabelFontSize: '--plasma-cell-label-font-size',
|
18
|
+
cellLabelFontStyle: '--plasma-cell-label-font-style',
|
19
|
+
cellLabelFontWeight: '--plasma-cell-label-font-weight',
|
20
|
+
cellLabelLetterSpacing: '--plasma-cell-label-letter-spacing',
|
21
|
+
cellLabelLineHeight: '--plasma-cell-label-line-height',
|
22
|
+
cellTitleColor: '--plasma-cell-title-color',
|
23
|
+
cellTitleFontFamily: '--plasma-cell-title-font-family',
|
24
|
+
cellTitleFontSize: '--plasma-cell-title-font-size',
|
25
|
+
cellTitleFontStyle: '--plasma-cell-title-font-style',
|
26
|
+
cellTitleFontWeight: '--plasma-cell-title-font-weight',
|
27
|
+
cellTitleLetterSpacing: '--plasma-cell-title-letter-spacing',
|
28
|
+
cellTitleLineHeight: '--plasma-cell-title-line-height',
|
29
|
+
cellSubtitleColor: '--plasma-cell-subtitle-color',
|
30
|
+
cellSubtitleFontFamily: '--plasma-cell-subtitle-font-family',
|
31
|
+
cellSubtitleFontSize: '--plasma-cell-subtitle-font-size',
|
32
|
+
cellSubtitleFontStyle: '--plasma-cell-subtitle-font-style',
|
33
|
+
cellSubtitleFontWeight: '--plasma-cell-subtitle-font-weight',
|
34
|
+
cellSubtitleLetterSpacing: '--plasma-cell-subtitle-letter-spacing',
|
35
|
+
cellSubtitleLineHeight: '--plasma-cell-subtitle-line-height'
|
36
|
+
};
|
37
|
+
var classes = {
|
38
|
+
autoStretching: 'cell-stretching-auto',
|
39
|
+
filledStretching: 'cell-stretching-filled',
|
40
|
+
fixedStretching: 'cell-stretching-fixed',
|
41
|
+
cellWrapper: 'cell-wrapper',
|
42
|
+
cellRoot: 'cell-root',
|
43
|
+
cellContent: 'cell-content',
|
44
|
+
cellLeftContent: 'cell-left-content',
|
45
|
+
cellRightContent: 'cell-right-content'
|
46
|
+
};
|
47
|
+
|
48
|
+
exports.classes = classes;
|
49
|
+
exports.tokens = tokens;
|
50
|
+
//# sourceMappingURL=Cell.tokens.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Cell.tokens.js","sources":["../../../src/components/Cell/Cell.tokens.ts"],"sourcesContent":["export const tokens = {\n cellColor: '--plasma-cell-color',\n cellBackgroundColor: '--plasma-cell-background-color',\n\n cellPadding: '--plasma-cell-padding',\n cellPaddingLeftContent: '--plasma-cell-padding-left-content',\n cellPaddingContent: '--plasma-cell-padding-content',\n cellPaddingRightContent: '--plasma-cell-padding-right-content',\n\n cellTextboxGap: '--plasma-cell-textbox-gap',\n cellGap: '--plasma-cell-gap',\n\n cellWidth: '--plasma-cell-width',\n\n cellLabelColor: '--plasma-cell-label-color',\n cellLabelFontFamily: '--plasma-cell-label-font-family',\n cellLabelFontSize: '--plasma-cell-label-font-size',\n cellLabelFontStyle: '--plasma-cell-label-font-style',\n cellLabelFontWeight: '--plasma-cell-label-font-weight',\n cellLabelLetterSpacing: '--plasma-cell-label-letter-spacing',\n cellLabelLineHeight: '--plasma-cell-label-line-height',\n\n cellTitleColor: '--plasma-cell-title-color',\n cellTitleFontFamily: '--plasma-cell-title-font-family',\n cellTitleFontSize: '--plasma-cell-title-font-size',\n cellTitleFontStyle: '--plasma-cell-title-font-style',\n cellTitleFontWeight: '--plasma-cell-title-font-weight',\n cellTitleLetterSpacing: '--plasma-cell-title-letter-spacing',\n cellTitleLineHeight: '--plasma-cell-title-line-height',\n\n cellSubtitleColor: '--plasma-cell-subtitle-color',\n cellSubtitleFontFamily: '--plasma-cell-subtitle-font-family',\n cellSubtitleFontSize: '--plasma-cell-subtitle-font-size',\n cellSubtitleFontStyle: '--plasma-cell-subtitle-font-style',\n cellSubtitleFontWeight: '--plasma-cell-subtitle-font-weight',\n cellSubtitleLetterSpacing: '--plasma-cell-subtitle-letter-spacing',\n cellSubtitleLineHeight: '--plasma-cell-subtitle-line-height',\n};\n\nexport const classes = {\n autoStretching: 'cell-stretching-auto',\n filledStretching: 'cell-stretching-filled',\n fixedStretching: 'cell-stretching-fixed',\n\n cellWrapper: 'cell-wrapper',\n cellRoot: 'cell-root',\n cellContent: 'cell-content',\n cellLeftContent: 'cell-left-content',\n cellRightContent: 'cell-right-content',\n};\n"],"names":["tokens","cellColor","cellBackgroundColor","cellPadding","cellPaddingLeftContent","cellPaddingContent","cellPaddingRightContent","cellTextboxGap","cellGap","cellWidth","cellLabelColor","cellLabelFontFamily","cellLabelFontSize","cellLabelFontStyle","cellLabelFontWeight","cellLabelLetterSpacing","cellLabelLineHeight","cellTitleColor","cellTitleFontFamily","cellTitleFontSize","cellTitleFontStyle","cellTitleFontWeight","cellTitleLetterSpacing","cellTitleLineHeight","cellSubtitleColor","cellSubtitleFontFamily","cellSubtitleFontSize","cellSubtitleFontStyle","cellSubtitleFontWeight","cellSubtitleLetterSpacing","cellSubtitleLineHeight","classes","autoStretching","filledStretching","fixedStretching","cellWrapper","cellRoot","cellContent","cellLeftContent","cellRightContent"],"mappings":";;;;AAAO,IAAMA,MAAM,GAAG;AAClBC,EAAAA,SAAS,EAAE,qBAAqB;AAChCC,EAAAA,mBAAmB,EAAE,gCAAgC;AAErDC,EAAAA,WAAW,EAAE,uBAAuB;AACpCC,EAAAA,sBAAsB,EAAE,oCAAoC;AAC5DC,EAAAA,kBAAkB,EAAE,+BAA+B;AACnDC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B,EAAE,oBAAA;AACtB;;;;;"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var React = require('react');
|
6
|
+
var Textbox_styles = require('./Textbox.styles.js');
|
7
|
+
var TextLabel = require('./ui/TextLabel.js');
|
8
|
+
var TextTitle = require('./ui/TextTitle.js');
|
9
|
+
var TextSubtitle = require('./ui/TextSubtitle.js');
|
10
|
+
|
11
|
+
var Textbox = function Textbox(_ref) {
|
12
|
+
var label = _ref.label,
|
13
|
+
title = _ref.title,
|
14
|
+
subtitle = _ref.subtitle,
|
15
|
+
children = _ref.children;
|
16
|
+
return /*#__PURE__*/React.createElement(Textbox_styles.TextboxStyled, null, label || title || subtitle ? /*#__PURE__*/React.createElement(React.Fragment, null, label && /*#__PURE__*/React.createElement(TextLabel.TextLabel, null, label), title && /*#__PURE__*/React.createElement(TextTitle.TextTitle, null, title), subtitle && /*#__PURE__*/React.createElement(TextSubtitle.TextSubtitle, null, subtitle)) : children);
|
17
|
+
};
|
18
|
+
|
19
|
+
exports.Textbox = Textbox;
|
20
|
+
//# sourceMappingURL=Textbox.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Textbox.js","sources":["../../../../src/components/Cell/Textbox/Textbox.tsx"],"sourcesContent":["import React, { HTMLAttributes } from 'react';\n\nimport type { TextboxProps } from './Textbox.types';\nimport { TextboxStyled } from './Textbox.styles';\nimport { TextLabel } from './ui/TextLabel';\nimport { TextTitle } from './ui/TextTitle';\nimport { TextSubtitle } from './ui/TextSubtitle';\n\nexport const Textbox: React.FC<HTMLAttributes<HTMLDivElement> & TextboxProps> = ({\n label,\n title,\n subtitle,\n children,\n}) => {\n return (\n <TextboxStyled>\n {label || title || subtitle ? (\n <>\n {label && <TextLabel>{label}</TextLabel>}\n {title && <TextTitle>{title}</TextTitle>}\n {subtitle && <TextSubtitle>{subtitle}</TextSubtitle>}\n </>\n ) : (\n children\n )}\n </TextboxStyled>\n );\n};\n"],"names":["Textbox","_ref","label","title","subtitle","children","React","createElement","TextboxStyled","Fragment","TextLabel","TextTitle","TextSubtitle"],"mappings":";;;;;;;;;;IAQaA,OAAgE,GAAG,SAAnEA,OAAgEA,CAAAC,IAAA,EAKvE;AAAA,EAAA,IAJFC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IACRC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ,CAAA;EAER,oBACIC,KAAA,CAAAC,aAAA,CAACC,4BAAa,QACTN,KAAK,IAAIC,KAAK,IAAIC,QAAQ,gBACvBE,KAAA,CAAAC,aAAA,CAAAD,KAAA,CAAAG,QAAA,EACKP,IAAAA,EAAAA,KAAK,iBAAII,KAAA,CAAAC,aAAA,CAACG,mBAAS,QAAER,KAAiB,CAAC,EACvCC,KAAK,iBAAIG,KAAA,CAAAC,aAAA,CAACI,mBAAS,EAAER,IAAAA,EAAAA,KAAiB,CAAC,EACvCC,QAAQ,iBAAIE,KAAA,CAAAC,aAAA,CAACK,yBAAY,EAAER,IAAAA,EAAAA,QAAuB,CACrD,CAAC,GAEHC,QAEO,CAAC,CAAA;AAExB;;;;"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var styled = require('styled-components');
|
6
|
+
var Cell_tokens = require('../Cell.tokens.js');
|
7
|
+
|
8
|
+
var TextboxStyled = /*#__PURE__*/styled.div.withConfig({
|
9
|
+
componentId: "plasma-new-hope__sc-18k78d7-0"
|
10
|
+
})(["display:flex;flex-direction:column;gap:var(", ");"], Cell_tokens.tokens.cellTextboxGap);
|
11
|
+
|
12
|
+
exports.TextboxStyled = TextboxStyled;
|
13
|
+
//# sourceMappingURL=Textbox.styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Textbox.styles.js","sources":["../../../../src/components/Cell/Textbox/Textbox.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { tokens } from '../Cell.tokens';\n\nexport const TextboxStyled = styled.div`\n display: flex;\n flex-direction: column;\n gap: var(${tokens.cellTextboxGap});\n`;\n"],"names":["TextboxStyled","styled","div","withConfig","componentId","tokens","cellTextboxGap"],"mappings":";;;;;;;IAIaA,aAAa,gBAAGC,MAAM,CAACC,GAAG,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,+BAAA;AAAA,CAGxBC,CAAAA,CAAAA,CAAAA,6CAAAA,EAAAA,IAAAA,CAAAA,EAAAA,kBAAM,CAACC,cAAc;;;;"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var React = require('react');
|
6
|
+
var styled = require('styled-components');
|
7
|
+
var Cell_tokens = require('../../Cell.tokens.js');
|
8
|
+
|
9
|
+
var StyledTextLabel = /*#__PURE__*/styled.div.withConfig({
|
10
|
+
componentId: "plasma-new-hope__sc-102c6vv-0"
|
11
|
+
})(["color:var(", ");font-size:var(", ");font-weight:var(", ");font-family:var(", ");font-style:var(", ");line-height:var(", ");letter-spacing:var(", ");"], Cell_tokens.tokens.cellLabelColor, Cell_tokens.tokens.cellLabelFontSize, Cell_tokens.tokens.cellLabelFontWeight, Cell_tokens.tokens.cellLabelFontFamily, Cell_tokens.tokens.cellLabelFontStyle, Cell_tokens.tokens.cellLabelLineHeight, Cell_tokens.tokens.cellLabelLetterSpacing);
|
12
|
+
var TextLabel = function TextLabel(props) {
|
13
|
+
return /*#__PURE__*/React.createElement(StyledTextLabel, null, props.children);
|
14
|
+
};
|
15
|
+
|
16
|
+
exports.TextLabel = TextLabel;
|
17
|
+
//# sourceMappingURL=TextLabel.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TextLabel.js","sources":["../../../../../src/components/Cell/Textbox/ui/TextLabel.tsx"],"sourcesContent":["import React, { HTMLAttributes } from 'react';\nimport styled from 'styled-components';\n\nimport { tokens } from '../../Cell.tokens';\n\nconst StyledTextLabel = styled.div`\n color: var(${tokens.cellLabelColor});\n font-size: var(${tokens.cellLabelFontSize});\n font-weight: var(${tokens.cellLabelFontWeight});\n font-family: var(${tokens.cellLabelFontFamily});\n font-style: var(${tokens.cellLabelFontStyle});\n line-height: var(${tokens.cellLabelLineHeight});\n letter-spacing: var(${tokens.cellLabelLetterSpacing});\n`;\n\ntype TextLabelProps = {};\n\nexport const TextLabel: React.FC<HTMLAttributes<HTMLDivElement> & TextLabelProps> = (props) => {\n return <StyledTextLabel>{props.children}</StyledTextLabel>;\n};\n"],"names":["StyledTextLabel","styled","div","withConfig","componentId","tokens","cellLabelColor","cellLabelFontSize","cellLabelFontWeight","cellLabelFontFamily","cellLabelFontStyle","cellLabelLineHeight","cellLabelLetterSpacing","TextLabel","props","React","createElement","children"],"mappings":";;;;;;;;AAKA,IAAMA,eAAe,gBAAGC,MAAM,CAACC,GAAG,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,+BAAA;AAAA,CACjBC,CAAAA,CAAAA,CAAAA,YAAAA,EAAAA,kBAAAA,EAAAA,oBAAAA,EAAAA,oBAAAA,EAAAA,mBAAAA,EAAAA,oBAAAA,EAAAA,uBAAAA,EAAAA,IAAAA,CAAAA,EAAAA,kBAAM,CAACC,cAAc,EACjBD,kBAAM,CAACE,iBAAiB,EACtBF,kBAAM,CAACG,mBAAmB,EAC1BH,kBAAM,CAACI,mBAAmB,EAC3BJ,kBAAM,CAACK,kBAAkB,EACxBL,kBAAM,CAACM,mBAAmB,EACvBN,kBAAM,CAACO,sBAAsB,CACtD,CAAA;IAIYC,SAAoE,GAAG,SAAvEA,SAAoEA,CAAIC,KAAK,EAAK;EAC3F,oBAAOC,KAAA,CAAAC,aAAA,CAAChB,eAAe,EAAEc,IAAAA,EAAAA,KAAK,CAACG,QAA0B,CAAC,CAAA;AAC9D;;;;"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var React = require('react');
|
6
|
+
var styled = require('styled-components');
|
7
|
+
var Cell_tokens = require('../../Cell.tokens.js');
|
8
|
+
|
9
|
+
var StyledTextSubtitle = /*#__PURE__*/styled.div.withConfig({
|
10
|
+
componentId: "plasma-new-hope__sc-1tsgki4-0"
|
11
|
+
})(["color:var(", ");font-size:var(", ");font-weight:var(", ");font-family:var(", ");font-style:var(", ");line-height:var(", ");letter-spacing:var(", ");"], Cell_tokens.tokens.cellSubtitleColor, Cell_tokens.tokens.cellSubtitleFontSize, Cell_tokens.tokens.cellSubtitleFontWeight, Cell_tokens.tokens.cellSubtitleFontFamily, Cell_tokens.tokens.cellSubtitleFontStyle, Cell_tokens.tokens.cellSubtitleLineHeight, Cell_tokens.tokens.cellSubtitleLetterSpacing);
|
12
|
+
var TextSubtitle = function TextSubtitle(props) {
|
13
|
+
return /*#__PURE__*/React.createElement(StyledTextSubtitle, null, props.children);
|
14
|
+
};
|
15
|
+
|
16
|
+
exports.TextSubtitle = TextSubtitle;
|
17
|
+
//# sourceMappingURL=TextSubtitle.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TextSubtitle.js","sources":["../../../../../src/components/Cell/Textbox/ui/TextSubtitle.tsx"],"sourcesContent":["import React, { HTMLAttributes } from 'react';\nimport styled from 'styled-components';\n\nimport { tokens } from '../../Cell.tokens';\n\nconst StyledTextSubtitle = styled.div`\n color: var(${tokens.cellSubtitleColor});\n font-size: var(${tokens.cellSubtitleFontSize});\n font-weight: var(${tokens.cellSubtitleFontWeight});\n font-family: var(${tokens.cellSubtitleFontFamily});\n font-style: var(${tokens.cellSubtitleFontStyle});\n line-height: var(${tokens.cellSubtitleLineHeight});\n letter-spacing: var(${tokens.cellSubtitleLetterSpacing});\n`;\n\ntype TextSubtitleProps = {};\n\nexport const TextSubtitle: React.FC<HTMLAttributes<HTMLDivElement> & TextSubtitleProps> = (props) => {\n return <StyledTextSubtitle>{props.children}</StyledTextSubtitle>;\n};\n"],"names":["StyledTextSubtitle","styled","div","withConfig","componentId","tokens","cellSubtitleColor","cellSubtitleFontSize","cellSubtitleFontWeight","cellSubtitleFontFamily","cellSubtitleFontStyle","cellSubtitleLineHeight","cellSubtitleLetterSpacing","TextSubtitle","props","React","createElement","children"],"mappings":";;;;;;;;AAKA,IAAMA,kBAAkB,gBAAGC,MAAM,CAACC,GAAG,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,+BAAA;AAAA,CACpBC,CAAAA,CAAAA,CAAAA,YAAAA,EAAAA,kBAAAA,EAAAA,oBAAAA,EAAAA,oBAAAA,EAAAA,mBAAAA,EAAAA,oBAAAA,EAAAA,uBAAAA,EAAAA,IAAAA,CAAAA,EAAAA,kBAAM,CAACC,iBAAiB,EACpBD,kBAAM,CAACE,oBAAoB,EACzBF,kBAAM,CAACG,sBAAsB,EAC7BH,kBAAM,CAACI,sBAAsB,EAC9BJ,kBAAM,CAACK,qBAAqB,EAC3BL,kBAAM,CAACM,sBAAsB,EAC1BN,kBAAM,CAACO,yBAAyB,CACzD,CAAA;IAIYC,YAA0E,GAAG,SAA7EA,YAA0EA,CAAIC,KAAK,EAAK;EACjG,oBAAOC,KAAA,CAAAC,aAAA,CAAChB,kBAAkB,EAAEc,IAAAA,EAAAA,KAAK,CAACG,QAA6B,CAAC,CAAA;AACpE;;;;"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var React = require('react');
|
6
|
+
var styled = require('styled-components');
|
7
|
+
var Cell_tokens = require('../../Cell.tokens.js');
|
8
|
+
|
9
|
+
var StyledTextTitle = /*#__PURE__*/styled.div.withConfig({
|
10
|
+
componentId: "plasma-new-hope__sc-flfrmq-0"
|
11
|
+
})(["color:var(", ");font-size:var(", ");font-weight:var(", ");font-family:var(", ");font-style:var(", ");line-height:var(", ");letter-spacing:var(", ");"], Cell_tokens.tokens.cellTitleColor, Cell_tokens.tokens.cellTitleFontSize, Cell_tokens.tokens.cellTitleFontWeight, Cell_tokens.tokens.cellTitleFontFamily, Cell_tokens.tokens.cellTitleFontStyle, Cell_tokens.tokens.cellTitleLineHeight, Cell_tokens.tokens.cellTitleLetterSpacing);
|
12
|
+
var TextTitle = function TextTitle(props) {
|
13
|
+
return /*#__PURE__*/React.createElement(StyledTextTitle, null, props.children);
|
14
|
+
};
|
15
|
+
|
16
|
+
exports.TextTitle = TextTitle;
|
17
|
+
//# sourceMappingURL=TextTitle.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TextTitle.js","sources":["../../../../../src/components/Cell/Textbox/ui/TextTitle.tsx"],"sourcesContent":["import React, { HTMLAttributes } from 'react';\nimport styled from 'styled-components';\n\nimport { tokens } from '../../Cell.tokens';\n\nconst StyledTextTitle = styled.div`\n color: var(${tokens.cellTitleColor});\n font-size: var(${tokens.cellTitleFontSize});\n font-weight: var(${tokens.cellTitleFontWeight});\n font-family: var(${tokens.cellTitleFontFamily});\n font-style: var(${tokens.cellTitleFontStyle});\n line-height: var(${tokens.cellTitleLineHeight});\n letter-spacing: var(${tokens.cellTitleLetterSpacing});\n`;\n\ntype TextTitleProps = {};\n\nexport const TextTitle: React.FC<HTMLAttributes<HTMLDivElement> & TextTitleProps> = (props) => {\n return <StyledTextTitle>{props.children}</StyledTextTitle>;\n};\n"],"names":["StyledTextTitle","styled","div","withConfig","componentId","tokens","cellTitleColor","cellTitleFontSize","cellTitleFontWeight","cellTitleFontFamily","cellTitleFontStyle","cellTitleLineHeight","cellTitleLetterSpacing","TextTitle","props","React","createElement","children"],"mappings":";;;;;;;;AAKA,IAAMA,eAAe,gBAAGC,MAAM,CAACC,GAAG,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,8BAAA;AAAA,CACjBC,CAAAA,CAAAA,CAAAA,YAAAA,EAAAA,kBAAAA,EAAAA,oBAAAA,EAAAA,oBAAAA,EAAAA,mBAAAA,EAAAA,oBAAAA,EAAAA,uBAAAA,EAAAA,IAAAA,CAAAA,EAAAA,kBAAM,CAACC,cAAc,EACjBD,kBAAM,CAACE,iBAAiB,EACtBF,kBAAM,CAACG,mBAAmB,EAC1BH,kBAAM,CAACI,mBAAmB,EAC3BJ,kBAAM,CAACK,kBAAkB,EACxBL,kBAAM,CAACM,mBAAmB,EACvBN,kBAAM,CAACO,sBAAsB,CACtD,CAAA;IAIYC,SAAoE,GAAG,SAAvEA,SAAoEA,CAAIC,KAAK,EAAK;EAC3F,oBAAOC,KAAA,CAAAC,aAAA,CAAChB,eAAe,EAAEc,IAAAA,EAAAA,KAAK,CAACG,QAA0B,CAAC,CAAA;AAC9D;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../src/components/Cell/variations/_size/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nexport const base = css``;\n"],"names":["base"],"mappings":";;;;AAEO,IAAMA,IAAI,GAAQ;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../src/components/Cell/variations/_stretching/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { classes, tokens } from '../../Cell.tokens';\n\nexport const base = css`\n &.${classes.fixedStretching} {\n width: var(${tokens.cellWidth});\n }\n &.${classes.filledStretching} {\n width: 100%;\n }\n &.${classes.autoStretching} {\n width: auto;\n }\n`;\n"],"names":["base"],"mappings":";;;;AAIO,IAAMA,IAAI,GAUhB;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
.b1ppwsal.cell-stretching-fixed{width:var(--plasma-cell-width);}.b1ppwsal.cell-stretching-filled{width:100%;}.b1ppwsal.cell-stretching-auto{width:auto;}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../src/components/Cell/variations/_view/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { tokens } from '../../Cell.tokens';\n\nexport const base = css`\n color: var(${tokens.cellColor});\n background-color: var(${tokens.cellBackgroundColor});\n\n width: 100%;\n display: flex;\n gap: var(${tokens.cellGap});\n\n &:focus {\n outline: 0 none;\n }\n`;\n"],"names":["base"],"mappings":";;;;AAIO,IAAMA,IAAI,GAWhB;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
.b1sr9i7l{color:var(--plasma-cell-color);background-color:var(--plasma-cell-background-color);width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-cell-gap);}.b1sr9i7l:focus{outline:0 none;}
|
@@ -65,7 +65,6 @@ var dropdownRoot = function dropdownRoot(Root) {
|
|
65
65
|
placement: index.getPlacements(placement),
|
66
66
|
trigger: trigger,
|
67
67
|
closeOnOverlayClick: closeOnOverlayClick,
|
68
|
-
closeOnBeyondTargetHover: false,
|
69
68
|
closeOnEsc: closeOnEsc,
|
70
69
|
isFocusTrapped: isFocusTrapped,
|
71
70
|
frame: frame
|
@@ -90,7 +89,7 @@ var dropdownConfig = {
|
|
90
89
|
}
|
91
90
|
},
|
92
91
|
defaults: {
|
93
|
-
view: '
|
92
|
+
view: 'primary',
|
94
93
|
size: 'm'
|
95
94
|
}
|
96
95
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Dropdown.js","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["import React, { forwardRef, useRef } from 'react';\nimport { useFocusTrap, useForkRef, useUniqId } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../engines';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { StyledDropdown, StyledPopover } from './Dropdown.styles';\nimport { getPlacements } from './utils';\nimport type { DropdownProps } from './Dropdown.types';\n\n/**\n * Выпадающий список без внешнего контроля видимости.\n */\nexport const dropdownRoot = (Root: RootProps<HTMLDivElement, DropdownProps>) =>\n forwardRef<HTMLDivElement, DropdownProps>(\n (\n {\n id,\n target,\n children,\n hasArrow,\n role,\n view,\n size,\n frame,\n onToggle,\n isFocusTrapped = true,\n isOpen = false,\n placement = 'auto',\n trigger = 'click',\n offset = [0, 6],\n preventOverflow = false,\n closeOnOverlayClick = false,\n closeOnEsc = false,\n ...rest\n },\n outerRootRef,\n ) => {\n const uniqId = useUniqId();\n const innerId = id || uniqId;\n\n const rootRef = useRef<HTMLDivElement | null>(null);\n const dropdownRef = useRef<HTMLDivElement | null>(null);\n const handleRef = useForkRef<HTMLDivElement>(rootRef, outerRootRef);\n\n const trapRef = useFocusTrap(isOpen && isFocusTrapped);\n\n const dropdownForkRef = useForkRef<HTMLDivElement>(dropdownRef, trapRef);\n\n return (\n <StyledPopover\n role={role}\n isOpen={isOpen}\n usePortal={false}\n onToggle={(is, event) => onToggle?.(is, event)}\n id={innerId}\n ref={dropdownForkRef}\n target={target}\n offset={offset}\n preventOverflow={preventOverflow}\n hasArrow={hasArrow}\n placement={getPlacements(placement)}\n trigger={trigger}\n closeOnOverlayClick={closeOnOverlayClick}\n
|
1
|
+
{"version":3,"file":"Dropdown.js","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["import React, { forwardRef, useRef } from 'react';\nimport { useFocusTrap, useForkRef, useUniqId } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../engines';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { StyledDropdown, StyledPopover } from './Dropdown.styles';\nimport { getPlacements } from './utils';\nimport type { DropdownProps } from './Dropdown.types';\n\n/**\n * Выпадающий список без внешнего контроля видимости.\n */\nexport const dropdownRoot = (Root: RootProps<HTMLDivElement, DropdownProps>) =>\n forwardRef<HTMLDivElement, DropdownProps>(\n (\n {\n id,\n target,\n children,\n hasArrow,\n role,\n view,\n size,\n frame,\n onToggle,\n isFocusTrapped = true,\n isOpen = false,\n placement = 'auto',\n trigger = 'click',\n offset = [0, 6],\n preventOverflow = false,\n closeOnOverlayClick = false,\n closeOnEsc = false,\n ...rest\n },\n outerRootRef,\n ) => {\n const uniqId = useUniqId();\n const innerId = id || uniqId;\n\n const rootRef = useRef<HTMLDivElement | null>(null);\n const dropdownRef = useRef<HTMLDivElement | null>(null);\n const handleRef = useForkRef<HTMLDivElement>(rootRef, outerRootRef);\n\n const trapRef = useFocusTrap(isOpen && isFocusTrapped);\n\n const dropdownForkRef = useForkRef<HTMLDivElement>(dropdownRef, trapRef);\n\n return (\n <StyledPopover\n role={role}\n isOpen={isOpen}\n usePortal={false}\n onToggle={(is, event) => onToggle?.(is, event)}\n id={innerId}\n ref={dropdownForkRef}\n target={target}\n offset={offset}\n preventOverflow={preventOverflow}\n hasArrow={hasArrow}\n placement={getPlacements(placement)}\n trigger={trigger}\n closeOnOverlayClick={closeOnOverlayClick}\n closeOnEsc={closeOnEsc}\n isFocusTrapped={isFocusTrapped}\n frame={frame}\n >\n <Root ref={handleRef} view={view} size={size} {...rest}>\n <StyledDropdown>{children}</StyledDropdown>\n </Root>\n </StyledPopover>\n );\n },\n );\n\nexport const dropdownConfig = {\n name: 'Dropdown',\n tag: 'div',\n layout: dropdownRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'primary',\n size: 'm',\n },\n};\n"],"names":["dropdownRoot","Root","forwardRef","_ref","outerRootRef","id","target","children","hasArrow","role","view","size","frame","onToggle","_ref$isFocusTrapped","isFocusTrapped","_ref$isOpen","isOpen","_ref$placement","placement","_ref$trigger","trigger","_ref$offset","offset","_ref$preventOverflow","preventOverflow","_ref$closeOnOverlayCl","closeOnOverlayClick","_ref$closeOnEsc","closeOnEsc","rest","_objectWithoutProperties","_excluded","uniqId","useUniqId","innerId","rootRef","useRef","dropdownRef","handleRef","useForkRef","trapRef","useFocusTrap","dropdownForkRef","React","createElement","StyledPopover","usePortal","is","event","ref","getPlacements","_extends","StyledDropdown","dropdownConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;AAWA;AACA;AACA;IACaA,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAA8C,EAAA;AAAA,EAAA,oBACvEC,gBAAU,CACN,UAAAC,IAAA,EAqBIC,YAAY,EACX;AAAA,IAAA,IApBGC,EAAE,GAAAF,IAAA,CAAFE,EAAE;MACFC,MAAM,GAAAH,IAAA,CAANG,MAAM;MACNC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;MACRC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;MACRC,IAAI,GAAAN,IAAA,CAAJM,IAAI;MACJC,IAAI,GAAAP,IAAA,CAAJO,IAAI;MACJC,IAAI,GAAAR,IAAA,CAAJQ,IAAI;MACJC,KAAK,GAAAT,IAAA,CAALS,KAAK;MACLC,SAAQ,GAAAV,IAAA,CAARU,QAAQ;MAAAC,mBAAA,GAAAX,IAAA,CACRY,cAAc;AAAdA,MAAAA,cAAc,GAAAD,mBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,mBAAA;MAAAE,WAAA,GAAAb,IAAA,CACrBc,MAAM;AAANA,MAAAA,MAAM,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,WAAA;MAAAE,cAAA,GAAAf,IAAA,CACdgB,SAAS;AAATA,MAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,cAAA;MAAAE,YAAA,GAAAjB,IAAA,CAClBkB,OAAO;AAAPA,MAAAA,OAAO,GAAAD,YAAA,KAAG,KAAA,CAAA,GAAA,OAAO,GAAAA,YAAA;MAAAE,WAAA,GAAAnB,IAAA,CACjBoB,MAAM;MAANA,MAAM,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,CAAC,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ACNrD,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
|
@@ -12,7 +12,7 @@ var base = require('./variations/_view/base.js');
|
|
12
12
|
var Popover_styles = require('./Popover.styles.js');
|
13
13
|
var Popover_tokens = require('./Popover.tokens.js');
|
14
14
|
|
15
|
-
var _excluded = ["target", "children", "isOpen", "trigger", "hasArrow", "frame", "className", "placement", "offset", "zIndex", "isFocusTrapped", "closeOnEsc", "preventOverflow", "usePortal", "view", "onToggle"];
|
15
|
+
var _excluded = ["target", "children", "isOpen", "trigger", "hasArrow", "frame", "className", "placement", "offset", "zIndex", "isFocusTrapped", "closeOnOverlayClick", "closeOnEsc", "preventOverflow", "usePortal", "view", "onToggle"];
|
16
16
|
var ESCAPE_KEYCODE = 27;
|
17
17
|
var POPOVER_PORTAL_ID = 'plasma-popover-root';
|
18
18
|
|
@@ -21,41 +21,33 @@ var POPOVER_PORTAL_ID = 'plasma-popover-root';
|
|
21
21
|
* и вызова по клику либо ховеру.
|
22
22
|
*/
|
23
23
|
var popoverRoot = function popoverRoot(Root) {
|
24
|
-
return /*#__PURE__*/React.forwardRef(function (
|
25
|
-
var
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
closeOnEsc =
|
44
|
-
|
45
|
-
preventOverflow =
|
46
|
-
|
47
|
-
usePortal =
|
48
|
-
view =
|
49
|
-
onToggle =
|
50
|
-
rest = _rollupPluginBabelHelpers.objectWithoutProperties(
|
51
|
-
var closeOnOverlayClick = true;
|
52
|
-
var closeOnBeyondTargetHover = true;
|
53
|
-
if (props.trigger === 'click' && props.closeOnOverlayClick === false) {
|
54
|
-
closeOnOverlayClick = false;
|
55
|
-
}
|
56
|
-
if (props.trigger === 'hover' && props.closeOnBeyondTargetHover === false) {
|
57
|
-
closeOnBeyondTargetHover = false;
|
58
|
-
}
|
24
|
+
return /*#__PURE__*/React.forwardRef(function (_ref, outerRootRef) {
|
25
|
+
var target = _ref.target,
|
26
|
+
children = _ref.children,
|
27
|
+
isOpen = _ref.isOpen,
|
28
|
+
trigger = _ref.trigger,
|
29
|
+
hasArrow = _ref.hasArrow,
|
30
|
+
_ref$frame = _ref.frame,
|
31
|
+
frame = _ref$frame === void 0 ? 'document' : _ref$frame,
|
32
|
+
className = _ref.className,
|
33
|
+
_ref$placement = _ref.placement,
|
34
|
+
placement = _ref$placement === void 0 ? 'auto' : _ref$placement,
|
35
|
+
_ref$offset = _ref.offset,
|
36
|
+
offset = _ref$offset === void 0 ? [0, 0] : _ref$offset,
|
37
|
+
zIndex = _ref.zIndex,
|
38
|
+
_ref$isFocusTrapped = _ref.isFocusTrapped,
|
39
|
+
isFocusTrapped = _ref$isFocusTrapped === void 0 ? true : _ref$isFocusTrapped,
|
40
|
+
_ref$closeOnOverlayCl = _ref.closeOnOverlayClick,
|
41
|
+
closeOnOverlayClick = _ref$closeOnOverlayCl === void 0 ? true : _ref$closeOnOverlayCl,
|
42
|
+
_ref$closeOnEsc = _ref.closeOnEsc,
|
43
|
+
closeOnEsc = _ref$closeOnEsc === void 0 ? true : _ref$closeOnEsc,
|
44
|
+
_ref$preventOverflow = _ref.preventOverflow,
|
45
|
+
preventOverflow = _ref$preventOverflow === void 0 ? true : _ref$preventOverflow,
|
46
|
+
_ref$usePortal = _ref.usePortal,
|
47
|
+
usePortal = _ref$usePortal === void 0 ? false : _ref$usePortal,
|
48
|
+
view = _ref.view,
|
49
|
+
onToggle = _ref.onToggle,
|
50
|
+
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
59
51
|
var rootRef = React.useRef(null);
|
60
52
|
var popoverRef = React.useRef(null);
|
61
53
|
var handleRef = plasmaCore.useForkRef(rootRef, outerRootRef);
|
@@ -76,9 +68,7 @@ var popoverRoot = function popoverRoot(Root) {
|
|
76
68
|
opacity: isOpen ? 1 : 0
|
77
69
|
};
|
78
70
|
var _usePopper = reactPopper.usePopper(rootRef.current, popoverRef.current, {
|
79
|
-
|
80
|
-
// eslint-disable-next-line no-nested-ternary
|
81
|
-
placement: isAutoArray ? (_placement$ = placement[0]) !== null && _placement$ !== void 0 && _placement$.endsWith('start') ? 'auto-start' : 'auto' : placement,
|
71
|
+
placement: isAutoArray ? 'auto' : placement,
|
82
72
|
modifiers: [{
|
83
73
|
name: 'preventOverflow',
|
84
74
|
options: {
|
@@ -214,15 +204,10 @@ var popoverRoot = function popoverRoot(Root) {
|
|
214
204
|
}, target), children && portalRef.current && /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React.createElement(Root, _rollupPluginBabelHelpers.extends({
|
215
205
|
view: view,
|
216
206
|
className: className
|
217
|
-
}, rest, {
|
218
|
-
onMouseEnter: closeOnBeyondTargetHover ? undefined : onMouseEnter,
|
219
|
-
onMouseLeave: closeOnBeyondTargetHover ? undefined : onMouseEnter
|
220
|
-
}), /*#__PURE__*/React.createElement(Popover_styles.StyledPopover, _rollupPluginBabelHelpers.extends({}, attributes.popper, {
|
207
|
+
}, rest), /*#__PURE__*/React.createElement(Popover_styles.StyledPopover, _rollupPluginBabelHelpers.extends({}, attributes.popper, {
|
221
208
|
className: Popover_tokens.classes.root,
|
222
209
|
ref: popoverForkRef,
|
223
|
-
style: _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2(
|
224
|
-
display: isOpen ? 'block' : 'none'
|
225
|
-
}), initialStyles),
|
210
|
+
style: _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, styles.popper), initialStyles),
|
226
211
|
zIndex: zIndex
|
227
212
|
}), hasArrow && /*#__PURE__*/React.createElement(Popover_styles.StyledArrow, _rollupPluginBabelHelpers.extends({
|
228
213
|
className: Popover_tokens.classes.arrow,
|