@salutejs/plasma-new-hope 0.76.2-canary.1179.8707316396.0 → 0.76.2-canary.1180.8703198104.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Avatar/Avatar.js +15 -1
- package/cjs/components/Avatar/Avatar.js.map +1 -1
- package/cjs/components/Chip/Chip.css +0 -2
- package/cjs/components/Chip/Chip.js +2 -14
- package/cjs/components/Chip/Chip.js.map +1 -1
- package/cjs/components/Chip/Chip.tokens.js +0 -5
- package/cjs/components/Chip/Chip.tokens.js.map +1 -1
- package/cjs/components/Combobox/Combobox.css +0 -2
- package/cjs/components/Combobox/ui/ComboboxChip/ComboboxChip.css +0 -2
- package/cjs/components/Combobox/ui/ComboboxTarget/ComboboxTarget.css +0 -2
- package/cjs/components/Pagination/Pagination.css +0 -2
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +0 -2
- package/cjs/components/Select/Select.css +0 -2
- package/cjs/components/Select/ui/SelectChip/SelectChip.css +0 -2
- package/cjs/components/Select/ui/SelectTarget/SelectTarget.css +0 -2
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.css +0 -2
- package/cjs/index.css +0 -2
- package/es/components/Avatar/Avatar.js +15 -1
- package/es/components/Avatar/Avatar.js.map +1 -1
- package/es/components/Chip/Chip.css +0 -2
- package/es/components/Chip/Chip.js +3 -15
- package/es/components/Chip/Chip.js.map +1 -1
- package/es/components/Chip/Chip.tokens.js +1 -5
- package/es/components/Chip/Chip.tokens.js.map +1 -1
- package/es/components/Combobox/Combobox.css +0 -2
- package/es/components/Combobox/ui/ComboboxChip/ComboboxChip.css +0 -2
- package/es/components/Combobox/ui/ComboboxTarget/ComboboxTarget.css +0 -2
- package/es/components/Pagination/Pagination.css +0 -2
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +0 -2
- package/es/components/Select/Select.css +0 -2
- package/es/components/Select/ui/SelectChip/SelectChip.css +0 -2
- package/es/components/Select/ui/SelectTarget/SelectTarget.css +0 -2
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.css +0 -2
- package/es/index.css +0 -2
- package/package.json +2 -2
- package/styled-components/cjs/components/Avatar/Avatar.js +15 -1
- package/styled-components/cjs/components/Chip/Chip.js +2 -14
- package/styled-components/cjs/components/Chip/Chip.template-doc.mdx +2 -2
- package/styled-components/cjs/components/Chip/Chip.tokens.js +1 -5
- package/styled-components/cjs/examples/plasma_b2c/components/Avatar/Avatar.stories.tsx +1 -0
- package/styled-components/cjs/examples/plasma_b2c/components/AvatarGroup/AvatarGroup.stories.tsx +36 -18
- package/styled-components/cjs/examples/plasma_b2c/components/Chip/Chip.config.js +7 -10
- package/styled-components/cjs/examples/plasma_b2c/components/Chip/Chip.stories.tsx +2 -18
- package/styled-components/cjs/examples/plasma_web/components/Chip/Chip.config.js +7 -10
- package/styled-components/cjs/examples/plasma_web/components/Chip/Chip.stories.tsx +2 -18
- package/styled-components/es/components/Avatar/Avatar.js +15 -1
- package/styled-components/es/components/Chip/Chip.js +3 -15
- package/styled-components/es/components/Chip/Chip.template-doc.mdx +2 -2
- package/styled-components/es/components/Chip/Chip.tokens.js +0 -4
- package/styled-components/es/examples/plasma_b2c/components/Avatar/Avatar.stories.tsx +1 -0
- package/styled-components/es/examples/plasma_b2c/components/AvatarGroup/AvatarGroup.stories.tsx +36 -18
- package/styled-components/es/examples/plasma_b2c/components/Chip/Chip.config.js +7 -10
- package/styled-components/es/examples/plasma_b2c/components/Chip/Chip.stories.tsx +2 -18
- package/styled-components/es/examples/plasma_web/components/Chip/Chip.config.js +7 -10
- package/styled-components/es/examples/plasma_web/components/Chip/Chip.stories.tsx +2 -18
- package/types/components/Avatar/Avatar.d.ts.map +1 -1
- package/types/components/Chip/Chip.d.ts +0 -4
- package/types/components/Chip/Chip.d.ts.map +1 -1
- package/types/components/Chip/Chip.tokens.d.ts +0 -4
- package/types/components/Chip/Chip.tokens.d.ts.map +1 -1
- package/types/components/Chip/Chip.types.d.ts +0 -6
- package/types/components/Chip/Chip.types.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Chip/Chip.config.d.ts +1 -4
- package/types/examples/plasma_b2c/components/Chip/Chip.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Chip/Chip.d.ts +1 -4
- package/types/examples/plasma_b2c/components/Chip/Chip.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Chip/Chip.config.d.ts +1 -4
- package/types/examples/plasma_web/components/Chip/Chip.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Chip/Chip.d.ts +1 -4
- package/types/examples/plasma_web/components/Chip/Chip.d.ts.map +1 -1
- package/cjs/components/Chip/variations/_pilled/base.js +0 -9
- package/cjs/components/Chip/variations/_pilled/base.js.map +0 -1
- package/cjs/components/Chip/variations/_pilled/base_3kce4h.css +0 -1
- package/es/components/Chip/variations/_pilled/base.js +0 -5
- package/es/components/Chip/variations/_pilled/base.js.map +0 -1
- package/es/components/Chip/variations/_pilled/base_3kce4h.css +0 -1
- package/styled-components/cjs/components/Chip/variations/_pilled/base.js +0 -9
- package/styled-components/cjs/components/Chip/variations/_pilled/tokens.json +0 -4
- package/styled-components/es/components/Chip/variations/_pilled/base.js +0 -3
- package/styled-components/es/components/Chip/variations/_pilled/tokens.json +0 -4
- package/types/components/Chip/variations/_pilled/base.d.ts +0 -2
- package/types/components/Chip/variations/_pilled/base.d.ts.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Chip.js","sources":["../../../src/components/Chip/Chip.tsx"],"sourcesContent":["import React, { forwardRef, useMemo } from 'react';\n\nimport type { RootProps } from '../../engines';\nimport { IconClose } from '../_Icon/Icons/IconClose';\
|
1
|
+
{"version":3,"file":"Chip.js","sources":["../../../src/components/Chip/Chip.tsx"],"sourcesContent":["import React, { forwardRef, useMemo } from 'react';\n\nimport type { RootProps } from '../../engines';\nimport { IconClose } from '../_Icon/Icons/IconClose';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { base as readonlyCSS } from './variations/_readonly/base';\nimport { base as focusedCSS } from './variations/_focused/base';\nimport type { ChipProps } from './Chip.types';\nimport { StyledContentClear, StyledContentLeft, StyledContentMain, StyledContentRight, base } from './Chip.styles';\nimport { tokens } from './Chip.tokens';\n\nexport const chipRoot = (Root: RootProps<HTMLButtonElement, ChipProps>) =>\n forwardRef<HTMLButtonElement, ChipProps>((props, ref) => {\n const {\n children,\n text,\n contentLeft,\n contentRight,\n contentClearButton,\n size,\n onClear,\n onClick,\n readOnly = false,\n disabled = false,\n ...rest\n } = props;\n\n const txt = !text && typeof children === 'string' ? children : text;\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n if (disabled || readOnly) {\n return;\n }\n\n onClick?.(event);\n onClear?.();\n };\n\n const ClearContent = useMemo(() => {\n return (\n contentClearButton || (\n <StyledContentClear>\n <IconClose sizeCustomProperty={tokens.closeIconSize} color=\"inherit\" />\n </StyledContentClear>\n )\n );\n }, [contentClearButton, tokens.closeIconSize]);\n\n return (\n <Root\n type=\"button\"\n ref={ref}\n tabIndex={readOnly ? -1 : 0}\n onClick={handleClick}\n disabled={disabled}\n readOnly={!disabled && readOnly}\n size={size}\n {...rest}\n >\n {contentLeft && <StyledContentLeft>{contentLeft}</StyledContentLeft>}\n {txt ? <StyledContentMain>{txt}</StyledContentMain> : children}\n {contentRight && <StyledContentRight>{contentRight}</StyledContentRight>}\n {ClearContent}\n </Root>\n );\n });\n\nexport const chipConfig = {\n name: 'Chip',\n tag: 'button',\n layout: chipRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n readOnly: {\n css: readonlyCSS,\n attrs: true,\n },\n focused: {\n css: focusedCSS,\n },\n },\n defaults: {\n view: 'primary',\n size: 'm',\n },\n};\n"],"names":["chipRoot","Root","forwardRef","props","ref","children","text","contentLeft","contentRight","contentClearButton","size","onClear","onClick","_props$readOnly","readOnly","_props$disabled","disabled","rest","_objectWithoutProperties","_excluded","txt","handleClick","event","ClearContent","useMemo","React","createElement","StyledContentClear","IconClose","sizeCustomProperty","tokens","closeIconSize","color","_extends","type","tabIndex","StyledContentLeft","StyledContentMain","StyledContentRight","chipConfig","name","tag","layout","base","variations","view","css","viewCSS","sizeCSS","disabledCSS","attrs","readonlyCSS","focused","focusedCSS","defaults"],"mappings":";;;;;;;;;;;;IAcaA,QAAQ,GAAG,SAAXA,QAAQA,CAAIC,IAA6C,EAAA;AAAA,EAAA,oBAClEC,UAAU,CAA+B,UAACC,KAAK,EAAEC,GAAG,EAAK;AACrD,IAAA,IACIC,QAAQ,GAWRF,KAAK,CAXLE,QAAQ;MACRC,IAAI,GAUJH,KAAK,CAVLG,IAAI;MACJC,WAAW,GASXJ,KAAK,CATLI,WAAW;MACXC,YAAY,GAQZL,KAAK,CARLK,YAAY;MACZC,kBAAkB,GAOlBN,KAAK,CAPLM,kBAAkB;MAClBC,IAAI,GAMJP,KAAK,CANLO,IAAI;MACJC,OAAO,GAKPR,KAAK,CALLQ,OAAO;MACPC,OAAO,GAIPT,KAAK,CAJLS,OAAO;MAAAC,eAAA,GAIPV,KAAK,CAHLW,QAAQ;AAARA,MAAAA,QAAQ,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,eAAA;MAAAE,eAAA,GAGhBZ,KAAK,CAFLa,QAAQ;AAARA,MAAAA,QAAQ,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,eAAA;AACbE,MAAAA,IAAI,GAAAC,wBAAA,CACPf,KAAK,EAAAgB,SAAA,CAAA,CAAA;AAET,IAAA,IAAMC,GAAG,GAAG,CAACd,IAAI,IAAI,OAAOD,QAAQ,KAAK,QAAQ,GAAGA,QAAQ,GAAGC,IAAI,CAAA;AAEnE,IAAA,IAAMe,WAAW,GAAG,SAAdA,WAAWA,CAAIC,KAA0C,EAAK;MAChE,IAAIN,QAAQ,IAAIF,QAAQ,EAAE;AACtB,QAAA,OAAA;AACJ,OAAA;AAEAF,MAAAA,OAAO,aAAPA,OAAO,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAPA,OAAO,CAAGU,KAAK,CAAC,CAAA;AAChBX,MAAAA,OAAO,KAAPA,IAAAA,IAAAA,OAAO,KAAPA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,OAAO,EAAI,CAAA;KACd,CAAA;AAED,IAAA,IAAMY,YAAY,GAAGC,OAAO,CAAC,YAAM;AAC/B,MAAA,OACIf,kBAAkB,iBACdgB,KAAA,CAAAC,aAAA,CAACC,kBAAkB,EAAA,IAAA,eACfF,KAAA,CAAAC,aAAA,CAACE,SAAS,EAAA;QAACC,kBAAkB,EAAEC,MAAM,CAACC,aAAc;AAACC,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CACtD,CACvB,CAAA;KAER,EAAE,CAACvB,kBAAkB,EAAEqB,MAAM,CAACC,aAAa,CAAC,CAAC,CAAA;AAE9C,IAAA,oBACIN,KAAA,CAAAC,aAAA,CAACzB,IAAI,EAAAgC,QAAA,CAAA;AACDC,MAAAA,IAAI,EAAC,QAAQ;AACb9B,MAAAA,GAAG,EAAEA,GAAI;AACT+B,MAAAA,QAAQ,EAAErB,QAAQ,GAAG,CAAC,CAAC,GAAG,CAAE;AAC5BF,MAAAA,OAAO,EAAES,WAAY;AACrBL,MAAAA,QAAQ,EAAEA,QAAS;AACnBF,MAAAA,QAAQ,EAAE,CAACE,QAAQ,IAAIF,QAAS;AAChCJ,MAAAA,IAAI,EAAEA,IAAAA;AAAK,KAAA,EACPO,IAAI,CAEPV,EAAAA,WAAW,iBAAIkB,KAAA,CAAAC,aAAA,CAACU,iBAAiB,EAAA,IAAA,EAAE7B,WAA+B,CAAC,EACnEa,GAAG,gBAAGK,KAAA,CAAAC,aAAA,CAACW,iBAAiB,EAAA,IAAA,EAAEjB,GAAuB,CAAC,GAAGf,QAAQ,EAC7DG,YAAY,iBAAIiB,KAAA,CAAAC,aAAA,CAACY,kBAAkB,EAAA,IAAA,EAAE9B,YAAiC,CAAC,EACvEe,YACC,CAAC,CAAA;AAEf,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAMgB,UAAU,GAAG;AACtBC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,GAAG,EAAE,QAAQ;AACbC,EAAAA,MAAM,EAAE1C,QAAQ;AAChB2C,EAAAA,IAAI,EAAJA,IAAI;AACJC,EAAAA,UAAU,EAAE;AACRC,IAAAA,IAAI,EAAE;AACFC,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACDrC,IAAAA,IAAI,EAAE;AACFoC,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACDhC,IAAAA,QAAQ,EAAE;AACN8B,MAAAA,GAAG,EAAEG,MAAW;AAChBC,MAAAA,KAAK,EAAE,IAAA;KACV;AACDpC,IAAAA,QAAQ,EAAE;AACNgC,MAAAA,GAAG,EAAEK,MAAW;AAChBD,MAAAA,KAAK,EAAE,IAAA;KACV;AACDE,IAAAA,OAAO,EAAE;AACLN,MAAAA,GAAG,EAAEO,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNT,IAAAA,IAAI,EAAE,SAAS;AACfnC,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
|
@@ -1,6 +1,3 @@
|
|
1
|
-
var classes = {
|
2
|
-
pilled: 'chip-pilled'
|
3
|
-
};
|
4
1
|
var tokens = {
|
5
2
|
background: '--plasma-chip-background',
|
6
3
|
color: '--plasma-chip-color',
|
@@ -18,7 +15,6 @@ var tokens = {
|
|
18
15
|
outlineSize: '--plasma-chip-outline-size',
|
19
16
|
closeIconColor: '--plasma-chip-close-icon-color',
|
20
17
|
borderRadius: '--plasma-chip-border-radius',
|
21
|
-
pilledBorderRadius: '--plasma-chip-pilled-border-radius',
|
22
18
|
width: '--plasma-chip-width',
|
23
19
|
height: '--plasma-chip-height',
|
24
20
|
paddingTop: '--plasma-chip-padding-top',
|
@@ -41,5 +37,5 @@ var tokens = {
|
|
41
37
|
clearContentMarginRight: '--plasma-chip-clear-content-margin-right'
|
42
38
|
};
|
43
39
|
|
44
|
-
export {
|
40
|
+
export { tokens };
|
45
41
|
//# sourceMappingURL=Chip.tokens.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Chip.tokens.js","sources":["../../../src/components/Chip/Chip.tokens.ts"],"sourcesContent":["export const
|
1
|
+
{"version":3,"file":"Chip.tokens.js","sources":["../../../src/components/Chip/Chip.tokens.ts"],"sourcesContent":["export const tokens = {\n background: '--plasma-chip-background',\n color: '--plasma-chip-color',\n backgroundHover: '--plasma-chip-background-hover',\n colorHover: '--plasma-chip-color-hover',\n scaleHover: '--plasma-chip-scale-hover',\n backgroundReadOnly: '--plasma-chip-background-readonly',\n colorReadOnly: '--plasma-chip-color-readonly',\n backgroundReadOnlyHover: '--plasma-chip-background-readonly-hover',\n colorReadOnlyHover: '--plasma-chip-color-readonly-hover',\n backgroundActive: '--plasma-chip-background-active',\n colorActive: '--plasma-chip-color-active',\n scaleActive: '--plasma-chip-scale-active',\n focusColor: '--plasma-chip-focus-color',\n outlineSize: '--plasma-chip-outline-size',\n closeIconColor: '--plasma-chip-close-icon-color',\n\n borderRadius: '--plasma-chip-border-radius',\n width: '--plasma-chip-width',\n height: '--plasma-chip-height',\n paddingTop: '--plasma-chip-padding-top',\n paddingRight: '--plasma-chip-padding-right',\n paddingBottom: '--plasma-chip-padding-bottom',\n paddingLeft: '--plasma-chip-padding-left',\n closeIconSize: '--plasma-chip-close-icon-size',\n\n disabledOpacity: '--plasma-chip-disabled-opacity',\n\n fontFamily: '--plasma-chip-font-family',\n fontSize: '--plasma-chip-font-size',\n fontStyle: '--plasma-chip-font-style',\n fontWeight: '--plasma-chip-font-weight',\n letterSpacing: '--plasma-chip-letter-spacing',\n lineHeight: '--plasma-chip-lineheight',\n\n leftContentMarginLeft: '--plasma-chip-left-content-margin-left',\n leftContentMarginRight: '--plasma-chip-left-content-margin-right',\n rightContentMarginLeft: '--plasma-chip-right-content-margin-left',\n rightContentMarginRight: '--plasma-chip-right-content-margin-right',\n clearContentMarginLeft: '--plasma-chip-clear-content-margin-left',\n clearContentMarginRight: '--plasma-chip-clear-content-margin-right',\n};\n"],"names":["tokens","background","color","backgroundHover","colorHover","scaleHover","backgroundReadOnly","colorReadOnly","backgroundReadOnlyHover","colorReadOnlyHover","backgroundActive","colorActive","scaleActive","focusColor","outlineSize","closeIconColor","borderRadius","width","height","paddingTop","paddingRight","paddingBottom","paddingLeft","closeIconSize","disabledOpacity","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","leftContentMarginLeft","leftContentMarginRight","rightContentMarginLeft","rightContentMarginRight","clearContentMarginLeft","clearContentMarginRight"],"mappings":"AAAO,IAAMA,MAAM,GAAG;AAClBC,EAAAA,UAAU,EAAE,0BAA0B;AACtCC,EAAAA,KAAK,EAAE,qBAAqB;AAC5BC,EAAAA,eAAe,EAAE,gCAAgC;AACjDC,EAAAA,UAAU,EAAE,2BAA2B;AACvCC,EAAAA,UAAU,EAAE,2BAA2B;AACvCC,EAAAA,kBAAkB,EAAE,mCAAmC;AACvDC,EAAAA,aAAa,EAAE,8BAA8B;AAC7CC,EAAAA,uBAAuB,EAAE,yCAAyC;AAClEC,EAAAA,kBAAkB,EAAE,oCAAoC;AACxDC,EAAAA,gBAAgB,EAAE,iCAAiC;AACnDC,EAAAA,WAAW,EAAE,4BAA4B;AACzCC,EAAAA,WAAW,EAAE,4BAA4B;AACzCC,EAAAA,UAAU,EAAE,2BAA2B;AACvCC,EAAAA,WAAW,EAAE,4BAA4B;AACzCC,EAAAA,cAAc,EAAE,gCAAgC;AAEhDC,EAAAA,YAAY,EAAE,6BAA6B;AAC3CC,EAAAA,KAAK,EAAE,qBAAqB;AAC5BC,EAAAA,MAAM,EAAE,sBAAsB;AAC9BC,EAAAA,UAAU,EAAE,2BAA2B;AACvCC,EAAAA,YAAY,EAAE,6BAA6B;AAC3CC,EAAAA,aAAa,EAAE,8BAA8B;AAC7CC,EAAAA,WAAW,EAAE,4BAA4B;AACzCC,EAAAA,aAAa,EAAE,+BAA+B;AAE9CC,EAAAA,eAAe,EAAE,gCAAgC;AAEjDC,EAAAA,UAAU,EAAE,2BAA2B;AACvCC,EAAAA,QAAQ,EAAE,yBAAyB;AACnCC,EAAAA,SAAS,EAAE,0BAA0B;AACrCC,EAAAA,UAAU,EAAE,2BAA2B;AACvCC,EAAAA,aAAa,EAAE,8BAA8B;AAC7CC,EAAAA,UAAU,EAAE,0BAA0B;AAEtCC,EAAAA,qBAAqB,EAAE,wCAAwC;AAC/DC,EAAAA,sBAAsB,EAAE,yCAAyC;AACjEC,EAAAA,sBAAsB,EAAE,yCAAyC;AACjEC,EAAAA,uBAAuB,EAAE,0CAA0C;AACnEC,EAAAA,sBAAsB,EAAE,yCAAyC;AACjEC,EAAAA,uBAAuB,EAAE,0CAAA;AAC7B;;;;"}
|
@@ -35,8 +35,6 @@
|
|
35
35
|
|
36
36
|
.base_kgtz8x_b16hf96__46a206b1{--plasma_private-chip-outline-size:var(--plasma-chip-outline-size,0.125rem);position:relative;}.base_kgtz8x_b16hf96__46a206b1:focus{outline:none;}.base_kgtz8x_b16hf96__46a206b1::before{content:'';position:absolute;top:calc(-1 * var(--plasma_private-chip-outline-size));left:calc(-1 * var(--plasma_private-chip-outline-size));right:calc(-1 * var(--plasma_private-chip-outline-size));bottom:calc(-1 * var(--plasma_private-chip-outline-size));z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-chip-outline-size) solid transparent;border-radius:calc(var(--plasma-chip-border-radius) + var(--plasma_private-chip-outline-size));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_kgtz8x_b16hf96__46a206b1.base_kgtz8x_focusVisible__46a206b1:focus::before,.base_kgtz8x_b16hf96__46a206b1[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-chip-outline-size) var(--plasma-chip-focus-color);}
|
37
37
|
|
38
|
-
.base_3kce4h_bvcavwi__c6ad5ca5.base_3kce4h_chipPilled__c6ad5ca5{border-radius:var(--plasma-chip-pilled-border-radius);}
|
39
|
-
|
40
38
|
.Chip_styles_1mwwhiw_bol5daj__07da4d18{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);}
|
41
39
|
.Chip_styles_1mwwhiw_sj20on5__07da4d18{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-left-content-margin-left);margin-right:var(--plasma-chip-left-content-margin-right);}
|
42
40
|
.Chip_styles_1mwwhiw_s1ror4o9__07da4d18{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
@@ -10,8 +10,6 @@
|
|
10
10
|
|
11
11
|
.base_kgtz8x_b16hf96__46a206b1{--plasma_private-chip-outline-size:var(--plasma-chip-outline-size,0.125rem);position:relative;}.base_kgtz8x_b16hf96__46a206b1:focus{outline:none;}.base_kgtz8x_b16hf96__46a206b1::before{content:'';position:absolute;top:calc(-1 * var(--plasma_private-chip-outline-size));left:calc(-1 * var(--plasma_private-chip-outline-size));right:calc(-1 * var(--plasma_private-chip-outline-size));bottom:calc(-1 * var(--plasma_private-chip-outline-size));z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-chip-outline-size) solid transparent;border-radius:calc(var(--plasma-chip-border-radius) + var(--plasma_private-chip-outline-size));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_kgtz8x_b16hf96__46a206b1.base_kgtz8x_focusVisible__46a206b1:focus::before,.base_kgtz8x_b16hf96__46a206b1[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-chip-outline-size) var(--plasma-chip-focus-color);}
|
12
12
|
|
13
|
-
.base_3kce4h_bvcavwi__c6ad5ca5.base_3kce4h_chipPilled__c6ad5ca5{border-radius:var(--plasma-chip-pilled-border-radius);}
|
14
|
-
|
15
13
|
.Chip_styles_1mwwhiw_bol5daj__07da4d18{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);}
|
16
14
|
.Chip_styles_1mwwhiw_sj20on5__07da4d18{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-left-content-margin-left);margin-right:var(--plasma-chip-left-content-margin-right);}
|
17
15
|
.Chip_styles_1mwwhiw_s1ror4o9__07da4d18{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
@@ -8,8 +8,6 @@
|
|
8
8
|
|
9
9
|
.base_kgtz8x_b16hf96__46a206b1{--plasma_private-chip-outline-size:var(--plasma-chip-outline-size,0.125rem);position:relative;}.base_kgtz8x_b16hf96__46a206b1:focus{outline:none;}.base_kgtz8x_b16hf96__46a206b1::before{content:'';position:absolute;top:calc(-1 * var(--plasma_private-chip-outline-size));left:calc(-1 * var(--plasma_private-chip-outline-size));right:calc(-1 * var(--plasma_private-chip-outline-size));bottom:calc(-1 * var(--plasma_private-chip-outline-size));z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-chip-outline-size) solid transparent;border-radius:calc(var(--plasma-chip-border-radius) + var(--plasma_private-chip-outline-size));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_kgtz8x_b16hf96__46a206b1.base_kgtz8x_focusVisible__46a206b1:focus::before,.base_kgtz8x_b16hf96__46a206b1[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-chip-outline-size) var(--plasma-chip-focus-color);}
|
10
10
|
|
11
|
-
.base_3kce4h_bvcavwi__c6ad5ca5.base_3kce4h_chipPilled__c6ad5ca5{border-radius:var(--plasma-chip-pilled-border-radius);}
|
12
|
-
|
13
11
|
.Chip_styles_1mwwhiw_bol5daj__07da4d18{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);}
|
14
12
|
.Chip_styles_1mwwhiw_sj20on5__07da4d18{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-left-content-margin-left);margin-right:var(--plasma-chip-left-content-margin-right);}
|
15
13
|
.Chip_styles_1mwwhiw_s1ror4o9__07da4d18{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
@@ -102,8 +102,6 @@
|
|
102
102
|
|
103
103
|
.base_kgtz8x_b16hf96__46a206b1{--plasma_private-chip-outline-size:var(--plasma-chip-outline-size,0.125rem);position:relative;}.base_kgtz8x_b16hf96__46a206b1:focus{outline:none;}.base_kgtz8x_b16hf96__46a206b1::before{content:'';position:absolute;top:calc(-1 * var(--plasma_private-chip-outline-size));left:calc(-1 * var(--plasma_private-chip-outline-size));right:calc(-1 * var(--plasma_private-chip-outline-size));bottom:calc(-1 * var(--plasma_private-chip-outline-size));z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-chip-outline-size) solid transparent;border-radius:calc(var(--plasma-chip-border-radius) + var(--plasma_private-chip-outline-size));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_kgtz8x_b16hf96__46a206b1.base_kgtz8x_focusVisible__46a206b1:focus::before,.base_kgtz8x_b16hf96__46a206b1[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-chip-outline-size) var(--plasma-chip-focus-color);}
|
104
104
|
|
105
|
-
.base_3kce4h_bvcavwi__c6ad5ca5.base_3kce4h_chipPilled__c6ad5ca5{border-radius:var(--plasma-chip-pilled-border-radius);}
|
106
|
-
|
107
105
|
.Chip_styles_1mwwhiw_bol5daj__07da4d18{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);}
|
108
106
|
.Chip_styles_1mwwhiw_sj20on5__07da4d18{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-left-content-margin-left);margin-right:var(--plasma-chip-left-content-margin-right);}
|
109
107
|
.Chip_styles_1mwwhiw_s1ror4o9__07da4d18{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
@@ -47,8 +47,6 @@
|
|
47
47
|
|
48
48
|
.base_kgtz8x_b16hf96__46a206b1{--plasma_private-chip-outline-size:var(--plasma-chip-outline-size,0.125rem);position:relative;}.base_kgtz8x_b16hf96__46a206b1:focus{outline:none;}.base_kgtz8x_b16hf96__46a206b1::before{content:'';position:absolute;top:calc(-1 * var(--plasma_private-chip-outline-size));left:calc(-1 * var(--plasma_private-chip-outline-size));right:calc(-1 * var(--plasma_private-chip-outline-size));bottom:calc(-1 * var(--plasma_private-chip-outline-size));z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-chip-outline-size) solid transparent;border-radius:calc(var(--plasma-chip-border-radius) + var(--plasma_private-chip-outline-size));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_kgtz8x_b16hf96__46a206b1.base_kgtz8x_focusVisible__46a206b1:focus::before,.base_kgtz8x_b16hf96__46a206b1[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-chip-outline-size) var(--plasma-chip-focus-color);}
|
49
49
|
|
50
|
-
.base_3kce4h_bvcavwi__c6ad5ca5.base_3kce4h_chipPilled__c6ad5ca5{border-radius:var(--plasma-chip-pilled-border-radius);}
|
51
|
-
|
52
50
|
.Chip_styles_1mwwhiw_bol5daj__07da4d18{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);}
|
53
51
|
.Chip_styles_1mwwhiw_sj20on5__07da4d18{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-left-content-margin-left);margin-right:var(--plasma-chip-left-content-margin-right);}
|
54
52
|
.Chip_styles_1mwwhiw_s1ror4o9__07da4d18{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
@@ -35,8 +35,6 @@
|
|
35
35
|
|
36
36
|
.base_kgtz8x_b16hf96__46a206b1{--plasma_private-chip-outline-size:var(--plasma-chip-outline-size,0.125rem);position:relative;}.base_kgtz8x_b16hf96__46a206b1:focus{outline:none;}.base_kgtz8x_b16hf96__46a206b1::before{content:'';position:absolute;top:calc(-1 * var(--plasma_private-chip-outline-size));left:calc(-1 * var(--plasma_private-chip-outline-size));right:calc(-1 * var(--plasma_private-chip-outline-size));bottom:calc(-1 * var(--plasma_private-chip-outline-size));z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-chip-outline-size) solid transparent;border-radius:calc(var(--plasma-chip-border-radius) + var(--plasma_private-chip-outline-size));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_kgtz8x_b16hf96__46a206b1.base_kgtz8x_focusVisible__46a206b1:focus::before,.base_kgtz8x_b16hf96__46a206b1[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-chip-outline-size) var(--plasma-chip-focus-color);}
|
37
37
|
|
38
|
-
.base_3kce4h_bvcavwi__c6ad5ca5.base_3kce4h_chipPilled__c6ad5ca5{border-radius:var(--plasma-chip-pilled-border-radius);}
|
39
|
-
|
40
38
|
.Chip_styles_1mwwhiw_bol5daj__07da4d18{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);}
|
41
39
|
.Chip_styles_1mwwhiw_sj20on5__07da4d18{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-left-content-margin-left);margin-right:var(--plasma-chip-left-content-margin-right);}
|
42
40
|
.Chip_styles_1mwwhiw_s1ror4o9__07da4d18{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
@@ -10,8 +10,6 @@
|
|
10
10
|
|
11
11
|
.base_kgtz8x_b16hf96__46a206b1{--plasma_private-chip-outline-size:var(--plasma-chip-outline-size,0.125rem);position:relative;}.base_kgtz8x_b16hf96__46a206b1:focus{outline:none;}.base_kgtz8x_b16hf96__46a206b1::before{content:'';position:absolute;top:calc(-1 * var(--plasma_private-chip-outline-size));left:calc(-1 * var(--plasma_private-chip-outline-size));right:calc(-1 * var(--plasma_private-chip-outline-size));bottom:calc(-1 * var(--plasma_private-chip-outline-size));z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-chip-outline-size) solid transparent;border-radius:calc(var(--plasma-chip-border-radius) + var(--plasma_private-chip-outline-size));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_kgtz8x_b16hf96__46a206b1.base_kgtz8x_focusVisible__46a206b1:focus::before,.base_kgtz8x_b16hf96__46a206b1[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-chip-outline-size) var(--plasma-chip-focus-color);}
|
12
12
|
|
13
|
-
.base_3kce4h_bvcavwi__c6ad5ca5.base_3kce4h_chipPilled__c6ad5ca5{border-radius:var(--plasma-chip-pilled-border-radius);}
|
14
|
-
|
15
13
|
.Chip_styles_1mwwhiw_bol5daj__07da4d18{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);}
|
16
14
|
.Chip_styles_1mwwhiw_sj20on5__07da4d18{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-left-content-margin-left);margin-right:var(--plasma-chip-left-content-margin-right);}
|
17
15
|
.Chip_styles_1mwwhiw_s1ror4o9__07da4d18{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
@@ -8,8 +8,6 @@
|
|
8
8
|
|
9
9
|
.base_kgtz8x_b16hf96__46a206b1{--plasma_private-chip-outline-size:var(--plasma-chip-outline-size,0.125rem);position:relative;}.base_kgtz8x_b16hf96__46a206b1:focus{outline:none;}.base_kgtz8x_b16hf96__46a206b1::before{content:'';position:absolute;top:calc(-1 * var(--plasma_private-chip-outline-size));left:calc(-1 * var(--plasma_private-chip-outline-size));right:calc(-1 * var(--plasma_private-chip-outline-size));bottom:calc(-1 * var(--plasma_private-chip-outline-size));z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-chip-outline-size) solid transparent;border-radius:calc(var(--plasma-chip-border-radius) + var(--plasma_private-chip-outline-size));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_kgtz8x_b16hf96__46a206b1.base_kgtz8x_focusVisible__46a206b1:focus::before,.base_kgtz8x_b16hf96__46a206b1[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-chip-outline-size) var(--plasma-chip-focus-color);}
|
10
10
|
|
11
|
-
.base_3kce4h_bvcavwi__c6ad5ca5.base_3kce4h_chipPilled__c6ad5ca5{border-radius:var(--plasma-chip-pilled-border-radius);}
|
12
|
-
|
13
11
|
.Chip_styles_1mwwhiw_bol5daj__07da4d18{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);}
|
14
12
|
.Chip_styles_1mwwhiw_sj20on5__07da4d18{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-left-content-margin-left);margin-right:var(--plasma-chip-left-content-margin-right);}
|
15
13
|
.Chip_styles_1mwwhiw_s1ror4o9__07da4d18{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
@@ -10,8 +10,6 @@
|
|
10
10
|
|
11
11
|
.base_kgtz8x_b16hf96__46a206b1{--plasma_private-chip-outline-size:var(--plasma-chip-outline-size,0.125rem);position:relative;}.base_kgtz8x_b16hf96__46a206b1:focus{outline:none;}.base_kgtz8x_b16hf96__46a206b1::before{content:'';position:absolute;top:calc(-1 * var(--plasma_private-chip-outline-size));left:calc(-1 * var(--plasma_private-chip-outline-size));right:calc(-1 * var(--plasma_private-chip-outline-size));bottom:calc(-1 * var(--plasma_private-chip-outline-size));z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-chip-outline-size) solid transparent;border-radius:calc(var(--plasma-chip-border-radius) + var(--plasma_private-chip-outline-size));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_kgtz8x_b16hf96__46a206b1.base_kgtz8x_focusVisible__46a206b1:focus::before,.base_kgtz8x_b16hf96__46a206b1[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-chip-outline-size) var(--plasma-chip-focus-color);}
|
12
12
|
|
13
|
-
.base_3kce4h_bvcavwi__c6ad5ca5.base_3kce4h_chipPilled__c6ad5ca5{border-radius:var(--plasma-chip-pilled-border-radius);}
|
14
|
-
|
15
13
|
.Chip_styles_1mwwhiw_bol5daj__07da4d18{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);}
|
16
14
|
.Chip_styles_1mwwhiw_sj20on5__07da4d18{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-left-content-margin-left);margin-right:var(--plasma-chip-left-content-margin-right);}
|
17
15
|
.Chip_styles_1mwwhiw_s1ror4o9__07da4d18{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
package/es/index.css
CHANGED
@@ -40,8 +40,6 @@
|
|
40
40
|
|
41
41
|
.base_kgtz8x_b16hf96__46a206b1{--plasma_private-chip-outline-size:var(--plasma-chip-outline-size,0.125rem);position:relative;}.base_kgtz8x_b16hf96__46a206b1:focus{outline:none;}.base_kgtz8x_b16hf96__46a206b1::before{content:'';position:absolute;top:calc(-1 * var(--plasma_private-chip-outline-size));left:calc(-1 * var(--plasma_private-chip-outline-size));right:calc(-1 * var(--plasma_private-chip-outline-size));bottom:calc(-1 * var(--plasma_private-chip-outline-size));z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-chip-outline-size) solid transparent;border-radius:calc(var(--plasma-chip-border-radius) + var(--plasma_private-chip-outline-size));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_kgtz8x_b16hf96__46a206b1.base_kgtz8x_focusVisible__46a206b1:focus::before,.base_kgtz8x_b16hf96__46a206b1[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-chip-outline-size) var(--plasma-chip-focus-color);}
|
42
42
|
|
43
|
-
.base_3kce4h_bvcavwi__c6ad5ca5.base_3kce4h_chipPilled__c6ad5ca5{border-radius:var(--plasma-chip-pilled-border-radius);}
|
44
|
-
|
45
43
|
.Chip_styles_1mwwhiw_bol5daj__07da4d18{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);}
|
46
44
|
.Chip_styles_1mwwhiw_sj20on5__07da4d18{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-left-content-margin-left);margin-right:var(--plasma-chip-left-content-margin-right);}
|
47
45
|
.Chip_styles_1mwwhiw_s1ror4o9__07da4d18{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@salutejs/plasma-new-hope",
|
3
|
-
"version": "0.76.2-canary.
|
3
|
+
"version": "0.76.2-canary.1180.8703198104.0",
|
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": "cb051ebf73df6252738c85f8daccafc3c7282495"
|
106
106
|
}
|
@@ -15,7 +15,7 @@ var _Avatar2 = /*#__PURE__*/require("./Avatar.styles");
|
|
15
15
|
var _base = /*#__PURE__*/require("./variations/_size/base");
|
16
16
|
var _base2 = /*#__PURE__*/require("./variations/_focused/base");
|
17
17
|
var _utils2 = /*#__PURE__*/require("./utils");
|
18
|
-
var _excluded = ["size", "name", "url", "customText", "status", "className", "focused", "isScalable"];
|
18
|
+
var _excluded = ["size", "name", "url", "customText", "status", "className", "focused", "isScalable", "aria-label"];
|
19
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
20
20
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
21
21
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
@@ -46,6 +46,10 @@ var StyledIndicator = /*#__PURE__*/(0, _styledComponents["default"])(Indicator).
|
|
46
46
|
var status = _ref2.status;
|
47
47
|
return status === 'active' ? "var(".concat(_Avatar.tokens.statusOnlineColor, ")") : "var(".concat(_Avatar.tokens.statusOfflineColor, ")");
|
48
48
|
});
|
49
|
+
var StatusDict = {
|
50
|
+
active: 'Статус активен',
|
51
|
+
inactive: 'Статус неактивен'
|
52
|
+
};
|
49
53
|
var avatarRoot = exports.avatarRoot = function avatarRoot(Root) {
|
50
54
|
return /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
51
55
|
var avatarSize = props.size,
|
@@ -57,14 +61,23 @@ var avatarRoot = exports.avatarRoot = function avatarRoot(Root) {
|
|
57
61
|
_props$focused = props.focused,
|
58
62
|
focused = _props$focused === void 0 ? true : _props$focused,
|
59
63
|
isScalable = props.isScalable,
|
64
|
+
ariaLabelProp = props['aria-label'],
|
60
65
|
rest = _objectWithoutProperties(props, _excluded);
|
61
66
|
var initials = (0, _react.useMemo)(function () {
|
62
67
|
return (0, _utils2.getInitialsForName)(name);
|
63
68
|
}, [name]);
|
69
|
+
var ariaLabel;
|
70
|
+
|
71
|
+
// INFO: есть a11y и есть изображение, поэтому нужно озвучить что на нем: включаем aria-label
|
72
|
+
if ((rest === null || rest === void 0 ? void 0 : rest.role) === 'button' && url) {
|
73
|
+
ariaLabel = !ariaLabelProp || ariaLabelProp.trim() === '' ? name : ariaLabelProp;
|
74
|
+
ariaLabel = status ? "".concat(ariaLabel, " ").concat(StatusDict[status]) : ariaLabel;
|
75
|
+
}
|
64
76
|
return /*#__PURE__*/_react["default"].createElement(Root, _extends({
|
65
77
|
ref: ref,
|
66
78
|
size: avatarSize,
|
67
79
|
className: (0, _utils.cx)(_Avatar.classes.avatarItem, className),
|
80
|
+
"aria-label": ariaLabel,
|
68
81
|
focused: focused
|
69
82
|
}, rest), /*#__PURE__*/_react["default"].createElement(_Avatar2.Wrapper, {
|
70
83
|
isScalable: isScalable
|
@@ -74,6 +87,7 @@ var avatarRoot = exports.avatarRoot = function avatarRoot(Root) {
|
|
74
87
|
initials: initials,
|
75
88
|
name: name
|
76
89
|
})), status && /*#__PURE__*/_react["default"].createElement(_Avatar2.StatusIcon, null, /*#__PURE__*/_react["default"].createElement(StyledIndicator, {
|
90
|
+
"aria-label": StatusDict[status],
|
77
91
|
status: status
|
78
92
|
})));
|
79
93
|
});
|
@@ -7,16 +7,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
7
7
|
exports.chipRoot = exports.chipConfig = void 0;
|
8
8
|
var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
|
9
9
|
var _IconClose = /*#__PURE__*/require("../_Icon/Icons/IconClose");
|
10
|
-
var _utils = /*#__PURE__*/require("../../utils");
|
11
10
|
var _base = /*#__PURE__*/require("./variations/_view/base");
|
12
11
|
var _base2 = /*#__PURE__*/require("./variations/_size/base");
|
13
12
|
var _base3 = /*#__PURE__*/require("./variations/_disabled/base");
|
14
13
|
var _base4 = /*#__PURE__*/require("./variations/_readonly/base");
|
15
14
|
var _base5 = /*#__PURE__*/require("./variations/_focused/base");
|
16
|
-
var _base6 = /*#__PURE__*/require("./variations/_pilled/base");
|
17
15
|
var _Chip = /*#__PURE__*/require("./Chip.styles");
|
18
16
|
var _Chip2 = /*#__PURE__*/require("./Chip.tokens");
|
19
|
-
var _excluded = ["children", "text", "contentLeft", "contentRight", "contentClearButton", "size", "
|
17
|
+
var _excluded = ["children", "text", "contentLeft", "contentRight", "contentClearButton", "size", "onClear", "onClick", "readOnly", "disabled"];
|
20
18
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
21
19
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
22
20
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
@@ -30,18 +28,14 @@ var chipRoot = exports.chipRoot = function chipRoot(Root) {
|
|
30
28
|
contentRight = props.contentRight,
|
31
29
|
contentClearButton = props.contentClearButton,
|
32
30
|
size = props.size,
|
33
|
-
className = props.className,
|
34
31
|
onClear = props.onClear,
|
35
32
|
onClick = props.onClick,
|
36
|
-
_props$pilled = props.pilled,
|
37
|
-
pilled = _props$pilled === void 0 ? false : _props$pilled,
|
38
33
|
_props$readOnly = props.readOnly,
|
39
34
|
readOnly = _props$readOnly === void 0 ? false : _props$readOnly,
|
40
35
|
_props$disabled = props.disabled,
|
41
36
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
42
37
|
rest = _objectWithoutProperties(props, _excluded);
|
43
38
|
var txt = !text && typeof children === 'string' ? children : text;
|
44
|
-
var pilledClass = pilled ? _Chip2.classes.pilled : undefined;
|
45
39
|
var handleClick = function handleClick(event) {
|
46
40
|
if (disabled || readOnly) {
|
47
41
|
return;
|
@@ -58,11 +52,9 @@ var chipRoot = exports.chipRoot = function chipRoot(Root) {
|
|
58
52
|
return /*#__PURE__*/_react["default"].createElement(Root, _extends({
|
59
53
|
type: "button",
|
60
54
|
ref: ref,
|
61
|
-
className: (0, _utils.cx)(pilledClass, className),
|
62
55
|
tabIndex: readOnly ? -1 : 0,
|
63
56
|
onClick: handleClick,
|
64
57
|
disabled: disabled,
|
65
|
-
pilled: pilled,
|
66
58
|
readOnly: !disabled && readOnly,
|
67
59
|
size: size
|
68
60
|
}, rest), contentLeft && /*#__PURE__*/_react["default"].createElement(_Chip.StyledContentLeft, null, contentLeft), txt ? /*#__PURE__*/_react["default"].createElement(_Chip.StyledContentMain, null, txt) : children, contentRight && /*#__PURE__*/_react["default"].createElement(_Chip.StyledContentRight, null, contentRight), ClearContent);
|
@@ -90,14 +82,10 @@ var chipConfig = exports.chipConfig = {
|
|
90
82
|
},
|
91
83
|
focused: {
|
92
84
|
css: _base5.base
|
93
|
-
},
|
94
|
-
pilled: {
|
95
|
-
css: _base6.base,
|
96
|
-
attrs: true
|
97
85
|
}
|
98
86
|
},
|
99
87
|
defaults: {
|
100
|
-
view: '
|
88
|
+
view: 'primary',
|
101
89
|
size: 'm'
|
102
90
|
}
|
103
91
|
};
|
@@ -72,7 +72,7 @@ export function App() {
|
|
72
72
|
Вид Chip задается с помощью свойства `view`. Возможные значения свойства `view`:
|
73
73
|
+ `"default"` – основная;
|
74
74
|
+ `"secondary"` – вторичная;
|
75
|
-
+ `"
|
75
|
+
+ `"positive"` – успешное завершение;
|
76
76
|
|
77
77
|
```tsx live
|
78
78
|
import React from 'react';
|
@@ -83,7 +83,7 @@ export function App() {
|
|
83
83
|
<div>
|
84
84
|
<Chip text="Chip" size="m" view="default" />
|
85
85
|
<Chip text="Chip" size="m" view="secondary" />
|
86
|
-
<Chip text="Chip" size="m" view="
|
86
|
+
<Chip text="Chip" size="m" view="positive" />
|
87
87
|
</div>
|
88
88
|
);
|
89
89
|
}
|
@@ -3,10 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.tokens =
|
7
|
-
var classes = exports.classes = {
|
8
|
-
pilled: 'chip-pilled'
|
9
|
-
};
|
6
|
+
exports.tokens = void 0;
|
10
7
|
var tokens = exports.tokens = {
|
11
8
|
background: '--plasma-chip-background',
|
12
9
|
color: '--plasma-chip-color',
|
@@ -24,7 +21,6 @@ var tokens = exports.tokens = {
|
|
24
21
|
outlineSize: '--plasma-chip-outline-size',
|
25
22
|
closeIconColor: '--plasma-chip-close-icon-color',
|
26
23
|
borderRadius: '--plasma-chip-border-radius',
|
27
|
-
pilledBorderRadius: '--plasma-chip-pilled-border-radius',
|
28
24
|
width: '--plasma-chip-width',
|
29
25
|
height: '--plasma-chip-height',
|
30
26
|
paddingTop: '--plasma-chip-padding-top',
|
package/styled-components/cjs/examples/plasma_b2c/components/AvatarGroup/AvatarGroup.stories.tsx
CHANGED
@@ -8,6 +8,7 @@ import { Avatar } from '../Avatar/Avatar';
|
|
8
8
|
import { AvatarGroup } from './AvatarGroup';
|
9
9
|
|
10
10
|
type Story = StoryObj<ComponentProps<typeof AvatarGroup>>;
|
11
|
+
type Avatar = ComponentProps<typeof Avatar>;
|
11
12
|
|
12
13
|
const meta: Meta<typeof AvatarGroup> = {
|
13
14
|
title: 'plasma_b2c/AvatarGroup',
|
@@ -33,40 +34,57 @@ export const Default: Story = {
|
|
33
34
|
|
34
35
|
export const DynamicSize: Story = {
|
35
36
|
args: { totalCount: 10, visibleCount: 3 },
|
36
|
-
render: (args: ComponentProps<typeof AvatarGroup>) => {
|
37
|
-
const itemLength =
|
37
|
+
render: ({ visibleCount, totalCount, ...args }: ComponentProps<typeof AvatarGroup>) => {
|
38
|
+
const itemLength = totalCount;
|
38
39
|
|
39
40
|
return (
|
40
41
|
<AvatarGroup {...args}>
|
41
|
-
{Array(
|
42
|
+
{Array(visibleCount)
|
42
43
|
.fill(true)
|
43
44
|
.map((_, index) => (
|
44
|
-
<Avatar size="xxl" customText={index + 1} />
|
45
|
+
<Avatar size="xxl" key={index} customText={index + 1} />
|
45
46
|
))}
|
46
47
|
|
47
|
-
{itemLength >
|
48
|
-
<Avatar size="xxl" customText={`+${itemLength - args.visibleCount}`} />
|
49
|
-
)}
|
48
|
+
{itemLength > visibleCount && <Avatar size="xxl" customText={`+${itemLength - visibleCount}`} />}
|
50
49
|
</AvatarGroup>
|
51
50
|
);
|
52
51
|
},
|
53
52
|
};
|
54
53
|
|
54
|
+
const list: Array<Avatar> = [
|
55
|
+
{
|
56
|
+
name: 'Илья Муромец',
|
57
|
+
status: 'active',
|
58
|
+
url: 'https://avatars.githubusercontent.com/u/1813468?v=4',
|
59
|
+
},
|
60
|
+
{
|
61
|
+
name: 'Алеша Попович',
|
62
|
+
status: 'active',
|
63
|
+
url: 'https://avatars.githubusercontent.com/u/1813468?v=4',
|
64
|
+
},
|
65
|
+
{
|
66
|
+
name: 'Добрыня Никитич',
|
67
|
+
status: 'active',
|
68
|
+
url: 'https://avatars.githubusercontent.com/u/1813468?v=4',
|
69
|
+
},
|
70
|
+
{
|
71
|
+
name: 'Микула Селянинович',
|
72
|
+
status: 'inactive',
|
73
|
+
url: 'https://avatars.githubusercontent.com/u/1813468?v=4',
|
74
|
+
},
|
75
|
+
{
|
76
|
+
name: 'Ставр Годинович',
|
77
|
+
status: 'inactive',
|
78
|
+
},
|
79
|
+
];
|
80
|
+
|
55
81
|
export const Accessibility: Story = {
|
56
82
|
render: (args: ComponentProps<typeof AvatarGroup>) => {
|
57
83
|
return (
|
58
84
|
<AvatarGroup {...args}>
|
59
|
-
{
|
60
|
-
.
|
61
|
-
|
62
|
-
<Avatar
|
63
|
-
role="button"
|
64
|
-
tabIndex={0}
|
65
|
-
focused
|
66
|
-
size="xxl"
|
67
|
-
url="https://avatars.githubusercontent.com/u/1813468?v=4"
|
68
|
-
/>
|
69
|
-
))}
|
85
|
+
{list.map((props) => (
|
86
|
+
<Avatar role="button" tabIndex={0} focused key={props.name} size="xxl" {...props} />
|
87
|
+
))}
|
70
88
|
</AvatarGroup>
|
71
89
|
);
|
72
90
|
},
|
@@ -14,24 +14,21 @@ var config = exports.config = {
|
|
14
14
|
},
|
15
15
|
variations: {
|
16
16
|
view: {
|
17
|
-
"default": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--inverse-text-primary);", ":var(--surface-solid-default
|
18
|
-
secondary: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary
|
19
|
-
|
17
|
+
"default": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--inverse-text-primary);", ":color-mix( in srgb,var(--inverse-text-primary),var(--surface-solid-default) 85% );", ":var(--inverse-text-primary);", ":color-mix( in srgb,var(--inverse-text-primary),var(--surface-solid-default) 80% );", ":var(--surface-solid-default);", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--inverse-text-primary);"], _Chip.chipTokens.color, _Chip.chipTokens.background, _Chip.chipTokens.colorHover, _Chip.chipTokens.backgroundHover, _Chip.chipTokens.colorActive, _Chip.chipTokens.backgroundActive, _Chip.chipTokens.backgroundReadOnly, _Chip.chipTokens.colorReadOnly, _Chip.chipTokens.backgroundReadOnlyHover, _Chip.chipTokens.colorReadOnlyHover),
|
18
|
+
secondary: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":color-mix( in srgb,var(--inverse-text-primary),var(--surface-transparent-secondary) 85% );", ":var(--text-primary);", ":color-mix( in srgb,var(--inverse-text-primary),var(--surface-transparent-secondary) 80% );", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);"], _Chip.chipTokens.color, _Chip.chipTokens.background, _Chip.chipTokens.colorHover, _Chip.chipTokens.backgroundHover, _Chip.chipTokens.colorActive, _Chip.chipTokens.backgroundActive, _Chip.chipTokens.backgroundReadOnly, _Chip.chipTokens.colorReadOnly, _Chip.chipTokens.backgroundReadOnlyHover, _Chip.chipTokens.colorReadOnlyHover),
|
19
|
+
positive: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--on-dark-text-primary);", ":var(--surface-positive);", ":var(--on-dark-text-primary);", ":color-mix( in srgb,var(--inverse-text-primary),var(--surface-positive) 85% );", ":var(--on-dark-text-primary);", ":color-mix(in srgb,var(--text-primary),var(--surface-positive) 85%);", ":var(--surface-positive);", ":var(--on-dark-text-primary);", ":var(--surface-positive);", ":var(--on-dark-text-primary);"], _Chip.chipTokens.color, _Chip.chipTokens.background, _Chip.chipTokens.colorHover, _Chip.chipTokens.backgroundHover, _Chip.chipTokens.colorActive, _Chip.chipTokens.backgroundActive, _Chip.chipTokens.backgroundReadOnly, _Chip.chipTokens.colorReadOnly, _Chip.chipTokens.backgroundReadOnlyHover, _Chip.chipTokens.colorReadOnlyHover)
|
20
20
|
},
|
21
21
|
size: {
|
22
|
-
l: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.75rem;", ":
|
23
|
-
m: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.625rem;", ":
|
24
|
-
s: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.5rem;", ":
|
25
|
-
xs: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.375rem;", ":
|
22
|
+
l: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.75rem;", ":auto;", ":3rem;", ":1rem;", ":1rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":-0.125rem;", ":0.5rem;", ":0.625rem;", ":-0.25rem;", ":1.02;", ":0.98;", ":1.5rem;"], _Chip.chipTokens.borderRadius, _Chip.chipTokens.width, _Chip.chipTokens.height, _Chip.chipTokens.paddingRight, _Chip.chipTokens.paddingLeft, _Chip.chipTokens.fontFamily, _Chip.chipTokens.fontSize, _Chip.chipTokens.fontStyle, _Chip.chipTokens.fontWeight, _Chip.chipTokens.letterSpacing, _Chip.chipTokens.lineHeight, _Chip.chipTokens.leftContentMarginLeft, _Chip.chipTokens.leftContentMarginRight, _Chip.chipTokens.clearContentMarginLeft, _Chip.chipTokens.clearContentMarginRight, _Chip.chipTokens.scaleHover, _Chip.chipTokens.scaleActive, _Chip.chipTokens.closeIconSize),
|
23
|
+
m: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.625rem;", ":auto;", ":2.5rem;", ":0.875rem;", ":0.875rem;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":-0.125rem;", ":0.375rem;", ":0.5rem;", ":-0.25rem;", ":1.02;", ":0.98;", ":1rem;"], _Chip.chipTokens.borderRadius, _Chip.chipTokens.width, _Chip.chipTokens.height, _Chip.chipTokens.paddingRight, _Chip.chipTokens.paddingLeft, _Chip.chipTokens.fontFamily, _Chip.chipTokens.fontSize, _Chip.chipTokens.fontStyle, _Chip.chipTokens.fontWeight, _Chip.chipTokens.letterSpacing, _Chip.chipTokens.lineHeight, _Chip.chipTokens.leftContentMarginLeft, _Chip.chipTokens.leftContentMarginRight, _Chip.chipTokens.clearContentMarginLeft, _Chip.chipTokens.clearContentMarginRight, _Chip.chipTokens.scaleHover, _Chip.chipTokens.scaleActive, _Chip.chipTokens.closeIconSize),
|
24
|
+
s: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.5rem;", ":auto;", ":2rem;", ":0.875rem;", ":0.875rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":-0.125rem;", ":0.25rem;", ":0.375rem;", ":-0.25rem;", ":1.02;", ":0.98;", ":1rem;"], _Chip.chipTokens.borderRadius, _Chip.chipTokens.width, _Chip.chipTokens.height, _Chip.chipTokens.paddingRight, _Chip.chipTokens.paddingLeft, _Chip.chipTokens.fontFamily, _Chip.chipTokens.fontSize, _Chip.chipTokens.fontStyle, _Chip.chipTokens.fontWeight, _Chip.chipTokens.letterSpacing, _Chip.chipTokens.lineHeight, _Chip.chipTokens.leftContentMarginLeft, _Chip.chipTokens.leftContentMarginRight, _Chip.chipTokens.clearContentMarginLeft, _Chip.chipTokens.clearContentMarginRight, _Chip.chipTokens.scaleHover, _Chip.chipTokens.scaleActive, _Chip.chipTokens.closeIconSize),
|
25
|
+
xs: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.375rem;", ":auto;", ":1.5rem;", ":0.625rem;", ":0.625rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":-0.125rem;", ":0.25rem;", ":0.25rem;", ":-0.25rem;", ":1.02;", ":0.98;", ":1rem;"], _Chip.chipTokens.borderRadius, _Chip.chipTokens.width, _Chip.chipTokens.height, _Chip.chipTokens.paddingRight, _Chip.chipTokens.paddingLeft, _Chip.chipTokens.fontFamily, _Chip.chipTokens.fontSize, _Chip.chipTokens.fontStyle, _Chip.chipTokens.fontWeight, _Chip.chipTokens.letterSpacing, _Chip.chipTokens.lineHeight, _Chip.chipTokens.leftContentMarginLeft, _Chip.chipTokens.leftContentMarginRight, _Chip.chipTokens.clearContentMarginLeft, _Chip.chipTokens.clearContentMarginRight, _Chip.chipTokens.scaleHover, _Chip.chipTokens.scaleActive, _Chip.chipTokens.closeIconSize)
|
26
26
|
},
|
27
27
|
disabled: {
|
28
28
|
"true": /*#__PURE__*/(0, _styledComponents.css)(["", ":0.4;"], _Chip.chipTokens.disabledOpacity)
|
29
29
|
},
|
30
30
|
focused: {
|
31
31
|
"true": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--surface-accent);"], _Chip.chipTokens.focusColor)
|
32
|
-
},
|
33
|
-
pilled: {
|
34
|
-
"true": /*#__PURE__*/(0, _styledComponents.css)([""])
|
35
32
|
}
|
36
33
|
}
|
37
34
|
};
|
@@ -40,33 +40,17 @@ const TrashIcon = (props) => (
|
|
40
40
|
export const Default: Story = {
|
41
41
|
args: {
|
42
42
|
text: 'Hello',
|
43
|
-
view: '
|
43
|
+
view: 'primary',
|
44
44
|
size: 'm',
|
45
45
|
disabled: false,
|
46
46
|
focused: true,
|
47
|
-
pilled: false,
|
48
47
|
onClear,
|
49
48
|
},
|
50
49
|
};
|
51
50
|
|
52
51
|
export const WithIcon: Story = {
|
53
52
|
args: { ...Default.args },
|
54
|
-
render: (args) => {
|
55
|
-
const iconSizeMapper = {
|
56
|
-
l: '1.5rem',
|
57
|
-
m: '1.25rem',
|
58
|
-
s: '1rem',
|
59
|
-
xs: '0.75rem',
|
60
|
-
};
|
61
|
-
const iconSize = args.size || 'm';
|
62
|
-
|
63
|
-
return (
|
64
|
-
<Chip
|
65
|
-
contentLeft={<TrashIcon width={iconSizeMapper[iconSize]} height={iconSizeMapper[iconSize]} />}
|
66
|
-
{...args}
|
67
|
-
/>
|
68
|
-
);
|
69
|
-
},
|
53
|
+
render: (args) => <Chip contentLeft={<TrashIcon width="1.25rem" height="1.25rem" />} {...args} />,
|
70
54
|
};
|
71
55
|
|
72
56
|
export const LongText: Story = {
|