@salutejs/plasma-new-hope 0.71.2-dev.0 → 0.72.0-canary.1160.8612911363.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Cell/Cell.js +0 -2
- package/cjs/components/Cell/Cell.js.map +1 -1
- package/cjs/components/TextField/TextField.js +166 -40
- package/cjs/components/TextField/TextField.js.map +1 -1
- package/cjs/components/TextField/TextField.styles.js +27 -11
- package/cjs/components/TextField/TextField.styles.js.map +1 -1
- package/cjs/components/TextField/TextField.styles_1b1mddp.css +8 -0
- package/cjs/components/TextField/TextField.tokens.js +68 -20
- package/cjs/components/TextField/TextField.tokens.js.map +1 -1
- package/cjs/components/TextField/TextField_wctd2m.css +1 -0
- package/cjs/components/TextField/hooks/useKeyNavigation.js +131 -0
- package/cjs/components/TextField/hooks/useKeyNavigation.js.map +1 -0
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.css +19 -0
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +38 -0
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js.map +1 -0
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +26 -0
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -0
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles_1y8n7la.css +1 -0
- package/cjs/components/TextField/{_disabled → variations/_disabled}/base.js +2 -2
- package/cjs/components/TextField/variations/_disabled/base.js.map +1 -0
- package/cjs/components/TextField/variations/_disabled/base_1tnjoy9.css +1 -0
- package/cjs/components/TextField/{_label-placement → variations/_label-placement}/base.js +1 -1
- package/cjs/components/TextField/variations/_label-placement/base.js.map +1 -0
- package/cjs/components/TextField/{_label-placement → variations/_label-placement}/inner.js +2 -2
- package/cjs/components/TextField/variations/_label-placement/inner.js.map +1 -0
- package/cjs/components/TextField/variations/_label-placement/inner_gqlcj2.css +1 -0
- package/cjs/components/TextField/{_label-placement → variations/_label-placement}/outer.js +2 -2
- package/cjs/components/TextField/variations/_label-placement/outer.js.map +1 -0
- package/cjs/components/TextField/variations/_label-placement/outer_is41nj.css +1 -0
- package/cjs/components/TextField/{_view → variations/_read-only}/base.js +2 -2
- package/cjs/components/TextField/variations/_read-only/base.js.map +1 -0
- package/cjs/components/TextField/variations/_read-only/base_134hshp.css +1 -0
- package/cjs/components/TextField/variations/_size/base.js +9 -0
- package/cjs/components/TextField/variations/_size/base.js.map +1 -0
- package/cjs/components/TextField/variations/_size/base_1khzr9t.css +1 -0
- package/cjs/components/TextField/{_size → variations/_view}/base.js +2 -2
- package/cjs/components/TextField/variations/_view/base.js.map +1 -0
- package/cjs/components/TextField/variations/_view/base_1qd77x6.css +1 -0
- package/cjs/index.css +16 -9
- package/cjs/index.js +2 -2
- package/es/components/Cell/Cell.js +0 -2
- package/es/components/Cell/Cell.js.map +1 -1
- package/es/components/TextField/TextField.js +169 -44
- package/es/components/TextField/TextField.js.map +1 -1
- package/es/components/TextField/TextField.styles.js +25 -12
- package/es/components/TextField/TextField.styles.js.map +1 -1
- package/es/components/TextField/TextField.styles_1b1mddp.css +8 -0
- package/es/components/TextField/TextField.tokens.js +68 -21
- package/es/components/TextField/TextField.tokens.js.map +1 -1
- package/es/components/TextField/TextField_wctd2m.css +1 -0
- package/es/components/TextField/hooks/useKeyNavigation.js +126 -0
- package/es/components/TextField/hooks/useKeyNavigation.js.map +1 -0
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.css +19 -0
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +34 -0
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.js.map +1 -0
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +22 -0
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -0
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles_1y8n7la.css +1 -0
- package/es/components/TextField/variations/_disabled/base.js +5 -0
- package/es/components/TextField/variations/_disabled/base.js.map +1 -0
- package/es/components/TextField/variations/_disabled/base_1tnjoy9.css +1 -0
- package/es/components/TextField/{_label-placement → variations/_label-placement}/base.js +1 -1
- package/es/components/TextField/variations/_label-placement/base.js.map +1 -0
- package/es/components/TextField/variations/_label-placement/inner.js +5 -0
- package/es/components/TextField/variations/_label-placement/inner.js.map +1 -0
- package/es/components/TextField/variations/_label-placement/inner_gqlcj2.css +1 -0
- package/es/components/TextField/variations/_label-placement/outer.js +5 -0
- package/es/components/TextField/variations/_label-placement/outer.js.map +1 -0
- package/es/components/TextField/variations/_label-placement/outer_is41nj.css +1 -0
- package/es/components/TextField/variations/_read-only/base.js +5 -0
- package/es/components/TextField/variations/_read-only/base.js.map +1 -0
- package/es/components/TextField/variations/_read-only/base_134hshp.css +1 -0
- package/es/components/TextField/variations/_size/base.js +5 -0
- package/es/components/TextField/variations/_size/base.js.map +1 -0
- package/es/components/TextField/variations/_size/base_1khzr9t.css +1 -0
- package/es/components/TextField/{_disabled → variations/_view}/base.js +2 -2
- package/es/components/TextField/variations/_view/base.js.map +1 -0
- package/es/components/TextField/variations/_view/base_1qd77x6.css +1 -0
- package/es/index.css +16 -9
- package/es/index.js +2 -2
- package/package.json +2 -2
- package/styled-components/cjs/components/Cell/Cell.js +0 -2
- package/styled-components/cjs/components/TextField/TextField.js +173 -43
- package/styled-components/cjs/components/TextField/TextField.styles.js +18 -10
- package/styled-components/cjs/components/TextField/TextField.template-doc.mdx +24 -0
- package/styled-components/cjs/components/TextField/TextField.tokens.js +68 -21
- package/styled-components/cjs/components/TextField/hooks/index.js +12 -0
- package/styled-components/cjs/components/TextField/hooks/useKeyNavigation.js +137 -0
- package/styled-components/cjs/components/TextField/index.js +2 -2
- package/styled-components/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +39 -0
- package/styled-components/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +25 -0
- package/styled-components/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.types.js +5 -0
- package/styled-components/cjs/components/TextField/ui/index.js +12 -0
- package/styled-components/cjs/components/TextField/variations/_disabled/base.js +10 -0
- package/styled-components/cjs/components/TextField/variations/_label-placement/inner.js +10 -0
- package/styled-components/cjs/components/TextField/{_label-placement → variations/_label-placement}/outer.js +3 -3
- package/styled-components/cjs/components/TextField/variations/_read-only/base.js +10 -0
- package/styled-components/cjs/components/TextField/variations/_read-only/tokens.json +1 -0
- package/styled-components/cjs/components/TextField/variations/_size/base.js +10 -0
- package/styled-components/cjs/components/TextField/variations/_view/base.js +10 -0
- package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +43 -0
- package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.js +11 -0
- package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +133 -0
- package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.config.js +40 -0
- package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.js +11 -0
- package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +133 -0
- package/styled-components/cjs/examples/sds_engineer/components/TextField/TextField.config.js +43 -0
- package/styled-components/cjs/examples/sds_engineer/components/TextField/TextField.js +11 -0
- package/styled-components/cjs/examples/sds_engineer/components/TextField/TextField.stories.tsx +133 -0
- package/styled-components/es/components/Cell/Cell.js +0 -2
- package/styled-components/es/components/TextField/TextField.js +177 -47
- package/styled-components/es/components/TextField/TextField.styles.js +17 -9
- package/styled-components/es/components/TextField/TextField.template-doc.mdx +24 -0
- package/styled-components/es/components/TextField/TextField.tokens.js +67 -20
- package/styled-components/es/components/TextField/hooks/index.js +1 -0
- package/styled-components/es/components/TextField/hooks/useKeyNavigation.js +131 -0
- package/styled-components/es/components/TextField/index.js +2 -2
- package/styled-components/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +30 -0
- package/styled-components/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +19 -0
- package/styled-components/es/components/TextField/ui/TextFieldChip/TextFieldChip.types.js +1 -0
- package/styled-components/es/components/TextField/ui/index.js +1 -0
- package/styled-components/es/components/TextField/variations/_disabled/base.js +4 -0
- package/styled-components/es/components/TextField/variations/_label-placement/inner.js +4 -0
- package/styled-components/es/components/TextField/variations/_label-placement/outer.js +4 -0
- package/styled-components/es/components/TextField/variations/_read-only/base.js +4 -0
- package/styled-components/es/components/TextField/variations/_read-only/tokens.json +1 -0
- package/styled-components/es/components/TextField/variations/_size/base.js +4 -0
- package/styled-components/es/components/TextField/variations/_view/base.js +4 -0
- package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.config.js +37 -0
- package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.js +5 -0
- package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +133 -0
- package/styled-components/es/examples/plasma_web/components/TextField/TextField.config.js +34 -0
- package/styled-components/es/examples/plasma_web/components/TextField/TextField.js +5 -0
- package/styled-components/es/examples/plasma_web/components/TextField/TextField.stories.tsx +133 -0
- package/styled-components/es/examples/sds_engineer/components/TextField/TextField.config.js +37 -0
- package/styled-components/es/examples/sds_engineer/components/TextField/TextField.js +5 -0
- package/styled-components/es/examples/sds_engineer/components/TextField/TextField.stories.tsx +133 -0
- package/types/components/Cell/Cell.d.ts.map +1 -1
- package/types/components/TextField/TextField.d.ts +8 -3
- package/types/components/TextField/TextField.d.ts.map +1 -1
- package/types/components/TextField/TextField.styles.d.ts +6 -3
- package/types/components/TextField/TextField.styles.d.ts.map +1 -1
- package/types/components/TextField/TextField.tokens.d.ts +57 -8
- package/types/components/TextField/TextField.tokens.d.ts.map +1 -1
- package/types/components/TextField/TextField.types.d.ts +45 -3
- package/types/components/TextField/TextField.types.d.ts.map +1 -1
- package/types/components/TextField/hooks/index.d.ts +2 -0
- package/types/components/TextField/hooks/index.d.ts.map +1 -0
- package/types/components/TextField/hooks/useKeyNavigation.d.ts +17 -0
- package/types/components/TextField/hooks/useKeyNavigation.d.ts.map +1 -0
- package/types/components/TextField/index.d.ts +3 -2
- package/types/components/TextField/index.d.ts.map +1 -1
- package/types/components/TextField/ui/TextFieldChip/TextFieldChip.d.ts +7 -0
- package/types/components/TextField/ui/TextFieldChip/TextFieldChip.d.ts.map +1 -0
- package/types/components/TextField/ui/TextFieldChip/TextFieldChip.styles.d.ts +3 -0
- package/types/components/TextField/ui/TextFieldChip/TextFieldChip.styles.d.ts.map +1 -0
- package/types/components/TextField/ui/TextFieldChip/TextFieldChip.types.d.ts +37 -0
- package/types/components/TextField/ui/TextFieldChip/TextFieldChip.types.d.ts.map +1 -0
- package/types/components/TextField/ui/index.d.ts +2 -0
- package/types/components/TextField/ui/index.d.ts.map +1 -0
- package/types/components/TextField/variations/_disabled/base.d.ts.map +1 -0
- package/types/components/TextField/variations/_label-placement/base.d.ts.map +1 -0
- package/types/components/TextField/variations/_label-placement/index.d.ts.map +1 -0
- package/types/components/TextField/variations/_label-placement/inner.d.ts.map +1 -0
- package/types/components/TextField/variations/_label-placement/outer.d.ts.map +1 -0
- package/types/components/TextField/variations/_read-only/base.d.ts.map +1 -0
- package/types/components/TextField/variations/_size/base.d.ts.map +1 -0
- package/types/components/TextField/variations/_view/base.d.ts +2 -0
- package/types/components/TextField/variations/_view/base.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/TextField/TextField.config.d.ts +32 -0
- package/types/examples/plasma_b2c/components/TextField/TextField.config.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/TextField/TextField.d.ts +26 -0
- package/types/examples/plasma_b2c/components/TextField/TextField.d.ts.map +1 -0
- package/types/examples/plasma_web/components/TextField/TextField.config.d.ts +32 -0
- package/types/examples/plasma_web/components/TextField/TextField.config.d.ts.map +1 -0
- package/types/examples/plasma_web/components/TextField/TextField.d.ts +26 -0
- package/types/examples/plasma_web/components/TextField/TextField.d.ts.map +1 -0
- package/types/examples/sds_engineer/components/TextField/TextField.config.d.ts +32 -0
- package/types/examples/sds_engineer/components/TextField/TextField.config.d.ts.map +1 -0
- package/types/examples/sds_engineer/components/TextField/TextField.d.ts +26 -0
- package/types/examples/sds_engineer/components/TextField/TextField.d.ts.map +1 -0
- package/cjs/components/TextField/TextField.styles_2qw1n8.css +0 -5
- package/cjs/components/TextField/TextField_1lzb2r1.css +0 -1
- package/cjs/components/TextField/_disabled/base.js.map +0 -1
- package/cjs/components/TextField/_disabled/base_so3w81.css +0 -1
- package/cjs/components/TextField/_label-placement/base.js.map +0 -1
- package/cjs/components/TextField/_label-placement/inner.js.map +0 -1
- package/cjs/components/TextField/_label-placement/inner_1tyuicp.css +0 -1
- package/cjs/components/TextField/_label-placement/outer.js.map +0 -1
- package/cjs/components/TextField/_label-placement/outer_19ekaek.css +0 -1
- package/cjs/components/TextField/_size/base.js.map +0 -1
- package/cjs/components/TextField/_size/base_b5smyu.css +0 -1
- package/cjs/components/TextField/_view/base.js.map +0 -1
- package/cjs/components/TextField/_view/base_5bqzed.css +0 -1
- package/es/components/TextField/TextField.styles_2qw1n8.css +0 -5
- package/es/components/TextField/TextField_1lzb2r1.css +0 -1
- package/es/components/TextField/_disabled/base.js.map +0 -1
- package/es/components/TextField/_disabled/base_so3w81.css +0 -1
- package/es/components/TextField/_label-placement/base.js.map +0 -1
- package/es/components/TextField/_label-placement/inner.js +0 -5
- package/es/components/TextField/_label-placement/inner.js.map +0 -1
- package/es/components/TextField/_label-placement/inner_1tyuicp.css +0 -1
- package/es/components/TextField/_label-placement/outer.js +0 -5
- package/es/components/TextField/_label-placement/outer.js.map +0 -1
- package/es/components/TextField/_label-placement/outer_19ekaek.css +0 -1
- package/es/components/TextField/_size/base.js +0 -5
- package/es/components/TextField/_size/base.js.map +0 -1
- package/es/components/TextField/_size/base_b5smyu.css +0 -1
- package/es/components/TextField/_view/base.js +0 -5
- package/es/components/TextField/_view/base.js.map +0 -1
- package/es/components/TextField/_view/base_5bqzed.css +0 -1
- package/styled-components/cjs/components/TextField/_disabled/base.js +0 -9
- package/styled-components/cjs/components/TextField/_label-placement/inner.js +0 -10
- package/styled-components/cjs/components/TextField/_size/base.js +0 -10
- package/styled-components/cjs/components/TextField/_view/base.js +0 -10
- package/styled-components/es/components/TextField/_disabled/base.js +0 -3
- package/styled-components/es/components/TextField/_label-placement/inner.js +0 -4
- package/styled-components/es/components/TextField/_label-placement/outer.js +0 -4
- package/styled-components/es/components/TextField/_size/base.js +0 -4
- package/styled-components/es/components/TextField/_view/base.js +0 -4
- package/types/components/TextField/_disabled/base.d.ts.map +0 -1
- package/types/components/TextField/_label-placement/base.d.ts.map +0 -1
- package/types/components/TextField/_label-placement/index.d.ts.map +0 -1
- package/types/components/TextField/_label-placement/inner.d.ts.map +0 -1
- package/types/components/TextField/_label-placement/outer.d.ts.map +0 -1
- package/types/components/TextField/_size/base.d.ts.map +0 -1
- package/types/components/TextField/_view/base.d.ts.map +0 -1
- /package/cjs/components/TextField/{_label-placement → variations/_label-placement}/base_x642ct.css +0 -0
- /package/es/components/TextField/{_label-placement → variations/_label-placement}/base_x642ct.css +0 -0
- /package/styled-components/cjs/components/TextField/{_disabled → variations/_disabled}/tokens.json +0 -0
- /package/styled-components/cjs/components/TextField/{_label-placement → variations/_label-placement}/base.js +0 -0
- /package/styled-components/cjs/components/TextField/{_label-placement → variations/_label-placement}/index.js +0 -0
- /package/styled-components/cjs/components/TextField/{_size → variations/_size}/tokens.json +0 -0
- /package/styled-components/cjs/components/TextField/{_view → variations/_view}/tokens.json +0 -0
- /package/styled-components/es/components/TextField/{_disabled → variations/_disabled}/tokens.json +0 -0
- /package/styled-components/es/components/TextField/{_label-placement → variations/_label-placement}/base.js +0 -0
- /package/styled-components/es/components/TextField/{_label-placement → variations/_label-placement}/index.js +0 -0
- /package/styled-components/es/components/TextField/{_size → variations/_size}/tokens.json +0 -0
- /package/styled-components/es/components/TextField/{_view → variations/_view}/tokens.json +0 -0
- /package/types/components/TextField/{_disabled → variations/_disabled}/base.d.ts +0 -0
- /package/types/components/TextField/{_label-placement → variations/_label-placement}/base.d.ts +0 -0
- /package/types/components/TextField/{_label-placement → variations/_label-placement}/index.d.ts +0 -0
- /package/types/components/TextField/{_label-placement → variations/_label-placement}/inner.d.ts +0 -0
- /package/types/components/TextField/{_label-placement → variations/_label-placement}/outer.d.ts +0 -0
- /package/types/components/TextField/{_size → variations/_read-only}/base.d.ts +0 -0
- /package/types/components/TextField/{_view → variations/_size}/base.d.ts +0 -0
@@ -1,18 +1,26 @@
|
|
1
1
|
import styled from 'styled-components';
|
2
|
-
|
2
|
+
import { classes, tokens } from './TextField.tokens';
|
3
|
+
export var InputWrapper = /*#__PURE__*/styled.div.withConfig({
|
3
4
|
componentId: "plasma-new-hope__sc-g4vxbb-0"
|
4
|
-
})(["
|
5
|
+
})(["position:relative;display:flex;align-items:center;box-sizing:border-box;"]);
|
5
6
|
export var InputLabelWrapper = /*#__PURE__*/styled.div.withConfig({
|
6
7
|
componentId: "plasma-new-hope__sc-g4vxbb-1"
|
7
|
-
})(["", "{
|
8
|
-
|
9
|
-
// NOTE: border-width is used in size border-color is used in view
|
10
|
-
export var InputWrapper = /*#__PURE__*/styled.div.withConfig({
|
8
|
+
})(["flex:1;overflow:scroll;position:relative;width:100%;display:inline-flex;align-items:center;::-webkit-scrollbar{display:none;}scrollbar-width:none;overscroll-behavior:contain;&.", "{height:var(", ");border-radius:var(", ");}"], /*#__PURE__*/String(classes.hasChips), tokens.chipHeight, tokens.chipBorderRadius);
|
9
|
+
export var StyledChips = /*#__PURE__*/styled.div.withConfig({
|
11
10
|
componentId: "plasma-new-hope__sc-g4vxbb-2"
|
12
|
-
})(["
|
13
|
-
export var
|
11
|
+
})(["display:flex;gap:var(", ");margin-right:var(", ");user-select:none;"], tokens.chipGap, tokens.chipGap);
|
12
|
+
export var Input = /*#__PURE__*/styled.input.withConfig({
|
14
13
|
componentId: "plasma-new-hope__sc-g4vxbb-3"
|
14
|
+
})(["box-sizing:border-box;appearance:none;border:0;padding:0;background-color:transparent;outline:none;flex:1;min-width:60%;"]);
|
15
|
+
export var Label = /*#__PURE__*/styled.label.withConfig({
|
16
|
+
componentId: "plasma-new-hope__sc-g4vxbb-4"
|
15
17
|
})([""]);
|
18
|
+
export var StyledContentLeft = /*#__PURE__*/styled.div.withConfig({
|
19
|
+
componentId: "plasma-new-hope__sc-g4vxbb-5"
|
20
|
+
})(["margin:var(", ");"], tokens.leftContentMargin);
|
21
|
+
export var StyledContentRight = /*#__PURE__*/styled.div.withConfig({
|
22
|
+
componentId: "plasma-new-hope__sc-g4vxbb-6"
|
23
|
+
})(["margin:var(", ");"], tokens.rightContentMargin);
|
16
24
|
export var LeftHelper = /*#__PURE__*/styled.div.withConfig({
|
17
|
-
componentId: "plasma-new-hope__sc-g4vxbb-
|
25
|
+
componentId: "plasma-new-hope__sc-g4vxbb-7"
|
18
26
|
})([""]);
|
@@ -110,3 +110,27 @@ export function App() {
|
|
110
110
|
);
|
111
111
|
}
|
112
112
|
```
|
113
|
+
|
114
|
+
### Режим ввода
|
115
|
+
С помощью свойства `enumarationType` можно вводить элементы как теги.
|
116
|
+
По нажатию Enter, после ввода нужного текста, он преобразуется в Chip:
|
117
|
+
|
118
|
+
```tsx live
|
119
|
+
import React from 'react';
|
120
|
+
import { TextField } from '@salutejs/{{ package }};
|
121
|
+
|
122
|
+
export function App() {
|
123
|
+
return (
|
124
|
+
<div>
|
125
|
+
<TextField
|
126
|
+
placeholder="Введите значение"
|
127
|
+
defaultValue="Значение"
|
128
|
+
size="l"
|
129
|
+
enumerationType="chip"
|
130
|
+
helperText="Подсказка снизу"
|
131
|
+
values={["Значение 1"]}
|
132
|
+
/>
|
133
|
+
</div>
|
134
|
+
);
|
135
|
+
}
|
136
|
+
```
|
@@ -1,31 +1,42 @@
|
|
1
|
+
export var classes = {
|
2
|
+
hasChips: 'has-chips',
|
3
|
+
hasEmptyContentLeft: 'has-empty-content-left',
|
4
|
+
hasEmptyContentRight: 'has-empty-content-right'
|
5
|
+
};
|
1
6
|
export var tokens = {
|
2
7
|
color: '--plasma-textfield-color',
|
3
8
|
backgroundColor: '--plasma-textfield-bg-color',
|
4
9
|
backgroundColorHover: '--plasma-textfield-bg-color-hover',
|
5
10
|
backgroundColorFocus: '--plasma-textfield-bg-color-focus',
|
6
|
-
/** Цвет каретки */
|
7
|
-
caretColor: '--plasma-textfield__caret-color',
|
8
|
-
placeholderColor: '--plasma-textfield__placeholder-color',
|
9
11
|
borderColor: '--plasma-textfield-border-color',
|
10
12
|
borderColorHover: '--plasma-textfield-border-color-hover',
|
11
13
|
borderColorFocus: '--plasma-textfield-border-color-focus',
|
14
|
+
/** Цвета для read-only состояния */
|
15
|
+
colorReadOnly: '--plasma-textfield-color-readonly',
|
16
|
+
backgroundColorReadOnly: '--plasma-textfield-bg-color-readonly',
|
17
|
+
borderColorReadOnly: '--plasma-textfield-border-color-readonly',
|
18
|
+
placeholderColorReadOnly: '--plasma-textfield__placeholder-color-readonly',
|
19
|
+
/** Цвет каретки */
|
20
|
+
caretColor: '--plasma-textfield__caret-color',
|
21
|
+
placeholderColor: '--plasma-textfield__placeholder-color',
|
12
22
|
height: '--plasma-textfield-height',
|
13
23
|
borderWidth: '--plasmas-textfield-border-width',
|
14
24
|
borderRadius: '--plasma-textfield-border-radius',
|
15
|
-
/**
|
25
|
+
/** Отступ от границы ТextField */
|
16
26
|
padding: '--plasma-textfield-padding',
|
17
|
-
|
18
|
-
/*
|
19
|
-
|
20
|
-
|
27
|
+
paddingWithChips: '--plasma-textfield-padding-with-chips',
|
28
|
+
/* Токены для инпута */
|
29
|
+
leftContentMargin: '--plasma-textfield__left-content-margin',
|
30
|
+
rightContentMargin: '--plasma-textfield__right-content-margin',
|
21
31
|
fontFamily: '--plasma-textfield-font-family',
|
22
32
|
fontStyle: '--plasma-textfield-font-style',
|
23
33
|
fontSize: '--plasma-textfield-font-size',
|
24
34
|
fontWeight: '--plasma-textfield-font-weight',
|
25
35
|
letterSpacing: '--plasma-textfield-letter-spacing',
|
26
36
|
lineHeight: '--plasma-textfield-line-height',
|
27
|
-
/**
|
37
|
+
/** Токены лейбла */
|
28
38
|
labelColor: '--plasma-textfield__label-color',
|
39
|
+
labelColorReadOnly: '--plasma-textfield__label-color-readonly',
|
29
40
|
labelOffset: '--plasma-textfield__label-offset',
|
30
41
|
labelFontFamily: '--plasma-textfield__label-font-family',
|
31
42
|
labelFontStyle: '--plasma-textfield__label-font-style',
|
@@ -40,16 +51,52 @@ export var tokens = {
|
|
40
51
|
labelInnerFontWeight: '--plasma-textfield-placement_inner__label-font-weight',
|
41
52
|
labelInnerLetterSpacing: '--plasma-textfield-placement_inner__label-letter-spacing',
|
42
53
|
labelInnerLineHeight: '--plasma-textfield-placement_inner__label-line-height',
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
54
|
+
labelInnerPadding: '--plasma-textfield-placement_inner__label-padding',
|
55
|
+
contentLabelInnerPadding: '--plasma-textfield-placement_inner__content-padding',
|
56
|
+
leftHelperColor: '--plasma-textfield__left-helper-color',
|
57
|
+
leftHelperColorReadOnly: '--plasma-textfield__left-helper-color-readonly',
|
58
|
+
leftHelperOffset: '--plasma-textfield__left-helper-offset',
|
59
|
+
leftHelperFontFamily: '--plasma-textfield__left-helper-font-family',
|
60
|
+
leftHelperFontStyle: '--plasma-textfield__left-helper-font-style',
|
61
|
+
leftHelperFontSize: '--plasma-textfield__left-helper-font-size',
|
62
|
+
leftHelperFontWeight: '--plasma-textfield__left-helper-font-weight',
|
63
|
+
leftHelperLetterSpacing: '--plasma-textfield__left-helper-letter-spacing',
|
64
|
+
leftHelperLineHeight: '--plasma-textfield__left-helper-line-height',
|
53
65
|
/** Прозрачность для всего компонента в состоянии disabled */
|
54
|
-
disabledOpacity: '--plasma-textfield-disabled-opacity'
|
66
|
+
disabledOpacity: '--plasma-textfield-disabled-opacity',
|
67
|
+
/** Токены чипа */
|
68
|
+
chipHeight: '--plasma-textfield__chip-height',
|
69
|
+
chipBorderRadius: '--plasma-textfield__chip-border-radius',
|
70
|
+
chipGap: '--plasma-textfield__chip-gap',
|
71
|
+
chipBackground: '--plasma-textfield__chip-background',
|
72
|
+
chipColor: '--plasma-textfield__chip-color',
|
73
|
+
chipBackgroundHover: '--plasma-textfield__chip-background-hover',
|
74
|
+
chipColorHover: '--plasma-textfield__chip-color-hover',
|
75
|
+
chipScaleHover: '--plasma-textfield__chip-scale-hover',
|
76
|
+
chipBackgroundReadOnly: '--plasma-textfield__chip-background-readonly',
|
77
|
+
chipColorReadOnly: '--plasma-textfield__chip-color-readonly',
|
78
|
+
chipBackgroundReadOnlyHover: '--plasma-textfield__chip-background-readonly-hover',
|
79
|
+
chipColorReadOnlyHover: '--plasma-textfield__chip-color-readonly-hover',
|
80
|
+
chipBackgroundActive: '--plasma-textfield__chip-background-active',
|
81
|
+
chipColorActive: '--plasma-textfield__chip-color-active',
|
82
|
+
chipScaleActive: '--plasma-textfield__chip-scale-active',
|
83
|
+
chipFocusColor: '--plasma-textfield__chip-focus-color',
|
84
|
+
chipCloseIconColor: '--plasma-textfield__chip-close-icon-color',
|
85
|
+
chipOutlineSize: '--plasma-textfield__chip-outline-size',
|
86
|
+
chipWidth: '--plasma-textfield__chip-width',
|
87
|
+
chipPaddingTop: '--plasma-textfield__chip-padding-top',
|
88
|
+
chipPaddingRight: '--plasma-textfield__chip-padding-right',
|
89
|
+
chipPaddingBottom: '--plasma-textfield__chip-padding-bottom',
|
90
|
+
chipPaddingLeft: '--plasma-textfield__chip-padding-left',
|
91
|
+
chipCloseIconSize: '--plasma-textfield__chip-close-icon-size',
|
92
|
+
chipFontFamily: '--plasma-textfield__chip-font-family',
|
93
|
+
chipFontSize: '--plasma-textfield__chip-font-size',
|
94
|
+
chipFontStyle: '--plasma-textfield__chip-font-style',
|
95
|
+
chipFontWeight: '--plasma-textfield__chip-font-weight',
|
96
|
+
chipLetterSpacing: '--plasma-textfield__chip-letter-spacing',
|
97
|
+
chipLineHeight: '--plasma-textfield__chip-line-height',
|
98
|
+
chipClearContentMarginLeft: '--plasma-textfield__chip-clear-content-margin-left',
|
99
|
+
chipClearContentMarginRight: '--plasma-textfield__chip-clear-content-margin-right',
|
100
|
+
chipOpacityReadonly: '--plasma-textfield__chip-opacity-readonly',
|
101
|
+
focusColor: '--plasma-textfield-focus-color'
|
55
102
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export { useKeyNavigation } from './useKeyNavigation';
|
@@ -0,0 +1,131 @@
|
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
2
|
+
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."); }
|
3
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
4
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
6
|
+
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."); }
|
7
|
+
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); }
|
8
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
9
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
10
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
11
|
+
import { useState } from 'react';
|
12
|
+
export var Keys = {
|
13
|
+
Enter: 'Enter',
|
14
|
+
Tab: 'Tab',
|
15
|
+
Escape: 'Escape',
|
16
|
+
ArrowLeft: 'ArrowLeft',
|
17
|
+
ArrowRight: 'ArrowRight',
|
18
|
+
Backspace: 'Backspace'
|
19
|
+
};
|
20
|
+
export var useKeyNavigation = function useKeyNavigation(_ref) {
|
21
|
+
var _ref$controlledRefs = _ref.controlledRefs,
|
22
|
+
chipsRefs = _ref$controlledRefs.chipsRefs,
|
23
|
+
contentRef = _ref$controlledRefs.contentRef,
|
24
|
+
inputRef = _ref$controlledRefs.inputRef,
|
25
|
+
disabled = _ref.disabled,
|
26
|
+
readOnly = _ref.readOnly,
|
27
|
+
chips = _ref.chips,
|
28
|
+
enumerationType = _ref.enumerationType,
|
29
|
+
updateChips = _ref.updateChips,
|
30
|
+
onChange = _ref.onChange,
|
31
|
+
onSearch = _ref.onSearch;
|
32
|
+
var _useState = useState(-1),
|
33
|
+
_useState2 = _slicedToArray(_useState, 2),
|
34
|
+
activeChipIndex = _useState2[0],
|
35
|
+
setActiveChipIndex = _useState2[1];
|
36
|
+
var handleInputKeydown = function handleInputKeydown(event) {
|
37
|
+
var _inputRef$current;
|
38
|
+
var _ref2 = event.target,
|
39
|
+
value = _ref2.value;
|
40
|
+
if (disabled || readOnly) {
|
41
|
+
return;
|
42
|
+
}
|
43
|
+
if (event.key === Keys.Enter && enumerationType === 'chip' && value) {
|
44
|
+
var nextIndex = (chips === null || chips === void 0 ? void 0 : chips.length) || 0;
|
45
|
+
var newChips = [].concat(_toConsumableArray(chips), [{
|
46
|
+
id: "".concat(nextIndex, "_").concat(value),
|
47
|
+
text: value
|
48
|
+
}]);
|
49
|
+
var newValues = newChips.map(function (_ref3) {
|
50
|
+
var text = _ref3.text;
|
51
|
+
return text;
|
52
|
+
});
|
53
|
+
updateChips(newChips, newValues);
|
54
|
+
event.target.value = '';
|
55
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(event);
|
56
|
+
}
|
57
|
+
if (event.key === Keys.Enter && onSearch) {
|
58
|
+
onSearch(value, event);
|
59
|
+
}
|
60
|
+
if (event.key === Keys.Backspace && chips.length && (inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.selectionStart) === 0) {
|
61
|
+
var _newChips = _toConsumableArray(chips);
|
62
|
+
_newChips === null || _newChips === void 0 ? void 0 : _newChips.pop();
|
63
|
+
chipsRefs === null || chipsRefs === void 0 ? void 0 : chipsRefs.current.pop();
|
64
|
+
var _newValues = _newChips.map(function (_ref4) {
|
65
|
+
var text = _ref4.text;
|
66
|
+
return text;
|
67
|
+
});
|
68
|
+
updateChips(_newChips, _newValues);
|
69
|
+
}
|
70
|
+
};
|
71
|
+
var onChipClear = function onChipClear(clearId) {
|
72
|
+
if (!chips.length) {
|
73
|
+
return;
|
74
|
+
}
|
75
|
+
var newChips = (chips === null || chips === void 0 ? void 0 : chips.filter(function (_ref5) {
|
76
|
+
var chipId = _ref5.id;
|
77
|
+
return chipId !== clearId;
|
78
|
+
})) || [];
|
79
|
+
var newValues = newChips.map(function (_ref6) {
|
80
|
+
var text = _ref6.text;
|
81
|
+
return text;
|
82
|
+
});
|
83
|
+
updateChips(newChips, newValues);
|
84
|
+
};
|
85
|
+
var handleChipKeyDown = function handleChipKeyDown(event, chipId) {
|
86
|
+
if (event.key === Keys.Tab) {
|
87
|
+
event.preventDefault();
|
88
|
+
}
|
89
|
+
if (event.key === Keys.Backspace) {
|
90
|
+
onChipClear(chipId);
|
91
|
+
}
|
92
|
+
};
|
93
|
+
var handleContentKeyDown = function handleContentKeyDown(event) {
|
94
|
+
var _inputRef$current2, _focusedItem, _focusedItem2;
|
95
|
+
var chipsRefsCount = chips.length;
|
96
|
+
var currentCaretPosition = (inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.selectionStart) || 0;
|
97
|
+
var newActiveChipIndex = activeChipIndex;
|
98
|
+
var focusedItem = null;
|
99
|
+
if (event.key === Keys.ArrowLeft && enumerationType === 'chip' && currentCaretPosition <= 0) {
|
100
|
+
var _chipsRefs$current;
|
101
|
+
var index = activeChipIndex - 1 <= 0 ? 0 : activeChipIndex - 1;
|
102
|
+
newActiveChipIndex = document.activeElement === (inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) ? chipsRefsCount - 1 : index;
|
103
|
+
focusedItem = (_chipsRefs$current = chipsRefs.current) === null || _chipsRefs$current === void 0 ? void 0 : _chipsRefs$current[newActiveChipIndex];
|
104
|
+
}
|
105
|
+
if (event.key === Keys.ArrowRight && enumerationType === 'chip' && document.activeElement !== (inputRef === null || inputRef === void 0 ? void 0 : inputRef.current)) {
|
106
|
+
var _chipsRefs$current2;
|
107
|
+
var _index = activeChipIndex + 1 >= chipsRefsCount ? activeChipIndex : activeChipIndex + 1;
|
108
|
+
newActiveChipIndex = document.activeElement === (contentRef === null || contentRef === void 0 ? void 0 : contentRef.current) ? 0 : _index;
|
109
|
+
focusedItem = _index === activeChipIndex ? inputRef === null || inputRef === void 0 ? void 0 : inputRef.current : (_chipsRefs$current2 = chipsRefs.current) === null || _chipsRefs$current2 === void 0 ? void 0 : _chipsRefs$current2[newActiveChipIndex];
|
110
|
+
}
|
111
|
+
if (event.key === Keys.Backspace && document.activeElement !== (inputRef === null || inputRef === void 0 ? void 0 : inputRef.current)) {
|
112
|
+
var _chipsRefs$current3;
|
113
|
+
var _index2 = activeChipIndex - 1 <= 0 ? 0 : activeChipIndex - 1;
|
114
|
+
newActiveChipIndex = chipsRefsCount === 0 ? -1 : _index2;
|
115
|
+
focusedItem = chipsRefsCount === 0 ? inputRef === null || inputRef === void 0 ? void 0 : inputRef.current : chipsRefs === null || chipsRefs === void 0 ? void 0 : (_chipsRefs$current3 = chipsRefs.current) === null || _chipsRefs$current3 === void 0 ? void 0 : _chipsRefs$current3[newActiveChipIndex];
|
116
|
+
}
|
117
|
+
(_focusedItem = focusedItem) === null || _focusedItem === void 0 ? void 0 : _focusedItem.focus();
|
118
|
+
(_focusedItem2 = focusedItem) === null || _focusedItem2 === void 0 ? void 0 : _focusedItem2.scrollIntoView({
|
119
|
+
behavior: 'smooth',
|
120
|
+
block: 'center',
|
121
|
+
inline: 'center'
|
122
|
+
});
|
123
|
+
setActiveChipIndex(newActiveChipIndex);
|
124
|
+
};
|
125
|
+
return {
|
126
|
+
handleInputKeydown: handleInputKeydown,
|
127
|
+
handleChipKeyDown: handleChipKeyDown,
|
128
|
+
onChipClear: onChipClear,
|
129
|
+
handleContentKeyDown: handleContentKeyDown
|
130
|
+
};
|
131
|
+
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { labelPlacement_inner as textField_labelPlacement_inner } from './_label-placement/inner';
|
2
|
-
export { labelPlacement_outer as textField_labelPlacement_outer } from './_label-placement/outer';
|
1
|
+
export { labelPlacement_inner as textField_labelPlacement_inner } from './variations/_label-placement/inner';
|
2
|
+
export { labelPlacement_outer as textField_labelPlacement_outer } from './variations/_label-placement/outer';
|
3
3
|
export { textFieldRoot, textFieldConfig } from './TextField';
|
4
4
|
export { tokens as textFieldTokens } from './TextField.tokens';
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import React, { forwardRef } from 'react';
|
2
|
+
import { StyledChip } from './TextFieldChip.styles';
|
3
|
+
/**
|
4
|
+
* Чип, отображающий выбранный элемент
|
5
|
+
*/
|
6
|
+
export var TextFieldChip = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
7
|
+
var chipId = _ref.chipId,
|
8
|
+
text = _ref.text,
|
9
|
+
disabled = _ref.disabled,
|
10
|
+
readOnly = _ref.readOnly,
|
11
|
+
onClick = _ref.onClick,
|
12
|
+
onClear = _ref.onClear,
|
13
|
+
onKeyDown = _ref.onKeyDown;
|
14
|
+
var onClearHandle = function onClearHandle() {
|
15
|
+
return onClear(chipId);
|
16
|
+
};
|
17
|
+
var onKeyDownHandle = function onKeyDownHandle(event) {
|
18
|
+
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event, chipId);
|
19
|
+
};
|
20
|
+
return /*#__PURE__*/React.createElement(StyledChip, {
|
21
|
+
ref: ref,
|
22
|
+
tabIndex: -1,
|
23
|
+
disabled: disabled,
|
24
|
+
readOnly: readOnly,
|
25
|
+
onClick: onClick,
|
26
|
+
onClear: onClearHandle,
|
27
|
+
onKeyDown: onKeyDownHandle,
|
28
|
+
text: "".concat(text)
|
29
|
+
});
|
30
|
+
});
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import styled from 'styled-components';
|
2
|
+
import { chipConfig, chipTokens } from '../../../Chip';
|
3
|
+
import { component, mergeConfig } from '../../../../engines';
|
4
|
+
import { tokens } from '../../TextField.tokens';
|
5
|
+
import { addFocus } from '../../../../mixins';
|
6
|
+
|
7
|
+
// issue #823
|
8
|
+
var mergedConfig = /*#__PURE__*/mergeConfig(chipConfig);
|
9
|
+
var Chip = /*#__PURE__*/component(mergedConfig);
|
10
|
+
|
11
|
+
// NOTE: Необходимое переопределение токенов из компонента Chip т.к. используются его части
|
12
|
+
export var StyledChip = /*#__PURE__*/styled(Chip).withConfig({
|
13
|
+
componentId: "plasma-new-hope__sc-1mypbcr-0"
|
14
|
+
})(["", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");scroll-snap-align:center;scroll-snap-stop:normal;", " &[readonly]{opacity:var(", ");}"], chipTokens.color, tokens.chipColor, chipTokens.background, tokens.chipBackground, chipTokens.colorHover, tokens.chipColorHover, chipTokens.backgroundHover, tokens.chipBackgroundHover, chipTokens.colorActive, tokens.chipColorActive, chipTokens.backgroundActive, tokens.chipBackgroundActive, chipTokens.backgroundReadOnly, tokens.chipBackgroundReadOnly, chipTokens.colorReadOnly, tokens.chipColorReadOnly, chipTokens.backgroundReadOnlyHover, tokens.chipBackgroundReadOnlyHover, chipTokens.colorReadOnlyHover, tokens.chipColorReadOnlyHover, chipTokens.borderRadius, tokens.chipBorderRadius, chipTokens.width, tokens.chipWidth, chipTokens.height, tokens.chipHeight, chipTokens.paddingRight, tokens.chipPaddingRight, chipTokens.paddingLeft, tokens.chipPaddingLeft, chipTokens.fontFamily, tokens.chipFontFamily, chipTokens.fontSize, tokens.chipFontSize, chipTokens.fontStyle, tokens.chipFontStyle, chipTokens.fontWeight, tokens.chipFontWeight, chipTokens.letterSpacing, tokens.chipLetterSpacing, chipTokens.lineHeight, tokens.chipLineHeight, chipTokens.clearContentMarginLeft, tokens.chipClearContentMarginLeft, chipTokens.clearContentMarginRight, tokens.chipClearContentMarginRight, chipTokens.scaleHover, tokens.chipScaleHover, chipTokens.scaleActive, tokens.chipScaleActive, chipTokens.closeIconSize, tokens.chipCloseIconSize, chipTokens.closeIconColor, tokens.chipCloseIconColor, chipTokens.focusColor, tokens.focusColor, /*#__PURE__*/addFocus({
|
15
|
+
outlineOffset: '0.0625rem',
|
16
|
+
outlineSize: '0.0625rem',
|
17
|
+
outlineRadius: /*#__PURE__*/"calc(var(".concat(tokens.chipBorderRadius, ") - 0.1rem)"),
|
18
|
+
outlineColor: /*#__PURE__*/"var(".concat(tokens.focusColor, ")")
|
19
|
+
}), tokens.chipOpacityReadonly);
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export { TextFieldChip } from './TextFieldChip/TextFieldChip';
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import { css } from 'styled-components';
|
2
|
+
import { tokens } from '../../TextField.tokens';
|
3
|
+
import { Input } from '../../TextField.styles';
|
4
|
+
export var base = /*#__PURE__*/css(["&[disabled]{opacity:var(", ");cursor:not-allowed;", "{cursor:not-allowed;min-width:unset;}}"], tokens.disabledOpacity, Input);
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import { css } from 'styled-components';
|
2
|
+
import { Input, Label } from '../../TextField.styles';
|
3
|
+
import { tokens } from '../../TextField.tokens';
|
4
|
+
export var labelPlacement_inner = /*#__PURE__*/css(["", "{padding:var(", ");}", ":focus ~ ", ",", ":not(:placeholder-shown) ~ ", "{height:auto;padding:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}", ":not(:focus)::placeholder{color:transparent;}", ":focus::placeholder{color:transparent;}", "{color:var(", ");pointer-events:none;position:absolute;top:0;display:flex;align-items:center;box-sizing:border-box;transition:padding 0.1s ease-in-out,height 0s;height:var(", ");padding-top:calc(var(", ") / 4);padding-bottom:calc(var(", ") / 4);}"], Input, tokens.contentLabelInnerPadding, Input, Label, Input, Label, tokens.labelInnerPadding, tokens.labelInnerFontFamily, tokens.labelInnerFontSize, tokens.labelInnerFontStyle, tokens.labelInnerFontWeight, tokens.labelInnerLetterSpacing, tokens.labelInnerLineHeight, Input, Input, Label, tokens.placeholderColor, tokens.height, tokens.height, tokens.height);
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import { css } from 'styled-components';
|
2
|
+
import { Label } from '../../TextField.styles';
|
3
|
+
import { tokens } from '../../TextField.tokens';
|
4
|
+
export var labelPlacement_outer = /*#__PURE__*/css(["", "{display:block;margin-bottom:var(", ");color:var(", ");}"], Label, tokens.labelOffset, tokens.labelColor);
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import { css } from 'styled-components';
|
2
|
+
import { tokens } from '../../TextField.tokens';
|
3
|
+
import { Input, InputWrapper, Label, LeftHelper } from '../../TextField.styles';
|
4
|
+
export var base = /*#__PURE__*/css(["&[readonly]{", "{color:var(", ");background-color:var(", ");box-shadow:inset 0 0 0 var(", ") var(", ");}", ":hover{background-color:var(", ");}", "::placeholder{color:var(", ");}", "{color:var(", ");cursor:default;min-width:unset;}", "{color:var(", ");}", "{color:var(", ");}}"], InputWrapper, tokens.colorReadOnly, /*#__PURE__*/String(tokens.backgroundColorReadOnly), /*#__PURE__*/String(tokens.borderWidth), /*#__PURE__*/String(tokens.borderColorReadOnly), InputWrapper, tokens.backgroundColorReadOnly, Input, tokens.placeholderColorReadOnly, Input, tokens.colorReadOnly, LeftHelper, tokens.leftHelperColorReadOnly, Label, tokens.labelColorReadOnly);
|
@@ -0,0 +1 @@
|
|
1
|
+
[]
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import { css } from 'styled-components';
|
2
|
+
import { classes, tokens } from '../../TextField.tokens';
|
3
|
+
import { Input, InputWrapper, Label, LeftHelper } from '../../TextField.styles';
|
4
|
+
export var base = /*#__PURE__*/css(["", "{font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}", "{height:var(", ");border-radius:var(", ");padding:var(", ");&.", "{padding-top:var(", ");padding-bottom:var(", ");}&.", "{padding-left:var(", ");}&.", "{padding-right:var(", ");}}", "{font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}", "{margin-top:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}"], Input, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, InputWrapper, tokens.height, tokens.borderRadius, tokens.padding, classes.hasChips, tokens.paddingWithChips, tokens.paddingWithChips, classes.hasEmptyContentLeft, tokens.paddingWithChips, classes.hasEmptyContentRight, tokens.paddingWithChips, Label, tokens.labelFontFamily, tokens.labelFontSize, tokens.labelFontStyle, tokens.labelFontWeight, tokens.labelLetterSpacing, tokens.labelLineHeight, LeftHelper, tokens.leftHelperOffset, tokens.leftHelperFontFamily, tokens.leftHelperFontSize, tokens.leftHelperFontStyle, tokens.leftHelperFontWeight, tokens.leftHelperLetterSpacing, tokens.leftHelperLineHeight);
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import { css } from 'styled-components';
|
2
|
+
import { tokens } from '../../TextField.tokens';
|
3
|
+
import { Input, InputWrapper, LeftHelper } from '../../TextField.styles';
|
4
|
+
export var base = /*#__PURE__*/css(["", "{--plasma_private-textfield-border-color:var(", ");--plasma_private-textfield-bg-color:var(", ");color:var(", ");background-color:var(--plasma_private-textfield-bg-color);box-shadow:inset 0 0 0 var(", ") var(--plasma_private-textfield-border-color);caret-color:var(", ");transition:background-color 0.1s ease-in,color 0.1s ease-in,box-shadow 0.1s ease-in;}", ":hover{--plasma_private-textfield-border-color:var(", ",var(", "));--plasma_private-textfield-bg-color:var( ", ",var(", ") );}", ":focus-within{--plasma_private-textfield-border-color:var(", ",var(", "));--plasma_private-textfield-bg-color:var( ", ",var(", ") );}", "::placeholder{color:var(", ");}", "{color:var(", ");}", "{color:var(", ");}"], InputWrapper, /*#__PURE__*/String(tokens.borderColor), /*#__PURE__*/String(tokens.backgroundColor), tokens.color, tokens.borderWidth, tokens.caretColor, InputWrapper, tokens.borderColorHover, /*#__PURE__*/String(tokens.borderColor), tokens.backgroundColorHover, /*#__PURE__*/String(tokens.backgroundColor), InputWrapper, tokens.borderColorFocus, /*#__PURE__*/String(tokens.borderColor), tokens.backgroundColorFocus, /*#__PURE__*/String(tokens.backgroundColor), Input, tokens.placeholderColor, Input, tokens.color, LeftHelper, tokens.leftHelperColor);
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import { css } from 'styled-components';
|
2
|
+
import { textFieldTokens as tokens, textField_labelPlacement_inner as labelPlacement_inner, textField_labelPlacement_outer as labelPlacement_outer } from '../../../../components/TextField';
|
3
|
+
export var config = {
|
4
|
+
defaults: {
|
5
|
+
view: 'default',
|
6
|
+
size: 'l',
|
7
|
+
labelPlacement: 'outer'
|
8
|
+
},
|
9
|
+
variations: {
|
10
|
+
view: {
|
11
|
+
"default": /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--surface-transparent-primary);", ":var(--surface-transparent-secondary);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":0.72;", ":var(--text-accent);"], tokens.color, tokens.backgroundColor, tokens.backgroundColorFocus, tokens.caretColor, tokens.placeholderColor, tokens.labelColor, tokens.leftHelperColor, tokens.chipCloseIconColor, tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipOpacityReadonly, tokens.focusColor),
|
12
|
+
// TODO заменить --surface-transparent-positive на корректный токен
|
13
|
+
positive: /*#__PURE__*/css(["", ":var(--plasma-colors-primary);", ":var(--surface-transparent-positive);", ":var(--surface-transparent-positive-active);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-positive);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":0.72;", ":var(--text-accent);"], tokens.color, tokens.backgroundColor, tokens.backgroundColorFocus, tokens.caretColor, tokens.placeholderColor, tokens.labelColor, tokens.leftHelperColor, tokens.chipCloseIconColor, tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipOpacityReadonly, tokens.focusColor),
|
14
|
+
// // TODO заменить --surface-transparent-warning на корректный токен
|
15
|
+
warning: /*#__PURE__*/css(["", ":var(--plasma-colors-primary);", ":var(--surface-transparent-warning);", ":var(--surface-transparent-warning-active);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-warning);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":0.72;", ":var(--text-accent);"], tokens.color, tokens.backgroundColor, tokens.backgroundColorFocus, tokens.caretColor, tokens.placeholderColor, tokens.labelColor, tokens.leftHelperColor, tokens.chipCloseIconColor, tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipOpacityReadonly, tokens.focusColor),
|
16
|
+
// // TODO заменить --surface-transparent-negative на корректный токен
|
17
|
+
negative: /*#__PURE__*/css(["", ":var(--plasma-colors-primary);", ":var(--surface-transparent-negative);", ":var(--surface-transparent-negative-active);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-negative);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":0.72;", ":var(--text-accent);"], tokens.color, tokens.backgroundColor, tokens.backgroundColorFocus, tokens.caretColor, tokens.placeholderColor, tokens.labelColor, tokens.leftHelperColor, tokens.chipCloseIconColor, tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipOpacityReadonly, tokens.focusColor)
|
18
|
+
},
|
19
|
+
size: {
|
20
|
+
l: /*#__PURE__*/css(["", ":3.5rem;", ":1.0625rem 1.125rem 1.0625rem 1.125rem;", ":0.375rem;", ":0.875rem;", ":-0.0625rem 0.5rem -0.0625rem -0.125rem;", ":-0.0625rem -0.125rem -0.0625rem 0.75rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":0.75rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":0.25rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.5625rem 0 0.125rem 0;", ":1.5625rem 0 0.5625rem 0;", ":0.25rem;", ":0.5rem;", ":auto;", ":2.75rem;", ":0.75rem;", ":1rem;", ":0.625rem;", ":0rem;", ":1.5rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);"], tokens.height, tokens.padding, tokens.paddingWithChips, tokens.borderRadius, tokens.leftContentMargin, tokens.rightContentMargin, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.labelOffset, tokens.labelFontFamily, tokens.labelFontSize, tokens.labelFontStyle, tokens.labelFontWeight, tokens.labelLetterSpacing, tokens.labelLineHeight, tokens.leftHelperOffset, tokens.leftHelperFontFamily, tokens.leftHelperFontSize, tokens.leftHelperFontStyle, tokens.leftHelperFontWeight, tokens.leftHelperLetterSpacing, tokens.leftHelperLineHeight, tokens.labelInnerPadding, tokens.contentLabelInnerPadding, tokens.chipGap, tokens.chipBorderRadius, tokens.chipWidth, tokens.chipHeight, tokens.chipPaddingRight, tokens.chipPaddingLeft, tokens.chipClearContentMarginLeft, tokens.chipClearContentMarginRight, tokens.chipCloseIconSize, tokens.chipFontFamily, tokens.chipFontSize, tokens.chipFontStyle, tokens.chipFontWeight, tokens.chipLetterSpacing, tokens.chipLineHeight),
|
21
|
+
m: /*#__PURE__*/css(["", ":3rem;", ":0.875rem 1rem 0.875rem 1rem;", ":0.375rem;", ":0.75rem;", ":-0.125rem 0.375rem -0.125rem -0.125rem;", ":-0.125rem -0.125rem -0.125rem 0.75rem;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":0.625rem;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":0.25rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.375rem 0 0.125rem 0;", ":1.375rem 0 0.375rem 0;", ":0.25rem;", ":0.375rem;", ":auto;", ":2.25rem;", ":0.625rem;", ":0.875rem;", ":0.5rem;", ":0rem;", ":1.25rem;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);"], tokens.height, tokens.padding, tokens.paddingWithChips, tokens.borderRadius, tokens.leftContentMargin, tokens.rightContentMargin, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.labelOffset, tokens.labelFontFamily, tokens.labelFontSize, tokens.labelFontStyle, tokens.labelFontWeight, tokens.labelLetterSpacing, tokens.labelLineHeight, tokens.leftHelperOffset, tokens.leftHelperFontFamily, tokens.leftHelperFontSize, tokens.leftHelperFontStyle, tokens.leftHelperFontWeight, tokens.leftHelperLetterSpacing, tokens.leftHelperLineHeight, tokens.labelInnerPadding, tokens.contentLabelInnerPadding, tokens.chipGap, tokens.chipBorderRadius, tokens.chipWidth, tokens.chipHeight, tokens.chipPaddingRight, tokens.chipPaddingLeft, tokens.chipClearContentMarginLeft, tokens.chipClearContentMarginRight, tokens.chipCloseIconSize, tokens.chipFontFamily, tokens.chipFontSize, tokens.chipFontStyle, tokens.chipFontWeight, tokens.chipLetterSpacing, tokens.chipLineHeight),
|
22
|
+
s: /*#__PURE__*/css(["", ":2.5rem;", ":0.6875rem 0.875rem 0.6875rem 0.875rem;", ":0.375rem;", ":0.625rem;", ":-0.1875rem 0.25rem -0.1875rem -0.125rem;", ":-0.1875rem -0.125rem -0.1875rem 0.75rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":0.5rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":0.25rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.3125rem 0 0 0;", ":1.0625rem 0 0.3125rem 0;", ":0.25rem;", ":0.25rem;", ":auto;", ":1.75rem;", ":0.5rem;", ":0.75rem;", ":0.375rem;", ":0rem;", ":1rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);"], tokens.height, tokens.padding, tokens.paddingWithChips, tokens.borderRadius, tokens.leftContentMargin, tokens.rightContentMargin, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.labelOffset, tokens.labelFontFamily, tokens.labelFontSize, tokens.labelFontStyle, tokens.labelFontWeight, tokens.labelLetterSpacing, tokens.labelLineHeight, tokens.leftHelperOffset, tokens.leftHelperFontFamily, tokens.leftHelperFontSize, tokens.leftHelperFontStyle, tokens.leftHelperFontWeight, tokens.leftHelperLetterSpacing, tokens.leftHelperLineHeight, tokens.labelInnerPadding, tokens.contentLabelInnerPadding, tokens.chipGap, tokens.chipBorderRadius, tokens.chipWidth, tokens.chipHeight, tokens.chipPaddingRight, tokens.chipPaddingLeft, tokens.chipClearContentMarginLeft, tokens.chipClearContentMarginRight, tokens.chipCloseIconSize, tokens.chipFontFamily, tokens.chipFontSize, tokens.chipFontStyle, tokens.chipFontWeight, tokens.chipLetterSpacing, tokens.chipLineHeight),
|
23
|
+
xs: /*#__PURE__*/css(["", ":2rem;", ":0.5625rem 0.625rem 0.5625rem 0.625rem;", ":0.375rem;", ":0.5rem;", ":-0.0625rem 0.25rem -0.0625rem -0.125rem;", ":-0.0625rem -0.125rem -0.0625rem 0.75rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.375rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.25rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.3125rem 0 0 0;", ":1.0625rem 0 0.3125rem 0;", ":0.25rem;", ":0.125rem;", ":auto;", ":1.25rem;", ":0.375rem;", ":0.625rem;", ":0.25rem;", ":0rem;", ":0.75rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);"], tokens.height, tokens.padding, tokens.paddingWithChips, tokens.borderRadius, tokens.leftContentMargin, tokens.rightContentMargin, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.labelOffset, tokens.labelFontFamily, tokens.labelFontSize, tokens.labelFontStyle, tokens.labelFontWeight, tokens.labelLetterSpacing, tokens.labelLineHeight, tokens.leftHelperOffset, tokens.leftHelperFontFamily, tokens.leftHelperFontSize, tokens.leftHelperFontStyle, tokens.leftHelperFontWeight, tokens.leftHelperLetterSpacing, tokens.leftHelperLineHeight, tokens.labelInnerPadding, tokens.contentLabelInnerPadding, tokens.chipGap, tokens.chipBorderRadius, tokens.chipWidth, tokens.chipHeight, tokens.chipPaddingRight, tokens.chipPaddingLeft, tokens.chipClearContentMarginLeft, tokens.chipClearContentMarginRight, tokens.chipCloseIconSize, tokens.chipFontFamily, tokens.chipFontSize, tokens.chipFontStyle, tokens.chipFontWeight, tokens.chipLetterSpacing, tokens.chipLineHeight)
|
24
|
+
},
|
25
|
+
labelPlacement: {
|
26
|
+
inner: [labelPlacement_inner, /*#__PURE__*/css(["&.", "{", ":var(--plasma-input-label-color,var(--plasma-input-placeholder-color,var(--plasma-colors-secondary)));", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);}"], labelPlacement_inner, tokens.placeholderColor, tokens.labelInnerFontFamily, tokens.labelInnerFontSize, tokens.labelInnerFontStyle, tokens.labelInnerFontWeight, tokens.labelInnerLetterSpacing, tokens.labelInnerLineHeight)],
|
27
|
+
outer: [labelPlacement_outer, /*#__PURE__*/css(["&.", "{}"], labelPlacement_outer)]
|
28
|
+
},
|
29
|
+
disabled: {
|
30
|
+
"true": /*#__PURE__*/css(["", ":0.4;"], tokens.disabledOpacity)
|
31
|
+
},
|
32
|
+
// TODO заменить --surface-transparent-primary на корректный токен
|
33
|
+
readOnly: {
|
34
|
+
"true": /*#__PURE__*/css(["", ":var(--text-secondary);", ":var(--surface-transparent-primary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-secondary);"], tokens.colorReadOnly, tokens.backgroundColorReadOnly, tokens.placeholderColorReadOnly, tokens.leftHelperColorReadOnly, tokens.labelColorReadOnly)
|
35
|
+
}
|
36
|
+
}
|
37
|
+
};
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { component, mergeConfig } from '../../../../engines';
|
2
|
+
import { textFieldConfig } from '../../../../components/TextField';
|
3
|
+
import { config } from './TextField.config';
|
4
|
+
var mergedConfig = /*#__PURE__*/mergeConfig(textFieldConfig, config);
|
5
|
+
export var TextField = /*#__PURE__*/component(mergedConfig);
|