@cloudscape-design/components 3.0.772 → 3.0.774

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 (218) hide show
  1. package/app-layout/drawer/index.js.map +1 -1
  2. package/app-layout/drawer/overflow-menu.d.ts +6 -2
  3. package/app-layout/drawer/overflow-menu.d.ts.map +1 -1
  4. package/app-layout/drawer/overflow-menu.js +22 -8
  5. package/app-layout/drawer/overflow-menu.js.map +1 -1
  6. package/app-layout/interfaces.d.ts +2 -1
  7. package/app-layout/interfaces.d.ts.map +1 -1
  8. package/app-layout/interfaces.js.map +1 -1
  9. package/app-layout/mobile-toolbar/index.js.map +1 -1
  10. package/app-layout/runtime-api.d.ts +4 -3
  11. package/app-layout/runtime-api.d.ts.map +1 -1
  12. package/app-layout/runtime-api.js +15 -11
  13. package/app-layout/runtime-api.js.map +1 -1
  14. package/app-layout/test-classes/styles.css.js +20 -19
  15. package/app-layout/test-classes/styles.scoped.css +23 -19
  16. package/app-layout/test-classes/styles.selectors.js +20 -19
  17. package/app-layout/utils/use-drawers.d.ts +12 -1
  18. package/app-layout/utils/use-drawers.d.ts.map +1 -1
  19. package/app-layout/utils/use-drawers.js +125 -20
  20. package/app-layout/utils/use-drawers.js.map +1 -1
  21. package/app-layout/utils/use-focus-control.d.ts +10 -0
  22. package/app-layout/utils/use-focus-control.d.ts.map +1 -1
  23. package/app-layout/utils/use-focus-control.js +60 -1
  24. package/app-layout/utils/use-focus-control.js.map +1 -1
  25. package/app-layout/utils/visibility-context.d.ts +3 -0
  26. package/app-layout/utils/visibility-context.d.ts.map +1 -0
  27. package/app-layout/utils/visibility-context.js +5 -0
  28. package/app-layout/utils/visibility-context.js.map +1 -0
  29. package/app-layout/visual-refresh/drawers.js.map +1 -1
  30. package/app-layout/visual-refresh-toolbar/compute-layout.d.ts +5 -1
  31. package/app-layout/visual-refresh-toolbar/compute-layout.d.ts.map +1 -1
  32. package/app-layout/visual-refresh-toolbar/compute-layout.js +15 -4
  33. package/app-layout/visual-refresh-toolbar/compute-layout.js.map +1 -1
  34. package/app-layout/visual-refresh-toolbar/drawer/global-drawer.d.ts +15 -0
  35. package/app-layout/visual-refresh-toolbar/drawer/global-drawer.d.ts.map +1 -0
  36. package/app-layout/visual-refresh-toolbar/drawer/global-drawer.js +71 -0
  37. package/app-layout/visual-refresh-toolbar/drawer/global-drawer.js.map +1 -0
  38. package/app-layout/visual-refresh-toolbar/drawer/global-drawers.d.ts +6 -1
  39. package/app-layout/visual-refresh-toolbar/drawer/global-drawers.d.ts.map +1 -1
  40. package/app-layout/visual-refresh-toolbar/drawer/global-drawers.js +15 -4
  41. package/app-layout/visual-refresh-toolbar/drawer/global-drawers.js.map +1 -1
  42. package/app-layout/visual-refresh-toolbar/drawer/local-drawer.d.ts.map +1 -1
  43. package/app-layout/visual-refresh-toolbar/drawer/local-drawer.js +35 -23
  44. package/app-layout/visual-refresh-toolbar/drawer/local-drawer.js.map +1 -1
  45. package/app-layout/visual-refresh-toolbar/drawer/styles.css.js +10 -6
  46. package/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +28 -6
  47. package/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +10 -6
  48. package/app-layout/visual-refresh-toolbar/index.d.ts.map +1 -1
  49. package/app-layout/visual-refresh-toolbar/index.js +60 -6
  50. package/app-layout/visual-refresh-toolbar/index.js.map +1 -1
  51. package/app-layout/visual-refresh-toolbar/interfaces.d.ts +10 -1
  52. package/app-layout/visual-refresh-toolbar/interfaces.d.ts.map +1 -1
  53. package/app-layout/visual-refresh-toolbar/interfaces.js.map +1 -1
  54. package/app-layout/visual-refresh-toolbar/skeleton/index.d.ts +3 -1
  55. package/app-layout/visual-refresh-toolbar/skeleton/index.d.ts.map +1 -1
  56. package/app-layout/visual-refresh-toolbar/skeleton/index.js +3 -2
  57. package/app-layout/visual-refresh-toolbar/skeleton/index.js.map +1 -1
  58. package/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +17 -16
  59. package/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +50 -32
  60. package/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +17 -16
  61. package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.d.ts +6 -2
  62. package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.d.ts.map +1 -1
  63. package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js +34 -10
  64. package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js.map +1 -1
  65. package/app-layout/visual-refresh-toolbar/toolbar/index.d.ts +5 -1
  66. package/app-layout/visual-refresh-toolbar/toolbar/index.d.ts.map +1 -1
  67. package/app-layout/visual-refresh-toolbar/toolbar/index.js +17 -13
  68. package/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
  69. package/collection-preferences/analytics-metadata/interfaces.d.ts +43 -0
  70. package/collection-preferences/analytics-metadata/interfaces.d.ts.map +1 -0
  71. package/collection-preferences/analytics-metadata/interfaces.js +4 -0
  72. package/collection-preferences/analytics-metadata/interfaces.js.map +1 -0
  73. package/collection-preferences/analytics-metadata/styles.css.js +6 -0
  74. package/collection-preferences/analytics-metadata/styles.scoped.css +7 -0
  75. package/collection-preferences/analytics-metadata/styles.selectors.js +7 -0
  76. package/collection-preferences/analytics-metadata/utils.d.ts +9 -0
  77. package/collection-preferences/analytics-metadata/utils.d.ts.map +1 -0
  78. package/collection-preferences/analytics-metadata/utils.js +48 -0
  79. package/collection-preferences/analytics-metadata/utils.js.map +1 -0
  80. package/collection-preferences/content-display/content-display-option.d.ts +1 -0
  81. package/collection-preferences/content-display/content-display-option.d.ts.map +1 -1
  82. package/collection-preferences/content-display/content-display-option.js +2 -2
  83. package/collection-preferences/content-display/content-display-option.js.map +1 -1
  84. package/collection-preferences/content-display/draggable-option.d.ts.map +1 -1
  85. package/collection-preferences/content-display/draggable-option.js +2 -2
  86. package/collection-preferences/content-display/draggable-option.js.map +1 -1
  87. package/collection-preferences/content-display/index.d.ts +1 -1
  88. package/collection-preferences/content-display/index.d.ts.map +1 -1
  89. package/collection-preferences/content-display/index.js +21 -7
  90. package/collection-preferences/content-display/index.js.map +1 -1
  91. package/collection-preferences/content-display/styles.css.js +13 -11
  92. package/collection-preferences/content-display/styles.scoped.css +19 -17
  93. package/collection-preferences/content-display/styles.selectors.js +13 -11
  94. package/collection-preferences/index.d.ts.map +1 -1
  95. package/collection-preferences/index.js +21 -15
  96. package/collection-preferences/index.js.map +1 -1
  97. package/collection-preferences/interfaces.d.ts +29 -0
  98. package/collection-preferences/interfaces.d.ts.map +1 -1
  99. package/collection-preferences/interfaces.js.map +1 -1
  100. package/collection-preferences/styles.css.js +39 -37
  101. package/collection-preferences/styles.scoped.css +46 -44
  102. package/collection-preferences/styles.selectors.js +39 -37
  103. package/collection-preferences/utils.d.ts.map +1 -1
  104. package/collection-preferences/utils.js +12 -13
  105. package/collection-preferences/utils.js.map +1 -1
  106. package/collection-preferences/visible-content.d.ts.map +1 -1
  107. package/collection-preferences/visible-content.js +2 -1
  108. package/collection-preferences/visible-content.js.map +1 -1
  109. package/date-range-picker/index.d.ts.map +1 -1
  110. package/date-range-picker/index.js +9 -10
  111. package/date-range-picker/index.js.map +1 -1
  112. package/date-range-picker/styles.css.js +38 -39
  113. package/date-range-picker/styles.scoped.css +47 -51
  114. package/date-range-picker/styles.selectors.js +38 -39
  115. package/flashbar/styles.css.js +50 -50
  116. package/flashbar/styles.scoped.css +156 -149
  117. package/flashbar/styles.selectors.js +50 -50
  118. package/i18n/messages/all.all.js +1 -1
  119. package/i18n/messages/all.all.json +1 -1
  120. package/i18n/messages/all.ar.js +1 -1
  121. package/i18n/messages/all.ar.json +1 -1
  122. package/i18n/messages/all.de.js +1 -1
  123. package/i18n/messages/all.de.json +1 -1
  124. package/i18n/messages/all.en-GB.js +1 -1
  125. package/i18n/messages/all.en-GB.json +1 -1
  126. package/i18n/messages/all.en.js +1 -1
  127. package/i18n/messages/all.en.json +1 -1
  128. package/i18n/messages/all.es.js +1 -1
  129. package/i18n/messages/all.es.json +1 -1
  130. package/i18n/messages/all.fr.js +1 -1
  131. package/i18n/messages/all.fr.json +1 -1
  132. package/i18n/messages/all.id.js +1 -1
  133. package/i18n/messages/all.id.json +1 -1
  134. package/i18n/messages/all.it.js +1 -1
  135. package/i18n/messages/all.it.json +1 -1
  136. package/i18n/messages/all.ja.js +1 -1
  137. package/i18n/messages/all.ja.json +1 -1
  138. package/i18n/messages/all.ko.js +1 -1
  139. package/i18n/messages/all.ko.json +1 -1
  140. package/i18n/messages/all.pt-BR.js +1 -1
  141. package/i18n/messages/all.pt-BR.json +1 -1
  142. package/i18n/messages/all.tr.js +1 -1
  143. package/i18n/messages/all.tr.json +1 -1
  144. package/i18n/messages/all.zh-CN.js +1 -1
  145. package/i18n/messages/all.zh-CN.json +1 -1
  146. package/i18n/messages/all.zh-TW.js +1 -1
  147. package/i18n/messages/all.zh-TW.json +1 -1
  148. package/i18n/messages-types.d.ts +7 -0
  149. package/i18n/messages-types.d.ts.map +1 -1
  150. package/i18n/messages-types.js.map +1 -1
  151. package/internal/analytics/interfaces.d.ts +1 -0
  152. package/internal/analytics/interfaces.d.ts.map +1 -1
  153. package/internal/analytics/interfaces.js.map +1 -1
  154. package/internal/components/drag-handle/index.d.ts +2 -1
  155. package/internal/components/drag-handle/index.d.ts.map +1 -1
  156. package/internal/components/drag-handle/index.js +3 -3
  157. package/internal/components/drag-handle/index.js.map +1 -1
  158. package/internal/components/drag-handle/styles.css.js +2 -1
  159. package/internal/components/drag-handle/styles.scoped.css +6 -2
  160. package/internal/components/drag-handle/styles.selectors.js +2 -1
  161. package/internal/environment.js +1 -1
  162. package/internal/environment.json +1 -1
  163. package/internal/hooks/use-component-analytics/index.d.ts +7 -1
  164. package/internal/hooks/use-component-analytics/index.d.ts.map +1 -1
  165. package/internal/hooks/use-component-analytics/index.js +21 -4
  166. package/internal/hooks/use-component-analytics/index.js.map +1 -1
  167. package/internal/manifest.json +1 -1
  168. package/internal/plugins/controllers/drawers.d.ts +19 -2
  169. package/internal/plugins/controllers/drawers.d.ts.map +1 -1
  170. package/internal/plugins/controllers/drawers.js +34 -2
  171. package/internal/plugins/controllers/drawers.js.map +1 -1
  172. package/internal/plugins/helpers/runtime-content-wrapper.d.ts +4 -2
  173. package/internal/plugins/helpers/runtime-content-wrapper.d.ts.map +1 -1
  174. package/internal/plugins/helpers/runtime-content-wrapper.js +19 -4
  175. package/internal/plugins/helpers/runtime-content-wrapper.js.map +1 -1
  176. package/modal/internal.d.ts +1 -0
  177. package/modal/internal.d.ts.map +1 -1
  178. package/modal/internal.js +2 -2
  179. package/modal/internal.js.map +1 -1
  180. package/package.json +1 -1
  181. package/table/internal.d.ts.map +1 -1
  182. package/table/internal.js +2 -2
  183. package/table/internal.js.map +1 -1
  184. package/test-utils/dom/collection-preferences/content-display-preference.d.ts +9 -0
  185. package/test-utils/dom/collection-preferences/content-display-preference.js +13 -0
  186. package/test-utils/dom/collection-preferences/content-display-preference.js.map +1 -1
  187. package/test-utils/selectors/collection-preferences/content-display-preference.d.ts +9 -0
  188. package/test-utils/selectors/collection-preferences/content-display-preference.js +13 -0
  189. package/test-utils/selectors/collection-preferences/content-display-preference.js.map +1 -1
  190. package/test-utils/tsconfig.tsbuildinfo +1 -1
  191. package/wizard/analytics-metadata/interfaces.d.ts +35 -0
  192. package/wizard/analytics-metadata/interfaces.d.ts.map +1 -0
  193. package/wizard/analytics-metadata/interfaces.js +4 -0
  194. package/wizard/analytics-metadata/interfaces.js.map +1 -0
  195. package/wizard/analytics-metadata/styles.css.js +6 -0
  196. package/wizard/analytics-metadata/styles.scoped.css +7 -0
  197. package/wizard/analytics-metadata/styles.selectors.js +7 -0
  198. package/wizard/analytics-metadata/utils.d.ts +7 -0
  199. package/wizard/analytics-metadata/utils.d.ts.map +1 -0
  200. package/wizard/analytics-metadata/utils.js +14 -0
  201. package/wizard/analytics-metadata/utils.js.map +1 -0
  202. package/wizard/index.d.ts.map +1 -1
  203. package/wizard/index.js +1 -1
  204. package/wizard/index.js.map +1 -1
  205. package/wizard/internal.d.ts +4 -2
  206. package/wizard/internal.d.ts.map +1 -1
  207. package/wizard/internal.js +14 -3
  208. package/wizard/internal.js.map +1 -1
  209. package/wizard/wizard-actions.d.ts +4 -1
  210. package/wizard/wizard-actions.d.ts.map +1 -1
  211. package/wizard/wizard-actions.js +9 -5
  212. package/wizard/wizard-actions.js.map +1 -1
  213. package/wizard/wizard-form.d.ts.map +1 -1
  214. package/wizard/wizard-form.js +1 -1
  215. package/wizard/wizard-form.js.map +1 -1
  216. package/wizard/wizard-navigation.d.ts.map +1 -1
  217. package/wizard/wizard-navigation.js +12 -6
  218. package/wizard/wizard-navigation.js.map +1 -1
@@ -4,6 +4,7 @@ import { __rest } from "tslib";
4
4
  import React, { useContext, useEffect, useRef, useState } from 'react';
5
5
  import clsx from 'clsx';
6
6
  import { warnOnce } from '@cloudscape-design/component-toolkit/internal';
7
+ import { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';
7
8
  import InternalBox from '../box/internal';
8
9
  import { InternalButton } from '../button/internal';
9
10
  import { useInternalI18n } from '../i18n/context';
@@ -12,12 +13,15 @@ import { CollectionPreferencesMetadata } from '../internal/context/collection-pr
12
13
  import { fireNonCancelableEvent } from '../internal/events';
13
14
  import checkControlled from '../internal/hooks/check-controlled';
14
15
  import useBaseComponent from '../internal/hooks/use-base-component';
16
+ import { useUniqueId } from '../internal/hooks/use-unique-id';
15
17
  import { applyDisplayName } from '../internal/utils/apply-display-name';
16
18
  import InternalModal from '../modal/internal';
17
19
  import InternalSpaceBetween from '../space-between/internal';
20
+ import { getComponentAnalyticsMetadata } from './analytics-metadata/utils';
18
21
  import ContentDisplayPreference from './content-display';
19
22
  import { ContentDensityPreference, copyPreferences, CustomPreference, mergePreferences, ModalContentLayout, PageSizePreference, StickyColumnsPreference, StripedRowsPreference, WrapLinesPreference, } from './utils';
20
23
  import VisibleContentPreference from './visible-content';
24
+ import analyticsSelectors from './analytics-metadata/styles.css.js';
21
25
  import styles from './styles.css.js';
22
26
  const componentName = 'CollectionPreferences';
23
27
  export default function CollectionPreferences(_a) {
@@ -62,22 +66,24 @@ export default function CollectionPreferences(_a) {
62
66
  if (visibleContentPreference && contentDisplayPreference) {
63
67
  warnOnce(componentName, 'You provided both `visibleContentPreference` and `contentDisplayPreference` props. `visibleContentPreference` will be ignored and only `contentDisplayPreference` will be rendered.');
64
68
  }
69
+ const referrerId = useUniqueId();
65
70
  return (React.createElement("div", Object.assign({}, baseProps, { className: clsx(baseProps.className, styles.root), ref: __internalRootRef }),
66
- React.createElement(InternalButton, { ref: triggerRef, className: styles['trigger-button'], disabled: disabled, ariaLabel: i18n('title', title), onClick: () => {
67
- setTemporaryPreferences(copyPreferences(preferences || {}));
68
- setModalVisible(true);
69
- }, variant: "icon", iconName: "settings", formAction: "none" }),
70
- !disabled && modalVisible && (React.createElement(InternalModal, { className: styles['modal-root'], visible: true, getModalRoot: getModalRoot, removeModalRoot: removeModalRoot, header: i18n('title', title), footer: React.createElement(InternalBox, { float: "right" },
71
- React.createElement(InternalSpaceBetween, { direction: "horizontal", size: "xs" },
72
- React.createElement(InternalButton, { className: styles['cancel-button'], variant: "link", formAction: "none", onClick: onCancelListener }, i18n('cancelLabel', cancelLabel)),
73
- React.createElement(InternalButton, { className: styles['confirm-button'], variant: "primary", formAction: "none", onClick: onConfirmListener }, i18n('confirmLabel', confirmLabel)))), closeAriaLabel: cancelLabel, size: hasContentOnTheLeft && hasContentOnTheRight ? 'large' : 'medium', onDismiss: onCancelListener },
74
- React.createElement(ModalContentLayout, { left: hasContentOnTheLeft && (React.createElement(InternalSpaceBetween, { size: "l" },
75
- pageSizePreference && (React.createElement(PageSizePreference, Object.assign({ value: temporaryPreferences.pageSize }, pageSizePreference, { onChange: pageSize => onChange({ pageSize }) }))),
76
- wrapLinesPreference && (React.createElement(WrapLinesPreference, Object.assign({ value: temporaryPreferences.wrapLines }, wrapLinesPreference, { onChange: wrapLines => onChange({ wrapLines }) }))),
77
- stripedRowsPreference && (React.createElement(StripedRowsPreference, Object.assign({ value: temporaryPreferences.stripedRows }, stripedRowsPreference, { onChange: stripedRows => onChange({ stripedRows }) }))),
78
- contentDensityPreference && (React.createElement(ContentDensityPreference, Object.assign({ value: temporaryPreferences.contentDensity }, contentDensityPreference, { onChange: contentDensity => onChange({ contentDensity }) }))),
79
- stickyColumnsPreference && (React.createElement(StickyColumnsPreference, Object.assign({ value: temporaryPreferences.stickyColumns }, stickyColumnsPreference, { onChange: stickyColumns => onChange({ stickyColumns }) }))),
80
- customPreference && (React.createElement(CustomPreference, { value: temporaryPreferences.custom, customPreference: customPreference, onChange: custom => onChange({ custom }) })))), right: contentDisplayPreference ? (React.createElement(ContentDisplayPreference, Object.assign({}, contentDisplayPreference, { value: temporaryPreferences.contentDisplay, onChange: contentDisplay => onChange({ contentDisplay }) }))) : (visibleContentPreference && (React.createElement(VisibleContentPreference, Object.assign({ value: temporaryPreferences.visibleContent }, visibleContentPreference, { onChange: visibleItems => onChange({ visibleContent: visibleItems }) })))) })))));
71
+ React.createElement("div", Object.assign({ id: referrerId }, getAnalyticsMetadataAttribute({ component: getComponentAnalyticsMetadata(disabled, preferences) })),
72
+ React.createElement(InternalButton, { ref: triggerRef, className: clsx(styles['trigger-button'], analyticsSelectors['trigger-button']), disabled: disabled, ariaLabel: i18n('title', title), onClick: () => {
73
+ setTemporaryPreferences(copyPreferences(preferences || {}));
74
+ setModalVisible(true);
75
+ }, variant: "icon", iconName: "settings", formAction: "none", analyticsAction: "open" }),
76
+ !disabled && modalVisible && (React.createElement(InternalModal, { className: styles['modal-root'], visible: true, getModalRoot: getModalRoot, removeModalRoot: removeModalRoot, header: i18n('title', title), referrerId: referrerId, footer: React.createElement(InternalBox, { float: "right" },
77
+ React.createElement(InternalSpaceBetween, { direction: "horizontal", size: "xs" },
78
+ React.createElement(InternalButton, { className: styles['cancel-button'], variant: "link", formAction: "none", onClick: onCancelListener, analyticsAction: "cancel" }, i18n('cancelLabel', cancelLabel)),
79
+ React.createElement(InternalButton, { className: styles['confirm-button'], variant: "primary", formAction: "none", onClick: onConfirmListener, analyticsAction: "confirm" }, i18n('confirmLabel', confirmLabel)))), closeAriaLabel: cancelLabel, size: hasContentOnTheLeft && hasContentOnTheRight ? 'large' : 'medium', onDismiss: onCancelListener },
80
+ React.createElement(ModalContentLayout, { left: hasContentOnTheLeft && (React.createElement(InternalSpaceBetween, { size: "l" },
81
+ pageSizePreference && (React.createElement(PageSizePreference, Object.assign({ value: temporaryPreferences.pageSize }, pageSizePreference, { onChange: pageSize => onChange({ pageSize }) }))),
82
+ wrapLinesPreference && (React.createElement(WrapLinesPreference, Object.assign({ value: temporaryPreferences.wrapLines }, wrapLinesPreference, { onChange: wrapLines => onChange({ wrapLines }) }))),
83
+ stripedRowsPreference && (React.createElement(StripedRowsPreference, Object.assign({ value: temporaryPreferences.stripedRows }, stripedRowsPreference, { onChange: stripedRows => onChange({ stripedRows }) }))),
84
+ contentDensityPreference && (React.createElement(ContentDensityPreference, Object.assign({ value: temporaryPreferences.contentDensity }, contentDensityPreference, { onChange: contentDensity => onChange({ contentDensity }) }))),
85
+ stickyColumnsPreference && (React.createElement(StickyColumnsPreference, Object.assign({ value: temporaryPreferences.stickyColumns }, stickyColumnsPreference, { onChange: stickyColumns => onChange({ stickyColumns }) }))),
86
+ customPreference && (React.createElement(CustomPreference, { value: temporaryPreferences.custom, customPreference: customPreference, onChange: custom => onChange({ custom }) })))), right: contentDisplayPreference ? (React.createElement(ContentDisplayPreference, Object.assign({}, contentDisplayPreference, { value: temporaryPreferences.contentDisplay, onChange: contentDisplay => onChange({ contentDisplay }) }))) : (visibleContentPreference && (React.createElement(VisibleContentPreference, Object.assign({ value: temporaryPreferences.visibleContent }, visibleContentPreference, { onChange: visibleItems => onChange({ visibleContent: visibleItems }) })))) }))))));
81
87
  }
82
88
  applyDisplayName(CollectionPreferences, componentName);
83
89
  //# sourceMappingURL=index.js.map
@@ -1 +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CACzB,oBAAC,wBAAwB,oBACnB,wBAAwB,IAC5B,KAAK,EAAE,oBAAoB,CAAC,cAAc,EAC1C,QAAQ,EAAE,cAAc,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAC,IACxD,CACH,CAAC,CAAC,CAAC,CACF,wBAAwB,IAAI,CAC1B,oBAAC,wBAAwB,kBACvB,KAAK,EAAE,oBAAoB,CAAC,cAAc,IACtC,wBAAwB,IAC5B,QAAQ,EAAE,YAAY,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC,IACpE,CACH,CACF,GAEH,CACY,CACjB,CACG,CACP,CAAC;AACJ,CAAC;AAED,gBAAgB,CAAC,qBAAqB,EAAE,aAAa,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useContext, useEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport InternalBox from '../box/internal';\nimport { ButtonProps } from '../button/interfaces';\nimport { InternalButton } from '../button/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { getBaseProps } from '../internal/base-component';\nimport { CollectionPreferencesMetadata } from '../internal/context/collection-preferences-metadata-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport checkControlled from '../internal/hooks/check-controlled';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport InternalModal from '../modal/internal';\nimport InternalSpaceBetween from '../space-between/internal';\nimport ContentDisplayPreference from './content-display';\nimport { CollectionPreferencesProps } from './interfaces';\nimport {\n ContentDensityPreference,\n copyPreferences,\n CustomPreference,\n mergePreferences,\n ModalContentLayout,\n PageSizePreference,\n StickyColumnsPreference,\n StripedRowsPreference,\n WrapLinesPreference,\n} from './utils';\nimport VisibleContentPreference from './visible-content';\n\nimport styles from './styles.css.js';\n\nexport { CollectionPreferencesProps };\n\nconst componentName = 'CollectionPreferences';\n\nexport default function CollectionPreferences({\n title,\n confirmLabel,\n cancelLabel,\n disabled = false,\n onConfirm,\n onCancel,\n visibleContentPreference,\n contentDisplayPreference,\n pageSizePreference,\n wrapLinesPreference,\n stripedRowsPreference,\n contentDensityPreference,\n stickyColumnsPreference,\n\n preferences,\n customPreference,\n getModalRoot,\n removeModalRoot,\n ...rest\n}: CollectionPreferencesProps) {\n const parentMetadata = useContext(CollectionPreferencesMetadata);\n const { __internalRootRef } = useBaseComponent('CollectionPreferences', {\n props: {},\n metadata: {\n ...parentMetadata,\n hasStripedRowsPreference: !!stripedRowsPreference,\n hasVisibleContentPreference: !!visibleContentPreference,\n hasContentDisplayPreference: !!contentDisplayPreference,\n hasContentDensityPreference: !!contentDensityPreference,\n hasStickyColumnsPreference: !!stickyColumnsPreference,\n },\n });\n checkControlled('CollectionPreferences', 'preferences', preferences, 'onConfirm', onConfirm);\n\n const i18n = useInternalI18n('collection-preferences');\n const baseProps = getBaseProps(rest);\n const [modalVisible, setModalVisible] = useState(false);\n const [temporaryPreferences, setTemporaryPreferences] = useState(copyPreferences(preferences || {}));\n const triggerRef = useRef<ButtonProps.Ref>(null);\n const dialogPreviouslyOpen = useRef(false);\n\n useEffect(() => {\n if (!modalVisible) {\n dialogPreviouslyOpen.current && triggerRef.current && triggerRef.current.focus();\n } else {\n dialogPreviouslyOpen.current = true;\n }\n }, [modalVisible]);\n\n const onConfirmListener = () => {\n setModalVisible(false);\n fireNonCancelableEvent(onConfirm, temporaryPreferences);\n };\n\n const onCancelListener = () => {\n fireNonCancelableEvent(onCancel, {});\n setModalVisible(false);\n setTemporaryPreferences(copyPreferences(preferences || {}));\n };\n\n const hasContentOnTheLeft = !!(\n pageSizePreference ||\n wrapLinesPreference ||\n stripedRowsPreference ||\n contentDensityPreference ||\n stickyColumnsPreference ||\n customPreference\n );\n const hasContentOnTheRight = !!(visibleContentPreference || contentDisplayPreference);\n\n const onChange = (changedPreferences: CollectionPreferencesProps.Preferences) =>\n setTemporaryPreferences(mergePreferences(changedPreferences, temporaryPreferences));\n\n if (visibleContentPreference && contentDisplayPreference) {\n warnOnce(\n componentName,\n 'You provided both `visibleContentPreference` and `contentDisplayPreference` props. `visibleContentPreference` will be ignored and only `contentDisplayPreference` will be rendered.'\n );\n }\n\n return (\n <div {...baseProps} className={clsx(baseProps.className, styles.root)} ref={__internalRootRef}>\n <InternalButton\n ref={triggerRef}\n className={styles['trigger-button']}\n disabled={disabled}\n ariaLabel={i18n('title', title)}\n onClick={() => {\n setTemporaryPreferences(copyPreferences(preferences || {}));\n setModalVisible(true);\n }}\n variant=\"icon\"\n iconName=\"settings\"\n formAction=\"none\"\n />\n {!disabled && modalVisible && (\n <InternalModal\n className={styles['modal-root']}\n visible={true}\n getModalRoot={getModalRoot}\n removeModalRoot={removeModalRoot}\n header={i18n('title', title)}\n footer={\n <InternalBox float=\"right\">\n <InternalSpaceBetween direction=\"horizontal\" size=\"xs\">\n <InternalButton\n className={styles['cancel-button']}\n variant=\"link\"\n formAction=\"none\"\n onClick={onCancelListener}\n >\n {i18n('cancelLabel', cancelLabel)}\n </InternalButton>\n <InternalButton\n className={styles['confirm-button']}\n variant=\"primary\"\n formAction=\"none\"\n onClick={onConfirmListener}\n >\n {i18n('confirmLabel', confirmLabel)}\n </InternalButton>\n </InternalSpaceBetween>\n </InternalBox>\n }\n closeAriaLabel={cancelLabel}\n size={hasContentOnTheLeft && hasContentOnTheRight ? 'large' : 'medium'}\n onDismiss={onCancelListener}\n >\n <ModalContentLayout\n left={\n hasContentOnTheLeft && (\n <InternalSpaceBetween size=\"l\">\n {pageSizePreference && (\n <PageSizePreference\n value={temporaryPreferences.pageSize}\n {...pageSizePreference}\n onChange={pageSize => onChange({ pageSize })}\n />\n )}\n {wrapLinesPreference && (\n <WrapLinesPreference\n value={temporaryPreferences.wrapLines}\n {...wrapLinesPreference}\n onChange={wrapLines => onChange({ wrapLines })}\n />\n )}\n {stripedRowsPreference && (\n <StripedRowsPreference\n value={temporaryPreferences.stripedRows}\n {...stripedRowsPreference}\n onChange={stripedRows => onChange({ stripedRows })}\n />\n )}\n {contentDensityPreference && (\n <ContentDensityPreference\n value={temporaryPreferences.contentDensity}\n {...contentDensityPreference}\n onChange={contentDensity => onChange({ contentDensity })}\n />\n )}\n {stickyColumnsPreference && (\n <StickyColumnsPreference\n value={temporaryPreferences.stickyColumns}\n {...stickyColumnsPreference}\n onChange={stickyColumns => onChange({ stickyColumns })}\n />\n )}\n {customPreference && (\n <CustomPreference\n value={temporaryPreferences.custom}\n customPreference={customPreference}\n onChange={custom => onChange({ custom })}\n />\n )}\n </InternalSpaceBetween>\n )\n }\n right={\n contentDisplayPreference ? (\n <ContentDisplayPreference\n {...contentDisplayPreference}\n value={temporaryPreferences.contentDisplay}\n onChange={contentDisplay => onChange({ contentDisplay })}\n />\n ) : (\n visibleContentPreference && (\n <VisibleContentPreference\n value={temporaryPreferences.visibleContent}\n {...visibleContentPreference}\n onChange={visibleItems => onChange({ visibleContent: visibleItems })}\n />\n )\n )\n }\n />\n </InternalModal>\n )}\n </div>\n );\n}\n\napplyDisplayName(CollectionPreferences, componentName);\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/collection-preferences/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACvE,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AACzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;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EACH,wBAAwB,CAAC,CAAC,CAAC,CACzB,oBAAC,wBAAwB,oBACnB,wBAAwB,IAC5B,KAAK,EAAE,oBAAoB,CAAC,cAAc,EAC1C,QAAQ,EAAE,cAAc,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAC,IACxD,CACH,CAAC,CAAC,CAAC,CACF,wBAAwB,IAAI,CAC1B,oBAAC,wBAAwB,kBACvB,KAAK,EAAE,oBAAoB,CAAC,cAAc,IACtC,wBAAwB,IAC5B,QAAQ,EAAE,YAAY,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC,IACpE,CACH,CACF,GAEH,CACY,CACjB,CACG,CACF,CACP,CAAC;AACJ,CAAC;AAED,gBAAgB,CAAC,qBAAqB,EAAE,aAAa,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useContext, useEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalBox from '../box/internal';\nimport { ButtonProps } from '../button/interfaces';\nimport { InternalButton } from '../button/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { getBaseProps } from '../internal/base-component';\nimport { CollectionPreferencesMetadata } from '../internal/context/collection-preferences-metadata-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport checkControlled from '../internal/hooks/check-controlled';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport InternalModal from '../modal/internal';\nimport InternalSpaceBetween from '../space-between/internal';\nimport { getComponentAnalyticsMetadata } from './analytics-metadata/utils';\nimport ContentDisplayPreference from './content-display';\nimport { CollectionPreferencesProps } from './interfaces';\nimport {\n ContentDensityPreference,\n copyPreferences,\n CustomPreference,\n mergePreferences,\n ModalContentLayout,\n PageSizePreference,\n StickyColumnsPreference,\n StripedRowsPreference,\n WrapLinesPreference,\n} from './utils';\nimport VisibleContentPreference from './visible-content';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\nexport { CollectionPreferencesProps };\n\nconst componentName = 'CollectionPreferences';\n\nexport default function CollectionPreferences({\n title,\n confirmLabel,\n cancelLabel,\n disabled = false,\n onConfirm,\n onCancel,\n visibleContentPreference,\n contentDisplayPreference,\n pageSizePreference,\n wrapLinesPreference,\n stripedRowsPreference,\n contentDensityPreference,\n stickyColumnsPreference,\n\n preferences,\n customPreference,\n getModalRoot,\n removeModalRoot,\n ...rest\n}: CollectionPreferencesProps) {\n const parentMetadata = useContext(CollectionPreferencesMetadata);\n const { __internalRootRef } = useBaseComponent('CollectionPreferences', {\n props: {},\n metadata: {\n ...parentMetadata,\n hasStripedRowsPreference: !!stripedRowsPreference,\n hasVisibleContentPreference: !!visibleContentPreference,\n hasContentDisplayPreference: !!contentDisplayPreference,\n hasContentDensityPreference: !!contentDensityPreference,\n hasStickyColumnsPreference: !!stickyColumnsPreference,\n },\n });\n checkControlled('CollectionPreferences', 'preferences', preferences, 'onConfirm', onConfirm);\n\n const i18n = useInternalI18n('collection-preferences');\n const baseProps = getBaseProps(rest);\n const [modalVisible, setModalVisible] = useState(false);\n const [temporaryPreferences, setTemporaryPreferences] = useState(copyPreferences(preferences || {}));\n const triggerRef = useRef<ButtonProps.Ref>(null);\n const dialogPreviouslyOpen = useRef(false);\n\n useEffect(() => {\n if (!modalVisible) {\n dialogPreviouslyOpen.current && triggerRef.current && triggerRef.current.focus();\n } else {\n dialogPreviouslyOpen.current = true;\n }\n }, [modalVisible]);\n\n const onConfirmListener = () => {\n setModalVisible(false);\n fireNonCancelableEvent(onConfirm, temporaryPreferences);\n };\n\n const onCancelListener = () => {\n fireNonCancelableEvent(onCancel, {});\n setModalVisible(false);\n setTemporaryPreferences(copyPreferences(preferences || {}));\n };\n\n const hasContentOnTheLeft = !!(\n pageSizePreference ||\n wrapLinesPreference ||\n stripedRowsPreference ||\n contentDensityPreference ||\n stickyColumnsPreference ||\n customPreference\n );\n const hasContentOnTheRight = !!(visibleContentPreference || contentDisplayPreference);\n\n const onChange = (changedPreferences: CollectionPreferencesProps.Preferences) =>\n setTemporaryPreferences(mergePreferences(changedPreferences, temporaryPreferences));\n\n if (visibleContentPreference && contentDisplayPreference) {\n warnOnce(\n componentName,\n 'You provided both `visibleContentPreference` and `contentDisplayPreference` props. `visibleContentPreference` will be ignored and only `contentDisplayPreference` will be rendered.'\n );\n }\n\n const referrerId = useUniqueId();\n\n return (\n <div {...baseProps} className={clsx(baseProps.className, styles.root)} ref={__internalRootRef}>\n <div\n id={referrerId}\n {...getAnalyticsMetadataAttribute({ component: getComponentAnalyticsMetadata(disabled, preferences) })}\n >\n <InternalButton\n ref={triggerRef}\n className={clsx(styles['trigger-button'], analyticsSelectors['trigger-button'])}\n disabled={disabled}\n ariaLabel={i18n('title', title)}\n onClick={() => {\n setTemporaryPreferences(copyPreferences(preferences || {}));\n setModalVisible(true);\n }}\n variant=\"icon\"\n iconName=\"settings\"\n formAction=\"none\"\n analyticsAction=\"open\"\n />\n {!disabled && modalVisible && (\n <InternalModal\n className={styles['modal-root']}\n visible={true}\n getModalRoot={getModalRoot}\n removeModalRoot={removeModalRoot}\n header={i18n('title', title)}\n referrerId={referrerId}\n footer={\n <InternalBox float=\"right\">\n <InternalSpaceBetween direction=\"horizontal\" size=\"xs\">\n <InternalButton\n className={styles['cancel-button']}\n variant=\"link\"\n formAction=\"none\"\n onClick={onCancelListener}\n analyticsAction=\"cancel\"\n >\n {i18n('cancelLabel', cancelLabel)}\n </InternalButton>\n <InternalButton\n className={styles['confirm-button']}\n variant=\"primary\"\n formAction=\"none\"\n onClick={onConfirmListener}\n analyticsAction=\"confirm\"\n >\n {i18n('confirmLabel', confirmLabel)}\n </InternalButton>\n </InternalSpaceBetween>\n </InternalBox>\n }\n closeAriaLabel={cancelLabel}\n size={hasContentOnTheLeft && hasContentOnTheRight ? 'large' : 'medium'}\n onDismiss={onCancelListener}\n >\n <ModalContentLayout\n left={\n hasContentOnTheLeft && (\n <InternalSpaceBetween size=\"l\">\n {pageSizePreference && (\n <PageSizePreference\n value={temporaryPreferences.pageSize}\n {...pageSizePreference}\n onChange={pageSize => onChange({ pageSize })}\n />\n )}\n {wrapLinesPreference && (\n <WrapLinesPreference\n value={temporaryPreferences.wrapLines}\n {...wrapLinesPreference}\n onChange={wrapLines => onChange({ wrapLines })}\n />\n )}\n {stripedRowsPreference && (\n <StripedRowsPreference\n value={temporaryPreferences.stripedRows}\n {...stripedRowsPreference}\n onChange={stripedRows => onChange({ stripedRows })}\n />\n )}\n {contentDensityPreference && (\n <ContentDensityPreference\n value={temporaryPreferences.contentDensity}\n {...contentDensityPreference}\n onChange={contentDensity => onChange({ contentDensity })}\n />\n )}\n {stickyColumnsPreference && (\n <StickyColumnsPreference\n value={temporaryPreferences.stickyColumns}\n {...stickyColumnsPreference}\n onChange={stickyColumns => onChange({ stickyColumns })}\n />\n )}\n {customPreference && (\n <CustomPreference\n value={temporaryPreferences.custom}\n customPreference={customPreference}\n onChange={custom => onChange({ custom })}\n />\n )}\n </InternalSpaceBetween>\n )\n }\n right={\n contentDisplayPreference ? (\n <ContentDisplayPreference\n {...contentDisplayPreference}\n value={temporaryPreferences.contentDisplay}\n onChange={contentDisplay => onChange({ contentDisplay })}\n />\n ) : (\n visibleContentPreference && (\n <VisibleContentPreference\n value={temporaryPreferences.visibleContent}\n {...visibleContentPreference}\n onChange={visibleItems => onChange({ visibleContent: visibleItems })}\n />\n )\n )\n }\n />\n </InternalModal>\n )}\n </div>\n </div>\n );\n}\n\napplyDisplayName(CollectionPreferences, componentName);\n"]}
@@ -211,6 +211,8 @@ export declare namespace CollectionPreferencesProps {
211
211
  liveAnnouncementDndDiscarded?: string;
212
212
  dragHandleAriaLabel?: string;
213
213
  dragHandleAriaDescription?: string;
214
+ enableColumnFiltering?: boolean;
215
+ i18nStrings?: ContentDisplayPreferenceI18nStrings;
214
216
  }
215
217
  export interface ContentDisplayOption {
216
218
  id: string;
@@ -270,6 +272,33 @@ export declare namespace CollectionPreferencesProps {
270
272
  firstColumns?: StickyColumnPreference;
271
273
  lastColumns?: StickyColumnPreference;
272
274
  }
275
+ export interface ContentDisplayPreferenceI18nStrings {
276
+ /**
277
+ * Specifies a `placeholder` for the filtering input.
278
+ * @i18n
279
+ */
280
+ columnFilteringPlaceholder?: string;
281
+ /**
282
+ * Specifies an `aria-label` for the filtering input.
283
+ * @i18n
284
+ */
285
+ columnFilteringAriaLabel?: string;
286
+ /**
287
+ * Specifies the `count text` for the filtering input to reflect matches found.
288
+ * @i18n
289
+ */
290
+ columnFilteringCountText?: (count: number) => string;
291
+ /**
292
+ * Specifies the `no match` text for when there are no matching options in the filtering.
293
+ * @i18n
294
+ */
295
+ columnFilteringNoMatchText?: string;
296
+ /**
297
+ * Specifies both an `aria-label` for the clear filtering input action and the `clear filter button` text for the no match button.
298
+ * @i18n
299
+ */
300
+ columnFilteringClearFilterText?: string;
301
+ }
273
302
  export {};
274
303
  }
275
304
  //# sourceMappingURL=interfaces.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/collection-preferences/interfaces.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,WAAW,0BAA0B,CAAC,oBAAoB,GAAG,GAAG,CAAE,SAAQ,kBAAkB,EAAE,cAAc;IAChH;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CA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KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB;IAED,UAAU,aAAa;QACrB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf;IAED,UAAU,sBAAsB;QAC9B,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,OAAO,EAAE,aAAa,CAAC;YACrB,KAAK,EAAE,MAAM,CAAC;YACd,KAAK,EAAE,MAAM,CAAC;SACf,CAAC,CAAC;KACJ;IACD,MAAM,WAAW,uBAAuB;QACtC,YAAY,CAAC,EAAE,sBAAsB,CAAC;QACtC,WAAW,CAAC,EAAE,sBAAsB,CAAC;KACtC;IAED,MAAM,WAAW,mCAAmC;QAClD;;;WAGG;QACH,0BAA0B,CAAC,EAAE,MAAM,CAAC;QAEpC;;;WAGG;QACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;QAElC;;;WAGG;QACH,wBAAwB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;QAErD;;;WAGG;QACH,0BAA0B,CAAC,EAAE,MAAM,CAAC;QAEpC;;;WAGG;QACH,8BAA8B,CAAC,EAAE,MAAM,CAAC;KACzC;;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/collection-preferences/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\nimport { BaseModalProps } from '../modal/interfaces';\n\nexport interface CollectionPreferencesProps<CustomPreferenceType = any> extends BaseComponentProps, BaseModalProps {\n /**\n * Specifies the title of the preferences modal dialog. It is also used as an `aria-label` for the trigger button.\n * @i18n\n */\n title?: string;\n /**\n * Label of the confirm button in the modal footer.\n * @i18n\n */\n confirmLabel?: string;\n /**\n * Label of the cancel button in the modal footer.\n * @i18n\n */\n cancelLabel?: string;\n /**\n * Determines whether the preferences trigger button is disabled.\n */\n disabled?: boolean;\n /**\n * Configures the built-in \"page size selection\" preference.\n *\n * If you set it, the component displays this preference in the modal.\n *\n * It contains the following:\n * - `title` (string) - Specifies the text displayed at the top of the preference.\n * - `options` - Specifies an array of options for page size selection. Each entry contains:\n * - `value` (number) - The value for the radio button (that is, the number of items per page).\n * - `label` (string) - A label for the radio button (for example, \"10 resources\").\n *\n * You must set the current value in the `preferences.pageSize` property.\n * @i18n\n */\n pageSizePreference?: CollectionPreferencesProps.PageSizePreference;\n /**\n * Configures the built-in \"wrap lines\" preference.\n *\n * If you set it, the component displays this preference in the modal.\n *\n * It contains the following:\n * - `label` (string) - Specifies the label for the option checkbox.\n * - `description` (string) - Specifies the text displayed below the checkbox label.\n *\n * You must set the current value in the `preferences.wrapLines` property.\n * @i18n\n */\n wrapLinesPreference?: CollectionPreferencesProps.WrapLinesPreference;\n /**\n * Configures the built-in \"striped rows\" preference.\n *\n * If you set it, the component displays this preference in the modal.\n *\n * It contains the following:\n * - `label` (string) - Specifies the label for the option checkbox.\n * - `description` (string) - Specifies the text displayed below the checkbox label.\n *\n * You must set the current value in the `preferences.stripedRows` property.\n * @i18n\n */\n stripedRowsPreference?: CollectionPreferencesProps.StripedRowsPreference;\n /**\n * Configures the content density preference (Comfortable / Compact).\n *\n * If you set it, the component displays this preference in the modal.\n *\n * It contains the following:\n * - `label` (string) - Specifies the label for the option checkbox.\n * - `description` (string) - Specifies the text displayed below the checkbox label.\n *\n * You must set the current value in the `preferences.contentDensity` property.\n * @i18n\n */\n contentDensityPreference?: CollectionPreferencesProps.ContentDensityPreference;\n /**\n * Configures the sticky columns preference.\n *\n * You can set it for both left and right columns.\n *\n * It contains the following:\n * - `label` (string) - Specifies the label for each radio group.\n * - `description` (string) - Specifies the text displayed below each radio group label.\n *\n * You must set the current value in the `preferences.stickyColumns` property.\n */\n stickyColumnsPreference?: CollectionPreferencesProps.StickyColumnsPreference;\n /**\n * Configures the built-in content display preference for order and visibility of columns in a table.\n *\n * Once set, the component displays this preference in the modal.\n * Cannot be used together with `visibleContentPreference`.\n *\n * It contains the following:\n * - `title` (string) - Specifies the text displayed at the top of the preference.\n * - `description` (string) - Specifies the description displayed below the title.\n * - `liveAnnouncementDndStarted` ((position: number, total: number) => string) - (Optional) Adds a message to be announced by screen readers when an option is picked.\n * - `liveAnnouncementDndDiscarded` (string) - (Optional) Adds a message to be announced by screen readers when a reordering action is canceled.\n * - `liveAnnouncementDndItemReordered` ((initialPosition: number, currentPosition: number, total: number) => string) - (Optional) Adds a message to be announced by screen readers when an item is being moved.\n * - `liveAnnouncementDndItemCommitted` ((initialPosition: number, finalPosition: number, total: number) => string) - (Optional) Adds a message to be announced by screen readers when a reordering action is committed.\n * - `dragHandleAriaDescription` (string) - (Optional) Adds an ARIA description for the drag handle.\n * - `dragHandleAriaLabel` (string) - (Optional) Adds an ARIA label for the drag handle.\n * - `options` - Specifies an array of options for reordering and visible content selection.\n *\n * Each option contains the following:\n * - `id` (string) - Corresponds to a table column `id`.\n * - `label` (string) - Specifies a short description of the content.\n * - `alwaysVisible` (boolean) - (Optional) Determines whether the visibility is always on and therefore cannot be toggled. This is set to `false` by default.\n *\n * You must provide an ordered list of the items to display in the `preferences.contentDisplay` property.\n * @i18n\n */\n contentDisplayPreference?: CollectionPreferencesProps.ContentDisplayPreference;\n /**\n * Configures the built-in \"visible content selection\" preference (for example, visible sections in cards).\n *\n * If you set it, the component displays this preference in the modal.\n * Cannot be used together with `contentDisplayPreference`.\n *\n * It contains the following:\n * - `title` (string) - Specifies the text displayed at the top of the preference.\n * - `options` - Specifies an array of groups of options for visible content selection.\n *\n * Each group of options contains the following:\n * - `label` (string) - The text to display as a title for the options group.\n * - `options` - Specifies an aray of options in the group. Each option contains the following:\n * - `id` (string) - Corresponds to a column `id` for tables or to a section `id` for cards.\n * - `label` (string) - Specifies a short description of the content.\n * - `editable` (boolean) - (Optional) Determines whether the user is able to toggle its visibility. This is `true` by default.\n *\n * You must set the current list of visible content `id`s in the `preferences.visibleContent` property.\n *\n * **Deprecated** in table, replaced by `contentDisplayPreference`.\n */\n visibleContentPreference?: CollectionPreferencesProps.VisibleContentPreference;\n /**\n * Specifies the current preference values. This includes both built-in and custom preferences.\n *\n * It contains the following:\n * - `pageSize` (number) - (Optional)\n * - `wrapLines` (boolean) - (Optional)\n * - `contentDisplay` (ReadonlyArray<ContentDisplayItem>) - (Optional) Specifies the list of content and their visibility. The order of the elements influences the display.\n * - `visibleContent` (ReadonlyArray<string>) - Specifies the list of visible content `id`s. The order of the `id`s does not influence the display. If the `contentDisplay` property is set, this property is ignored.\n * - `custom` (CustomPreferenceType) - Specifies the value for your custom preference.\n */\n preferences?: CollectionPreferencesProps.Preferences<CustomPreferenceType>;\n /**\n * Configures custom preferences. The function receives two parameters:\n *\n * - `customValue` (CustomPreferenceType) - Current value for your custom preference. It is initialized using the value you provide in `preferences.custom`.\n * - `setCustomValue` - A function that is called to notify a state update.\n *\n * It should return the content of your custom preference, for example:\n * ```\n * (customValue, setCustomValue) => (\n * <Checkbox checked={customValue} onChange={({ detail }) => setCustomValue(detail.checked)} />\n * )\n * ```\n *\n * When the user confirms the changes, the new value is passed in the `detail.custom` property of the `onConfirm` listener.\n * When the user cancels the changes, the `customValue` is reset to the one present in `preferences.custom` property.\n *\n * **Display**\n * - If any of the built-in preferences (`pageSizePreference`, `wrapLinesPreference`, or `visibleContentPreference`) are displayed,\n * the custom content is displayed at the bottom of the left column within the modal.\n * - If no built-in preference is displayed, the custom content occupies the whole modal.\n */\n customPreference?: (\n customValue: CustomPreferenceType,\n setCustomValue: React.Dispatch<CustomPreferenceType>\n ) => React.ReactNode;\n /**\n * Called when the user cancels a preference change using the cancel button in the modal footer or by dismissing the modal.\n */\n onCancel?: NonCancelableEventHandler;\n /**\n * Called when the user confirms a preference change using the confirm button in the modal footer.\n *\n * The event `detail` contains the following:\n * - `contentDensity` (boolean) - (Optional) The current content density preference value. Available only if you specify the `contentDensityPreference` property.\n * - `contentDisplay` (ReadonlyArray<ContentDisplayItem>) - (Optional) The ordered list of table columns and their visibility. Available only if you specify the `contentDisplayPreference` property.\n * - `custom` (CustomPreferenceType) - (Optional) The selected value for your custom preference.\n * - `pageSize` (number) - (Optional) The selected page size value. Available only if you specify the `pageSizePreference` property.\n * - `stickyColumns` (CollectionPreferencesProps.StickyColumns) - (Optional) The current sticky columns preference value. Available only if you specify the `stickyColumnsPreference` property.\n * - `stripedRows` (boolean) - (Optional) The current striped rows preference value. Available only if you specify the `stripedRowsPreference` property.\n * - `visibleContent` (ReadonlyArray<string>) - (Optional) The list of selected content `id`s. Available only if you specify the `visibleContentPreference` property.\n * - `wrapLines` (boolean) - (Optional) The current line wrapping preference value. Available only if you specify the `wrapLinesPreference` property.\n *\n * The values for all configured preferences are present even if the user didn't change their values.\n */\n onConfirm?: NonCancelableEventHandler<CollectionPreferencesProps.Preferences<CustomPreferenceType>>;\n}\n\nexport namespace CollectionPreferencesProps {\n export interface Preferences<CustomPreferenceType = any> {\n pageSize?: number;\n wrapLines?: boolean;\n stripedRows?: boolean;\n contentDensity?: 'comfortable' | 'compact';\n visibleContent?: ReadonlyArray<string>;\n stickyColumns?: StickyColumns;\n contentDisplay?: ReadonlyArray<ContentDisplayItem>;\n custom?: CustomPreferenceType;\n }\n\n export interface ContentDisplayPreference {\n title?: string;\n description?: string;\n options: ReadonlyArray<CollectionPreferencesProps.ContentDisplayOption>;\n liveAnnouncementDndStarted?: (position: number, total: number) => string;\n liveAnnouncementDndItemReordered?: (initialPosition: number, currentPosition: number, total: number) => string;\n liveAnnouncementDndItemCommitted?: (initialPosition: number, finalPosition: number, total: number) => string;\n liveAnnouncementDndDiscarded?: string;\n dragHandleAriaLabel?: string;\n dragHandleAriaDescription?: string;\n }\n\n export interface ContentDisplayOption {\n id: string;\n label: string;\n alwaysVisible?: boolean;\n }\n\n export interface ContentDisplayItem {\n id: string;\n visible: boolean;\n }\n\n export interface VisibleContentPreference {\n title: string;\n options: ReadonlyArray<CollectionPreferencesProps.VisibleContentOptionsGroup>;\n }\n\n export interface VisibleContentOptionsGroup {\n label: string;\n options: ReadonlyArray<CollectionPreferencesProps.VisibleContentOption>;\n }\n\n export interface VisibleContentOption {\n id: string;\n label: string;\n editable?: boolean;\n }\n\n export interface PageSizePreference {\n title?: string;\n options: ReadonlyArray<PageSizeOption>;\n }\n\n export interface PageSizeOption {\n value: number;\n label?: string;\n }\n\n export interface WrapLinesPreference {\n label?: string;\n description?: string;\n }\n\n export interface StripedRowsPreference {\n label?: string;\n description?: string;\n }\n\n export interface ContentDensityPreference {\n label?: string;\n description?: string;\n }\n\n interface StickyColumns {\n first?: number;\n last?: number;\n }\n\n interface StickyColumnPreference {\n title: string;\n description: string;\n options: ReadonlyArray<{\n label: string;\n value: number;\n }>;\n }\n export interface StickyColumnsPreference {\n firstColumns?: StickyColumnPreference;\n lastColumns?: StickyColumnPreference;\n }\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/collection-preferences/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\nimport { BaseModalProps } from '../modal/interfaces';\n\nexport interface CollectionPreferencesProps<CustomPreferenceType = any> extends BaseComponentProps, BaseModalProps {\n /**\n * Specifies the title of the preferences modal dialog. It is also used as an `aria-label` for the trigger button.\n * @i18n\n */\n title?: string;\n /**\n * Label of the confirm button in the modal footer.\n * @i18n\n */\n confirmLabel?: string;\n /**\n * Label of the cancel button in the modal footer.\n * @i18n\n */\n cancelLabel?: string;\n /**\n * Determines whether the preferences trigger button is disabled.\n */\n disabled?: boolean;\n /**\n * Configures the built-in \"page size selection\" preference.\n *\n * If you set it, the component displays this preference in the modal.\n *\n * It contains the following:\n * - `title` (string) - Specifies the text displayed at the top of the preference.\n * - `options` - Specifies an array of options for page size selection. Each entry contains:\n * - `value` (number) - The value for the radio button (that is, the number of items per page).\n * - `label` (string) - A label for the radio button (for example, \"10 resources\").\n *\n * You must set the current value in the `preferences.pageSize` property.\n * @i18n\n */\n pageSizePreference?: CollectionPreferencesProps.PageSizePreference;\n /**\n * Configures the built-in \"wrap lines\" preference.\n *\n * If you set it, the component displays this preference in the modal.\n *\n * It contains the following:\n * - `label` (string) - Specifies the label for the option checkbox.\n * - `description` (string) - Specifies the text displayed below the checkbox label.\n *\n * You must set the current value in the `preferences.wrapLines` property.\n * @i18n\n */\n wrapLinesPreference?: CollectionPreferencesProps.WrapLinesPreference;\n /**\n * Configures the built-in \"striped rows\" preference.\n *\n * If you set it, the component displays this preference in the modal.\n *\n * It contains the following:\n * - `label` (string) - Specifies the label for the option checkbox.\n * - `description` (string) - Specifies the text displayed below the checkbox label.\n *\n * You must set the current value in the `preferences.stripedRows` property.\n * @i18n\n */\n stripedRowsPreference?: CollectionPreferencesProps.StripedRowsPreference;\n /**\n * Configures the content density preference (Comfortable / Compact).\n *\n * If you set it, the component displays this preference in the modal.\n *\n * It contains the following:\n * - `label` (string) - Specifies the label for the option checkbox.\n * - `description` (string) - Specifies the text displayed below the checkbox label.\n *\n * You must set the current value in the `preferences.contentDensity` property.\n * @i18n\n */\n contentDensityPreference?: CollectionPreferencesProps.ContentDensityPreference;\n /**\n * Configures the sticky columns preference.\n *\n * You can set it for both left and right columns.\n *\n * It contains the following:\n * - `label` (string) - Specifies the label for each radio group.\n * - `description` (string) - Specifies the text displayed below each radio group label.\n *\n * You must set the current value in the `preferences.stickyColumns` property.\n */\n stickyColumnsPreference?: CollectionPreferencesProps.StickyColumnsPreference;\n /**\n * Configures the built-in content display preference for order and visibility of columns in a table.\n *\n * Once set, the component displays this preference in the modal.\n * Cannot be used together with `visibleContentPreference`.\n *\n * It contains the following:\n * - `title` (string) - Specifies the text displayed at the top of the preference.\n * - `description` (string) - Specifies the description displayed below the title.\n * - `liveAnnouncementDndStarted` ((position: number, total: number) => string) - (Optional) Adds a message to be announced by screen readers when an option is picked.\n * - `liveAnnouncementDndDiscarded` (string) - (Optional) Adds a message to be announced by screen readers when a reordering action is canceled.\n * - `liveAnnouncementDndItemReordered` ((initialPosition: number, currentPosition: number, total: number) => string) - (Optional) Adds a message to be announced by screen readers when an item is being moved.\n * - `liveAnnouncementDndItemCommitted` ((initialPosition: number, finalPosition: number, total: number) => string) - (Optional) Adds a message to be announced by screen readers when a reordering action is committed.\n * - `dragHandleAriaDescription` (string) - (Optional) Adds an ARIA description for the drag handle.\n * - `dragHandleAriaLabel` (string) - (Optional) Adds an ARIA label for the drag handle.\n * - `options` - Specifies an array of options for reordering and visible content selection.\n *\n * Each option contains the following:\n * - `id` (string) - Corresponds to a table column `id`.\n * - `label` (string) - Specifies a short description of the content.\n * - `alwaysVisible` (boolean) - (Optional) Determines whether the visibility is always on and therefore cannot be toggled. This is set to `false` by default.\n *\n * You must provide an ordered list of the items to display in the `preferences.contentDisplay` property.\n * @i18n\n */\n contentDisplayPreference?: CollectionPreferencesProps.ContentDisplayPreference;\n /**\n * Configures the built-in \"visible content selection\" preference (for example, visible sections in cards).\n *\n * If you set it, the component displays this preference in the modal.\n * Cannot be used together with `contentDisplayPreference`.\n *\n * It contains the following:\n * - `title` (string) - Specifies the text displayed at the top of the preference.\n * - `options` - Specifies an array of groups of options for visible content selection.\n *\n * Each group of options contains the following:\n * - `label` (string) - The text to display as a title for the options group.\n * - `options` - Specifies an aray of options in the group. Each option contains the following:\n * - `id` (string) - Corresponds to a column `id` for tables or to a section `id` for cards.\n * - `label` (string) - Specifies a short description of the content.\n * - `editable` (boolean) - (Optional) Determines whether the user is able to toggle its visibility. This is `true` by default.\n *\n * You must set the current list of visible content `id`s in the `preferences.visibleContent` property.\n *\n * **Deprecated** in table, replaced by `contentDisplayPreference`.\n */\n visibleContentPreference?: CollectionPreferencesProps.VisibleContentPreference;\n /**\n * Specifies the current preference values. This includes both built-in and custom preferences.\n *\n * It contains the following:\n * - `pageSize` (number) - (Optional)\n * - `wrapLines` (boolean) - (Optional)\n * - `contentDisplay` (ReadonlyArray<ContentDisplayItem>) - (Optional) Specifies the list of content and their visibility. The order of the elements influences the display.\n * - `visibleContent` (ReadonlyArray<string>) - Specifies the list of visible content `id`s. The order of the `id`s does not influence the display. If the `contentDisplay` property is set, this property is ignored.\n * - `custom` (CustomPreferenceType) - Specifies the value for your custom preference.\n */\n preferences?: CollectionPreferencesProps.Preferences<CustomPreferenceType>;\n /**\n * Configures custom preferences. The function receives two parameters:\n *\n * - `customValue` (CustomPreferenceType) - Current value for your custom preference. It is initialized using the value you provide in `preferences.custom`.\n * - `setCustomValue` - A function that is called to notify a state update.\n *\n * It should return the content of your custom preference, for example:\n * ```\n * (customValue, setCustomValue) => (\n * <Checkbox checked={customValue} onChange={({ detail }) => setCustomValue(detail.checked)} />\n * )\n * ```\n *\n * When the user confirms the changes, the new value is passed in the `detail.custom` property of the `onConfirm` listener.\n * When the user cancels the changes, the `customValue` is reset to the one present in `preferences.custom` property.\n *\n * **Display**\n * - If any of the built-in preferences (`pageSizePreference`, `wrapLinesPreference`, or `visibleContentPreference`) are displayed,\n * the custom content is displayed at the bottom of the left column within the modal.\n * - If no built-in preference is displayed, the custom content occupies the whole modal.\n */\n customPreference?: (\n customValue: CustomPreferenceType,\n setCustomValue: React.Dispatch<CustomPreferenceType>\n ) => React.ReactNode;\n /**\n * Called when the user cancels a preference change using the cancel button in the modal footer or by dismissing the modal.\n */\n onCancel?: NonCancelableEventHandler;\n /**\n * Called when the user confirms a preference change using the confirm button in the modal footer.\n *\n * The event `detail` contains the following:\n * - `contentDensity` (boolean) - (Optional) The current content density preference value. Available only if you specify the `contentDensityPreference` property.\n * - `contentDisplay` (ReadonlyArray<ContentDisplayItem>) - (Optional) The ordered list of table columns and their visibility. Available only if you specify the `contentDisplayPreference` property.\n * - `custom` (CustomPreferenceType) - (Optional) The selected value for your custom preference.\n * - `pageSize` (number) - (Optional) The selected page size value. Available only if you specify the `pageSizePreference` property.\n * - `stickyColumns` (CollectionPreferencesProps.StickyColumns) - (Optional) The current sticky columns preference value. Available only if you specify the `stickyColumnsPreference` property.\n * - `stripedRows` (boolean) - (Optional) The current striped rows preference value. Available only if you specify the `stripedRowsPreference` property.\n * - `visibleContent` (ReadonlyArray<string>) - (Optional) The list of selected content `id`s. Available only if you specify the `visibleContentPreference` property.\n * - `wrapLines` (boolean) - (Optional) The current line wrapping preference value. Available only if you specify the `wrapLinesPreference` property.\n *\n * The values for all configured preferences are present even if the user didn't change their values.\n */\n onConfirm?: NonCancelableEventHandler<CollectionPreferencesProps.Preferences<CustomPreferenceType>>;\n}\n\nexport namespace CollectionPreferencesProps {\n export interface Preferences<CustomPreferenceType = any> {\n pageSize?: number;\n wrapLines?: boolean;\n stripedRows?: boolean;\n contentDensity?: 'comfortable' | 'compact';\n visibleContent?: ReadonlyArray<string>;\n stickyColumns?: StickyColumns;\n contentDisplay?: ReadonlyArray<ContentDisplayItem>;\n custom?: CustomPreferenceType;\n }\n\n export interface ContentDisplayPreference {\n title?: string;\n description?: string;\n options: ReadonlyArray<CollectionPreferencesProps.ContentDisplayOption>;\n liveAnnouncementDndStarted?: (position: number, total: number) => string;\n liveAnnouncementDndItemReordered?: (initialPosition: number, currentPosition: number, total: number) => string;\n liveAnnouncementDndItemCommitted?: (initialPosition: number, finalPosition: number, total: number) => string;\n liveAnnouncementDndDiscarded?: string;\n dragHandleAriaLabel?: string;\n dragHandleAriaDescription?: string;\n enableColumnFiltering?: boolean;\n i18nStrings?: ContentDisplayPreferenceI18nStrings;\n }\n\n export interface ContentDisplayOption {\n id: string;\n label: string;\n alwaysVisible?: boolean;\n }\n\n export interface ContentDisplayItem {\n id: string;\n visible: boolean;\n }\n\n export interface VisibleContentPreference {\n title: string;\n options: ReadonlyArray<CollectionPreferencesProps.VisibleContentOptionsGroup>;\n }\n\n export interface VisibleContentOptionsGroup {\n label: string;\n options: ReadonlyArray<CollectionPreferencesProps.VisibleContentOption>;\n }\n\n export interface VisibleContentOption {\n id: string;\n label: string;\n editable?: boolean;\n }\n\n export interface PageSizePreference {\n title?: string;\n options: ReadonlyArray<PageSizeOption>;\n }\n\n export interface PageSizeOption {\n value: number;\n label?: string;\n }\n\n export interface WrapLinesPreference {\n label?: string;\n description?: string;\n }\n\n export interface StripedRowsPreference {\n label?: string;\n description?: string;\n }\n\n export interface ContentDensityPreference {\n label?: string;\n description?: string;\n }\n\n interface StickyColumns {\n first?: number;\n last?: number;\n }\n\n interface StickyColumnPreference {\n title: string;\n description: string;\n options: ReadonlyArray<{\n label: string;\n value: number;\n }>;\n }\n export interface StickyColumnsPreference {\n firstColumns?: StickyColumnPreference;\n lastColumns?: StickyColumnPreference;\n }\n\n export interface ContentDisplayPreferenceI18nStrings {\n /**\n * Specifies a `placeholder` for the filtering input.\n * @i18n\n */\n columnFilteringPlaceholder?: string;\n\n /**\n * Specifies an `aria-label` for the filtering input.\n * @i18n\n */\n columnFilteringAriaLabel?: string;\n\n /**\n * Specifies the `count text` for the filtering input to reflect matches found.\n * @i18n\n */\n columnFilteringCountText?: (count: number) => string;\n\n /**\n * Specifies the `no match` text for when there are no matching options in the filtering.\n * @i18n\n */\n columnFilteringNoMatchText?: string;\n\n /**\n * Specifies both an `aria-label` for the clear filtering input action and the `clear filter button` text for the no match button.\n * @i18n\n */\n columnFilteringClearFilterText?: string;\n }\n}\n"]}
@@ -1,42 +1,44 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "visible-content": "awsui_visible-content_tc96w_2hh03_281",
5
- "visible-content-toggle": "awsui_visible-content-toggle_tc96w_2hh03_282",
6
- "visible-content-groups": "awsui_visible-content-groups_tc96w_2hh03_283",
7
- "visible-content-group": "awsui_visible-content-group_tc96w_2hh03_283",
8
- "visible-content-title": "awsui_visible-content-title_tc96w_2hh03_288",
9
- "visible-content-group-label": "awsui_visible-content-group-label_tc96w_2hh03_298",
10
- "visible-content-option": "awsui_visible-content-option_tc96w_2hh03_304",
11
- "visible-content-option-label": "awsui_visible-content-option-label_tc96w_2hh03_317",
12
- "content-display-option-toggle": "awsui_content-display-option-toggle_tc96w_2hh03_604",
13
- "content-display-option-content": "awsui_content-display-option-content_tc96w_2hh03_608",
14
- "content-display-option": "awsui_content-display-option_tc96w_2hh03_604",
15
- "placeholder": "awsui_placeholder_tc96w_2hh03_658",
16
- "sorting": "awsui_sorting_tc96w_2hh03_658",
17
- "content-display-option-label": "awsui_content-display-option-label_tc96w_2hh03_685",
18
- "drag-overlay": "awsui_drag-overlay_tc96w_2hh03_692",
19
- "content-display": "awsui_content-display_tc96w_2hh03_604",
20
- "content-display-title": "awsui_content-display-title_tc96w_2hh03_725",
21
- "content-display-description": "awsui_content-display-description_tc96w_2hh03_734",
22
- "content-display-option-list": "awsui_content-display-option-list_tc96w_2hh03_742",
23
- "root": "awsui_root_tc96w_2hh03_749",
24
- "modal-root": "awsui_modal-root_tc96w_2hh03_750",
25
- "trigger-button": "awsui_trigger-button_tc96w_2hh03_751",
26
- "cancel-button": "awsui_cancel-button_tc96w_2hh03_752",
27
- "confirm-button": "awsui_confirm-button_tc96w_2hh03_753",
28
- "custom": "awsui_custom_tc96w_2hh03_754",
29
- "second-column-small": "awsui_second-column-small_tc96w_2hh03_758",
30
- "wrap-lines": "awsui_wrap-lines_tc96w_2hh03_762",
31
- "striped-rows": "awsui_striped-rows_tc96w_2hh03_763",
32
- "content-density": "awsui_content-density_tc96w_2hh03_764",
33
- "page-size": "awsui_page-size_tc96w_2hh03_765",
34
- "page-size-form-field": "awsui_page-size-form-field_tc96w_2hh03_766",
35
- "page-size-radio-group": "awsui_page-size-radio-group_tc96w_2hh03_767",
36
- "sticky-columns": "awsui_sticky-columns_tc96w_2hh03_768",
37
- "sticky-columns-form-field": "awsui_sticky-columns-form-field_tc96w_2hh03_769",
38
- "sticky-columns-radio-group": "awsui_sticky-columns-radio-group_tc96w_2hh03_770",
39
- "sticky-columns-first": "awsui_sticky-columns-first_tc96w_2hh03_771",
40
- "sticky-columns-last": "awsui_sticky-columns-last_tc96w_2hh03_772"
4
+ "visible-content": "awsui_visible-content_tc96w_9rkzq_281",
5
+ "visible-content-toggle": "awsui_visible-content-toggle_tc96w_9rkzq_282",
6
+ "visible-content-groups": "awsui_visible-content-groups_tc96w_9rkzq_283",
7
+ "visible-content-group": "awsui_visible-content-group_tc96w_9rkzq_283",
8
+ "visible-content-title": "awsui_visible-content-title_tc96w_9rkzq_288",
9
+ "visible-content-group-label": "awsui_visible-content-group-label_tc96w_9rkzq_298",
10
+ "visible-content-option": "awsui_visible-content-option_tc96w_9rkzq_304",
11
+ "visible-content-option-label": "awsui_visible-content-option-label_tc96w_9rkzq_317",
12
+ "content-display-option-toggle": "awsui_content-display-option-toggle_tc96w_9rkzq_604",
13
+ "content-display-option-content": "awsui_content-display-option-content_tc96w_9rkzq_608",
14
+ "content-display-option": "awsui_content-display-option_tc96w_9rkzq_604",
15
+ "placeholder": "awsui_placeholder_tc96w_9rkzq_658",
16
+ "sorting": "awsui_sorting_tc96w_9rkzq_658",
17
+ "content-display-option-label": "awsui_content-display-option-label_tc96w_9rkzq_685",
18
+ "drag-overlay": "awsui_drag-overlay_tc96w_9rkzq_692",
19
+ "content-display": "awsui_content-display_tc96w_9rkzq_604",
20
+ "content-display-text-filter": "awsui_content-display-text-filter_tc96w_9rkzq_722",
21
+ "content-display-no-match": "awsui_content-display-no-match_tc96w_9rkzq_723",
22
+ "content-display-title": "awsui_content-display-title_tc96w_9rkzq_727",
23
+ "content-display-description": "awsui_content-display-description_tc96w_9rkzq_736",
24
+ "content-display-option-list": "awsui_content-display-option-list_tc96w_9rkzq_744",
25
+ "root": "awsui_root_tc96w_9rkzq_751",
26
+ "modal-root": "awsui_modal-root_tc96w_9rkzq_752",
27
+ "trigger-button": "awsui_trigger-button_tc96w_9rkzq_753",
28
+ "cancel-button": "awsui_cancel-button_tc96w_9rkzq_754",
29
+ "confirm-button": "awsui_confirm-button_tc96w_9rkzq_755",
30
+ "custom": "awsui_custom_tc96w_9rkzq_756",
31
+ "second-column-small": "awsui_second-column-small_tc96w_9rkzq_760",
32
+ "wrap-lines": "awsui_wrap-lines_tc96w_9rkzq_764",
33
+ "striped-rows": "awsui_striped-rows_tc96w_9rkzq_765",
34
+ "content-density": "awsui_content-density_tc96w_9rkzq_766",
35
+ "page-size": "awsui_page-size_tc96w_9rkzq_767",
36
+ "page-size-form-field": "awsui_page-size-form-field_tc96w_9rkzq_768",
37
+ "page-size-radio-group": "awsui_page-size-radio-group_tc96w_9rkzq_769",
38
+ "sticky-columns": "awsui_sticky-columns_tc96w_9rkzq_770",
39
+ "sticky-columns-form-field": "awsui_sticky-columns-form-field_tc96w_9rkzq_771",
40
+ "sticky-columns-radio-group": "awsui_sticky-columns-radio-group_tc96w_9rkzq_772",
41
+ "sticky-columns-first": "awsui_sticky-columns-first_tc96w_9rkzq_773",
42
+ "sticky-columns-last": "awsui_sticky-columns-last_tc96w_9rkzq_774"
41
43
  };
42
44
 
@@ -278,14 +278,14 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
278
278
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
279
279
  SPDX-License-Identifier: Apache-2.0
280
280
  */
281
- .awsui_visible-content_tc96w_2hh03_281:not(#\9),
282
- .awsui_visible-content-toggle_tc96w_2hh03_282:not(#\9),
283
- .awsui_visible-content-groups_tc96w_2hh03_283:not(#\9),
284
- .awsui_visible-content-group_tc96w_2hh03_283:not(#\9) {
281
+ .awsui_visible-content_tc96w_9rkzq_281:not(#\9),
282
+ .awsui_visible-content-toggle_tc96w_9rkzq_282:not(#\9),
283
+ .awsui_visible-content-groups_tc96w_9rkzq_283:not(#\9),
284
+ .awsui_visible-content-group_tc96w_9rkzq_283:not(#\9) {
285
285
  /* used in test-utils */
286
286
  }
287
287
 
288
- .awsui_visible-content-title_tc96w_2hh03_288:not(#\9) {
288
+ .awsui_visible-content-title_tc96w_9rkzq_288:not(#\9) {
289
289
  font-size: var(--font-size-body-m-x4okxb, 14px);
290
290
  line-height: var(--line-height-body-m-30ar75, 20px);
291
291
  font-weight: var(--font-display-label-weight-815ja9, 700);
@@ -295,13 +295,13 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
295
295
  margin-inline: 0;
296
296
  }
297
297
 
298
- .awsui_visible-content-group-label_tc96w_2hh03_298:not(#\9) {
298
+ .awsui_visible-content-group-label_tc96w_9rkzq_298:not(#\9) {
299
299
  color: var(--color-text-group-label-8pk3es, #424650);
300
300
  padding-block-end: var(--space-xs-zb16t3, 8px);
301
301
  border-block-end: var(--border-divider-list-width-27y3k5, 1px) solid var(--color-border-divider-secondary-alwp8z, #ebebf0);
302
302
  }
303
303
 
304
- .awsui_visible-content-option_tc96w_2hh03_304:not(#\9) {
304
+ .awsui_visible-content-option_tc96w_9rkzq_304:not(#\9) {
305
305
  display: flex;
306
306
  flex-wrap: nowrap;
307
307
  justify-content: space-between;
@@ -310,11 +310,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
310
310
  padding-inline-end: 0px;
311
311
  border-block-end: var(--border-divider-list-width-27y3k5, 1px) solid var(--color-border-divider-secondary-alwp8z, #ebebf0);
312
312
  }
313
- .awsui_visible-content-option_tc96w_2hh03_304:not(#\9):last-child {
313
+ .awsui_visible-content-option_tc96w_9rkzq_304:not(#\9):last-child {
314
314
  border-block-end: none;
315
315
  }
316
316
 
317
- .awsui_visible-content-option-label_tc96w_2hh03_317:not(#\9) {
317
+ .awsui_visible-content-option-label_tc96w_9rkzq_317:not(#\9) {
318
318
  overflow: hidden;
319
319
  text-overflow: ellipsis;
320
320
  padding-inline-end: var(--space-l-t419sm, 20px);
@@ -601,11 +601,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
601
601
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
602
602
  SPDX-License-Identifier: Apache-2.0
603
603
  */
604
- .awsui_content-display-option-toggle_tc96w_2hh03_604:not(#\9) {
604
+ .awsui_content-display-option-toggle_tc96w_9rkzq_604:not(#\9) {
605
605
  /* used in test-utils */
606
606
  }
607
607
 
608
- .awsui_content-display-option-content_tc96w_2hh03_608:not(#\9) {
608
+ .awsui_content-display-option-content_tc96w_9rkzq_608:not(#\9) {
609
609
  border-collapse: separate;
610
610
  border-spacing: 0;
611
611
  box-sizing: border-box;
@@ -651,28 +651,28 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
651
651
  border-end-end-radius: var(--border-radius-item-05df9h, 8px);
652
652
  }
653
653
 
654
- .awsui_content-display-option_tc96w_2hh03_604:not(#\9) {
654
+ .awsui_content-display-option_tc96w_9rkzq_604:not(#\9) {
655
655
  list-style: none;
656
656
  position: relative;
657
657
  border-block-start: var(--border-divider-list-width-27y3k5, 1px) solid var(--color-border-divider-secondary-alwp8z, #ebebf0);
658
658
  }
659
- .awsui_content-display-option_tc96w_2hh03_604:not(#\9):not(.awsui_placeholder_tc96w_2hh03_658).awsui_sorting_tc96w_2hh03_658 {
659
+ .awsui_content-display-option_tc96w_9rkzq_604:not(#\9):not(.awsui_placeholder_tc96w_9rkzq_658).awsui_sorting_tc96w_9rkzq_658 {
660
660
  transition: transform var(--motion-duration-transition-quick-6npj01, 90ms) var(--motion-easing-transition-quick-l9jfsx, linear);
661
661
  }
662
662
  @media (prefers-reduced-motion: reduce) {
663
- .awsui_content-display-option_tc96w_2hh03_604:not(#\9):not(.awsui_placeholder_tc96w_2hh03_658).awsui_sorting_tc96w_2hh03_658 {
663
+ .awsui_content-display-option_tc96w_9rkzq_604:not(#\9):not(.awsui_placeholder_tc96w_9rkzq_658).awsui_sorting_tc96w_9rkzq_658 {
664
664
  animation: none;
665
665
  transition: none;
666
666
  }
667
667
  }
668
- .awsui-motion-disabled .awsui_content-display-option_tc96w_2hh03_604:not(#\9):not(.awsui_placeholder_tc96w_2hh03_658).awsui_sorting_tc96w_2hh03_658, .awsui-mode-entering .awsui_content-display-option_tc96w_2hh03_604:not(#\9):not(.awsui_placeholder_tc96w_2hh03_658).awsui_sorting_tc96w_2hh03_658 {
668
+ .awsui-motion-disabled .awsui_content-display-option_tc96w_9rkzq_604:not(#\9):not(.awsui_placeholder_tc96w_9rkzq_658).awsui_sorting_tc96w_9rkzq_658, .awsui-mode-entering .awsui_content-display-option_tc96w_9rkzq_604:not(#\9):not(.awsui_placeholder_tc96w_9rkzq_658).awsui_sorting_tc96w_9rkzq_658 {
669
669
  animation: none;
670
670
  transition: none;
671
671
  }
672
- .awsui_content-display-option_tc96w_2hh03_604.awsui_placeholder_tc96w_2hh03_658 > .awsui_content-display-option-content_tc96w_2hh03_608:not(#\9) {
672
+ .awsui_content-display-option_tc96w_9rkzq_604.awsui_placeholder_tc96w_9rkzq_658 > .awsui_content-display-option-content_tc96w_9rkzq_608:not(#\9) {
673
673
  position: relative;
674
674
  }
675
- .awsui_content-display-option_tc96w_2hh03_604.awsui_placeholder_tc96w_2hh03_658 > .awsui_content-display-option-content_tc96w_2hh03_608:not(#\9):after {
675
+ .awsui_content-display-option_tc96w_9rkzq_604.awsui_placeholder_tc96w_9rkzq_658 > .awsui_content-display-option-content_tc96w_9rkzq_608:not(#\9):after {
676
676
  content: " ";
677
677
  position: absolute;
678
678
  inset: 0;
@@ -683,28 +683,28 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
683
683
  border-end-end-radius: var(--border-radius-item-05df9h, 8px);
684
684
  }
685
685
 
686
- .awsui_content-display-option-label_tc96w_2hh03_685:not(#\9) {
686
+ .awsui_content-display-option-label_tc96w_9rkzq_685:not(#\9) {
687
687
  flex-grow: 1;
688
688
  min-inline-size: 0;
689
689
  word-break: break-word;
690
690
  padding-inline-end: var(--space-l-t419sm, 20px);
691
691
  }
692
692
 
693
- .awsui_drag-overlay_tc96w_2hh03_692:not(#\9) {
693
+ .awsui_drag-overlay_tc96w_9rkzq_692:not(#\9) {
694
694
  box-shadow: var(--shadow-container-active-kl29x9, 0px 1px 1px 1px #e9ebed, 0px 6px 36px rgba(0, 7, 22, 0.1019607843));
695
695
  border-start-start-radius: var(--border-radius-item-05df9h, 8px);
696
696
  border-start-end-radius: var(--border-radius-item-05df9h, 8px);
697
697
  border-end-start-radius: var(--border-radius-item-05df9h, 8px);
698
698
  border-end-end-radius: var(--border-radius-item-05df9h, 8px);
699
699
  }
700
- body[data-awsui-focus-visible=true] .awsui_drag-overlay_tc96w_2hh03_692:not(#\9) {
700
+ body[data-awsui-focus-visible=true] .awsui_drag-overlay_tc96w_9rkzq_692:not(#\9) {
701
701
  position: relative;
702
702
  }
703
- body[data-awsui-focus-visible=true] .awsui_drag-overlay_tc96w_2hh03_692:not(#\9) {
703
+ body[data-awsui-focus-visible=true] .awsui_drag-overlay_tc96w_9rkzq_692:not(#\9) {
704
704
  outline: 2px dotted transparent;
705
705
  outline-offset: calc(0px - 1px);
706
706
  }
707
- body[data-awsui-focus-visible=true] .awsui_drag-overlay_tc96w_2hh03_692:not(#\9)::before {
707
+ body[data-awsui-focus-visible=true] .awsui_drag-overlay_tc96w_9rkzq_692:not(#\9)::before {
708
708
  content: " ";
709
709
  display: block;
710
710
  position: absolute;
@@ -719,11 +719,13 @@ body[data-awsui-focus-visible=true] .awsui_drag-overlay_tc96w_2hh03_692:not(#\9)
719
719
  box-shadow: 0 0 0 2px var(--color-border-item-focused-nv6mhz, #006ce0);
720
720
  }
721
721
 
722
- .awsui_content-display_tc96w_2hh03_604:not(#\9) {
722
+ .awsui_content-display_tc96w_9rkzq_604:not(#\9),
723
+ .awsui_content-display-text-filter_tc96w_9rkzq_722:not(#\9),
724
+ .awsui_content-display-no-match_tc96w_9rkzq_723:not(#\9) {
723
725
  /* used in test-utils */
724
726
  }
725
727
 
726
- .awsui_content-display-title_tc96w_2hh03_725:not(#\9) {
728
+ .awsui_content-display-title_tc96w_9rkzq_727:not(#\9) {
727
729
  font-size: var(--font-size-body-m-x4okxb, 14px);
728
730
  line-height: var(--line-height-body-m-30ar75, 20px);
729
731
  font-weight: var(--font-display-label-weight-815ja9, 700);
@@ -732,7 +734,7 @@ body[data-awsui-focus-visible=true] .awsui_drag-overlay_tc96w_2hh03_692:not(#\9)
732
734
  margin-inline: 0;
733
735
  }
734
736
 
735
- .awsui_content-display-description_tc96w_2hh03_734:not(#\9) {
737
+ .awsui_content-display-description_tc96w_9rkzq_736:not(#\9) {
736
738
  color: var(--color-text-form-secondary-54emib, #656871);
737
739
  font-size: var(--font-size-body-s-asqx2i, 12px);
738
740
  line-height: var(--line-height-body-s-7zv1j5, 16px);
@@ -740,36 +742,36 @@ body[data-awsui-focus-visible=true] .awsui_drag-overlay_tc96w_2hh03_692:not(#\9)
740
742
  margin-block-start: var(--space-scaled-xxxs-27y4hv, 2px);
741
743
  }
742
744
 
743
- .awsui_content-display-option-list_tc96w_2hh03_742:not(#\9) {
745
+ .awsui_content-display-option-list_tc96w_9rkzq_744:not(#\9) {
744
746
  position: relative;
745
747
  list-style: none;
746
748
  padding-block: 0;
747
749
  padding-inline: 0;
748
750
  }
749
751
 
750
- .awsui_root_tc96w_2hh03_749:not(#\9),
751
- .awsui_modal-root_tc96w_2hh03_750:not(#\9),
752
- .awsui_trigger-button_tc96w_2hh03_751:not(#\9),
753
- .awsui_cancel-button_tc96w_2hh03_752:not(#\9),
754
- .awsui_confirm-button_tc96w_2hh03_753:not(#\9),
755
- .awsui_custom_tc96w_2hh03_754:not(#\9) {
752
+ .awsui_root_tc96w_9rkzq_751:not(#\9),
753
+ .awsui_modal-root_tc96w_9rkzq_752:not(#\9),
754
+ .awsui_trigger-button_tc96w_9rkzq_753:not(#\9),
755
+ .awsui_cancel-button_tc96w_9rkzq_754:not(#\9),
756
+ .awsui_confirm-button_tc96w_9rkzq_755:not(#\9),
757
+ .awsui_custom_tc96w_9rkzq_756:not(#\9) {
756
758
  /* used in test-utils */
757
759
  }
758
760
 
759
- .awsui_second-column-small_tc96w_2hh03_758:not(#\9) {
761
+ .awsui_second-column-small_tc96w_9rkzq_760:not(#\9) {
760
762
  padding-block-start: calc(2 * var(--space-scaled-l-0hpmd7, 20px));
761
763
  }
762
764
 
763
- .awsui_wrap-lines_tc96w_2hh03_762:not(#\9),
764
- .awsui_striped-rows_tc96w_2hh03_763:not(#\9),
765
- .awsui_content-density_tc96w_2hh03_764:not(#\9),
766
- .awsui_page-size_tc96w_2hh03_765:not(#\9),
767
- .awsui_page-size-form-field_tc96w_2hh03_766:not(#\9),
768
- .awsui_page-size-radio-group_tc96w_2hh03_767:not(#\9),
769
- .awsui_sticky-columns_tc96w_2hh03_768:not(#\9),
770
- .awsui_sticky-columns-form-field_tc96w_2hh03_769:not(#\9),
771
- .awsui_sticky-columns-radio-group_tc96w_2hh03_770:not(#\9),
772
- .awsui_sticky-columns-first_tc96w_2hh03_771:not(#\9),
773
- .awsui_sticky-columns-last_tc96w_2hh03_772:not(#\9) {
765
+ .awsui_wrap-lines_tc96w_9rkzq_764:not(#\9),
766
+ .awsui_striped-rows_tc96w_9rkzq_765:not(#\9),
767
+ .awsui_content-density_tc96w_9rkzq_766:not(#\9),
768
+ .awsui_page-size_tc96w_9rkzq_767:not(#\9),
769
+ .awsui_page-size-form-field_tc96w_9rkzq_768:not(#\9),
770
+ .awsui_page-size-radio-group_tc96w_9rkzq_769:not(#\9),
771
+ .awsui_sticky-columns_tc96w_9rkzq_770:not(#\9),
772
+ .awsui_sticky-columns-form-field_tc96w_9rkzq_771:not(#\9),
773
+ .awsui_sticky-columns-radio-group_tc96w_9rkzq_772:not(#\9),
774
+ .awsui_sticky-columns-first_tc96w_9rkzq_773:not(#\9),
775
+ .awsui_sticky-columns-last_tc96w_9rkzq_774:not(#\9) {
774
776
  /* used in test-utils */
775
777
  }