@cloudscape-design/components 3.0.1013 → 3.0.1015

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 (155) hide show
  1. package/collection-preferences/content-display/content-display-option.d.ts +0 -2
  2. package/collection-preferences/content-display/content-display-option.d.ts.map +1 -1
  3. package/collection-preferences/content-display/content-display-option.js +1 -4
  4. package/collection-preferences/content-display/content-display-option.js.map +1 -1
  5. package/collection-preferences/content-display/index.d.ts.map +1 -1
  6. package/collection-preferences/content-display/index.js +17 -24
  7. package/collection-preferences/content-display/index.js.map +1 -1
  8. package/collection-preferences/interfaces.d.ts +2 -7
  9. package/collection-preferences/interfaces.d.ts.map +1 -1
  10. package/collection-preferences/interfaces.js.map +1 -1
  11. package/collection-preferences/styles.css.js +36 -38
  12. package/collection-preferences/styles.scoped.css +39 -51
  13. package/collection-preferences/styles.selectors.js +36 -38
  14. package/flashbar/collapsible-flashbar.d.ts +1 -9
  15. package/flashbar/collapsible-flashbar.d.ts.map +1 -1
  16. package/flashbar/collapsible-flashbar.js +3 -50
  17. package/flashbar/collapsible-flashbar.js.map +1 -1
  18. package/flashbar/flash.d.ts.map +1 -1
  19. package/flashbar/flash.js +5 -27
  20. package/flashbar/flash.js.map +1 -1
  21. package/flashbar/interfaces.d.ts +51 -9
  22. package/flashbar/interfaces.d.ts.map +1 -1
  23. package/flashbar/interfaces.js.map +1 -1
  24. package/flashbar/style.d.ts +35 -0
  25. package/flashbar/style.d.ts.map +1 -0
  26. package/flashbar/style.js +105 -0
  27. package/flashbar/style.js.map +1 -0
  28. package/flashbar/styles.css.js +50 -50
  29. package/flashbar/styles.scoped.css +153 -152
  30. package/flashbar/styles.selectors.js +50 -50
  31. package/i18n/messages/all.all.js +1 -1
  32. package/i18n/messages/all.all.json +1 -1
  33. package/i18n/messages/all.ar.js +1 -1
  34. package/i18n/messages/all.ar.json +1 -1
  35. package/i18n/messages/all.de.js +1 -1
  36. package/i18n/messages/all.de.json +1 -1
  37. package/i18n/messages/all.en-GB.js +1 -1
  38. package/i18n/messages/all.en-GB.json +1 -1
  39. package/i18n/messages/all.en.js +1 -1
  40. package/i18n/messages/all.en.json +1 -1
  41. package/i18n/messages/all.es.js +1 -1
  42. package/i18n/messages/all.es.json +1 -1
  43. package/i18n/messages/all.fr.js +1 -1
  44. package/i18n/messages/all.fr.json +1 -1
  45. package/i18n/messages/all.id.js +1 -1
  46. package/i18n/messages/all.id.json +1 -1
  47. package/i18n/messages/all.it.js +1 -1
  48. package/i18n/messages/all.it.json +1 -1
  49. package/i18n/messages/all.ja.js +1 -1
  50. package/i18n/messages/all.ja.json +1 -1
  51. package/i18n/messages/all.ko.js +1 -1
  52. package/i18n/messages/all.ko.json +1 -1
  53. package/i18n/messages/all.pt-BR.js +1 -1
  54. package/i18n/messages/all.pt-BR.json +1 -1
  55. package/i18n/messages/all.th.js +1 -1
  56. package/i18n/messages/all.th.json +1 -1
  57. package/i18n/messages/all.tr.js +1 -1
  58. package/i18n/messages/all.tr.json +1 -1
  59. package/i18n/messages/all.zh-CN.js +1 -1
  60. package/i18n/messages/all.zh-CN.json +1 -1
  61. package/i18n/messages/all.zh-TW.js +1 -1
  62. package/i18n/messages/all.zh-TW.json +1 -1
  63. package/i18n/messages-types.d.ts +20 -0
  64. package/i18n/messages-types.d.ts.map +1 -1
  65. package/i18n/messages-types.js.map +1 -1
  66. package/index.d.ts +1 -0
  67. package/index.d.ts.map +1 -1
  68. package/index.js +1 -0
  69. package/index.js.map +1 -1
  70. package/internal/base-component/styles.scoped.css +1 -1
  71. package/internal/components/drag-handle/button.d.ts.map +1 -1
  72. package/internal/components/drag-handle/button.js +2 -2
  73. package/internal/components/drag-handle/button.js.map +1 -1
  74. package/internal/components/drag-handle/index.d.ts.map +1 -1
  75. package/internal/components/drag-handle/index.js +2 -2
  76. package/internal/components/drag-handle/index.js.map +1 -1
  77. package/internal/components/drag-handle/interfaces.d.ts +1 -0
  78. package/internal/components/drag-handle/interfaces.d.ts.map +1 -1
  79. package/internal/components/drag-handle/interfaces.js.map +1 -1
  80. package/internal/components/drag-handle/styles.css.js +13 -12
  81. package/internal/components/drag-handle/styles.scoped.css +18 -21
  82. package/internal/components/drag-handle/styles.selectors.js +13 -12
  83. package/internal/components/sortable-area/index.d.ts.map +1 -1
  84. package/internal/components/sortable-area/index.js +5 -1
  85. package/internal/components/sortable-area/index.js.map +1 -1
  86. package/internal/components/sortable-area/interfaces.d.ts +1 -0
  87. package/internal/components/sortable-area/interfaces.d.ts.map +1 -1
  88. package/internal/components/sortable-area/interfaces.js.map +1 -1
  89. package/internal/components/sortable-area/styles.css.js +8 -8
  90. package/internal/components/sortable-area/styles.scoped.css +18 -17
  91. package/internal/components/sortable-area/styles.selectors.js +8 -8
  92. package/internal/components/sortable-area/use-live-announcements.d.ts +5 -0
  93. package/internal/components/sortable-area/use-live-announcements.d.ts.map +1 -1
  94. package/internal/components/sortable-area/use-live-announcements.js +8 -0
  95. package/internal/components/sortable-area/use-live-announcements.js.map +1 -1
  96. package/internal/components/structured-item/index.d.ts +10 -0
  97. package/internal/components/structured-item/index.d.ts.map +1 -0
  98. package/internal/components/structured-item/index.js +16 -0
  99. package/internal/components/structured-item/index.js.map +1 -0
  100. package/internal/components/structured-item/interfaces.d.ts +8 -0
  101. package/internal/components/structured-item/interfaces.d.ts.map +1 -0
  102. package/internal/components/structured-item/interfaces.js +4 -0
  103. package/internal/components/structured-item/interfaces.js.map +1 -0
  104. package/internal/components/structured-item/styles.css.js +11 -0
  105. package/internal/components/structured-item/styles.scoped.css +212 -0
  106. package/internal/components/structured-item/styles.selectors.js +12 -0
  107. package/internal/components/structured-item/test-classes/styles.css.js +9 -0
  108. package/internal/components/structured-item/test-classes/styles.scoped.css +10 -0
  109. package/internal/components/structured-item/test-classes/styles.selectors.js +10 -0
  110. package/internal/environment.js +2 -2
  111. package/internal/environment.json +2 -2
  112. package/internal/manifest.json +1 -1
  113. package/list/index.d.ts +4 -0
  114. package/list/index.d.ts.map +1 -0
  115. package/list/index.js +12 -0
  116. package/list/index.js.map +1 -0
  117. package/list/interfaces.d.ts +82 -0
  118. package/list/interfaces.d.ts.map +1 -0
  119. package/list/interfaces.js +4 -0
  120. package/list/interfaces.js.map +1 -0
  121. package/list/internal.d.ts +21 -0
  122. package/list/internal.d.ts.map +1 -0
  123. package/list/internal.js +62 -0
  124. package/list/internal.js.map +1 -0
  125. package/list/styles.css.js +10 -0
  126. package/list/styles.scoped.css +202 -0
  127. package/list/styles.selectors.js +11 -0
  128. package/list/test-classes/styles.css.js +7 -0
  129. package/list/test-classes/styles.scoped.css +8 -0
  130. package/list/test-classes/styles.selectors.js +8 -0
  131. package/package.json +2 -1
  132. package/test-utils/dom/collection-preferences/content-display-preference.d.ts +2 -0
  133. package/test-utils/dom/collection-preferences/content-display-preference.js +17 -6
  134. package/test-utils/dom/collection-preferences/content-display-preference.js.map +1 -1
  135. package/test-utils/dom/index.d.ts +20 -0
  136. package/test-utils/dom/index.js +13 -2
  137. package/test-utils/dom/index.js.map +1 -1
  138. package/test-utils/dom/internal/structured-item.d.ts +8 -0
  139. package/test-utils/dom/internal/structured-item.js +23 -0
  140. package/test-utils/dom/internal/structured-item.js.map +1 -0
  141. package/test-utils/dom/list/index.d.ts +23 -0
  142. package/test-utils/dom/list/index.js +41 -0
  143. package/test-utils/dom/list/index.js.map +1 -0
  144. package/test-utils/selectors/collection-preferences/content-display-preference.d.ts +2 -0
  145. package/test-utils/selectors/collection-preferences/content-display-preference.js +13 -6
  146. package/test-utils/selectors/collection-preferences/content-display-preference.js.map +1 -1
  147. package/test-utils/selectors/index.d.ts +18 -0
  148. package/test-utils/selectors/index.js +13 -2
  149. package/test-utils/selectors/index.js.map +1 -1
  150. package/test-utils/selectors/internal/structured-item.d.ts +8 -0
  151. package/test-utils/selectors/internal/structured-item.js +23 -0
  152. package/test-utils/selectors/internal/structured-item.js.map +1 -0
  153. package/test-utils/selectors/list/index.d.ts +23 -0
  154. package/test-utils/selectors/list/index.js +41 -0
  155. package/test-utils/selectors/list/index.js.map +1 -0
@@ -1,9 +1,7 @@
1
1
  import React from 'react';
2
- import { DragHandleProps } from '../../internal/components/drag-handle';
3
2
  import { OptionWithVisibility } from './utils';
4
3
  export declare const getClassName: (suffix?: string) => string;
5
4
  interface ContentDisplayOptionProps {
6
- dragHandleProps: DragHandleProps;
7
5
  onToggle?: (option: OptionWithVisibility) => void;
8
6
  option: OptionWithVisibility;
9
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"content-display-option.d.ts","sourceRoot":"","sources":["../../../../src/collection-preferences/content-display/content-display-option.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmC,MAAM,OAAO,CAAC;AAIxD,OAAmB,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAEpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAK/C,eAAO,MAAM,YAAY,YAAa,MAAM,WAAgE,CAAC;AAE7G,UAAU,yBAAyB;IACjC,eAAe,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAClD,MAAM,EAAE,oBAAoB,CAAC;CAC9B;AAED,QAAA,MAAM,oBAAoB,kGAwBzB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"content-display-option.d.ts","sourceRoot":"","sources":["../../../../src/collection-preferences/content-display/content-display-option.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmC,MAAM,OAAO,CAAC;AAKxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAK/C,eAAO,MAAM,YAAY,YAAa,MAAM,WAAgE,CAAC;AAE7G,UAAU,yBAAyB;IACjC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAClD,MAAM,EAAE,oBAAoB,CAAC;CAC9B;AAED,QAAA,MAAM,oBAAoB,kGAoBzB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -2,17 +2,14 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import React, { forwardRef } from 'react';
4
4
  import { useUniqueId } from '@cloudscape-design/component-toolkit/internal';
5
- import DragHandle from '../../internal/components/drag-handle';
6
5
  import InternalToggle from '../../toggle/internal';
7
6
  import styles from '../styles.css.js';
8
7
  const componentPrefix = 'content-display-option';
9
8
  export const getClassName = (suffix) => styles[[componentPrefix, suffix].filter(Boolean).join('-')];
10
- const ContentDisplayOption = forwardRef(({ dragHandleProps, onToggle, option }, ref) => {
9
+ const ContentDisplayOption = forwardRef(({ onToggle, option }, ref) => {
11
10
  const idPrefix = useUniqueId(componentPrefix);
12
11
  const controlId = `${idPrefix}-control-${option.id}`;
13
12
  return (React.createElement("div", { ref: ref, className: getClassName('content') },
14
- React.createElement("div", { className: styles['drag-handle-wrapper'] },
15
- React.createElement(DragHandle, Object.assign({}, dragHandleProps))),
16
13
  React.createElement("label", { className: getClassName('label'), htmlFor: controlId }, option.label),
17
14
  React.createElement("div", { className: getClassName('toggle') },
18
15
  React.createElement(InternalToggle, { checked: !!option.visible, onChange: () => onToggle && onToggle(option), disabled: option.alwaysVisible === true, controlId: controlId }))));
@@ -1 +1 @@
1
- {"version":3,"file":"content-display-option.js","sourceRoot":"","sources":["../../../../src/collection-preferences/content-display/content-display-option.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAgB,UAAU,EAAE,MAAM,OAAO,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5E,OAAO,UAA+B,MAAM,uCAAuC,CAAC;AACpF,OAAO,cAAc,MAAM,uBAAuB,CAAC;AAGnD,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC,MAAM,eAAe,GAAG,wBAAwB,CAAC;AACjD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAe,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAQ7G,MAAM,oBAAoB,GAAG,UAAU,CACrC,CAAC,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,EAA6B,EAAE,GAAiC,EAAE,EAAE;IACtG,MAAM,QAAQ,GAAG,WAAW,CAAC,eAAe,CAAC,CAAC;IAC9C,MAAM,SAAS,GAAG,GAAG,QAAQ,YAAY,MAAM,CAAC,EAAE,EAAE,CAAC;IACrD,OAAO,CACL,6BAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,YAAY,CAAC,SAAS,CAAC;QAC/C,6BAAK,SAAS,EAAE,MAAM,CAAC,qBAAqB,CAAC;YAC3C,oBAAC,UAAU,oBAAK,eAAe,EAAI,CAC/B;QAEN,+BAAO,SAAS,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,SAAS,IACxD,MAAM,CAAC,KAAK,CACP;QACR,6BAAK,SAAS,EAAE,YAAY,CAAC,QAAQ,CAAC;YACpC,oBAAC,cAAc,IACb,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,EACzB,QAAQ,EAAE,GAAG,EAAE,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,CAAC,EAC5C,QAAQ,EAAE,MAAM,CAAC,aAAa,KAAK,IAAI,EACvC,SAAS,EAAE,SAAS,GACpB,CACE,CACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,oBAAoB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { ForwardedRef, forwardRef } from 'react';\n\nimport { useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport DragHandle, { DragHandleProps } from '../../internal/components/drag-handle';\nimport InternalToggle from '../../toggle/internal';\nimport { OptionWithVisibility } from './utils';\n\nimport styles from '../styles.css.js';\n\nconst componentPrefix = 'content-display-option';\nexport const getClassName = (suffix?: string) => styles[[componentPrefix, suffix].filter(Boolean).join('-')];\n\ninterface ContentDisplayOptionProps {\n dragHandleProps: DragHandleProps;\n onToggle?: (option: OptionWithVisibility) => void;\n option: OptionWithVisibility;\n}\n\nconst ContentDisplayOption = forwardRef(\n ({ dragHandleProps, onToggle, option }: ContentDisplayOptionProps, ref: ForwardedRef<HTMLDivElement>) => {\n const idPrefix = useUniqueId(componentPrefix);\n const controlId = `${idPrefix}-control-${option.id}`;\n return (\n <div ref={ref} className={getClassName('content')}>\n <div className={styles['drag-handle-wrapper']}>\n <DragHandle {...dragHandleProps} />\n </div>\n\n <label className={getClassName('label')} htmlFor={controlId}>\n {option.label}\n </label>\n <div className={getClassName('toggle')}>\n <InternalToggle\n checked={!!option.visible}\n onChange={() => onToggle && onToggle(option)}\n disabled={option.alwaysVisible === true}\n controlId={controlId}\n />\n </div>\n </div>\n );\n }\n);\n\nexport default ContentDisplayOption;\n"]}
1
+ {"version":3,"file":"content-display-option.js","sourceRoot":"","sources":["../../../../src/collection-preferences/content-display/content-display-option.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAgB,UAAU,EAAE,MAAM,OAAO,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5E,OAAO,cAAc,MAAM,uBAAuB,CAAC;AAGnD,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC,MAAM,eAAe,GAAG,wBAAwB,CAAC;AACjD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAe,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAO7G,MAAM,oBAAoB,GAAG,UAAU,CACrC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAA6B,EAAE,GAAiC,EAAE,EAAE;IACrF,MAAM,QAAQ,GAAG,WAAW,CAAC,eAAe,CAAC,CAAC;IAC9C,MAAM,SAAS,GAAG,GAAG,QAAQ,YAAY,MAAM,CAAC,EAAE,EAAE,CAAC;IACrD,OAAO,CACL,6BAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,YAAY,CAAC,SAAS,CAAC;QAC/C,+BAAO,SAAS,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,SAAS,IACxD,MAAM,CAAC,KAAK,CACP;QACR,6BAAK,SAAS,EAAE,YAAY,CAAC,QAAQ,CAAC;YACpC,oBAAC,cAAc,IACb,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,EACzB,QAAQ,EAAE,GAAG,EAAE,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,CAAC,EAC5C,QAAQ,EAAE,MAAM,CAAC,aAAa,KAAK,IAAI,EACvC,SAAS,EAAE,SAAS,GACpB,CACE,CACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,oBAAoB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { ForwardedRef, forwardRef } from 'react';\n\nimport { useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport InternalToggle from '../../toggle/internal';\nimport { OptionWithVisibility } from './utils';\n\nimport styles from '../styles.css.js';\n\nconst componentPrefix = 'content-display-option';\nexport const getClassName = (suffix?: string) => styles[[componentPrefix, suffix].filter(Boolean).join('-')];\n\ninterface ContentDisplayOptionProps {\n onToggle?: (option: OptionWithVisibility) => void;\n option: OptionWithVisibility;\n}\n\nconst ContentDisplayOption = forwardRef(\n ({ onToggle, option }: ContentDisplayOptionProps, ref: ForwardedRef<HTMLDivElement>) => {\n const idPrefix = useUniqueId(componentPrefix);\n const controlId = `${idPrefix}-control-${option.id}`;\n return (\n <div ref={ref} className={getClassName('content')}>\n <label className={getClassName('label')} htmlFor={controlId}>\n {option.label}\n </label>\n <div className={getClassName('toggle')}>\n <InternalToggle\n checked={!!option.visible}\n onChange={() => onToggle && onToggle(option)}\n disabled={option.alwaysVisible === true}\n controlId={controlId}\n />\n </div>\n </div>\n );\n }\n);\n\nexport default ContentDisplayOption;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/collection-preferences/content-display/index.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAU3D,UAAU,6BAA8B,SAAQ,0BAA0B,CAAC,wBAAwB;IACjG,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,0BAA0B,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAC;IACxF,KAAK,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,kBAAkB,CAAC,CAAC;CACtE;AAED,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,EAC/C,KAAK,EACL,WAAW,EACX,OAAO,EACP,KAGG,EACH,QAAQ,EACR,0BAA0B,EAC1B,gCAAgC,EAChC,gCAAgC,EAChC,4BAA4B,EAC5B,yBAAyB,EACzB,mBAAmB,EACnB,qBAA6B,EAC7B,WAAW,GACZ,EAAE,6BAA6B,eA8I/B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/collection-preferences/content-display/index.tsx"],"names":[],"mappings":";AAkBA,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAU3D,UAAU,6BAA8B,SAAQ,0BAA0B,CAAC,wBAAwB;IACjG,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,0BAA0B,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAC;IACxF,KAAK,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,kBAAkB,CAAC,CAAC;CACtE;AAED,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,EAC/C,KAAK,EACL,WAAW,EACX,OAAO,EACP,KAGG,EACH,QAAQ,EACR,0BAA0B,EAC1B,gCAAgC,EAChC,gCAAgC,EAChC,4BAA4B,EAC5B,yBAAyB,EACzB,mBAAmB,EACnB,qBAA6B,EAC7B,WAAW,GACZ,EAAE,6BAA6B,eA0H/B"}
@@ -1,16 +1,16 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import React, { useMemo, useState } from 'react';
4
- import clsx from 'clsx';
5
4
  import { useUniqueId } from '@cloudscape-design/component-toolkit/internal';
6
5
  import InternalBox from '../../box/internal';
7
6
  import InternalButton from '../../button/internal';
8
7
  import { useInternalI18n } from '../../i18n/context';
9
- import SortableArea from '../../internal/components/sortable-area';
8
+ import { formatDndItemCommitted, formatDndItemReordered, formatDndStarted, } from '../../internal/components/sortable-area/use-live-announcements';
9
+ import InternalList from '../../list/internal';
10
10
  import InternalSpaceBetween from '../../space-between/internal';
11
11
  import InternalTextFilter from '../../text-filter/internal';
12
12
  import { getAnalyticsInnerContextAttribute } from '../analytics-metadata/utils';
13
- import ContentDisplayOption, { getClassName as getOptionClassName } from './content-display-option';
13
+ import ContentDisplayOption from './content-display-option';
14
14
  import { getFilteredOptions, getSortedOptions } from './utils';
15
15
  import styles from '../styles.css.js';
16
16
  const componentPrefix = 'content-display';
@@ -45,26 +45,19 @@ export default function ContentDisplayPreference({ title, description, options,
45
45
  React.createElement(InternalSpaceBetween, { size: "s", alignItems: "center" },
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
- React.createElement("ul", { className: getClassName('option-list'), "aria-describedby": descriptionId, "aria-labelledby": titleId, role: "list" },
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));
56
- }, i18nStrings: {
57
- liveAnnouncementDndStarted: i18n('contentDisplayPreference.liveAnnouncementDndStarted', liveAnnouncementDndStarted, format => (position, total) => format({ position, total })),
58
- liveAnnouncementDndItemReordered: i18n('contentDisplayPreference.liveAnnouncementDndItemReordered', liveAnnouncementDndItemReordered, format => (initialPosition, currentPosition, total) => format({ currentPosition, total, isInitialPosition: `${initialPosition === currentPosition}` })),
59
- liveAnnouncementDndItemCommitted: i18n('contentDisplayPreference.liveAnnouncementDndItemCommitted', liveAnnouncementDndItemCommitted, format => (initialPosition, finalPosition, total) => format({
60
- initialPosition,
61
- finalPosition,
62
- total,
63
- isInitialPosition: `${initialPosition === finalPosition}`,
64
- })),
65
- liveAnnouncementDndDiscarded: i18n('contentDisplayPreference.liveAnnouncementDndDiscarded', liveAnnouncementDndDiscarded),
66
- dragHandleAriaLabel: i18n('contentDisplayPreference.dragHandleAriaLabel', dragHandleAriaLabel),
67
- dragHandleAriaDescription: i18n('contentDisplayPreference.dragHandleAriaDescription', dragHandleAriaDescription),
68
- } }))));
48
+ React.createElement(InternalList, { items: sortedAndFilteredOptions, renderItem: item => ({
49
+ id: item.id,
50
+ content: React.createElement(ContentDisplayOption, { option: item, onToggle: onToggle }),
51
+ announcementLabel: item.label,
52
+ }), disableItemPaddings: true, sortable: true, sortDisabled: columnFilteringText.trim().length > 0, onSortingChange: ({ detail: { items } }) => {
53
+ onChange(items);
54
+ }, ariaDescribedby: descriptionId, ariaLabelledby: titleId, i18nStrings: {
55
+ liveAnnouncementDndStarted: i18n('contentDisplayPreference.liveAnnouncementDndStarted', liveAnnouncementDndStarted, formatDndStarted),
56
+ liveAnnouncementDndItemReordered: i18n('contentDisplayPreference.liveAnnouncementDndItemReordered', liveAnnouncementDndItemReordered, formatDndItemReordered),
57
+ liveAnnouncementDndItemCommitted: i18n('contentDisplayPreference.liveAnnouncementDndItemCommitted', liveAnnouncementDndItemCommitted, formatDndItemCommitted),
58
+ liveAnnouncementDndDiscarded: i18n('contentDisplayPreference.liveAnnouncementDndDiscarded', liveAnnouncementDndDiscarded),
59
+ dragHandleAriaLabel: i18n('contentDisplayPreference.dragHandleAriaLabel', dragHandleAriaLabel),
60
+ dragHandleAriaDescription: i18n('contentDisplayPreference.dragHandleAriaDescription', dragHandleAriaDescription),
61
+ } })));
69
62
  }
70
63
  //# sourceMappingURL=index.js.map
@@ -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,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5E,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,oBAAoB,MAAM,8BAA8B,CAAC;AAChE,OAAO,kBAAkB,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,iCAAiC,EAAE,MAAM,6BAA6B,CAAC;AAEhF,OAAO,oBAAoB,E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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 { useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport InternalBox from '../../box/internal';\nimport InternalButton from '../../button/internal';\nimport { useInternalI18n } from '../../i18n/context';\nimport SortableArea from '../../internal/components/sortable-area';\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
+ {"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;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5E,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAC7C,OAAO,cAAc,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,gEAAgE,CAAC;AACxE,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,oBAAoB,MAAM,8BAA8B,CAAC;AAChE,OAAO,kBAAkB,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,iCAAiC,EAAE,MAAM,6BAA6B,CAAC;AAEhF,OAAO,oBAAoB,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAwB,MAAM,SAAS,CAAC;AAErF,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC,MAAM,eAAe,GAAG,iBAAiB,CAAC;AAE1C,MAAM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C;YAClB,CAAC,EACD,eAAe,EAAE,aAAa,EAC9B,cAAc,EAAE,OAAO,EACvB,WAAW,EAAE;gBACX,0BAA0B,EAAE,IAAI,CAC9B,qDAAqD,EACrD,0BAA0B,EAC1B,gBAAgB,CACjB;gBACD,gCAAgC,EAAE,IAAI,CACpC,2DAA2D,EAC3D,gCAAgC,EAChC,sBAAsB,CACvB;gBACD,gCAAgC,EAAE,IAAI,CACpC,2DAA2D,EAC3D,gCAAgC,EAChC,sBAAsB,CACvB;gBACD,4BAA4B,EAAE,IAAI,CAChC,uDAAuD,EACvD,4BAA4B,CAC7B;gBACD,mBAAmB,EAAE,IAAI,CAAC,8CAA8C,EAAE,mBAAmB,CAAC;gBAC9F,yBAAyB,EAAE,IAAI,CAC7B,oDAAoD,EACpD,yBAAyB,CAC1B;aACF,GACD,CACE,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';\n\nimport { useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport InternalBox from '../../box/internal';\nimport InternalButton from '../../button/internal';\nimport { useInternalI18n } from '../../i18n/context';\nimport {\n formatDndItemCommitted,\n formatDndItemReordered,\n formatDndStarted,\n} from '../../internal/components/sortable-area/use-live-announcements';\nimport InternalList from '../../list/internal';\nimport InternalSpaceBetween from '../../space-between/internal';\nimport InternalTextFilter from '../../text-filter/internal';\nimport { getAnalyticsInnerContextAttribute } from '../analytics-metadata/utils';\nimport { CollectionPreferencesProps } from '../interfaces';\nimport ContentDisplayOption 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 <InternalList\n items={sortedAndFilteredOptions}\n renderItem={item => ({\n id: item.id,\n content: <ContentDisplayOption option={item} onToggle={onToggle} />,\n announcementLabel: item.label,\n })}\n disableItemPaddings={true}\n sortable={true}\n sortDisabled={columnFilteringText.trim().length > 0}\n onSortingChange={({ detail: { items } }) => {\n onChange(items);\n }}\n ariaDescribedby={descriptionId}\n ariaLabelledby={titleId}\n i18nStrings={{\n liveAnnouncementDndStarted: i18n(\n 'contentDisplayPreference.liveAnnouncementDndStarted',\n liveAnnouncementDndStarted,\n formatDndStarted\n ),\n liveAnnouncementDndItemReordered: i18n(\n 'contentDisplayPreference.liveAnnouncementDndItemReordered',\n liveAnnouncementDndItemReordered,\n formatDndItemReordered\n ),\n liveAnnouncementDndItemCommitted: i18n(\n 'contentDisplayPreference.liveAnnouncementDndItemCommitted',\n liveAnnouncementDndItemCommitted,\n formatDndItemCommitted\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 </div>\n );\n}\n"]}
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { BaseComponentProps } from '../internal/base-component';
3
+ import { SortableAreaProps } from '../internal/components/sortable-area';
3
4
  import { NonCancelableEventHandler } from '../internal/events';
4
5
  import { BaseModalProps } from '../modal/interfaces';
5
6
  export interface CollectionPreferencesProps<CustomPreferenceType = any> extends BaseComponentProps, BaseModalProps {
@@ -217,16 +218,10 @@ export declare namespace CollectionPreferencesProps {
217
218
  contentDisplay?: ReadonlyArray<ContentDisplayItem>;
218
219
  custom?: CustomPreferenceType;
219
220
  }
220
- export interface ContentDisplayPreference {
221
+ export interface ContentDisplayPreference extends SortableAreaProps.DndAreaI18nStrings {
221
222
  title?: string;
222
223
  description?: string;
223
224
  options: ReadonlyArray<CollectionPreferencesProps.ContentDisplayOption>;
224
- liveAnnouncementDndStarted?: (position: number, total: number) => string;
225
- liveAnnouncementDndItemReordered?: (initialPosition: number, currentPosition: number, total: number) => string;
226
- liveAnnouncementDndItemCommitted?: (initialPosition: number, finalPosition: number, total: number) => string;
227
- liveAnnouncementDndDiscarded?: string;
228
- dragHandleAriaLabel?: string;
229
- dragHandleAriaDescription?: string;
230
225
  enableColumnFiltering?: boolean;
231
226
  i18nStrings?: ContentDisplayPreferenceI18nStrings;
232
227
  }
@@ -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,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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
+ {"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,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,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,CAAC;IACtB;;;OAGG;IACH,WAAW,CAAC,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;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 * Adds an aria-label to the close button, for accessibility.\n * @i18n\n */\n closeAriaLabel?: 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 that can be set for both left and right columns.\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 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 the table columns.\n *\n * Recommended for table and not applicable for cards.\n *\n * Cannot be used together with `visibleContentPreference`.\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 * - `description` (string) - Specifies the description displayed below the title.\n * - `options` - Specifies an array of options for reordering and visible content selection.\n * - `enableColumnFiltering` (boolean) - Adds a columns filter.\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 *\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 sections preference for cards or visible columns for table.\n *\n * Recommended for cards. For table use `contentDisplayPreference` instead.\n *\n * Cannot be used together with `contentDisplayPreference`.\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 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 array 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 * Content displayed before the preferences. Use it to display additional information relating to the preferences.\n */\n contentBefore?: React.ReactNode;\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
+ {"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 { SortableAreaProps } from '../internal/components/sortable-area';\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 * Adds an aria-label to the close button, for accessibility.\n * @i18n\n */\n closeAriaLabel?: 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 that can be set for both left and right columns.\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 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 the table columns.\n *\n * Recommended for table and not applicable for cards.\n *\n * Cannot be used together with `visibleContentPreference`.\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 * - `description` (string) - Specifies the description displayed below the title.\n * - `options` - Specifies an array of options for reordering and visible content selection.\n * - `enableColumnFiltering` (boolean) - Adds a columns filter.\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 *\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 sections preference for cards or visible columns for table.\n *\n * Recommended for cards. For table use `contentDisplayPreference` instead.\n *\n * Cannot be used together with `contentDisplayPreference`.\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 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 array 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 * Content displayed before the preferences. Use it to display additional information relating to the preferences.\n */\n contentBefore?: React.ReactNode;\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 extends SortableAreaProps.DndAreaI18nStrings {\n title?: string;\n description?: string;\n options: ReadonlyArray<CollectionPreferencesProps.ContentDisplayOption>;\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,43 +1,41 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "visible-content": "awsui_visible-content_tc96w_p118b_153",
5
- "visible-content-toggle": "awsui_visible-content-toggle_tc96w_p118b_154",
6
- "visible-content-groups": "awsui_visible-content-groups_tc96w_p118b_155",
7
- "visible-content-group": "awsui_visible-content-group_tc96w_p118b_155",
8
- "visible-content-title": "awsui_visible-content-title_tc96w_p118b_160",
9
- "visible-content-group-label": "awsui_visible-content-group-label_tc96w_p118b_170",
10
- "visible-content-option": "awsui_visible-content-option_tc96w_p118b_176",
11
- "visible-content-option-label": "awsui_visible-content-option-label_tc96w_p118b_189",
12
- "content-display-option-toggle": "awsui_content-display-option-toggle_tc96w_p118b_212",
13
- "content-display-option-content": "awsui_content-display-option-content_tc96w_p118b_216",
14
- "content-display-option": "awsui_content-display-option_tc96w_p118b_212",
15
- "content-display-option-label": "awsui_content-display-option-label_tc96w_p118b_264",
16
- "drag-handle-wrapper": "awsui_drag-handle-wrapper_tc96w_p118b_271",
17
- "content-display": "awsui_content-display_tc96w_p118b_212",
18
- "content-display-text-filter": "awsui_content-display-text-filter_tc96w_p118b_276",
19
- "content-display-no-match": "awsui_content-display-no-match_tc96w_p118b_277",
20
- "content-display-title": "awsui_content-display-title_tc96w_p118b_281",
21
- "content-display-description": "awsui_content-display-description_tc96w_p118b_290",
22
- "content-display-option-list": "awsui_content-display-option-list_tc96w_p118b_298",
23
- "root": "awsui_root_tc96w_p118b_305",
24
- "modal-root": "awsui_modal-root_tc96w_p118b_306",
25
- "trigger-button": "awsui_trigger-button_tc96w_p118b_307",
26
- "cancel-button": "awsui_cancel-button_tc96w_p118b_308",
27
- "confirm-button": "awsui_confirm-button_tc96w_p118b_309",
28
- "custom": "awsui_custom_tc96w_p118b_310",
29
- "content-before": "awsui_content-before_tc96w_p118b_311",
30
- "second-column-small": "awsui_second-column-small_tc96w_p118b_315",
31
- "wrap-lines": "awsui_wrap-lines_tc96w_p118b_319",
32
- "striped-rows": "awsui_striped-rows_tc96w_p118b_320",
33
- "content-density": "awsui_content-density_tc96w_p118b_321",
34
- "page-size": "awsui_page-size_tc96w_p118b_322",
35
- "page-size-form-field": "awsui_page-size-form-field_tc96w_p118b_323",
36
- "page-size-radio-group": "awsui_page-size-radio-group_tc96w_p118b_324",
37
- "sticky-columns": "awsui_sticky-columns_tc96w_p118b_325",
38
- "sticky-columns-form-field": "awsui_sticky-columns-form-field_tc96w_p118b_326",
39
- "sticky-columns-radio-group": "awsui_sticky-columns-radio-group_tc96w_p118b_327",
40
- "sticky-columns-first": "awsui_sticky-columns-first_tc96w_p118b_328",
41
- "sticky-columns-last": "awsui_sticky-columns-last_tc96w_p118b_329"
4
+ "visible-content": "awsui_visible-content_tc96w_via2y_153",
5
+ "visible-content-toggle": "awsui_visible-content-toggle_tc96w_via2y_154",
6
+ "visible-content-groups": "awsui_visible-content-groups_tc96w_via2y_155",
7
+ "visible-content-group": "awsui_visible-content-group_tc96w_via2y_155",
8
+ "visible-content-title": "awsui_visible-content-title_tc96w_via2y_160",
9
+ "visible-content-group-label": "awsui_visible-content-group-label_tc96w_via2y_170",
10
+ "visible-content-option": "awsui_visible-content-option_tc96w_via2y_176",
11
+ "visible-content-option-label": "awsui_visible-content-option-label_tc96w_via2y_189",
12
+ "content-display-option-toggle": "awsui_content-display-option-toggle_tc96w_via2y_212",
13
+ "content-display-option-content": "awsui_content-display-option-content_tc96w_via2y_216",
14
+ "content-display-option-label": "awsui_content-display-option-label_tc96w_via2y_256",
15
+ "content-display": "awsui_content-display_tc96w_via2y_212",
16
+ "content-display-text-filter": "awsui_content-display-text-filter_tc96w_via2y_264",
17
+ "content-display-no-match": "awsui_content-display-no-match_tc96w_via2y_265",
18
+ "content-display-title": "awsui_content-display-title_tc96w_via2y_269",
19
+ "content-display-description": "awsui_content-display-description_tc96w_via2y_278",
20
+ "content-display-option-list": "awsui_content-display-option-list_tc96w_via2y_286",
21
+ "root": "awsui_root_tc96w_via2y_293",
22
+ "modal-root": "awsui_modal-root_tc96w_via2y_294",
23
+ "trigger-button": "awsui_trigger-button_tc96w_via2y_295",
24
+ "cancel-button": "awsui_cancel-button_tc96w_via2y_296",
25
+ "confirm-button": "awsui_confirm-button_tc96w_via2y_297",
26
+ "custom": "awsui_custom_tc96w_via2y_298",
27
+ "content-before": "awsui_content-before_tc96w_via2y_299",
28
+ "second-column-small": "awsui_second-column-small_tc96w_via2y_303",
29
+ "wrap-lines": "awsui_wrap-lines_tc96w_via2y_307",
30
+ "striped-rows": "awsui_striped-rows_tc96w_via2y_308",
31
+ "content-density": "awsui_content-density_tc96w_via2y_309",
32
+ "page-size": "awsui_page-size_tc96w_via2y_310",
33
+ "page-size-form-field": "awsui_page-size-form-field_tc96w_via2y_311",
34
+ "page-size-radio-group": "awsui_page-size-radio-group_tc96w_via2y_312",
35
+ "sticky-columns": "awsui_sticky-columns_tc96w_via2y_313",
36
+ "sticky-columns-form-field": "awsui_sticky-columns-form-field_tc96w_via2y_314",
37
+ "sticky-columns-radio-group": "awsui_sticky-columns-radio-group_tc96w_via2y_315",
38
+ "sticky-columns-first": "awsui_sticky-columns-first_tc96w_via2y_316",
39
+ "sticky-columns-last": "awsui_sticky-columns-last_tc96w_via2y_317"
42
40
  };
43
41
 
@@ -150,14 +150,14 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
150
150
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
151
151
  SPDX-License-Identifier: Apache-2.0
152
152
  */
153
- .awsui_visible-content_tc96w_p118b_153:not(#\9),
154
- .awsui_visible-content-toggle_tc96w_p118b_154:not(#\9),
155
- .awsui_visible-content-groups_tc96w_p118b_155:not(#\9),
156
- .awsui_visible-content-group_tc96w_p118b_155:not(#\9) {
153
+ .awsui_visible-content_tc96w_via2y_153:not(#\9),
154
+ .awsui_visible-content-toggle_tc96w_via2y_154:not(#\9),
155
+ .awsui_visible-content-groups_tc96w_via2y_155:not(#\9),
156
+ .awsui_visible-content-group_tc96w_via2y_155:not(#\9) {
157
157
  /* used in test-utils */
158
158
  }
159
159
 
160
- .awsui_visible-content-title_tc96w_p118b_160:not(#\9) {
160
+ .awsui_visible-content-title_tc96w_via2y_160:not(#\9) {
161
161
  font-size: var(--font-size-body-m-a7nh2n, 14px);
162
162
  line-height: var(--line-height-body-m-2mh3ke, 20px);
163
163
  font-weight: var(--font-display-label-weight-zavpeo, 700);
@@ -167,13 +167,13 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
167
167
  margin-inline: 0;
168
168
  }
169
169
 
170
- .awsui_visible-content-group-label_tc96w_p118b_170:not(#\9) {
170
+ .awsui_visible-content-group-label_tc96w_via2y_170:not(#\9) {
171
171
  color: var(--color-text-group-label-a2qc05, #424650);
172
172
  padding-block-end: var(--space-xs-ymlm0b, 8px);
173
173
  border-block-end: var(--border-divider-list-width-tdfx1x, 1px) solid var(--color-border-divider-secondary-qoitch, #ebebf0);
174
174
  }
175
175
 
176
- .awsui_visible-content-option_tc96w_p118b_176:not(#\9) {
176
+ .awsui_visible-content-option_tc96w_via2y_176:not(#\9) {
177
177
  display: flex;
178
178
  flex-wrap: nowrap;
179
179
  justify-content: space-between;
@@ -182,11 +182,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
182
182
  padding-inline-end: 0px;
183
183
  border-block-end: var(--border-divider-list-width-tdfx1x, 1px) solid var(--color-border-divider-secondary-qoitch, #ebebf0);
184
184
  }
185
- .awsui_visible-content-option_tc96w_p118b_176:not(#\9):last-child {
185
+ .awsui_visible-content-option_tc96w_via2y_176:not(#\9):last-child {
186
186
  border-block-end: none;
187
187
  }
188
188
 
189
- .awsui_visible-content-option-label_tc96w_p118b_189:not(#\9) {
189
+ .awsui_visible-content-option-label_tc96w_via2y_189:not(#\9) {
190
190
  overflow: hidden;
191
191
  text-overflow: ellipsis;
192
192
  padding-inline-end: var(--space-l-2ud1p3, 20px);
@@ -209,11 +209,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
209
209
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
210
210
  SPDX-License-Identifier: Apache-2.0
211
211
  */
212
- .awsui_content-display-option-toggle_tc96w_p118b_212:not(#\9) {
212
+ .awsui_content-display-option-toggle_tc96w_via2y_212:not(#\9) {
213
213
  /* used in test-utils */
214
214
  }
215
215
 
216
- .awsui_content-display-option-content_tc96w_p118b_216:not(#\9) {
216
+ .awsui_content-display-option-content_tc96w_via2y_216:not(#\9) {
217
217
  border-collapse: separate;
218
218
  border-spacing: 0;
219
219
  box-sizing: border-box;
@@ -245,40 +245,28 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
245
245
  -moz-osx-font-smoothing: auto;
246
246
  display: flex;
247
247
  align-items: flex-start;
248
- padding-block: var(--space-xs-ymlm0b, 8px);
249
- padding-inline-start: 0;
250
- padding-inline-end: var(--space-scaled-xs-xwoogq, 8px);
251
- background-color: var(--color-background-container-content-6u8rvp, #ffffff);
248
+ padding-block: var(--space-scaled-xs-xwoogq, 8px);
249
+ padding-inline-end: var(--space-xs-ymlm0b, 8px);
252
250
  border-start-start-radius: var(--border-radius-item-iwaia5, 8px);
253
251
  border-start-end-radius: var(--border-radius-item-iwaia5, 8px);
254
252
  border-end-start-radius: var(--border-radius-item-iwaia5, 8px);
255
253
  border-end-end-radius: var(--border-radius-item-iwaia5, 8px);
256
254
  }
257
255
 
258
- .awsui_content-display-option_tc96w_p118b_212:not(#\9) {
259
- list-style: none;
260
- position: relative;
261
- border-block-start: var(--border-divider-list-width-tdfx1x, 1px) solid var(--color-border-divider-secondary-qoitch, #ebebf0);
262
- }
263
-
264
- .awsui_content-display-option-label_tc96w_p118b_264:not(#\9) {
256
+ .awsui_content-display-option-label_tc96w_via2y_256:not(#\9) {
265
257
  flex-grow: 1;
266
258
  min-inline-size: 0;
267
259
  word-break: break-word;
268
260
  padding-inline-end: var(--space-l-2ud1p3, 20px);
269
261
  }
270
262
 
271
- .awsui_drag-handle-wrapper_tc96w_p118b_271:not(#\9) {
272
- margin-inline: var(--space-scaled-xxs-pfm1nx, 4px);
273
- }
274
-
275
- .awsui_content-display_tc96w_p118b_212:not(#\9),
276
- .awsui_content-display-text-filter_tc96w_p118b_276:not(#\9),
277
- .awsui_content-display-no-match_tc96w_p118b_277:not(#\9) {
263
+ .awsui_content-display_tc96w_via2y_212:not(#\9),
264
+ .awsui_content-display-text-filter_tc96w_via2y_264:not(#\9),
265
+ .awsui_content-display-no-match_tc96w_via2y_265:not(#\9) {
278
266
  /* used in test-utils */
279
267
  }
280
268
 
281
- .awsui_content-display-title_tc96w_p118b_281:not(#\9) {
269
+ .awsui_content-display-title_tc96w_via2y_269:not(#\9) {
282
270
  font-size: var(--font-size-body-m-a7nh2n, 14px);
283
271
  line-height: var(--line-height-body-m-2mh3ke, 20px);
284
272
  font-weight: var(--font-display-label-weight-zavpeo, 700);
@@ -287,7 +275,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
287
275
  margin-inline: 0;
288
276
  }
289
277
 
290
- .awsui_content-display-description_tc96w_p118b_290:not(#\9) {
278
+ .awsui_content-display-description_tc96w_via2y_278:not(#\9) {
291
279
  color: var(--color-text-form-secondary-1nm780, #656871);
292
280
  font-size: var(--font-size-body-s-smc8cv, 12px);
293
281
  line-height: var(--line-height-body-s-nu5hx1, 16px);
@@ -295,37 +283,37 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
295
283
  margin-block-start: var(--space-scaled-xxxs-oo06c7, 2px);
296
284
  }
297
285
 
298
- .awsui_content-display-option-list_tc96w_p118b_298:not(#\9) {
286
+ .awsui_content-display-option-list_tc96w_via2y_286:not(#\9) {
299
287
  position: relative;
300
288
  list-style: none;
301
289
  padding-block: 0;
302
290
  padding-inline: 0;
303
291
  }
304
292
 
305
- .awsui_root_tc96w_p118b_305:not(#\9),
306
- .awsui_modal-root_tc96w_p118b_306:not(#\9),
307
- .awsui_trigger-button_tc96w_p118b_307:not(#\9),
308
- .awsui_cancel-button_tc96w_p118b_308:not(#\9),
309
- .awsui_confirm-button_tc96w_p118b_309:not(#\9),
310
- .awsui_custom_tc96w_p118b_310:not(#\9),
311
- .awsui_content-before_tc96w_p118b_311:not(#\9) {
293
+ .awsui_root_tc96w_via2y_293:not(#\9),
294
+ .awsui_modal-root_tc96w_via2y_294:not(#\9),
295
+ .awsui_trigger-button_tc96w_via2y_295:not(#\9),
296
+ .awsui_cancel-button_tc96w_via2y_296:not(#\9),
297
+ .awsui_confirm-button_tc96w_via2y_297:not(#\9),
298
+ .awsui_custom_tc96w_via2y_298:not(#\9),
299
+ .awsui_content-before_tc96w_via2y_299:not(#\9) {
312
300
  /* used in test-utils */
313
301
  }
314
302
 
315
- .awsui_second-column-small_tc96w_p118b_315:not(#\9) {
303
+ .awsui_second-column-small_tc96w_via2y_303:not(#\9) {
316
304
  padding-block-start: calc(2 * var(--space-scaled-l-sej05l, 20px));
317
305
  }
318
306
 
319
- .awsui_wrap-lines_tc96w_p118b_319:not(#\9),
320
- .awsui_striped-rows_tc96w_p118b_320:not(#\9),
321
- .awsui_content-density_tc96w_p118b_321:not(#\9),
322
- .awsui_page-size_tc96w_p118b_322:not(#\9),
323
- .awsui_page-size-form-field_tc96w_p118b_323:not(#\9),
324
- .awsui_page-size-radio-group_tc96w_p118b_324:not(#\9),
325
- .awsui_sticky-columns_tc96w_p118b_325:not(#\9),
326
- .awsui_sticky-columns-form-field_tc96w_p118b_326:not(#\9),
327
- .awsui_sticky-columns-radio-group_tc96w_p118b_327:not(#\9),
328
- .awsui_sticky-columns-first_tc96w_p118b_328:not(#\9),
329
- .awsui_sticky-columns-last_tc96w_p118b_329:not(#\9) {
307
+ .awsui_wrap-lines_tc96w_via2y_307:not(#\9),
308
+ .awsui_striped-rows_tc96w_via2y_308:not(#\9),
309
+ .awsui_content-density_tc96w_via2y_309:not(#\9),
310
+ .awsui_page-size_tc96w_via2y_310:not(#\9),
311
+ .awsui_page-size-form-field_tc96w_via2y_311:not(#\9),
312
+ .awsui_page-size-radio-group_tc96w_via2y_312:not(#\9),
313
+ .awsui_sticky-columns_tc96w_via2y_313:not(#\9),
314
+ .awsui_sticky-columns-form-field_tc96w_via2y_314:not(#\9),
315
+ .awsui_sticky-columns-radio-group_tc96w_via2y_315:not(#\9),
316
+ .awsui_sticky-columns-first_tc96w_via2y_316:not(#\9),
317
+ .awsui_sticky-columns-last_tc96w_via2y_317:not(#\9) {
330
318
  /* used in test-utils */
331
319
  }