@cloudscape-design/components 3.0.1401 → 3.0.1402

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/button/interfaces.d.ts +3 -1
  2. package/button/interfaces.d.ts.map +1 -1
  3. package/button/interfaces.js.map +1 -1
  4. package/button-dropdown/interfaces.d.ts +6 -3
  5. package/button-dropdown/interfaces.d.ts.map +1 -1
  6. package/button-dropdown/interfaces.js.map +1 -1
  7. package/button-group/interfaces.d.ts +22 -13
  8. package/button-group/interfaces.d.ts.map +1 -1
  9. package/button-group/interfaces.js.map +1 -1
  10. package/calendar/grid/index.js.map +1 -1
  11. package/calendar/interfaces.d.ts +3 -1
  12. package/calendar/interfaces.d.ts.map +1 -1
  13. package/calendar/interfaces.js.map +1 -1
  14. package/copy-to-clipboard/interfaces.d.ts +3 -1
  15. package/copy-to-clipboard/interfaces.d.ts.map +1 -1
  16. package/copy-to-clipboard/interfaces.js.map +1 -1
  17. package/date-range-picker/calendar/grids/grid-cell.d.ts +1 -1
  18. package/date-range-picker/calendar/grids/grid-cell.d.ts.map +1 -1
  19. package/date-range-picker/calendar/grids/grid-cell.js.map +1 -1
  20. package/date-range-picker/interfaces.d.ts +3 -1
  21. package/date-range-picker/interfaces.d.ts.map +1 -1
  22. package/date-range-picker/interfaces.js.map +1 -1
  23. package/drawer/interfaces.d.ts +3 -1
  24. package/drawer/interfaces.d.ts.map +1 -1
  25. package/drawer/interfaces.js.map +1 -1
  26. package/input/internal.d.ts.map +1 -1
  27. package/input/internal.js +14 -18
  28. package/input/internal.js.map +1 -1
  29. package/input/styles.css.js +37 -38
  30. package/input/styles.scoped.css +172 -248
  31. package/input/styles.selectors.js +37 -38
  32. package/internal/base-component/styles.scoped.css +1 -1
  33. package/internal/components/autosuggest-input/index.d.ts.map +1 -1
  34. package/internal/components/autosuggest-input/index.js +5 -2
  35. package/internal/components/autosuggest-input/index.js.map +1 -1
  36. package/internal/components/option/interfaces.d.ts +1 -1
  37. package/internal/components/option/interfaces.d.ts.map +1 -1
  38. package/internal/components/option/interfaces.js.map +1 -1
  39. package/internal/environment.js +2 -2
  40. package/internal/environment.json +2 -2
  41. package/internal/hooks/use-hidden-description/index.d.ts +2 -1
  42. package/internal/hooks/use-hidden-description/index.d.ts.map +1 -1
  43. package/internal/hooks/use-hidden-description/index.js.map +1 -1
  44. package/internal/manifest.json +1 -1
  45. package/manifest.json +2 -2
  46. package/package.json +1 -1
  47. package/segmented-control/interfaces.d.ts +2 -2
  48. package/segmented-control/interfaces.d.ts.map +1 -1
  49. package/segmented-control/interfaces.js.map +1 -1
  50. package/select/interfaces.d.ts +1 -1
  51. package/select/interfaces.js.map +1 -1
  52. package/table/body-cell/disabled-inline-editor.d.ts +2 -1
  53. package/table/body-cell/disabled-inline-editor.d.ts.map +1 -1
  54. package/table/body-cell/disabled-inline-editor.js.map +1 -1
  55. package/table/interfaces.d.ts +5 -3
  56. package/table/interfaces.d.ts.map +1 -1
  57. package/table/interfaces.js.map +1 -1
  58. package/tabs/interfaces.d.ts +4 -2
  59. package/tabs/interfaces.d.ts.map +1 -1
  60. package/tabs/interfaces.js.map +1 -1
  61. package/toggle-button/interfaces.d.ts +3 -1
  62. package/toggle-button/interfaces.d.ts.map +1 -1
  63. package/toggle-button/interfaces.js.map +1 -1
  64. package/types/option.d.ts +1 -1
  65. package/types/option.d.ts.map +1 -1
  66. package/types/option.js.map +1 -1
@@ -2,43 +2,42 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "input-adorned-container": "awsui_input-adorned-container_2rhyz_kxmmb_9",
6
- "input": "awsui_input_2rhyz_kxmmb_9",
7
- "input-adorned-container-readonly": "awsui_input-adorned-container-readonly_2rhyz_kxmmb_22",
8
- "input-readonly": "awsui_input-readonly_2rhyz_kxmmb_22",
9
- "root": "awsui_root_2rhyz_kxmmb_35",
10
- "input-invalid": "awsui_input-invalid_2rhyz_kxmmb_138",
11
- "input-has-icon-start": "awsui_input-has-icon-start_2rhyz_kxmmb_147",
12
- "input-warning": "awsui_input-warning_2rhyz_kxmmb_150",
13
- "input-type-search": "awsui_input-type-search_2rhyz_kxmmb_162",
14
- "input-has-icon-end": "awsui_input-has-icon-end_2rhyz_kxmmb_175",
15
- "input-has-no-border-radius": "awsui_input-has-no-border-radius_2rhyz_kxmmb_178",
16
- "input-has-no-border": "awsui_input-has-no-border_2rhyz_kxmmb_178",
17
- "grouped": "awsui_grouped_2rhyz_kxmmb_194",
18
- "grouped-horizontal-first": "awsui_grouped-horizontal-first_2rhyz_kxmmb_200",
19
- "grouped-horizontal-middle": "awsui_grouped-horizontal-middle_2rhyz_kxmmb_204",
20
- "grouped-horizontal-last": "awsui_grouped-horizontal-last_2rhyz_kxmmb_210",
21
- "grouped-vertical-first": "awsui_grouped-vertical-first_2rhyz_kxmmb_214",
22
- "grouped-vertical-middle": "awsui_grouped-vertical-middle_2rhyz_kxmmb_218",
23
- "grouped-vertical-last": "awsui_grouped-vertical-last_2rhyz_kxmmb_224",
24
- "grouped-with-action": "awsui_grouped-with-action_2rhyz_kxmmb_228",
25
- "input-container": "awsui_input-container_2rhyz_kxmmb_233",
26
- "input-icon-start": "awsui_input-icon-start_2rhyz_kxmmb_238",
27
- "input-icon-end": "awsui_input-icon-end_2rhyz_kxmmb_245",
28
- "input-button-right": "awsui_input-button-right_2rhyz_kxmmb_251",
29
- "inline-label-trigger-wrapper": "awsui_inline-label-trigger-wrapper_2rhyz_kxmmb_255",
30
- "inline-label-trigger-wrapper-full-width": "awsui_inline-label-trigger-wrapper-full-width_2rhyz_kxmmb_258",
31
- "inline-label-wrapper": "awsui_inline-label-wrapper_2rhyz_kxmmb_262",
32
- "inline-label-wrapper-full-width": "awsui_inline-label-wrapper-full-width_2rhyz_kxmmb_265",
33
- "inline-label": "awsui_inline-label_2rhyz_kxmmb_255",
34
- "inline-label-disabled": "awsui_inline-label-disabled_2rhyz_kxmmb_290",
35
- "input-adorned-container-disabled": "awsui_input-adorned-container-disabled_2rhyz_kxmmb_315",
36
- "input-adorned-container-invalid": "awsui_input-adorned-container-invalid_2rhyz_kxmmb_323",
37
- "input-adorned-container-warning": "awsui_input-adorned-container-warning_2rhyz_kxmmb_336",
38
- "input-prefix": "awsui_input-prefix_2rhyz_kxmmb_350",
39
- "input-suffix": "awsui_input-suffix_2rhyz_kxmmb_351",
40
- "input-adornment-content": "awsui_input-adornment-content_2rhyz_kxmmb_364",
41
- "input-adornment-divider": "awsui_input-adornment-divider_2rhyz_kxmmb_373",
42
- "input-adorned": "awsui_input-adorned_2rhyz_kxmmb_9"
5
+ "root": "awsui_root_2rhyz_st2f9_9",
6
+ "input": "awsui_input_2rhyz_st2f9_13",
7
+ "input-readonly": "awsui_input-readonly_2rhyz_st2f9_62",
8
+ "input-invalid": "awsui_input-invalid_2rhyz_st2f9_106",
9
+ "input-warning": "awsui_input-warning_2rhyz_st2f9_109",
10
+ "input-type-search": "awsui_input-type-search_2rhyz_st2f9_112",
11
+ "input-has-icon-start": "awsui_input-has-icon-start_2rhyz_st2f9_122",
12
+ "input-has-icon-end": "awsui_input-has-icon-end_2rhyz_st2f9_125",
13
+ "input-container": "awsui_input-container_2rhyz_st2f9_129",
14
+ "input-field": "awsui_input-field_2rhyz_st2f9_134",
15
+ "input-field-readonly": "awsui_input-field-readonly_2rhyz_st2f9_158",
16
+ "input-field-disabled": "awsui_input-field-disabled_2rhyz_st2f9_173",
17
+ "input-field-invalid": "awsui_input-field-invalid_2rhyz_st2f9_181",
18
+ "input-field-warning": "awsui_input-field-warning_2rhyz_st2f9_194",
19
+ "input-field-no-border-radius": "awsui_input-field-no-border-radius_2rhyz_st2f9_207",
20
+ "input-field-no-border": "awsui_input-field-no-border_2rhyz_st2f9_207",
21
+ "grouped": "awsui_grouped_2rhyz_st2f9_222",
22
+ "grouped-horizontal-first": "awsui_grouped-horizontal-first_2rhyz_st2f9_228",
23
+ "grouped-horizontal-middle": "awsui_grouped-horizontal-middle_2rhyz_st2f9_232",
24
+ "grouped-horizontal-last": "awsui_grouped-horizontal-last_2rhyz_st2f9_238",
25
+ "grouped-vertical-first": "awsui_grouped-vertical-first_2rhyz_st2f9_242",
26
+ "grouped-vertical-middle": "awsui_grouped-vertical-middle_2rhyz_st2f9_246",
27
+ "grouped-vertical-last": "awsui_grouped-vertical-last_2rhyz_st2f9_252",
28
+ "grouped-with-action": "awsui_grouped-with-action_2rhyz_st2f9_256",
29
+ "input-prefix": "awsui_input-prefix_2rhyz_st2f9_261",
30
+ "input-suffix": "awsui_input-suffix_2rhyz_st2f9_262",
31
+ "input-adornment-content": "awsui_input-adornment-content_2rhyz_st2f9_276",
32
+ "input-adornment-divider": "awsui_input-adornment-divider_2rhyz_st2f9_285",
33
+ "input-icon-start": "awsui_input-icon-start_2rhyz_st2f9_311",
34
+ "input-icon-end": "awsui_input-icon-end_2rhyz_st2f9_318",
35
+ "input-button-right": "awsui_input-button-right_2rhyz_st2f9_324",
36
+ "inline-label-trigger-wrapper": "awsui_inline-label-trigger-wrapper_2rhyz_st2f9_328",
37
+ "inline-label-trigger-wrapper-full-width": "awsui_inline-label-trigger-wrapper-full-width_2rhyz_st2f9_331",
38
+ "inline-label-wrapper": "awsui_inline-label-wrapper_2rhyz_st2f9_335",
39
+ "inline-label-wrapper-full-width": "awsui_inline-label-wrapper-full-width_2rhyz_st2f9_338",
40
+ "inline-label": "awsui_inline-label_2rhyz_st2f9_328",
41
+ "inline-label-disabled": "awsui_inline-label-disabled_2rhyz_st2f9_363"
43
42
  };
44
43
 
@@ -40,5 +40,5 @@
40
40
  }
41
41
  }
42
42
  :root {
43
- --awsui-version-info-8bbfddc2: true;
43
+ --awsui-version-info-af861d17: true;
44
44
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/autosuggest-input/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAgE,MAAM,OAAO,CAAC;AAKrF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CAAC,EAAE,aAAa,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAC/C,sBAAsB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM,CAAC;IACzD,yBAAyB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACtD,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CAC/C;AAED,UAAU,4BAA4B;IACpC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,mBAAoB,SAAQ,gBAAgB,CAAC,GAAG;IAC/D,KAAK,CAAC,OAAO,CAAC,EAAE,4BAA4B,GAAG,IAAI,CAAC;IACpD,IAAI,IAAI,IAAI,CAAC;IACb,KAAK,IAAI,IAAI,CAAC;IACd,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,QAAA,MAAM,gBAAgB,mGA2drB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/autosuggest-input/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAgE,MAAM,OAAO,CAAC;AAKrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGhE,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,UAAU,EACX,MAAM,2BAA2B,CAAC;AAInC,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAiB,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAM5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAe5E,UAAU,qBACR,SAAQ,kBAAkB,EAC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AAI,IAAI,CAAC;IACb,KAAK,IAAI,IAAI,CAAC;IACd,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,QAAA,MAAM,gBAAgB,mGA8drB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -32,6 +32,8 @@ const AutosuggestInput = React.forwardRef(({ value, onChange, onBlur, onFocus, o
32
32
  const formFieldContext = useFormFieldContext(restProps);
33
33
  const groupedControlProps = useGroupedControlContext();
34
34
  const inputRef = useRef(null);
35
+ // The field box, not the borderless native input, is the visible trigger whose width the dropdown follows.
36
+ const inputContainerRef = useRef(null);
35
37
  const dropdownContentRef = useRef(null);
36
38
  const dropdownFooterRef = useRef(null);
37
39
  const preventOpenOnFocusRef = useRef(false);
@@ -43,7 +45,7 @@ const AutosuggestInput = React.forwardRef(({ value, onChange, onBlur, onFocus, o
43
45
  const measureTriggerRef = useRef(null);
44
46
  const inlineTokensRef = useRef(null);
45
47
  const [triggerWidth, setTriggerWidth] = useState(null);
46
- useResizeObserver(() => (isTokenMode ? fieldRef.current : inputRef.current), entry => entry.borderBoxWidth > 0 && setTriggerWidth(entry.borderBoxWidth));
48
+ useResizeObserver(() => (isTokenMode ? fieldRef.current : inputContainerRef.current), entry => entry.borderBoxWidth > 0 && setTriggerWidth(entry.borderBoxWidth));
47
49
  const [open, setOpen] = useState(false);
48
50
  const [tokensOverflowOpen, setTokensOverflowOpen] = useState(false);
49
51
  const [announcement, setAnnouncement] = useState('');
@@ -254,7 +256,7 @@ const AutosuggestInput = React.forwardRef(({ value, onChange, onBlur, onFocus, o
254
256
  return;
255
257
  }
256
258
  const clickListener = (event) => {
257
- if (!nodeBelongs(inputRef.current, event.target) &&
259
+ if (!nodeBelongs(inputContainerRef.current, event.target) &&
258
260
  !nodeBelongs(dropdownContentRef.current, event.target) &&
259
261
  !nodeBelongs(dropdownFooterRef.current, event.target) &&
260
262
  !nodeBelongs(fieldRef.current, event.target)) {
@@ -290,6 +292,7 @@ const AutosuggestInput = React.forwardRef(({ value, onChange, onBlur, onFocus, o
290
292
  ariaRequired,
291
293
  clearAriaLabel,
292
294
  ref: inputRef,
295
+ __internalRootRef: inputContainerRef,
293
296
  autoComplete: false,
294
297
  nativeInputAttributes: processAttributes(nativeAttributes, 'Autosuggest', nativeInputAttributes),
295
298
  __skipNativeAttributesWarnings: Object.keys(nativeAttributes),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/autosuggest-input/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,EAAE,EAAO,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrF,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAIhG,OAAO,gBAAgB,MAAM,4BAA4B,CAAC;AAC1D,OAAO,YAAY,MAAM,wBAAwB,CAAC;AASlD,OAAO,aAAa,MAAM,yBAAyB,CAAC;AACpD,OAAO,kBAAkB,MAAM,+BAA+B,CAAC;AAC/D,OAAO,aAAa,MAAM,yBAAyB,CAAC;AAIpD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC3G,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAE3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE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n\nimport React, { Ref, useEffect, useImperativeHandle, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, useResizeObserver } from '@cloudscape-design/component-toolkit/internal';\n\nimport { AutosuggestProps } from '../../../autosuggest/interfaces';\nimport { ExpandToViewport } from '../../../dropdown/interfaces';\nimport InternalDropdown from '../../../dropdown/internal';\nimport InternalIcon from '../../../icon/internal';\nimport {\n BaseChangeDetail,\n BaseInputProps,\n InputAutoCorrect,\n InputClearLabel,\n InputKeyEvents,\n InputProps,\n} from '../../../input/interfaces';\nimport InternalInput from '../../../input/internal';\nimport InternalLiveRegion from '../../../live-region/internal';\nimport InternalToken from '../../../token/internal';\nimport { BaseComponentProps } from '../../../types/base-component';\nimport { BaseKeyDetail, NonCancelableEventHandler } from '../../../types/events';\nimport { FormFieldValidationControlProps } from '../../../types/form-field';\nimport { getBaseProps } from '../../base-component';\nimport { getBreakpointValue } from '../../breakpoints';\nimport { ResetGroupedControlContext, useGroupedControlContext } from '../../context/control-group-context';\nimport { useFormFieldContext } from '../../context/form-field-context';\nimport { fireCancelableEvent, fireNonCancelableEvent } from '../../events';\nimport { InternalBaseComponentProps } from '../../hooks/use-base-component';\nimport { useIMEComposition } from '../../hooks/use-ime-composition';\nimport { useListFocusController } from '../../hooks/use-list-focus-controller';\nimport { KeyCode } from '../../keycode';\nimport { getDropdownMinWidth } from '../../utils/get-dropdown-min-width';\nimport { getInputStylesCss } from '../../utils/input-styles';\nimport { nodeBelongs } from '../../utils/node-belongs';\nimport { processAttributes } from '../../utils/with-native-attributes';\nimport ButtonTrigger from '../button-trigger';\nimport { getGroupedControlClassNames } from '../control-group/grouped-control-styles';\nimport { InlineTokens, InlineTokensRef } from './inline-tokens';\nimport { useTokenOverflow } from './use-token-overflow';\n\nimport styles from './styles.css.js';\n\ninterface AutosuggestInputProps\n extends BaseComponentProps,\n BaseInputProps,\n InputAutoCorrect,\n InputKeyEvents,\n InputClearLabel,\n FormFieldValidationControlProps,\n ExpandToViewport,\n InternalBaseComponentProps {\n ariaControls?: string;\n ariaActivedescendant?: string;\n dropdownExpanded?: boolean;\n dropdownContentKey?: string;\n dropdownContentFocusable?: boolean;\n dropdownContent?: React.ReactNode;\n dropdownFooter?: React.ReactNode;\n dropdownWidth?: number;\n loopFocus?: boolean;\n onCloseDropdown?: NonCancelableEventHandler<null>;\n onDelayedInput?: NonCancelableEventHandler<BaseChangeDetail>;\n onPressArrowDown?: () => void;\n onPressArrowUp?: () => void;\n onPressEnter?: () => boolean;\n style?: InputProps['style'];\n tokens?: ReadonlyArray<AutosuggestProps.Token>;\n tokenOverflowAriaLabel?: (hiddenCount: number) => string;\n tokenInsertedAnnouncement?: (value: string) => string;\n tokenDismissLabel?: (value: string) => string;\n}\n\ninterface AutosuggestInputFocusOptions {\n preventDropdown?: boolean;\n}\n\nexport interface AutosuggestInputRef extends AutosuggestProps.Ref {\n focus(options?: AutosuggestInputFocusOptions): void;\n open(): void;\n close(): void;\n addToken(value: string): void;\n}\n\nconst AutosuggestInput = React.forwardRef(\n (\n {\n value,\n onChange,\n onBlur,\n onFocus,\n onKeyUp,\n onKeyDown,\n name,\n placeholder,\n disabled,\n readOnly,\n autoFocus,\n ariaLabel,\n ariaRequired,\n disableBrowserAutocorrect = false,\n expandToViewport,\n ariaControls,\n ariaActivedescendant,\n clearAriaLabel,\n dropdownExpanded = true,\n dropdownContentKey,\n dropdownContentFocusable = false,\n dropdownContent = null,\n dropdownFooter = null,\n dropdownWidth,\n loopFocus,\n nativeInputAttributes,\n onCloseDropdown,\n onDelayedInput,\n onPressArrowDown,\n onPressArrowUp,\n onPressEnter,\n style,\n tokens,\n tokenOverflowAriaLabel,\n tokenInsertedAnnouncement,\n tokenDismissLabel,\n __internalRootRef,\n ...restProps\n }: AutosuggestInputProps,\n ref: Ref<AutosuggestInputRef>\n ) => {\n const isTokenMode = !!tokens;\n const tokenList = tokens ?? [];\n\n const baseProps = getBaseProps(restProps);\n const formFieldContext = useFormFieldContext(restProps);\n const groupedControlProps = useGroupedControlContext();\n\n const inputRef = useRef<HTMLInputElement>(null);\n const dropdownContentRef = useRef<HTMLDivElement>(null);\n const dropdownFooterRef = useRef<HTMLDivElement>(null);\n const preventOpenOnFocusRef = useRef(false);\n const preventCloseOnBlurRef = useRef(false);\n\n const fieldRef = useRef<HTMLDivElement>(null);\n const leadingIconRef = useRef<HTMLSpanElement>(null);\n const inputWrapperRef = useRef<HTMLDivElement>(null);\n const measureRef = useRef<HTMLDivElement>(null);\n const measureTriggerRef = useRef<HTMLButtonElement>(null);\n const inlineTokensRef = useRef<InlineTokensRef>(null);\n\n const [triggerWidth, setTriggerWidth] = useState<number | null>(null);\n useResizeObserver(\n () => (isTokenMode ? fieldRef.current : inputRef.current),\n entry => entry.borderBoxWidth > 0 && setTriggerWidth(entry.borderBoxWidth)\n );\n\n const [open, setOpen] = useState(false);\n const [tokensOverflowOpen, setTokensOverflowOpen] = useState(false);\n const [announcement, setAnnouncement] = useState('');\n\n const { containerRef, visibleCount } = useTokenOverflow({\n enabled: isTokenMode,\n tokenCount: tokenList.length,\n tokenContentKey: tokenList.map(token => `${token.value}::${token.icon ? 'icon' : 'no-icon'}`).join('\\n'),\n measureRef,\n measureTriggerRef,\n fieldRef,\n leadingIconRef,\n inputWrapperRef,\n layoutKey: [\n formFieldContext.invalid,\n formFieldContext.warning,\n disabled,\n readOnly,\n groupedControlProps.position,\n ].join(),\n });\n const hiddenCount = tokenList.length - visibleCount;\n\n const [nextFocusTokenIndex, setNextFocusTokenIndex] = useState<number | null>(null);\n const focusControllerRef = useListFocusController({\n nextFocusIndex: nextFocusTokenIndex === null ? null : Math.max(0, nextFocusTokenIndex - hiddenCount),\n onFocusMoved: (target, targetType) => {\n if (targetType === 'fallback') {\n preventOpenOnFocusRef.current = true;\n }\n target.focus();\n setNextFocusTokenIndex(null);\n },\n listItemSelector: `.${styles['token-list-item']} button`,\n showMoreSelector: `.${styles['token-overflow-trigger']}`,\n fallbackSelector: 'input',\n });\n const mergedFieldRef = useMergeRefs(fieldRef, focusControllerRef);\n\n useEffect(() => {\n if (!tokensOverflowOpen || (hiddenCount > 0 && !disabled)) {\n return;\n }\n setTokensOverflowOpen(false);\n if (!disabled && !nodeBelongs(fieldRef.current, document.activeElement)) {\n setNextFocusTokenIndex(0);\n }\n }, [tokensOverflowOpen, hiddenCount, disabled]);\n\n const openDropdown = () => !readOnly && setOpen(true);\n\n const closeDropdown = () => {\n setOpen(false);\n fireNonCancelableEvent(onCloseDropdown, null);\n };\n\n const { isComposing } = useIMEComposition(inputRef);\n\n const addToken = (tokenValue: string) => {\n if (!tokenValue || readOnly || disabled) {\n return;\n }\n fireNonCancelableEvent(onChange, { value: '', tokens: [...tokenList, { value: tokenValue }] });\n setAnnouncement(tokenInsertedAnnouncement?.(tokenValue) ?? tokenValue);\n };\n\n const removeToken = (index: number, source: 'inline' | 'overflow') => {\n fireNonCancelableEvent(onChange, { value, tokens: tokenList.filter((_, i) => i !== index) });\n if (source === 'inline') {\n setNextFocusTokenIndex(index);\n }\n };\n\n useImperativeHandle(ref, () => ({\n focus(options?: AutosuggestInputFocusOptions) {\n if (options?.preventDropdown) {\n preventOpenOnFocusRef.current = true;\n }\n inputRef.current?.focus();\n },\n select() {\n inputRef.current?.select();\n },\n open: openDropdown,\n close: closeDropdown,\n addToken,\n }));\n\n const handleBlur = () => {\n if (!preventCloseOnBlurRef.current) {\n closeDropdown();\n fireNonCancelableEvent(onBlur, null);\n }\n };\n\n const handleFocus = () => {\n if (!preventOpenOnFocusRef.current) {\n openDropdown();\n fireNonCancelableEvent(onFocus, null);\n }\n preventOpenOnFocusRef.current = false;\n };\n\n const fireKeydown = (event: CustomEvent<BaseKeyDetail>) => fireCancelableEvent(onKeyDown, event.detail, event);\n\n const clearValue = () =>\n fireNonCancelableEvent(onChange, isTokenMode ? { value: '', tokens: tokenList } : { value: '' });\n\n // Shared ESC key handler logic for both input and dropdown elements\n // When returnFocus is true (from dropdown elements), focus returns to input after closing\n const handleEscapeKey = (returnFocus: boolean) => {\n if (open) {\n closeDropdown();\n if (returnFocus) {\n // Return focus to input when closing from dropdown elements (e.g., recovery button)\n inputRef.current?.focus();\n }\n } else if (value) {\n clearValue();\n }\n };\n\n const handleKeyDown = (event: CustomEvent<BaseKeyDetail>) => {\n switch (event.detail.keyCode) {\n case KeyCode.down: {\n onPressArrowDown?.();\n openDropdown();\n event.preventDefault();\n break;\n }\n case KeyCode.up: {\n onPressArrowUp?.();\n openDropdown();\n event.preventDefault();\n break;\n }\n case KeyCode.enter: {\n if (isComposing()) {\n event.preventDefault();\n return;\n }\n\n if (open) {\n if (!onPressEnter?.()) {\n closeDropdown();\n }\n event.preventDefault();\n } else if (isTokenMode && value) {\n addToken(value.trim());\n event.preventDefault();\n }\n fireKeydown(event);\n break;\n }\n case KeyCode.backspace: {\n if (isTokenMode && !readOnly && !disabled && value === '' && tokenList.length > 0) {\n inlineTokensRef.current?.focusLast();\n event.preventDefault();\n }\n fireKeydown(event);\n break;\n }\n case KeyCode.escape: {\n // Use shared ESC handler, without focus restoration since ESC came from input\n handleEscapeKey(false);\n if (open || value) {\n event.stopPropagation();\n }\n event.preventDefault();\n fireKeydown(event);\n break;\n }\n default: {\n fireKeydown(event);\n }\n }\n };\n\n const handleChange = (value: string) => {\n openDropdown();\n fireNonCancelableEvent(onChange, isTokenMode ? { value, tokens: tokenList } : { value });\n };\n\n const handleDelayedInput = (value: string) => {\n fireNonCancelableEvent(onDelayedInput, { value });\n };\n\n const handleDropdownMouseDown: React.MouseEventHandler = event => {\n // Prevent currently focused element from losing focus.\n if (!dropdownContentFocusable) {\n event.preventDefault();\n }\n // Prevent closing dropdown on click inside.\n else {\n preventCloseOnBlurRef.current = true;\n requestAnimationFrame(() => {\n preventCloseOnBlurRef.current = false;\n });\n }\n };\n\n const expanded = open && dropdownExpanded;\n const nativeAttributes: BaseInputProps['nativeInputAttributes'] = {\n name,\n placeholder,\n autoFocus,\n onClick: openDropdown,\n role: 'combobox',\n 'aria-autocomplete': 'list',\n 'aria-expanded': expanded,\n 'aria-controls': open ? ariaControls : undefined,\n // 'aria-owns' needed for safari+vo to announce activedescendant content\n 'aria-owns': open ? ariaControls : undefined,\n 'aria-label': ariaLabel,\n 'aria-activedescendant': ariaActivedescendant,\n ...(isTokenMode && formFieldContext.invalid ? { 'aria-invalid': 'true' as const } : {}),\n };\n\n // Closes dropdown when outside click is detected.\n // Similar to the internal dropdown implementation but includes the target as well.\n useEffect(() => {\n if (!open) {\n return;\n }\n\n const clickListener = (event: MouseEvent) => {\n if (\n !nodeBelongs(inputRef.current, event.target) &&\n !nodeBelongs(dropdownContentRef.current, event.target) &&\n !nodeBelongs(dropdownFooterRef.current, event.target) &&\n !nodeBelongs(fieldRef.current, event.target)\n ) {\n closeDropdown();\n }\n };\n\n window.addEventListener('mousedown', clickListener);\n\n return () => {\n window.removeEventListener('mousedown', clickListener);\n };\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n\n const handleDropdownKeyDown: React.KeyboardEventHandler = event => {\n // Handle ESC key from focusable elements inside the dropdown (e.g., recovery button)\n // but NOT from the input itself (that's handled by handleKeyDown)\n const isFromInput = event.target === inputRef.current || nodeBelongs(inputRef.current, event.target);\n\n if (event.key === 'Escape' && !isFromInput) {\n event.stopPropagation();\n event.preventDefault();\n // Use shared ESC handler with focus restoration since ESC came from dropdown element\n handleEscapeKey(true);\n }\n };\n\n const sharedInputProps = {\n value,\n onChange: (event: { detail: BaseChangeDetail }) => handleChange(event.detail.value),\n __onDelayedInput: (event: { detail: BaseChangeDetail }) => handleDelayedInput(event.detail.value),\n onKeyDown: handleKeyDown,\n onKeyUp,\n disabled,\n disableBrowserAutocorrect,\n readOnly,\n ariaRequired,\n clearAriaLabel,\n ref: inputRef,\n autoComplete: false,\n nativeInputAttributes: processAttributes(nativeAttributes, 'Autosuggest', nativeInputAttributes),\n __skipNativeAttributesWarnings: Object.keys(nativeAttributes),\n };\n\n const tokenField = isTokenMode && (\n <div\n ref={mergedFieldRef}\n className={clsx(\n styles['token-field'],\n formFieldContext.invalid && styles['token-field-invalid'],\n formFieldContext.warning && !formFieldContext.invalid && styles['token-field-warning'],\n disabled && styles['token-field-disabled'],\n readOnly && !disabled && styles['token-field-readonly'],\n ...getGroupedControlClassNames(styles, groupedControlProps)\n )}\n style={getInputStylesCss(style)}\n >\n <span ref={leadingIconRef} className={styles['token-field-icon']}>\n <InternalIcon name=\"search\" variant={disabled ? 'disabled' : 'subtle'} />\n </span>\n {tokenList.length > 0 && (\n <InlineTokens\n ref={inlineTokensRef}\n tokens={tokenList}\n visibleCount={visibleCount}\n disabled={disabled}\n readOnly={readOnly}\n expandToViewport={expandToViewport}\n overflowOpen={tokensOverflowOpen}\n tokenDismissLabel={tokenDismissLabel}\n tokenOverflowAriaLabel={tokenOverflowAriaLabel}\n onOverflowOpenChange={isOpen => {\n if (isOpen) {\n closeDropdown();\n }\n setTokensOverflowOpen(isOpen);\n }}\n onDismiss={removeToken}\n onFocusEnter={() => (preventOpenOnFocusRef.current = true)}\n onNavigateToInput={() => {\n setTokensOverflowOpen(false);\n inputRef.current?.focus();\n }}\n />\n )}\n <div ref={inputWrapperRef} className={styles['token-input-wrapper']}>\n <InternalInput\n type=\"text\"\n {...sharedInputProps}\n __noBorder={true}\n {...(!disabled && !readOnly && value\n ? {\n __endIcon: 'close' as const,\n __onEndIconClick: () => {\n inputRef.current?.focus();\n clearValue();\n },\n }\n : {})}\n {...formFieldContext}\n invalid={false}\n warning={false}\n />\n </div>\n </div>\n );\n\n const dropdown = (\n <InternalDropdown\n minWidth={getDropdownMinWidth({ expandToViewport, triggerWidth, dropdownWidth })}\n maxWidth={getBreakpointValue('xxs')} // AWSUI-19898\n contentKey={dropdownContentKey}\n onFocus={handleFocus}\n onBlur={handleBlur}\n trigger={\n tokenField || <InternalInput type=\"visualSearch\" {...sharedInputProps} style={style} {...formFieldContext} />\n }\n onMouseDown={handleDropdownMouseDown}\n open={open && (!!dropdownContent || !!dropdownFooter)}\n footer={\n dropdownFooterRef && (\n <div ref={dropdownFooterRef} className={styles['dropdown-footer']} onKeyDown={handleDropdownKeyDown}>\n <ResetGroupedControlContext>{open && dropdownFooter ? dropdownFooter : null}</ResetGroupedControlContext>\n </div>\n )\n }\n expandToViewport={expandToViewport}\n loopFocus={loopFocus}\n content={\n open && dropdownContent ? (\n <div ref={dropdownContentRef} className={styles['dropdown-content']}>\n <ResetGroupedControlContext>{dropdownContent}</ResetGroupedControlContext>\n </div>\n ) : null\n }\n />\n );\n\n return (\n <div\n {...baseProps}\n className={clsx(baseProps.className, styles.root)}\n ref={__internalRootRef}\n {...(isTokenMode && {\n role: 'group',\n 'aria-label': formFieldContext.ariaLabelledby ? undefined : ariaLabel,\n 'aria-labelledby': formFieldContext.ariaLabelledby,\n })}\n >\n {isTokenMode ? (\n <>\n <InternalLiveRegion tagName=\"span\" hidden={true} assertive={true} delay={1}>\n {announcement}\n </InternalLiveRegion>\n <div ref={measureRef} className={styles['measurement-container']}>\n {tokenList.map((token, index) => (\n <span key={index} className={styles['measurement-token']}>\n <InternalToken label={token.value} icon={token.icon} variant=\"inline\" onDismiss={() => {}} />\n </span>\n ))}\n <ButtonTrigger ref={measureTriggerRef} compact={true} tabIndex={-1} ariaHasPopup={false}>\n {`+${tokenList.length}`}\n </ButtonTrigger>\n </div>\n <div ref={containerRef} className={styles['token-field-container']}>\n {dropdown}\n </div>\n </>\n ) : (\n dropdown\n )}\n </div>\n );\n }\n);\n\nexport default AutosuggestInput;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/autosuggest-input/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,EAAE,EAAO,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrF,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAI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GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAC/B,8BAAM,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,mBAAmB,CAAC;gBACtD,oBAAC,aAAa,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,EAAC,QAAQ,EAAC,SAAS,EAAE,GAAG,EAAE,GAAE,CAAC,GAAI,CACxF,CACR,CAAC;YACF,oBAAC,aAAa,IAAC,GAAG,EAAE,iBAAiB,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,YAAY,EAAE,KAAK,IACpF,IAAI,SAAS,CAAC,MAAM,EAAE,CACT,CACZ;QACN,6BAAK,GAAG,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,CAAC,uBAAuB,CAAC,IAC/D,QAAQ,CACL,CACL,CACJ,CAAC,CAAC,CAAC,CACF,QAAQ,CACT,CACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { Ref, useEffect, useImperativeHandle, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, useResizeObserver } from '@cloudscape-design/component-toolkit/internal';\n\nimport { AutosuggestProps } from '../../../autosuggest/interfaces';\nimport { ExpandToViewport } from '../../../dropdown/interfaces';\nimport InternalDropdown from '../../../dropdown/internal';\nimport InternalIcon from '../../../icon/internal';\nimport {\n BaseChangeDetail,\n BaseInputProps,\n InputAutoCorrect,\n InputClearLabel,\n InputKeyEvents,\n InputProps,\n} from '../../../input/interfaces';\nimport InternalInput from '../../../input/internal';\nimport InternalLiveRegion from '../../../live-region/internal';\nimport InternalToken from '../../../token/internal';\nimport { BaseComponentProps } from '../../../types/base-component';\nimport { BaseKeyDetail, NonCancelableEventHandler } from '../../../types/events';\nimport { FormFieldValidationControlProps } from '../../../types/form-field';\nimport { getBaseProps } from '../../base-component';\nimport { getBreakpointValue } from '../../breakpoints';\nimport { ResetGroupedControlContext, useGroupedControlContext } from '../../context/control-group-context';\nimport { useFormFieldContext } from '../../context/form-field-context';\nimport { fireCancelableEvent, fireNonCancelableEvent } from '../../events';\nimport { InternalBaseComponentProps } from '../../hooks/use-base-component';\nimport { useIMEComposition } from '../../hooks/use-ime-composition';\nimport { useListFocusController } from '../../hooks/use-list-focus-controller';\nimport { KeyCode } from '../../keycode';\nimport { getDropdownMinWidth } from '../../utils/get-dropdown-min-width';\nimport { getInputStylesCss } from '../../utils/input-styles';\nimport { nodeBelongs } from '../../utils/node-belongs';\nimport { processAttributes } from '../../utils/with-native-attributes';\nimport ButtonTrigger from '../button-trigger';\nimport { getGroupedControlClassNames } from '../control-group/grouped-control-styles';\nimport { InlineTokens, InlineTokensRef } from './inline-tokens';\nimport { useTokenOverflow } from './use-token-overflow';\n\nimport styles from './styles.css.js';\n\ninterface AutosuggestInputProps\n extends BaseComponentProps,\n BaseInputProps,\n InputAutoCorrect,\n InputKeyEvents,\n InputClearLabel,\n FormFieldValidationControlProps,\n ExpandToViewport,\n InternalBaseComponentProps {\n ariaControls?: string;\n ariaActivedescendant?: string;\n dropdownExpanded?: boolean;\n dropdownContentKey?: string;\n dropdownContentFocusable?: boolean;\n dropdownContent?: React.ReactNode;\n dropdownFooter?: React.ReactNode;\n dropdownWidth?: number;\n loopFocus?: boolean;\n onCloseDropdown?: NonCancelableEventHandler<null>;\n onDelayedInput?: NonCancelableEventHandler<BaseChangeDetail>;\n onPressArrowDown?: () => void;\n onPressArrowUp?: () => void;\n onPressEnter?: () => boolean;\n style?: InputProps['style'];\n tokens?: ReadonlyArray<AutosuggestProps.Token>;\n tokenOverflowAriaLabel?: (hiddenCount: number) => string;\n tokenInsertedAnnouncement?: (value: string) => string;\n tokenDismissLabel?: (value: string) => string;\n}\n\ninterface AutosuggestInputFocusOptions {\n preventDropdown?: boolean;\n}\n\nexport interface AutosuggestInputRef extends AutosuggestProps.Ref {\n focus(options?: AutosuggestInputFocusOptions): void;\n open(): void;\n close(): void;\n addToken(value: string): void;\n}\n\nconst AutosuggestInput = React.forwardRef(\n (\n {\n value,\n onChange,\n onBlur,\n onFocus,\n onKeyUp,\n onKeyDown,\n name,\n placeholder,\n disabled,\n readOnly,\n autoFocus,\n ariaLabel,\n ariaRequired,\n disableBrowserAutocorrect = false,\n expandToViewport,\n ariaControls,\n ariaActivedescendant,\n clearAriaLabel,\n dropdownExpanded = true,\n dropdownContentKey,\n dropdownContentFocusable = false,\n dropdownContent = null,\n dropdownFooter = null,\n dropdownWidth,\n loopFocus,\n nativeInputAttributes,\n onCloseDropdown,\n onDelayedInput,\n onPressArrowDown,\n onPressArrowUp,\n onPressEnter,\n style,\n tokens,\n tokenOverflowAriaLabel,\n tokenInsertedAnnouncement,\n tokenDismissLabel,\n __internalRootRef,\n ...restProps\n }: AutosuggestInputProps,\n ref: Ref<AutosuggestInputRef>\n ) => {\n const isTokenMode = !!tokens;\n const tokenList = tokens ?? [];\n\n const baseProps = getBaseProps(restProps);\n const formFieldContext = useFormFieldContext(restProps);\n const groupedControlProps = useGroupedControlContext();\n\n const inputRef = useRef<HTMLInputElement>(null);\n // The field box, not the borderless native input, is the visible trigger whose width the dropdown follows.\n const inputContainerRef = useRef<HTMLDivElement>(null);\n const dropdownContentRef = useRef<HTMLDivElement>(null);\n const dropdownFooterRef = useRef<HTMLDivElement>(null);\n const preventOpenOnFocusRef = useRef(false);\n const preventCloseOnBlurRef = useRef(false);\n\n const fieldRef = useRef<HTMLDivElement>(null);\n const leadingIconRef = useRef<HTMLSpanElement>(null);\n const inputWrapperRef = useRef<HTMLDivElement>(null);\n const measureRef = useRef<HTMLDivElement>(null);\n const measureTriggerRef = useRef<HTMLButtonElement>(null);\n const inlineTokensRef = useRef<InlineTokensRef>(null);\n\n const [triggerWidth, setTriggerWidth] = useState<number | null>(null);\n useResizeObserver(\n () => (isTokenMode ? fieldRef.current : inputContainerRef.current),\n entry => entry.borderBoxWidth > 0 && setTriggerWidth(entry.borderBoxWidth)\n );\n\n const [open, setOpen] = useState(false);\n const [tokensOverflowOpen, setTokensOverflowOpen] = useState(false);\n const [announcement, setAnnouncement] = useState('');\n\n const { containerRef, visibleCount } = useTokenOverflow({\n enabled: isTokenMode,\n tokenCount: tokenList.length,\n tokenContentKey: tokenList.map(token => `${token.value}::${token.icon ? 'icon' : 'no-icon'}`).join('\\n'),\n measureRef,\n measureTriggerRef,\n fieldRef,\n leadingIconRef,\n inputWrapperRef,\n layoutKey: [\n formFieldContext.invalid,\n formFieldContext.warning,\n disabled,\n readOnly,\n groupedControlProps.position,\n ].join(),\n });\n const hiddenCount = tokenList.length - visibleCount;\n\n const [nextFocusTokenIndex, setNextFocusTokenIndex] = useState<number | null>(null);\n const focusControllerRef = useListFocusController({\n nextFocusIndex: nextFocusTokenIndex === null ? null : Math.max(0, nextFocusTokenIndex - hiddenCount),\n onFocusMoved: (target, targetType) => {\n if (targetType === 'fallback') {\n preventOpenOnFocusRef.current = true;\n }\n target.focus();\n setNextFocusTokenIndex(null);\n },\n listItemSelector: `.${styles['token-list-item']} button`,\n showMoreSelector: `.${styles['token-overflow-trigger']}`,\n fallbackSelector: 'input',\n });\n const mergedFieldRef = useMergeRefs(fieldRef, focusControllerRef);\n\n useEffect(() => {\n if (!tokensOverflowOpen || (hiddenCount > 0 && !disabled)) {\n return;\n }\n setTokensOverflowOpen(false);\n if (!disabled && !nodeBelongs(fieldRef.current, document.activeElement)) {\n setNextFocusTokenIndex(0);\n }\n }, [tokensOverflowOpen, hiddenCount, disabled]);\n\n const openDropdown = () => !readOnly && setOpen(true);\n\n const closeDropdown = () => {\n setOpen(false);\n fireNonCancelableEvent(onCloseDropdown, null);\n };\n\n const { isComposing } = useIMEComposition(inputRef);\n\n const addToken = (tokenValue: string) => {\n if (!tokenValue || readOnly || disabled) {\n return;\n }\n fireNonCancelableEvent(onChange, { value: '', tokens: [...tokenList, { value: tokenValue }] });\n setAnnouncement(tokenInsertedAnnouncement?.(tokenValue) ?? tokenValue);\n };\n\n const removeToken = (index: number, source: 'inline' | 'overflow') => {\n fireNonCancelableEvent(onChange, { value, tokens: tokenList.filter((_, i) => i !== index) });\n if (source === 'inline') {\n setNextFocusTokenIndex(index);\n }\n };\n\n useImperativeHandle(ref, () => ({\n focus(options?: AutosuggestInputFocusOptions) {\n if (options?.preventDropdown) {\n preventOpenOnFocusRef.current = true;\n }\n inputRef.current?.focus();\n },\n select() {\n inputRef.current?.select();\n },\n open: openDropdown,\n close: closeDropdown,\n addToken,\n }));\n\n const handleBlur = () => {\n if (!preventCloseOnBlurRef.current) {\n closeDropdown();\n fireNonCancelableEvent(onBlur, null);\n }\n };\n\n const handleFocus = () => {\n if (!preventOpenOnFocusRef.current) {\n openDropdown();\n fireNonCancelableEvent(onFocus, null);\n }\n preventOpenOnFocusRef.current = false;\n };\n\n const fireKeydown = (event: CustomEvent<BaseKeyDetail>) => fireCancelableEvent(onKeyDown, event.detail, event);\n\n const clearValue = () =>\n fireNonCancelableEvent(onChange, isTokenMode ? { value: '', tokens: tokenList } : { value: '' });\n\n // Shared ESC key handler logic for both input and dropdown elements\n // When returnFocus is true (from dropdown elements), focus returns to input after closing\n const handleEscapeKey = (returnFocus: boolean) => {\n if (open) {\n closeDropdown();\n if (returnFocus) {\n // Return focus to input when closing from dropdown elements (e.g., recovery button)\n inputRef.current?.focus();\n }\n } else if (value) {\n clearValue();\n }\n };\n\n const handleKeyDown = (event: CustomEvent<BaseKeyDetail>) => {\n switch (event.detail.keyCode) {\n case KeyCode.down: {\n onPressArrowDown?.();\n openDropdown();\n event.preventDefault();\n break;\n }\n case KeyCode.up: {\n onPressArrowUp?.();\n openDropdown();\n event.preventDefault();\n break;\n }\n case KeyCode.enter: {\n if (isComposing()) {\n event.preventDefault();\n return;\n }\n\n if (open) {\n if (!onPressEnter?.()) {\n closeDropdown();\n }\n event.preventDefault();\n } else if (isTokenMode && value) {\n addToken(value.trim());\n event.preventDefault();\n }\n fireKeydown(event);\n break;\n }\n case KeyCode.backspace: {\n if (isTokenMode && !readOnly && !disabled && value === '' && tokenList.length > 0) {\n inlineTokensRef.current?.focusLast();\n event.preventDefault();\n }\n fireKeydown(event);\n break;\n }\n case KeyCode.escape: {\n // Use shared ESC handler, without focus restoration since ESC came from input\n handleEscapeKey(false);\n if (open || value) {\n event.stopPropagation();\n }\n event.preventDefault();\n fireKeydown(event);\n break;\n }\n default: {\n fireKeydown(event);\n }\n }\n };\n\n const handleChange = (value: string) => {\n openDropdown();\n fireNonCancelableEvent(onChange, isTokenMode ? { value, tokens: tokenList } : { value });\n };\n\n const handleDelayedInput = (value: string) => {\n fireNonCancelableEvent(onDelayedInput, { value });\n };\n\n const handleDropdownMouseDown: React.MouseEventHandler = event => {\n // Prevent currently focused element from losing focus.\n if (!dropdownContentFocusable) {\n event.preventDefault();\n }\n // Prevent closing dropdown on click inside.\n else {\n preventCloseOnBlurRef.current = true;\n requestAnimationFrame(() => {\n preventCloseOnBlurRef.current = false;\n });\n }\n };\n\n const expanded = open && dropdownExpanded;\n const nativeAttributes: BaseInputProps['nativeInputAttributes'] = {\n name,\n placeholder,\n autoFocus,\n onClick: openDropdown,\n role: 'combobox',\n 'aria-autocomplete': 'list',\n 'aria-expanded': expanded,\n 'aria-controls': open ? ariaControls : undefined,\n // 'aria-owns' needed for safari+vo to announce activedescendant content\n 'aria-owns': open ? ariaControls : undefined,\n 'aria-label': ariaLabel,\n 'aria-activedescendant': ariaActivedescendant,\n ...(isTokenMode && formFieldContext.invalid ? { 'aria-invalid': 'true' as const } : {}),\n };\n\n // Closes dropdown when outside click is detected.\n // Similar to the internal dropdown implementation but includes the target as well.\n useEffect(() => {\n if (!open) {\n return;\n }\n\n const clickListener = (event: MouseEvent) => {\n if (\n !nodeBelongs(inputContainerRef.current, event.target) &&\n !nodeBelongs(dropdownContentRef.current, event.target) &&\n !nodeBelongs(dropdownFooterRef.current, event.target) &&\n !nodeBelongs(fieldRef.current, event.target)\n ) {\n closeDropdown();\n }\n };\n\n window.addEventListener('mousedown', clickListener);\n\n return () => {\n window.removeEventListener('mousedown', clickListener);\n };\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n\n const handleDropdownKeyDown: React.KeyboardEventHandler = event => {\n // Handle ESC key from focusable elements inside the dropdown (e.g., recovery button)\n // but NOT from the input itself (that's handled by handleKeyDown)\n const isFromInput = event.target === inputRef.current || nodeBelongs(inputRef.current, event.target);\n\n if (event.key === 'Escape' && !isFromInput) {\n event.stopPropagation();\n event.preventDefault();\n // Use shared ESC handler with focus restoration since ESC came from dropdown element\n handleEscapeKey(true);\n }\n };\n\n const sharedInputProps = {\n value,\n onChange: (event: { detail: BaseChangeDetail }) => handleChange(event.detail.value),\n __onDelayedInput: (event: { detail: BaseChangeDetail }) => handleDelayedInput(event.detail.value),\n onKeyDown: handleKeyDown,\n onKeyUp,\n disabled,\n disableBrowserAutocorrect,\n readOnly,\n ariaRequired,\n clearAriaLabel,\n ref: inputRef,\n __internalRootRef: inputContainerRef,\n autoComplete: false,\n nativeInputAttributes: processAttributes(nativeAttributes, 'Autosuggest', nativeInputAttributes),\n __skipNativeAttributesWarnings: Object.keys(nativeAttributes),\n };\n\n const tokenField = isTokenMode && (\n <div\n ref={mergedFieldRef}\n className={clsx(\n styles['token-field'],\n formFieldContext.invalid && styles['token-field-invalid'],\n formFieldContext.warning && !formFieldContext.invalid && styles['token-field-warning'],\n disabled && styles['token-field-disabled'],\n readOnly && !disabled && styles['token-field-readonly'],\n ...getGroupedControlClassNames(styles, groupedControlProps)\n )}\n style={getInputStylesCss(style)}\n >\n <span ref={leadingIconRef} className={styles['token-field-icon']}>\n <InternalIcon name=\"search\" variant={disabled ? 'disabled' : 'subtle'} />\n </span>\n {tokenList.length > 0 && (\n <InlineTokens\n ref={inlineTokensRef}\n tokens={tokenList}\n visibleCount={visibleCount}\n disabled={disabled}\n readOnly={readOnly}\n expandToViewport={expandToViewport}\n overflowOpen={tokensOverflowOpen}\n tokenDismissLabel={tokenDismissLabel}\n tokenOverflowAriaLabel={tokenOverflowAriaLabel}\n onOverflowOpenChange={isOpen => {\n if (isOpen) {\n closeDropdown();\n }\n setTokensOverflowOpen(isOpen);\n }}\n onDismiss={removeToken}\n onFocusEnter={() => (preventOpenOnFocusRef.current = true)}\n onNavigateToInput={() => {\n setTokensOverflowOpen(false);\n inputRef.current?.focus();\n }}\n />\n )}\n <div ref={inputWrapperRef} className={styles['token-input-wrapper']}>\n <InternalInput\n type=\"text\"\n {...sharedInputProps}\n __noBorder={true}\n {...(!disabled && !readOnly && value\n ? {\n __endIcon: 'close' as const,\n __onEndIconClick: () => {\n inputRef.current?.focus();\n clearValue();\n },\n }\n : {})}\n {...formFieldContext}\n invalid={false}\n warning={false}\n />\n </div>\n </div>\n );\n\n const dropdown = (\n <InternalDropdown\n minWidth={getDropdownMinWidth({ expandToViewport, triggerWidth, dropdownWidth })}\n maxWidth={getBreakpointValue('xxs')} // AWSUI-19898\n contentKey={dropdownContentKey}\n onFocus={handleFocus}\n onBlur={handleBlur}\n trigger={\n tokenField || <InternalInput type=\"visualSearch\" {...sharedInputProps} style={style} {...formFieldContext} />\n }\n onMouseDown={handleDropdownMouseDown}\n open={open && (!!dropdownContent || !!dropdownFooter)}\n footer={\n dropdownFooterRef && (\n <div ref={dropdownFooterRef} className={styles['dropdown-footer']} onKeyDown={handleDropdownKeyDown}>\n <ResetGroupedControlContext>{open && dropdownFooter ? dropdownFooter : null}</ResetGroupedControlContext>\n </div>\n )\n }\n expandToViewport={expandToViewport}\n loopFocus={loopFocus}\n content={\n open && dropdownContent ? (\n <div ref={dropdownContentRef} className={styles['dropdown-content']}>\n <ResetGroupedControlContext>{dropdownContent}</ResetGroupedControlContext>\n </div>\n ) : null\n }\n />\n );\n\n return (\n <div\n {...baseProps}\n className={clsx(baseProps.className, styles.root)}\n ref={__internalRootRef}\n {...(isTokenMode && {\n role: 'group',\n 'aria-label': formFieldContext.ariaLabelledby ? undefined : ariaLabel,\n 'aria-labelledby': formFieldContext.ariaLabelledby,\n })}\n >\n {isTokenMode ? (\n <>\n <InternalLiveRegion tagName=\"span\" hidden={true} assertive={true} delay={1}>\n {announcement}\n </InternalLiveRegion>\n <div ref={measureRef} className={styles['measurement-container']}>\n {tokenList.map((token, index) => (\n <span key={index} className={styles['measurement-token']}>\n <InternalToken label={token.value} icon={token.icon} variant=\"inline\" onDismiss={() => {}} />\n </span>\n ))}\n <ButtonTrigger ref={measureTriggerRef} compact={true} tabIndex={-1} ariaHasPopup={false}>\n {`+${tokenList.length}`}\n </ButtonTrigger>\n </div>\n <div ref={containerRef} className={styles['token-field-container']}>\n {dropdown}\n </div>\n </>\n ) : (\n dropdown\n )}\n </div>\n );\n }\n);\n\nexport default AutosuggestInput;\n"]}
@@ -7,7 +7,7 @@ interface InternalOptionDefinition extends OptionDefinition {
7
7
  export interface DropdownOption {
8
8
  type?: 'child' | 'parent' | 'select-all' | 'use-entered';
9
9
  disabled?: boolean;
10
- disabledReason?: string;
10
+ disabledReason?: React.ReactNode;
11
11
  option: OptionDefinition | OptionGroup;
12
12
  afterHeader?: boolean;
13
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/option/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEtE,UAAU,wBAAyB,SAAQ,gBAAgB;IACzD,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAChC;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,YAAY,GAAG,aAAa,C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O,CAAC;IACnB,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,MAAM,EAAE,gBAAgB,GAAG,WAAW,CAAC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD,MAAM,CAAC,EAAE,wBAAwB,CAAC;IAClC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;IACrD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,SAAS,CAAC;CAC3B;AAGD,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../src/internal/components/option/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { ReactNode } from 'react';\n\nimport { BaseComponentProps } from '../../../types/base-component';\nimport { OptionDefinition, OptionGroup } from '../../../types/option';\n\ninterface InternalOptionDefinition extends OptionDefinition {\n __customIcon?: React.ReactNode;\n}\n\nexport interface DropdownOption {\n type?: 'child' | 'parent' | 'select-all' | 'use-entered';\n disabled?: boolean;\n disabledReason?: string;\n option: OptionDefinition | OptionGroup;\n afterHeader?: boolean;\n}\n\nexport interface OptionProps extends BaseComponentProps {\n option?: InternalOptionDefinition;\n triggerVariant?: boolean;\n highlightText?: string;\n highlightedOption?: boolean;\n selectedOption?: boolean;\n isGroupOption?: boolean;\n disableTitleTooltip?: boolean;\n labelContainerRef?: React.RefObject<HTMLSpanElement>;\n labelRef?: React.RefObject<HTMLSpanElement>;\n labelId?: string;\n customContent?: ReactNode;\n}\n\n// Backward-compatibility re-export for consumers importing this public type from the internal path.\nexport { OptionDefinition, OptionGroup } from '../../../types/option';\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../src/internal/components/option/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { ReactNode } from 'react';\n\nimport { BaseComponentProps } from '../../../types/base-component';\nimport { OptionDefinition, OptionGroup } from '../../../types/option';\n\ninterface InternalOptionDefinition extends OptionDefinition {\n __customIcon?: React.ReactNode;\n}\n\nexport interface DropdownOption {\n type?: 'child' | 'parent' | 'select-all' | 'use-entered';\n disabled?: boolean;\n disabledReason?: React.ReactNode;\n option: OptionDefinition | OptionGroup;\n afterHeader?: boolean;\n}\n\nexport interface OptionProps extends BaseComponentProps {\n option?: InternalOptionDefinition;\n triggerVariant?: boolean;\n highlightText?: string;\n highlightedOption?: boolean;\n selectedOption?: boolean;\n isGroupOption?: boolean;\n disableTitleTooltip?: boolean;\n labelContainerRef?: React.RefObject<HTMLSpanElement>;\n labelRef?: React.RefObject<HTMLSpanElement>;\n labelId?: string;\n customContent?: ReactNode;\n}\n\n// Backward-compatibility re-export for consumers importing this public type from the internal path.\nexport { OptionDefinition, OptionGroup } from '../../../types/option';\n"]}
@@ -1,6 +1,6 @@
1
1
  export var PACKAGE_SOURCE = "components";
2
- export var PACKAGE_VERSION = "3.0.0 (8bbfddc2)";
3
- export var GIT_SHA = "8bbfddc2";
2
+ export var PACKAGE_VERSION = "3.0.0 (af861d17)";
3
+ export var GIT_SHA = "af861d17";
4
4
  export var THEME = "open-source-visual-refresh";
5
5
  export var SYSTEM = "core";
6
6
  export var ALWAYS_VISUAL_REFRESH = true;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "PACKAGE_SOURCE": "components",
3
- "PACKAGE_VERSION": "3.0.0 (8bbfddc2)",
4
- "GIT_SHA": "8bbfddc2",
3
+ "PACKAGE_VERSION": "3.0.0 (af861d17)",
4
+ "GIT_SHA": "af861d17",
5
5
  "THEME": "open-source-visual-refresh",
6
6
  "SYSTEM": "core",
7
7
  "ALWAYS_VISUAL_REFRESH": true,
@@ -1,4 +1,5 @@
1
- export default function useHiddenDescription(description?: string): {
1
+ import React from 'react';
2
+ export default function useHiddenDescription(description?: React.ReactNode): {
2
3
  targetProps: {
3
4
  'aria-describedby': string | undefined;
4
5
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/hooks/use-hidden-description/index.tsx"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,WAAW,CAAC,EAAE,MAAM;;;;;;EAahE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/hooks/use-hidden-description/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS;;;;;;EAazE"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/hooks/use-hidden-description/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5E,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,WAAoB;IAC/D,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,OAAO;QACL,WAAW,EAAE;YACX,kBAAkB,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS;SACjD;QACD,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC,CAC3B,8BAAM,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,IACvB,WAAW,CACP,CACR,CAAC,CAAC,CAAC,IAAI;QACR,aAAa,EAAE,EAAE;KAClB,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';\n\nimport { useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nexport default function useHiddenDescription(description?: string) {\n const id = useUniqueId();\n return {\n targetProps: {\n 'aria-describedby': description ? id : undefined,\n },\n descriptionEl: description ? (\n <span id={id} hidden={true}>\n {description}\n </span>\n ) : null,\n descriptionId: id,\n };\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/hooks/use-hidden-description/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5E,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,WAA6B;IACxE,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,OAAO;QACL,WAAW,EAAE;YACX,kBAAkB,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS;SACjD;QACD,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC,CAC3B,8BAAM,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,IACvB,WAAW,CACP,CACR,CAAC,CAAC,CAAC,IAAI;QACR,aAAa,EAAE,EAAE;KAClB,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';\n\nimport { useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nexport default function useHiddenDescription(description?: React.ReactNode) {\n const id = useUniqueId();\n return {\n targetProps: {\n 'aria-describedby': description ? id : undefined,\n },\n descriptionEl: description ? (\n <span id={id} hidden={true}>\n {description}\n </span>\n ) : null,\n descriptionId: id,\n };\n}\n"]}
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "8bbfddc2c87d3deef35520869b2708f61165f9e2"
2
+ "commit": "af861d178cb6c5f52082d837c39d965f1b245d1c"
3
3
  }
package/manifest.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "artifactId": "11884992259",
2
+ "artifactId": "12177409172",
3
3
  "repoName": "components",
4
- "commitSha": "8bbfddc2c87d3deef35520869b2708f61165f9e2"
4
+ "commitSha": "af861d178cb6c5f52082d837c39d965f1b245d1c"
5
5
  }
package/package.json CHANGED
@@ -377,7 +377,7 @@
377
377
  "./internal/base-theme/styles.css.js",
378
378
  "./internal/base-component/styles.css.js"
379
379
  ],
380
- "version": "3.0.1401",
380
+ "version": "3.0.1402",
381
381
  "repository": {
382
382
  "type": "git",
383
383
  "url": "https://github.com/cloudscape-design/components.git"
@@ -13,7 +13,7 @@ export interface SegmentedControlProps extends BaseComponentProps {
13
13
  *
14
14
  * - `id` (string) - The ID of the segment.
15
15
  * - `disabled` [boolean] - (Optional) Determines whether the segment is disabled, which prevents the user from selecting it.
16
- * - `disabledReason` (string) - (Optional) Displays tooltip near the segment when disabled. Use to provide additional context.
16
+ * - `disabledReason` (ReactNode) - (Optional) Displays tooltip near the segment when disabled. Use to provide additional context. Do not place interactive elements like links or buttons.
17
17
  * - `iconName` (string) - (Optional) Specifies the name of the icon, used with the [icon component](/components/icon/).
18
18
  * - `iconAlt` (string) - (Optional) Specifies alternate text for the icon when using `iconUrl`, or `iconName` without `text`.
19
19
  * This is required when you use an icon without `text`.
@@ -47,7 +47,7 @@ export declare namespace SegmentedControlProps {
47
47
  interface Option {
48
48
  id: string;
49
49
  disabled?: boolean;
50
- disabledReason?: string;
50
+ disabledReason?: React.ReactNode;
51
51
  iconName?: IconProps.Name;
52
52
  iconAlt?: string;
53
53
  iconUrl?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/segmented-control/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,MAAM,WAAW,qBAAsB,SAAQ,kBAAkB;IAC/D;;OAEG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;IAEtD;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,EAAE,yBAAyB,CAAC,qBAAqB,CAAC,YAAY,CAAC,CAAC;IAEzE;;;;OAIG;IACH,KAAK,CAAC,EAAE,qBAAqB,CAAC,KAAK,CAAC;CACrC;AAED,yBAAiB,qBAAqB,CAAC;IACrC,UAAiB,MAAM;QACrB,EAAE,EAAE,MAAM,CAAC;QACX,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC;QAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;KACf;IAED,UAAiB,YAAY;QAC3B,UA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SAAS,CAAC,EAAE;gBACV,WAAW,CAAC,EAAE,MAAM,CAAC;gBACrB,YAAY,CAAC,EAAE,MAAM,CAAC;gBACtB,WAAW,CAAC,EAAE,MAAM,CAAC;aACtB,CAAC;YACF,YAAY,CAAC,EAAE,MAAM,CAAC;YACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;YAClB,YAAY,CAAC,EAAE,MAAM,CAAC;YACtB,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB,CAAC;KACH;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/segmented-control/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { IconProps } from '../icon/interfaces';\nimport { BaseComponentProps } from '../types/base-component';\nimport { NonCancelableEventHandler } from '../types/events';\n\nexport interface SegmentedControlProps extends BaseComponentProps {\n /**\n * ID of the selected option. If you want to clear the selection, use `null`.\n */\n selectedId: string | null;\n\n /**\n * An array of objects representing options. Only up to 6 options are supported.\n * Each segment has the following properties:\n *\n * - `id` (string) - The ID of the segment.\n * - `disabled` [boolean] - (Optional) Determines whether the segment is disabled, which prevents the user from selecting it.\n * - `disabledReason` (string) - (Optional) Displays tooltip near the segment when disabled. Use to provide additional context.\n * - `iconName` (string) - (Optional) Specifies the name of the icon, used with the [icon component](/components/icon/).\n * - `iconAlt` (string) - (Optional) Specifies alternate text for the icon when using `iconUrl`, or `iconName` without `text`.\n * This is required when you use an icon without `text`.\n * - `iconUrl` (string) - (Optional) Specifies the URL of a custom icon.\n * - `iconSvg` (ReactNode) - (Optional) Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * - `text` (string) - (Optional) Specifies the text of the segment.\n */\n options?: ReadonlyArray<SegmentedControlProps.Option>;\n\n /**\n * Defines the label of the entire segmented control. In the standard view (that is, all individual segments are visible),\n * this label is used as `aria-label` on the group of segments. In a narrow container, where this component is displayed as a select component,\n * the label is visible and attached to the select component, unless `ariaLabelledBy` is defined. Don't use `label` and `ariaLabelledBy` at the same time.\n */\n label?: string;\n\n /**\n * Adds aria-labelledby to the component. Create a visually hidden element with an ID and set this property to that ID. If you don't want the label to be visible in narrow containers, use this property instead of `label`.\n */\n ariaLabelledby?: string;\n\n /**\n * Called when the user selects a different segment.\n */\n onChange?: NonCancelableEventHandler<SegmentedControlProps.ChangeDetail>;\n\n /**\n * An object containing CSS properties to customize the segmented control's visual appearance.\n * Refer to the [style](/components/segmented-control/?tabId=style) tab for more details.\n * @awsuiSystem core\n */\n style?: SegmentedControlProps.Style;\n}\n\nexport namespace SegmentedControlProps {\n export interface Option {\n id: string;\n disabled?: boolean;\n disabledReason?: string;\n iconName?: IconProps.Name;\n iconAlt?: string;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n text?: string;\n }\n\n export interface ChangeDetail {\n selectedId: string;\n }\n\n export interface Style {\n root?: {\n borderRadius?: string;\n };\n segment?: {\n background?: {\n active?: string;\n default?: string;\n disabled?: string;\n hover?: string;\n };\n color?: {\n active?: string;\n default?: string;\n disabled?: string;\n hover?: string;\n };\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n borderRadius?: string;\n fontSize?: string;\n paddingBlock?: string;\n paddingInline?: string;\n };\n }\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/segmented-control/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { IconProps } from '../icon/interfaces';\nimport { BaseComponentProps } from '../types/base-component';\nimport { NonCancelableEventHandler } from '../types/events';\n\nexport interface SegmentedControlProps extends BaseComponentProps {\n /**\n * ID of the selected option. If you want to clear the selection, use `null`.\n */\n selectedId: string | null;\n\n /**\n * An array of objects representing options. Only up to 6 options are supported.\n * Each segment has the following properties:\n *\n * - `id` (string) - The ID of the segment.\n * - `disabled` [boolean] - (Optional) Determines whether the segment is disabled, which prevents the user from selecting it.\n * - `disabledReason` (ReactNode) - (Optional) Displays tooltip near the segment when disabled. Use to provide additional context. Do not place interactive elements like links or buttons.\n * - `iconName` (string) - (Optional) Specifies the name of the icon, used with the [icon component](/components/icon/).\n * - `iconAlt` (string) - (Optional) Specifies alternate text for the icon when using `iconUrl`, or `iconName` without `text`.\n * This is required when you use an icon without `text`.\n * - `iconUrl` (string) - (Optional) Specifies the URL of a custom icon.\n * - `iconSvg` (ReactNode) - (Optional) Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * - `text` (string) - (Optional) Specifies the text of the segment.\n */\n options?: ReadonlyArray<SegmentedControlProps.Option>;\n\n /**\n * Defines the label of the entire segmented control. In the standard view (that is, all individual segments are visible),\n * this label is used as `aria-label` on the group of segments. In a narrow container, where this component is displayed as a select component,\n * the label is visible and attached to the select component, unless `ariaLabelledBy` is defined. Don't use `label` and `ariaLabelledBy` at the same time.\n */\n label?: string;\n\n /**\n * Adds aria-labelledby to the component. Create a visually hidden element with an ID and set this property to that ID. If you don't want the label to be visible in narrow containers, use this property instead of `label`.\n */\n ariaLabelledby?: string;\n\n /**\n * Called when the user selects a different segment.\n */\n onChange?: NonCancelableEventHandler<SegmentedControlProps.ChangeDetail>;\n\n /**\n * An object containing CSS properties to customize the segmented control's visual appearance.\n * Refer to the [style](/components/segmented-control/?tabId=style) tab for more details.\n * @awsuiSystem core\n */\n style?: SegmentedControlProps.Style;\n}\n\nexport namespace SegmentedControlProps {\n export interface Option {\n id: string;\n disabled?: boolean;\n disabledReason?: React.ReactNode;\n iconName?: IconProps.Name;\n iconAlt?: string;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n text?: string;\n }\n\n export interface ChangeDetail {\n selectedId: string;\n }\n\n export interface Style {\n root?: {\n borderRadius?: string;\n };\n segment?: {\n background?: {\n active?: string;\n default?: string;\n disabled?: string;\n hover?: string;\n };\n color?: {\n active?: string;\n default?: string;\n disabled?: string;\n hover?: string;\n };\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n borderRadius?: string;\n fontSize?: string;\n paddingBlock?: string;\n paddingInline?: string;\n };\n }\n}\n"]}
@@ -22,7 +22,7 @@ export interface BaseSelectProps extends BaseDropdownHostProps, BaseComponentPro
22
22
  * - `lang` (string) - (Optional) The language of the option or group, provided as a BCP 47 language tag.
23
23
  * - `description` (string) - (Optional) Further information about the option or group that appears below the label.
24
24
  * - `disabled` (boolean) - (Optional) Determines whether the option or group is disabled.
25
- * - `disabledReason` (string) - (Optional) Displays tooltip near the item when disabled. Use to provide additional context.
25
+ * - `disabledReason` (ReactNode) - (Optional) Displays tooltip near the item when disabled. Use to provide additional context. Do not place interactive elements like links or buttons.
26
26
  * - `labelTag` (string) - (Optional) A label tag that provides additional guidance, shown next to the label.
27
27
  * - `tags` [string[]] - (Optional) A list of tags giving further guidance about the option or group.
28
28
  * - `filteringTags` [string[]] - (Optional) A list of additional tags used for automatic filtering.
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/select/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { ReactNode } from 'react';\n\nimport { BaseDropdownHostProps, OptionsFilteringType, OptionsLoadItemsDetail } from '../dropdown/interfaces';\nimport { BaseComponentProps } from '../types/base-component';\nimport { DropdownStatusProps } from '../types/dropdown-status';\nimport { NonCancelableEventHandler } from '../types/events';\nimport { FormFieldValidationControlProps } from '../types/form-field';\nimport { OptionDefinition, OptionGroup as OptionGroupDefinition } from '../types/option';\n\nexport interface BaseSelectProps\n extends BaseDropdownHostProps,\n BaseComponentProps,\n FormFieldValidationControlProps,\n DropdownStatusProps {\n /**\n * Specifies an array of options that are displayed to the user as a dropdown list.\n * The options can be grouped using `OptionGroup` objects.\n *\n * #### Option\n * - `value` (string) - The returned value of the option when selected.\n *\n * #### OptionGroup\n * - `value` (string) - Used to locate option group in test utils.\n * - `options` (Option[]) - (Optional) The options under this group.\n *\n * #### Shared Option and OptionGroup properties\n * - `label` (string) - (Optional) Option or group text displayed to the user.\n * - `lang` (string) - (Optional) The language of the option or group, provided as a BCP 47 language tag.\n * - `description` (string) - (Optional) Further information about the option or group that appears below the label.\n * - `disabled` (boolean) - (Optional) Determines whether the option or group is disabled.\n * - `disabledReason` (string) - (Optional) Displays tooltip near the item when disabled. Use to provide additional context.\n * - `labelTag` (string) - (Optional) A label tag that provides additional guidance, shown next to the label.\n * - `tags` [string[]] - (Optional) A list of tags giving further guidance about the option or group.\n * - `filteringTags` [string[]] - (Optional) A list of additional tags used for automatic filtering.\n * - `iconName` (string) - (Optional) Specifies the name of an [icon](/components/icon/) to display in the option or group.\n * - `iconAriaLabel` (string) - (Optional) Specifies alternate text for the icon. We recommend that you provide this for accessibility.\n * - `iconAlt` (string) - (Optional) **Deprecated**, replaced by \\`iconAriaLabel\\`. Specifies alternate text for a custom icon, for use with `iconUrl`.\n * - `iconUrl` (string) - (Optional) URL of a custom icon.\n * - `iconSvg` (ReactNode) - (Optional) Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n *\n * Note: Only one level of option nesting is supported.\n *\n * If you want to use the built-in filtering capabilities of this component, provide\n * a list of all valid options here and they will be automatically filtered based on the user's filtering input.\n *\n * Alternatively, you can listen to the `onChange` or `onLoadItems` event and set new options\n * on your own.\n **/\n options?: SelectProps.Options;\n\n /**\n * Determines how filtering is applied to the list of `options`:\n *\n * * `auto` - The component will automatically filter options based on user input.\n * * `manual` - You will set up `onChange` or `onLoadItems` event listeners and filter options on your side or request\n * them from server.\n *\n * By default the component will filter the provided `options` based on the value of the filtering input field.\n * Only options that have a `value`, `label`, `description` or `labelTag` that contains the input value as a substring\n * are displayed in the list of options.\n *\n * If you set this property to `manual`, this default filtering mechanism is disabled and all provided `options` are\n * displayed in the dropdown list. In that case make sure that you use the `onChange` or `onLoadItems` events in order\n * to set the `options` property to the options that are relevant for the user, given the filtering input value.\n *\n * Note: Manual filtering doesn't disable match highlighting.\n **/\n filteringType?: OptionsFilteringType;\n\n /**\n * Determines whether the whole select component is disabled.\n */\n disabled?: boolean;\n /**\n * Specifies the placeholder to display in the filtering input if filtering is enabled.\n */\n filteringPlaceholder?: string;\n\n /**\n * Specifies the text to display with the number of matches at the bottom of the dropdown menu while filtering.\n */\n filteringResultsText?: (matchesCount: number, totalCount: number) => string;\n /**\n * Adds an `aria-label` on the built-in filtering input if filtering is enabled.\n */\n filteringAriaLabel?: string;\n /**\n * Adds an `aria-label` to the clear button inside the search input.\n * @i18n\n */\n filteringClearAriaLabel?: string;\n /**\n * @deprecated Has no effect.\n */\n name?: string;\n /**\n * Specifies the hint text that's displayed in the field when no option has been selected.\n */\n placeholder?: string;\n /**\n * Specifies the ID for the trigger component. It uses an automatically generated ID by default.\n */\n controlId?: string;\n /**\n * Adds `aria-required` to the native input element.\n */\n ariaRequired?: boolean;\n /**\n * Adds `aria-label` to the select element.\n * Use this if you don't have a visible label for this control.\n */\n ariaLabel?: string;\n /**\n * Specifies the localized string that describes an option as being selected.\n * This is required to provide a good screen reader experience. For more information, see the\n * [accessibility guidelines](/components/select/?tabId=usage#accessibility-guidelines).\n * @i18n\n */\n selectedAriaLabel?: string;\n /**\n * Overrides the element that is announced to screen readers\n * when the highlighted option changes. By default, this announces\n * the option's name and properties, and its selected state if\n * the `selectedAriaLabel` property is defined.\n * The highlighted option is provided, and its group (if groups\n * are used and it differs from the group of the previously highlighted option).\n *\n * For more information, see the\n * [accessibility guidelines](/components/select/?tabId=usage#accessibility-guidelines).\n */\n renderHighlightedAriaLive?: SelectProps.ContainingOptionAndGroupString;\n /**\n * Displayed for `filteringType=\"auto\"` when there are no matches for the filtering.\n */\n noMatch?: React.ReactNode;\n /**\n * Called when input focus is removed from the UI control.\n */\n onBlur?: NonCancelableEventHandler;\n /**\n * Called when input focus is set onto the UI control.\n */\n onFocus?: NonCancelableEventHandler;\n\n /**\n * Specifies if the control is read-only, which prevents the\n * user from both modifying the value and opening the dropdown. A read-only control is still focusable.\n */\n readOnly?: boolean;\n\n /**\n * Renders content at the top of the dropdown, above the filter input (when filtering is enabled) and the\n * options list. Pinned (sticky) to the top and rendered in every state (empty, no-match, loading, error,\n * finished).\n */\n renderDropdownHeader?: SelectProps.DropdownContentRenderer;\n\n /**\n * Renders content at the bottom of the dropdown. The content is always sticky and never scrolls with the\n * options list. It is added below the built-in status region. Receives the current filtering state and a\n * callback to close the dropdown.\n */\n renderDropdownFooter?: SelectProps.DropdownContentRenderer;\n\n /**\n * Determines the ARIA role of the dropdown.\n *\n * - `auto` (default): the dropdown uses a listbox role, or a dialog role wrapping the listbox when built-in\n * filtering is enabled.\n * - `dialog`: the dropdown always uses a dialog role wrapping the listbox, even without built-in filtering. Use\n * this when you render interactive custom content and want assistive technologies to treat the dropdown as a dialog.\n */\n dropdownRole?: SelectProps.DropdownRole;\n\n /**\n * Adds `aria-describedby` to the dropdown's listbox/dialog content.\n */\n dropdownAriaDescribedby?: string;\n}\n\nexport interface SelectProps extends BaseSelectProps {\n /**\n * Adds a small label inline with the input for saving vertical space in the UI.\n * For use with collection select filters only.\n */\n inlineLabelText?: string;\n onLoadItems?: NonCancelableEventHandler<SelectProps.LoadItemsDetail>;\n /**\n * Adds `aria-labelledby` to the component. If you're using this component within a form field,\n * don't set this property because the form field component automatically sets it.\n *\n * Use this property if the component isn't using `inlineLabelText` and isn't surrounded by a form field, or you want to override the value\n * automatically set by the form field (for example, if you have two components within a single form field).\n *\n * To use it correctly, define an ID for the element you want to use as label and set the property to that ID.\n */\n ariaLabelledby?: string;\n /**\n * Defines the variant of the trigger. You can use a simple label or the entire option (`label | option`)\n */\n triggerVariant?: SelectProps.TriggerVariant;\n /**\n * Specifies the currently selected option.\n * If you want to clear the selection, use `null`.\n */\n selectedOption: SelectProps.Option | null;\n /**\n * Called when the user selects an option.\n * The event `detail` contains the current `selectedOption`.\n */\n onChange?: NonCancelableEventHandler<SelectProps.ChangeDetail>;\n\n /**\n * Automatically focuses the trigger when component is mounted.\n */\n autoFocus?: boolean;\n /**\n * Specifies a render function to render custom options in the dropdown menu or trigger.\n */\n renderOption?: SelectProps.SelectOptionItemRenderer;\n}\n\nexport namespace SelectProps {\n export type FilteringType = OptionsFilteringType;\n export type TriggerVariant = 'label' | 'option';\n\n /**\n * The argument passed to the dropdown render functions (`renderDropdownHeader`\n * and `renderDropdownFooter`).\n */\n export interface DropdownContentProps {\n filterText: string;\n\n closeDropdown: () => void;\n }\n\n export type DropdownRole = 'auto' | 'dialog';\n\n /**\n * A render function for custom dropdown content, used by `renderDropdownHeader` and `renderDropdownFooter`.\n * Receives the current filtering state and a callback to close the dropdown.\n */\n export type DropdownContentRenderer = (props: DropdownContentProps) => ReactNode | null;\n\n export type Option = OptionDefinition;\n export type OptionGroup = OptionGroupDefinition;\n export type Options = ReadonlyArray<Option | OptionGroup>;\n\n export interface SelectOptionItem {\n type: 'item';\n index: number;\n option: Option;\n highlighted: boolean;\n selected: boolean;\n disabled: boolean;\n parent: SelectOptionGroupItem | null;\n }\n export interface SelectOptionGroupItem {\n type: 'group';\n index: number;\n option: OptionGroup;\n disabled: boolean;\n }\n export interface SelectTriggerOptionItem {\n type: 'trigger';\n option: Option;\n }\n export type SelectItem = SelectOptionItem | SelectOptionGroupItem | SelectTriggerOptionItem;\n export type SelectOptionItemRenderer = (props: { item: SelectItem; filterText?: string }) => ReactNode | null;\n\n /* eslint-disable-next-line @typescript-eslint/no-empty-object-type --\n * Required to create a distinct named type for the documenter.\n **/\n export interface LoadItemsDetail extends OptionsLoadItemsDetail {}\n\n export interface ChangeDetail {\n selectedOption: Option;\n }\n\n export interface ContainingOptionAndGroupString {\n (option: Option, group?: OptionGroup): string;\n }\n\n export interface Ref {\n /**\n * Sets focus on the element without opening the dropdown or showing a visual focus indicator.\n */\n focus(): void;\n }\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/select/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { ReactNode } from 'react';\n\nimport { BaseDropdownHostProps, OptionsFilteringType, OptionsLoadItemsDetail } from '../dropdown/interfaces';\nimport { BaseComponentProps } from '../types/base-component';\nimport { DropdownStatusProps } from '../types/dropdown-status';\nimport { NonCancelableEventHandler } from '../types/events';\nimport { FormFieldValidationControlProps } from '../types/form-field';\nimport { OptionDefinition, OptionGroup as OptionGroupDefinition } from '../types/option';\n\nexport interface BaseSelectProps\n extends BaseDropdownHostProps,\n BaseComponentProps,\n FormFieldValidationControlProps,\n DropdownStatusProps {\n /**\n * Specifies an array of options that are displayed to the user as a dropdown list.\n * The options can be grouped using `OptionGroup` objects.\n *\n * #### Option\n * - `value` (string) - The returned value of the option when selected.\n *\n * #### OptionGroup\n * - `value` (string) - Used to locate option group in test utils.\n * - `options` (Option[]) - (Optional) The options under this group.\n *\n * #### Shared Option and OptionGroup properties\n * - `label` (string) - (Optional) Option or group text displayed to the user.\n * - `lang` (string) - (Optional) The language of the option or group, provided as a BCP 47 language tag.\n * - `description` (string) - (Optional) Further information about the option or group that appears below the label.\n * - `disabled` (boolean) - (Optional) Determines whether the option or group is disabled.\n * - `disabledReason` (ReactNode) - (Optional) Displays tooltip near the item when disabled. Use to provide additional context. Do not place interactive elements like links or buttons.\n * - `labelTag` (string) - (Optional) A label tag that provides additional guidance, shown next to the label.\n * - `tags` [string[]] - (Optional) A list of tags giving further guidance about the option or group.\n * - `filteringTags` [string[]] - (Optional) A list of additional tags used for automatic filtering.\n * - `iconName` (string) - (Optional) Specifies the name of an [icon](/components/icon/) to display in the option or group.\n * - `iconAriaLabel` (string) - (Optional) Specifies alternate text for the icon. We recommend that you provide this for accessibility.\n * - `iconAlt` (string) - (Optional) **Deprecated**, replaced by \\`iconAriaLabel\\`. Specifies alternate text for a custom icon, for use with `iconUrl`.\n * - `iconUrl` (string) - (Optional) URL of a custom icon.\n * - `iconSvg` (ReactNode) - (Optional) Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n *\n * Note: Only one level of option nesting is supported.\n *\n * If you want to use the built-in filtering capabilities of this component, provide\n * a list of all valid options here and they will be automatically filtered based on the user's filtering input.\n *\n * Alternatively, you can listen to the `onChange` or `onLoadItems` event and set new options\n * on your own.\n **/\n options?: SelectProps.Options;\n\n /**\n * Determines how filtering is applied to the list of `options`:\n *\n * * `auto` - The component will automatically filter options based on user input.\n * * `manual` - You will set up `onChange` or `onLoadItems` event listeners and filter options on your side or request\n * them from server.\n *\n * By default the component will filter the provided `options` based on the value of the filtering input field.\n * Only options that have a `value`, `label`, `description` or `labelTag` that contains the input value as a substring\n * are displayed in the list of options.\n *\n * If you set this property to `manual`, this default filtering mechanism is disabled and all provided `options` are\n * displayed in the dropdown list. In that case make sure that you use the `onChange` or `onLoadItems` events in order\n * to set the `options` property to the options that are relevant for the user, given the filtering input value.\n *\n * Note: Manual filtering doesn't disable match highlighting.\n **/\n filteringType?: OptionsFilteringType;\n\n /**\n * Determines whether the whole select component is disabled.\n */\n disabled?: boolean;\n /**\n * Specifies the placeholder to display in the filtering input if filtering is enabled.\n */\n filteringPlaceholder?: string;\n\n /**\n * Specifies the text to display with the number of matches at the bottom of the dropdown menu while filtering.\n */\n filteringResultsText?: (matchesCount: number, totalCount: number) => string;\n /**\n * Adds an `aria-label` on the built-in filtering input if filtering is enabled.\n */\n filteringAriaLabel?: string;\n /**\n * Adds an `aria-label` to the clear button inside the search input.\n * @i18n\n */\n filteringClearAriaLabel?: string;\n /**\n * @deprecated Has no effect.\n */\n name?: string;\n /**\n * Specifies the hint text that's displayed in the field when no option has been selected.\n */\n placeholder?: string;\n /**\n * Specifies the ID for the trigger component. It uses an automatically generated ID by default.\n */\n controlId?: string;\n /**\n * Adds `aria-required` to the native input element.\n */\n ariaRequired?: boolean;\n /**\n * Adds `aria-label` to the select element.\n * Use this if you don't have a visible label for this control.\n */\n ariaLabel?: string;\n /**\n * Specifies the localized string that describes an option as being selected.\n * This is required to provide a good screen reader experience. For more information, see the\n * [accessibility guidelines](/components/select/?tabId=usage#accessibility-guidelines).\n * @i18n\n */\n selectedAriaLabel?: string;\n /**\n * Overrides the element that is announced to screen readers\n * when the highlighted option changes. By default, this announces\n * the option's name and properties, and its selected state if\n * the `selectedAriaLabel` property is defined.\n * The highlighted option is provided, and its group (if groups\n * are used and it differs from the group of the previously highlighted option).\n *\n * For more information, see the\n * [accessibility guidelines](/components/select/?tabId=usage#accessibility-guidelines).\n */\n renderHighlightedAriaLive?: SelectProps.ContainingOptionAndGroupString;\n /**\n * Displayed for `filteringType=\"auto\"` when there are no matches for the filtering.\n */\n noMatch?: React.ReactNode;\n /**\n * Called when input focus is removed from the UI control.\n */\n onBlur?: NonCancelableEventHandler;\n /**\n * Called when input focus is set onto the UI control.\n */\n onFocus?: NonCancelableEventHandler;\n\n /**\n * Specifies if the control is read-only, which prevents the\n * user from both modifying the value and opening the dropdown. A read-only control is still focusable.\n */\n readOnly?: boolean;\n\n /**\n * Renders content at the top of the dropdown, above the filter input (when filtering is enabled) and the\n * options list. Pinned (sticky) to the top and rendered in every state (empty, no-match, loading, error,\n * finished).\n */\n renderDropdownHeader?: SelectProps.DropdownContentRenderer;\n\n /**\n * Renders content at the bottom of the dropdown. The content is always sticky and never scrolls with the\n * options list. It is added below the built-in status region. Receives the current filtering state and a\n * callback to close the dropdown.\n */\n renderDropdownFooter?: SelectProps.DropdownContentRenderer;\n\n /**\n * Determines the ARIA role of the dropdown.\n *\n * - `auto` (default): the dropdown uses a listbox role, or a dialog role wrapping the listbox when built-in\n * filtering is enabled.\n * - `dialog`: the dropdown always uses a dialog role wrapping the listbox, even without built-in filtering. Use\n * this when you render interactive custom content and want assistive technologies to treat the dropdown as a dialog.\n */\n dropdownRole?: SelectProps.DropdownRole;\n\n /**\n * Adds `aria-describedby` to the dropdown's listbox/dialog content.\n */\n dropdownAriaDescribedby?: string;\n}\n\nexport interface SelectProps extends BaseSelectProps {\n /**\n * Adds a small label inline with the input for saving vertical space in the UI.\n * For use with collection select filters only.\n */\n inlineLabelText?: string;\n onLoadItems?: NonCancelableEventHandler<SelectProps.LoadItemsDetail>;\n /**\n * Adds `aria-labelledby` to the component. If you're using this component within a form field,\n * don't set this property because the form field component automatically sets it.\n *\n * Use this property if the component isn't using `inlineLabelText` and isn't surrounded by a form field, or you want to override the value\n * automatically set by the form field (for example, if you have two components within a single form field).\n *\n * To use it correctly, define an ID for the element you want to use as label and set the property to that ID.\n */\n ariaLabelledby?: string;\n /**\n * Defines the variant of the trigger. You can use a simple label or the entire option (`label | option`)\n */\n triggerVariant?: SelectProps.TriggerVariant;\n /**\n * Specifies the currently selected option.\n * If you want to clear the selection, use `null`.\n */\n selectedOption: SelectProps.Option | null;\n /**\n * Called when the user selects an option.\n * The event `detail` contains the current `selectedOption`.\n */\n onChange?: NonCancelableEventHandler<SelectProps.ChangeDetail>;\n\n /**\n * Automatically focuses the trigger when component is mounted.\n */\n autoFocus?: boolean;\n /**\n * Specifies a render function to render custom options in the dropdown menu or trigger.\n */\n renderOption?: SelectProps.SelectOptionItemRenderer;\n}\n\nexport namespace SelectProps {\n export type FilteringType = OptionsFilteringType;\n export type TriggerVariant = 'label' | 'option';\n\n /**\n * The argument passed to the dropdown render functions (`renderDropdownHeader`\n * and `renderDropdownFooter`).\n */\n export interface DropdownContentProps {\n filterText: string;\n\n closeDropdown: () => void;\n }\n\n export type DropdownRole = 'auto' | 'dialog';\n\n /**\n * A render function for custom dropdown content, used by `renderDropdownHeader` and `renderDropdownFooter`.\n * Receives the current filtering state and a callback to close the dropdown.\n */\n export type DropdownContentRenderer = (props: DropdownContentProps) => ReactNode | null;\n\n export type Option = OptionDefinition;\n export type OptionGroup = OptionGroupDefinition;\n export type Options = ReadonlyArray<Option | OptionGroup>;\n\n export interface SelectOptionItem {\n type: 'item';\n index: number;\n option: Option;\n highlighted: boolean;\n selected: boolean;\n disabled: boolean;\n parent: SelectOptionGroupItem | null;\n }\n export interface SelectOptionGroupItem {\n type: 'group';\n index: number;\n option: OptionGroup;\n disabled: boolean;\n }\n export interface SelectTriggerOptionItem {\n type: 'trigger';\n option: Option;\n }\n export type SelectItem = SelectOptionItem | SelectOptionGroupItem | SelectTriggerOptionItem;\n export type SelectOptionItemRenderer = (props: { item: SelectItem; filterText?: string }) => ReactNode | null;\n\n /* eslint-disable-next-line @typescript-eslint/no-empty-object-type --\n * Required to create a distinct named type for the documenter.\n **/\n export interface LoadItemsDetail extends OptionsLoadItemsDetail {}\n\n export interface ChangeDetail {\n selectedOption: Option;\n }\n\n export interface ContainingOptionAndGroupString {\n (option: Option, group?: OptionGroup): string;\n }\n\n export interface Ref {\n /**\n * Sets focus on the element without opening the dropdown or showing a visual focus indicator.\n */\n focus(): void;\n }\n}\n"]}
@@ -1,6 +1,7 @@
1
+ import React from 'react';
1
2
  import { TableBodyCellProps } from './index';
2
3
  interface DisabledInlineEditorProps<ItemType> extends TableBodyCellProps<ItemType> {
3
- editDisabledReason: string;
4
+ editDisabledReason: React.ReactNode;
4
5
  }
5
6
  export declare function DisabledInlineEditor<ItemType>({
6
7
  item,
@@ -1 +1 @@
1
- {"version":3,"file":"disabled-inline-editor.d.ts","sourceRoot":"","sources":["../../../../src/table/body-cell/disabled-inline-editor.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAK7C,UAAU,yBAAyB,CAAC,QAAQ,CAAE,SAAQ,kBAAkB,CAAC,QAAQ,CAAC;IAChF,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,EAC7C,IAAI,EACJ,MAAM,EACN,UAAU,EACV,SAAS,EACT,WAAW,EACX,SAAS,EACT,kBAAkB,EAClB,GAAG,IAAI,EACR,EAAE,yBAAyB,CAAC,QAAQ,CAAC,eA+FrC"}
1
+ {"version":3,"file":"disabled-inline-editor.d.ts","sourceRoot":"","sources":["../../../../src/table/body-cell/disabled-inline-editor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AActC,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAK7C,UAAU,yBAAyB,CAAC,QAAQ,CAAE,SAAQ,kBAAkB,CAAC,QAAQ,CAAC;IAChF,kBAAkB,EAAE,KAAK,CAAC,SAAS,CAAC;CACrC;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,EAC7C,IAAI,EACJ,MAAM,EACN,UAAU,EACV,SAAS,EACT,WAAW,EACX,SAAS,EACT,kBAAkB,EAClB,GAAG,IAAI,EACR,EAAE,yBAAyB,CAAC,QAAQ,CAAC,eA+FrC"}