@salutejs/plasma-new-hope 0.67.0-canary.1148.8444175533.0 → 0.67.0-canary.1148.8449780048.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Cell/Cell.js +3 -0
- package/cjs/components/Cell/Cell.js.map +1 -1
- package/cjs/components/Cell/Cell.tokens.js +2 -3
- package/cjs/components/Cell/Cell.tokens.js.map +1 -1
- package/es/components/Cell/Cell.js +3 -0
- package/es/components/Cell/Cell.js.map +1 -1
- package/es/components/Cell/Cell.tokens.js +2 -3
- package/es/components/Cell/Cell.tokens.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Avatar/Avatar.template-doc.mdx +97 -0
- package/styled-components/cjs/components/AvatarGroup/AvatarGroup.template-doc.mdx +29 -0
- package/styled-components/cjs/components/Badge/Badge.template-doc.mdx +131 -0
- package/styled-components/cjs/components/Button/Button.template-doc.mdx +162 -0
- package/styled-components/cjs/components/ButtonGroup/ButtonGroup.template-doc.mdx +123 -0
- package/styled-components/cjs/components/Calendar/Calendar.template-doc.mdx +208 -0
- package/styled-components/cjs/components/Cell/Cell.js +3 -0
- package/styled-components/cjs/components/Cell/Cell.tokens.js +2 -3
- package/styled-components/cjs/components/Checkbox/Checkbox.template-doc.mdx +44 -0
- package/styled-components/cjs/components/Chip/Chip.template-doc.mdx +90 -0
- package/styled-components/cjs/components/Combobox/Combobox.template-doc.mdx +237 -0
- package/styled-components/cjs/components/Counter/Counter.template-doc.mdx +76 -0
- package/styled-components/cjs/components/Drawer/Drawer.template-doc.mdx +170 -0
- package/styled-components/cjs/components/Dropdown/Dropdown.template-doc.mdx +80 -0
- package/styled-components/cjs/components/Grid/Grid.template-doc.mdx +142 -0
- package/styled-components/cjs/components/Image/Image.template-doc.mdx +26 -0
- package/styled-components/cjs/components/Indicator/Indicator.template-doc.mdx +76 -0
- package/styled-components/cjs/components/Link/Link.template-doc.mdx +23 -0
- package/styled-components/cjs/components/Modal/Modal.template-doc.mdx +56 -0
- package/styled-components/cjs/components/Notification/Notification.template-doc.mdx +59 -0
- package/styled-components/cjs/components/Overlay/Overlay.template-doc.mdx +10 -0
- package/styled-components/cjs/components/Popover/Popover.template-doc.mdx +72 -0
- package/styled-components/cjs/components/Popup/Popup.template-doc.mdx +209 -0
- package/styled-components/cjs/components/Radiobox/Radiobox.template-doc.mdx +38 -0
- package/styled-components/cjs/components/Segment/Segment.template-doc.mdx +61 -0
- package/styled-components/cjs/components/Select/Select.template-doc.mdx +115 -0
- package/styled-components/cjs/components/Skeleton/Skeleton.template-doc.mdx +103 -0
- package/styled-components/cjs/components/Spinner/Spinner.template-doc.mdx +21 -0
- package/styled-components/cjs/components/Switch/Switch.template-doc.mdx +24 -0
- package/styled-components/cjs/components/Tabs/Tabs.template-doc.mdx +94 -0
- package/styled-components/cjs/components/TextArea/TextArea.template-doc.mdx +88 -0
- package/styled-components/cjs/components/TextField/TextField.template-doc.mdx +112 -0
- package/styled-components/cjs/components/Toast/Toast.template-doc.mdx +153 -0
- package/styled-components/cjs/components/Tooltip/Tooltip.template-doc.mdx +30 -0
- package/styled-components/cjs/components/Typography/Typography.template-doc.mdx +127 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Cell/Cell.config.js +5 -5
- package/styled-components/cjs/examples/plasma_b2c/components/Cell/Cell.stories.tsx +16 -19
- package/styled-components/cjs/examples/plasma_web/components/Cell/Cell.config.js +5 -5
- package/styled-components/cjs/examples/plasma_web/components/Cell/Cell.stories.tsx +16 -19
- package/styled-components/es/components/Avatar/Avatar.template-doc.mdx +97 -0
- package/styled-components/es/components/AvatarGroup/AvatarGroup.template-doc.mdx +29 -0
- package/styled-components/es/components/Badge/Badge.template-doc.mdx +131 -0
- package/styled-components/es/components/Button/Button.template-doc.mdx +162 -0
- package/styled-components/es/components/ButtonGroup/ButtonGroup.template-doc.mdx +123 -0
- package/styled-components/es/components/Calendar/Calendar.template-doc.mdx +208 -0
- package/styled-components/es/components/Cell/Cell.js +3 -0
- package/styled-components/es/components/Cell/Cell.tokens.js +2 -3
- package/styled-components/es/components/Checkbox/Checkbox.template-doc.mdx +44 -0
- package/styled-components/es/components/Chip/Chip.template-doc.mdx +90 -0
- package/styled-components/es/components/Combobox/Combobox.template-doc.mdx +237 -0
- package/styled-components/es/components/Counter/Counter.template-doc.mdx +76 -0
- package/styled-components/es/components/Drawer/Drawer.template-doc.mdx +170 -0
- package/styled-components/es/components/Dropdown/Dropdown.template-doc.mdx +80 -0
- package/styled-components/es/components/Grid/Grid.template-doc.mdx +142 -0
- package/styled-components/es/components/Image/Image.template-doc.mdx +26 -0
- package/styled-components/es/components/Indicator/Indicator.template-doc.mdx +76 -0
- package/styled-components/es/components/Link/Link.template-doc.mdx +23 -0
- package/styled-components/es/components/Modal/Modal.template-doc.mdx +56 -0
- package/styled-components/es/components/Notification/Notification.template-doc.mdx +59 -0
- package/styled-components/es/components/Overlay/Overlay.template-doc.mdx +10 -0
- package/styled-components/es/components/Popover/Popover.template-doc.mdx +72 -0
- package/styled-components/es/components/Popup/Popup.template-doc.mdx +209 -0
- package/styled-components/es/components/Radiobox/Radiobox.template-doc.mdx +38 -0
- package/styled-components/es/components/Segment/Segment.template-doc.mdx +61 -0
- package/styled-components/es/components/Select/Select.template-doc.mdx +115 -0
- package/styled-components/es/components/Skeleton/Skeleton.template-doc.mdx +103 -0
- package/styled-components/es/components/Spinner/Spinner.template-doc.mdx +21 -0
- package/styled-components/es/components/Switch/Switch.template-doc.mdx +24 -0
- package/styled-components/es/components/Tabs/Tabs.template-doc.mdx +94 -0
- package/styled-components/es/components/TextArea/TextArea.template-doc.mdx +88 -0
- package/styled-components/es/components/TextField/TextField.template-doc.mdx +112 -0
- package/styled-components/es/components/Toast/Toast.template-doc.mdx +153 -0
- package/styled-components/es/components/Tooltip/Tooltip.template-doc.mdx +30 -0
- package/styled-components/es/components/Typography/Typography.template-doc.mdx +127 -0
- package/styled-components/es/examples/plasma_b2c/components/Cell/Cell.config.js +5 -5
- package/styled-components/es/examples/plasma_b2c/components/Cell/Cell.stories.tsx +16 -19
- package/styled-components/es/examples/plasma_web/components/Cell/Cell.config.js +5 -5
- package/styled-components/es/examples/plasma_web/components/Cell/Cell.stories.tsx +16 -19
- package/types/components/Cell/Cell.d.ts +4 -2
- package/types/components/Cell/Cell.d.ts.map +1 -1
- package/types/components/Cell/Cell.tokens.d.ts +0 -1
- package/types/components/Cell/Cell.tokens.d.ts.map +1 -1
- package/types/components/Cell/Cell.types.d.ts +5 -2
- package/types/components/Cell/Cell.types.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Cell/Cell.d.ts +2 -1
- package/types/examples/plasma_b2c/components/Cell/Cell.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Cell/Cell.d.ts +2 -1
- package/types/examples/plasma_web/components/Cell/Cell.d.ts.map +1 -1
@@ -18,6 +18,8 @@ var cellRoot = function cellRoot(Root) {
|
|
18
18
|
return /*#__PURE__*/React.forwardRef(function (props, outerRootRef) {
|
19
19
|
var _props$size = props.size,
|
20
20
|
size = _props$size === void 0 ? 'm' : _props$size,
|
21
|
+
_props$view = props.view,
|
22
|
+
view = _props$view === void 0 ? 'default' : _props$view,
|
21
23
|
left = props.contentLeft,
|
22
24
|
right = props.contentRight,
|
23
25
|
_props$alignLeft = props.alignLeft,
|
@@ -34,6 +36,7 @@ var cellRoot = function cellRoot(Root) {
|
|
34
36
|
return /*#__PURE__*/React.createElement(Root, {
|
35
37
|
ref: outerRootRef,
|
36
38
|
size: size,
|
39
|
+
view: view,
|
37
40
|
className: index.cx(stretchingClass)
|
38
41
|
}, /*#__PURE__*/React.createElement(Cell_styles.CellRoot, {
|
39
42
|
className: Cell_tokens.classes.cellRoot
|
@@ -1 +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 { CellRoot, 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';\nimport { TextLabel } from './Textbox/ui/TextLabel';\nimport { TextTitle } from './Textbox/ui/TextTitle';\nimport { TextSubtitle } from './Textbox/ui/TextSubtitle';\n\nexport const cellRoot = (Root: RootProps<HTMLSelectElement, CellProps>) =>\n forwardRef<HTMLSelectElement, CellProps>((props, outerRootRef) => {\n const {\n size = 'm',\n contentLeft: left,\n contentRight: right,\n alignLeft = 'center',\n alignRight = 'center',\n stretching = 'filled',\n children,\n title,\n subtitle,\n label,\n } = props;\n\n const stretchingClass = classes[`${stretching}Stretching` as keyof typeof classes];\n\n return (\n <Root ref={outerRootRef} size={size} className={cx(stretchingClass)}>\n <CellRoot className={classes.cellRoot}>\n {left && <CellLeft align={alignLeft}>{left}</CellLeft>}\n <CellContentWrapper>\n <CellContent>\n {title || subtitle || label ? (\n <Textbox>\n {label && <TextLabel>{label}</TextLabel>}\n {title && <TextTitle>{title}</TextTitle>}\n {subtitle && <TextSubtitle>{subtitle}</TextSubtitle>}\n </Textbox>\n ) : (\n children && children\n )}\n </CellContent>\n {right && <CellRight align={alignRight}>{right}</CellRight>}\n </CellContentWrapper>\n </CellRoot>\n </Root>\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","props","outerRootRef","_props$size","size","left","contentLeft","right","contentRight","_props$alignLeft","alignLeft","_props$alignRight","alignRight","_props$stretching","stretching","children","title","subtitle","label","stretchingClass","classes","concat","React","createElement","ref","className","cx","CellRoot","CellLeft","align","CellContentWrapper","CellContent","Textbox","TextLabel","TextTitle","TextSubtitle","CellRight","cellConfig","name","tag","layout","base","variations","
|
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 { CellRoot, 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';\nimport { TextLabel } from './Textbox/ui/TextLabel';\nimport { TextTitle } from './Textbox/ui/TextTitle';\nimport { TextSubtitle } from './Textbox/ui/TextSubtitle';\n\nexport const cellRoot = (Root: RootProps<HTMLSelectElement, CellProps>) =>\n forwardRef<HTMLSelectElement, CellProps>((props, outerRootRef) => {\n const {\n size = 'm',\n view = 'default',\n contentLeft: left,\n contentRight: right,\n alignLeft = 'center',\n alignRight = 'center',\n stretching = 'filled',\n children,\n title,\n subtitle,\n label,\n } = props;\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)}>\n <CellRoot className={classes.cellRoot}>\n {left && <CellLeft align={alignLeft}>{left}</CellLeft>}\n <CellContentWrapper>\n <CellContent>\n {title || subtitle || label ? (\n <Textbox>\n {label && <TextLabel>{label}</TextLabel>}\n {title && <TextTitle>{title}</TextTitle>}\n {subtitle && <TextSubtitle>{subtitle}</TextSubtitle>}\n </Textbox>\n ) : (\n children && children\n )}\n </CellContent>\n {right && <CellRight align={alignRight}>{right}</CellRight>}\n </CellContentWrapper>\n </CellRoot>\n </Root>\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","props","outerRootRef","_props$size","size","_props$view","view","left","contentLeft","right","contentRight","_props$alignLeft","alignLeft","_props$alignRight","alignRight","_props$stretching","stretching","children","title","subtitle","label","stretchingClass","classes","concat","React","createElement","ref","className","cx","CellRoot","CellLeft","align","CellContentWrapper","CellContent","Textbox","TextLabel","TextTitle","TextSubtitle","CellRight","cellConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","stretchingCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;IAgBaA,QAAQ,GAAG,SAAXA,QAAQA,CAAIC,IAA6C,EAAA;AAAA,EAAA,oBAClEC,gBAAU,CAA+B,UAACC,KAAK,EAAEC,YAAY,EAAK;AAC9D,IAAA,IAAAC,WAAA,GAYIF,KAAK,CAXLG,IAAI;AAAJA,MAAAA,IAAI,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,GAAG,GAAAA,WAAA;MAAAE,WAAA,GAWVJ,KAAK,CAVLK,IAAI;AAAJA,MAAAA,IAAI,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,SAAS,GAAAA,WAAA;MACHE,IAAI,GASjBN,KAAK,CATLO,WAAW;MACGC,KAAK,GAQnBR,KAAK,CARLS,YAAY;MAAAC,gBAAA,GAQZV,KAAK,CAPLW,SAAS;AAATA,MAAAA,SAAS,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,gBAAA;MAAAE,iBAAA,GAOpBZ,KAAK,CANLa,UAAU;AAAVA,MAAAA,UAAU,GAAAD,iBAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,iBAAA;MAAAE,iBAAA,GAMrBd,KAAK,CALLe,UAAU;AAAVA,MAAAA,UAAU,GAAAD,iBAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,iBAAA;MACrBE,QAAQ,GAIRh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,qBAAS,EAAA;AAACP,MAAAA,KAAK,EAAEjB,UAAAA;AAAW,KAAA,EAAEL,KAAiB,CAC1C,CACd,CACR,CAAC,CAAA;AAEf,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAM8B,UAAU,GAAG;AACtBC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE5C,QAAQ;AAChB6C,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACRtC,IAAAA,IAAI,EAAE;AACFuC,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACD1C,IAAAA,IAAI,EAAE;AACFyC,MAAAA,GAAG,EAAEE,WAAAA;KACR;AACD/B,IAAAA,UAAU,EAAE;AACR6B,MAAAA,GAAG,EAAEG,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN3C,IAAAA,IAAI,EAAE,SAAS;AACfF,IAAAA,IAAI,EAAE,GAAG;AACTY,IAAAA,UAAU,EAAE,QAAA;AAChB,GAAA;AACJ;;;;;"}
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
var tokens = {
|
6
6
|
cellColor: '--plasma-cell-color',
|
7
7
|
cellBackgroundColor: '--plasma-cell-background-color',
|
8
|
-
cellPadding: '--plasma-cell-padding',
|
8
|
+
cellPadding: '--plasma-cell-content-padding',
|
9
9
|
cellPaddingLeftContent: '--plasma-cell-left-padding',
|
10
|
-
cellPaddingContent: '--plasma-cell-padding',
|
10
|
+
cellPaddingContent: '--plasma-cell-content-padding',
|
11
11
|
cellPaddingRightContent: '--plasma-cell-right-padding',
|
12
12
|
cellTextboxGap: '--plasma-cell-textbox-gap',
|
13
13
|
cellGap: '--plasma-cell-gap',
|
@@ -35,7 +35,6 @@ var tokens = {
|
|
35
35
|
cellSubtitleLineHeight: '--plasma-cell-subtitle-line-height'
|
36
36
|
};
|
37
37
|
var classes = {
|
38
|
-
cellStretch: 'cell-stretch',
|
39
38
|
autoStretching: 'cell-stretching-auto',
|
40
39
|
filledStretching: 'cell-stretching-filled',
|
41
40
|
fixedStretching: 'cell-stretching-fixed',
|
@@ -1 +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-left-padding',\n cellPaddingContent: '--plasma-cell-padding',\n cellPaddingRightContent: '--plasma-cell-right-padding',\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
|
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-content-padding',\n cellPaddingLeftContent: '--plasma-cell-left-padding',\n cellPaddingContent: '--plasma-cell-content-padding',\n cellPaddingRightContent: '--plasma-cell-right-padding',\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,+BAA+B;AAC5CC,EAAAA,sBAAsB,EAAE,4BAA4B;AACpDC,EAAAA,kBAAkB,EAAE,+BAA+B;AACnDC,EAAAA,uBAAuB,EAAE,6BAA6B;AAEtDC,EAAAA,cAAc,EAAE,2BAA2B;AAC3CC,EAAAA,OAAO,EAAE,mBAAmB;AAE5BC,EAAAA,SAAS,EAAE,qBAAqB;AAEhCC,EAAAA,cAAc,EAAE,2BAA2B;AAC3CC,EAAAA,mBAAmB,EAAE,iCAAiC;AACtDC,EAAAA,iBAAiB,EAAE,+BAA+B;AAClDC,EAAAA,kBAAkB,EAAE,gCAAgC;AACpDC,EAAAA,mBAAmB,EAAE,iCAAiC;AACtDC,EAAAA,sBAAsB,EAAE,oCAAoC;AAC5DC,EAAAA,mBAAmB,EAAE,iCAAiC;AAEtDC,EAAAA,cAAc,EAAE,2BAA2B;AAC3CC,EAAAA,mBAAmB,EAAE,iCAAiC;AACtDC,EAAAA,iBAAiB,EAAE,+BAA+B;AAClDC,EAAAA,kBAAkB,EAAE,gCAAgC;AACpDC,EAAAA,mBAAmB,EAAE,iCAAiC;AACtDC,EAAAA,sBAAsB,EAAE,oCAAoC;AAC5DC,EAAAA,mBAAmB,EAAE,iCAAiC;AAEtDC,EAAAA,iBAAiB,EAAE,8BAA8B;AACjDC,EAAAA,sBAAsB,EAAE,oCAAoC;AAC5DC,EAAAA,oBAAoB,EAAE,kCAAkC;AACxDC,EAAAA,qBAAqB,EAAE,mCAAmC;AAC1DC,EAAAA,sBAAsB,EAAE,oCAAoC;AAC5DC,EAAAA,yBAAyB,EAAE,uCAAuC;AAClEC,EAAAA,sBAAsB,EAAE,oCAAA;AAC5B,EAAC;AAEM,IAAMC,OAAO,GAAG;AACnBC,EAAAA,cAAc,EAAE,sBAAsB;AACtCC,EAAAA,gBAAgB,EAAE,wBAAwB;AAC1CC,EAAAA,eAAe,EAAE,uBAAuB;AAExCC,EAAAA,WAAW,EAAE,cAAc;AAC3BC,EAAAA,QAAQ,EAAE,WAAW;AACrBC,EAAAA,WAAW,EAAE,cAAc;AAC3BC,EAAAA,eAAe,EAAE,mBAAmB;AACpCC,EAAAA,gBAAgB,EAAE,oBAAA;AACtB;;;;;"}
|
@@ -14,6 +14,8 @@ var cellRoot = function cellRoot(Root) {
|
|
14
14
|
return /*#__PURE__*/forwardRef(function (props, outerRootRef) {
|
15
15
|
var _props$size = props.size,
|
16
16
|
size = _props$size === void 0 ? 'm' : _props$size,
|
17
|
+
_props$view = props.view,
|
18
|
+
view = _props$view === void 0 ? 'default' : _props$view,
|
17
19
|
left = props.contentLeft,
|
18
20
|
right = props.contentRight,
|
19
21
|
_props$alignLeft = props.alignLeft,
|
@@ -30,6 +32,7 @@ var cellRoot = function cellRoot(Root) {
|
|
30
32
|
return /*#__PURE__*/React.createElement(Root, {
|
31
33
|
ref: outerRootRef,
|
32
34
|
size: size,
|
35
|
+
view: view,
|
33
36
|
className: cx(stretchingClass)
|
34
37
|
}, /*#__PURE__*/React.createElement(CellRoot, {
|
35
38
|
className: classes.cellRoot
|
@@ -1 +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 { CellRoot, 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';\nimport { TextLabel } from './Textbox/ui/TextLabel';\nimport { TextTitle } from './Textbox/ui/TextTitle';\nimport { TextSubtitle } from './Textbox/ui/TextSubtitle';\n\nexport const cellRoot = (Root: RootProps<HTMLSelectElement, CellProps>) =>\n forwardRef<HTMLSelectElement, CellProps>((props, outerRootRef) => {\n const {\n size = 'm',\n contentLeft: left,\n contentRight: right,\n alignLeft = 'center',\n alignRight = 'center',\n stretching = 'filled',\n children,\n title,\n subtitle,\n label,\n } = props;\n\n const stretchingClass = classes[`${stretching}Stretching` as keyof typeof classes];\n\n return (\n <Root ref={outerRootRef} size={size} className={cx(stretchingClass)}>\n <CellRoot className={classes.cellRoot}>\n {left && <CellLeft align={alignLeft}>{left}</CellLeft>}\n <CellContentWrapper>\n <CellContent>\n {title || subtitle || label ? (\n <Textbox>\n {label && <TextLabel>{label}</TextLabel>}\n {title && <TextTitle>{title}</TextTitle>}\n {subtitle && <TextSubtitle>{subtitle}</TextSubtitle>}\n </Textbox>\n ) : (\n children && children\n )}\n </CellContent>\n {right && <CellRight align={alignRight}>{right}</CellRight>}\n </CellContentWrapper>\n </CellRoot>\n </Root>\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","props","outerRootRef","_props$size","size","left","contentLeft","right","contentRight","_props$alignLeft","alignLeft","_props$alignRight","alignRight","_props$stretching","stretching","children","title","subtitle","label","stretchingClass","classes","concat","React","createElement","ref","className","cx","CellRoot","CellLeft","align","CellContentWrapper","CellContent","Textbox","TextLabel","TextTitle","TextSubtitle","CellRight","cellConfig","name","tag","layout","base","variations","
|
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 { CellRoot, 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';\nimport { TextLabel } from './Textbox/ui/TextLabel';\nimport { TextTitle } from './Textbox/ui/TextTitle';\nimport { TextSubtitle } from './Textbox/ui/TextSubtitle';\n\nexport const cellRoot = (Root: RootProps<HTMLSelectElement, CellProps>) =>\n forwardRef<HTMLSelectElement, CellProps>((props, outerRootRef) => {\n const {\n size = 'm',\n view = 'default',\n contentLeft: left,\n contentRight: right,\n alignLeft = 'center',\n alignRight = 'center',\n stretching = 'filled',\n children,\n title,\n subtitle,\n label,\n } = props;\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)}>\n <CellRoot className={classes.cellRoot}>\n {left && <CellLeft align={alignLeft}>{left}</CellLeft>}\n <CellContentWrapper>\n <CellContent>\n {title || subtitle || label ? (\n <Textbox>\n {label && <TextLabel>{label}</TextLabel>}\n {title && <TextTitle>{title}</TextTitle>}\n {subtitle && <TextSubtitle>{subtitle}</TextSubtitle>}\n </Textbox>\n ) : (\n children && children\n )}\n </CellContent>\n {right && <CellRight align={alignRight}>{right}</CellRight>}\n </CellContentWrapper>\n </CellRoot>\n </Root>\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","props","outerRootRef","_props$size","size","_props$view","view","left","contentLeft","right","contentRight","_props$alignLeft","alignLeft","_props$alignRight","alignRight","_props$stretching","stretching","children","title","subtitle","label","stretchingClass","classes","concat","React","createElement","ref","className","cx","CellRoot","CellLeft","align","CellContentWrapper","CellContent","Textbox","TextLabel","TextTitle","TextSubtitle","CellRight","cellConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","stretchingCSS","defaults"],"mappings":";;;;;;;;;;;;IAgBaA,QAAQ,GAAG,SAAXA,QAAQA,CAAIC,IAA6C,EAAA;AAAA,EAAA,oBAClEC,UAAU,CAA+B,UAACC,KAAK,EAAEC,YAAY,EAAK;AAC9D,IAAA,IAAAC,WAAA,GAYIF,KAAK,CAXLG,IAAI;AAAJA,MAAAA,IAAI,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,GAAG,GAAAA,WAAA;MAAAE,WAAA,GAWVJ,KAAK,CAVLK,IAAI;AAAJA,MAAAA,IAAI,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,SAAS,GAAAA,WAAA;MACHE,IAAI,GASjBN,KAAK,CATLO,WAAW;MACGC,KAAK,GAQnBR,KAAK,CARLS,YAAY;MAAAC,gBAAA,GAQZV,KAAK,CAPLW,SAAS;AAATA,MAAAA,SAAS,GAAAD,gBA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ACU,SAAS,EAAEf,IAAAA,EAAAA,KAAiB,CAAC,EACvCF,KAAK,iBAAIM,KAAA,CAAAC,aAAA,CAACW,SAAS,EAAElB,IAAAA,EAAAA,KAAiB,CAAC,EACvCC,QAAQ,iBAAIK,KAAA,CAAAC,aAAA,CAACY,YAAY,EAAA,IAAA,EAAElB,QAAuB,CAC9C,CAAC,GAEVF,QAAQ,IAAIA,QAEP,CAAC,EACbR,KAAK,iBAAIe,KAAA,CAAAC,aAAA,CAACa,SAAS,EAAA;AAACP,MAAAA,KAAK,EAAEjB,UAAAA;AAAW,KAAA,EAAEL,KAAiB,CAC1C,CACd,CACR,CAAC,CAAA;AAEf,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAM8B,UAAU,GAAG;AACtBC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE5C,QAAQ;AAChB6C,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACRtC,IAAAA,IAAI,EAAE;AACFuC,MAAAA,GAAG,EAAEC,IAAAA;KACR;AACD1C,IAAAA,IAAI,EAAE;AACFyC,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACD/B,IAAAA,UAAU,EAAE;AACR6B,MAAAA,GAAG,EAAEG,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN3C,IAAAA,IAAI,EAAE,SAAS;AACfF,IAAAA,IAAI,EAAE,GAAG;AACTY,IAAAA,UAAU,EAAE,QAAA;AAChB,GAAA;AACJ;;;;"}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
var tokens = {
|
2
2
|
cellColor: '--plasma-cell-color',
|
3
3
|
cellBackgroundColor: '--plasma-cell-background-color',
|
4
|
-
cellPadding: '--plasma-cell-padding',
|
4
|
+
cellPadding: '--plasma-cell-content-padding',
|
5
5
|
cellPaddingLeftContent: '--plasma-cell-left-padding',
|
6
|
-
cellPaddingContent: '--plasma-cell-padding',
|
6
|
+
cellPaddingContent: '--plasma-cell-content-padding',
|
7
7
|
cellPaddingRightContent: '--plasma-cell-right-padding',
|
8
8
|
cellTextboxGap: '--plasma-cell-textbox-gap',
|
9
9
|
cellGap: '--plasma-cell-gap',
|
@@ -31,7 +31,6 @@ var tokens = {
|
|
31
31
|
cellSubtitleLineHeight: '--plasma-cell-subtitle-line-height'
|
32
32
|
};
|
33
33
|
var classes = {
|
34
|
-
cellStretch: 'cell-stretch',
|
35
34
|
autoStretching: 'cell-stretching-auto',
|
36
35
|
filledStretching: 'cell-stretching-filled',
|
37
36
|
fixedStretching: 'cell-stretching-fixed',
|
@@ -1 +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-left-padding',\n cellPaddingContent: '--plasma-cell-padding',\n cellPaddingRightContent: '--plasma-cell-right-padding',\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
|
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-content-padding',\n cellPaddingLeftContent: '--plasma-cell-left-padding',\n cellPaddingContent: '--plasma-cell-content-padding',\n cellPaddingRightContent: '--plasma-cell-right-padding',\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,+BAA+B;AAC5CC,EAAAA,sBAAsB,EAAE,4BAA4B;AACpDC,EAAAA,kBAAkB,EAAE,+BAA+B;AACnDC,EAAAA,uBAAuB,EAAE,6BAA6B;AAEtDC,EAAAA,cAAc,EAAE,2BAA2B;AAC3CC,EAAAA,OAAO,EAAE,mBAAmB;AAE5BC,EAAAA,SAAS,EAAE,qBAAqB;AAEhCC,EAAAA,cAAc,EAAE,2BAA2B;AAC3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
|
4
4
|
"description": "Salute Design System blueprint",
|
5
5
|
"main": "cjs/index.js",
|
6
6
|
"module": "es/index.js",
|
@@ -102,5 +102,5 @@
|
|
102
102
|
"react-popper": "2.3.0",
|
103
103
|
"storeon": "3.1.5"
|
104
104
|
},
|
105
|
-
"gitHead": "
|
105
|
+
"gitHead": "ed35aee23fd1ae8ea726b313ed4acb9b5aebc594"
|
106
106
|
}
|
@@ -0,0 +1,97 @@
|
|
1
|
+
---
|
2
|
+
id: avatar
|
3
|
+
title: Avatar
|
4
|
+
---
|
5
|
+
|
6
|
+
import { PropsTable, Description } from '@site/src/components';
|
7
|
+
|
8
|
+
# Avatar
|
9
|
+
<Description name="Avatar" />
|
10
|
+
<PropsTable name="Avatar" exclude={['css']} />
|
11
|
+
|
12
|
+
|
13
|
+
## Примеры
|
14
|
+
|
15
|
+
### Размер аватара
|
16
|
+
Размер задается с помощью свойства `size`. Возможные значения свойства: `"xxl"`, `"l"`, `"m"`, `"s"`, `"fit"`.
|
17
|
+
|
18
|
+
```tsx live
|
19
|
+
import React from 'react';
|
20
|
+
import { Avatar } from '@salutejs/{{ package }}';
|
21
|
+
|
22
|
+
export function App() {
|
23
|
+
return (
|
24
|
+
<>
|
25
|
+
<Avatar size="xxl" url="https://avatars.githubusercontent.com/u/1813468?v=4" />
|
26
|
+
<Avatar size="l" url="https://avatars.githubusercontent.com/u/1813468?v=4" />
|
27
|
+
<Avatar size="m" url="https://avatars.githubusercontent.com/u/1813468?v=4" />
|
28
|
+
<Avatar size="s" url="https://avatars.githubusercontent.com/u/1813468?v=4" />
|
29
|
+
</>
|
30
|
+
);
|
31
|
+
}
|
32
|
+
```
|
33
|
+
|
34
|
+
### Инициалы вместо фотографии
|
35
|
+
Инициалы можно задать с помощью свойства `name`. Желательный формат строки - "Имя Фамилия". Также не должно быть свойства url.
|
36
|
+
|
37
|
+
```tsx live
|
38
|
+
import React from 'react';
|
39
|
+
import { Avatar } from '@salutejs/{{ package }}';
|
40
|
+
|
41
|
+
export function App() {
|
42
|
+
return (
|
43
|
+
<>
|
44
|
+
<Avatar name="Иван Фадеев" />
|
45
|
+
</>
|
46
|
+
);
|
47
|
+
}
|
48
|
+
```
|
49
|
+
|
50
|
+
### Статус аватара
|
51
|
+
Статус задается с помощью свойства `status`. Возможные значения: `"active"`, `"inactive"`.
|
52
|
+
|
53
|
+
```tsx live
|
54
|
+
import React from 'react';
|
55
|
+
import { Avatar } from '@salutejs/{{ package }}';
|
56
|
+
|
57
|
+
export function App() {
|
58
|
+
return (
|
59
|
+
<>
|
60
|
+
<Avatar status="active" name="Иван Фадеев" />
|
61
|
+
<Avatar status="inactive" name="Иван Фадеев" />
|
62
|
+
</>
|
63
|
+
);
|
64
|
+
}
|
65
|
+
```
|
66
|
+
|
67
|
+
### Увеличение при наведении
|
68
|
+
Опциональное свойство `"isScalable"`.
|
69
|
+
|
70
|
+
```tsx live
|
71
|
+
import React from 'react';
|
72
|
+
import { Avatar } from '@salutejs/{{ package }}';
|
73
|
+
|
74
|
+
export function App() {
|
75
|
+
return (
|
76
|
+
<>
|
77
|
+
<Avatar isScalable name="Иван Фадеев" />
|
78
|
+
</>
|
79
|
+
);
|
80
|
+
}
|
81
|
+
```
|
82
|
+
|
83
|
+
### Доступность
|
84
|
+
Добавляем `"role"` и `"tabIndex"`.
|
85
|
+
|
86
|
+
```tsx live
|
87
|
+
import React from 'react';
|
88
|
+
import { Avatar } from '@salutejs/{{ package }}';
|
89
|
+
|
90
|
+
export function App() {
|
91
|
+
return (
|
92
|
+
<>
|
93
|
+
<Avatar role="button" tabIndex="0" name="Иван Фадеев" />
|
94
|
+
</>
|
95
|
+
);
|
96
|
+
}
|
97
|
+
```
|
@@ -0,0 +1,29 @@
|
|
1
|
+
---
|
2
|
+
id: avatarGroup
|
3
|
+
title: AvatarGroup
|
4
|
+
---
|
5
|
+
|
6
|
+
import { PropsTable, Description } from '@site/src/components';
|
7
|
+
|
8
|
+
# AvatarGroup
|
9
|
+
<Description name="AvatarGroup" />
|
10
|
+
<PropsTable name="AvatarGroup" exclude={['css']} />
|
11
|
+
|
12
|
+
AvatarGroup это обертка для Avatar. Принимает в себя группу из avatar's.
|
13
|
+
|
14
|
+
```tsx live
|
15
|
+
import React from 'react';
|
16
|
+
import { Avatar, AvatarGroup } from '@salutejs/{{ package }}';
|
17
|
+
|
18
|
+
export function App() {
|
19
|
+
return (
|
20
|
+
<AvatarGroup>
|
21
|
+
{
|
22
|
+
Array(5).fill(true).map(() => (
|
23
|
+
<Avatar size="xxl" url="https://avatars.githubusercontent.com/u/1813468?v=4" />
|
24
|
+
))
|
25
|
+
}
|
26
|
+
</AvatarGroup>
|
27
|
+
);
|
28
|
+
}
|
29
|
+
```
|
@@ -0,0 +1,131 @@
|
|
1
|
+
---
|
2
|
+
id: badge
|
3
|
+
title: Badge
|
4
|
+
---
|
5
|
+
|
6
|
+
import { PropsTable, Description } from '@site/src/components';
|
7
|
+
|
8
|
+
# Badge
|
9
|
+
<Description name="Badge" />
|
10
|
+
<PropsTable name="Badge" exclude={['css']} />
|
11
|
+
|
12
|
+
## Примеры
|
13
|
+
|
14
|
+
### Размер бейджа
|
15
|
+
Размер задается с помощью свойства `size`.
|
16
|
+
|
17
|
+
Возможные значения свойства: `"l"`, `"m"`, `"s"`.
|
18
|
+
|
19
|
+
```tsx live
|
20
|
+
import React from 'react';
|
21
|
+
import { Badge } from '@salutejs/{{ package }}';
|
22
|
+
|
23
|
+
export function App() {
|
24
|
+
return (
|
25
|
+
<div>
|
26
|
+
<Badge text="Бейдж" size="l" />
|
27
|
+
<Badge text="Бейдж" size="m" />
|
28
|
+
<Badge text="Бейдж" size="s" />
|
29
|
+
</div>
|
30
|
+
);
|
31
|
+
}
|
32
|
+
```
|
33
|
+
|
34
|
+
### Скругленность бейджа
|
35
|
+
Скругленность задается с помощью свойства `pilled`:
|
36
|
+
|
37
|
+
```tsx live
|
38
|
+
import React from 'react';
|
39
|
+
import { Badge } from '@salutejs/{{ package }}';
|
40
|
+
|
41
|
+
export function App() {
|
42
|
+
return (
|
43
|
+
<div>
|
44
|
+
<Badge text="Бейдж" size="l" pilled />
|
45
|
+
<Badge text="Бейдж" size="m" pilled />
|
46
|
+
<Badge text="Бейдж" size="s" pilled />
|
47
|
+
</div>
|
48
|
+
);
|
49
|
+
}
|
50
|
+
```
|
51
|
+
|
52
|
+
### Вид бейджа
|
53
|
+
Вид бейджа задается с помощью свойства `view`. Возможные значения свойства `view`:
|
54
|
+
|
55
|
+
+ `"primary"` – основной бейдж;
|
56
|
+
+ `"accent"` – бейдж акцентного цвета;
|
57
|
+
+ `"positive"` – успешное завершение;
|
58
|
+
+ `"warning"` – предупреждение;
|
59
|
+
+ `"negative"` – ошибка;
|
60
|
+
+ `"dark"` – темный бэйдж;
|
61
|
+
+ `"light"` – светлый бэйдж.
|
62
|
+
|
63
|
+
```tsx live
|
64
|
+
import React from 'react';
|
65
|
+
import { Badge } from '@salutejs/{{ package }}';
|
66
|
+
|
67
|
+
export function App() {
|
68
|
+
return (
|
69
|
+
<div>
|
70
|
+
<Badge text="Бейдж" size="l" view="primary" />
|
71
|
+
<Badge text="Бейдж" size="l" view="accent" />
|
72
|
+
<Badge text="Бейдж" size="l" view="positive" />
|
73
|
+
<Badge text="Бейдж" size="l" view="warning" />
|
74
|
+
<Badge text="Бейдж" size="l" view="negative" />
|
75
|
+
<Badge text="Бейдж" size="l" view="dark" />
|
76
|
+
<Badge text="Бейдж" size="l" view="light" />
|
77
|
+
</div>
|
78
|
+
);
|
79
|
+
}
|
80
|
+
```
|
81
|
+
|
82
|
+
так же на вид бейджа влияет свойство `transparent`:
|
83
|
+
|
84
|
+
```tsx live
|
85
|
+
import React from 'react';
|
86
|
+
import { Badge } from '@salutejs/{{ package }}';
|
87
|
+
|
88
|
+
export function App() {
|
89
|
+
return (
|
90
|
+
<div>
|
91
|
+
<Badge text="Бейдж" size="l" view="primary" transparent />
|
92
|
+
<Badge text="Бейдж" size="l" view="accent" transparent />
|
93
|
+
<Badge text="Бейдж" size="l" view="positive" transparent />
|
94
|
+
<Badge text="Бейдж" size="l" view="warning" transparent />
|
95
|
+
<Badge text="Бейдж" size="l" view="negative" transparent />
|
96
|
+
<Badge text="Бейдж" size="l" view="dark" transparent />
|
97
|
+
<Badge text="Бейдж" size="l" view="light" transparent />
|
98
|
+
</div>
|
99
|
+
);
|
100
|
+
}
|
101
|
+
```
|
102
|
+
|
103
|
+
### Иконка слева / справа
|
104
|
+
В левой и/или правой части бейджа можно отобразить иконку:
|
105
|
+
|
106
|
+
```tsx live
|
107
|
+
import React from 'react';
|
108
|
+
import { Badge } from '@salutejs/{{ package }}';
|
109
|
+
import { IconEye } from '@salutejs/plasma-icons';
|
110
|
+
|
111
|
+
export function App() {
|
112
|
+
return (
|
113
|
+
<div>
|
114
|
+
<Badge
|
115
|
+
text="Бейдж"
|
116
|
+
size="l"
|
117
|
+
view="primary"
|
118
|
+
contentLeft={
|
119
|
+
<IconEye color="inherit" size="xs" />
|
120
|
+
} />
|
121
|
+
<Badge
|
122
|
+
text="Бейдж"
|
123
|
+
size="l"
|
124
|
+
view="primary"
|
125
|
+
contentRight={
|
126
|
+
<IconEye color="inherit" size="xs" />
|
127
|
+
} />
|
128
|
+
</div>
|
129
|
+
);
|
130
|
+
}
|
131
|
+
```
|
@@ -0,0 +1,162 @@
|
|
1
|
+
---
|
2
|
+
id: button
|
3
|
+
title: Button
|
4
|
+
---
|
5
|
+
|
6
|
+
import { PropsTable, Description } from '@site/src/components';
|
7
|
+
|
8
|
+
# Button
|
9
|
+
Кнопки могут отображаться в нескольких размерах и цветах, могут содержать текст и/или иконку.
|
10
|
+
|
11
|
+
## Button
|
12
|
+
<Description name="Button" />
|
13
|
+
<PropsTable name="Button" />
|
14
|
+
|
15
|
+
## Использование
|
16
|
+
Компонент `Button` может содержать текст, который указывается в
|
17
|
+
свойстве `text`, или любой контент напрямую через `children`.
|
18
|
+
|
19
|
+
Свойство text можно использовать вместе со свойствами `contentLeft` и `contentRight`.
|
20
|
+
С их помощью можно размещать **иконку** слева или справа от текста.
|
21
|
+
|
22
|
+
```tsx live
|
23
|
+
import React from 'react';
|
24
|
+
import { Button } from '@salutejs/{{package}}';
|
25
|
+
import { IconDownload } from '@salutejs/plasma-icons';
|
26
|
+
|
27
|
+
export function App() {
|
28
|
+
return (
|
29
|
+
<div>
|
30
|
+
<Button text="Текст" />
|
31
|
+
|
32
|
+
<Button text="Текст" contentLeft={<IconDownload />} />
|
33
|
+
|
34
|
+
<Button text="Текст" contentRight={<IconDownload />} />
|
35
|
+
|
36
|
+
<Button contentLeft={<IconDownload />} />
|
37
|
+
|
38
|
+
<Button text="Текст" isLoading />
|
39
|
+
|
40
|
+
<Button text="Текст" isLoading loader={<div>Loader...</div>} />
|
41
|
+
|
42
|
+
<Button>
|
43
|
+
<IconDownload />
|
44
|
+
<span>Текст</span>
|
45
|
+
</Button>
|
46
|
+
</div>
|
47
|
+
);
|
48
|
+
}
|
49
|
+
```
|
50
|
+
|
51
|
+
## Примеры
|
52
|
+
|
53
|
+
### Размер кнопки
|
54
|
+
Размер кнопки задается с помощью свойства `size`. Возможные значения свойства: `"l"`, `"m"` или `"s"`:
|
55
|
+
|
56
|
+
```tsx live
|
57
|
+
import React from 'react';
|
58
|
+
import { Button } from '@salutejs/{{package}}';
|
59
|
+
|
60
|
+
export function App() {
|
61
|
+
return (
|
62
|
+
<div>
|
63
|
+
<Button text="Button" size="l" />
|
64
|
+
<Button text="Button" size="m" />
|
65
|
+
<Button text="Button" size="s" />
|
66
|
+
</div>
|
67
|
+
);
|
68
|
+
}
|
69
|
+
```
|
70
|
+
|
71
|
+
### Вид кнопки
|
72
|
+
Вид кнопки задается с помощью свойства `view`. Возможные значения свойства `view`:
|
73
|
+
+ `"primary"` – основная;
|
74
|
+
+ `"secondary"` – вторичная;
|
75
|
+
+ `"success"` – успешное завершение;
|
76
|
+
+ `"warning"` – предупреждение;
|
77
|
+
+ `"critical"` – ошибка;
|
78
|
+
+ `"checked"` – выбранное состояние;
|
79
|
+
+ `"clear"` – без цветового сопровождения.
|
80
|
+
|
81
|
+
```tsx live
|
82
|
+
import React from 'react';
|
83
|
+
import { Button } from '@salutejs/{{package}}';
|
84
|
+
|
85
|
+
export function App() {
|
86
|
+
return (
|
87
|
+
<div>
|
88
|
+
<Button text="Кнопка" size="s" view="primary" />
|
89
|
+
<Button text="Кнопка" size="s" view="secondary" />
|
90
|
+
<Button text="Кнопка" size="s" view="success" />
|
91
|
+
<Button text="Кнопка" size="s" view="warning" />
|
92
|
+
<Button text="Кнопка" size="s" view="critical" />
|
93
|
+
<Button text="Кнопка" size="s" view="checked" />
|
94
|
+
<Button text="Кнопка" size="s" view="overlay" />
|
95
|
+
<Button text="Кнопка" size="s" view="clear" />
|
96
|
+
</div>
|
97
|
+
);
|
98
|
+
}
|
99
|
+
```
|
100
|
+
|
101
|
+
### Границы кнопки
|
102
|
+
Границы кнопки задаются с помощью свойства `pin`. Возможные значения свойства `pin`:
|
103
|
+
+ `square` – обычное скругление;
|
104
|
+
+ `circle` – сильное скругление;
|
105
|
+
+ `clear` – нет скругления.
|
106
|
+
|
107
|
+
```tsx live
|
108
|
+
import React from 'react';
|
109
|
+
import { Button } from '@salutejs/{{package}}';
|
110
|
+
|
111
|
+
export function App() {
|
112
|
+
return (
|
113
|
+
<div>
|
114
|
+
<Button pin="square-square">Button</Button>
|
115
|
+
<Button pin="square-clear">Button</Button>
|
116
|
+
<Button pin="clear-square">Button</Button>
|
117
|
+
<Button pin="clear-clear">Button</Button>
|
118
|
+
<Button pin="clear-circle">Button</Button>
|
119
|
+
<Button pin="circle-clear">Button</Button>
|
120
|
+
<Button pin="circle-circle">Button</Button>
|
121
|
+
</div>
|
122
|
+
);
|
123
|
+
}
|
124
|
+
```
|
125
|
+
|
126
|
+
### Квадратные и круглые кнопки
|
127
|
+
Для отображения иконок и/или текста в квадратных или круглых кнопках с **равными сторонами**,
|
128
|
+
используйте компонент `Button` и свойство `contentLeft`, в которое требуется передать нужное значение.
|
129
|
+
|
130
|
+
По умолчанию границы кнопки **квадратные** (со скругленными углами) — `pin="square-square"`.
|
131
|
+
**Круглые** границы кнопки можно сделать с помощью свойства `pin` со значением `"circle-circle"`.
|
132
|
+
|
133
|
+
```tsx live
|
134
|
+
import React from 'react';
|
135
|
+
import { Button } from '@salutejs/{{package}}';
|
136
|
+
import { IconDownload } from '@salutejs/plasma-icons';
|
137
|
+
|
138
|
+
export function App() {
|
139
|
+
return (
|
140
|
+
<div>
|
141
|
+
<Button contentLeft={<IconDownload />} />
|
142
|
+
|
143
|
+
<Button contentLeft={<IconDownload />} pin="circle-circle" />
|
144
|
+
</div>
|
145
|
+
);
|
146
|
+
}
|
147
|
+
```
|
148
|
+
|
149
|
+
### Гиперссылка
|
150
|
+
Компонент поддерживает вывод в виде тега `<a>`, для этого необходимо указать свойство `as`:
|
151
|
+
|
152
|
+
```tsx live
|
153
|
+
import React from 'react';
|
154
|
+
import { Button } from '@salutejs/{{package}}';
|
155
|
+
import { IconDownload } from '@salutejs/plasma-icons';
|
156
|
+
|
157
|
+
export function App() {
|
158
|
+
return (
|
159
|
+
<Button as="a" text="Гиперссылка" />
|
160
|
+
);
|
161
|
+
}
|
162
|
+
```
|