@salutejs/plasma-new-hope 0.179.0-canary.1519.11587412765.0 → 0.179.0-dev.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Counter/Counter.css +1 -1
- package/cjs/components/Counter/Counter.js +13 -3
- package/cjs/components/Counter/Counter.js.map +1 -1
- package/cjs/components/Counter/Counter.tokens.js +4 -0
- package/cjs/components/Counter/Counter.tokens.js.map +1 -1
- package/cjs/components/Counter/variations/_size/base.js +1 -1
- package/cjs/components/Counter/variations/_size/base.js.map +1 -1
- package/cjs/components/Counter/variations/_size/{base_1z0ohiy.css → base_4mz17d.css} +1 -1
- package/cjs/components/Pagination/Pagination.css +12 -12
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +12 -12
- package/cjs/components/Popup/Popup.js +2 -2
- package/cjs/components/Popup/Popup.js.map +1 -1
- package/cjs/components/Popup/PopupContext.js +1 -1
- package/cjs/components/Popup/PopupContext.js.map +1 -1
- package/cjs/components/Portal/Portal.js +4 -0
- package/cjs/components/Portal/Portal.js.map +1 -1
- package/cjs/components/Select/Select.css +12 -12
- package/cjs/components/Select/Select.tokens.js +1 -2
- package/cjs/components/Select/Select.tokens.js.map +1 -1
- package/cjs/components/Select/ui/Inner/Inner.css +12 -12
- package/cjs/components/Select/ui/Inner/ui/Item/Item.css +12 -12
- package/cjs/components/Select/ui/Target/Target.css +12 -12
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +12 -12
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/{Textfield.styles_1damf5p.css → Textfield.styles_11yj58s.css} +1 -1
- package/cjs/index.css +13 -13
- package/emotion/cjs/components/Counter/Counter.js +13 -3
- package/emotion/cjs/components/Counter/Counter.template-doc.mdx +2 -2
- package/emotion/cjs/components/Counter/Counter.tokens.js +4 -1
- package/emotion/cjs/components/Counter/variations/_size/base.js +1 -1
- package/emotion/cjs/components/Popup/Popup.js +1 -1
- package/emotion/cjs/components/Popup/PopupContext.js +1 -1
- package/emotion/cjs/components/Portal/Portal.js +4 -0
- package/emotion/cjs/components/Select/Select.tokens.js +1 -2
- package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +21 -12
- package/emotion/cjs/examples/plasma_b2c/components/Counter/Counter.config.js +12 -9
- package/emotion/cjs/examples/plasma_b2c/components/Counter/Counter.stories.tsx +7 -5
- package/emotion/cjs/examples/plasma_web/components/Counter/Counter.config.js +12 -9
- package/emotion/cjs/examples/plasma_web/components/Counter/Counter.stories.tsx +7 -5
- package/emotion/es/components/Counter/Counter.js +13 -3
- package/emotion/es/components/Counter/Counter.template-doc.mdx +2 -2
- package/emotion/es/components/Counter/Counter.tokens.js +3 -0
- package/emotion/es/components/Counter/variations/_size/base.js +2 -2
- package/emotion/es/components/Popup/Popup.js +1 -1
- package/emotion/es/components/Popup/PopupContext.js +1 -1
- package/emotion/es/components/Portal/Portal.js +4 -0
- package/emotion/es/components/Select/Select.tokens.js +1 -2
- package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +21 -12
- package/emotion/es/examples/plasma_b2c/components/Counter/Counter.config.js +12 -9
- package/emotion/es/examples/plasma_b2c/components/Counter/Counter.stories.tsx +7 -5
- package/emotion/es/examples/plasma_web/components/Counter/Counter.config.js +12 -9
- package/emotion/es/examples/plasma_web/components/Counter/Counter.stories.tsx +7 -5
- package/es/components/Counter/Counter.css +1 -1
- package/es/components/Counter/Counter.js +13 -3
- package/es/components/Counter/Counter.js.map +1 -1
- package/es/components/Counter/Counter.tokens.js +4 -1
- package/es/components/Counter/Counter.tokens.js.map +1 -1
- package/es/components/Counter/variations/_size/base.js +1 -1
- package/es/components/Counter/variations/_size/base.js.map +1 -1
- package/es/components/Counter/variations/_size/{base_1z0ohiy.css → base_4mz17d.css} +1 -1
- package/es/components/Pagination/Pagination.css +12 -12
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +12 -12
- package/es/components/Popup/Popup.js +2 -2
- package/es/components/Popup/Popup.js.map +1 -1
- package/es/components/Popup/PopupContext.js +1 -1
- package/es/components/Popup/PopupContext.js.map +1 -1
- package/es/components/Portal/Portal.js +4 -0
- package/es/components/Portal/Portal.js.map +1 -1
- package/es/components/Select/Select.css +12 -12
- package/es/components/Select/Select.tokens.js +1 -2
- package/es/components/Select/Select.tokens.js.map +1 -1
- package/es/components/Select/ui/Inner/Inner.css +12 -12
- package/es/components/Select/ui/Inner/ui/Item/Item.css +12 -12
- package/es/components/Select/ui/Target/Target.css +12 -12
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +12 -12
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
- package/es/components/Select/ui/Target/ui/Textfield/{Textfield.styles_1damf5p.css → Textfield.styles_11yj58s.css} +1 -1
- package/es/index.css +13 -13
- package/package.json +2 -2
- package/styled-components/cjs/components/Counter/Counter.js +13 -3
- package/styled-components/cjs/components/Counter/Counter.template-doc.mdx +2 -2
- package/styled-components/cjs/components/Counter/Counter.tokens.js +4 -1
- package/styled-components/cjs/components/Counter/variations/_size/base.js +1 -1
- package/styled-components/cjs/components/Popup/Popup.js +1 -1
- package/styled-components/cjs/components/Popup/PopupContext.js +1 -1
- package/styled-components/cjs/components/Portal/Portal.js +4 -0
- package/styled-components/cjs/components/Select/Select.tokens.js +1 -2
- package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Counter/Counter.config.js +5 -2
- package/styled-components/cjs/examples/plasma_b2c/components/Counter/Counter.stories.tsx +7 -5
- package/styled-components/cjs/examples/plasma_web/components/Counter/Counter.config.js +5 -2
- package/styled-components/cjs/examples/plasma_web/components/Counter/Counter.stories.tsx +7 -5
- package/styled-components/es/components/Counter/Counter.js +13 -3
- package/styled-components/es/components/Counter/Counter.template-doc.mdx +2 -2
- package/styled-components/es/components/Counter/Counter.tokens.js +3 -0
- package/styled-components/es/components/Counter/variations/_size/base.js +2 -2
- package/styled-components/es/components/Popup/Popup.js +1 -1
- package/styled-components/es/components/Popup/PopupContext.js +1 -1
- package/styled-components/es/components/Portal/Portal.js +4 -0
- package/styled-components/es/components/Select/Select.tokens.js +1 -2
- package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Counter/Counter.config.js +5 -2
- package/styled-components/es/examples/plasma_b2c/components/Counter/Counter.stories.tsx +7 -5
- package/styled-components/es/examples/plasma_web/components/Counter/Counter.config.js +5 -2
- package/styled-components/es/examples/plasma_web/components/Counter/Counter.stories.tsx +7 -5
- package/types/components/Counter/Counter.d.ts.map +1 -1
- package/types/components/Counter/Counter.tokens.d.ts +3 -0
- package/types/components/Counter/Counter.tokens.d.ts.map +1 -1
- package/types/components/Counter/Counter.types.d.ts +2 -2
- package/types/components/Counter/variations/_size/base.d.ts.map +1 -1
- package/types/components/Popup/PopupContext.d.ts.map +1 -1
- package/types/components/Portal/Portal.d.ts.map +1 -1
- package/types/components/Select/Select.tokens.d.ts +0 -1
- package/types/components/Select/Select.tokens.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Counter/Counter.config.d.ts +3 -0
- package/types/examples/plasma_b2c/components/Counter/Counter.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Counter/Counter.d.ts +3 -0
- package/types/examples/plasma_b2c/components/Counter/Counter.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Counter/Counter.config.d.ts +3 -0
- package/types/examples/plasma_web/components/Counter/Counter.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Counter/Counter.d.ts +3 -0
- package/types/examples/plasma_web/components/Counter/Counter.d.ts.map +1 -1
@@ -46,15 +46,15 @@
|
|
46
46
|
.Button_styles_1sopr3d_s1rjh7ra__8219590b{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin:var(--plasma-button-right-content-margin);-webkit-align-self:var(--plasma-button-right-content-align-self);-ms-flex-item-align:var(--plasma-button-right-content-align);align-self:var(--plasma-button-right-content-align-self);}
|
47
47
|
.Button_styles_1sopr3d_b9ga1dj__8219590b{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-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);--plasma_private-btn-br:var(--plasma_computed-btn-br);border-radius:var(--plasma_private-btn-br);}a.Button_styles_1sopr3d_b9ga1dj__8219590b{-webkit-text-decoration:none;text-decoration:none;}.Button_styles_1sopr3d_b9ga1dj__8219590b.Button_styles_1sopr3d_b9ga1dj__8219590b.Button_styles_1sopr3d_buttonSquare__8219590b{width:var(--plasma-button-height);padding:0;}
|
48
48
|
|
49
|
-
.
|
50
|
-
.
|
51
|
-
|
52
|
-
.
|
53
|
-
.
|
54
|
-
.
|
55
|
-
.
|
56
|
-
.
|
57
|
-
.
|
58
|
-
.
|
59
|
-
.
|
60
|
-
.
|
49
|
+
.Textfield_styles_11yj58s_t1yhwv5r__817000d1{display:inline;}.Textfield_styles_11yj58s_t1yhwv5r__817000d1 .Textfield_styles_11yj58s_selectTextfieldTarget__817000d1{-webkit-transition:100ms;transition:100ms;background:var(--t1yhwv5r-0);padding:var(--t1yhwv5r-1);border:var(--t1yhwv5r-2);}.Textfield_styles_11yj58s_t1yhwv5r__817000d1 .Textfield_styles_11yj58s_selectTextfieldTarget__817000d1:hover{-webkit-transition:100ms;transition:100ms;border:var(--t1yhwv5r-3);}.Textfield_styles_11yj58s_t1yhwv5r__817000d1 .Textfield_styles_11yj58s_selectWithoutBoxShadow__817000d1::before{box-shadow:none !important;}
|
50
|
+
.Textfield_styles_11yj58s_s7x5udn__817000d1{--plasma-button-color:var(--text-primary);--plasma-button-color-hover:var(--text-primary);--plasma-button-color-active:var(--text-primary);--plasma-button-height:var(--s7x5udn-0);--plasma-button-width:100%;--plasma-button-padding:var(--plasma-select-target-textfield-padding);--plasma-button-radius:var(--plasma-select-border-radius);--plasma-button-font-family:var(--plasma-select-font-family);--plasma-button-font-size:var(--plasma-select-font-size);--plasma-button-font-style:var(--plasma-select-font-style);--plasma-button-font-weight:var(--plasma-select-font-weight);--plasma-button-letter-spacing:var(--plasma-select-font-letter-spacing);--plasma-button-line-height:var(--plasma-select-font-line-height);--plasma-button-disabled-opacity:0.4;--plasma-button-focus-color:var(--surface-accent);box-shadow:inset 0 0 0 --plasma-select-target-textfield-border-size var(--plasma-select-target-textfield-border-color);text-align:left;position:relative;}.Textfield_styles_11yj58s_s7x5udn__817000d1::before{content:'';position:absolute;top:--plasma-select-target-textfield-border-size;left:--plasma-select-target-textfield-border-size;right:--plasma-select-target-textfield-border-size;bottom:--plasma-select-target-textfield-border-size;z-index:1;display:block;box-sizing:content-box;border:0.0625rem solid transparent;border-radius:calc(var(--plasma-select-border-radius) - --plasma-select-target-textfield-border-size);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.Textfield_styles_11yj58s_s7x5udn__817000d1.Textfield_styles_11yj58s_focusVisible__817000d1:focus::before,.Textfield_styles_11yj58s_s7x5udn__817000d1[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.0625rem var(--surface-accent);}
|
51
|
+
|
52
|
+
.Textfield_styles_11yj58s_i1kxyc50__817000d1{line-height:0;margin:var(--plasma-select-target-textfield-arrow-margin);color:var(--plasma-select-target-textfield-arrow-color);}.Textfield_styles_11yj58s_i1kxyc50__817000d1:hover{color:var(--plasma-select-target-textfield-arrow-color-hover);}.Textfield_styles_11yj58s_i1kxyc50__817000d1:active{color:var(--plasma-select-target-textfield-arrow-color-active);}
|
53
|
+
.Textfield_styles_11yj58s_wqzfsxn__817000d1{width:100%;height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;}.Textfield_styles_11yj58s_wqzfsxn__817000d1 .Textfield_styles_11yj58s_arrowInverse__817000d1{-webkit-transform:rotate(-180deg);-ms-transform:rotate(-180deg);transform:rotate(-180deg);}
|
54
|
+
.Textfield_styles_11yj58s_c1cgo38i__817000d1{width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-width:0;padding:var(--c1cgo38i-0);gap:0.25rem;overflow-x:scroll;border-top-right-radius:var(--plasma-select-chip-border-radius);border-bottom-right-radius:var(--plasma-select-chip-border-radius);-ms-overflow-style:none;-webkit-scrollbar-width:none;-moz-scrollbar-width:none;-ms-scrollbar-width:none;scrollbar-width:none;}.Textfield_styles_11yj58s_c1cgo38i__817000d1::-webkit-scrollbar{display:none;}
|
55
|
+
.Textfield_styles_11yj58s_l9ikjwc__817000d1{color:var(--text-secondary);font-family:var(--plasma-select-font-family);font-size:var(--plasma-select-font-size);font-style:var(--plasma-select-font-style);font-weight:var(--plasma-select-font-weight);-webkit-letter-spacing:var(--plasma-select-font-letter-spacing);-moz-letter-spacing:var(--plasma-select-font-letter-spacing);-ms-letter-spacing:var(--plasma-select-font-letter-spacing);letter-spacing:var(--plasma-select-font-letter-spacing);line-height:var(--plasma-select-font-line-height);}
|
56
|
+
.Textfield_styles_11yj58s_p1jn3k4y__817000d1{color:var(--text-secondary);font-family:var(--plasma-select-font-family);font-size:var(--plasma-select-font-size);font-style:var(--plasma-select-font-style);font-weight:var(--plasma-select-font-weight);-webkit-letter-spacing:var(--plasma-select-font-letter-spacing);-moz-letter-spacing:var(--plasma-select-font-letter-spacing);-ms-letter-spacing:var(--plasma-select-font-letter-spacing);letter-spacing:var(--plasma-select-font-letter-spacing);line-height:var(--plasma-select-font-line-height);}
|
57
|
+
.Textfield_styles_11yj58s_i8xlj9b__817000d1{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:start;-webkit-box-align:start;-ms-flex-align:start;align-items:start;row-gap:var(--plasma-select-inner-label-gap);font-family:var(--plasma-select-font-family);font-size:var(--plasma-select-font-size);font-style:var(--plasma-select-font-style);font-weight:var(--plasma-select-font-weight);-webkit-letter-spacing:var(--plasma-select-font-letter-spacing);-moz-letter-spacing:var(--plasma-select-font-letter-spacing);-ms-letter-spacing:var(--plasma-select-font-letter-spacing);letter-spacing:var(--plasma-select-font-letter-spacing);line-height:var(--plasma-select-font-line-height);}
|
58
|
+
.Textfield_styles_11yj58s_iu6fefp__817000d1{color:var(--text-secondary);font-family:var(--plasma-typo-body-xs-font-family);font-size:var(--plasma-typo-body-xs-font-size);font-style:var(--plasma-typo-body-xs-font-style);font-weight:var(--plasma-typo-body-xs-font-weight);-webkit-letter-spacing:var(--plasma-typo-body-xs-letter-spacing);-moz-letter-spacing:var(--plasma-typo-body-xs-letter-spacing);-ms-letter-spacing:var(--plasma-typo-body-xs-letter-spacing);letter-spacing:var(--plasma-typo-body-xs-letter-spacing);line-height:var(--plasma-typo-body-xs-line-height);text-align:left;}
|
59
|
+
.Textfield_styles_11yj58s_c1ox0htq__817000d1{-webkit-flex:none;-ms-flex:none;flex:none;margin-left:-0.125rem;margin-right:0.375rem;line-height:0;}
|
60
|
+
.Textfield_styles_11yj58s_v1kam5d__817000d1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Textfield.styles.js","sources":["../../../../../../../src/components/Select/ui/Target/ui/Textfield/Textfield.styles.tsx"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { isEmpty } from '../../../../../../utils';\nimport { applyEllipsis, addFocus } from '../../../../../../mixins';\nimport { IconDisclosureDownCentered } from '../../../../../_Icon';\nimport { component, mergeConfig } from '../../../../../../engines';\nimport { buttonConfig, buttonTokens } from '../../../../../Button';\nimport { tokens, classes, constants } from '../../../../Select.tokens';\nimport type { MergedSelectProps } from '../../../../Select.types';\n\nconst mergedButtonConfig = mergeConfig(buttonConfig);\nconst Button = component(mergedButtonConfig);\n\nexport const TextfieldWrapper = styled.div<{ opened: boolean; value: MergedSelectProps['value'] }>`\n display: inline;\n\n .${classes.textfieldTarget} {\n transition: 100ms;\n background: ${({ opened }) =>\n opened\n ? `var(${tokens.targetTextfieldBackgroundColorOpened})`\n : `var(${tokens.targetTextfieldBackgroundColor})`};\n padding: ${({ value }) =>\n Array.isArray(value) && !isEmpty(value)\n ? `0 var(${tokens.targetTextfieldChipPadding})`\n : `0 var(${tokens.targetTextfieldPadding})`};\n border: ${({ opened }) =>\n opened\n ? `var(${tokens.targetTextfieldBorderSize}) solid var(${tokens.targetTextfieldBorderOpenedColor})`\n : `var(${tokens.targetTextfieldBorderSize}) solid var(${tokens.targetTextfieldBorderColor})`};\n }\n\n .${classes.textfieldTarget}:hover {\n transition: 100ms;\n border: ${({ opened }) =>\n opened\n ? `var(${tokens.targetTextfieldBorderSize}) solid var(${tokens.targetTextfieldBorderOpenedColor})`\n : `var(${tokens.targetTextfieldBorderSize}) solid var(${tokens.targetTextfieldBorderColorHover})`};\n }\n\n .${classes.selectWithoutBoxShadow}::before {\n box-shadow: none !important;\n }\n`;\n\nexport const StyledButton = styled(Button)<{ renderTarget: boolean }>`\n ${buttonTokens.buttonColor}: var(${constants.textfieldTargetColor});\n ${buttonTokens.buttonColorHover}: var(${constants.textfieldTargetColor});\n ${buttonTokens.buttonColorActive}: var(${constants.textfieldTargetColor});\n ${buttonTokens.buttonHeight}: ${({ renderTarget }) => (renderTarget ? 'auto' : `var(${tokens.targetHeight})`)};\n ${buttonTokens.buttonWidth}: 100%;\n ${buttonTokens.buttonPadding}: var(${tokens.targetTextfieldPadding});\n ${buttonTokens.buttonRadius}: var(${tokens.borderRadius});\n ${buttonTokens.buttonFontFamily}: var(${tokens.fontFamily});\n ${buttonTokens.buttonFontSize}: var(${tokens.fontSize});\n ${buttonTokens.buttonFontStyle}: var(${tokens.fontStyle});\n ${buttonTokens.buttonFontWeight}:var(${tokens.fontWeight});\n ${buttonTokens.buttonLetterSpacing}: var(${tokens.fontLetterSpacing});\n ${buttonTokens.buttonLineHeight}: var(${tokens.fontLineHeight});\n ${buttonTokens.buttonDisabledOpacity}: ${constants.opacity};\n ${buttonTokens.buttonFocusColor}: var(${constants.focusColor});\n box-shadow: inset 0 0 0 ${tokens.targetTextfieldBorderSize} var(${tokens.targetTextfieldBorderColor});\n text-align: left;\n\n ${addFocus({\n outlineOffset: tokens.targetTextfieldBorderSize,\n outlineSize: constants.focusSize,\n outlineRadius: `calc(var(${tokens.borderRadius}) - ${tokens.targetTextfieldBorderSize})`,\n outlineColor: `var(${constants.focusColor})`,\n })}\n`;\n\nexport const StyledArrow = styled(IconDisclosureDownCentered)``;\n\nexport const IconArrowWrapper = styled.div`\n line-height: 0;\n margin: var(${tokens.targetTextfieldArrowMargin});\n color: var(${tokens.targetTextfieldArrowColor});\n\n &:hover {\n color: var(${tokens.targetTextfieldArrowColorHover});\n }\n\n &:active {\n color: var(${tokens.targetTextfieldArrowColorActive});\n }\n`;\n\nexport const Wrapper = styled.div`\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n .${classes.arrowInverse} {\n transform: rotate(-180deg);\n }\n`;\n\nexport const ChipWrapper = styled.div<{\n multiselect: MergedSelectProps['multiselect'];\n value: MergedSelectProps['value'];\n}>`\n width: 100%;\n display: flex;\n min-width: 0;\n padding: ${({ multiselect, value }) =>\n `calc(${constants.focusSize} + ${\n multiselect && value && value.toString().length > 0 ? `var(${tokens.focusOffset})` : 0\n })`};\n gap: 0.25rem;\n overflow-x: scroll;\n border-top-right-radius: var(${tokens.chipBorderRadius});\n border-bottom-right-radius: var(${tokens.chipBorderRadius});\n\n -ms-overflow-style: none;\n scrollbar-width: none;\n\n &::-webkit-scrollbar {\n display: none;\n }\n`;\n\nexport const Label = styled.label`\n color: var(${constants.textfieldInnerLabelColor});\n font-family: var(${tokens.fontFamily});\n font-size: var(${tokens.fontSize});\n font-style: var(${tokens.fontStyle});\n font-weight: var(${tokens.fontWeight});\n letter-spacing: var(${tokens.fontLetterSpacing});\n line-height: var(${tokens.fontLineHeight});\n`;\n\nexport const Placeholder = styled.div`\n color: var(${constants.textfieldPlaceholderColor});\n font-family: var(${tokens.fontFamily});\n font-size: var(${tokens.fontSize});\n font-style: var(${tokens.fontStyle});\n font-weight: var(${tokens.fontWeight});\n letter-spacing: var(${tokens.fontLetterSpacing});\n line-height: var(${tokens.fontLineHeight});\n`;\n\nexport const InnerLabelWrapper = styled.div`\n display: flex;\n flex-direction: column;\n align-items: start;\n row-gap: var(${tokens.innerLabelGap});\n font-family: var(${tokens.fontFamily});\n font-size: var(${tokens.fontSize});\n font-style: var(${tokens.fontStyle});\n font-weight: var(${tokens.fontWeight});\n letter-spacing: var(${tokens.fontLetterSpacing});\n line-height: var(${tokens.fontLineHeight});\n`;\n\nexport const InnerLabel = styled.label`\n color: var(${constants.textfieldInnerLabelColor});\n font-family: var(${constants.fontFamily});\n font-size: var(${constants.fontSize});\n font-style: var(${constants.fontStyle});\n font-weight: var(${constants.fontWeight});\n letter-spacing: var(${constants.fontLetterSpacing});\n line-height: var(${constants.fontLineHeight});\n text-align: left;\n`;\n\nexport const ContentLeftWrapper = styled.div`\n flex: none;\n margin-left: -0.125rem;\n margin-right: 0.375rem;\n line-height: 0;\n color: var(${tokens.contentLeftColor}, --text-secondary);\n`;\n\nexport const Value = styled.span`\n ${applyEllipsis()}\n`;\n"],"names":["mergedButtonConfig","mergeConfig","buttonConfig","Button","component","_exp2","_ref","opened","concat","tokens","targetTextfieldBackgroundColorOpened","targetTextfieldBackgroundColor","_exp3","_ref2","value","Array","isArray","isEmpty","targetTextfieldChipPadding","targetTextfieldPadding","_exp4","_ref3","targetTextfieldBorderSize","targetTextfieldBorderOpenedColor","targetTextfieldBorderColor","_exp6","_ref4","targetTextfieldBorderColorHover","TextfieldWrapper","styled","name","class","propsAsIs","vars","_exp8","_exp16","_ref5","renderTarget","targetHeight","StyledButton","_exp41","IconDisclosureDownCentered","StyledArrow","IconArrowWrapper","Wrapper","_exp47","_ref6","multiselect","constants","focusSize","toString","length","focusOffset","ChipWrapper","Label","Placeholder","InnerLabelWrapper","InnerLabel","ContentLeftWrapper","Value"],"mappings":";;;;;;;AAUA,IAAMA,kBAAkB,gBAAGC,WAAW,CAACC,YAAY,CAAC,CAAA;AACpD,IAAMC,MAAM,gBAAGC,SAAS,CAACJ,kBAAkB,CAAC,CAAA;AAAC,IAAAK,KAAA,GAV3BA,SAU2BA,KAAAA,GAAA;AAAA,EAAA,OAOvB,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,MAAAA,GAAAA,IAAAA,CAAAA,MAAAA,CAAAA;AAAAA,IAAAA,OACbA,MAAM,GAAA,MAAA,CAAAC,MAAA,CACOC,MAAM,CAACC,oCAAqC,EAAA,GAAA,CAAA,GAAA,MAAA,CAAAF,MAAA,CAC5CC,MAAM,CAACE,8BAA+B,EAAE,GAAA,CAAA,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAC,KAAA,GApB/CA,SAoB+CA,KAAAA,GAAA;AAAA,EAAA,OAC9C,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGC,KAAAA,GAAAA,KAAAA,CAAAA,KAAAA,CAAAA;IAAAA,OACVC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,IAAI,CAACG,OAAO,CAACH,KAAK,CAAC,YAAAN,MAAA,CACxBC,MAAM,CAACS,0BAA2B,EAAA,GAAA,CAAA,GAAA,QAAA,CAAAV,M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EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAQ1B,EAAA;AAEM,IAAMuB,WAAW,gBAAG1B,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAQhC,EAAA;AAEM,IAAMwB,iBAAiB,gBAAG3B,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,mBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAWtC,EAAA;AAEM,IAAMyB,UAAU,gBAAG5B,MAAM,CAAA,OAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAS/B,EAAA;AAEM,IAAM0B,kBAAkB,gBAAG7B,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,oBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAMvC,EAAA;AAEM,IAAM2B,KAAK,gBAAG9B,MAAM,CAAA,MAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,OAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAE1B;;;;"}
|
1
|
+
{"version":3,"file":"Textfield.styles.js","sources":["../../../../../../../src/components/Select/ui/Target/ui/Textfield/Textfield.styles.tsx"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { isEmpty } from '../../../../../../utils';\nimport { applyEllipsis, addFocus } from '../../../../../../mixins';\nimport { IconDisclosureDownCentered } from '../../../../../_Icon';\nimport { component, mergeConfig } from '../../../../../../engines';\nimport { buttonConfig, buttonTokens } from '../../../../../Button';\nimport { tokens, classes, constants } from '../../../../Select.tokens';\nimport type { MergedSelectProps } from '../../../../Select.types';\n\nconst mergedButtonConfig = mergeConfig(buttonConfig);\nconst Button = component(mergedButtonConfig);\n\nexport const TextfieldWrapper = styled.div<{ opened: boolean; value: MergedSelectProps['value'] }>`\n display: inline;\n\n .${classes.textfieldTarget} {\n transition: 100ms;\n background: ${({ opened }) =>\n opened\n ? `var(${tokens.targetTextfieldBackgroundColorOpened})`\n : `var(${tokens.targetTextfieldBackgroundColor})`};\n padding: ${({ value }) =>\n Array.isArray(value) && !isEmpty(value)\n ? `0 var(${tokens.targetTextfieldChipPadding})`\n : `0 var(${tokens.targetTextfieldPadding})`};\n border: ${({ opened }) =>\n opened\n ? `var(${tokens.targetTextfieldBorderSize}) solid var(${tokens.targetTextfieldBorderOpenedColor})`\n : `var(${tokens.targetTextfieldBorderSize}) solid var(${tokens.targetTextfieldBorderColor})`};\n }\n\n .${classes.textfieldTarget}:hover {\n transition: 100ms;\n border: ${({ opened }) =>\n opened\n ? `var(${tokens.targetTextfieldBorderSize}) solid var(${tokens.targetTextfieldBorderOpenedColor})`\n : `var(${tokens.targetTextfieldBorderSize}) solid var(${tokens.targetTextfieldBorderColorHover})`};\n }\n\n .${classes.selectWithoutBoxShadow}::before {\n box-shadow: none !important;\n }\n`;\n\nexport const StyledButton = styled(Button)<{ renderTarget: boolean }>`\n ${buttonTokens.buttonColor}: var(${constants.textfieldTargetColor});\n ${buttonTokens.buttonColorHover}: var(${constants.textfieldTargetColor});\n ${buttonTokens.buttonColorActive}: var(${constants.textfieldTargetColor});\n ${buttonTokens.buttonHeight}: ${({ renderTarget }) => (renderTarget ? 'auto' : `var(${tokens.targetHeight})`)};\n ${buttonTokens.buttonWidth}: 100%;\n ${buttonTokens.buttonPadding}: var(${tokens.targetTextfieldPadding});\n ${buttonTokens.buttonRadius}: var(${tokens.borderRadius});\n ${buttonTokens.buttonFontFamily}: var(${tokens.fontFamily});\n ${buttonTokens.buttonFontSize}: var(${tokens.fontSize});\n ${buttonTokens.buttonFontStyle}: var(${tokens.fontStyle});\n ${buttonTokens.buttonFontWeight}:var(${tokens.fontWeight});\n ${buttonTokens.buttonLetterSpacing}: var(${tokens.fontLetterSpacing});\n ${buttonTokens.buttonLineHeight}: var(${tokens.fontLineHeight});\n ${buttonTokens.buttonDisabledOpacity}: ${constants.opacity};\n ${buttonTokens.buttonFocusColor}: var(${constants.focusColor});\n box-shadow: inset 0 0 0 ${tokens.targetTextfieldBorderSize} var(${tokens.targetTextfieldBorderColor});\n text-align: left;\n\n ${addFocus({\n outlineOffset: tokens.targetTextfieldBorderSize,\n outlineSize: constants.focusSize,\n outlineRadius: `calc(var(${tokens.borderRadius}) - ${tokens.targetTextfieldBorderSize})`,\n outlineColor: `var(${constants.focusColor})`,\n })}\n`;\n\nexport const StyledArrow = styled(IconDisclosureDownCentered)``;\n\nexport const IconArrowWrapper = styled.div`\n line-height: 0;\n margin: var(${tokens.targetTextfieldArrowMargin});\n color: var(${tokens.targetTextfieldArrowColor});\n\n &:hover {\n color: var(${tokens.targetTextfieldArrowColorHover});\n }\n\n &:active {\n color: var(${tokens.targetTextfieldArrowColorActive});\n }\n`;\n\nexport const Wrapper = styled.div`\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n .${classes.arrowInverse} {\n transform: rotate(-180deg);\n }\n`;\n\nexport const ChipWrapper = styled.div<{\n multiselect: MergedSelectProps['multiselect'];\n value: MergedSelectProps['value'];\n}>`\n width: 100%;\n display: flex;\n min-width: 0;\n padding: ${({ multiselect, value }) =>\n `calc(${constants.focusSize} + ${\n multiselect && value && value.toString().length > 0 ? `var(${tokens.focusOffset})` : 0\n })`};\n gap: 0.25rem;\n overflow-x: scroll;\n border-top-right-radius: var(${tokens.chipBorderRadius});\n border-bottom-right-radius: var(${tokens.chipBorderRadius});\n\n -ms-overflow-style: none;\n scrollbar-width: none;\n\n &::-webkit-scrollbar {\n display: none;\n }\n`;\n\nexport const Label = styled.label`\n color: var(${constants.textfieldInnerLabelColor});\n font-family: var(${tokens.fontFamily});\n font-size: var(${tokens.fontSize});\n font-style: var(${tokens.fontStyle});\n font-weight: var(${tokens.fontWeight});\n letter-spacing: var(${tokens.fontLetterSpacing});\n line-height: var(${tokens.fontLineHeight});\n`;\n\nexport const Placeholder = styled.div`\n color: var(${constants.textfieldPlaceholderColor});\n font-family: var(${tokens.fontFamily});\n font-size: var(${tokens.fontSize});\n font-style: var(${tokens.fontStyle});\n font-weight: var(${tokens.fontWeight});\n letter-spacing: var(${tokens.fontLetterSpacing});\n line-height: var(${tokens.fontLineHeight});\n`;\n\nexport const InnerLabelWrapper = styled.div`\n display: flex;\n flex-direction: column;\n align-items: start;\n row-gap: var(${tokens.innerLabelGap});\n font-family: var(${tokens.fontFamily});\n font-size: var(${tokens.fontSize});\n font-style: var(${tokens.fontStyle});\n font-weight: var(${tokens.fontWeight});\n letter-spacing: var(${tokens.fontLetterSpacing});\n line-height: var(${tokens.fontLineHeight});\n`;\n\nexport const InnerLabel = styled.label`\n color: var(${constants.textfieldInnerLabelColor});\n font-family: var(${constants.fontFamily});\n font-size: var(${constants.fontSize});\n font-style: var(${constants.fontStyle});\n font-weight: var(${constants.fontWeight});\n letter-spacing: var(${constants.fontLetterSpacing});\n line-height: var(${constants.fontLineHeight});\n text-align: left;\n`;\n\nexport const ContentLeftWrapper = styled.div`\n flex: none;\n margin-left: -0.125rem;\n margin-right: 0.375rem;\n line-height: 0;\n`;\n\nexport const Value = styled.span`\n ${applyEllipsis()}\n`;\n"],"names":["mergedButtonConfig","mergeConfig","buttonConfig","Button","component","_exp2","_ref","opened","concat","tokens","targetTextfieldBackgroundColorOpened","targetTextfieldBackgroundColor","_exp3","_ref2","value","Array","isArray","isEmpty","targetTextfieldChipPadding","targetTextfieldPadding","_exp4","_ref3","targetTextfieldBorderSize","targetTextfieldBorderOpenedColor","targetTextfieldBorderColor","_exp6","_ref4","targetTextfieldBorderColorHover","TextfieldWrapper","styled","name","class","propsAsIs","vars","_exp8","_exp16","_ref5","renderTarget","targetHeight","StyledButton","_exp41","IconDisclosureDownCentered","StyledArrow","IconArrowWrapper","Wrapper","_exp47","_ref6","multiselect","constants","focusSize","toString","length","focusOffset","ChipWrapper","Label","Placeholder","InnerLabelWrapper","InnerLabel","ContentLeftWrapper","Value"],"mappings":";;;;;;;AAUA,IAAMA,kBAAkB,gBAAGC,WAAW,CAACC,YAAY,CAAC,CAAA;AACpD,IAAMC,MAAM,gBAAGC,SAAS,CAACJ,kBAAkB,CAAC,CAAA;AAAC,IAAAK,KAAA,GAV3BA,SAU2BA,KAAAA,GAAA;AAAA,EAAA,OAOvB,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,MAAAA,GAAAA,IAAAA,CAAAA,MAAAA,CAAAA;AAAAA,IAAAA,OACbA,MAAM,GAAA,MAAA,CAAAC,MAAA,CACOC,MAAM,CAACC,oCAAqC,EAAA,GAAA,CAAA,GAAA,MAAA,CAAAF,MAAA,CAC5CC,MAAM,CAACE,8BAA+B,EAAE,GAAA,CAAA,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAC,KAAA,GApB/CA,SAoB+CA,KAAAA,GAAA;AAAA,EAAA,OAC9C,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGC,KAAAA,GAAAA,KAAAA,CAAAA,KAAAA,CAAAA;IAAAA,OACVC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,IAAI,CAACG,OAAO,CAACH,KAAK,CAAC,YAAAN,MAAA,CACxBC,MAAM,CAACS,0BAA2B,EAAA,GAAA,CAAA,GAAA,QAAA,CAAAV,MAAA,CAClCC,MAAM,CAACU,sBAAuB,EAAE,GAAA,CAAA,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAC,KAAA,GAxBzCA,SAwByCA,KAAAA,GAAA;AAAA,EAAA,OACzC,UAAAC,KAAA,EAAA;AAAA,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OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAQhC,EAAA;AAEM,IAAMwB,iBAAiB,gBAAG3B,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,mBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAWtC,EAAA;AAEM,IAAMyB,UAAU,gBAAG5B,MAAM,CAAA,OAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAS/B,EAAA;AAEM,IAAM0B,kBAAkB,gBAAG7B,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,oBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAKvC,EAAA;AAEM,IAAM2B,KAAK,gBAAG9B,MAAM,CAAA,MAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,OAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAE1B;;;;"}
|
@@ -8,5 +8,5 @@
|
|
8
8
|
.p1jn3k4y{color:var(--text-secondary);font-family:var(--plasma-select-font-family);font-size:var(--plasma-select-font-size);font-style:var(--plasma-select-font-style);font-weight:var(--plasma-select-font-weight);-webkit-letter-spacing:var(--plasma-select-font-letter-spacing);-moz-letter-spacing:var(--plasma-select-font-letter-spacing);-ms-letter-spacing:var(--plasma-select-font-letter-spacing);letter-spacing:var(--plasma-select-font-letter-spacing);line-height:var(--plasma-select-font-line-height);}
|
9
9
|
.i8xlj9b{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:start;-webkit-box-align:start;-ms-flex-align:start;align-items:start;row-gap:var(--plasma-select-inner-label-gap);font-family:var(--plasma-select-font-family);font-size:var(--plasma-select-font-size);font-style:var(--plasma-select-font-style);font-weight:var(--plasma-select-font-weight);-webkit-letter-spacing:var(--plasma-select-font-letter-spacing);-moz-letter-spacing:var(--plasma-select-font-letter-spacing);-ms-letter-spacing:var(--plasma-select-font-letter-spacing);letter-spacing:var(--plasma-select-font-letter-spacing);line-height:var(--plasma-select-font-line-height);}
|
10
10
|
.iu6fefp{color:var(--text-secondary);font-family:var(--plasma-typo-body-xs-font-family);font-size:var(--plasma-typo-body-xs-font-size);font-style:var(--plasma-typo-body-xs-font-style);font-weight:var(--plasma-typo-body-xs-font-weight);-webkit-letter-spacing:var(--plasma-typo-body-xs-letter-spacing);-moz-letter-spacing:var(--plasma-typo-body-xs-letter-spacing);-ms-letter-spacing:var(--plasma-typo-body-xs-letter-spacing);letter-spacing:var(--plasma-typo-body-xs-letter-spacing);line-height:var(--plasma-typo-body-xs-line-height);text-align:left;}
|
11
|
-
.c1ox0htq{-webkit-flex:none;-ms-flex:none;flex:none;margin-left:-0.125rem;margin-right:0.375rem;line-height:0;
|
11
|
+
.c1ox0htq{-webkit-flex:none;-ms-flex:none;flex:none;margin-left:-0.125rem;margin-right:0.375rem;line-height:0;}
|
12
12
|
.v1kam5d{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
package/es/index.css
CHANGED
@@ -475,7 +475,7 @@
|
|
475
475
|
|
476
476
|
.base_1vjakah_b15waymg__f123ad8a{color:var(--plasma-counter-color);background-color:var(--plasma-counter-background);}
|
477
477
|
|
478
|
-
.
|
478
|
+
.base_4mz17d_b1t6e429__b5e2cba4{font-family:var(--plasma-counter-font-family);font-size:var(--plasma-counter-font-size);font-style:var(--plasma-counter-font-style);font-weight:var(--plasma-counter-font-weight);-webkit-letter-spacing:var(--plasma-counter-letter-spacing);-moz-letter-spacing:var(--plasma-counter-letter-spacing);-ms-letter-spacing:var(--plasma-counter-letter-spacing);letter-spacing:var(--plasma-counter-letter-spacing);line-height:var(--plasma-counter-lineheight);border-radius:var(--plasma-counter-border-radius);height:var(--plasma-counter-height);padding-top:var(--plasma-counter-padding-top);padding-right:var(--plasma-counter-padding-right);padding-bottom:var(--plasma-counter-padding-bottom);padding-left:var(--plasma-counter-padding-left);}.base_4mz17d_b1t6e429__b5e2cba4.base_4mz17d__PlasmaCounterRound__b5e2cba4{width:var(--plasma-counter-height);}
|
479
479
|
|
480
480
|
.Counter_styles_1uue90v_b1dqw7l5__00d0b847{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-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;width:-webkit-max-content;width:-moz-max-content;width:max-content;}
|
481
481
|
|
@@ -621,18 +621,18 @@
|
|
621
621
|
|
622
622
|
.Chip_styles_1a752pa_scwjjdn__1a6784c0{--plasma-chip-color:var(--plasma-select-chip-color);--plasma-chip-color-hover:var(--plasma-select-chip-color);--plasma-chip-color-active:var(--plasma-select-chip-color);--plasma-chip-background:var(--plasma-select-chip-background);--plasma-chip-background-hover:var(--plasma-select-chip-background-hover);--plasma-chip-background-active:var(--plasma-select-chip-background-active);--plasma-chip-border-radius:var(--plasma-select-chip-border-radius);--plasma-chip-height:var(--plasma-select-chip-height);--plasma-chip-padding-right:var(--plasma-select-chip-padding-right);--plasma-chip-padding-left:var(--plasma-select-chip-padding-left);--plasma-chip-font-family:var(--plasma-select-font-family);--plasma-chip-font-size:var(--plasma-select-font-size);--plasma-chip-font-style:var(--plasma-select-font-style);--plasma-chip-font-weight:var(--plasma-select-font-weight);--plasma-chip-letter-spacing:var(--plasma-select-font-letter-spacing);--plasma-chip-lineheight:var(--plasma-select-font-line-height);--plasma-chip-clear-content-margin-left:var(--plasma-select-chip-clear-content-margin-left);--plasma-chip-clear-content-margin-right:var(--plasma-select-chip-clear-content-margin-right);--plasma-chip-close-icon-size:var(--plasma-select-chip-close-icon-size);--plasma-chip-close-icon-color:var(--plasma-select-chip-color);--plasma-chip-focus-color:var(--surface-accent);position:relative;}.Chip_styles_1a752pa_scwjjdn__1a6784c0::before{content:'';position:absolute;top:calc(var(--plasma-select-focus-offset) * -1);left:calc(var(--plasma-select-focus-offset) * -1);right:calc(var(--plasma-select-focus-offset) * -1);bottom:calc(var(--plasma-select-focus-offset) * -1);z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:calc(var(--plasma-select-chip-border-radius) + var(--plasma-select-focus-offset));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.Chip_styles_1a752pa_scwjjdn__1a6784c0.Chip_styles_1a752pa_selectChipIsFocused__1a6784c0:before{outline:none;box-shadow:0 0 0 0.0625rem var(--surface-accent);}
|
623
623
|
|
624
|
-
.
|
625
|
-
.
|
626
|
-
|
627
|
-
.
|
628
|
-
.
|
629
|
-
.
|
630
|
-
.
|
631
|
-
.
|
632
|
-
.
|
633
|
-
.
|
634
|
-
.
|
635
|
-
.
|
624
|
+
.Textfield_styles_11yj58s_t1yhwv5r__817000d1{display:inline;}.Textfield_styles_11yj58s_t1yhwv5r__817000d1 .Textfield_styles_11yj58s_selectTextfieldTarget__817000d1{-webkit-transition:100ms;transition:100ms;background:var(--t1yhwv5r-0);padding:var(--t1yhwv5r-1);border:var(--t1yhwv5r-2);}.Textfield_styles_11yj58s_t1yhwv5r__817000d1 .Textfield_styles_11yj58s_selectTextfieldTarget__817000d1:hover{-webkit-transition:100ms;transition:100ms;border:var(--t1yhwv5r-3);}.Textfield_styles_11yj58s_t1yhwv5r__817000d1 .Textfield_styles_11yj58s_selectWithoutBoxShadow__817000d1::before{box-shadow:none !important;}
|
625
|
+
.Textfield_styles_11yj58s_s7x5udn__817000d1{--plasma-button-color:var(--text-primary);--plasma-button-color-hover:var(--text-primary);--plasma-button-color-active:var(--text-primary);--plasma-button-height:var(--s7x5udn-0);--plasma-button-width:100%;--plasma-button-padding:var(--plasma-select-target-textfield-padding);--plasma-button-radius:var(--plasma-select-border-radius);--plasma-button-font-family:var(--plasma-select-font-family);--plasma-button-font-size:var(--plasma-select-font-size);--plasma-button-font-style:var(--plasma-select-font-style);--plasma-button-font-weight:var(--plasma-select-font-weight);--plasma-button-letter-spacing:var(--plasma-select-font-letter-spacing);--plasma-button-line-height:var(--plasma-select-font-line-height);--plasma-button-disabled-opacity:0.4;--plasma-button-focus-color:var(--surface-accent);box-shadow:inset 0 0 0 --plasma-select-target-textfield-border-size var(--plasma-select-target-textfield-border-color);text-align:left;position:relative;}.Textfield_styles_11yj58s_s7x5udn__817000d1::before{content:'';position:absolute;top:--plasma-select-target-textfield-border-size;left:--plasma-select-target-textfield-border-size;right:--plasma-select-target-textfield-border-size;bottom:--plasma-select-target-textfield-border-size;z-index:1;display:block;box-sizing:content-box;border:0.0625rem solid transparent;border-radius:calc(var(--plasma-select-border-radius) - --plasma-select-target-textfield-border-size);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.Textfield_styles_11yj58s_s7x5udn__817000d1.Textfield_styles_11yj58s_focusVisible__817000d1:focus::before,.Textfield_styles_11yj58s_s7x5udn__817000d1[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.0625rem var(--surface-accent);}
|
626
|
+
|
627
|
+
.Textfield_styles_11yj58s_i1kxyc50__817000d1{line-height:0;margin:var(--plasma-select-target-textfield-arrow-margin);color:var(--plasma-select-target-textfield-arrow-color);}.Textfield_styles_11yj58s_i1kxyc50__817000d1:hover{color:var(--plasma-select-target-textfield-arrow-color-hover);}.Textfield_styles_11yj58s_i1kxyc50__817000d1:active{color:var(--plasma-select-target-textfield-arrow-color-active);}
|
628
|
+
.Textfield_styles_11yj58s_wqzfsxn__817000d1{width:100%;height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;}.Textfield_styles_11yj58s_wqzfsxn__817000d1 .Textfield_styles_11yj58s_arrowInverse__817000d1{-webkit-transform:rotate(-180deg);-ms-transform:rotate(-180deg);transform:rotate(-180deg);}
|
629
|
+
.Textfield_styles_11yj58s_c1cgo38i__817000d1{width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-width:0;padding:var(--c1cgo38i-0);gap:0.25rem;overflow-x:scroll;border-top-right-radius:var(--plasma-select-chip-border-radius);border-bottom-right-radius:var(--plasma-select-chip-border-radius);-ms-overflow-style:none;-webkit-scrollbar-width:none;-moz-scrollbar-width:none;-ms-scrollbar-width:none;scrollbar-width:none;}.Textfield_styles_11yj58s_c1cgo38i__817000d1::-webkit-scrollbar{display:none;}
|
630
|
+
.Textfield_styles_11yj58s_l9ikjwc__817000d1{color:var(--text-secondary);font-family:var(--plasma-select-font-family);font-size:var(--plasma-select-font-size);font-style:var(--plasma-select-font-style);font-weight:var(--plasma-select-font-weight);-webkit-letter-spacing:var(--plasma-select-font-letter-spacing);-moz-letter-spacing:var(--plasma-select-font-letter-spacing);-ms-letter-spacing:var(--plasma-select-font-letter-spacing);letter-spacing:var(--plasma-select-font-letter-spacing);line-height:var(--plasma-select-font-line-height);}
|
631
|
+
.Textfield_styles_11yj58s_p1jn3k4y__817000d1{color:var(--text-secondary);font-family:var(--plasma-select-font-family);font-size:var(--plasma-select-font-size);font-style:var(--plasma-select-font-style);font-weight:var(--plasma-select-font-weight);-webkit-letter-spacing:var(--plasma-select-font-letter-spacing);-moz-letter-spacing:var(--plasma-select-font-letter-spacing);-ms-letter-spacing:var(--plasma-select-font-letter-spacing);letter-spacing:var(--plasma-select-font-letter-spacing);line-height:var(--plasma-select-font-line-height);}
|
632
|
+
.Textfield_styles_11yj58s_i8xlj9b__817000d1{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:start;-webkit-box-align:start;-ms-flex-align:start;align-items:start;row-gap:var(--plasma-select-inner-label-gap);font-family:var(--plasma-select-font-family);font-size:var(--plasma-select-font-size);font-style:var(--plasma-select-font-style);font-weight:var(--plasma-select-font-weight);-webkit-letter-spacing:var(--plasma-select-font-letter-spacing);-moz-letter-spacing:var(--plasma-select-font-letter-spacing);-ms-letter-spacing:var(--plasma-select-font-letter-spacing);letter-spacing:var(--plasma-select-font-letter-spacing);line-height:var(--plasma-select-font-line-height);}
|
633
|
+
.Textfield_styles_11yj58s_iu6fefp__817000d1{color:var(--text-secondary);font-family:var(--plasma-typo-body-xs-font-family);font-size:var(--plasma-typo-body-xs-font-size);font-style:var(--plasma-typo-body-xs-font-style);font-weight:var(--plasma-typo-body-xs-font-weight);-webkit-letter-spacing:var(--plasma-typo-body-xs-letter-spacing);-moz-letter-spacing:var(--plasma-typo-body-xs-letter-spacing);-ms-letter-spacing:var(--plasma-typo-body-xs-letter-spacing);letter-spacing:var(--plasma-typo-body-xs-letter-spacing);line-height:var(--plasma-typo-body-xs-line-height);text-align:left;}
|
634
|
+
.Textfield_styles_11yj58s_c1ox0htq__817000d1{-webkit-flex:none;-ms-flex:none;flex:none;margin-left:-0.125rem;margin-right:0.375rem;line-height:0;}
|
635
|
+
.Textfield_styles_11yj58s_v1kam5d__817000d1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
636
636
|
|
637
637
|
.Select_styles_768h42_spxbau6__d1d95a37 .Select_styles_768h42_popoverRoot__d1d95a37{width:var(--spxbau6-0);}.Select_styles_768h42_spxbau6__d1d95a37 .Select_styles_768h42_popoverTarget__d1d95a37{width:100%;}
|
638
638
|
.Select_styles_768h42_u1yey2x3__d1d95a37{box-sizing:border-box;background:var(--surface-solid-card);box-shadow:0px 4px 14px -4px rgba(8,8,8,0.08),0px 1px 4px -1px rgba(0,0,0,0.04);border-radius:var(--plasma-select-border-radius);width:var(--u1yey2x3-0);height:var(--u1yey2x3-1);overflow:var(--u1yey2x3-2);border:var(--plasma-select-popover-border-width) solid var(--plasma-select-popover-border-color);margin:var(--u1yey2x3-3);padding:var(--plasma-select-padding);}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@salutejs/plasma-new-hope",
|
3
|
-
"version": "0.179.0-
|
3
|
+
"version": "0.179.0-dev.0",
|
4
4
|
"description": "Salute Design System blueprint",
|
5
5
|
"main": "cjs/index.js",
|
6
6
|
"module": "es/index.js",
|
@@ -128,5 +128,5 @@
|
|
128
128
|
"sideEffects": [
|
129
129
|
"*.css"
|
130
130
|
],
|
131
|
-
"gitHead": "
|
131
|
+
"gitHead": "aa596a1d3ff9a3cab4f459fc72205c6a9d304ddf"
|
132
132
|
}
|
@@ -6,28 +6,38 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
});
|
7
7
|
exports.counterRoot = exports.counterConfig = void 0;
|
8
8
|
var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
|
9
|
+
var _utils = /*#__PURE__*/require("../../utils");
|
9
10
|
var _base = /*#__PURE__*/require("./variations/_view/base");
|
10
11
|
var _base2 = /*#__PURE__*/require("./variations/_size/base");
|
11
12
|
var _Counter = /*#__PURE__*/require("./Counter.styles");
|
12
|
-
var
|
13
|
+
var _Counter2 = /*#__PURE__*/require("./Counter.tokens");
|
14
|
+
var _excluded = ["count", "maxCount", "size", "view", "className"];
|
13
15
|
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); }
|
14
16
|
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 && {}.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; }
|
15
17
|
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); }
|
16
18
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
17
19
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
20
|
+
var MIN_COUNT = 1;
|
18
21
|
var counterRoot = exports.counterRoot = function counterRoot(Root) {
|
19
22
|
return /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
20
23
|
var count = props.count,
|
21
24
|
maxCount = props.maxCount,
|
22
25
|
size = props.size,
|
23
26
|
view = props.view,
|
27
|
+
className = props.className,
|
24
28
|
rest = _objectWithoutProperties(props, _excluded);
|
25
|
-
var
|
29
|
+
var currentCount = count < MIN_COUNT ? MIN_COUNT : count;
|
30
|
+
var currentMaxCount = maxCount && maxCount < MIN_COUNT ? MIN_COUNT : maxCount;
|
31
|
+
var isCurrentCountOneDigit = currentCount >= 0 && currentCount < 10;
|
32
|
+
var isCurrentMaxCountExceeded = currentMaxCount && currentCount > currentMaxCount;
|
33
|
+
var content = isCurrentMaxCountExceeded ? "".concat(currentMaxCount, "+") : currentCount;
|
34
|
+
var roundClass = !isCurrentMaxCountExceeded && isCurrentCountOneDigit ? _Counter2.classes.round : undefined;
|
26
35
|
return /*#__PURE__*/_react["default"].createElement(Root, _extends({
|
27
36
|
ref: ref,
|
28
37
|
view: view,
|
29
38
|
size: size,
|
30
|
-
count: count
|
39
|
+
count: count,
|
40
|
+
className: (0, _utils.cx)(roundClass, className)
|
31
41
|
}, rest), content);
|
32
42
|
});
|
33
43
|
};
|
@@ -12,7 +12,7 @@ import { PropsTable, Description } from '@site/src/components';
|
|
12
12
|
## Примеры
|
13
13
|
|
14
14
|
### Максимальное значение числового badge
|
15
|
-
Задается с помощью свойства `maxCount`.
|
15
|
+
Задается с помощью свойства `maxCount`. Как и `count`, не может быть меньше 1.
|
16
16
|
|
17
17
|
```tsx live
|
18
18
|
import React from 'react';
|
@@ -29,7 +29,7 @@ export function App() {
|
|
29
29
|
```
|
30
30
|
|
31
31
|
### Размер числового badge
|
32
|
-
Размер задается с помощью свойства `size`. Возможные значения свойства: `
|
32
|
+
Размер задается с помощью свойства `size`. Возможные значения свойства: `xxs`, `xs`, `s`, `m`, `l`.
|
33
33
|
|
34
34
|
```tsx live
|
35
35
|
import React from 'react';
|
@@ -3,7 +3,10 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.tokens = void 0;
|
6
|
+
exports.tokens = exports.classes = void 0;
|
7
|
+
var classes = exports.classes = {
|
8
|
+
round: '--plasma-counter-round'
|
9
|
+
};
|
7
10
|
var tokens = exports.tokens = {
|
8
11
|
background: '--plasma-counter-background',
|
9
12
|
color: '--plasma-counter-color',
|
@@ -6,4 +6,4 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.base = void 0;
|
7
7
|
var _styledComponents = /*#__PURE__*/require("styled-components");
|
8
8
|
var _Counter = /*#__PURE__*/require("../../Counter.tokens");
|
9
|
-
var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(["font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");border-radius:var(", ");height:var(", ");padding-top:var(", ");padding-right:var(", ");padding-bottom:var(", ");padding-left:var(", ");"], _Counter.tokens.fontFamily, _Counter.tokens.fontSize, _Counter.tokens.fontStyle, _Counter.tokens.fontWeight, _Counter.tokens.letterSpacing, _Counter.tokens.lineHeight, _Counter.tokens.borderRadius, _Counter.tokens.height, _Counter.tokens.paddingTop, _Counter.tokens.paddingRight, _Counter.tokens.paddingBottom, _Counter.tokens.paddingLeft);
|
9
|
+
var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(["font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");border-radius:var(", ");height:var(", ");padding-top:var(", ");padding-right:var(", ");padding-bottom:var(", ");padding-left:var(", ");&.", "{width:var(", ");}"], _Counter.tokens.fontFamily, _Counter.tokens.fontSize, _Counter.tokens.fontStyle, _Counter.tokens.fontWeight, _Counter.tokens.letterSpacing, _Counter.tokens.lineHeight, _Counter.tokens.borderRadius, _Counter.tokens.height, _Counter.tokens.paddingTop, _Counter.tokens.paddingRight, _Counter.tokens.paddingBottom, _Counter.tokens.paddingLeft, _Counter.classes.round, _Counter.tokens.height);
|
@@ -139,7 +139,7 @@ var popupRoot = exports.popupRoot = function popupRoot(Root) {
|
|
139
139
|
animationInfo: animationInfo,
|
140
140
|
setVisible: setVisible
|
141
141
|
}, children));
|
142
|
-
if (typeof frame !== 'string' && frame && frame.current) {
|
142
|
+
if (typeof frame !== 'string' && frame && frame.current && _utils.canUseDOM) {
|
143
143
|
return /*#__PURE__*/_react["default"].createElement(_Portal.Portal, {
|
144
144
|
container: frame.current
|
145
145
|
}, rootNode);
|
@@ -91,7 +91,7 @@ var PopupProvider = exports.PopupProvider = function PopupProvider(_ref) {
|
|
91
91
|
};
|
92
92
|
return /*#__PURE__*/_react["default"].createElement(PopupContext.Provider, {
|
93
93
|
value: context
|
94
|
-
}, children, /*#__PURE__*/_react["default"].createElement(_Portal.Portal, {
|
94
|
+
}, children, _utils.canUseDOM && /*#__PURE__*/_react["default"].createElement(_Portal.Portal, {
|
95
95
|
container: document.body
|
96
96
|
}, /*#__PURE__*/_react["default"].createElement(_Popup.StyledPortal, {
|
97
97
|
id: rootId
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.Portal = void 0;
|
7
7
|
var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react"));
|
8
8
|
var _reactDom = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react-dom"));
|
9
|
+
var _utils = /*#__PURE__*/require("../../utils");
|
9
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
10
11
|
/**
|
11
12
|
* Вспомогательный компонент. Используется в Popup, Popover.
|
@@ -16,6 +17,9 @@ var Portal = exports.Portal = function Portal(_ref) {
|
|
16
17
|
container = _ref.container,
|
17
18
|
_ref$disabled = _ref.disabled,
|
18
19
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled;
|
20
|
+
if (!_utils.canUseDOM) {
|
21
|
+
return null;
|
22
|
+
}
|
19
23
|
var portalContainer = typeof container === 'function' ? container() : container;
|
20
24
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, disabled && children, !disabled && /*#__PURE__*/_reactDom["default"].createPortal(children, portalContainer));
|
21
25
|
};
|
@@ -99,8 +99,7 @@ var tokens = exports.tokens = {
|
|
99
99
|
spinnerSize: '--plasma-select-spinner-size',
|
100
100
|
spinnerSizeTight: '--plasma-select-spinner-size-tight',
|
101
101
|
disclosureIconColor: '--plasma-select-disclosure-icon-color',
|
102
|
-
disclosureIconColorHover: '--plasma-select-disclosure-icon-color-hover'
|
103
|
-
contentLeftColor: '--plasma-select-content-left-color'
|
102
|
+
disclosureIconColorHover: '--plasma-select-disclosure-icon-color-hover'
|
104
103
|
};
|
105
104
|
var constants = exports.constants = {
|
106
105
|
focusColor: '--surface-accent',
|
@@ -70,7 +70,7 @@ var InnerLabel = exports.InnerLabel = /*#__PURE__*/_styledComponents["default"].
|
|
70
70
|
})(["color:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");text-align:left;"], _Select.constants.textfieldInnerLabelColor, _Select.constants.fontFamily, _Select.constants.fontSize, _Select.constants.fontStyle, _Select.constants.fontWeight, _Select.constants.fontLetterSpacing, _Select.constants.fontLineHeight);
|
71
71
|
var ContentLeftWrapper = exports.ContentLeftWrapper = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
72
72
|
componentId: "plasma-new-hope__sc-1akl2tk-10"
|
73
|
-
})(["flex:none;margin-left:-0.125rem;margin-right:0.375rem;line-height:0;
|
73
|
+
})(["flex:none;margin-left:-0.125rem;margin-right:0.375rem;line-height:0;"]);
|
74
74
|
var Value = exports.Value = /*#__PURE__*/_styledComponents["default"].span.withConfig({
|
75
75
|
componentId: "plasma-new-hope__sc-1akl2tk-11"
|
76
76
|
})(["", ""], /*#__PURE__*/(0, _mixins.applyEllipsis)());
|
@@ -22,8 +22,11 @@ var config = exports.config = {
|
|
22
22
|
light: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--on-light-text-primary);", ":var(--on-dark-surface-solid-default);"], _Counter.counterTokens.color, _Counter.counterTokens.background)
|
23
23
|
},
|
24
24
|
size: {
|
25
|
-
|
26
|
-
|
25
|
+
l: /*#__PURE__*/(0, _styledComponents.css)(["", ":1rem;", ":1.75rem;", ":0.625rem;", ":0.625rem;", ":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);"], _Counter.counterTokens.borderRadius, _Counter.counterTokens.height, _Counter.counterTokens.paddingRight, _Counter.counterTokens.paddingLeft, _Counter.counterTokens.fontFamily, _Counter.counterTokens.fontSize, _Counter.counterTokens.fontStyle, _Counter.counterTokens.fontWeight, _Counter.counterTokens.letterSpacing, _Counter.counterTokens.lineHeight),
|
26
|
+
m: /*#__PURE__*/(0, _styledComponents.css)(["", ":1rem;", ":1.5rem;", ":0.5rem;", ":0.5rem;", ":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);"], _Counter.counterTokens.borderRadius, _Counter.counterTokens.height, _Counter.counterTokens.paddingRight, _Counter.counterTokens.paddingLeft, _Counter.counterTokens.fontFamily, _Counter.counterTokens.fontSize, _Counter.counterTokens.fontStyle, _Counter.counterTokens.fontWeight, _Counter.counterTokens.letterSpacing, _Counter.counterTokens.lineHeight),
|
27
|
+
s: /*#__PURE__*/(0, _styledComponents.css)(["", ":1rem;", ":1.25rem;", ":0.375rem;", ":0.375rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);"], _Counter.counterTokens.borderRadius, _Counter.counterTokens.height, _Counter.counterTokens.paddingRight, _Counter.counterTokens.paddingLeft, _Counter.counterTokens.fontFamily, _Counter.counterTokens.fontSize, _Counter.counterTokens.fontStyle, _Counter.counterTokens.fontWeight, _Counter.counterTokens.letterSpacing, _Counter.counterTokens.lineHeight),
|
28
|
+
xs: /*#__PURE__*/(0, _styledComponents.css)(["", ":1rem;", ":1rem;", ":0.25rem;", ":0.25rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);"], _Counter.counterTokens.borderRadius, _Counter.counterTokens.height, _Counter.counterTokens.paddingRight, _Counter.counterTokens.paddingLeft, _Counter.counterTokens.fontFamily, _Counter.counterTokens.fontSize, _Counter.counterTokens.fontStyle, _Counter.counterTokens.fontWeight, _Counter.counterTokens.letterSpacing, _Counter.counterTokens.lineHeight),
|
29
|
+
xxs: /*#__PURE__*/(0, _styledComponents.css)(["", ":1rem;", ":0.75rem;", ":0.125rem;", ":0.125rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);"], _Counter.counterTokens.borderRadius, _Counter.counterTokens.height, _Counter.counterTokens.paddingRight, _Counter.counterTokens.paddingLeft, _Counter.counterTokens.fontFamily, _Counter.counterTokens.fontSize, _Counter.counterTokens.fontStyle, _Counter.counterTokens.fontWeight, _Counter.counterTokens.letterSpacing, _Counter.counterTokens.lineHeight)
|
27
30
|
}
|
28
31
|
}
|
29
32
|
};
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import React from 'react';
|
2
1
|
import { disableProps } from '@salutejs/plasma-sb-utils';
|
3
2
|
import type { StoryObj, Meta } from '@storybook/react';
|
4
3
|
|
@@ -6,19 +5,22 @@ import { WithTheme } from '../../../_helpers';
|
|
6
5
|
|
7
6
|
import { Counter } from './Counter';
|
8
7
|
|
8
|
+
const sizes = ['l', 'm', 's', 'xs', 'xxs'];
|
9
|
+
const views = ['default', 'accent', 'positive', 'warning', 'negative', 'dark', 'light'];
|
10
|
+
|
9
11
|
const meta: Meta<typeof Counter> = {
|
10
12
|
title: 'plasma_b2c/Counter',
|
11
13
|
component: Counter,
|
12
14
|
decorators: [WithTheme],
|
13
15
|
argTypes: {
|
14
16
|
size: {
|
15
|
-
options:
|
17
|
+
options: sizes,
|
16
18
|
control: {
|
17
19
|
type: 'select',
|
18
20
|
},
|
19
21
|
},
|
20
22
|
view: {
|
21
|
-
options:
|
23
|
+
options: views,
|
22
24
|
control: {
|
23
25
|
type: 'select',
|
24
26
|
},
|
@@ -33,8 +35,8 @@ type Story = StoryObj<typeof Counter>;
|
|
33
35
|
|
34
36
|
export const Default: Story = {
|
35
37
|
args: {
|
36
|
-
count:
|
37
|
-
maxCount:
|
38
|
+
count: 123,
|
39
|
+
maxCount: 200,
|
38
40
|
view: 'default',
|
39
41
|
size: 'xs',
|
40
42
|
},
|
@@ -22,8 +22,11 @@ var config = exports.config = {
|
|
22
22
|
light: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--on-light-text-primary);", ":var(--on-dark-surface-solid-default);"], _Counter.counterTokens.color, _Counter.counterTokens.background)
|
23
23
|
},
|
24
24
|
size: {
|
25
|
-
|
26
|
-
|
25
|
+
l: /*#__PURE__*/(0, _styledComponents.css)(["", ":1rem;", ":1.75rem;", ":0.625rem;", ":0.625rem;", ":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);"], _Counter.counterTokens.borderRadius, _Counter.counterTokens.height, _Counter.counterTokens.paddingRight, _Counter.counterTokens.paddingLeft, _Counter.counterTokens.fontFamily, _Counter.counterTokens.fontSize, _Counter.counterTokens.fontStyle, _Counter.counterTokens.fontWeight, _Counter.counterTokens.letterSpacing, _Counter.counterTokens.lineHeight),
|
26
|
+
m: /*#__PURE__*/(0, _styledComponents.css)(["", ":1rem;", ":1.5rem;", ":0.5rem;", ":0.5rem;", ":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);"], _Counter.counterTokens.borderRadius, _Counter.counterTokens.height, _Counter.counterTokens.paddingRight, _Counter.counterTokens.paddingLeft, _Counter.counterTokens.fontFamily, _Counter.counterTokens.fontSize, _Counter.counterTokens.fontStyle, _Counter.counterTokens.fontWeight, _Counter.counterTokens.letterSpacing, _Counter.counterTokens.lineHeight),
|
27
|
+
s: /*#__PURE__*/(0, _styledComponents.css)(["", ":1rem;", ":1.25rem;", ":0.375rem;", ":0.375rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);"], _Counter.counterTokens.borderRadius, _Counter.counterTokens.height, _Counter.counterTokens.paddingRight, _Counter.counterTokens.paddingLeft, _Counter.counterTokens.fontFamily, _Counter.counterTokens.fontSize, _Counter.counterTokens.fontStyle, _Counter.counterTokens.fontWeight, _Counter.counterTokens.letterSpacing, _Counter.counterTokens.lineHeight),
|
28
|
+
xs: /*#__PURE__*/(0, _styledComponents.css)(["", ":1rem;", ":1rem;", ":0.25rem;", ":0.25rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);"], _Counter.counterTokens.borderRadius, _Counter.counterTokens.height, _Counter.counterTokens.paddingRight, _Counter.counterTokens.paddingLeft, _Counter.counterTokens.fontFamily, _Counter.counterTokens.fontSize, _Counter.counterTokens.fontStyle, _Counter.counterTokens.fontWeight, _Counter.counterTokens.letterSpacing, _Counter.counterTokens.lineHeight),
|
29
|
+
xxs: /*#__PURE__*/(0, _styledComponents.css)(["", ":1rem;", ":0.75rem;", ":0.125rem;", ":0.125rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);"], _Counter.counterTokens.borderRadius, _Counter.counterTokens.height, _Counter.counterTokens.paddingRight, _Counter.counterTokens.paddingLeft, _Counter.counterTokens.fontFamily, _Counter.counterTokens.fontSize, _Counter.counterTokens.fontStyle, _Counter.counterTokens.fontWeight, _Counter.counterTokens.letterSpacing, _Counter.counterTokens.lineHeight)
|
27
30
|
}
|
28
31
|
}
|
29
32
|
};
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import React from 'react';
|
2
1
|
import { disableProps } from '@salutejs/plasma-sb-utils';
|
3
2
|
import type { StoryObj, Meta } from '@storybook/react';
|
4
3
|
|
@@ -6,19 +5,22 @@ import { WithTheme } from '../../../_helpers';
|
|
6
5
|
|
7
6
|
import { Counter } from './Counter';
|
8
7
|
|
8
|
+
const sizes = ['l', 'm', 's', 'xs', 'xxs'];
|
9
|
+
const views = ['default', 'accent', 'positive', 'warning', 'negative', 'dark', 'light'];
|
10
|
+
|
9
11
|
const meta: Meta<typeof Counter> = {
|
10
12
|
title: 'plasma_web/Counter',
|
11
13
|
component: Counter,
|
12
14
|
decorators: [WithTheme],
|
13
15
|
argTypes: {
|
14
16
|
size: {
|
15
|
-
options:
|
17
|
+
options: sizes,
|
16
18
|
control: {
|
17
19
|
type: 'select',
|
18
20
|
},
|
19
21
|
},
|
20
22
|
view: {
|
21
|
-
options:
|
23
|
+
options: views,
|
22
24
|
control: {
|
23
25
|
type: 'select',
|
24
26
|
},
|
@@ -33,8 +35,8 @@ type Story = StoryObj<typeof Counter>;
|
|
33
35
|
|
34
36
|
export const Default: Story = {
|
35
37
|
args: {
|
36
|
-
count:
|
37
|
-
maxCount:
|
38
|
+
count: 123,
|
39
|
+
maxCount: 200,
|
38
40
|
view: 'default',
|
39
41
|
size: 'xs',
|
40
42
|
},
|
@@ -1,24 +1,34 @@
|
|
1
|
-
var _excluded = ["count", "maxCount", "size", "view"];
|
1
|
+
var _excluded = ["count", "maxCount", "size", "view", "className"];
|
2
2
|
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); }
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
4
4
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
5
5
|
import React, { forwardRef } from 'react';
|
6
|
+
import { cx } from '../../utils';
|
6
7
|
import { base as viewCSS } from './variations/_view/base';
|
7
8
|
import { base as sizeCSS } from './variations/_size/base';
|
8
9
|
import { base } from './Counter.styles';
|
10
|
+
import { classes } from './Counter.tokens';
|
11
|
+
var MIN_COUNT = 1;
|
9
12
|
export var counterRoot = function counterRoot(Root) {
|
10
13
|
return /*#__PURE__*/forwardRef(function (props, ref) {
|
11
14
|
var count = props.count,
|
12
15
|
maxCount = props.maxCount,
|
13
16
|
size = props.size,
|
14
17
|
view = props.view,
|
18
|
+
className = props.className,
|
15
19
|
rest = _objectWithoutProperties(props, _excluded);
|
16
|
-
var
|
20
|
+
var currentCount = count < MIN_COUNT ? MIN_COUNT : count;
|
21
|
+
var currentMaxCount = maxCount && maxCount < MIN_COUNT ? MIN_COUNT : maxCount;
|
22
|
+
var isCurrentCountOneDigit = currentCount >= 0 && currentCount < 10;
|
23
|
+
var isCurrentMaxCountExceeded = currentMaxCount && currentCount > currentMaxCount;
|
24
|
+
var content = isCurrentMaxCountExceeded ? "".concat(currentMaxCount, "+") : currentCount;
|
25
|
+
var roundClass = !isCurrentMaxCountExceeded && isCurrentCountOneDigit ? classes.round : undefined;
|
17
26
|
return /*#__PURE__*/React.createElement(Root, _extends({
|
18
27
|
ref: ref,
|
19
28
|
view: view,
|
20
29
|
size: size,
|
21
|
-
count: count
|
30
|
+
count: count,
|
31
|
+
className: cx(roundClass, className)
|
22
32
|
}, rest), content);
|
23
33
|
});
|
24
34
|
};
|
@@ -12,7 +12,7 @@ import { PropsTable, Description } from '@site/src/components';
|
|
12
12
|
## Примеры
|
13
13
|
|
14
14
|
### Максимальное значение числового badge
|
15
|
-
Задается с помощью свойства `maxCount`.
|
15
|
+
Задается с помощью свойства `maxCount`. Как и `count`, не может быть меньше 1.
|
16
16
|
|
17
17
|
```tsx live
|
18
18
|
import React from 'react';
|
@@ -29,7 +29,7 @@ export function App() {
|
|
29
29
|
```
|
30
30
|
|
31
31
|
### Размер числового badge
|
32
|
-
Размер задается с помощью свойства `size`. Возможные значения свойства: `
|
32
|
+
Размер задается с помощью свойства `size`. Возможные значения свойства: `xxs`, `xs`, `s`, `m`, `l`.
|
33
33
|
|
34
34
|
```tsx live
|
35
35
|
import React from 'react';
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { css } from 'styled-components';
|
2
|
-
import { tokens } from '../../Counter.tokens';
|
3
|
-
export var base = /*#__PURE__*/css(["font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");border-radius:var(", ");height:var(", ");padding-top:var(", ");padding-right:var(", ");padding-bottom:var(", ");padding-left:var(", ");"], tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.borderRadius, tokens.height, tokens.paddingTop, tokens.paddingRight, tokens.paddingBottom, tokens.paddingLeft);
|
2
|
+
import { classes, tokens } from '../../Counter.tokens';
|
3
|
+
export var base = /*#__PURE__*/css(["font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");border-radius:var(", ");height:var(", ");padding-top:var(", ");padding-right:var(", ");padding-bottom:var(", ");padding-left:var(", ");&.", "{width:var(", ");}"], tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.borderRadius, tokens.height, tokens.paddingTop, tokens.paddingRight, tokens.paddingBottom, tokens.paddingLeft, classes.round, tokens.height);
|
@@ -130,7 +130,7 @@ export var popupRoot = function popupRoot(Root) {
|
|
130
130
|
animationInfo: animationInfo,
|
131
131
|
setVisible: setVisible
|
132
132
|
}, children));
|
133
|
-
if (typeof frame !== 'string' && frame && frame.current) {
|
133
|
+
if (typeof frame !== 'string' && frame && frame.current && canUseDOM) {
|
134
134
|
return /*#__PURE__*/React.createElement(Portal, {
|
135
135
|
container: frame.current
|
136
136
|
}, rootNode);
|