@cloudscape-design/components-themeable 3.0.1383 → 3.0.1385
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/internal/components/control-group/styles.scss +27 -10
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
- package/lib/internal/scss/internal/styles/forms/mixins.scss +37 -22
- package/lib/internal/scss/key-value-pairs/styles.scss +9 -2
- package/lib/internal/scss/modal/styles.scss +6 -0
- package/lib/internal/scss/prompt-input/styles.scss +4 -0
- package/lib/internal/scss/segmented-control/segment.scss +5 -0
- package/lib/internal/scss/segmented-control/styles.scss +12 -2
- package/lib/internal/scss/space-between/styles.scss +8 -0
- package/lib/internal/scss/steps/styles.scss +1 -1
- package/lib/internal/template/input/internal.d.ts.map +1 -1
- package/lib/internal/template/input/internal.js +3 -4
- package/lib/internal/template/input/internal.js.map +1 -1
- package/lib/internal/template/input/styles.css.js +36 -34
- package/lib/internal/template/input/styles.scoped.css +89 -79
- package/lib/internal/template/input/styles.selectors.js +36 -34
- package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
- package/lib/internal/template/internal/components/button-trigger/index.d.ts +2 -2
- package/lib/internal/template/internal/components/button-trigger/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/button-trigger/index.js +3 -2
- package/lib/internal/template/internal/components/button-trigger/index.js.map +1 -1
- package/lib/internal/template/internal/components/button-trigger/styles.css.js +21 -19
- package/lib/internal/template/internal/components/button-trigger/styles.scoped.css +49 -39
- package/lib/internal/template/internal/components/button-trigger/styles.selectors.js +21 -19
- package/lib/internal/template/internal/components/control-group/grouped-control-styles.d.ts +10 -0
- package/lib/internal/template/internal/components/control-group/grouped-control-styles.d.ts.map +1 -0
- package/lib/internal/template/internal/components/control-group/grouped-control-styles.js +14 -0
- package/lib/internal/template/internal/components/control-group/grouped-control-styles.js.map +1 -0
- package/lib/internal/template/internal/components/control-group/index.d.ts +3 -1
- package/lib/internal/template/internal/components/control-group/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/control-group/index.js +5 -5
- package/lib/internal/template/internal/components/control-group/index.js.map +1 -1
- package/lib/internal/template/internal/components/control-group/styles.css.js +8 -4
- package/lib/internal/template/internal/components/control-group/styles.scoped.css +13 -4
- package/lib/internal/template/internal/components/control-group/styles.selectors.js +8 -4
- package/lib/internal/template/internal/components/focus-lock/index.d.ts +6 -0
- package/lib/internal/template/internal/components/focus-lock/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/focus-lock/index.js +8 -3
- package/lib/internal/template/internal/components/focus-lock/index.js.map +1 -1
- package/lib/internal/template/internal/context/control-group-context.d.ts +6 -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 +3 -1
- 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/key-value-pairs/styles.css.js +8 -8
- package/lib/internal/template/key-value-pairs/styles.scoped.css +16 -11
- package/lib/internal/template/key-value-pairs/styles.selectors.js +8 -8
- package/lib/internal/template/modal/index.d.ts +1 -1
- package/lib/internal/template/modal/index.d.ts.map +1 -1
- package/lib/internal/template/modal/index.js +6 -5
- package/lib/internal/template/modal/index.js.map +1 -1
- package/lib/internal/template/modal/interfaces.d.ts +7 -0
- package/lib/internal/template/modal/interfaces.d.ts.map +1 -1
- package/lib/internal/template/modal/interfaces.js.map +1 -1
- package/lib/internal/template/modal/internal.js +23 -6
- package/lib/internal/template/modal/internal.js.map +1 -1
- package/lib/internal/template/modal/styles.css.js +32 -31
- package/lib/internal/template/modal/styles.scoped.css +49 -46
- package/lib/internal/template/modal/styles.selectors.js +32 -31
- package/lib/internal/template/multiselect/internal.d.ts.map +1 -1
- package/lib/internal/template/multiselect/internal.js +7 -3
- package/lib/internal/template/multiselect/internal.js.map +1 -1
- package/lib/internal/template/prompt-input/styles.css.js +26 -26
- package/lib/internal/template/prompt-input/styles.scoped.css +57 -53
- package/lib/internal/template/prompt-input/styles.selectors.js +26 -26
- package/lib/internal/template/segmented-control/internal-segmented-control.d.ts +3 -3
- package/lib/internal/template/segmented-control/internal-segmented-control.d.ts.map +1 -1
- package/lib/internal/template/segmented-control/internal-segmented-control.js +8 -5
- package/lib/internal/template/segmented-control/internal-segmented-control.js.map +1 -1
- package/lib/internal/template/segmented-control/internal.d.ts.map +1 -1
- package/lib/internal/template/segmented-control/internal.js +4 -6
- package/lib/internal/template/segmented-control/internal.js.map +1 -1
- package/lib/internal/template/segmented-control/segment.d.ts +1 -0
- package/lib/internal/template/segmented-control/segment.d.ts.map +1 -1
- package/lib/internal/template/segmented-control/segment.js +2 -2
- package/lib/internal/template/segmented-control/segment.js.map +1 -1
- package/lib/internal/template/segmented-control/styles.css.js +26 -21
- package/lib/internal/template/segmented-control/styles.scoped.css +75 -43
- package/lib/internal/template/segmented-control/styles.selectors.js +26 -21
- package/lib/internal/template/select/internal.js +2 -2
- package/lib/internal/template/select/internal.js.map +1 -1
- package/lib/internal/template/select/parts/trigger.d.ts +2 -2
- package/lib/internal/template/select/parts/trigger.d.ts.map +1 -1
- package/lib/internal/template/select/parts/trigger.js +2 -2
- package/lib/internal/template/select/parts/trigger.js.map +1 -1
- package/lib/internal/template/space-between/internal.d.ts.map +1 -1
- package/lib/internal/template/space-between/internal.js +2 -1
- package/lib/internal/template/space-between/internal.js.map +1 -1
- package/lib/internal/template/space-between/styles.css.js +24 -23
- package/lib/internal/template/space-between/styles.scoped.css +29 -24
- package/lib/internal/template/space-between/styles.selectors.js +24 -23
- package/lib/internal/template/steps/styles.css.js +17 -17
- package/lib/internal/template/steps/styles.scoped.css +35 -35
- package/lib/internal/template/steps/styles.selectors.js +17 -17
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/button-trigger/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,+CAA+C,CAAC;AACrF,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAGlD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/button-trigger/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, { ButtonHTMLAttributes } from 'react';\nimport clsx from 'clsx';\n\nimport { isThemeActive, Theme } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalIcon from '../../../icon/internal';\nimport { BaseComponentProps } from '../../../types/base-component';\nimport { BaseKeyDetail, CancelableEventHandler } from '../../../types/events';\nimport { getBaseProps } from '../../base-component';\nimport { GroupedControlContextProps } from '../../context/control-group-context';\nimport { fireCancelableEvent, fireKeyboardEvent } from '../../events';\nimport { getGroupedControlClassNames } from '../control-group/grouped-control-styles';\nimport {\n GeneratedAnalyticsMetadataButtonTriggerCollapse,\n GeneratedAnalyticsMetadataButtonTriggerExpand,\n} from './analytics-metadata/interfaces';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\nexport interface ButtonTriggerProps extends BaseComponentProps {\n children?: React.ReactNode;\n pressed?: boolean;\n hideCaret?: boolean;\n disabled?: boolean;\n readOnly?: boolean;\n invalid?: boolean;\n warning?: boolean;\n inFilteringToken?: 'root' | 'nested';\n inlineTokens?: boolean;\n ariaHasPopup?: 'true' | 'listbox' | 'dialog';\n ariaControls?: string;\n ariaLabelledby?: string;\n ariaDescribedby?: string;\n onKeyDown?: CancelableEventHandler<BaseKeyDetail>;\n onKeyUp?: CancelableEventHandler<BaseKeyDetail>;\n onMouseDown?: CancelableEventHandler;\n onClick?: CancelableEventHandler;\n onFocus?: CancelableEventHandler;\n onBlur?: CancelableEventHandler<{ relatedTarget: Node | null }>;\n hasCustomContent?: boolean;\n autoFocus?: boolean;\n groupedControlProps?: GroupedControlContextProps;\n}\n\nconst ButtonTrigger = (\n {\n children,\n pressed,\n hideCaret = false,\n disabled = false,\n readOnly = false,\n invalid = false,\n warning = false,\n inlineTokens,\n inFilteringToken,\n ariaHasPopup,\n ariaLabelledby,\n ariaDescribedby,\n ariaControls,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onClick,\n onFocus,\n onBlur,\n hasCustomContent = false,\n autoFocus,\n groupedControlProps = { position: null, direction: 'horizontal' },\n ...restProps\n }: ButtonTriggerProps,\n ref: React.Ref<HTMLButtonElement>\n) => {\n const baseProps = getBaseProps(restProps);\n\n let attributes: ButtonHTMLAttributes<HTMLButtonElement> = {\n ...baseProps,\n type: 'button',\n className: clsx(\n styles['button-trigger'],\n analyticsSelectors['button-trigger'],\n baseProps.className,\n pressed && styles.pressed,\n disabled && styles.disabled,\n invalid && styles.invalid,\n warning && !invalid && styles.warning,\n !hideCaret && styles['has-caret'],\n readOnly && styles.readonly,\n inFilteringToken && styles['in-filtering-token'],\n inFilteringToken && styles[`in-filtering-token-${inFilteringToken}`],\n inlineTokens && styles['inline-tokens'],\n ...getGroupedControlClassNames(styles, groupedControlProps),\n !!hasCustomContent && styles['custom-option']\n ),\n disabled: disabled,\n 'aria-expanded': pressed,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'aria-haspopup': ariaHasPopup ?? 'listbox',\n 'aria-controls': ariaControls,\n 'aria-disabled': readOnly && !disabled ? 'true' : undefined,\n autoFocus,\n };\n\n if (!readOnly) {\n attributes = {\n ...attributes,\n onKeyDown: onKeyDown && (event => fireKeyboardEvent(onKeyDown, event)),\n onKeyUp: onKeyUp && (event => fireKeyboardEvent(onKeyUp, event)),\n onMouseDown: onMouseDown && (event => fireCancelableEvent(onMouseDown, {}, event)),\n onClick: onClick && (event => fireCancelableEvent(onClick, {}, event)),\n onFocus: onFocus && (event => fireCancelableEvent(onFocus, {}, event)),\n onBlur: onBlur && (event => fireCancelableEvent(onBlur, { relatedTarget: event.relatedTarget }, event)),\n };\n }\n\n if (invalid) {\n attributes['aria-invalid'] = invalid;\n }\n\n const analyticsMetadata:\n | GeneratedAnalyticsMetadataButtonTriggerExpand\n | GeneratedAnalyticsMetadataButtonTriggerCollapse = {\n action: !pressed ? 'expand' : 'collapse',\n detail: {\n label: { root: 'self' },\n },\n };\n\n return (\n <button\n ref={ref}\n {...attributes}\n data-awsui-motion-trigger=\"hover\"\n {...(disabled || readOnly ? {} : getAnalyticsMetadataAttribute(analyticsMetadata))}\n >\n {children}\n {!hideCaret && (\n <span className={styles.arrow}>\n <InternalIcon\n name={isThemeActive(Theme.OneTheme) ? 'angle-down' : 'caret-down-filled'}\n size={isThemeActive(Theme.OneTheme) ? 'x-small' : 'normal'}\n variant={disabled || readOnly ? 'disabled' : 'normal'}\n nativeAttributes={{ 'data-awsui-motion-target': '' }}\n />\n </span>\n )}\n </button>\n );\n};\n\nexport namespace ButtonTriggerProps {\n export interface Ref {\n focus(): void;\n }\n}\n\nexport default React.forwardRef(ButtonTrigger);\n"]}
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"button-trigger": "awsui_button-
|
|
5
|
-
"arrow": "
|
|
6
|
-
"in-filtering-token-root": "awsui_in-filtering-token-
|
|
7
|
-
"in-filtering-token-nested": "awsui_in-filtering-token-
|
|
8
|
-
"has-caret": "awsui_has-
|
|
9
|
-
"placeholder": "
|
|
10
|
-
"pressed": "
|
|
11
|
-
"disabled": "
|
|
12
|
-
"in-filtering-token": "awsui_in-filtering-
|
|
13
|
-
"readonly": "
|
|
14
|
-
"invalid": "
|
|
15
|
-
"warning": "
|
|
16
|
-
"custom-option": "awsui_custom-
|
|
17
|
-
"inline-tokens": "awsui_inline-
|
|
18
|
-
"grouped": "
|
|
19
|
-
"grouped-first": "awsui_grouped-
|
|
20
|
-
"grouped-middle": "awsui_grouped-
|
|
21
|
-
"grouped-last": "awsui_grouped-
|
|
22
|
-
"grouped-
|
|
4
|
+
"button-trigger": "awsui_button-trigger_18eso_15t5f_17",
|
|
5
|
+
"arrow": "awsui_arrow_18eso_15t5f_17",
|
|
6
|
+
"in-filtering-token-root": "awsui_in-filtering-token-root_18eso_15t5f_77",
|
|
7
|
+
"in-filtering-token-nested": "awsui_in-filtering-token-nested_18eso_15t5f_77",
|
|
8
|
+
"has-caret": "awsui_has-caret_18eso_15t5f_113",
|
|
9
|
+
"placeholder": "awsui_placeholder_18eso_15t5f_116",
|
|
10
|
+
"pressed": "awsui_pressed_18eso_15t5f_129",
|
|
11
|
+
"disabled": "awsui_disabled_18eso_15t5f_132",
|
|
12
|
+
"in-filtering-token": "awsui_in-filtering-token_18eso_15t5f_77",
|
|
13
|
+
"readonly": "awsui_readonly_18eso_15t5f_153",
|
|
14
|
+
"invalid": "awsui_invalid_18eso_15t5f_174",
|
|
15
|
+
"warning": "awsui_warning_18eso_15t5f_183",
|
|
16
|
+
"custom-option": "awsui_custom-option_18eso_15t5f_192",
|
|
17
|
+
"inline-tokens": "awsui_inline-tokens_18eso_15t5f_197",
|
|
18
|
+
"grouped": "awsui_grouped_18eso_15t5f_200",
|
|
19
|
+
"grouped-horizontal-first": "awsui_grouped-horizontal-first_18eso_15t5f_206",
|
|
20
|
+
"grouped-horizontal-middle": "awsui_grouped-horizontal-middle_18eso_15t5f_210",
|
|
21
|
+
"grouped-horizontal-last": "awsui_grouped-horizontal-last_18eso_15t5f_216",
|
|
22
|
+
"grouped-vertical-first": "awsui_grouped-vertical-first_18eso_15t5f_220",
|
|
23
|
+
"grouped-vertical-middle": "awsui_grouped-vertical-middle_18eso_15t5f_224",
|
|
24
|
+
"grouped-vertical-last": "awsui_grouped-vertical-last_18eso_15t5f_230"
|
|
23
25
|
};
|
|
24
26
|
|
|
@@ -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_15t5f_17 > .awsui_arrow_18eso_15t5f_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_15t5f_17 > .awsui_arrow_18eso_15t5f_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_15t5f_17 > .awsui_arrow_18eso_15t5f_17:not(#\9), .awsui-mode-entering .awsui_button-trigger_18eso_15t5f_17 > .awsui_arrow_18eso_15t5f_17:not(#\9) {
|
|
27
27
|
animation: none;
|
|
28
28
|
transition: none;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.awsui_button-
|
|
31
|
+
.awsui_button-trigger_18eso_15t5f_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, #687078);
|
|
75
75
|
min-block-size: var(--size-vertical-input-5g8cy5, 32px);
|
|
76
76
|
}
|
|
77
|
-
.awsui_button-
|
|
77
|
+
.awsui_button-trigger_18eso_15t5f_17.awsui_in-filtering-token-root_18eso_15t5f_77:not(#\9), .awsui_button-trigger_18eso_15t5f_17.awsui_in-filtering-token-nested_18eso_15t5f_77:not(#\9) {
|
|
78
78
|
padding-block: 0px;
|
|
79
79
|
padding-inline: var(--space-field-horizontal-anki5k, 8px);
|
|
80
80
|
border-block-width: var(--border-width-token-p4a0gu, 1px);
|
|
@@ -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_15t5f_17.awsui_in-filtering-token-root_18eso_15t5f_77:not(#\9):focus, body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_15t5f_17.awsui_in-filtering-token-nested_18eso_15t5f_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_15t5f_17.awsui_in-filtering-token-root_18eso_15t5f_77:not(#\9):focus, body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_15t5f_17.awsui_in-filtering-token-nested_18eso_15t5f_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, 0px) - 1px);
|
|
94
94
|
}
|
|
95
|
-
body[data-awsui-focus-visible=true] .awsui_button-
|
|
95
|
+
body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_15t5f_17.awsui_in-filtering-token-root_18eso_15t5f_77:not(#\9):focus::before, body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_15t5f_17.awsui_in-filtering-token-nested_18eso_15t5f_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_l1qzl_17.awsui_i
|
|
|
106
106
|
border-end-end-radius: var(--border-radius-control-default-focus-ring-akwhsf, 2px);
|
|
107
107
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-sewkzn, #0073bb);
|
|
108
108
|
}
|
|
109
|
-
.awsui_button-
|
|
109
|
+
.awsui_button-trigger_18eso_15t5f_17.awsui_in-filtering-token-nested_18eso_15t5f_77:not(#\9) {
|
|
110
110
|
border-start-start-radius: calc(var(--border-radius-input-k1q34z, 2px) / 2);
|
|
111
111
|
border-end-start-radius: calc(var(--border-radius-input-k1q34z, 2px) / 2);
|
|
112
112
|
}
|
|
113
|
-
.awsui_button-
|
|
113
|
+
.awsui_button-trigger_18eso_15t5f_17.awsui_has-caret_18eso_15t5f_113:not(#\9) {
|
|
114
114
|
padding-inline-end: var(--space-field-icon-offset-2wydv9, 32px);
|
|
115
115
|
}
|
|
116
|
-
.awsui_button-
|
|
116
|
+
.awsui_button-trigger_18eso_15t5f_17 > .awsui_placeholder_18eso_15t5f_116:not(#\9) {
|
|
117
117
|
color: var(--color-text-input-placeholder-l6klmg, #687078);
|
|
118
118
|
font-style: italic;
|
|
119
119
|
}
|
|
120
|
-
.awsui_button-
|
|
120
|
+
.awsui_button-trigger_18eso_15t5f_17 > .awsui_arrow_18eso_15t5f_17:not(#\9) {
|
|
121
121
|
position: absolute;
|
|
122
122
|
inset-inline-end: var(--space-field-horizontal-anki5k, 8px);
|
|
123
123
|
inset-block-start: calc(50% - var(--line-height-body-m-5xw6xo, 22px) / 2);
|
|
124
124
|
color: var(--color-text-button-inline-icon-default-yujzfi, #545b64);
|
|
125
125
|
}
|
|
126
|
-
.awsui_button-
|
|
126
|
+
.awsui_button-trigger_18eso_15t5f_17:not(#\9):hover > .awsui_arrow_18eso_15t5f_17 {
|
|
127
127
|
color: var(--color-text-button-inline-icon-hover-kxgkw7, #16191f);
|
|
128
128
|
}
|
|
129
|
-
.awsui_button-
|
|
129
|
+
.awsui_button-trigger_18eso_15t5f_17.awsui_pressed_18eso_15t5f_129 > .awsui_arrow_18eso_15t5f_17:not(#\9) {
|
|
130
130
|
transform: rotate(-180deg);
|
|
131
131
|
}
|
|
132
|
-
.awsui_button-
|
|
132
|
+
.awsui_button-trigger_18eso_15t5f_17.awsui_disabled_18eso_15t5f_132:not(#\9) {
|
|
133
133
|
background-color: var(--color-background-input-disabled-pyvhb1, #eaeded);
|
|
134
134
|
border-block: var(--border-width-field-2365x3, 1px) solid var(--color-border-input-disabled-5m31k6, #eaeded);
|
|
135
135
|
border-inline: var(--border-width-field-2365x3, 1px) solid var(--color-border-input-disabled-5m31k6, #eaeded);
|
|
136
136
|
color: var(--color-text-input-disabled-s4k7tb, #879596);
|
|
137
137
|
cursor: auto;
|
|
138
138
|
}
|
|
139
|
-
.awsui_button-
|
|
139
|
+
.awsui_button-trigger_18eso_15t5f_17.awsui_disabled_18eso_15t5f_132 > .awsui_arrow_18eso_15t5f_17:not(#\9) {
|
|
140
140
|
color: var(--color-text-button-inline-icon-disabled-yeab6p, #aab7b8);
|
|
141
141
|
}
|
|
142
|
-
.awsui_button-
|
|
142
|
+
.awsui_button-trigger_18eso_15t5f_17.awsui_disabled_18eso_15t5f_132.awsui_in-filtering-token_18eso_15t5f_77:not(#\9) {
|
|
143
143
|
background-color: var(--color-background-input-disabled-pyvhb1, #eaeded);
|
|
144
144
|
border-block: var(--border-width-token-p4a0gu, 1px) solid var(--color-border-input-disabled-5m31k6, #eaeded);
|
|
145
145
|
border-inline: var(--border-width-token-p4a0gu, 1px) solid var(--color-border-input-disabled-5m31k6, #eaeded);
|
|
@@ -147,78 +147,88 @@ body[data-awsui-focus-visible=true] .awsui_button-trigger_18eso_l1qzl_17.awsui_i
|
|
|
147
147
|
cursor: auto;
|
|
148
148
|
border-color: var(--color-border-control-disabled-dh8zaw, #d5dbdb);
|
|
149
149
|
}
|
|
150
|
-
.awsui_button-
|
|
150
|
+
.awsui_button-trigger_18eso_15t5f_17.awsui_disabled_18eso_15t5f_132 > .awsui_placeholder_18eso_15t5f_116:not(#\9) {
|
|
151
151
|
color: var(--color-text-input-placeholder-disabled-8cf69l, #687078);
|
|
152
152
|
}
|
|
153
|
-
.awsui_button-
|
|
153
|
+
.awsui_button-trigger_18eso_15t5f_17.awsui_readonly_18eso_15t5f_153:not(#\9):not(.awsui_button-trigger_18eso_15t5f_17.awsui_disabled_18eso_15t5f_132):not(.awsui_button-trigger_18eso_15t5f_17.awsui_in-filtering-token_18eso_15t5f_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, #eaeded);
|
|
156
156
|
border-inline: var(--border-width-field-2365x3, 1px) solid var(--color-border-input-disabled-5m31k6, #eaeded);
|
|
157
157
|
}
|
|
158
|
-
.awsui_button-
|
|
158
|
+
.awsui_button-trigger_18eso_15t5f_17.awsui_readonly_18eso_15t5f_153:not(#\9):not(.awsui_button-trigger_18eso_15t5f_17.awsui_disabled_18eso_15t5f_132) {
|
|
159
159
|
-webkit-user-select: text;
|
|
160
160
|
user-select: text;
|
|
161
161
|
}
|
|
162
|
-
.awsui_button-
|
|
162
|
+
.awsui_button-trigger_18eso_15t5f_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_15t5f_17:not(#\9):not(.awsui_in-filtering-token_18eso_15t5f_77):focus {
|
|
167
167
|
outline: 2px dotted transparent;
|
|
168
168
|
border-block: var(--border-width-field-2365x3, 1px) solid var(--color-border-input-focused-ppoq5z, #0073bb);
|
|
169
169
|
border-inline: var(--border-width-field-2365x3, 1px) solid var(--color-border-input-focused-ppoq5z, #0073bb);
|
|
170
170
|
box-shadow: 0 0 0 var(--border-control-focus-ring-shadow-spread-iijyo6, 1px) var(--color-border-item-focused-sewkzn, #0073bb);
|
|
171
171
|
}
|
|
172
|
-
.awsui_button-
|
|
172
|
+
.awsui_button-trigger_18eso_15t5f_17:not(#\9):not(.awsui_in-filtering-token_18eso_15t5f_77):invalid {
|
|
173
173
|
box-shadow: none;
|
|
174
174
|
}
|
|
175
|
-
.awsui_button-
|
|
175
|
+
.awsui_button-trigger_18eso_15t5f_17:not(#\9):not(.awsui_in-filtering-token_18eso_15t5f_77).awsui_invalid_18eso_15t5f_174, .awsui_button-trigger_18eso_15t5f_17:not(#\9):not(.awsui_in-filtering-token_18eso_15t5f_77).awsui_invalid_18eso_15t5f_174:focus {
|
|
176
176
|
color: var(--color-text-status-error-ri38gt, #d13212);
|
|
177
177
|
border-color: var(--color-text-status-error-ri38gt, #d13212);
|
|
178
178
|
padding-inline-start: calc(var(--space-field-horizontal-anki5k, 8px) - (var(--border-invalid-width-b183os, 4px) - var(--border-width-field-2365x3, 1px)));
|
|
179
179
|
border-inline-start-width: var(--border-invalid-width-b183os, 4px);
|
|
180
180
|
}
|
|
181
|
-
.awsui_button-
|
|
181
|
+
.awsui_button-trigger_18eso_15t5f_17:not(#\9):not(.awsui_in-filtering-token_18eso_15t5f_77).awsui_invalid_18eso_15t5f_174:focus, .awsui_button-trigger_18eso_15t5f_17:not(#\9):not(.awsui_in-filtering-token_18eso_15t5f_77).awsui_invalid_18eso_15t5f_174:focus:focus {
|
|
182
182
|
box-shadow: 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-bl5nmx, 1px) var(--color-border-item-focused-sewkzn, #0073bb);
|
|
183
183
|
}
|
|
184
|
-
.awsui_button-
|
|
184
|
+
.awsui_button-trigger_18eso_15t5f_17:not(#\9):not(.awsui_in-filtering-token_18eso_15t5f_77).awsui_warning_18eso_15t5f_183, .awsui_button-trigger_18eso_15t5f_17:not(#\9):not(.awsui_in-filtering-token_18eso_15t5f_77).awsui_warning_18eso_15t5f_183:focus {
|
|
185
185
|
color: var(--color-text-status-warning-fabq6h, #906806);
|
|
186
186
|
border-color: var(--color-text-status-warning-fabq6h, #906806);
|
|
187
187
|
padding-inline-start: calc(var(--space-field-horizontal-anki5k, 8px) - (var(--border-invalid-width-b183os, 4px) - var(--border-width-field-2365x3, 1px)));
|
|
188
188
|
border-inline-start-width: var(--border-invalid-width-b183os, 4px);
|
|
189
189
|
}
|
|
190
|
-
.awsui_button-
|
|
190
|
+
.awsui_button-trigger_18eso_15t5f_17:not(#\9):not(.awsui_in-filtering-token_18eso_15t5f_77).awsui_warning_18eso_15t5f_183:focus, .awsui_button-trigger_18eso_15t5f_17:not(#\9):not(.awsui_in-filtering-token_18eso_15t5f_77).awsui_warning_18eso_15t5f_183:focus:focus {
|
|
191
191
|
box-shadow: 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-bl5nmx, 1px) var(--color-border-item-focused-sewkzn, #0073bb);
|
|
192
192
|
}
|
|
193
|
-
.awsui_button-
|
|
193
|
+
.awsui_button-trigger_18eso_15t5f_17.awsui_custom-option_18eso_15t5f_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_15t5f_17.awsui_inline-tokens_18eso_15t5f_197:not(#\9) {
|
|
199
199
|
padding-block: 0;
|
|
200
200
|
}
|
|
201
|
-
.awsui_button-
|
|
201
|
+
.awsui_button-trigger_18eso_15t5f_17.awsui_grouped_18eso_15t5f_200:not(#\9) {
|
|
202
202
|
border-start-start-radius: var(--border-radius-input-k1q34z, 2px);
|
|
203
|
+
border-start-end-radius: var(--border-radius-input-k1q34z, 2px);
|
|
203
204
|
border-end-start-radius: var(--border-radius-input-k1q34z, 2px);
|
|
205
|
+
border-end-end-radius: var(--border-radius-input-k1q34z, 2px);
|
|
206
|
+
}
|
|
207
|
+
.awsui_button-trigger_18eso_15t5f_17.awsui_grouped-horizontal-first_18eso_15t5f_206:not(#\9) {
|
|
204
208
|
border-start-end-radius: 0;
|
|
205
209
|
border-end-end-radius: 0;
|
|
206
210
|
}
|
|
207
|
-
.awsui_button-
|
|
211
|
+
.awsui_button-trigger_18eso_15t5f_17.awsui_grouped-horizontal-middle_18eso_15t5f_210:not(#\9) {
|
|
208
212
|
border-start-start-radius: 0;
|
|
209
213
|
border-start-end-radius: 0;
|
|
210
214
|
border-end-start-radius: 0;
|
|
211
215
|
border-end-end-radius: 0;
|
|
212
216
|
}
|
|
213
|
-
.awsui_button-
|
|
214
|
-
border-start-end-radius: var(--border-radius-input-k1q34z, 2px);
|
|
215
|
-
border-end-end-radius: var(--border-radius-input-k1q34z, 2px);
|
|
217
|
+
.awsui_button-trigger_18eso_15t5f_17.awsui_grouped-horizontal-last_18eso_15t5f_216:not(#\9) {
|
|
216
218
|
border-start-start-radius: 0;
|
|
217
219
|
border-end-start-radius: 0;
|
|
218
220
|
}
|
|
219
|
-
.awsui_button-
|
|
220
|
-
border-
|
|
221
|
-
border-
|
|
222
|
-
|
|
223
|
-
|
|
221
|
+
.awsui_button-trigger_18eso_15t5f_17.awsui_grouped-vertical-first_18eso_15t5f_220:not(#\9) {
|
|
222
|
+
border-end-start-radius: 0;
|
|
223
|
+
border-end-end-radius: 0;
|
|
224
|
+
}
|
|
225
|
+
.awsui_button-trigger_18eso_15t5f_17.awsui_grouped-vertical-middle_18eso_15t5f_224:not(#\9) {
|
|
226
|
+
border-start-start-radius: 0;
|
|
227
|
+
border-start-end-radius: 0;
|
|
228
|
+
border-end-start-radius: 0;
|
|
229
|
+
border-end-end-radius: 0;
|
|
230
|
+
}
|
|
231
|
+
.awsui_button-trigger_18eso_15t5f_17.awsui_grouped-vertical-last_18eso_15t5f_230:not(#\9) {
|
|
232
|
+
border-start-start-radius: 0;
|
|
233
|
+
border-start-end-radius: 0;
|
|
224
234
|
}
|
|
@@ -2,24 +2,26 @@
|
|
|
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
|
-
"invalid": "
|
|
16
|
-
"warning": "
|
|
17
|
-
"custom-option": "awsui_custom-
|
|
18
|
-
"inline-tokens": "awsui_inline-
|
|
19
|
-
"grouped": "
|
|
20
|
-
"grouped-first": "awsui_grouped-
|
|
21
|
-
"grouped-middle": "awsui_grouped-
|
|
22
|
-
"grouped-last": "awsui_grouped-
|
|
23
|
-
"grouped-
|
|
5
|
+
"button-trigger": "awsui_button-trigger_18eso_15t5f_17",
|
|
6
|
+
"arrow": "awsui_arrow_18eso_15t5f_17",
|
|
7
|
+
"in-filtering-token-root": "awsui_in-filtering-token-root_18eso_15t5f_77",
|
|
8
|
+
"in-filtering-token-nested": "awsui_in-filtering-token-nested_18eso_15t5f_77",
|
|
9
|
+
"has-caret": "awsui_has-caret_18eso_15t5f_113",
|
|
10
|
+
"placeholder": "awsui_placeholder_18eso_15t5f_116",
|
|
11
|
+
"pressed": "awsui_pressed_18eso_15t5f_129",
|
|
12
|
+
"disabled": "awsui_disabled_18eso_15t5f_132",
|
|
13
|
+
"in-filtering-token": "awsui_in-filtering-token_18eso_15t5f_77",
|
|
14
|
+
"readonly": "awsui_readonly_18eso_15t5f_153",
|
|
15
|
+
"invalid": "awsui_invalid_18eso_15t5f_174",
|
|
16
|
+
"warning": "awsui_warning_18eso_15t5f_183",
|
|
17
|
+
"custom-option": "awsui_custom-option_18eso_15t5f_192",
|
|
18
|
+
"inline-tokens": "awsui_inline-tokens_18eso_15t5f_197",
|
|
19
|
+
"grouped": "awsui_grouped_18eso_15t5f_200",
|
|
20
|
+
"grouped-horizontal-first": "awsui_grouped-horizontal-first_18eso_15t5f_206",
|
|
21
|
+
"grouped-horizontal-middle": "awsui_grouped-horizontal-middle_18eso_15t5f_210",
|
|
22
|
+
"grouped-horizontal-last": "awsui_grouped-horizontal-last_18eso_15t5f_216",
|
|
23
|
+
"grouped-vertical-first": "awsui_grouped-vertical-first_18eso_15t5f_220",
|
|
24
|
+
"grouped-vertical-middle": "awsui_grouped-vertical-middle_18eso_15t5f_224",
|
|
25
|
+
"grouped-vertical-last": "awsui_grouped-vertical-last_18eso_15t5f_230"
|
|
24
26
|
};
|
|
25
27
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { GroupedControlContextProps } from '../../context/control-group-context';
|
|
2
|
+
/**
|
|
3
|
+
* Builds the shared grouped-control CSS classes for a consumer.
|
|
4
|
+
*
|
|
5
|
+
* Returns an empty list when the control is not in a group (falsy `position`),
|
|
6
|
+
* otherwise the `grouped` base class plus the position/direction modifier.
|
|
7
|
+
* Spread the result into `clsx(...)` at the call site.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getGroupedControlClassNames(styles: Record<string, string>, { position, direction }: GroupedControlContextProps): string[];
|
|
10
|
+
//# sourceMappingURL=grouped-control-styles.d.ts.map
|
package/lib/internal/template/internal/components/control-group/grouped-control-styles.d.ts.map
ADDED
|
@@ -0,0 +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,GAClD,MAAM,EAAE,CAKV"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds the shared grouped-control CSS classes for a consumer.
|
|
3
|
+
*
|
|
4
|
+
* Returns an empty list when the control is not in a group (falsy `position`),
|
|
5
|
+
* otherwise the `grouped` base class plus the position/direction modifier.
|
|
6
|
+
* Spread the result into `clsx(...)` at the call site.
|
|
7
|
+
*/
|
|
8
|
+
export function getGroupedControlClassNames(styles, { position, direction }) {
|
|
9
|
+
if (!position) {
|
|
10
|
+
return [];
|
|
11
|
+
}
|
|
12
|
+
return [styles.grouped, styles[`grouped-${direction}-${position}`]];
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=grouped-control-styles.js.map
|
|
@@ -0,0 +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;IAEnD,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,WAAW,SAAS,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC;AACtE,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 }: GroupedControlContextProps\n): string[] {\n if (!position) {\n return [];\n }\n return [styles.grouped, styles[`grouped-${direction}-${position}`]];\n}\n"]}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BaseComponentProps } from '../../../types/base-component';
|
|
3
|
+
import { GroupedControlDirection } from '../../context/control-group-context';
|
|
3
4
|
export interface InternalControlGroupProps extends BaseComponentProps {
|
|
4
5
|
children?: React.ReactNode;
|
|
6
|
+
direction?: GroupedControlDirection;
|
|
5
7
|
}
|
|
6
|
-
export default function InternalControlGroup({ children, ...props }: InternalControlGroupProps): JSX.Element;
|
|
8
|
+
export default function InternalControlGroup({ children, direction, ...props }: InternalControlGroupProps): JSX.Element;
|
|
7
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/control-group/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/control-group/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,EAEL,uBAAuB,EAExB,MAAM,qCAAqC,CAAC;AAK7C,MAAM,WAAW,yBAA0B,SAAQ,kBAAkB;IACnE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC;AAED,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAC3C,QAAQ,EACR,SAAwB,EACxB,GAAG,KAAK,EACT,EAAE,yBAAyB,eAuB3B"}
|
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { getBaseProps } from '../../base-component';
|
|
6
|
-
import { GroupedControlContext } from '../../context/control-group-context';
|
|
6
|
+
import { GroupedControlContext, } from '../../context/control-group-context';
|
|
7
7
|
import { flattenChildren } from '../../utils/flatten-children';
|
|
8
8
|
import styles from './styles.css.js';
|
|
9
|
-
export default function InternalControlGroup({ children, ...props }) {
|
|
9
|
+
export default function InternalControlGroup({ children, direction = 'horizontal', ...props }) {
|
|
10
10
|
const baseProps = getBaseProps(props);
|
|
11
11
|
const flattenedChildren = flattenChildren(children, 'ControlGroup');
|
|
12
12
|
const controlCount = flattenedChildren.length;
|
|
13
|
-
return (React.createElement("div", { ...baseProps, role: "group", className: clsx(baseProps.className, styles.root) }, flattenedChildren.map((child, index) => {
|
|
13
|
+
return (React.createElement("div", { ...baseProps, role: "group", className: clsx(baseProps.className, styles.root, styles[`root-${direction}`]) }, flattenedChildren.map((child, index) => {
|
|
14
14
|
const key = child && typeof child === 'object' ? child.key : undefined;
|
|
15
15
|
const position = controlCount === 1 ? 'only' : index === 0 ? 'first' : index === controlCount - 1 ? 'last' : 'middle';
|
|
16
|
-
return (React.createElement("div", { key: key ? String(key) : index, className: clsx(styles.control, styles[`control-${position}`]) },
|
|
17
|
-
React.createElement(GroupedControlContext.Provider, { value: { position } }, child)));
|
|
16
|
+
return (React.createElement("div", { key: key ? String(key) : index, className: clsx(styles.control, styles[`control-${position}-${direction}`]) },
|
|
17
|
+
React.createElement(GroupedControlContext.Provider, { value: { position, direction } }, child)));
|
|
18
18
|
})));
|
|
19
19
|
}
|
|
20
20
|
//# 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;AAGxB,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,
|
|
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;AAGxB,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EACL,qBAAqB,GAGtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAOrC,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAC3C,QAAQ,EACR,SAAS,GAAG,YAAY,EACxB,GAAG,KAAK,EACkB;IAC1B,MAAM,SAAS,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IAEtC,MAAM,iBAAiB,GAAG,eAAe,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;IACpE,MAAM,YAAY,GAAG,iBAAiB,CAAC,MAAM,CAAC;IAE9C,OAAO,CACL,gCAAS,SAAS,EAAE,IAAI,EAAC,OAAO,EAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,QAAQ,SAAS,EAAE,CAAC,CAAC,IAC5G,iBAAiB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;QACtC,MAAM,GAAG,GAAG,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAE,KAAgC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;QACnG,MAAM,QAAQ,GACZ,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,KAAK,YAAY,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;QACvG,OAAO,CACL,6BACE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,EAC9B,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,WAAW,QAAQ,IAAI,SAAS,EAAE,CAAC,CAAC;YAE3E,oBAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAG,KAAK,CAAkC,CACpG,CACP,CAAC;IACJ,CAAC,CAAC,CACE,CACP,CAAC;AACJ,CAAC","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 { BaseComponentProps } from '../../../types/base-component';\nimport { getBaseProps } from '../../base-component';\nimport {\n GroupedControlContext,\n GroupedControlDirection,\n GroupedControlPosition,\n} from '../../context/control-group-context';\nimport { flattenChildren } from '../../utils/flatten-children';\n\nimport styles from './styles.css.js';\n\nexport interface InternalControlGroupProps extends BaseComponentProps {\n children?: React.ReactNode;\n direction?: GroupedControlDirection;\n}\n\nexport default function InternalControlGroup({\n children,\n direction = 'horizontal',\n ...props\n}: InternalControlGroupProps) {\n const baseProps = getBaseProps(props);\n\n const flattenedChildren = flattenChildren(children, 'ControlGroup');\n const controlCount = flattenedChildren.length;\n\n return (\n <div {...baseProps} role=\"group\" className={clsx(baseProps.className, styles.root, styles[`root-${direction}`])}>\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 }}>{child}</GroupedControlContext.Provider>\n </div>\n );\n })}\n </div>\n );\n}\n"]}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"control
|
|
4
|
+
"root": "awsui_root_o08jm_35ajp_9",
|
|
5
|
+
"root-horizontal": "awsui_root-horizontal_o08jm_35ajp_41",
|
|
6
|
+
"root-vertical": "awsui_root-vertical_o08jm_35ajp_46",
|
|
7
|
+
"control": "awsui_control_o08jm_35ajp_51",
|
|
8
|
+
"control-middle-horizontal": "awsui_control-middle-horizontal_o08jm_35ajp_58",
|
|
9
|
+
"control-last-horizontal": "awsui_control-last-horizontal_o08jm_35ajp_58",
|
|
10
|
+
"control-middle-vertical": "awsui_control-middle-vertical_o08jm_35ajp_61",
|
|
11
|
+
"control-last-vertical": "awsui_control-last-vertical_o08jm_35ajp_61"
|
|
8
12
|
};
|
|
9
13
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
/* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
7
7
|
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
8
8
|
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
9
|
-
.
|
|
9
|
+
.awsui_root_o08jm_35ajp_9:not(#\9) {
|
|
10
10
|
border-collapse: separate;
|
|
11
11
|
border-spacing: 0;
|
|
12
12
|
box-sizing: border-box;
|
|
@@ -37,18 +37,27 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
37
37
|
-webkit-font-smoothing: auto;
|
|
38
38
|
-moz-osx-font-smoothing: auto;
|
|
39
39
|
display: flex;
|
|
40
|
+
}
|
|
41
|
+
.awsui_root-horizontal_o08jm_35ajp_41:not(#\9) {
|
|
40
42
|
flex-direction: row;
|
|
41
43
|
flex-wrap: nowrap;
|
|
42
44
|
align-items: flex-end;
|
|
43
45
|
}
|
|
46
|
+
.awsui_root-vertical_o08jm_35ajp_46:not(#\9) {
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
align-items: stretch;
|
|
49
|
+
}
|
|
44
50
|
|
|
45
|
-
.
|
|
51
|
+
.awsui_control_o08jm_35ajp_51:not(#\9) {
|
|
46
52
|
min-inline-size: 0;
|
|
47
53
|
isolation: isolate;
|
|
48
54
|
}
|
|
49
|
-
.
|
|
55
|
+
.awsui_control_o08jm_35ajp_51:not(#\9):focus-within {
|
|
50
56
|
z-index: 1;
|
|
51
57
|
}
|
|
52
|
-
.
|
|
58
|
+
.awsui_control-middle-horizontal_o08jm_35ajp_58:not(#\9), .awsui_control-last-horizontal_o08jm_35ajp_58:not(#\9) {
|
|
53
59
|
margin-inline-start: calc(-1 * var(--border-width-field-2365x3, 1px));
|
|
60
|
+
}
|
|
61
|
+
.awsui_control-middle-vertical_o08jm_35ajp_61:not(#\9), .awsui_control-last-vertical_o08jm_35ajp_61:not(#\9) {
|
|
62
|
+
margin-block-start: calc(-1 * var(--border-width-field-2365x3, 1px));
|
|
54
63
|
}
|
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"root": "
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"control
|
|
5
|
+
"root": "awsui_root_o08jm_35ajp_9",
|
|
6
|
+
"root-horizontal": "awsui_root-horizontal_o08jm_35ajp_41",
|
|
7
|
+
"root-vertical": "awsui_root-vertical_o08jm_35ajp_46",
|
|
8
|
+
"control": "awsui_control_o08jm_35ajp_51",
|
|
9
|
+
"control-middle-horizontal": "awsui_control-middle-horizontal_o08jm_35ajp_58",
|
|
10
|
+
"control-last-horizontal": "awsui_control-last-horizontal_o08jm_35ajp_58",
|
|
11
|
+
"control-middle-vertical": "awsui_control-middle-vertical_o08jm_35ajp_61",
|
|
12
|
+
"control-last-vertical": "awsui_control-last-vertical_o08jm_35ajp_61"
|
|
9
13
|
};
|
|
10
14
|
|
|
@@ -4,6 +4,12 @@ export interface FocusLockProps {
|
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
autoFocus?: boolean;
|
|
6
6
|
restoreFocus?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Element to focus when `autoFocus` captures focus. Defaults to the first
|
|
9
|
+
* focusable element in the container. Use this to focus an element that isn't
|
|
10
|
+
* keyboard-reachable, such as a heading with `tabIndex={-1}`.
|
|
11
|
+
*/
|
|
12
|
+
autoFocusTarget?: React.RefObject<HTMLElement>;
|
|
7
13
|
children: React.ReactNode;
|
|
8
14
|
}
|
|
9
15
|
export interface FocusLockRef {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/focus-lock/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAQ7F,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,UAAU,IAAI,IAAI,CAAC;CACpB;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/focus-lock/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAQ7F,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;OAIG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAC/C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,UAAU,IAAI,IAAI,CAAC;CACpB;;AA8ED,wBAA2C"}
|
|
@@ -5,7 +5,7 @@ import { nodeBelongs } from '@cloudscape-design/component-toolkit/dom';
|
|
|
5
5
|
import { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';
|
|
6
6
|
import TabTrap from '../tab-trap/index';
|
|
7
7
|
import { getFirstFocusable, getLastFocusable } from './utils';
|
|
8
|
-
function FocusLock({ className, disabled, autoFocus, restoreFocus, children }, ref) {
|
|
8
|
+
function FocusLock({ className, disabled, autoFocus, restoreFocus, autoFocusTarget, children }, ref) {
|
|
9
9
|
const restoreFocusTargetRef = useRef(null);
|
|
10
10
|
const containerRef = useRef(null);
|
|
11
11
|
const focusFirst = () => {
|
|
@@ -31,9 +31,14 @@ function FocusLock({ className, disabled, autoFocus, restoreFocus, children }, r
|
|
|
31
31
|
};
|
|
32
32
|
if (autoFocus && !disabled) {
|
|
33
33
|
assignRestoreFocusTarget();
|
|
34
|
-
|
|
34
|
+
if (autoFocusTarget === null || autoFocusTarget === void 0 ? void 0 : autoFocusTarget.current) {
|
|
35
|
+
autoFocusTarget.current.focus();
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
focusFirst();
|
|
39
|
+
}
|
|
35
40
|
}
|
|
36
|
-
}, [autoFocus, disabled]);
|
|
41
|
+
}, [autoFocus, disabled, autoFocusTarget]);
|
|
37
42
|
// Restore focus if `restoreFocus` is set, and `disabled` changes from false to true.
|
|
38
43
|
const [previouslyDisabled, setPreviouslyDisabled] = useState(!!disabled);
|
|
39
44
|
useEffect(() => {
|