@cloudscape-design/components 3.0.1408 → 3.0.1410
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/index.d.ts.map +1 -1
- package/autosuggest/index.js +1 -1
- package/autosuggest/index.js.map +1 -1
- package/autosuggest/internal.d.ts +8 -1
- package/autosuggest/internal.d.ts.map +1 -1
- package/autosuggest/internal.js +2 -2
- package/autosuggest/internal.js.map +1 -1
- package/autosuggest/styles.css.js +3 -3
- package/autosuggest/styles.scoped.css +5 -3
- package/autosuggest/styles.selectors.js +3 -3
- package/button-dropdown/filter.d.ts +1 -1
- package/button-dropdown/filter.d.ts.map +1 -1
- package/cards/index.js +1 -1
- package/cards/index.js.map +1 -1
- package/container/internal.d.ts +3 -2
- package/container/internal.d.ts.map +1 -1
- package/container/internal.js +2 -2
- package/container/internal.js.map +1 -1
- package/container/use-sticky-header.d.ts +0 -14
- package/container/use-sticky-header.d.ts.map +1 -1
- package/container/use-sticky-header.js +9 -92
- package/container/use-sticky-header.js.map +1 -1
- package/copy-to-clipboard/internal.d.ts.map +1 -1
- package/copy-to-clipboard/internal.js +2 -16
- package/copy-to-clipboard/internal.js.map +1 -1
- package/copy-to-clipboard/styles.css.js +10 -10
- package/copy-to-clipboard/styles.scoped.css +19 -19
- package/copy-to-clipboard/styles.selectors.js +10 -10
- package/flashbar/collapsible-flashbar.d.ts +1 -0
- package/flashbar/collapsible-flashbar.d.ts.map +1 -1
- package/flashbar/collapsible-flashbar.js +10 -4
- package/flashbar/collapsible-flashbar.js.map +1 -1
- package/flashbar/flash.d.ts +6 -0
- package/flashbar/flash.d.ts.map +1 -1
- package/flashbar/flash.js +6 -6
- package/flashbar/flash.js.map +1 -1
- package/flashbar/internal-interfaces.d.ts +11 -1
- package/flashbar/internal-interfaces.d.ts.map +1 -1
- package/flashbar/internal-interfaces.js.map +1 -1
- package/flashbar/non-collapsible-flashbar.d.ts.map +1 -1
- package/flashbar/non-collapsible-flashbar.js +8 -1
- package/flashbar/non-collapsible-flashbar.js.map +1 -1
- package/flashbar/styles.css.js +50 -50
- package/flashbar/styles.scoped.css +184 -161
- package/flashbar/styles.selectors.js +50 -50
- package/icon/generated/icons.d.ts +4 -0
- package/icon/generated/icons.d.ts.map +1 -1
- package/icon/generated/icons.js +14 -0
- package/icon/generated/icons.js.map +1 -1
- package/icon/styles.css.js +44 -43
- package/icon/styles.scoped.css +109 -107
- package/icon/styles.selectors.js +44 -43
- package/icon-provider/interfaces.d.ts +1 -1
- package/icon-provider/interfaces.d.ts.map +1 -1
- package/icon-provider/interfaces.js.map +1 -1
- package/input/internal.d.ts +1 -1
- package/input/internal.d.ts.map +1 -1
- package/input/internal.js +4 -2
- package/input/internal.js.map +1 -1
- package/input/styles.css.js +45 -44
- package/input/styles.scoped.css +102 -94
- package/input/styles.selectors.js +45 -44
- package/internal/base-component/styles.scoped.css +1 -1
- 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 +22 -61
- package/internal/components/autosuggest-input/index.js.map +1 -1
- package/internal/components/autosuggest-input/inline-tokens.d.ts +1 -0
- package/internal/components/autosuggest-input/inline-tokens.d.ts.map +1 -1
- package/internal/components/autosuggest-input/inline-tokens.js +4 -2
- package/internal/components/autosuggest-input/inline-tokens.js.map +1 -1
- package/internal/components/autosuggest-input/styles.css.js +11 -33
- package/internal/components/autosuggest-input/styles.scoped.css +15 -233
- package/internal/components/autosuggest-input/styles.selectors.js +11 -33
- package/internal/components/autosuggest-input/use-token-overflow.d.ts +7 -11
- package/internal/components/autosuggest-input/use-token-overflow.d.ts.map +1 -1
- package/internal/components/autosuggest-input/use-token-overflow.js +16 -29
- package/internal/components/autosuggest-input/use-token-overflow.js.map +1 -1
- package/internal/components/option/index.d.ts.map +1 -1
- package/internal/components/option/index.js +2 -2
- package/internal/components/option/index.js.map +1 -1
- package/internal/components/option/styles.css.js +19 -18
- package/internal/components/option/styles.scoped.css +39 -33
- package/internal/components/option/styles.selectors.js +19 -18
- package/internal/components/radio-button/index.d.ts +1 -1
- package/internal/components/radio-button/index.d.ts.map +1 -1
- package/internal/components/radio-button/index.js.map +1 -1
- package/internal/components/radio-button/styles.css.js +7 -7
- package/internal/components/radio-button/styles.scoped.css +36 -12
- package/internal/components/radio-button/styles.selectors.js +7 -7
- package/internal/components/sortable-area/index.d.ts.map +1 -1
- package/internal/components/sortable-area/index.js +34 -4
- package/internal/components/sortable-area/index.js.map +1 -1
- package/internal/components/sortable-area/keyboard-sensor/index.js +1 -1
- package/internal/components/sortable-area/keyboard-sensor/index.js.map +1 -1
- package/{table → internal/components/sticky-header}/sticky-scrolling.d.ts +1 -6
- package/internal/components/sticky-header/sticky-scrolling.d.ts.map +1 -0
- package/{table → internal/components/sticky-header}/sticky-scrolling.js +2 -7
- package/internal/components/sticky-header/sticky-scrolling.js.map +1 -0
- package/internal/components/sticky-header/use-cells-resize-observer.d.ts +1 -0
- package/internal/components/sticky-header/use-cells-resize-observer.d.ts.map +1 -0
- package/internal/components/sticky-header/use-cells-resize-observer.js +39 -0
- package/internal/components/sticky-header/use-cells-resize-observer.js.map +1 -0
- package/internal/components/sticky-header/use-header-stuck.d.ts +7 -0
- package/internal/components/sticky-header/use-header-stuck.d.ts.map +1 -0
- package/internal/components/sticky-header/use-header-stuck.js +35 -0
- package/internal/components/sticky-header/use-header-stuck.js.map +1 -0
- package/internal/components/sticky-header/use-sticky-header-copy.d.ts +19 -0
- package/internal/components/sticky-header/use-sticky-header-copy.d.ts.map +1 -0
- package/{table/use-sticky-header.js → internal/components/sticky-header/use-sticky-header-copy.js} +7 -8
- package/internal/components/sticky-header/use-sticky-header-copy.js.map +1 -0
- package/internal/components/sticky-header/use-sticky-position.d.ts +27 -0
- package/internal/components/sticky-header/use-sticky-position.d.ts.map +1 -0
- package/internal/components/sticky-header/use-sticky-position.js +57 -0
- package/internal/components/sticky-header/use-sticky-position.js.map +1 -0
- package/internal/environment.js +2 -2
- package/internal/environment.json +2 -2
- package/internal/manifest.json +1 -1
- package/manifest.json +2 -2
- package/multiselect/index.d.ts.map +1 -1
- package/multiselect/index.js +1 -1
- package/multiselect/index.js.map +1 -1
- package/multiselect/internal.d.ts +12 -1
- package/multiselect/internal.d.ts.map +1 -1
- package/multiselect/internal.js +10 -6
- package/multiselect/internal.js.map +1 -1
- package/multiselect/styles.css.js +5 -5
- package/multiselect/styles.scoped.css +17 -5
- package/multiselect/styles.selectors.js +5 -5
- package/package.json +1 -1
- package/radio-button/styles.css.js +1 -1
- package/radio-button/styles.scoped.css +1 -25
- package/radio-button/styles.selectors.js +1 -1
- package/radio-group/internal.d.ts +7 -1
- package/radio-group/internal.d.ts.map +1 -1
- package/radio-group/internal.js +2 -2
- package/radio-group/internal.js.map +1 -1
- package/radio-group/styles.css.js +5 -5
- package/radio-group/styles.scoped.css +7 -6
- package/radio-group/styles.selectors.js +5 -5
- package/segmented-control/internal-segmented-control.d.ts +4 -1
- package/segmented-control/internal-segmented-control.d.ts.map +1 -1
- package/segmented-control/internal-segmented-control.js +3 -3
- package/segmented-control/internal-segmented-control.js.map +1 -1
- package/segmented-control/internal.d.ts +11 -1
- package/segmented-control/internal.d.ts.map +1 -1
- package/segmented-control/internal.js +3 -2
- package/segmented-control/internal.js.map +1 -1
- package/segmented-control/segment.d.ts +2 -0
- package/segmented-control/segment.d.ts.map +1 -1
- package/segmented-control/segment.js +4 -2
- package/segmented-control/segment.js.map +1 -1
- package/segmented-control/styles.css.js +31 -31
- package/segmented-control/styles.scoped.css +119 -82
- package/segmented-control/styles.selectors.js +31 -31
- package/select/index.d.ts.map +1 -1
- package/select/index.js +1 -1
- package/select/index.js.map +1 -1
- package/select/internal.d.ts +8 -0
- package/select/internal.d.ts.map +1 -1
- package/select/internal.js +5 -5
- package/select/internal.js.map +1 -1
- package/select/parts/filter.d.ts +1 -1
- package/select/parts/filter.d.ts.map +1 -1
- package/select/parts/styles.css.js +22 -21
- package/select/parts/styles.scoped.css +28 -24
- package/select/parts/styles.selectors.js +22 -21
- package/select/parts/trigger.d.ts +6 -0
- package/select/parts/trigger.d.ts.map +1 -1
- package/select/parts/trigger.js +4 -4
- package/select/parts/trigger.js.map +1 -1
- package/select/styles.css.js +3 -3
- package/select/styles.scoped.css +14 -3
- package/select/styles.selectors.js +3 -3
- package/styling/autosuggest.scss +1 -0
- package/styling/flashbar.scss +127 -0
- package/styling/multiselect.scss +80 -0
- package/styling/radio-group.scss +1 -0
- package/styling/segmented-control.scss +111 -0
- package/styling/select.scss +80 -0
- package/table/resizer/styles.css.js +17 -17
- package/table/resizer/styles.scoped.css +30 -29
- package/table/resizer/styles.selectors.js +17 -17
- package/table/sticky-header.d.ts.map +1 -1
- package/table/sticky-header.js +8 -2
- package/table/sticky-header.js.map +1 -1
- package/table/styles.css.js +37 -37
- package/table/styles.scoped.css +47 -47
- package/table/styles.selectors.js +37 -37
- package/table/use-column-widths.d.ts.map +1 -1
- package/table/use-column-widths.js +4 -16
- package/table/use-column-widths.js.map +1 -1
- package/toggle/internal.d.ts.map +1 -1
- package/toggle/internal.js +1 -1
- package/toggle/internal.js.map +1 -1
- package/token-group/internal.d.ts +5 -0
- package/token-group/internal.d.ts.map +1 -1
- package/token-group/internal.js +2 -2
- package/token-group/internal.js.map +1 -1
- package/table/sticky-scrolling.d.ts.map +0 -1
- package/table/sticky-scrolling.js.map +0 -1
- package/table/use-sticky-header.d.ts +0 -5
- package/table/use-sticky-header.d.ts.map +0 -1
- package/table/use-sticky-header.js.map +0 -1
package/select/internal.js
CHANGED
|
@@ -29,7 +29,7 @@ import { composeDropdownContent } from './utils/dropdown-customization';
|
|
|
29
29
|
import { useNativeSearch } from './utils/use-native-search';
|
|
30
30
|
import { useSelect } from './utils/use-select';
|
|
31
31
|
import styles from './styles.css.js';
|
|
32
|
-
const InternalSelect = React.forwardRef(({ options, filteringType = 'none', filteringPlaceholder, filteringAriaLabel, filteringClearAriaLabel, filteringResultsText, inlineLabelText, ariaRequired, placeholder, disabled, readOnly, ariaLabel, statusType = 'finished', empty, loadingText, finishedText, errorText, noMatch, triggerVariant = 'label', renderHighlightedAriaLive, selectedOption, onBlur, onFocus, onLoadItems, onChange, virtualScroll, expandToViewport, autoFocus, __inFilteringToken, __internalRootRef, renderOption, renderDropdownHeader, renderDropdownFooter, dropdownRole, dropdownAriaDescribedby, ...restProps }, externalRef) => {
|
|
32
|
+
const InternalSelect = React.forwardRef(({ options, filteringType = 'none', filteringPlaceholder, filteringAriaLabel, filteringClearAriaLabel, filteringResultsText, inlineLabelText, ariaRequired, placeholder, disabled, readOnly, ariaLabel, statusType = 'finished', empty, loadingText, finishedText, errorText, noMatch, triggerVariant = 'label', renderHighlightedAriaLive, selectedOption, onBlur, onFocus, onLoadItems, onChange, virtualScroll, expandToViewport, autoFocus, __inFilteringToken, __internalRootRef, renderOption, renderDropdownHeader, renderDropdownFooter, dropdownRole, dropdownAriaDescribedby, styleClassNames, ...restProps }, externalRef) => {
|
|
33
33
|
var _a;
|
|
34
34
|
const baseProps = getBaseProps(restProps);
|
|
35
35
|
const formFieldContext = useFormFieldContext(restProps);
|
|
@@ -65,7 +65,7 @@ const InternalSelect = React.forwardRef(({ options, filteringType = 'none', filt
|
|
|
65
65
|
const rootRef = useRef(null);
|
|
66
66
|
const triggerRef = useRef(null);
|
|
67
67
|
const [triggerWidth, setTriggerWidth] = useState(null);
|
|
68
|
-
useResizeObserver(() => triggerRef.current, entry =>
|
|
68
|
+
useResizeObserver(() => triggerRef.current, entry => setTriggerWidth(entry.borderBoxWidth));
|
|
69
69
|
const selfControlId = useUniqueId('trigger');
|
|
70
70
|
const controlId = (_a = formFieldContext.controlId) !== null && _a !== void 0 ? _a : selfControlId;
|
|
71
71
|
const scrollToIndex = useRef(null);
|
|
@@ -99,8 +99,8 @@ const InternalSelect = React.forwardRef(({ options, filteringType = 'none', filt
|
|
|
99
99
|
const dropdownContentProps = { filterText: filteringValue, closeDropdown };
|
|
100
100
|
const customDropdownHeader = renderDropdownHeader === null || renderDropdownHeader === void 0 ? void 0 : renderDropdownHeader(dropdownContentProps);
|
|
101
101
|
const customDropdownFooter = renderDropdownFooter === null || renderDropdownFooter === void 0 ? void 0 : renderDropdownFooter(dropdownContentProps);
|
|
102
|
-
const filter = (React.createElement(Filter, { clearAriaLabel: filteringClearAriaLabel, filteringType: filteringType, placeholder: filteringPlaceholder, ariaLabel: filteringAriaLabel, ariaRequired: ariaRequired, value: filteringValue, ...getFilterProps() }));
|
|
103
|
-
const trigger = (React.createElement(Trigger, { renderOption: renderOption, ref: triggerRef, placeholder: placeholder, disabled: disabled, readOnly: readOnly, triggerVariant: triggerVariant, triggerProps: getTriggerProps(disabled, autoFocus), selectedOption: selectedOption, isOpen: isOpen, inFilteringToken: __inFilteringToken, groupedControlProps: groupedControlProps, inlineLabelText: inlineLabelText, ...formFieldContext, controlId: controlId, ariaLabelledby: joinStrings(formFieldContext.ariaLabelledby, selectAriaLabelId) }));
|
|
102
|
+
const filter = (React.createElement(Filter, { clearAriaLabel: filteringClearAriaLabel, filteringType: filteringType, placeholder: filteringPlaceholder, ariaLabel: filteringAriaLabel, ariaRequired: ariaRequired, value: filteringValue, styleClassNames: styleClassNames === null || styleClassNames === void 0 ? void 0 : styleClassNames.filter, ...getFilterProps() }));
|
|
103
|
+
const trigger = (React.createElement(Trigger, { renderOption: renderOption, ref: triggerRef, placeholder: placeholder, disabled: disabled, readOnly: readOnly, triggerVariant: triggerVariant, triggerProps: getTriggerProps(disabled, autoFocus), selectedOption: selectedOption, isOpen: isOpen, inFilteringToken: __inFilteringToken, groupedControlProps: groupedControlProps, inlineLabelText: inlineLabelText, styleClassNames: { trigger: styleClassNames === null || styleClassNames === void 0 ? void 0 : styleClassNames.trigger, inlineLabel: styleClassNames === null || styleClassNames === void 0 ? void 0 : styleClassNames.inlineLabel }, ...formFieldContext, controlId: controlId, ariaLabelledby: joinStrings(formFieldContext.ariaLabelledby, selectAriaLabelId) }));
|
|
104
104
|
const isEmpty = !options || options.length === 0;
|
|
105
105
|
const isNoMatch = filteredOptions && filteredOptions.length === 0;
|
|
106
106
|
const isFiltered = filteringType !== 'none' && filteringValue.length > 0 && filteredOptions && filteredOptions.length > 0;
|
|
@@ -160,7 +160,7 @@ const InternalSelect = React.forwardRef(({ options, filteringType = 'none', filt
|
|
|
160
160
|
hasOptions.current = hasOptions.current || options.length > 0;
|
|
161
161
|
return (React.createElement(ResetGroupedControlContext, null,
|
|
162
162
|
React.createElement("div", { ...baseProps, ref: mergedRef, className: clsx(styles.root, baseProps.className), onKeyDown: handleNativeSearch },
|
|
163
|
-
React.createElement(Dropdown, { ...dropdownProps, ariaLabelledby: dropdownProps.ariaRole ? joinStrings(selectAriaLabelId, controlId) : undefined, ariaDescribedby: dropdownProps.ariaRole
|
|
163
|
+
React.createElement(Dropdown, { ...dropdownProps, styleClassNames: { container: styleClassNames === null || styleClassNames === void 0 ? void 0 : styleClassNames.dropdown }, ariaLabelledby: dropdownProps.ariaRole ? joinStrings(selectAriaLabelId, controlId) : undefined, ariaDescribedby: dropdownProps.ariaRole
|
|
164
164
|
? joinStrings(dropdownStatus.content ? footerId : undefined, dropdownAriaDescribedby)
|
|
165
165
|
: undefined, open: isOpen, stretchTriggerHeight: !!__inFilteringToken, minWidth: getDropdownMinWidth({ expandToViewport: effectiveExpandToViewport, triggerWidth }), maxWidth: getBreakpointValue('xxs'), trigger: trigger, header: dropdownHeader, onMouseDown: handleMouseDown, footer: dropdownFooter, expandToViewport: effectiveExpandToViewport,
|
|
166
166
|
// Forces dropdown position recalculation when new options are loaded
|
package/select/internal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/select/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,IAAI,MAAM,MAAM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I,EAClD,mBAAmB,EAAE,YAAY,EACjC,aAAa,EAAE,aAAa,GAC5B,GAEJ;YACF,6BAAK,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,iBAAiB,IACrC,SAAS,IAAI,eAAe,CACzB,CACF,CACqB,CAC9B,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, useResizeObserver, useUniqueId, warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport Dropdown from '../dropdown/internal';\nimport { useInternalI18n } from '../i18n/context.js';\nimport { getBaseProps } from '../internal/base-component';\nimport { getBreakpointValue } from '../internal/breakpoints';\nimport DropdownFooter from '../internal/components/dropdown-footer';\nimport { useDropdownStatus } from '../internal/components/dropdown-status';\nimport { singleSelection } from '../internal/components/listbox/selection/single-selection';\nimport { useAnnouncement } from '../internal/components/listbox/use-announcement';\nimport { checkOptionValueField } from '../internal/components/listbox/utils/check-option-value-field';\nimport { prepareOptions } from '../internal/components/option/utils/prepare-options.js';\nimport { ResetGroupedControlContext, useGroupedControlContext } from '../internal/context/control-group-context';\nimport { useFormFieldContext } from '../internal/context/form-field-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { warnOnUnsupportedGroupedControlProps } from '../internal/grouped-control/dev-warnings';\nimport checkControlled from '../internal/hooks/check-controlled';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useLoadItems } from '../internal/hooks/use-load-items';\nimport { SomeRequired } from '../internal/types';\nimport { getDropdownMinWidth } from '../internal/utils/get-dropdown-min-width';\nimport { joinStrings } from '../internal/utils/strings/join-strings.js';\nimport { OptionGroup } from '../types/option';\nimport { SelectProps } from './interfaces';\nimport Filter from './parts/filter';\nimport PlainList, { SelectListProps } from './parts/plain-list';\nimport Trigger from './parts/trigger';\nimport VirtualList from './parts/virtual-list';\nimport { composeDropdownContent } from './utils/dropdown-customization';\nimport { useNativeSearch } from './utils/use-native-search';\nimport { useSelect } from './utils/use-select';\n\nimport styles from './styles.css.js';\n\nexport interface InternalSelectProps extends SomeRequired<SelectProps, 'options'>, InternalBaseComponentProps {\n __inFilteringToken?: 'root' | 'nested';\n}\n\nconst InternalSelect = React.forwardRef(\n (\n {\n options,\n filteringType = 'none',\n filteringPlaceholder,\n filteringAriaLabel,\n filteringClearAriaLabel,\n filteringResultsText,\n inlineLabelText,\n ariaRequired,\n placeholder,\n disabled,\n readOnly,\n ariaLabel,\n statusType = 'finished',\n empty,\n loadingText,\n finishedText,\n errorText,\n noMatch,\n triggerVariant = 'label',\n renderHighlightedAriaLive,\n selectedOption,\n onBlur,\n onFocus,\n onLoadItems,\n onChange,\n virtualScroll,\n expandToViewport,\n autoFocus,\n __inFilteringToken,\n __internalRootRef,\n renderOption,\n renderDropdownHeader,\n renderDropdownFooter,\n dropdownRole,\n dropdownAriaDescribedby,\n ...restProps\n }: InternalSelectProps,\n externalRef: React.Ref<SelectProps.Ref>\n ) => {\n const baseProps = getBaseProps(restProps);\n const formFieldContext = useFormFieldContext(restProps);\n const groupedControlProps = useGroupedControlContext();\n\n warnOnUnsupportedGroupedControlProps({\n isGrouped: !!groupedControlProps.position,\n componentName: 'Select',\n invalid: formFieldContext.invalid,\n warning: formFieldContext.warning,\n readOnly,\n expandToViewport,\n });\n\n // When grouped, the dropdown is portaled regardless of the public\n // `expandToViewport` prop so it escapes the control slot's stacking context\n // and paints over the group's inline label (which the focus ring stays under).\n const effectiveExpandToViewport = expandToViewport || !!groupedControlProps.position;\n\n const i18n = useInternalI18n('select');\n const errorIconAriaLabel = i18n('errorIconAriaLabel', restProps.errorIconAriaLabel);\n const selectedAriaLabel = i18n('selectedAriaLabel', restProps.selectedAriaLabel);\n const recoveryText = i18n('recoveryText', restProps.recoveryText);\n\n if (restProps.recoveryText && !onLoadItems) {\n warnOnce('Select', '`onLoadItems` must be provided for `recoveryText` to be displayed.');\n }\n\n const { handleLoadMore, handleRecoveryClick, fireLoadItems } = useLoadItems({\n onLoadItems,\n isEmpty: options.length === 0,\n statusType,\n });\n\n checkControlled('Select', 'selectedOption', selectedOption, 'onChange', onChange);\n\n checkOptionValueField('Select', 'options', options);\n\n const [filteringValue, setFilteringValue] = useState('');\n\n const { filteredOptions, parentMap, totalCount, matchesCount } = prepareOptions(\n options,\n filteringType,\n filteringValue\n );\n\n const rootRef = useRef<HTMLDivElement>(null);\n const triggerRef = useRef<HTMLButtonElement>(null);\n const [triggerWidth, setTriggerWidth] = useState<number | null>(null);\n useResizeObserver(\n () => triggerRef.current,\n entry => entry.borderBoxWidth > 0 && setTriggerWidth(entry.borderBoxWidth)\n );\n\n const selfControlId = useUniqueId('trigger');\n const controlId = formFieldContext.controlId ?? selfControlId;\n\n const scrollToIndex = useRef<SelectListProps.SelectListRef>(null);\n const selectedOptions = selectedOption ? [selectedOption] : [];\n const {\n isOpen,\n highlightType,\n highlightedOption,\n highlightedIndex,\n getTriggerProps,\n getDropdownProps,\n getFilterProps,\n getMenuProps,\n getOptionProps,\n highlightOption,\n selectOption,\n announceSelected,\n focusActiveRef,\n closeDropdown,\n } = useSelect({\n selectedOptions,\n selection: singleSelection(selectedOptions),\n updateSelectedOption: option => fireNonCancelableEvent(onChange, { selectedOption: option }),\n options: filteredOptions,\n filteringType,\n onBlur,\n onFocus,\n externalRef,\n fireLoadItems,\n setFilteringValue,\n statusType,\n dropdownRole,\n });\n\n const handleNativeSearch = useNativeSearch({\n isEnabled: filteringType === 'none' && !readOnly,\n options: filteredOptions,\n highlightOption: !isOpen ? selectOption : highlightOption,\n highlightedOption: !isOpen ? selectedOption : highlightedOption?.option,\n });\n\n const selectAriaLabelId = useUniqueId('select-arialabel-');\n const footerId = useUniqueId('footer');\n\n useEffect(() => {\n scrollToIndex.current?.(highlightedIndex);\n }, [highlightedIndex]);\n\n const dropdownContentProps: SelectProps.DropdownContentProps = { filterText: filteringValue, closeDropdown };\n const customDropdownHeader = renderDropdownHeader?.(dropdownContentProps);\n const customDropdownFooter = renderDropdownFooter?.(dropdownContentProps);\n\n const filter = (\n <Filter\n clearAriaLabel={filteringClearAriaLabel}\n filteringType={filteringType}\n placeholder={filteringPlaceholder}\n ariaLabel={filteringAriaLabel}\n ariaRequired={ariaRequired}\n value={filteringValue}\n {...getFilterProps()}\n />\n );\n\n const trigger = (\n <Trigger\n renderOption={renderOption}\n ref={triggerRef}\n placeholder={placeholder}\n disabled={disabled}\n readOnly={readOnly}\n triggerVariant={triggerVariant}\n triggerProps={getTriggerProps(disabled, autoFocus)}\n selectedOption={selectedOption}\n isOpen={isOpen}\n inFilteringToken={__inFilteringToken}\n groupedControlProps={groupedControlProps}\n inlineLabelText={inlineLabelText}\n {...formFieldContext}\n controlId={controlId}\n ariaLabelledby={joinStrings(formFieldContext.ariaLabelledby, selectAriaLabelId)}\n />\n );\n\n const isEmpty = !options || options.length === 0;\n const isNoMatch = filteredOptions && filteredOptions.length === 0;\n const isFiltered =\n filteringType !== 'none' && filteringValue.length > 0 && filteredOptions && filteredOptions.length > 0;\n const filteredText = isFiltered ? filteringResultsText?.(matchesCount, totalCount) : undefined;\n\n const dropdownStatus = useDropdownStatus({\n statusType,\n empty,\n loadingText,\n finishedText,\n errorText,\n recoveryText,\n isEmpty,\n isNoMatch,\n noMatch,\n filteringResultsText: filteredText,\n errorIconAriaLabel,\n onRecoveryClick: () => {\n handleRecoveryClick();\n focusActiveRef();\n },\n hasRecoveryCallback: !!onLoadItems,\n });\n\n const statusFooter = dropdownStatus.isSticky ? (\n <DropdownFooter content={isOpen ? dropdownStatus.content : null} id={footerId} />\n ) : null;\n const { header: dropdownHeader, footer: dropdownFooter } = composeDropdownContent({\n filter,\n customDropdownHeader,\n customDropdownFooter,\n statusFooter,\n dropdownHeaderClass: styles['dropdown-header'],\n dropdownFooterClass: styles['dropdown-footer'],\n });\n\n const menuProps = {\n ...getMenuProps(),\n onLoadMore: handleLoadMore,\n ariaLabelledby: joinStrings(selectAriaLabelId, controlId),\n ariaDescribedby: joinStrings(dropdownStatus.content ? footerId : undefined, dropdownAriaDescribedby),\n ariaRequired,\n };\n\n const announcement = useAnnouncement({\n announceSelected,\n highlightedOption,\n getParent: option => parentMap.get(option)?.option as undefined | OptionGroup,\n selectedAriaLabel,\n renderHighlightedAriaLive,\n });\n\n const ListComponent = virtualScroll ? VirtualList : PlainList;\n\n const handleMouseDown = (event: React.MouseEvent) => {\n const target = event.target as HTMLElement;\n\n if (target !== document.activeElement) {\n // prevent currently focused element from losing it\n event.preventDefault();\n }\n };\n\n const mergedRef = useMergeRefs(rootRef, __internalRootRef);\n\n const dropdownProps = getDropdownProps();\n\n const hasOptions = useRef(options.length > 0);\n hasOptions.current = hasOptions.current || options.length > 0;\n\n return (\n <ResetGroupedControlContext>\n <div\n {...baseProps}\n ref={mergedRef}\n className={clsx(styles.root, baseProps.className)}\n onKeyDown={handleNativeSearch}\n >\n <Dropdown\n {...dropdownProps}\n ariaLabelledby={dropdownProps.ariaRole ? joinStrings(selectAriaLabelId, controlId) : undefined}\n ariaDescribedby={\n dropdownProps.ariaRole\n ? joinStrings(dropdownStatus.content ? footerId : undefined, dropdownAriaDescribedby)\n : undefined\n }\n open={isOpen}\n stretchTriggerHeight={!!__inFilteringToken}\n minWidth={getDropdownMinWidth({ expandToViewport: effectiveExpandToViewport, triggerWidth })}\n maxWidth={getBreakpointValue('xxs')} // AWSUI-19898\n trigger={trigger}\n header={dropdownHeader}\n onMouseDown={handleMouseDown}\n footer={dropdownFooter}\n expandToViewport={effectiveExpandToViewport}\n // Forces dropdown position recalculation when new options are loaded\n contentKey={hasOptions.current.toString()}\n content={\n <ListComponent\n listBottom={\n !dropdownStatus.isSticky ? (\n <DropdownFooter content={isOpen ? dropdownStatus.content : null} id={footerId} />\n ) : null\n }\n renderOption={renderOption}\n menuProps={menuProps}\n getOptionProps={getOptionProps}\n filteredOptions={filteredOptions}\n filteringValue={filteringValue}\n ref={scrollToIndex}\n hasDropdownStatus={dropdownStatus.content !== null}\n screenReaderContent={announcement}\n highlightType={highlightType}\n />\n }\n />\n <div hidden={true} id={selectAriaLabelId}>\n {ariaLabel || inlineLabelText}\n </div>\n </div>\n </ResetGroupedControlContext>\n );\n }\n);\n\nexport default InternalSelect;\n"]}
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/select/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEvH,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,cAAc,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AAC5F,OAAO,EAAE,eAAe,EAAE,MAAM,iDAAiD,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,+DAA+D,CAAC;AACtG,OAAO,EAAE,cAAc,EAAE,MAAM,wDAAwD,CAAC;AACxF,OAAO,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACjH,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,oCAA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AE,CAAC,EAC5F,QAAQ,EAAE,kBAAkB,CAAC,KAAK,CAAC,EACnC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,cAAc,EACtB,WAAW,EAAE,eAAe,EAC5B,MAAM,EAAE,cAAc,EACtB,gBAAgB,EAAE,yBAAyB;gBAC3C,qEAAqE;gBACrE,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC,QAAQ,EAAE,EACzC,OAAO,EACL,oBAAC,aAAa,IACZ,UAAU,EACR,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CACzB,oBAAC,cAAc,IAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,GAAI,CAClF,CAAC,CAAC,CAAC,IAAI,EAEV,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EAChC,cAAc,EAAE,cAAc,EAC9B,GAAG,EAAE,aAAa,EAClB,iBAAiB,EAAE,cAAc,CAAC,OAAO,KAAK,IAAI,EAClD,mBAAmB,EAAE,YAAY,EACjC,aAAa,EAAE,aAAa,GAC5B,GAEJ;YACF,6BAAK,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,iBAAiB,IACrC,SAAS,IAAI,eAAe,CACzB,CACF,CACqB,CAC9B,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, useResizeObserver, useUniqueId, warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport Dropdown from '../dropdown/internal';\nimport { useInternalI18n } from '../i18n/context.js';\nimport { StyleClassNames as InputStyleClassNames } from '../input/internal';\nimport { getBaseProps } from '../internal/base-component';\nimport { getBreakpointValue } from '../internal/breakpoints';\nimport DropdownFooter from '../internal/components/dropdown-footer';\nimport { useDropdownStatus } from '../internal/components/dropdown-status';\nimport { singleSelection } from '../internal/components/listbox/selection/single-selection';\nimport { useAnnouncement } from '../internal/components/listbox/use-announcement';\nimport { checkOptionValueField } from '../internal/components/listbox/utils/check-option-value-field';\nimport { prepareOptions } from '../internal/components/option/utils/prepare-options.js';\nimport { ResetGroupedControlContext, useGroupedControlContext } from '../internal/context/control-group-context';\nimport { useFormFieldContext } from '../internal/context/form-field-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { warnOnUnsupportedGroupedControlProps } from '../internal/grouped-control/dev-warnings';\nimport checkControlled from '../internal/hooks/check-controlled';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useLoadItems } from '../internal/hooks/use-load-items';\nimport { SomeRequired } from '../internal/types';\nimport { getDropdownMinWidth } from '../internal/utils/get-dropdown-min-width';\nimport { joinStrings } from '../internal/utils/strings/join-strings.js';\nimport { OptionGroup } from '../types/option';\nimport { SelectProps } from './interfaces';\nimport Filter from './parts/filter';\nimport PlainList, { SelectListProps } from './parts/plain-list';\nimport Trigger from './parts/trigger';\nimport VirtualList from './parts/virtual-list';\nimport { composeDropdownContent } from './utils/dropdown-customization';\nimport { useNativeSearch } from './utils/use-native-search';\nimport { useSelect } from './utils/use-select';\n\nimport styles from './styles.css.js';\n\nexport interface InternalSelectProps extends SomeRequired<SelectProps, 'options'>, InternalBaseComponentProps {\n __inFilteringToken?: 'root' | 'nested';\n styleClassNames?: StyleClassNames;\n}\n\n// Style API v2\nexport interface StyleClassNames {\n trigger?: string;\n inlineLabel?: string;\n filter?: InputStyleClassNames;\n dropdown?: string;\n}\n\nconst InternalSelect = React.forwardRef(\n (\n {\n options,\n filteringType = 'none',\n filteringPlaceholder,\n filteringAriaLabel,\n filteringClearAriaLabel,\n filteringResultsText,\n inlineLabelText,\n ariaRequired,\n placeholder,\n disabled,\n readOnly,\n ariaLabel,\n statusType = 'finished',\n empty,\n loadingText,\n finishedText,\n errorText,\n noMatch,\n triggerVariant = 'label',\n renderHighlightedAriaLive,\n selectedOption,\n onBlur,\n onFocus,\n onLoadItems,\n onChange,\n virtualScroll,\n expandToViewport,\n autoFocus,\n __inFilteringToken,\n __internalRootRef,\n renderOption,\n renderDropdownHeader,\n renderDropdownFooter,\n dropdownRole,\n dropdownAriaDescribedby,\n styleClassNames,\n ...restProps\n }: InternalSelectProps,\n externalRef: React.Ref<SelectProps.Ref>\n ) => {\n const baseProps = getBaseProps(restProps);\n const formFieldContext = useFormFieldContext(restProps);\n const groupedControlProps = useGroupedControlContext();\n\n warnOnUnsupportedGroupedControlProps({\n isGrouped: !!groupedControlProps.position,\n componentName: 'Select',\n invalid: formFieldContext.invalid,\n warning: formFieldContext.warning,\n readOnly,\n expandToViewport,\n });\n\n // When grouped, the dropdown is portaled regardless of the public\n // `expandToViewport` prop so it escapes the control slot's stacking context\n // and paints over the group's inline label (which the focus ring stays under).\n const effectiveExpandToViewport = expandToViewport || !!groupedControlProps.position;\n\n const i18n = useInternalI18n('select');\n const errorIconAriaLabel = i18n('errorIconAriaLabel', restProps.errorIconAriaLabel);\n const selectedAriaLabel = i18n('selectedAriaLabel', restProps.selectedAriaLabel);\n const recoveryText = i18n('recoveryText', restProps.recoveryText);\n\n if (restProps.recoveryText && !onLoadItems) {\n warnOnce('Select', '`onLoadItems` must be provided for `recoveryText` to be displayed.');\n }\n\n const { handleLoadMore, handleRecoveryClick, fireLoadItems } = useLoadItems({\n onLoadItems,\n isEmpty: options.length === 0,\n statusType,\n });\n\n checkControlled('Select', 'selectedOption', selectedOption, 'onChange', onChange);\n\n checkOptionValueField('Select', 'options', options);\n\n const [filteringValue, setFilteringValue] = useState('');\n\n const { filteredOptions, parentMap, totalCount, matchesCount } = prepareOptions(\n options,\n filteringType,\n filteringValue\n );\n\n const rootRef = useRef<HTMLDivElement>(null);\n const triggerRef = useRef<HTMLButtonElement>(null);\n const [triggerWidth, setTriggerWidth] = useState<number | null>(null);\n useResizeObserver(\n () => triggerRef.current,\n entry => setTriggerWidth(entry.borderBoxWidth)\n );\n\n const selfControlId = useUniqueId('trigger');\n const controlId = formFieldContext.controlId ?? selfControlId;\n\n const scrollToIndex = useRef<SelectListProps.SelectListRef>(null);\n const selectedOptions = selectedOption ? [selectedOption] : [];\n const {\n isOpen,\n highlightType,\n highlightedOption,\n highlightedIndex,\n getTriggerProps,\n getDropdownProps,\n getFilterProps,\n getMenuProps,\n getOptionProps,\n highlightOption,\n selectOption,\n announceSelected,\n focusActiveRef,\n closeDropdown,\n } = useSelect({\n selectedOptions,\n selection: singleSelection(selectedOptions),\n updateSelectedOption: option => fireNonCancelableEvent(onChange, { selectedOption: option }),\n options: filteredOptions,\n filteringType,\n onBlur,\n onFocus,\n externalRef,\n fireLoadItems,\n setFilteringValue,\n statusType,\n dropdownRole,\n });\n\n const handleNativeSearch = useNativeSearch({\n isEnabled: filteringType === 'none' && !readOnly,\n options: filteredOptions,\n highlightOption: !isOpen ? selectOption : highlightOption,\n highlightedOption: !isOpen ? selectedOption : highlightedOption?.option,\n });\n\n const selectAriaLabelId = useUniqueId('select-arialabel-');\n const footerId = useUniqueId('footer');\n\n useEffect(() => {\n scrollToIndex.current?.(highlightedIndex);\n }, [highlightedIndex]);\n\n const dropdownContentProps: SelectProps.DropdownContentProps = { filterText: filteringValue, closeDropdown };\n const customDropdownHeader = renderDropdownHeader?.(dropdownContentProps);\n const customDropdownFooter = renderDropdownFooter?.(dropdownContentProps);\n\n const filter = (\n <Filter\n clearAriaLabel={filteringClearAriaLabel}\n filteringType={filteringType}\n placeholder={filteringPlaceholder}\n ariaLabel={filteringAriaLabel}\n ariaRequired={ariaRequired}\n value={filteringValue}\n styleClassNames={styleClassNames?.filter}\n {...getFilterProps()}\n />\n );\n\n const trigger = (\n <Trigger\n renderOption={renderOption}\n ref={triggerRef}\n placeholder={placeholder}\n disabled={disabled}\n readOnly={readOnly}\n triggerVariant={triggerVariant}\n triggerProps={getTriggerProps(disabled, autoFocus)}\n selectedOption={selectedOption}\n isOpen={isOpen}\n inFilteringToken={__inFilteringToken}\n groupedControlProps={groupedControlProps}\n inlineLabelText={inlineLabelText}\n styleClassNames={{ trigger: styleClassNames?.trigger, inlineLabel: styleClassNames?.inlineLabel }}\n {...formFieldContext}\n controlId={controlId}\n ariaLabelledby={joinStrings(formFieldContext.ariaLabelledby, selectAriaLabelId)}\n />\n );\n\n const isEmpty = !options || options.length === 0;\n const isNoMatch = filteredOptions && filteredOptions.length === 0;\n const isFiltered =\n filteringType !== 'none' && filteringValue.length > 0 && filteredOptions && filteredOptions.length > 0;\n const filteredText = isFiltered ? filteringResultsText?.(matchesCount, totalCount) : undefined;\n\n const dropdownStatus = useDropdownStatus({\n statusType,\n empty,\n loadingText,\n finishedText,\n errorText,\n recoveryText,\n isEmpty,\n isNoMatch,\n noMatch,\n filteringResultsText: filteredText,\n errorIconAriaLabel,\n onRecoveryClick: () => {\n handleRecoveryClick();\n focusActiveRef();\n },\n hasRecoveryCallback: !!onLoadItems,\n });\n\n const statusFooter = dropdownStatus.isSticky ? (\n <DropdownFooter content={isOpen ? dropdownStatus.content : null} id={footerId} />\n ) : null;\n const { header: dropdownHeader, footer: dropdownFooter } = composeDropdownContent({\n filter,\n customDropdownHeader,\n customDropdownFooter,\n statusFooter,\n dropdownHeaderClass: styles['dropdown-header'],\n dropdownFooterClass: styles['dropdown-footer'],\n });\n\n const menuProps = {\n ...getMenuProps(),\n onLoadMore: handleLoadMore,\n ariaLabelledby: joinStrings(selectAriaLabelId, controlId),\n ariaDescribedby: joinStrings(dropdownStatus.content ? footerId : undefined, dropdownAriaDescribedby),\n ariaRequired,\n };\n\n const announcement = useAnnouncement({\n announceSelected,\n highlightedOption,\n getParent: option => parentMap.get(option)?.option as undefined | OptionGroup,\n selectedAriaLabel,\n renderHighlightedAriaLive,\n });\n\n const ListComponent = virtualScroll ? VirtualList : PlainList;\n\n const handleMouseDown = (event: React.MouseEvent) => {\n const target = event.target as HTMLElement;\n\n if (target !== document.activeElement) {\n // prevent currently focused element from losing it\n event.preventDefault();\n }\n };\n\n const mergedRef = useMergeRefs(rootRef, __internalRootRef);\n\n const dropdownProps = getDropdownProps();\n\n const hasOptions = useRef(options.length > 0);\n hasOptions.current = hasOptions.current || options.length > 0;\n\n return (\n <ResetGroupedControlContext>\n <div\n {...baseProps}\n ref={mergedRef}\n className={clsx(styles.root, baseProps.className)}\n onKeyDown={handleNativeSearch}\n >\n <Dropdown\n {...dropdownProps}\n styleClassNames={{ container: styleClassNames?.dropdown }}\n ariaLabelledby={dropdownProps.ariaRole ? joinStrings(selectAriaLabelId, controlId) : undefined}\n ariaDescribedby={\n dropdownProps.ariaRole\n ? joinStrings(dropdownStatus.content ? footerId : undefined, dropdownAriaDescribedby)\n : undefined\n }\n open={isOpen}\n stretchTriggerHeight={!!__inFilteringToken}\n minWidth={getDropdownMinWidth({ expandToViewport: effectiveExpandToViewport, triggerWidth })}\n maxWidth={getBreakpointValue('xxs')} // AWSUI-19898\n trigger={trigger}\n header={dropdownHeader}\n onMouseDown={handleMouseDown}\n footer={dropdownFooter}\n expandToViewport={effectiveExpandToViewport}\n // Forces dropdown position recalculation when new options are loaded\n contentKey={hasOptions.current.toString()}\n content={\n <ListComponent\n listBottom={\n !dropdownStatus.isSticky ? (\n <DropdownFooter content={isOpen ? dropdownStatus.content : null} id={footerId} />\n ) : null\n }\n renderOption={renderOption}\n menuProps={menuProps}\n getOptionProps={getOptionProps}\n filteredOptions={filteredOptions}\n filteringValue={filteringValue}\n ref={scrollToIndex}\n hasDropdownStatus={dropdownStatus.content !== null}\n screenReaderContent={announcement}\n highlightType={highlightType}\n />\n }\n />\n <div hidden={true} id={selectAriaLabelId}>\n {ariaLabel || inlineLabelText}\n </div>\n </div>\n </ResetGroupedControlContext>\n );\n }\n);\n\nexport default InternalSelect;\n"]}
|
package/select/parts/filter.d.ts
CHANGED
|
@@ -5,5 +5,5 @@ export interface FilterProps extends InternalInputProps {
|
|
|
5
5
|
ref?: React.Ref<HTMLInputElement>;
|
|
6
6
|
filteringType: SelectProps.FilteringType;
|
|
7
7
|
}
|
|
8
|
-
declare const Filter: React.ForwardRefExoticComponent<Pick<FilterProps, "style" | "disabled" | "className" | "id" | "name" | "type" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "onKeyUp" | "placeholder" | "prefix" | "inputMode" | "autoFocus" | "value" | "autoComplete" | "readOnly" | "step" | "invalid" | "ariaLabel" | "ariaDescribedby" | "__internalRootRef" | "warning" | "ariaLabelledby" | "filteringType" | "__injectAnalyticsComponentMetadata" | "__skipNativeAttributesWarnings" | "styleClassNames" | "ariaRequired" | "controlId" | "inlineLabelText" | "suffix" | "nativeInputAttributes" | "disableBrowserAutocorrect" | "spellcheck" | "clearAriaLabel" | "__startIcon" | "__onStartIconClick" | "__endIcon" | "__onEndIconClick" | "__noBorderRadius" | "
|
|
8
|
+
declare const Filter: React.ForwardRefExoticComponent<Pick<FilterProps, "style" | "disabled" | "className" | "id" | "name" | "type" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "onKeyUp" | "placeholder" | "prefix" | "inputMode" | "autoFocus" | "value" | "autoComplete" | "readOnly" | "step" | "invalid" | "ariaLabel" | "ariaDescribedby" | "__internalRootRef" | "warning" | "ariaLabelledby" | "filteringType" | "__injectAnalyticsComponentMetadata" | "__skipNativeAttributesWarnings" | "styleClassNames" | "ariaRequired" | "controlId" | "inlineLabelText" | "suffix" | "nativeInputAttributes" | "disableBrowserAutocorrect" | "spellcheck" | "clearAriaLabel" | "__startIcon" | "__onStartIconClick" | "__endIcon" | "__onEndIconClick" | "__noBorderRadius" | "__inlineContent" | "__onDelayedInput" | "__onBlurWithDetail" | "__inheritFormFieldProps" | "__fullWidth"> & React.RefAttributes<HTMLInputElement>>;
|
|
9
9
|
export default Filter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../../src/select/parts/filter.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAsB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAClC,aAAa,EAAE,WAAW,CAAC,aAAa,CAAC;CAC1C;AAED,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../../src/select/parts/filter.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAsB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAClC,aAAa,EAAE,WAAW,CAAC,aAAa,CAAC;CAC1C;AAED,QAAA,MAAM,MAAM,q3BA0BV,CAAC;AAEH,eAAe,MAAM,CAAC"}
|
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"inline-token-
|
|
17
|
-
"inline-token-
|
|
18
|
-
"inline-token-
|
|
19
|
-
"inline-
|
|
20
|
-
"inline-label-wrapper": "awsui_inline-label-
|
|
21
|
-
"inline-label": "awsui_inline-
|
|
22
|
-
"inline-label
|
|
23
|
-
"inline-label-
|
|
24
|
-
"
|
|
4
|
+
"trigger-button": "awsui_trigger-button_dwuol_1n70i_9",
|
|
5
|
+
"placeholder": "awsui_placeholder_dwuol_1n70i_13",
|
|
6
|
+
"disabled": "awsui_disabled_dwuol_1n70i_18",
|
|
7
|
+
"item": "awsui_item_dwuol_1n70i_22",
|
|
8
|
+
"checkbox": "awsui_checkbox_dwuol_1n70i_26",
|
|
9
|
+
"option-group": "awsui_option-group_dwuol_1n70i_35",
|
|
10
|
+
"filter": "awsui_filter_dwuol_1n70i_39",
|
|
11
|
+
"trigger": "awsui_trigger_dwuol_1n70i_9",
|
|
12
|
+
"layout-strut": "awsui_layout-strut_dwuol_1n70i_50",
|
|
13
|
+
"list-bottom": "awsui_list-bottom_dwuol_1n70i_56",
|
|
14
|
+
"selected-icon": "awsui_selected-icon_dwuol_1n70i_60",
|
|
15
|
+
"show-label-tag": "awsui_show-label-tag_dwuol_1n70i_65",
|
|
16
|
+
"inline-token-trigger": "awsui_inline-token-trigger_dwuol_1n70i_69",
|
|
17
|
+
"inline-token-list": "awsui_inline-token-list_dwuol_1n70i_76",
|
|
18
|
+
"inline-token-hidden-placeholder": "awsui_inline-token-hidden-placeholder_dwuol_1n70i_90",
|
|
19
|
+
"inline-token-counter": "awsui_inline-token-counter_dwuol_1n70i_96",
|
|
20
|
+
"inline-label-trigger-wrapper": "awsui_inline-label-trigger-wrapper_dwuol_1n70i_100",
|
|
21
|
+
"inline-label-wrapper": "awsui_inline-label-wrapper_dwuol_1n70i_104",
|
|
22
|
+
"inline-label": "awsui_inline-label_dwuol_1n70i_100",
|
|
23
|
+
"inline-label-disabled": "awsui_inline-label-disabled_dwuol_1n70i_129",
|
|
24
|
+
"inline-label-inline-tokens": "awsui_inline-label-inline-tokens_dwuol_1n70i_133",
|
|
25
|
+
"disabled-reason-tooltip": "awsui_disabled-reason-tooltip_dwuol_1n70i_138"
|
|
25
26
|
};
|
|
26
27
|
|
|
@@ -6,21 +6,25 @@
|
|
|
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
|
-
.
|
|
10
|
-
color: var(--
|
|
9
|
+
.awsui_trigger-button_dwuol_1n70i_9:not(#\9) {
|
|
10
|
+
--awsui-internal-style-placeholder-color: var(--awsui-style-placeholder-color);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.awsui_placeholder_dwuol_1n70i_13:not(#\9) {
|
|
14
|
+
color: var(--awsui-internal-style-placeholder-color, var(--color-text-input-placeholder-be5hpz, #656871));
|
|
11
15
|
font-style: italic;
|
|
12
16
|
-webkit-user-select: none;
|
|
13
17
|
user-select: none;
|
|
14
18
|
}
|
|
15
|
-
.
|
|
16
|
-
color: var(--color-text-input-placeholder-disabled-yuyrqn, #b4b4bb);
|
|
19
|
+
.awsui_placeholder_dwuol_1n70i_13.awsui_disabled_dwuol_1n70i_18:not(#\9) {
|
|
20
|
+
color: var(--awsui-internal-style-placeholder-color, var(--color-text-input-placeholder-disabled-yuyrqn, #b4b4bb));
|
|
17
21
|
}
|
|
18
22
|
|
|
19
|
-
.
|
|
23
|
+
.awsui_item_dwuol_1n70i_22:not(#\9) {
|
|
20
24
|
display: flex;
|
|
21
25
|
align-items: center;
|
|
22
26
|
}
|
|
23
|
-
.
|
|
27
|
+
.awsui_item_dwuol_1n70i_22 > .awsui_checkbox_dwuol_1n70i_26:not(#\9) {
|
|
24
28
|
position: relative;
|
|
25
29
|
min-block-size: var(--size-control-smkmln, 16px);
|
|
26
30
|
min-inline-size: var(--size-control-smkmln, 16px);
|
|
@@ -29,48 +33,48 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
29
33
|
margin-inline-end: var(--space-field-horizontal-d3xvls, 12px);
|
|
30
34
|
}
|
|
31
35
|
|
|
32
|
-
.awsui_option-
|
|
36
|
+
.awsui_option-group_dwuol_1n70i_35:not(#\9):not(:first-child) {
|
|
33
37
|
margin-block-start: calc(-1 * var(--border-item-width-0d09z3, 2px));
|
|
34
38
|
}
|
|
35
39
|
|
|
36
|
-
.
|
|
40
|
+
.awsui_filter_dwuol_1n70i_39:not(#\9) {
|
|
37
41
|
z-index: 4;
|
|
38
42
|
flex-shrink: 0;
|
|
39
43
|
}
|
|
40
44
|
|
|
41
|
-
.
|
|
45
|
+
.awsui_trigger_dwuol_1n70i_9:not(#\9) {
|
|
42
46
|
white-space: nowrap;
|
|
43
47
|
overflow: hidden;
|
|
44
48
|
text-overflow: ellipsis;
|
|
45
49
|
}
|
|
46
50
|
|
|
47
|
-
.awsui_layout-
|
|
51
|
+
.awsui_layout-strut_dwuol_1n70i_50:not(#\9) {
|
|
48
52
|
inline-size: 100%;
|
|
49
53
|
position: relative;
|
|
50
54
|
transform: translate3d(0, 0, 0);
|
|
51
55
|
}
|
|
52
56
|
|
|
53
|
-
.awsui_list-
|
|
57
|
+
.awsui_list-bottom_dwuol_1n70i_56:not(#\9) {
|
|
54
58
|
/* used in unit-tests */
|
|
55
59
|
}
|
|
56
60
|
|
|
57
|
-
.awsui_selected-
|
|
61
|
+
.awsui_selected-icon_dwuol_1n70i_60:not(#\9) {
|
|
58
62
|
color: var(--color-item-selected-nhflqz, #006ce0);
|
|
59
63
|
padding-inline-start: var(--space-xs-3yjatw, 8px);
|
|
60
64
|
}
|
|
61
65
|
|
|
62
|
-
.awsui_show-label-
|
|
66
|
+
.awsui_show-label-tag_dwuol_1n70i_65 > .awsui_selected-icon_dwuol_1n70i_60:not(#\9) {
|
|
63
67
|
padding-inline-start: var(--space-scaled-s-srzhhj, 12px);
|
|
64
68
|
}
|
|
65
69
|
|
|
66
|
-
.awsui_inline-token-
|
|
70
|
+
.awsui_inline-token-trigger_dwuol_1n70i_69:not(#\9) {
|
|
67
71
|
display: flex;
|
|
68
72
|
flex-wrap: nowrap;
|
|
69
73
|
column-gap: var(--space-xxs-burh9x, 4px);
|
|
70
74
|
inline-size: 100%;
|
|
71
75
|
}
|
|
72
76
|
|
|
73
|
-
.awsui_inline-token-
|
|
77
|
+
.awsui_inline-token-list_dwuol_1n70i_76:not(#\9) {
|
|
74
78
|
display: flex;
|
|
75
79
|
flex-wrap: nowrap;
|
|
76
80
|
align-items: center;
|
|
@@ -80,29 +84,29 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
80
84
|
mask-image: linear-gradient(270deg, transparent, white 20px, white);
|
|
81
85
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
82
86
|
}
|
|
83
|
-
.awsui_inline-token-
|
|
87
|
+
.awsui_inline-token-list_dwuol_1n70i_76:not(#\9):dir(rtl) {
|
|
84
88
|
mask-image: linear-gradient(-270deg, transparent, white 20px, white);
|
|
85
89
|
}
|
|
86
90
|
|
|
87
|
-
.awsui_inline-token-hidden-
|
|
91
|
+
.awsui_inline-token-hidden-placeholder_dwuol_1n70i_90:not(#\9) {
|
|
88
92
|
position: absolute !important;
|
|
89
93
|
inset-block-start: -9999px !important;
|
|
90
94
|
inset-inline-start: -9999px !important;
|
|
91
95
|
}
|
|
92
96
|
|
|
93
|
-
.awsui_inline-token-
|
|
97
|
+
.awsui_inline-token-counter_dwuol_1n70i_96:not(#\9) {
|
|
94
98
|
white-space: nowrap;
|
|
95
99
|
}
|
|
96
100
|
|
|
97
|
-
.awsui_inline-label-trigger-
|
|
101
|
+
.awsui_inline-label-trigger-wrapper_dwuol_1n70i_100:not(#\9) {
|
|
98
102
|
margin-block-start: -7px;
|
|
99
103
|
}
|
|
100
104
|
|
|
101
|
-
.awsui_inline-label-
|
|
105
|
+
.awsui_inline-label-wrapper_dwuol_1n70i_104:not(#\9) {
|
|
102
106
|
margin-block-start: calc(var(--space-scaled-xs-65ylh6, 8px) * -1);
|
|
103
107
|
}
|
|
104
108
|
|
|
105
|
-
.awsui_inline-
|
|
109
|
+
.awsui_inline-label_dwuol_1n70i_100:not(#\9) {
|
|
106
110
|
background: linear-gradient(to bottom, var(--awsui-inline-label-background-color-8i8exb, var(--color-background-layout-main-lursna, #ffffff)), var(--color-background-input-default-dfjnbd, #ffffff));
|
|
107
111
|
border-start-start-radius: 2px;
|
|
108
112
|
border-start-end-radius: 2px;
|
|
@@ -123,15 +127,15 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
123
127
|
max-inline-size: calc(100% - 2 * var(--space-field-horizontal-d3xvls, 12px));
|
|
124
128
|
z-index: 1;
|
|
125
129
|
}
|
|
126
|
-
.awsui_inline-label-
|
|
130
|
+
.awsui_inline-label-disabled_dwuol_1n70i_129:not(#\9) {
|
|
127
131
|
background: linear-gradient(to bottom, var(--awsui-inline-label-background-color-8i8exb, var(--color-background-layout-main-lursna, #ffffff)), var(--color-background-input-disabled-obdkw7, #ebebf0));
|
|
128
132
|
}
|
|
129
133
|
|
|
130
|
-
.awsui_inline-label-inline-
|
|
134
|
+
.awsui_inline-label-inline-tokens_dwuol_1n70i_133:not(#\9) {
|
|
131
135
|
padding-block-end: 0;
|
|
132
136
|
transform: translateY(-1.5px);
|
|
133
137
|
}
|
|
134
138
|
|
|
135
|
-
.awsui_disabled-reason-
|
|
139
|
+
.awsui_disabled-reason-tooltip_dwuol_1n70i_138:not(#\9) {
|
|
136
140
|
/* used in test-utils or tests */
|
|
137
141
|
}
|
|
@@ -2,26 +2,27 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"inline-token-
|
|
18
|
-
"inline-token-
|
|
19
|
-
"inline-token-
|
|
20
|
-
"inline-
|
|
21
|
-
"inline-label-wrapper": "awsui_inline-label-
|
|
22
|
-
"inline-label": "awsui_inline-
|
|
23
|
-
"inline-label
|
|
24
|
-
"inline-label-
|
|
25
|
-
"
|
|
5
|
+
"trigger-button": "awsui_trigger-button_dwuol_1n70i_9",
|
|
6
|
+
"placeholder": "awsui_placeholder_dwuol_1n70i_13",
|
|
7
|
+
"disabled": "awsui_disabled_dwuol_1n70i_18",
|
|
8
|
+
"item": "awsui_item_dwuol_1n70i_22",
|
|
9
|
+
"checkbox": "awsui_checkbox_dwuol_1n70i_26",
|
|
10
|
+
"option-group": "awsui_option-group_dwuol_1n70i_35",
|
|
11
|
+
"filter": "awsui_filter_dwuol_1n70i_39",
|
|
12
|
+
"trigger": "awsui_trigger_dwuol_1n70i_9",
|
|
13
|
+
"layout-strut": "awsui_layout-strut_dwuol_1n70i_50",
|
|
14
|
+
"list-bottom": "awsui_list-bottom_dwuol_1n70i_56",
|
|
15
|
+
"selected-icon": "awsui_selected-icon_dwuol_1n70i_60",
|
|
16
|
+
"show-label-tag": "awsui_show-label-tag_dwuol_1n70i_65",
|
|
17
|
+
"inline-token-trigger": "awsui_inline-token-trigger_dwuol_1n70i_69",
|
|
18
|
+
"inline-token-list": "awsui_inline-token-list_dwuol_1n70i_76",
|
|
19
|
+
"inline-token-hidden-placeholder": "awsui_inline-token-hidden-placeholder_dwuol_1n70i_90",
|
|
20
|
+
"inline-token-counter": "awsui_inline-token-counter_dwuol_1n70i_96",
|
|
21
|
+
"inline-label-trigger-wrapper": "awsui_inline-label-trigger-wrapper_dwuol_1n70i_100",
|
|
22
|
+
"inline-label-wrapper": "awsui_inline-label-wrapper_dwuol_1n70i_104",
|
|
23
|
+
"inline-label": "awsui_inline-label_dwuol_1n70i_100",
|
|
24
|
+
"inline-label-disabled": "awsui_inline-label-disabled_dwuol_1n70i_129",
|
|
25
|
+
"inline-label-inline-tokens": "awsui_inline-label-inline-tokens_dwuol_1n70i_133",
|
|
26
|
+
"disabled-reason-tooltip": "awsui_disabled-reason-tooltip_dwuol_1n70i_138"
|
|
26
27
|
};
|
|
27
28
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { GroupedControlContextProps } from '../../internal/context/control-group-context';
|
|
3
3
|
import { MultiselectProps } from '../../multiselect/interfaces';
|
|
4
|
+
import { StyleClassNames as TokenStyleClassNames } from '../../token/internal';
|
|
4
5
|
import { FormFieldValidationControlProps } from '../../types/form-field';
|
|
5
6
|
import { OptionDefinition } from '../../types/option';
|
|
6
7
|
import { SelectProps } from '../interfaces';
|
|
@@ -18,6 +19,11 @@ export interface TriggerProps extends FormFieldValidationControlProps {
|
|
|
18
19
|
selectedOptions?: ReadonlyArray<OptionDefinition>;
|
|
19
20
|
renderOption?: SelectProps.SelectOptionItemRenderer;
|
|
20
21
|
groupedControlProps?: GroupedControlContextProps;
|
|
22
|
+
styleClassNames?: {
|
|
23
|
+
trigger?: string;
|
|
24
|
+
inlineLabel?: string;
|
|
25
|
+
token?: TokenStyleClassNames;
|
|
26
|
+
};
|
|
21
27
|
}
|
|
22
28
|
declare const Trigger: React.ForwardRefExoticComponent<TriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
23
29
|
export default Trigger;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trigger.d.ts","sourceRoot":"","sources":["../../../../src/select/parts/trigger.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;AAG1F,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"trigger.d.ts","sourceRoot":"","sources":["../../../../src/select/parts/trigger.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,O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@ -9,7 +9,7 @@ import { useVisualRefresh } from '../../internal/hooks/use-visual-mode';
|
|
|
9
9
|
import { joinStrings } from '../../internal/utils/strings';
|
|
10
10
|
import InternalToken from '../../token/internal';
|
|
11
11
|
import styles from './styles.css.js';
|
|
12
|
-
const Trigger = React.forwardRef(({ ariaLabelledby, ariaDescribedby, controlId, invalid, inlineLabelText, warning, triggerProps, selectedOption, selectedOptions, triggerVariant, inFilteringToken, isOpen, placeholder, disabled, readOnly, renderOption, groupedControlProps, }, ref) => {
|
|
12
|
+
const Trigger = React.forwardRef(({ ariaLabelledby, ariaDescribedby, controlId, invalid, inlineLabelText, warning, triggerProps, selectedOption, selectedOptions, triggerVariant, inFilteringToken, isOpen, placeholder, disabled, readOnly, renderOption, groupedControlProps, styleClassNames, }, ref) => {
|
|
13
13
|
const isVisualRefresh = useVisualRefresh();
|
|
14
14
|
const generatedId = useUniqueId();
|
|
15
15
|
const id = controlId !== null && controlId !== void 0 ? controlId : generatedId;
|
|
@@ -20,7 +20,7 @@ const Trigger = React.forwardRef(({ ariaLabelledby, ariaDescribedby, controlId,
|
|
|
20
20
|
if (triggerVariant === 'tokens') {
|
|
21
21
|
if (selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions.length) {
|
|
22
22
|
triggerContent = (React.createElement("span", { className: clsx(styles['inline-token-trigger'], disabled && styles['inline-token-trigger--disabled'], isVisualRefresh && styles['visual-refresh']) },
|
|
23
|
-
React.createElement("span", { className: styles['inline-token-list'] }, selectedOptions.map(({ label }, i) => (React.createElement(InternalToken, { key: i, label: label, variant: "inline", disabled: disabled })))),
|
|
23
|
+
React.createElement("span", { className: styles['inline-token-list'] }, selectedOptions.map(({ label }, i) => (React.createElement(InternalToken, { key: i, label: label, variant: "inline", disabled: disabled, styleClassNames: styleClassNames === null || styleClassNames === void 0 ? void 0 : styleClassNames.token })))),
|
|
24
24
|
React.createElement("span", { className: styles['inline-token-counter'], id: triggerContentId },
|
|
25
25
|
React.createElement("span", { className: styles['inline-token-hidden-placeholder'] }, placeholder),
|
|
26
26
|
React.createElement("span", null,
|
|
@@ -56,9 +56,9 @@ const Trigger = React.forwardRef(({ ariaLabelledby, ariaDescribedby, controlId,
|
|
|
56
56
|
triggerContent = (React.createElement("span", { id: triggerContentId, className: styles.trigger }, selectedOption.label || selectedOption.value));
|
|
57
57
|
}
|
|
58
58
|
const mergedRef = useMergeRefs(triggerProps.ref, ref);
|
|
59
|
-
const triggerButton = (React.createElement(ButtonTrigger, { ...triggerProps, id: id, ref: mergedRef, pressed: !!isOpen, disabled: disabled, readOnly: readOnly, invalid: invalid, warning: warning && !invalid, inFilteringToken: inFilteringToken, inlineTokens: triggerVariant === 'tokens', hasCustomContent: hasCustomContent, ariaDescribedby: ariaDescribedby, ariaLabelledby: ariaLabelledbyIds, groupedControlProps: groupedControlProps }, triggerContent));
|
|
59
|
+
const triggerButton = (React.createElement(ButtonTrigger, { ...triggerProps, id: id, ref: mergedRef, className: clsx(styleClassNames === null || styleClassNames === void 0 ? void 0 : styleClassNames.trigger, styles['trigger-button']), pressed: !!isOpen, disabled: disabled, readOnly: readOnly, invalid: invalid, warning: warning && !invalid, inFilteringToken: inFilteringToken, inlineTokens: triggerVariant === 'tokens', hasCustomContent: hasCustomContent, ariaDescribedby: ariaDescribedby, ariaLabelledby: ariaLabelledbyIds, groupedControlProps: groupedControlProps }, triggerContent));
|
|
60
60
|
return (React.createElement(React.Fragment, null, inlineLabelText ? (React.createElement("div", { className: styles['inline-label-wrapper'] },
|
|
61
|
-
React.createElement("label", { htmlFor: controlId, className: clsx(styles['inline-label'], disabled && styles['inline-label-disabled'], triggerVariant === 'tokens' && styles['inline-label-inline-tokens']) }, inlineLabelText),
|
|
61
|
+
React.createElement("label", { htmlFor: controlId, className: clsx(styleClassNames === null || styleClassNames === void 0 ? void 0 : styleClassNames.inlineLabel, styles['inline-label'], disabled && styles['inline-label-disabled'], triggerVariant === 'tokens' && styles['inline-label-inline-tokens']) }, inlineLabelText),
|
|
62
62
|
React.createElement("div", { className: styles['inline-label-trigger-wrapper'] }, triggerButton))) : (React.createElement(React.Fragment, null, triggerButton))));
|
|
63
63
|
});
|
|
64
64
|
export default Trigger;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trigger.js","sourceRoot":"","sources":["../../../../src/select/parts/trigger.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE1F,OAAO,aAAa,MAAM,0CAA0C,CAAC;AACrE,OAAO,MAAM,MAAM,kCAAkC,CAAC;AAEtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,OAAO,aAAa,MAAM,sBAAsB,CAAC;AAMjD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAiBrC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAC9B,CACE,EACE,cAAc,EACd,eAAe,EACf,SAAS,EACT,OAAO,EACP,eAAe,EACf,OAAO,EACP,YAAY,EACZ,cAAc,EACd,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,MAAM,EACN,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,mBAAmB,GACN,EACf,GAAiC,EACjC,EAAE;IACF,MAAM,eAAe,GAAG,gBAAgB,EAAE,CAAC;IAC3C,MAAM,WAAW,GAAG,WAAW,EAAE,CAAC;IAClC,MAAM,EAAE,GAAG,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,WAAW,CAAC;IACpC,MAAM,gBAAgB,GAAG,WAAW,CAAC,kBAAkB,CAAC,CAAC;IAEzD,IAAI,iBAAiB,GAAG,WAAW,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;IAEtE,IAAI,cA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,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,IAAI,CAAC,OAAO,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,cAAc,KAAK,QAAQ,EACzC,gBAAgB,EAAE,gBAAgB,EAClC,eAAe,EAAE,eAAe,EAChC,cAAc,EAAE,iBAAiB,EACjC,mBAAmB,EAAE,mBAAmB,IAEvC,cAAc,CACD,CACjB,CAAC;IACF,OAAO,CACL,0CACG,eAAe,CAAC,CAAC,CAAC,CACjB,6BAAK,SAAS,EAAE,MAAM,CAAC,sBAAsB,CAAC;QAC5C,+BACE,OAAO,EAAE,SAAS,EAClB,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,cAAc,CAAC,EACtB,QAAQ,IAAI,MAAM,CAAC,uBAAuB,CAAC,EAC3C,cAAc,KAAK,QAAQ,IAAI,MAAM,CAAC,4BAA4B,CAAC,CACpE,IAEA,eAAe,CACV;QACR,6BAAK,SAAS,EAAE,MAAM,CAAC,8BAA8B,CAAC,IAAG,aAAa,CAAO,CACzE,CACP,CAAC,CAAC,CAAC,CACF,0CAAG,aAAa,CAAI,CACrB,CACA,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,OAAO,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 { useMergeRefs, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport ButtonTrigger from '../../internal/components/button-trigger';\nimport Option from '../../internal/components/option';\nimport { GroupedControlContextProps } from '../../internal/context/control-group-context';\nimport { useVisualRefresh } from '../../internal/hooks/use-visual-mode';\nimport { joinStrings } from '../../internal/utils/strings';\nimport { MultiselectProps } from '../../multiselect/interfaces';\nimport InternalToken from '../../token/internal';\nimport { FormFieldValidationControlProps } from '../../types/form-field';\nimport { OptionDefinition } from '../../types/option';\nimport { SelectProps } from '../interfaces';\nimport { SelectTriggerProps } from '../utils/use-select';\n\nimport styles from './styles.css.js';\n\nexport interface TriggerProps extends FormFieldValidationControlProps {\n placeholder: string | undefined;\n disabled: boolean | undefined;\n readOnly?: boolean;\n triggerProps: SelectTriggerProps;\n selectedOption: OptionDefinition | null;\n inlineLabelText?: string;\n isOpen?: boolean;\n triggerVariant?: SelectProps.TriggerVariant | MultiselectProps.TriggerVariant;\n inFilteringToken?: 'root' | 'nested';\n selectedOptions?: ReadonlyArray<OptionDefinition>;\n renderOption?: SelectProps.SelectOptionItemRenderer;\n groupedControlProps?: GroupedControlContextProps;\n}\n\nconst Trigger = React.forwardRef(\n (\n {\n ariaLabelledby,\n ariaDescribedby,\n controlId,\n invalid,\n inlineLabelText,\n warning,\n triggerProps,\n selectedOption,\n selectedOptions,\n triggerVariant,\n inFilteringToken,\n isOpen,\n placeholder,\n disabled,\n readOnly,\n renderOption,\n groupedControlProps,\n }: TriggerProps,\n ref: React.Ref<HTMLButtonElement>\n ) => {\n const isVisualRefresh = useVisualRefresh();\n const generatedId = useUniqueId();\n const id = controlId ?? generatedId;\n const triggerContentId = useUniqueId('trigger-content-');\n\n let ariaLabelledbyIds = joinStrings(ariaLabelledby, triggerContentId);\n\n let triggerContent = null;\n let hasCustomContent = false;\n if (triggerVariant === 'tokens') {\n if (selectedOptions?.length) {\n triggerContent = (\n <span\n className={clsx(\n styles['inline-token-trigger'],\n disabled && styles['inline-token-trigger--disabled'],\n isVisualRefresh && styles['visual-refresh']\n )}\n >\n <span className={styles['inline-token-list']}>\n {selectedOptions.map(({ label }, i) => (\n <InternalToken key={i} label={label} variant=\"inline\" disabled={disabled} />\n ))}\n </span>\n <span className={styles['inline-token-counter']} id={triggerContentId}>\n <span className={styles['inline-token-hidden-placeholder']}>{placeholder}</span>\n <span>({selectedOptions.length})</span>\n </span>\n </span>\n );\n ariaLabelledbyIds = ariaLabelledby;\n } else {\n triggerContent = (\n <span className={clsx(styles.placeholder, styles.trigger, disabled && styles.disabled)} id={triggerContentId}>\n {placeholder}\n </span>\n );\n }\n } else if (!selectedOption) {\n triggerContent = (\n <span className={clsx(styles.placeholder, styles.trigger, disabled && styles.disabled)} id={triggerContentId}>\n {placeholder}\n </span>\n );\n } else if (triggerVariant === 'option') {\n const triggerCustomContent = renderOption?.({\n filterText: undefined,\n item: {\n type: 'trigger',\n option: selectedOption,\n },\n });\n if (triggerCustomContent) {\n hasCustomContent = true;\n triggerContent = (\n <Option\n customContent={triggerCustomContent}\n id={triggerContentId}\n option={{ ...selectedOption, disabled }}\n triggerVariant={true}\n />\n );\n } else {\n triggerContent = (\n <Option id={triggerContentId} option={{ ...selectedOption, disabled }} triggerVariant={true} />\n );\n }\n } else {\n triggerContent = (\n <span id={triggerContentId} className={styles.trigger}>\n {selectedOption.label || selectedOption.value}\n </span>\n );\n }\n\n const mergedRef = useMergeRefs(triggerProps.ref, ref);\n const triggerButton = (\n <ButtonTrigger\n {...triggerProps}\n id={id}\n ref={mergedRef}\n pressed={!!isOpen}\n disabled={disabled}\n readOnly={readOnly}\n invalid={invalid}\n warning={warning && !invalid}\n inFilteringToken={inFilteringToken}\n inlineTokens={triggerVariant === 'tokens'}\n hasCustomContent={hasCustomContent}\n ariaDescribedby={ariaDescribedby}\n ariaLabelledby={ariaLabelledbyIds}\n groupedControlProps={groupedControlProps}\n >\n {triggerContent}\n </ButtonTrigger>\n );\n return (\n <>\n {inlineLabelText ? (\n <div className={styles['inline-label-wrapper']}>\n <label\n htmlFor={controlId}\n className={clsx(\n styles['inline-label'],\n disabled && styles['inline-label-disabled'],\n triggerVariant === 'tokens' && styles['inline-label-inline-tokens']\n )}\n >\n {inlineLabelText}\n </label>\n <div className={styles['inline-label-trigger-wrapper']}>{triggerButton}</div>\n </div>\n ) : (\n <>{triggerButton}</>\n )}\n </>\n );\n }\n);\n\nexport default Trigger;\n"]}
|
|
1
|
+
{"version":3,"file":"trigger.js","sourceRoot":"","sources":["../../../../src/select/parts/trigger.tsx"],"names":[],"mapp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,OAAO,EAChB,OAAO,EAAE,OAAO,IAAI,CAAC,OAAO,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,cAAc,KAAK,QAAQ,EACzC,gBAAgB,EAAE,gBAAgB,EAClC,eAAe,EAAE,eAAe,EAChC,cAAc,EAAE,iBAAiB,EACjC,mBAAmB,EAAE,mBAAmB,IAEvC,cAAc,CACD,CACjB,CAAC;IACF,OAAO,CACL,0CACG,eAAe,CAAC,CAAC,CAAC,CACjB,6BAAK,SAAS,EAAE,MAAM,CAAC,sBAAsB,CAAC;QAC5C,+BACE,OAAO,EAAE,SAAS,EAClB,SAAS,EAAE,IAAI,CACb,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,WAAW,EAC5B,MAAM,CAAC,cAAc,CAAC,EACtB,QAAQ,IAAI,MAAM,CAAC,uBAAuB,CAAC,EAC3C,cAAc,KAAK,QAAQ,IAAI,MAAM,CAAC,4BAA4B,CAAC,CACpE,IAEA,eAAe,CACV;QACR,6BAAK,SAAS,EAAE,MAAM,CAAC,8BAA8B,CAAC,IAAG,aAAa,CAAO,CACzE,CACP,CAAC,CAAC,CAAC,CACF,0CAAG,aAAa,CAAI,CACrB,CACA,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,OAAO,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 { useMergeRefs, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport ButtonTrigger from '../../internal/components/button-trigger';\nimport Option from '../../internal/components/option';\nimport { GroupedControlContextProps } from '../../internal/context/control-group-context';\nimport { useVisualRefresh } from '../../internal/hooks/use-visual-mode';\nimport { joinStrings } from '../../internal/utils/strings';\nimport { MultiselectProps } from '../../multiselect/interfaces';\nimport InternalToken, { StyleClassNames as TokenStyleClassNames } from '../../token/internal';\nimport { FormFieldValidationControlProps } from '../../types/form-field';\nimport { OptionDefinition } from '../../types/option';\nimport { SelectProps } from '../interfaces';\nimport { SelectTriggerProps } from '../utils/use-select';\n\nimport styles from './styles.css.js';\n\nexport interface TriggerProps extends FormFieldValidationControlProps {\n placeholder: string | undefined;\n disabled: boolean | undefined;\n readOnly?: boolean;\n triggerProps: SelectTriggerProps;\n selectedOption: OptionDefinition | null;\n inlineLabelText?: string;\n isOpen?: boolean;\n triggerVariant?: SelectProps.TriggerVariant | MultiselectProps.TriggerVariant;\n inFilteringToken?: 'root' | 'nested';\n selectedOptions?: ReadonlyArray<OptionDefinition>;\n renderOption?: SelectProps.SelectOptionItemRenderer;\n groupedControlProps?: GroupedControlContextProps;\n styleClassNames?: { trigger?: string; inlineLabel?: string; token?: TokenStyleClassNames };\n}\n\nconst Trigger = React.forwardRef(\n (\n {\n ariaLabelledby,\n ariaDescribedby,\n controlId,\n invalid,\n inlineLabelText,\n warning,\n triggerProps,\n selectedOption,\n selectedOptions,\n triggerVariant,\n inFilteringToken,\n isOpen,\n placeholder,\n disabled,\n readOnly,\n renderOption,\n groupedControlProps,\n styleClassNames,\n }: TriggerProps,\n ref: React.Ref<HTMLButtonElement>\n ) => {\n const isVisualRefresh = useVisualRefresh();\n const generatedId = useUniqueId();\n const id = controlId ?? generatedId;\n const triggerContentId = useUniqueId('trigger-content-');\n\n let ariaLabelledbyIds = joinStrings(ariaLabelledby, triggerContentId);\n\n let triggerContent = null;\n let hasCustomContent = false;\n if (triggerVariant === 'tokens') {\n if (selectedOptions?.length) {\n triggerContent = (\n <span\n className={clsx(\n styles['inline-token-trigger'],\n disabled && styles['inline-token-trigger--disabled'],\n isVisualRefresh && styles['visual-refresh']\n )}\n >\n <span className={styles['inline-token-list']}>\n {selectedOptions.map(({ label }, i) => (\n <InternalToken\n key={i}\n label={label}\n variant=\"inline\"\n disabled={disabled}\n styleClassNames={styleClassNames?.token}\n />\n ))}\n </span>\n <span className={styles['inline-token-counter']} id={triggerContentId}>\n <span className={styles['inline-token-hidden-placeholder']}>{placeholder}</span>\n <span>({selectedOptions.length})</span>\n </span>\n </span>\n );\n ariaLabelledbyIds = ariaLabelledby;\n } else {\n triggerContent = (\n <span className={clsx(styles.placeholder, styles.trigger, disabled && styles.disabled)} id={triggerContentId}>\n {placeholder}\n </span>\n );\n }\n } else if (!selectedOption) {\n triggerContent = (\n <span className={clsx(styles.placeholder, styles.trigger, disabled && styles.disabled)} id={triggerContentId}>\n {placeholder}\n </span>\n );\n } else if (triggerVariant === 'option') {\n const triggerCustomContent = renderOption?.({\n filterText: undefined,\n item: {\n type: 'trigger',\n option: selectedOption,\n },\n });\n if (triggerCustomContent) {\n hasCustomContent = true;\n triggerContent = (\n <Option\n customContent={triggerCustomContent}\n id={triggerContentId}\n option={{ ...selectedOption, disabled }}\n triggerVariant={true}\n />\n );\n } else {\n triggerContent = (\n <Option id={triggerContentId} option={{ ...selectedOption, disabled }} triggerVariant={true} />\n );\n }\n } else {\n triggerContent = (\n <span id={triggerContentId} className={styles.trigger}>\n {selectedOption.label || selectedOption.value}\n </span>\n );\n }\n\n const mergedRef = useMergeRefs(triggerProps.ref, ref);\n const triggerButton = (\n <ButtonTrigger\n {...triggerProps}\n id={id}\n ref={mergedRef}\n className={clsx(styleClassNames?.trigger, styles['trigger-button'])}\n pressed={!!isOpen}\n disabled={disabled}\n readOnly={readOnly}\n invalid={invalid}\n warning={warning && !invalid}\n inFilteringToken={inFilteringToken}\n inlineTokens={triggerVariant === 'tokens'}\n hasCustomContent={hasCustomContent}\n ariaDescribedby={ariaDescribedby}\n ariaLabelledby={ariaLabelledbyIds}\n groupedControlProps={groupedControlProps}\n >\n {triggerContent}\n </ButtonTrigger>\n );\n return (\n <>\n {inlineLabelText ? (\n <div className={styles['inline-label-wrapper']}>\n <label\n htmlFor={controlId}\n className={clsx(\n styleClassNames?.inlineLabel,\n styles['inline-label'],\n disabled && styles['inline-label-disabled'],\n triggerVariant === 'tokens' && styles['inline-label-inline-tokens']\n )}\n >\n {inlineLabelText}\n </label>\n <div className={styles['inline-label-trigger-wrapper']}>{triggerButton}</div>\n </div>\n ) : (\n <>{triggerButton}</>\n )}\n </>\n );\n }\n);\n\nexport default Trigger;\n"]}
|
package/select/styles.css.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"dropdown-header": "awsui_dropdown-
|
|
6
|
-
"dropdown-footer": "awsui_dropdown-
|
|
4
|
+
"root": "awsui_root_r2vco_74pf5_20",
|
|
5
|
+
"dropdown-header": "awsui_dropdown-header_r2vco_74pf5_52",
|
|
6
|
+
"dropdown-footer": "awsui_dropdown-footer_r2vco_74pf5_58"
|
|
7
7
|
};
|
|
8
8
|
|
package/select/styles.scoped.css
CHANGED
|
@@ -6,7 +6,18 @@
|
|
|
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
|
+
@property --awsui-style-placeholder-color {
|
|
10
|
+
syntax: "*";
|
|
11
|
+
inherits: false;
|
|
12
|
+
}
|
|
13
|
+
/* awsui:style-api-slot name=trigger tokens=placeholder-color properties=color, background, border, border-radius, box-shadow, padding, font-family, font-size, font-weight */
|
|
14
|
+
/* awsui:style-api-description slot=trigger kind=slot name=trigger text=The trigger button, which is also the field box. Pass a different class for the states you control (`invalid`, `warning`, `disabled`, `readOnly`); use `:hover` and `:focus` for interaction states. */
|
|
15
|
+
/* awsui:style-api-description slot=trigger kind=property name=color text=The placeholder is styled with `--awsui-style-placeholder-color`. */
|
|
16
|
+
/* awsui:style-api-description slot=trigger kind=property name=box-shadow text=Also draws the focus ring under `:focus`. */
|
|
17
|
+
/* awsui:style-api-slot name=inlineLabel tokens= properties=color, background, font-family, font-size, font-weight */
|
|
18
|
+
/* awsui:style-api-slot name=filter component=input */
|
|
19
|
+
/* awsui:style-api-slot name=dropdown component=dropdown slot=container */
|
|
20
|
+
.awsui_root_r2vco_74pf5_20:not(#\9) {
|
|
10
21
|
border-collapse: separate;
|
|
11
22
|
border-spacing: 0;
|
|
12
23
|
box-sizing: border-box;
|
|
@@ -38,12 +49,12 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
38
49
|
-moz-osx-font-smoothing: auto;
|
|
39
50
|
}
|
|
40
51
|
|
|
41
|
-
.awsui_dropdown-
|
|
52
|
+
.awsui_dropdown-header_r2vco_74pf5_52:not(#\9) {
|
|
42
53
|
inline-size: 100%;
|
|
43
54
|
position: relative;
|
|
44
55
|
z-index: 4;
|
|
45
56
|
}
|
|
46
57
|
|
|
47
|
-
.awsui_dropdown-
|
|
58
|
+
.awsui_dropdown-footer_r2vco_74pf5_58:not(#\9) {
|
|
48
59
|
inline-size: 100%;
|
|
49
60
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
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
|
-
"dropdown-header": "awsui_dropdown-
|
|
7
|
-
"dropdown-footer": "awsui_dropdown-
|
|
5
|
+
"root": "awsui_root_r2vco_74pf5_20",
|
|
6
|
+
"dropdown-header": "awsui_dropdown-header_r2vco_74pf5_52",
|
|
7
|
+
"dropdown-footer": "awsui_dropdown-footer_r2vco_74pf5_58"
|
|
8
8
|
};
|
|
9
9
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// GENERATED from the autosuggest Style API docs — do not edit.
|