@salutejs/plasma-new-hope 0.194.1-canary.1569.11908076676.0 → 0.194.2-canary.1561.11922759758.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Combobox/ComboboxNew/Combobox.js +18 -4
- package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/Combobox.css +5 -4
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +5 -4
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +5 -4
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +5 -4
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +5 -4
- package/cjs/components/Dropdown/Dropdown.css +5 -4
- package/cjs/components/Dropdown/Dropdown.js +4 -2
- package/cjs/components/Dropdown/Dropdown.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.css +5 -4
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +3 -2
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +7 -1
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/{DropdownItem.styles_1b439rx.css → DropdownItem.styles_14yih1y.css} +1 -0
- package/cjs/components/Pagination/Pagination.css +2 -2
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +2 -2
- package/cjs/components/Select/Select.css +2 -2
- package/cjs/components/Select/Select.js +11 -5
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/Select/Select.tokens.js +11 -1
- package/cjs/components/Select/Select.tokens.js.map +1 -1
- package/cjs/components/Select/ui/Inner/Inner.css +2 -2
- package/cjs/components/Select/ui/Inner/ui/Item/Item.css +2 -2
- package/cjs/components/Select/ui/Inner/ui/Item/Item.js +1 -2
- package/cjs/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
- package/cjs/components/Select/ui/Target/Target.css +2 -2
- package/cjs/components/Select/ui/Target/Target.js +5 -4
- package/cjs/components/Select/ui/Target/Target.js.map +1 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +2 -2
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +21 -5
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +7 -7
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles_1b7iij0.css +3 -0
- package/cjs/components/Switch/Switch.css +1 -1
- package/cjs/components/Switch/Switch.tokens.js +1 -2
- package/cjs/components/Switch/Switch.tokens.js.map +1 -1
- package/cjs/components/Switch/_toggleSize/base.js +1 -1
- package/cjs/components/Switch/_toggleSize/base.js.map +1 -1
- package/cjs/components/Switch/_toggleSize/base_1d0b3t4.css +1 -0
- package/cjs/index.css +8 -7
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +22 -4
- package/emotion/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
- package/emotion/cjs/components/Dropdown/Dropdown.js +4 -2
- package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +3 -2
- package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +15 -11
- package/emotion/cjs/components/Select/Select.js +11 -5
- package/emotion/cjs/components/Select/Select.tokens.js +11 -1
- package/emotion/cjs/components/Select/ui/Inner/ui/Item/Item.js +1 -2
- package/emotion/cjs/components/Select/ui/Target/Target.js +5 -4
- package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +27 -5
- package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +3 -3
- package/emotion/cjs/components/Switch/Switch.tokens.js +1 -2
- package/emotion/cjs/components/Switch/_toggleSize/base.js +1 -1
- package/emotion/cjs/examples/plasma_b2c/components/Select/Select.config.js +20 -20
- package/emotion/cjs/examples/plasma_b2c/components/Select/Select.stories.tsx +25 -0
- package/emotion/cjs/examples/plasma_b2c/components/Switch/Switch.config.js +8 -8
- package/emotion/cjs/examples/plasma_b2c/components/Switch/Switch.outline.config.js +8 -8
- package/emotion/cjs/examples/plasma_web/components/Select/Select.config.js +20 -20
- package/emotion/cjs/examples/plasma_web/components/Select/Select.stories.tsx +24 -0
- package/emotion/cjs/examples/plasma_web/components/Switch/Switch.config.js +8 -8
- package/emotion/cjs/examples/plasma_web/components/Switch/Switch.outline.config.js +8 -8
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +22 -4
- package/emotion/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
- package/emotion/es/components/Dropdown/Dropdown.js +4 -2
- package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +4 -3
- package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +15 -11
- package/emotion/es/components/Select/Select.js +11 -5
- package/emotion/es/components/Select/Select.tokens.js +11 -1
- package/emotion/es/components/Select/ui/Inner/ui/Item/Item.js +1 -2
- package/emotion/es/components/Select/ui/Target/Target.js +5 -4
- package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.js +27 -5
- package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +3 -3
- package/emotion/es/components/Switch/Switch.tokens.js +1 -2
- package/emotion/es/components/Switch/_toggleSize/base.js +2 -2
- package/emotion/es/examples/plasma_b2c/components/Select/Select.config.js +20 -20
- package/emotion/es/examples/plasma_b2c/components/Select/Select.stories.tsx +25 -0
- package/emotion/es/examples/plasma_b2c/components/Switch/Switch.config.js +8 -8
- package/emotion/es/examples/plasma_b2c/components/Switch/Switch.outline.config.js +8 -8
- package/emotion/es/examples/plasma_web/components/Select/Select.config.js +20 -20
- package/emotion/es/examples/plasma_web/components/Select/Select.stories.tsx +24 -0
- package/emotion/es/examples/plasma_web/components/Switch/Switch.config.js +8 -8
- package/emotion/es/examples/plasma_web/components/Switch/Switch.outline.config.js +8 -8
- package/es/components/Combobox/ComboboxNew/Combobox.js +19 -5
- package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/Combobox.css +5 -4
- package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +5 -4
- package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +5 -4
- package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +5 -4
- package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +5 -4
- package/es/components/Dropdown/Dropdown.css +5 -4
- package/es/components/Dropdown/Dropdown.js +4 -2
- package/es/components/Dropdown/Dropdown.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.css +5 -4
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +4 -3
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +7 -2
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItem/{DropdownItem.styles_1b439rx.css → DropdownItem.styles_14yih1y.css} +1 -0
- package/es/components/Pagination/Pagination.css +2 -2
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +2 -2
- package/es/components/Select/Select.css +2 -2
- package/es/components/Select/Select.js +11 -5
- package/es/components/Select/Select.js.map +1 -1
- package/es/components/Select/Select.tokens.js +11 -1
- package/es/components/Select/Select.tokens.js.map +1 -1
- package/es/components/Select/ui/Inner/Inner.css +2 -2
- package/es/components/Select/ui/Inner/ui/Item/Item.css +2 -2
- package/es/components/Select/ui/Inner/ui/Item/Item.js +1 -2
- package/es/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
- package/es/components/Select/ui/Target/Target.css +2 -2
- package/es/components/Select/ui/Target/Target.js +5 -4
- package/es/components/Select/ui/Target/Target.js.map +1 -1
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +2 -2
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +22 -6
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +7 -7
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles_1b7iij0.css +3 -0
- package/es/components/Switch/Switch.css +1 -1
- package/es/components/Switch/Switch.tokens.js +1 -2
- package/es/components/Switch/Switch.tokens.js.map +1 -1
- package/es/components/Switch/_toggleSize/base.js +1 -1
- package/es/components/Switch/_toggleSize/base.js.map +1 -1
- package/es/components/Switch/_toggleSize/base_1d0b3t4.css +1 -0
- package/es/index.css +8 -7
- package/package.json +3 -2
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +22 -4
- package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
- package/styled-components/cjs/components/Dropdown/Dropdown.js +4 -2
- package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +3 -2
- package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +5 -2
- package/styled-components/cjs/components/Select/Select.js +11 -5
- package/styled-components/cjs/components/Select/Select.tokens.js +11 -1
- package/styled-components/cjs/components/Select/ui/Inner/ui/Item/Item.js +1 -2
- package/styled-components/cjs/components/Select/ui/Target/Target.js +5 -4
- package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +27 -5
- package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +2 -2
- package/styled-components/cjs/components/Switch/Switch.tokens.js +1 -2
- package/styled-components/cjs/components/Switch/_toggleSize/base.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Select/Select.config.js +8 -8
- package/styled-components/cjs/examples/plasma_b2c/components/Select/Select.stories.tsx +25 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Switch/Switch.config.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Switch/Switch.outline.config.js +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Select/Select.config.js +8 -8
- package/styled-components/cjs/examples/plasma_web/components/Select/Select.stories.tsx +24 -0
- package/styled-components/cjs/examples/plasma_web/components/Switch/Switch.config.js +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Switch/Switch.outline.config.js +1 -1
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +22 -4
- package/styled-components/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
- package/styled-components/es/components/Dropdown/Dropdown.js +4 -2
- package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +4 -3
- package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +5 -2
- package/styled-components/es/components/Select/Select.js +11 -5
- package/styled-components/es/components/Select/Select.tokens.js +11 -1
- package/styled-components/es/components/Select/ui/Inner/ui/Item/Item.js +1 -2
- package/styled-components/es/components/Select/ui/Target/Target.js +5 -4
- package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.js +27 -5
- package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +2 -2
- package/styled-components/es/components/Switch/Switch.tokens.js +1 -2
- package/styled-components/es/components/Switch/_toggleSize/base.js +2 -2
- package/styled-components/es/examples/plasma_b2c/components/Select/Select.config.js +8 -8
- package/styled-components/es/examples/plasma_b2c/components/Select/Select.stories.tsx +25 -0
- package/styled-components/es/examples/plasma_b2c/components/Switch/Switch.config.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Switch/Switch.outline.config.js +1 -1
- package/styled-components/es/examples/plasma_web/components/Select/Select.config.js +8 -8
- package/styled-components/es/examples/plasma_web/components/Select/Select.stories.tsx +24 -0
- package/styled-components/es/examples/plasma_web/components/Switch/Switch.config.js +1 -1
- package/styled-components/es/examples/plasma_web/components/Switch/Switch.outline.config.js +1 -1
- package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +1 -2
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.d.ts +50 -2
- package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.types.d.ts +11 -6
- package/types/components/Dropdown/Dropdown.types.d.ts.map +1 -1
- package/types/components/Dropdown/index.d.ts +1 -0
- package/types/components/Dropdown/index.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts +1 -0
- package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts.map +1 -1
- package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts +96 -0
- package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts.map +1 -1
- package/types/components/Select/Select.d.ts.map +1 -1
- package/types/components/Select/Select.tokens.d.ts +11 -1
- package/types/components/Select/Select.tokens.d.ts.map +1 -1
- package/types/components/Select/Select.types.d.ts +5 -4
- package/types/components/Select/Select.types.d.ts.map +1 -1
- package/types/components/Select/ui/Inner/ui/Item/Item.d.ts.map +1 -1
- package/types/components/Select/ui/Target/Target.d.ts +2 -1
- package/types/components/Select/ui/Target/Target.d.ts.map +1 -1
- package/types/components/Select/ui/Target/Target.types.d.ts +3 -2
- package/types/components/Select/ui/Target/Target.types.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts.map +1 -1
- package/types/components/Switch/Switch.tokens.d.ts +1 -2
- package/types/components/Switch/Switch.tokens.d.ts.map +1 -1
- package/types/components/Switch/_toggleSize/base.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts +25 -1
- package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Select/Select.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Select/Select.d.ts +96 -0
- package/types/examples/plasma_b2c/components/Select/Select.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Switch/Switch.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Switch/Switch.outline.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts +25 -1
- package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Select/Select.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Select/Select.d.ts +96 -0
- package/types/examples/plasma_web/components/Select/Select.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Switch/Switch.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Switch/Switch.outline.config.d.ts.map +1 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles_q4kc1p.css +0 -3
- package/cjs/components/Switch/_toggleSize/base_o6rjc1.css +0 -1
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles_q4kc1p.css +0 -3
- package/es/components/Switch/_toggleSize/base_o6rjc1.css +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Textfield.js","sources":["../../../../../../../src/components/Select/ui/Target/ui/Textfield/Textfield.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { sizeToIconSize, getItemId } from '../../../../utils';\nimport { classes } from '../../../../Select.tokens';\n\nimport { IconArrowWrapper, StyledArrow, StyledTextField } from './Textfield.styles';\nimport { TextfieldProps } from './Textfield.types';\n\nexport const Textfield = forwardRef<HTMLInputElement, TextfieldProps>(\n (\n {\n inputWrapperRef,\n opened,\n multiselect,\n value,\n label,\n placeholder,\n onKeyDown,\n labelPlacement,\n size,\n view,\n handleClickArrow,\n contentLeft,\n helperText,\n treeId,\n activeDescendantItemValue,\n disabled,\n isTargetAmount,\n valueToItemMap,\n renderValue,\n onChange,\n labelToItemMap,\n chipView,\n },\n ref,\n ) => {\n const withArrowInverse = opened ? classes.arrowInverse : undefined;\n\n const getChips = (): string[] => {\n if (multiselect && Array.isArray(value)) {\n if (value.length === 0) return [];\n\n if (isTargetAmount) {\n return [`Выбрано ${value.length}`];\n }\n\n const renderValueMapper =\n renderValue && ((stringValue: string | number) => renderValue(valueToItemMap.get(stringValue)!));\n const valueToItemMapper = (stringValue: string | number) => valueToItemMap.get(stringValue)!.label;\n\n return value.map(renderValueMapper || valueToItemMapper);\n }\n\n return [];\n };\n\n // Обработчик чипов\n const handleChipsChange = (chipLabels: any[]) => {\n onChange(chipLabels.map((chipLabel) => labelToItemMap.get(chipLabel)!.value));\n };\n\n return (\n <StyledTextField\n ref={ref}\n inputWrapperRef={inputWrapperRef}\n readOnly\n value={multiselect ? undefined : valueToItemMap.get(value.toString())?.label || ''}\n size={size}\n view={view}\n chipView={chipView}\n labelPlacement={labelPlacement}\n disabled={disabled}\n label={label}\n placeholder={value instanceof Array && value.length ? '' : placeholder}\n contentLeft={contentLeft as React.ReactElement}\n contentRight={\n <IconArrowWrapper disabled={Boolean(disabled)} onClick={handleClickArrow}>\n <StyledArrow color=\"inherit\" size={sizeToIconSize(size)} className={withArrowInverse} />\n </IconArrowWrapper>\n }\n onKeyDown={onKeyDown}\n leftHelper={helperText}\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-controls={`${treeId}_tree_level_1`}\n aria-expanded={opened}\n aria-activedescendant={activeDescendantItemValue ? getItemId(treeId, activeDescendantItemValue) : ''}\n {...(multiselect\n ? {\n enumerationType: 'chip',\n chips: getChips(),\n onChangeChips: handleChipsChange,\n }\n : { enumerationType: 'plain' })}\n onEnterDisabled // Пропс для отключения обработчика Enter внутри Textfield\n opened={opened}\n // TODO: #1547\n _forceChipManipulationWithReadonly\n />\n );\n },\n);\n"],"names":["Textfield","forwardRef","_ref","ref","_valueToItemMap$get","inputWrapperRef","opened","multiselect","value","label","placeholder","onKeyDown","labelPlacement","size","view","handleClickArrow","contentLeft","helperText","treeId","activeDescendantItemValue","disabled","isTargetAmount","valueToItemMap","renderValue","onChange","labelToItemMap","chipView","withArrowInverse","classes","arrowInverse","undefined","getChips","Array","isArray","length","concat","renderValueMapper","stringValue","get","valueToItemMapper","map","handleChipsChange","chipLabels","chipLabel","React","createElement","StyledTextField","_extends","readOnly","toString","contentRight","IconArrowWrapper","Boolean","onClick","StyledArrow","color","sizeToIconSize","className","leftHelper","role","getItemId","enumerationType","chips","onChangeChips","onEnterDisabled","_forceChipManipulationWithReadonly"],"mappings":";;;;;;;AAQO,IAAMA,SAAS,gBAAGC,UAAU,CAC/B,UAAAC,IAAA,
|
1
|
+
{"version":3,"file":"Textfield.js","sources":["../../../../../../../src/components/Select/ui/Target/ui/Textfield/Textfield.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { sizeToIconSize, getItemId } from '../../../../utils';\nimport { classes } from '../../../../Select.tokens';\n\nimport { IconArrowWrapper, StyledArrow, StyledTextField } from './Textfield.styles';\nimport { TextfieldProps } from './Textfield.types';\n\nexport const Textfield = forwardRef<HTMLInputElement, TextfieldProps>(\n (\n {\n inputWrapperRef,\n opened,\n multiselect,\n value,\n label,\n placeholder,\n onKeyDown,\n labelPlacement,\n size,\n view,\n handleClickArrow,\n contentLeft,\n helperText,\n treeId,\n activeDescendantItemValue,\n disabled,\n isTargetAmount,\n valueToItemMap,\n renderValue,\n onChange,\n labelToItemMap,\n chipView,\n requiredProps,\n },\n ref,\n ) => {\n const withArrowInverse = opened ? classes.arrowInverse : undefined;\n\n const getChips = (): string[] => {\n if (multiselect && Array.isArray(value)) {\n if (value.length === 0) return [];\n\n if (isTargetAmount) {\n return [`Выбрано ${value.length}`];\n }\n\n const renderValueMapper =\n renderValue && ((stringValue: string | number) => renderValue(valueToItemMap.get(stringValue)!));\n const valueToItemMapper = (stringValue: string | number) => valueToItemMap.get(stringValue)!.label;\n\n return value.map(renderValueMapper || valueToItemMapper);\n }\n\n return [];\n };\n\n // Обработчик чипов\n const handleChipsChange = (chipLabels: any[]) => {\n if (!Array.isArray(value)) return;\n\n // TODO: #1564\n // Из лейблов чипов получаем value у item и далее прокидываем его в onChange.\n if (renderValue && !isTargetAmount) {\n const resultValues = [...value];\n\n value.forEach((_, index) => {\n const labelAfterRenderValue = renderValue(\n labelToItemMap.get(valueToItemMap.get(value[index])!.label)!,\n );\n\n if (!chipLabels.includes(labelAfterRenderValue)) {\n resultValues.splice(index, 1);\n }\n });\n\n onChange(resultValues);\n } else {\n onChange(chipLabels.map((chipLabel) => labelToItemMap.get(chipLabel)!.value));\n }\n };\n\n return (\n <StyledTextField\n ref={ref}\n inputWrapperRef={inputWrapperRef}\n readOnly\n value={multiselect ? undefined : valueToItemMap.get(value.toString())?.label || ''}\n size={size}\n view={view}\n chipView={chipView}\n labelPlacement={labelPlacement}\n disabled={disabled}\n label={label}\n placeholder={value instanceof Array && value.length ? '' : placeholder}\n contentLeft={contentLeft as React.ReactElement}\n contentRight={\n <IconArrowWrapper disabled={Boolean(disabled)} onClick={handleClickArrow}>\n <StyledArrow color=\"inherit\" size={sizeToIconSize(size)} className={withArrowInverse} />\n </IconArrowWrapper>\n }\n onKeyDown={onKeyDown}\n leftHelper={helperText}\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-controls={`${treeId}_tree_level_1`}\n aria-expanded={opened}\n aria-activedescendant={activeDescendantItemValue ? getItemId(treeId, activeDescendantItemValue) : ''}\n {...(multiselect\n ? {\n enumerationType: 'chip',\n chips: getChips(),\n onChangeChips: handleChipsChange,\n }\n : { enumerationType: 'plain' })}\n onEnterDisabled // Пропс для отключения обработчика Enter внутри Textfield\n opened={opened}\n // TODO: #1547\n _forceChipManipulationWithReadonly\n {...requiredProps}\n />\n );\n },\n);\n"],"names":["Textfield","forwardRef","_ref","ref","_valueToItemMap$get","inputWrapperRef","opened","multiselect","value","label","placeholder","onKeyDown","labelPlacement","size","view","handleClickArrow","contentLeft","helperText","treeId","activeDescendantItemValue","disabled","isTargetAmount","valueToItemMap","renderValue","onChange","labelToItemMap","chipView","requiredProps","withArrowInverse","classes","arrowInverse","undefined","getChips","Array","isArray","length","concat","renderValueMapper","stringValue","get","valueToItemMapper","map","handleChipsChange","chipLabels","resultValues","_toConsumableArray","forEach","_","index","labelAfterRenderValue","includes","splice","chipLabel","React","createElement","StyledTextField","_extends","readOnly","toString","contentRight","IconArrowWrapper","Boolean","onClick","StyledArrow","color","sizeToIconSize","className","leftHelper","role","getItemId","enumerationType","chips","onChangeChips","onEnterDisabled","_forceChipManipulationWithReadonly"],"mappings":";;;;;;;AAQO,IAAMA,SAAS,gBAAGC,UAAU,CAC/B,UAAAC,IAAA,EA0BIC,GAAG,EACF;AAAA,EAAA,IAAAC,mBAAA,CAAA;AAAA,EAAA,IAzBGC,eAAe,GAAAH,IAAA,CAAfG,eAAe;IACfC,MAAM,GAAAJ,IAAA,CAANI,MAAM;IACNC,WAAW,GAAAL,IAAA,CAAXK,WAAW;IACXC,KAAK,GAAAN,IAAA,CAALM,KAAK;IACLC,KAAK,GAAAP,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AAEA,SAAU;AACrBwD,IAAAA,UAAU,EAAElD,UAAW;AACvBmD,IAAAA,IAAI,EAAC,UAAU;AACf,IAAA,mBAAA,EAAkB,MAAM;IACxB,eAAAhC,EAAAA,EAAAA,CAAAA,MAAA,CAAkBlB,MAAM,EAAgB,eAAA,CAAA;AACxC,IAAA,eAAA,EAAeZ,MAAO;IACtB,uBAAuBa,EAAAA,yBAAyB,GAAGkD,SAAS,CAACnD,MAAM,EAAEC,yBAAyB,CAAC,GAAG,EAAA;AAAG,GAAA,EAChGZ,WAAW,GACV;AACI+D,IAAAA,eAAe,EAAE,MAAM;IACvBC,KAAK,EAAEvC,QAAQ,EAAE;AACjBwC,IAAAA,aAAa,EAAE9B,iBAAAA;AACnB,GAAC,GACD;AAAE4B,IAAAA,eAAe,EAAE,OAAA;GAAS,EAAA;AAClCG,IAAAA,eAAe,EAAC,IAAA;AAAA;AAChBnE,IAAAA,MAAM,EAAEA,MAAAA;AACR;AAAA;IACAoE,kCAAkC,EAAA,IAAA;GAC9B/C,EAAAA,aAAa,CACpB,CAAC,CAAA;AAEV,CACJ;;;;"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import './Textfield.
|
1
|
+
import './Textfield.styles_1b7iij0.css';
|
2
2
|
import { styled } from '@linaria/react';
|
3
3
|
import { tokens } from '../../../../Select.tokens.js';
|
4
4
|
import { IconDisclosureDownCentered } from '../../../../../_Icon/Icons/IconDisclosureDownCentered.js';
|
@@ -38,13 +38,13 @@ var StyledTextField = /*#__PURE__*/styled(_exp())({
|
|
38
38
|
"s1yhwv5r-2": [/*#__PURE__*/_exp25()]
|
39
39
|
}
|
40
40
|
});
|
41
|
-
var
|
41
|
+
var _exp226 = function _exp226() {
|
42
42
|
return function (_ref4) {
|
43
43
|
var disabled = _ref4.disabled;
|
44
44
|
return disabled ? 'inherit' : 'pointer';
|
45
45
|
};
|
46
46
|
};
|
47
|
-
var
|
47
|
+
var _exp228 = function _exp228() {
|
48
48
|
return function (_ref5) {
|
49
49
|
var disabled = _ref5.disabled;
|
50
50
|
return disabled ? "var(".concat(tokens.disclosureIconColor, ")") : "var(".concat(tokens.disclosureIconColorHover, ")");
|
@@ -55,14 +55,14 @@ var IconArrowWrapper = /*#__PURE__*/styled('div')({
|
|
55
55
|
"class": "i7x5udn",
|
56
56
|
propsAsIs: false,
|
57
57
|
vars: {
|
58
|
-
"i7x5udn-0": [/*#__PURE__*/
|
59
|
-
"i7x5udn-1": [/*#__PURE__*/
|
58
|
+
"i7x5udn-0": [/*#__PURE__*/_exp226()],
|
59
|
+
"i7x5udn-1": [/*#__PURE__*/_exp228()]
|
60
60
|
}
|
61
61
|
});
|
62
|
-
var
|
62
|
+
var _exp229 = function _exp229() {
|
63
63
|
return IconDisclosureDownCentered;
|
64
64
|
};
|
65
|
-
var StyledArrow = /*#__PURE__*/styled(
|
65
|
+
var StyledArrow = /*#__PURE__*/styled(_exp229())({
|
66
66
|
name: "StyledArrow",
|
67
67
|
"class": "s2oocb4",
|
68
68
|
propsAsIs: true
|
@@ -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 { component, mergeConfig } from '../../../../../../engines';\nimport { textFieldConfig, textFieldTokens } from '../../../../../TextField';\nimport { tokens, classes } from '../../../../Select.tokens';\nimport { IconDisclosureDownCentered } from '../../../../../_Icon';\n\nconst mergedConfig = mergeConfig(textFieldConfig);\nconst TextField = component(mergedConfig);\n\nexport const StyledTextField = styled(TextField)<{ opened: boolean }>`\n ${textFieldTokens.color}: var(${tokens.textFieldColor});\n ${textFieldTokens.backgroundColor}: var(${tokens.textFieldBackgroundColor});\n ${textFieldTokens.borderColor}: var(${tokens.textFieldBorderColor});\n ${textFieldTokens.placeholderColor}: var(${tokens.textFieldPlaceholderColor});\n ${textFieldTokens.labelColor}: var(${tokens.textFieldLabelColor});\n ${textFieldTokens.leftHelperColor}: var(${tokens.textFieldLeftHelperColor});\n\n ${textFieldTokens.colorReadOnly}: var(${tokens.textFieldColor});\n ${textFieldTokens.backgroundColorReadOnly}: ${({ opened }) =>\n opened ? `var(${tokens.textFieldBackgroundColorFocus})` : `var(${tokens.textFieldBackgroundColor})`};\n ${textFieldTokens.placeholderColorReadOnly}: ${({ opened }) =>\n opened ? `var(${tokens.textFieldPlaceholderColorFocus})` : `var(${tokens.textFieldPlaceholderColor})`};\n ${textFieldTokens.leftHelperColorReadOnly}: var(${tokens.textFieldLeftHelperColor});\n ${textFieldTokens.labelColorReadOnly}: var(${tokens.textFieldLabelColor});\n ${textFieldTokens.borderColorReadOnly}: ${({ opened }) =>\n opened ? `var(${tokens.textFieldBorderColorFocus})` : `var(${tokens.textFieldBorderColor})`};\n\n ${textFieldTokens.placeholderColor}: var(${tokens.textFieldPlaceholderColor});\n\n ${textFieldTokens.borderColorHover}: var(${tokens.textFieldBorderColorHover});\n ${textFieldTokens.borderColorFocus}: var(${tokens.textFieldBorderColorFocus});\n\n ${textFieldTokens.optionalColor}: var(${tokens.textFieldOptionalColor});\n\n ${textFieldTokens.height}: var(${tokens.textFieldHeight});\n ${textFieldTokens.borderWidth}: var(${tokens.textFieldBorderWidth});\n ${textFieldTokens.borderRadius}: var(${tokens.textFieldBorderRadius});\n\n ${textFieldTokens.padding}: var(${tokens.textFieldPadding});\n ${textFieldTokens.paddingWithChips}: var(${tokens.textFieldPaddingWithChips});\n\n ${textFieldTokens.leftContentMargin}: var(${tokens.textFieldLeftContentMargin});\n ${textFieldTokens.rightContentMargin}: var(${tokens.textFieldRightContentMargin});\n\n ${textFieldTokens.fontFamily}: var(${tokens.textFieldFontFamily});\n ${textFieldTokens.fontStyle}: var(${tokens.textFieldFontStyle});\n ${textFieldTokens.fontSize}: var(${tokens.textFieldFontSize});\n ${textFieldTokens.fontWeight}: var(${tokens.textFieldFontWeight});\n ${textFieldTokens.letterSpacing}: var(${tokens.textFieldLetterSpacing});\n ${textFieldTokens.lineHeight}: var(${tokens.textFieldLineHeight});\n\n ${textFieldTokens.contentSlotColor}: var(${tokens.textFieldContentSlotColor});\n ${textFieldTokens.contentSlotColorHover}: var(${tokens.textFieldContentSlotColorHover});\n ${textFieldTokens.contentSlotColorActive}: var(${tokens.textFieldContentSlotColorActive});\n\n ${textFieldTokens.contentSlotRightColor}: var(${tokens.textFieldContentSlotRightColor});\n ${textFieldTokens.contentSlotRightColorHover}: var(${tokens.textFieldContentSlotRightColorHover});\n ${textFieldTokens.contentSlotRightColorActive}: var(${tokens.textFieldContentSlotRightColorActive});\n\n ${textFieldTokens.labelOffset}: var(${tokens.textFieldLabelOffset});\n\n ${textFieldTokens.labelFontFamily}: var(${tokens.textFieldLabelFontFamily});\n ${textFieldTokens.labelFontStyle}: var(${tokens.textFieldLabelFontStyle});\n ${textFieldTokens.labelFontSize}: var(${tokens.textFieldLabelFontSize});\n ${textFieldTokens.labelFontWeight}: var(${tokens.textFieldLabelFontWeight});\n ${textFieldTokens.labelLetterSpacing}: var(${tokens.textFieldLabelLetterSpacing});\n ${textFieldTokens.labelLineHeight}: var(${tokens.textFieldLabelLineHeight});\n\n ${textFieldTokens.labelInnerFontFamily}: var(${tokens.textFieldLabelInnerFontFamily});\n ${textFieldTokens.labelInnerFontStyle}: var(${tokens.textFieldLabelInnerFontStyle});\n ${textFieldTokens.labelInnerFontSize}: var(${tokens.textFieldLabelInnerFontSize});\n ${textFieldTokens.labelInnerFontWeight}: var(${tokens.textFieldLabelInnerFontWeight});\n ${textFieldTokens.labelInnerLetterSpacing}: var(${tokens.textFieldLabelInnerLetterSpacing});\n ${textFieldTokens.labelInnerLineHeight}: var(${tokens.textFieldLabelInnerLineHeight});\n\n ${textFieldTokens.labelInnerPadding}: var(${tokens.textFieldLabelInnerPadding});\n ${textFieldTokens.contentLabelInnerPadding}: var(${tokens.textFieldContentLabelInnerPadding});\n\n ${textFieldTokens.titleCaptionColor}: var(${tokens.textFieldTitleCaptionColor});\n ${textFieldTokens.titleCaptionInnerLabelOffset}: var(${tokens.textFieldTitleCaptionInnerLabelOffset});\n\n ${textFieldTokens.titleCaptionFontFamily}: var(${tokens.textFieldTitleCaptionFontFamily});\n ${textFieldTokens.titleCaptionFontStyle}: var(${tokens.textFieldTitleCaptionFontStyle});\n ${textFieldTokens.titleCaptionFontSize}: var(${tokens.textFieldTitleCaptionFontSize});\n ${textFieldTokens.titleCaptionFontWeight}: var(${tokens.textFieldTitleCaptionFontWeight});\n ${textFieldTokens.titleCaptionLetterSpacing}: var(${tokens.textFieldTitleCaptionLetterSpacing});\n ${textFieldTokens.titleCaptionLineHeight}: var(${tokens.textFieldTitleCaptionLineHeight});\n\n ${textFieldTokens.leftHelperOffset}: var(${tokens.textFieldLeftHelperOffset});\n\n ${textFieldTokens.leftHelperFontFamily}: var(${tokens.textFieldLeftHelperFontFamily});\n ${textFieldTokens.leftHelperFontStyle}: var(${tokens.textFieldLeftHelperFontStyle});\n ${textFieldTokens.leftHelperFontSize}: var(${tokens.textFieldLeftHelperFontSize});\n ${textFieldTokens.leftHelperFontWeight}: var(${tokens.textFieldLeftHelperFontWeight});\n ${textFieldTokens.leftHelperLetterSpacing}: var(${tokens.textFieldLeftHelperLetterSpacing});\n ${textFieldTokens.leftHelperLineHeight}: var(${tokens.textFieldLeftHelperLineHeight});\n\n ${textFieldTokens.textBeforeColor}: var(${tokens.textFieldTextBeforeColor});\n ${textFieldTokens.textAfterColor}: var(${tokens.textFieldTextAfterColor});\n ${textFieldTokens.textBeforeMargin}: var(${tokens.textFieldTextBeforeMargin});\n ${textFieldTokens.textAfterMargin}: var(${tokens.textFieldTextAfterMargin});\n\n ${textFieldTokens.disabledOpacity}: var(${tokens.textFieldDisabledOpacity});\n\n ${textFieldTokens.chipHeight}: var(${tokens.textFieldChipHeight});\n ${textFieldTokens.chipBorderRadius}: var(${tokens.textFieldChipBorderRadius});\n ${textFieldTokens.chipGap}: var(${tokens.textFieldChipGap});\n ${textFieldTokens.chipColor}: var(${tokens.textFieldChipColor});\n ${textFieldTokens.chipColorHover}: var(${tokens.textFieldChipColorHover});\n ${textFieldTokens.chipScaleHover}: var(${tokens.textFieldChipScaleHover});\n ${textFieldTokens.chipBackground}: var(${tokens.textFieldChipBackground});\n ${textFieldTokens.chipBackgroundActive}: var(${tokens.textFieldChipBackgroundActive});\n ${textFieldTokens.chipColorActive}: var(${tokens.textFieldChipColorActive});\n ${textFieldTokens.chipScaleActive}: var(${tokens.textFieldChipScaleActive});\n ${textFieldTokens.chipCloseIconColor}: var(${tokens.textFieldChipCloseIconColor});\n ${textFieldTokens.chipOutlineSize}: var(${tokens.textFieldChipOutlineSize});\n ${textFieldTokens.chipWidth}: var(${tokens.textFieldChipWidth});\n ${textFieldTokens.chipPaddingTop}: var(${tokens.textFieldChipPaddingTop});\n ${textFieldTokens.chipPaddingRight}: var(${tokens.textFieldChipPaddingRight});\n ${textFieldTokens.chipPaddingBottom}: var(${tokens.textFieldChipPaddingBottom});\n ${textFieldTokens.chipPaddingLeft}: var(${tokens.textFieldChipPaddingLeft});\n ${textFieldTokens.chipCloseIconSize}: var(${tokens.textFieldChipCloseIconSize});\n ${textFieldTokens.chipFontFamily}: var(${tokens.textFieldChipFontFamily});\n ${textFieldTokens.chipFontSize}: var(${tokens.textFieldChipFontSize});\n ${textFieldTokens.chipFontStyle}: var(${tokens.textFieldChipFontStyle});\n ${textFieldTokens.chipFontWeight}: var(${tokens.textFieldChipFontWeight});\n ${textFieldTokens.chipLetterSpacing}: var(${tokens.textFieldChipLetterSpacing});\n ${textFieldTokens.chipLineHeight}: var(${tokens.textFieldChipLineHeight});\n ${textFieldTokens.chipColorReadOnly}: var(${tokens.textFieldChipColor});\n ${textFieldTokens.chipColorReadOnlyHover}: var(${tokens.textFieldChipColor});\n ${textFieldTokens.chipBackgroundReadOnly}: var(${tokens.textFieldChipBackground});\n ${textFieldTokens.chipBackgroundReadOnlyHover}: var(${tokens.textFieldChipBackgroundHover});\n ${textFieldTokens.chipClearContentMarginLeft}: var(${tokens.textFieldChipClearContentMarginLeft});\n ${textFieldTokens.chipClearContentMarginRight}: var(${tokens.textFieldChipClearContentMarginRight});\n\n ${textFieldTokens.focusColor}: var(${tokens.textFieldFocusColor});\n\n /* TODO: #1544 */\n & div.input-wrapper:focus-within {\n background-color: var(${tokens.textFieldBackgroundColorFocus});\n }\n`;\n\nexport const IconArrowWrapper = styled.div<{ disabled: boolean }>`\n line-height: 0;\n color: var(${tokens.disclosureIconColor});\n cursor: ${({ disabled }) => (disabled ? 'inherit' : 'pointer')};\n\n .${classes.arrowInverse} {\n transform: rotate(-180deg);\n }\n\n &:hover,\n &:active {\n color: ${({ disabled }) =>\n disabled ? `var(${tokens.disclosureIconColor})` : `var(${tokens.disclosureIconColorHover})`};\n }\n`;\n\nexport const StyledArrow = styled(IconDisclosureDownCentered)``;\n"],"names":["mergedConfig","mergeConfig","textFieldConfig","TextField","component","_exp","_exp17","_ref","opened","concat","tokens","textFieldBackgroundColorFocus","textFieldBackgroundColor","_exp19","_ref2","textFieldPlaceholderColorFocus","textFieldPlaceholderColor","_exp25","_ref3","textFieldBorderColorFocus","textFieldBorderColor","StyledTextField","styled","name","class","propsAsIs","vars","_exp206","_ref4","disabled","_exp208","_ref5","disclosureIconColor","disclosureIconColorHover","IconArrowWrapper","_exp209","IconDisclosureDownCentered","StyledArrow"],"mappings":";;;;;;AAOA,IAAMA,YAAY,gBAAGC,WAAW,CAACC,eAAe,CAAC,CAAA;AACjD,IAAMC,SAAS,gBAAGC,SAAS,CAACJ,YAAY,CAAC,CAAA;AAAC,IAAAK,IAAA,GAPxBA,SAOwBA,IAAAA,GAAA;AAAA,EAAA,OAEJF,SAAS,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAG,MAAA,GAT7BA,SAS6BA,MAAAA,GAAA;AAAA,EAAA,OASG,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,MAAAA,GAAAA,IAAAA,CAAAA,MAAAA,CAAAA;AAAAA,IAAAA,OACjDA,MAAM,GAA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AC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAA8B;;;;"}
|
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 { component, mergeConfig } from '../../../../../../engines';\nimport { textFieldConfig, textFieldTokens } from '../../../../../TextField';\nimport { tokens, classes } from '../../../../Select.tokens';\nimport { IconDisclosureDownCentered } from '../../../../../_Icon';\n\nconst mergedConfig = mergeConfig(textFieldConfig);\nconst TextField = component(mergedConfig);\n\nexport const StyledTextField = styled(TextField)<{ opened: boolean }>`\n ${textFieldTokens.color}: var(${tokens.textFieldColor});\n ${textFieldTokens.backgroundColor}: var(${tokens.textFieldBackgroundColor});\n ${textFieldTokens.borderColor}: var(${tokens.textFieldBorderColor});\n ${textFieldTokens.placeholderColor}: var(${tokens.textFieldPlaceholderColor});\n ${textFieldTokens.labelColor}: var(${tokens.textFieldLabelColor});\n ${textFieldTokens.leftHelperColor}: var(${tokens.textFieldLeftHelperColor});\n\n ${textFieldTokens.colorReadOnly}: var(${tokens.textFieldColor});\n ${textFieldTokens.backgroundColorReadOnly}: ${({ opened }) =>\n opened ? `var(${tokens.textFieldBackgroundColorFocus})` : `var(${tokens.textFieldBackgroundColor})`};\n ${textFieldTokens.placeholderColorReadOnly}: ${({ opened }) =>\n opened ? `var(${tokens.textFieldPlaceholderColorFocus})` : `var(${tokens.textFieldPlaceholderColor})`};\n ${textFieldTokens.leftHelperColorReadOnly}: var(${tokens.textFieldLeftHelperColor});\n ${textFieldTokens.labelColorReadOnly}: var(${tokens.textFieldLabelColor});\n ${textFieldTokens.borderColorReadOnly}: ${({ opened }) =>\n opened ? `var(${tokens.textFieldBorderColorFocus})` : `var(${tokens.textFieldBorderColor})`};\n\n ${textFieldTokens.placeholderColor}: var(${tokens.textFieldPlaceholderColor});\n\n ${textFieldTokens.borderColorHover}: var(${tokens.textFieldBorderColorHover});\n ${textFieldTokens.borderColorFocus}: var(${tokens.textFieldBorderColorFocus});\n\n ${textFieldTokens.optionalColor}: var(${tokens.textFieldOptionalColor});\n\n ${textFieldTokens.height}: var(${tokens.textFieldHeight});\n ${textFieldTokens.borderWidth}: var(${tokens.textFieldBorderWidth});\n ${textFieldTokens.borderRadius}: var(${tokens.textFieldBorderRadius});\n\n ${textFieldTokens.padding}: var(${tokens.textFieldPadding});\n ${textFieldTokens.paddingWithChips}: var(${tokens.textFieldPaddingWithChips});\n\n ${textFieldTokens.leftContentMargin}: var(${tokens.textFieldLeftContentMargin});\n ${textFieldTokens.rightContentMargin}: var(${tokens.textFieldRightContentMargin});\n\n ${textFieldTokens.fontFamily}: var(${tokens.textFieldFontFamily});\n ${textFieldTokens.fontStyle}: var(${tokens.textFieldFontStyle});\n ${textFieldTokens.fontSize}: var(${tokens.textFieldFontSize});\n ${textFieldTokens.fontWeight}: var(${tokens.textFieldFontWeight});\n ${textFieldTokens.letterSpacing}: var(${tokens.textFieldLetterSpacing});\n ${textFieldTokens.lineHeight}: var(${tokens.textFieldLineHeight});\n\n ${textFieldTokens.contentSlotColor}: var(${tokens.textFieldContentSlotColor});\n ${textFieldTokens.contentSlotColorHover}: var(${tokens.textFieldContentSlotColorHover});\n ${textFieldTokens.contentSlotColorActive}: var(${tokens.textFieldContentSlotColorActive});\n\n ${textFieldTokens.contentSlotRightColor}: var(${tokens.textFieldContentSlotRightColor});\n ${textFieldTokens.contentSlotRightColorHover}: var(${tokens.textFieldContentSlotRightColorHover});\n ${textFieldTokens.contentSlotRightColorActive}: var(${tokens.textFieldContentSlotRightColorActive});\n\n ${textFieldTokens.labelOffset}: var(${tokens.textFieldLabelOffset});\n\n ${textFieldTokens.labelFontFamily}: var(${tokens.textFieldLabelFontFamily});\n ${textFieldTokens.labelFontStyle}: var(${tokens.textFieldLabelFontStyle});\n ${textFieldTokens.labelFontSize}: var(${tokens.textFieldLabelFontSize});\n ${textFieldTokens.labelFontWeight}: var(${tokens.textFieldLabelFontWeight});\n ${textFieldTokens.labelLetterSpacing}: var(${tokens.textFieldLabelLetterSpacing});\n ${textFieldTokens.labelLineHeight}: var(${tokens.textFieldLabelLineHeight});\n\n ${textFieldTokens.labelInnerFontFamily}: var(${tokens.textFieldLabelInnerFontFamily});\n ${textFieldTokens.labelInnerFontStyle}: var(${tokens.textFieldLabelInnerFontStyle});\n ${textFieldTokens.labelInnerFontSize}: var(${tokens.textFieldLabelInnerFontSize});\n ${textFieldTokens.labelInnerFontWeight}: var(${tokens.textFieldLabelInnerFontWeight});\n ${textFieldTokens.labelInnerLetterSpacing}: var(${tokens.textFieldLabelInnerLetterSpacing});\n ${textFieldTokens.labelInnerLineHeight}: var(${tokens.textFieldLabelInnerLineHeight});\n\n ${textFieldTokens.labelInnerPadding}: var(${tokens.textFieldLabelInnerPadding});\n ${textFieldTokens.contentLabelInnerPadding}: var(${tokens.textFieldContentLabelInnerPadding});\n\n ${textFieldTokens.titleCaptionColor}: var(${tokens.textFieldTitleCaptionColor});\n ${textFieldTokens.titleCaptionInnerLabelOffset}: var(${tokens.textFieldTitleCaptionInnerLabelOffset});\n\n ${textFieldTokens.titleCaptionFontFamily}: var(${tokens.textFieldTitleCaptionFontFamily});\n ${textFieldTokens.titleCaptionFontStyle}: var(${tokens.textFieldTitleCaptionFontStyle});\n ${textFieldTokens.titleCaptionFontSize}: var(${tokens.textFieldTitleCaptionFontSize});\n ${textFieldTokens.titleCaptionFontWeight}: var(${tokens.textFieldTitleCaptionFontWeight});\n ${textFieldTokens.titleCaptionLetterSpacing}: var(${tokens.textFieldTitleCaptionLetterSpacing});\n ${textFieldTokens.titleCaptionLineHeight}: var(${tokens.textFieldTitleCaptionLineHeight});\n\n ${textFieldTokens.leftHelperOffset}: var(${tokens.textFieldLeftHelperOffset});\n\n ${textFieldTokens.leftHelperFontFamily}: var(${tokens.textFieldLeftHelperFontFamily});\n ${textFieldTokens.leftHelperFontStyle}: var(${tokens.textFieldLeftHelperFontStyle});\n ${textFieldTokens.leftHelperFontSize}: var(${tokens.textFieldLeftHelperFontSize});\n ${textFieldTokens.leftHelperFontWeight}: var(${tokens.textFieldLeftHelperFontWeight});\n ${textFieldTokens.leftHelperLetterSpacing}: var(${tokens.textFieldLeftHelperLetterSpacing});\n ${textFieldTokens.leftHelperLineHeight}: var(${tokens.textFieldLeftHelperLineHeight});\n\n ${textFieldTokens.textBeforeColor}: var(${tokens.textFieldTextBeforeColor});\n ${textFieldTokens.textAfterColor}: var(${tokens.textFieldTextAfterColor});\n ${textFieldTokens.textBeforeMargin}: var(${tokens.textFieldTextBeforeMargin});\n ${textFieldTokens.textAfterMargin}: var(${tokens.textFieldTextAfterMargin});\n\n ${textFieldTokens.disabledOpacity}: var(${tokens.textFieldDisabledOpacity});\n\n ${textFieldTokens.chipHeight}: var(${tokens.textFieldChipHeight});\n ${textFieldTokens.chipBorderRadius}: var(${tokens.textFieldChipBorderRadius});\n ${textFieldTokens.chipGap}: var(${tokens.textFieldChipGap});\n ${textFieldTokens.chipColor}: var(${tokens.textFieldChipColor});\n ${textFieldTokens.chipColorHover}: var(${tokens.textFieldChipColorHover});\n ${textFieldTokens.chipScaleHover}: var(${tokens.textFieldChipScaleHover});\n ${textFieldTokens.chipBackground}: var(${tokens.textFieldChipBackground});\n ${textFieldTokens.chipBackgroundActive}: var(${tokens.textFieldChipBackgroundActive});\n ${textFieldTokens.chipColorActive}: var(${tokens.textFieldChipColorActive});\n ${textFieldTokens.chipScaleActive}: var(${tokens.textFieldChipScaleActive});\n ${textFieldTokens.chipCloseIconColor}: var(${tokens.textFieldChipCloseIconColor});\n ${textFieldTokens.chipOutlineSize}: var(${tokens.textFieldChipOutlineSize});\n ${textFieldTokens.chipWidth}: var(${tokens.textFieldChipWidth});\n ${textFieldTokens.chipPaddingTop}: var(${tokens.textFieldChipPaddingTop});\n ${textFieldTokens.chipPaddingRight}: var(${tokens.textFieldChipPaddingRight});\n ${textFieldTokens.chipPaddingBottom}: var(${tokens.textFieldChipPaddingBottom});\n ${textFieldTokens.chipPaddingLeft}: var(${tokens.textFieldChipPaddingLeft});\n ${textFieldTokens.chipCloseIconSize}: var(${tokens.textFieldChipCloseIconSize});\n ${textFieldTokens.chipFontFamily}: var(${tokens.textFieldChipFontFamily});\n ${textFieldTokens.chipFontSize}: var(${tokens.textFieldChipFontSize});\n ${textFieldTokens.chipFontStyle}: var(${tokens.textFieldChipFontStyle});\n ${textFieldTokens.chipFontWeight}: var(${tokens.textFieldChipFontWeight});\n ${textFieldTokens.chipLetterSpacing}: var(${tokens.textFieldChipLetterSpacing});\n ${textFieldTokens.chipLineHeight}: var(${tokens.textFieldChipLineHeight});\n ${textFieldTokens.chipColorReadOnly}: var(${tokens.textFieldChipColor});\n ${textFieldTokens.chipColorReadOnlyHover}: var(${tokens.textFieldChipColor});\n ${textFieldTokens.chipBackgroundReadOnly}: var(${tokens.textFieldChipBackground});\n ${textFieldTokens.chipBackgroundReadOnlyHover}: var(${tokens.textFieldChipBackgroundHover});\n ${textFieldTokens.chipClearContentMarginLeft}: var(${tokens.textFieldChipClearContentMarginLeft});\n ${textFieldTokens.chipClearContentMarginRight}: var(${tokens.textFieldChipClearContentMarginRight});\n\n ${textFieldTokens.indicatorColor}: var(${tokens.textFieldIndicatorColor});\n ${textFieldTokens.indicatorSizeInner}: var(${tokens.textFieldIndicatorSizeInner});\n ${textFieldTokens.indicatorSizeOuter}: var(${tokens.textFieldIndicatorSizeOuter});\n ${textFieldTokens.indicatorLabelPlacementInner}: var(${tokens.textFieldIndicatorLabelPlacementInner});\n ${textFieldTokens.indicatorLabelPlacementOuter}: var(${tokens.textFieldIndicatorLabelPlacementOuter});\n ${textFieldTokens.indicatorLabelPlacementInnerRight}: var(${tokens.textFieldIndicatorLabelPlacementInnerRight});\n ${textFieldTokens.indicatorLabelPlacementOuterRight}: var(${tokens.textFieldIndicatorLabelPlacementOuterRight});\n ${textFieldTokens.clearIndicatorLabelPlacementInner}: var(${tokens.textFieldClearIndicatorLabelPlacementInner});\n ${textFieldTokens.clearIndicatorLabelPlacementInnerRight}:\n var(${tokens.textFieldClearIndicatorLabelPlacementInnerRight});\n ${textFieldTokens.clearIndicatorHintInnerRight}: var(${tokens.textFieldClearIndicatorHintInnerRight});\n\n ${textFieldTokens.focusColor}: var(${tokens.textFieldFocusColor});\n\n /* TODO: #1544 */\n & div.input-wrapper:focus-within {\n background-color: var(${tokens.textFieldBackgroundColorFocus});\n }\n`;\n\nexport const IconArrowWrapper = styled.div<{ disabled: boolean }>`\n line-height: 0;\n color: var(${tokens.disclosureIconColor});\n cursor: ${({ disabled }) => (disabled ? 'inherit' : 'pointer')};\n\n .${classes.arrowInverse} {\n transform: rotate(-180deg);\n }\n\n &:hover,\n &:active {\n color: ${({ disabled }) =>\n disabled ? `var(${tokens.disclosureIconColor})` : `var(${tokens.disclosureIconColorHover})`};\n }\n`;\n\nexport const StyledArrow = styled(IconDisclosureDownCentered)``;\n"],"names":["mergedConfig","mergeConfig","textFieldConfig","TextField","component","_exp","_exp17","_ref","opened","concat","tokens","textFieldBackgroundColorFocus","textFieldBackgroundColor","_exp19","_ref2","textFieldPlaceholderColorFocus","textFieldPlaceholderColor","_exp25","_ref3","textFieldBorderColorFocus","textFieldBorderColor","StyledTextField","styled","name","class","propsAsIs","vars","_exp226","_ref4","disabled","_exp228","_ref5","disclosureIconColor","disclosureIconColorHover","IconArrowWrapper","_exp229","IconDisclosureDownCentered","StyledArrow"],"mappings":";;;;;;AAOA,IAAMA,YAAY,gBAAGC,WAAW,CAACC,eAAe,CAAC,CAAA;AACjD,IAAMC,SAAS,gBAAGC,SAAS,CAACJ,YAAY,CAAC,CAAA;AAAC,IAAAK,IAAA,GAPxBA,SAOwBA,IAAAA,GAAA;AAAA,EAAA,OAEJF,SAAS,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAG,MAAA,GAT7BA,SAS6BA,MAAAA,GAAA;AAAA,EAAA,OASG,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,MAAAA,GAAAA,IAAAA,CAAAA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AA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAA8B;;;;"}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
.s1yhwv5r{--plasma-textfield-color:var(--plasma-select-textfield-color);--plasma-textfield-bg-color:var(--plasma-select-textfield-background-color);--plasma-textfield-border-color:var(--plasma-select-textfield-border-color);--plasma-textfield__placeholder-color:var(--plasma-select-textfield-placeholder-color);--plasma-textfield__label-color:var(--plasma-select-textfield-label-color);--plasma-textfield__left-helper-color:var(--plasma-select-textfield-left-helper-color);--plasma-textfield-color-readonly:var(--plasma-select-textfield-color);--plasma-textfield-bg-color-readonly:var(--s1yhwv5r-0);--plasma-textfield__placeholder-color-readonly:var(--s1yhwv5r-1);--plasma-textfield__left-helper-color-readonly:var(--plasma-select-textfield-left-helper-color);--plasma-textfield__label-color-readonly:var(--plasma-select-textfield-label-color);--plasma-textfield-border-color-readonly:var(--s1yhwv5r-2);--plasma-textfield__placeholder-color:var(--plasma-select-textfield-placeholder-color);--plasma-textfield-border-color-hover:var(--plasma-select-textfield-border-color-hover);--plasma-textfield-border-color-focus:var(--plasma-select-textfield-border-color-focus);--plasma-textfield__optional-color:var(--plasma-select-new-textfield-optional-color);--plasma-textfield-height:var(--plasma-select-textfield-height);--plasma-textfield-border-width:var(--plasma-select-textfield-border-width);--plasma-textfield-border-radius:var(--plasma-select-textfield-border-radius);--plasma-textfield-padding:var(--plasma-select-textfield-padding);--plasma-textfield-padding-with-chips:var(--plasma-select-textfield-padding-with-chips);--plasma-textfield__left-content-margin:var(--plasma-select-textfield-left-content-margin);--plasma-textfield__right-content-margin:var(--plasma-select-textfield-right-content-margin);--plasma-textfield-font-family:var(--plasma-select-textfield-font-family);--plasma-textfield-font-style:var(--plasma-select-textfield-font-style);--plasma-textfield-font-size:var(--plasma-select-textfield-font-size);--plasma-textfield-font-weight:var(--plasma-select-textfield-font-weight);--plasma-textfield-letter-spacing:var(--plasma-select-textfield-letter-spacing);--plasma-textfield-line-height:var(--plasma-select-textfield-line-height);--plasma-textfield-content-slot-color:var(--plasma-select-textfield-content-slot-color);--plasma-textfield-content-slot-color-hover:var(--plasma-select-textfield-content-slot-color-hover);--plasma-textfield-content-slot-color-active:var(--plasma-select-textfield-content-slot-color-active);--plasma-textfield-content-right-slot-color:var(--plasma-select-textfield-content-right-slot-color);--plasma-textfield-content-right-slot-color-hover:var(--plasma-select-textfield-content-right-slot-color-hover);--plasma-textfield-content-right-slot-color-active:var(--plasma-select-textfield-content-right-slot-color-active);--plasma-textfield__label-offset:var(--plasma-select-textfield-label-offset);--plasma-textfield__label-font-family:var(--plasma-select-textfield-label-font-family);--plasma-textfield__label-font-style:var(--plasma-select-textfield-label-font-style);--plasma-textfield__label-font-size:var(--plasma-select-textfield-label-font-size);--plasma-textfield__label-font-weight:var(--plasma-select-textfield-label-font-weight);--plasma-textfield__label-letter-spacing:var(--plasma-select-textfield-label-letter-spacing);--plasma-textfield__label-line-height:var(--plasma-select-textfield-label-line-height);--plasma-textfield-placement_inner__label-font-family:var(--plasma-select-textfield-placement-inner-label-font-family);--plasma-textfield-placement_inner__label-font-style:var(--plasma-select-textfield-placement-inner-label-font-style);--plasma-textfield-placement_inner__label-font-size:var(--plasma-select-textfield-placement-inner-label-font-size);--plasma-textfield-placement_inner__label-font-weight:var(--plasma-select-textfield-placement-inner-label-font-weight);--plasma-textfield-placement_inner__label-letter-spacing:var(--plasma-select-textfield-placement-inner-label-letter-spacing);--plasma-textfield-placement_inner__label-line-height:var(--plasma-select-textfield-placement-inner-label-line-height);--plasma-textfield-placement_inner__label-padding:var(--plasma-select-textfield-placement-inner-label-padding);--plasma-textfield-placement_inner__content-padding:var(--plasma-select-textfield-placement-inner-content-padding);--plasma-textfield__title-caption-color:var(--plasma-select-textfield-title-caption-color);--plasma-textfield__title-caption-label-inner-offset:var(--plasma-select-textfield-title-caption-label-inner-offset);--plasma-textfield__title-caption-font-family:var(--plasma-select-textfield-title-caption-font-family);--plasma-textfield__title-caption-font-style:var(--plasma-select-textfield-title-caption-font-style);--plasma-textfield__title-caption-font-size:var(--plasma-select-textfield-title-caption-font-size);--plasma-textfield__title-caption-font-weight:var(--plasma-select-textfield-title-caption-font-weight);--plasma-textfield__title-caption-letter-spacing:var(--plasma-select-textfield-title-caption-letter-spacing);--plasma-textfield__title-caption-line-height:var(--plasma-select-textfield-title-caption-line-height);--plasma-textfield__left-helper-offset:var(--plasma-select-textfield-left-helper-offset);--plasma-textfield__left-helper-font-family:var(--plasma-select-textfield-left-helper-font-family);--plasma-textfield__left-helper-font-style:var(--plasma-select-textfield-left-helper-font-style);--plasma-textfield__left-helper-font-size:var(--plasma-select-textfield-left-helper-font-size);--plasma-textfield__left-helper-font-weight:var(--plasma-select-textfield-left-helper-font-weight);--plasma-textfield__left-helper-letter-spacing:var(--plasma-select-textfield-left-helper-letter-spacing);--plasma-textfield__left-helper-line-height:var(--plasma-select-textfield-left-helper-line-height);--plasma-textfield__before-text-color:var(--plasma-select-textfield-before-text-color);--plasma-textfield__after-text-color:var(--plasma-select-textfield-after-text-color);--plasma-textfield__before-text-margin:var(--plasma-select-textfield-before-text-margin);--plasma-textfield__after-text-margin:var(--plasma-select-textfield-after-text-margin);--plasma-textfield-disabled-opacity:var(--plasma-select-textfield-disabled-opacity);--plasma-textfield__chip-height:var(--plasma-select-textfield-chip-height);--plasma-textfield__chip-border-radius:var(--plasma-select-textfield-chip-border-radius);--plasma-textfield__chip-gap:var(--plasma-select-textfield-chip-gap);--plasma-textfield__chip-color:var(--plasma-select-textfield-chip-color);--plasma-textfield__chip-color-hover:var(--plasma-select-textfield-chip-color-hover);--plasma-textfield__chip-scale-hover:var(--plasma-select-textfield-chip-scale-hover);--plasma-textfield__chip-background:var(--plasma-select-textfield--chip-background);--plasma-textfield__chip-background-active:var(--plasma-select-textfield-chip-background-active);--plasma-textfield__chip-color-active:var(--plasma-select-textfield-chip-color-active);--plasma-textfield__chip-scale-active:var(--plasma-select-textfield-chip-scale-active);--plasma-textfield__chip-close-icon-color:var(--plasma-select-textfield-chip-close-icons-color);--plasma-textfield__chip-outline-size:var(--plasma-select-textfield-chip-outline-size);--plasma-textfield__chip-width:var(--plasma-select-textfield-chip-width);--plasma-textfield__chip-padding-top:var(--plasma-select-textfield-chip-padding-top);--plasma-textfield__chip-padding-right:var(--plasma-select-textfield-chip-padding-right);--plasma-textfield__chip-padding-bottom:var(--plasma-select-textfield-chip-padding-bottom);--plasma-textfield__chip-padding-left:var(--plasma-select-textfield-chip-padding-left);--plasma-textfield__chip-close-icon-size:var(--plasma-select-textfield-chip-close-icon-size);--plasma-textfield__chip-font-family:var(--plasma-select-textfield-chip-font-family);--plasma-textfield__chip-font-size:var(--plasma-select-textfield-chip-font-size);--plasma-textfield__chip-font-style:var(--plasma-select-textfield-chip-font-style);--plasma-textfield__chip-font-weight:var(--plasma-select-textfield-chip-font-weight);--plasma-textfield__chip-letter-spacing:var(--plasma-select-textfield-chip-letter-spacing);--plasma-textfield__chip-line-height:var(--plasma-select-textfield-chip-line-height);--plasma-textfield__chip-color-readonly:var(--plasma-select-textfield-chip-color);--plasma-textfield__chip-color-readonly-hover:var(--plasma-select-textfield-chip-color);--plasma-textfield__chip-background-readonly:var(--plasma-select-textfield--chip-background);--plasma-textfield__chip-background-readonly-hover:var(--plasma-select-textfield-chip-background-hover);--plasma-textfield__chip-clear-content-margin-left:var(--plasma-select-textfield-chip-clear-content-margin-left);--plasma-textfield__chip-clear-content-margin-right:var(--plasma-select-textfield-chip-clear-content-margin-right);--plasma-textfield__indicator-color:var(--plasma-select-new-textfield-indicator-color);--plasma-textfield__indicator-size-inner:var(--plasma-select-new-textfield-indicator-size-inner);--plasma-textfield__indicator-size-outer:var(--plasma-select-new-textfield-indicator-size-outer);--plasma-textfield__indicator-placement-inner:var(--plasma-select-new-textfield-indicator-placement-inner);--plasma-textfield__indicator-placement-outer:var(--plasma-select-new-textfield-indicator-placement-outer);--plasma-textfield__indicator-placement-inner-right:var(--plasma-select-new-textfield-indicator-placement-inner-right);--plasma-textfield__indicator-placement-outer-right:var(--plasma-select-new-textfield-indicator-placement-outer-right);--plasma-textfield__clear-indicator-placement-inner:var(--plasma-select-new-textfield-clear-indicator-placement-inner);--plasma-textfield__clear-indicator-placement-inner-right: var(--plasma-select-new-textfield-clear-indicator-placement-inner-right);--plasma-textfield__clear-indicator-hint-placement-inner-right:var(--plasma-select-new-textfield-clear-indicator-hint-placement-inner-right);--plasma-textfield-focus-color:var(--plasma-select-textfield-focus-color);}.s1yhwv5r div.input-wrapper:focus-within{background-color:var(--plasma-select-textfield-background-color-focus);}
|
2
|
+
.i7x5udn{line-height:0;color:var(--plasma-select-disclosure-icon-color);cursor:var(--i7x5udn-0);}.i7x5udn .arrow-inverse{-webkit-transform:rotate(-180deg);-ms-transform:rotate(-180deg);transform:rotate(-180deg);}.i7x5udn:hover,.i7x5udn:active{color:var(--i7x5udn-1);}
|
3
|
+
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.base_1tcl212_bm1v11h__e2c572a3 .base_1tcl212_s10fscgc__e2c572a3{font-family:var(--plasma-switch-font-family);font-style:var(--plasma-switch-font-style);font-weight:var(--plasma-switch-font-weight);-webkit-letter-spacing:var(--plasma-switch-letter-spacing);-moz-letter-spacing:var(--plasma-switch-letter-spacing);-ms-letter-spacing:var(--plasma-switch-letter-spacing);letter-spacing:var(--plasma-switch-letter-spacing);line-height:var(--plasma-switch-line-height);font-size:var(--plasma-switch-font-size);}.base_1tcl212_bm1v11h__e2c572a3 .base_1tcl212_sdjnckq__e2c572a3{font-family:var(--plasma-switch-description-font-family);font-style:var(--plasma-switch-description-font-style);font-weight:var(--plasma-switch-description-font-weight);-webkit-letter-spacing:var(--plasma-switch-description-letter-spacing);-moz-letter-spacing:var(--plasma-switch-description-letter-spacing);-ms-letter-spacing:var(--plasma-switch-description-letter-spacing);letter-spacing:var(--plasma-switch-description-letter-spacing);line-height:var(--plasma-switch-description-line-height);font-size:var(--plasma-switch-description-font-size);}.base_1tcl212_bm1v11h__e2c572a3 .base_1tcl212_s1ilr5eq__e2c572a3{margin:var(--plasma_private-switch__label-offset,0);}
|
2
2
|
|
3
|
-
.
|
3
|
+
.base_1d0b3t4_b1wld3h3__ac2a0bcf .base_1d0b3t4_s2cs3kf__ac2a0bcf{box-sizing:border-box;-webkit-flex:0 0 var(--plasma-switch__track-width);-ms-flex:0 0 var(--plasma-switch__track-width);flex:0 0 var(--plasma-switch__track-width);border-style:solid;border-width:var(--plasma-switch__track-border);border-radius:var(--plasma-switch__track-border-radius);width:var(--plasma-switch__track-width);height:var(--plasma-switch__track-height);}.base_1d0b3t4_b1wld3h3__ac2a0bcf .base_1d0b3t4_s2cs3kf__ac2a0bcf::after{width:var(--plasma-switch__thumb-size);height:var(--plasma-switch__thumb-size);border-radius:var(--plasma-switch__thumb-border-radius);margin:auto var(--plasma-switch__thumb-offset);}.base_1d0b3t4_b1wld3h3__ac2a0bcf:active:not([disabled]) .base_1d0b3t4_s2cs3kf__ac2a0bcf::after{width:calc(var(--plasma-switch__thumb-size) * var(--plasma-switch__thumb-scale,1));}
|
4
4
|
|
5
5
|
.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_s2cs3kf__64acd499{background-color:var(--plasma-switch__track_checked_false-bg-color);border-color:var(--plasma-switch__track-checked_false-border-color);}.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_ssthlx1__64acd499:not([disabled]) ~ .base_15atbyp_s2cs3kf__64acd499:hover{background-color:var(--plasma-switch__track_checked_false_hovered_true-bg-color,var(--plasma-switch__track_checked_false-bg-color));border-color:var(--plasma-switch__track-checked_false_hovered_true-border-color,var(--plasma-switch__track-checked_false-border-color));}.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_ssthlx1__64acd499:checked ~ .base_15atbyp_s2cs3kf__64acd499{background-color:var(--plasma-switch__track_checked_true-bg-color);border-color:var(--plasma-switch__track-checked_true-border-color);}.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_ssthlx1__64acd499:checked:not([disabled]) ~ .base_15atbyp_s2cs3kf__64acd499:hover{background-color:var(--plasma-switch__track_checked_true_hovered_true-bg-color,var(--plasma-switch__track_checked_true-bg-color));border-color:var(--plasma-switch__track-checked_true_hovered_true-border-color,var(--plasma-switch__track-checked_true-border-color));}.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_s2cs3kf__64acd499::after{background-color:var(--plasma-switch__thumb-checked_false-bg-color);box-shadow:var(--plasma-switch__thumb-box-shadow);}.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_ssthlx1__64acd499:checked ~ .base_15atbyp_s2cs3kf__64acd499::after{background-color:var(--plasma-switch__thumb_checked_true-bg-color);box-shadow:var(--plasma-switch__thumb-box-shadow_checked_true,var(--plasma-switch__thumb-box-shadow));}.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_s1ilr5eq__64acd499{color:var(--plasma-switch__label-color);}.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_sdjnckq__64acd499{color:var(--plasma-switch__description-color);}
|
6
6
|
|
@@ -23,8 +23,7 @@ var tokens = {
|
|
23
23
|
verticalGap: '--plasma-switch-vertical-gap',
|
24
24
|
trackWidth: '--plasma-switch__track-width',
|
25
25
|
trackHeight: '--plasma-switch__track-height',
|
26
|
-
|
27
|
-
trackBorderWidthOff: '--plasma-switch__track-checked_false-border-width',
|
26
|
+
trackBorderWidth: '--plasma-switch__track-border',
|
28
27
|
trackBorderColorOn: '--plasma-switch__track-checked_true-border-color',
|
29
28
|
trackBorderColorOnHover: '--plasma-switch__track-checked_true_hovered_true-border-color',
|
30
29
|
trackBorderColorOff: '--plasma-switch__track-checked_false-border-color',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Switch.tokens.js","sources":["../../../src/components/Switch/Switch.tokens.ts"],"sourcesContent":["export const tokens = {\n fontFamily: '--plasma-switch-font-family',\n fontStyle: '--plasma-switch-font-style',\n fontSize: '--plasma-switch-font-size',\n fontWeight: '--plasma-switch-font-weight',\n letterSpacing: '--plasma-switch-letter-spacing',\n lineHeight: '--plasma-switch-line-height',\n\n /* Токены description */\n descriptionFontFamily: '--plasma-switch-description-font-family',\n descriptionFontStyle: '--plasma-switch-description-font-style',\n descriptionFontSize: '--plasma-switch-description-font-size',\n descriptionFontWeight: '--plasma-switch-description-font-weight',\n descriptionLetterSpacing: '--plasma-switch-description-letter-spacing',\n descriptionLineHeight: '--plasma-switch-description-line-height',\n\n /* Цвет подписи */\n labelColor: '--plasma-switch__label-color',\n labelOffset: '--plasma-switch__label-offset',\n\n /* Цвет описания */\n descriptionColor: '--plasma-switch__description-color',\n descriptionOffset: '--plasma-switch__description-offset',\n\n /** Прозрачность для всего компонента в состоянии disabled */\n disabledOpacity: '--plasma-switch-disabled-opacity',\n\n verticalGap: '--plasma-switch-vertical-gap',\n trackWidth: '--plasma-switch__track-width',\n trackHeight: '--plasma-switch__track-height',\n
|
1
|
+
{"version":3,"file":"Switch.tokens.js","sources":["../../../src/components/Switch/Switch.tokens.ts"],"sourcesContent":["export const tokens = {\n fontFamily: '--plasma-switch-font-family',\n fontStyle: '--plasma-switch-font-style',\n fontSize: '--plasma-switch-font-size',\n fontWeight: '--plasma-switch-font-weight',\n letterSpacing: '--plasma-switch-letter-spacing',\n lineHeight: '--plasma-switch-line-height',\n\n /* Токены description */\n descriptionFontFamily: '--plasma-switch-description-font-family',\n descriptionFontStyle: '--plasma-switch-description-font-style',\n descriptionFontSize: '--plasma-switch-description-font-size',\n descriptionFontWeight: '--plasma-switch-description-font-weight',\n descriptionLetterSpacing: '--plasma-switch-description-letter-spacing',\n descriptionLineHeight: '--plasma-switch-description-line-height',\n\n /* Цвет подписи */\n labelColor: '--plasma-switch__label-color',\n labelOffset: '--plasma-switch__label-offset',\n\n /* Цвет описания */\n descriptionColor: '--plasma-switch__description-color',\n descriptionOffset: '--plasma-switch__description-offset',\n\n /** Прозрачность для всего компонента в состоянии disabled */\n disabledOpacity: '--plasma-switch-disabled-opacity',\n\n verticalGap: '--plasma-switch-vertical-gap',\n trackWidth: '--plasma-switch__track-width',\n trackHeight: '--plasma-switch__track-height',\n trackBorderWidth: '--plasma-switch__track-border',\n trackBorderColorOn: '--plasma-switch__track-checked_true-border-color',\n trackBorderColorOnHover: '--plasma-switch__track-checked_true_hovered_true-border-color',\n trackBorderColorOff: '--plasma-switch__track-checked_false-border-color',\n trackBorderColorOffHover: '--plasma-switch__track-checked_false_hovered_true-border-color',\n\n trackBorderRadius: '--plasma-switch__track-border-radius',\n // NOTE: could be intersection with checked\n trackBackgroundColorOn: '--plasma-switch__track_checked_true-bg-color',\n trackBackgroundColorOnHover: '--plasma-switch__track_checked_true_hovered_true-bg-color',\n trackBackgroundColorOff: '--plasma-switch__track_checked_false-bg-color',\n trackBackgroundColorOffHover: '--plasma-switch__track_checked_false_hovered_true-bg-color',\n\n trackFocusColor: '--plasma-switch__track-focus-color',\n\n thumbSize: '--plasma-switch__thumb-size',\n thumbOffset: '--plasma-switch__thumb-offset',\n thumbBorderRadius: '--plasma-switch__thumb-border-radius',\n\n thumbPressScale: '--plasma-switch__thumb-scale',\n\n thumbBackgroundColorOn: '--plasma-switch__thumb_checked_true-bg-color',\n thumbBackgroundColorOff: '--plasma-switch__thumb-checked_false-bg-color',\n thumbBoxShadow: '--plasma-switch__thumb-box-shadow',\n thumbBoxShadowOn: '--plasma-switch__thumb-box-shadow_checked_true',\n\n labelOffsetPrivate: '--plasma_private-switch__label-offset',\n};\n\nexport const classes = {\n beforeSwitchLabelPosition: 'switch-label-position-before',\n afterSwitchLabelPosition: 'switch-label-position-after',\n};\n"],"names":["tokens","fontFamily","fontStyle","fontSize","fontWeight","letterSpacing","lineHeight","descriptionFontFamily","descriptionFontStyle","descriptionFontSize","descriptionFontWeight","descriptionLetterSpacing","descriptionLineHeight","labelColor","labelOffset","descriptionColor","descriptionOffset","disabledOpacity","verticalGap","trackWidth","trackHeight","trackBorderWidth","trackBorderColorOn","trackBorderColorOnHover","trackBorderColorOff","trackBorderColorOffHover","trackBorderRadius","trackBackgroundColorOn","trackBackgroundColorOnHover","trackBackgroundColorOff","trackBackgroundColorOffHover","trackFocusColor","thumbSize","thumbOffset","thumbBorderRadius","thumbPressScale","thumbBackgroundColorOn","thumbBackgroundColorOff","thumbBoxShadow","thumbBoxShadowOn","labelOffsetPrivate","classes","beforeSwitchLabelPosition","afterSwitchLabelPosition"],"mappings":"AAAO,IAAMA,MAAM,GAAG;AAClBC,EAAAA,UAAU,EAAE,6BAA6B;AACzCC,EAAAA,SAAS,EAAE,4BAA4B;AACvCC,EAAAA,QAAQ,EAAE,2BAA2B;AACrCC,EAAAA,UAAU,EAAE,6BAA6B;AACzCC,EAAAA,aAAa,EAAE,gCAAgC;AAC/CC,EAAAA,UAAU,EAAE,6BAA6B;AAEzC;AACAC,EAAAA,qBAAqB,EAAE,yCAAyC;AAChEC,EAAAA,oBAAoB,EAAE,wCAAwC;AAC9DC,EAAAA,mBAAmB,EAAE,uCAAuC;AAC5DC,EAAAA,qBAAqB,EAAE,yCAAyC;AAChEC,EAAAA,wBAAwB,EAAE,4CAA4C;AACtEC,EAAAA,qBAAqB,EAAE,yCAAyC;AAEhE;AACAC,EAAAA,UAAU,EAAE,8BAA8B;AAC1CC,EAAAA,WAAW,EAAE,+BAA+B;AAE5C;AACAC,EAAAA,gBAAgB,EAAE,oCAAoC;AACtDC,EAAAA,iBAAiB,EAAE,qCAAqC;AAExD;AACAC,EAAAA,eAAe,EAAE,kCAAkC;AAEnDC,EAAAA,WAAW,EAAE,8BAA8B;AAC3CC,EAAAA,UAAU,EAAE,8BAA8B;AAC1CC,EAAAA,WAAW,EAAE,+BAA+B;AAC5CC,EAAAA,gBAAgB,EAAE,+BAA+B;AACjDC,EAAAA,kBAAkB,EAAE,kDAAkD;AACtEC,EAAAA,uBAAuB,EAAE,+DAA+D;AACxFC,EAAAA,mBAAmB,EAAE,mDAAmD;AACxEC,EAAAA,wBAAwB,EAAE,gEAAgE;AAE1FC,EAAAA,iBAAiB,EAAE,sCAAsC;AACzD;AACAC,EAAAA,sBAAsB,EAAE,8CAA8C;AACtEC,EAAAA,2BAA2B,EAAE,2DAA2D;AACxFC,EAAAA,uBAAuB,EAAE,+CAA+C;AACxEC,EAAAA,4BAA4B,EAAE,4DAA4D;AAE1FC,EAAAA,eAAe,EAAE,oCAAoC;AAErDC,EAAAA,SAAS,EAAE,6BAA6B;AACxCC,EAAAA,WAAW,EAAE,+BAA+B;AAC5CC,EAAAA,iBAAiB,EAAE,sCAAsC;AAEzDC,EAAAA,eAAe,EAAE,8BAA8B;AAE/CC,EAAAA,sBAAsB,EAAE,8CAA8C;AACtEC,EAAAA,uBAAuB,EAAE,+CAA+C;AACxEC,EAAAA,cAAc,EAAE,mCAAmC;AACnDC,EAAAA,gBAAgB,EAAE,gDAAgD;AAElEC,EAAAA,kBAAkB,EAAE,uCAAA;AACxB,EAAC;AAEM,IAAMC,OAAO,GAAG;AACnBC,EAAAA,yBAAyB,EAAE,8BAA8B;AACzDC,EAAAA,wBAAwB,EAAE,6BAAA;AAC9B;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"base.js","sources":["../../../../src/components/Switch/_toggleSize/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { tokens } from '../Switch.tokens';\nimport {
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../src/components/Switch/_toggleSize/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { tokens } from '../Switch.tokens';\nimport { StyledTrigger } from '../Switch.styles';\n\nexport const base = css`\n ${StyledTrigger} {\n box-sizing: border-box;\n flex: 0 0 var(${tokens.trackWidth});\n\n border-style: solid;\n border-width: var(${tokens.trackBorderWidth});\n border-radius: var(${tokens.trackBorderRadius});\n\n width: var(${tokens.trackWidth});\n height: var(${tokens.trackHeight});\n\n &::after {\n width: var(${tokens.thumbSize});\n height: var(${tokens.thumbSize});\n border-radius: var(${tokens.thumbBorderRadius});\n margin: auto var(${tokens.thumbOffset});\n }\n }\n\n :active:not([disabled]) ${StyledTrigger}::after {\n width: calc(var(${tokens.thumbSize}) * var(${tokens.thumbPressScale}, 1));\n }\n`;\n"],"names":["base"],"mappings":"AAKO,IAAMA,IAAI,GAuBhB;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
.b1wld3h3 .s2cs3kf{box-sizing:border-box;-webkit-flex:0 0 var(--plasma-switch__track-width);-ms-flex:0 0 var(--plasma-switch__track-width);flex:0 0 var(--plasma-switch__track-width);border-style:solid;border-width:var(--plasma-switch__track-border);border-radius:var(--plasma-switch__track-border-radius);width:var(--plasma-switch__track-width);height:var(--plasma-switch__track-height);}.b1wld3h3 .s2cs3kf::after{width:var(--plasma-switch__thumb-size);height:var(--plasma-switch__thumb-size);border-radius:var(--plasma-switch__thumb-border-radius);margin:auto var(--plasma-switch__thumb-offset);}.b1wld3h3:active:not([disabled]) .s2cs3kf::after{width:calc(var(--plasma-switch__thumb-size) * var(--plasma-switch__thumb-scale,1));}
|
package/es/index.css
CHANGED
@@ -215,7 +215,7 @@
|
|
215
215
|
|
216
216
|
.base_1tcl212_bm1v11h__e2c572a3 .base_1tcl212_s10fscgc__e2c572a3{font-family:var(--plasma-switch-font-family);font-style:var(--plasma-switch-font-style);font-weight:var(--plasma-switch-font-weight);-webkit-letter-spacing:var(--plasma-switch-letter-spacing);-moz-letter-spacing:var(--plasma-switch-letter-spacing);-ms-letter-spacing:var(--plasma-switch-letter-spacing);letter-spacing:var(--plasma-switch-letter-spacing);line-height:var(--plasma-switch-line-height);font-size:var(--plasma-switch-font-size);}.base_1tcl212_bm1v11h__e2c572a3 .base_1tcl212_sdjnckq__e2c572a3{font-family:var(--plasma-switch-description-font-family);font-style:var(--plasma-switch-description-font-style);font-weight:var(--plasma-switch-description-font-weight);-webkit-letter-spacing:var(--plasma-switch-description-letter-spacing);-moz-letter-spacing:var(--plasma-switch-description-letter-spacing);-ms-letter-spacing:var(--plasma-switch-description-letter-spacing);letter-spacing:var(--plasma-switch-description-letter-spacing);line-height:var(--plasma-switch-description-line-height);font-size:var(--plasma-switch-description-font-size);}.base_1tcl212_bm1v11h__e2c572a3 .base_1tcl212_s1ilr5eq__e2c572a3{margin:var(--plasma_private-switch__label-offset,0);}
|
217
217
|
|
218
|
-
.
|
218
|
+
.base_1d0b3t4_b1wld3h3__ac2a0bcf .base_1d0b3t4_s2cs3kf__ac2a0bcf{box-sizing:border-box;-webkit-flex:0 0 var(--plasma-switch__track-width);-ms-flex:0 0 var(--plasma-switch__track-width);flex:0 0 var(--plasma-switch__track-width);border-style:solid;border-width:var(--plasma-switch__track-border);border-radius:var(--plasma-switch__track-border-radius);width:var(--plasma-switch__track-width);height:var(--plasma-switch__track-height);}.base_1d0b3t4_b1wld3h3__ac2a0bcf .base_1d0b3t4_s2cs3kf__ac2a0bcf::after{width:var(--plasma-switch__thumb-size);height:var(--plasma-switch__thumb-size);border-radius:var(--plasma-switch__thumb-border-radius);margin:auto var(--plasma-switch__thumb-offset);}.base_1d0b3t4_b1wld3h3__ac2a0bcf:active:not([disabled]) .base_1d0b3t4_s2cs3kf__ac2a0bcf::after{width:calc(var(--plasma-switch__thumb-size) * var(--plasma-switch__thumb-scale,1));}
|
219
219
|
|
220
220
|
.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_s2cs3kf__64acd499{background-color:var(--plasma-switch__track_checked_false-bg-color);border-color:var(--plasma-switch__track-checked_false-border-color);}.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_ssthlx1__64acd499:not([disabled]) ~ .base_15atbyp_s2cs3kf__64acd499:hover{background-color:var(--plasma-switch__track_checked_false_hovered_true-bg-color,var(--plasma-switch__track_checked_false-bg-color));border-color:var(--plasma-switch__track-checked_false_hovered_true-border-color,var(--plasma-switch__track-checked_false-border-color));}.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_ssthlx1__64acd499:checked ~ .base_15atbyp_s2cs3kf__64acd499{background-color:var(--plasma-switch__track_checked_true-bg-color);border-color:var(--plasma-switch__track-checked_true-border-color);}.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_ssthlx1__64acd499:checked:not([disabled]) ~ .base_15atbyp_s2cs3kf__64acd499:hover{background-color:var(--plasma-switch__track_checked_true_hovered_true-bg-color,var(--plasma-switch__track_checked_true-bg-color));border-color:var(--plasma-switch__track-checked_true_hovered_true-border-color,var(--plasma-switch__track-checked_true-border-color));}.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_s2cs3kf__64acd499::after{background-color:var(--plasma-switch__thumb-checked_false-bg-color);box-shadow:var(--plasma-switch__thumb-box-shadow);}.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_ssthlx1__64acd499:checked ~ .base_15atbyp_s2cs3kf__64acd499::after{background-color:var(--plasma-switch__thumb_checked_true-bg-color);box-shadow:var(--plasma-switch__thumb-box-shadow_checked_true,var(--plasma-switch__thumb-box-shadow));}.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_s1ilr5eq__64acd499{color:var(--plasma-switch__label-color);}.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_sdjnckq__64acd499{color:var(--plasma-switch__description-color);}
|
221
221
|
|
@@ -392,11 +392,12 @@
|
|
392
392
|
|
393
393
|
.DropdownHeader_styles_196gwgm_s133b1g2__3510806e{background:var(--plasma-dropdown-header-background);font-family:var(--plasma-dropdown-header-font-family);font-size:var(--plasma-dropdown-header-font-size);font-style:var(--plasma-dropdown-header-font-style);font-weight:var(--plasma-dropdown-header-letter-spacing);-webkit-letter-spacing:var(--plasma-dropdown-header-line-height);-moz-letter-spacing:var(--plasma-dropdown-header-line-height);-ms-letter-spacing:var(--plasma-dropdown-header-line-height);letter-spacing:var(--plasma-dropdown-header-line-height);line-height:var(--plasma-dropdown-header-font-weight);width:var(--plasma-dropdown-header-width);height:var(--plasma-dropdown-header-height);padding:var(--plasma-dropdown-header-padding-top) var(--plasma-dropdown-header-padding-right) var(--plasma-dropdown-header-padding-bottom) var(--plasma-dropdown-header-padding-left);margin:var(--plasma-dropdown-header-margin-top) var(--plasma-dropdown-header-margin-right) var(--plasma-dropdown-header-margin-bottom) var(--plasma-dropdown-header-margin-left);}
|
394
394
|
|
395
|
-
.
|
395
|
+
.DropdownItem_styles_14yih1y_c1gkzlls__bf539568{--plasma-cell-title-color:var(--text-primary);--plasma-cell-background-color:var(--plasma-colors-transparent);--plasma-cell-padding:var(--plasma-dropdown-cell-padding);--plasma-cell-padding-left-content:var(--plasma-dropdown-cell-padding-left-content);--plasma-cell-padding-content:var(--plasma-dropdown-cell-padding-content);--plasma-cell-padding-right-content:var(--plasma-dropdown-cell-padding-right-content);--plasma-cell-textbox-gap:var(--plasma-dropdown-cell-textbox-gap);--plasma-cell-gap:var(--plasma-dropdown-cell-gap);--plasma-cell-title-font-family:var(--plasma-dropdown-cell-title-font-family);--plasma-cell-title-font-size:var(--plasma-dropdown-cell-title-font-size);--plasma-cell-title-font-style:var(--plasma-dropdown-cell-title-font-style);--plasma-cell-title-font-weight:var(--plasma-dropdown-cell-title-font-weight);--plasma-cell-title-letter-spacing:var(--plasma-dropdown-cell-title-letter-spacing);--plasma-cell-title-line-height:var(--plasma-dropdown-cell-title-line-height);width:100%;}
|
396
396
|
|
397
|
-
.
|
398
|
-
.
|
399
|
-
.
|
397
|
+
.DropdownItem_styles_14yih1y_d1m97l2m__bf539568{line-height:0;color:var(--text-secondary);}
|
398
|
+
.DropdownItem_styles_14yih1y_doib72h__bf539568{height:1px;margin-top:var(--doib72h-0);margin-right:var(--plasma-dropdown-divider-margin-right);margin-bottom:var(--doib72h-1);margin-left:var(--plasma-dropdown-divider-margin-left);background:var(--plasma-dropdown-divider-color);}
|
399
|
+
.DropdownItem_styles_14yih1y_w6l2f0g__bf539568{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;min-height:var(--plasma-dropdown-item-height);margin:0;box-sizing:content-box;padding:var(--w6l2f0g-0);font-family:var(--plasma-dropdown-item-font-family);font-size:var(--plasma-dropdown-item-font-size);font-style:var(--plasma-dropdown-item-font-style);font-weight:var(--plasma-dropdown-item-letter-spacing);-webkit-letter-spacing:var(--plasma-dropdown-item-line-height);-moz-letter-spacing:var(--plasma-dropdown-item-line-height);-ms-letter-spacing:var(--plasma-dropdown-item-line-height);letter-spacing:var(--plasma-dropdown-item-line-height);line-height:var(--plasma-dropdown-item-font-weight);background-color:var(--plasma-colors-transparent);border-radius:var(--plasma-dropdown-border-radius);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-right:0.125rem solid transparent;border-left:0.125rem solid transparent;background-clip:padding-box;position:relative;}.DropdownItem_styles_14yih1y_w6l2f0g__bf539568:hover:not(.DropdownItem_styles_14yih1y_dropdownItemIsDisabled__bf539568){cursor:pointer;background-color:var(--plasma-dropdown-item-background-hover);}.DropdownItem_styles_14yih1y_w6l2f0g__bf539568.DropdownItem_styles_14yih1y_dropdownItemIsActive__bf539568{background-color:var(--plasma-dropdown-item-background-hover);}.DropdownItem_styles_14yih1y_w6l2f0g__bf539568.DropdownItem_styles_14yih1y_dropdownItemIsDisabled__bf539568{opacity:0.4;cursor:not-allowed;}.DropdownItem_styles_14yih1y_w6l2f0g__bf539568:focus{outline:none;}.DropdownItem_styles_14yih1y_w6l2f0g__bf539568::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;display:block;box-sizing:content-box;border:0.0625rem solid transparent;border-radius:var(--plasma-dropdown-item-border-radius);-webkit-transition:none;transition:none;pointer-events:none;}.DropdownItem_styles_14yih1y_w6l2f0g__bf539568.DropdownItem_styles_14yih1y_dropdownItemIsFocused__bf539568:before{outline:none;box-shadow:0 0 0 0.0625rem var(--surface-accent);}
|
400
|
+
.DropdownItem_styles_14yih1y_r1jav4ek__bf539568{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-flex:1;-ms-flex:1;flex:1;}
|
400
401
|
|
401
402
|
.DropdownItem_styles_1lyg81y_s1iqs5in__b17ea060{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;min-width:var(--plasma-dropdown-item-content-left-width);color:var(--plasma-dropdown-item-content-left-color);}
|
402
403
|
.DropdownItem_styles_1lyg81y_sfg3dyd__b17ea060{margin-left:auto;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;min-width:var(--plasma-dropdown-item-content-right-width);color:var(--plasma-dropdown-item-content-right-color);}
|
@@ -623,8 +624,8 @@
|
|
623
624
|
.Button_styles_10g64me_ba2820e__eab937f0{display:inline;}.Button_styles_10g64me_ba2820e__eab937f0 .Button_styles_10g64me_selectWithoutBoxShadow__eab937f0::before{box-shadow:none !important;}.Button_styles_10g64me_ba2820e__eab937f0 .Button_styles_10g64me_arrowInverse__eab937f0{-webkit-transform:rotate(-180deg);-ms-transform:rotate(-180deg);transform:rotate(-180deg);}
|
624
625
|
.Button_styles_10g64me_lpf11kx__eab937f0{display:inline;width:100%;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
625
626
|
|
626
|
-
.Textfield_styles_q4kc1p_s1yhwv5r__70366a17{--plasma-textfield-color:var(--plasma-select-textfield-color);--plasma-textfield-bg-color:var(--plasma-select-textfield-background-color);--plasma-textfield-border-color:var(--plasma-select-textfield-border-color);--plasma-textfield__placeholder-color:var(--plasma-select-textfield-placeholder-color);--plasma-textfield__label-color:var(--plasma-select-textfield-label-color);--plasma-textfield__left-helper-color:var(--plasma-select-textfield-left-helper-color);--plasma-textfield-color-readonly:var(--plasma-select-textfield-color);--plasma-textfield-bg-color-readonly:var(--s1yhwv5r-0);--plasma-textfield__placeholder-color-readonly:var(--s1yhwv5r-1);--plasma-textfield__left-helper-color-readonly:var(--plasma-select-textfield-left-helper-color);--plasma-textfield__label-color-readonly:var(--plasma-select-textfield-label-color);--plasma-textfield-border-color-readonly:var(--s1yhwv5r-2);--plasma-textfield__placeholder-color:var(--plasma-select-textfield-placeholder-color);--plasma-textfield-border-color-hover:var(--plasma-select-textfield-border-color-hover);--plasma-textfield-border-color-focus:var(--plasma-select-textfield-border-color-focus);--plasma-textfield__optional-color:var(--plasma-select-textfield-optional-color);--plasma-textfield-height:var(--plasma-select-textfield-height);--plasma-textfield-border-width:var(--plasma-select-textfield-border-width);--plasma-textfield-border-radius:var(--plasma-select-textfield-border-radius);--plasma-textfield-padding:var(--plasma-select-textfield-padding);--plasma-textfield-padding-with-chips:var(--plasma-select-textfield-padding-with-chips);--plasma-textfield__left-content-margin:var(--plasma-select-textfield-left-content-margin);--plasma-textfield__right-content-margin:var(--plasma-select-textfield-right-content-margin);--plasma-textfield-font-family:var(--plasma-select-textfield-font-family);--plasma-textfield-font-style:var(--plasma-select-textfield-font-style);--plasma-textfield-font-size:var(--plasma-select-textfield-font-size);--plasma-textfield-font-weight:var(--plasma-select-textfield-font-weight);--plasma-textfield-letter-spacing:var(--plasma-select-textfield-letter-spacing);--plasma-textfield-line-height:var(--plasma-select-textfield-line-height);--plasma-textfield-content-slot-color:var(--plasma-select-textfield-content-slot-color);--plasma-textfield-content-slot-color-hover:var(--plasma-select-textfield-content-slot-color-hover);--plasma-textfield-content-slot-color-active:var(--plasma-select-textfield-content-slot-color-active);--plasma-textfield-content-right-slot-color:var(--plasma-select-textfield-content-right-slot-color);--plasma-textfield-content-right-slot-color-hover:var(--plasma-select-textfield-content-right-slot-color-hover);--plasma-textfield-content-right-slot-color-active:var(--plasma-select-textfield-content-right-slot-color-active);--plasma-textfield__label-offset:var(--plasma-select-textfield-label-offset);--plasma-textfield__label-font-family:var(--plasma-select-textfield-label-font-family);--plasma-textfield__label-font-style:var(--plasma-select-textfield-label-font-style);--plasma-textfield__label-font-size:var(--plasma-select-textfield-label-font-size);--plasma-textfield__label-font-weight:var(--plasma-select-textfield-label-font-weight);--plasma-textfield__label-letter-spacing:var(--plasma-select-textfield-label-letter-spacing);--plasma-textfield__label-line-height:var(--plasma-select-textfield-label-line-height);--plasma-textfield-placement_inner__label-font-family:var(--plasma-select-textfield-placement-inner-label-font-family);--plasma-textfield-placement_inner__label-font-style:var(--plasma-select-textfield-placement-inner-label-font-style);--plasma-textfield-placement_inner__label-font-size:var(--plasma-select-textfield-placement-inner-label-font-size);--plasma-textfield-placement_inner__label-font-weight:var(--plasma-select-textfield-placement-inner-label-font-weight);--plasma-textfield-placement_inner__label-letter-spacing:var(--plasma-select-textfield-placement-inner-label-letter-spacing);--plasma-textfield-placement_inner__label-line-height:var(--plasma-select-textfield-placement-inner-label-line-height);--plasma-textfield-placement_inner__label-padding:var(--plasma-select-textfield-placement-inner-label-padding);--plasma-textfield-placement_inner__content-padding:var(--plasma-select-textfield-placement-inner-content-padding);--plasma-textfield__title-caption-color:var(--plasma-select-textfield-title-caption-color);--plasma-textfield__title-caption-label-inner-offset:var(--plasma-select-textfield-title-caption-label-inner-offset);--plasma-textfield__title-caption-font-family:var(--plasma-select-textfield-title-caption-font-family);--plasma-textfield__title-caption-font-style:var(--plasma-select-textfield-title-caption-font-style);--plasma-textfield__title-caption-font-size:var(--plasma-select-textfield-title-caption-font-size);--plasma-textfield__title-caption-font-weight:var(--plasma-select-textfield-title-caption-font-weight);--plasma-textfield__title-caption-letter-spacing:var(--plasma-select-textfield-title-caption-letter-spacing);--plasma-textfield__title-caption-line-height:var(--plasma-select-textfield-title-caption-line-height);--plasma-textfield__left-helper-offset:var(--plasma-select-textfield-left-helper-offset);--plasma-textfield__left-helper-font-family:var(--plasma-select-textfield-left-helper-font-family);--plasma-textfield__left-helper-font-style:var(--plasma-select-textfield-left-helper-font-style);--plasma-textfield__left-helper-font-size:var(--plasma-select-textfield-left-helper-font-size);--plasma-textfield__left-helper-font-weight:var(--plasma-select-textfield-left-helper-font-weight);--plasma-textfield__left-helper-letter-spacing:var(--plasma-select-textfield-left-helper-letter-spacing);--plasma-textfield__left-helper-line-height:var(--plasma-select-textfield-left-helper-line-height);--plasma-textfield__before-text-color:var(--plasma-select-textfield-before-text-color);--plasma-textfield__after-text-color:var(--plasma-select-textfield-after-text-color);--plasma-textfield__before-text-margin:var(--plasma-select-textfield-before-text-margin);--plasma-textfield__after-text-margin:var(--plasma-select-textfield-after-text-margin);--plasma-textfield-disabled-opacity:var(--plasma-select-textfield-disabled-opacity);--plasma-textfield__chip-height:var(--plasma-select-textfield-chip-height);--plasma-textfield__chip-border-radius:var(--plasma-select-textfield-chip-border-radius);--plasma-textfield__chip-gap:var(--plasma-select-textfield-chip-gap);--plasma-textfield__chip-color:var(--plasma-select-textfield-chip-color);--plasma-textfield__chip-color-hover:var(--plasma-select-textfield-chip-color-hover);--plasma-textfield__chip-scale-hover:var(--plasma-select-textfield-chip-scale-hover);--plasma-textfield__chip-background:var(--plasma-select-textfield--chip-background);--plasma-textfield__chip-background-active:var(--plasma-select-textfield-chip-background-active);--plasma-textfield__chip-color-active:var(--plasma-select-textfield-chip-color-active);--plasma-textfield__chip-scale-active:var(--plasma-select-textfield-chip-scale-active);--plasma-textfield__chip-close-icon-color:var(--plasma-select-textfield-chip-close-icons-color);--plasma-textfield__chip-outline-size:var(--plasma-select-textfield-chip-outline-size);--plasma-textfield__chip-width:var(--plasma-select-textfield-chip-width);--plasma-textfield__chip-padding-top:var(--plasma-select-textfield-chip-padding-top);--plasma-textfield__chip-padding-right:var(--plasma-select-textfield-chip-padding-right);--plasma-textfield__chip-padding-bottom:var(--plasma-select-textfield-chip-padding-bottom);--plasma-textfield__chip-padding-left:var(--plasma-select-textfield-chip-padding-left);--plasma-textfield__chip-close-icon-size:var(--plasma-select-textfield-chip-close-icon-size);--plasma-textfield__chip-font-family:var(--plasma-select-textfield-chip-font-family);--plasma-textfield__chip-font-size:var(--plasma-select-textfield-chip-font-size);--plasma-textfield__chip-font-style:var(--plasma-select-textfield-chip-font-style);--plasma-textfield__chip-font-weight:var(--plasma-select-textfield-chip-font-weight);--plasma-textfield__chip-letter-spacing:var(--plasma-select-textfield-chip-letter-spacing);--plasma-textfield__chip-line-height:var(--plasma-select-textfield-chip-line-height);--plasma-textfield__chip-color-readonly:var(--plasma-select-textfield-chip-color);--plasma-textfield__chip-color-readonly-hover:var(--plasma-select-textfield-chip-color);--plasma-textfield__chip-background-readonly:var(--plasma-select-textfield--chip-background);--plasma-textfield__chip-background-readonly-hover:var(--plasma-select-textfield-chip-background-hover);--plasma-textfield__chip-clear-content-margin-left:var(--plasma-select-textfield-chip-clear-content-margin-left);--plasma-textfield__chip-clear-content-margin-right:var(--plasma-select-textfield-chip-clear-content-margin-right);--plasma-textfield-focus-color:var(--plasma-select-textfield-focus-color);}.Textfield_styles_q4kc1p_s1yhwv5r__70366a17 div.Textfield_styles_q4kc1p_inputWrapper__70366a17:focus-within{background-color:var(--plasma-select-textfield-background-color-focus);}
|
627
|
-
.
|
627
|
+
.Textfield_styles_1b7iij0_s1yhwv5r__18547d95{--plasma-textfield-color:var(--plasma-select-textfield-color);--plasma-textfield-bg-color:var(--plasma-select-textfield-background-color);--plasma-textfield-border-color:var(--plasma-select-textfield-border-color);--plasma-textfield__placeholder-color:var(--plasma-select-textfield-placeholder-color);--plasma-textfield__label-color:var(--plasma-select-textfield-label-color);--plasma-textfield__left-helper-color:var(--plasma-select-textfield-left-helper-color);--plasma-textfield-color-readonly:var(--plasma-select-textfield-color);--plasma-textfield-bg-color-readonly:var(--s1yhwv5r-0);--plasma-textfield__placeholder-color-readonly:var(--s1yhwv5r-1);--plasma-textfield__left-helper-color-readonly:var(--plasma-select-textfield-left-helper-color);--plasma-textfield__label-color-readonly:var(--plasma-select-textfield-label-color);--plasma-textfield-border-color-readonly:var(--s1yhwv5r-2);--plasma-textfield__placeholder-color:var(--plasma-select-textfield-placeholder-color);--plasma-textfield-border-color-hover:var(--plasma-select-textfield-border-color-hover);--plasma-textfield-border-color-focus:var(--plasma-select-textfield-border-color-focus);--plasma-textfield__optional-color:var(--plasma-select-new-textfield-optional-color);--plasma-textfield-height:var(--plasma-select-textfield-height);--plasma-textfield-border-width:var(--plasma-select-textfield-border-width);--plasma-textfield-border-radius:var(--plasma-select-textfield-border-radius);--plasma-textfield-padding:var(--plasma-select-textfield-padding);--plasma-textfield-padding-with-chips:var(--plasma-select-textfield-padding-with-chips);--plasma-textfield__left-content-margin:var(--plasma-select-textfield-left-content-margin);--plasma-textfield__right-content-margin:var(--plasma-select-textfield-right-content-margin);--plasma-textfield-font-family:var(--plasma-select-textfield-font-family);--plasma-textfield-font-style:var(--plasma-select-textfield-font-style);--plasma-textfield-font-size:var(--plasma-select-textfield-font-size);--plasma-textfield-font-weight:var(--plasma-select-textfield-font-weight);--plasma-textfield-letter-spacing:var(--plasma-select-textfield-letter-spacing);--plasma-textfield-line-height:var(--plasma-select-textfield-line-height);--plasma-textfield-content-slot-color:var(--plasma-select-textfield-content-slot-color);--plasma-textfield-content-slot-color-hover:var(--plasma-select-textfield-content-slot-color-hover);--plasma-textfield-content-slot-color-active:var(--plasma-select-textfield-content-slot-color-active);--plasma-textfield-content-right-slot-color:var(--plasma-select-textfield-content-right-slot-color);--plasma-textfield-content-right-slot-color-hover:var(--plasma-select-textfield-content-right-slot-color-hover);--plasma-textfield-content-right-slot-color-active:var(--plasma-select-textfield-content-right-slot-color-active);--plasma-textfield__label-offset:var(--plasma-select-textfield-label-offset);--plasma-textfield__label-font-family:var(--plasma-select-textfield-label-font-family);--plasma-textfield__label-font-style:var(--plasma-select-textfield-label-font-style);--plasma-textfield__label-font-size:var(--plasma-select-textfield-label-font-size);--plasma-textfield__label-font-weight:var(--plasma-select-textfield-label-font-weight);--plasma-textfield__label-letter-spacing:var(--plasma-select-textfield-label-letter-spacing);--plasma-textfield__label-line-height:var(--plasma-select-textfield-label-line-height);--plasma-textfield-placement_inner__label-font-family:var(--plasma-select-textfield-placement-inner-label-font-family);--plasma-textfield-placement_inner__label-font-style:var(--plasma-select-textfield-placement-inner-label-font-style);--plasma-textfield-placement_inner__label-font-size:var(--plasma-select-textfield-placement-inner-label-font-size);--plasma-textfield-placement_inner__label-font-weight:var(--plasma-select-textfield-placement-inner-label-font-weight);--plasma-textfield-placement_inner__label-letter-spacing:var(--plasma-select-textfield-placement-inner-label-letter-spacing);--plasma-textfield-placement_inner__label-line-height:var(--plasma-select-textfield-placement-inner-label-line-height);--plasma-textfield-placement_inner__label-padding:var(--plasma-select-textfield-placement-inner-label-padding);--plasma-textfield-placement_inner__content-padding:var(--plasma-select-textfield-placement-inner-content-padding);--plasma-textfield__title-caption-color:var(--plasma-select-textfield-title-caption-color);--plasma-textfield__title-caption-label-inner-offset:var(--plasma-select-textfield-title-caption-label-inner-offset);--plasma-textfield__title-caption-font-family:var(--plasma-select-textfield-title-caption-font-family);--plasma-textfield__title-caption-font-style:var(--plasma-select-textfield-title-caption-font-style);--plasma-textfield__title-caption-font-size:var(--plasma-select-textfield-title-caption-font-size);--plasma-textfield__title-caption-font-weight:var(--plasma-select-textfield-title-caption-font-weight);--plasma-textfield__title-caption-letter-spacing:var(--plasma-select-textfield-title-caption-letter-spacing);--plasma-textfield__title-caption-line-height:var(--plasma-select-textfield-title-caption-line-height);--plasma-textfield__left-helper-offset:var(--plasma-select-textfield-left-helper-offset);--plasma-textfield__left-helper-font-family:var(--plasma-select-textfield-left-helper-font-family);--plasma-textfield__left-helper-font-style:var(--plasma-select-textfield-left-helper-font-style);--plasma-textfield__left-helper-font-size:var(--plasma-select-textfield-left-helper-font-size);--plasma-textfield__left-helper-font-weight:var(--plasma-select-textfield-left-helper-font-weight);--plasma-textfield__left-helper-letter-spacing:var(--plasma-select-textfield-left-helper-letter-spacing);--plasma-textfield__left-helper-line-height:var(--plasma-select-textfield-left-helper-line-height);--plasma-textfield__before-text-color:var(--plasma-select-textfield-before-text-color);--plasma-textfield__after-text-color:var(--plasma-select-textfield-after-text-color);--plasma-textfield__before-text-margin:var(--plasma-select-textfield-before-text-margin);--plasma-textfield__after-text-margin:var(--plasma-select-textfield-after-text-margin);--plasma-textfield-disabled-opacity:var(--plasma-select-textfield-disabled-opacity);--plasma-textfield__chip-height:var(--plasma-select-textfield-chip-height);--plasma-textfield__chip-border-radius:var(--plasma-select-textfield-chip-border-radius);--plasma-textfield__chip-gap:var(--plasma-select-textfield-chip-gap);--plasma-textfield__chip-color:var(--plasma-select-textfield-chip-color);--plasma-textfield__chip-color-hover:var(--plasma-select-textfield-chip-color-hover);--plasma-textfield__chip-scale-hover:var(--plasma-select-textfield-chip-scale-hover);--plasma-textfield__chip-background:var(--plasma-select-textfield--chip-background);--plasma-textfield__chip-background-active:var(--plasma-select-textfield-chip-background-active);--plasma-textfield__chip-color-active:var(--plasma-select-textfield-chip-color-active);--plasma-textfield__chip-scale-active:var(--plasma-select-textfield-chip-scale-active);--plasma-textfield__chip-close-icon-color:var(--plasma-select-textfield-chip-close-icons-color);--plasma-textfield__chip-outline-size:var(--plasma-select-textfield-chip-outline-size);--plasma-textfield__chip-width:var(--plasma-select-textfield-chip-width);--plasma-textfield__chip-padding-top:var(--plasma-select-textfield-chip-padding-top);--plasma-textfield__chip-padding-right:var(--plasma-select-textfield-chip-padding-right);--plasma-textfield__chip-padding-bottom:var(--plasma-select-textfield-chip-padding-bottom);--plasma-textfield__chip-padding-left:var(--plasma-select-textfield-chip-padding-left);--plasma-textfield__chip-close-icon-size:var(--plasma-select-textfield-chip-close-icon-size);--plasma-textfield__chip-font-family:var(--plasma-select-textfield-chip-font-family);--plasma-textfield__chip-font-size:var(--plasma-select-textfield-chip-font-size);--plasma-textfield__chip-font-style:var(--plasma-select-textfield-chip-font-style);--plasma-textfield__chip-font-weight:var(--plasma-select-textfield-chip-font-weight);--plasma-textfield__chip-letter-spacing:var(--plasma-select-textfield-chip-letter-spacing);--plasma-textfield__chip-line-height:var(--plasma-select-textfield-chip-line-height);--plasma-textfield__chip-color-readonly:var(--plasma-select-textfield-chip-color);--plasma-textfield__chip-color-readonly-hover:var(--plasma-select-textfield-chip-color);--plasma-textfield__chip-background-readonly:var(--plasma-select-textfield--chip-background);--plasma-textfield__chip-background-readonly-hover:var(--plasma-select-textfield-chip-background-hover);--plasma-textfield__chip-clear-content-margin-left:var(--plasma-select-textfield-chip-clear-content-margin-left);--plasma-textfield__chip-clear-content-margin-right:var(--plasma-select-textfield-chip-clear-content-margin-right);--plasma-textfield__indicator-color:var(--plasma-select-new-textfield-indicator-color);--plasma-textfield__indicator-size-inner:var(--plasma-select-new-textfield-indicator-size-inner);--plasma-textfield__indicator-size-outer:var(--plasma-select-new-textfield-indicator-size-outer);--plasma-textfield__indicator-placement-inner:var(--plasma-select-new-textfield-indicator-placement-inner);--plasma-textfield__indicator-placement-outer:var(--plasma-select-new-textfield-indicator-placement-outer);--plasma-textfield__indicator-placement-inner-right:var(--plasma-select-new-textfield-indicator-placement-inner-right);--plasma-textfield__indicator-placement-outer-right:var(--plasma-select-new-textfield-indicator-placement-outer-right);--plasma-textfield__clear-indicator-placement-inner:var(--plasma-select-new-textfield-clear-indicator-placement-inner);--plasma-textfield__clear-indicator-placement-inner-right: var(--plasma-select-new-textfield-clear-indicator-placement-inner-right);--plasma-textfield__clear-indicator-hint-placement-inner-right:var(--plasma-select-new-textfield-clear-indicator-hint-placement-inner-right);--plasma-textfield-focus-color:var(--plasma-select-textfield-focus-color);}.Textfield_styles_1b7iij0_s1yhwv5r__18547d95 div.Textfield_styles_1b7iij0_inputWrapper__18547d95:focus-within{background-color:var(--plasma-select-textfield-background-color-focus);}
|
628
|
+
.Textfield_styles_1b7iij0_i7x5udn__18547d95{line-height:0;color:var(--plasma-select-disclosure-icon-color);cursor:var(--i7x5udn-0);}.Textfield_styles_1b7iij0_i7x5udn__18547d95 .Textfield_styles_1b7iij0_arrowInverse__18547d95{-webkit-transform:rotate(-180deg);-ms-transform:rotate(-180deg);transform:rotate(-180deg);}.Textfield_styles_1b7iij0_i7x5udn__18547d95:hover,.Textfield_styles_1b7iij0_i7x5udn__18547d95:active{color:var(--i7x5udn-1);}
|
628
629
|
|
629
630
|
|
630
631
|
.Select_styles_1p5c9p3_upxbau6__28c8cedc{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), inset 0 0 0 var(--plasma-select-dropdown-border-width,0rem) var(--plasma-select-dropdown-border-color,transparent);border-radius:var(--plasma-select-border-radius);width:var(--upxbau6-0);height:var(--upxbau6-1);overflow:var(--upxbau6-2);margin:var(--upxbau6-3);padding:calc(var(--plasma-select-padding) + var(--plasma-select-dropdown-border-width,0rem)) 0;}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@salutejs/plasma-new-hope",
|
3
|
-
"version": "0.194.
|
3
|
+
"version": "0.194.2-canary.1561.11922759758.0",
|
4
4
|
"description": "Salute Design System blueprint",
|
5
5
|
"main": "cjs/index.js",
|
6
6
|
"module": "es/index.js",
|
@@ -98,6 +98,7 @@
|
|
98
98
|
"babel-loader": "8.2.2",
|
99
99
|
"babel-plugin-annotate-pure-calls": "0.4.0",
|
100
100
|
"babel-plugin-styled-components": "1.13.2",
|
101
|
+
"csstype": "3.1.3",
|
101
102
|
"default-browser-id": "2.0.0",
|
102
103
|
"react": "18.2.0",
|
103
104
|
"react-dom": "18.2.0",
|
@@ -128,5 +129,5 @@
|
|
128
129
|
"sideEffects": [
|
129
130
|
"*.css"
|
130
131
|
],
|
131
|
-
"gitHead": "
|
132
|
+
"gitHead": "a5db013e5ff2321754619c4b8de204c07f463e7a"
|
132
133
|
}
|
@@ -24,6 +24,10 @@ var _excluded = ["multiple", "value", "onChange", "isTargetAmount", "targetAmoun
|
|
24
24
|
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); }
|
25
25
|
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; }
|
26
26
|
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); }
|
27
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
28
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
29
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
30
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
27
31
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
28
32
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
29
33
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
@@ -186,9 +190,24 @@ var comboboxRoot = exports.comboboxRoot = function comboboxRoot(Root) {
|
|
186
190
|
|
187
191
|
// Обработчик чипов
|
188
192
|
var handleChipsChange = function handleChipsChange(chipLabels) {
|
189
|
-
|
190
|
-
|
191
|
-
|
193
|
+
if (!Array.isArray(value)) return;
|
194
|
+
|
195
|
+
// TODO: #1564
|
196
|
+
// Из лейблов чипов получаем value у item и далее прокидываем его в onChange.
|
197
|
+
if (renderValue && !isTargetAmount) {
|
198
|
+
var resultValues = _toConsumableArray(value);
|
199
|
+
value.forEach(function (_, index) {
|
200
|
+
var labelAfterRenderValue = renderValue(labelToItemMap.get(valueToItemMap.get(value[index]).label));
|
201
|
+
if (!chipLabels.includes(labelAfterRenderValue)) {
|
202
|
+
resultValues.splice(index, 1);
|
203
|
+
}
|
204
|
+
});
|
205
|
+
onChange(resultValues);
|
206
|
+
} else {
|
207
|
+
onChange(chipLabels.map(function (chipLabel) {
|
208
|
+
return labelToItemMap.get(chipLabel).value;
|
209
|
+
}));
|
210
|
+
}
|
192
211
|
};
|
193
212
|
|
194
213
|
// Обработчик открытия/закрытия выпадающего списка
|
@@ -357,7 +376,6 @@ var comboboxRoot = exports.comboboxRoot = function comboboxRoot(Root) {
|
|
357
376
|
handleItemClick: handleItemClick,
|
358
377
|
variant: variant,
|
359
378
|
renderItem: renderItem,
|
360
|
-
valueToItemMap: valueToItemMap,
|
361
379
|
treeId: treeId
|
362
380
|
}
|
363
381
|
}, /*#__PURE__*/_react["default"].createElement(_FloatingPopover.FloatingPopover, {
|
@@ -40,7 +40,6 @@ var Item = exports.Item = function Item(_ref) {
|
|
40
40
|
handleItemClick = _useContext.handleItemClick,
|
41
41
|
variant = _useContext.variant,
|
42
42
|
renderItem = _useContext.renderItem,
|
43
|
-
valueToItemMap = _useContext.valueToItemMap,
|
44
43
|
treeId = _useContext.treeId;
|
45
44
|
var disabledClassName = disabled ? _Combobox.classes.dropdownItemIsDisabled : undefined;
|
46
45
|
var focusedClass = currentLevel === focusedPath.length - 1 && index === (focusedPath === null || focusedPath === void 0 ? void 0 : focusedPath[currentLevel]) ? _Combobox.classes.dropdownItemIsFocused : undefined;
|
@@ -94,7 +93,7 @@ var Item = exports.Item = function Item(_ref) {
|
|
94
93
|
}))), !multiple && checked.get(item.value) === 'done' && /*#__PURE__*/_react["default"].createElement(_Icon.IconDone, {
|
95
94
|
size: (0, _utils.sizeToIconSize)(size, variant),
|
96
95
|
color: "inherit"
|
97
|
-
})), renderItem ? /*#__PURE__*/_react["default"].createElement(_Item.StyledText, null, renderItem(
|
96
|
+
})), renderItem ? /*#__PURE__*/_react["default"].createElement(_Item.StyledText, null, renderItem(item)) : /*#__PURE__*/_react["default"].createElement(_Item.StyledWrapper, null, /*#__PURE__*/_react["default"].createElement(_Item.StyledCell, {
|
98
97
|
view: "default",
|
99
98
|
size: "l",
|
100
99
|
contentLeft: contentLeft,
|
@@ -20,7 +20,7 @@ var _Dropdown2 = /*#__PURE__*/require("./Dropdown.tokens");
|
|
20
20
|
var _useKeyboardNavigation = /*#__PURE__*/require("./hooks/useKeyboardNavigation");
|
21
21
|
var _useHashMaps3 = /*#__PURE__*/require("./hooks/useHashMaps");
|
22
22
|
var _FloatingPopover = /*#__PURE__*/require("./FloatingPopover");
|
23
|
-
var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow", "alwaysOpened", "portal"];
|
23
|
+
var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow", "alwaysOpened", "portal", "renderItem"];
|
24
24
|
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); }
|
25
25
|
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; }
|
26
26
|
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); }
|
@@ -69,6 +69,7 @@ var dropdownRoot = exports.dropdownRoot = function dropdownRoot(Root) {
|
|
69
69
|
_ref$alwaysOpened = _ref.alwaysOpened,
|
70
70
|
alwaysOpened = _ref$alwaysOpened === void 0 ? false : _ref$alwaysOpened,
|
71
71
|
portal = _ref.portal,
|
72
|
+
renderItem = _ref.renderItem,
|
72
73
|
rest = _objectWithoutProperties(_ref, _excluded);
|
73
74
|
var _useReducer = (0, _react.useReducer)(_pathReducer.pathReducer, []),
|
74
75
|
_useReducer2 = _slicedToArray(_useReducer, 2),
|
@@ -144,7 +145,8 @@ var dropdownRoot = exports.dropdownRoot = function dropdownRoot(Root) {
|
|
144
145
|
onItemClick: onItemClick,
|
145
146
|
onItemSelect: onItemSelect,
|
146
147
|
hasArrow: hasArrow,
|
147
|
-
treeId: treeId
|
148
|
+
treeId: treeId,
|
149
|
+
renderItem: renderItem
|
148
150
|
}
|
149
151
|
}, /*#__PURE__*/_react["default"].createElement(_FloatingPopover.FloatingPopover, {
|
150
152
|
ref: floatingPopoverRef,
|
@@ -43,7 +43,8 @@ var DropdownItem = exports.DropdownItem = function DropdownItem(_ref) {
|
|
43
43
|
onItemSelect = _useContext.onItemSelect,
|
44
44
|
onItemClick = _useContext.onItemClick,
|
45
45
|
hasArrow = _useContext.hasArrow,
|
46
|
-
treeId = _useContext.treeId
|
46
|
+
treeId = _useContext.treeId,
|
47
|
+
renderItem = _useContext.renderItem;
|
47
48
|
var hasDescendants = Boolean(item.items);
|
48
49
|
var disclosureIconSize = size === 'xs' ? 'xs' : 's';
|
49
50
|
var isDisabledClassName = disabled || isDisabled ? _Dropdown.classes.dropdownItemIsDisabled : undefined;
|
@@ -94,7 +95,7 @@ var DropdownItem = exports.DropdownItem = function DropdownItem(_ref) {
|
|
94
95
|
"aria-expanded": ariaExpanded,
|
95
96
|
"aria-level": ariaLevel,
|
96
97
|
"aria-label": ariaLabel
|
97
|
-
}, /*#__PURE__*/_react["default"].createElement(_DropdownItem.CellWrapper, null, /*#__PURE__*/_react["default"].createElement(_DropdownItem.StyledCell, {
|
98
|
+
}, renderItem ? /*#__PURE__*/_react["default"].createElement(_DropdownItem.RenderItemWrapper, null, renderItem(item)) : /*#__PURE__*/_react["default"].createElement(_DropdownItem.CellWrapper, null, /*#__PURE__*/_react["default"].createElement(_DropdownItem.StyledCell, {
|
98
99
|
contentLeft: contentLeft,
|
99
100
|
contentRight: contentRight,
|
100
101
|
alignContentLeft: "center",
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.Wrapper = exports.StyledCell = exports.Divider = exports.DisclosureIconWrapper = exports.CellWrapper = void 0;
|
6
|
+
exports.Wrapper = exports.StyledCell = exports.RenderItemWrapper = exports.Divider = exports.DisclosureIconWrapper = exports.CellWrapper = void 0;
|
7
7
|
var _styledComponents = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("styled-components"));
|
8
8
|
var _Dropdown = /*#__PURE__*/require("../../Dropdown.tokens");
|
9
9
|
var _mixins = /*#__PURE__*/require("../../../../mixins");
|
@@ -42,4 +42,7 @@ var Wrapper = exports.Wrapper = /*#__PURE__*/_styledComponents["default"].li.wit
|
|
42
42
|
outlineRadius: /*#__PURE__*/"var(".concat(_Dropdown.tokens.itemBorderRadius, ")"),
|
43
43
|
hasTransition: false,
|
44
44
|
customFocusRules: /*#__PURE__*/"\n &.".concat(_Dropdown.classes.dropdownItemIsFocused, ":before {\n outline: none;\n box-shadow: 0 0 0 0.0625rem var(").concat(_Dropdown.constants.focusColor, ");\n }\n ")
|
45
|
-
}));
|
45
|
+
}));
|
46
|
+
var RenderItemWrapper = exports.RenderItemWrapper = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
47
|
+
componentId: "plasma-new-hope__sc-hs0ek1-5"
|
48
|
+
})(["", ";flex:1;"], /*#__PURE__*/(0, _mixins.applyEllipsis)());
|
@@ -39,7 +39,7 @@ var selectRoot = exports.selectRoot = function selectRoot(Root) {
|
|
39
39
|
var outerValue = props.value,
|
40
40
|
outerOnChange = props.onChange,
|
41
41
|
_props$target = props.target,
|
42
|
-
|
42
|
+
target = _props$target === void 0 ? 'textfield-like' : _props$target,
|
43
43
|
items = props.items,
|
44
44
|
_props$placement = props.placement,
|
45
45
|
placement = _props$placement === void 0 ? 'bottom' : _props$placement,
|
@@ -104,7 +104,14 @@ var selectRoot = exports.selectRoot = function selectRoot(Root) {
|
|
104
104
|
var activeDescendantItemValue = ((_getItemByFocused = (0, _useKeyboardNavigation.getItemByFocused)(focusedPath, focusedToValueMap)) === null || _getItemByFocused === void 0 ? void 0 : _getItemByFocused.value.toString()) || '';
|
105
105
|
var closeAfterSelect = outerCloseAfterSelect !== null && outerCloseAfterSelect !== void 0 ? outerCloseAfterSelect : !props.multiselect;
|
106
106
|
var treeId = (0, _plasmaCore.safeUseId)();
|
107
|
-
var view =
|
107
|
+
var view = target === 'textfield-like' && disabled ? 'default' : (0, _utils2.getView)(status, outerView);
|
108
|
+
|
109
|
+
// Собираем объект с пропсами для required и прокидываем их напрямую в компонент Textfield.
|
110
|
+
var requiredProps = props.target === 'button-like' ? undefined : {
|
111
|
+
required: props.required,
|
112
|
+
requiredPlacement: props.requiredPlacement,
|
113
|
+
optional: props.optional
|
114
|
+
};
|
108
115
|
var targetRef = (0, _hooks.useOutsideClick)(function () {
|
109
116
|
if (!isCurrentListOpen) {
|
110
117
|
return;
|
@@ -281,7 +288,6 @@ var selectRoot = exports.selectRoot = function selectRoot(Root) {
|
|
281
288
|
handleItemClick: handleItemClick,
|
282
289
|
variant: variant,
|
283
290
|
renderItem: renderItem,
|
284
|
-
valueToItemMap: valueToItemMap,
|
285
291
|
treeId: treeId
|
286
292
|
}
|
287
293
|
}, /*#__PURE__*/_react["default"].createElement(_FloatingPopover.FloatingPopover, {
|
@@ -296,7 +302,6 @@ var selectRoot = exports.selectRoot = function selectRoot(Root) {
|
|
296
302
|
target: function target(referenceRef) {
|
297
303
|
return /*#__PURE__*/_react["default"].createElement(_ui.Target, {
|
298
304
|
ref: ref,
|
299
|
-
target: _target,
|
300
305
|
value: value,
|
301
306
|
opened: isCurrentListOpen,
|
302
307
|
valueToItemMap: valueToItemMap,
|
@@ -320,7 +325,8 @@ var selectRoot = exports.selectRoot = function selectRoot(Root) {
|
|
320
325
|
onChange: onChange,
|
321
326
|
labelToItemMap: labelToItemMap,
|
322
327
|
chipView: chipView,
|
323
|
-
separator: separator
|
328
|
+
separator: separator,
|
329
|
+
requiredProps: requiredProps
|
324
330
|
});
|
325
331
|
}
|
326
332
|
}, /*#__PURE__*/_react["default"].createElement(Root, _extends({
|