@cloudscape-design/components 3.0.1413 → 3.0.1414

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 (237) hide show
  1. package/alert/styles.css.js +27 -27
  2. package/alert/styles.scoped.css +49 -49
  3. package/alert/styles.selectors.js +27 -27
  4. package/annotation-context/annotation/styles.css.js +13 -13
  5. package/annotation-context/annotation/styles.scoped.css +21 -21
  6. package/annotation-context/annotation/styles.selectors.js +13 -13
  7. package/app-layout/notifications/styles.css.js +3 -3
  8. package/app-layout/notifications/styles.scoped.css +7 -7
  9. package/app-layout/notifications/styles.selectors.js +3 -3
  10. package/app-layout/visual-refresh/mobile-toolbar.d.ts.map +1 -1
  11. package/app-layout/visual-refresh/mobile-toolbar.js +1 -1
  12. package/app-layout/visual-refresh/mobile-toolbar.js.map +1 -1
  13. package/app-layout/visual-refresh/styles.css.js +86 -86
  14. package/app-layout/visual-refresh/styles.scoped.css +258 -258
  15. package/app-layout/visual-refresh/styles.selectors.js +86 -86
  16. package/app-layout/visual-refresh-toolbar/drawer/styles.css.js +32 -32
  17. package/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +89 -89
  18. package/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +32 -32
  19. package/app-layout/visual-refresh-toolbar/navigation/styles.css.js +6 -6
  20. package/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +13 -13
  21. package/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +6 -6
  22. package/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +30 -30
  23. package/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +68 -68
  24. package/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +30 -30
  25. package/attribute-editor/styles.css.js +15 -15
  26. package/attribute-editor/styles.scoped.css +28 -28
  27. package/attribute-editor/styles.selectors.js +15 -15
  28. package/breadcrumb-group/item/styles.css.js +7 -7
  29. package/breadcrumb-group/item/styles.scoped.css +28 -28
  30. package/breadcrumb-group/item/styles.selectors.js +7 -7
  31. package/button/styles.css.js +24 -24
  32. package/button/styles.scoped.css +328 -328
  33. package/button/styles.selectors.js +24 -24
  34. package/button-dropdown/item-element/styles.css.js +21 -21
  35. package/button-dropdown/item-element/styles.scoped.css +37 -37
  36. package/button-dropdown/item-element/styles.selectors.js +21 -21
  37. package/cards/styles.css.js +39 -39
  38. package/cards/styles.scoped.css +41 -41
  39. package/cards/styles.selectors.js +39 -39
  40. package/checkbox/internal.d.ts +1 -1
  41. package/checkbox/internal.d.ts.map +1 -1
  42. package/checkbox/internal.js.map +1 -1
  43. package/checkbox/styles.css.js +3 -3
  44. package/checkbox/styles.scoped.css +10 -10
  45. package/checkbox/styles.selectors.js +3 -3
  46. package/container/styles.css.js +33 -33
  47. package/container/styles.scoped.css +106 -106
  48. package/container/styles.selectors.js +33 -33
  49. package/content-layout/interfaces.d.ts +4 -2
  50. package/content-layout/interfaces.d.ts.map +1 -1
  51. package/content-layout/interfaces.js.map +1 -1
  52. package/content-layout/styles.css.js +14 -14
  53. package/content-layout/styles.scoped.css +27 -27
  54. package/content-layout/styles.selectors.js +14 -14
  55. package/control-group/styles.css.js +27 -27
  56. package/control-group/styles.scoped.css +28 -28
  57. package/control-group/styles.selectors.js +27 -27
  58. package/dropdown/styles.css.js +20 -20
  59. package/dropdown/styles.scoped.css +45 -45
  60. package/dropdown/styles.selectors.js +20 -20
  61. package/file-token-group/styles.css.js +23 -23
  62. package/file-token-group/styles.scoped.css +36 -36
  63. package/file-token-group/styles.selectors.js +23 -23
  64. package/flashbar/styles.css.js +50 -50
  65. package/flashbar/styles.scoped.css +182 -182
  66. package/flashbar/styles.selectors.js +50 -50
  67. package/help-panel/styles.css.js +6 -6
  68. package/help-panel/styles.scoped.css +72 -72
  69. package/help-panel/styles.selectors.js +6 -6
  70. package/input/styles.css.js +45 -45
  71. package/input/styles.scoped.css +145 -145
  72. package/input/styles.selectors.js +45 -45
  73. package/internal/base-component/styles.scoped.css +1 -1
  74. package/internal/components/drag-handle-wrapper/styles.css.js +30 -30
  75. package/internal/components/drag-handle-wrapper/styles.scoped.css +58 -58
  76. package/internal/components/drag-handle-wrapper/styles.selectors.js +30 -30
  77. package/internal/components/option/styles.css.js +19 -19
  78. package/internal/components/option/styles.scoped.css +36 -36
  79. package/internal/components/option/styles.selectors.js +19 -19
  80. package/internal/components/radio-button/styles.css.js +7 -7
  81. package/internal/components/radio-button/styles.scoped.css +17 -17
  82. package/internal/components/radio-button/styles.selectors.js +7 -7
  83. package/internal/components/selectable-item/styles.css.js +23 -23
  84. package/internal/components/selectable-item/styles.scoped.css +58 -58
  85. package/internal/components/selectable-item/styles.selectors.js +23 -23
  86. package/internal/components/token-list/styles.css.js +10 -10
  87. package/internal/components/token-list/styles.scoped.css +25 -25
  88. package/internal/components/token-list/styles.selectors.js +10 -10
  89. package/internal/environment.js +2 -2
  90. package/internal/environment.json +2 -2
  91. package/internal/generated/custom-css-properties/index.d.ts +1 -0
  92. package/internal/generated/custom-css-properties/index.d.ts.map +1 -1
  93. package/internal/generated/custom-css-properties/index.js +178 -177
  94. package/internal/generated/custom-css-properties/index.js.map +1 -1
  95. package/internal/manifest.json +1 -1
  96. package/item-card/styles.css.js +14 -14
  97. package/item-card/styles.scoped.css +73 -73
  98. package/item-card/styles.selectors.js +14 -14
  99. package/link/styles.css.js +21 -21
  100. package/link/styles.scoped.css +104 -104
  101. package/link/styles.selectors.js +21 -21
  102. package/manifest.json +2 -2
  103. package/modal/styles.css.js +32 -32
  104. package/modal/styles.scoped.css +49 -49
  105. package/modal/styles.selectors.js +32 -32
  106. package/package.json +1 -1
  107. package/popover/styles.css.js +58 -58
  108. package/popover/styles.scoped.css +94 -94
  109. package/popover/styles.selectors.js +58 -58
  110. package/progress-bar/styles.css.js +20 -20
  111. package/progress-bar/styles.scoped.css +59 -59
  112. package/progress-bar/styles.selectors.js +20 -20
  113. package/prompt-input/components/token-mode.d.ts +4 -0
  114. package/prompt-input/components/token-mode.d.ts.map +1 -1
  115. package/prompt-input/components/token-mode.js +2 -2
  116. package/prompt-input/components/token-mode.js.map +1 -1
  117. package/prompt-input/internal.d.ts +10 -1
  118. package/prompt-input/internal.d.ts.map +1 -1
  119. package/prompt-input/internal.js +35 -26
  120. package/prompt-input/internal.js.map +1 -1
  121. package/prompt-input/styles.css.js +26 -26
  122. package/prompt-input/styles.scoped.css +136 -107
  123. package/prompt-input/styles.selectors.js +26 -26
  124. package/prompt-input/tokens/use-token-mode.d.ts +4 -0
  125. package/prompt-input/tokens/use-token-mode.d.ts.map +1 -1
  126. package/prompt-input/tokens/use-token-mode.js +3 -3
  127. package/prompt-input/tokens/use-token-mode.js.map +1 -1
  128. package/property-filter/interfaces.d.ts +2 -0
  129. package/property-filter/interfaces.d.ts.map +1 -1
  130. package/property-filter/interfaces.js.map +1 -1
  131. package/property-filter/token-editor-inputs.d.ts.map +1 -1
  132. package/property-filter/token-editor-inputs.js +3 -3
  133. package/property-filter/token-editor-inputs.js.map +1 -1
  134. package/segmented-control/styles.css.js +31 -31
  135. package/segmented-control/styles.scoped.css +81 -81
  136. package/segmented-control/styles.selectors.js +31 -31
  137. package/select/parts/styles.css.js +22 -22
  138. package/select/parts/styles.scoped.css +25 -25
  139. package/select/parts/styles.selectors.js +22 -22
  140. package/side-navigation/styles.css.js +65 -65
  141. package/side-navigation/styles.scoped.css +114 -114
  142. package/side-navigation/styles.selectors.js +65 -65
  143. package/slider/styles.css.js +26 -26
  144. package/slider/styles.scoped.css +167 -167
  145. package/slider/styles.selectors.js +26 -26
  146. package/spinner/styles.css.js +14 -14
  147. package/spinner/styles.scoped.css +40 -40
  148. package/spinner/styles.selectors.js +14 -14
  149. package/styling/prompt-input.scss +76 -0
  150. package/styling/table.scss +102 -0
  151. package/styling/tabs.scss +128 -0
  152. package/table/body-cell/styles.css.js +47 -47
  153. package/table/body-cell/styles.scoped.css +426 -418
  154. package/table/body-cell/styles.selectors.js +47 -47
  155. package/table/body-cell/td-element.d.ts +1 -0
  156. package/table/body-cell/td-element.d.ts.map +1 -1
  157. package/table/body-cell/td-element.js +2 -2
  158. package/table/body-cell/td-element.js.map +1 -1
  159. package/table/clear-sort.d.ts +3 -1
  160. package/table/clear-sort.d.ts.map +1 -1
  161. package/table/clear-sort.js +2 -2
  162. package/table/clear-sort.js.map +1 -1
  163. package/table/header-cell/common-props.d.ts +2 -0
  164. package/table/header-cell/common-props.d.ts.map +1 -1
  165. package/table/header-cell/common-props.js.map +1 -1
  166. package/table/header-cell/group-header-cell.d.ts +2 -1
  167. package/table/header-cell/group-header-cell.d.ts.map +1 -1
  168. package/table/header-cell/group-header-cell.js +3 -2
  169. package/table/header-cell/group-header-cell.js.map +1 -1
  170. package/table/header-cell/index.d.ts +2 -1
  171. package/table/header-cell/index.d.ts.map +1 -1
  172. package/table/header-cell/index.js +12 -5
  173. package/table/header-cell/index.js.map +1 -1
  174. package/table/header-cell/sort-menu.d.ts +4 -1
  175. package/table/header-cell/sort-menu.d.ts.map +1 -1
  176. package/table/header-cell/sort-menu.js +2 -2
  177. package/table/header-cell/sort-menu.js.map +1 -1
  178. package/table/header-cell/styles.css.js +39 -39
  179. package/table/header-cell/styles.scoped.css +140 -125
  180. package/table/header-cell/styles.selectors.js +39 -39
  181. package/table/header-cell/th-element.d.ts +2 -0
  182. package/table/header-cell/th-element.d.ts.map +1 -1
  183. package/table/header-cell/th-element.js +2 -2
  184. package/table/header-cell/th-element.js.map +1 -1
  185. package/table/internal.d.ts.map +1 -1
  186. package/table/internal.js +20 -7
  187. package/table/internal.js.map +1 -1
  188. package/table/resizer/index.d.ts.map +1 -1
  189. package/table/resizer/index.js +1 -1
  190. package/table/resizer/index.js.map +1 -1
  191. package/table/resizer/styles.css.js +17 -17
  192. package/table/resizer/styles.scoped.css +39 -35
  193. package/table/resizer/styles.selectors.js +17 -17
  194. package/table/selection/selection-cell.d.ts +5 -0
  195. package/table/selection/selection-cell.d.ts.map +1 -1
  196. package/table/selection/selection-cell.js +6 -5
  197. package/table/selection/selection-cell.js.map +1 -1
  198. package/table/selection/selection-control.d.ts +3 -0
  199. package/table/selection/selection-control.d.ts.map +1 -1
  200. package/table/selection/selection-control.js +2 -2
  201. package/table/selection/selection-control.js.map +1 -1
  202. package/table/style-api.d.ts +41 -0
  203. package/table/style-api.d.ts.map +1 -0
  204. package/table/style-api.js +4 -0
  205. package/table/style-api.js.map +1 -0
  206. package/table/styles.css.js +37 -37
  207. package/table/styles.scoped.css +119 -46
  208. package/table/styles.selectors.js +37 -37
  209. package/table/thead.d.ts +2 -0
  210. package/table/thead.d.ts.map +1 -1
  211. package/table/thead.js +2 -1
  212. package/table/thead.js.map +1 -1
  213. package/tabs/index.d.ts.map +1 -1
  214. package/tabs/index.js +3 -2
  215. package/tabs/index.js.map +1 -1
  216. package/tabs/styles.css.js +30 -30
  217. package/tabs/styles.scoped.css +137 -81
  218. package/tabs/styles.selectors.js +30 -30
  219. package/tabs/tab-header-bar.d.ts +12 -1
  220. package/tabs/tab-header-bar.d.ts.map +1 -1
  221. package/tabs/tab-header-bar.js +14 -7
  222. package/tabs/tab-header-bar.js.map +1 -1
  223. package/tag-editor/styles.css.js +3 -3
  224. package/tag-editor/styles.scoped.css +13 -13
  225. package/tag-editor/styles.selectors.js +3 -3
  226. package/text-content/styles.css.js +1 -1
  227. package/text-content/styles.scoped.css +66 -66
  228. package/text-content/styles.selectors.js +1 -1
  229. package/textarea/styles.css.js +9 -9
  230. package/textarea/styles.scoped.css +51 -51
  231. package/textarea/styles.selectors.js +9 -9
  232. package/toggle/styles.css.js +10 -10
  233. package/toggle/styles.scoped.css +25 -25
  234. package/toggle/styles.selectors.js +10 -10
  235. package/token/styles.css.js +14 -14
  236. package/token/styles.scoped.css +57 -57
  237. package/token/styles.selectors.js +14 -14
@@ -1,3 +1,4 @@
1
+ import { StyleClassNames as ButtonDropdownStyleClassNames } from '../../button-dropdown/internal-interfaces';
1
2
  import { TableProps } from '../interfaces';
2
3
  export type SortMenuAction = 'sort-ascending' | 'sort-descending' | 'add-to-sort-ascending' | 'add-to-sort-descending' | 'remove-from-sort';
3
4
  export interface SortMenuProps<T> {
@@ -9,6 +10,7 @@ export interface SortMenuProps<T> {
9
10
  ariaLabel?: string;
10
11
  ariaDescribedby?: string;
11
12
  onAction: (action: SortMenuAction) => void;
13
+ styleClassNames?: ButtonDropdownStyleClassNames;
12
14
  }
13
15
  export declare function SortMenu<T>({
14
16
  inSort,
@@ -17,5 +19,6 @@ export declare function SortMenu<T>({
17
19
  i18nStrings,
18
20
  ariaLabel,
19
21
  ariaDescribedby,
20
- onAction
22
+ onAction,
23
+ styleClassNames
21
24
  }: SortMenuProps<T>): JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"sort-menu.d.ts","sourceRoot":"","sources":["../../../../src/table/header-cell/sort-menu.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,MAAM,cAAc,GACtB,gBAAgB,GAChB,iBAAiB,GACjB,uBAAuB,GACvB,wBAAwB,GACxB,kBAAkB,CAAC;AAEvB,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,MAAM,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;IACvC,MAAM,EAAE,OAAO,CAAC;IAChB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,WAAW,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;CAC5C;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,EAC1B,MAAM,EACN,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,SAAS,EACT,eAAe,EACf,QAAQ,GACT,EAAE,aAAa,CAAC,CAAC,CAAC,eA+DlB"}
1
+ {"version":3,"file":"sort-menu.d.ts","sourceRoot":"","sources":["../../../../src/table/header-cell/sort-menu.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,IAAI,6BAA6B,EAAE,MAAM,2CAA2C,CAAC;AAE7G,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,MAAM,cAAc,GACtB,gBAAgB,GAChB,iBAAiB,GACjB,uBAAuB,GACvB,wBAAwB,GACxB,kBAAkB,CAAC;AAEvB,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,MAAM,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;IACvC,MAAM,EAAE,OAAO,CAAC;IAChB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,WAAW,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IAC3C,eAAe,CAAC,EAAE,6BAA6B,CAAC;CACjD;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,EAC1B,MAAM,EACN,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,SAAS,EACT,eAAe,EACf,QAAQ,EACR,eAAe,GAChB,EAAE,aAAa,CAAC,CAAC,CAAC,eAgElB"}
@@ -3,7 +3,7 @@
3
3
  import React from 'react';
4
4
  import InternalButtonDropdown from '../../button-dropdown/internal';
5
5
  import { useInternalI18n } from '../../i18n/context';
6
- export function SortMenu({ inSort, isSortedAscending, isSortedDescending, i18nStrings, ariaLabel, ariaDescribedby, onAction, }) {
6
+ export function SortMenu({ inSort, isSortedAscending, isSortedDescending, i18nStrings, ariaLabel, ariaDescribedby, onAction, styleClassNames, }) {
7
7
  var _a, _b, _c, _d, _e, _f, _g;
8
8
  const i18n = useInternalI18n('table');
9
9
  const items = [
@@ -45,6 +45,6 @@ export function SortMenu({ inSort, isSortedAscending, isSortedDescending, i18nSt
45
45
  ],
46
46
  },
47
47
  ];
48
- return (React.createElement(InternalButtonDropdown, { items: items, variant: "icon", compactTrigger: true, expandToViewport: true, ariaLabel: (_g = i18n('ariaLabels.sortMenuTriggerLabel', ariaLabel)) !== null && _g !== void 0 ? _g : '', ariaDescribedby: ariaDescribedby, onItemClick: ({ detail }) => onAction(detail.id) }));
48
+ return (React.createElement(InternalButtonDropdown, { items: items, variant: "icon", compactTrigger: true, expandToViewport: true, ariaLabel: (_g = i18n('ariaLabels.sortMenuTriggerLabel', ariaLabel)) !== null && _g !== void 0 ? _g : '', ariaDescribedby: ariaDescribedby, onItemClick: ({ detail }) => onAction(detail.id), styleClassNames: styleClassNames }));
49
49
  }
50
50
  //# sourceMappingURL=sort-menu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sort-menu.js","sourceRoot":"","sources":["../../../../src/table/header-cell/sort-menu.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,sBAAsB,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAqBrD,MAAM,UAAU,QAAQ,CAAI,EAC1B,MAAM,EACN,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,SAAS,EACT,eAAe,EACf,QAAQ,GACS;;IACjB,MAAM,IAAI,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IAEtC,MAAM,KAAK,GAAsC;QAC/C;YACE,EAAE,EAAE,gBAAgB;YACpB,QAAQ,EAAE,UAAU;YACpB,IAAI,EAAE,MAAA,IAAI,CAAC,uCAAuC,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,yBAAyB,CAAC,mCAAI,EAAE;YACjG,OAAO,EAAE,iBAAiB;SAC3B;QACD;YACE,EAAE,EAAE,iBAAiB;YACrB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EF,OAAO,CACL,oBAAC,sBAAsB,IACrB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAC,MAAM,EACd,cAAc,EAAE,IAAI,EACpB,gBAAgB,EAAE,IAAI,EACtB,SAAS,EAAE,MAAA,IAAI,CAAC,iCAAiC,EAAE,SAAS,CAAC,mCAAI,EAAE,EACnE,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAoB,CAAC,GAClE,CACH,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { ButtonDropdownProps } from '../../button-dropdown/interfaces';\nimport InternalButtonDropdown from '../../button-dropdown/internal';\nimport { useInternalI18n } from '../../i18n/context';\nimport { TableProps } from '../interfaces';\n\nexport type SortMenuAction =\n | 'sort-ascending'\n | 'sort-descending'\n | 'add-to-sort-ascending'\n | 'add-to-sort-descending'\n | 'remove-from-sort';\n\nexport interface SortMenuProps<T> {\n column: TableProps.ColumnDefinition<T>;\n inSort: boolean;\n isSortedAscending: boolean;\n isSortedDescending: boolean;\n i18nStrings?: TableProps.I18nStrings;\n ariaLabel?: string;\n ariaDescribedby?: string;\n onAction: (action: SortMenuAction) => void;\n}\n\nexport function SortMenu<T>({\n inSort,\n isSortedAscending,\n isSortedDescending,\n i18nStrings,\n ariaLabel,\n ariaDescribedby,\n onAction,\n}: SortMenuProps<T>) {\n const i18n = useInternalI18n('table');\n\n const items: ButtonDropdownProps.ItemOrGroup[] = [\n {\n id: 'sort-ascending',\n itemType: 'checkbox',\n text: i18n('i18nStrings.sortDropdownSortAscending', i18nStrings?.sortDropdownSortAscending) ?? '',\n checked: isSortedAscending,\n },\n {\n id: 'sort-descending',\n itemType: 'checkbox',\n text: i18n('i18nStrings.sortDropdownSortDescending', i18nStrings?.sortDropdownSortDescending) ?? '',\n checked: isSortedDescending,\n },\n {\n id: 'multi-column-sort-group',\n itemType: 'group',\n text: i18n('i18nStrings.sortDropdownMultiColumnSortGroup', i18nStrings?.sortDropdownMultiColumnSortGroup) ?? '',\n items: [\n {\n id: 'add-to-sort-ascending',\n text: i18n('i18nStrings.sortDropdownAddToSortAscending', i18nStrings?.sortDropdownAddToSortAscending) ?? '',\n disabled: inSort,\n disabledReason: i18n(\n 'i18nStrings.sortDropdownAddToSortDisabledReason',\n i18nStrings?.sortDropdownAddToSortDisabledReason\n ),\n },\n {\n id: 'add-to-sort-descending',\n text: i18n('i18nStrings.sortDropdownAddToSortDescending', i18nStrings?.sortDropdownAddToSortDescending) ?? '',\n disabled: inSort,\n disabledReason: i18n(\n 'i18nStrings.sortDropdownAddToSortDisabledReason',\n i18nStrings?.sortDropdownAddToSortDisabledReason\n ),\n },\n {\n id: 'remove-from-sort',\n text: i18n('i18nStrings.sortDropdownRemoveFromSort', i18nStrings?.sortDropdownRemoveFromSort) ?? '',\n disabled: !inSort,\n disabledReason: i18n(\n 'i18nStrings.sortDropdownRemoveFromSortDisabledReason',\n i18nStrings?.sortDropdownRemoveFromSortDisabledReason\n ),\n },\n ],\n },\n ];\n\n return (\n <InternalButtonDropdown\n items={items}\n variant=\"icon\"\n compactTrigger={true}\n expandToViewport={true}\n ariaLabel={i18n('ariaLabels.sortMenuTriggerLabel', ariaLabel) ?? ''}\n ariaDescribedby={ariaDescribedby}\n onItemClick={({ detail }) => onAction(detail.id as SortMenuAction)}\n />\n );\n}\n"]}
1
+ {"version":3,"file":"sort-menu.js","sourceRoot":"","sources":["../../../../src/table/header-cell/sort-menu.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,sBAAsB,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAsBrD,MAAM,UAAU,QAAQ,CAAI,EAC1B,MAAM,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;oBAChB,cAAc,EAAE,IAAI,CAClB,iDAAiD,EACjD,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,mCAAmC,CACjD;iBACF;gBACD;oBACE,EAAE,EAAE,kBAAkB;oBACtB,IAAI,EAAE,MAAA,IAAI,CAAC,wCAAwC,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,0BAA0B,CAAC,mCAAI,EAAE;oBACnG,QAAQ,EAAE,CAAC,MAAM;oBACjB,cAAc,EAAE,IAAI,CAClB,sDAAsD,EACtD,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,wCAAwC,CACtD;iBACF;aACF;SACF;KACF,CAAC;IAEF,OAAO,CACL,oBAAC,sBAAsB,IACrB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAC,MAAM,EACd,cAAc,EAAE,IAAI,EACpB,gBAAgB,EAAE,IAAI,EACtB,SAAS,EAAE,MAAA,IAAI,CAAC,iCAAiC,EAAE,SAAS,CAAC,mCAAI,EAAE,EACnE,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAoB,CAAC,EAClE,eAAe,EAAE,eAAe,GAChC,CACH,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { ButtonDropdownProps } from '../../button-dropdown/interfaces';\nimport InternalButtonDropdown from '../../button-dropdown/internal';\nimport { StyleClassNames as ButtonDropdownStyleClassNames } from '../../button-dropdown/internal-interfaces';\nimport { useInternalI18n } from '../../i18n/context';\nimport { TableProps } from '../interfaces';\n\nexport type SortMenuAction =\n | 'sort-ascending'\n | 'sort-descending'\n | 'add-to-sort-ascending'\n | 'add-to-sort-descending'\n | 'remove-from-sort';\n\nexport interface SortMenuProps<T> {\n column: TableProps.ColumnDefinition<T>;\n inSort: boolean;\n isSortedAscending: boolean;\n isSortedDescending: boolean;\n i18nStrings?: TableProps.I18nStrings;\n ariaLabel?: string;\n ariaDescribedby?: string;\n onAction: (action: SortMenuAction) => void;\n styleClassNames?: ButtonDropdownStyleClassNames;\n}\n\nexport function SortMenu<T>({\n inSort,\n isSortedAscending,\n isSortedDescending,\n i18nStrings,\n ariaLabel,\n ariaDescribedby,\n onAction,\n styleClassNames,\n}: SortMenuProps<T>) {\n const i18n = useInternalI18n('table');\n\n const items: ButtonDropdownProps.ItemOrGroup[] = [\n {\n id: 'sort-ascending',\n itemType: 'checkbox',\n text: i18n('i18nStrings.sortDropdownSortAscending', i18nStrings?.sortDropdownSortAscending) ?? '',\n checked: isSortedAscending,\n },\n {\n id: 'sort-descending',\n itemType: 'checkbox',\n text: i18n('i18nStrings.sortDropdownSortDescending', i18nStrings?.sortDropdownSortDescending) ?? '',\n checked: isSortedDescending,\n },\n {\n id: 'multi-column-sort-group',\n itemType: 'group',\n text: i18n('i18nStrings.sortDropdownMultiColumnSortGroup', i18nStrings?.sortDropdownMultiColumnSortGroup) ?? '',\n items: [\n {\n id: 'add-to-sort-ascending',\n text: i18n('i18nStrings.sortDropdownAddToSortAscending', i18nStrings?.sortDropdownAddToSortAscending) ?? '',\n disabled: inSort,\n disabledReason: i18n(\n 'i18nStrings.sortDropdownAddToSortDisabledReason',\n i18nStrings?.sortDropdownAddToSortDisabledReason\n ),\n },\n {\n id: 'add-to-sort-descending',\n text: i18n('i18nStrings.sortDropdownAddToSortDescending', i18nStrings?.sortDropdownAddToSortDescending) ?? '',\n disabled: inSort,\n disabledReason: i18n(\n 'i18nStrings.sortDropdownAddToSortDisabledReason',\n i18nStrings?.sortDropdownAddToSortDisabledReason\n ),\n },\n {\n id: 'remove-from-sort',\n text: i18n('i18nStrings.sortDropdownRemoveFromSort', i18nStrings?.sortDropdownRemoveFromSort) ?? '',\n disabled: !inSort,\n disabledReason: i18n(\n 'i18nStrings.sortDropdownRemoveFromSortDisabledReason',\n i18nStrings?.sortDropdownRemoveFromSortDisabledReason\n ),\n },\n ],\n },\n ];\n\n return (\n <InternalButtonDropdown\n items={items}\n variant=\"icon\"\n compactTrigger={true}\n expandToViewport={true}\n ariaLabel={i18n('ariaLabels.sortMenuTriggerLabel', ariaLabel) ?? ''}\n ariaDescribedby={ariaDescribedby}\n onItemClick={({ detail }) => onAction(detail.id as SortMenuAction)}\n styleClassNames={styleClassNames}\n />\n );\n}\n"]}
@@ -1,44 +1,44 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "header-cell": "awsui_header-cell_1spae_1i6uv_9",
5
- "header-cell-fake-focus": "awsui_header-cell-fake-focus_1spae_1i6uv_43",
6
- "header-cell-group": "awsui_header-cell-group_1spae_1i6uv_64",
7
- "header-cell-grouped": "awsui_header-cell-grouped_1spae_1i6uv_64",
8
- "header-cell-spans-rows": "awsui_header-cell-spans-rows_1spae_1i6uv_64",
9
- "resize-divider": "awsui_resize-divider_1spae_1i6uv_69",
10
- "header-cell-sticky": "awsui_header-cell-sticky_1spae_1i6uv_72",
11
- "header-cell-stuck": "awsui_header-cell-stuck_1spae_1i6uv_78",
12
- "header-cell-variant-full-page": "awsui_header-cell-variant-full-page_1spae_1i6uv_78",
13
- "header-cell-hidden": "awsui_header-cell-hidden_1spae_1i6uv_84",
14
- "header-cell-variant-embedded": "awsui_header-cell-variant-embedded_1spae_1i6uv_87",
15
- "is-visual-refresh": "awsui_is-visual-refresh_1spae_1i6uv_87",
16
- "sticky-cell": "awsui_sticky-cell_1spae_1i6uv_87",
17
- "header-cell-variant-borderless": "awsui_header-cell-variant-borderless_1spae_1i6uv_87",
18
- "header-cell-sortable": "awsui_header-cell-sortable_1spae_1i6uv_90",
19
- "table-variant-full-page": "awsui_table-variant-full-page_1spae_1i6uv_111",
20
- "sticky-cell-pad-left": "awsui_sticky-cell-pad-left_1spae_1i6uv_114",
21
- "has-selection": "awsui_has-selection_1spae_1i6uv_114",
22
- "sticky-cell-last-inline-start": "awsui_sticky-cell-last-inline-start_1spae_1i6uv_117",
23
- "sticky-cell-last-inline-end": "awsui_sticky-cell-last-inline-end_1spae_1i6uv_129",
24
- "sorting-icon": "awsui_sorting-icon_1spae_1i6uv_138",
25
- "header-cell-main": "awsui_header-cell-main_1spae_1i6uv_146",
26
- "sort-priority-badge": "awsui_sort-priority-badge_1spae_1i6uv_151",
27
- "edit-icon": "awsui_edit-icon_1spae_1i6uv_155",
28
- "header-cell-content": "awsui_header-cell-content_1spae_1i6uv_161",
29
- "header-cell-content-expandable": "awsui_header-cell-content-expandable_1spae_1i6uv_167",
30
- "header-cell-content-multi-sorted": "awsui_header-cell-content-multi-sorted_1spae_1i6uv_225",
31
- "header-cell-disabled": "awsui_header-cell-disabled_1spae_1i6uv_228",
32
- "header-cell-sorted": "awsui_header-cell-sorted_1spae_1i6uv_228",
33
- "header-cell-main-with-menu": "awsui_header-cell-main-with-menu_1spae_1i6uv_232",
34
- "header-cell-content-with-menu": "awsui_header-cell-content-with-menu_1spae_1i6uv_237",
35
- "header-cell-text": "awsui_header-cell-text_1spae_1i6uv_269",
36
- "header-cell-text-wrap": "awsui_header-cell-text-wrap_1spae_1i6uv_273",
37
- "header-cell-ascending": "awsui_header-cell-ascending_1spae_1i6uv_279",
38
- "header-cell-descending": "awsui_header-cell-descending_1spae_1i6uv_280",
39
- "with-paddings": "awsui_with-paddings_1spae_1i6uv_394",
40
- "has-striped-rows": "awsui_has-striped-rows_1spae_1i6uv_394",
41
- "sticky-cell-pad-inline-start": "awsui_sticky-cell-pad-inline-start_1spae_1i6uv_394",
42
- "header-cell-resizable": "awsui_header-cell-resizable_1spae_1i6uv_406"
4
+ "header-cell": "awsui_header-cell_1spae_bvvju_13",
5
+ "header-cell-fake-focus": "awsui_header-cell-fake-focus_1spae_bvvju_52",
6
+ "header-cell-group": "awsui_header-cell-group_1spae_bvvju_73",
7
+ "header-cell-grouped": "awsui_header-cell-grouped_1spae_bvvju_73",
8
+ "header-cell-spans-rows": "awsui_header-cell-spans-rows_1spae_bvvju_73",
9
+ "resize-divider": "awsui_resize-divider_1spae_bvvju_78",
10
+ "header-cell-sticky": "awsui_header-cell-sticky_1spae_bvvju_81",
11
+ "header-cell-stuck": "awsui_header-cell-stuck_1spae_bvvju_87",
12
+ "header-cell-variant-full-page": "awsui_header-cell-variant-full-page_1spae_bvvju_87",
13
+ "header-cell-hidden": "awsui_header-cell-hidden_1spae_bvvju_93",
14
+ "header-cell-variant-embedded": "awsui_header-cell-variant-embedded_1spae_bvvju_96",
15
+ "is-visual-refresh": "awsui_is-visual-refresh_1spae_bvvju_96",
16
+ "sticky-cell": "awsui_sticky-cell_1spae_bvvju_96",
17
+ "header-cell-variant-borderless": "awsui_header-cell-variant-borderless_1spae_bvvju_96",
18
+ "header-cell-sortable": "awsui_header-cell-sortable_1spae_bvvju_99",
19
+ "table-variant-full-page": "awsui_table-variant-full-page_1spae_bvvju_120",
20
+ "sticky-cell-pad-left": "awsui_sticky-cell-pad-left_1spae_bvvju_123",
21
+ "has-selection": "awsui_has-selection_1spae_bvvju_123",
22
+ "sticky-cell-last-inline-start": "awsui_sticky-cell-last-inline-start_1spae_bvvju_126",
23
+ "sticky-cell-last-inline-end": "awsui_sticky-cell-last-inline-end_1spae_bvvju_138",
24
+ "sorting-icon": "awsui_sorting-icon_1spae_bvvju_147",
25
+ "header-cell-main": "awsui_header-cell-main_1spae_bvvju_155",
26
+ "sort-priority-badge": "awsui_sort-priority-badge_1spae_bvvju_160",
27
+ "edit-icon": "awsui_edit-icon_1spae_bvvju_164",
28
+ "header-cell-content": "awsui_header-cell-content_1spae_bvvju_170",
29
+ "header-cell-content-expandable": "awsui_header-cell-content-expandable_1spae_bvvju_176",
30
+ "header-cell-content-multi-sorted": "awsui_header-cell-content-multi-sorted_1spae_bvvju_234",
31
+ "header-cell-disabled": "awsui_header-cell-disabled_1spae_bvvju_237",
32
+ "header-cell-sorted": "awsui_header-cell-sorted_1spae_bvvju_237",
33
+ "header-cell-main-with-menu": "awsui_header-cell-main-with-menu_1spae_bvvju_241",
34
+ "header-cell-content-with-menu": "awsui_header-cell-content-with-menu_1spae_bvvju_246",
35
+ "header-cell-text": "awsui_header-cell-text_1spae_bvvju_284",
36
+ "header-cell-text-wrap": "awsui_header-cell-text-wrap_1spae_bvvju_288",
37
+ "header-cell-ascending": "awsui_header-cell-ascending_1spae_bvvju_294",
38
+ "header-cell-descending": "awsui_header-cell-descending_1spae_bvvju_295",
39
+ "with-paddings": "awsui_with-paddings_1spae_bvvju_409",
40
+ "has-striped-rows": "awsui_has-striped-rows_1spae_bvvju_409",
41
+ "sticky-cell-pad-inline-start": "awsui_sticky-cell-pad-inline-start_1spae_bvvju_409",
42
+ "header-cell-resizable": "awsui_header-cell-resizable_1spae_bvvju_421"
43
43
  };
44
44