@cloudscape-design/components 3.0.1107 → 3.0.1109

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 (34) hide show
  1. package/app-layout/visual-refresh-toolbar/compute-layout.d.ts.map +1 -1
  2. package/app-layout/visual-refresh-toolbar/compute-layout.js +1 -3
  3. package/app-layout/visual-refresh-toolbar/compute-layout.js.map +1 -1
  4. package/autosuggest/interfaces.d.ts +3 -0
  5. package/autosuggest/interfaces.d.ts.map +1 -1
  6. package/autosuggest/interfaces.js.map +1 -1
  7. package/autosuggest/internal.d.ts.map +1 -1
  8. package/autosuggest/internal.js +1 -2
  9. package/autosuggest/internal.js.map +1 -1
  10. package/icon/generated/icons.d.ts +3 -0
  11. package/icon/generated/icons.d.ts.map +1 -1
  12. package/icon/generated/icons.js +8 -0
  13. package/icon/generated/icons.js.map +1 -1
  14. package/icon/interfaces.d.ts +1 -1
  15. package/icon/interfaces.d.ts.map +1 -1
  16. package/icon/interfaces.js.map +1 -1
  17. package/icon-provider/interfaces.d.ts +3 -0
  18. package/icon-provider/interfaces.d.ts.map +1 -1
  19. package/icon-provider/interfaces.js.map +1 -1
  20. package/internal/base-component/styles.scoped.css +1 -1
  21. package/internal/components/dropdown-status/index.d.ts +0 -2
  22. package/internal/components/dropdown-status/index.d.ts.map +1 -1
  23. package/internal/components/dropdown-status/index.js +2 -2
  24. package/internal/components/dropdown-status/index.js.map +1 -1
  25. package/internal/environment.js +2 -2
  26. package/internal/environment.json +2 -2
  27. package/internal/manifest.json +1 -1
  28. package/multiselect/use-multiselect.d.ts.map +1 -1
  29. package/multiselect/use-multiselect.js +0 -1
  30. package/multiselect/use-multiselect.js.map +1 -1
  31. package/package.json +1 -1
  32. package/select/internal.d.ts.map +1 -1
  33. package/select/internal.js +0 -1
  34. package/select/internal.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"compute-layout.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-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B,CAe5C;AAED,UAAU,qBAAqB;IAC7B,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,0BAA0B,CAAC,WAAW,CAAC,CAAC;IACnD,kBAAkB,EAAE,QAAQ,GAAG,MAAM,CAAC;IACtC,cAAc,EAAE,OAAO,CAAC;IACxB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED,wBAAgB,wBAAwB,CAAC,EACvC,aAAa,EACb,kBAAkB,EAClB,SAAS,EACT,cAAc,EACd,oBAAoB,EACpB,sBAAsB,GACvB,EAAE,qBAAqB;;;;;;EAYvB;AAED,wBAAgB,eAAe,CAC7B,eAAe,EAAE,oBAAoB,EACrC,QAAQ,EAAE,OAAO,EACjB,SAAS,EAAE,0BAA0B,CAAC,WAAW,CAAC,GACjD;IACD,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;CACtB,CAIA"}
1
+ {"version":3,"file":"compute-layout.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/compute-layout.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAG3D,UAAU,qBAAqB;IAC7B,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,0BAA0B,CAAC,WAAW,CAAC,CAAC;IACnD,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,OAAO,CAAC;IACxB,kBAAkB,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;IAClD,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjD,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,eAAO,MAAM,eAAe,QAAS,CAAC;AAEtC,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,CAAC;CACtB,CAIA"}
@@ -2,7 +2,6 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { shouldSplitPanelBeForcedToBottom } from '../split-panel/split-panel-forced-position';
4
4
  export const CONTENT_PADDING = 2 * 24; // space-xl
5
- const MOBILE_BREAKPOINT = 688;
6
5
  export function computeHorizontalLayout({ navigationOpen, navigationWidth, placement, minContentWidth, activeDrawerSize, splitPanelOpen, splitPanelPosition, splitPanelSize, isMobile, activeGlobalDrawersSizes, activeAiDrawerSize, }) {
7
6
  const activeNavigationWidth = navigationOpen ? navigationWidth : 0;
8
7
  let resizableSpaceAvailable = Math.max(0, placement.inlineSize - minContentWidth - CONTENT_PADDING - activeNavigationWidth - activeAiDrawerSize);
@@ -17,8 +16,7 @@ export function computeHorizontalLayout({ navigationOpen, navigationWidth, place
17
16
  const maxSplitPanelSize = Math.max(resizableSpaceAvailable - totalActiveGlobalDrawersSize - activeDrawerSize, 0);
18
17
  resizableSpaceAvailable -= sideSplitPanelSize;
19
18
  const maxDrawerSize = resizableSpaceAvailable - totalActiveGlobalDrawersSize;
20
- // let the ai drawer be resized until the "main screen" hits the mobile breakpoint to have consistent UX
21
- const maxAiDrawerSize = placement.inlineSize - MOBILE_BREAKPOINT;
19
+ const maxAiDrawerSize = resizableSpaceAvailable - totalActiveGlobalDrawersSize + activeAiDrawerSize;
22
20
  const maxGlobalDrawersSizes = Object.keys(activeGlobalDrawersSizes).reduce((acc, drawerId) => {
23
21
  return Object.assign(Object.assign({}, acc), { [drawerId]: resizableSpaceAvailable -
24
22
  activeDrawerSize -
@@ -1 +1 @@
1
- {"version":3,"file":"compute-layout.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/compute-layout.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAGtC,OAAO,EAAE,gCAAgC,EAAE,MAAM,4CAA4C,CAAC;AAgB9F,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE,CAAC,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AK,QAAQ,EAAE;QACrD,OAAO;YACL,0BAA0B,EAAE,SAAS,CAAC,aAAa;YACnD,0BAA0B,EAAE,SAAS;SACtC,CAAC;KACH;IACD,MAAM,uBAAuB,GAAG,cAAc,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,sBAAsB,CAAC;IAC/F,OAAO;QACL,0BAA0B,EAAE,uBAAuB,GAAG,SAAS,CAAC,aAAa;QAC7E,0BAA0B,EAAE,uBAAuB;KACpD,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe,CAC7B,eAAqC,EACrC,QAAiB,EACjB,SAAkD;;IAKlD,MAAM,eAAe,GAAG,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAA,eAAe,CAAC,OAAO,mCAAI,SAAS,CAAC,eAAe,CAAC,CAAC;IACpH,MAAM,YAAY,GAAG,gBAAgB,eAAe,QAAQ,SAAS,CAAC,aAAa,KAAK,CAAC;IACzF,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,CAAC;AAC3C,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { AppLayoutPropsWithDefaults } from '../interfaces';\nimport { shouldSplitPanelBeForcedToBottom } from '../split-panel/split-panel-forced-position';\n\ninterface HorizontalLayoutInput {\n navigationOpen: boolean;\n navigationWidth: number;\n placement: AppLayoutPropsWithDefaults['placement'];\n minContentWidth: number;\n activeDrawerSize: number;\n splitPanelOpen: boolean;\n splitPanelPosition: 'side' | 'bottom' | undefined;\n splitPanelSize: number;\n isMobile: boolean;\n activeGlobalDrawersSizes: Record<string, number>;\n activeAiDrawerSize: number;\n}\n\nexport const CONTENT_PADDING = 2 * 24; // space-xl\nconst MOBILE_BREAKPOINT = 688;\n\nexport function computeHorizontalLayout({\n navigationOpen,\n navigationWidth,\n placement,\n minContentWidth,\n activeDrawerSize,\n splitPanelOpen,\n splitPanelPosition,\n splitPanelSize,\n isMobile,\n activeGlobalDrawersSizes,\n activeAiDrawerSize,\n}: HorizontalLayoutInput) {\n const activeNavigationWidth = navigationOpen ? navigationWidth : 0;\n\n let resizableSpaceAvailable = Math.max(\n 0,\n placement.inlineSize - minContentWidth - CONTENT_PADDING - activeNavigationWidth - activeAiDrawerSize\n );\n const totalActiveGlobalDrawersSize = Object.values(activeGlobalDrawersSizes).reduce((acc, size) => acc + size, 0);\n\n const availableWidthForSplitPanel = resizableSpaceAvailable - activeDrawerSize;\n const splitPanelForcedPosition = shouldSplitPanelBeForcedToBottom({\n isMobile,\n availableWidthForSplitPanel,\n });\n const resolvedSplitPanelPosition = splitPanelForcedPosition ? 'bottom' : (splitPanelPosition ?? 'bottom');\n const sideSplitPanelSize = resolvedSplitPanelPosition === 'side' && splitPanelOpen ? (splitPanelSize ?? 0) : 0;\n const maxSplitPanelSize = Math.max(resizableSpaceAvailable - totalActiveGlobalDrawersSize - activeDrawerSize, 0);\n resizableSpaceAvailable -= sideSplitPanelSize;\n const maxDrawerSize = resizableSpaceAvailable - totalActiveGlobalDrawersSize;\n // let the ai drawer be resized until the \"main screen\" hits the mobile breakpoint to have consistent UX\n const maxAiDrawerSize = placement.inlineSize - MOBILE_BREAKPOINT;\n const maxGlobalDrawersSizes: Record<string, number> = Object.keys(activeGlobalDrawersSizes).reduce(\n (acc, drawerId) => {\n return {\n ...acc,\n [drawerId]:\n resizableSpaceAvailable -\n activeDrawerSize -\n totalActiveGlobalDrawersSize +\n activeGlobalDrawersSizes[drawerId],\n };\n },\n {}\n );\n\n return {\n splitPanelPosition: resolvedSplitPanelPosition,\n splitPanelForcedPosition,\n sideSplitPanelSize,\n maxSplitPanelSize,\n maxDrawerSize,\n maxGlobalDrawersSizes,\n totalActiveGlobalDrawersSize,\n resizableSpaceAvailable,\n maxAiDrawerSize,\n };\n}\n\ninterface VerticalLayoutInput {\n topOffset: number;\n hasVisibleToolbar: boolean;\n toolbarHeight: number;\n stickyNotifications: boolean;\n notificationsHeight: number;\n}\n\nexport interface VerticalLayoutOutput {\n toolbar: number;\n notifications: number;\n header: number;\n drawers: number;\n}\n\nexport function computeVerticalLayout({\n topOffset,\n hasVisibleToolbar,\n toolbarHeight,\n stickyNotifications,\n notificationsHeight,\n}: VerticalLayoutInput): VerticalLayoutOutput {\n const toolbar = topOffset;\n let notifications = topOffset;\n let drawers = topOffset;\n\n if (hasVisibleToolbar) {\n notifications += toolbarHeight;\n drawers += toolbarHeight;\n }\n let header = notifications;\n if (stickyNotifications) {\n header += notificationsHeight;\n }\n\n return { toolbar, notifications, header, drawers };\n}\n\ninterface SplitPanelOffsetInput {\n hasSplitPanel: boolean;\n placement: AppLayoutPropsWithDefaults['placement'];\n splitPanelPosition: 'bottom' | 'side';\n splitPanelOpen: boolean;\n splitPanelHeaderHeight: number;\n splitPanelFullHeight: number;\n}\n\nexport function computeSplitPanelOffsets({\n hasSplitPanel,\n splitPanelPosition,\n placement,\n splitPanelOpen,\n splitPanelFullHeight,\n splitPanelHeaderHeight,\n}: SplitPanelOffsetInput) {\n if (!hasSplitPanel || splitPanelPosition !== 'bottom') {\n return {\n stickyVerticalBottomOffset: placement.insetBlockEnd,\n mainContentPaddingBlockEnd: undefined,\n };\n }\n const mainContentBottomOffset = splitPanelOpen ? splitPanelFullHeight : splitPanelHeaderHeight;\n return {\n stickyVerticalBottomOffset: mainContentBottomOffset + placement.insetBlockEnd,\n mainContentPaddingBlockEnd: mainContentBottomOffset,\n };\n}\n\nexport function getDrawerStyles(\n verticalOffsets: VerticalLayoutOutput,\n isMobile: boolean,\n placement: AppLayoutPropsWithDefaults['placement']\n): {\n drawerTopOffset: number;\n drawerHeight: string;\n} {\n const drawerTopOffset = isMobile ? verticalOffsets.toolbar : (verticalOffsets.drawers ?? placement.insetBlockStart);\n const drawerHeight = `calc(100vh - ${drawerTopOffset}px - ${placement.insetBlockEnd}px)`;\n return { drawerTopOffset, drawerHeight };\n}\n"]}
1
+ {"version":3,"file":"compute-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AAC;AACrD,CAAC;AAWD,MAAM,UAAU,wBAAwB,CAAC,EACvC,aAAa,EACb,kBAAkB,EAClB,SAAS,EACT,cAAc,EACd,oBAAoB,EACpB,sBAAsB,GACA;IACtB,IAAI,CAAC,aAAa,IAAI,kBAAkB,KAAK,QAAQ,EAAE;QACrD,OAAO;YACL,0BAA0B,EAAE,SAAS,CAAC,aAAa;YACnD,0BAA0B,EAAE,SAAS;SACtC,CAAC;KACH;IACD,MAAM,uBAAuB,GAAG,cAAc,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,sBAAsB,CAAC;IAC/F,OAAO;QACL,0BAA0B,EAAE,uBAAuB,GAAG,SAAS,CAAC,aAAa;QAC7E,0BAA0B,EAAE,uBAAuB;KACpD,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe,CAC7B,eAAqC,EACrC,QAAiB,EACjB,SAAkD;;IAKlD,MAAM,eAAe,GAAG,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAA,eAAe,CAAC,OAAO,mCAAI,SAAS,CAAC,eAAe,CAAC,CAAC;IACpH,MAAM,YAAY,GAAG,gBAAgB,eAAe,QAAQ,SAAS,CAAC,aAAa,KAAK,CAAC;IACzF,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,CAAC;AAC3C,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { AppLayoutPropsWithDefaults } from '../interfaces';\nimport { shouldSplitPanelBeForcedToBottom } from '../split-panel/split-panel-forced-position';\n\ninterface HorizontalLayoutInput {\n navigationOpen: boolean;\n navigationWidth: number;\n placement: AppLayoutPropsWithDefaults['placement'];\n minContentWidth: number;\n activeDrawerSize: number;\n splitPanelOpen: boolean;\n splitPanelPosition: 'side' | 'bottom' | undefined;\n splitPanelSize: number;\n isMobile: boolean;\n activeGlobalDrawersSizes: Record<string, number>;\n activeAiDrawerSize: number;\n}\n\nexport const CONTENT_PADDING = 2 * 24; // space-xl\n\nexport function computeHorizontalLayout({\n navigationOpen,\n navigationWidth,\n placement,\n minContentWidth,\n activeDrawerSize,\n splitPanelOpen,\n splitPanelPosition,\n splitPanelSize,\n isMobile,\n activeGlobalDrawersSizes,\n activeAiDrawerSize,\n}: HorizontalLayoutInput) {\n const activeNavigationWidth = navigationOpen ? navigationWidth : 0;\n\n let resizableSpaceAvailable = Math.max(\n 0,\n placement.inlineSize - minContentWidth - CONTENT_PADDING - activeNavigationWidth - activeAiDrawerSize\n );\n const totalActiveGlobalDrawersSize = Object.values(activeGlobalDrawersSizes).reduce((acc, size) => acc + size, 0);\n\n const availableWidthForSplitPanel = resizableSpaceAvailable - activeDrawerSize;\n const splitPanelForcedPosition = shouldSplitPanelBeForcedToBottom({\n isMobile,\n availableWidthForSplitPanel,\n });\n const resolvedSplitPanelPosition = splitPanelForcedPosition ? 'bottom' : (splitPanelPosition ?? 'bottom');\n const sideSplitPanelSize = resolvedSplitPanelPosition === 'side' && splitPanelOpen ? (splitPanelSize ?? 0) : 0;\n const maxSplitPanelSize = Math.max(resizableSpaceAvailable - totalActiveGlobalDrawersSize - activeDrawerSize, 0);\n resizableSpaceAvailable -= sideSplitPanelSize;\n const maxDrawerSize = resizableSpaceAvailable - totalActiveGlobalDrawersSize;\n const maxAiDrawerSize = resizableSpaceAvailable - totalActiveGlobalDrawersSize + activeAiDrawerSize;\n const maxGlobalDrawersSizes: Record<string, number> = Object.keys(activeGlobalDrawersSizes).reduce(\n (acc, drawerId) => {\n return {\n ...acc,\n [drawerId]:\n resizableSpaceAvailable -\n activeDrawerSize -\n totalActiveGlobalDrawersSize +\n activeGlobalDrawersSizes[drawerId],\n };\n },\n {}\n );\n\n return {\n splitPanelPosition: resolvedSplitPanelPosition,\n splitPanelForcedPosition,\n sideSplitPanelSize,\n maxSplitPanelSize,\n maxDrawerSize,\n maxGlobalDrawersSizes,\n totalActiveGlobalDrawersSize,\n resizableSpaceAvailable,\n maxAiDrawerSize,\n };\n}\n\ninterface VerticalLayoutInput {\n topOffset: number;\n hasVisibleToolbar: boolean;\n toolbarHeight: number;\n stickyNotifications: boolean;\n notificationsHeight: number;\n}\n\nexport interface VerticalLayoutOutput {\n toolbar: number;\n notifications: number;\n header: number;\n drawers: number;\n}\n\nexport function computeVerticalLayout({\n topOffset,\n hasVisibleToolbar,\n toolbarHeight,\n stickyNotifications,\n notificationsHeight,\n}: VerticalLayoutInput): VerticalLayoutOutput {\n const toolbar = topOffset;\n let notifications = topOffset;\n let drawers = topOffset;\n\n if (hasVisibleToolbar) {\n notifications += toolbarHeight;\n drawers += toolbarHeight;\n }\n let header = notifications;\n if (stickyNotifications) {\n header += notificationsHeight;\n }\n\n return { toolbar, notifications, header, drawers };\n}\n\ninterface SplitPanelOffsetInput {\n hasSplitPanel: boolean;\n placement: AppLayoutPropsWithDefaults['placement'];\n splitPanelPosition: 'bottom' | 'side';\n splitPanelOpen: boolean;\n splitPanelHeaderHeight: number;\n splitPanelFullHeight: number;\n}\n\nexport function computeSplitPanelOffsets({\n hasSplitPanel,\n splitPanelPosition,\n placement,\n splitPanelOpen,\n splitPanelFullHeight,\n splitPanelHeaderHeight,\n}: SplitPanelOffsetInput) {\n if (!hasSplitPanel || splitPanelPosition !== 'bottom') {\n return {\n stickyVerticalBottomOffset: placement.insetBlockEnd,\n mainContentPaddingBlockEnd: undefined,\n };\n }\n const mainContentBottomOffset = splitPanelOpen ? splitPanelFullHeight : splitPanelHeaderHeight;\n return {\n stickyVerticalBottomOffset: mainContentBottomOffset + placement.insetBlockEnd,\n mainContentPaddingBlockEnd: mainContentBottomOffset,\n };\n}\n\nexport function getDrawerStyles(\n verticalOffsets: VerticalLayoutOutput,\n isMobile: boolean,\n placement: AppLayoutPropsWithDefaults['placement']\n): {\n drawerTopOffset: number;\n drawerHeight: string;\n} {\n const drawerTopOffset = isMobile ? verticalOffsets.toolbar : (verticalOffsets.drawers ?? placement.insetBlockStart);\n const drawerHeight = `calc(100vh - ${drawerTopOffset}px - ${placement.insetBlockEnd}px)`;\n return { drawerTopOffset, drawerHeight };\n}\n"]}
@@ -65,6 +65,9 @@ export interface AutosuggestProps extends BaseComponentProps, BaseInputProps, In
65
65
  enteredTextLabel?: AutosuggestProps.EnteredTextLabel;
66
66
  /**
67
67
  * Specifies the text to display with the number of matches at the bottom of the dropdown menu while filtering.
68
+ *
69
+ * Note that the `matchesCount` includes the `enteredTextLabel` ("Use ${value}") item, so in most cases you
70
+ * should subtract 1 from `matchesCount`. If using manual filtering, you should provide your own value for `totalCount`.
68
71
  */
69
72
  filteringResultsText?: (matchesCount: number, totalCount: number) => string;
70
73
  /**
@@ -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,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACzF,OAAO,EAAE,+BAA+B,EAAE,MAAM,wCAAwC,CAAC;AACzF,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,gBACf,SAAQ,kBAAkB,EACxB,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,+BAA+B,EAC/B,mBAAmB;IACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA+BI;IACJ,OAAO,CAAC,EAAE,gBAAgB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AG,MAAM,CAAC;KAC/C;IAED,UAAiB,GAAG;QAClB;;WAEG;QACH,KAAK,IAAI,IAAI,CAAC;QAEd;;WAEG;QACH,MAAM,IAAI,IAAI,CAAC;KAChB;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;CACxC,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 * Specifies the text to display with the number of matches at the bottom of the dropdown menu while filtering.\n */\n filteringResultsText?: (matchesCount: number, totalCount: number) => string;\n\n /**\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 `selectedLabel` 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\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\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 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 * 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 `selectedLabel` 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\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\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 +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,uGAsOvB,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,uGAqOvB,CAAC;AAEH,eAAe,mBAAmB,CAAC"}
@@ -113,12 +113,11 @@ const InternalAutosuggest = React.forwardRef((props, ref) => {
113
113
  const highlightedOptionIdSource = useUniqueId();
114
114
  const highlightedOptionId = autosuggestItemsState.highlightedOption ? highlightedOptionIdSource : undefined;
115
115
  const isEmpty = !value && !autosuggestItemsState.items.length;
116
- const isFiltered = !!value && value.length !== 0;
116
+ const isFiltered = !!value && value.length !== 0 && !(filteringType === 'auto' && autosuggestItemsState.showAll);
117
117
  const filteredText = isFiltered
118
118
  ? filteringResultsText === null || filteringResultsText === void 0 ? void 0 : filteringResultsText(autosuggestItemsState.items.length, (_b = options === null || options === void 0 ? void 0 : options.length) !== null && _b !== void 0 ? _b : 0)
119
119
  : undefined;
120
120
  const dropdownStatus = useDropdownStatus(Object.assign(Object.assign({}, props), { isEmpty,
121
- isFiltered,
122
121
  recoveryText,
123
122
  errorIconAriaLabel, onRecoveryClick: handleRecoveryClick, filteringResultsText: filteredText, hasRecoveryCallback: !!onLoadItems }));
124
123
  const shouldRenderDropdownContent = !isEmpty || !!dropdownStatus.content;
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/autosuggest/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,OAAO,KAAK,EAAE,EAAO,mBAAmB,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,gBAAyC,MAAM,0CAA0C,CAAC;AAEjG,OAAO,cAAc,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAEL,mBAAmB,EACnB,sBAAsB,GAEvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,eAAe,MAAM,oCAAoC,CAAC;AAEjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAEjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,sBAAsB,MAAM,gBAAgB,CAAC;AAEpD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAIrC,MAAM,mBAAmB,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,KAA+B,EAAE,GAA8B,EAAE,EAAE;;IAC/G,MAAM,EACJ,KAAK,EACL,QAAQ,EACR,MAAM,EACN,OAAO,EACP,OAAO,EACP,WAAW,EACX,OAAO,EACP,aAAa,GAAG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B,EACpC,yBAAyB,EAAE,yBAAyB,EACpD,UAAU,EACR,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,oBAAC,cAAc,IAAC,OAAO,EAAE,cAAc,CAAC,OAAO,EAAE,EAAE,EAAE,eAAe,GAAI,CAAC,CAAC,CAAC,IAAI,EAE5G,eAAe,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,GACrE,CACH,EAEH,cAAc,EACZ,cAAc,CAAC,QAAQ,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,CAClD,oBAAC,cAAc,IACb,EAAE,EAAE,eAAe,EACnB,OAAO,EAAE,cAAc,CAAC,OAAO,EAC/B,QAAQ,EAAE,qBAAqB,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,GACjD,CACH,CAAC,CAAC,CAAC,IAAI,EAEV,SAAS,EAAE,cAAc,CAAC,iBAAiB,EAC3C,eAAe,EAAE,mBAAmB,EACpC,cAAc,EAAE,kBAAkB,EAClC,gBAAgB,EAAE,oBAAoB,EACtC,cAAc,EAAE,kBAAkB,EAClC,YAAY,EAAE,gBAAgB,IAC9B,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,mBAAmB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { Ref, useImperativeHandle, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useUniqueId, warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { useFormFieldContext } from '../contexts/form-field';\nimport { useInternalI18n } from '../i18n/context';\nimport { BaseChangeDetail } from '../input/interfaces';\nimport AutosuggestInput, { AutosuggestInputRef } from '../internal/components/autosuggest-input';\nimport { OptionsLoadItemsDetail } from '../internal/components/dropdown/interfaces';\nimport DropdownFooter from '../internal/components/dropdown-footer';\nimport { useDropdownStatus } from '../internal/components/dropdown-status';\nimport {\n BaseKeyDetail,\n fireCancelableEvent,\n fireNonCancelableEvent,\n NonCancelableCustomEvent,\n} from '../internal/events';\nimport checkControlled from '../internal/hooks/check-controlled';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { checkOptionValueField } from '../select/utils/check-option-value-field';\nimport { AutosuggestItem, AutosuggestProps } from './interfaces';\nimport { useAutosuggestLoadMore } from './load-more-controller';\nimport { useAutosuggestItems } from './options-controller';\nimport AutosuggestOptionsList from './options-list';\n\nimport styles from './styles.css.js';\n\ninterface InternalAutosuggestProps extends AutosuggestProps, InternalBaseComponentProps {}\n\nconst InternalAutosuggest = React.forwardRef((props: InternalAutosuggestProps, ref: Ref<AutosuggestProps.Ref>) => {\n const {\n value,\n onChange,\n onBlur,\n onFocus,\n onKeyUp,\n onLoadItems,\n options,\n filteringType = 'auto',\n statusType = 'finished',\n placeholder,\n clearAriaLabel,\n name,\n disabled,\n disableBrowserAutocorrect = false,\n autoFocus,\n readOnly,\n ariaLabel,\n ariaRequired,\n enteredTextLabel,\n filteringResultsText,\n onKeyDown,\n virtualScroll,\n expandToViewport,\n onSelect,\n renderHighlightedAriaLive,\n __internalRootRef,\n ...restProps\n } = props;\n\n checkControlled('Autosuggest', 'value', value, 'onChange', onChange);\n checkOptionValueField('Autosuggest', 'options', options);\n\n const autosuggestInputRef = useRef<AutosuggestInputRef>(null);\n useImperativeHandle(\n ref,\n () => ({\n focus: () => autosuggestInputRef.current?.focus(),\n select: () => autosuggestInputRef.current?.select(),\n }),\n []\n );\n\n const i18n = useInternalI18n('autosuggest');\n const errorIconAriaLabel = i18n('errorIconAriaLabel', restProps.errorIconAriaLabel);\n const selectedAriaLabel = i18n('selectedAriaLabel', restProps.selectedAriaLabel);\n const recoveryText = i18n('recoveryText', restProps.recoveryText);\n\n if (restProps.recoveryText && !onLoadItems) {\n warnOnce('Autosuggest', '`onLoadItems` must be provided for `recoveryText` to be displayed.');\n }\n\n const [autosuggestItemsState, autosuggestItemsHandlers] = useAutosuggestItems({\n options: options || [],\n filterValue: value,\n filterText: value,\n filteringType,\n enteredTextLabel,\n hideEnteredTextLabel: false,\n onSelectItem: (option: AutosuggestItem) => {\n const value = option.value || '';\n fireNonCancelableEvent(onChange, { value });\n fireNonCancelableEvent(onSelect, {\n value,\n selectedOption: option.type !== 'use-entered' ? option.option : undefined,\n });\n autosuggestInputRef.current?.close();\n },\n });\n\n const autosuggestLoadMoreHandlers = useAutosuggestLoadMore({\n options,\n statusType,\n onLoadItems: (detail: OptionsLoadItemsDetail) => fireNonCancelableEvent(onLoadItems, detail),\n });\n\n const handleChange = (event: NonCancelableCustomEvent<BaseChangeDetail>) => {\n autosuggestItemsHandlers.setShowAll(false);\n autosuggestItemsHandlers.resetHighlightWithKeyboard();\n fireNonCancelableEvent(onChange, event.detail);\n };\n\n const handleDelayedInput = (event: NonCancelableCustomEvent<BaseChangeDetail>) => {\n autosuggestLoadMoreHandlers.fireLoadMoreOnInputChange(event.detail.value);\n };\n\n const handleBlur = () => {\n fireNonCancelableEvent(onBlur, null);\n };\n\n const handleFocus = () => {\n autosuggestItemsHandlers.setShowAll(true);\n autosuggestLoadMoreHandlers.fireLoadMoreOnInputFocus();\n fireNonCancelableEvent(onFocus, null);\n };\n\n const handleKeyUp = (event: CustomEvent<BaseKeyDetail>) => {\n fireCancelableEvent(onKeyUp, event.detail, event);\n };\n\n const handleKeyDown = (event: CustomEvent<BaseKeyDetail>) => {\n fireCancelableEvent(onKeyDown, event.detail, event);\n };\n\n const handlePressArrowDown = () => {\n if (autosuggestItemsState.items.length - 1 === autosuggestItemsState.highlightedIndex) {\n autosuggestItemsHandlers.goHomeWithKeyboard();\n return;\n }\n\n autosuggestItemsHandlers.moveHighlightWithKeyboard(1);\n };\n\n const handlePressArrowUp = () => {\n if (\n (autosuggestItemsState.highlightedOption?.type === 'child' && autosuggestItemsState.highlightedIndex === 1) ||\n autosuggestItemsState.highlightedIndex === 0\n ) {\n autosuggestItemsHandlers.goEndWithKeyboard();\n return;\n }\n\n autosuggestItemsHandlers.moveHighlightWithKeyboard(-1);\n };\n\n const handlePressEnter = () => {\n return autosuggestItemsHandlers.selectHighlightedOptionWithKeyboard();\n };\n\n const handleCloseDropdown = () => {\n autosuggestItemsHandlers.resetHighlightWithKeyboard();\n };\n\n const handleRecoveryClick = () => {\n autosuggestLoadMoreHandlers.fireLoadMoreOnRecoveryClick();\n autosuggestInputRef.current?.focus();\n };\n\n const formFieldContext = useFormFieldContext(restProps);\n const selfControlId = useUniqueId('input');\n const footerControlId = useUniqueId('footer');\n const controlId = formFieldContext.controlId ?? selfControlId;\n const listId = useUniqueId('list');\n const highlightedOptionIdSource = useUniqueId();\n const highlightedOptionId = autosuggestItemsState.highlightedOption ? highlightedOptionIdSource : undefined;\n\n const isEmpty = !value && !autosuggestItemsState.items.length;\n const isFiltered = !!value && value.length !== 0;\n const filteredText = isFiltered\n ? filteringResultsText?.(autosuggestItemsState.items.length, options?.length ?? 0)\n : undefined;\n const dropdownStatus = useDropdownStatus({\n ...props,\n isEmpty,\n isFiltered,\n recoveryText,\n errorIconAriaLabel,\n onRecoveryClick: handleRecoveryClick,\n filteringResultsText: filteredText,\n hasRecoveryCallback: !!onLoadItems,\n });\n\n const shouldRenderDropdownContent = !isEmpty || !!dropdownStatus.content;\n\n return (\n <AutosuggestInput\n {...restProps}\n className={clsx(styles.root, restProps.className)}\n ref={autosuggestInputRef}\n __internalRootRef={__internalRootRef}\n value={value}\n onChange={handleChange}\n onBlur={handleBlur}\n onFocus={handleFocus}\n onKeyUp={handleKeyUp}\n onKeyDown={handleKeyDown}\n name={name}\n controlId={controlId}\n placeholder={placeholder}\n disabled={disabled}\n readOnly={readOnly}\n autoFocus={autoFocus}\n ariaLabel={ariaLabel}\n ariaRequired={ariaRequired}\n clearAriaLabel={clearAriaLabel}\n disableBrowserAutocorrect={disableBrowserAutocorrect}\n expandToViewport={expandToViewport}\n ariaControls={listId}\n ariaActivedescendant={highlightedOptionId}\n dropdownExpanded={shouldRenderDropdownContent}\n dropdownContent={\n shouldRenderDropdownContent && (\n <AutosuggestOptionsList\n statusType={statusType}\n autosuggestItemsState={autosuggestItemsState}\n autosuggestItemsHandlers={autosuggestItemsHandlers}\n highlightedOptionId={highlightedOptionId}\n highlightText={value}\n listId={listId}\n controlId={controlId}\n handleLoadMore={autosuggestLoadMoreHandlers.fireLoadMoreOnScroll}\n hasDropdownStatus={dropdownStatus.content !== null}\n virtualScroll={virtualScroll}\n selectedAriaLabel={selectedAriaLabel}\n renderHighlightedAriaLive={renderHighlightedAriaLive}\n listBottom={\n !dropdownStatus.isSticky ? <DropdownFooter content={dropdownStatus.content} id={footerControlId} /> : null\n }\n ariaDescribedby={dropdownStatus.content ? footerControlId : undefined}\n />\n )\n }\n dropdownFooter={\n dropdownStatus.isSticky && dropdownStatus.content ? (\n <DropdownFooter\n id={footerControlId}\n content={dropdownStatus.content}\n hasItems={autosuggestItemsState.items.length >= 1}\n />\n ) : null\n }\n loopFocus={dropdownStatus.hasRecoveryButton}\n onCloseDropdown={handleCloseDropdown}\n onDelayedInput={handleDelayedInput}\n onPressArrowDown={handlePressArrowDown}\n onPressArrowUp={handlePressArrowUp}\n onPressEnter={handlePressEnter}\n />\n );\n});\n\nexport default InternalAutosuggest;\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/autosuggest/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,OAAO,KAAK,EAAE,EAAO,mBAAmB,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,gBAAyC,MAAM,0CAA0C,CAAC;AAEjG,OAAO,cAAc,MAAM,wCAAwC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AE,cAAc,CAAC,iBAAiB,EAC3C,eAAe,EAAE,mBAAmB,EACpC,cAAc,EAAE,kBAAkB,EAClC,gBAAgB,EAAE,oBAAoB,EACtC,cAAc,EAAE,kBAAkB,EAClC,YAAY,EAAE,gBAAgB,IAC9B,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,mBAAmB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { Ref, useImperativeHandle, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useUniqueId, warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { useFormFieldContext } from '../contexts/form-field';\nimport { useInternalI18n } from '../i18n/context';\nimport { BaseChangeDetail } from '../input/interfaces';\nimport AutosuggestInput, { AutosuggestInputRef } from '../internal/components/autosuggest-input';\nimport { OptionsLoadItemsDetail } from '../internal/components/dropdown/interfaces';\nimport DropdownFooter from '../internal/components/dropdown-footer';\nimport { useDropdownStatus } from '../internal/components/dropdown-status';\nimport {\n BaseKeyDetail,\n fireCancelableEvent,\n fireNonCancelableEvent,\n NonCancelableCustomEvent,\n} from '../internal/events';\nimport checkControlled from '../internal/hooks/check-controlled';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { checkOptionValueField } from '../select/utils/check-option-value-field';\nimport { AutosuggestItem, AutosuggestProps } from './interfaces';\nimport { useAutosuggestLoadMore } from './load-more-controller';\nimport { useAutosuggestItems } from './options-controller';\nimport AutosuggestOptionsList from './options-list';\n\nimport styles from './styles.css.js';\n\ninterface InternalAutosuggestProps extends AutosuggestProps, InternalBaseComponentProps {}\n\nconst InternalAutosuggest = React.forwardRef((props: InternalAutosuggestProps, ref: Ref<AutosuggestProps.Ref>) => {\n const {\n value,\n onChange,\n onBlur,\n onFocus,\n onKeyUp,\n onLoadItems,\n options,\n filteringType = 'auto',\n statusType = 'finished',\n placeholder,\n clearAriaLabel,\n name,\n disabled,\n disableBrowserAutocorrect = false,\n autoFocus,\n readOnly,\n ariaLabel,\n ariaRequired,\n enteredTextLabel,\n filteringResultsText,\n onKeyDown,\n virtualScroll,\n expandToViewport,\n onSelect,\n renderHighlightedAriaLive,\n __internalRootRef,\n ...restProps\n } = props;\n\n checkControlled('Autosuggest', 'value', value, 'onChange', onChange);\n checkOptionValueField('Autosuggest', 'options', options);\n\n const autosuggestInputRef = useRef<AutosuggestInputRef>(null);\n useImperativeHandle(\n ref,\n () => ({\n focus: () => autosuggestInputRef.current?.focus(),\n select: () => autosuggestInputRef.current?.select(),\n }),\n []\n );\n\n const i18n = useInternalI18n('autosuggest');\n const errorIconAriaLabel = i18n('errorIconAriaLabel', restProps.errorIconAriaLabel);\n const selectedAriaLabel = i18n('selectedAriaLabel', restProps.selectedAriaLabel);\n const recoveryText = i18n('recoveryText', restProps.recoveryText);\n\n if (restProps.recoveryText && !onLoadItems) {\n warnOnce('Autosuggest', '`onLoadItems` must be provided for `recoveryText` to be displayed.');\n }\n\n const [autosuggestItemsState, autosuggestItemsHandlers] = useAutosuggestItems({\n options: options || [],\n filterValue: value,\n filterText: value,\n filteringType,\n enteredTextLabel,\n hideEnteredTextLabel: false,\n onSelectItem: (option: AutosuggestItem) => {\n const value = option.value || '';\n fireNonCancelableEvent(onChange, { value });\n fireNonCancelableEvent(onSelect, {\n value,\n selectedOption: option.type !== 'use-entered' ? option.option : undefined,\n });\n autosuggestInputRef.current?.close();\n },\n });\n\n const autosuggestLoadMoreHandlers = useAutosuggestLoadMore({\n options,\n statusType,\n onLoadItems: (detail: OptionsLoadItemsDetail) => fireNonCancelableEvent(onLoadItems, detail),\n });\n\n const handleChange = (event: NonCancelableCustomEvent<BaseChangeDetail>) => {\n autosuggestItemsHandlers.setShowAll(false);\n autosuggestItemsHandlers.resetHighlightWithKeyboard();\n fireNonCancelableEvent(onChange, event.detail);\n };\n\n const handleDelayedInput = (event: NonCancelableCustomEvent<BaseChangeDetail>) => {\n autosuggestLoadMoreHandlers.fireLoadMoreOnInputChange(event.detail.value);\n };\n\n const handleBlur = () => {\n fireNonCancelableEvent(onBlur, null);\n };\n\n const handleFocus = () => {\n autosuggestItemsHandlers.setShowAll(true);\n autosuggestLoadMoreHandlers.fireLoadMoreOnInputFocus();\n fireNonCancelableEvent(onFocus, null);\n };\n\n const handleKeyUp = (event: CustomEvent<BaseKeyDetail>) => {\n fireCancelableEvent(onKeyUp, event.detail, event);\n };\n\n const handleKeyDown = (event: CustomEvent<BaseKeyDetail>) => {\n fireCancelableEvent(onKeyDown, event.detail, event);\n };\n\n const handlePressArrowDown = () => {\n if (autosuggestItemsState.items.length - 1 === autosuggestItemsState.highlightedIndex) {\n autosuggestItemsHandlers.goHomeWithKeyboard();\n return;\n }\n\n autosuggestItemsHandlers.moveHighlightWithKeyboard(1);\n };\n\n const handlePressArrowUp = () => {\n if (\n (autosuggestItemsState.highlightedOption?.type === 'child' && autosuggestItemsState.highlightedIndex === 1) ||\n autosuggestItemsState.highlightedIndex === 0\n ) {\n autosuggestItemsHandlers.goEndWithKeyboard();\n return;\n }\n\n autosuggestItemsHandlers.moveHighlightWithKeyboard(-1);\n };\n\n const handlePressEnter = () => {\n return autosuggestItemsHandlers.selectHighlightedOptionWithKeyboard();\n };\n\n const handleCloseDropdown = () => {\n autosuggestItemsHandlers.resetHighlightWithKeyboard();\n };\n\n const handleRecoveryClick = () => {\n autosuggestLoadMoreHandlers.fireLoadMoreOnRecoveryClick();\n autosuggestInputRef.current?.focus();\n };\n\n const formFieldContext = useFormFieldContext(restProps);\n const selfControlId = useUniqueId('input');\n const footerControlId = useUniqueId('footer');\n const controlId = formFieldContext.controlId ?? selfControlId;\n const listId = useUniqueId('list');\n const highlightedOptionIdSource = useUniqueId();\n const highlightedOptionId = autosuggestItemsState.highlightedOption ? highlightedOptionIdSource : undefined;\n\n const isEmpty = !value && !autosuggestItemsState.items.length;\n const isFiltered = !!value && value.length !== 0 && !(filteringType === 'auto' && autosuggestItemsState.showAll);\n const filteredText = isFiltered\n ? filteringResultsText?.(autosuggestItemsState.items.length, options?.length ?? 0)\n : undefined;\n const dropdownStatus = useDropdownStatus({\n ...props,\n isEmpty,\n recoveryText,\n errorIconAriaLabel,\n onRecoveryClick: handleRecoveryClick,\n filteringResultsText: filteredText,\n hasRecoveryCallback: !!onLoadItems,\n });\n\n const shouldRenderDropdownContent = !isEmpty || !!dropdownStatus.content;\n\n return (\n <AutosuggestInput\n {...restProps}\n className={clsx(styles.root, restProps.className)}\n ref={autosuggestInputRef}\n __internalRootRef={__internalRootRef}\n value={value}\n onChange={handleChange}\n onBlur={handleBlur}\n onFocus={handleFocus}\n onKeyUp={handleKeyUp}\n onKeyDown={handleKeyDown}\n name={name}\n controlId={controlId}\n placeholder={placeholder}\n disabled={disabled}\n readOnly={readOnly}\n autoFocus={autoFocus}\n ariaLabel={ariaLabel}\n ariaRequired={ariaRequired}\n clearAriaLabel={clearAriaLabel}\n disableBrowserAutocorrect={disableBrowserAutocorrect}\n expandToViewport={expandToViewport}\n ariaControls={listId}\n ariaActivedescendant={highlightedOptionId}\n dropdownExpanded={shouldRenderDropdownContent}\n dropdownContent={\n shouldRenderDropdownContent && (\n <AutosuggestOptionsList\n statusType={statusType}\n autosuggestItemsState={autosuggestItemsState}\n autosuggestItemsHandlers={autosuggestItemsHandlers}\n highlightedOptionId={highlightedOptionId}\n highlightText={value}\n listId={listId}\n controlId={controlId}\n handleLoadMore={autosuggestLoadMoreHandlers.fireLoadMoreOnScroll}\n hasDropdownStatus={dropdownStatus.content !== null}\n virtualScroll={virtualScroll}\n selectedAriaLabel={selectedAriaLabel}\n renderHighlightedAriaLive={renderHighlightedAriaLive}\n listBottom={\n !dropdownStatus.isSticky ? <DropdownFooter content={dropdownStatus.content} id={footerControlId} /> : null\n }\n ariaDescribedby={dropdownStatus.content ? footerControlId : undefined}\n />\n )\n }\n dropdownFooter={\n dropdownStatus.isSticky && dropdownStatus.content ? (\n <DropdownFooter\n id={footerControlId}\n content={dropdownStatus.content}\n hasItems={autosuggestItemsState.items.length >= 1}\n />\n ) : null\n }\n loopFocus={dropdownStatus.hasRecoveryButton}\n onCloseDropdown={handleCloseDropdown}\n onDelayedInput={handleDelayedInput}\n onPressArrowDown={handlePressArrowDown}\n onPressArrowUp={handlePressArrowUp}\n onPressEnter={handlePressEnter}\n />\n );\n});\n\nexport default InternalAutosuggest;\n"]}
@@ -12,6 +12,7 @@ declare const icons: {
12
12
  "arrow-left": JSX.Element;
13
13
  "arrow-right": JSX.Element;
14
14
  "arrow-up": JSX.Element;
15
+ "at-symbol": JSX.Element;
15
16
  "audio-full": JSX.Element;
16
17
  "audio-half": JSX.Element;
17
18
  "audio-off": JSX.Element;
@@ -62,6 +63,7 @@ declare const icons: {
62
63
  group: JSX.Element;
63
64
  "heart-filled": JSX.Element;
64
65
  heart: JSX.Element;
66
+ history: JSX.Element;
65
67
  "insert-row": JSX.Element;
66
68
  key: JSX.Element;
67
69
  keyboard: JSX.Element;
@@ -88,6 +90,7 @@ declare const icons: {
88
90
  settings: JSX.Element;
89
91
  share: JSX.Element;
90
92
  shrink: JSX.Element;
93
+ slash: JSX.Element;
91
94
  "star-filled": JSX.Element;
92
95
  "star-half": JSX.Element;
93
96
  star: JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../../src/icon/generated/icons.tsx"],"names":[],"mappings":";AACE,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgIV,CAAC;AACF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../../src/icon/generated/icons.tsx"],"names":[],"mappings":";AACE,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmIV,CAAC;AACF,eAAe,KAAK,CAAC"}
@@ -26,6 +26,8 @@ const icons = {
26
26
  React.createElement("path", { d: "m9 3 5 5-5 5M14 8H1", className: "stroke-linejoin-round" })),
27
27
  "arrow-up": React.createElement("svg", { viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg", focusable: "false", "aria-hidden": "true" },
28
28
  React.createElement("path", { d: "M13 7 8 2 3 7M8 2v13", className: "stroke-linejoin-round" })),
29
+ "at-symbol": React.createElement("svg", { viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg", focusable: "false", "aria-hidden": "true" },
30
+ React.createElement("path", { d: "M8.907 1.005c1.273 0 2.363.23 3.268.688.915.449 1.615 1.1 2.1 1.955.483.845.725 1.862.725 3.051 0 .99-.158 1.867-.474 2.628-.315.761-.752 1.356-1.31 1.783-.557.428-1.204.64-1.94.641-.485 0-.906-.088-1.263-.266a1.81 1.81 0 0 1-.806-.75 3.177 3.177 0 0 1-1.025.766c-.41.188-.821.281-1.232.281-.789 0-1.393-.245-1.814-.735-.421-.49-.632-1.194-.632-2.111 0-.626.095-1.22.284-1.784a5.35 5.35 0 0 1 .774-1.502c.326-.437.699-.782 1.12-1.032a2.64 2.64 0 0 1 1.341-.375c.748 0 1.343.277 1.785.83l.094-.236c.053-.146.11-.24.173-.281.074-.052.185-.078.332-.078h.853c.22 0 .33.093.33.28 0 .063-.015.184-.047.361l-.726 4.208a3.133 3.133 0 0 0-.047.422c0 .375.21.563.631.563.348 0 .658-.156.932-.47.284-.312.504-.74.662-1.281.158-.543.237-1.158.237-1.846 0-1.335-.379-2.352-1.136-3.05-.747-.71-1.831-1.064-3.251-1.064-.853 0-1.642.16-2.368.484a5.644 5.644 0 0 0-1.878 1.33 6.032 6.032 0 0 0-1.232 2.018c-.294.771-.441 1.616-.441 2.534 0 1.428.368 2.524 1.104 3.285.737.772 1.795 1.157 3.173 1.157.368 0 .7-.026.994-.078.305-.042.621-.104.948-.187.147-.042.252-.073.315-.094.063-.01.116-.016.158-.016.2 0 .3.11.3.328v.704a.53.53 0 0 1-.08.313c-.041.073-.13.135-.268.187-.757.292-1.61.439-2.556.439-1.252 0-2.33-.24-3.236-.72a4.975 4.975 0 0 1-2.068-2.064C1.236 11.324 1 10.249 1 8.998c0-1.147.195-2.205.584-3.175.4-.98.952-1.83 1.657-2.55A7.598 7.598 0 0 1 5.751 1.6c.968-.397 2.02-.595 3.156-.595Zm-.426 4.74c-.347 0-.663.135-.947.406-.284.271-.515.636-.694 1.095-.169.449-.253.95-.253 1.502 0 1.022.369 1.533 1.105 1.533.474 0 .9-.23 1.279-.688 0-.115.015-.287.047-.517l.521-3.05a2.266 2.266 0 0 0-1.058-.282Z", className: "filled no-stroke" })),
29
31
  "audio-full": React.createElement("svg", { viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg", focusable: "false", "aria-hidden": "true" },
30
32
  React.createElement("path", { d: "M6.47 13.707 4 10.997H1v-6h3l2.47-2.71c.54-.59 1.53-.21 1.53.59v10.23c0 .8-.99 1.19-1.53.59v.01Z", className: "stroke-linejoin-round" }),
31
33
  React.createElement("path", { d: "M10 12.997c2.76 0 5-2.24 5-5s-2.24-5-5-5" }),
@@ -169,6 +171,9 @@ const icons = {
169
171
  React.createElement("path", { d: "M13.49 3.546C12.124 2.31 10.312 2.689 9 4L8 5 7 4c-1.301-1.302-3.114-1.69-4.491-.454a3.409 3.409 0 0 0-.133 4.95L7.952 14s.067.028.086 0l5.576-5.505a3.409 3.409 0 0 0-.133-4.95h.01Z", className: "filled stroke-linejoin-round" })),
170
172
  "heart": React.createElement("svg", { viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg", focusable: "false", "aria-hidden": "true" },
171
173
  React.createElement("path", { d: "M13.752 2.873c-1.44-1.3-3.7-1.1-5.08.28l-.7.7-.7-.7c-1.37-1.37-3.63-1.58-5.08-.28a3.588 3.588 0 0 0-.14 5.21l5.87 5.87s.07.03.09 0l5.87-5.87a3.588 3.588 0 0 0-.14-5.21h.01Z", className: "stroke-linejoin-round" })),
174
+ "history": React.createElement("svg", { viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg", focusable: "false", "aria-hidden": "true" },
175
+ React.createElement("path", { d: "M8 16.005c4.422 0 8-3.578 8-8 0-4.422-3.578-8-8-8a7.982 7.982 0 0 0-6 2.708V.005H0v5a1 1 0 0 0 1.008 1l5-.04-.016-2-2.444.02A5.985 5.985 0 0 1 8 2.004c3.318 0 6 2.682 6 6s-2.682 6-6 6-6-2.682-6-6H0c0 4.422 3.578 8 8 8Z", className: "filled no-stroke" }),
176
+ React.createElement("path", { d: "M9 10.005a1 1 0 0 0 1-1v-5H8v4H5v2h4Z", className: "filled no-stroke" })),
172
177
  "insert-row": React.createElement("svg", { viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg", focusable: "false", "aria-hidden": "true" },
173
178
  React.createElement("path", { d: "M6 11H1V2h14v4M12 7v8M8 11h8", className: "stroke-linejoin-round" })),
174
179
  "key": React.createElement("svg", { viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg", focusable: "false", "aria-hidden": "true" },
@@ -236,6 +241,9 @@ const icons = {
236
241
  React.createElement("path", { d: "M3.5 11a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM12.5 6a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM12.5 15a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM10.326 4.7 5.678 7.293M10.223 11.483l-4.448-1.96" })),
237
242
  "shrink": React.createElement("svg", { viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg", focusable: "false", "aria-hidden": "true" },
238
243
  React.createElement("path", { d: "M10 1v5h5M10.71 5.29 15 1M1 10h5v5M5.3 10.7 1 15", className: "stroke-linejoin-round" })),
244
+ "slash": React.createElement("svg", { viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg", focusable: "false", "aria-hidden": "true" },
245
+ React.createElement("path", { d: "M10.969 5.059 7 12.005l-1.736-.992 3.968-6.947 1.737.993Z", className: "filled no-stroke" }),
246
+ React.createElement("path", { d: "M14 .005a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-12a2 2 0 0 1 2-2h12Zm-12 14h12v-12H2v12Z", className: "filled no-stroke" })),
239
247
  "star-filled": React.createElement("svg", { viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg", focusable: "false", "aria-hidden": "true" },
240
248
  React.createElement("path", { d: "m8 1 2.16 4.38 4.84.71-3.5 3.41.83 4.81L8 12.04l-4.33 2.27.83-4.81L1 6.09l4.84-.71L8 1Z", className: "filled stroke-linejoin-round" })),
241
249
  "star-half": React.createElement("svg", { viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg", focusable: "false", "aria-hidden": "true" },