@cloudscape-design/components 3.0.1001 → 3.0.1003
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/alert/styles.scoped.css +2 -4
- package/anchor-navigation/styles.scoped.css +1 -2
- package/annotation-context/annotation/styles.scoped.css +1 -2
- package/app-layout/visual-refresh/styles.scoped.css +2 -4
- package/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +1 -2
- package/app-layout/visual-refresh-toolbar/toolbar/styles.scoped.css +1 -2
- package/attribute-editor/styles.scoped.css +1 -2
- package/badge/styles.scoped.css +1 -2
- package/breadcrumb-group/styles.scoped.css +2 -4
- package/button/styles.scoped.css +1 -2
- package/button-dropdown/mobile-expandable-group/styles.scoped.css +1 -2
- package/button-group/styles.scoped.css +1 -2
- package/calendar/styles.scoped.css +1 -2
- package/cards/styles.scoped.css +1 -2
- package/checkbox/styles.scoped.css +1 -2
- package/code-editor/styles.scoped.css +1 -2
- package/collection-preferences/content-display/styles.scoped.css +1 -2
- package/collection-preferences/styles.scoped.css +1 -2
- package/column-layout/styles.scoped.css +1 -2
- package/container/index.js +13 -30
- package/container/interfaces.d.ts +5 -0
- package/container/interfaces.d.ts.map +1 -1
- package/container/interfaces.js.map +1 -1
- package/container/internal-do-not-use-core.js +35 -0
- package/container/internal.d.ts +2 -2
- package/container/internal.d.ts.map +1 -1
- package/container/internal.js +2 -2
- package/container/internal.js.map +1 -1
- package/container/styles.scoped.css +1 -2
- package/date-picker/styles.scoped.css +1 -2
- package/date-range-picker/styles.scoped.css +1 -2
- package/drawer/styles.scoped.css +1 -2
- package/expandable-section/styles.scoped.css +1 -2
- package/file-token-group/styles.scoped.css +1 -2
- package/flashbar/styles.scoped.css +1 -2
- package/form/styles.scoped.css +1 -2
- package/form-field/styles.scoped.css +1 -2
- package/grid/styles.scoped.css +1 -2
- package/header/styles.scoped.css +1 -2
- package/help-panel/styles.scoped.css +1 -2
- package/input/styles.scoped.css +1 -2
- package/internal/base-component/styles.scoped.css +1 -1
- package/internal/components/button-trigger/styles.scoped.css +1 -2
- package/internal/components/chart-filter/styles.scoped.css +1 -2
- package/internal/components/chart-legend/styles.scoped.css +1 -2
- package/internal/components/chart-popover/styles.scoped.css +1 -2
- package/internal/components/chart-series-details/styles.scoped.css +3 -6
- package/internal/components/chart-series-marker/styles.scoped.css +1 -2
- package/internal/components/chart-wrapper/styles.scoped.css +1 -2
- package/internal/components/dropdown/styles.scoped.css +1 -2
- package/internal/components/dropdown-footer/styles.scoped.css +1 -2
- package/internal/components/dropdown-status/styles.scoped.css +1 -2
- package/internal/components/menu-dropdown/styles.scoped.css +1 -2
- package/internal/components/option/styles.scoped.css +1 -2
- package/internal/components/options-list/styles.scoped.css +1 -2
- package/internal/components/options-list/utils/use-highlight-option.d.ts +1 -0
- package/internal/components/options-list/utils/use-highlight-option.d.ts.map +1 -1
- package/internal/components/options-list/utils/use-highlight-option.js +1 -0
- package/internal/components/options-list/utils/use-highlight-option.js.map +1 -1
- package/internal/components/token-list/styles.scoped.css +1 -2
- package/internal/environment.js +2 -2
- package/internal/environment.json +2 -2
- package/internal/manifest.json +1 -1
- package/key-value-pairs/styles.scoped.css +2 -4
- package/link/styles.scoped.css +1 -2
- package/modal/styles.scoped.css +2 -4
- package/multiselect/styles.scoped.css +2 -4
- package/package.json +1 -1
- package/pagination/styles.scoped.css +1 -2
- package/popover/styles.scoped.css +3 -6
- package/progress-bar/styles.scoped.css +1 -2
- package/prompt-input/styles.scoped.css +4 -8
- package/property-filter/filtering-token/styles.scoped.css +1 -2
- package/property-filter/styles.scoped.css +2 -4
- package/radio-group/styles.scoped.css +1 -2
- package/segmented-control/styles.scoped.css +1 -2
- package/select/styles.scoped.css +1 -2
- package/select/utils/use-select.d.ts.map +1 -1
- package/select/utils/use-select.js +17 -4
- package/select/utils/use-select.js.map +1 -1
- package/side-navigation/styles.scoped.css +1 -2
- package/slider/styles.scoped.css +1 -2
- package/split-panel/styles.scoped.css +1 -2
- package/steps/styles.scoped.css +1 -2
- package/table/expandable-rows/styles.scoped.css +1 -2
- package/table/internal.js +1 -1
- package/table/internal.js.map +1 -1
- package/table/resizer/styles.scoped.css +1 -2
- package/tabs/styles.scoped.css +1 -2
- package/text-content/styles.scoped.css +1 -2
- package/text-filter/styles.scoped.css +1 -2
- package/textarea/styles.scoped.css +1 -2
- package/tiles/styles.scoped.css +2 -4
- package/toggle/styles.scoped.css +1 -2
- package/token-group/styles.scoped.css +1 -2
- package/top-navigation/1.0-beta/styles.scoped.css +1 -2
- package/top-navigation/styles.scoped.css +3 -6
- package/tutorial-panel/components/tutorial-detail-view/styles.scoped.css +1 -2
- package/tutorial-panel/components/tutorial-list/styles.scoped.css +3 -6
- package/tutorial-panel/styles.scoped.css +1 -2
- package/wizard/styles.scoped.css +1 -2
- /package/container/{index.js.map → internal-do-not-use-core.js.map} +0 -0
|
@@ -190,8 +190,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
190
190
|
font-style: normal;
|
|
191
191
|
font-variant: normal;
|
|
192
192
|
font-stretch: normal;
|
|
193
|
-
|
|
194
|
-
hyphens: none;
|
|
193
|
+
hyphens: none;
|
|
195
194
|
letter-spacing: normal;
|
|
196
195
|
list-style: disc outside none;
|
|
197
196
|
tab-size: 8;
|
package/input/styles.scoped.css
CHANGED
|
@@ -158,8 +158,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
158
158
|
font-style: normal;
|
|
159
159
|
font-variant: normal;
|
|
160
160
|
font-stretch: normal;
|
|
161
|
-
|
|
162
|
-
hyphens: none;
|
|
161
|
+
hyphens: none;
|
|
163
162
|
letter-spacing: normal;
|
|
164
163
|
list-style: disc outside none;
|
|
165
164
|
tab-size: 8;
|
|
@@ -184,8 +184,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
184
184
|
font-style: normal;
|
|
185
185
|
font-variant: normal;
|
|
186
186
|
font-stretch: normal;
|
|
187
|
-
|
|
188
|
-
hyphens: none;
|
|
187
|
+
hyphens: none;
|
|
189
188
|
letter-spacing: normal;
|
|
190
189
|
list-style: disc outside none;
|
|
191
190
|
tab-size: 8;
|
|
@@ -154,8 +154,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
154
154
|
font-style: normal;
|
|
155
155
|
font-variant: normal;
|
|
156
156
|
font-stretch: normal;
|
|
157
|
-
|
|
158
|
-
hyphens: none;
|
|
157
|
+
hyphens: none;
|
|
159
158
|
letter-spacing: normal;
|
|
160
159
|
list-style: disc outside none;
|
|
161
160
|
tab-size: 8;
|
|
@@ -176,8 +176,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
176
176
|
font-style: normal;
|
|
177
177
|
font-variant: normal;
|
|
178
178
|
font-stretch: normal;
|
|
179
|
-
|
|
180
|
-
hyphens: none;
|
|
179
|
+
hyphens: none;
|
|
181
180
|
letter-spacing: normal;
|
|
182
181
|
list-style: disc outside none;
|
|
183
182
|
tab-size: 8;
|
|
@@ -154,8 +154,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
154
154
|
font-style: normal;
|
|
155
155
|
font-variant: normal;
|
|
156
156
|
font-stretch: normal;
|
|
157
|
-
|
|
158
|
-
hyphens: none;
|
|
157
|
+
hyphens: none;
|
|
159
158
|
letter-spacing: normal;
|
|
160
159
|
list-style: disc outside none;
|
|
161
160
|
tab-size: 8;
|
|
@@ -162,8 +162,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
162
162
|
font-style: normal;
|
|
163
163
|
font-variant: normal;
|
|
164
164
|
font-stretch: normal;
|
|
165
|
-
|
|
166
|
-
hyphens: none;
|
|
165
|
+
hyphens: none;
|
|
167
166
|
letter-spacing: normal;
|
|
168
167
|
list-style: disc outside none;
|
|
169
168
|
tab-size: 8;
|
|
@@ -215,8 +214,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
215
214
|
font-style: normal;
|
|
216
215
|
font-variant: normal;
|
|
217
216
|
font-stretch: normal;
|
|
218
|
-
|
|
219
|
-
hyphens: none;
|
|
217
|
+
hyphens: none;
|
|
220
218
|
letter-spacing: normal;
|
|
221
219
|
list-style: disc outside none;
|
|
222
220
|
tab-size: 8;
|
|
@@ -302,8 +300,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
302
300
|
font-style: normal;
|
|
303
301
|
font-variant: normal;
|
|
304
302
|
font-stretch: normal;
|
|
305
|
-
|
|
306
|
-
hyphens: none;
|
|
303
|
+
hyphens: none;
|
|
307
304
|
letter-spacing: normal;
|
|
308
305
|
list-style: disc outside none;
|
|
309
306
|
tab-size: 8;
|
|
@@ -154,8 +154,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
154
154
|
font-style: normal;
|
|
155
155
|
font-variant: normal;
|
|
156
156
|
font-stretch: normal;
|
|
157
|
-
|
|
158
|
-
hyphens: none;
|
|
157
|
+
hyphens: none;
|
|
159
158
|
letter-spacing: normal;
|
|
160
159
|
list-style: disc outside none;
|
|
161
160
|
tab-size: 8;
|
|
@@ -190,8 +190,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
190
190
|
font-style: normal;
|
|
191
191
|
font-variant: normal;
|
|
192
192
|
font-stretch: normal;
|
|
193
|
-
|
|
194
|
-
hyphens: none;
|
|
193
|
+
hyphens: none;
|
|
195
194
|
letter-spacing: normal;
|
|
196
195
|
list-style: disc outside none;
|
|
197
196
|
tab-size: 8;
|
|
@@ -208,8 +208,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
208
208
|
font-style: normal;
|
|
209
209
|
font-variant: normal;
|
|
210
210
|
font-stretch: normal;
|
|
211
|
-
|
|
212
|
-
hyphens: none;
|
|
211
|
+
hyphens: none;
|
|
213
212
|
letter-spacing: normal;
|
|
214
213
|
list-style: disc outside none;
|
|
215
214
|
tab-size: 8;
|
|
@@ -154,8 +154,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
154
154
|
font-style: normal;
|
|
155
155
|
font-variant: normal;
|
|
156
156
|
font-stretch: normal;
|
|
157
|
-
|
|
158
|
-
hyphens: none;
|
|
157
|
+
hyphens: none;
|
|
159
158
|
letter-spacing: normal;
|
|
160
159
|
list-style: disc outside none;
|
|
161
160
|
tab-size: 8;
|
|
@@ -154,8 +154,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
154
154
|
font-style: normal;
|
|
155
155
|
font-variant: normal;
|
|
156
156
|
font-stretch: normal;
|
|
157
|
-
|
|
158
|
-
hyphens: none;
|
|
157
|
+
hyphens: none;
|
|
159
158
|
letter-spacing: normal;
|
|
160
159
|
list-style: disc outside none;
|
|
161
160
|
tab-size: 8;
|
|
@@ -154,8 +154,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
154
154
|
font-style: normal;
|
|
155
155
|
font-variant: normal;
|
|
156
156
|
font-stretch: normal;
|
|
157
|
-
|
|
158
|
-
hyphens: none;
|
|
157
|
+
hyphens: none;
|
|
159
158
|
letter-spacing: normal;
|
|
160
159
|
list-style: disc outside none;
|
|
161
160
|
tab-size: 8;
|
|
@@ -162,8 +162,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
162
162
|
font-style: normal;
|
|
163
163
|
font-variant: normal;
|
|
164
164
|
font-stretch: normal;
|
|
165
|
-
|
|
166
|
-
hyphens: none;
|
|
165
|
+
hyphens: none;
|
|
167
166
|
letter-spacing: normal;
|
|
168
167
|
list-style: disc outside none;
|
|
169
168
|
tab-size: 8;
|
|
@@ -161,8 +161,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
161
161
|
font-style: normal;
|
|
162
162
|
font-variant: normal;
|
|
163
163
|
font-stretch: normal;
|
|
164
|
-
|
|
165
|
-
hyphens: none;
|
|
164
|
+
hyphens: none;
|
|
166
165
|
letter-spacing: normal;
|
|
167
166
|
list-style: disc outside none;
|
|
168
167
|
tab-size: 8;
|
|
@@ -14,6 +14,7 @@ export interface HighlightedOptionState<OptionType> {
|
|
|
14
14
|
}
|
|
15
15
|
export interface HighlightedOptionHandlers<OptionType> {
|
|
16
16
|
setHighlightedIndexWithMouse(index: number, moveFocus?: boolean): void;
|
|
17
|
+
highlightFirstOptionWithMouse(): void;
|
|
17
18
|
moveHighlightWithKeyboard(direction: -1 | 1): void;
|
|
18
19
|
highlightOptionWithKeyboard(option: OptionType): void;
|
|
19
20
|
resetHighlightWithKeyboard(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-highlight-option.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/components/options-list/utils/use-highlight-option.ts"],"names":[],"mappings":"AAIA,qBAAa,aAAa;IAEf,IAAI,EAAE,UAAU,GAAG,OAAO;IAC1B,SAAS,EAAE,OAAO;gBADlB,IAAI,EAAE,UAAU,GAAG,OAAO,EAC1B,SAAS,GAAE,OAA6B;CAElD;AAED,UAAU,sBAAsB,CAAC,UAAU;IACzC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAC;IAC/B,eAAe,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC;CAClD;AAED,MAAM,WAAW,sBAAsB,CAAC,UAAU;IAChD,aAAa,EAAE,aAAa,CAAC;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,UAAU,CAAC;CAChC;AAED,MAAM,WAAW,yBAAyB,CAAC,UAAU;IAEnD,4BAA4B,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"use-highlight-option.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/components/options-list/utils/use-highlight-option.ts"],"names":[],"mappings":"AAIA,qBAAa,aAAa;IAEf,IAAI,EAAE,UAAU,GAAG,OAAO;IAC1B,SAAS,EAAE,OAAO;gBADlB,IAAI,EAAE,UAAU,GAAG,OAAO,EAC1B,SAAS,GAAE,OAA6B;CAElD;AAED,UAAU,sBAAsB,CAAC,UAAU;IACzC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAC;IAC/B,eAAe,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC;CAClD;AAED,MAAM,WAAW,sBAAsB,CAAC,UAAU;IAChD,aAAa,EAAE,aAAa,CAAC;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,UAAU,CAAC;CAChC;AAED,MAAM,WAAW,yBAAyB,CAAC,UAAU;IAEnD,4BAA4B,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACvE,6BAA6B,IAAI,IAAI,CAAC;IAEtC,yBAAyB,CAAC,SAAS,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IACnD,2BAA2B,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IACtD,0BAA0B,IAAI,IAAI,CAAC;IACnC,kBAAkB,IAAI,IAAI,CAAC;IAC3B,iBAAiB,IAAI,IAAI,CAAC;CAC3B;AAED,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,EAC/C,OAAO,EACP,eAAe,GAChB,EAAE,sBAAsB,CAAC,UAAU,CAAC,GAAG,CAAC,sBAAsB,CAAC,UAAU,CAAC,EAAE,yBAAyB,CAAC,UAAU,CAAC,CAAC,CA+ClH"}
|
|
@@ -34,6 +34,7 @@ export function useHighlightedOption({ options, isHighlightable, }) {
|
|
|
34
34
|
{ highlightType, highlightedIndex, highlightedOption },
|
|
35
35
|
{
|
|
36
36
|
setHighlightedIndexWithMouse: (index, moveFocus = false) => setHighlightedIndex(index, new HighlightType('mouse', moveFocus)),
|
|
37
|
+
highlightFirstOptionWithMouse: () => moveHighlightFrom(1, -1, new HighlightType('mouse', true)),
|
|
37
38
|
moveHighlightWithKeyboard: (direction) => moveHighlight(direction, new HighlightType('keyboard')),
|
|
38
39
|
highlightOptionWithKeyboard: (option) => highlightOption(option, new HighlightType('keyboard')),
|
|
39
40
|
resetHighlightWithKeyboard: () => setHighlightedIndex(-1, new HighlightType('keyboard')),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-highlight-option.js","sourceRoot":"","sources":["../../../../../../src/internal/components/options-list/utils/use-highlight-option.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE9C,MAAM,OAAO,aAAa;IACxB,YACS,IAA0B,EAC1B,YAAqB,IAAI,KAAK,UAAU;QADxC,SAAI,GAAJ,IAAI,CAAsB;QAC1B,cAAS,GAAT,SAAS,CAA+B;IAC9C,CAAC;CACL;
|
|
1
|
+
{"version":3,"file":"use-highlight-option.js","sourceRoot":"","sources":["../../../../../../src/internal/components/options-list/utils/use-highlight-option.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE9C,MAAM,OAAO,aAAa;IACxB,YACS,IAA0B,EAC1B,YAAqB,IAAI,KAAK,UAAU;QADxC,SAAI,GAAJ,IAAI,CAAsB;QAC1B,cAAS,GAAT,SAAS,CAA+B;IAC9C,CAAC;CACL;AAyBD,MAAM,UAAU,oBAAoB,CAAa,EAC/C,OAAO,EACP,eAAe,GACoB;IACnC,M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C,CAAC,EAAE,OAAO,CAAC,MAAM,EAAE,IAAI,aAAa,CAAC,UAAU,CAAC,CAAC;SAC9F;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { useCallback, useState } from 'react';\n\nexport class HighlightType {\n constructor(\n public type: 'keyboard' | 'mouse',\n public moveFocus: boolean = type === 'keyboard'\n ) {}\n}\n\ninterface HighlightedOptionProps<OptionType> {\n options: readonly OptionType[];\n isHighlightable: (option: OptionType) => boolean;\n}\n\nexport interface HighlightedOptionState<OptionType> {\n highlightType: HighlightType;\n highlightedIndex: number;\n highlightedOption?: OptionType;\n}\n\nexport interface HighlightedOptionHandlers<OptionType> {\n // Mouse handlers\n setHighlightedIndexWithMouse(index: number, moveFocus?: boolean): void;\n highlightFirstOptionWithMouse(): void;\n // Keyboard handlers\n moveHighlightWithKeyboard(direction: -1 | 1): void;\n highlightOptionWithKeyboard(option: OptionType): void;\n resetHighlightWithKeyboard(): void;\n goHomeWithKeyboard(): void;\n goEndWithKeyboard(): void;\n}\n\nexport function useHighlightedOption<OptionType>({\n options,\n isHighlightable,\n}: HighlightedOptionProps<OptionType>): [HighlightedOptionState<OptionType>, HighlightedOptionHandlers<OptionType>] {\n const [highlightedIndex, setHighlightedIndexState] = useState(-1);\n const [highlightType, setHighlightType] = useState<HighlightType>(new HighlightType('keyboard'));\n const setHighlightedIndex = useCallback((index: number, newHighlightType: HighlightType) => {\n setHighlightedIndexState(index);\n setHighlightType(oldHighlight => (oldHighlight.type !== newHighlightType.type ? newHighlightType : oldHighlight));\n }, []);\n\n const highlightedOption =\n options[highlightedIndex] && isHighlightable(options[highlightedIndex]) ? options[highlightedIndex] : undefined;\n\n const moveHighlightFrom = (direction: -1 | 1, startIndex = highlightedIndex, highlightType: HighlightType) => {\n const fromBottomEnd = startIndex === -1 && direction === -1;\n let newIndex = fromBottomEnd ? options.length : startIndex;\n do {\n newIndex += direction;\n } while (options[newIndex] && !isHighlightable(options[newIndex]));\n\n if (options[newIndex]) {\n setHighlightedIndex(newIndex, highlightType);\n }\n };\n\n const moveHighlight = (direction: -1 | 1, highlightType: HighlightType) =>\n moveHighlightFrom(direction, highlightedIndex, highlightType);\n\n const highlightOption = useCallback(\n (option: OptionType, highlightType: HighlightType) => {\n const index = options.indexOf(option);\n setHighlightedIndex(index, highlightType);\n },\n [options, setHighlightedIndex]\n );\n\n return [\n { highlightType, highlightedIndex, highlightedOption },\n {\n setHighlightedIndexWithMouse: (index: number, moveFocus = false) =>\n setHighlightedIndex(index, new HighlightType('mouse', moveFocus)),\n highlightFirstOptionWithMouse: () => moveHighlightFrom(1, -1, new HighlightType('mouse', true)),\n moveHighlightWithKeyboard: (direction: -1 | 1) => moveHighlight(direction, new HighlightType('keyboard')),\n highlightOptionWithKeyboard: (option: OptionType) => highlightOption(option, new HighlightType('keyboard')),\n resetHighlightWithKeyboard: () => setHighlightedIndex(-1, new HighlightType('keyboard')),\n goHomeWithKeyboard: () => moveHighlightFrom(1, -1, new HighlightType('keyboard')),\n goEndWithKeyboard: () => moveHighlightFrom(-1, options.length, new HighlightType('keyboard')),\n },\n ];\n}\n"]}
|
|
@@ -260,8 +260,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
260
260
|
font-style: normal;
|
|
261
261
|
font-variant: normal;
|
|
262
262
|
font-stretch: normal;
|
|
263
|
-
|
|
264
|
-
hyphens: none;
|
|
263
|
+
hyphens: none;
|
|
265
264
|
letter-spacing: normal;
|
|
266
265
|
list-style: disc outside none;
|
|
267
266
|
tab-size: 8;
|
package/internal/environment.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export var PACKAGE_SOURCE = "components";
|
|
2
|
-
export var PACKAGE_VERSION = "3.0.0 (
|
|
3
|
-
export var GIT_SHA = "
|
|
2
|
+
export var PACKAGE_VERSION = "3.0.0 (a98874e5)";
|
|
3
|
+
export var GIT_SHA = "a98874e5";
|
|
4
4
|
export var THEME = "open-source-visual-refresh";
|
|
5
5
|
export var ALWAYS_VISUAL_REFRESH = true;
|
package/internal/manifest.json
CHANGED
|
@@ -154,8 +154,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
154
154
|
font-style: normal;
|
|
155
155
|
font-variant: normal;
|
|
156
156
|
font-stretch: normal;
|
|
157
|
-
|
|
158
|
-
hyphens: none;
|
|
157
|
+
hyphens: none;
|
|
159
158
|
letter-spacing: normal;
|
|
160
159
|
list-style: disc outside none;
|
|
161
160
|
tab-size: 8;
|
|
@@ -222,8 +221,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
222
221
|
font-style: normal;
|
|
223
222
|
font-variant: normal;
|
|
224
223
|
font-stretch: normal;
|
|
225
|
-
|
|
226
|
-
hyphens: none;
|
|
224
|
+
hyphens: none;
|
|
227
225
|
letter-spacing: normal;
|
|
228
226
|
list-style: disc outside none;
|
|
229
227
|
tab-size: 8;
|
package/link/styles.scoped.css
CHANGED
|
@@ -154,8 +154,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
154
154
|
font-style: normal;
|
|
155
155
|
font-variant: normal;
|
|
156
156
|
font-stretch: normal;
|
|
157
|
-
|
|
158
|
-
hyphens: none;
|
|
157
|
+
hyphens: none;
|
|
159
158
|
letter-spacing: normal;
|
|
160
159
|
list-style: disc outside none;
|
|
161
160
|
tab-size: 8;
|
package/modal/styles.scoped.css
CHANGED
|
@@ -270,8 +270,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
270
270
|
font-style: normal;
|
|
271
271
|
font-variant: normal;
|
|
272
272
|
font-stretch: normal;
|
|
273
|
-
|
|
274
|
-
hyphens: none;
|
|
273
|
+
hyphens: none;
|
|
275
274
|
letter-spacing: normal;
|
|
276
275
|
list-style: disc outside none;
|
|
277
276
|
tab-size: 8;
|
|
@@ -351,8 +350,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
351
350
|
font-style: normal;
|
|
352
351
|
font-variant: normal;
|
|
353
352
|
font-stretch: normal;
|
|
354
|
-
|
|
355
|
-
hyphens: none;
|
|
353
|
+
hyphens: none;
|
|
356
354
|
letter-spacing: normal;
|
|
357
355
|
list-style: disc outside none;
|
|
358
356
|
tab-size: 8;
|
|
@@ -154,8 +154,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
154
154
|
font-style: normal;
|
|
155
155
|
font-variant: normal;
|
|
156
156
|
font-stretch: normal;
|
|
157
|
-
|
|
158
|
-
hyphens: none;
|
|
157
|
+
hyphens: none;
|
|
159
158
|
letter-spacing: normal;
|
|
160
159
|
list-style: disc outside none;
|
|
161
160
|
tab-size: 8;
|
|
@@ -187,8 +186,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
187
186
|
font-style: normal;
|
|
188
187
|
font-variant: normal;
|
|
189
188
|
font-stretch: normal;
|
|
190
|
-
|
|
191
|
-
hyphens: none;
|
|
189
|
+
hyphens: none;
|
|
192
190
|
letter-spacing: normal;
|
|
193
191
|
list-style: disc outside none;
|
|
194
192
|
tab-size: 8;
|
package/package.json
CHANGED
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
"./internal/base-component/index.js",
|
|
150
150
|
"./internal/base-component/styles.css.js"
|
|
151
151
|
],
|
|
152
|
-
"version": "3.0.
|
|
152
|
+
"version": "3.0.1003",
|
|
153
153
|
"repository": {
|
|
154
154
|
"type": "git",
|
|
155
155
|
"url": "https://github.com/cloudscape-design/components.git"
|
|
@@ -154,8 +154,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
154
154
|
font-style: normal;
|
|
155
155
|
font-variant: normal;
|
|
156
156
|
font-stretch: normal;
|
|
157
|
-
|
|
158
|
-
hyphens: none;
|
|
157
|
+
hyphens: none;
|
|
159
158
|
letter-spacing: normal;
|
|
160
159
|
list-style: disc outside none;
|
|
161
160
|
tab-size: 8;
|
|
@@ -501,8 +501,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
501
501
|
font-style: normal;
|
|
502
502
|
font-variant: normal;
|
|
503
503
|
font-stretch: normal;
|
|
504
|
-
|
|
505
|
-
hyphens: none;
|
|
504
|
+
hyphens: none;
|
|
506
505
|
letter-spacing: normal;
|
|
507
506
|
list-style: disc outside none;
|
|
508
507
|
tab-size: 8;
|
|
@@ -776,8 +775,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
776
775
|
font-style: normal;
|
|
777
776
|
font-variant: normal;
|
|
778
777
|
font-stretch: normal;
|
|
779
|
-
|
|
780
|
-
hyphens: none;
|
|
778
|
+
hyphens: none;
|
|
781
779
|
letter-spacing: normal;
|
|
782
780
|
list-style: disc outside none;
|
|
783
781
|
tab-size: 8;
|
|
@@ -1102,8 +1100,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
1102
1100
|
font-style: normal;
|
|
1103
1101
|
font-variant: normal;
|
|
1104
1102
|
font-stretch: normal;
|
|
1105
|
-
|
|
1106
|
-
hyphens: none;
|
|
1103
|
+
hyphens: none;
|
|
1107
1104
|
letter-spacing: normal;
|
|
1108
1105
|
list-style: disc outside none;
|
|
1109
1106
|
tab-size: 8;
|
|
@@ -409,8 +409,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
409
409
|
font-style: normal;
|
|
410
410
|
font-variant: normal;
|
|
411
411
|
font-stretch: normal;
|
|
412
|
-
|
|
413
|
-
hyphens: none;
|
|
412
|
+
hyphens: none;
|
|
414
413
|
letter-spacing: normal;
|
|
415
414
|
list-style: disc outside none;
|
|
416
415
|
tab-size: 8;
|
|
@@ -155,8 +155,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
155
155
|
font-style: normal;
|
|
156
156
|
font-variant: normal;
|
|
157
157
|
font-stretch: normal;
|
|
158
|
-
|
|
159
|
-
hyphens: none;
|
|
158
|
+
hyphens: none;
|
|
160
159
|
letter-spacing: normal;
|
|
161
160
|
list-style: disc outside none;
|
|
162
161
|
tab-size: 8;
|
|
@@ -269,8 +268,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
269
268
|
font-style: normal;
|
|
270
269
|
font-variant: normal;
|
|
271
270
|
font-stretch: normal;
|
|
272
|
-
|
|
273
|
-
hyphens: none;
|
|
271
|
+
hyphens: none;
|
|
274
272
|
letter-spacing: normal;
|
|
275
273
|
list-style: disc outside none;
|
|
276
274
|
tab-size: 8;
|
|
@@ -387,8 +385,7 @@ body[data-awsui-focus-visible=true] .awsui_button_55fkh_25oqf_346 > .awsui_actio
|
|
|
387
385
|
font-style: normal;
|
|
388
386
|
font-variant: normal;
|
|
389
387
|
font-stretch: normal;
|
|
390
|
-
|
|
391
|
-
hyphens: none;
|
|
388
|
+
hyphens: none;
|
|
392
389
|
letter-spacing: normal;
|
|
393
390
|
list-style: disc outside none;
|
|
394
391
|
tab-size: 8;
|
|
@@ -433,8 +430,7 @@ body[data-awsui-focus-visible=true] .awsui_button_55fkh_25oqf_346 > .awsui_actio
|
|
|
433
430
|
font-style: normal;
|
|
434
431
|
font-variant: normal;
|
|
435
432
|
font-stretch: normal;
|
|
436
|
-
|
|
437
|
-
hyphens: none;
|
|
433
|
+
hyphens: none;
|
|
438
434
|
letter-spacing: normal;
|
|
439
435
|
list-style: disc outside none;
|
|
440
436
|
tab-size: 8;
|
|
@@ -163,8 +163,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
163
163
|
font-style: normal;
|
|
164
164
|
font-variant: normal;
|
|
165
165
|
font-stretch: normal;
|
|
166
|
-
|
|
167
|
-
hyphens: none;
|
|
166
|
+
hyphens: none;
|
|
168
167
|
letter-spacing: normal;
|
|
169
168
|
list-style: disc outside none;
|
|
170
169
|
tab-size: 8;
|
|
@@ -154,8 +154,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
154
154
|
font-style: normal;
|
|
155
155
|
font-variant: normal;
|
|
156
156
|
font-stretch: normal;
|
|
157
|
-
|
|
158
|
-
hyphens: none;
|
|
157
|
+
hyphens: none;
|
|
159
158
|
letter-spacing: normal;
|
|
160
159
|
list-style: disc outside none;
|
|
161
160
|
tab-size: 8;
|
|
@@ -312,8 +311,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
312
311
|
font-style: normal;
|
|
313
312
|
font-variant: normal;
|
|
314
313
|
font-stretch: normal;
|
|
315
|
-
|
|
316
|
-
hyphens: none;
|
|
314
|
+
hyphens: none;
|
|
317
315
|
letter-spacing: normal;
|
|
318
316
|
list-style: disc outside none;
|
|
319
317
|
tab-size: 8;
|
|
@@ -154,8 +154,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
154
154
|
font-style: normal;
|
|
155
155
|
font-variant: normal;
|
|
156
156
|
font-stretch: normal;
|
|
157
|
-
|
|
158
|
-
hyphens: none;
|
|
157
|
+
hyphens: none;
|
|
159
158
|
letter-spacing: normal;
|
|
160
159
|
list-style: disc outside none;
|
|
161
160
|
tab-size: 8;
|
|
@@ -303,8 +303,7 @@ body[data-awsui-focus-visible=true] .awsui_segment_8cbea_rg0r6_161:not(#\9):focu
|
|
|
303
303
|
font-style: normal;
|
|
304
304
|
font-variant: normal;
|
|
305
305
|
font-stretch: normal;
|
|
306
|
-
|
|
307
|
-
hyphens: none;
|
|
306
|
+
hyphens: none;
|
|
308
307
|
letter-spacing: normal;
|
|
309
308
|
list-style: disc outside none;
|
|
310
309
|
tab-size: 8;
|
package/select/styles.scoped.css
CHANGED
|
@@ -154,8 +154,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
154
154
|
font-style: normal;
|
|
155
155
|
font-variant: normal;
|
|
156
156
|
font-stretch: normal;
|
|
157
|
-
|
|
158
|
-
hyphens: none;
|
|
157
|
+
hyphens: none;
|
|
159
158
|
letter-spacing: normal;
|
|
160
159
|
list-style: disc outside none;
|
|
161
160
|
tab-size: 8;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-select.d.ts","sourceRoot":"","sources":["../../../../src/select/utils/use-select.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAe,MAAM,6CAA6C,CAAC;AAE5G,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAK1E,OAAO,EAA0B,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAG1F,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1C,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,GAAG;IAAE,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAA;CAAE,CAAC;AACxG,MAAM,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;AAElF,UAAU,cAAc;IACt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,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,UAAU,EAAE,mBAAmB,CAAC,UAAU,CAAC;IAC3C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,kBAAmB,SAAQ,kBAAkB;IAC5D,GAAG,EAAE,SAAS,CAAC,iBAAiB,CAAC,CAAC;CACnC;AAED,wBAAgB,SAAS,CAAC,EACxB,eAAe,EACf,oBAAoB,EACpB,OAAO,EACP,aAAa,EACb,MAAM,EACN,OAAO,EACP,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,iBAAiB,EACjB,oBAA4B,EAC5B,UAAU,EACV,aAAa,EACb,cAAc,EACd,SAAS,GACV,EAAE,cAAc;;;;;;4BA6Ge,KAC5B,aAAa,EACb,SAAS,GAAG,QAAQ,GAAG,mBAAmB,GAAG,qBAAqB,CACnE;;0BA4B0B,QAAQ,WAAW,CAAC;6BAoEf,cAAc,SAAS,MAAM;;4BApJ9B,cAAc;;;EA4O9C"}
|
|
@@ -24,7 +24,7 @@ export function useSelect({ selectedOptions, updateSelectedOption, options, filt
|
|
|
24
24
|
}
|
|
25
25
|
return selectedValuesSet;
|
|
26
26
|
}, new Set());
|
|
27
|
-
const [{ highlightType, highlightedOption, highlightedIndex }, { moveHighlightWithKeyboard, resetHighlightWithKeyboard, setHighlightedIndexWithMouse, highlightOptionWithKeyboard, goHomeWithKeyboard, goEndWithKeyboard, },] = useHighlightedOption({ options: options, isHighlightable });
|
|
27
|
+
const [{ highlightType, highlightedOption, highlightedIndex }, { moveHighlightWithKeyboard, resetHighlightWithKeyboard, setHighlightedIndexWithMouse, highlightOptionWithKeyboard, highlightFirstOptionWithMouse, goHomeWithKeyboard, goEndWithKeyboard, },] = useHighlightedOption({ options: options, isHighlightable });
|
|
28
28
|
const { isOpen, openDropdown, closeDropdown, toggleDropdown, openedWithKeyboard } = useOpenState({
|
|
29
29
|
defaultOpen: embedded,
|
|
30
30
|
onOpen: () => fireLoadItems(''),
|
|
@@ -214,12 +214,23 @@ export function useSelect({ selectedOptions, updateSelectedOption, options, filt
|
|
|
214
214
|
useEffect(() => {
|
|
215
215
|
// highlight the first selected option, when opening the Select component without filter input
|
|
216
216
|
// keep the focus in the filter input when opening, so that screenreader can recognize the combobox
|
|
217
|
-
if (isOpen && !prevOpen &&
|
|
217
|
+
if (isOpen && !prevOpen && options.length > 0 && !hasFilter) {
|
|
218
218
|
if (openedWithKeyboard) {
|
|
219
|
-
|
|
219
|
+
if (__selectedOptions[0]) {
|
|
220
|
+
highlightOptionWithKeyboard(__selectedOptions[0]);
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
goHomeWithKeyboard();
|
|
224
|
+
}
|
|
220
225
|
}
|
|
221
226
|
else {
|
|
222
|
-
|
|
227
|
+
if (!__selectedOptions[0] || !options.includes(__selectedOptions[0])) {
|
|
228
|
+
highlightFirstOptionWithMouse();
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
const highlightedIndex = options.indexOf(__selectedOptions[0]);
|
|
232
|
+
setHighlightedIndexWithMouse(highlightedIndex, true);
|
|
233
|
+
}
|
|
223
234
|
}
|
|
224
235
|
}
|
|
225
236
|
}, [
|
|
@@ -228,6 +239,8 @@ export function useSelect({ selectedOptions, updateSelectedOption, options, filt
|
|
|
228
239
|
hasSelectedOption,
|
|
229
240
|
setHighlightedIndexWithMouse,
|
|
230
241
|
highlightOptionWithKeyboard,
|
|
242
|
+
highlightFirstOptionWithMouse,
|
|
243
|
+
goHomeWithKeyboard,
|
|
231
244
|
openedWithKeyboard,
|
|
232
245
|
options,
|
|
233
246
|
prevOpen,
|