@cloudscape-design/components 3.0.870 → 3.0.872

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 (159) hide show
  1. package/app-layout/drawer/resizable-drawer.d.ts.map +1 -1
  2. package/app-layout/drawer/resizable-drawer.js +2 -3
  3. package/app-layout/drawer/resizable-drawer.js.map +1 -1
  4. package/app-layout/utils/use-focus-control.d.ts +1 -2
  5. package/app-layout/utils/use-focus-control.d.ts.map +1 -1
  6. package/app-layout/utils/use-focus-control.js +0 -2
  7. package/app-layout/utils/use-focus-control.js.map +1 -1
  8. package/app-layout/utils/use-resize.d.ts.map +1 -1
  9. package/app-layout/utils/use-resize.js +2 -3
  10. package/app-layout/utils/use-resize.js.map +1 -1
  11. package/app-layout/utils/use-split-panel-focus-control.d.ts +1 -2
  12. package/app-layout/utils/use-split-panel-focus-control.d.ts.map +1 -1
  13. package/app-layout/utils/use-split-panel-focus-control.js +0 -1
  14. package/app-layout/utils/use-split-panel-focus-control.js.map +1 -1
  15. package/app-layout/visual-refresh-toolbar/drawer/global-drawer.d.ts.map +1 -1
  16. package/app-layout/visual-refresh-toolbar/drawer/global-drawer.js +2 -3
  17. package/app-layout/visual-refresh-toolbar/drawer/global-drawer.js.map +1 -1
  18. package/app-layout/visual-refresh-toolbar/drawer/local-drawer.d.ts.map +1 -1
  19. package/app-layout/visual-refresh-toolbar/drawer/local-drawer.js +2 -3
  20. package/app-layout/visual-refresh-toolbar/drawer/local-drawer.js.map +1 -1
  21. package/button-group/index.d.ts.map +1 -1
  22. package/button-group/index.js +22 -1
  23. package/button-group/index.js.map +1 -1
  24. package/button-group/interfaces.d.ts +2 -1
  25. package/button-group/interfaces.d.ts.map +1 -1
  26. package/button-group/interfaces.js.map +1 -1
  27. package/collection-preferences/content-display/index.d.ts.map +1 -1
  28. package/collection-preferences/content-display/index.js +8 -5
  29. package/collection-preferences/content-display/index.js.map +1 -1
  30. package/container/styles.css.js +32 -31
  31. package/container/styles.scoped.css +57 -54
  32. package/container/styles.selectors.js +32 -31
  33. package/flashbar/internal/analytics.d.ts.map +1 -1
  34. package/flashbar/internal/analytics.js +1 -3
  35. package/flashbar/internal/analytics.js.map +1 -1
  36. package/internal/components/autosuggest-input/index.d.ts.map +1 -1
  37. package/internal/components/autosuggest-input/index.js +6 -0
  38. package/internal/components/autosuggest-input/index.js.map +1 -1
  39. package/internal/components/drag-handle/index.d.ts +2 -2
  40. package/internal/components/drag-handle/index.d.ts.map +1 -1
  41. package/internal/components/drag-handle/index.js +7 -3
  42. package/internal/components/drag-handle/index.js.map +1 -1
  43. package/internal/components/drag-handle/interfaces.d.ts +1 -1
  44. package/internal/components/drag-handle/interfaces.d.ts.map +1 -1
  45. package/internal/components/drag-handle/interfaces.js.map +1 -1
  46. package/internal/components/panel-resize-handle/icon.d.ts +5 -0
  47. package/internal/components/panel-resize-handle/icon.d.ts.map +1 -0
  48. package/internal/components/panel-resize-handle/icon.js +9 -0
  49. package/internal/components/panel-resize-handle/icon.js.map +1 -0
  50. package/internal/components/panel-resize-handle/index.d.ts +2 -4
  51. package/internal/components/panel-resize-handle/index.d.ts.map +1 -1
  52. package/internal/components/panel-resize-handle/index.js +5 -8
  53. package/internal/components/panel-resize-handle/index.js.map +1 -1
  54. package/internal/components/panel-resize-handle/styles.css.js +5 -2
  55. package/internal/components/panel-resize-handle/styles.scoped.css +191 -3
  56. package/internal/components/panel-resize-handle/styles.selectors.js +5 -2
  57. package/internal/components/sortable-area/index.d.ts +6 -0
  58. package/internal/components/sortable-area/index.d.ts.map +1 -0
  59. package/internal/components/{dnd-area → sortable-area}/index.js +34 -25
  60. package/internal/components/sortable-area/index.js.map +1 -0
  61. package/internal/components/sortable-area/interfaces.d.ts +42 -0
  62. package/internal/components/sortable-area/interfaces.d.ts.map +1 -0
  63. package/internal/components/sortable-area/interfaces.js.map +1 -0
  64. package/internal/components/sortable-area/keyboard-sensor/defaults.d.ts.map +1 -0
  65. package/internal/components/sortable-area/keyboard-sensor/defaults.js.map +1 -0
  66. package/internal/components/sortable-area/keyboard-sensor/index.d.ts.map +1 -0
  67. package/internal/components/sortable-area/keyboard-sensor/index.js.map +1 -0
  68. package/internal/components/sortable-area/keyboard-sensor/utilities/events.d.ts.map +1 -0
  69. package/internal/components/sortable-area/keyboard-sensor/utilities/events.js.map +1 -0
  70. package/internal/components/sortable-area/keyboard-sensor/utilities/listeners.d.ts.map +1 -0
  71. package/internal/components/sortable-area/keyboard-sensor/utilities/listeners.js.map +1 -0
  72. package/internal/components/sortable-area/keyboard-sensor/utilities/scroll.d.ts.map +1 -0
  73. package/internal/components/sortable-area/keyboard-sensor/utilities/scroll.js.map +1 -0
  74. package/internal/components/sortable-area/styles.css.js +13 -0
  75. package/internal/components/{dnd-area → sortable-area}/styles.scoped.css +17 -17
  76. package/internal/components/sortable-area/styles.selectors.js +14 -0
  77. package/internal/components/{dnd-area → sortable-area}/use-drag-and-drop-reorder.d.ts +4 -3
  78. package/internal/components/sortable-area/use-drag-and-drop-reorder.d.ts.map +1 -0
  79. package/internal/components/{dnd-area → sortable-area}/use-drag-and-drop-reorder.js +4 -4
  80. package/internal/components/sortable-area/use-drag-and-drop-reorder.js.map +1 -0
  81. package/internal/components/sortable-area/use-live-announcements.d.ts +13 -0
  82. package/internal/components/sortable-area/use-live-announcements.d.ts.map +1 -0
  83. package/internal/components/{dnd-area → sortable-area}/use-live-announcements.js +6 -6
  84. package/internal/components/sortable-area/use-live-announcements.js.map +1 -0
  85. package/internal/environment.js +1 -1
  86. package/internal/environment.json +1 -1
  87. package/internal/manifest.json +1 -1
  88. package/internal/metrics.d.ts +3 -0
  89. package/internal/metrics.d.ts.map +1 -0
  90. package/internal/metrics.js +6 -0
  91. package/internal/metrics.js.map +1 -0
  92. package/internal/plugins/api.d.ts.map +1 -1
  93. package/internal/plugins/api.js +4 -0
  94. package/internal/plugins/api.js.map +1 -1
  95. package/internal/plugins/controllers/alert-flash-content.d.ts.map +1 -1
  96. package/internal/plugins/controllers/alert-flash-content.js +2 -1
  97. package/internal/plugins/controllers/alert-flash-content.js.map +1 -1
  98. package/internal/plugins/controllers/drawers.d.ts.map +1 -1
  99. package/internal/plugins/controllers/drawers.js +7 -3
  100. package/internal/plugins/controllers/drawers.js.map +1 -1
  101. package/internal/plugins/helpers/metrics.d.ts +3 -0
  102. package/internal/plugins/helpers/metrics.d.ts.map +1 -0
  103. package/internal/plugins/helpers/metrics.js +15 -0
  104. package/internal/plugins/helpers/metrics.js.map +1 -0
  105. package/internal/plugins/helpers/use-discovered-content.d.ts.map +1 -1
  106. package/internal/plugins/helpers/use-discovered-content.js +2 -1
  107. package/internal/plugins/helpers/use-discovered-content.js.map +1 -1
  108. package/internal/utils/dom.d.ts +1 -0
  109. package/internal/utils/dom.d.ts.map +1 -1
  110. package/internal/utils/dom.js +8 -0
  111. package/internal/utils/dom.js.map +1 -1
  112. package/package.json +1 -1
  113. package/split-panel/implementation.d.ts.map +1 -1
  114. package/split-panel/implementation.js +6 -7
  115. package/split-panel/implementation.js.map +1 -1
  116. package/table/header-cell/styles.css.js +28 -26
  117. package/table/header-cell/styles.scoped.css +68 -65
  118. package/table/header-cell/styles.selectors.js +28 -26
  119. package/table/table-role/utils.d.ts.map +1 -1
  120. package/table/table-role/utils.js +4 -5
  121. package/table/table-role/utils.js.map +1 -1
  122. package/app-layout/visual-refresh-toolbar/exports.d.ts +0 -6
  123. package/app-layout/visual-refresh-toolbar/exports.d.ts.map +0 -1
  124. package/app-layout/visual-refresh-toolbar/exports.js +0 -8
  125. package/app-layout/visual-refresh-toolbar/exports.js.map +0 -1
  126. package/internal/components/dnd-area/index.d.ts +0 -4
  127. package/internal/components/dnd-area/index.d.ts.map +0 -1
  128. package/internal/components/dnd-area/index.js.map +0 -1
  129. package/internal/components/dnd-area/interfaces.d.ts +0 -39
  130. package/internal/components/dnd-area/interfaces.d.ts.map +0 -1
  131. package/internal/components/dnd-area/interfaces.js.map +0 -1
  132. package/internal/components/dnd-area/keyboard-sensor/defaults.d.ts.map +0 -1
  133. package/internal/components/dnd-area/keyboard-sensor/defaults.js.map +0 -1
  134. package/internal/components/dnd-area/keyboard-sensor/index.d.ts.map +0 -1
  135. package/internal/components/dnd-area/keyboard-sensor/index.js.map +0 -1
  136. package/internal/components/dnd-area/keyboard-sensor/utilities/events.d.ts.map +0 -1
  137. package/internal/components/dnd-area/keyboard-sensor/utilities/events.js.map +0 -1
  138. package/internal/components/dnd-area/keyboard-sensor/utilities/listeners.d.ts.map +0 -1
  139. package/internal/components/dnd-area/keyboard-sensor/utilities/listeners.js.map +0 -1
  140. package/internal/components/dnd-area/keyboard-sensor/utilities/scroll.d.ts.map +0 -1
  141. package/internal/components/dnd-area/keyboard-sensor/utilities/scroll.js.map +0 -1
  142. package/internal/components/dnd-area/styles.css.js +0 -13
  143. package/internal/components/dnd-area/styles.selectors.js +0 -14
  144. package/internal/components/dnd-area/use-drag-and-drop-reorder.d.ts.map +0 -1
  145. package/internal/components/dnd-area/use-drag-and-drop-reorder.js.map +0 -1
  146. package/internal/components/dnd-area/use-live-announcements.d.ts +0 -12
  147. package/internal/components/dnd-area/use-live-announcements.d.ts.map +0 -1
  148. package/internal/components/dnd-area/use-live-announcements.js.map +0 -1
  149. /package/internal/components/{dnd-area → sortable-area}/interfaces.js +0 -0
  150. /package/internal/components/{dnd-area → sortable-area}/keyboard-sensor/defaults.d.ts +0 -0
  151. /package/internal/components/{dnd-area → sortable-area}/keyboard-sensor/defaults.js +0 -0
  152. /package/internal/components/{dnd-area → sortable-area}/keyboard-sensor/index.d.ts +0 -0
  153. /package/internal/components/{dnd-area → sortable-area}/keyboard-sensor/index.js +0 -0
  154. /package/internal/components/{dnd-area → sortable-area}/keyboard-sensor/utilities/events.d.ts +0 -0
  155. /package/internal/components/{dnd-area → sortable-area}/keyboard-sensor/utilities/events.js +0 -0
  156. /package/internal/components/{dnd-area → sortable-area}/keyboard-sensor/utilities/listeners.d.ts +0 -0
  157. /package/internal/components/{dnd-area → sortable-area}/keyboard-sensor/utilities/listeners.js +0 -0
  158. /package/internal/components/{dnd-area → sortable-area}/keyboard-sensor/utilities/scroll.d.ts +0 -0
  159. /package/internal/components/{dnd-area → sortable-area}/keyboard-sensor/utilities/scroll.js +0 -0
@@ -5,7 +5,7 @@ import clsx from 'clsx';
5
5
  import InternalBox from '../../box/internal';
6
6
  import InternalButton from '../../button/internal';
7
7
  import { useInternalI18n } from '../../i18n/context';
8
- import { DndArea } from '../../internal/components/dnd-area';
8
+ import SortableArea from '../../internal/components/sortable-area';
9
9
  import { useUniqueId } from '../../internal/hooks/use-unique-id';
10
10
  import InternalSpaceBetween from '../../space-between/internal';
11
11
  import InternalTextFilter from '../../text-filter/internal';
@@ -46,10 +46,13 @@ export default function ContentDisplayPreference({ title, description, options,
46
46
  React.createElement(InternalBox, { margin: { top: 'm' } }, i18n('contentDisplayPreference.i18nStrings.columnFilteringNoMatchText', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.columnFilteringNoMatchText)),
47
47
  React.createElement(InternalButton, { onClick: () => setColumnFilteringText('') }, i18n('contentDisplayPreference.i18nStrings.columnFilteringClearFilterText', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.columnFilteringClearFilterText))))),
48
48
  React.createElement("ul", { className: getClassName('option-list'), "aria-describedby": descriptionId, "aria-labelledby": titleId, role: "list" },
49
- React.createElement(DndArea, { items: sortedAndFilteredOptions.map(data => ({ id: data.id, label: data.label, data })), onItemsChange: items => onChange(items.map(({ id, data }) => ({ id, visible: data.visible }))), disableReorder: columnFilteringText.trim().length > 0, renderItem: ({ ref, item, isSorting, isActive, style, className, dragHandleProps }) => {
50
- className = clsx(className, getOptionClassName(), isSorting && styles.sorting);
51
- const content = (React.createElement(ContentDisplayOption, { ref: ref, option: item.data, onToggle: onToggle, dragHandleProps: dragHandleProps }));
52
- return isActive ? (content) : (React.createElement("li", { className: className, style: style }, content));
49
+ React.createElement(SortableArea, { items: sortedAndFilteredOptions, itemDefinition: { id: item => item.id, label: item => item.label }, onItemsChange: ({ detail }) => onChange(detail.items), disableReorder: columnFilteringText.trim().length > 0, renderItem: ({ ref, item, style, className, dragHandleProps, isDragGhost }) => {
50
+ className = clsx(className, getOptionClassName());
51
+ const content = (React.createElement(ContentDisplayOption, { ref: ref, option: item, onToggle: onToggle, dragHandleProps: dragHandleProps }));
52
+ if (isDragGhost) {
53
+ return content;
54
+ }
55
+ return (React.createElement("li", { className: className, style: style }, content));
53
56
  }, i18nStrings: {
54
57
  liveAnnouncementDndStarted: i18n('contentDisplayPreference.liveAnnouncementDndStarted', liveAnnouncementDndStarted, format => (position, total) => format({ position, total })),
55
58
  liveAnnouncementDndItemReordered: i18n('contentDisplayPreference.liveAnnouncementDndItemReordered', liveAnnouncementDndItemReordered, format => (initialPosition, currentPosition, total) => format({ currentPosition, total, isInitialPosition: `${initialPosition === currentPosition}` })),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/collection-preferences/content-display/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAC7C,OAAO,cAAc,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,oBAAoB,MAAM,8BAA8B,CAAC;AAChE,OAAO,kBAAkB,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,iCAAiC,EAAE,MAAM,6BAA6B,CAAC;AAEhF,OAAO,oBAAoB,EAAE,EAAE,YAAY,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACpG,OAAO,EAA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oBACD,gCAAgC,EAAE,IAAI,CACpC,2DAA2D,EAC3D,gCAAgC,EAChC,MAAM,CAAC,EAAE,CAAC,CAAC,eAAe,EAAE,aAAa,EAAE,KAAK,EAAE,EAAE,CAClD,MAAM,CAAC;wBACL,eAAe;wBACf,aAAa;wBACb,KAAK;wBACL,iBAAiB,EAAE,GAAG,eAAe,KAAK,aAAa,EAAE;qBAC1D,CAAC,CACL;oBACD,4BAA4B,EAAE,IAAI,CAChC,uDAAuD,EACvD,4BAA4B,CAC7B;oBACD,mBAAmB,EAAE,IAAI,CAAC,8CAA8C,EAAE,mBAAmB,CAAC;oBAC9F,yBAAyB,EAAE,IAAI,CAC7B,oDAAoD,EACpD,yBAAyB,CAC1B;iBACF,GACD,CACC,CACD,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useMemo, useState } from 'react';\nimport clsx from 'clsx';\n\nimport InternalBox from '../../box/internal';\nimport InternalButton from '../../button/internal';\nimport { useInternalI18n } from '../../i18n/context';\nimport { DndArea } from '../../internal/components/dnd-area';\nimport { useUniqueId } from '../../internal/hooks/use-unique-id';\nimport InternalSpaceBetween from '../../space-between/internal';\nimport InternalTextFilter from '../../text-filter/internal';\nimport { getAnalyticsInnerContextAttribute } from '../analytics-metadata/utils';\nimport { CollectionPreferencesProps } from '../interfaces';\nimport ContentDisplayOption, { getClassName as getOptionClassName } from './content-display-option';\nimport { getFilteredOptions, getSortedOptions, OptionWithVisibility } from './utils';\n\nimport styles from '../styles.css.js';\n\nconst componentPrefix = 'content-display';\n\nconst getClassName = (suffix: string) => styles[`${componentPrefix}-${suffix}`];\n\ninterface ContentDisplayPreferenceProps extends CollectionPreferencesProps.ContentDisplayPreference {\n onChange: (value: ReadonlyArray<CollectionPreferencesProps.ContentDisplayItem>) => void;\n value?: ReadonlyArray<CollectionPreferencesProps.ContentDisplayItem>;\n}\n\nexport default function ContentDisplayPreference({\n title,\n description,\n options,\n value = options.map(({ id }) => ({\n id,\n visible: true,\n })),\n onChange,\n liveAnnouncementDndStarted,\n liveAnnouncementDndItemReordered,\n liveAnnouncementDndItemCommitted,\n liveAnnouncementDndDiscarded,\n dragHandleAriaDescription,\n dragHandleAriaLabel,\n enableColumnFiltering = false,\n i18nStrings,\n}: ContentDisplayPreferenceProps) {\n const idPrefix = useUniqueId(componentPrefix);\n const i18n = useInternalI18n('collection-preferences');\n const [columnFilteringText, setColumnFilteringText] = useState('');\n\n const titleId = `${idPrefix}-title`;\n const descriptionId = `${idPrefix}-description`;\n\n const [sortedOptions, sortedAndFilteredOptions] = useMemo(() => {\n const sorted = getSortedOptions({ options, contentDisplay: value });\n const filtered = getFilteredOptions(sorted, columnFilteringText);\n return [sorted, filtered];\n }, [columnFilteringText, options, value]);\n\n const onToggle = (option: OptionWithVisibility) => {\n // We use sortedOptions as base and not value because there might be options that\n // are not in the value yet, so they're added as non-visible after the known ones.\n onChange(sortedOptions.map(({ id, visible }) => ({ id, visible: id === option.id ? !option.visible : visible })));\n };\n\n return (\n <div className={styles[componentPrefix]} {...getAnalyticsInnerContextAttribute('contentDisplay')}>\n <h3 className={getClassName('title')} id={titleId}>\n {i18n('contentDisplayPreference.title', title)}\n </h3>\n <p className={getClassName('description')} id={descriptionId}>\n {i18n('contentDisplayPreference.description', description)}\n </p>\n\n {/* Filter input */}\n {enableColumnFiltering && (\n <div className={getClassName('text-filter')}>\n <InternalTextFilter\n filteringText={columnFilteringText}\n filteringPlaceholder={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringPlaceholder',\n i18nStrings?.columnFilteringPlaceholder\n )}\n filteringAriaLabel={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringAriaLabel',\n i18nStrings?.columnFilteringAriaLabel\n )}\n filteringClearAriaLabel={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringClearFilterText',\n i18nStrings?.columnFilteringClearFilterText\n )}\n onChange={({ detail }) => setColumnFilteringText(detail.filteringText)}\n countText={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringCountText',\n i18nStrings?.columnFilteringCountText\n ? i18nStrings?.columnFilteringCountText(sortedAndFilteredOptions.length)\n : undefined,\n format => format({ count: sortedAndFilteredOptions.length })\n )}\n />\n </div>\n )}\n\n {/* No match */}\n {sortedAndFilteredOptions.length === 0 && (\n <div className={getClassName('no-match')}>\n <InternalSpaceBetween size=\"s\" alignItems=\"center\">\n <InternalBox margin={{ top: 'm' }}>\n {i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringNoMatchText',\n i18nStrings?.columnFilteringNoMatchText\n )}\n </InternalBox>\n <InternalButton onClick={() => setColumnFilteringText('')}>\n {i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringClearFilterText',\n i18nStrings?.columnFilteringClearFilterText\n )}\n </InternalButton>\n </InternalSpaceBetween>\n </div>\n )}\n\n {/* Use explicit list role to work around Safari not announcing lists as such when list-style is set to none.\n See https://bugs.webkit.org/show_bug.cgi?id=170179 */}\n <ul\n className={getClassName('option-list')}\n aria-describedby={descriptionId}\n aria-labelledby={titleId}\n role=\"list\"\n >\n <DndArea\n items={sortedAndFilteredOptions.map(data => ({ id: data.id, label: data.label, data }))}\n onItemsChange={items => onChange(items.map(({ id, data }) => ({ id, visible: data.visible })))}\n disableReorder={columnFilteringText.trim().length > 0}\n renderItem={({ ref, item, isSorting, isActive, style, className, dragHandleProps }) => {\n className = clsx(className, getOptionClassName(), isSorting && styles.sorting);\n const content = (\n <ContentDisplayOption\n ref={ref}\n option={item.data}\n onToggle={onToggle}\n dragHandleProps={dragHandleProps}\n />\n );\n return isActive ? (\n content\n ) : (\n <li className={className} style={style}>\n {content}\n </li>\n );\n }}\n i18nStrings={{\n liveAnnouncementDndStarted: i18n(\n 'contentDisplayPreference.liveAnnouncementDndStarted',\n liveAnnouncementDndStarted,\n format => (position, total) => format({ position, total })\n ),\n liveAnnouncementDndItemReordered: i18n(\n 'contentDisplayPreference.liveAnnouncementDndItemReordered',\n liveAnnouncementDndItemReordered,\n format => (initialPosition, currentPosition, total) =>\n format({ currentPosition, total, isInitialPosition: `${initialPosition === currentPosition}` })\n ),\n liveAnnouncementDndItemCommitted: i18n(\n 'contentDisplayPreference.liveAnnouncementDndItemCommitted',\n liveAnnouncementDndItemCommitted,\n format => (initialPosition, finalPosition, total) =>\n format({\n initialPosition,\n finalPosition,\n total,\n isInitialPosition: `${initialPosition === finalPosition}`,\n })\n ),\n liveAnnouncementDndDiscarded: i18n(\n 'contentDisplayPreference.liveAnnouncementDndDiscarded',\n liveAnnouncementDndDiscarded\n ),\n dragHandleAriaLabel: i18n('contentDisplayPreference.dragHandleAriaLabel', dragHandleAriaLabel),\n dragHandleAriaDescription: i18n(\n 'contentDisplayPreference.dragHandleAriaDescription',\n dragHandleAriaDescription\n ),\n }}\n />\n </ul>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/collection-preferences/content-display/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAC7C,OAAO,cAAc,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,YAAY,MAAM,yCAAyC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,oBAAoB,MAAM,8BAA8B,CAAC;AAChE,OAAO,kBAAkB,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,iCAAiC,EAAE,MAAM,6BAA6B,CAAC;AAEhF,OAAO,oBAAoB,EAAE,EAAE,YAAY,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACpG,OAAO,EAAE,kBAAk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L,iBAAiB,EAAE,GAAG,eAAe,KAAK,aAAa,EAAE;qBAC1D,CAAC,CACL;oBACD,4BAA4B,EAAE,IAAI,CAChC,uDAAuD,EACvD,4BAA4B,CAC7B;oBACD,mBAAmB,EAAE,IAAI,CAAC,8CAA8C,EAAE,mBAAmB,CAAC;oBAC9F,yBAAyB,EAAE,IAAI,CAC7B,oDAAoD,EACpD,yBAAyB,CAC1B;iBACF,GACD,CACC,CACD,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useMemo, useState } from 'react';\nimport clsx from 'clsx';\n\nimport InternalBox from '../../box/internal';\nimport InternalButton from '../../button/internal';\nimport { useInternalI18n } from '../../i18n/context';\nimport SortableArea from '../../internal/components/sortable-area';\nimport { useUniqueId } from '../../internal/hooks/use-unique-id';\nimport InternalSpaceBetween from '../../space-between/internal';\nimport InternalTextFilter from '../../text-filter/internal';\nimport { getAnalyticsInnerContextAttribute } from '../analytics-metadata/utils';\nimport { CollectionPreferencesProps } from '../interfaces';\nimport ContentDisplayOption, { getClassName as getOptionClassName } from './content-display-option';\nimport { getFilteredOptions, getSortedOptions, OptionWithVisibility } from './utils';\n\nimport styles from '../styles.css.js';\n\nconst componentPrefix = 'content-display';\n\nconst getClassName = (suffix: string) => styles[`${componentPrefix}-${suffix}`];\n\ninterface ContentDisplayPreferenceProps extends CollectionPreferencesProps.ContentDisplayPreference {\n onChange: (value: ReadonlyArray<CollectionPreferencesProps.ContentDisplayItem>) => void;\n value?: ReadonlyArray<CollectionPreferencesProps.ContentDisplayItem>;\n}\n\nexport default function ContentDisplayPreference({\n title,\n description,\n options,\n value = options.map(({ id }) => ({\n id,\n visible: true,\n })),\n onChange,\n liveAnnouncementDndStarted,\n liveAnnouncementDndItemReordered,\n liveAnnouncementDndItemCommitted,\n liveAnnouncementDndDiscarded,\n dragHandleAriaDescription,\n dragHandleAriaLabel,\n enableColumnFiltering = false,\n i18nStrings,\n}: ContentDisplayPreferenceProps) {\n const idPrefix = useUniqueId(componentPrefix);\n const i18n = useInternalI18n('collection-preferences');\n const [columnFilteringText, setColumnFilteringText] = useState('');\n\n const titleId = `${idPrefix}-title`;\n const descriptionId = `${idPrefix}-description`;\n\n const [sortedOptions, sortedAndFilteredOptions] = useMemo(() => {\n const sorted = getSortedOptions({ options, contentDisplay: value });\n const filtered = getFilteredOptions(sorted, columnFilteringText);\n return [sorted, filtered];\n }, [columnFilteringText, options, value]);\n\n const onToggle = (option: OptionWithVisibility) => {\n // We use sortedOptions as base and not value because there might be options that\n // are not in the value yet, so they're added as non-visible after the known ones.\n onChange(sortedOptions.map(({ id, visible }) => ({ id, visible: id === option.id ? !option.visible : visible })));\n };\n\n return (\n <div className={styles[componentPrefix]} {...getAnalyticsInnerContextAttribute('contentDisplay')}>\n <h3 className={getClassName('title')} id={titleId}>\n {i18n('contentDisplayPreference.title', title)}\n </h3>\n <p className={getClassName('description')} id={descriptionId}>\n {i18n('contentDisplayPreference.description', description)}\n </p>\n\n {/* Filter input */}\n {enableColumnFiltering && (\n <div className={getClassName('text-filter')}>\n <InternalTextFilter\n filteringText={columnFilteringText}\n filteringPlaceholder={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringPlaceholder',\n i18nStrings?.columnFilteringPlaceholder\n )}\n filteringAriaLabel={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringAriaLabel',\n i18nStrings?.columnFilteringAriaLabel\n )}\n filteringClearAriaLabel={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringClearFilterText',\n i18nStrings?.columnFilteringClearFilterText\n )}\n onChange={({ detail }) => setColumnFilteringText(detail.filteringText)}\n countText={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringCountText',\n i18nStrings?.columnFilteringCountText\n ? i18nStrings?.columnFilteringCountText(sortedAndFilteredOptions.length)\n : undefined,\n format => format({ count: sortedAndFilteredOptions.length })\n )}\n />\n </div>\n )}\n\n {/* No match */}\n {sortedAndFilteredOptions.length === 0 && (\n <div className={getClassName('no-match')}>\n <InternalSpaceBetween size=\"s\" alignItems=\"center\">\n <InternalBox margin={{ top: 'm' }}>\n {i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringNoMatchText',\n i18nStrings?.columnFilteringNoMatchText\n )}\n </InternalBox>\n <InternalButton onClick={() => setColumnFilteringText('')}>\n {i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringClearFilterText',\n i18nStrings?.columnFilteringClearFilterText\n )}\n </InternalButton>\n </InternalSpaceBetween>\n </div>\n )}\n\n {/* Use explicit list role to work around Safari not announcing lists as such when list-style is set to none.\n See https://bugs.webkit.org/show_bug.cgi?id=170179 */}\n <ul\n className={getClassName('option-list')}\n aria-describedby={descriptionId}\n aria-labelledby={titleId}\n role=\"list\"\n >\n <SortableArea\n items={sortedAndFilteredOptions}\n itemDefinition={{ id: item => item.id, label: item => item.label }}\n onItemsChange={({ detail }) => onChange(detail.items)}\n disableReorder={columnFilteringText.trim().length > 0}\n renderItem={({ ref, item, style, className, dragHandleProps, isDragGhost }) => {\n className = clsx(className, getOptionClassName());\n const content = (\n <ContentDisplayOption ref={ref} option={item} onToggle={onToggle} dragHandleProps={dragHandleProps} />\n );\n if (isDragGhost) {\n return content;\n }\n return (\n <li className={className} style={style}>\n {content}\n </li>\n );\n }}\n i18nStrings={{\n liveAnnouncementDndStarted: i18n(\n 'contentDisplayPreference.liveAnnouncementDndStarted',\n liveAnnouncementDndStarted,\n format => (position, total) => format({ position, total })\n ),\n liveAnnouncementDndItemReordered: i18n(\n 'contentDisplayPreference.liveAnnouncementDndItemReordered',\n liveAnnouncementDndItemReordered,\n format => (initialPosition, currentPosition, total) =>\n format({ currentPosition, total, isInitialPosition: `${initialPosition === currentPosition}` })\n ),\n liveAnnouncementDndItemCommitted: i18n(\n 'contentDisplayPreference.liveAnnouncementDndItemCommitted',\n liveAnnouncementDndItemCommitted,\n format => (initialPosition, finalPosition, total) =>\n format({\n initialPosition,\n finalPosition,\n total,\n isInitialPosition: `${initialPosition === finalPosition}`,\n })\n ),\n liveAnnouncementDndDiscarded: i18n(\n 'contentDisplayPreference.liveAnnouncementDndDiscarded',\n liveAnnouncementDndDiscarded\n ),\n dragHandleAriaLabel: i18n('contentDisplayPreference.dragHandleAriaLabel', dragHandleAriaLabel),\n dragHandleAriaDescription: i18n(\n 'contentDisplayPreference.dragHandleAriaDescription',\n dragHandleAriaDescription\n ),\n }}\n />\n </ul>\n </div>\n );\n}\n"]}
@@ -1,36 +1,37 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "root": "awsui_root_14iqq_irvl0_189",
5
- "fit-height": "awsui_fit-height_14iqq_irvl0_222",
6
- "with-side-media": "awsui_with-side-media_14iqq_irvl0_227",
7
- "variant-default": "awsui_variant-default_14iqq_irvl0_230",
8
- "variant-stacked": "awsui_variant-stacked_14iqq_irvl0_230",
9
- "refresh": "awsui_refresh_14iqq_irvl0_238",
10
- "sticky-enabled": "awsui_sticky-enabled_14iqq_irvl0_288",
11
- "with-top-media": "awsui_with-top-media_14iqq_irvl0_300",
12
- "content-wrapper": "awsui_content-wrapper_14iqq_irvl0_305",
13
- "content-wrapper-fit-height": "awsui_content-wrapper-fit-height_14iqq_irvl0_310",
14
- "media": "awsui_media_14iqq_irvl0_317",
15
- "media-top": "awsui_media-top_14iqq_irvl0_335",
16
- "media-side": "awsui_media-side_14iqq_irvl0_340",
17
- "header": "awsui_header_14iqq_irvl0_346",
18
- "header-full-page": "awsui_header-full-page_14iqq_irvl0_351",
19
- "header-with-media": "awsui_header-with-media_14iqq_irvl0_354",
20
- "header-sticky-disabled": "awsui_header-sticky-disabled_14iqq_irvl0_360",
21
- "header-sticky-enabled": "awsui_header-sticky-enabled_14iqq_irvl0_364",
22
- "header-stuck": "awsui_header-stuck_14iqq_irvl0_370",
23
- "header-variant-cards": "awsui_header-variant-cards_14iqq_irvl0_380",
24
- "header-dynamic-height": "awsui_header-dynamic-height_14iqq_irvl0_383",
25
- "with-paddings": "awsui_with-paddings_14iqq_irvl0_389",
26
- "with-hidden-content": "awsui_with-hidden-content_14iqq_irvl0_398",
27
- "header-variant-full-page": "awsui_header-variant-full-page_14iqq_irvl0_456",
28
- "header-cover": "awsui_header-cover_14iqq_irvl0_459",
29
- "content": "awsui_content_14iqq_irvl0_305",
30
- "content-fit-height": "awsui_content-fit-height_14iqq_irvl0_487",
31
- "content-inner": "awsui_content-inner_14iqq_irvl0_493",
32
- "with-header": "awsui_with-header_14iqq_irvl0_500",
33
- "footer": "awsui_footer_14iqq_irvl0_504",
34
- "with-divider": "awsui_with-divider_14iqq_irvl0_508"
4
+ "root": "awsui_root_14iqq_96qba_189",
5
+ "fit-height": "awsui_fit-height_14iqq_96qba_222",
6
+ "with-side-media": "awsui_with-side-media_14iqq_96qba_227",
7
+ "variant-default": "awsui_variant-default_14iqq_96qba_230",
8
+ "variant-stacked": "awsui_variant-stacked_14iqq_96qba_230",
9
+ "refresh": "awsui_refresh_14iqq_96qba_238",
10
+ "sticky-enabled": "awsui_sticky-enabled_14iqq_96qba_288",
11
+ "with-top-media": "awsui_with-top-media_14iqq_96qba_300",
12
+ "content-wrapper": "awsui_content-wrapper_14iqq_96qba_305",
13
+ "content-wrapper-fit-height": "awsui_content-wrapper-fit-height_14iqq_96qba_310",
14
+ "media": "awsui_media_14iqq_96qba_317",
15
+ "media-top": "awsui_media-top_14iqq_96qba_335",
16
+ "media-side": "awsui_media-side_14iqq_96qba_340",
17
+ "header": "awsui_header_14iqq_96qba_346",
18
+ "header-full-page": "awsui_header-full-page_14iqq_96qba_351",
19
+ "header-variant-embedded": "awsui_header-variant-embedded_14iqq_96qba_354",
20
+ "header-sticky-enabled": "awsui_header-sticky-enabled_14iqq_96qba_354",
21
+ "header-with-media": "awsui_header-with-media_14iqq_96qba_357",
22
+ "header-sticky-disabled": "awsui_header-sticky-disabled_14iqq_96qba_363",
23
+ "header-stuck": "awsui_header-stuck_14iqq_96qba_373",
24
+ "header-variant-cards": "awsui_header-variant-cards_14iqq_96qba_383",
25
+ "header-dynamic-height": "awsui_header-dynamic-height_14iqq_96qba_386",
26
+ "with-paddings": "awsui_with-paddings_14iqq_96qba_392",
27
+ "with-hidden-content": "awsui_with-hidden-content_14iqq_96qba_401",
28
+ "header-variant-full-page": "awsui_header-variant-full-page_14iqq_96qba_459",
29
+ "header-cover": "awsui_header-cover_14iqq_96qba_462",
30
+ "content": "awsui_content_14iqq_96qba_305",
31
+ "content-fit-height": "awsui_content-fit-height_14iqq_96qba_490",
32
+ "content-inner": "awsui_content-inner_14iqq_96qba_496",
33
+ "with-header": "awsui_with-header_14iqq_96qba_503",
34
+ "footer": "awsui_footer_14iqq_96qba_507",
35
+ "with-divider": "awsui_with-divider_14iqq_96qba_511"
35
36
  };
36
37
 
@@ -186,7 +186,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
186
186
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
187
187
  SPDX-License-Identifier: Apache-2.0
188
188
  */
189
- .awsui_root_14iqq_irvl0_189:not(#\9) {
189
+ .awsui_root_14iqq_96qba_189:not(#\9) {
190
190
  border-collapse: separate;
191
191
  border-spacing: 0;
192
192
  box-sizing: border-box;
@@ -220,15 +220,15 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
220
220
  word-wrap: break-word;
221
221
  position: relative;
222
222
  }
223
- .awsui_root_14iqq_irvl0_189.awsui_fit-height_14iqq_irvl0_222:not(#\9) {
223
+ .awsui_root_14iqq_96qba_189.awsui_fit-height_14iqq_96qba_222:not(#\9) {
224
224
  display: flex;
225
225
  flex-direction: column;
226
226
  block-size: 100%;
227
227
  }
228
- .awsui_root_14iqq_irvl0_189.awsui_fit-height_14iqq_irvl0_222.awsui_with-side-media_14iqq_irvl0_227:not(#\9) {
228
+ .awsui_root_14iqq_96qba_189.awsui_fit-height_14iqq_96qba_222.awsui_with-side-media_14iqq_96qba_227:not(#\9) {
229
229
  flex-direction: row;
230
230
  }
231
- .awsui_root_14iqq_irvl0_189.awsui_variant-default_14iqq_irvl0_230:not(#\9), .awsui_root_14iqq_irvl0_189.awsui_variant-stacked_14iqq_irvl0_230:not(#\9) {
231
+ .awsui_root_14iqq_96qba_189.awsui_variant-default_14iqq_96qba_230:not(#\9), .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9) {
232
232
  background-color: var(--color-background-container-content-z79u4u, #ffffff);
233
233
  border-start-start-radius: var(--border-radius-container-wqv1zi, 16px);
234
234
  border-start-end-radius: var(--border-radius-container-wqv1zi, 16px);
@@ -236,11 +236,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
236
236
  border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
237
237
  box-sizing: border-box;
238
238
  }
239
- .awsui_root_14iqq_irvl0_189.awsui_variant-default_14iqq_irvl0_230.awsui_refresh_14iqq_irvl0_238:not(#\9), .awsui_root_14iqq_irvl0_189.awsui_variant-stacked_14iqq_irvl0_230.awsui_refresh_14iqq_irvl0_238:not(#\9) {
239
+ .awsui_root_14iqq_96qba_189.awsui_variant-default_14iqq_96qba_230.awsui_refresh_14iqq_96qba_238:not(#\9), .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230.awsui_refresh_14iqq_96qba_238:not(#\9) {
240
240
  border-block: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-cx07f2, #c6c6cd);
241
241
  border-inline: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-cx07f2, #c6c6cd);
242
242
  }
243
- .awsui_root_14iqq_irvl0_189.awsui_variant-default_14iqq_irvl0_230:not(#\9):not(.awsui_refresh_14iqq_irvl0_238)::before, .awsui_root_14iqq_irvl0_189.awsui_variant-stacked_14iqq_irvl0_230:not(#\9):not(.awsui_refresh_14iqq_irvl0_238)::before {
243
+ .awsui_root_14iqq_96qba_189.awsui_variant-default_14iqq_96qba_230:not(#\9):not(.awsui_refresh_14iqq_96qba_238)::before, .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9):not(.awsui_refresh_14iqq_96qba_238)::before {
244
244
  content: "";
245
245
  position: absolute;
246
246
  inset-inline-start: 0px;
@@ -258,7 +258,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
258
258
  border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
259
259
  z-index: 1;
260
260
  }
261
- .awsui_root_14iqq_irvl0_189.awsui_variant-default_14iqq_irvl0_230:not(#\9):not(.awsui_refresh_14iqq_irvl0_238)::after, .awsui_root_14iqq_irvl0_189.awsui_variant-stacked_14iqq_irvl0_230:not(#\9):not(.awsui_refresh_14iqq_irvl0_238)::after {
261
+ .awsui_root_14iqq_96qba_189.awsui_variant-default_14iqq_96qba_230:not(#\9):not(.awsui_refresh_14iqq_96qba_238)::after, .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9):not(.awsui_refresh_14iqq_96qba_238)::after {
262
262
  content: "";
263
263
  position: absolute;
264
264
  inset-inline-start: 0px;
@@ -274,144 +274,147 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
274
274
  border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
275
275
  box-shadow: var(--shadow-container-fxmdn3, 0px 0px 1px 1px #e9ebed, 0px 1px 8px 2px rgba(0, 7, 22, 0.12));
276
276
  }
277
- .awsui_root_14iqq_irvl0_189.awsui_variant-stacked_14iqq_irvl0_230:not(#\9):not(:last-child), .awsui_root_14iqq_irvl0_189.awsui_variant-stacked_14iqq_irvl0_230:not(#\9):not(:last-child)::before, .awsui_root_14iqq_irvl0_189.awsui_variant-stacked_14iqq_irvl0_230:not(#\9):not(:last-child)::after {
277
+ .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9):not(:last-child), .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9):not(:last-child)::before, .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9):not(:last-child)::after {
278
278
  border-end-end-radius: 0;
279
279
  border-end-start-radius: 0;
280
280
  border-block-end-width: 0;
281
281
  }
282
- .awsui_root_14iqq_irvl0_189.awsui_variant-stacked_14iqq_irvl0_230 + .awsui_root_14iqq_irvl0_189.awsui_variant-stacked_14iqq_irvl0_230:not(#\9), .awsui_root_14iqq_irvl0_189.awsui_variant-stacked_14iqq_irvl0_230 + .awsui_root_14iqq_irvl0_189.awsui_variant-stacked_14iqq_irvl0_230:not(#\9)::before, .awsui_root_14iqq_irvl0_189.awsui_variant-stacked_14iqq_irvl0_230 + .awsui_root_14iqq_irvl0_189.awsui_variant-stacked_14iqq_irvl0_230:not(#\9)::after {
282
+ .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230 + .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9), .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230 + .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9)::before, .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230 + .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9)::after {
283
283
  border-start-start-radius: 0;
284
284
  border-start-end-radius: 0;
285
285
  }
286
- .awsui_root_14iqq_irvl0_189.awsui_variant-stacked_14iqq_irvl0_230 + .awsui_root_14iqq_irvl0_189.awsui_variant-stacked_14iqq_irvl0_230:not(#\9):not(.awsui_refresh_14iqq_irvl0_238)::before {
286
+ .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230 + .awsui_root_14iqq_96qba_189.awsui_variant-stacked_14iqq_96qba_230:not(#\9):not(.awsui_refresh_14iqq_96qba_238)::before {
287
287
  border-block-start: var(--border-divider-section-width-1061zr, 1px) solid var(--color-border-divider-default-cx07f2, #c6c6cd);
288
288
  }
289
- .awsui_root_14iqq_irvl0_189.awsui_sticky-enabled_14iqq_irvl0_288:not(#\9):not(.awsui_refresh_14iqq_irvl0_238)::before {
289
+ .awsui_root_14iqq_96qba_189.awsui_sticky-enabled_14iqq_96qba_288:not(#\9):not(.awsui_refresh_14iqq_96qba_238)::before {
290
290
  inset-block-start: calc(-1 * var(--border-container-top-width-uugwwl, 0px));
291
291
  }
292
- .awsui_root_14iqq_irvl0_189.awsui_sticky-enabled_14iqq_irvl0_288:not(#\9):not(.awsui_refresh_14iqq_irvl0_238).awsui_variant-stacked_14iqq_irvl0_230::before {
292
+ .awsui_root_14iqq_96qba_189.awsui_sticky-enabled_14iqq_96qba_288:not(#\9):not(.awsui_refresh_14iqq_96qba_238).awsui_variant-stacked_14iqq_96qba_230::before {
293
293
  inset-block-start: calc(-1 * var(--border-divider-section-width-1061zr, 1px));
294
294
  }
295
295
 
296
- .awsui_with-side-media_14iqq_irvl0_227:not(#\9) {
296
+ .awsui_with-side-media_14iqq_96qba_227:not(#\9) {
297
297
  display: flex;
298
298
  flex-direction: row;
299
299
  }
300
300
 
301
- .awsui_with-top-media_14iqq_irvl0_300:not(#\9) {
301
+ .awsui_with-top-media_14iqq_96qba_300:not(#\9) {
302
302
  display: flex;
303
303
  flex-direction: column;
304
304
  }
305
305
 
306
- .awsui_content-wrapper_14iqq_irvl0_305:not(#\9) {
306
+ .awsui_content-wrapper_14iqq_96qba_305:not(#\9) {
307
307
  display: flex;
308
308
  flex-direction: column;
309
309
  inline-size: 100%;
310
310
  }
311
- .awsui_content-wrapper-fit-height_14iqq_irvl0_310:not(#\9) {
311
+ .awsui_content-wrapper-fit-height_14iqq_96qba_310:not(#\9) {
312
312
  block-size: 100%;
313
313
  overflow: hidden;
314
314
  border-end-start-radius: var(--border-radius-container-wqv1zi, 16px);
315
315
  border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
316
316
  }
317
317
 
318
- .awsui_media_14iqq_irvl0_317:not(#\9) {
318
+ .awsui_media_14iqq_96qba_317:not(#\9) {
319
319
  overflow: hidden;
320
320
  flex-shrink: 0;
321
321
  }
322
- .awsui_media_14iqq_irvl0_317 img:not(#\9),
323
- .awsui_media_14iqq_irvl0_317 video:not(#\9),
324
- .awsui_media_14iqq_irvl0_317 picture:not(#\9) {
322
+ .awsui_media_14iqq_96qba_317 img:not(#\9),
323
+ .awsui_media_14iqq_96qba_317 video:not(#\9),
324
+ .awsui_media_14iqq_96qba_317 picture:not(#\9) {
325
325
  inline-size: 100%;
326
326
  block-size: 100%;
327
327
  object-fit: cover;
328
328
  object-position: center;
329
329
  }
330
- .awsui_media_14iqq_irvl0_317 iframe:not(#\9) {
330
+ .awsui_media_14iqq_96qba_317 iframe:not(#\9) {
331
331
  inline-size: 100%;
332
332
  block-size: 100%;
333
333
  border-block: 0;
334
334
  border-inline: 0;
335
335
  }
336
- .awsui_media-top_14iqq_irvl0_335:not(#\9) {
336
+ .awsui_media-top_14iqq_96qba_335:not(#\9) {
337
337
  max-block-size: 66%;
338
338
  border-start-start-radius: calc(var(--border-radius-container-wqv1zi, 16px) - 1px);
339
339
  border-start-end-radius: calc(var(--border-radius-container-wqv1zi, 16px) - 1px);
340
340
  }
341
- .awsui_media-side_14iqq_irvl0_340:not(#\9) {
341
+ .awsui_media-side_14iqq_96qba_340:not(#\9) {
342
342
  max-inline-size: 66%;
343
343
  border-start-start-radius: calc(var(--border-radius-container-wqv1zi, 16px) - 1px);
344
344
  border-end-start-radius: calc(var(--border-radius-container-wqv1zi, 16px) - 1px);
345
345
  }
346
346
 
347
- .awsui_header_14iqq_irvl0_346:not(#\9) {
347
+ .awsui_header_14iqq_96qba_346:not(#\9) {
348
348
  background-color: var(--color-background-container-header-clzg6q, #ffffff);
349
349
  border-start-start-radius: var(--border-radius-container-wqv1zi, 16px);
350
350
  border-start-end-radius: var(--border-radius-container-wqv1zi, 16px);
351
351
  }
352
- .awsui_header_14iqq_irvl0_346.awsui_header-full-page_14iqq_irvl0_351:not(#\9) {
352
+ .awsui_header_14iqq_96qba_346.awsui_header-full-page_14iqq_96qba_351:not(#\9) {
353
353
  background-color: var(--color-background-layout-main-nqw91u, #ffffff);
354
354
  }
355
- .awsui_header_14iqq_irvl0_346.awsui_header-with-media_14iqq_irvl0_354:not(#\9) {
355
+ .awsui_header-variant-embedded_14iqq_96qba_354.awsui_refresh_14iqq_96qba_238:not(#\9):not(.awsui_header-sticky-enabled_14iqq_96qba_354) {
356
+ background-color: transparent;
357
+ }
358
+ .awsui_header_14iqq_96qba_346.awsui_header-with-media_14iqq_96qba_357:not(#\9) {
356
359
  background: none;
357
360
  }
358
- .awsui_header_14iqq_irvl0_346.awsui_header-with-media_14iqq_irvl0_354:not(#\9):not(:empty) {
361
+ .awsui_header_14iqq_96qba_346.awsui_header-with-media_14iqq_96qba_357:not(#\9):not(:empty) {
359
362
  border-block-end: none;
360
363
  }
361
- .awsui_header-sticky-disabled_14iqq_irvl0_360:not(#\9) {
364
+ .awsui_header-sticky-disabled_14iqq_96qba_363:not(#\9) {
362
365
  position: relative;
363
366
  z-index: 1;
364
367
  }
365
- .awsui_header-sticky-enabled_14iqq_irvl0_364:not(#\9) {
368
+ .awsui_header-sticky-enabled_14iqq_96qba_354:not(#\9) {
366
369
  inset-block-start: 0;
367
370
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
368
371
  position: sticky;
369
372
  z-index: 800;
370
373
  }
371
- .awsui_header-stuck_14iqq_irvl0_370:not(#\9) {
374
+ .awsui_header-stuck_14iqq_96qba_373:not(#\9) {
372
375
  border-start-start-radius: 0;
373
376
  border-start-end-radius: 0;
374
377
  border-end-start-radius: 0;
375
378
  border-end-end-radius: 0;
376
379
  }
377
- .awsui_header-stuck_14iqq_irvl0_370:not(#\9)::before {
380
+ .awsui_header-stuck_14iqq_96qba_373:not(#\9)::before {
378
381
  border-block: 0;
379
382
  border-inline: 0;
380
383
  }
381
- .awsui_header-stuck_14iqq_irvl0_370:not(#\9):not(.awsui_header-variant-cards_14iqq_irvl0_380) {
384
+ .awsui_header-stuck_14iqq_96qba_373:not(#\9):not(.awsui_header-variant-cards_14iqq_96qba_383) {
382
385
  box-shadow: var(--shadow-sticky-embedded-uvh5ry, 0px 2px 0px 0px #e9ebed, 0px 16px 16px -12px rgba(0, 7, 22, 0.1));
383
386
  }
384
- .awsui_header-dynamic-height_14iqq_irvl0_383.awsui_header-stuck_14iqq_irvl0_370:not(#\9) {
387
+ .awsui_header-dynamic-height_14iqq_96qba_386.awsui_header-stuck_14iqq_96qba_373:not(#\9) {
385
388
  margin-block-end: calc(var(--line-height-heading-xl-avbttk, 30px) - var(--line-height-heading-l-mmm3my, 24px));
386
389
  }
387
- .awsui_header_14iqq_irvl0_346:not(#\9):not(:empty) {
390
+ .awsui_header_14iqq_96qba_346:not(#\9):not(:empty) {
388
391
  border-block-end: var(--border-container-sticky-width-6asz33, 0px) solid var(--color-border-container-divider-p2uygo, transparent);
389
392
  }
390
- .awsui_header_14iqq_irvl0_346.awsui_with-paddings_14iqq_irvl0_389:not(#\9) {
393
+ .awsui_header_14iqq_96qba_346.awsui_with-paddings_14iqq_96qba_392:not(#\9) {
391
394
  padding-block-start: var(--space-container-header-top-5qav00, 12px);
392
395
  padding-block-end: var(--space-container-header-bottom-vj01hn, 8px);
393
396
  padding-inline: var(--space-container-horizontal-wfukh3, 20px);
394
397
  }
395
- .awsui_header_14iqq_irvl0_346.awsui_with-paddings_14iqq_irvl0_389.awsui_header-variant-cards_14iqq_irvl0_380:not(#\9) {
398
+ .awsui_header_14iqq_96qba_346.awsui_with-paddings_14iqq_96qba_392.awsui_header-variant-cards_14iqq_96qba_383:not(#\9) {
396
399
  padding-block: var(--space-container-header-top-5qav00, 12px);
397
400
  padding-inline: var(--space-container-horizontal-wfukh3, 20px);
398
401
  }
399
- .awsui_header_14iqq_irvl0_346.awsui_with-hidden-content_14iqq_irvl0_398:not(#\9) {
402
+ .awsui_header_14iqq_96qba_346.awsui_with-hidden-content_14iqq_96qba_401:not(#\9) {
400
403
  border-end-start-radius: var(--border-radius-container-wqv1zi, 16px);
401
404
  border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
402
405
  }
403
- .awsui_header-variant-cards_14iqq_irvl0_380:not(#\9) {
406
+ .awsui_header-variant-cards_14iqq_96qba_383:not(#\9) {
404
407
  border-start-start-radius: var(--border-radius-container-wqv1zi, 16px);
405
408
  border-start-end-radius: var(--border-radius-container-wqv1zi, 16px);
406
409
  border-end-start-radius: var(--border-radius-container-wqv1zi, 16px);
407
410
  border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
408
411
  box-sizing: border-box;
409
412
  }
410
- .awsui_header-variant-cards_14iqq_irvl0_380.awsui_refresh_14iqq_irvl0_238:not(#\9) {
413
+ .awsui_header-variant-cards_14iqq_96qba_383.awsui_refresh_14iqq_96qba_238:not(#\9) {
411
414
  border-block: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-cx07f2, #c6c6cd);
412
415
  border-inline: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-cx07f2, #c6c6cd);
413
416
  }
414
- .awsui_header-variant-cards_14iqq_irvl0_380:not(#\9):not(.awsui_refresh_14iqq_irvl0_238)::before {
417
+ .awsui_header-variant-cards_14iqq_96qba_383:not(#\9):not(.awsui_refresh_14iqq_96qba_238)::before {
415
418
  content: "";
416
419
  position: absolute;
417
420
  inset-inline-start: 0px;
@@ -429,7 +432,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
429
432
  border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
430
433
  z-index: 1;
431
434
  }
432
- .awsui_header-variant-cards_14iqq_irvl0_380:not(#\9):not(.awsui_refresh_14iqq_irvl0_238)::after {
435
+ .awsui_header-variant-cards_14iqq_96qba_383:not(#\9):not(.awsui_refresh_14iqq_96qba_238)::after {
433
436
  content: "";
434
437
  position: absolute;
435
438
  inset-inline-start: 0px;
@@ -445,26 +448,26 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
445
448
  border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
446
449
  box-shadow: var(--shadow-container-fxmdn3, 0px 0px 1px 1px #e9ebed, 0px 1px 8px 2px rgba(0, 7, 22, 0.12));
447
450
  }
448
- .awsui_header-variant-cards_14iqq_irvl0_380:not(#\9):not(.awsui_header-sticky-enabled_14iqq_irvl0_364) {
451
+ .awsui_header-variant-cards_14iqq_96qba_383:not(#\9):not(.awsui_header-sticky-enabled_14iqq_96qba_354) {
449
452
  position: relative;
450
453
  }
451
- .awsui_header-variant-cards_14iqq_irvl0_380.awsui_header-stuck_14iqq_irvl0_370:not(#\9)::after, .awsui_header-variant-cards_14iqq_irvl0_380.awsui_header-stuck_14iqq_irvl0_370:not(#\9)::before {
454
+ .awsui_header-variant-cards_14iqq_96qba_383.awsui_header-stuck_14iqq_96qba_373:not(#\9)::after, .awsui_header-variant-cards_14iqq_96qba_383.awsui_header-stuck_14iqq_96qba_373:not(#\9)::before {
452
455
  border-block: 0;
453
456
  border-inline: 0;
454
457
  border-start-start-radius: 0;
455
458
  border-start-end-radius: 0;
456
459
  }
457
- .awsui_header-variant-full-page_14iqq_irvl0_456.awsui_header-stuck_14iqq_irvl0_370:not(#\9) {
460
+ .awsui_header-variant-full-page_14iqq_96qba_459.awsui_header-stuck_14iqq_96qba_373:not(#\9) {
458
461
  box-shadow: none;
459
462
  }
460
- .awsui_header-variant-full-page_14iqq_irvl0_456.awsui_header-stuck_14iqq_irvl0_370 > .awsui_header-cover_14iqq_irvl0_459:not(#\9) {
463
+ .awsui_header-variant-full-page_14iqq_96qba_459.awsui_header-stuck_14iqq_96qba_373 > .awsui_header-cover_14iqq_96qba_462:not(#\9) {
461
464
  background-color: var(--color-background-layout-main-nqw91u, #ffffff);
462
465
  inline-size: 100%;
463
466
  position: absolute;
464
467
  block-size: var(--space-scaled-s-aqzyko, 12px);
465
468
  inset-block-start: calc(-1 * var(--space-scaled-s-aqzyko, 12px));
466
469
  }
467
- .awsui_header-variant-full-page_14iqq_irvl0_456.awsui_header-stuck_14iqq_irvl0_370:not(#\9)::before {
470
+ .awsui_header-variant-full-page_14iqq_96qba_459.awsui_header-stuck_14iqq_96qba_373:not(#\9)::before {
468
471
  content: "";
469
472
  position: absolute;
470
473
  pointer-events: none;
@@ -474,7 +477,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
474
477
  inset-block-start: 0;
475
478
  border-block-end: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-cx07f2, #c6c6cd);
476
479
  }
477
- .awsui_header-variant-full-page_14iqq_irvl0_456.awsui_header-stuck_14iqq_irvl0_370:not(#\9)::after {
480
+ .awsui_header-variant-full-page_14iqq_96qba_459.awsui_header-stuck_14iqq_96qba_373:not(#\9)::after {
478
481
  content: "";
479
482
  position: absolute;
480
483
  inset: 0;
@@ -482,30 +485,30 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
482
485
  clip-path: polygon(-999% 100%, 999% 100%, 999% 999%, -999% 999%);
483
486
  }
484
487
 
485
- .awsui_content_14iqq_irvl0_305:not(#\9) {
488
+ .awsui_content_14iqq_96qba_305:not(#\9) {
486
489
  flex: 1;
487
490
  }
488
- .awsui_content-fit-height_14iqq_irvl0_487:not(#\9) {
491
+ .awsui_content-fit-height_14iqq_96qba_490:not(#\9) {
489
492
  overflow: auto;
490
493
  display: flex;
491
494
  flex-direction: column;
492
495
  }
493
496
 
494
- .awsui_content-inner_14iqq_irvl0_493:not(#\9) {
497
+ .awsui_content-inner_14iqq_96qba_496:not(#\9) {
495
498
  flex: 1;
496
499
  }
497
- .awsui_content-inner_14iqq_irvl0_493.awsui_with-paddings_14iqq_irvl0_389:not(#\9) {
500
+ .awsui_content-inner_14iqq_96qba_496.awsui_with-paddings_14iqq_96qba_392:not(#\9) {
498
501
  padding-block: var(--space-scaled-l-0hpmd7, 20px);
499
502
  padding-inline: var(--space-container-horizontal-wfukh3, 20px);
500
503
  }
501
- .awsui_content-inner_14iqq_irvl0_493.awsui_with-paddings_14iqq_irvl0_389.awsui_with-header_14iqq_irvl0_500:not(#\9) {
504
+ .awsui_content-inner_14iqq_96qba_496.awsui_with-paddings_14iqq_96qba_392.awsui_with-header_14iqq_96qba_503:not(#\9) {
502
505
  padding-block-start: var(--space-container-content-top-1ae0r3, 4px);
503
506
  }
504
507
 
505
- .awsui_footer_14iqq_irvl0_504.awsui_with-paddings_14iqq_irvl0_389:not(#\9) {
508
+ .awsui_footer_14iqq_96qba_507.awsui_with-paddings_14iqq_96qba_392:not(#\9) {
506
509
  padding-block: var(--space-scaled-s-aqzyko, 12px);
507
510
  padding-inline: var(--space-container-horizontal-wfukh3, 20px);
508
511
  }
509
- .awsui_footer_14iqq_irvl0_504.awsui_with-divider_14iqq_irvl0_508:not(#\9) {
512
+ .awsui_footer_14iqq_96qba_507.awsui_with-divider_14iqq_96qba_511:not(#\9) {
510
513
  border-block-start: var(--border-divider-section-width-1061zr, 1px) solid var(--color-border-divider-default-cx07f2, #c6c6cd);
511
514
  }
@@ -2,36 +2,37 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "root": "awsui_root_14iqq_irvl0_189",
6
- "fit-height": "awsui_fit-height_14iqq_irvl0_222",
7
- "with-side-media": "awsui_with-side-media_14iqq_irvl0_227",
8
- "variant-default": "awsui_variant-default_14iqq_irvl0_230",
9
- "variant-stacked": "awsui_variant-stacked_14iqq_irvl0_230",
10
- "refresh": "awsui_refresh_14iqq_irvl0_238",
11
- "sticky-enabled": "awsui_sticky-enabled_14iqq_irvl0_288",
12
- "with-top-media": "awsui_with-top-media_14iqq_irvl0_300",
13
- "content-wrapper": "awsui_content-wrapper_14iqq_irvl0_305",
14
- "content-wrapper-fit-height": "awsui_content-wrapper-fit-height_14iqq_irvl0_310",
15
- "media": "awsui_media_14iqq_irvl0_317",
16
- "media-top": "awsui_media-top_14iqq_irvl0_335",
17
- "media-side": "awsui_media-side_14iqq_irvl0_340",
18
- "header": "awsui_header_14iqq_irvl0_346",
19
- "header-full-page": "awsui_header-full-page_14iqq_irvl0_351",
20
- "header-with-media": "awsui_header-with-media_14iqq_irvl0_354",
21
- "header-sticky-disabled": "awsui_header-sticky-disabled_14iqq_irvl0_360",
22
- "header-sticky-enabled": "awsui_header-sticky-enabled_14iqq_irvl0_364",
23
- "header-stuck": "awsui_header-stuck_14iqq_irvl0_370",
24
- "header-variant-cards": "awsui_header-variant-cards_14iqq_irvl0_380",
25
- "header-dynamic-height": "awsui_header-dynamic-height_14iqq_irvl0_383",
26
- "with-paddings": "awsui_with-paddings_14iqq_irvl0_389",
27
- "with-hidden-content": "awsui_with-hidden-content_14iqq_irvl0_398",
28
- "header-variant-full-page": "awsui_header-variant-full-page_14iqq_irvl0_456",
29
- "header-cover": "awsui_header-cover_14iqq_irvl0_459",
30
- "content": "awsui_content_14iqq_irvl0_305",
31
- "content-fit-height": "awsui_content-fit-height_14iqq_irvl0_487",
32
- "content-inner": "awsui_content-inner_14iqq_irvl0_493",
33
- "with-header": "awsui_with-header_14iqq_irvl0_500",
34
- "footer": "awsui_footer_14iqq_irvl0_504",
35
- "with-divider": "awsui_with-divider_14iqq_irvl0_508"
5
+ "root": "awsui_root_14iqq_96qba_189",
6
+ "fit-height": "awsui_fit-height_14iqq_96qba_222",
7
+ "with-side-media": "awsui_with-side-media_14iqq_96qba_227",
8
+ "variant-default": "awsui_variant-default_14iqq_96qba_230",
9
+ "variant-stacked": "awsui_variant-stacked_14iqq_96qba_230",
10
+ "refresh": "awsui_refresh_14iqq_96qba_238",
11
+ "sticky-enabled": "awsui_sticky-enabled_14iqq_96qba_288",
12
+ "with-top-media": "awsui_with-top-media_14iqq_96qba_300",
13
+ "content-wrapper": "awsui_content-wrapper_14iqq_96qba_305",
14
+ "content-wrapper-fit-height": "awsui_content-wrapper-fit-height_14iqq_96qba_310",
15
+ "media": "awsui_media_14iqq_96qba_317",
16
+ "media-top": "awsui_media-top_14iqq_96qba_335",
17
+ "media-side": "awsui_media-side_14iqq_96qba_340",
18
+ "header": "awsui_header_14iqq_96qba_346",
19
+ "header-full-page": "awsui_header-full-page_14iqq_96qba_351",
20
+ "header-variant-embedded": "awsui_header-variant-embedded_14iqq_96qba_354",
21
+ "header-sticky-enabled": "awsui_header-sticky-enabled_14iqq_96qba_354",
22
+ "header-with-media": "awsui_header-with-media_14iqq_96qba_357",
23
+ "header-sticky-disabled": "awsui_header-sticky-disabled_14iqq_96qba_363",
24
+ "header-stuck": "awsui_header-stuck_14iqq_96qba_373",
25
+ "header-variant-cards": "awsui_header-variant-cards_14iqq_96qba_383",
26
+ "header-dynamic-height": "awsui_header-dynamic-height_14iqq_96qba_386",
27
+ "with-paddings": "awsui_with-paddings_14iqq_96qba_392",
28
+ "with-hidden-content": "awsui_with-hidden-content_14iqq_96qba_401",
29
+ "header-variant-full-page": "awsui_header-variant-full-page_14iqq_96qba_459",
30
+ "header-cover": "awsui_header-cover_14iqq_96qba_462",
31
+ "content": "awsui_content_14iqq_96qba_305",
32
+ "content-fit-height": "awsui_content-fit-height_14iqq_96qba_490",
33
+ "content-inner": "awsui_content-inner_14iqq_96qba_496",
34
+ "with-header": "awsui_with-header_14iqq_96qba_503",
35
+ "footer": "awsui_footer_14iqq_96qba_507",
36
+ "with-divider": "awsui_with-divider_14iqq_96qba_511"
36
37
  };
37
38
 
@@ -1 +1 @@
1
- {"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../../../src/flashbar/internal/analytics.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAM9C,eAAO,MAAM,gBAAgB,UAAW,aAAa,CAAC,OAAO,CAAC,SAS7D,CAAC;AAEF,eAAO,MAAM,gBAAgB,eAAgB,MAAM,YAAY,OAAO,SAMrE,CAAC;AAEF,eAAO,MAAM,iBAAiB,aAAc,MAAM,SAMjD,CAAC"}
1
+ {"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../../../src/flashbar/internal/analytics.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAK9C,eAAO,MAAM,gBAAgB,UAAW,aAAa,CAAC,OAAO,CAAC,SAS7D,CAAC;AAEF,eAAO,MAAM,gBAAgB,eAAgB,MAAM,YAAY,OAAO,SAMrE,CAAC;AAEF,eAAO,MAAM,iBAAiB,aAAc,MAAM,SAMjD,CAAC"}
@@ -1,9 +1,7 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
- import { Metrics } from '@cloudscape-design/component-toolkit/internal';
4
- import { PACKAGE_SOURCE, PACKAGE_VERSION } from '../../internal/environment';
3
+ import { metrics } from '../../internal/metrics';
5
4
  import { getFlashTypeCount } from '../utils';
6
- const metrics = new Metrics(PACKAGE_SOURCE, PACKAGE_VERSION);
7
5
  const eventContext = 'csa_flashbar';
8
6
  export const sendRenderMetric = (items) => {
9
7
  const countByType = getFlashTypeCount(items);
@@ -1 +1 @@
1
- {"version":3,"file":"analytics.js","sourceRoot":"","sources":["../../../../src/flashbar/internal/analytics.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,OAAO,EAAE,MAAM,+CAA+C,CAAC;AAExE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;AAC7D,MAAM,YAAY,GAAG,cAAc,CAAC;AAEpC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAA6B,EAAE,EAAE;IAChE,MAAM,WAAW,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAE7C,OAAO,CAAC,kBAAkB,CAAC;QACzB,YAAY;QACZ,SAAS,EAAE,QAAQ;QACnB,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE;QACnC,WAAW,EAAE,WAAW;KACzB,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,UAAkB,EAAE,QAAiB,EAAE,EAAE;IACxE,OAAO,CAAC,kBAAkB,CAAC;QACzB,YAAY;QACZ,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU;QAC3C,UAAU,EAAE,UAAU,CAAC,QAAQ,EAAE;KAClC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,QAAgB,EAAE,EAAE;IACpD,OAAO,CAAC,kBAAkB,CAAC;QACzB,YAAY;QACZ,SAAS,EAAE,SAAS;QACpB,UAAU,EAAE,QAAQ;KACrB,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Metrics } from '@cloudscape-design/component-toolkit/internal';\n\nimport { PACKAGE_SOURCE, PACKAGE_VERSION } from '../../internal/environment';\nimport { FlashbarProps } from '../interfaces';\nimport { getFlashTypeCount } from '../utils';\n\nconst metrics = new Metrics(PACKAGE_SOURCE, PACKAGE_VERSION);\nconst eventContext = 'csa_flashbar';\n\nexport const sendRenderMetric = (items: FlashbarProps['items']) => {\n const countByType = getFlashTypeCount(items);\n\n metrics.sendPanoramaMetric({\n eventContext,\n eventType: 'render',\n eventValue: items.length.toString(),\n eventDetail: countByType,\n });\n};\n\nexport const sendToggleMetric = (itemsCount: number, expanded: boolean) => {\n metrics.sendPanoramaMetric({\n eventContext,\n eventType: expanded ? 'expand' : 'collapse',\n eventValue: itemsCount.toString(),\n });\n};\n\nexport const sendDismissMetric = (itemType: string) => {\n metrics.sendPanoramaMetric({\n eventContext,\n eventType: 'dismiss',\n eventValue: itemType,\n });\n};\n"]}
1
+ {"version":3,"file":"analytics.js","sourceRoot":"","sources":["../../../../src/flashbar/internal/analytics.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,MAAM,YAAY,GAAG,cAAc,CAAC;AAEpC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAA6B,EAAE,EAAE;IAChE,MAAM,WAAW,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAE7C,OAAO,CAAC,kBAAkB,CAAC;QACzB,YAAY;QACZ,SAAS,EAAE,QAAQ;QACnB,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE;QACnC,WAAW,EAAE,WAAW;KACzB,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,UAAkB,EAAE,QAAiB,EAAE,EAAE;IACxE,OAAO,CAAC,kBAAkB,CAAC;QACzB,YAAY;QACZ,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU;QAC3C,UAAU,EAAE,UAAU,CAAC,QAAQ,EAAE;KAClC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,QAAgB,EAAE,EAAE;IACpD,OAAO,CAAC,kBAAkB,CAAC;QACzB,YAAY;QACZ,SAAS,EAAE,SAAS;QACpB,UAAU,EAAE,QAAQ;KACrB,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { metrics } from '../../internal/metrics';\nimport { FlashbarProps } from '../interfaces';\nimport { getFlashTypeCount } from '../utils';\n\nconst eventContext = 'csa_flashbar';\n\nexport const sendRenderMetric = (items: FlashbarProps['items']) => {\n const countByType = getFlashTypeCount(items);\n\n metrics.sendPanoramaMetric({\n eventContext,\n eventType: 'render',\n eventValue: items.length.toString(),\n eventDetail: countByType,\n });\n};\n\nexport const sendToggleMetric = (itemsCount: number, expanded: boolean) => {\n metrics.sendPanoramaMetric({\n eventContext,\n eventType: expanded ? 'expand' : 'collapse',\n eventValue: itemsCount.toString(),\n });\n};\n\nexport const sendDismissMetric = (itemType: string) => {\n metrics.sendPanoramaMetric({\n eventContext,\n eventType: 'dismiss',\n eventValue: itemType,\n });\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/autosuggest-input/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAgE,MAAM,OAAO,CAAC;AAGrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,cAAc,EACf,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,kBAAkB,EAAgB,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,+BAA+B,EAAuB,MAAM,kCAAkC,CAAC;AACxG,OAAO,EAA8D,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACrH,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAI5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI1D,UAAU,qBACR,SAAQ,kBAAkB,EACxB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,+BAA+B,EAC/B,gBAAgB,EAChB,0BAA0B;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAClD,cAAc,CAAC,EAAE,yBAAyB,CAAC,gBAAgB,CAAC,CAAC;IAC7D,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC;CAC9B;AAED,UAAU,4BAA4B;IACpC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,mBAAoB,SAAQ,gBAAgB,CAAC,GAAG;IAC/D,KAAK,CAAC,OAAO,CAAC,EAAE,4BAA4B,GAAG,IAAI,CAAC;IACpD,IAAI,IAAI,IAAI,CAAC;IACb,KAAK,IAAI,IAAI,CAAC;CACf;AAED,QAAA,MAAM,gBAAgB,mGAmPrB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/autosuggest-input/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAgE,MAAM,OAAO,CAAC;AAGrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,cAAc,EACf,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,kBAAkB,EAAgB,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,+BAA+B,EAAuB,MAAM,kCAAkC,CAAC;AACxG,OAAO,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