@cloudscape-design/components 3.0.1191 → 3.0.1193

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 (57) hide show
  1. package/app-layout/classic.js +2 -2
  2. package/app-layout/classic.js.map +1 -1
  3. package/autosuggest/autosuggest-option.d.ts +11 -1
  4. package/autosuggest/autosuggest-option.d.ts.map +1 -1
  5. package/autosuggest/autosuggest-option.js +71 -2
  6. package/autosuggest/autosuggest-option.js.map +1 -1
  7. package/autosuggest/index.d.ts.map +1 -1
  8. package/autosuggest/index.js +2 -2
  9. package/autosuggest/index.js.map +1 -1
  10. package/autosuggest/interfaces.d.ts +63 -1
  11. package/autosuggest/interfaces.d.ts.map +1 -1
  12. package/autosuggest/interfaces.js.map +1 -1
  13. package/autosuggest/internal.d.ts.map +1 -1
  14. package/autosuggest/internal.js +2 -2
  15. package/autosuggest/internal.js.map +1 -1
  16. package/autosuggest/options-controller.js +1 -0
  17. package/autosuggest/options-controller.js.map +1 -1
  18. package/autosuggest/options-list.d.ts +3 -1
  19. package/autosuggest/options-list.d.ts.map +1 -1
  20. package/autosuggest/options-list.js +2 -2
  21. package/autosuggest/options-list.js.map +1 -1
  22. package/autosuggest/plain-list.d.ts +4 -2
  23. package/autosuggest/plain-list.d.ts.map +1 -1
  24. package/autosuggest/plain-list.js +6 -2
  25. package/autosuggest/plain-list.js.map +1 -1
  26. package/autosuggest/utils/parent-props.d.ts +10 -0
  27. package/autosuggest/utils/parent-props.d.ts.map +1 -0
  28. package/autosuggest/utils/parent-props.js +28 -0
  29. package/autosuggest/utils/parent-props.js.map +1 -0
  30. package/autosuggest/virtual-list.d.ts +2 -1
  31. package/autosuggest/virtual-list.d.ts.map +1 -1
  32. package/autosuggest/virtual-list.js +6 -2
  33. package/autosuggest/virtual-list.js.map +1 -1
  34. package/error-boundary/fallback.d.ts +2 -1
  35. package/error-boundary/fallback.d.ts.map +1 -1
  36. package/error-boundary/fallback.js +4 -2
  37. package/error-boundary/fallback.js.map +1 -1
  38. package/error-boundary/interfaces.d.ts +2 -1
  39. package/error-boundary/interfaces.d.ts.map +1 -1
  40. package/error-boundary/interfaces.js.map +1 -1
  41. package/internal/base-component/styles.scoped.css +15 -15
  42. package/internal/environment.js +2 -2
  43. package/internal/environment.json +2 -2
  44. package/internal/generated/styles/tokens.d.ts +0 -2
  45. package/internal/generated/styles/tokens.js +2 -4
  46. package/internal/generated/theming/index.cjs +2 -64
  47. package/internal/generated/theming/index.js +2 -64
  48. package/internal/manifest.json +1 -1
  49. package/package.json +1 -1
  50. package/progress-bar/interfaces.d.ts +1 -1
  51. package/progress-bar/interfaces.js.map +1 -1
  52. package/progress-bar/internal.d.ts.map +1 -1
  53. package/progress-bar/internal.js +1 -1
  54. package/progress-bar/internal.js.map +1 -1
  55. package/progress-bar/styles.css.js +18 -19
  56. package/progress-bar/styles.scoped.css +30 -42
  57. package/progress-bar/styles.selectors.js +18 -19
@@ -249,7 +249,7 @@ const ClassicAppLayout = React.forwardRef(({ navigation, navigationWidth, naviga
249
249
  : splitPanelReportedHeaderHeight)) !== null && _a !== void 0 ? _a : undefined;
250
250
  const [mobileBarHeight, mobileBarRef] = useContainerQuery(rect => rect.contentBoxHeight);
251
251
  return (React.createElement("div", { className: clsx(styles.root, testutilStyles.root, disableBodyScroll && styles['root-no-scroll']), ref: rootRef, style: contentHeightStyle },
252
- isMobile && !__embeddedViewMode && (!toolsHide || !navigationHide || breadcrumbs) && (React.createElement(MobileToolbar, { anyPanelOpen: anyPanelOpen, toggleRefs: { navigation: navigationRefs.toggle, tools: toolsRefs.toggle }, topOffset: placement.insetBlockStart, ariaLabels: ariaLabels, navigationHide: navigationHide, toolsHide: toolsHide, onNavigationOpen: () => onNavigationToggle({ isOpen: true, autoFocus: true }), onToolsOpen: () => onToolsToggle(true), unfocusable: anyPanelOpen, mobileBarRef: mobileBarRef, drawers: drawers, activeDrawerId: activeDrawerId, onDrawerChange: newDrawerId => {
252
+ isMobile && !__embeddedViewMode && (!toolsHide || !navigationHide || breadcrumbs) && (React.createElement(MobileToolbar, { anyPanelOpen: anyPanelOpen, toggleRefs: { navigation: navigationRefs.toggle, tools: toolsRefs.toggle }, topOffset: placement.insetBlockStart, ariaLabels: ariaLabels, navigationHide: navigationHide, toolsHide: toolsHide, onNavigationOpen: () => onNavigationToggle({ isOpen: true, autoFocus: true }), onToolsOpen: () => onToolsToggle(true), unfocusable: anyPanelOpen, mobileBarRef: mobileBarRef, drawers: drawers === null || drawers === void 0 ? void 0 : drawers.filter(drawer => drawer.trigger), activeDrawerId: activeDrawerId, onDrawerChange: newDrawerId => {
253
253
  onActiveDrawerChange(newDrawerId, { initiatedByUserAction: true });
254
254
  if (newDrawerId !== activeDrawerId) {
255
255
  focusToolsButtons();
@@ -293,7 +293,7 @@ const ClassicAppLayout = React.forwardRef(({ navigation, navigationWidth, naviga
293
293
  onActiveDrawerChange(null, { initiatedByUserAction: true });
294
294
  }
295
295
  }, isOpen: true, hideOpenButton: true, toggleRefs: drawerRefs, type: "tools", onLoseFocus: loseDrawersFocus, activeDrawer: activeDrawer, onResize: changeDetail => onActiveDrawerResize(changeDetail), refs: drawerRefs, toolsContent: (_g = drawers === null || drawers === void 0 ? void 0 : drawers.find(drawer => drawer.id === TOOLS_DRAWER_ID)) === null || _g === void 0 ? void 0 : _g.content }, activeDrawer === null || activeDrawer === void 0 ? void 0 : activeDrawer.content)) : (!toolsHide && (React.createElement(Drawer, { contentClassName: testutilStyles.tools, toggleClassName: testutilStyles['tools-toggle'], closeClassName: testutilStyles['tools-close'], ariaLabels: togglesConfig.tools.getLabels(ariaLabels), width: toolsWidth, bottomOffset: placement.insetBlockEnd, topOffset: placement.insetBlockStart, isMobile: isMobile, onToggle: onToolsToggle, isOpen: toolsOpen, toggleRefs: toolsRefs, type: "tools", onLoseFocus: loseToolsFocus }, tools))),
296
- hasDrawers && drawers.length > 0 && (React.createElement(DrawerTriggersBar, { drawerRefs: drawerRefs, bottomOffset: placement.insetBlockEnd, topOffset: placement.insetBlockStart, isMobile: isMobile, drawers: drawers, activeDrawerId: activeDrawerId, onDrawerChange: newDrawerId => {
296
+ hasDrawers && drawers.length > 0 && (React.createElement(DrawerTriggersBar, { drawerRefs: drawerRefs, bottomOffset: placement.insetBlockEnd, topOffset: placement.insetBlockStart, isMobile: isMobile, drawers: drawers.filter(drawer => drawer.trigger), activeDrawerId: activeDrawerId, onDrawerChange: newDrawerId => {
297
297
  if (activeDrawerId !== newDrawerId) {
298
298
  focusToolsButtons();
299
299
  focusDrawersButtons();
@@ -1 +1 @@
1
- {"version":3,"file":"classic.js","sourceRoot":"","sources":["../../../src/app-layout/classic.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAGlF,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EACL,iCAAiC,EACjC,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,cAAuC,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAA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SAAS,EAAE,SAAS,CAAC,eAAe,EACpC,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,WAAW,CAAC,EAAE;oBAC5B,IAAI,cAAc,KAAK,WAAW,EAAE,CAAC;wBACnC,iBAAiB,EAAE,CAAC;wBACpB,mBAAmB,EAAE,CAAC;oBACxB,CAAC;oBACD,oBAAoB,CAAC,WAAW,EAAE,EAAE,qBAAqB,EAAE,IAAI,EAAE,CAAC,CAAC;gBACrE,CAAC,EACD,UAAU,EAAE,UAAU,GACtB,CACH,CACG,CACF,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\nimport React, { useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\nimport { findUpUntil } from '@cloudscape-design/component-toolkit/dom';\nimport { useStableCallback } from '@cloudscape-design/component-toolkit/internal';\n\nimport { SplitPanelSideToggleProps } from '../internal/context/split-panel-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { useControllable } from '../internal/hooks/use-controllable';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport {\n CONSTRAINED_MAIN_PANEL_MIN_HEIGHT,\n CONSTRAINED_PAGE_HEIGHT,\n getSplitPanelDefaultSize,\n MAIN_PANEL_MIN_HEIGHT,\n} from '../split-panel/utils/size-utils';\nimport ContentWrapper, { ContentWrapperProps } from './content-wrapper';\nimport { Drawer, DrawerTriggersBar } from './drawer';\nimport { ResizableDrawer } from './drawer/resizable-drawer';\nimport { AppLayoutProps, AppLayoutPropsWithDefaults } from './interfaces';\nimport { MobileToolbar } from './mobile-toolbar';\nimport { Notifications } from './notifications';\nimport { SideSplitPanelDrawer, SplitPanelProvider, SplitPanelProviderProps } from './split-panel';\nimport { shouldSplitPanelBeForcedToBottom } from './split-panel/split-panel-forced-position';\nimport { togglesConfig } from './toggles';\nimport { getStickyOffsetVars } from './utils/sticky-offsets';\nimport { TOOLS_DRAWER_ID, useDrawers } from './utils/use-drawers';\nimport { useFocusControl } from './utils/use-focus-control';\nimport { useSplitPanelFocusControl } from './utils/use-split-panel-focus-control';\n\nimport styles from './styles.css.js';\nimport testutilStyles from './test-classes/styles.css.js';\n\nconst ClassicAppLayout = React.forwardRef(\n (\n {\n navigation,\n navigationWidth,\n navigationHide,\n navigationOpen,\n tools,\n toolsWidth,\n toolsHide,\n toolsOpen: controlledToolsOpen,\n breadcrumbs,\n notifications,\n stickyNotifications,\n contentHeader,\n disableContentHeaderOverlap,\n content,\n contentType,\n disableContentPaddings,\n disableBodyScroll,\n maxContentWidth,\n minContentWidth,\n placement,\n ariaLabels,\n splitPanel,\n splitPanelSize: controlledSplitPanelSize,\n splitPanelOpen: controlledSplitPanelOpen,\n splitPanelPreferences: controlledSplitPanelPreferences,\n onSplitPanelPreferencesChange,\n onSplitPanelResize,\n onSplitPanelToggle,\n onNavigationChange,\n onToolsChange,\n drawers: controlledDrawers,\n onDrawerChange,\n activeDrawerId: controlledActiveDrawerId,\n ...rest\n }: AppLayoutPropsWithDefaults,\n ref: React.Ref<AppLayoutProps.Ref>\n ) => {\n // Private API for embedded view mode\n const __embeddedViewMode = Boolean((rest as any).__embeddedViewMode);\n\n const rootRef = useRef<HTMLDivElement>(null);\n const isMobile = useMobile();\n\n const [toolsOpen = false, setToolsOpen] = useControllable(controlledToolsOpen, onToolsChange, false, {\n componentName: 'AppLayout',\n controlledProp: 'toolsOpen',\n changeHandler: 'onToolsChange',\n });\n const onToolsToggle = (open: boolean) => {\n setToolsOpen(open);\n if (hasDrawers) {\n focusDrawersButtons();\n } else {\n focusToolsButtons();\n }\n fireNonCancelableEvent(onToolsChange, { open });\n };\n\n const {\n drawers,\n activeDrawer,\n minDrawerSize,\n activeDrawerSize,\n activeDrawerId,\n ariaLabelsWithDrawers,\n onActiveDrawerChange,\n onActiveDrawerResize,\n } = useDrawers(\n {\n drawers: controlledDrawers,\n onDrawerChange,\n activeDrawerId: controlledActiveDrawerId,\n ...rest,\n },\n ariaLabels,\n {\n disableDrawersMerge: true,\n ariaLabels,\n tools,\n toolsOpen,\n toolsHide,\n toolsWidth,\n onToolsToggle,\n }\n );\n ariaLabels = ariaLabelsWithDrawers;\n const hasDrawers = !!drawers;\n\n const { refs: navigationRefs, setFocus: focusNavButtons } = useFocusControl(navigationOpen);\n const {\n refs: toolsRefs,\n setFocus: focusToolsButtons,\n loseFocus: loseToolsFocus,\n } = useFocusControl(toolsOpen || activeDrawer !== undefined, true);\n const {\n refs: drawerRefs,\n setFocus: focusDrawersButtons,\n loseFocus: loseDrawersFocus,\n } = useFocusControl(!!activeDrawerId, true, activeDrawerId);\n\n const onNavigationToggle = useStableCallback(({ isOpen, autoFocus }: { isOpen: boolean; autoFocus: boolean }) => {\n focusNavButtons({ force: false, autoFocus });\n fireNonCancelableEvent(onNavigationChange, { open: isOpen });\n });\n\n const onNavigationClick = (event: React.MouseEvent) => {\n const hasLink = findUpUntil(\n event.target as HTMLElement,\n node => node.tagName === 'A' && !!(node as HTMLAnchorElement).href\n );\n if (hasLink) {\n onNavigationToggle({ isOpen: false, autoFocus: true });\n }\n };\n\n useEffect(() => {\n // Close navigation drawer on mobile so that the main content is visible\n if (isMobile) {\n onNavigationToggle({ isOpen: false, autoFocus: false });\n }\n }, [isMobile, onNavigationToggle]);\n\n const navigationVisible = !navigationHide && navigationOpen;\n const toolsVisible = !toolsHide && toolsOpen;\n\n const [headerFooterHeight, setHeaderFooterHeight] = useState(0);\n // Delay applying changes in header/footer height, as applying them immediately can cause\n // ResizeOberver warnings due to the algorithm thinking that the change might have side-effects\n // further up the tree, therefore blocking notifications to prevent loops\n useEffect(() => {\n const id = requestAnimationFrame(() =>\n setHeaderFooterHeight(placement.insetBlockStart + placement.insetBlockEnd)\n );\n return () => cancelAnimationFrame(id);\n }, [placement.insetBlockStart, placement.insetBlockEnd]);\n const contentHeightStyle = {\n [disableBodyScroll ? 'blockSize' : 'minBlockSize']: `calc(100vh - ${headerFooterHeight}px)`,\n };\n\n const [notificationsHeight, notificationsRef] = useContainerQuery(rect => rect.contentBoxHeight);\n const anyPanelOpen = navigationVisible || toolsVisible || !!activeDrawer;\n const hasRenderedNotifications = notificationsHeight ? notificationsHeight > 0 : false;\n const stickyNotificationsHeight = stickyNotifications ? (notificationsHeight ?? 0) : 0;\n\n const [splitPanelPreferences, setSplitPanelPreferences] = useControllable(\n controlledSplitPanelPreferences,\n onSplitPanelPreferencesChange,\n undefined,\n {\n componentName: 'AppLayout',\n controlledProp: 'splitPanelPreferences',\n changeHandler: 'onSplitPanelPreferencesChange',\n }\n );\n const [splitPanelOpen = false, setSplitPanelOpen] = useControllable(\n controlledSplitPanelOpen,\n onSplitPanelToggle,\n false,\n {\n componentName: 'AppLayout',\n controlledProp: 'splitPanelOpen',\n changeHandler: 'onSplitPanelToggle',\n }\n );\n\n const splitPanelPosition = splitPanelPreferences?.position || 'bottom';\n const [splitPanelReportedToggle, setSplitPanelReportedToggle] = useState<SplitPanelSideToggleProps>({\n displayed: false,\n ariaLabel: undefined,\n });\n const splitPanelDisplayed = !!(splitPanel && (splitPanelReportedToggle.displayed || splitPanelOpen));\n\n const closedDrawerWidth = 40;\n const effectiveNavigationWidth = navigationHide ? 0 : navigationOpen ? navigationWidth : closedDrawerWidth;\n\n const defaultSplitPanelSize = getSplitPanelDefaultSize(splitPanelPosition);\n const [splitPanelSize = defaultSplitPanelSize, setSplitPanelSize] = useControllable(\n controlledSplitPanelSize,\n onSplitPanelResize,\n defaultSplitPanelSize,\n {\n componentName: 'AppLayout',\n controlledProp: 'splitPanelSize',\n changeHandler: 'onSplitPanelResize',\n }\n );\n\n const mainContentRef = useRef<HTMLDivElement>(null);\n const legacyScrollRootRef = useRef<HTMLElement>(null);\n\n const { refs: splitPanelRefs, setLastInteraction: setSplitPanelLastInteraction } = useSplitPanelFocusControl([\n splitPanelPreferences,\n splitPanelOpen,\n ]);\n\n const onSplitPanelPreferencesSet = useCallback(\n (detail: { position: 'side' | 'bottom' }) => {\n setSplitPanelPreferences(detail);\n setSplitPanelLastInteraction({ type: 'position' });\n fireNonCancelableEvent(onSplitPanelPreferencesChange, detail);\n },\n [setSplitPanelPreferences, onSplitPanelPreferencesChange, setSplitPanelLastInteraction]\n );\n const onSplitPanelSizeSet = useCallback(\n (newSize: number) => {\n setSplitPanelSize(newSize);\n fireNonCancelableEvent(onSplitPanelResize, { size: newSize });\n },\n [setSplitPanelSize, onSplitPanelResize]\n );\n\n const onSplitPanelToggleHandler = useCallback(() => {\n setSplitPanelOpen(!splitPanelOpen);\n setSplitPanelLastInteraction({ type: splitPanelOpen ? 'close' : 'open' });\n fireNonCancelableEvent(onSplitPanelToggle, { open: !splitPanelOpen });\n }, [setSplitPanelOpen, splitPanelOpen, onSplitPanelToggle, setSplitPanelLastInteraction]);\n\n const getSplitPanelMaxHeight = useStableCallback(() => {\n if (typeof document === 'undefined') {\n return 0; // render the split panel in its minimum possible size\n } else if (disableBodyScroll && legacyScrollRootRef.current) {\n const availableHeight = legacyScrollRootRef.current.clientHeight;\n return availableHeight < CONSTRAINED_PAGE_HEIGHT ? availableHeight : availableHeight - MAIN_PANEL_MIN_HEIGHT;\n } else {\n const availableHeight =\n document.documentElement.clientHeight - placement.insetBlockStart - placement.insetBlockEnd;\n return availableHeight < CONSTRAINED_PAGE_HEIGHT\n ? availableHeight - CONSTRAINED_MAIN_PANEL_MIN_HEIGHT\n : availableHeight - MAIN_PANEL_MIN_HEIGHT;\n }\n });\n\n const rightDrawerBarWidth = drawers ? (drawers.length > 1 ? closedDrawerWidth : 0) : 0;\n const contentPadding = 80;\n // all content except split-panel + drawers/tools area\n const resizableSpaceAvailable = Math.max(\n 0,\n placement.inlineSize - effectiveNavigationWidth - minContentWidth - contentPadding - rightDrawerBarWidth\n );\n\n const getEffectiveToolsWidth = () => {\n if (activeDrawerSize && activeDrawer) {\n return Math.min(resizableSpaceAvailable, activeDrawerSize);\n }\n\n if (toolsHide || drawers) {\n return 0;\n }\n\n if (toolsOpen) {\n return toolsWidth;\n }\n\n return closedDrawerWidth;\n };\n\n const effectiveToolsWidth = getEffectiveToolsWidth();\n const availableWidthForSplitPanel = resizableSpaceAvailable - effectiveToolsWidth;\n const isSplitPanelForcedPosition = shouldSplitPanelBeForcedToBottom({\n isMobile,\n availableWidthForSplitPanel,\n });\n const finalSplitPanePosition = isSplitPanelForcedPosition ? 'bottom' : splitPanelPosition;\n\n const splitPaneAvailableOnTheSide = splitPanelDisplayed && finalSplitPanePosition === 'side';\n\n const sideSplitPanelSize = splitPaneAvailableOnTheSide ? (splitPanelOpen ? splitPanelSize : closedDrawerWidth) : 0;\n const sideSplitPanelMaxWidth = Math.max(0, resizableSpaceAvailable - effectiveToolsWidth);\n const drawerMaxSize = Math.max(0, resizableSpaceAvailable - sideSplitPanelSize);\n\n const navigationClosedWidth = navigationHide || isMobile ? 0 : closedDrawerWidth;\n\n const contentMaxWidthStyle = !isMobile ? { maxWidth: maxContentWidth } : undefined;\n\n const [splitPanelReportedSize, setSplitPanelReportedSize] = useState(0);\n const [splitPanelReportedHeaderHeight, setSplitPanelReportedHeaderHeight] = useState(0);\n\n const splitPanelContextProps: SplitPanelProviderProps = {\n topOffset: placement.insetBlockStart + (finalSplitPanePosition === 'bottom' ? stickyNotificationsHeight : 0),\n bottomOffset: placement.insetBlockEnd,\n leftOffset:\n placement.insetInlineStart +\n (isMobile ? 0 : !navigationHide && navigationOpen ? navigationWidth : navigationClosedWidth),\n rightOffset: isMobile ? 0 : placement.insetInlineEnd + effectiveToolsWidth + rightDrawerBarWidth,\n position: finalSplitPanePosition,\n size: splitPanelSize,\n maxWidth: sideSplitPanelMaxWidth,\n getMaxHeight: getSplitPanelMaxHeight,\n disableContentPaddings,\n contentWidthStyles: contentMaxWidthStyle,\n isOpen: splitPanelOpen,\n isForcedPosition: isSplitPanelForcedPosition,\n onResize: onSplitPanelSizeSet,\n onToggle: onSplitPanelToggleHandler,\n onPreferencesChange: onSplitPanelPreferencesSet,\n setSplitPanelToggle: setSplitPanelReportedToggle,\n reportSize: setSplitPanelReportedSize,\n reportHeaderHeight: setSplitPanelReportedHeaderHeight,\n refs: splitPanelRefs,\n };\n const splitPanelWrapped = splitPanel && (\n <SplitPanelProvider {...splitPanelContextProps}>\n {finalSplitPanePosition === 'side' ? (\n <SideSplitPanelDrawer displayed={splitPanelDisplayed}>{splitPanel}</SideSplitPanelDrawer>\n ) : (\n splitPanel\n )}\n </SplitPanelProvider>\n );\n\n const contentWrapperProps: ContentWrapperProps = {\n contentType,\n navigationPadding: navigationHide || !!navigationOpen,\n contentWidthStyles: !isMobile ? { minWidth: minContentWidth, maxWidth: maxContentWidth } : undefined,\n toolsPadding:\n // tools padding is displayed in one of the three cases\n // 1. Nothing on the that screen edge (no tools panel and no split panel)\n toolsHide ||\n (hasDrawers && !activeDrawer && (!splitPanelDisplayed || finalSplitPanePosition !== 'side')) ||\n // 2. Tools panel is present and open\n toolsVisible ||\n // 3. Split panel is open in side position\n (splitPaneAvailableOnTheSide && splitPanelOpen),\n isMobile,\n };\n\n useImperativeHandle(ref, () => ({\n openTools: () => onToolsToggle(true),\n closeNavigationIfNecessary: () => {\n if (isMobile) {\n onNavigationToggle({ isOpen: false, autoFocus: true });\n }\n },\n focusToolsClose: () => {\n if (hasDrawers) {\n focusDrawersButtons({ force: true });\n } else {\n focusToolsButtons({ force: true });\n }\n },\n focusActiveDrawer: () => focusDrawersButtons({ force: true }),\n focusSplitPanel: () => splitPanelRefs.slider.current?.focus(),\n }));\n\n const splitPanelBottomOffset =\n (!splitPanelDisplayed || finalSplitPanePosition !== 'bottom'\n ? undefined\n : splitPanelOpen\n ? splitPanelReportedSize\n : splitPanelReportedHeaderHeight) ?? undefined;\n\n const [mobileBarHeight, mobileBarRef] = useContainerQuery(rect => rect.contentBoxHeight);\n\n return (\n <div\n className={clsx(styles.root, testutilStyles.root, disableBodyScroll && styles['root-no-scroll'])}\n ref={rootRef}\n style={contentHeightStyle}\n >\n {isMobile && !__embeddedViewMode && (!toolsHide || !navigationHide || breadcrumbs) && (\n <MobileToolbar\n anyPanelOpen={anyPanelOpen}\n toggleRefs={{ navigation: navigationRefs.toggle, tools: toolsRefs.toggle }}\n topOffset={placement.insetBlockStart}\n ariaLabels={ariaLabels}\n navigationHide={navigationHide}\n toolsHide={toolsHide}\n onNavigationOpen={() => onNavigationToggle({ isOpen: true, autoFocus: true })}\n onToolsOpen={() => onToolsToggle(true)}\n unfocusable={anyPanelOpen}\n mobileBarRef={mobileBarRef}\n drawers={drawers}\n activeDrawerId={activeDrawerId}\n onDrawerChange={newDrawerId => {\n onActiveDrawerChange(newDrawerId, { initiatedByUserAction: true });\n if (newDrawerId !== activeDrawerId) {\n focusToolsButtons();\n focusDrawersButtons();\n }\n }}\n >\n {breadcrumbs}\n </MobileToolbar>\n )}\n <div className={clsx(styles.layout, disableBodyScroll && styles['layout-no-scroll'])}>\n {!navigationHide && (\n <Drawer\n contentClassName={testutilStyles.navigation}\n toggleClassName={testutilStyles['navigation-toggle']}\n closeClassName={testutilStyles['navigation-close']}\n ariaLabels={togglesConfig.navigation.getLabels(ariaLabels)}\n bottomOffset={placement.insetBlockEnd}\n topOffset={placement.insetBlockStart}\n isMobile={isMobile}\n isOpen={navigationOpen}\n onClick={isMobile ? onNavigationClick : undefined}\n onToggle={isOpen => onNavigationToggle({ isOpen, autoFocus: true })}\n toggleRefs={navigationRefs}\n type=\"navigation\"\n width={navigationWidth}\n >\n {navigation}\n </Drawer>\n )}\n <main\n ref={legacyScrollRootRef}\n className={clsx(styles['layout-main'], {\n [styles['layout-main-scrollable']]: disableBodyScroll,\n [testutilStyles['disable-body-scroll-root']]: disableBodyScroll,\n [styles.unfocusable]: isMobile && anyPanelOpen,\n })}\n >\n <div\n style={{\n marginBottom: splitPanelBottomOffset,\n }}\n >\n {notifications && (\n <Notifications\n disableContentPaddings={disableContentPaddings}\n testUtilsClassName={testutilStyles.notifications}\n labels={ariaLabels}\n topOffset={disableBodyScroll ? 0 : placement.insetBlockStart}\n sticky={!isMobile && stickyNotifications}\n ref={notificationsRef}\n >\n {notifications}\n </Notifications>\n )}\n {((!isMobile && breadcrumbs) || contentHeader) && (\n <ContentWrapper {...contentWrapperProps}>\n {!isMobile && breadcrumbs && (\n <div className={clsx(testutilStyles.breadcrumbs, styles['breadcrumbs-desktop'])}>{breadcrumbs}</div>\n )}\n {contentHeader && (\n <div\n className={clsx(\n styles['content-header-wrapper'],\n !hasRenderedNotifications && (isMobile || !breadcrumbs) && styles['content-extra-top-padding'],\n !hasRenderedNotifications && !breadcrumbs && styles['content-header-wrapper-first-child'],\n !disableContentHeaderOverlap && styles['content-header-wrapper-overlapped']\n )}\n >\n {contentHeader}\n </div>\n )}\n </ContentWrapper>\n )}\n <ContentWrapper\n {...contentWrapperProps}\n ref={mainContentRef}\n disablePaddings={disableContentPaddings}\n className={clsx(\n !disableContentPaddings && styles['content-wrapper'],\n !disableContentPaddings &&\n (isMobile || !breadcrumbs) &&\n !contentHeader &&\n styles['content-extra-top-padding'],\n testutilStyles.content,\n !disableContentHeaderOverlap && contentHeader && styles['content-overlapped'],\n !hasRenderedNotifications &&\n !breadcrumbs &&\n !isMobile &&\n !contentHeader &&\n styles['content-wrapper-first-child']\n )}\n style={getStickyOffsetVars(\n placement.insetBlockStart,\n placement.insetBlockEnd + (splitPanelBottomOffset || 0),\n `${stickyNotificationsHeight}px`,\n mobileBarHeight && !disableBodyScroll ? `${mobileBarHeight}px` : '0px',\n !!disableBodyScroll,\n isMobile\n )}\n >\n {content}\n </ContentWrapper>\n </div>\n {finalSplitPanePosition === 'bottom' && splitPanelWrapped}\n </main>\n\n {finalSplitPanePosition === 'side' && splitPanelWrapped}\n\n {hasDrawers ? (\n <ResizableDrawer\n contentClassName={clsx(\n activeDrawerId && testutilStyles['active-drawer'],\n activeDrawerId === TOOLS_DRAWER_ID && testutilStyles.tools\n )}\n toggleClassName={testutilStyles['tools-toggle']}\n closeClassName={clsx(\n testutilStyles['active-drawer-close-button'],\n activeDrawerId === TOOLS_DRAWER_ID && testutilStyles['tools-close']\n )}\n ariaLabels={{\n openLabel: activeDrawer?.ariaLabels?.triggerButton,\n closeLabel: activeDrawer?.ariaLabels?.closeButton,\n mainLabel: activeDrawer?.ariaLabels?.drawerName,\n resizeHandle: activeDrawer?.ariaLabels?.resizeHandle,\n resizeHandleTooltipText: activeDrawer?.ariaLabels?.resizeHandleTooltipText,\n }}\n minWidth={minDrawerSize}\n maxWidth={drawerMaxSize}\n width={activeDrawerSize}\n bottomOffset={placement.insetBlockEnd}\n topOffset={placement.insetBlockStart}\n isMobile={isMobile}\n onToggle={isOpen => {\n if (!isOpen) {\n focusToolsButtons();\n focusDrawersButtons();\n onActiveDrawerChange(null, { initiatedByUserAction: true });\n }\n }}\n isOpen={true}\n hideOpenButton={true}\n toggleRefs={drawerRefs}\n type=\"tools\"\n onLoseFocus={loseDrawersFocus}\n activeDrawer={activeDrawer}\n onResize={changeDetail => onActiveDrawerResize(changeDetail)}\n refs={drawerRefs}\n toolsContent={drawers?.find(drawer => drawer.id === TOOLS_DRAWER_ID)?.content}\n >\n {activeDrawer?.content}\n </ResizableDrawer>\n ) : (\n !toolsHide && (\n <Drawer\n contentClassName={testutilStyles.tools}\n toggleClassName={testutilStyles['tools-toggle']}\n closeClassName={testutilStyles['tools-close']}\n ariaLabels={togglesConfig.tools.getLabels(ariaLabels)}\n width={toolsWidth}\n bottomOffset={placement.insetBlockEnd}\n topOffset={placement.insetBlockStart}\n isMobile={isMobile}\n onToggle={onToolsToggle}\n isOpen={toolsOpen}\n toggleRefs={toolsRefs}\n type=\"tools\"\n onLoseFocus={loseToolsFocus}\n >\n {tools}\n </Drawer>\n )\n )}\n {hasDrawers && drawers.length > 0 && (\n <DrawerTriggersBar\n drawerRefs={drawerRefs}\n bottomOffset={placement.insetBlockEnd}\n topOffset={placement.insetBlockStart}\n isMobile={isMobile}\n drawers={drawers}\n activeDrawerId={activeDrawerId}\n onDrawerChange={newDrawerId => {\n if (activeDrawerId !== newDrawerId) {\n focusToolsButtons();\n focusDrawersButtons();\n }\n onActiveDrawerChange(newDrawerId, { initiatedByUserAction: true });\n }}\n ariaLabels={ariaLabels}\n />\n )}\n </div>\n </div>\n );\n }\n);\n\nexport default ClassicAppLayout;\n"]}
1
+ {"version":3,"file":"classic.js","sourceRoot":"","sources":["../../../src/app-layout/classic.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAGlF,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EACL,iCAAiC,EACjC,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,cAAuC,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAA2B,MA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EACrC,SAAS,EAAE,SAAS,CAAC,eAAe,EACpC,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,EACjD,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,WAAW,CAAC,EAAE;oBAC5B,IAAI,cAAc,KAAK,WAAW,EAAE,CAAC;wBACnC,iBAAiB,EAAE,CAAC;wBACpB,mBAAmB,EAAE,CAAC;oBACxB,CAAC;oBACD,oBAAoB,CAAC,WAAW,EAAE,EAAE,qBAAqB,EAAE,IAAI,EAAE,CAAC,CAAC;gBACrE,CAAC,EACD,UAAU,EAAE,UAAU,GACtB,CACH,CACG,CACF,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\nimport React, { useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\nimport { findUpUntil } from '@cloudscape-design/component-toolkit/dom';\nimport { useStableCallback } from '@cloudscape-design/component-toolkit/internal';\n\nimport { SplitPanelSideToggleProps } from '../internal/context/split-panel-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { useControllable } from '../internal/hooks/use-controllable';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport {\n CONSTRAINED_MAIN_PANEL_MIN_HEIGHT,\n CONSTRAINED_PAGE_HEIGHT,\n getSplitPanelDefaultSize,\n MAIN_PANEL_MIN_HEIGHT,\n} from '../split-panel/utils/size-utils';\nimport ContentWrapper, { ContentWrapperProps } from './content-wrapper';\nimport { Drawer, DrawerTriggersBar } from './drawer';\nimport { ResizableDrawer } from './drawer/resizable-drawer';\nimport { AppLayoutProps, AppLayoutPropsWithDefaults } from './interfaces';\nimport { MobileToolbar } from './mobile-toolbar';\nimport { Notifications } from './notifications';\nimport { SideSplitPanelDrawer, SplitPanelProvider, SplitPanelProviderProps } from './split-panel';\nimport { shouldSplitPanelBeForcedToBottom } from './split-panel/split-panel-forced-position';\nimport { togglesConfig } from './toggles';\nimport { getStickyOffsetVars } from './utils/sticky-offsets';\nimport { TOOLS_DRAWER_ID, useDrawers } from './utils/use-drawers';\nimport { useFocusControl } from './utils/use-focus-control';\nimport { useSplitPanelFocusControl } from './utils/use-split-panel-focus-control';\n\nimport styles from './styles.css.js';\nimport testutilStyles from './test-classes/styles.css.js';\n\nconst ClassicAppLayout = React.forwardRef(\n (\n {\n navigation,\n navigationWidth,\n navigationHide,\n navigationOpen,\n tools,\n toolsWidth,\n toolsHide,\n toolsOpen: controlledToolsOpen,\n breadcrumbs,\n notifications,\n stickyNotifications,\n contentHeader,\n disableContentHeaderOverlap,\n content,\n contentType,\n disableContentPaddings,\n disableBodyScroll,\n maxContentWidth,\n minContentWidth,\n placement,\n ariaLabels,\n splitPanel,\n splitPanelSize: controlledSplitPanelSize,\n splitPanelOpen: controlledSplitPanelOpen,\n splitPanelPreferences: controlledSplitPanelPreferences,\n onSplitPanelPreferencesChange,\n onSplitPanelResize,\n onSplitPanelToggle,\n onNavigationChange,\n onToolsChange,\n drawers: controlledDrawers,\n onDrawerChange,\n activeDrawerId: controlledActiveDrawerId,\n ...rest\n }: AppLayoutPropsWithDefaults,\n ref: React.Ref<AppLayoutProps.Ref>\n ) => {\n // Private API for embedded view mode\n const __embeddedViewMode = Boolean((rest as any).__embeddedViewMode);\n\n const rootRef = useRef<HTMLDivElement>(null);\n const isMobile = useMobile();\n\n const [toolsOpen = false, setToolsOpen] = useControllable(controlledToolsOpen, onToolsChange, false, {\n componentName: 'AppLayout',\n controlledProp: 'toolsOpen',\n changeHandler: 'onToolsChange',\n });\n const onToolsToggle = (open: boolean) => {\n setToolsOpen(open);\n if (hasDrawers) {\n focusDrawersButtons();\n } else {\n focusToolsButtons();\n }\n fireNonCancelableEvent(onToolsChange, { open });\n };\n\n const {\n drawers,\n activeDrawer,\n minDrawerSize,\n activeDrawerSize,\n activeDrawerId,\n ariaLabelsWithDrawers,\n onActiveDrawerChange,\n onActiveDrawerResize,\n } = useDrawers(\n {\n drawers: controlledDrawers,\n onDrawerChange,\n activeDrawerId: controlledActiveDrawerId,\n ...rest,\n },\n ariaLabels,\n {\n disableDrawersMerge: true,\n ariaLabels,\n tools,\n toolsOpen,\n toolsHide,\n toolsWidth,\n onToolsToggle,\n }\n );\n ariaLabels = ariaLabelsWithDrawers;\n const hasDrawers = !!drawers;\n\n const { refs: navigationRefs, setFocus: focusNavButtons } = useFocusControl(navigationOpen);\n const {\n refs: toolsRefs,\n setFocus: focusToolsButtons,\n loseFocus: loseToolsFocus,\n } = useFocusControl(toolsOpen || activeDrawer !== undefined, true);\n const {\n refs: drawerRefs,\n setFocus: focusDrawersButtons,\n loseFocus: loseDrawersFocus,\n } = useFocusControl(!!activeDrawerId, true, activeDrawerId);\n\n const onNavigationToggle = useStableCallback(({ isOpen, autoFocus }: { isOpen: boolean; autoFocus: boolean }) => {\n focusNavButtons({ force: false, autoFocus });\n fireNonCancelableEvent(onNavigationChange, { open: isOpen });\n });\n\n const onNavigationClick = (event: React.MouseEvent) => {\n const hasLink = findUpUntil(\n event.target as HTMLElement,\n node => node.tagName === 'A' && !!(node as HTMLAnchorElement).href\n );\n if (hasLink) {\n onNavigationToggle({ isOpen: false, autoFocus: true });\n }\n };\n\n useEffect(() => {\n // Close navigation drawer on mobile so that the main content is visible\n if (isMobile) {\n onNavigationToggle({ isOpen: false, autoFocus: false });\n }\n }, [isMobile, onNavigationToggle]);\n\n const navigationVisible = !navigationHide && navigationOpen;\n const toolsVisible = !toolsHide && toolsOpen;\n\n const [headerFooterHeight, setHeaderFooterHeight] = useState(0);\n // Delay applying changes in header/footer height, as applying them immediately can cause\n // ResizeOberver warnings due to the algorithm thinking that the change might have side-effects\n // further up the tree, therefore blocking notifications to prevent loops\n useEffect(() => {\n const id = requestAnimationFrame(() =>\n setHeaderFooterHeight(placement.insetBlockStart + placement.insetBlockEnd)\n );\n return () => cancelAnimationFrame(id);\n }, [placement.insetBlockStart, placement.insetBlockEnd]);\n const contentHeightStyle = {\n [disableBodyScroll ? 'blockSize' : 'minBlockSize']: `calc(100vh - ${headerFooterHeight}px)`,\n };\n\n const [notificationsHeight, notificationsRef] = useContainerQuery(rect => rect.contentBoxHeight);\n const anyPanelOpen = navigationVisible || toolsVisible || !!activeDrawer;\n const hasRenderedNotifications = notificationsHeight ? notificationsHeight > 0 : false;\n const stickyNotificationsHeight = stickyNotifications ? (notificationsHeight ?? 0) : 0;\n\n const [splitPanelPreferences, setSplitPanelPreferences] = useControllable(\n controlledSplitPanelPreferences,\n onSplitPanelPreferencesChange,\n undefined,\n {\n componentName: 'AppLayout',\n controlledProp: 'splitPanelPreferences',\n changeHandler: 'onSplitPanelPreferencesChange',\n }\n );\n const [splitPanelOpen = false, setSplitPanelOpen] = useControllable(\n controlledSplitPanelOpen,\n onSplitPanelToggle,\n false,\n {\n componentName: 'AppLayout',\n controlledProp: 'splitPanelOpen',\n changeHandler: 'onSplitPanelToggle',\n }\n );\n\n const splitPanelPosition = splitPanelPreferences?.position || 'bottom';\n const [splitPanelReportedToggle, setSplitPanelReportedToggle] = useState<SplitPanelSideToggleProps>({\n displayed: false,\n ariaLabel: undefined,\n });\n const splitPanelDisplayed = !!(splitPanel && (splitPanelReportedToggle.displayed || splitPanelOpen));\n\n const closedDrawerWidth = 40;\n const effectiveNavigationWidth = navigationHide ? 0 : navigationOpen ? navigationWidth : closedDrawerWidth;\n\n const defaultSplitPanelSize = getSplitPanelDefaultSize(splitPanelPosition);\n const [splitPanelSize = defaultSplitPanelSize, setSplitPanelSize] = useControllable(\n controlledSplitPanelSize,\n onSplitPanelResize,\n defaultSplitPanelSize,\n {\n componentName: 'AppLayout',\n controlledProp: 'splitPanelSize',\n changeHandler: 'onSplitPanelResize',\n }\n );\n\n const mainContentRef = useRef<HTMLDivElement>(null);\n const legacyScrollRootRef = useRef<HTMLElement>(null);\n\n const { refs: splitPanelRefs, setLastInteraction: setSplitPanelLastInteraction } = useSplitPanelFocusControl([\n splitPanelPreferences,\n splitPanelOpen,\n ]);\n\n const onSplitPanelPreferencesSet = useCallback(\n (detail: { position: 'side' | 'bottom' }) => {\n setSplitPanelPreferences(detail);\n setSplitPanelLastInteraction({ type: 'position' });\n fireNonCancelableEvent(onSplitPanelPreferencesChange, detail);\n },\n [setSplitPanelPreferences, onSplitPanelPreferencesChange, setSplitPanelLastInteraction]\n );\n const onSplitPanelSizeSet = useCallback(\n (newSize: number) => {\n setSplitPanelSize(newSize);\n fireNonCancelableEvent(onSplitPanelResize, { size: newSize });\n },\n [setSplitPanelSize, onSplitPanelResize]\n );\n\n const onSplitPanelToggleHandler = useCallback(() => {\n setSplitPanelOpen(!splitPanelOpen);\n setSplitPanelLastInteraction({ type: splitPanelOpen ? 'close' : 'open' });\n fireNonCancelableEvent(onSplitPanelToggle, { open: !splitPanelOpen });\n }, [setSplitPanelOpen, splitPanelOpen, onSplitPanelToggle, setSplitPanelLastInteraction]);\n\n const getSplitPanelMaxHeight = useStableCallback(() => {\n if (typeof document === 'undefined') {\n return 0; // render the split panel in its minimum possible size\n } else if (disableBodyScroll && legacyScrollRootRef.current) {\n const availableHeight = legacyScrollRootRef.current.clientHeight;\n return availableHeight < CONSTRAINED_PAGE_HEIGHT ? availableHeight : availableHeight - MAIN_PANEL_MIN_HEIGHT;\n } else {\n const availableHeight =\n document.documentElement.clientHeight - placement.insetBlockStart - placement.insetBlockEnd;\n return availableHeight < CONSTRAINED_PAGE_HEIGHT\n ? availableHeight - CONSTRAINED_MAIN_PANEL_MIN_HEIGHT\n : availableHeight - MAIN_PANEL_MIN_HEIGHT;\n }\n });\n\n const rightDrawerBarWidth = drawers ? (drawers.length > 1 ? closedDrawerWidth : 0) : 0;\n const contentPadding = 80;\n // all content except split-panel + drawers/tools area\n const resizableSpaceAvailable = Math.max(\n 0,\n placement.inlineSize - effectiveNavigationWidth - minContentWidth - contentPadding - rightDrawerBarWidth\n );\n\n const getEffectiveToolsWidth = () => {\n if (activeDrawerSize && activeDrawer) {\n return Math.min(resizableSpaceAvailable, activeDrawerSize);\n }\n\n if (toolsHide || drawers) {\n return 0;\n }\n\n if (toolsOpen) {\n return toolsWidth;\n }\n\n return closedDrawerWidth;\n };\n\n const effectiveToolsWidth = getEffectiveToolsWidth();\n const availableWidthForSplitPanel = resizableSpaceAvailable - effectiveToolsWidth;\n const isSplitPanelForcedPosition = shouldSplitPanelBeForcedToBottom({\n isMobile,\n availableWidthForSplitPanel,\n });\n const finalSplitPanePosition = isSplitPanelForcedPosition ? 'bottom' : splitPanelPosition;\n\n const splitPaneAvailableOnTheSide = splitPanelDisplayed && finalSplitPanePosition === 'side';\n\n const sideSplitPanelSize = splitPaneAvailableOnTheSide ? (splitPanelOpen ? splitPanelSize : closedDrawerWidth) : 0;\n const sideSplitPanelMaxWidth = Math.max(0, resizableSpaceAvailable - effectiveToolsWidth);\n const drawerMaxSize = Math.max(0, resizableSpaceAvailable - sideSplitPanelSize);\n\n const navigationClosedWidth = navigationHide || isMobile ? 0 : closedDrawerWidth;\n\n const contentMaxWidthStyle = !isMobile ? { maxWidth: maxContentWidth } : undefined;\n\n const [splitPanelReportedSize, setSplitPanelReportedSize] = useState(0);\n const [splitPanelReportedHeaderHeight, setSplitPanelReportedHeaderHeight] = useState(0);\n\n const splitPanelContextProps: SplitPanelProviderProps = {\n topOffset: placement.insetBlockStart + (finalSplitPanePosition === 'bottom' ? stickyNotificationsHeight : 0),\n bottomOffset: placement.insetBlockEnd,\n leftOffset:\n placement.insetInlineStart +\n (isMobile ? 0 : !navigationHide && navigationOpen ? navigationWidth : navigationClosedWidth),\n rightOffset: isMobile ? 0 : placement.insetInlineEnd + effectiveToolsWidth + rightDrawerBarWidth,\n position: finalSplitPanePosition,\n size: splitPanelSize,\n maxWidth: sideSplitPanelMaxWidth,\n getMaxHeight: getSplitPanelMaxHeight,\n disableContentPaddings,\n contentWidthStyles: contentMaxWidthStyle,\n isOpen: splitPanelOpen,\n isForcedPosition: isSplitPanelForcedPosition,\n onResize: onSplitPanelSizeSet,\n onToggle: onSplitPanelToggleHandler,\n onPreferencesChange: onSplitPanelPreferencesSet,\n setSplitPanelToggle: setSplitPanelReportedToggle,\n reportSize: setSplitPanelReportedSize,\n reportHeaderHeight: setSplitPanelReportedHeaderHeight,\n refs: splitPanelRefs,\n };\n const splitPanelWrapped = splitPanel && (\n <SplitPanelProvider {...splitPanelContextProps}>\n {finalSplitPanePosition === 'side' ? (\n <SideSplitPanelDrawer displayed={splitPanelDisplayed}>{splitPanel}</SideSplitPanelDrawer>\n ) : (\n splitPanel\n )}\n </SplitPanelProvider>\n );\n\n const contentWrapperProps: ContentWrapperProps = {\n contentType,\n navigationPadding: navigationHide || !!navigationOpen,\n contentWidthStyles: !isMobile ? { minWidth: minContentWidth, maxWidth: maxContentWidth } : undefined,\n toolsPadding:\n // tools padding is displayed in one of the three cases\n // 1. Nothing on the that screen edge (no tools panel and no split panel)\n toolsHide ||\n (hasDrawers && !activeDrawer && (!splitPanelDisplayed || finalSplitPanePosition !== 'side')) ||\n // 2. Tools panel is present and open\n toolsVisible ||\n // 3. Split panel is open in side position\n (splitPaneAvailableOnTheSide && splitPanelOpen),\n isMobile,\n };\n\n useImperativeHandle(ref, () => ({\n openTools: () => onToolsToggle(true),\n closeNavigationIfNecessary: () => {\n if (isMobile) {\n onNavigationToggle({ isOpen: false, autoFocus: true });\n }\n },\n focusToolsClose: () => {\n if (hasDrawers) {\n focusDrawersButtons({ force: true });\n } else {\n focusToolsButtons({ force: true });\n }\n },\n focusActiveDrawer: () => focusDrawersButtons({ force: true }),\n focusSplitPanel: () => splitPanelRefs.slider.current?.focus(),\n }));\n\n const splitPanelBottomOffset =\n (!splitPanelDisplayed || finalSplitPanePosition !== 'bottom'\n ? undefined\n : splitPanelOpen\n ? splitPanelReportedSize\n : splitPanelReportedHeaderHeight) ?? undefined;\n\n const [mobileBarHeight, mobileBarRef] = useContainerQuery(rect => rect.contentBoxHeight);\n\n return (\n <div\n className={clsx(styles.root, testutilStyles.root, disableBodyScroll && styles['root-no-scroll'])}\n ref={rootRef}\n style={contentHeightStyle}\n >\n {isMobile && !__embeddedViewMode && (!toolsHide || !navigationHide || breadcrumbs) && (\n <MobileToolbar\n anyPanelOpen={anyPanelOpen}\n toggleRefs={{ navigation: navigationRefs.toggle, tools: toolsRefs.toggle }}\n topOffset={placement.insetBlockStart}\n ariaLabels={ariaLabels}\n navigationHide={navigationHide}\n toolsHide={toolsHide}\n onNavigationOpen={() => onNavigationToggle({ isOpen: true, autoFocus: true })}\n onToolsOpen={() => onToolsToggle(true)}\n unfocusable={anyPanelOpen}\n mobileBarRef={mobileBarRef}\n drawers={drawers?.filter(drawer => drawer.trigger)}\n activeDrawerId={activeDrawerId}\n onDrawerChange={newDrawerId => {\n onActiveDrawerChange(newDrawerId, { initiatedByUserAction: true });\n if (newDrawerId !== activeDrawerId) {\n focusToolsButtons();\n focusDrawersButtons();\n }\n }}\n >\n {breadcrumbs}\n </MobileToolbar>\n )}\n <div className={clsx(styles.layout, disableBodyScroll && styles['layout-no-scroll'])}>\n {!navigationHide && (\n <Drawer\n contentClassName={testutilStyles.navigation}\n toggleClassName={testutilStyles['navigation-toggle']}\n closeClassName={testutilStyles['navigation-close']}\n ariaLabels={togglesConfig.navigation.getLabels(ariaLabels)}\n bottomOffset={placement.insetBlockEnd}\n topOffset={placement.insetBlockStart}\n isMobile={isMobile}\n isOpen={navigationOpen}\n onClick={isMobile ? onNavigationClick : undefined}\n onToggle={isOpen => onNavigationToggle({ isOpen, autoFocus: true })}\n toggleRefs={navigationRefs}\n type=\"navigation\"\n width={navigationWidth}\n >\n {navigation}\n </Drawer>\n )}\n <main\n ref={legacyScrollRootRef}\n className={clsx(styles['layout-main'], {\n [styles['layout-main-scrollable']]: disableBodyScroll,\n [testutilStyles['disable-body-scroll-root']]: disableBodyScroll,\n [styles.unfocusable]: isMobile && anyPanelOpen,\n })}\n >\n <div\n style={{\n marginBottom: splitPanelBottomOffset,\n }}\n >\n {notifications && (\n <Notifications\n disableContentPaddings={disableContentPaddings}\n testUtilsClassName={testutilStyles.notifications}\n labels={ariaLabels}\n topOffset={disableBodyScroll ? 0 : placement.insetBlockStart}\n sticky={!isMobile && stickyNotifications}\n ref={notificationsRef}\n >\n {notifications}\n </Notifications>\n )}\n {((!isMobile && breadcrumbs) || contentHeader) && (\n <ContentWrapper {...contentWrapperProps}>\n {!isMobile && breadcrumbs && (\n <div className={clsx(testutilStyles.breadcrumbs, styles['breadcrumbs-desktop'])}>{breadcrumbs}</div>\n )}\n {contentHeader && (\n <div\n className={clsx(\n styles['content-header-wrapper'],\n !hasRenderedNotifications && (isMobile || !breadcrumbs) && styles['content-extra-top-padding'],\n !hasRenderedNotifications && !breadcrumbs && styles['content-header-wrapper-first-child'],\n !disableContentHeaderOverlap && styles['content-header-wrapper-overlapped']\n )}\n >\n {contentHeader}\n </div>\n )}\n </ContentWrapper>\n )}\n <ContentWrapper\n {...contentWrapperProps}\n ref={mainContentRef}\n disablePaddings={disableContentPaddings}\n className={clsx(\n !disableContentPaddings && styles['content-wrapper'],\n !disableContentPaddings &&\n (isMobile || !breadcrumbs) &&\n !contentHeader &&\n styles['content-extra-top-padding'],\n testutilStyles.content,\n !disableContentHeaderOverlap && contentHeader && styles['content-overlapped'],\n !hasRenderedNotifications &&\n !breadcrumbs &&\n !isMobile &&\n !contentHeader &&\n styles['content-wrapper-first-child']\n )}\n style={getStickyOffsetVars(\n placement.insetBlockStart,\n placement.insetBlockEnd + (splitPanelBottomOffset || 0),\n `${stickyNotificationsHeight}px`,\n mobileBarHeight && !disableBodyScroll ? `${mobileBarHeight}px` : '0px',\n !!disableBodyScroll,\n isMobile\n )}\n >\n {content}\n </ContentWrapper>\n </div>\n {finalSplitPanePosition === 'bottom' && splitPanelWrapped}\n </main>\n\n {finalSplitPanePosition === 'side' && splitPanelWrapped}\n\n {hasDrawers ? (\n <ResizableDrawer\n contentClassName={clsx(\n activeDrawerId && testutilStyles['active-drawer'],\n activeDrawerId === TOOLS_DRAWER_ID && testutilStyles.tools\n )}\n toggleClassName={testutilStyles['tools-toggle']}\n closeClassName={clsx(\n testutilStyles['active-drawer-close-button'],\n activeDrawerId === TOOLS_DRAWER_ID && testutilStyles['tools-close']\n )}\n ariaLabels={{\n openLabel: activeDrawer?.ariaLabels?.triggerButton,\n closeLabel: activeDrawer?.ariaLabels?.closeButton,\n mainLabel: activeDrawer?.ariaLabels?.drawerName,\n resizeHandle: activeDrawer?.ariaLabels?.resizeHandle,\n resizeHandleTooltipText: activeDrawer?.ariaLabels?.resizeHandleTooltipText,\n }}\n minWidth={minDrawerSize}\n maxWidth={drawerMaxSize}\n width={activeDrawerSize}\n bottomOffset={placement.insetBlockEnd}\n topOffset={placement.insetBlockStart}\n isMobile={isMobile}\n onToggle={isOpen => {\n if (!isOpen) {\n focusToolsButtons();\n focusDrawersButtons();\n onActiveDrawerChange(null, { initiatedByUserAction: true });\n }\n }}\n isOpen={true}\n hideOpenButton={true}\n toggleRefs={drawerRefs}\n type=\"tools\"\n onLoseFocus={loseDrawersFocus}\n activeDrawer={activeDrawer}\n onResize={changeDetail => onActiveDrawerResize(changeDetail)}\n refs={drawerRefs}\n toolsContent={drawers?.find(drawer => drawer.id === TOOLS_DRAWER_ID)?.content}\n >\n {activeDrawer?.content}\n </ResizableDrawer>\n ) : (\n !toolsHide && (\n <Drawer\n contentClassName={testutilStyles.tools}\n toggleClassName={testutilStyles['tools-toggle']}\n closeClassName={testutilStyles['tools-close']}\n ariaLabels={togglesConfig.tools.getLabels(ariaLabels)}\n width={toolsWidth}\n bottomOffset={placement.insetBlockEnd}\n topOffset={placement.insetBlockStart}\n isMobile={isMobile}\n onToggle={onToolsToggle}\n isOpen={toolsOpen}\n toggleRefs={toolsRefs}\n type=\"tools\"\n onLoseFocus={loseToolsFocus}\n >\n {tools}\n </Drawer>\n )\n )}\n {hasDrawers && drawers.length > 0 && (\n <DrawerTriggersBar\n drawerRefs={drawerRefs}\n bottomOffset={placement.insetBlockEnd}\n topOffset={placement.insetBlockStart}\n isMobile={isMobile}\n drawers={drawers.filter(drawer => drawer.trigger)}\n activeDrawerId={activeDrawerId}\n onDrawerChange={newDrawerId => {\n if (activeDrawerId !== newDrawerId) {\n focusToolsButtons();\n focusDrawersButtons();\n }\n onActiveDrawerChange(newDrawerId, { initiatedByUserAction: true });\n }}\n ariaLabels={ariaLabels}\n />\n )}\n </div>\n </div>\n );\n }\n);\n\nexport default ClassicAppLayout;\n"]}
@@ -1,8 +1,10 @@
1
1
  import React from 'react';
2
2
  import { BaseComponentProps } from '../internal/base-component';
3
3
  import { HighlightType } from '../internal/components/options-list/utils/use-highlight-option';
4
- import { AutosuggestItem } from './interfaces';
4
+ import { AutosuggestItem, AutosuggestProps } from './interfaces';
5
5
  interface AutosuggestOptionProps extends BaseComponentProps {
6
+ index: number;
7
+ virtualIndex?: number;
6
8
  nativeAttributes?: React.HTMLAttributes<HTMLDivElement>;
7
9
  highlightText: string;
8
10
  option: AutosuggestItem;
@@ -14,6 +16,14 @@ interface AutosuggestOptionProps extends BaseComponentProps {
14
16
  screenReaderContent?: string;
15
17
  ariaSetsize?: number;
16
18
  ariaPosinset?: number;
19
+ renderOption?: AutosuggestProps.ItemRenderer;
20
+ parentProps?: AutosuggestRenderItemParentProps;
21
+ }
22
+ export interface AutosuggestRenderItemParentProps {
23
+ index: number;
24
+ virtualIndex?: number;
25
+ option: AutosuggestItem;
26
+ disabled: boolean;
17
27
  }
18
28
  declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<AutosuggestOptionProps & React.RefAttributes<HTMLDivElement>>>;
19
29
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"autosuggest-option.d.ts","sourceRoot":"","sources":["../../../src/autosuggest/autosuggest-option.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,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C;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,gBAAgB,CAAC,YAAY,CAAC;IAC7C,WAAW,CAAC,EAAE,gCAAgC,CAAC;CAChD;AAED,MAAM,WAAW,gCAAgC;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,eAAe,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;CACnB;;AAkKD,wBAA+D"}
@@ -6,7 +6,42 @@ import OptionComponent from '../internal/components/option';
6
6
  import { getTestOptionIndexes } from '../internal/components/options-list/utils/test-indexes';
7
7
  import SelectableItem from '../internal/components/selectable-item';
8
8
  import styles from './styles.css.js';
9
- const AutosuggestOption = ({ nativeAttributes = {}, highlightText, option, highlighted, highlightType, current, virtualPosition, padBottom, screenReaderContent, ariaSetsize, ariaPosinset, ...rest }, ref) => {
9
+ const toAutosuggestOptionGroupItem = (props) => {
10
+ var _a;
11
+ return {
12
+ type: 'group',
13
+ index: (_a = props.virtualIndex) !== null && _a !== void 0 ? _a : props.index,
14
+ option: props.option.option,
15
+ disabled: props.disabled,
16
+ };
17
+ };
18
+ const toAutosuggestOptionItem = (props) => {
19
+ var _a;
20
+ return {
21
+ type: 'item',
22
+ index: (_a = props.virtualIndex) !== null && _a !== void 0 ? _a : props.index,
23
+ option: props.option.option,
24
+ selected: props.selected,
25
+ highlighted: props.highlighted,
26
+ disabled: props.disabled,
27
+ parent: props.parentProps
28
+ ? toAutosuggestOptionGroupItem({
29
+ index: props.parentProps.index,
30
+ virtualIndex: props.parentProps.virtualIndex,
31
+ option: props.parentProps.option,
32
+ disabled: props.disabled,
33
+ })
34
+ : null,
35
+ };
36
+ };
37
+ const toAutosuggestUseEnteredItem = (props) => {
38
+ return {
39
+ type: 'entered-text',
40
+ option: props.option.option,
41
+ highlighted: props.highlighted,
42
+ };
43
+ };
44
+ const AutosuggestOption = ({ index, virtualIndex, nativeAttributes = {}, highlightText, option, highlighted, highlightType, current, virtualPosition, padBottom, screenReaderContent, ariaSetsize, ariaPosinset, renderOption, parentProps, ...rest }, ref) => {
10
45
  const baseProps = getBaseProps(rest);
11
46
  const useEntered = 'type' in option && option.type === 'use-entered';
12
47
  const isParent = 'type' in option && option.type === 'parent';
@@ -30,7 +65,41 @@ const AutosuggestOption = ({ nativeAttributes = {}, highlightText, option, highl
30
65
  optionContent = (React.createElement("div", { ...a11yProperties },
31
66
  React.createElement(OptionComponent, { option: option, highlightedOption: highlighted, highlightText: highlightText })));
32
67
  }
33
- return (React.createElement(SelectableItem, { ...baseProps, className: styles.option, ariaSelected: current, highlighted: highlighted, disabled: option.disabled, hasBackground: useEntered, isParent: isParent, isChild: isChild, virtualPosition: virtualPosition, "data-test-index": throughIndex, "data-in-group-index": inGroupIndex, "data-group-index": groupIndex, ref: ref, padBottom: padBottom, screenReaderContent: screenReaderContent, ariaSetsize: ariaSetsize, ariaPosinset: ariaPosinset, highlightType: highlightType.type, value: option.value }, optionContent));
68
+ const getAutosuggestItemProps = (option) => {
69
+ if (option.type === 'parent') {
70
+ return toAutosuggestOptionGroupItem({
71
+ option: option,
72
+ index: index,
73
+ virtualIndex: virtualIndex,
74
+ disabled: !!option.disabled,
75
+ });
76
+ }
77
+ else if (option.type === 'use-entered') {
78
+ return toAutosuggestUseEnteredItem({
79
+ option: option,
80
+ highlighted: highlighted,
81
+ });
82
+ }
83
+ else {
84
+ return toAutosuggestOptionItem({
85
+ option: option,
86
+ index: index,
87
+ virtualIndex: virtualIndex,
88
+ disabled: !!option.disabled,
89
+ highlighted: highlighted,
90
+ selected: current,
91
+ parentProps: parentProps,
92
+ });
93
+ }
94
+ };
95
+ const renderOptionWrapper = (option) => {
96
+ if (!renderOption) {
97
+ return null;
98
+ }
99
+ return renderOption({ item: getAutosuggestItemProps(option), filterText: highlightText });
100
+ };
101
+ const renderResult = renderOptionWrapper(option);
102
+ return (React.createElement(SelectableItem, { ...baseProps, disableContentStyling: !!renderResult, className: styles.option, ariaSelected: current, highlighted: highlighted, disabled: option.disabled, hasBackground: useEntered, isParent: isParent, isChild: isChild, virtualPosition: virtualPosition, "data-test-index": throughIndex, "data-in-group-index": inGroupIndex, "data-group-index": groupIndex, ref: ref, padBottom: padBottom, screenReaderContent: screenReaderContent, ariaSetsize: ariaSetsize, ariaPosinset: ariaPosinset, highlightType: highlightType.type, value: option.value }, !renderResult ? optionContent : renderResult));
34
103
  };
35
104
  export default React.memo(React.forwardRef(AutosuggestOption));
36
105
  //# sourceMappingURL=autosuggest-option.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"autosuggest-option.js","sourceRoot":"","sources":["../../../src/autosuggest/autosuggest-option.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAsB,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wDAAwD,CAAC;AAE9F,OAAO,cAAc,MAAM,wCAAwC,CAAC;AAGpE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAgBrC,MAAM,iBAAiB,GAAG,CACxB,EACE,gBAAgB,GAAG,EAAE,EACrB,aAAa,EACb,MAAM,EACN,WAAW,EACX,aAAa,EACb,OAAO,EACP,eAAe,EACf,SAAS,EACT,mBAAmB,EACnB,WAAW,EACX,YAAY,EACZ,GAAG,IAAI,EACgB,EACzB,GAA8B,EAC9B,EAAE;IACF,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC,MAAM,UAAU,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,CAAC,IAAI,KAAK,a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S,EACpB,mBAAmB,EAAE,mBAAmB,EACxC,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,CAAC,IAAI,EACjC,KAAK,EAAE,MAAM,CAAC,KAAK,IAElB,aAAa,CACC,CAClB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,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 { BaseComponentProps, getBaseProps } from '../internal/base-component';\nimport OptionComponent from '../internal/components/option';\nimport { getTestOptionIndexes } from '../internal/components/options-list/utils/test-indexes';\nimport { HighlightType } from '../internal/components/options-list/utils/use-highlight-option';\nimport SelectableItem from '../internal/components/selectable-item';\nimport { AutosuggestItem } from './interfaces';\n\nimport styles from './styles.css.js';\n\ninterface AutosuggestOptionProps extends BaseComponentProps {\n nativeAttributes?: React.HTMLAttributes<HTMLDivElement>;\n highlightText: string;\n option: AutosuggestItem;\n highlighted: boolean;\n highlightType: HighlightType;\n current: boolean;\n virtualPosition?: number;\n padBottom?: boolean;\n screenReaderContent?: string;\n ariaSetsize?: number;\n ariaPosinset?: number;\n}\n\nconst AutosuggestOption = (\n {\n nativeAttributes = {},\n highlightText,\n option,\n highlighted,\n highlightType,\n current,\n virtualPosition,\n padBottom,\n screenReaderContent,\n ariaSetsize,\n ariaPosinset,\n ...rest\n }: AutosuggestOptionProps,\n ref: React.Ref<HTMLDivElement>\n) => {\n const baseProps = getBaseProps(rest);\n const useEntered = 'type' in option && option.type === 'use-entered';\n const isParent = 'type' in option && option.type === 'parent';\n const isChild = 'type' in option && option.type === 'child';\n const { throughIndex, inGroupIndex, groupIndex } = getTestOptionIndexes(option) || {};\n\n let optionContent;\n if (useEntered) {\n optionContent = option.label;\n // we don't want fancy generated content for screenreader for the \"Use...\" option,\n // just the visible text is fine\n screenReaderContent = undefined;\n } else if (isParent) {\n optionContent = option.label;\n } else {\n const a11yProperties: AutosuggestOptionProps['nativeAttributes'] = {};\n if (nativeAttributes['aria-label']) {\n a11yProperties['aria-label'] = nativeAttributes['aria-label'];\n }\n\n optionContent = (\n <div {...a11yProperties}>\n <OptionComponent option={option} highlightedOption={highlighted} highlightText={highlightText} />\n </div>\n );\n }\n\n return (\n <SelectableItem\n {...baseProps}\n className={styles.option}\n ariaSelected={current}\n highlighted={highlighted}\n disabled={option.disabled}\n hasBackground={useEntered}\n isParent={isParent}\n isChild={isChild}\n virtualPosition={virtualPosition}\n data-test-index={throughIndex}\n data-in-group-index={inGroupIndex}\n data-group-index={groupIndex}\n ref={ref}\n padBottom={padBottom}\n screenReaderContent={screenReaderContent}\n ariaSetsize={ariaSetsize}\n ariaPosinset={ariaPosinset}\n highlightType={highlightType.type}\n value={option.value}\n >\n {optionContent}\n </SelectableItem>\n );\n};\n\nexport default React.memo(React.forwardRef(AutosuggestOption));\n"]}
1
+ {"version":3,"file":"autosuggest-option.js","sourceRoot":"","sources":["../../../src/autosuggest/autosuggest-option.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAsB,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wDAAwD,CAAC;AAE9F,OAAO,cAAc,MAAM,wCAAwC,CAAC;AAGpE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AA2BrC,MAAM,4BAA4B,GAAG,CACnC,KAAuC,EACC,EAAE;;IAC1C,OAAO;QACL,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,MAAA,KAAK,CAAC,YAAY,mCAAI,KAAK,CAAC,KAAK;QACxC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,MAAqB;QAC1C,QAAQ,E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AAY,EAC1B,aAAa,EAAE,aAAa,CAAC,IAAI,EACjC,KAAK,EAAE,MAAM,CAAC,KAAK,IAElB,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,CAC9B,CAClB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,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 { BaseComponentProps, getBaseProps } from '../internal/base-component';\nimport OptionComponent from '../internal/components/option';\nimport { OptionDefinition, OptionGroup } from '../internal/components/option/interfaces';\nimport { getTestOptionIndexes } from '../internal/components/options-list/utils/test-indexes';\nimport { HighlightType } from '../internal/components/options-list/utils/use-highlight-option';\nimport SelectableItem from '../internal/components/selectable-item';\nimport { AutosuggestItem, AutosuggestProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\ninterface AutosuggestOptionProps extends BaseComponentProps {\n index: number;\n virtualIndex?: number;\n nativeAttributes?: React.HTMLAttributes<HTMLDivElement>;\n highlightText: string;\n option: AutosuggestItem;\n highlighted: boolean;\n highlightType: HighlightType;\n current: boolean;\n virtualPosition?: number;\n padBottom?: boolean;\n screenReaderContent?: string;\n ariaSetsize?: number;\n ariaPosinset?: number;\n renderOption?: AutosuggestProps.ItemRenderer;\n parentProps?: AutosuggestRenderItemParentProps;\n}\n\nexport interface AutosuggestRenderItemParentProps {\n index: number;\n virtualIndex?: number;\n option: AutosuggestItem;\n disabled: boolean;\n}\n\nconst toAutosuggestOptionGroupItem = (\n props: AutosuggestRenderItemParentProps\n): AutosuggestProps.OptionGroupRenderItem => {\n return {\n type: 'group',\n index: props.virtualIndex ?? props.index,\n option: props.option.option as OptionGroup,\n disabled: props.disabled,\n };\n};\n\nconst toAutosuggestOptionItem = (props: {\n index: number;\n virtualIndex?: number;\n option: AutosuggestItem;\n disabled: boolean;\n selected: boolean;\n highlighted: boolean;\n parentProps?: AutosuggestRenderItemParentProps;\n}): AutosuggestProps.OptionRenderItem => {\n return {\n type: 'item',\n index: props.virtualIndex ?? props.index,\n option: props.option.option as OptionDefinition,\n selected: props.selected,\n highlighted: props.highlighted,\n disabled: props.disabled,\n parent: props.parentProps\n ? toAutosuggestOptionGroupItem({\n index: props.parentProps.index,\n virtualIndex: props.parentProps.virtualIndex,\n option: props.parentProps.option,\n disabled: props.disabled,\n })\n : null,\n };\n};\n\nconst toAutosuggestUseEnteredItem = (props: {\n option: AutosuggestItem;\n highlighted: boolean;\n}): AutosuggestProps.EnteredTextRenderItem => {\n return {\n type: 'entered-text',\n option: props.option.option as OptionDefinition,\n highlighted: props.highlighted,\n };\n};\n\nconst AutosuggestOption = (\n {\n index,\n virtualIndex,\n nativeAttributes = {},\n highlightText,\n option,\n highlighted,\n highlightType,\n current,\n virtualPosition,\n padBottom,\n screenReaderContent,\n ariaSetsize,\n ariaPosinset,\n renderOption,\n parentProps,\n ...rest\n }: AutosuggestOptionProps,\n ref: React.Ref<HTMLDivElement>\n) => {\n const baseProps = getBaseProps(rest);\n const useEntered = 'type' in option && option.type === 'use-entered';\n const isParent = 'type' in option && option.type === 'parent';\n const isChild = 'type' in option && option.type === 'child';\n const { throughIndex, inGroupIndex, groupIndex } = getTestOptionIndexes(option) || {};\n\n let optionContent;\n if (useEntered) {\n optionContent = option.label;\n // we don't want fancy generated content for screenreader for the \"Use...\" option,\n // just the visible text is fine\n screenReaderContent = undefined;\n } else if (isParent) {\n optionContent = option.label;\n } else {\n const a11yProperties: AutosuggestOptionProps['nativeAttributes'] = {};\n if (nativeAttributes['aria-label']) {\n a11yProperties['aria-label'] = nativeAttributes['aria-label'];\n }\n\n optionContent = (\n <div {...a11yProperties}>\n <OptionComponent option={option} highlightedOption={highlighted} highlightText={highlightText} />\n </div>\n );\n }\n\n const getAutosuggestItemProps = (option: AutosuggestItem) => {\n if (option.type === 'parent') {\n return toAutosuggestOptionGroupItem({\n option: option,\n index: index,\n virtualIndex: virtualIndex,\n disabled: !!option.disabled,\n });\n } else if (option.type === 'use-entered') {\n return toAutosuggestUseEnteredItem({\n option: option,\n highlighted: highlighted,\n });\n } else {\n return toAutosuggestOptionItem({\n option: option,\n index: index,\n virtualIndex: virtualIndex,\n disabled: !!option.disabled,\n highlighted: highlighted,\n selected: current,\n parentProps: parentProps,\n });\n }\n };\n\n const renderOptionWrapper = (option: AutosuggestItem) => {\n if (!renderOption) {\n return null;\n }\n\n return renderOption({ item: getAutosuggestItemProps(option), filterText: highlightText });\n };\n const renderResult = renderOptionWrapper(option);\n\n return (\n <SelectableItem\n {...baseProps}\n disableContentStyling={!!renderResult}\n className={styles.option}\n ariaSelected={current}\n highlighted={highlighted}\n disabled={option.disabled}\n hasBackground={useEntered}\n isParent={isParent}\n isChild={isChild}\n virtualPosition={virtualPosition}\n data-test-index={throughIndex}\n data-in-group-index={inGroupIndex}\n data-group-index={groupIndex}\n ref={ref}\n padBottom={padBottom}\n screenReaderContent={screenReaderContent}\n ariaSetsize={ariaSetsize}\n ariaPosinset={ariaPosinset}\n highlightType={highlightType.type}\n value={option.value}\n >\n {!renderResult ? optionContent : renderResult}\n </SelectableItem>\n );\n};\n\nexport default React.memo(React.forwardRef(AutosuggestOption));\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/autosuggest/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhD,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B,QAAA,MAAM,WAAW,+FA8ChB,CAAC;AAGF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/autosuggest/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhD,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B,QAAA,MAAM,WAAW,+FAgDhB,CAAC;AAGF,eAAe,WAAW,CAAC"}
@@ -7,7 +7,7 @@ import useBaseComponent from '../internal/hooks/use-base-component';
7
7
  import { applyDisplayName } from '../internal/utils/apply-display-name';
8
8
  import { getExternalProps } from '../internal/utils/external-props';
9
9
  import InternalAutosuggest from './internal';
10
- const Autosuggest = React.forwardRef(({ filteringType = 'auto', statusType = 'finished', disableBrowserAutocorrect = false, hideEnteredTextOption = false, ...props }, ref) => {
10
+ const Autosuggest = React.forwardRef(({ filteringType = 'auto', statusType = 'finished', disableBrowserAutocorrect = false, hideEnteredTextOption = false, renderOption, ...props }, ref) => {
11
11
  const baseComponentProps = useBaseComponent('Autosuggest', {
12
12
  props: {
13
13
  autoFocus: props.autoFocus,
@@ -28,7 +28,7 @@ const Autosuggest = React.forwardRef(({ filteringType = 'auto', statusType = 'fi
28
28
  },
29
29
  };
30
30
  const externalProps = getExternalProps(props);
31
- return (React.createElement(InternalAutosuggest, { filteringType: filteringType, statusType: statusType, disableBrowserAutocorrect: disableBrowserAutocorrect, hideEnteredTextOption: hideEnteredTextOption, ...externalProps, ...baseComponentProps, ref: ref, ...getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata }) }));
31
+ return (React.createElement(InternalAutosuggest, { renderOption: renderOption, filteringType: filteringType, statusType: statusType, disableBrowserAutocorrect: disableBrowserAutocorrect, hideEnteredTextOption: hideEnteredTextOption, ...externalProps, ...baseComponentProps, ref: ref, ...getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata }) }));
32
32
  });
33
33
  applyDisplayName(Autosuggest, 'Autosuggest');
34
34
  export default Autosuggest;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/autosuggest/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CA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AAG,KACJ,6BAA6B,CAAC,EAAE,SAAS,EAAE,0BAA0B,EAAE,CAAC,GAC5E,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;AAC7C,eAAe,WAAW,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n'use client';\nimport React from 'react';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { getExternalProps } from '../internal/utils/external-props';\nimport { GeneratedAnalyticsMetadataAutosuggestComponent } from './analytics-metadata/interfaces';\nimport { AutosuggestProps } from './interfaces';\nimport InternalAutosuggest from './internal';\n\nexport { AutosuggestProps };\n\nconst Autosuggest = React.forwardRef(\n (\n {\n filteringType = 'auto',\n statusType = 'finished',\n disableBrowserAutocorrect = false,\n hideEnteredTextOption = false,\n ...props\n }: AutosuggestProps,\n ref: React.Ref<AutosuggestProps.Ref>\n ) => {\n const baseComponentProps = useBaseComponent('Autosuggest', {\n props: {\n autoFocus: props.autoFocus,\n disableBrowserAutocorrect,\n expandToViewport: props.expandToViewport,\n filteringType,\n readOnly: props.readOnly,\n virtualScroll: props.virtualScroll,\n hideEnteredTextOption,\n },\n });\n\n const componentAnalyticsMetadata: GeneratedAnalyticsMetadataAutosuggestComponent = {\n name: 'awsui.Autosuggest',\n label: 'input',\n properties: {\n disabled: `${!!props.disabled}`,\n value: props.value || '',\n },\n };\n\n const externalProps = getExternalProps(props);\n return (\n <InternalAutosuggest\n filteringType={filteringType}\n statusType={statusType}\n disableBrowserAutocorrect={disableBrowserAutocorrect}\n hideEnteredTextOption={hideEnteredTextOption}\n {...externalProps}\n {...baseComponentProps}\n ref={ref}\n {...getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata })}\n />\n );\n }\n);\n\napplyDisplayName(Autosuggest, 'Autosuggest');\nexport default Autosuggest;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/autosuggest/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAGpE,OAAO,mBAAmB,MAAM,YAAY,CAAC;AAI7C,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAClC,CACE,EACE,aAAa,GAAG,MAAM,EACtB,UAAU,GAAG,UAAU,EACvB,yBAAyB,GAAG,KAAK,EACjC,qBAAqB,GAAG,KAAK,EAC7B,YAAY,EACZ,GAAG,KAAK,EACS,EACnB,GAAoC,EACpC,EAAE;IACF,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,aAAa,EAAE;QACzD,KAAK,EAAE;YACL,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,yBAAyB;YACzB,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;YACxC,aAAa;YACb,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,aAAa,EAAE,KAAK,CAAC,aAAa;YAClC,qBAAqB;SACtB;KACF,CAAC,CAAC;IAEH,MAAM,0BAA0B,GAAmD;QACjF,IAAI,EAAE,mBAAmB;QACzB,KAAK,EAAE,OAAO;QACd,UAAU,EAAE;YACV,QAAQ,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE;YAC/B,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,EAAE;SACzB;KACF,CAAC;IAEF,MAAM,aAAa,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAC9C,OAAO,CACL,oBAAC,mBAAmB,IAClB,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,EACtB,yBAAyB,EAAE,yBAAyB,EACpD,qBAAqB,EAAE,qBAAqB,KACxC,aAAa,KACb,kBAAkB,EACtB,GAAG,EAAE,GAAG,KACJ,6BAA6B,CAAC,EAAE,SAAS,EAAE,0BAA0B,EAAE,CAAC,GAC5E,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;AAC7C,eAAe,WAAW,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n'use client';\nimport React from 'react';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { getExternalProps } from '../internal/utils/external-props';\nimport { GeneratedAnalyticsMetadataAutosuggestComponent } from './analytics-metadata/interfaces';\nimport { AutosuggestProps } from './interfaces';\nimport InternalAutosuggest from './internal';\n\nexport { AutosuggestProps };\n\nconst Autosuggest = React.forwardRef(\n (\n {\n filteringType = 'auto',\n statusType = 'finished',\n disableBrowserAutocorrect = false,\n hideEnteredTextOption = false,\n renderOption,\n ...props\n }: AutosuggestProps,\n ref: React.Ref<AutosuggestProps.Ref>\n ) => {\n const baseComponentProps = useBaseComponent('Autosuggest', {\n props: {\n autoFocus: props.autoFocus,\n disableBrowserAutocorrect,\n expandToViewport: props.expandToViewport,\n filteringType,\n readOnly: props.readOnly,\n virtualScroll: props.virtualScroll,\n hideEnteredTextOption,\n },\n });\n\n const componentAnalyticsMetadata: GeneratedAnalyticsMetadataAutosuggestComponent = {\n name: 'awsui.Autosuggest',\n label: 'input',\n properties: {\n disabled: `${!!props.disabled}`,\n value: props.value || '',\n },\n };\n\n const externalProps = getExternalProps(props);\n return (\n <InternalAutosuggest\n renderOption={renderOption}\n filteringType={filteringType}\n statusType={statusType}\n disableBrowserAutocorrect={disableBrowserAutocorrect}\n hideEnteredTextOption={hideEnteredTextOption}\n {...externalProps}\n {...baseComponentProps}\n ref={ref}\n {...getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata })}\n />\n );\n }\n);\n\napplyDisplayName(Autosuggest, 'Autosuggest');\nexport default Autosuggest;\n"]}
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  import { BaseInputProps, InputAutoCorrect, InputClearLabel, InputKeyEvents, InputProps } from '../input/interfaces';
3
3
  import { BaseComponentProps } from '../internal/base-component';
4
4
  import { BaseDropdownHostProps, OptionsFilteringType, OptionsLoadItemsDetail } from '../internal/components/dropdown/interfaces';
@@ -40,6 +40,42 @@ export interface AutosuggestProps extends BaseComponentProps, BaseInputProps, In
40
40
  * on your own.
41
41
  **/
42
42
  options?: AutosuggestProps.Options;
43
+ /**
44
+ * Specifies a render function to render custom options in the dropdown menu.
45
+ *
46
+ * The item inside the props has a different shape depending on its type:
47
+ *
48
+ *
49
+ * ### item
50
+ *
51
+ * - `type` ('item') - The item type.
52
+ * - `index` (number) - The item's absolute position in the dropdown.
53
+ * - `option` (Option) - The original option configuration.
54
+ * - `disabled` (boolean) - Whether the item is disabled.
55
+ * - `highlighted` (boolean) - Whether the item is currently highlighted.
56
+ * - `selected` (boolean) - Whether the item is selected.
57
+ * - `parent` (OptionGroupRenderItem | null) - The parent group item, if any.
58
+ *
59
+ * ### group
60
+ *
61
+ * - `type` ('group') - The item type.
62
+ * - `index` (number) - The item's absolute position in the dropdown.
63
+ * - `option` (OptionGroup) - The original option configuration.
64
+ * - `disabled` (boolean) - Whether the item is disabled.
65
+ *
66
+ * ### entered-text
67
+ *
68
+ * - `type` ('entered-text') - The item type.
69
+ * - `option` (Option) - The entered-text option configuration.
70
+ *
71
+ * When providing a custom `renderOption` implementation, it fully replaces the default visual rendering and content for that item.
72
+ * The component still manages focus, keyboard interactions, and selection state, but it no longer applies its default item layout or typography.
73
+ *
74
+ * When returning `null`, the default rendering will be applied for that item.
75
+ *
76
+ * @awsuiSystem core
77
+ */
78
+ renderOption?: AutosuggestProps.ItemRenderer;
43
79
  /**
44
80
  * Determines how filtering is applied to the list of `options`:
45
81
  *
@@ -128,6 +164,31 @@ export declare namespace AutosuggestProps {
128
164
  interface ContainingOptionAndGroupString {
129
165
  (option: Option, group?: OptionGroup): string;
130
166
  }
167
+ interface OptionRenderItem {
168
+ type: 'item';
169
+ index: number;
170
+ option: Option;
171
+ disabled: boolean;
172
+ highlighted: boolean;
173
+ selected: boolean;
174
+ parent: OptionGroupRenderItem | null;
175
+ }
176
+ interface OptionGroupRenderItem {
177
+ type: 'group';
178
+ index: number;
179
+ option: OptionGroup;
180
+ disabled: boolean;
181
+ }
182
+ interface EnteredTextRenderItem {
183
+ type: 'entered-text';
184
+ option: Option;
185
+ highlighted: boolean;
186
+ }
187
+ type RenderItem = OptionRenderItem | OptionGroupRenderItem | EnteredTextRenderItem;
188
+ type ItemRenderer = (props: {
189
+ item: RenderItem;
190
+ filterText?: string;
191
+ }) => ReactNode | null;
131
192
  interface Ref {
132
193
  /**
133
194
  * Sets input focus onto the UI control.
@@ -186,4 +247,5 @@ export declare namespace AutosuggestProps {
186
247
  export type AutosuggestItem = (AutosuggestProps.Option | AutosuggestProps.OptionGroup) & {
187
248
  type?: 'parent' | 'child' | 'use-entered';
188
249
  option: OptionDefinition | OptionGroup;
250
+ parent?: OptionGroup;
189
251
  };
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/autosuggest/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,eAAe,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACpH,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AAE;gBACV,OAAO,CAAC,EAAE,MAAM,CAAC;gBACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;gBAClB,KAAK,CAAC,EAAE,MAAM,CAAC;gBACf,KAAK,CAAC,EAAE,MAAM,CAAC;gBACf,QAAQ,CAAC,EAAE,MAAM,CAAC;aACnB,CAAC;YACF,KAAK,CAAC,EAAE;gBACN,OAAO,CAAC,EAAE,MAAM,CAAC;gBACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;gBAClB,KAAK,CAAC,EAAE,MAAM,CAAC;gBACf,KAAK,CAAC,EAAE,MAAM,CAAC;gBACf,QAAQ,CAAC,EAAE,MAAM,CAAC;aACnB,CAAC;YACF,QAAQ,CAAC,EAAE,MAAM,CAAC;YAClB,UAAU,CAAC,EAAE,MAAM,CAAC;YACpB,YAAY,CAAC,EAAE,MAAM,CAAC;YACtB,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB,CAAC;QACF,WAAW,CAAC,EAAE;YACZ,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,QAAQ,CAAC,EAAE,MAAM,CAAC;YAClB,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB,UAAU,CAAC,EAAE,MAAM,CAAC;SACrB,CAAC;KACH;CACF;AAGD,MAAM,MAAM,eAAe,GAAG,CAAC,gBAAgB,CAAC,MAAM,GAAG,gBAAgB,CAAC,WAAW,CAAC,GAAG;IACvF,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,aAAa,CAAC;IAC1C,MAAM,EAAE,gBAAgB,GAAG,WAAW,CAAC;IACvC,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/autosuggest/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 { BaseInputProps, InputAutoCorrect, InputClearLabel, InputKeyEvents, InputProps } from '../input/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport {\n BaseDropdownHostProps,\n OptionsFilteringType,\n OptionsLoadItemsDetail,\n} from '../internal/components/dropdown/interfaces';\nimport { DropdownStatusProps } from '../internal/components/dropdown-status';\nimport { OptionDefinition, OptionGroup } from '../internal/components/option/interfaces';\nimport { FormFieldValidationControlProps } from '../internal/context/form-field-context';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface AutosuggestProps\n extends BaseComponentProps,\n BaseInputProps,\n InputAutoCorrect,\n BaseDropdownHostProps,\n InputKeyEvents,\n InputClearLabel,\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 * - `label` (string) - (Optional) Option text displayed to the user.\n * - `lang` (string) - (Optional) The language of the option, provided as a BCP 47 language tag.\n * - `description` (string) - (Optional) Further information about the option that appears below the label.\n * - `disabled` (boolean) - (Optional) Determines whether the option is disabled.\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.\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.\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 * #### OptionGroup\n * - `label` (string) - Option group text displayed to the user.\n * - `disabled` (boolean) - (Optional) Determines whether the option group is disabled.\n * - `options` (Option[]) - (Optional) The options under this group.\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?: AutosuggestProps.Options;\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 * Specifies a function that generates the custom value indicator (for example, `Use \"${value}\"`).\n * @i18n\n */\n enteredTextLabel?: AutosuggestProps.EnteredTextLabel;\n\n /**\n * Defines whether entered text option is shown as the first option in the dropdown when value is non-empty.\n */\n hideEnteredTextOption?: boolean;\n\n /**\n * Specifies the text to display with the number of matches at the bottom of the dropdown menu while filtering.\n *\n * Note that the `matchesCount` includes the `enteredTextLabel` (\"Use ${value}\") item, so in most cases you\n * should subtract 1 from `matchesCount`. If using manual filtering, you should provide your own value for `totalCount`.\n */\n filteringResultsText?: (matchesCount: number, totalCount: number) => string;\n\n /**\n * Specifies the text that's displayed when there aren't any suggestions to display.\n * This is displayed when `statusType` is set to `finished` or it's not set at all.\n */\n empty?: React.ReactNode;\n\n /**\n * Called whenever a user selects an option in the dropdown. Don't use this event as the only way to handle user input.\n * Instead, use `onSelect` in combination with the `onChange` handler only as an optional convenience for the user.\n */\n onSelect?: NonCancelableEventHandler<AutosuggestProps.SelectDetail>;\n\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/autosuggest/?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/autosuggest/?tabId=usage#accessibility-guidelines).\n */\n renderHighlightedAriaLive?: AutosuggestProps.ContainingOptionAndGroupString;\n\n /**\n * @awsuiSystem core\n */\n style?: AutosuggestProps.Style;\n}\n\nexport namespace AutosuggestProps {\n export type ChangeDetail = InputProps.ChangeDetail;\n export type KeyDetail = InputProps.KeyDetail;\n export type FilteringType = OptionsFilteringType;\n export type Option = OptionDefinition;\n export type Options = ReadonlyArray<Option | OptionGroup>;\n export type EnteredTextLabel = (value: string) => string;\n export interface OptionGroup extends Option {\n label?: string;\n options: ReadonlyArray<Option>;\n }\n export type LoadItemsDetail = OptionsLoadItemsDetail;\n export type StatusType = DropdownStatusProps.StatusType;\n export interface SelectDetail {\n value: string;\n selectedOption?: Option;\n }\n\n export interface ContainingOptionAndGroupString {\n (option: Option, group?: OptionGroup): string;\n }\n\n export interface Ref {\n /**\n * Sets input focus onto the UI control.\n */\n focus(): void;\n\n /**\n * Selects all text in the input control.\n */\n select(): void;\n }\n\n export interface Style {\n root?: {\n backgroundColor?: {\n default?: string;\n disabled?: string;\n focus?: string;\n hover?: string;\n readonly?: string;\n };\n borderColor?: {\n default?: string;\n disabled?: string;\n focus?: string;\n hover?: string;\n readonly?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n boxShadow?: {\n default?: string;\n disabled?: string;\n focus?: string;\n hover?: string;\n readonly?: string;\n };\n color?: {\n default?: string;\n disabled?: string;\n focus?: string;\n hover?: string;\n readonly?: string;\n };\n fontSize?: string;\n fontWeight?: string;\n paddingBlock?: string;\n paddingInline?: string;\n };\n placeholder?: {\n color?: string;\n fontSize?: string;\n fontStyle?: string;\n fontWeight?: string;\n };\n }\n}\n\n// TODO: use DropdownOption type same as in select and multiselect\nexport type AutosuggestItem = (AutosuggestProps.Option | AutosuggestProps.OptionGroup) & {\n type?: 'parent' | 'child' | 'use-entered';\n option: OptionDefinition | OptionGroup;\n};\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/autosuggest/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 { BaseInputProps, InputAutoCorrect, InputClearLabel, InputKeyEvents, InputProps } from '../input/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport {\n BaseDropdownHostProps,\n OptionsFilteringType,\n OptionsLoadItemsDetail,\n} from '../internal/components/dropdown/interfaces';\nimport { DropdownStatusProps } from '../internal/components/dropdown-status';\nimport { OptionDefinition, OptionGroup } from '../internal/components/option/interfaces';\nimport { FormFieldValidationControlProps } from '../internal/context/form-field-context';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface AutosuggestProps\n extends BaseComponentProps,\n BaseInputProps,\n InputAutoCorrect,\n BaseDropdownHostProps,\n InputKeyEvents,\n InputClearLabel,\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 * - `label` (string) - (Optional) Option text displayed to the user.\n * - `lang` (string) - (Optional) The language of the option, provided as a BCP 47 language tag.\n * - `description` (string) - (Optional) Further information about the option that appears below the label.\n * - `disabled` (boolean) - (Optional) Determines whether the option is disabled.\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.\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.\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 * #### OptionGroup\n * - `label` (string) - Option group text displayed to the user.\n * - `disabled` (boolean) - (Optional) Determines whether the option group is disabled.\n * - `options` (Option[]) - (Optional) The options under this group.\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?: AutosuggestProps.Options;\n\n /**\n * Specifies a render function to render custom options in the dropdown menu.\n *\n * The item inside the props has a different shape depending on its type:\n *\n *\n * ### item\n *\n * - `type` ('item') - The item type.\n * - `index` (number) - The item's absolute position in the dropdown.\n * - `option` (Option) - The original option configuration.\n * - `disabled` (boolean) - Whether the item is disabled.\n * - `highlighted` (boolean) - Whether the item is currently highlighted.\n * - `selected` (boolean) - Whether the item is selected.\n * - `parent` (OptionGroupRenderItem | null) - The parent group item, if any.\n *\n * ### group\n *\n * - `type` ('group') - The item type.\n * - `index` (number) - The item's absolute position in the dropdown.\n * - `option` (OptionGroup) - The original option configuration.\n * - `disabled` (boolean) - Whether the item is disabled.\n *\n * ### entered-text\n *\n * - `type` ('entered-text') - The item type.\n * - `option` (Option) - The entered-text option configuration.\n *\n * When providing a custom `renderOption` implementation, it fully replaces the default visual rendering and content for that item.\n * The component still manages focus, keyboard interactions, and selection state, but it no longer applies its default item layout or typography.\n *\n * When returning `null`, the default rendering will be applied for that item.\n *\n * @awsuiSystem core\n */\n renderOption?: AutosuggestProps.ItemRenderer;\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 * Specifies a function that generates the custom value indicator (for example, `Use \"${value}\"`).\n * @i18n\n */\n enteredTextLabel?: AutosuggestProps.EnteredTextLabel;\n\n /**\n * Defines whether entered text option is shown as the first option in the dropdown when value is non-empty.\n */\n hideEnteredTextOption?: boolean;\n\n /**\n * Specifies the text to display with the number of matches at the bottom of the dropdown menu while filtering.\n *\n * Note that the `matchesCount` includes the `enteredTextLabel` (\"Use ${value}\") item, so in most cases you\n * should subtract 1 from `matchesCount`. If using manual filtering, you should provide your own value for `totalCount`.\n */\n filteringResultsText?: (matchesCount: number, totalCount: number) => string;\n\n /**\n * Specifies the text that's displayed when there aren't any suggestions to display.\n * This is displayed when `statusType` is set to `finished` or it's not set at all.\n */\n empty?: React.ReactNode;\n\n /**\n * Called whenever a user selects an option in the dropdown. Don't use this event as the only way to handle user input.\n * Instead, use `onSelect` in combination with the `onChange` handler only as an optional convenience for the user.\n */\n onSelect?: NonCancelableEventHandler<AutosuggestProps.SelectDetail>;\n\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/autosuggest/?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/autosuggest/?tabId=usage#accessibility-guidelines).\n */\n renderHighlightedAriaLive?: AutosuggestProps.ContainingOptionAndGroupString;\n\n /**\n * @awsuiSystem core\n */\n style?: AutosuggestProps.Style;\n}\n\nexport namespace AutosuggestProps {\n export type ChangeDetail = InputProps.ChangeDetail;\n export type KeyDetail = InputProps.KeyDetail;\n export type FilteringType = OptionsFilteringType;\n export type Option = OptionDefinition;\n export type Options = ReadonlyArray<Option | OptionGroup>;\n export type EnteredTextLabel = (value: string) => string;\n export interface OptionGroup extends Option {\n label?: string;\n options: ReadonlyArray<Option>;\n }\n export type LoadItemsDetail = OptionsLoadItemsDetail;\n export type StatusType = DropdownStatusProps.StatusType;\n export interface SelectDetail {\n value: string;\n selectedOption?: Option;\n }\n\n export interface ContainingOptionAndGroupString {\n (option: Option, group?: OptionGroup): string;\n }\n\n export interface OptionRenderItem {\n type: 'item';\n index: number;\n option: Option;\n disabled: boolean;\n highlighted: boolean;\n selected: boolean;\n parent: OptionGroupRenderItem | null;\n }\n export interface OptionGroupRenderItem {\n type: 'group';\n index: number;\n option: OptionGroup;\n disabled: boolean;\n }\n export interface EnteredTextRenderItem {\n type: 'entered-text';\n option: Option;\n highlighted: boolean;\n }\n export type RenderItem = OptionRenderItem | OptionGroupRenderItem | EnteredTextRenderItem;\n export type ItemRenderer = (props: { item: RenderItem; filterText?: string }) => ReactNode | null;\n\n export interface Ref {\n /**\n * Sets input focus onto the UI control.\n */\n focus(): void;\n\n /**\n * Selects all text in the input control.\n */\n select(): void;\n }\n\n export interface Style {\n root?: {\n backgroundColor?: {\n default?: string;\n disabled?: string;\n focus?: string;\n hover?: string;\n readonly?: string;\n };\n borderColor?: {\n default?: string;\n disabled?: string;\n focus?: string;\n hover?: string;\n readonly?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n boxShadow?: {\n default?: string;\n disabled?: string;\n focus?: string;\n hover?: string;\n readonly?: string;\n };\n color?: {\n default?: string;\n disabled?: string;\n focus?: string;\n hover?: string;\n readonly?: string;\n };\n fontSize?: string;\n fontWeight?: string;\n paddingBlock?: string;\n paddingInline?: string;\n };\n placeholder?: {\n color?: string;\n fontSize?: string;\n fontStyle?: string;\n fontWeight?: string;\n };\n }\n}\n\n// TODO: use DropdownOption type same as in select and multiselect\nexport type AutosuggestItem = (AutosuggestProps.Option | AutosuggestProps.OptionGroup) & {\n type?: 'parent' | 'child' | 'use-entered';\n option: OptionDefinition | OptionGroup;\n parent?: OptionGroup;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/autosuggest/internal.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAmBhE,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,OAAO,EAAmB,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAOjE,UAAU,wBAAyB,SAAQ,gBAAgB,EAAE,0BAA0B;CAAG;AAE1F,QAAA,MAAM,mBAAmB,uGA8OvB,CAAC;AAEH,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/autosuggest/internal.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAmBhE,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,OAAO,EAAmB,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAOjE,UAAU,wBAAyB,SAAQ,gBAAgB,EAAE,0BAA0B;CAAG;AAE1F,QAAA,MAAM,mBAAmB,uGAgPvB,CAAC;AAEH,eAAe,mBAAmB,CAAC"}