@snack-uikit/fields 0.30.0 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/README.md +8 -8
- package/dist/cjs/components/FieldSelect/styles.module.css +6 -18
- package/dist/esm/components/FieldSelect/styles.module.css +6 -18
- package/package.json +16 -16
- package/src/components/FieldColor/styles.module.scss +9 -10
- package/src/components/FieldDate/styles.module.scss +10 -11
- package/src/components/FieldDecorator/styles.module.scss +44 -45
- package/src/components/FieldSelect/styles.module.scss +20 -20
- package/src/components/FieldSlider/styles.module.scss +4 -4
- package/src/components/FieldTextArea/styles.module.scss +18 -18
- package/src/helperComponents/ButtonCopyValue/styles.module.scss +2 -2
- package/src/helperComponents/ButtonField/styles.module.scss +9 -9
- package/src/helperComponents/ButtonFieldList/styles.module.scss +2 -2
- package/src/helperComponents/ButtonHideValue/styles.module.scss +2 -2
- package/src/helperComponents/FieldContainerPrivate/styles.module.scss +24 -26
- package/src/helperComponents/TextArea/styles.module.scss +5 -5
- package/src/hooks/styles.module.scss +5 -5
- package/src/styles.module.scss +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# 0.31.0 (2024-10-28)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **FF-5782:** sass use/forward approach ([3e53869](https://github.com/cloud-ru-tech/snack-uikit/commit/3e53869ace864a7718e434b7f410c15dbd911cd5))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# 0.30.0 (2024-10-28)
|
|
7
18
|
|
|
8
19
|
|
package/README.md
CHANGED
|
@@ -239,7 +239,7 @@ FieldStepper в основном предназначен для работы с
|
|
|
239
239
|
| hint | `string` | - | Подсказка внизу |
|
|
240
240
|
| validationState | enum ValidationState: `"default"`, `"error"`, `"warning"`, `"success"` | default | Состояние валидации |
|
|
241
241
|
| showHintIcon | `boolean` | - | Отображать иконку подсказки |
|
|
242
|
-
| ref | `
|
|
242
|
+
| ref | `LegacyRef<HTMLInputElement>` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
|
|
243
243
|
| key | `Key` | - | |
|
|
244
244
|
## FieldTextArea
|
|
245
245
|
### Props
|
|
@@ -272,7 +272,7 @@ FieldStepper в основном предназначен для работы с
|
|
|
272
272
|
| hint | `string` | - | Подсказка внизу |
|
|
273
273
|
| validationState | enum ValidationState: `"default"`, `"error"`, `"warning"`, `"success"` | default | Состояние валидации |
|
|
274
274
|
| showHintIcon | `boolean` | - | Отображать иконку подсказки |
|
|
275
|
-
| ref | `
|
|
275
|
+
| ref | `LegacyRef<HTMLTextAreaElement>` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
|
|
276
276
|
| key | `Key` | - | |
|
|
277
277
|
## FieldSecure
|
|
278
278
|
### Props
|
|
@@ -306,7 +306,7 @@ FieldStepper в основном предназначен для работы с
|
|
|
306
306
|
| hint | `string` | - | Подсказка внизу |
|
|
307
307
|
| validationState | enum ValidationState: `"default"`, `"error"`, `"warning"`, `"success"` | default | Состояние валидации |
|
|
308
308
|
| showHintIcon | `boolean` | - | Отображать иконку подсказки |
|
|
309
|
-
| ref | `
|
|
309
|
+
| ref | `LegacyRef<HTMLInputElement>` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
|
|
310
310
|
| key | `Key` | - | |
|
|
311
311
|
## parseDate
|
|
312
312
|
`helper`
|
|
@@ -341,7 +341,7 @@ FieldStepper в основном предназначен для работы с
|
|
|
341
341
|
| hint | `string` | - | Подсказка внизу |
|
|
342
342
|
| validationState | enum ValidationState: `"default"`, `"error"`, `"warning"`, `"success"` | default | Состояние валидации |
|
|
343
343
|
| showHintIcon | `boolean` | - | Отображать иконку подсказки |
|
|
344
|
-
| ref | `
|
|
344
|
+
| ref | `LegacyRef<HTMLInputElement>` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
|
|
345
345
|
| key | `Key` | - | |
|
|
346
346
|
## FieldSelect
|
|
347
347
|
### Props
|
|
@@ -395,7 +395,7 @@ FieldStepper в основном предназначен для работы с
|
|
|
395
395
|
| enableFuzzySearch | `boolean` | - | Включить нечеткий поиск |
|
|
396
396
|
| selectedOptionFormatter | `SelectedOptionFormatter` | - | |
|
|
397
397
|
| selection | "single" \| "multiple" | - | |
|
|
398
|
-
| ref | `
|
|
398
|
+
| ref | `LegacyRef<HTMLInputElement>` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
|
|
399
399
|
| key | `Key` | - | |
|
|
400
400
|
| removeByBackspace | `boolean` | - | |
|
|
401
401
|
| resetSearchOnOptionSelection | `boolean` | - | Поведение строки поиска при выборе опции из списка |
|
|
@@ -428,7 +428,7 @@ FieldStepper в основном предназначен для работы с
|
|
|
428
428
|
| hint | `string` | - | Подсказка внизу |
|
|
429
429
|
| validationState | enum ValidationState: `"default"`, `"error"`, `"warning"`, `"success"` | default | Состояние валидации |
|
|
430
430
|
| showHintIcon | `boolean` | - | Отображать иконку подсказки |
|
|
431
|
-
| ref | `
|
|
431
|
+
| ref | `LegacyRef<HTMLInputElement>` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
|
|
432
432
|
| key | `Key` | - | |
|
|
433
433
|
## FieldSlider
|
|
434
434
|
### Props
|
|
@@ -463,7 +463,7 @@ FieldStepper в основном предназначен для работы с
|
|
|
463
463
|
| labelTooltipPlacement | enum Placement: `"left"`, `"left-start"`, `"left-end"`, `"right"`, `"right-start"`, `"right-end"`, `"top"`, `"top-start"`, `"top-end"`, `"bottom"`, `"bottom-start"`, `"bottom-end"` | top | Расположение подсказки лейбла |
|
|
464
464
|
| hint | `string` | - | Подсказка внизу |
|
|
465
465
|
| showHintIcon | `boolean` | - | Отображать иконку подсказки |
|
|
466
|
-
| ref | `
|
|
466
|
+
| ref | `LegacyRef<HTMLInputElement>` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
|
|
467
467
|
| key | `Key` | - | |
|
|
468
468
|
## FieldColor
|
|
469
469
|
### Props
|
|
@@ -496,7 +496,7 @@ FieldStepper в основном предназначен для работы с
|
|
|
496
496
|
| hint | `string` | - | Подсказка внизу |
|
|
497
497
|
| validationState | enum ValidationState: `"default"`, `"error"`, `"warning"`, `"success"` | default | Состояние валидации |
|
|
498
498
|
| showHintIcon | `boolean` | - | Отображать иконку подсказки |
|
|
499
|
-
| ref | `
|
|
499
|
+
| ref | `LegacyRef<HTMLInputElement>` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
|
|
500
500
|
| key | `Key` | - | |
|
|
501
501
|
|
|
502
502
|
|
|
@@ -72,12 +72,8 @@
|
|
|
72
72
|
color:var(--sys-neutral-text-light, #8b8e9b);
|
|
73
73
|
}
|
|
74
74
|
.container[data-size=s][data-variant=single-line-container] .displayValue{
|
|
75
|
-
width:calc(100% - (
|
|
76
|
-
|
|
77
|
-
));
|
|
78
|
-
margin-right:calc(
|
|
79
|
-
var(--space-fields-single-line-container-s-right, 6px) + var(--space-fields-single-line-container-s-gap, 4px) + calc(var(var(--space-fields-postfix-gap, 4px)) + var(--size-icon-container-xs, 16px) * 2)
|
|
80
|
-
);
|
|
75
|
+
width:calc(100% - (var(--space-fields-single-line-container-s-right, 6px) + var(--space-fields-single-line-container-s-gap, 4px) + calc(var(var(--space-fields-postfix-gap, 4px)) + var(--size-icon-container-xs, 16px) * 2)));
|
|
76
|
+
margin-right:calc(var(--space-fields-single-line-container-s-right, 6px) + var(--space-fields-single-line-container-s-gap, 4px) + calc(var(var(--space-fields-postfix-gap, 4px)) + var(--size-icon-container-xs, 16px) * 2));
|
|
81
77
|
padding-left:var(--space-fields-single-line-container-s-left, 6px);
|
|
82
78
|
border-radius:var(--radius-fields-s, 12px);
|
|
83
79
|
}
|
|
@@ -95,12 +91,8 @@
|
|
|
95
91
|
color:var(--sys-neutral-text-light, #8b8e9b);
|
|
96
92
|
}
|
|
97
93
|
.container[data-size=m][data-variant=single-line-container] .displayValue{
|
|
98
|
-
width:calc(100% - (
|
|
99
|
-
|
|
100
|
-
));
|
|
101
|
-
margin-right:calc(
|
|
102
|
-
var(--space-fields-single-line-container-m-right, 8px) + var(--space-fields-single-line-container-m-gap, 4px) + calc(var(var(--space-fields-postfix-gap, 4px)) + var(--size-icon-container-s, 24px) * 2)
|
|
103
|
-
);
|
|
94
|
+
width:calc(100% - (var(--space-fields-single-line-container-m-right, 8px) + var(--space-fields-single-line-container-m-gap, 4px) + calc(var(var(--space-fields-postfix-gap, 4px)) + var(--size-icon-container-s, 24px) * 2)));
|
|
95
|
+
margin-right:calc(var(--space-fields-single-line-container-m-right, 8px) + var(--space-fields-single-line-container-m-gap, 4px) + calc(var(var(--space-fields-postfix-gap, 4px)) + var(--size-icon-container-s, 24px) * 2));
|
|
104
96
|
padding-left:var(--space-fields-single-line-container-m-left, 8px);
|
|
105
97
|
border-radius:var(--radius-fields-m, 14px);
|
|
106
98
|
}
|
|
@@ -118,12 +110,8 @@
|
|
|
118
110
|
color:var(--sys-neutral-text-light, #8b8e9b);
|
|
119
111
|
}
|
|
120
112
|
.container[data-size=l][data-variant=single-line-container] .displayValue{
|
|
121
|
-
width:calc(100% - (
|
|
122
|
-
|
|
123
|
-
));
|
|
124
|
-
margin-right:calc(
|
|
125
|
-
var(--space-fields-single-line-container-l-right, 10px) + var(--space-fields-single-line-container-l-gap, 8px) + calc(var(var(--space-fields-postfix-gap, 4px)) + var(--size-icon-container-s, 24px) * 2)
|
|
126
|
-
);
|
|
113
|
+
width:calc(100% - (var(--space-fields-single-line-container-l-right, 10px) + var(--space-fields-single-line-container-l-gap, 8px) + calc(var(var(--space-fields-postfix-gap, 4px)) + var(--size-icon-container-s, 24px) * 2)));
|
|
114
|
+
margin-right:calc(var(--space-fields-single-line-container-l-right, 10px) + var(--space-fields-single-line-container-l-gap, 8px) + calc(var(var(--space-fields-postfix-gap, 4px)) + var(--size-icon-container-s, 24px) * 2));
|
|
127
115
|
padding-left:var(--space-fields-single-line-container-l-left, 10px);
|
|
128
116
|
border-radius:var(--radius-fields-l, 16px);
|
|
129
117
|
}
|
|
@@ -72,12 +72,8 @@
|
|
|
72
72
|
color:var(--sys-neutral-text-light, #8b8e9b);
|
|
73
73
|
}
|
|
74
74
|
.container[data-size=s][data-variant=single-line-container] .displayValue{
|
|
75
|
-
width:calc(100% - (
|
|
76
|
-
|
|
77
|
-
));
|
|
78
|
-
margin-right:calc(
|
|
79
|
-
var(--space-fields-single-line-container-s-right, 6px) + var(--space-fields-single-line-container-s-gap, 4px) + calc(var(var(--space-fields-postfix-gap, 4px)) + var(--size-icon-container-xs, 16px) * 2)
|
|
80
|
-
);
|
|
75
|
+
width:calc(100% - (var(--space-fields-single-line-container-s-right, 6px) + var(--space-fields-single-line-container-s-gap, 4px) + calc(var(var(--space-fields-postfix-gap, 4px)) + var(--size-icon-container-xs, 16px) * 2)));
|
|
76
|
+
margin-right:calc(var(--space-fields-single-line-container-s-right, 6px) + var(--space-fields-single-line-container-s-gap, 4px) + calc(var(var(--space-fields-postfix-gap, 4px)) + var(--size-icon-container-xs, 16px) * 2));
|
|
81
77
|
padding-left:var(--space-fields-single-line-container-s-left, 6px);
|
|
82
78
|
border-radius:var(--radius-fields-s, 12px);
|
|
83
79
|
}
|
|
@@ -95,12 +91,8 @@
|
|
|
95
91
|
color:var(--sys-neutral-text-light, #8b8e9b);
|
|
96
92
|
}
|
|
97
93
|
.container[data-size=m][data-variant=single-line-container] .displayValue{
|
|
98
|
-
width:calc(100% - (
|
|
99
|
-
|
|
100
|
-
));
|
|
101
|
-
margin-right:calc(
|
|
102
|
-
var(--space-fields-single-line-container-m-right, 8px) + var(--space-fields-single-line-container-m-gap, 4px) + calc(var(var(--space-fields-postfix-gap, 4px)) + var(--size-icon-container-s, 24px) * 2)
|
|
103
|
-
);
|
|
94
|
+
width:calc(100% - (var(--space-fields-single-line-container-m-right, 8px) + var(--space-fields-single-line-container-m-gap, 4px) + calc(var(var(--space-fields-postfix-gap, 4px)) + var(--size-icon-container-s, 24px) * 2)));
|
|
95
|
+
margin-right:calc(var(--space-fields-single-line-container-m-right, 8px) + var(--space-fields-single-line-container-m-gap, 4px) + calc(var(var(--space-fields-postfix-gap, 4px)) + var(--size-icon-container-s, 24px) * 2));
|
|
104
96
|
padding-left:var(--space-fields-single-line-container-m-left, 8px);
|
|
105
97
|
border-radius:var(--radius-fields-m, 14px);
|
|
106
98
|
}
|
|
@@ -118,12 +110,8 @@
|
|
|
118
110
|
color:var(--sys-neutral-text-light, #8b8e9b);
|
|
119
111
|
}
|
|
120
112
|
.container[data-size=l][data-variant=single-line-container] .displayValue{
|
|
121
|
-
width:calc(100% - (
|
|
122
|
-
|
|
123
|
-
));
|
|
124
|
-
margin-right:calc(
|
|
125
|
-
var(--space-fields-single-line-container-l-right, 10px) + var(--space-fields-single-line-container-l-gap, 8px) + calc(var(var(--space-fields-postfix-gap, 4px)) + var(--size-icon-container-s, 24px) * 2)
|
|
126
|
-
);
|
|
113
|
+
width:calc(100% - (var(--space-fields-single-line-container-l-right, 10px) + var(--space-fields-single-line-container-l-gap, 8px) + calc(var(var(--space-fields-postfix-gap, 4px)) + var(--size-icon-container-s, 24px) * 2)));
|
|
114
|
+
margin-right:calc(var(--space-fields-single-line-container-l-right, 10px) + var(--space-fields-single-line-container-l-gap, 8px) + calc(var(var(--space-fields-postfix-gap, 4px)) + var(--size-icon-container-s, 24px) * 2));
|
|
127
115
|
padding-left:var(--space-fields-single-line-container-l-left, 10px);
|
|
128
116
|
border-radius:var(--radius-fields-l, 16px);
|
|
129
117
|
}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"title": "Fields",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.31.0",
|
|
8
8
|
"sideEffects": [
|
|
9
9
|
"*.css",
|
|
10
10
|
"*.woff",
|
|
@@ -36,20 +36,20 @@
|
|
|
36
36
|
"license": "Apache-2.0",
|
|
37
37
|
"scripts": {},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@snack-uikit/button": "0.
|
|
40
|
-
"@snack-uikit/calendar": "0.
|
|
41
|
-
"@snack-uikit/color-picker": "0.
|
|
42
|
-
"@snack-uikit/divider": "3.
|
|
43
|
-
"@snack-uikit/dropdown": "0.
|
|
44
|
-
"@snack-uikit/icons": "0.
|
|
45
|
-
"@snack-uikit/input-private": "4.
|
|
46
|
-
"@snack-uikit/list": "0.
|
|
47
|
-
"@snack-uikit/scroll": "0.
|
|
48
|
-
"@snack-uikit/skeleton": "0.
|
|
49
|
-
"@snack-uikit/slider": "0.
|
|
50
|
-
"@snack-uikit/tag": "0.
|
|
51
|
-
"@snack-uikit/tooltip": "0.
|
|
52
|
-
"@snack-uikit/truncate-string": "0.
|
|
39
|
+
"@snack-uikit/button": "0.19.0",
|
|
40
|
+
"@snack-uikit/calendar": "0.10.0",
|
|
41
|
+
"@snack-uikit/color-picker": "0.3.0",
|
|
42
|
+
"@snack-uikit/divider": "3.2.0",
|
|
43
|
+
"@snack-uikit/dropdown": "0.4.0",
|
|
44
|
+
"@snack-uikit/icons": "0.24.0",
|
|
45
|
+
"@snack-uikit/input-private": "4.2.0",
|
|
46
|
+
"@snack-uikit/list": "0.20.0",
|
|
47
|
+
"@snack-uikit/scroll": "0.8.0",
|
|
48
|
+
"@snack-uikit/skeleton": "0.5.0",
|
|
49
|
+
"@snack-uikit/slider": "0.3.0",
|
|
50
|
+
"@snack-uikit/tag": "0.11.0",
|
|
51
|
+
"@snack-uikit/tooltip": "0.15.0",
|
|
52
|
+
"@snack-uikit/truncate-string": "0.6.0",
|
|
53
53
|
"@snack-uikit/utils": "3.5.0",
|
|
54
54
|
"classnames": "2.3.2",
|
|
55
55
|
"copy-to-clipboard": "3.3.3",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"@snack-uikit/locale": "*"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "8499829efa0c118b704de17411ae2328a024adb5"
|
|
69
69
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
@
|
|
2
|
-
@import '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-fields';
|
|
1
|
+
@use '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-element';
|
|
3
2
|
|
|
4
3
|
$sizes: 's', 'm', 'l';
|
|
5
4
|
$icons-sizes: (
|
|
6
|
-
's':
|
|
7
|
-
'm':
|
|
8
|
-
'l':
|
|
5
|
+
's': styles-tokens-element.$icon-xs,
|
|
6
|
+
'm': styles-tokens-element.$icon-s,
|
|
7
|
+
'l': styles-tokens-element.$icon-s,
|
|
9
8
|
);
|
|
10
9
|
|
|
11
10
|
.triggerClassName {
|
|
12
|
-
--offset: #{
|
|
11
|
+
--offset: #{styles-tokens-element.$space-drop-list-drop-offset};
|
|
13
12
|
|
|
14
13
|
display: block;
|
|
15
14
|
width: 100%;
|
|
@@ -18,12 +17,12 @@ $icons-sizes: (
|
|
|
18
17
|
.colorPreview {
|
|
19
18
|
position: relative;
|
|
20
19
|
|
|
21
|
-
width:
|
|
22
|
-
height:
|
|
20
|
+
width: styles-tokens-element.$dimension-2m;
|
|
21
|
+
height: styles-tokens-element.$dimension-2m;
|
|
23
22
|
|
|
24
23
|
/* stylelint-disable-next-line color-no-hex */
|
|
25
24
|
background-color: #fff;
|
|
26
|
-
border-radius:
|
|
25
|
+
border-radius: styles-tokens-element.$dimension-050m;
|
|
27
26
|
|
|
28
27
|
&::after {
|
|
29
28
|
content: '';
|
|
@@ -36,6 +35,6 @@ $icons-sizes: (
|
|
|
36
35
|
height: 100%;
|
|
37
36
|
|
|
38
37
|
background-color: var(--color);
|
|
39
|
-
border-radius:
|
|
38
|
+
border-radius: styles-tokens-element.$dimension-050m;
|
|
40
39
|
}
|
|
41
40
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
@
|
|
2
|
-
@import '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-fields';
|
|
1
|
+
@use '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-element';
|
|
3
2
|
|
|
4
3
|
$sizes: 's', 'm', 'l';
|
|
5
4
|
$icons-sizes: (
|
|
6
|
-
's':
|
|
7
|
-
'm':
|
|
8
|
-
'l':
|
|
5
|
+
's': styles-tokens-element.$icon-xs,
|
|
6
|
+
'm': styles-tokens-element.$icon-s,
|
|
7
|
+
'l': styles-tokens-element.$icon-s
|
|
9
8
|
);
|
|
10
9
|
|
|
11
10
|
.triggerClassName {
|
|
12
|
-
--offset: #{
|
|
11
|
+
--offset: #{styles-tokens-element.$space-drop-list-drop-offset};
|
|
13
12
|
|
|
14
13
|
display: block;
|
|
15
14
|
width: 100%;
|
|
@@ -35,25 +34,25 @@ $icons-sizes: (
|
|
|
35
34
|
|
|
36
35
|
.container {
|
|
37
36
|
.calendarIcon {
|
|
38
|
-
color:
|
|
37
|
+
color: styles-tokens-element.$sys-neutral-text-light;
|
|
39
38
|
|
|
40
39
|
@each $size in $sizes {
|
|
41
40
|
&[data-size='#{$size}'] {
|
|
42
|
-
width: simple-var($icons-sizes, $size) !important; /* stylelint-disable-line declaration-no-important */
|
|
43
|
-
height: simple-var($icons-sizes, $size) !important; /* stylelint-disable-line declaration-no-important */
|
|
41
|
+
width: styles-tokens-element.simple-var($icons-sizes, $size) !important; /* stylelint-disable-line declaration-no-important */
|
|
42
|
+
height: styles-tokens-element.simple-var($icons-sizes, $size) !important; /* stylelint-disable-line declaration-no-important */
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
46
|
|
|
48
47
|
&:hover, &:focus-within, &[data-focused] {
|
|
49
48
|
.calendarIcon {
|
|
50
|
-
color:
|
|
49
|
+
color: styles-tokens-element.$sys-neutral-text-support;
|
|
51
50
|
}
|
|
52
51
|
}
|
|
53
52
|
|
|
54
53
|
&[data-disabled], &[data-readonly] {
|
|
55
54
|
.calendarIcon {
|
|
56
|
-
color:
|
|
55
|
+
color: styles-tokens-element.$sys-neutral-text-disabled;
|
|
57
56
|
}
|
|
58
57
|
}
|
|
59
58
|
}
|
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
@
|
|
2
|
-
@import '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-element';
|
|
1
|
+
@use '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-fields';
|
|
3
2
|
|
|
4
3
|
$sizes: 's', 'm', 'l';
|
|
5
4
|
$header-typography: (
|
|
6
|
-
's':
|
|
7
|
-
'm':
|
|
8
|
-
'l':
|
|
5
|
+
's': styles-tokens-fields.$sans-label-m,
|
|
6
|
+
'm': styles-tokens-fields.$sans-label-l,
|
|
7
|
+
'l': styles-tokens-fields.$sans-label-l,
|
|
9
8
|
);
|
|
10
9
|
$footer-typography: (
|
|
11
|
-
's':
|
|
12
|
-
'm':
|
|
13
|
-
'l':
|
|
10
|
+
's': styles-tokens-fields.$sans-body-s,
|
|
11
|
+
'm': styles-tokens-fields.$sans-body-m,
|
|
12
|
+
'l': styles-tokens-fields.$sans-body-m,
|
|
14
13
|
);
|
|
15
14
|
$hint-icon-container: (
|
|
16
|
-
's':
|
|
17
|
-
'm':
|
|
18
|
-
'l':
|
|
15
|
+
's': styles-tokens-fields.$fields-hint-icon-container-s,
|
|
16
|
+
'm': styles-tokens-fields.$fields-hint-icon-container-m,
|
|
17
|
+
'l': styles-tokens-fields.$fields-hint-icon-container-m,
|
|
19
18
|
);
|
|
20
19
|
$caption-typography: (
|
|
21
|
-
's':
|
|
22
|
-
'm':
|
|
23
|
-
'l':
|
|
20
|
+
's': styles-tokens-fields.$sans-body-s,
|
|
21
|
+
'm': styles-tokens-fields.$sans-body-m,
|
|
22
|
+
'l': styles-tokens-fields.$sans-body-m,
|
|
24
23
|
);
|
|
25
24
|
|
|
26
25
|
.decorator {
|
|
@@ -33,50 +32,50 @@ $caption-typography: (
|
|
|
33
32
|
|
|
34
33
|
@each $size in $sizes {
|
|
35
34
|
&[data-size='#{$size}'] {
|
|
36
|
-
@include composite-var(
|
|
35
|
+
@include styles-tokens-fields.composite-var(styles-tokens-fields.$fields, 'decorator', $size);
|
|
37
36
|
}
|
|
38
37
|
}
|
|
39
38
|
}
|
|
40
39
|
|
|
41
40
|
.header {
|
|
42
41
|
display: flex;
|
|
43
|
-
gap:
|
|
42
|
+
gap: styles-tokens-fields.$dimension-050m;
|
|
44
43
|
box-sizing: border-box;
|
|
45
|
-
color:
|
|
44
|
+
color: styles-tokens-fields.$sys-neutral-text-support;
|
|
46
45
|
|
|
47
46
|
@each $size in $sizes {
|
|
48
47
|
&[data-size='#{$size}'] {
|
|
49
|
-
@include composite-var($header-typography, $size);
|
|
48
|
+
@include styles-tokens-fields.composite-var($header-typography, $size);
|
|
50
49
|
|
|
51
50
|
.caption {
|
|
52
|
-
@include composite-var($caption-typography, $size);
|
|
51
|
+
@include styles-tokens-fields.composite-var($caption-typography, $size);
|
|
53
52
|
|
|
54
53
|
margin-left: auto;
|
|
55
|
-
color:
|
|
54
|
+
color: styles-tokens-fields.$sys-neutral-text-light;
|
|
56
55
|
}
|
|
57
56
|
}
|
|
58
57
|
}
|
|
59
58
|
}
|
|
60
59
|
|
|
61
60
|
.labelLayout {
|
|
62
|
-
@include composite-var(
|
|
61
|
+
@include styles-tokens-fields.composite-var(styles-tokens-fields.$fields-label-label-layout);
|
|
63
62
|
|
|
64
63
|
display: inline-flex;
|
|
65
64
|
align-items: center;
|
|
66
|
-
color:
|
|
65
|
+
color: styles-tokens-fields.$sys-neutral-text-light;
|
|
67
66
|
}
|
|
68
67
|
|
|
69
68
|
.label {
|
|
70
69
|
display: grid;
|
|
71
|
-
color:
|
|
70
|
+
color: styles-tokens-fields.$sys-neutral-text-support;
|
|
72
71
|
}
|
|
73
72
|
|
|
74
73
|
.required {
|
|
75
|
-
color:
|
|
74
|
+
color: styles-tokens-fields.$sys-neutral-text-support;
|
|
76
75
|
}
|
|
77
76
|
|
|
78
77
|
.footer {
|
|
79
|
-
@include composite-var(
|
|
78
|
+
@include styles-tokens-fields.composite-var(styles-tokens-fields.$fields-hint-container);
|
|
80
79
|
|
|
81
80
|
display: flex;
|
|
82
81
|
justify-content: space-between;
|
|
@@ -84,7 +83,7 @@ $caption-typography: (
|
|
|
84
83
|
|
|
85
84
|
@each $size in $sizes {
|
|
86
85
|
&[data-size='#{$size}'] {
|
|
87
|
-
@include composite-var($footer-typography, $size);
|
|
86
|
+
@include styles-tokens-fields.composite-var($footer-typography, $size);
|
|
88
87
|
}
|
|
89
88
|
}
|
|
90
89
|
|
|
@@ -94,7 +93,7 @@ $caption-typography: (
|
|
|
94
93
|
}
|
|
95
94
|
|
|
96
95
|
.hintLayout {
|
|
97
|
-
@include composite-var(
|
|
96
|
+
@include styles-tokens-fields.composite-var(styles-tokens-fields.$fields-hint-hint-layout);
|
|
98
97
|
|
|
99
98
|
display: inline-flex;
|
|
100
99
|
align-items: flex-start;
|
|
@@ -108,7 +107,7 @@ $caption-typography: (
|
|
|
108
107
|
|
|
109
108
|
@each $size in $sizes {
|
|
110
109
|
&[data-size='#{$size}'] {
|
|
111
|
-
@include composite-var($hint-icon-container, $size);
|
|
110
|
+
@include styles-tokens-fields.composite-var($hint-icon-container, $size);
|
|
112
111
|
}
|
|
113
112
|
}
|
|
114
113
|
}
|
|
@@ -119,26 +118,26 @@ $caption-typography: (
|
|
|
119
118
|
word-break: break-word;
|
|
120
119
|
|
|
121
120
|
&[data-validation='default'] {
|
|
122
|
-
color:
|
|
121
|
+
color: styles-tokens-fields.$sys-neutral-text-light;
|
|
123
122
|
}
|
|
124
123
|
|
|
125
124
|
&[data-validation='error'] {
|
|
126
|
-
color:
|
|
125
|
+
color: styles-tokens-fields.$sys-red-text-main;
|
|
127
126
|
}
|
|
128
127
|
|
|
129
128
|
&[data-validation='warning'] {
|
|
130
|
-
color:
|
|
129
|
+
color: styles-tokens-fields.$sys-yellow-text-main;
|
|
131
130
|
}
|
|
132
131
|
|
|
133
132
|
&[data-validation='success'] {
|
|
134
|
-
color:
|
|
133
|
+
color: styles-tokens-fields.$sys-green-text-main;
|
|
135
134
|
}
|
|
136
135
|
}
|
|
137
136
|
|
|
138
137
|
.icon {
|
|
139
138
|
flex-shrink: 0;
|
|
140
139
|
box-sizing: content-box;
|
|
141
|
-
color:
|
|
140
|
+
color: styles-tokens-fields.$sys-neutral-text-light;
|
|
142
141
|
}
|
|
143
142
|
|
|
144
143
|
.hintIcon {
|
|
@@ -146,39 +145,39 @@ $caption-typography: (
|
|
|
146
145
|
box-sizing: content-box;
|
|
147
146
|
|
|
148
147
|
&[data-validation='default'] {
|
|
149
|
-
color:
|
|
148
|
+
color: styles-tokens-fields.$sys-neutral-accent-default;
|
|
150
149
|
}
|
|
151
150
|
|
|
152
151
|
&[data-validation='error'] {
|
|
153
|
-
color:
|
|
152
|
+
color: styles-tokens-fields.$sys-red-accent-default;
|
|
154
153
|
}
|
|
155
154
|
|
|
156
155
|
&[data-validation='warning'] {
|
|
157
|
-
color:
|
|
156
|
+
color: styles-tokens-fields.$sys-yellow-accent-default;
|
|
158
157
|
}
|
|
159
158
|
|
|
160
159
|
&[data-validation='success'] {
|
|
161
|
-
color:
|
|
160
|
+
color: styles-tokens-fields.$sys-green-accent-default;
|
|
162
161
|
}
|
|
163
162
|
}
|
|
164
163
|
|
|
165
164
|
.counterLimit {
|
|
166
165
|
> span {
|
|
167
166
|
&[data-validation='default'] {
|
|
168
|
-
color:
|
|
167
|
+
color: styles-tokens-fields.$sys-neutral-text-light;
|
|
169
168
|
}
|
|
170
169
|
|
|
171
170
|
&[data-limit-exceeded],
|
|
172
171
|
&[data-validation='error'] {
|
|
173
|
-
color:
|
|
172
|
+
color: styles-tokens-fields.$sys-red-text-light;
|
|
174
173
|
}
|
|
175
174
|
|
|
176
175
|
&[data-validation='warning'] {
|
|
177
|
-
color:
|
|
176
|
+
color: styles-tokens-fields.$sys-yellow-text-light;
|
|
178
177
|
}
|
|
179
178
|
|
|
180
179
|
&[data-validation='success'] {
|
|
181
|
-
color:
|
|
180
|
+
color: styles-tokens-fields.$sys-green-text-light;
|
|
182
181
|
}
|
|
183
182
|
}
|
|
184
183
|
}
|
|
@@ -186,18 +185,18 @@ $caption-typography: (
|
|
|
186
185
|
.counterCurrentValue {
|
|
187
186
|
&[data-limit-exceeded] {
|
|
188
187
|
&[data-validation='default'] {
|
|
189
|
-
color:
|
|
188
|
+
color: styles-tokens-fields.$sys-neutral-text-main;
|
|
190
189
|
}
|
|
191
190
|
&[data-validation='error'] {
|
|
192
|
-
color:
|
|
191
|
+
color: styles-tokens-fields.$sys-red-text-main;
|
|
193
192
|
}
|
|
194
193
|
|
|
195
194
|
&[data-validation='warning'] {
|
|
196
|
-
color:
|
|
195
|
+
color: styles-tokens-fields.$sys-yellow-text-main;
|
|
197
196
|
}
|
|
198
197
|
|
|
199
198
|
&[data-validation='success'] {
|
|
200
|
-
color:
|
|
199
|
+
color: styles-tokens-fields.$sys-green-text-light;
|
|
201
200
|
}
|
|
202
201
|
}
|
|
203
202
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
1
|
+
@use '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-element';
|
|
2
|
+
@use '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-fields';
|
|
3
3
|
|
|
4
4
|
$sizes: 's', 'm', 'l';
|
|
5
5
|
$containerVariant: 'single-line-container';
|
|
6
6
|
$icons-sizes: (
|
|
7
|
-
's':
|
|
8
|
-
'm':
|
|
9
|
-
'l':
|
|
7
|
+
's': styles-tokens-element.$icon-xs,
|
|
8
|
+
'm': styles-tokens-element.$icon-s,
|
|
9
|
+
'l': styles-tokens-element.$icon-s,
|
|
10
10
|
);
|
|
11
11
|
|
|
12
12
|
$base-min-width: 4px;
|
|
13
13
|
|
|
14
14
|
.triggerClassName {
|
|
15
|
-
--offset: #{
|
|
15
|
+
--offset: #{styles-tokens-element.$space-drop-list-drop-offset};
|
|
16
16
|
|
|
17
17
|
width: 100%;
|
|
18
18
|
}
|
|
@@ -33,10 +33,10 @@ $base-min-width: 4px;
|
|
|
33
33
|
|
|
34
34
|
@each $size in $sizes {
|
|
35
35
|
&[data-size='#{$size}'] {
|
|
36
|
-
@include composite-var(
|
|
36
|
+
@include styles-tokens-element.composite-var(styles-tokens-fields.$fields, 'select-multiple', $size);
|
|
37
37
|
|
|
38
38
|
.contentWrapper {
|
|
39
|
-
gap: simple-var(
|
|
39
|
+
gap: styles-tokens-element.simple-var(styles-tokens-fields.$fields, 'select-multiple', $size, 'gap');
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -49,27 +49,27 @@ $base-min-width: 4px;
|
|
|
49
49
|
@each $size in $sizes {
|
|
50
50
|
&[data-size='#{$size}'] {
|
|
51
51
|
.inputPlug {
|
|
52
|
-
@include composite-var(
|
|
52
|
+
@include styles-tokens-element.composite-var(styles-tokens-element.$theme-variables, 'sans', 'body', $size);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.arrowIcon {
|
|
56
|
-
width: simple-var($icons-sizes, $size) !important; /* stylelint-disable-line declaration-no-important */
|
|
57
|
-
height: simple-var($icons-sizes, $size) !important; /* stylelint-disable-line declaration-no-important */
|
|
58
|
-
color:
|
|
56
|
+
width: styles-tokens-element.simple-var($icons-sizes, $size) !important; /* stylelint-disable-line declaration-no-important */
|
|
57
|
+
height: styles-tokens-element.simple-var($icons-sizes, $size) !important; /* stylelint-disable-line declaration-no-important */
|
|
58
|
+
color: styles-tokens-element.$sys-neutral-text-light;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
&[data-variant='#{$containerVariant}'] {
|
|
62
62
|
.displayValue {
|
|
63
|
-
$button-width: simple-var($icons-sizes, $size);
|
|
64
|
-
$postfix-width: calc(var(#{
|
|
63
|
+
$button-width: styles-tokens-element.simple-var($icons-sizes, $size);
|
|
64
|
+
$postfix-width: calc(var(#{styles-tokens-element.$space-fields-postfix-gap}) + $button-width * 2);
|
|
65
65
|
$margin-right: calc(
|
|
66
|
-
#{simple-var(
|
|
66
|
+
#{styles-tokens-element.simple-var(styles-tokens-fields.$fields, $containerVariant, $size, 'padding-right')} + #{styles-tokens-element.simple-var(styles-tokens-fields.$fields, $containerVariant, $size, 'gap')} + #{$postfix-width}
|
|
67
67
|
);
|
|
68
68
|
|
|
69
69
|
width: calc(100% - $margin-right);
|
|
70
70
|
margin-right: $margin-right;
|
|
71
|
-
padding-left: simple-var(
|
|
72
|
-
border-radius: simple-var(
|
|
71
|
+
padding-left: styles-tokens-element.simple-var(styles-tokens-fields.$fields, $containerVariant, $size, 'padding-left');
|
|
72
|
+
border-radius: styles-tokens-element.simple-var(styles-tokens-fields.$fields, $containerVariant, $size, 'border-radius');
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -79,14 +79,14 @@ $base-min-width: 4px;
|
|
|
79
79
|
&:focus-within,
|
|
80
80
|
&[data-focused] {
|
|
81
81
|
.arrowIcon {
|
|
82
|
-
color:
|
|
82
|
+
color: styles-tokens-element.$sys-neutral-text-support;
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
&[data-disabled],
|
|
87
87
|
&[data-readonly] {
|
|
88
88
|
.arrowIcon {
|
|
89
|
-
color:
|
|
89
|
+
color: styles-tokens-element.$sys-neutral-text-disabled;
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -125,7 +125,7 @@ $base-min-width: 4px;
|
|
|
125
125
|
.postfix {
|
|
126
126
|
display: inline-flex;
|
|
127
127
|
flex-shrink: 0;
|
|
128
|
-
gap:
|
|
128
|
+
gap: styles-tokens-element.$space-fields-postfix-gap;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
input.readonlyCursor {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
1
|
+
@use '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-fields';
|
|
2
|
+
@use '@snack-uikit/figma-tokens/build/scss/styles-theme-variables';
|
|
3
3
|
|
|
4
4
|
$sizes: 's', 'm', 'l';
|
|
5
5
|
|
|
@@ -14,7 +14,7 @@ $sizes: 's', 'm', 'l';
|
|
|
14
14
|
|
|
15
15
|
@each $size in $sizes {
|
|
16
16
|
&[data-size='#{$size}'] {
|
|
17
|
-
@include composite-var(
|
|
17
|
+
@include styles-theme-variables.composite-var(styles-tokens-fields.$fields, 'slider-wrap', $size);
|
|
18
18
|
|
|
19
19
|
height: inherit;
|
|
20
20
|
}
|
|
@@ -24,6 +24,6 @@ $sizes: 's', 'm', 'l';
|
|
|
24
24
|
|
|
25
25
|
.fieldContainer {
|
|
26
26
|
svg {
|
|
27
|
-
color: simple-var(
|
|
27
|
+
color: styles-theme-variables.simple-var(styles-theme-variables.$theme-variables, 'sys', 'neutral', 'text-disabled');
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-fields';
|
|
2
2
|
|
|
3
3
|
$sizes: 's', 'm', 'l';
|
|
4
4
|
$padding-right: (
|
|
5
|
-
's':
|
|
6
|
-
'm':
|
|
7
|
-
'l':
|
|
5
|
+
's': styles-tokens-fields.$fields-buttons-s,
|
|
6
|
+
'm': styles-tokens-fields.$fields-buttons-m,
|
|
7
|
+
'l': styles-tokens-fields.$fields-buttons-m,
|
|
8
8
|
);
|
|
9
9
|
$scroll-bar-heights: (
|
|
10
|
-
's':
|
|
11
|
-
'm': calc(
|
|
12
|
-
'l':
|
|
10
|
+
's': styles-tokens-fields.$dimension-050m,
|
|
11
|
+
'm': calc(styles-tokens-fields.$dimension-025m + styles-tokens-fields.$dimension-050m),
|
|
12
|
+
'l': styles-tokens-fields.$dimension-1m,
|
|
13
13
|
);
|
|
14
14
|
$padding-right: (
|
|
15
|
-
's':
|
|
16
|
-
'm':
|
|
17
|
-
'l':
|
|
15
|
+
's': styles-tokens-fields.$fields-buttons-s,
|
|
16
|
+
'm': styles-tokens-fields.$fields-buttons-m,
|
|
17
|
+
'l': styles-tokens-fields.$fields-buttons-m,
|
|
18
18
|
);
|
|
19
19
|
$scroll-bar-heights: (
|
|
20
|
-
's':
|
|
21
|
-
'm': calc(
|
|
22
|
-
'l':
|
|
20
|
+
's': styles-tokens-fields.$dimension-050m,
|
|
21
|
+
'm': calc(styles-tokens-fields.$dimension-025m + styles-tokens-fields.$dimension-050m),
|
|
22
|
+
'l': styles-tokens-fields.$dimension-1m,
|
|
23
23
|
);
|
|
24
24
|
|
|
25
25
|
.container {
|
|
@@ -37,18 +37,18 @@ $scroll-bar-heights: (
|
|
|
37
37
|
|
|
38
38
|
@each $size in $sizes {
|
|
39
39
|
&[data-size='#{$size}'] {
|
|
40
|
-
--row-height: #{simple-var(
|
|
41
|
-
--horizontal-scroll-bar-height: #{simple-var($scroll-bar-heights, $size)};
|
|
40
|
+
--row-height: #{styles-tokens-fields.simple-var(styles-tokens-fields.$theme-variables, 'sans', 'body', $size, 'line-height')};
|
|
41
|
+
--horizontal-scroll-bar-height: #{styles-tokens-fields.simple-var($scroll-bar-heights, $size)};
|
|
42
42
|
|
|
43
43
|
.textarea {
|
|
44
44
|
overflow: hidden;
|
|
45
|
-
padding-right: calc(simple-var($padding-right, $size, 'width') + simple-var(
|
|
45
|
+
padding-right: calc(styles-tokens-fields.simple-var($padding-right, $size, 'width') + styles-tokens-fields.simple-var(styles-tokens-fields.$fields-scroll-bar-width, 'width'));
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
.postfix {
|
|
49
49
|
position: absolute;
|
|
50
|
-
top: simple-var(
|
|
51
|
-
right: calc(simple-var(
|
|
50
|
+
top: styles-tokens-fields.simple-var(styles-tokens-fields.$fields, 'multi-line-container', $size, 'padding-top');
|
|
51
|
+
right: calc(styles-tokens-fields.simple-var(styles-tokens-fields.$fields, 'multi-line-container', $size, 'padding-right') + styles-tokens-fields.simple-var(styles-tokens-fields.$fields-scroll-bar-width, 'width'));
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
1
|
+
@use "@snack-uikit/figma-tokens/build/scss/components/styles-tokens-element";
|
|
2
|
+
@use "@snack-uikit/figma-tokens/build/scss/components/styles-tokens-fields";
|
|
3
3
|
|
|
4
4
|
$variants: 'before', 'after';
|
|
5
5
|
$sizes: 's', 'm', 'l';
|
|
@@ -13,7 +13,7 @@ $sizes: 's', 'm', 'l';
|
|
|
13
13
|
margin: 0;
|
|
14
14
|
padding: 0;
|
|
15
15
|
|
|
16
|
-
color:
|
|
16
|
+
color: styles-tokens-element.$sys-neutral-text-support;
|
|
17
17
|
|
|
18
18
|
background-color: transparent;
|
|
19
19
|
border: none;
|
|
@@ -22,7 +22,7 @@ $sizes: 's', 'm', 'l';
|
|
|
22
22
|
&[data-variant='#{$variant}'] {
|
|
23
23
|
@each $size in $sizes {
|
|
24
24
|
&[data-size='#{$size}'] {
|
|
25
|
-
@include composite-var(
|
|
25
|
+
@include styles-tokens-element.composite-var(styles-tokens-fields.$fields, 'button-field', $variant, $size);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -30,19 +30,19 @@ $sizes: 's', 'm', 'l';
|
|
|
30
30
|
|
|
31
31
|
&:hover {
|
|
32
32
|
cursor: pointer;
|
|
33
|
-
background: color-on-background-with-opacity(
|
|
33
|
+
background: styles-tokens-element.color-on-background-with-opacity(styles-tokens-element.$sys-neutral-accent-default, styles-tokens-element.$sys-neutral-background1-level, styles-tokens-element.$opacity-a008);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
&:focus-visible, &[data-arrow-open] {
|
|
37
|
-
@include outline-var(
|
|
37
|
+
@include styles-tokens-element.outline-var(styles-tokens-element.$container-focused-s);
|
|
38
38
|
|
|
39
|
-
background: color-on-background-with-opacity(
|
|
40
|
-
outline-color:
|
|
39
|
+
background: styles-tokens-element.color-on-background-with-opacity(styles-tokens-element.$sys-neutral-accent-default, styles-tokens-element.$sys-neutral-background1-level, styles-tokens-element.$opacity-a008);
|
|
40
|
+
outline-color: styles-tokens-element.$sys-primary-accent-default;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
&[data-disabled] {
|
|
44
44
|
cursor: not-allowed;
|
|
45
|
-
opacity:
|
|
45
|
+
opacity: styles-tokens-element.$opacity-a056;
|
|
46
46
|
background-color: transparent;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use "@snack-uikit/figma-tokens/build/scss/styles-theme-variables";
|
|
2
2
|
|
|
3
3
|
.triggerClassName {
|
|
4
|
-
--offset: #{
|
|
4
|
+
--offset: #{styles-theme-variables.$space-drop-list-drop-offset};
|
|
5
5
|
}
|
|
@@ -1,30 +1,28 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
3
|
-
|
|
4
|
-
/* stylelint-disable no-descending-specificity */
|
|
1
|
+
@use '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-fields';
|
|
2
|
+
@use '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-element';
|
|
5
3
|
|
|
6
4
|
$sizes: 's', 'm', 'l';
|
|
7
5
|
$variants: 'single-line-container', 'single-line-container-button-before', 'single-line-container-button-after', 'multi-line-container';
|
|
8
6
|
|
|
9
7
|
@mixin validationState($state, $rainbowColor, $bgDefault) {
|
|
10
8
|
&[data-validation='#{$state}'] {
|
|
11
|
-
background-color: simple-var(
|
|
12
|
-
border-color: simple-var(
|
|
9
|
+
background-color: styles-tokens-fields.simple-var(styles-tokens-fields.$theme-variables, 'sys', $bgDefault, 'background1-level');
|
|
10
|
+
border-color: styles-tokens-fields.simple-var(styles-tokens-fields.$theme-variables, 'sys', $bgDefault, 'decor-default');
|
|
13
11
|
|
|
14
12
|
&:hover {
|
|
15
|
-
background-color:
|
|
16
|
-
border-color: simple-var(
|
|
13
|
+
background-color: styles-tokens-fields.$sys-neutral-background2-level;
|
|
14
|
+
border-color: styles-tokens-fields.simple-var(styles-tokens-fields.$theme-variables, 'sys', $rainbowColor, 'decor-hovered');
|
|
17
15
|
}
|
|
18
16
|
|
|
19
17
|
&:not([data-readonly]):not([data-disable-focus]) {
|
|
20
18
|
&:focus-within,
|
|
21
19
|
&[data-focused] {
|
|
22
20
|
&:not([data-disabled]) {
|
|
23
|
-
@include outline-var(
|
|
21
|
+
@include styles-tokens-fields.outline-var(styles-tokens-element.$container-focused-m);
|
|
24
22
|
|
|
25
|
-
background-color: simple-var(
|
|
26
|
-
border-color: simple-var(
|
|
27
|
-
outline-color: simple-var(
|
|
23
|
+
background-color: styles-tokens-fields.simple-var(styles-tokens-fields.$sys-neutral-background2-level);
|
|
24
|
+
border-color: styles-tokens-fields.simple-var(styles-tokens-fields.$theme-variables, 'sys', $rainbowColor, 'accent-default');
|
|
25
|
+
outline-color: styles-tokens-fields.simple-var(styles-tokens-fields.$theme-variables, 'sys', $rainbowColor, 'decor-activated');
|
|
28
26
|
}
|
|
29
27
|
}
|
|
30
28
|
}
|
|
@@ -49,19 +47,19 @@ $variants: 'single-line-container', 'single-line-container-button-before', 'sing
|
|
|
49
47
|
|
|
50
48
|
@each $size in $sizes {
|
|
51
49
|
&[data-size='#{$size}'] {
|
|
52
|
-
@include composite-var(
|
|
50
|
+
@include styles-tokens-fields.composite-var(styles-tokens-fields.$fields, 'container', $size);
|
|
53
51
|
|
|
54
52
|
&,
|
|
55
53
|
input,
|
|
56
54
|
select,
|
|
57
55
|
textarea,
|
|
58
56
|
span {
|
|
59
|
-
@include composite-var(
|
|
57
|
+
@include styles-tokens-fields.composite-var(styles-tokens-fields.$theme-variables, 'sans', 'body', $size);
|
|
60
58
|
}
|
|
61
59
|
|
|
62
60
|
@each $variant in $variants {
|
|
63
61
|
&[data-variant='#{$variant}'] {
|
|
64
|
-
@include composite-var(
|
|
62
|
+
@include styles-tokens-fields.composite-var(styles-tokens-fields.$fields, $variant, $size);
|
|
65
63
|
}
|
|
66
64
|
}
|
|
67
65
|
}
|
|
@@ -88,17 +86,17 @@ $variants: 'single-line-container', 'single-line-container-button-before', 'sing
|
|
|
88
86
|
|
|
89
87
|
&,
|
|
90
88
|
&:hover {
|
|
91
|
-
background-color: simple-var(
|
|
92
|
-
border-color: simple-var(
|
|
89
|
+
background-color: styles-tokens-fields.simple-var(styles-tokens-fields.$sys-neutral-decor-disabled);
|
|
90
|
+
border-color: styles-tokens-fields.simple-var(styles-tokens-fields.$sys-neutral-decor-disabled);
|
|
93
91
|
}
|
|
94
92
|
|
|
95
93
|
&:not([data-disable-focus]) {
|
|
96
94
|
&:focus-within,
|
|
97
95
|
&[data-focused] {
|
|
98
|
-
@include outline-var(
|
|
96
|
+
@include styles-tokens-fields.outline-var(styles-tokens-element.$container-focused-m);
|
|
99
97
|
|
|
100
|
-
background-color: simple-var(
|
|
101
|
-
border-color: simple-var(
|
|
98
|
+
background-color: styles-tokens-fields.simple-var(styles-tokens-fields.$sys-neutral-decor-disabled);
|
|
99
|
+
border-color: styles-tokens-fields.simple-var(styles-tokens-fields.$sys-neutral-decor-disabled);
|
|
102
100
|
outline: none;
|
|
103
101
|
}
|
|
104
102
|
}
|
|
@@ -111,15 +109,15 @@ $variants: 'single-line-container', 'single-line-container-button-before', 'sing
|
|
|
111
109
|
textarea,
|
|
112
110
|
span {
|
|
113
111
|
cursor: not-allowed;
|
|
114
|
-
background-color: simple-var(
|
|
112
|
+
background-color: styles-tokens-fields.simple-var(styles-tokens-fields.$sys-neutral-background);
|
|
115
113
|
}
|
|
116
114
|
|
|
117
115
|
&,
|
|
118
116
|
&:focus-within,
|
|
119
117
|
&[data-focused],
|
|
120
118
|
&:hover {
|
|
121
|
-
background-color: simple-var(
|
|
122
|
-
border-color: simple-var(
|
|
119
|
+
background-color: styles-tokens-fields.simple-var(styles-tokens-fields.$sys-neutral-background);
|
|
120
|
+
border-color: styles-tokens-fields.simple-var(styles-tokens-fields.$sys-neutral-decor-disabled);
|
|
123
121
|
outline: none;
|
|
124
122
|
}
|
|
125
123
|
}
|
|
@@ -128,15 +126,15 @@ $variants: 'single-line-container', 'single-line-container-button-before', 'sing
|
|
|
128
126
|
.prefix {
|
|
129
127
|
display: inline-flex;
|
|
130
128
|
flex-shrink: 0;
|
|
131
|
-
gap:
|
|
129
|
+
gap: styles-tokens-fields.$space-fields-postfix-gap;
|
|
132
130
|
align-items: center;
|
|
133
131
|
|
|
134
|
-
color:
|
|
132
|
+
color: styles-tokens-fields.$sys-neutral-text-disabled;
|
|
135
133
|
}
|
|
136
134
|
|
|
137
135
|
.postfix {
|
|
138
136
|
display: inline-flex;
|
|
139
137
|
flex-shrink: 0;
|
|
140
|
-
gap:
|
|
138
|
+
gap: styles-tokens-fields.$space-fields-postfix-gap;
|
|
141
139
|
align-items: center;
|
|
142
140
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-element';
|
|
2
2
|
|
|
3
3
|
.textarea {
|
|
4
4
|
resize: none;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
margin: 0;
|
|
10
10
|
padding: 0;
|
|
11
11
|
|
|
12
|
-
color: simple-var(
|
|
12
|
+
color: styles-tokens-element.simple-var(styles-tokens-element.$sys-neutral-text-main);
|
|
13
13
|
|
|
14
14
|
background-color: transparent;
|
|
15
15
|
border: none;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
outline: 0;
|
|
18
18
|
|
|
19
19
|
&::placeholder {
|
|
20
|
-
color: simple-var(
|
|
20
|
+
color: styles-tokens-element.simple-var(styles-tokens-element.$sys-neutral-text-disabled);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
&::-webkit-scrollbar {
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
&:read-only {
|
|
29
|
-
color: simple-var(
|
|
29
|
+
color: styles-tokens-element.simple-var(styles-tokens-element.$sys-neutral-text-support);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
&[disabled] {
|
|
33
|
-
color: simple-var(
|
|
33
|
+
color: styles-tokens-element.simple-var(styles-tokens-element.$sys-neutral-text-disabled);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-fields';
|
|
2
2
|
|
|
3
3
|
.prefix {
|
|
4
|
-
color:
|
|
4
|
+
color: styles-tokens-fields.$sys-neutral-text-support;
|
|
5
5
|
|
|
6
6
|
&[data-disabled] {
|
|
7
|
-
opacity:
|
|
7
|
+
opacity: styles-tokens-fields.$opacity-a056;
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.postfix {
|
|
12
|
-
color:
|
|
12
|
+
color: styles-tokens-fields.$sys-neutral-text-support;
|
|
13
13
|
|
|
14
14
|
&[data-disabled] {
|
|
15
|
-
opacity:
|
|
15
|
+
opacity: styles-tokens-fields.$opacity-a056;
|
|
16
16
|
}
|
|
17
17
|
}
|
package/src/styles.module.scss
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
1
|
+
@use "@snack-uikit/figma-tokens/build/scss/components/styles-tokens-element";
|
|
2
|
+
@use "@snack-uikit/figma-tokens/build/scss/components/styles-tokens-fields";
|
|
3
3
|
|
|
4
4
|
$sizes: 's', 'm';
|
|
5
5
|
$icon-sizes: (
|
|
6
|
-
's':
|
|
7
|
-
'm':
|
|
6
|
+
's': styles-tokens-element.$icon-xs,
|
|
7
|
+
'm': styles-tokens-element.$icon-s
|
|
8
8
|
);
|
|
9
9
|
|
|
10
10
|
@mixin button-styles {
|
|
@@ -15,41 +15,41 @@ $icon-sizes: (
|
|
|
15
15
|
margin: 0;
|
|
16
16
|
padding: 0;
|
|
17
17
|
|
|
18
|
-
color:
|
|
18
|
+
color: styles-tokens-element.$sys-neutral-text-light;
|
|
19
19
|
|
|
20
20
|
background-color: transparent;
|
|
21
21
|
border: none;
|
|
22
22
|
|
|
23
23
|
@each $size in $sizes {
|
|
24
24
|
&[data-size='#{$size}'] {
|
|
25
|
-
@include composite-var(
|
|
25
|
+
@include styles-tokens-element.composite-var(styles-tokens-fields.$fields, 'buttons', $size);
|
|
26
26
|
|
|
27
27
|
svg {
|
|
28
|
-
width: simple-var($icon-sizes, $size) !important; /* stylelint-disable-line declaration-no-important */
|
|
29
|
-
height: simple-var($icon-sizes, $size) !important; /* stylelint-disable-line declaration-no-important */
|
|
28
|
+
width: styles-tokens-element.simple-var($icon-sizes, $size) !important; /* stylelint-disable-line declaration-no-important */
|
|
29
|
+
height: styles-tokens-element.simple-var($icon-sizes, $size) !important; /* stylelint-disable-line declaration-no-important */
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
&:hover {
|
|
35
35
|
cursor: pointer;
|
|
36
|
-
color:
|
|
36
|
+
color: styles-tokens-element.$sys-neutral-text-support;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
&:focus-visible {
|
|
40
|
-
@include outline-var(
|
|
40
|
+
@include styles-tokens-element.outline-var(styles-tokens-element.$container-focused-s);
|
|
41
41
|
|
|
42
|
-
color:
|
|
43
|
-
outline-color:
|
|
44
|
-
outline-offset:
|
|
42
|
+
color: styles-tokens-element.$sys-neutral-text-support;
|
|
43
|
+
outline-color: styles-tokens-element.$sys-available-complementary;
|
|
44
|
+
outline-offset: styles-tokens-element.$spacing-state-focus-offset;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
&:active {
|
|
48
|
-
color:
|
|
48
|
+
color: styles-tokens-element.$sys-neutral-text-main;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
&[data-disabled] {
|
|
52
52
|
cursor: not-allowed;
|
|
53
|
-
color:
|
|
53
|
+
color: styles-tokens-element.$sys-neutral-text-disabled;
|
|
54
54
|
}
|
|
55
55
|
}
|