@cloudscape-design/components-themeable 3.0.866 → 3.0.868

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 (93) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/collection-preferences/content-display/content-display-option.scss +4 -30
  3. package/lib/internal/scss/internal/components/dnd-area/styles.scss +70 -0
  4. package/lib/internal/template/collection-preferences/content-display/content-display-option.d.ts +1 -2
  5. package/lib/internal/template/collection-preferences/content-display/content-display-option.d.ts.map +1 -1
  6. package/lib/internal/template/collection-preferences/content-display/content-display-option.js +2 -2
  7. package/lib/internal/template/collection-preferences/content-display/content-display-option.js.map +1 -1
  8. package/lib/internal/template/collection-preferences/content-display/index.d.ts.map +1 -1
  9. package/lib/internal/template/collection-preferences/content-display/index.js +4 -6
  10. package/lib/internal/template/collection-preferences/content-display/index.js.map +1 -1
  11. package/lib/internal/template/collection-preferences/content-display/styles.css.js +10 -12
  12. package/lib/internal/template/collection-preferences/content-display/styles.scoped.css +10 -36
  13. package/lib/internal/template/collection-preferences/content-display/styles.selectors.js +10 -12
  14. package/lib/internal/template/collection-preferences/styles.css.js +36 -38
  15. package/lib/internal/template/collection-preferences/styles.scoped.css +37 -63
  16. package/lib/internal/template/collection-preferences/styles.selectors.js +36 -38
  17. package/lib/internal/template/form/index.js +1 -1
  18. package/lib/internal/template/form/index.js.map +1 -1
  19. package/lib/internal/template/internal/analytics/components/analytics-funnel.d.ts +1 -1
  20. package/lib/internal/template/internal/analytics/components/analytics-funnel.d.ts.map +1 -1
  21. package/lib/internal/template/internal/analytics/components/analytics-funnel.js +3 -3
  22. package/lib/internal/template/internal/analytics/components/analytics-funnel.js.map +1 -1
  23. package/lib/internal/template/internal/components/dnd-area/index.d.ts +4 -0
  24. package/lib/internal/template/internal/components/dnd-area/index.d.ts.map +1 -0
  25. package/lib/internal/template/internal/components/{dnd-container → dnd-area}/index.js +13 -15
  26. package/lib/internal/template/internal/components/dnd-area/index.js.map +1 -0
  27. package/lib/internal/template/internal/components/{dnd-container → dnd-area}/interfaces.d.ts +13 -14
  28. package/lib/internal/template/internal/components/dnd-area/interfaces.d.ts.map +1 -0
  29. package/lib/internal/template/internal/components/dnd-area/interfaces.js.map +1 -0
  30. package/lib/internal/template/internal/components/dnd-area/keyboard-sensor/defaults.d.ts.map +1 -0
  31. package/lib/internal/template/internal/components/dnd-area/keyboard-sensor/defaults.js.map +1 -0
  32. package/lib/internal/template/internal/components/dnd-area/keyboard-sensor/index.d.ts.map +1 -0
  33. package/lib/internal/template/internal/components/dnd-area/keyboard-sensor/index.js.map +1 -0
  34. package/lib/internal/template/internal/components/dnd-area/keyboard-sensor/utilities/events.d.ts.map +1 -0
  35. package/lib/internal/template/internal/components/dnd-area/keyboard-sensor/utilities/events.js.map +1 -0
  36. package/lib/internal/template/internal/components/dnd-area/keyboard-sensor/utilities/listeners.d.ts.map +1 -0
  37. package/lib/internal/template/internal/components/dnd-area/keyboard-sensor/utilities/listeners.js.map +1 -0
  38. package/lib/internal/template/internal/components/dnd-area/keyboard-sensor/utilities/scroll.d.ts.map +1 -0
  39. package/lib/internal/template/internal/components/dnd-area/keyboard-sensor/utilities/scroll.js.map +1 -0
  40. package/lib/internal/template/internal/components/dnd-area/styles.css.js +13 -0
  41. package/lib/internal/template/internal/components/{dnd-container → dnd-area}/styles.scoped.css +79 -4
  42. package/lib/internal/template/internal/components/dnd-area/styles.selectors.js +14 -0
  43. package/lib/internal/template/internal/components/{dnd-container → dnd-area}/use-drag-and-drop-reorder.d.ts +2 -2
  44. package/lib/internal/template/internal/components/dnd-area/use-drag-and-drop-reorder.d.ts.map +1 -0
  45. package/lib/internal/template/internal/components/dnd-area/use-drag-and-drop-reorder.js.map +1 -0
  46. package/lib/internal/template/internal/components/{dnd-container → dnd-area}/use-live-announcements.d.ts +3 -3
  47. package/lib/internal/template/internal/components/dnd-area/use-live-announcements.d.ts.map +1 -0
  48. package/lib/internal/template/internal/components/dnd-area/use-live-announcements.js.map +1 -0
  49. package/lib/internal/template/internal/components/drag-handle/index.d.ts +7 -5
  50. package/lib/internal/template/internal/components/drag-handle/index.d.ts.map +1 -1
  51. package/lib/internal/template/internal/components/drag-handle/index.js +2 -3
  52. package/lib/internal/template/internal/components/drag-handle/index.js.map +1 -1
  53. package/lib/internal/template/internal/environment.js +1 -1
  54. package/lib/internal/template/internal/environment.json +1 -1
  55. package/lib/internal/template/modal/index.d.ts.map +1 -1
  56. package/lib/internal/template/modal/index.js +6 -2
  57. package/lib/internal/template/modal/index.js.map +1 -1
  58. package/package.json +1 -1
  59. package/lib/internal/scss/internal/components/dnd-container/styles.scss +0 -21
  60. package/lib/internal/template/internal/components/dnd-container/index.d.ts +0 -4
  61. package/lib/internal/template/internal/components/dnd-container/index.d.ts.map +0 -1
  62. package/lib/internal/template/internal/components/dnd-container/index.js.map +0 -1
  63. package/lib/internal/template/internal/components/dnd-container/interfaces.d.ts.map +0 -1
  64. package/lib/internal/template/internal/components/dnd-container/interfaces.js.map +0 -1
  65. package/lib/internal/template/internal/components/dnd-container/keyboard-sensor/defaults.d.ts.map +0 -1
  66. package/lib/internal/template/internal/components/dnd-container/keyboard-sensor/defaults.js.map +0 -1
  67. package/lib/internal/template/internal/components/dnd-container/keyboard-sensor/index.d.ts.map +0 -1
  68. package/lib/internal/template/internal/components/dnd-container/keyboard-sensor/index.js.map +0 -1
  69. package/lib/internal/template/internal/components/dnd-container/keyboard-sensor/utilities/events.d.ts.map +0 -1
  70. package/lib/internal/template/internal/components/dnd-container/keyboard-sensor/utilities/events.js.map +0 -1
  71. package/lib/internal/template/internal/components/dnd-container/keyboard-sensor/utilities/listeners.d.ts.map +0 -1
  72. package/lib/internal/template/internal/components/dnd-container/keyboard-sensor/utilities/listeners.js.map +0 -1
  73. package/lib/internal/template/internal/components/dnd-container/keyboard-sensor/utilities/scroll.d.ts.map +0 -1
  74. package/lib/internal/template/internal/components/dnd-container/keyboard-sensor/utilities/scroll.js.map +0 -1
  75. package/lib/internal/template/internal/components/dnd-container/styles.css.js +0 -6
  76. package/lib/internal/template/internal/components/dnd-container/styles.selectors.js +0 -7
  77. package/lib/internal/template/internal/components/dnd-container/use-drag-and-drop-reorder.d.ts.map +0 -1
  78. package/lib/internal/template/internal/components/dnd-container/use-drag-and-drop-reorder.js.map +0 -1
  79. package/lib/internal/template/internal/components/dnd-container/use-live-announcements.d.ts.map +0 -1
  80. package/lib/internal/template/internal/components/dnd-container/use-live-announcements.js.map +0 -1
  81. /package/lib/internal/template/internal/components/{dnd-container → dnd-area}/interfaces.js +0 -0
  82. /package/lib/internal/template/internal/components/{dnd-container → dnd-area}/keyboard-sensor/defaults.d.ts +0 -0
  83. /package/lib/internal/template/internal/components/{dnd-container → dnd-area}/keyboard-sensor/defaults.js +0 -0
  84. /package/lib/internal/template/internal/components/{dnd-container → dnd-area}/keyboard-sensor/index.d.ts +0 -0
  85. /package/lib/internal/template/internal/components/{dnd-container → dnd-area}/keyboard-sensor/index.js +0 -0
  86. /package/lib/internal/template/internal/components/{dnd-container → dnd-area}/keyboard-sensor/utilities/events.d.ts +0 -0
  87. /package/lib/internal/template/internal/components/{dnd-container → dnd-area}/keyboard-sensor/utilities/events.js +0 -0
  88. /package/lib/internal/template/internal/components/{dnd-container → dnd-area}/keyboard-sensor/utilities/listeners.d.ts +0 -0
  89. /package/lib/internal/template/internal/components/{dnd-container → dnd-area}/keyboard-sensor/utilities/listeners.js +0 -0
  90. /package/lib/internal/template/internal/components/{dnd-container → dnd-area}/keyboard-sensor/utilities/scroll.d.ts +0 -0
  91. /package/lib/internal/template/internal/components/{dnd-container → dnd-area}/keyboard-sensor/utilities/scroll.js +0 -0
  92. /package/lib/internal/template/internal/components/{dnd-container → dnd-area}/use-drag-and-drop-reorder.js +0 -0
  93. /package/lib/internal/template/internal/components/{dnd-container → dnd-area}/use-live-announcements.js +0 -0
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "e9fab188c5920793e22b07bc34d78485ec8efb40"
2
+ "commit": "d0ecb9aaad86fab076bd04d1c539e844a9c128d7"
3
3
  }
@@ -6,14 +6,6 @@
6
6
  @use '../../internal/styles' as styles;
7
7
  @use '../../internal/styles/tokens' as awsui;
8
8
 
9
- $border-radius: awsui.$border-radius-item;
10
-
11
- @mixin animated {
12
- @include styles.with-motion {
13
- transition: transform awsui.$motion-duration-transition-quick awsui.$motion-easing-transition-quick;
14
- }
15
- }
16
-
17
9
  .content-display-option-toggle {
18
10
  /* used in test-utils */
19
11
  }
@@ -26,34 +18,16 @@ $border-radius: awsui.$border-radius-item;
26
18
  padding-inline-start: 0;
27
19
  padding-inline-end: awsui.$space-scaled-xs;
28
20
  background-color: awsui.$color-background-container-content;
29
- border-start-start-radius: $border-radius;
30
- border-start-end-radius: $border-radius;
31
- border-end-start-radius: $border-radius;
32
- border-end-end-radius: $border-radius;
21
+ border-start-start-radius: awsui.$border-radius-item;
22
+ border-start-end-radius: awsui.$border-radius-item;
23
+ border-end-start-radius: awsui.$border-radius-item;
24
+ border-end-end-radius: awsui.$border-radius-item;
33
25
  }
34
26
 
35
27
  .content-display-option {
36
28
  list-style: none;
37
29
  position: relative;
38
30
  border-block-start: awsui.$border-divider-list-width solid awsui.$color-border-divider-secondary;
39
- &:not(.placeholder).sorting {
40
- @include animated;
41
- }
42
- &.placeholder {
43
- > .content-display-option-content {
44
- position: relative;
45
- &:after {
46
- content: ' ';
47
- position: absolute;
48
- inset: 0;
49
- background: awsui.$color-drag-placeholder-hover;
50
- border-start-start-radius: $border-radius;
51
- border-start-end-radius: $border-radius;
52
- border-end-start-radius: $border-radius;
53
- border-end-end-radius: $border-radius;
54
- }
55
- }
56
- }
57
31
  }
58
32
 
59
33
  .content-display-option-label {
@@ -0,0 +1,70 @@
1
+ /*
2
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ SPDX-License-Identifier: Apache-2.0
4
+ */
5
+
6
+ @use '../../styles' as styles;
7
+ @use '../../styles/tokens' as awsui;
8
+ @use '@cloudscape-design/component-toolkit/internal/focus-visible' as focus-visible;
9
+
10
+ @mixin animated {
11
+ @include styles.with-motion {
12
+ transition: transform awsui.$motion-duration-transition-quick awsui.$motion-easing-transition-quick;
13
+ }
14
+ }
15
+
16
+ @mixin drag-overlay-with-radius($border-radius) {
17
+ border-start-start-radius: $border-radius;
18
+ border-start-end-radius: $border-radius;
19
+ border-end-start-radius: $border-radius;
20
+ border-end-end-radius: $border-radius;
21
+
22
+ @include focus-visible.when-visible-unfocused {
23
+ @include styles.focus-highlight(0px, $border-radius);
24
+ }
25
+ }
26
+
27
+ .drag-overlay {
28
+ box-shadow: awsui.$shadow-container-active;
29
+
30
+ &-item {
31
+ @include drag-overlay-with-radius(awsui.$border-radius-item);
32
+ }
33
+ &-container {
34
+ @include drag-overlay-with-radius(awsui.$border-radius-container);
35
+ }
36
+ }
37
+
38
+ .active {
39
+ @include styles.default-text-style;
40
+ }
41
+
42
+ .placeholder {
43
+ position: relative;
44
+ &:after {
45
+ content: ' ';
46
+ position: absolute;
47
+ inset: 0;
48
+ background: awsui.$color-drag-placeholder-hover;
49
+ }
50
+ &-item {
51
+ &:after {
52
+ border-start-start-radius: awsui.$border-radius-item;
53
+ border-start-end-radius: awsui.$border-radius-item;
54
+ border-end-start-radius: awsui.$border-radius-item;
55
+ border-end-end-radius: awsui.$border-radius-item;
56
+ }
57
+ }
58
+ &-container {
59
+ &:after {
60
+ border-start-start-radius: awsui.$border-radius-container;
61
+ border-start-end-radius: awsui.$border-radius-container;
62
+ border-end-start-radius: awsui.$border-radius-container;
63
+ border-end-end-radius: awsui.$border-radius-container;
64
+ }
65
+ }
66
+ }
67
+
68
+ .sorting {
69
+ @include animated;
70
+ }
@@ -3,8 +3,7 @@ import { DragHandleProps } from '../../internal/components/drag-handle';
3
3
  import { OptionWithVisibility } from './utils';
4
4
  export declare const getClassName: (suffix?: string) => string;
5
5
  interface ContentDisplayOptionProps {
6
- dragHandleAttributes: DragHandleProps['attributes'];
7
- dragHandleListeners?: DragHandleProps['listeners'];
6
+ dragHandleProps: DragHandleProps;
8
7
  onToggle?: (option: OptionWithVisibility) => void;
9
8
  option: OptionWithVisibility;
10
9
  }
@@ -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;AAExD,OAAmB,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAGpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAK/C,eAAO,MAAM,YAAY,YAAa,MAAM,WAAgE,CAAC;AAE7G,UAAU,yBAAyB;IACjC,oBAAoB,EAAE,eAAe,CAAC,YAAY,CAAC,CAAC;IACpD,mBAAmB,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC;IACnD,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAClD,MAAM,EAAE,oBAAoB,CAAC;CAC9B;AAED,QAAA,MAAM,oBAAoB,kGAyBzB,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;AAExD,OAAmB,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAGpF,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,kGAsBzB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -7,11 +7,11 @@ import InternalToggle from '../../toggle/internal';
7
7
  import styles from '../styles.css.js';
8
8
  const componentPrefix = 'content-display-option';
9
9
  export const getClassName = (suffix) => styles[[componentPrefix, suffix].filter(Boolean).join('-')];
10
- const ContentDisplayOption = forwardRef(({ dragHandleAttributes, dragHandleListeners, onToggle, option }, ref) => {
10
+ const ContentDisplayOption = forwardRef(({ dragHandleProps, onToggle, option }, ref) => {
11
11
  const idPrefix = useUniqueId(componentPrefix);
12
12
  const controlId = `${idPrefix}-control-${option.id}`;
13
13
  return (React.createElement("div", { ref: ref, className: getClassName('content') },
14
- React.createElement(DragHandle, { attributes: dragHandleAttributes, listeners: dragHandleListeners }),
14
+ React.createElement(DragHandle, Object.assign({}, dragHandleProps)),
15
15
  React.createElement("label", { className: getClassName('label'), htmlFor: controlId }, option.label),
16
16
  React.createElement("div", { className: getClassName('toggle') },
17
17
  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,UAA+B,MAAM,uCAAuC,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,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;AAS7G,MAAM,oBAAoB,GAAG,UAAU,CACrC,CACE,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,EAA6B,EAC1F,GAAiC,EACjC,EAAE;IACF,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,oBAAC,UAAU,IAAC,UAAU,EAAE,oBAAoB,EAAE,SAAS,EAAE,mBAAmB,GAAI;QAEhF,+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 DragHandle, { DragHandleProps } from '../../internal/components/drag-handle';\nimport { useUniqueId } from '../../internal/hooks/use-unique-id';\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 dragHandleAttributes: DragHandleProps['attributes'];\n dragHandleListeners?: DragHandleProps['listeners'];\n onToggle?: (option: OptionWithVisibility) => void;\n option: OptionWithVisibility;\n}\n\nconst ContentDisplayOption = forwardRef(\n (\n { dragHandleAttributes, dragHandleListeners, onToggle, option }: ContentDisplayOptionProps,\n ref: ForwardedRef<HTMLDivElement>\n ) => {\n const idPrefix = useUniqueId(componentPrefix);\n const controlId = `${idPrefix}-control-${option.id}`;\n return (\n <div ref={ref} className={getClassName('content')}>\n <DragHandle attributes={dragHandleAttributes} listeners={dragHandleListeners} />\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,UAA+B,MAAM,uCAAuC,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,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,oBAAC,UAAU,oBAAK,eAAe,EAAI;QAEnC,+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 DragHandle, { DragHandleProps } from '../../internal/components/drag-handle';\nimport { useUniqueId } from '../../internal/hooks/use-unique-id';\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 <DragHandle {...dragHandleProps} />\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 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/collection-preferences/content-display/index.tsx"],"names":[],"mappings":";AAaA,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,eA0I/B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/collection-preferences/content-display/index.tsx"],"names":[],"mappings":";AAaA,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,eAiJ/B"}
@@ -1,4 +1,3 @@
1
- import { __rest } from "tslib";
2
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
2
  // SPDX-License-Identifier: Apache-2.0
4
3
  import React, { useMemo, useState } from 'react';
@@ -6,7 +5,7 @@ import clsx from 'clsx';
6
5
  import InternalBox from '../../box/internal';
7
6
  import InternalButton from '../../button/internal';
8
7
  import { useInternalI18n } from '../../i18n/context';
9
- import { DndContainer } from '../../internal/components/dnd-container';
8
+ import { DndArea } from '../../internal/components/dnd-area';
10
9
  import { useUniqueId } from '../../internal/hooks/use-unique-id';
11
10
  import InternalSpaceBetween from '../../space-between/internal';
12
11
  import InternalTextFilter from '../../text-filter/internal';
@@ -47,10 +46,9 @@ export default function ContentDisplayPreference({ title, description, options,
47
46
  React.createElement(InternalBox, { margin: { top: 'm' } }, i18n('contentDisplayPreference.i18nStrings.columnFilteringNoMatchText', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.columnFilteringNoMatchText)),
48
47
  React.createElement(InternalButton, { onClick: () => setColumnFilteringText('') }, i18n('contentDisplayPreference.i18nStrings.columnFilteringClearFilterText', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.columnFilteringClearFilterText))))),
49
48
  React.createElement("ul", { className: getClassName('option-list'), "aria-describedby": descriptionId, "aria-labelledby": titleId, role: "list" },
50
- React.createElement(DndContainer, { items: sortedAndFilteredOptions.map(data => ({ id: data.id, label: data.label, data })), onItemsChange: items => onChange(items.map(({ id, data }) => ({ id, visible: data.visible }))), disableReorder: columnFilteringText.trim().length > 0, renderItem: (_a) => {
51
- var { ref, item, isDragging, isSorting, isActive, style } = _a, dragHandle = __rest(_a, ["ref", "item", "isDragging", "isSorting", "isActive", "style"]);
52
- const className = clsx(getOptionClassName(), isDragging && styles.placeholder, isSorting && styles.sorting);
53
- const content = React.createElement(ContentDisplayOption, Object.assign({ ref: ref, option: item.data, onToggle: onToggle }, dragHandle));
49
+ React.createElement(DndArea, { items: sortedAndFilteredOptions.map(data => ({ id: data.id, label: data.label, data })), onItemsChange: items => onChange(items.map(({ id, data }) => ({ id, visible: data.visible }))), disableReorder: columnFilteringText.trim().length > 0, renderItem: ({ ref, item, isSorting, isActive, style, className, dragHandleProps }) => {
50
+ className = clsx(className, getOptionClassName(), isSorting && styles.sorting);
51
+ const content = (React.createElement(ContentDisplayOption, { ref: ref, option: item.data, onToggle: onToggle, dragHandleProps: dragHandleProps }));
54
52
  return isActive ? (content) : (React.createElement("li", { className: className, style: style }, content));
55
53
  }, i18nStrings: {
56
54
  liveAnnouncementDndStarted: i18n('contentDisplayPreference.liveAnnouncementDndStarted', liveAnnouncementDndStarted, format => (position, total) => format({ position, total })),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/collection-preferences/content-display/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAC7C,OAAO,cAAc,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,oBAAoB,MAAM,8BAA8B,CAAC;AACh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D,gCAAgC,EAAE,IAAI,CACpC,2DAA2D,EAC3D,gCAAgC,EAChC,MAAM,CAAC,EAAE,CAAC,CAAC,eAAe,EAAE,eAAe,EAAE,KAAK,EAAE,EAAE,CACpD,MAAM,CAAC,EAAE,eAAe,EAAE,KAAK,EAAE,iBAAiB,EAAE,GAAG,eAAe,KAAK,eAAe,EAAE,EAAE,CAAC,CAClG;oBACD,gCAAgC,EAAE,IAAI,CACpC,2DAA2D,EAC3D,gCAAgC,EAChC,MAAM,CAAC,EAAE,CAAC,CAAC,eAAe,EAAE,aAAa,EAAE,KAAK,EAAE,EAAE,CAClD,MAAM,CAAC;wBACL,eAAe;wBACf,aAAa;wBACb,KAAK;wBACL,iBAAiB,EAAE,GAAG,eAAe,KAAK,aAAa,EAAE;qBAC1D,CAAC,CACL;oBACD,4BAA4B,EAAE,IAAI,CAChC,uDAAuD,EACvD,4BAA4B,CAC7B;oBACD,mBAAmB,EAAE,IAAI,CAAC,8CAA8C,EAAE,mBAAmB,CAAC;oBAC9F,yBAAyB,EAAE,IAAI,CAC7B,oDAAoD,EACpD,yBAAyB,CAC1B;iBACF,GACD,CACC,CACD,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useMemo, useState } from 'react';\nimport clsx from 'clsx';\n\nimport InternalBox from '../../box/internal';\nimport InternalButton from '../../button/internal';\nimport { useInternalI18n } from '../../i18n/context';\nimport { DndContainer } from '../../internal/components/dnd-container';\nimport { useUniqueId } from '../../internal/hooks/use-unique-id';\nimport InternalSpaceBetween from '../../space-between/internal';\nimport InternalTextFilter from '../../text-filter/internal';\nimport { getAnalyticsInnerContextAttribute } from '../analytics-metadata/utils';\nimport { CollectionPreferencesProps } from '../interfaces';\nimport ContentDisplayOption, { getClassName as getOptionClassName } from './content-display-option';\nimport { getFilteredOptions, getSortedOptions, OptionWithVisibility } from './utils';\n\nimport styles from '../styles.css.js';\n\nconst componentPrefix = 'content-display';\n\nconst getClassName = (suffix: string) => styles[`${componentPrefix}-${suffix}`];\n\ninterface ContentDisplayPreferenceProps extends CollectionPreferencesProps.ContentDisplayPreference {\n onChange: (value: ReadonlyArray<CollectionPreferencesProps.ContentDisplayItem>) => void;\n value?: ReadonlyArray<CollectionPreferencesProps.ContentDisplayItem>;\n}\n\nexport default function ContentDisplayPreference({\n title,\n description,\n options,\n value = options.map(({ id }) => ({\n id,\n visible: true,\n })),\n onChange,\n liveAnnouncementDndStarted,\n liveAnnouncementDndItemReordered,\n liveAnnouncementDndItemCommitted,\n liveAnnouncementDndDiscarded,\n dragHandleAriaDescription,\n dragHandleAriaLabel,\n enableColumnFiltering = false,\n i18nStrings,\n}: ContentDisplayPreferenceProps) {\n const idPrefix = useUniqueId(componentPrefix);\n const i18n = useInternalI18n('collection-preferences');\n const [columnFilteringText, setColumnFilteringText] = useState('');\n\n const titleId = `${idPrefix}-title`;\n const descriptionId = `${idPrefix}-description`;\n\n const [sortedOptions, sortedAndFilteredOptions] = useMemo(() => {\n const sorted = getSortedOptions({ options, contentDisplay: value });\n const filtered = getFilteredOptions(sorted, columnFilteringText);\n return [sorted, filtered];\n }, [columnFilteringText, options, value]);\n\n const onToggle = (option: OptionWithVisibility) => {\n // We use sortedOptions as base and not value because there might be options that\n // are not in the value yet, so they're added as non-visible after the known ones.\n onChange(sortedOptions.map(({ id, visible }) => ({ id, visible: id === option.id ? !option.visible : visible })));\n };\n\n return (\n <div className={styles[componentPrefix]} {...getAnalyticsInnerContextAttribute('contentDisplay')}>\n <h3 className={getClassName('title')} id={titleId}>\n {i18n('contentDisplayPreference.title', title)}\n </h3>\n <p className={getClassName('description')} id={descriptionId}>\n {i18n('contentDisplayPreference.description', description)}\n </p>\n\n {/* Filter input */}\n {enableColumnFiltering && (\n <div className={getClassName('text-filter')}>\n <InternalTextFilter\n filteringText={columnFilteringText}\n filteringPlaceholder={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringPlaceholder',\n i18nStrings?.columnFilteringPlaceholder\n )}\n filteringAriaLabel={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringAriaLabel',\n i18nStrings?.columnFilteringAriaLabel\n )}\n filteringClearAriaLabel={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringClearFilterText',\n i18nStrings?.columnFilteringClearFilterText\n )}\n onChange={({ detail }) => setColumnFilteringText(detail.filteringText)}\n countText={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringCountText',\n i18nStrings?.columnFilteringCountText\n ? i18nStrings?.columnFilteringCountText(sortedAndFilteredOptions.length)\n : undefined,\n format => format({ count: sortedAndFilteredOptions.length })\n )}\n />\n </div>\n )}\n\n {/* No match */}\n {sortedAndFilteredOptions.length === 0 && (\n <div className={getClassName('no-match')}>\n <InternalSpaceBetween size=\"s\" alignItems=\"center\">\n <InternalBox margin={{ top: 'm' }}>\n {i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringNoMatchText',\n i18nStrings?.columnFilteringNoMatchText\n )}\n </InternalBox>\n <InternalButton onClick={() => setColumnFilteringText('')}>\n {i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringClearFilterText',\n i18nStrings?.columnFilteringClearFilterText\n )}\n </InternalButton>\n </InternalSpaceBetween>\n </div>\n )}\n\n {/* Use explicit list role to work around Safari not announcing lists as such when list-style is set to none.\n See https://bugs.webkit.org/show_bug.cgi?id=170179 */}\n <ul\n className={getClassName('option-list')}\n aria-describedby={descriptionId}\n aria-labelledby={titleId}\n role=\"list\"\n >\n <DndContainer\n items={sortedAndFilteredOptions.map(data => ({ id: data.id, label: data.label, data }))}\n onItemsChange={items => onChange(items.map(({ id, data }) => ({ id, visible: data.visible })))}\n disableReorder={columnFilteringText.trim().length > 0}\n renderItem={({ ref, item, isDragging, isSorting, isActive, style, ...dragHandle }) => {\n const className = clsx(getOptionClassName(), isDragging && styles.placeholder, isSorting && styles.sorting);\n const content = <ContentDisplayOption ref={ref} option={item.data} onToggle={onToggle} {...dragHandle} />;\n return isActive ? (\n content\n ) : (\n <li className={className} style={style}>\n {content}\n </li>\n );\n }}\n i18nStrings={{\n liveAnnouncementDndStarted: i18n(\n 'contentDisplayPreference.liveAnnouncementDndStarted',\n liveAnnouncementDndStarted,\n format => (position, total) => format({ position, total })\n ),\n liveAnnouncementDndItemReordered: i18n(\n 'contentDisplayPreference.liveAnnouncementDndItemReordered',\n liveAnnouncementDndItemReordered,\n format => (initialPosition, currentPosition, total) =>\n format({ currentPosition, total, isInitialPosition: `${initialPosition === currentPosition}` })\n ),\n liveAnnouncementDndItemCommitted: i18n(\n 'contentDisplayPreference.liveAnnouncementDndItemCommitted',\n liveAnnouncementDndItemCommitted,\n format => (initialPosition, finalPosition, total) =>\n format({\n initialPosition,\n finalPosition,\n total,\n isInitialPosition: `${initialPosition === finalPosition}`,\n })\n ),\n liveAnnouncementDndDiscarded: i18n(\n 'contentDisplayPreference.liveAnnouncementDndDiscarded',\n liveAnnouncementDndDiscarded\n ),\n dragHandleAriaLabel: i18n('contentDisplayPreference.dragHandleAriaLabel', dragHandleAriaLabel),\n dragHandleAriaDescription: i18n(\n 'contentDisplayPreference.dragHandleAriaDescription',\n dragHandleAriaDescription\n ),\n }}\n />\n </ul>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/collection-preferences/content-display/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAC7C,OAAO,cAAc,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC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gCAAgC,EAAE,IAAI,CACpC,2DAA2D,EAC3D,gCAAgC,EAChC,MAAM,CAAC,EAAE,CAAC,CAAC,eAAe,EAAE,eAAe,EAAE,KAAK,EAAE,EAAE,CACpD,MAAM,CAAC,EAAE,eAAe,EAAE,KAAK,EAAE,iBAAiB,EAAE,GAAG,eAAe,KAAK,eAAe,EAAE,EAAE,CAAC,CAClG;oBACD,gCAAgC,EAAE,IAAI,CACpC,2DAA2D,EAC3D,gCAAgC,EAChC,MAAM,CAAC,EAAE,CAAC,CAAC,eAAe,EAAE,aAAa,EAAE,KAAK,EAAE,EAAE,CAClD,MAAM,CAAC;wBACL,eAAe;wBACf,aAAa;wBACb,KAAK;wBACL,iBAAiB,EAAE,GAAG,eAAe,KAAK,aAAa,EAAE;qBAC1D,CAAC,CACL;oBACD,4BAA4B,EAAE,IAAI,CAChC,uDAAuD,EACvD,4BAA4B,CAC7B;oBACD,mBAAmB,EAAE,IAAI,CAAC,8CAA8C,EAAE,mBAAmB,CAAC;oBAC9F,yBAAyB,EAAE,IAAI,CAC7B,oDAAoD,EACpD,yBAAyB,CAC1B;iBACF,GACD,CACC,CACD,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useMemo, useState } from 'react';\nimport clsx from 'clsx';\n\nimport InternalBox from '../../box/internal';\nimport InternalButton from '../../button/internal';\nimport { useInternalI18n } from '../../i18n/context';\nimport { DndArea } from '../../internal/components/dnd-area';\nimport { useUniqueId } from '../../internal/hooks/use-unique-id';\nimport InternalSpaceBetween from '../../space-between/internal';\nimport InternalTextFilter from '../../text-filter/internal';\nimport { getAnalyticsInnerContextAttribute } from '../analytics-metadata/utils';\nimport { CollectionPreferencesProps } from '../interfaces';\nimport ContentDisplayOption, { getClassName as getOptionClassName } from './content-display-option';\nimport { getFilteredOptions, getSortedOptions, OptionWithVisibility } from './utils';\n\nimport styles from '../styles.css.js';\n\nconst componentPrefix = 'content-display';\n\nconst getClassName = (suffix: string) => styles[`${componentPrefix}-${suffix}`];\n\ninterface ContentDisplayPreferenceProps extends CollectionPreferencesProps.ContentDisplayPreference {\n onChange: (value: ReadonlyArray<CollectionPreferencesProps.ContentDisplayItem>) => void;\n value?: ReadonlyArray<CollectionPreferencesProps.ContentDisplayItem>;\n}\n\nexport default function ContentDisplayPreference({\n title,\n description,\n options,\n value = options.map(({ id }) => ({\n id,\n visible: true,\n })),\n onChange,\n liveAnnouncementDndStarted,\n liveAnnouncementDndItemReordered,\n liveAnnouncementDndItemCommitted,\n liveAnnouncementDndDiscarded,\n dragHandleAriaDescription,\n dragHandleAriaLabel,\n enableColumnFiltering = false,\n i18nStrings,\n}: ContentDisplayPreferenceProps) {\n const idPrefix = useUniqueId(componentPrefix);\n const i18n = useInternalI18n('collection-preferences');\n const [columnFilteringText, setColumnFilteringText] = useState('');\n\n const titleId = `${idPrefix}-title`;\n const descriptionId = `${idPrefix}-description`;\n\n const [sortedOptions, sortedAndFilteredOptions] = useMemo(() => {\n const sorted = getSortedOptions({ options, contentDisplay: value });\n const filtered = getFilteredOptions(sorted, columnFilteringText);\n return [sorted, filtered];\n }, [columnFilteringText, options, value]);\n\n const onToggle = (option: OptionWithVisibility) => {\n // We use sortedOptions as base and not value because there might be options that\n // are not in the value yet, so they're added as non-visible after the known ones.\n onChange(sortedOptions.map(({ id, visible }) => ({ id, visible: id === option.id ? !option.visible : visible })));\n };\n\n return (\n <div className={styles[componentPrefix]} {...getAnalyticsInnerContextAttribute('contentDisplay')}>\n <h3 className={getClassName('title')} id={titleId}>\n {i18n('contentDisplayPreference.title', title)}\n </h3>\n <p className={getClassName('description')} id={descriptionId}>\n {i18n('contentDisplayPreference.description', description)}\n </p>\n\n {/* Filter input */}\n {enableColumnFiltering && (\n <div className={getClassName('text-filter')}>\n <InternalTextFilter\n filteringText={columnFilteringText}\n filteringPlaceholder={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringPlaceholder',\n i18nStrings?.columnFilteringPlaceholder\n )}\n filteringAriaLabel={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringAriaLabel',\n i18nStrings?.columnFilteringAriaLabel\n )}\n filteringClearAriaLabel={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringClearFilterText',\n i18nStrings?.columnFilteringClearFilterText\n )}\n onChange={({ detail }) => setColumnFilteringText(detail.filteringText)}\n countText={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringCountText',\n i18nStrings?.columnFilteringCountText\n ? i18nStrings?.columnFilteringCountText(sortedAndFilteredOptions.length)\n : undefined,\n format => format({ count: sortedAndFilteredOptions.length })\n )}\n />\n </div>\n )}\n\n {/* No match */}\n {sortedAndFilteredOptions.length === 0 && (\n <div className={getClassName('no-match')}>\n <InternalSpaceBetween size=\"s\" alignItems=\"center\">\n <InternalBox margin={{ top: 'm' }}>\n {i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringNoMatchText',\n i18nStrings?.columnFilteringNoMatchText\n )}\n </InternalBox>\n <InternalButton onClick={() => setColumnFilteringText('')}>\n {i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringClearFilterText',\n i18nStrings?.columnFilteringClearFilterText\n )}\n </InternalButton>\n </InternalSpaceBetween>\n </div>\n )}\n\n {/* Use explicit list role to work around Safari not announcing lists as such when list-style is set to none.\n See https://bugs.webkit.org/show_bug.cgi?id=170179 */}\n <ul\n className={getClassName('option-list')}\n aria-describedby={descriptionId}\n aria-labelledby={titleId}\n role=\"list\"\n >\n <DndArea\n items={sortedAndFilteredOptions.map(data => ({ id: data.id, label: data.label, data }))}\n onItemsChange={items => onChange(items.map(({ id, data }) => ({ id, visible: data.visible })))}\n disableReorder={columnFilteringText.trim().length > 0}\n renderItem={({ ref, item, isSorting, isActive, style, className, dragHandleProps }) => {\n className = clsx(className, getOptionClassName(), isSorting && styles.sorting);\n const content = (\n <ContentDisplayOption\n ref={ref}\n option={item.data}\n onToggle={onToggle}\n dragHandleProps={dragHandleProps}\n />\n );\n return isActive ? (\n content\n ) : (\n <li className={className} style={style}>\n {content}\n </li>\n );\n }}\n i18nStrings={{\n liveAnnouncementDndStarted: i18n(\n 'contentDisplayPreference.liveAnnouncementDndStarted',\n liveAnnouncementDndStarted,\n format => (position, total) => format({ position, total })\n ),\n liveAnnouncementDndItemReordered: i18n(\n 'contentDisplayPreference.liveAnnouncementDndItemReordered',\n liveAnnouncementDndItemReordered,\n format => (initialPosition, currentPosition, total) =>\n format({ currentPosition, total, isInitialPosition: `${initialPosition === currentPosition}` })\n ),\n liveAnnouncementDndItemCommitted: i18n(\n 'contentDisplayPreference.liveAnnouncementDndItemCommitted',\n liveAnnouncementDndItemCommitted,\n format => (initialPosition, finalPosition, total) =>\n format({\n initialPosition,\n finalPosition,\n total,\n isInitialPosition: `${initialPosition === finalPosition}`,\n })\n ),\n liveAnnouncementDndDiscarded: i18n(\n 'contentDisplayPreference.liveAnnouncementDndDiscarded',\n liveAnnouncementDndDiscarded\n ),\n dragHandleAriaLabel: i18n('contentDisplayPreference.dragHandleAriaLabel', dragHandleAriaLabel),\n dragHandleAriaDescription: i18n(\n 'contentDisplayPreference.dragHandleAriaDescription',\n dragHandleAriaDescription\n ),\n }}\n />\n </ul>\n </div>\n );\n}\n"]}
@@ -1,17 +1,15 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "content-display-option-toggle": "awsui_content-display-option-toggle_1f3h0_1c3gl_289",
5
- "content-display-option-content": "awsui_content-display-option-content_1f3h0_1c3gl_293",
6
- "content-display-option": "awsui_content-display-option_1f3h0_1c3gl_289",
7
- "placeholder": "awsui_placeholder_1f3h0_1c3gl_340",
8
- "sorting": "awsui_sorting_1f3h0_1c3gl_340",
9
- "content-display-option-label": "awsui_content-display-option-label_1f3h0_1c3gl_367",
10
- "content-display": "awsui_content-display_1f3h0_1c3gl_289",
11
- "content-display-text-filter": "awsui_content-display-text-filter_1f3h0_1c3gl_375",
12
- "content-display-no-match": "awsui_content-display-no-match_1f3h0_1c3gl_376",
13
- "content-display-title": "awsui_content-display-title_1f3h0_1c3gl_380",
14
- "content-display-description": "awsui_content-display-description_1f3h0_1c3gl_389",
15
- "content-display-option-list": "awsui_content-display-option-list_1f3h0_1c3gl_397"
4
+ "content-display-option-toggle": "awsui_content-display-option-toggle_1f3h0_1jgk7_289",
5
+ "content-display-option-content": "awsui_content-display-option-content_1f3h0_1jgk7_293",
6
+ "content-display-option": "awsui_content-display-option_1f3h0_1jgk7_289",
7
+ "content-display-option-label": "awsui_content-display-option-label_1f3h0_1jgk7_341",
8
+ "content-display": "awsui_content-display_1f3h0_1jgk7_289",
9
+ "content-display-text-filter": "awsui_content-display-text-filter_1f3h0_1jgk7_349",
10
+ "content-display-no-match": "awsui_content-display-no-match_1f3h0_1jgk7_350",
11
+ "content-display-title": "awsui_content-display-title_1f3h0_1jgk7_354",
12
+ "content-display-description": "awsui_content-display-description_1f3h0_1jgk7_363",
13
+ "content-display-option-list": "awsui_content-display-option-list_1f3h0_1jgk7_371"
16
14
  };
17
15
 
@@ -286,11 +286,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
286
286
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
287
287
  SPDX-License-Identifier: Apache-2.0
288
288
  */
289
- .awsui_content-display-option-toggle_1f3h0_1c3gl_289:not(#\9) {
289
+ .awsui_content-display-option-toggle_1f3h0_1jgk7_289:not(#\9) {
290
290
  /* used in test-utils */
291
291
  }
292
292
 
293
- .awsui_content-display-option-content_1f3h0_1c3gl_293:not(#\9) {
293
+ .awsui_content-display-option-content_1f3h0_1jgk7_293:not(#\9) {
294
294
  border-collapse: separate;
295
295
  border-spacing: 0;
296
296
  box-sizing: border-box;
@@ -333,52 +333,26 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
333
333
  border-end-end-radius: var(--border-radius-item-q4wr0w, 0px);
334
334
  }
335
335
 
336
- .awsui_content-display-option_1f3h0_1c3gl_289:not(#\9) {
336
+ .awsui_content-display-option_1f3h0_1jgk7_289:not(#\9) {
337
337
  list-style: none;
338
338
  position: relative;
339
339
  border-block-start: var(--border-divider-list-width-x6rz7e, 1px) solid var(--color-border-divider-secondary-1xu6lb, #eaeded);
340
340
  }
341
- .awsui_content-display-option_1f3h0_1c3gl_289:not(#\9):not(.awsui_placeholder_1f3h0_1c3gl_340).awsui_sorting_1f3h0_1c3gl_340 {
342
- transition: transform var(--motion-duration-transition-quick-1ym1ir, 90ms) var(--motion-easing-transition-quick-c2tqbv, linear);
343
- }
344
- @media (prefers-reduced-motion: reduce) {
345
- .awsui_content-display-option_1f3h0_1c3gl_289:not(#\9):not(.awsui_placeholder_1f3h0_1c3gl_340).awsui_sorting_1f3h0_1c3gl_340 {
346
- animation: none;
347
- transition: none;
348
- }
349
- }
350
- .awsui-motion-disabled .awsui_content-display-option_1f3h0_1c3gl_289:not(#\9):not(.awsui_placeholder_1f3h0_1c3gl_340).awsui_sorting_1f3h0_1c3gl_340, .awsui-mode-entering .awsui_content-display-option_1f3h0_1c3gl_289:not(#\9):not(.awsui_placeholder_1f3h0_1c3gl_340).awsui_sorting_1f3h0_1c3gl_340 {
351
- animation: none;
352
- transition: none;
353
- }
354
- .awsui_content-display-option_1f3h0_1c3gl_289.awsui_placeholder_1f3h0_1c3gl_340 > .awsui_content-display-option-content_1f3h0_1c3gl_293:not(#\9) {
355
- position: relative;
356
- }
357
- .awsui_content-display-option_1f3h0_1c3gl_289.awsui_placeholder_1f3h0_1c3gl_340 > .awsui_content-display-option-content_1f3h0_1c3gl_293:not(#\9):after {
358
- content: " ";
359
- position: absolute;
360
- inset: 0;
361
- background: var(--color-drag-placeholder-hover-gowvta, #99cbe4);
362
- border-start-start-radius: var(--border-radius-item-q4wr0w, 0px);
363
- border-start-end-radius: var(--border-radius-item-q4wr0w, 0px);
364
- border-end-start-radius: var(--border-radius-item-q4wr0w, 0px);
365
- border-end-end-radius: var(--border-radius-item-q4wr0w, 0px);
366
- }
367
341
 
368
- .awsui_content-display-option-label_1f3h0_1c3gl_367:not(#\9) {
342
+ .awsui_content-display-option-label_1f3h0_1jgk7_341:not(#\9) {
369
343
  flex-grow: 1;
370
344
  min-inline-size: 0;
371
345
  word-break: break-word;
372
346
  padding-inline-end: var(--space-l-eenfqd, 20px);
373
347
  }
374
348
 
375
- .awsui_content-display_1f3h0_1c3gl_289:not(#\9),
376
- .awsui_content-display-text-filter_1f3h0_1c3gl_375:not(#\9),
377
- .awsui_content-display-no-match_1f3h0_1c3gl_376:not(#\9) {
349
+ .awsui_content-display_1f3h0_1jgk7_289:not(#\9),
350
+ .awsui_content-display-text-filter_1f3h0_1jgk7_349:not(#\9),
351
+ .awsui_content-display-no-match_1f3h0_1jgk7_350:not(#\9) {
378
352
  /* used in test-utils */
379
353
  }
380
354
 
381
- .awsui_content-display-title_1f3h0_1c3gl_380:not(#\9) {
355
+ .awsui_content-display-title_1f3h0_1jgk7_354:not(#\9) {
382
356
  font-size: var(--font-size-body-m-6wxxs5, 14px);
383
357
  line-height: var(--line-height-body-m-gw0130, 22px);
384
358
  font-weight: var(--font-display-label-weight-5p8eav, 400);
@@ -387,7 +361,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
387
361
  margin-inline: 0;
388
362
  }
389
363
 
390
- .awsui_content-display-description_1f3h0_1c3gl_389:not(#\9) {
364
+ .awsui_content-display-description_1f3h0_1jgk7_363:not(#\9) {
391
365
  color: var(--color-text-form-secondary-5q4khe, #687078);
392
366
  font-size: var(--font-size-body-s-4dzx5q, 12px);
393
367
  line-height: var(--line-height-body-s-egzl4q, 16px);
@@ -395,7 +369,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
395
369
  margin-block-start: var(--space-scaled-xxxs-6vyqo7, 2px);
396
370
  }
397
371
 
398
- .awsui_content-display-option-list_1f3h0_1c3gl_397:not(#\9) {
372
+ .awsui_content-display-option-list_1f3h0_1jgk7_371:not(#\9) {
399
373
  position: relative;
400
374
  list-style: none;
401
375
  padding-block: 0;
@@ -2,17 +2,15 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "content-display-option-toggle": "awsui_content-display-option-toggle_1f3h0_1c3gl_289",
6
- "content-display-option-content": "awsui_content-display-option-content_1f3h0_1c3gl_293",
7
- "content-display-option": "awsui_content-display-option_1f3h0_1c3gl_289",
8
- "placeholder": "awsui_placeholder_1f3h0_1c3gl_340",
9
- "sorting": "awsui_sorting_1f3h0_1c3gl_340",
10
- "content-display-option-label": "awsui_content-display-option-label_1f3h0_1c3gl_367",
11
- "content-display": "awsui_content-display_1f3h0_1c3gl_289",
12
- "content-display-text-filter": "awsui_content-display-text-filter_1f3h0_1c3gl_375",
13
- "content-display-no-match": "awsui_content-display-no-match_1f3h0_1c3gl_376",
14
- "content-display-title": "awsui_content-display-title_1f3h0_1c3gl_380",
15
- "content-display-description": "awsui_content-display-description_1f3h0_1c3gl_389",
16
- "content-display-option-list": "awsui_content-display-option-list_1f3h0_1c3gl_397"
5
+ "content-display-option-toggle": "awsui_content-display-option-toggle_1f3h0_1jgk7_289",
6
+ "content-display-option-content": "awsui_content-display-option-content_1f3h0_1jgk7_293",
7
+ "content-display-option": "awsui_content-display-option_1f3h0_1jgk7_289",
8
+ "content-display-option-label": "awsui_content-display-option-label_1f3h0_1jgk7_341",
9
+ "content-display": "awsui_content-display_1f3h0_1jgk7_289",
10
+ "content-display-text-filter": "awsui_content-display-text-filter_1f3h0_1jgk7_349",
11
+ "content-display-no-match": "awsui_content-display-no-match_1f3h0_1jgk7_350",
12
+ "content-display-title": "awsui_content-display-title_1f3h0_1jgk7_354",
13
+ "content-display-description": "awsui_content-display-description_1f3h0_1jgk7_363",
14
+ "content-display-option-list": "awsui_content-display-option-list_1f3h0_1jgk7_371"
17
15
  };
18
16
 
@@ -1,43 +1,41 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "visible-content": "awsui_visible-content_tc96w_11461_289",
5
- "visible-content-toggle": "awsui_visible-content-toggle_tc96w_11461_290",
6
- "visible-content-groups": "awsui_visible-content-groups_tc96w_11461_291",
7
- "visible-content-group": "awsui_visible-content-group_tc96w_11461_291",
8
- "visible-content-title": "awsui_visible-content-title_tc96w_11461_296",
9
- "visible-content-group-label": "awsui_visible-content-group-label_tc96w_11461_306",
10
- "visible-content-option": "awsui_visible-content-option_tc96w_11461_312",
11
- "visible-content-option-label": "awsui_visible-content-option-label_tc96w_11461_325",
12
- "content-display-option-toggle": "awsui_content-display-option-toggle_tc96w_11461_620",
13
- "content-display-option-content": "awsui_content-display-option-content_tc96w_11461_624",
14
- "content-display-option": "awsui_content-display-option_tc96w_11461_620",
15
- "placeholder": "awsui_placeholder_tc96w_11461_671",
16
- "sorting": "awsui_sorting_tc96w_11461_671",
17
- "content-display-option-label": "awsui_content-display-option-label_tc96w_11461_698",
18
- "content-display": "awsui_content-display_tc96w_11461_620",
19
- "content-display-text-filter": "awsui_content-display-text-filter_tc96w_11461_706",
20
- "content-display-no-match": "awsui_content-display-no-match_tc96w_11461_707",
21
- "content-display-title": "awsui_content-display-title_tc96w_11461_711",
22
- "content-display-description": "awsui_content-display-description_tc96w_11461_720",
23
- "content-display-option-list": "awsui_content-display-option-list_tc96w_11461_728",
24
- "root": "awsui_root_tc96w_11461_735",
25
- "modal-root": "awsui_modal-root_tc96w_11461_736",
26
- "trigger-button": "awsui_trigger-button_tc96w_11461_737",
27
- "cancel-button": "awsui_cancel-button_tc96w_11461_738",
28
- "confirm-button": "awsui_confirm-button_tc96w_11461_739",
29
- "custom": "awsui_custom_tc96w_11461_740",
30
- "second-column-small": "awsui_second-column-small_tc96w_11461_744",
31
- "wrap-lines": "awsui_wrap-lines_tc96w_11461_748",
32
- "striped-rows": "awsui_striped-rows_tc96w_11461_749",
33
- "content-density": "awsui_content-density_tc96w_11461_750",
34
- "page-size": "awsui_page-size_tc96w_11461_751",
35
- "page-size-form-field": "awsui_page-size-form-field_tc96w_11461_752",
36
- "page-size-radio-group": "awsui_page-size-radio-group_tc96w_11461_753",
37
- "sticky-columns": "awsui_sticky-columns_tc96w_11461_754",
38
- "sticky-columns-form-field": "awsui_sticky-columns-form-field_tc96w_11461_755",
39
- "sticky-columns-radio-group": "awsui_sticky-columns-radio-group_tc96w_11461_756",
40
- "sticky-columns-first": "awsui_sticky-columns-first_tc96w_11461_757",
41
- "sticky-columns-last": "awsui_sticky-columns-last_tc96w_11461_758"
4
+ "visible-content": "awsui_visible-content_tc96w_4nczn_289",
5
+ "visible-content-toggle": "awsui_visible-content-toggle_tc96w_4nczn_290",
6
+ "visible-content-groups": "awsui_visible-content-groups_tc96w_4nczn_291",
7
+ "visible-content-group": "awsui_visible-content-group_tc96w_4nczn_291",
8
+ "visible-content-title": "awsui_visible-content-title_tc96w_4nczn_296",
9
+ "visible-content-group-label": "awsui_visible-content-group-label_tc96w_4nczn_306",
10
+ "visible-content-option": "awsui_visible-content-option_tc96w_4nczn_312",
11
+ "visible-content-option-label": "awsui_visible-content-option-label_tc96w_4nczn_325",
12
+ "content-display-option-toggle": "awsui_content-display-option-toggle_tc96w_4nczn_620",
13
+ "content-display-option-content": "awsui_content-display-option-content_tc96w_4nczn_624",
14
+ "content-display-option": "awsui_content-display-option_tc96w_4nczn_620",
15
+ "content-display-option-label": "awsui_content-display-option-label_tc96w_4nczn_672",
16
+ "content-display": "awsui_content-display_tc96w_4nczn_620",
17
+ "content-display-text-filter": "awsui_content-display-text-filter_tc96w_4nczn_680",
18
+ "content-display-no-match": "awsui_content-display-no-match_tc96w_4nczn_681",
19
+ "content-display-title": "awsui_content-display-title_tc96w_4nczn_685",
20
+ "content-display-description": "awsui_content-display-description_tc96w_4nczn_694",
21
+ "content-display-option-list": "awsui_content-display-option-list_tc96w_4nczn_702",
22
+ "root": "awsui_root_tc96w_4nczn_709",
23
+ "modal-root": "awsui_modal-root_tc96w_4nczn_710",
24
+ "trigger-button": "awsui_trigger-button_tc96w_4nczn_711",
25
+ "cancel-button": "awsui_cancel-button_tc96w_4nczn_712",
26
+ "confirm-button": "awsui_confirm-button_tc96w_4nczn_713",
27
+ "custom": "awsui_custom_tc96w_4nczn_714",
28
+ "second-column-small": "awsui_second-column-small_tc96w_4nczn_718",
29
+ "wrap-lines": "awsui_wrap-lines_tc96w_4nczn_722",
30
+ "striped-rows": "awsui_striped-rows_tc96w_4nczn_723",
31
+ "content-density": "awsui_content-density_tc96w_4nczn_724",
32
+ "page-size": "awsui_page-size_tc96w_4nczn_725",
33
+ "page-size-form-field": "awsui_page-size-form-field_tc96w_4nczn_726",
34
+ "page-size-radio-group": "awsui_page-size-radio-group_tc96w_4nczn_727",
35
+ "sticky-columns": "awsui_sticky-columns_tc96w_4nczn_728",
36
+ "sticky-columns-form-field": "awsui_sticky-columns-form-field_tc96w_4nczn_729",
37
+ "sticky-columns-radio-group": "awsui_sticky-columns-radio-group_tc96w_4nczn_730",
38
+ "sticky-columns-first": "awsui_sticky-columns-first_tc96w_4nczn_731",
39
+ "sticky-columns-last": "awsui_sticky-columns-last_tc96w_4nczn_732"
42
40
  };
43
41