@cloudscape-design/components 3.0.1277 → 3.0.1279

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 (55) hide show
  1. package/action-card/index.d.ts +1 -1
  2. package/action-card/index.d.ts.map +1 -1
  3. package/action-card/index.js.map +1 -1
  4. package/action-card/internal.d.ts +1 -1
  5. package/action-card/internal.d.ts.map +1 -1
  6. package/action-card/internal.js.map +1 -1
  7. package/breadcrumb-group/interfaces.d.ts +1 -1
  8. package/breadcrumb-group/interfaces.js.map +1 -1
  9. package/cards/index.js +49 -41
  10. package/cards/index.js.map +1 -1
  11. package/date-range-picker/index.d.ts.map +1 -1
  12. package/date-range-picker/index.js +7 -6
  13. package/date-range-picker/index.js.map +1 -1
  14. package/date-range-picker/interfaces.d.ts +8 -0
  15. package/date-range-picker/interfaces.d.ts.map +1 -1
  16. package/date-range-picker/interfaces.js.map +1 -1
  17. package/drawer/implementation.d.ts +7 -2
  18. package/drawer/implementation.d.ts.map +1 -1
  19. package/drawer/implementation.js +5 -2
  20. package/drawer/implementation.js.map +1 -1
  21. package/drawer/index.d.ts +11 -1
  22. package/drawer/index.d.ts.map +1 -1
  23. package/drawer/index.js +16 -4
  24. package/drawer/index.js.map +1 -1
  25. package/drawer/interfaces.d.ts +72 -7
  26. package/drawer/interfaces.d.ts.map +1 -1
  27. package/drawer/interfaces.js +2 -0
  28. package/drawer/interfaces.js.map +1 -1
  29. package/drawer/next.d.ts +16 -0
  30. package/drawer/next.d.ts.map +1 -0
  31. package/drawer/next.js +31 -0
  32. package/drawer/next.js.map +1 -0
  33. package/drawer/styles.css.js +16 -12
  34. package/drawer/styles.scoped.css +23 -17
  35. package/drawer/styles.selectors.js +16 -12
  36. package/drawer/utils.d.ts +12 -0
  37. package/drawer/utils.d.ts.map +1 -0
  38. package/drawer/utils.js +74 -0
  39. package/drawer/utils.js.map +1 -0
  40. package/internal/base-component/styles.scoped.css +5 -1
  41. package/internal/environment.js +2 -2
  42. package/internal/environment.json +2 -2
  43. package/internal/generated/styles/tokens.d.ts +1 -0
  44. package/internal/generated/styles/tokens.js +1 -0
  45. package/internal/generated/theming/index.cjs +31 -0
  46. package/internal/generated/theming/index.js +31 -0
  47. package/internal/manifest.json +1 -1
  48. package/package.json +1 -1
  49. package/table/selection/interfaces.d.ts +1 -0
  50. package/table/selection/interfaces.d.ts.map +1 -1
  51. package/table/selection/interfaces.js.map +1 -1
  52. package/table/selection/selection-control.d.ts +1 -0
  53. package/table/selection/selection-control.d.ts.map +1 -1
  54. package/table/selection/selection-control.js +9 -2
  55. package/table/selection/selection-control.js.map +1 -1
@@ -2,17 +2,21 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "drawer": "awsui_drawer_1sxt8_1gt83_189",
6
- "with-footer": "awsui_with-footer_1sxt8_1gt83_221",
7
- "content": "awsui_content_1sxt8_1gt83_226",
8
- "header": "awsui_header_1sxt8_1gt83_230",
9
- "with-additional-action": "awsui_with-additional-action_1sxt8_1gt83_247",
10
- "with-runtime-context": "awsui_with-runtime-context_1sxt8_1gt83_255",
11
- "with-toolbar": "awsui_with-toolbar_1sxt8_1gt83_258",
12
- "header-actions": "awsui_header-actions_1sxt8_1gt83_277",
13
- "content-with-paddings": "awsui_content-with-paddings_1sxt8_1gt83_283",
14
- "footer": "awsui_footer_1sxt8_1gt83_290",
15
- "is-sticky": "awsui_is-sticky_1sxt8_1gt83_296",
16
- "test-utils-drawer-content": "awsui_test-utils-drawer-content_1sxt8_1gt83_304"
5
+ "drawer": "awsui_drawer_1sxt8_zqi16_189",
6
+ "position-absolute": "awsui_position-absolute_1sxt8_zqi16_222",
7
+ "position-sticky": "awsui_position-sticky_1sxt8_zqi16_222",
8
+ "position-fixed": "awsui_position-fixed_1sxt8_zqi16_222",
9
+ "with-footer": "awsui_with-footer_1sxt8_zqi16_225",
10
+ "position-static": "awsui_position-static_1sxt8_zqi16_229",
11
+ "content": "awsui_content_1sxt8_zqi16_232",
12
+ "header": "awsui_header_1sxt8_zqi16_236",
13
+ "with-additional-action": "awsui_with-additional-action_1sxt8_zqi16_253",
14
+ "with-runtime-context": "awsui_with-runtime-context_1sxt8_zqi16_261",
15
+ "with-toolbar": "awsui_with-toolbar_1sxt8_zqi16_264",
16
+ "header-actions": "awsui_header-actions_1sxt8_zqi16_283",
17
+ "content-with-paddings": "awsui_content-with-paddings_1sxt8_zqi16_289",
18
+ "footer": "awsui_footer_1sxt8_zqi16_296",
19
+ "is-sticky": "awsui_is-sticky_1sxt8_zqi16_302",
20
+ "test-utils-drawer-content": "awsui_test-utils-drawer-content_1sxt8_zqi16_310"
17
21
  };
18
22
 
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { NextDrawerProps } from './interfaces';
3
+ type PositionProps = Pick<NextDrawerProps, 'position' | 'placement' | 'offset' | 'stickyOffset' | 'zIndex'>;
4
+ export declare function getPositionStyles({
5
+ position,
6
+ zIndex,
7
+ ...props
8
+ }: PositionProps): {
9
+ className: string;
10
+ style: React.CSSProperties;
11
+ };
12
+ export {};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/drawer/utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAI/C,KAAK,aAAa,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,cAAc,GAAG,QAAQ,CAAC,CAAC;AAE5G,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,GAAG;IAChF,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC;CAC5B,CAmBA"}
@@ -0,0 +1,74 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ import { warnOnce } from '@cloudscape-design/component-toolkit/internal';
4
+ import styles from './styles.css.js';
5
+ export function getPositionStyles({ position, zIndex, ...props }) {
6
+ if (position === 'sticky' && (props.placement === 'start' || props.placement === 'end')) {
7
+ warnOnce('Drawer', `position="sticky" is not supported with placement="${props.placement}" and falls back to position="static".`);
8
+ position = 'static';
9
+ }
10
+ switch (position) {
11
+ case 'absolute':
12
+ return getStyles(position, { position: 'absolute', zIndex, ...computeAbsoluteOffsets(props) });
13
+ case 'sticky':
14
+ return getStyles(position, { position: 'sticky', zIndex, ...computeStickyOffsets(props) });
15
+ case 'fixed':
16
+ return getStyles(position, { position: 'fixed', zIndex, ...computeAbsoluteOffsets(props) });
17
+ case 'static':
18
+ default:
19
+ return getStyles(position);
20
+ }
21
+ }
22
+ function getStyles(position = 'static', style = {}) {
23
+ return { className: styles[`position-${position}`], style };
24
+ }
25
+ function computeAbsoluteOffsets({ placement, offset: { top, bottom, start, end } = {}, }) {
26
+ const style = {};
27
+ const offset = { top: top !== null && top !== void 0 ? top : 0, bottom: bottom !== null && bottom !== void 0 ? bottom : 0, start: start !== null && start !== void 0 ? start : 0, end: end !== null && end !== void 0 ? end : 0 };
28
+ switch (placement) {
29
+ case 'top':
30
+ style.insetBlockStart = offset.top;
31
+ style.insetInlineStart = offset.start;
32
+ style.insetInlineEnd = offset.end;
33
+ break;
34
+ case 'bottom':
35
+ style.insetBlockEnd = offset.bottom;
36
+ style.insetInlineStart = offset.start;
37
+ style.insetInlineEnd = offset.end;
38
+ break;
39
+ case 'start':
40
+ style.insetInlineStart = offset.start;
41
+ style.insetBlockStart = offset.top;
42
+ style.insetBlockEnd = offset.bottom;
43
+ break;
44
+ case 'end':
45
+ style.insetInlineEnd = offset.end;
46
+ style.insetBlockStart = offset.top;
47
+ style.insetBlockEnd = offset.bottom;
48
+ break;
49
+ }
50
+ return style;
51
+ }
52
+ function computeStickyOffsets({ placement, offset: { top, bottom, start, end } = {}, stickyOffset: { top: stickyTop, bottom: stickyBottom } = {}, }) {
53
+ const style = {};
54
+ const offset = { top: top !== null && top !== void 0 ? top : 0, bottom: bottom !== null && bottom !== void 0 ? bottom : 0, start: start !== null && start !== void 0 ? start : 0, end: end !== null && end !== void 0 ? end : 0 };
55
+ const stickyOffset = { top: stickyTop !== null && stickyTop !== void 0 ? stickyTop : 0, bottom: stickyBottom !== null && stickyBottom !== void 0 ? stickyBottom : 0 };
56
+ switch (placement) {
57
+ case 'top':
58
+ style.insetBlockStart = stickyOffset.top;
59
+ style.marginBlockStart = offset.top;
60
+ style.marginInlineStart = offset.start;
61
+ style.marginInlineEnd = offset.end;
62
+ style.inlineSize = `calc(100% - ${offset.start + offset.end}px)`;
63
+ break;
64
+ case 'bottom':
65
+ style.insetBlockEnd = stickyOffset.bottom;
66
+ style.marginBlockEnd = offset.bottom;
67
+ style.marginInlineStart = offset.start;
68
+ style.marginInlineEnd = offset.end;
69
+ style.inlineSize = `calc(100% - ${offset.start + offset.end}px)`;
70
+ break;
71
+ }
72
+ return style;
73
+ }
74
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/drawer/utils.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAItC,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAIzE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAIrC,MAAM,UAAU,iBAAiB,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,KAAK,EAAiB;IAI7E,IAAI,QAAQ,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,SAAS,KAAK,OAAO,IAAI,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC,EAAE,CAAC;QACxF,QAAQ,CACN,QAAQ,EACR,sDAAsD,KAAK,CAAC,SAAS,wCAAwC,CAC9G,CAAC;QACF,QAAQ,GAAG,QAAQ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AAL,KAAK,cAAL,KAAK,GAAI,CAAC,EAAE,GAAG,EAAE,GAAG,aAAH,GAAG,cAAH,GAAG,GAAI,CAAC,EAAE,CAAC;IACxF,MAAM,YAAY,GAAG,EAAE,GAAG,EAAE,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,CAAC,EAAE,MAAM,EAAE,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,CAAC,EAAE,CAAC;IACxE,QAAQ,SAAS,EAAE,CAAC;QAClB,KAAK,KAAK;YACR,KAAK,CAAC,eAAe,GAAG,YAAY,CAAC,GAAG,CAAC;YACzC,KAAK,CAAC,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAC;YACpC,KAAK,CAAC,iBAAiB,GAAG,MAAM,CAAC,KAAK,CAAC;YACvC,KAAK,CAAC,eAAe,GAAG,MAAM,CAAC,GAAG,CAAC;YACnC,KAAK,CAAC,UAAU,GAAG,eAAe,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,GAAG,KAAK,CAAC;YACjE,MAAM;QACR,KAAK,QAAQ;YACX,KAAK,CAAC,aAAa,GAAG,YAAY,CAAC,MAAM,CAAC;YAC1C,KAAK,CAAC,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC;YACrC,KAAK,CAAC,iBAAiB,GAAG,MAAM,CAAC,KAAK,CAAC;YACvC,KAAK,CAAC,eAAe,GAAG,MAAM,CAAC,GAAG,CAAC;YACnC,KAAK,CAAC,UAAU,GAAG,eAAe,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,GAAG,KAAK,CAAC;YACjE,MAAM;IACV,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React from 'react';\n\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { NextDrawerProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\ntype PositionProps = Pick<NextDrawerProps, 'position' | 'placement' | 'offset' | 'stickyOffset' | 'zIndex'>;\n\nexport function getPositionStyles({ position, zIndex, ...props }: PositionProps): {\n className: string;\n style: React.CSSProperties;\n} {\n if (position === 'sticky' && (props.placement === 'start' || props.placement === 'end')) {\n warnOnce(\n 'Drawer',\n `position=\"sticky\" is not supported with placement=\"${props.placement}\" and falls back to position=\"static\".`\n );\n position = 'static';\n }\n switch (position) {\n case 'absolute':\n return getStyles(position, { position: 'absolute', zIndex, ...computeAbsoluteOffsets(props) });\n case 'sticky':\n return getStyles(position, { position: 'sticky', zIndex, ...computeStickyOffsets(props) });\n case 'fixed':\n return getStyles(position, { position: 'fixed', zIndex, ...computeAbsoluteOffsets(props) });\n case 'static':\n default:\n return getStyles(position);\n }\n}\n\nfunction getStyles(position: NextDrawerProps.Position = 'static', style: React.CSSProperties = {}) {\n return { className: styles[`position-${position}`], style };\n}\n\nfunction computeAbsoluteOffsets({\n placement,\n offset: { top, bottom, start, end } = {},\n}: Pick<NextDrawerProps, 'placement' | 'offset'>) {\n const style: React.CSSProperties = {};\n const offset = { top: top ?? 0, bottom: bottom ?? 0, start: start ?? 0, end: end ?? 0 };\n switch (placement) {\n case 'top':\n style.insetBlockStart = offset.top;\n style.insetInlineStart = offset.start;\n style.insetInlineEnd = offset.end;\n break;\n case 'bottom':\n style.insetBlockEnd = offset.bottom;\n style.insetInlineStart = offset.start;\n style.insetInlineEnd = offset.end;\n break;\n case 'start':\n style.insetInlineStart = offset.start;\n style.insetBlockStart = offset.top;\n style.insetBlockEnd = offset.bottom;\n break;\n case 'end':\n style.insetInlineEnd = offset.end;\n style.insetBlockStart = offset.top;\n style.insetBlockEnd = offset.bottom;\n break;\n }\n return style;\n}\n\nfunction computeStickyOffsets({\n placement,\n offset: { top, bottom, start, end } = {},\n stickyOffset: { top: stickyTop, bottom: stickyBottom } = {},\n}: Pick<NextDrawerProps, 'placement' | 'offset' | 'stickyOffset'>) {\n const style: React.CSSProperties = {};\n const offset = { top: top ?? 0, bottom: bottom ?? 0, start: start ?? 0, end: end ?? 0 };\n const stickyOffset = { top: stickyTop ?? 0, bottom: stickyBottom ?? 0 };\n switch (placement) {\n case 'top':\n style.insetBlockStart = stickyOffset.top;\n style.marginBlockStart = offset.top;\n style.marginInlineStart = offset.start;\n style.marginInlineEnd = offset.end;\n style.inlineSize = `calc(100% - ${offset.start + offset.end}px)`;\n break;\n case 'bottom':\n style.insetBlockEnd = stickyOffset.bottom;\n style.marginBlockEnd = offset.bottom;\n style.marginInlineStart = offset.start;\n style.marginInlineEnd = offset.end;\n style.inlineSize = `calc(100% - ${offset.start + offset.end}px)`;\n break;\n }\n return style;\n}\n"]}
@@ -283,6 +283,7 @@ body {
283
283
  --color-background-input-disabled-dihaja:var(--color-neutral-250-vs1is4);
284
284
  --color-background-item-selected-9gppru:var(--color-primary-50-1y05xv);
285
285
  --color-background-layout-main-5ilwcb:var(--color-white-p1zlvy);
286
+ --color-background-drawer-5hs0eh:var(--color-background-layout-panel-content-xto15e);
286
287
  --color-background-layout-mobile-panel-ed0ava:var(--color-neutral-950-lxybh8);
287
288
  --color-background-layout-panel-content-xto15e:var(--color-background-container-content-6u8rvp);
288
289
  --color-background-layout-panel-hover-tguulw:var(--color-neutral-250-vs1is4);
@@ -1401,6 +1402,7 @@ body {
1401
1402
  --color-background-card-p5vrq0:var(--color-background-container-content-6u8rvp);
1402
1403
  --color-background-item-card-ww2wfv:var(--color-background-card-p5vrq0);
1403
1404
  --color-background-dropdown-item-selected-f3v6te:var(--color-background-item-selected-9gppru);
1405
+ --color-background-drawer-5hs0eh:var(--color-background-layout-panel-content-xto15e);
1404
1406
  --color-background-layout-panel-content-xto15e:var(--color-background-container-content-6u8rvp);
1405
1407
  --color-background-modal-overlay-d7uby0:var(--color-grey-opaque-70-p0svy7);
1406
1408
  --color-background-segment-default-b0r494:var(--color-background-button-normal-default-7f99mv);
@@ -1668,6 +1670,7 @@ body {
1668
1670
  --color-background-card-p5vrq0:var(--color-background-container-content-6u8rvp);
1669
1671
  --color-background-item-card-ww2wfv:var(--color-background-card-p5vrq0);
1670
1672
  --color-background-dropdown-item-selected-f3v6te:var(--color-background-item-selected-9gppru);
1673
+ --color-background-drawer-5hs0eh:var(--color-background-layout-panel-content-xto15e);
1671
1674
  --color-background-layout-panel-content-xto15e:var(--color-background-container-content-6u8rvp);
1672
1675
  --color-background-modal-overlay-d7uby0:var(--color-grey-opaque-70-p0svy7);
1673
1676
  --color-background-segment-hover-800sl4:var(--color-background-button-normal-hover-53op9s);
@@ -2067,6 +2070,7 @@ body {
2067
2070
  --color-background-card-p5vrq0:var(--color-background-container-content-6u8rvp);
2068
2071
  --color-background-item-card-ww2wfv:var(--color-background-card-p5vrq0);
2069
2072
  --color-background-dropdown-item-selected-f3v6te:var(--color-background-item-selected-9gppru);
2073
+ --color-background-drawer-5hs0eh:var(--color-background-layout-panel-content-xto15e);
2070
2074
  --color-background-layout-panel-content-xto15e:var(--color-background-container-content-6u8rvp);
2071
2075
  --color-background-modal-overlay-d7uby0:var(--color-grey-opaque-70-p0svy7);
2072
2076
  --color-background-segment-default-b0r494:var(--color-background-button-normal-default-7f99mv);
@@ -2232,5 +2236,5 @@ body {
2232
2236
  }
2233
2237
  }
2234
2238
  :root {
2235
- --awsui-version-info-52ff00f9: true;
2239
+ --awsui-version-info-d634ab40: true;
2236
2240
  }
@@ -1,6 +1,6 @@
1
1
  export var PACKAGE_SOURCE = "components";
2
- export var PACKAGE_VERSION = "3.0.0 (52ff00f9)";
3
- export var GIT_SHA = "52ff00f9";
2
+ export var PACKAGE_VERSION = "3.0.0 (d634ab40)";
3
+ export var GIT_SHA = "d634ab40";
4
4
  export var THEME = "open-source-visual-refresh";
5
5
  export var SYSTEM = "core";
6
6
  export var ALWAYS_VISUAL_REFRESH = true;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "PACKAGE_SOURCE": "components",
3
- "PACKAGE_VERSION": "3.0.0 (52ff00f9)",
4
- "GIT_SHA": "52ff00f9",
3
+ "PACKAGE_VERSION": "3.0.0 (d634ab40)",
4
+ "GIT_SHA": "d634ab40",
5
5
  "THEME": "open-source-visual-refresh",
6
6
  "SYSTEM": "core",
7
7
  "ALWAYS_VISUAL_REFRESH": true
@@ -325,6 +325,7 @@ export const colorBackgroundInputDefault: string;
325
325
  export const colorBackgroundInputDisabled: string;
326
326
  export const colorBackgroundItemSelected: string;
327
327
  export const colorBackgroundLayoutMain: string;
328
+ export const colorBackgroundDrawer: string;
328
329
  export const colorBackgroundLayoutMobilePanel: string;
329
330
  export const colorBackgroundLayoutPanelContent: string;
330
331
  export const colorBackgroundLayoutPanelHover: string;
@@ -325,6 +325,7 @@ export var colorBackgroundInputDefault = "var(--color-background-input-default-i
325
325
  export var colorBackgroundInputDisabled = "var(--color-background-input-disabled-dihaja, #ebebf0)";
326
326
  export var colorBackgroundItemSelected = "var(--color-background-item-selected-9gppru, #f0fbff)";
327
327
  export var colorBackgroundLayoutMain = "var(--color-background-layout-main-5ilwcb, #ffffff)";
328
+ export var colorBackgroundDrawer = "var(--color-background-drawer-5hs0eh, #ffffff)";
328
329
  export var colorBackgroundLayoutMobilePanel = "var(--color-background-layout-mobile-panel-ed0ava, #0f141a)";
329
330
  export var colorBackgroundLayoutPanelContent = "var(--color-background-layout-panel-content-xto15e, #ffffff)";
330
331
  export var colorBackgroundLayoutPanelHover = "var(--color-background-layout-panel-hover-tguulw, #ebebf0)";
@@ -1347,6 +1347,10 @@ module.exports.preset = {
1347
1347
  "light": "{colorWhite}",
1348
1348
  "dark": "{colorNeutral850}"
1349
1349
  },
1350
+ "colorBackgroundDrawer": {
1351
+ "light": "{colorBackgroundLayoutPanelContent}",
1352
+ "dark": "{colorBackgroundLayoutPanelContent}"
1353
+ },
1350
1354
  "colorBackgroundLayoutMobilePanel": {
1351
1355
  "light": "{colorNeutral950}",
1352
1356
  "dark": "{colorNeutral950}"
@@ -3921,6 +3925,10 @@ module.exports.preset = {
3921
3925
  "light": "{colorNeutral850}",
3922
3926
  "dark": "{colorNeutral850}"
3923
3927
  },
3928
+ "colorBackgroundDrawer": {
3929
+ "light": "{colorBackgroundLayoutPanelContent}",
3930
+ "dark": "{colorBackgroundLayoutPanelContent}"
3931
+ },
3924
3932
  "colorBackgroundLayoutMobilePanel": {
3925
3933
  "light": "{colorNeutral950}",
3926
3934
  "dark": "{colorNeutral950}"
@@ -5366,6 +5374,10 @@ module.exports.preset = {
5366
5374
  "light": "{colorNeutral950}",
5367
5375
  "dark": "{colorNeutral950}"
5368
5376
  },
5377
+ "colorBackgroundDrawer": {
5378
+ "light": "{colorBackgroundLayoutPanelContent}",
5379
+ "dark": "{colorBackgroundLayoutPanelContent}"
5380
+ },
5369
5381
  "colorBackgroundLayoutMobilePanel": {
5370
5382
  "light": "{colorNeutral950}",
5371
5383
  "dark": "{colorNeutral950}"
@@ -6739,6 +6751,10 @@ module.exports.preset = {
6739
6751
  "light": "{colorWhite}",
6740
6752
  "dark": "{colorNeutral850}"
6741
6753
  },
6754
+ "colorBackgroundDrawer": {
6755
+ "light": "{colorBackgroundLayoutPanelContent}",
6756
+ "dark": "{colorBackgroundLayoutPanelContent}"
6757
+ },
6742
6758
  "colorBackgroundLayoutMobilePanel": {
6743
6759
  "light": "{colorNeutral950}",
6744
6760
  "dark": "{colorNeutral950}"
@@ -7997,6 +8013,10 @@ module.exports.preset = {
7997
8013
  "light": "{colorWhite}",
7998
8014
  "dark": "{colorNeutral850}"
7999
8015
  },
8016
+ "colorBackgroundDrawer": {
8017
+ "light": "{colorBackgroundLayoutPanelContent}",
8018
+ "dark": "{colorBackgroundLayoutPanelContent}"
8019
+ },
8000
8020
  "colorBackgroundLayoutMobilePanel": {
8001
8021
  "light": "{colorNeutral950}",
8002
8022
  "dark": "{colorNeutral950}"
@@ -9255,6 +9275,10 @@ module.exports.preset = {
9255
9275
  "light": "{colorWhite}",
9256
9276
  "dark": "{colorNeutral850}"
9257
9277
  },
9278
+ "colorBackgroundDrawer": {
9279
+ "light": "{colorBackgroundLayoutPanelContent}",
9280
+ "dark": "{colorBackgroundLayoutPanelContent}"
9281
+ },
9258
9282
  "colorBackgroundLayoutMobilePanel": {
9259
9283
  "light": "{colorNeutral950}",
9260
9284
  "dark": "{colorNeutral950}"
@@ -10515,6 +10539,10 @@ module.exports.preset = {
10515
10539
  "light": "{colorNeutral850}",
10516
10540
  "dark": "{colorNeutral850}"
10517
10541
  },
10542
+ "colorBackgroundDrawer": {
10543
+ "light": "{colorBackgroundLayoutPanelContent}",
10544
+ "dark": "{colorBackgroundLayoutPanelContent}"
10545
+ },
10518
10546
  "colorBackgroundLayoutMobilePanel": {
10519
10547
  "light": "{colorNeutral950}",
10520
10548
  "dark": "{colorNeutral950}"
@@ -11884,6 +11912,7 @@ module.exports.preset = {
11884
11912
  "colorBackgroundInputDisabled": "color",
11885
11913
  "colorBackgroundItemSelected": "color",
11886
11914
  "colorBackgroundLayoutMain": "color",
11915
+ "colorBackgroundDrawer": "color",
11887
11916
  "colorBackgroundLayoutMobilePanel": "color",
11888
11917
  "colorBackgroundLayoutPanelContent": "color",
11889
11918
  "colorBackgroundLayoutPanelHover": "color",
@@ -13664,6 +13693,7 @@ module.exports.preset = {
13664
13693
  "colorBackgroundInputDisabled": "color-background-input-disabled",
13665
13694
  "colorBackgroundItemSelected": "color-background-item-selected",
13666
13695
  "colorBackgroundLayoutMain": "color-background-layout-main",
13696
+ "colorBackgroundDrawer": "color-background-drawer",
13667
13697
  "colorBackgroundLayoutMobilePanel": "color-background-layout-mobile-panel",
13668
13698
  "colorBackgroundLayoutPanelContent": "color-background-layout-panel-content",
13669
13699
  "colorBackgroundLayoutPanelHover": "color-background-layout-panel-hover",
@@ -14554,6 +14584,7 @@ module.exports.preset = {
14554
14584
  "colorBackgroundInputDisabled": "--color-background-input-disabled-dihaja",
14555
14585
  "colorBackgroundItemSelected": "--color-background-item-selected-9gppru",
14556
14586
  "colorBackgroundLayoutMain": "--color-background-layout-main-5ilwcb",
14587
+ "colorBackgroundDrawer": "--color-background-drawer-5hs0eh",
14557
14588
  "colorBackgroundLayoutMobilePanel": "--color-background-layout-mobile-panel-ed0ava",
14558
14589
  "colorBackgroundLayoutPanelContent": "--color-background-layout-panel-content-xto15e",
14559
14590
  "colorBackgroundLayoutPanelHover": "--color-background-layout-panel-hover-tguulw",
@@ -1347,6 +1347,10 @@ export var preset = {
1347
1347
  "light": "{colorWhite}",
1348
1348
  "dark": "{colorNeutral850}"
1349
1349
  },
1350
+ "colorBackgroundDrawer": {
1351
+ "light": "{colorBackgroundLayoutPanelContent}",
1352
+ "dark": "{colorBackgroundLayoutPanelContent}"
1353
+ },
1350
1354
  "colorBackgroundLayoutMobilePanel": {
1351
1355
  "light": "{colorNeutral950}",
1352
1356
  "dark": "{colorNeutral950}"
@@ -3921,6 +3925,10 @@ export var preset = {
3921
3925
  "light": "{colorNeutral850}",
3922
3926
  "dark": "{colorNeutral850}"
3923
3927
  },
3928
+ "colorBackgroundDrawer": {
3929
+ "light": "{colorBackgroundLayoutPanelContent}",
3930
+ "dark": "{colorBackgroundLayoutPanelContent}"
3931
+ },
3924
3932
  "colorBackgroundLayoutMobilePanel": {
3925
3933
  "light": "{colorNeutral950}",
3926
3934
  "dark": "{colorNeutral950}"
@@ -5366,6 +5374,10 @@ export var preset = {
5366
5374
  "light": "{colorNeutral950}",
5367
5375
  "dark": "{colorNeutral950}"
5368
5376
  },
5377
+ "colorBackgroundDrawer": {
5378
+ "light": "{colorBackgroundLayoutPanelContent}",
5379
+ "dark": "{colorBackgroundLayoutPanelContent}"
5380
+ },
5369
5381
  "colorBackgroundLayoutMobilePanel": {
5370
5382
  "light": "{colorNeutral950}",
5371
5383
  "dark": "{colorNeutral950}"
@@ -6739,6 +6751,10 @@ export var preset = {
6739
6751
  "light": "{colorWhite}",
6740
6752
  "dark": "{colorNeutral850}"
6741
6753
  },
6754
+ "colorBackgroundDrawer": {
6755
+ "light": "{colorBackgroundLayoutPanelContent}",
6756
+ "dark": "{colorBackgroundLayoutPanelContent}"
6757
+ },
6742
6758
  "colorBackgroundLayoutMobilePanel": {
6743
6759
  "light": "{colorNeutral950}",
6744
6760
  "dark": "{colorNeutral950}"
@@ -7997,6 +8013,10 @@ export var preset = {
7997
8013
  "light": "{colorWhite}",
7998
8014
  "dark": "{colorNeutral850}"
7999
8015
  },
8016
+ "colorBackgroundDrawer": {
8017
+ "light": "{colorBackgroundLayoutPanelContent}",
8018
+ "dark": "{colorBackgroundLayoutPanelContent}"
8019
+ },
8000
8020
  "colorBackgroundLayoutMobilePanel": {
8001
8021
  "light": "{colorNeutral950}",
8002
8022
  "dark": "{colorNeutral950}"
@@ -9255,6 +9275,10 @@ export var preset = {
9255
9275
  "light": "{colorWhite}",
9256
9276
  "dark": "{colorNeutral850}"
9257
9277
  },
9278
+ "colorBackgroundDrawer": {
9279
+ "light": "{colorBackgroundLayoutPanelContent}",
9280
+ "dark": "{colorBackgroundLayoutPanelContent}"
9281
+ },
9258
9282
  "colorBackgroundLayoutMobilePanel": {
9259
9283
  "light": "{colorNeutral950}",
9260
9284
  "dark": "{colorNeutral950}"
@@ -10515,6 +10539,10 @@ export var preset = {
10515
10539
  "light": "{colorNeutral850}",
10516
10540
  "dark": "{colorNeutral850}"
10517
10541
  },
10542
+ "colorBackgroundDrawer": {
10543
+ "light": "{colorBackgroundLayoutPanelContent}",
10544
+ "dark": "{colorBackgroundLayoutPanelContent}"
10545
+ },
10518
10546
  "colorBackgroundLayoutMobilePanel": {
10519
10547
  "light": "{colorNeutral950}",
10520
10548
  "dark": "{colorNeutral950}"
@@ -11884,6 +11912,7 @@ export var preset = {
11884
11912
  "colorBackgroundInputDisabled": "color",
11885
11913
  "colorBackgroundItemSelected": "color",
11886
11914
  "colorBackgroundLayoutMain": "color",
11915
+ "colorBackgroundDrawer": "color",
11887
11916
  "colorBackgroundLayoutMobilePanel": "color",
11888
11917
  "colorBackgroundLayoutPanelContent": "color",
11889
11918
  "colorBackgroundLayoutPanelHover": "color",
@@ -13664,6 +13693,7 @@ export var preset = {
13664
13693
  "colorBackgroundInputDisabled": "color-background-input-disabled",
13665
13694
  "colorBackgroundItemSelected": "color-background-item-selected",
13666
13695
  "colorBackgroundLayoutMain": "color-background-layout-main",
13696
+ "colorBackgroundDrawer": "color-background-drawer",
13667
13697
  "colorBackgroundLayoutMobilePanel": "color-background-layout-mobile-panel",
13668
13698
  "colorBackgroundLayoutPanelContent": "color-background-layout-panel-content",
13669
13699
  "colorBackgroundLayoutPanelHover": "color-background-layout-panel-hover",
@@ -14554,6 +14584,7 @@ export var preset = {
14554
14584
  "colorBackgroundInputDisabled": "--color-background-input-disabled-dihaja",
14555
14585
  "colorBackgroundItemSelected": "--color-background-item-selected-9gppru",
14556
14586
  "colorBackgroundLayoutMain": "--color-background-layout-main-5ilwcb",
14587
+ "colorBackgroundDrawer": "--color-background-drawer-5hs0eh",
14557
14588
  "colorBackgroundLayoutMobilePanel": "--color-background-layout-mobile-panel-ed0ava",
14558
14589
  "colorBackgroundLayoutPanelContent": "--color-background-layout-panel-content-xto15e",
14559
14590
  "colorBackgroundLayoutPanelHover": "--color-background-layout-panel-hover-tguulw",
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "52ff00f93218b659c42bc49c07b0cb6affa94be7"
2
+ "commit": "d634ab4089a8a3ab98d37da33f302d309e4a63cc"
3
3
  }
package/package.json CHANGED
@@ -164,7 +164,7 @@
164
164
  "./internal/base-component/index.js",
165
165
  "./internal/base-component/styles.css.js"
166
166
  ],
167
- "version": "3.0.1277",
167
+ "version": "3.0.1279",
168
168
  "repository": {
169
169
  "type": "git",
170
170
  "url": "https://github.com/cloudscape-design/components.git"
@@ -7,6 +7,7 @@ export interface ItemSelectionProps {
7
7
  onChange: () => void;
8
8
  onShiftToggle?: (value: boolean) => void;
9
9
  ariaLabel?: string;
10
+ ariaDescribedby?: string;
10
11
  selectionGroupLabel?: string;
11
12
  }
12
13
  export interface SelectionProps<T> {
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../src/table/selection/interfaces.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,QAAQ,GAAG,OAAO,CAAC;IAClC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,cAAc,CAAC,CAAC;IAC/B,cAAc,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,kBAAkB,CAAC;IAC7C,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,kBAAkB,CAAC;IACxD,uBAAuB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,CAAC,KAAK,kBAAkB,CAAC;CAClE"}
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../src/table/selection/interfaces.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,QAAQ,GAAG,OAAO,CAAC;IAClC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,cAAc,CAAC,CAAC;IAC/B,cAAc,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,kBAAkB,CAAC;IAC7C,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,kBAAkB,CAAC;IACxD,uBAAuB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,CAAC,KAAK,kBAAkB,CAAC;CAClE"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../src/table/selection/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport interface ItemSelectionProps {\n name: string;\n disabled: boolean;\n selectionType: 'single' | 'multi';\n indeterminate?: boolean;\n checked: boolean;\n onChange: () => void;\n onShiftToggle?: (value: boolean) => void;\n ariaLabel?: string;\n selectionGroupLabel?: string;\n}\n\nexport interface SelectionProps<T> {\n isItemSelected: (item: T) => boolean;\n getSelectAllProps?: () => ItemSelectionProps;\n getItemSelectionProps?: (item: T) => ItemSelectionProps;\n getLoaderSelectionProps?: (item: null | T) => ItemSelectionProps;\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../src/table/selection/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport interface ItemSelectionProps {\n name: string;\n disabled: boolean;\n selectionType: 'single' | 'multi';\n indeterminate?: boolean;\n checked: boolean;\n onChange: () => void;\n onShiftToggle?: (value: boolean) => void;\n ariaLabel?: string;\n ariaDescribedby?: string;\n selectionGroupLabel?: string;\n}\n\nexport interface SelectionProps<T> {\n isItemSelected: (item: T) => boolean;\n getSelectAllProps?: () => ItemSelectionProps;\n getItemSelectionProps?: (item: T) => ItemSelectionProps;\n getLoaderSelectionProps?: (item: null | T) => ItemSelectionProps;\n}\n"]}
@@ -19,6 +19,7 @@ export declare function SelectionControl({
19
19
  onFocusDown,
20
20
  name,
21
21
  ariaLabel,
22
+ ariaDescribedby,
22
23
  focusedComponent,
23
24
  rowIndex,
24
25
  itemKey,
@@ -1 +1 @@
1
- {"version":3,"file":"selection-control.d.ts","sourceRoot":"","sources":["../../../../src/table/selection/selection-control.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAiB,oBAAoB,EAAc,MAAM,OAAO,CAAC;AAS/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAIlD,MAAM,WAAW,qBAAsB,SAAQ,kBAAkB;IAC/D,aAAa,CAAC,CAAC,YAAY,EAAE,OAAO,GAAG,IAAI,CAAC;IAC5C,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;IACd,gBAAgB,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;CAClC;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,aAAa,EACb,aAAqB,EACrB,aAAa,EACb,SAAS,EACT,WAAW,EACX,IAAI,EACJ,SAAS,EACT,gBAAgB,EAChB,QAAQ,EACR,OAAO,EACP,aAAwB,EACxB,QAAQ,EACR,GAAG,WAAW,EACf,EAAE,qBAAqB,eAoFvB"}
1
+ {"version":3,"file":"selection-control.d.ts","sourceRoot":"","sources":["../../../../src/table/selection/selection-control.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAiB,oBAAoB,EAAc,MAAM,OAAO,CAAC;AAS/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAIlD,MAAM,WAAW,qBAAsB,SAAQ,kBAAkB;IAC/D,aAAa,CAAC,CAAC,YAAY,EAAE,OAAO,GAAG,IAAI,CAAC;IAC5C,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;IACd,gBAAgB,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;CAClC;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,aAAa,EACb,aAAqB,EACrB,aAAa,EACb,SAAS,EACT,WAAW,EACX,IAAI,EACJ,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,QAAQ,EACR,OAAO,EACP,aAAwB,EACxB,QAAQ,EACR,GAAG,WAAW,EACf,EAAE,qBAAqB,eAqGvB"}
@@ -8,7 +8,7 @@ import InternalCheckbox from '../../checkbox/internal';
8
8
  import RadioButton from '../../internal/components/radio-button';
9
9
  import { KeyCode } from '../../internal/keycode';
10
10
  import styles from './styles.css.js';
11
- export function SelectionControl({ selectionType, indeterminate = false, onShiftToggle, onFocusUp, onFocusDown, name, ariaLabel, focusedComponent, rowIndex, itemKey, verticalAlign = 'middle', onChange, ...sharedProps }) {
11
+ export function SelectionControl({ selectionType, indeterminate = false, onShiftToggle, onFocusUp, onFocusDown, name, ariaLabel, ariaDescribedby, focusedComponent, rowIndex, itemKey, verticalAlign = 'middle', onChange, ...sharedProps }) {
12
12
  const controlId = useUniqueId();
13
13
  const isMultiSelection = selectionType === 'multi';
14
14
  const { navigationActive } = useSingleTabStopNavigation(null);
@@ -46,7 +46,14 @@ export function SelectionControl({ selectionType, indeterminate = false, onShift
46
46
  // Clicking on input, does not focus it on Firefox (AWSUI-11345)
47
47
  nativeInput === null || nativeInput === void 0 ? void 0 : nativeInput.focus();
48
48
  };
49
- const selector = isMultiSelection ? (React.createElement(InternalCheckbox, { ...sharedProps, onChange: onChange, showOutline: focusedComponent === 'selection-control', controlId: controlId, "data-focus-id": "selection-control", indeterminate: indeterminate })) : (React.createElement(RadioButton, { ...sharedProps, controlId: controlId, name: name, value: '', onSelect: onChange }));
49
+ const nativeInputAttributes = {};
50
+ if (ariaLabel) {
51
+ nativeInputAttributes['aria-label'] = ariaLabel;
52
+ }
53
+ if (ariaDescribedby) {
54
+ nativeInputAttributes['aria-describedby'] = ariaDescribedby;
55
+ }
56
+ const selector = isMultiSelection ? (React.createElement(InternalCheckbox, { ...sharedProps, onChange: onChange, showOutline: focusedComponent === 'selection-control', controlId: controlId, "data-focus-id": "selection-control", indeterminate: indeterminate, ariaLabel: ariaLabel, ariaDescribedby: ariaDescribedby })) : (React.createElement(RadioButton, { ...sharedProps, controlId: controlId, name: name, value: '', onSelect: onChange, nativeInputAttributes: Object.keys(nativeInputAttributes).length > 0 ? nativeInputAttributes : undefined }));
50
57
  return (React.createElement(React.Fragment, null,
51
58
  React.createElement("label", { onKeyDown: handleKeyDown, onKeyUp: setShiftState, onMouseDown: onMouseDownHandler, onMouseUp: setShiftState, onClick: handleClick, htmlFor: controlId, className: clsx(styles.label, styles.root, verticalAlign === 'top' && styles['label-top']), "aria-label": ariaLabel, title: ariaLabel, ...(rowIndex !== undefined && !sharedProps.disabled
52
59
  ? getAnalyticsMetadataAttribute({
@@ -1 +1 @@
1
- {"version":3,"file":"selection-control.js","sourceRoot":"","sources":["../../../../src/table/selection/selection-control.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAA0D,MAAM,OAAO,CAAC;AAC/E,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,0BAA0B,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;A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SAAS,EAClB,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,aAAa,KAAK,KAAK,IAAI,MAAM,CAAC,WAAW,CAAC,CAAC,gBAC9E,SAAS,EACrB,KAAK,EAAE,SAAS,KACZ,CAAC,QAAQ,KAAK,SAAS,IAAI,CAAC,WAAW,CAAC,QAAQ;gBAClD,CAAC,CAAC,6BAA6B,CAAC;oBAC5B,MAAM,EAAE;wBACN,QAAQ,EAAE,GAAG,QAAQ,GAAG,CAAC,EAAE;wBAC3B,IAAI,EAAE,OAAO,IAAI,EAAE;qBACpB;iBACF,CAAC;gBACJ,CAAC,CAAC,EAAE,CAAC,IAEN,QAAQ,CACH;QACR,8BAAM,SAAS,EAAE,MAAM,CAAC,IAAI,iBAAe,IAAI,aAExC,CACN,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { KeyboardEvent, KeyboardEventHandler, MouseEvent } from 'react';\nimport clsx from 'clsx';\n\nimport { useSingleTabStopNavigation, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalCheckbox from '../../checkbox/internal';\nimport RadioButton from '../../internal/components/radio-button';\nimport { KeyCode } from '../../internal/keycode';\nimport { ItemSelectionProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\nexport interface SelectionControlProps extends ItemSelectionProps {\n onShiftToggle?(shiftPressed: boolean): void;\n onFocusUp?: KeyboardEventHandler;\n onFocusDown?: KeyboardEventHandler;\n ariaLabel?: string;\n tabIndex?: -1;\n focusedComponent?: null | string;\n rowIndex?: number;\n itemKey?: string;\n verticalAlign?: 'middle' | 'top';\n}\n\nexport function SelectionControl({\n selectionType,\n indeterminate = false,\n onShiftToggle,\n onFocusUp,\n onFocusDown,\n name,\n ariaLabel,\n focusedComponent,\n rowIndex,\n itemKey,\n verticalAlign = 'middle',\n onChange,\n ...sharedProps\n}: SelectionControlProps) {\n const controlId = useUniqueId();\n const isMultiSelection = selectionType === 'multi';\n const { navigationActive } = useSingleTabStopNavigation(null);\n\n const setShiftState = (event: KeyboardEvent | MouseEvent) => {\n if (isMultiSelection) {\n onShiftToggle?.(event.shiftKey);\n }\n };\n\n const onMouseDownHandler = (event: MouseEvent) => {\n setShiftState(event);\n if (isMultiSelection) {\n // To overcome an issue\n // If you shift+click or ctrl+click on a label for a checkbox, checkbox is not checked.\n // https://bugzilla.mozilla.org/show_bug.cgi?id=559506\n event.preventDefault();\n }\n };\n\n // native checkboxes do not have focus move via keyboard, we implement it here programmatically\n const handleKeyDown = (event: KeyboardEvent) => {\n setShiftState(event);\n if (isMultiSelection && !navigationActive) {\n if (event.keyCode === KeyCode.up) {\n event.preventDefault();\n onFocusUp?.(event);\n }\n if (event.keyCode === KeyCode.down) {\n event.preventDefault();\n onFocusDown?.(event);\n }\n }\n };\n\n const handleClick = (event: MouseEvent) => {\n const target = event.currentTarget;\n const nativeInput = (target.tagName === 'INPUT' ? target : target.querySelector('input')) as HTMLInputElement;\n // Clicking on input, does not focus it on Firefox (AWSUI-11345)\n nativeInput?.focus();\n };\n\n const selector = isMultiSelection ? (\n <InternalCheckbox\n {...sharedProps}\n onChange={onChange}\n showOutline={focusedComponent === 'selection-control'}\n controlId={controlId}\n data-focus-id=\"selection-control\"\n indeterminate={indeterminate}\n />\n ) : (\n <RadioButton {...sharedProps} controlId={controlId} name={name} value={''} onSelect={onChange} />\n );\n\n return (\n <>\n <label\n onKeyDown={handleKeyDown}\n onKeyUp={setShiftState}\n onMouseDown={onMouseDownHandler}\n onMouseUp={setShiftState}\n onClick={handleClick}\n htmlFor={controlId}\n className={clsx(styles.label, styles.root, verticalAlign === 'top' && styles['label-top'])}\n aria-label={ariaLabel}\n title={ariaLabel}\n {...(rowIndex !== undefined && !sharedProps.disabled\n ? getAnalyticsMetadataAttribute({\n detail: {\n position: `${rowIndex + 1}`,\n item: itemKey || '',\n },\n })\n : {})}\n >\n {selector}\n </label>\n <span className={styles.stud} aria-hidden={true}>\n &nbsp;\n </span>\n </>\n );\n}\n"]}
1
+ {"version":3,"file":"selection-control.js","sourceRoot":"","sources":["../../../../src/table/selection/selection-control.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAA0D,MAAM,OAAO,CAAC;AAC/E,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,0BAA0B,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AACxG,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,gBAAgB,MAAM,yBAAyB,CAAC;AACvD,OAAO,WAAW,MAAM,wCAAwC,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAGjD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAcrC,MAAM,UAAU,gBAAgB,CAAC,EAC/B,aAAa,EACb,aAAa,GAAG,KAAK,EACrB,aAAa,EACb,SAAS,EACT,WAAW,EACX,IAAI,EACJ,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,QAAQ,EACR,OAAO,EACP,aAAa,GAAG,QAAQ,EACxB,QAAQ,EACR,GAAG,WAAW,EACQ;IACtB,MAAM,SAAS,GAAG,WAAW,EAAE,CAAC;IAChC,MAAM,gBAAgB,GAAG,aAAa,KAAK,OAAO,CAAC;IACnD,MAAM,EAAE,gBAAgB,EAAE,GAAG,0BAA0B,CAAC,IAAI,CAAC,CAAC;IAE9D,MAAM,aAAa,GAAG,CAAC,KAAiC,EAAE,EAAE;QAC1D,IAAI,gBAAgB,EAAE,CAAC;YACrB,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAG,KAAK,CAAC,QAAQ,CAAC,CAAC;QAClC,CAAC;IACH,CAAC,CAAC;IAEF,MAAM,kBAAkB,GAAG,CAAC,KA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,IAEN,QAAQ,CACH;QACR,8BAAM,SAAS,EAAE,MAAM,CAAC,IAAI,iBAAe,IAAI,aAExC,CACN,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { KeyboardEvent, KeyboardEventHandler, MouseEvent } from 'react';\nimport clsx from 'clsx';\n\nimport { useSingleTabStopNavigation, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalCheckbox from '../../checkbox/internal';\nimport RadioButton from '../../internal/components/radio-button';\nimport { KeyCode } from '../../internal/keycode';\nimport { ItemSelectionProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\nexport interface SelectionControlProps extends ItemSelectionProps {\n onShiftToggle?(shiftPressed: boolean): void;\n onFocusUp?: KeyboardEventHandler;\n onFocusDown?: KeyboardEventHandler;\n ariaLabel?: string;\n tabIndex?: -1;\n focusedComponent?: null | string;\n rowIndex?: number;\n itemKey?: string;\n verticalAlign?: 'middle' | 'top';\n}\n\nexport function SelectionControl({\n selectionType,\n indeterminate = false,\n onShiftToggle,\n onFocusUp,\n onFocusDown,\n name,\n ariaLabel,\n ariaDescribedby,\n focusedComponent,\n rowIndex,\n itemKey,\n verticalAlign = 'middle',\n onChange,\n ...sharedProps\n}: SelectionControlProps) {\n const controlId = useUniqueId();\n const isMultiSelection = selectionType === 'multi';\n const { navigationActive } = useSingleTabStopNavigation(null);\n\n const setShiftState = (event: KeyboardEvent | MouseEvent) => {\n if (isMultiSelection) {\n onShiftToggle?.(event.shiftKey);\n }\n };\n\n const onMouseDownHandler = (event: MouseEvent) => {\n setShiftState(event);\n if (isMultiSelection) {\n // To overcome an issue\n // If you shift+click or ctrl+click on a label for a checkbox, checkbox is not checked.\n // https://bugzilla.mozilla.org/show_bug.cgi?id=559506\n event.preventDefault();\n }\n };\n\n // native checkboxes do not have focus move via keyboard, we implement it here programmatically\n const handleKeyDown = (event: KeyboardEvent) => {\n setShiftState(event);\n if (isMultiSelection && !navigationActive) {\n if (event.keyCode === KeyCode.up) {\n event.preventDefault();\n onFocusUp?.(event);\n }\n if (event.keyCode === KeyCode.down) {\n event.preventDefault();\n onFocusDown?.(event);\n }\n }\n };\n\n const handleClick = (event: MouseEvent) => {\n const target = event.currentTarget;\n const nativeInput = (target.tagName === 'INPUT' ? target : target.querySelector('input')) as HTMLInputElement;\n // Clicking on input, does not focus it on Firefox (AWSUI-11345)\n nativeInput?.focus();\n };\n\n const nativeInputAttributes: Record<string, string> = {};\n if (ariaLabel) {\n nativeInputAttributes['aria-label'] = ariaLabel;\n }\n if (ariaDescribedby) {\n nativeInputAttributes['aria-describedby'] = ariaDescribedby;\n }\n\n const selector = isMultiSelection ? (\n <InternalCheckbox\n {...sharedProps}\n onChange={onChange}\n showOutline={focusedComponent === 'selection-control'}\n controlId={controlId}\n data-focus-id=\"selection-control\"\n indeterminate={indeterminate}\n ariaLabel={ariaLabel}\n ariaDescribedby={ariaDescribedby}\n />\n ) : (\n <RadioButton\n {...sharedProps}\n controlId={controlId}\n name={name}\n value={''}\n onSelect={onChange}\n nativeInputAttributes={Object.keys(nativeInputAttributes).length > 0 ? nativeInputAttributes : undefined}\n />\n );\n\n return (\n <>\n <label\n onKeyDown={handleKeyDown}\n onKeyUp={setShiftState}\n onMouseDown={onMouseDownHandler}\n onMouseUp={setShiftState}\n onClick={handleClick}\n htmlFor={controlId}\n className={clsx(styles.label, styles.root, verticalAlign === 'top' && styles['label-top'])}\n aria-label={ariaLabel}\n title={ariaLabel}\n {...(rowIndex !== undefined && !sharedProps.disabled\n ? getAnalyticsMetadataAttribute({\n detail: {\n position: `${rowIndex + 1}`,\n item: itemKey || '',\n },\n })\n : {})}\n >\n {selector}\n </label>\n <span className={styles.stud} aria-hidden={true}>\n &nbsp;\n </span>\n </>\n );\n}\n"]}