@cloudscape-design/components-themeable 3.0.1391 → 3.0.1392
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/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/box/visual-accent.scss +0 -24
- package/lib/internal/scss/button/constants.scss +15 -0
- package/lib/internal/scss/button/styles.scss +21 -1
- package/lib/internal/scss/input/styles.scss +15 -29
- package/lib/internal/scss/internal/components/autosuggest-input/styles.scss +138 -0
- package/lib/internal/scss/internal/components/autosuggest-input/test-classes/styles.scss +19 -0
- package/lib/internal/scss/internal/components/button-trigger/styles.scss +20 -1
- package/lib/internal/scss/internal/components/control-group/styles.scss +39 -15
- package/lib/internal/scss/internal/components/control-group/test-classes/styles.scss +16 -0
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
- package/lib/internal/scss/internal/styles/forms/grouped-control.scss +65 -0
- package/lib/internal/scss/internal/styles/forms/index.scss +1 -0
- package/lib/internal/scss/internal/styles/forms/mixins.scss +41 -43
- package/lib/internal/scss/internal/styles/utils/mixins.scss +10 -0
- package/lib/internal/template/autosuggest/i18n-utils.d.ts +12 -0
- package/lib/internal/template/autosuggest/i18n-utils.d.ts.map +1 -0
- package/lib/internal/template/autosuggest/i18n-utils.js +15 -0
- package/lib/internal/template/autosuggest/i18n-utils.js.map +1 -0
- package/lib/internal/template/autosuggest/index.d.ts.map +1 -1
- package/lib/internal/template/autosuggest/index.js +3 -0
- package/lib/internal/template/autosuggest/index.js.map +1 -1
- package/lib/internal/template/autosuggest/interfaces.d.ts +94 -1
- package/lib/internal/template/autosuggest/interfaces.d.ts.map +1 -1
- package/lib/internal/template/autosuggest/interfaces.js.map +1 -1
- package/lib/internal/template/autosuggest/internal.d.ts.map +1 -1
- package/lib/internal/template/autosuggest/internal.js +21 -12
- package/lib/internal/template/autosuggest/internal.js.map +1 -1
- package/lib/internal/template/autosuggest/options-controller.d.ts +2 -1
- package/lib/internal/template/autosuggest/options-controller.d.ts.map +1 -1
- package/lib/internal/template/autosuggest/options-controller.js +3 -6
- package/lib/internal/template/autosuggest/options-controller.js.map +1 -1
- package/lib/internal/template/box/interfaces.d.ts +4 -1
- package/lib/internal/template/box/interfaces.d.ts.map +1 -1
- package/lib/internal/template/box/interfaces.js.map +1 -1
- package/lib/internal/template/box/styles.css.js +214 -220
- package/lib/internal/template/box/styles.scoped.css +259 -289
- package/lib/internal/template/box/styles.selectors.js +214 -220
- package/lib/internal/template/button/internal.d.ts +2 -2
- package/lib/internal/template/button/internal.d.ts.map +1 -1
- package/lib/internal/template/button/internal.js +9 -1
- package/lib/internal/template/button/internal.js.map +1 -1
- package/lib/internal/template/button/styles.css.js +24 -23
- package/lib/internal/template/button/styles.scoped.css +116 -70
- package/lib/internal/template/button/styles.selectors.js +24 -23
- package/lib/internal/template/button-dropdown/filter.d.ts +1 -1
- package/lib/internal/template/button-dropdown/filter.d.ts.map +1 -1
- package/lib/internal/template/i18n/messages/all.all.js +1 -1
- package/lib/internal/template/i18n/messages/all.all.json +1 -1
- package/lib/internal/template/i18n/messages/all.de.js +1 -1
- package/lib/internal/template/i18n/messages/all.de.json +1 -1
- package/lib/internal/template/i18n/messages/all.en-GB.js +1 -1
- package/lib/internal/template/i18n/messages/all.en-GB.json +1 -1
- package/lib/internal/template/i18n/messages/all.en.js +1 -1
- package/lib/internal/template/i18n/messages/all.en.json +1 -1
- package/lib/internal/template/i18n/messages/all.es.js +1 -1
- package/lib/internal/template/i18n/messages/all.es.json +1 -1
- package/lib/internal/template/i18n/messages/all.fr.js +1 -1
- package/lib/internal/template/i18n/messages/all.fr.json +1 -1
- package/lib/internal/template/i18n/messages/all.id.js +1 -1
- package/lib/internal/template/i18n/messages/all.id.json +1 -1
- package/lib/internal/template/i18n/messages/all.it.js +1 -1
- package/lib/internal/template/i18n/messages/all.it.json +1 -1
- package/lib/internal/template/i18n/messages/all.ja.js +1 -1
- package/lib/internal/template/i18n/messages/all.ja.json +1 -1
- package/lib/internal/template/i18n/messages/all.ko.js +1 -1
- package/lib/internal/template/i18n/messages/all.ko.json +1 -1
- package/lib/internal/template/i18n/messages/all.pt-BR.js +1 -1
- package/lib/internal/template/i18n/messages/all.pt-BR.json +1 -1
- package/lib/internal/template/i18n/messages/all.tr.js +1 -1
- package/lib/internal/template/i18n/messages/all.tr.json +1 -1
- package/lib/internal/template/i18n/messages/all.zh-CN.js +1 -1
- package/lib/internal/template/i18n/messages/all.zh-CN.json +1 -1
- package/lib/internal/template/i18n/messages/all.zh-TW.js +1 -1
- package/lib/internal/template/i18n/messages/all.zh-TW.json +1 -1
- package/lib/internal/template/i18n/messages-types.d.ts +13 -0
- package/lib/internal/template/i18n/messages-types.d.ts.map +1 -1
- package/lib/internal/template/i18n/messages-types.js.map +1 -1
- package/lib/internal/template/input/internal.d.ts +1 -0
- package/lib/internal/template/input/internal.d.ts.map +1 -1
- package/lib/internal/template/input/internal.js +2 -2
- package/lib/internal/template/input/internal.js.map +1 -1
- package/lib/internal/template/input/styles.css.js +38 -36
- package/lib/internal/template/input/styles.scoped.css +89 -76
- package/lib/internal/template/input/styles.selectors.js +38 -36
- package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
- package/lib/internal/template/internal/base-theme/styles.scoped.css +0 -61
- package/lib/internal/template/internal/components/autosuggest-input/index.d.ts +5 -0
- package/lib/internal/template/internal/components/autosuggest-input/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/autosuggest-input/index.js +154 -11
- package/lib/internal/template/internal/components/autosuggest-input/index.js.map +1 -1
- package/lib/internal/template/internal/components/autosuggest-input/inline-tokens.d.ts +21 -0
- package/lib/internal/template/internal/components/autosuggest-input/inline-tokens.d.ts.map +1 -0
- package/lib/internal/template/internal/components/autosuggest-input/inline-tokens.js +95 -0
- package/lib/internal/template/internal/components/autosuggest-input/inline-tokens.js.map +1 -0
- package/lib/internal/template/internal/components/autosuggest-input/overflow-dropdown.d.ts +16 -0
- package/lib/internal/template/internal/components/autosuggest-input/overflow-dropdown.d.ts.map +1 -0
- package/lib/internal/template/internal/components/autosuggest-input/overflow-dropdown.js +94 -0
- package/lib/internal/template/internal/components/autosuggest-input/overflow-dropdown.js.map +1 -0
- package/lib/internal/template/internal/components/autosuggest-input/styles.css.js +27 -2
- package/lib/internal/template/internal/components/autosuggest-input/styles.scoped.css +195 -2
- package/lib/internal/template/internal/components/autosuggest-input/styles.selectors.js +27 -2
- package/lib/internal/template/internal/components/autosuggest-input/test-classes/styles.css.js +9 -0
- package/lib/internal/template/internal/components/autosuggest-input/test-classes/styles.scoped.css +19 -0
- package/lib/internal/template/internal/components/autosuggest-input/test-classes/styles.selectors.js +10 -0
- package/lib/internal/template/internal/components/autosuggest-input/use-token-overflow.d.ts +21 -0
- package/lib/internal/template/internal/components/autosuggest-input/use-token-overflow.d.ts.map +1 -0
- package/lib/internal/template/internal/components/autosuggest-input/use-token-overflow.js +63 -0
- package/lib/internal/template/internal/components/autosuggest-input/use-token-overflow.js.map +1 -0
- package/lib/internal/template/internal/components/button-trigger/index.d.ts +4 -1
- package/lib/internal/template/internal/components/button-trigger/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/button-trigger/index.js +5 -3
- package/lib/internal/template/internal/components/button-trigger/index.js.map +1 -1
- package/lib/internal/template/internal/components/button-trigger/styles.css.js +23 -21
- package/lib/internal/template/internal/components/button-trigger/styles.scoped.css +79 -36
- package/lib/internal/template/internal/components/button-trigger/styles.selectors.js +23 -21
- package/lib/internal/template/internal/components/control-group/grouped-control-styles.d.ts +1 -1
- package/lib/internal/template/internal/components/control-group/grouped-control-styles.d.ts.map +1 -1
- package/lib/internal/template/internal/components/control-group/grouped-control-styles.js +3 -2
- package/lib/internal/template/internal/components/control-group/grouped-control-styles.js.map +1 -1
- package/lib/internal/template/internal/components/control-group/index.d.ts +3 -9
- package/lib/internal/template/internal/components/control-group/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/control-group/index.js +16 -10
- package/lib/internal/template/internal/components/control-group/index.js.map +1 -1
- package/lib/internal/template/internal/components/control-group/interfaces.d.ts +43 -0
- package/lib/internal/template/internal/components/control-group/interfaces.d.ts.map +1 -0
- package/lib/internal/template/internal/components/control-group/interfaces.js +2 -0
- package/lib/internal/template/internal/components/control-group/interfaces.js.map +1 -0
- package/lib/internal/template/internal/components/control-group/styles.css.js +16 -11
- package/lib/internal/template/internal/components/control-group/styles.scoped.css +34 -14
- package/lib/internal/template/internal/components/control-group/styles.selectors.js +16 -11
- package/lib/internal/template/internal/components/control-group/test-classes/styles.css.js +8 -0
- package/lib/internal/template/internal/components/control-group/test-classes/styles.scoped.css +15 -0
- package/lib/internal/template/internal/components/control-group/test-classes/styles.selectors.js +9 -0
- package/lib/internal/template/internal/context/control-group-context.d.ts +5 -0
- package/lib/internal/template/internal/context/control-group-context.d.ts.map +1 -1
- package/lib/internal/template/internal/context/control-group-context.js +1 -0
- package/lib/internal/template/internal/context/control-group-context.js.map +1 -1
- package/lib/internal/template/internal/environment.js +2 -2
- package/lib/internal/template/internal/environment.json +2 -2
- package/lib/internal/template/segmented-control/styles.css.js +27 -26
- package/lib/internal/template/segmented-control/styles.scoped.css +51 -47
- package/lib/internal/template/segmented-control/styles.selectors.js +27 -26
- package/lib/internal/template/select/parts/filter.d.ts +1 -1
- package/lib/internal/template/select/parts/filter.d.ts.map +1 -1
- package/lib/internal/template/test-utils/dom/autosuggest/index.d.ts +39 -0
- package/lib/internal/template/test-utils/dom/autosuggest/index.js +68 -16
- package/lib/internal/template/test-utils/dom/autosuggest/index.js.map +1 -1
- package/lib/internal/template/test-utils/dom/internal/control-group.d.ts +5 -0
- package/lib/internal/template/test-utils/dom/internal/control-group.js +9 -2
- package/lib/internal/template/test-utils/dom/internal/control-group.js.map +1 -1
- package/lib/internal/template/test-utils/selectors/autosuggest/index.d.ts +53 -0
- package/lib/internal/template/test-utils/selectors/autosuggest/index.js +84 -16
- package/lib/internal/template/test-utils/selectors/autosuggest/index.js.map +1 -1
- package/lib/internal/template/test-utils/selectors/internal/control-group.d.ts +5 -0
- package/lib/internal/template/test-utils/selectors/internal/control-group.js +9 -2
- package/lib/internal/template/test-utils/selectors/internal/control-group.js.map +1 -1
- package/lib/internal/template/token/dismiss-button.d.ts.map +1 -1
- package/lib/internal/template/token/dismiss-button.js +6 -3
- package/lib/internal/template/token/dismiss-button.js.map +1 -1
- package/package.json +1 -1
|
@@ -109,10 +109,6 @@ $accent-colors: (
|
|
|
109
109
|
background: awsui.$color-background-visual-accent-purple,
|
|
110
110
|
foreground: awsui.$color-text-visual-accent-purple,
|
|
111
111
|
),
|
|
112
|
-
'lime': (
|
|
113
|
-
background: awsui.$color-background-visual-accent-lime,
|
|
114
|
-
foreground: awsui.$color-text-visual-accent-lime,
|
|
115
|
-
),
|
|
116
112
|
'grey': (
|
|
117
113
|
background: awsui.$color-background-visual-accent-grey,
|
|
118
114
|
foreground: awsui.$color-text-visual-accent-grey,
|
|
@@ -121,26 +117,6 @@ $accent-colors: (
|
|
|
121
117
|
background: awsui.$color-background-visual-accent-teal,
|
|
122
118
|
foreground: awsui.$color-text-visual-accent-teal,
|
|
123
119
|
),
|
|
124
|
-
'blue': (
|
|
125
|
-
background: awsui.$color-background-visual-accent-blue,
|
|
126
|
-
foreground: awsui.$color-text-visual-accent-blue,
|
|
127
|
-
),
|
|
128
|
-
'violet': (
|
|
129
|
-
background: awsui.$color-background-visual-accent-violet,
|
|
130
|
-
foreground: awsui.$color-text-visual-accent-violet,
|
|
131
|
-
),
|
|
132
|
-
'magenta': (
|
|
133
|
-
background: awsui.$color-background-visual-accent-magenta,
|
|
134
|
-
foreground: awsui.$color-text-visual-accent-magenta,
|
|
135
|
-
),
|
|
136
|
-
'pink': (
|
|
137
|
-
background: awsui.$color-background-visual-accent-pink,
|
|
138
|
-
foreground: awsui.$color-text-visual-accent-pink,
|
|
139
|
-
),
|
|
140
|
-
'amber': (
|
|
141
|
-
background: awsui.$color-background-visual-accent-amber,
|
|
142
|
-
foreground: awsui.$color-text-visual-accent-amber,
|
|
143
|
-
),
|
|
144
120
|
);
|
|
145
121
|
|
|
146
122
|
@each $accent, $colors in $accent-colors {
|
|
@@ -62,6 +62,21 @@ $variants: (
|
|
|
62
62
|
'disabled-border-color': transparent,
|
|
63
63
|
'disabled-color': awsui.$color-text-button-icon-disabled,
|
|
64
64
|
),
|
|
65
|
+
'control-group-action': (
|
|
66
|
+
'default-background': transparent,
|
|
67
|
+
'default-border-color': awsui.$color-border-input-default,
|
|
68
|
+
'default-color': awsui.$color-text-interactive-default,
|
|
69
|
+
'hover-background': transparent,
|
|
70
|
+
'hover-border-color': awsui.$color-border-input-default,
|
|
71
|
+
'hover-color': awsui.$color-text-button-icon-hover,
|
|
72
|
+
'active-background': transparent,
|
|
73
|
+
'active-border-color': awsui.$color-border-input-default,
|
|
74
|
+
'active-color': awsui.$color-text-interactive-default,
|
|
75
|
+
'disabled-background': transparent,
|
|
76
|
+
'disabled-border-color': awsui.$color-border-input-default,
|
|
77
|
+
'disabled-color': awsui.$color-text-button-icon-disabled,
|
|
78
|
+
'border-width': awsui.$border-width-field,
|
|
79
|
+
),
|
|
65
80
|
'inline-icon': (
|
|
66
81
|
'default-background': transparent,
|
|
67
82
|
'default-border-color': transparent,
|
|
@@ -129,7 +129,10 @@ $tokens: style-api.resolve($props, carrier);
|
|
|
129
129
|
$radius: var(#{custom-props.$styleFocusRingBorderRadius}, awsui.$border-radius-control-default-focus-ring);
|
|
130
130
|
$width: var(#{custom-props.$styleFocusRingBorderWidth}, foundation.$box-shadow-focused-width);
|
|
131
131
|
$color: var(#{custom-props.$styleFocusRingBorderColor}, awsui.$color-border-item-focused);
|
|
132
|
-
|
|
132
|
+
|
|
133
|
+
&:not(.variant-control-group-action) {
|
|
134
|
+
@include style-api.focus-highlight($radius: $radius, $width: $width, $color: $color);
|
|
135
|
+
}
|
|
133
136
|
|
|
134
137
|
&.variant-icon,
|
|
135
138
|
&.variant-modal-dismiss,
|
|
@@ -152,6 +155,13 @@ $tokens: style-api.resolve($props, carrier);
|
|
|
152
155
|
$color: $color
|
|
153
156
|
);
|
|
154
157
|
}
|
|
158
|
+
|
|
159
|
+
&.variant-control-group-action {
|
|
160
|
+
@include styles.form-focus-element(
|
|
161
|
+
$border-color: $color,
|
|
162
|
+
$box-shadow: var(#{custom-props.$styleBoxShadowFocus}, foundation.$box-shadow-focused-light)
|
|
163
|
+
);
|
|
164
|
+
}
|
|
155
165
|
}
|
|
156
166
|
|
|
157
167
|
&.button-no-text {
|
|
@@ -201,6 +211,16 @@ $tokens: style-api.resolve($props, carrier);
|
|
|
201
211
|
border-inline-width: 0;
|
|
202
212
|
}
|
|
203
213
|
|
|
214
|
+
&.variant-control-group-action {
|
|
215
|
+
border-block-style: solid;
|
|
216
|
+
border-inline-style: solid;
|
|
217
|
+
@include styles.grouped-control-base;
|
|
218
|
+
@include styles.grouped-control-horizontal-last;
|
|
219
|
+
padding-block: awsui.$space-field-vertical;
|
|
220
|
+
padding-inline: awsui.$space-xs;
|
|
221
|
+
min-block-size: awsui.$size-vertical-input;
|
|
222
|
+
}
|
|
223
|
+
|
|
204
224
|
> .icon-left {
|
|
205
225
|
position: relative;
|
|
206
226
|
// margin-left was breaking layout on firefox
|
|
@@ -29,44 +29,19 @@
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
%input-default-styles {
|
|
32
|
-
|
|
33
|
-
border-block: awsui.$border-width-field solid
|
|
34
|
-
var(#{custom-props.$styleBorderColorDefault}, awsui.$color-border-input-default);
|
|
35
|
-
border-inline: awsui.$border-width-field solid
|
|
36
|
-
var(#{custom-props.$styleBorderColorDefault}, awsui.$color-border-input-default);
|
|
37
|
-
box-shadow: var(#{custom-props.$styleBoxShadowDefault});
|
|
32
|
+
@include styles.input-default-styles;
|
|
38
33
|
}
|
|
39
34
|
|
|
40
35
|
%input-hover-styles {
|
|
41
|
-
|
|
42
|
-
#{custom-props.$styleBorderColorHover},
|
|
43
|
-
var(#{custom-props.$styleBorderColorDefault}, awsui.$color-border-input-default)
|
|
44
|
-
);
|
|
45
|
-
background-color: var(
|
|
46
|
-
#{custom-props.$styleBackgroundHover},
|
|
47
|
-
var(#{custom-props.$styleBackgroundDefault}, awsui.$color-background-input-default)
|
|
48
|
-
);
|
|
49
|
-
box-shadow: var(#{custom-props.$styleBoxShadowHover}, #{custom-props.$styleBoxShadowDefault});
|
|
36
|
+
@include styles.input-hover-styles;
|
|
50
37
|
}
|
|
51
38
|
|
|
52
39
|
%input-readonly-styles {
|
|
53
|
-
@include styles.
|
|
54
|
-
$background-color: var(
|
|
55
|
-
#{custom-props.$styleBackgroundReadonly},
|
|
56
|
-
var(#{custom-props.$styleBackgroundDefault}, awsui.$color-background-input-default)
|
|
57
|
-
),
|
|
58
|
-
$border-color: var(
|
|
59
|
-
#{custom-props.$styleBorderColorReadonly},
|
|
60
|
-
var(#{custom-props.$styleBorderColorDefault}, awsui.$color-border-input-disabled)
|
|
61
|
-
)
|
|
62
|
-
);
|
|
40
|
+
@include styles.input-readonly-styles;
|
|
63
41
|
}
|
|
64
42
|
|
|
65
43
|
%input-focus-styles {
|
|
66
|
-
@include styles.
|
|
67
|
-
$border-color: var(#{custom-props.$styleBorderColorFocus}, awsui.$color-border-input-focused),
|
|
68
|
-
$box-shadow: var(#{custom-props.$styleBoxShadowFocus}, foundation.$box-shadow-focused-light)
|
|
69
|
-
);
|
|
44
|
+
@include styles.input-focus-styles;
|
|
70
45
|
}
|
|
71
46
|
|
|
72
47
|
.root {
|
|
@@ -196,6 +171,17 @@
|
|
|
196
171
|
border-end-start-radius: awsui.$border-radius-dropdown;
|
|
197
172
|
border-end-end-radius: awsui.$border-radius-dropdown;
|
|
198
173
|
}
|
|
174
|
+
&.input-has-no-border {
|
|
175
|
+
min-block-size: unset;
|
|
176
|
+
&,
|
|
177
|
+
&:focus,
|
|
178
|
+
&:hover {
|
|
179
|
+
border-block-width: 0;
|
|
180
|
+
border-inline-width: 0;
|
|
181
|
+
box-shadow: none;
|
|
182
|
+
background-color: transparent;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
199
185
|
}
|
|
200
186
|
|
|
201
187
|
.grouped {
|
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
@use '../../../internal/styles/tokens' as awsui;
|
|
7
|
+
@use '../../../internal/styles' as styles;
|
|
8
|
+
@use '../../../internal/styles/foundation' as foundation;
|
|
9
|
+
@use '../../../internal/generated/custom-css-properties/index.scss' as custom-props;
|
|
10
|
+
|
|
6
11
|
.root {
|
|
7
12
|
// Used in test-utils.
|
|
8
13
|
}
|
|
@@ -15,3 +20,136 @@
|
|
|
15
20
|
.dropdown-content {
|
|
16
21
|
display: contents;
|
|
17
22
|
}
|
|
23
|
+
|
|
24
|
+
.token-field-container {
|
|
25
|
+
position: relative;
|
|
26
|
+
inline-size: 100%;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.token-field {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
flex-wrap: nowrap;
|
|
33
|
+
inline-size: 100%;
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
min-block-size: awsui.$size-vertical-input;
|
|
36
|
+
padding-inline-start: styles.$control-padding-horizontal;
|
|
37
|
+
padding-inline-end: 0;
|
|
38
|
+
column-gap: awsui.$space-xxs;
|
|
39
|
+
@include styles.logical-radius(styles.$control-border-radius);
|
|
40
|
+
@include styles.input-default-styles;
|
|
41
|
+
|
|
42
|
+
&:hover {
|
|
43
|
+
@include styles.input-hover-styles;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&:focus-within {
|
|
47
|
+
background-color: var(#{custom-props.$styleBackgroundFocus}, awsui.$color-background-input-default);
|
|
48
|
+
@include styles.input-focus-styles;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&.token-field-disabled {
|
|
52
|
+
@include styles.form-disabled-element(
|
|
53
|
+
$background-color: var(#{custom-props.$styleBackgroundDisabled}, awsui.$color-background-input-disabled),
|
|
54
|
+
$border-color: var(#{custom-props.$styleBorderColorDisabled}, awsui.$color-border-input-disabled),
|
|
55
|
+
$color: var(#{custom-props.$styleColorDisabled}, awsui.$color-text-input-disabled),
|
|
56
|
+
$cursor: default
|
|
57
|
+
);
|
|
58
|
+
box-shadow: var(#{custom-props.$styleBoxShadowDisabled});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&.token-field-readonly {
|
|
62
|
+
box-shadow: var(#{custom-props.$styleBoxShadowReadonly});
|
|
63
|
+
@include styles.input-readonly-styles;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&.token-field-invalid {
|
|
67
|
+
@include styles.form-invalid-control(
|
|
68
|
+
$color: var(#{custom-props.$styleColorDefault}, awsui.$color-text-status-error),
|
|
69
|
+
$border-color: var(#{custom-props.$styleBorderColorDefault}, awsui.$color-text-status-error),
|
|
70
|
+
$focus-box-shadow: var(#{custom-props.$styleBoxShadowFocus}, foundation.$box-shadow-focused-light-invalid)
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
&:focus-within {
|
|
74
|
+
box-shadow: var(#{custom-props.$styleBoxShadowFocus}, foundation.$box-shadow-focused-light-invalid);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&.token-field-warning {
|
|
79
|
+
@include styles.form-warning-control(
|
|
80
|
+
$color: var(#{custom-props.$styleColorDefault}, awsui.$color-text-status-warning),
|
|
81
|
+
$border-color: var(#{custom-props.$styleBorderColorDefault}, awsui.$color-text-status-warning),
|
|
82
|
+
$focus-box-shadow: var(#{custom-props.$styleBoxShadowFocus}, foundation.$box-shadow-focused-light-invalid)
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
&:focus-within {
|
|
86
|
+
box-shadow: var(#{custom-props.$styleBoxShadowFocus}, foundation.$box-shadow-focused-light-invalid);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&.grouped {
|
|
91
|
+
@include styles.grouped-control;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.token-field-icon {
|
|
96
|
+
display: flex;
|
|
97
|
+
align-items: center;
|
|
98
|
+
flex-shrink: 0;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.token-list {
|
|
102
|
+
@include styles.styles-reset-ul;
|
|
103
|
+
display: flex;
|
|
104
|
+
flex-wrap: nowrap;
|
|
105
|
+
align-items: center;
|
|
106
|
+
column-gap: awsui.$space-xxs;
|
|
107
|
+
flex-shrink: 1;
|
|
108
|
+
min-inline-size: 0;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.inline-tokens {
|
|
112
|
+
display: contents;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.token-list-item {
|
|
116
|
+
display: contents;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.token-input-wrapper {
|
|
120
|
+
flex: 1 1 0;
|
|
121
|
+
min-inline-size: 20%;
|
|
122
|
+
overflow: hidden;
|
|
123
|
+
margin-inline-start: calc(-1 * #{awsui.$space-xxs});
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.token-overflow {
|
|
127
|
+
flex-shrink: 0;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.token-overflow-trigger {
|
|
131
|
+
flex-shrink: 0;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.overflow-dropdown {
|
|
135
|
+
@include styles.styles-reset-ul;
|
|
136
|
+
padding-block: awsui.$space-xxs;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.overflow-dropdown-item {
|
|
140
|
+
display: flex;
|
|
141
|
+
padding-block: awsui.$space-xxs;
|
|
142
|
+
padding-inline: awsui.$space-xs;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.measurement-container {
|
|
146
|
+
@include styles.measurement-ghost;
|
|
147
|
+
display: flex;
|
|
148
|
+
flex-wrap: nowrap;
|
|
149
|
+
column-gap: awsui.$space-xxs;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.measurement-token {
|
|
153
|
+
display: inline-flex;
|
|
154
|
+
flex-shrink: 0;
|
|
155
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
.token-list {
|
|
6
|
+
/* used in test-utils */
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.token-list-item {
|
|
10
|
+
/* used in test-utils */
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.token-overflow-trigger {
|
|
14
|
+
/* used in test-utils */
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.overflow-dropdown {
|
|
18
|
+
/* used in test-utils */
|
|
19
|
+
}
|
|
@@ -127,7 +127,7 @@ $icon-offset: awsui.$space-xxxs;
|
|
|
127
127
|
text-decoration: none;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
&:not(.in-filtering-token) {
|
|
130
|
+
&:not(.in-filtering-token):not(.compact) {
|
|
131
131
|
@include focus-visible.when-visible {
|
|
132
132
|
@include styles.form-focus-element();
|
|
133
133
|
}
|
|
@@ -160,6 +160,25 @@ $icon-offset: awsui.$space-xxxs;
|
|
|
160
160
|
padding-block: 0;
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
+
&.compact {
|
|
164
|
+
@include styles.font-body-s;
|
|
165
|
+
column-gap: awsui.$space-xxs;
|
|
166
|
+
block-size: token.$token-max-height-inline;
|
|
167
|
+
min-block-size: unset;
|
|
168
|
+
padding-block: 0;
|
|
169
|
+
padding-inline: awsui.$space-xs;
|
|
170
|
+
white-space: nowrap;
|
|
171
|
+
@include styles.logical-radius(awsui.$border-radius-token-inline);
|
|
172
|
+
|
|
173
|
+
> .arrow {
|
|
174
|
+
position: static;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
@include focus-visible.when-visible {
|
|
178
|
+
@include styles.focus-highlight(0px);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
163
182
|
&.grouped {
|
|
164
183
|
@include styles.grouped-control;
|
|
165
184
|
}
|
|
@@ -7,23 +7,45 @@
|
|
|
7
7
|
@use '../../styles/tokens' as awsui;
|
|
8
8
|
@use '../../styles/forms/mixins' as forms;
|
|
9
9
|
|
|
10
|
+
$margin-overlap: calc(-1 * #{awsui.$border-width-field});
|
|
11
|
+
|
|
10
12
|
.root {
|
|
11
13
|
@include styles.styles-reset;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.action-slot {
|
|
17
|
+
display: flex;
|
|
18
|
+
margin-inline-start: $margin-overlap;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.group-layout {
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: row;
|
|
24
|
+
|
|
25
|
+
&-horizontal {
|
|
26
|
+
align-items: flex-end;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&-vertical {
|
|
30
|
+
&,
|
|
31
|
+
& > .action-slot {
|
|
32
|
+
// The action spans the full column height.
|
|
33
|
+
align-items: stretch;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.controls {
|
|
12
39
|
display: flex;
|
|
40
|
+
align-items: stretch;
|
|
13
41
|
|
|
14
42
|
&-horizontal {
|
|
15
43
|
flex-direction: row;
|
|
16
44
|
flex-wrap: nowrap;
|
|
17
|
-
// Align controls along their bottom edge so their field boxes line up
|
|
18
|
-
// even when one control is taller than another.
|
|
19
|
-
align-items: flex-end;
|
|
20
45
|
}
|
|
21
46
|
|
|
22
47
|
&-vertical {
|
|
23
48
|
flex-direction: column;
|
|
24
|
-
// Stretch stacked controls to share the group's inline size so their
|
|
25
|
-
// fused block edges line up across the full width.
|
|
26
|
-
align-items: stretch;
|
|
27
49
|
}
|
|
28
50
|
}
|
|
29
51
|
|
|
@@ -33,26 +55,28 @@
|
|
|
33
55
|
// Establish a stacking context per slot so a control's internal z-indexes stay
|
|
34
56
|
// contained within its own slot and cannot paint over adjacent controls.
|
|
35
57
|
isolation: isolate;
|
|
36
|
-
// Raise the focused control's slot above its neighbors so its focus ring is
|
|
37
|
-
// painted over the adjacent control's seam border.
|
|
38
|
-
&:focus-within {
|
|
39
|
-
z-index: 1;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
58
|
&-middle,
|
|
43
59
|
&-last {
|
|
44
60
|
// Overlap each non-first slot onto its predecessor by one border width,
|
|
45
61
|
// so the two adjacent borders coincide into a single seam.
|
|
46
|
-
$margin: calc(-1 * #{awsui.$border-width-field});
|
|
47
62
|
&-horizontal {
|
|
48
|
-
margin-inline-start: $margin;
|
|
63
|
+
margin-inline-start: $margin-overlap;
|
|
49
64
|
}
|
|
50
65
|
&-vertical {
|
|
51
|
-
margin-block-start: $margin;
|
|
66
|
+
margin-block-start: $margin-overlap;
|
|
52
67
|
}
|
|
53
68
|
}
|
|
54
69
|
}
|
|
55
70
|
|
|
71
|
+
.action-slot,
|
|
72
|
+
.control {
|
|
73
|
+
// Raise the focused control's slot above its neighbors so its focus ring is
|
|
74
|
+
// painted over the adjacent control's seam border.
|
|
75
|
+
&:focus-within {
|
|
76
|
+
z-index: 1;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
56
80
|
.inline-label {
|
|
57
81
|
@include forms.inline-label;
|
|
58
82
|
// A grouped Multiselect always renders inline tokens, whose row sits higher
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
.root {
|
|
7
|
+
/* used in test-utils */
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.action-button {
|
|
11
|
+
/* used in test-utils */
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.inline-label {
|
|
15
|
+
/* used in test-utils */
|
|
16
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
@use '../tokens' as awsui;
|
|
5
|
+
@use '../utils' as styles;
|
|
6
|
+
@use './constants' as constants;
|
|
7
|
+
|
|
8
|
+
$grouped-control-border-radius: constants.$control-border-radius;
|
|
9
|
+
|
|
10
|
+
@mixin grouped-control-base {
|
|
11
|
+
@include styles.logical-radius($grouped-control-border-radius);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@mixin grouped-control-horizontal-first {
|
|
15
|
+
border-start-end-radius: 0;
|
|
16
|
+
border-end-end-radius: 0;
|
|
17
|
+
}
|
|
18
|
+
@mixin grouped-control-horizontal-last {
|
|
19
|
+
border-start-start-radius: 0;
|
|
20
|
+
border-end-start-radius: 0;
|
|
21
|
+
}
|
|
22
|
+
@mixin grouped-control-vertical-first {
|
|
23
|
+
border-end-start-radius: 0;
|
|
24
|
+
border-end-end-radius: 0;
|
|
25
|
+
}
|
|
26
|
+
@mixin grouped-control-vertical-last {
|
|
27
|
+
border-start-start-radius: 0;
|
|
28
|
+
border-start-end-radius: 0;
|
|
29
|
+
}
|
|
30
|
+
@mixin grouped-control-middle {
|
|
31
|
+
@include styles.logical-radius(0);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@mixin grouped-control {
|
|
35
|
+
@include grouped-control-base;
|
|
36
|
+
|
|
37
|
+
&-horizontal {
|
|
38
|
+
&-first {
|
|
39
|
+
@include grouped-control-horizontal-first;
|
|
40
|
+
}
|
|
41
|
+
&-middle {
|
|
42
|
+
@include grouped-control-middle;
|
|
43
|
+
}
|
|
44
|
+
&-last {
|
|
45
|
+
@include grouped-control-horizontal-last;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&-vertical {
|
|
50
|
+
&-first {
|
|
51
|
+
@include grouped-control-vertical-first;
|
|
52
|
+
}
|
|
53
|
+
&-middle {
|
|
54
|
+
@include grouped-control-middle;
|
|
55
|
+
}
|
|
56
|
+
&-last {
|
|
57
|
+
@include grouped-control-vertical-last;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&-with-action {
|
|
62
|
+
border-start-end-radius: 0;
|
|
63
|
+
border-end-end-radius: 0;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -221,6 +221,47 @@
|
|
|
221
221
|
@content;
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
+
@mixin input-default-styles {
|
|
225
|
+
background-color: var(#{custom-props.$styleBackgroundDefault}, awsui.$color-background-input-default);
|
|
226
|
+
border-block: awsui.$border-width-field solid
|
|
227
|
+
var(#{custom-props.$styleBorderColorDefault}, awsui.$color-border-input-default);
|
|
228
|
+
border-inline: awsui.$border-width-field solid
|
|
229
|
+
var(#{custom-props.$styleBorderColorDefault}, awsui.$color-border-input-default);
|
|
230
|
+
box-shadow: var(#{custom-props.$styleBoxShadowDefault});
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
@mixin input-hover-styles {
|
|
234
|
+
border-color: var(
|
|
235
|
+
#{custom-props.$styleBorderColorHover},
|
|
236
|
+
var(#{custom-props.$styleBorderColorDefault}, awsui.$color-border-input-default)
|
|
237
|
+
);
|
|
238
|
+
background-color: var(
|
|
239
|
+
#{custom-props.$styleBackgroundHover},
|
|
240
|
+
var(#{custom-props.$styleBackgroundDefault}, awsui.$color-background-input-default)
|
|
241
|
+
);
|
|
242
|
+
box-shadow: var(#{custom-props.$styleBoxShadowHover}, #{custom-props.$styleBoxShadowDefault});
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
@mixin input-readonly-styles {
|
|
246
|
+
@include form-readonly-element(
|
|
247
|
+
$background-color: var(
|
|
248
|
+
#{custom-props.$styleBackgroundReadonly},
|
|
249
|
+
var(#{custom-props.$styleBackgroundDefault}, awsui.$color-background-input-default)
|
|
250
|
+
),
|
|
251
|
+
$border-color: var(
|
|
252
|
+
#{custom-props.$styleBorderColorReadonly},
|
|
253
|
+
var(#{custom-props.$styleBorderColorDefault}, awsui.$color-border-input-disabled)
|
|
254
|
+
)
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
@mixin input-focus-styles {
|
|
259
|
+
@include form-focus-element(
|
|
260
|
+
$border-color: var(#{custom-props.$styleBorderColorFocus}, awsui.$color-border-input-focused),
|
|
261
|
+
$box-shadow: var(#{custom-props.$styleBoxShadowFocus}, foundation.$box-shadow-focused-light)
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
|
|
224
265
|
@mixin label-info-link {
|
|
225
266
|
margin-inline-start: typography.$base-size;
|
|
226
267
|
}
|
|
@@ -366,46 +407,3 @@ $inline-label-border-radius: 2px;
|
|
|
366
407
|
awsui.$color-background-input-disabled
|
|
367
408
|
);
|
|
368
409
|
}
|
|
369
|
-
|
|
370
|
-
@mixin grouped-control {
|
|
371
|
-
$radius: constants.$control-border-radius;
|
|
372
|
-
|
|
373
|
-
border-start-start-radius: $radius;
|
|
374
|
-
border-start-end-radius: $radius;
|
|
375
|
-
border-end-start-radius: $radius;
|
|
376
|
-
border-end-end-radius: $radius;
|
|
377
|
-
|
|
378
|
-
&-horizontal {
|
|
379
|
-
&-first {
|
|
380
|
-
border-start-end-radius: 0;
|
|
381
|
-
border-end-end-radius: 0;
|
|
382
|
-
}
|
|
383
|
-
&-middle {
|
|
384
|
-
border-start-start-radius: 0;
|
|
385
|
-
border-start-end-radius: 0;
|
|
386
|
-
border-end-start-radius: 0;
|
|
387
|
-
border-end-end-radius: 0;
|
|
388
|
-
}
|
|
389
|
-
&-last {
|
|
390
|
-
border-start-start-radius: 0;
|
|
391
|
-
border-end-start-radius: 0;
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
&-vertical {
|
|
396
|
-
&-first {
|
|
397
|
-
border-end-start-radius: 0;
|
|
398
|
-
border-end-end-radius: 0;
|
|
399
|
-
}
|
|
400
|
-
&-middle {
|
|
401
|
-
border-start-start-radius: 0;
|
|
402
|
-
border-start-end-radius: 0;
|
|
403
|
-
border-end-start-radius: 0;
|
|
404
|
-
border-end-end-radius: 0;
|
|
405
|
-
}
|
|
406
|
-
&-last {
|
|
407
|
-
border-start-start-radius: 0;
|
|
408
|
-
border-start-end-radius: 0;
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
}
|
|
@@ -10,6 +10,16 @@
|
|
|
10
10
|
inset-inline-start: -9999px !important;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
@mixin measurement-ghost {
|
|
14
|
+
position: absolute;
|
|
15
|
+
inset-block-start: 0;
|
|
16
|
+
inset-inline-start: 0;
|
|
17
|
+
block-size: 0;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
visibility: hidden;
|
|
20
|
+
pointer-events: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
13
23
|
@mixin text-wrapping {
|
|
14
24
|
// When using with Flexbox, a flex item has min-width set to "auto" by default, which
|
|
15
25
|
// prevents the text wrapping. We need to override the min-width by setting it to "0"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AutosuggestProps } from './interfaces';
|
|
2
|
+
interface AutosuggestTokenI18n {
|
|
3
|
+
tokenOverflowAriaLabel?: (hiddenCount: number) => string;
|
|
4
|
+
tokenInsertedAriaLabel?: (value: string) => string;
|
|
5
|
+
tokenDismissLabel?: (value: string) => string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Resolves token-mode strings: `i18nStrings` prop first, then the I18nProvider catalog.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useAutosuggestTokenI18n(i18nStrings?: AutosuggestProps.I18nStrings): AutosuggestTokenI18n;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=i18n-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n-utils.d.ts","sourceRoot":"","sources":["../../../src/autosuggest/i18n-utils.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,UAAU,oBAAoB;IAC5B,sBAAsB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM,CAAC;IACzD,sBAAsB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACnD,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CAC/C;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,CAAC,EAAE,gBAAgB,CAAC,WAAW,GAAG,oBAAoB,CAmBxG"}
|