@cloudscape-design/components 3.0.1400 → 3.0.1402
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/autosuggest/i18n-utils.d.ts +11 -0
- package/autosuggest/i18n-utils.d.ts.map +1 -0
- package/autosuggest/i18n-utils.js +15 -0
- package/autosuggest/i18n-utils.js.map +1 -0
- package/autosuggest/index.d.ts.map +1 -1
- package/autosuggest/index.js +3 -0
- package/autosuggest/index.js.map +1 -1
- package/autosuggest/interfaces.d.ts +94 -1
- package/autosuggest/interfaces.d.ts.map +1 -1
- package/autosuggest/interfaces.js.map +1 -1
- package/autosuggest/internal.d.ts.map +1 -1
- package/autosuggest/internal.js +21 -12
- package/autosuggest/internal.js.map +1 -1
- package/autosuggest/options-controller.d.ts +3 -1
- package/autosuggest/options-controller.d.ts.map +1 -1
- package/autosuggest/options-controller.js +3 -6
- package/autosuggest/options-controller.js.map +1 -1
- package/box/interfaces.d.ts +4 -1
- package/box/interfaces.d.ts.map +1 -1
- package/box/interfaces.js.map +1 -1
- package/box/styles.css.js +214 -220
- package/box/styles.scoped.css +259 -289
- package/box/styles.selectors.js +214 -220
- package/button/interfaces.d.ts +3 -1
- package/button/interfaces.d.ts.map +1 -1
- package/button/interfaces.js.map +1 -1
- package/button/internal.d.ts +2 -2
- package/button/internal.d.ts.map +1 -1
- package/button/internal.js +9 -1
- package/button/internal.js.map +1 -1
- package/button/styles.css.js +24 -23
- package/button/styles.scoped.css +116 -70
- package/button/styles.selectors.js +24 -23
- package/button-dropdown/filter.d.ts +1 -1
- package/button-dropdown/filter.d.ts.map +1 -1
- package/button-dropdown/interfaces.d.ts +6 -3
- package/button-dropdown/interfaces.d.ts.map +1 -1
- package/button-dropdown/interfaces.js.map +1 -1
- package/button-group/interfaces.d.ts +22 -13
- package/button-group/interfaces.d.ts.map +1 -1
- package/button-group/interfaces.js.map +1 -1
- package/calendar/grid/index.js.map +1 -1
- package/calendar/interfaces.d.ts +3 -1
- package/calendar/interfaces.d.ts.map +1 -1
- package/calendar/interfaces.js.map +1 -1
- package/copy-to-clipboard/interfaces.d.ts +3 -1
- package/copy-to-clipboard/interfaces.d.ts.map +1 -1
- package/copy-to-clipboard/interfaces.js.map +1 -1
- package/date-range-picker/calendar/grids/grid-cell.d.ts +1 -1
- package/date-range-picker/calendar/grids/grid-cell.d.ts.map +1 -1
- package/date-range-picker/calendar/grids/grid-cell.js.map +1 -1
- package/date-range-picker/interfaces.d.ts +3 -1
- package/date-range-picker/interfaces.d.ts.map +1 -1
- package/date-range-picker/interfaces.js.map +1 -1
- package/drawer/interfaces.d.ts +3 -1
- package/drawer/interfaces.d.ts.map +1 -1
- package/drawer/interfaces.js.map +1 -1
- package/i18n/messages/all.all.js +1 -1
- package/i18n/messages/all.all.json +1 -1
- package/i18n/messages/all.de.js +1 -1
- package/i18n/messages/all.de.json +1 -1
- package/i18n/messages/all.en-GB.js +1 -1
- package/i18n/messages/all.en-GB.json +1 -1
- package/i18n/messages/all.en.js +1 -1
- package/i18n/messages/all.en.json +1 -1
- package/i18n/messages/all.es.js +1 -1
- package/i18n/messages/all.es.json +1 -1
- package/i18n/messages/all.fr.js +1 -1
- package/i18n/messages/all.fr.json +1 -1
- package/i18n/messages/all.id.js +1 -1
- package/i18n/messages/all.id.json +1 -1
- package/i18n/messages/all.it.js +1 -1
- package/i18n/messages/all.it.json +1 -1
- package/i18n/messages/all.ja.js +1 -1
- package/i18n/messages/all.ja.json +1 -1
- package/i18n/messages/all.ko.js +1 -1
- package/i18n/messages/all.ko.json +1 -1
- package/i18n/messages/all.pt-BR.js +1 -1
- package/i18n/messages/all.pt-BR.json +1 -1
- package/i18n/messages/all.tr.js +1 -1
- package/i18n/messages/all.tr.json +1 -1
- package/i18n/messages/all.zh-CN.js +1 -1
- package/i18n/messages/all.zh-CN.json +1 -1
- package/i18n/messages/all.zh-TW.js +1 -1
- package/i18n/messages/all.zh-TW.json +1 -1
- package/i18n/messages-types.d.ts +13 -0
- package/i18n/messages-types.d.ts.map +1 -1
- package/i18n/messages-types.js.map +1 -1
- package/input/internal.d.ts +1 -0
- package/input/internal.d.ts.map +1 -1
- package/input/internal.js +15 -19
- package/input/internal.js.map +1 -1
- package/input/styles.css.js +37 -36
- package/input/styles.scoped.css +180 -243
- package/input/styles.selectors.js +37 -36
- package/internal/base-component/styles.scoped.css +1 -1
- package/internal/base-theme/styles.scoped.css +0 -61
- package/internal/components/autosuggest-input/index.d.ts +5 -0
- package/internal/components/autosuggest-input/index.d.ts.map +1 -1
- package/internal/components/autosuggest-input/index.js +158 -12
- package/internal/components/autosuggest-input/index.js.map +1 -1
- package/internal/components/autosuggest-input/inline-tokens.d.ts +20 -0
- package/internal/components/autosuggest-input/inline-tokens.d.ts.map +1 -0
- package/internal/components/autosuggest-input/inline-tokens.js +95 -0
- package/internal/components/autosuggest-input/inline-tokens.js.map +1 -0
- package/internal/components/autosuggest-input/overflow-dropdown.d.ts +26 -0
- package/internal/components/autosuggest-input/overflow-dropdown.d.ts.map +1 -0
- package/internal/components/autosuggest-input/overflow-dropdown.js +94 -0
- package/internal/components/autosuggest-input/overflow-dropdown.js.map +1 -0
- package/internal/components/autosuggest-input/styles.css.js +27 -2
- package/internal/components/autosuggest-input/styles.scoped.css +195 -2
- package/internal/components/autosuggest-input/styles.selectors.js +27 -2
- package/internal/components/autosuggest-input/test-classes/styles.css.js +9 -0
- package/internal/components/autosuggest-input/test-classes/styles.scoped.css +19 -0
- package/internal/components/autosuggest-input/test-classes/styles.selectors.js +10 -0
- package/internal/components/autosuggest-input/use-token-overflow.d.ts +30 -0
- package/internal/components/autosuggest-input/use-token-overflow.d.ts.map +1 -0
- package/internal/components/autosuggest-input/use-token-overflow.js +63 -0
- package/internal/components/autosuggest-input/use-token-overflow.js.map +1 -0
- package/internal/components/button-trigger/index.d.ts +4 -1
- package/internal/components/button-trigger/index.d.ts.map +1 -1
- package/internal/components/button-trigger/index.js +5 -3
- package/internal/components/button-trigger/index.js.map +1 -1
- package/internal/components/button-trigger/styles.css.js +23 -21
- package/internal/components/button-trigger/styles.scoped.css +79 -36
- package/internal/components/button-trigger/styles.selectors.js +23 -21
- package/internal/components/control-group/grouped-control-styles.d.ts +2 -1
- package/internal/components/control-group/grouped-control-styles.d.ts.map +1 -1
- package/internal/components/control-group/grouped-control-styles.js +3 -2
- package/internal/components/control-group/grouped-control-styles.js.map +1 -1
- package/internal/components/control-group/index.d.ts +5 -10
- package/internal/components/control-group/index.d.ts.map +1 -1
- package/internal/components/control-group/index.js +16 -10
- package/internal/components/control-group/index.js.map +1 -1
- package/internal/components/control-group/interfaces.d.ts +42 -0
- package/internal/components/control-group/interfaces.d.ts.map +1 -0
- package/internal/components/control-group/interfaces.js +2 -0
- package/internal/components/control-group/interfaces.js.map +1 -0
- package/internal/components/control-group/styles.css.js +16 -11
- package/internal/components/control-group/styles.scoped.css +34 -14
- package/internal/components/control-group/styles.selectors.js +16 -11
- package/internal/components/control-group/test-classes/styles.css.js +8 -0
- package/internal/components/control-group/test-classes/styles.scoped.css +15 -0
- package/internal/components/control-group/test-classes/styles.selectors.js +9 -0
- package/internal/components/option/interfaces.d.ts +1 -1
- package/internal/components/option/interfaces.d.ts.map +1 -1
- package/internal/components/option/interfaces.js.map +1 -1
- package/internal/context/control-group-context.d.ts +5 -0
- package/internal/context/control-group-context.d.ts.map +1 -1
- package/internal/context/control-group-context.js +1 -0
- package/internal/context/control-group-context.js.map +1 -1
- package/internal/environment.js +2 -2
- package/internal/environment.json +2 -2
- package/internal/hooks/use-hidden-description/index.d.ts +2 -1
- package/internal/hooks/use-hidden-description/index.d.ts.map +1 -1
- package/internal/hooks/use-hidden-description/index.js.map +1 -1
- package/internal/manifest.json +1 -1
- package/manifest.json +2 -2
- package/package.json +1 -1
- package/segmented-control/interfaces.d.ts +2 -2
- package/segmented-control/interfaces.d.ts.map +1 -1
- package/segmented-control/interfaces.js.map +1 -1
- package/segmented-control/styles.css.js +27 -26
- package/segmented-control/styles.scoped.css +51 -47
- package/segmented-control/styles.selectors.js +27 -26
- package/select/interfaces.d.ts +1 -1
- package/select/interfaces.js.map +1 -1
- package/select/parts/filter.d.ts +1 -1
- package/select/parts/filter.d.ts.map +1 -1
- package/table/body-cell/disabled-inline-editor.d.ts +2 -1
- package/table/body-cell/disabled-inline-editor.d.ts.map +1 -1
- package/table/body-cell/disabled-inline-editor.js.map +1 -1
- package/table/interfaces.d.ts +5 -3
- package/table/interfaces.d.ts.map +1 -1
- package/table/interfaces.js.map +1 -1
- package/tabs/interfaces.d.ts +4 -2
- package/tabs/interfaces.d.ts.map +1 -1
- package/tabs/interfaces.js.map +1 -1
- package/test-utils/dom/autosuggest/index.d.ts +39 -0
- package/test-utils/dom/autosuggest/index.js +68 -16
- package/test-utils/dom/autosuggest/index.js.map +1 -1
- package/test-utils/dom/internal/control-group.d.ts +5 -0
- package/test-utils/dom/internal/control-group.js +9 -2
- package/test-utils/dom/internal/control-group.js.map +1 -1
- package/test-utils/selectors/autosuggest/index.d.ts +53 -0
- package/test-utils/selectors/autosuggest/index.js +84 -16
- package/test-utils/selectors/autosuggest/index.js.map +1 -1
- package/test-utils/selectors/internal/control-group.d.ts +5 -0
- package/test-utils/selectors/internal/control-group.js +9 -2
- package/test-utils/selectors/internal/control-group.js.map +1 -1
- package/toggle-button/interfaces.d.ts +3 -1
- package/toggle-button/interfaces.d.ts.map +1 -1
- package/toggle-button/interfaces.js.map +1 -1
- package/token/dismiss-button.d.ts.map +1 -1
- package/token/dismiss-button.js +6 -3
- package/token/dismiss-button.js.map +1 -1
- package/types/option.d.ts +1 -1
- package/types/option.d.ts.map +1 -1
- package/types/option.js.map +1 -1
|
@@ -14,21 +14,21 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
14
14
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
15
15
|
SPDX-License-Identifier: Apache-2.0
|
|
16
16
|
*/
|
|
17
|
-
.awsui_button-
|
|
17
|
+
.awsui_button-trigger_18eso_1fhoq_17 > .awsui_arrow_18eso_1fhoq_17:not(#\9) {
|
|
18
18
|
transition: transform var(--motion-duration-rotate-180-69rh8b, 135ms) var(--motion-easing-rotate-180-nmpsiw, cubic-bezier(0.165, 0.84, 0.44, 1));
|
|
19
19
|
}
|
|
20
20
|
@media (prefers-reduced-motion: reduce) {
|
|
21
|
-
.awsui_button-
|
|
21
|
+
.awsui_button-trigger_18eso_1fhoq_17 > .awsui_arrow_18eso_1fhoq_17:not(#\9) {
|
|
22
22
|
animation: none;
|
|
23
23
|
transition: none;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
.awsui-motion-disabled .awsui_button-
|
|
26
|
+
.awsui-motion-disabled .awsui_button-trigger_18eso_1fhoq_17 > .awsui_arrow_18eso_1fhoq_17:not(#\9), .awsui-mode-entering .awsui_button-trigger_18eso_1fhoq_17 > .awsui_arrow_18eso_1fhoq_17:not(#\9) {
|
|
27
27
|
animation: none;
|
|
28
28
|
transition: none;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.awsui_button-
|
|
31
|
+
.awsui_button-trigger_18eso_1fhoq_17:not(#\9) {
|
|
32
32
|
border-collapse: separate;
|
|
33
33
|
border-spacing: 0;
|
|
34
34
|
box-sizing: border-box;
|
|
@@ -74,7 +74,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
74
74
|
border-inline: var(--border-width-field-2365x3, 1px) solid var(--color-border-input-default-jtkw9d, #8c8c94);
|
|
75
75
|
min-block-size: var(--size-vertical-input-5g8cy5, 32px);
|
|
76
76
|
}
|
|
77
|
-
.awsui_button-
|
|
77
|
+
.awsui_button-trigger_18eso_1fhoq_17.awsui_in-filtering-token-root_18eso_1fhoq_77:not(#\9), .awsui_button-trigger_18eso_1fhoq_17.awsui_in-filtering-token-nested_18eso_1fhoq_77:not(#\9) {
|
|
78
78
|
padding-block: 0px;
|
|
79
79
|
padding-inline: var(--space-field-horizontal-anki5k, 12px);
|
|
80
80
|
border-block-width: var(--border-width-token-p4a0gu, 2px);
|
|
@@ -85,14 +85,14 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
85
85
|
block-size: 100%;
|
|
86
86
|
min-block-size: unset;
|
|
87
87
|
}
|
|
88
|
-
body[data-awsui-focus-visible=true] .awsui_button-
|
|
88
|
+
body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_1fhoq_17.awsui_in-filtering-token-root_18eso_1fhoq_77:not(#\9):focus, body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_1fhoq_17.awsui_in-filtering-token-nested_18eso_1fhoq_77:not(#\9):focus {
|
|
89
89
|
position: relative;
|
|
90
90
|
}
|
|
91
|
-
body[data-awsui-focus-visible=true] .awsui_button-
|
|
91
|
+
body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_1fhoq_17.awsui_in-filtering-token-root_18eso_1fhoq_77:not(#\9):focus, body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_1fhoq_17.awsui_in-filtering-token-nested_18eso_1fhoq_77:not(#\9):focus {
|
|
92
92
|
outline: 2px dotted transparent;
|
|
93
93
|
outline-offset: calc(var(--space-filtering-token-operation-select-focus-outline-gutter-677p72, -5px) - 1px);
|
|
94
94
|
}
|
|
95
|
-
body[data-awsui-focus-visible=true] .awsui_button-
|
|
95
|
+
body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_1fhoq_17.awsui_in-filtering-token-root_18eso_1fhoq_77:not(#\9):focus::before, body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_1fhoq_17.awsui_in-filtering-token-nested_18eso_1fhoq_77:not(#\9):focus::before {
|
|
96
96
|
content: " ";
|
|
97
97
|
display: block;
|
|
98
98
|
position: absolute;
|
|
@@ -106,40 +106,40 @@ body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_j2rqg_17.awsui_i
|
|
|
106
106
|
border-end-end-radius: var(--border-radius-control-default-focus-ring-akwhsf, 4px);
|
|
107
107
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-sewkzn, #006ce0);
|
|
108
108
|
}
|
|
109
|
-
.awsui_button-
|
|
109
|
+
.awsui_button-trigger_18eso_1fhoq_17.awsui_in-filtering-token-nested_18eso_1fhoq_77:not(#\9) {
|
|
110
110
|
border-start-start-radius: calc(var(--border-radius-input-k1q34z, 8px) / 2);
|
|
111
111
|
border-end-start-radius: calc(var(--border-radius-input-k1q34z, 8px) / 2);
|
|
112
112
|
}
|
|
113
|
-
.awsui_button-
|
|
113
|
+
.awsui_button-trigger_18eso_1fhoq_17.awsui_has-caret_18eso_1fhoq_113:not(#\9) {
|
|
114
114
|
padding-inline-end: var(--space-field-icon-offset-2wydv9, 36px);
|
|
115
115
|
}
|
|
116
|
-
.awsui_button-
|
|
116
|
+
.awsui_button-trigger_18eso_1fhoq_17 > .awsui_placeholder_18eso_1fhoq_116:not(#\9) {
|
|
117
117
|
color: var(--color-text-input-placeholder-l6klmg, #656871);
|
|
118
118
|
font-style: italic;
|
|
119
119
|
}
|
|
120
|
-
.awsui_button-
|
|
120
|
+
.awsui_button-trigger_18eso_1fhoq_17 > .awsui_arrow_18eso_1fhoq_17:not(#\9) {
|
|
121
121
|
position: absolute;
|
|
122
122
|
inset-inline-end: var(--space-field-horizontal-anki5k, 12px);
|
|
123
123
|
inset-block-start: calc(50% - var(--line-height-body-m-5xw6xo, 20px) / 2);
|
|
124
124
|
color: var(--color-text-button-inline-icon-default-yujzfi, #006ce0);
|
|
125
125
|
}
|
|
126
|
-
.awsui_button-
|
|
126
|
+
.awsui_button-trigger_18eso_1fhoq_17:not(#\9):hover > .awsui_arrow_18eso_1fhoq_17 {
|
|
127
127
|
color: var(--color-text-button-inline-icon-hover-kxgkw7, #002b66);
|
|
128
128
|
}
|
|
129
|
-
.awsui_button-
|
|
129
|
+
.awsui_button-trigger_18eso_1fhoq_17.awsui_pressed_18eso_1fhoq_129 > .awsui_arrow_18eso_1fhoq_17:not(#\9) {
|
|
130
130
|
transform: rotate(-180deg);
|
|
131
131
|
}
|
|
132
|
-
.awsui_button-
|
|
132
|
+
.awsui_button-trigger_18eso_1fhoq_17.awsui_disabled_18eso_1fhoq_132:not(#\9) {
|
|
133
133
|
background-color: var(--color-background-input-disabled-pyvhb1, #ebebf0);
|
|
134
134
|
border-block: var(--border-width-field-2365x3, 1px) solid var(--color-border-input-disabled-5m31k6, #ebebf0);
|
|
135
135
|
border-inline: var(--border-width-field-2365x3, 1px) solid var(--color-border-input-disabled-5m31k6, #ebebf0);
|
|
136
136
|
color: var(--color-text-input-disabled-s4k7tb, #b4b4bb);
|
|
137
137
|
cursor: auto;
|
|
138
138
|
}
|
|
139
|
-
.awsui_button-
|
|
139
|
+
.awsui_button-trigger_18eso_1fhoq_17.awsui_disabled_18eso_1fhoq_132 > .awsui_arrow_18eso_1fhoq_17:not(#\9) {
|
|
140
140
|
color: var(--color-text-button-inline-icon-disabled-yeab6p, #b4b4bb);
|
|
141
141
|
}
|
|
142
|
-
.awsui_button-
|
|
142
|
+
.awsui_button-trigger_18eso_1fhoq_17.awsui_disabled_18eso_1fhoq_132.awsui_in-filtering-token_18eso_1fhoq_77:not(#\9) {
|
|
143
143
|
background-color: var(--color-background-input-disabled-pyvhb1, #ebebf0);
|
|
144
144
|
border-block: var(--border-width-token-p4a0gu, 2px) solid var(--color-border-input-disabled-5m31k6, #ebebf0);
|
|
145
145
|
border-inline: var(--border-width-token-p4a0gu, 2px) solid var(--color-border-input-disabled-5m31k6, #ebebf0);
|
|
@@ -147,88 +147,131 @@ body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_j2rqg_17.awsui_i
|
|
|
147
147
|
cursor: auto;
|
|
148
148
|
border-color: var(--color-border-control-disabled-dh8zaw, #dedee3);
|
|
149
149
|
}
|
|
150
|
-
.awsui_button-
|
|
150
|
+
.awsui_button-trigger_18eso_1fhoq_17.awsui_disabled_18eso_1fhoq_132 > .awsui_placeholder_18eso_1fhoq_116:not(#\9) {
|
|
151
151
|
color: var(--color-text-input-placeholder-disabled-8cf69l, #b4b4bb);
|
|
152
152
|
}
|
|
153
|
-
.awsui_button-
|
|
153
|
+
.awsui_button-trigger_18eso_1fhoq_17.awsui_readonly_18eso_1fhoq_153:not(#\9):not(.awsui_button-trigger_18eso_1fhoq_17.awsui_disabled_18eso_1fhoq_132):not(.awsui_button-trigger_18eso_1fhoq_17.awsui_in-filtering-token_18eso_1fhoq_77) {
|
|
154
154
|
background-color: var(--color-background-input-default-1u0v1p, #ffffff);
|
|
155
155
|
border-block: var(--border-width-field-2365x3, 1px) solid var(--color-border-input-disabled-5m31k6, #ebebf0);
|
|
156
156
|
border-inline: var(--border-width-field-2365x3, 1px) solid var(--color-border-input-disabled-5m31k6, #ebebf0);
|
|
157
157
|
}
|
|
158
|
-
.awsui_button-
|
|
158
|
+
.awsui_button-trigger_18eso_1fhoq_17.awsui_readonly_18eso_1fhoq_153:not(#\9):not(.awsui_button-trigger_18eso_1fhoq_17.awsui_disabled_18eso_1fhoq_132) {
|
|
159
159
|
-webkit-user-select: text;
|
|
160
160
|
user-select: text;
|
|
161
161
|
}
|
|
162
|
-
.awsui_button-
|
|
162
|
+
.awsui_button-trigger_18eso_1fhoq_17:not(#\9):focus {
|
|
163
163
|
outline: none;
|
|
164
164
|
text-decoration: none;
|
|
165
165
|
}
|
|
166
|
-
body[data-awsui-focus-visible=true] .awsui_button-
|
|
166
|
+
body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_1fhoq_17:not(#\9):not(.awsui_in-filtering-token_18eso_1fhoq_77):not(.awsui_compact_18eso_1fhoq_165):focus {
|
|
167
167
|
outline: 2px dotted transparent;
|
|
168
168
|
border-block: var(--border-width-field-2365x3, 1px) solid var(--color-border-input-focused-ppoq5z, #006ce0);
|
|
169
169
|
border-inline: var(--border-width-field-2365x3, 1px) solid var(--color-border-input-focused-ppoq5z, #006ce0);
|
|
170
170
|
box-shadow: 0 0 0 var(--border-control-focus-ring-shadow-spread-iijyo6, 1px) var(--color-border-item-focused-sewkzn, #006ce0);
|
|
171
171
|
}
|
|
172
|
-
.awsui_button-
|
|
172
|
+
.awsui_button-trigger_18eso_1fhoq_17:not(#\9):not(.awsui_in-filtering-token_18eso_1fhoq_77):not(.awsui_compact_18eso_1fhoq_165):invalid {
|
|
173
173
|
box-shadow: none;
|
|
174
174
|
}
|
|
175
|
-
.awsui_button-
|
|
175
|
+
.awsui_button-trigger_18eso_1fhoq_17:not(#\9):not(.awsui_in-filtering-token_18eso_1fhoq_77):not(.awsui_compact_18eso_1fhoq_165).awsui_invalid_18eso_1fhoq_174, .awsui_button-trigger_18eso_1fhoq_17:not(#\9):not(.awsui_in-filtering-token_18eso_1fhoq_77):not(.awsui_compact_18eso_1fhoq_165).awsui_invalid_18eso_1fhoq_174:focus {
|
|
176
176
|
color: var(--color-text-status-error-ri38gt, #db0000);
|
|
177
177
|
border-color: var(--color-text-status-error-ri38gt, #db0000);
|
|
178
178
|
padding-inline-start: calc(var(--space-field-horizontal-anki5k, 12px) - (var(--border-invalid-width-b183os, 8px) - var(--border-width-field-2365x3, 1px)));
|
|
179
179
|
border-inline-start-width: var(--border-invalid-width-b183os, 8px);
|
|
180
180
|
}
|
|
181
|
-
.awsui_button-
|
|
181
|
+
.awsui_button-trigger_18eso_1fhoq_17:not(#\9):not(.awsui_in-filtering-token_18eso_1fhoq_77):not(.awsui_compact_18eso_1fhoq_165).awsui_invalid_18eso_1fhoq_174:focus, .awsui_button-trigger_18eso_1fhoq_17:not(#\9):not(.awsui_in-filtering-token_18eso_1fhoq_77):not(.awsui_compact_18eso_1fhoq_165).awsui_invalid_18eso_1fhoq_174:focus:focus {
|
|
182
182
|
box-shadow: 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-bl5nmx, 2px) var(--color-border-item-focused-sewkzn, #006ce0);
|
|
183
183
|
}
|
|
184
|
-
.awsui_button-
|
|
184
|
+
.awsui_button-trigger_18eso_1fhoq_17:not(#\9):not(.awsui_in-filtering-token_18eso_1fhoq_77):not(.awsui_compact_18eso_1fhoq_165).awsui_warning_18eso_1fhoq_183, .awsui_button-trigger_18eso_1fhoq_17:not(#\9):not(.awsui_in-filtering-token_18eso_1fhoq_77):not(.awsui_compact_18eso_1fhoq_165).awsui_warning_18eso_1fhoq_183:focus {
|
|
185
185
|
color: var(--color-text-status-warning-fabq6h, #855900);
|
|
186
186
|
border-color: var(--color-text-status-warning-fabq6h, #855900);
|
|
187
187
|
padding-inline-start: calc(var(--space-field-horizontal-anki5k, 12px) - (var(--border-invalid-width-b183os, 8px) - var(--border-width-field-2365x3, 1px)));
|
|
188
188
|
border-inline-start-width: var(--border-invalid-width-b183os, 8px);
|
|
189
189
|
}
|
|
190
|
-
.awsui_button-
|
|
190
|
+
.awsui_button-trigger_18eso_1fhoq_17:not(#\9):not(.awsui_in-filtering-token_18eso_1fhoq_77):not(.awsui_compact_18eso_1fhoq_165).awsui_warning_18eso_1fhoq_183:focus, .awsui_button-trigger_18eso_1fhoq_17:not(#\9):not(.awsui_in-filtering-token_18eso_1fhoq_77):not(.awsui_compact_18eso_1fhoq_165).awsui_warning_18eso_1fhoq_183:focus:focus {
|
|
191
191
|
box-shadow: 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-bl5nmx, 2px) var(--color-border-item-focused-sewkzn, #006ce0);
|
|
192
192
|
}
|
|
193
|
-
.awsui_button-
|
|
193
|
+
.awsui_button-trigger_18eso_1fhoq_17.awsui_custom-option_18eso_1fhoq_192:not(#\9) {
|
|
194
194
|
padding-block: 0;
|
|
195
195
|
padding-inline-start: 0;
|
|
196
196
|
overflow: clip;
|
|
197
197
|
}
|
|
198
|
-
.awsui_button-
|
|
198
|
+
.awsui_button-trigger_18eso_1fhoq_17.awsui_inline-tokens_18eso_1fhoq_197:not(#\9) {
|
|
199
199
|
padding-block: 0;
|
|
200
200
|
}
|
|
201
|
-
.awsui_button-
|
|
201
|
+
.awsui_button-trigger_18eso_1fhoq_17.awsui_compact_18eso_1fhoq_165:not(#\9) {
|
|
202
|
+
font-size: var(--font-size-body-s-89y7qg, 12px);
|
|
203
|
+
line-height: var(--line-height-body-s-gako33, 16px);
|
|
204
|
+
letter-spacing: var(--letter-spacing-body-s-dzcybc, 0.005em);
|
|
205
|
+
column-gap: var(--space-xxs-3o1yoq, 4px);
|
|
206
|
+
block-size: 20px;
|
|
207
|
+
min-block-size: unset;
|
|
208
|
+
padding-block: 0;
|
|
209
|
+
padding-inline: var(--space-xs-m9b7jf, 8px);
|
|
210
|
+
white-space: nowrap;
|
|
211
|
+
border-start-start-radius: var(--border-radius-token-inline-09715z, 4px);
|
|
212
|
+
border-start-end-radius: var(--border-radius-token-inline-09715z, 4px);
|
|
213
|
+
border-end-start-radius: var(--border-radius-token-inline-09715z, 4px);
|
|
214
|
+
border-end-end-radius: var(--border-radius-token-inline-09715z, 4px);
|
|
215
|
+
}
|
|
216
|
+
.awsui_button-trigger_18eso_1fhoq_17.awsui_compact_18eso_1fhoq_165 > .awsui_arrow_18eso_1fhoq_17:not(#\9) {
|
|
217
|
+
position: static;
|
|
218
|
+
}
|
|
219
|
+
body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_1fhoq_17.awsui_compact_18eso_1fhoq_165:not(#\9):focus {
|
|
220
|
+
position: relative;
|
|
221
|
+
}
|
|
222
|
+
body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_1fhoq_17.awsui_compact_18eso_1fhoq_165:not(#\9):focus {
|
|
223
|
+
outline: 2px dotted transparent;
|
|
224
|
+
outline-offset: calc(0px - 1px);
|
|
225
|
+
}
|
|
226
|
+
body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_1fhoq_17.awsui_compact_18eso_1fhoq_165:not(#\9):focus::before {
|
|
227
|
+
content: " ";
|
|
228
|
+
display: block;
|
|
229
|
+
position: absolute;
|
|
230
|
+
inset-inline-start: calc(-1 * 0px);
|
|
231
|
+
inset-block-start: calc(-1 * 0px);
|
|
232
|
+
inline-size: calc(100% + 0px + 0px);
|
|
233
|
+
block-size: calc(100% + 0px + 0px);
|
|
234
|
+
border-start-start-radius: var(--border-radius-control-default-focus-ring-akwhsf, 4px);
|
|
235
|
+
border-start-end-radius: var(--border-radius-control-default-focus-ring-akwhsf, 4px);
|
|
236
|
+
border-end-start-radius: var(--border-radius-control-default-focus-ring-akwhsf, 4px);
|
|
237
|
+
border-end-end-radius: var(--border-radius-control-default-focus-ring-akwhsf, 4px);
|
|
238
|
+
box-shadow: 0 0 0 2px var(--color-border-item-focused-sewkzn, #006ce0);
|
|
239
|
+
}
|
|
240
|
+
.awsui_button-trigger_18eso_1fhoq_17.awsui_grouped_18eso_1fhoq_239:not(#\9) {
|
|
202
241
|
border-start-start-radius: var(--border-radius-input-k1q34z, 8px);
|
|
203
242
|
border-start-end-radius: var(--border-radius-input-k1q34z, 8px);
|
|
204
243
|
border-end-start-radius: var(--border-radius-input-k1q34z, 8px);
|
|
205
244
|
border-end-end-radius: var(--border-radius-input-k1q34z, 8px);
|
|
206
245
|
}
|
|
207
|
-
.awsui_button-
|
|
246
|
+
.awsui_button-trigger_18eso_1fhoq_17.awsui_grouped-horizontal-first_18eso_1fhoq_245:not(#\9) {
|
|
208
247
|
border-start-end-radius: 0;
|
|
209
248
|
border-end-end-radius: 0;
|
|
210
249
|
}
|
|
211
|
-
.awsui_button-
|
|
250
|
+
.awsui_button-trigger_18eso_1fhoq_17.awsui_grouped-horizontal-middle_18eso_1fhoq_249:not(#\9) {
|
|
212
251
|
border-start-start-radius: 0;
|
|
213
252
|
border-start-end-radius: 0;
|
|
214
253
|
border-end-start-radius: 0;
|
|
215
254
|
border-end-end-radius: 0;
|
|
216
255
|
}
|
|
217
|
-
.awsui_button-
|
|
256
|
+
.awsui_button-trigger_18eso_1fhoq_17.awsui_grouped-horizontal-last_18eso_1fhoq_255:not(#\9) {
|
|
218
257
|
border-start-start-radius: 0;
|
|
219
258
|
border-end-start-radius: 0;
|
|
220
259
|
}
|
|
221
|
-
.awsui_button-
|
|
260
|
+
.awsui_button-trigger_18eso_1fhoq_17.awsui_grouped-vertical-first_18eso_1fhoq_259:not(#\9) {
|
|
222
261
|
border-end-start-radius: 0;
|
|
223
262
|
border-end-end-radius: 0;
|
|
224
263
|
}
|
|
225
|
-
.awsui_button-
|
|
264
|
+
.awsui_button-trigger_18eso_1fhoq_17.awsui_grouped-vertical-middle_18eso_1fhoq_263:not(#\9) {
|
|
226
265
|
border-start-start-radius: 0;
|
|
227
266
|
border-start-end-radius: 0;
|
|
228
267
|
border-end-start-radius: 0;
|
|
229
268
|
border-end-end-radius: 0;
|
|
230
269
|
}
|
|
231
|
-
.awsui_button-
|
|
270
|
+
.awsui_button-trigger_18eso_1fhoq_17.awsui_grouped-vertical-last_18eso_1fhoq_269:not(#\9) {
|
|
232
271
|
border-start-start-radius: 0;
|
|
233
272
|
border-start-end-radius: 0;
|
|
273
|
+
}
|
|
274
|
+
.awsui_button-trigger_18eso_1fhoq_17.awsui_grouped-with-action_18eso_1fhoq_273:not(#\9) {
|
|
275
|
+
border-start-end-radius: 0;
|
|
276
|
+
border-end-end-radius: 0;
|
|
234
277
|
}
|
|
@@ -2,26 +2,28 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"button-trigger": "awsui_button-
|
|
6
|
-
"arrow": "
|
|
7
|
-
"in-filtering-token-root": "awsui_in-filtering-token-
|
|
8
|
-
"in-filtering-token-nested": "awsui_in-filtering-token-
|
|
9
|
-
"has-caret": "awsui_has-
|
|
10
|
-
"placeholder": "
|
|
11
|
-
"pressed": "
|
|
12
|
-
"disabled": "
|
|
13
|
-
"in-filtering-token": "awsui_in-filtering-
|
|
14
|
-
"readonly": "
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"grouped
|
|
21
|
-
"grouped-horizontal-
|
|
22
|
-
"grouped-horizontal-
|
|
23
|
-
"grouped-
|
|
24
|
-
"grouped-vertical-
|
|
25
|
-
"grouped-vertical-
|
|
5
|
+
"button-trigger": "awsui_button-trigger_18eso_1fhoq_17",
|
|
6
|
+
"arrow": "awsui_arrow_18eso_1fhoq_17",
|
|
7
|
+
"in-filtering-token-root": "awsui_in-filtering-token-root_18eso_1fhoq_77",
|
|
8
|
+
"in-filtering-token-nested": "awsui_in-filtering-token-nested_18eso_1fhoq_77",
|
|
9
|
+
"has-caret": "awsui_has-caret_18eso_1fhoq_113",
|
|
10
|
+
"placeholder": "awsui_placeholder_18eso_1fhoq_116",
|
|
11
|
+
"pressed": "awsui_pressed_18eso_1fhoq_129",
|
|
12
|
+
"disabled": "awsui_disabled_18eso_1fhoq_132",
|
|
13
|
+
"in-filtering-token": "awsui_in-filtering-token_18eso_1fhoq_77",
|
|
14
|
+
"readonly": "awsui_readonly_18eso_1fhoq_153",
|
|
15
|
+
"compact": "awsui_compact_18eso_1fhoq_165",
|
|
16
|
+
"invalid": "awsui_invalid_18eso_1fhoq_174",
|
|
17
|
+
"warning": "awsui_warning_18eso_1fhoq_183",
|
|
18
|
+
"custom-option": "awsui_custom-option_18eso_1fhoq_192",
|
|
19
|
+
"inline-tokens": "awsui_inline-tokens_18eso_1fhoq_197",
|
|
20
|
+
"grouped": "awsui_grouped_18eso_1fhoq_239",
|
|
21
|
+
"grouped-horizontal-first": "awsui_grouped-horizontal-first_18eso_1fhoq_245",
|
|
22
|
+
"grouped-horizontal-middle": "awsui_grouped-horizontal-middle_18eso_1fhoq_249",
|
|
23
|
+
"grouped-horizontal-last": "awsui_grouped-horizontal-last_18eso_1fhoq_255",
|
|
24
|
+
"grouped-vertical-first": "awsui_grouped-vertical-first_18eso_1fhoq_259",
|
|
25
|
+
"grouped-vertical-middle": "awsui_grouped-vertical-middle_18eso_1fhoq_263",
|
|
26
|
+
"grouped-vertical-last": "awsui_grouped-vertical-last_18eso_1fhoq_269",
|
|
27
|
+
"grouped-with-action": "awsui_grouped-with-action_18eso_1fhoq_273"
|
|
26
28
|
};
|
|
27
29
|
|
|
@@ -8,5 +8,6 @@ import { GroupedControlContextProps } from '../../context/control-group-context'
|
|
|
8
8
|
*/
|
|
9
9
|
export declare function getGroupedControlClassNames(styles: Record<string, string>, {
|
|
10
10
|
position,
|
|
11
|
-
direction
|
|
11
|
+
direction,
|
|
12
|
+
hasAction
|
|
12
13
|
}: GroupedControlContextProps): string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grouped-control-styles.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/control-group/grouped-control-styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AAEjF;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,0BAA0B,
|
|
1
|
+
{"version":3,"file":"grouped-control-styles.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/control-group/grouped-control-styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AAEjF;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,0BAA0B,GAC7D,MAAM,EAAE,CAMV"}
|
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
* otherwise the `grouped` base class plus the position/direction modifier.
|
|
6
6
|
* Spread the result into `clsx(...)` at the call site.
|
|
7
7
|
*/
|
|
8
|
-
export function getGroupedControlClassNames(styles, { position, direction }) {
|
|
8
|
+
export function getGroupedControlClassNames(styles, { position, direction, hasAction }) {
|
|
9
9
|
if (!position) {
|
|
10
10
|
return [];
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
const baseClassNames = [styles.grouped, styles[`grouped-${direction}-${position}`]];
|
|
13
|
+
return hasAction ? [...baseClassNames, styles['grouped-with-action']] : baseClassNames;
|
|
13
14
|
}
|
|
14
15
|
//# sourceMappingURL=grouped-control-styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grouped-control-styles.js","sourceRoot":"","sources":["../../../../../src/internal/components/control-group/grouped-control-styles.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,MAAM,UAAU,2BAA2B,CACzC,MAA8B,EAC9B,EAAE,QAAQ,EAAE,SAAS,EAA8B;
|
|
1
|
+
{"version":3,"file":"grouped-control-styles.js","sourceRoot":"","sources":["../../../../../src/internal/components/control-group/grouped-control-styles.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,MAAM,UAAU,2BAA2B,CACzC,MAA8B,EAC9B,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAA8B;IAE9D,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,cAAc,GAAG,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,WAAW,SAAS,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC;IACpF,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,cAAc,EAAE,MAAM,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC;AACzF,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { GroupedControlContextProps } from '../../context/control-group-context';\n\n/**\n * Builds the shared grouped-control CSS classes for a consumer.\n *\n * Returns an empty list when the control is not in a group (falsy `position`),\n * otherwise the `grouped` base class plus the position/direction modifier.\n * Spread the result into `clsx(...)` at the call site.\n */\nexport function getGroupedControlClassNames(\n styles: Record<string, string>,\n { position, direction, hasAction }: GroupedControlContextProps\n): string[] {\n if (!position) {\n return [];\n }\n const baseClassNames = [styles.grouped, styles[`grouped-${direction}-${position}`]];\n return hasAction ? [...baseClassNames, styles['grouped-with-action']] : baseClassNames;\n}\n"]}
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export interface InternalControlGroupProps extends BaseComponentProps {
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
direction?: GroupedControlDirection;
|
|
7
|
-
inlineLabelText?: string;
|
|
8
|
-
}
|
|
9
|
-
export default function InternalControlGroup({
|
|
1
|
+
import { ControlGroupProps } from './interfaces';
|
|
2
|
+
export { ControlGroupProps };
|
|
3
|
+
export default function ControlGroup({
|
|
10
4
|
children,
|
|
11
5
|
direction,
|
|
12
6
|
inlineLabelText,
|
|
7
|
+
actionButton,
|
|
13
8
|
...props
|
|
14
|
-
}:
|
|
9
|
+
}: ControlGroupProps): JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/control-group/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/control-group/index.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAKjD,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAE7B,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,QAAQ,EACR,SAAwB,EACxB,eAAe,EACf,YAAY,EACZ,GAAG,KAAK,EACT,EAAE,iBAAiB,eAyEnB"}
|
|
@@ -3,27 +3,33 @@
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { useUniqueId } from '@cloudscape-design/component-toolkit/internal';
|
|
6
|
+
import { InternalButton } from '../../../button/internal';
|
|
6
7
|
import { getBaseProps } from '../../base-component';
|
|
7
|
-
import { GroupedControlContext
|
|
8
|
+
import { GroupedControlContext } from '../../context/control-group-context';
|
|
8
9
|
import { flattenChildren } from '../../utils/flatten-children';
|
|
9
10
|
import styles from './styles.css.js';
|
|
10
|
-
|
|
11
|
+
import testUtilStyles from './test-classes/styles.css.js';
|
|
12
|
+
export default function ControlGroup({ children, direction = 'horizontal', inlineLabelText, actionButton, ...props }) {
|
|
11
13
|
const baseProps = getBaseProps(props);
|
|
12
14
|
const labelId = useUniqueId('control-group-label');
|
|
13
15
|
const flattenedChildren = flattenChildren(children, 'ControlGroup');
|
|
14
16
|
const controlCount = flattenedChildren.length;
|
|
15
|
-
const
|
|
17
|
+
const rootClassnames = [styles.root, baseProps.className, testUtilStyles.root];
|
|
18
|
+
const controls = (React.createElement("div", { ...(inlineLabelText ? { 'aria-labelledby': labelId } : actionButton ? {} : baseProps), role: "group", className: clsx(styles.controls, styles[`controls-${direction}`], !actionButton && !inlineLabelText && rootClassnames) }, flattenedChildren.map((child, index) => {
|
|
16
19
|
const key = child && typeof child === 'object' ? child.key : undefined;
|
|
17
20
|
const position = controlCount === 1 ? 'only' : index === 0 ? 'first' : index === controlCount - 1 ? 'last' : 'middle';
|
|
18
21
|
return (React.createElement("div", { key: key ? String(key) : index, className: clsx(styles.control, styles[`control-${position}-${direction}`]) },
|
|
19
|
-
React.createElement(GroupedControlContext.Provider, { value: { position, direction } }, child)));
|
|
20
|
-
});
|
|
22
|
+
React.createElement(GroupedControlContext.Provider, { value: { position, direction, hasAction: !!actionButton } }, child)));
|
|
23
|
+
})));
|
|
24
|
+
const controlsWithAction = actionButton ? (React.createElement("div", { ...(inlineLabelText ? {} : baseProps), className: clsx(styles['group-layout'], styles[`group-layout-${direction}`], !inlineLabelText && rootClassnames) },
|
|
25
|
+
controls,
|
|
26
|
+
React.createElement("div", { className: styles['action-slot'] },
|
|
27
|
+
React.createElement(InternalButton, { className: testUtilStyles['action-button'], variant: "control-group-action", formAction: "none", iconName: actionButton.iconName, ariaLabel: actionButton.ariaLabel, disabled: actionButton.disabled, disabledReason: actionButton.disabledReason, ariaDescribedby: actionButton.ariaDescribedby, onClick: actionButton.onClick })))) : (controls);
|
|
21
28
|
if (inlineLabelText) {
|
|
22
|
-
return (React.createElement("div", { ...baseProps, className: clsx(
|
|
23
|
-
React.createElement("label", { id: labelId, className: clsx(styles['inline-label']) }, inlineLabelText),
|
|
24
|
-
React.createElement("div", { className: styles['inline-label-trigger-wrapper'] },
|
|
25
|
-
React.createElement("div", { role: "group", "aria-labelledby": labelId, className: clsx(styles.root, styles[`root-${direction}`]) }, controls))));
|
|
29
|
+
return (React.createElement("div", { ...baseProps, className: clsx(...rootClassnames, styles['inline-label-wrapper']) },
|
|
30
|
+
React.createElement("label", { id: labelId, className: clsx(styles['inline-label'], testUtilStyles['inline-label']) }, inlineLabelText),
|
|
31
|
+
React.createElement("div", { className: styles['inline-label-trigger-wrapper'] }, controlsWithAction)));
|
|
26
32
|
}
|
|
27
|
-
return
|
|
33
|
+
return controlsWithAction;
|
|
28
34
|
}
|
|
29
35
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/control-group/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/control-group/index.tsx"],"names":[],"mappings":"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","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport { InternalButton } from '../../../button/internal';\nimport { getBaseProps } from '../../base-component';\nimport { GroupedControlContext, GroupedControlPosition } from '../../context/control-group-context';\nimport { flattenChildren } from '../../utils/flatten-children';\nimport { ControlGroupProps } from './interfaces';\n\nimport styles from './styles.css.js';\nimport testUtilStyles from './test-classes/styles.css.js';\n\nexport { ControlGroupProps };\n\nexport default function ControlGroup({\n children,\n direction = 'horizontal',\n inlineLabelText,\n actionButton,\n ...props\n}: ControlGroupProps) {\n const baseProps = getBaseProps(props);\n const labelId = useUniqueId('control-group-label');\n\n const flattenedChildren = flattenChildren(children, 'ControlGroup');\n const controlCount = flattenedChildren.length;\n\n const rootClassnames = [styles.root, baseProps.className, testUtilStyles.root];\n\n const controls = (\n <div\n {...(inlineLabelText ? { 'aria-labelledby': labelId } : actionButton ? {} : baseProps)}\n role=\"group\"\n className={clsx(\n styles.controls,\n styles[`controls-${direction}`],\n !actionButton && !inlineLabelText && rootClassnames\n )}\n >\n {flattenedChildren.map((child, index) => {\n const key = child && typeof child === 'object' ? (child as Record<'key', unknown>).key : undefined;\n const position: GroupedControlPosition =\n controlCount === 1 ? 'only' : index === 0 ? 'first' : index === controlCount - 1 ? 'last' : 'middle';\n return (\n <div\n key={key ? String(key) : index}\n className={clsx(styles.control, styles[`control-${position}-${direction}`])}\n >\n <GroupedControlContext.Provider value={{ position, direction, hasAction: !!actionButton }}>\n {child}\n </GroupedControlContext.Provider>\n </div>\n );\n })}\n </div>\n );\n\n const controlsWithAction = actionButton ? (\n <div\n {...(inlineLabelText ? {} : baseProps)}\n className={clsx(styles['group-layout'], styles[`group-layout-${direction}`], !inlineLabelText && rootClassnames)}\n >\n {controls}\n <div className={styles['action-slot']}>\n <InternalButton\n className={testUtilStyles['action-button']}\n variant=\"control-group-action\"\n formAction=\"none\"\n iconName={actionButton.iconName}\n ariaLabel={actionButton.ariaLabel}\n disabled={actionButton.disabled}\n disabledReason={actionButton.disabledReason}\n ariaDescribedby={actionButton.ariaDescribedby}\n onClick={actionButton.onClick}\n />\n </div>\n </div>\n ) : (\n controls\n );\n\n if (inlineLabelText) {\n return (\n <div {...baseProps} className={clsx(...rootClassnames, styles['inline-label-wrapper'])}>\n <label id={labelId} className={clsx(styles['inline-label'], testUtilStyles['inline-label'])}>\n {inlineLabelText}\n </label>\n <div className={styles['inline-label-trigger-wrapper']}>{controlsWithAction}</div>\n </div>\n );\n }\n\n return controlsWithAction;\n}\n"]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ButtonProps } from '../../../button/interfaces';
|
|
2
|
+
import { IconProps } from '../../../icon/interfaces';
|
|
3
|
+
import { BaseComponentProps } from '../../../types/base-component';
|
|
4
|
+
import { GroupedControlDirection } from '../../context/control-group-context';
|
|
5
|
+
import { CancelableEventHandler } from '../../events';
|
|
6
|
+
export interface ControlGroupProps extends BaseComponentProps {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
direction?: GroupedControlDirection;
|
|
9
|
+
inlineLabelText?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Specifies an action button rendered next to the grouped controls.
|
|
12
|
+
*/
|
|
13
|
+
actionButton?: ControlGroupProps.ActionButton;
|
|
14
|
+
}
|
|
15
|
+
export declare namespace ControlGroupProps {
|
|
16
|
+
interface ActionButton {
|
|
17
|
+
/**
|
|
18
|
+
* Called when the user clicks on the button and the button is not disabled.
|
|
19
|
+
*/
|
|
20
|
+
onClick?: CancelableEventHandler<ButtonProps.ClickDetail>;
|
|
21
|
+
/**
|
|
22
|
+
* Renders the button as disabled and prevents clicks.
|
|
23
|
+
*/
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Provides a reason why the button is disabled (only when `disabled` is `true`).
|
|
27
|
+
* If provided, the button becomes focusable.
|
|
28
|
+
*/
|
|
29
|
+
disabledReason?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Adds `aria-label` to the button element.
|
|
32
|
+
* The text will also be added to the `title` attribute of the button.
|
|
33
|
+
*/
|
|
34
|
+
ariaLabel: string;
|
|
35
|
+
/**
|
|
36
|
+
* Adds `aria-describedby` to the button.
|
|
37
|
+
*/
|
|
38
|
+
ariaDescribedby?: string;
|
|
39
|
+
/** Specifies the icon to display (for example `remove` or `close`). */
|
|
40
|
+
iconName: IconProps.Name;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/control-group/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAEtD,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,uBAAuB,CAAC;IACpC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAC,YAAY,CAAC;CAC/C;AAED,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,YAAY;QAC3B;;WAEG;QACH,OAAO,CAAC,EAAE,sBAAsB,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QAE1D;;WAEG;QACH,QAAQ,CAAC,EAAE,OAAO,CAAC;QAEnB;;;WAGG;QACH,cAAc,CAAC,EAAE,MAAM,CAAC;QAExB;;;WAGG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,eAAe,CAAC,EAAE,MAAM,CAAC;QAEzB,uEAAuE;QACvE,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC;KAC1B;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../src/internal/components/control-group/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ButtonProps } from '../../../button/interfaces';\nimport { IconProps } from '../../../icon/interfaces';\nimport { BaseComponentProps } from '../../../types/base-component';\nimport { GroupedControlDirection } from '../../context/control-group-context';\nimport { CancelableEventHandler } from '../../events';\n\nexport interface ControlGroupProps extends BaseComponentProps {\n children?: React.ReactNode;\n direction?: GroupedControlDirection;\n inlineLabelText?: string;\n /**\n * Specifies an action button rendered next to the grouped controls.\n */\n actionButton?: ControlGroupProps.ActionButton;\n}\n\nexport namespace ControlGroupProps {\n export interface ActionButton {\n /**\n * Called when the user clicks on the button and the button is not disabled.\n */\n onClick?: CancelableEventHandler<ButtonProps.ClickDetail>;\n\n /**\n * Renders the button as disabled and prevents clicks.\n */\n disabled?: boolean;\n\n /**\n * Provides a reason why the button is disabled (only when `disabled` is `true`).\n * If provided, the button becomes focusable.\n */\n disabledReason?: string;\n\n /**\n * Adds `aria-label` to the button element.\n * The text will also be added to the `title` attribute of the button.\n */\n ariaLabel: string;\n\n /**\n * Adds `aria-describedby` to the button.\n */\n ariaDescribedby?: string;\n\n /** Specifies the icon to display (for example `remove` or `close`). */\n iconName: IconProps.Name;\n }\n}\n"]}
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
4
|
+
"root": "awsui_root_o08jm_1ujp4_9",
|
|
5
|
+
"action-slot": "awsui_action-slot_o08jm_1ujp4_41",
|
|
6
|
+
"group-layout": "awsui_group-layout_o08jm_1ujp4_46",
|
|
7
|
+
"group-layout-horizontal": "awsui_group-layout-horizontal_o08jm_1ujp4_50",
|
|
8
|
+
"group-layout-vertical": "awsui_group-layout-vertical_o08jm_1ujp4_53",
|
|
9
|
+
"controls": "awsui_controls_o08jm_1ujp4_57",
|
|
10
|
+
"controls-horizontal": "awsui_controls-horizontal_o08jm_1ujp4_61",
|
|
11
|
+
"controls-vertical": "awsui_controls-vertical_o08jm_1ujp4_65",
|
|
12
|
+
"control": "awsui_control_o08jm_1ujp4_57",
|
|
13
|
+
"control-middle-horizontal": "awsui_control-middle-horizontal_o08jm_1ujp4_73",
|
|
14
|
+
"control-last-horizontal": "awsui_control-last-horizontal_o08jm_1ujp4_73",
|
|
15
|
+
"control-middle-vertical": "awsui_control-middle-vertical_o08jm_1ujp4_76",
|
|
16
|
+
"control-last-vertical": "awsui_control-last-vertical_o08jm_1ujp4_76",
|
|
17
|
+
"inline-label": "awsui_inline-label_o08jm_1ujp4_85",
|
|
18
|
+
"inline-label-wrapper": "awsui_inline-label-wrapper_o08jm_1ujp4_110",
|
|
19
|
+
"inline-label-trigger-wrapper": "awsui_inline-label-trigger-wrapper_o08jm_1ujp4_115"
|
|
15
20
|
};
|
|
16
21
|
|