@cloudscape-design/board-components 3.0.111 → 3.0.113

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 (49) hide show
  1. package/board-item/interfaces.d.ts +4 -0
  2. package/board-item/interfaces.js.map +1 -1
  3. package/board-item/internal.d.ts +1 -1
  4. package/board-item/internal.js +18 -2
  5. package/board-item/internal.js.map +1 -1
  6. package/board-item/styles.css.js +11 -11
  7. package/board-item/styles.scoped.css +12 -14
  8. package/board-item/styles.selectors.js +11 -11
  9. package/internal/api-docs/components/board-item.js +11 -1
  10. package/internal/drag-handle/index.d.ts +7 -2
  11. package/internal/drag-handle/index.js +10 -4
  12. package/internal/drag-handle/index.js.map +1 -1
  13. package/internal/drag-handle/styles.css.js +2 -2
  14. package/internal/drag-handle/styles.scoped.css +13 -22
  15. package/internal/drag-handle/styles.selectors.js +2 -2
  16. package/internal/{handle → drag-handle/test-classes}/styles.css.js +1 -1
  17. package/internal/drag-handle/test-classes/styles.scoped.css +7 -0
  18. package/internal/{handle → drag-handle/test-classes}/styles.selectors.js +1 -1
  19. package/internal/environment.js +1 -1
  20. package/internal/environment.json +1 -1
  21. package/internal/generated/styles/tokens.d.ts +1 -0
  22. package/internal/generated/styles/tokens.js +1 -0
  23. package/internal/generated/theming/index.cjs +9 -0
  24. package/internal/generated/theming/index.cjs.d.ts +9 -0
  25. package/internal/generated/theming/index.d.ts +9 -0
  26. package/internal/generated/theming/index.js +9 -0
  27. package/internal/global-drag-state-styles/index.js +8 -3
  28. package/internal/global-drag-state-styles/index.js.map +1 -1
  29. package/internal/item-container/index.d.ts +67 -5
  30. package/internal/item-container/index.js +147 -118
  31. package/internal/item-container/index.js.map +1 -1
  32. package/internal/item-container/utils.d.ts +37 -0
  33. package/internal/item-container/utils.js +63 -0
  34. package/internal/item-container/utils.js.map +1 -0
  35. package/internal/manifest.json +1 -1
  36. package/internal/resize-handle/index.d.ts +6 -2
  37. package/internal/resize-handle/index.js +10 -4
  38. package/internal/resize-handle/index.js.map +1 -1
  39. package/internal/resize-handle/styles.css.js +2 -2
  40. package/internal/resize-handle/styles.scoped.css +13 -22
  41. package/internal/resize-handle/styles.selectors.js +2 -2
  42. package/internal/resize-handle/test-classes/styles.css.js +6 -0
  43. package/internal/resize-handle/test-classes/styles.scoped.css +7 -0
  44. package/internal/resize-handle/test-classes/styles.selectors.js +7 -0
  45. package/package.json +1 -1
  46. package/internal/handle/index.d.ts +0 -3
  47. package/internal/handle/index.js +0 -18
  48. package/internal/handle/index.js.map +0 -1
  49. package/internal/handle/styles.scoped.css +0 -15
@@ -29,6 +29,8 @@ export interface BoardItemProps {
29
29
  * * `dragHandleAriaDescription` (string, optional) - the ARIA description for the drag handle.
30
30
  * * `resizeHandleAriaLabel` (string) - the ARIA label for the resize handle.
31
31
  * * `resizeHandleAriaDescription` (string, optional) - the ARIA description for the resize handle.
32
+ * * `dragHandleTooltipText` (string, optional) - the ARIA description for the resize handle.
33
+ * * `resizeHandleTooltipText` (string, optional) - the Text for the resize handle Tooltip.
32
34
  */
33
35
  i18nStrings: BoardItemProps.I18nStrings;
34
36
  }
@@ -38,5 +40,7 @@ export declare namespace BoardItemProps {
38
40
  dragHandleAriaDescription?: string;
39
41
  resizeHandleAriaLabel: string;
40
42
  resizeHandleAriaDescription?: string;
43
+ dragHandleTooltipText?: string;
44
+ resizeHandleTooltipText?: string;
41
45
  }
42
46
  }
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/board-item/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ReactNode } from \"react\";\n\nexport interface BoardItemProps {\n /**\n * Heading element of the item. Use the [header component](/components/header/).\n */\n header?: ReactNode;\n\n /**\n * Main content of the item.\n */\n children?: ReactNode;\n\n /**\n * Determines whether the main content of the item has padding. If `true`, removes the default padding\n * from the content area.\n */\n disableContentPaddings?: boolean;\n\n /**\n * Footer of the item.\n */\n footer?: ReactNode;\n\n /**\n * Additional slot next to the heading. Use it to render an overflow actions menu in the form of a button dropdown.\n */\n settings?: ReactNode;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n *\n * ARIA labels:\n * * `dragHandleAriaLabel` (string) - the ARIA label for the drag handle.\n * * `dragHandleAriaDescription` (string, optional) - the ARIA description for the drag handle.\n * * `resizeHandleAriaLabel` (string) - the ARIA label for the resize handle.\n * * `resizeHandleAriaDescription` (string, optional) - the ARIA description for the resize handle.\n */\n i18nStrings: BoardItemProps.I18nStrings;\n}\n\nexport namespace BoardItemProps {\n export interface I18nStrings {\n dragHandleAriaLabel: string;\n dragHandleAriaDescription?: string;\n resizeHandleAriaLabel: string;\n resizeHandleAriaDescription?: string;\n }\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/board-item/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ReactNode } from \"react\";\n\nexport interface BoardItemProps {\n /**\n * Heading element of the item. Use the [header component](/components/header/).\n */\n header?: ReactNode;\n\n /**\n * Main content of the item.\n */\n children?: ReactNode;\n\n /**\n * Determines whether the main content of the item has padding. If `true`, removes the default padding\n * from the content area.\n */\n disableContentPaddings?: boolean;\n\n /**\n * Footer of the item.\n */\n footer?: ReactNode;\n\n /**\n * Additional slot next to the heading. Use it to render an overflow actions menu in the form of a button dropdown.\n */\n settings?: ReactNode;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n *\n * ARIA labels:\n * * `dragHandleAriaLabel` (string) - the ARIA label for the drag handle.\n * * `dragHandleAriaDescription` (string, optional) - the ARIA description for the drag handle.\n * * `resizeHandleAriaLabel` (string) - the ARIA label for the resize handle.\n * * `resizeHandleAriaDescription` (string, optional) - the ARIA description for the resize handle.\n * * `dragHandleTooltipText` (string, optional) - the ARIA description for the resize handle.\n * * `resizeHandleTooltipText` (string, optional) - the Text for the resize handle Tooltip.\n */\n i18nStrings: BoardItemProps.I18nStrings;\n}\n\nexport namespace BoardItemProps {\n export interface I18nStrings {\n dragHandleAriaLabel: string;\n dragHandleAriaDescription?: string;\n resizeHandleAriaLabel: string;\n resizeHandleAriaDescription?: string;\n dragHandleTooltipText?: string;\n resizeHandleTooltipText?: string;\n }\n}\n"]}
@@ -1,3 +1,3 @@
1
1
  import { InternalBaseComponentProps } from "../internal/base-component/use-base-component";
2
2
  import type { BoardItemProps } from "./interfaces";
3
- export declare function InternalBoardItem({ children, header, settings, disableContentPaddings, footer, i18nStrings, __internalRootRef, ...rest }: BoardItemProps & InternalBaseComponentProps): import("react/jsx-runtime").JSX.Element;
3
+ export declare function InternalBoardItem({ children, header, settings, disableContentPaddings, footer, i18nStrings, __internalRootRef, ...rest }: BoardItemProps & InternalBaseComponentProps): import("react/jsx-runtime").JSX.Element | null;
@@ -11,12 +11,28 @@ import ResizeHandle from "../internal/resize-handle";
11
11
  import ScreenreaderOnly from "../internal/screenreader-only";
12
12
  import WidgetContainerHeader from "./header";
13
13
  import styles from "./styles.css.js";
14
+ const mapToKeyboardDirection = (direction) => {
15
+ const directionMap = {
16
+ "inline-start": "left",
17
+ "inline-end": "right",
18
+ "block-start": "up",
19
+ "block-end": "down",
20
+ };
21
+ return directionMap[direction];
22
+ };
14
23
  export function InternalBoardItem({ children, header, settings, disableContentPaddings, footer, i18nStrings, __internalRootRef, ...rest }) {
15
- const { dragHandle, resizeHandle, isActive } = useItemContext();
24
+ const { dragHandle, resizeHandle, isActive, isHidden } = useItemContext();
16
25
  const dragHandleAriaLabelledBy = useId();
17
26
  const dragHandleAriaDescribedBy = useId();
18
27
  const resizeHandleAriaLabelledBy = useId();
19
28
  const resizeHandleAriaDescribedBy = useId();
20
- return (_jsxs("div", { ref: __internalRootRef, className: styles.root, ...getDataAttributes(rest), children: [_jsx(Container, { fitHeight: true, disableHeaderPaddings: true, header: _jsx(WidgetContainerHeader, { handle: _jsx(DragHandle, { ref: dragHandle.ref, ariaLabelledBy: dragHandleAriaLabelledBy, ariaDescribedBy: dragHandleAriaDescribedBy, onPointerDown: dragHandle.onPointerDown, onKeyDown: dragHandle.onKeyDown, isActive: dragHandle.isActive }), settings: settings, children: header }), footer: footer, disableContentPaddings: disableContentPaddings, className: clsx(styles["container-override"], isActive && styles.active), children: children }), resizeHandle && (_jsx("div", { className: styles.resizer, children: _jsx(ResizeHandle, { ariaLabelledBy: resizeHandleAriaLabelledBy, ariaDescribedBy: resizeHandleAriaDescribedBy, onPointerDown: resizeHandle.onPointerDown, onKeyDown: resizeHandle.onKeyDown, isActive: resizeHandle.isActive }) })), _jsx(ScreenreaderOnly, { id: dragHandleAriaLabelledBy, children: i18nStrings.dragHandleAriaLabel }), _jsx(ScreenreaderOnly, { id: dragHandleAriaDescribedBy, children: i18nStrings.dragHandleAriaDescription }), _jsx(ScreenreaderOnly, { id: resizeHandleAriaLabelledBy, children: i18nStrings.resizeHandleAriaLabel }), _jsx(ScreenreaderOnly, { id: resizeHandleAriaDescribedBy, children: i18nStrings.resizeHandleAriaDescription })] }));
29
+ // A board item is hidden while moving a board item from the palette to the board via keyboard or UAP.
30
+ // The wrapping container is set to invisible, so we don't need to render anything.
31
+ if (isHidden) {
32
+ return null;
33
+ }
34
+ return (_jsxs("div", { ref: __internalRootRef, className: styles.root, ...getDataAttributes(rest), children: [_jsx(Container, { fitHeight: true, disableHeaderPaddings: true, header: _jsx(WidgetContainerHeader, { handle: _jsx(DragHandle, { ref: dragHandle.ref, ariaLabelledBy: dragHandleAriaLabelledBy, ariaDescribedBy: dragHandleAriaDescribedBy, onPointerDown: dragHandle.onPointerDown, onKeyDown: dragHandle.onKeyDown, activeState: dragHandle.activeState, initialShowButtons: dragHandle.initialShowButtons, onDirectionClick: (direction) => dragHandle.onDirectionClick(mapToKeyboardDirection(direction), "drag"), dragHandleTooltipText: i18nStrings.dragHandleTooltipText }), settings: settings, children: header }), footer: footer, disableContentPaddings: disableContentPaddings, className: clsx(styles["container-override"], isActive && styles.active), children: children }), resizeHandle && (_jsx("div", { className: styles.resizer, children: _jsx(ResizeHandle, { ariaLabelledBy: resizeHandleAriaLabelledBy, ariaDescribedBy: resizeHandleAriaDescribedBy, onPointerDown: resizeHandle.onPointerDown, onKeyDown: resizeHandle.onKeyDown, activeState: resizeHandle.activeState, onDirectionClick: (direction) => {
35
+ resizeHandle.onDirectionClick(mapToKeyboardDirection(direction), "resize");
36
+ }, resizeHandleTooltipText: i18nStrings.resizeHandleTooltipText }) })), _jsx(ScreenreaderOnly, { id: dragHandleAriaLabelledBy, children: i18nStrings.dragHandleAriaLabel }), _jsx(ScreenreaderOnly, { id: dragHandleAriaDescribedBy, children: i18nStrings.dragHandleAriaDescription }), _jsx(ScreenreaderOnly, { id: resizeHandleAriaLabelledBy, children: i18nStrings.resizeHandleAriaLabel }), _jsx(ScreenreaderOnly, { id: resizeHandleAriaDescribedBy, children: i18nStrings.resizeHandleAriaDescription })] }));
21
37
  }
22
38
  //# sourceMappingURL=internal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/board-item/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC9B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,SAAS,MAAM,yCAAyC,CAAC;AAEhE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AAEnF,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,YAAY,MAAM,2BAA2B,CAAC;AACrD,OAAO,gBAAgB,MAAM,+BAA+B,CAAC;AAC7D,OAAO,qBAAqB,MAAM,UAAU,CAAC;AAG7C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,UAAU,i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AS,EAAE,YAAY,CAAC,SAAS,EACjC,QAAQ,EAAE,YAAY,CAAC,QAAQ,GAC/B,GACE,CACP,EAED,KAAC,gBAAgB,IAAC,EAAE,EAAE,wBAAwB,YAAG,WAAW,CAAC,mBAAmB,GAAoB,EACpG,KAAC,gBAAgB,IAAC,EAAE,EAAE,yBAAyB,YAAG,WAAW,CAAC,yBAAyB,GAAoB,EAE3G,KAAC,gBAAgB,IAAC,EAAE,EAAE,0BAA0B,YAAG,WAAW,CAAC,qBAAqB,GAAoB,EACxG,KAAC,gBAAgB,IAAC,EAAE,EAAE,2BAA2B,YAAG,WAAW,CAAC,2BAA2B,GAAoB,IAC3G,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { useId } from \"react\";\nimport clsx from \"clsx\";\n\nimport Container from \"@cloudscape-design/components/container\";\n\nimport { getDataAttributes } from \"../internal/base-component/get-data-attributes\";\nimport { InternalBaseComponentProps } from \"../internal/base-component/use-base-component\";\nimport DragHandle from \"../internal/drag-handle\";\nimport { useItemContext } from \"../internal/item-container\";\nimport ResizeHandle from \"../internal/resize-handle\";\nimport ScreenreaderOnly from \"../internal/screenreader-only\";\nimport WidgetContainerHeader from \"./header\";\nimport type { BoardItemProps } from \"./interfaces\";\n\nimport styles from \"./styles.css.js\";\n\nexport function InternalBoardItem({\n children,\n header,\n settings,\n disableContentPaddings,\n footer,\n i18nStrings,\n __internalRootRef,\n ...rest\n}: BoardItemProps & InternalBaseComponentProps) {\n const { dragHandle, resizeHandle, isActive } = useItemContext();\n\n const dragHandleAriaLabelledBy = useId();\n const dragHandleAriaDescribedBy = useId();\n\n const resizeHandleAriaLabelledBy = useId();\n const resizeHandleAriaDescribedBy = useId();\n\n return (\n <div ref={__internalRootRef} className={styles.root} {...getDataAttributes(rest)}>\n <Container\n fitHeight={true}\n disableHeaderPaddings={true}\n header={\n <WidgetContainerHeader\n handle={\n <DragHandle\n ref={dragHandle.ref}\n ariaLabelledBy={dragHandleAriaLabelledBy}\n ariaDescribedBy={dragHandleAriaDescribedBy}\n onPointerDown={dragHandle.onPointerDown}\n onKeyDown={dragHandle.onKeyDown}\n isActive={dragHandle.isActive}\n />\n }\n settings={settings}\n >\n {header}\n </WidgetContainerHeader>\n }\n footer={footer}\n disableContentPaddings={disableContentPaddings}\n className={clsx(styles[\"container-override\"], isActive && styles.active)}\n >\n {children}\n </Container>\n {resizeHandle && (\n <div className={styles.resizer}>\n <ResizeHandle\n ariaLabelledBy={resizeHandleAriaLabelledBy}\n ariaDescribedBy={resizeHandleAriaDescribedBy}\n onPointerDown={resizeHandle.onPointerDown}\n onKeyDown={resizeHandle.onKeyDown}\n isActive={resizeHandle.isActive}\n />\n </div>\n )}\n\n <ScreenreaderOnly id={dragHandleAriaLabelledBy}>{i18nStrings.dragHandleAriaLabel}</ScreenreaderOnly>\n <ScreenreaderOnly id={dragHandleAriaDescribedBy}>{i18nStrings.dragHandleAriaDescription}</ScreenreaderOnly>\n\n <ScreenreaderOnly id={resizeHandleAriaLabelledBy}>{i18nStrings.resizeHandleAriaLabel}</ScreenreaderOnly>\n <ScreenreaderOnly id={resizeHandleAriaDescribedBy}>{i18nStrings.resizeHandleAriaDescription}</ScreenreaderOnly>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/board-item/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC9B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,SAAS,MAAM,yCAAyC,CAAC;AAGhE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AAEnF,OAAO,UAAU,MAAM,yBAAyB,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,YAAY,MAAM,2BAA2B,CA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AA2B,YAAG,WAAW,CAAC,2BAA2B,GAAoB,IAC3G,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { useId } from \"react\";\nimport clsx from \"clsx\";\n\nimport Container from \"@cloudscape-design/components/container\";\nimport { InternalDragHandleProps } from \"@cloudscape-design/components/internal/do-not-use/drag-handle\";\n\nimport { getDataAttributes } from \"../internal/base-component/get-data-attributes\";\nimport { InternalBaseComponentProps } from \"../internal/base-component/use-base-component\";\nimport DragHandle from \"../internal/drag-handle\";\nimport { Direction } from \"../internal/interfaces\";\nimport { useItemContext } from \"../internal/item-container\";\nimport ResizeHandle from \"../internal/resize-handle\";\nimport ScreenreaderOnly from \"../internal/screenreader-only\";\nimport WidgetContainerHeader from \"./header\";\nimport type { BoardItemProps } from \"./interfaces\";\n\nimport styles from \"./styles.css.js\";\n\nconst mapToKeyboardDirection = (direction: InternalDragHandleProps.Direction) => {\n const directionMap: Record<InternalDragHandleProps.Direction, Direction> = {\n \"inline-start\": \"left\",\n \"inline-end\": \"right\",\n \"block-start\": \"up\",\n \"block-end\": \"down\",\n };\n return directionMap[direction];\n};\n\nexport function InternalBoardItem({\n children,\n header,\n settings,\n disableContentPaddings,\n footer,\n i18nStrings,\n __internalRootRef,\n ...rest\n}: BoardItemProps & InternalBaseComponentProps) {\n const { dragHandle, resizeHandle, isActive, isHidden } = useItemContext();\n\n const dragHandleAriaLabelledBy = useId();\n const dragHandleAriaDescribedBy = useId();\n\n const resizeHandleAriaLabelledBy = useId();\n const resizeHandleAriaDescribedBy = useId();\n\n // A board item is hidden while moving a board item from the palette to the board via keyboard or UAP.\n // The wrapping container is set to invisible, so we don't need to render anything.\n if (isHidden) {\n return null;\n }\n\n return (\n <div ref={__internalRootRef} className={styles.root} {...getDataAttributes(rest)}>\n <Container\n fitHeight={true}\n disableHeaderPaddings={true}\n header={\n <WidgetContainerHeader\n handle={\n <DragHandle\n ref={dragHandle.ref}\n ariaLabelledBy={dragHandleAriaLabelledBy}\n ariaDescribedBy={dragHandleAriaDescribedBy}\n onPointerDown={dragHandle.onPointerDown}\n onKeyDown={dragHandle.onKeyDown}\n activeState={dragHandle.activeState}\n initialShowButtons={dragHandle.initialShowButtons}\n onDirectionClick={(direction) => dragHandle.onDirectionClick(mapToKeyboardDirection(direction), \"drag\")}\n dragHandleTooltipText={i18nStrings.dragHandleTooltipText}\n />\n }\n settings={settings}\n >\n {header}\n </WidgetContainerHeader>\n }\n footer={footer}\n disableContentPaddings={disableContentPaddings}\n className={clsx(styles[\"container-override\"], isActive && styles.active)}\n >\n {children}\n </Container>\n {resizeHandle && (\n <div className={styles.resizer}>\n <ResizeHandle\n ariaLabelledBy={resizeHandleAriaLabelledBy}\n ariaDescribedBy={resizeHandleAriaDescribedBy}\n onPointerDown={resizeHandle.onPointerDown}\n onKeyDown={resizeHandle.onKeyDown}\n activeState={resizeHandle.activeState}\n onDirectionClick={(direction) => {\n resizeHandle.onDirectionClick(mapToKeyboardDirection(direction), \"resize\");\n }}\n resizeHandleTooltipText={i18nStrings.resizeHandleTooltipText}\n />\n </div>\n )}\n\n <ScreenreaderOnly id={dragHandleAriaLabelledBy}>{i18nStrings.dragHandleAriaLabel}</ScreenreaderOnly>\n <ScreenreaderOnly id={dragHandleAriaDescribedBy}>{i18nStrings.dragHandleAriaDescription}</ScreenreaderOnly>\n\n <ScreenreaderOnly id={resizeHandleAriaLabelledBy}>{i18nStrings.resizeHandleAriaLabel}</ScreenreaderOnly>\n <ScreenreaderOnly id={resizeHandleAriaDescribedBy}>{i18nStrings.resizeHandleAriaDescription}</ScreenreaderOnly>\n </div>\n );\n}\n"]}
@@ -1,16 +1,16 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "root": "awsui_root_9ckv7_zpa7v_9",
5
- "container-override": "awsui_container-override_9ckv7_zpa7v_14",
6
- "active": "awsui_active_9ckv7_zpa7v_14",
7
- "header": "awsui_header_9ckv7_zpa7v_36",
8
- "flexible": "awsui_flexible_9ckv7_zpa7v_43",
9
- "handle": "awsui_handle_9ckv7_zpa7v_47",
10
- "refresh": "awsui_refresh_9ckv7_zpa7v_50",
11
- "header-content": "awsui_header-content_9ckv7_zpa7v_54",
12
- "settings": "awsui_settings_9ckv7_zpa7v_58",
13
- "fixed": "awsui_fixed_9ckv7_zpa7v_66",
14
- "resizer": "awsui_resizer_9ckv7_zpa7v_70"
4
+ "root": "awsui_root_9ckv7_m9g0k_9",
5
+ "container-override": "awsui_container-override_9ckv7_m9g0k_14",
6
+ "active": "awsui_active_9ckv7_m9g0k_14",
7
+ "header": "awsui_header_9ckv7_m9g0k_34",
8
+ "flexible": "awsui_flexible_9ckv7_m9g0k_41",
9
+ "handle": "awsui_handle_9ckv7_m9g0k_45",
10
+ "refresh": "awsui_refresh_9ckv7_m9g0k_48",
11
+ "header-content": "awsui_header-content_9ckv7_m9g0k_52",
12
+ "settings": "awsui_settings_9ckv7_m9g0k_56",
13
+ "fixed": "awsui_fixed_9ckv7_m9g0k_64",
14
+ "resizer": "awsui_resizer_9ckv7_m9g0k_68"
15
15
  };
16
16
 
@@ -6,21 +6,19 @@
6
6
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
7
7
  SPDX-License-Identifier: Apache-2.0
8
8
  */
9
- .awsui_root_9ckv7_zpa7v_9:not(#\9) {
9
+ .awsui_root_9ckv7_m9g0k_9:not(#\9) {
10
10
  display: contents;
11
11
  }
12
12
 
13
13
  /* TODO: use container API instead of styles override */
14
- .awsui_container-override_9ckv7_zpa7v_14.awsui_active_9ckv7_zpa7v_14:not(#\9) {
14
+ .awsui_container-override_9ckv7_m9g0k_14.awsui_active_9ckv7_m9g0k_14:not(#\9) {
15
15
  box-shadow: var(--shadow-container-active-ypjjoc, 0px 1px 1px 1px #e9ebed, 0px 6px 36px rgba(0, 7, 22, 0.1019607843));
16
- }
17
- [data-awsui-focus-visible] .awsui_container-override_9ckv7_zpa7v_14.awsui_active_9ckv7_zpa7v_14:not(#\9) {
18
16
  position: relative;
19
17
  box-sizing: border-box;
20
18
  outline: 2px dotted transparent;
21
19
  outline-offset: -1px;
22
20
  }
23
- [data-awsui-focus-visible] .awsui_container-override_9ckv7_zpa7v_14.awsui_active_9ckv7_zpa7v_14:not(#\9)::before {
21
+ .awsui_container-override_9ckv7_m9g0k_14.awsui_active_9ckv7_m9g0k_14:not(#\9)::before {
24
22
  content: " ";
25
23
  display: block;
26
24
  position: absolute;
@@ -33,41 +31,41 @@
33
31
  border: 2px solid var(--color-border-item-focused-uk47pl, #006ce0);
34
32
  }
35
33
 
36
- .awsui_header_9ckv7_zpa7v_36:not(#\9) {
34
+ .awsui_header_9ckv7_m9g0k_34:not(#\9) {
37
35
  display: flex;
38
36
  justify-items: center;
39
37
  padding-block: var(--space-scaled-s-8ozaad, 12px);
40
38
  padding-inline: calc(var(--space-container-horizontal-nqrzyh, 20px) - var(--space-scaled-xs-xwoogq, 8px));
41
39
  }
42
40
 
43
- .awsui_flexible_9ckv7_zpa7v_43:not(#\9) {
41
+ .awsui_flexible_9ckv7_m9g0k_41:not(#\9) {
44
42
  flex: 1 1 min-content;
45
43
  }
46
44
 
47
- .awsui_handle_9ckv7_zpa7v_47:not(#\9) {
45
+ .awsui_handle_9ckv7_m9g0k_45:not(#\9) {
48
46
  margin-block-start: calc(var(--space-scaled-xxs-pfm1nx, 4px) + 1px);
49
47
  }
50
- .awsui_refresh_9ckv7_zpa7v_50 > .awsui_handle_9ckv7_zpa7v_47:not(#\9) {
48
+ .awsui_refresh_9ckv7_m9g0k_48 > .awsui_handle_9ckv7_m9g0k_45:not(#\9) {
51
49
  margin-block-start: calc(var(--space-static-xxxs-yidks1, 2px) + 1px);
52
50
  }
53
51
 
54
- .awsui_header-content_9ckv7_zpa7v_54:not(#\9) {
52
+ .awsui_header-content_9ckv7_m9g0k_52:not(#\9) {
55
53
  margin-inline-start: var(--space-scaled-xxs-pfm1nx, 4px);
56
54
  }
57
55
 
58
- .awsui_settings_9ckv7_zpa7v_58:not(#\9) {
56
+ .awsui_settings_9ckv7_m9g0k_56:not(#\9) {
59
57
  margin-block-start: calc(var(--space-scaled-xxxs-oo06c7, 2px) + 1px);
60
58
  margin-inline-start: var(--space-static-xs-gnm0mz, 8px);
61
59
  }
62
- .awsui_refresh_9ckv7_zpa7v_50 > .awsui_settings_9ckv7_zpa7v_58:not(#\9) {
60
+ .awsui_refresh_9ckv7_m9g0k_48 > .awsui_settings_9ckv7_m9g0k_56:not(#\9) {
63
61
  margin-block-start: 0px;
64
62
  }
65
63
 
66
- .awsui_fixed_9ckv7_zpa7v_66:not(#\9) {
64
+ .awsui_fixed_9ckv7_m9g0k_64:not(#\9) {
67
65
  flex: 0 0 auto;
68
66
  }
69
67
 
70
- .awsui_resizer_9ckv7_zpa7v_70:not(#\9) {
68
+ .awsui_resizer_9ckv7_m9g0k_68:not(#\9) {
71
69
  position: absolute;
72
70
  inset-block-end: calc(var(--space-static-xs-gnm0mz, 8px) - var(--space-static-xxxs-yidks1, 2px));
73
71
  inset-inline-end: calc(var(--space-static-xs-gnm0mz, 8px) - var(--space-static-xxxs-yidks1, 2px));
@@ -2,16 +2,16 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "root": "awsui_root_9ckv7_zpa7v_9",
6
- "container-override": "awsui_container-override_9ckv7_zpa7v_14",
7
- "active": "awsui_active_9ckv7_zpa7v_14",
8
- "header": "awsui_header_9ckv7_zpa7v_36",
9
- "flexible": "awsui_flexible_9ckv7_zpa7v_43",
10
- "handle": "awsui_handle_9ckv7_zpa7v_47",
11
- "refresh": "awsui_refresh_9ckv7_zpa7v_50",
12
- "header-content": "awsui_header-content_9ckv7_zpa7v_54",
13
- "settings": "awsui_settings_9ckv7_zpa7v_58",
14
- "fixed": "awsui_fixed_9ckv7_zpa7v_66",
15
- "resizer": "awsui_resizer_9ckv7_zpa7v_70"
5
+ "root": "awsui_root_9ckv7_m9g0k_9",
6
+ "container-override": "awsui_container-override_9ckv7_m9g0k_14",
7
+ "active": "awsui_active_9ckv7_m9g0k_14",
8
+ "header": "awsui_header_9ckv7_m9g0k_34",
9
+ "flexible": "awsui_flexible_9ckv7_m9g0k_41",
10
+ "handle": "awsui_handle_9ckv7_m9g0k_45",
11
+ "refresh": "awsui_refresh_9ckv7_m9g0k_48",
12
+ "header-content": "awsui_header-content_9ckv7_m9g0k_52",
13
+ "settings": "awsui_settings_9ckv7_m9g0k_56",
14
+ "fixed": "awsui_fixed_9ckv7_m9g0k_64",
15
+ "resizer": "awsui_resizer_9ckv7_m9g0k_68"
16
16
  };
17
17
 
@@ -49,6 +49,11 @@ module.exports = {
49
49
  "type": "string",
50
50
  "optional": false
51
51
  },
52
+ {
53
+ "name": "dragHandleTooltipText",
54
+ "type": "string",
55
+ "optional": true
56
+ },
52
57
  {
53
58
  "name": "resizeHandleAriaDescription",
54
59
  "type": "string",
@@ -58,11 +63,16 @@ module.exports = {
58
63
  "name": "resizeHandleAriaLabel",
59
64
  "type": "string",
60
65
  "optional": false
66
+ },
67
+ {
68
+ "name": "resizeHandleTooltipText",
69
+ "type": "string",
70
+ "optional": true
61
71
  }
62
72
  ]
63
73
  },
64
74
  "optional": false,
65
- "description": "An object containing all the necessary localized strings required by the component.\n\nARIA labels:\n* `dragHandleAriaLabel` (string) - the ARIA label for the drag handle.\n* `dragHandleAriaDescription` (string, optional) - the ARIA description for the drag handle.\n* `resizeHandleAriaLabel` (string) - the ARIA label for the resize handle.\n* `resizeHandleAriaDescription` (string, optional) - the ARIA description for the resize handle."
75
+ "description": "An object containing all the necessary localized strings required by the component.\n\nARIA labels:\n* `dragHandleAriaLabel` (string) - the ARIA label for the drag handle.\n* `dragHandleAriaDescription` (string, optional) - the ARIA description for the drag handle.\n* `resizeHandleAriaLabel` (string) - the ARIA label for the resize handle.\n* `resizeHandleAriaDescription` (string, optional) - the ARIA description for the resize handle.\n* `dragHandleTooltipText` (string, optional) - the ARIA description for the resize handle.\n* `resizeHandleTooltipText` (string, optional) - the Text for the resize handle Tooltip."
66
76
  }
67
77
  ],
68
78
  "events": []
@@ -1,10 +1,15 @@
1
1
  import { KeyboardEvent, PointerEvent } from "react";
2
+ import { InternalDragHandleProps } from "@cloudscape-design/components/internal/do-not-use/drag-handle";
3
+ import { HandleActiveState } from "../item-container";
2
4
  export interface DragHandleProps {
3
5
  ariaLabelledBy: string;
4
6
  ariaDescribedBy: string;
5
7
  onPointerDown: (event: PointerEvent) => void;
6
8
  onKeyDown: (event: KeyboardEvent) => void;
7
- isActive: boolean;
9
+ activeState: HandleActiveState;
10
+ initialShowButtons?: boolean;
11
+ onDirectionClick: InternalDragHandleProps["onDirectionClick"];
12
+ dragHandleTooltipText?: string;
8
13
  }
9
- declare const _default: import("react").ForwardRefExoticComponent<DragHandleProps & import("react").RefAttributes<HTMLButtonElement>>;
14
+ declare const _default: import("react").ForwardRefExoticComponent<DragHandleProps & import("react").RefAttributes<HTMLDivElement>>;
10
15
  export default _default;
@@ -3,11 +3,17 @@ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  import { forwardRef } from "react";
5
5
  import clsx from "clsx";
6
- import Icon from "@cloudscape-design/components/icon";
7
- import Handle from "../handle";
6
+ import { InternalDragHandle, } from "@cloudscape-design/components/internal/do-not-use/drag-handle";
7
+ import { CLICK_DRAG_THRESHOLD } from "../item-container";
8
8
  import styles from "./styles.css.js";
9
- function DragHandle({ ariaLabelledBy, ariaDescribedBy, onPointerDown, onKeyDown, isActive }, ref) {
10
- return (_jsx(Handle, { ref: ref, className: clsx(styles.handle, isActive && styles.active), "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, onPointerDown: onPointerDown, onKeyDown: onKeyDown, children: _jsx(Icon, { name: "drag-indicator" }) }));
9
+ import testUtilsStyles from "./test-classes/styles.css.js";
10
+ function DragHandle({ ariaLabelledBy, ariaDescribedBy, onPointerDown, onKeyDown, activeState, initialShowButtons, onDirectionClick, dragHandleTooltipText, }, ref) {
11
+ return (_jsx(InternalDragHandle, { ref: ref, className: clsx(styles.handle, activeState === "pointer" && styles.active, activeState === "uap" && testUtilsStyles["active-uap"]), ariaLabelledBy: ariaLabelledBy, ariaDescribedby: ariaDescribedBy, variant: "drag-indicator", tooltipText: dragHandleTooltipText, onKeyDown: onKeyDown, onPointerDown: onPointerDown, directions: {
12
+ "block-start": "active",
13
+ "block-end": "active",
14
+ "inline-start": "active",
15
+ "inline-end": "active",
16
+ }, triggerMode: "keyboard-activate", onDirectionClick: onDirectionClick, initialShowButtons: initialShowButtons, hideButtonsOnDrag: true, clickDragThreshold: CLICK_DRAG_THRESHOLD }));
11
17
  }
12
18
  export default forwardRef(DragHandle);
13
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/internal/drag-handle/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAgB,UAAU,EAA+B,MAAM,OAAO,CAAC;AAC9E,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,IAAI,MAAM,oCAAoC,CAAC;AAEtD,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAUrC,SAAS,UAAU,CACjB,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAmB,EACxF,GAAoC;IAEpC,OAAO,CACL,KAAC,MAAM,IACL,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,IAAI,MAAM,CAAC,MAAM,CAAC,qBACxC,cAAc,sBACb,eAAe,EACjC,aAAa,EAAE,aAAa,EAC5B,SAAS,EAAE,SAAS,YAEpB,KAAC,IAAI,IAAC,IAAI,EAAC,gBAAgB,GAAG,GACvB,CACV,CAAC;AACJ,CAAC;AAED,eAAe,UAAU,CAAC,UAAU,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ForwardedRef, forwardRef, KeyboardEvent, PointerEvent } from \"react\";\nimport clsx from \"clsx\";\n\nimport Icon from \"@cloudscape-design/components/icon\";\n\nimport Handle from \"../handle\";\n\nimport styles from \"./styles.css.js\";\n\nexport interface DragHandleProps {\n ariaLabelledBy: string;\n ariaDescribedBy: string;\n onPointerDown: (event: PointerEvent) => void;\n onKeyDown: (event: KeyboardEvent) => void;\n isActive: boolean;\n}\n\nfunction DragHandle(\n { ariaLabelledBy, ariaDescribedBy, onPointerDown, onKeyDown, isActive }: DragHandleProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) {\n return (\n <Handle\n ref={ref}\n className={clsx(styles.handle, isActive && styles.active)}\n aria-labelledby={ariaLabelledBy}\n aria-describedby={ariaDescribedBy}\n onPointerDown={onPointerDown}\n onKeyDown={onKeyDown}\n >\n <Icon name=\"drag-indicator\" />\n </Handle>\n );\n}\n\nexport default forwardRef(DragHandle);\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/internal/drag-handle/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAgB,UAAU,EAA+B,MAAM,OAAO,CAAC;AAC9E,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EACL,kBAAkB,GAEnB,MAAM,+DAA+D,CAAC;AAEvE,OAAO,EAAE,oBAAoB,EAAqB,MAAM,mBAAmB,CAAC;AAE5E,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAa3D,SAAS,UAAU,CACjB,EACE,cAAc,EACd,eAAe,EACf,aAAa,EACb,SAAS,EACT,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,GACL,EAClB,GAAiC;IAEjC,OAAO,CACL,KAAC,kBAAkB,IACjB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,MAAM,EACb,WAAW,KAAK,SAAS,IAAI,MAAM,CAAC,MAAM,EAC1C,WAAW,KAAK,KAAK,IAAI,eAAe,CAAC,YAAY,CAAC,CACvD,EACD,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EAChC,OAAO,EAAC,gBAAgB,EACxB,WAAW,EAAE,qBAAqB,EAClC,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE;YACV,aAAa,EAAE,QAAQ;YACvB,WAAW,EAAE,QAAQ;YACrB,cAAc,EAAE,QAAQ;YACxB,YAAY,EAAE,QAAQ;SACvB,EACD,WAAW,EAAC,mBAAmB,EAC/B,gBAAgB,EAAE,gBAAgB,EAClC,kBAAkB,EAAE,kBAAkB,EACtC,iBAAiB,EAAE,IAAI,EACvB,kBAAkB,EAAE,oBAAoB,GACxC,CACH,CAAC;AACJ,CAAC;AAED,eAAe,UAAU,CAAC,UAAU,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ForwardedRef, forwardRef, KeyboardEvent, PointerEvent } from \"react\";\nimport clsx from \"clsx\";\n\nimport {\n InternalDragHandle,\n InternalDragHandleProps,\n} from \"@cloudscape-design/components/internal/do-not-use/drag-handle\";\n\nimport { CLICK_DRAG_THRESHOLD, HandleActiveState } from \"../item-container\";\n\nimport styles from \"./styles.css.js\";\nimport testUtilsStyles from \"./test-classes/styles.css.js\";\n\nexport interface DragHandleProps {\n ariaLabelledBy: string;\n ariaDescribedBy: string;\n onPointerDown: (event: PointerEvent) => void;\n onKeyDown: (event: KeyboardEvent) => void;\n activeState: HandleActiveState;\n initialShowButtons?: boolean;\n onDirectionClick: InternalDragHandleProps[\"onDirectionClick\"];\n dragHandleTooltipText?: string;\n}\n\nfunction DragHandle(\n {\n ariaLabelledBy,\n ariaDescribedBy,\n onPointerDown,\n onKeyDown,\n activeState,\n initialShowButtons,\n onDirectionClick,\n dragHandleTooltipText,\n }: DragHandleProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n return (\n <InternalDragHandle\n ref={ref}\n className={clsx(\n styles.handle,\n activeState === \"pointer\" && styles.active,\n activeState === \"uap\" && testUtilsStyles[\"active-uap\"],\n )}\n ariaLabelledBy={ariaLabelledBy}\n ariaDescribedby={ariaDescribedBy}\n variant=\"drag-indicator\"\n tooltipText={dragHandleTooltipText}\n onKeyDown={onKeyDown}\n onPointerDown={onPointerDown}\n directions={{\n \"block-start\": \"active\",\n \"block-end\": \"active\",\n \"inline-start\": \"active\",\n \"inline-end\": \"active\",\n }}\n triggerMode=\"keyboard-activate\"\n onDirectionClick={onDirectionClick}\n initialShowButtons={initialShowButtons}\n hideButtonsOnDrag={true}\n clickDragThreshold={CLICK_DRAG_THRESHOLD}\n />\n );\n}\n\nexport default forwardRef(DragHandle);\n"]}
@@ -1,7 +1,7 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "handle": "awsui_handle_umbhe_t9qqw_9",
5
- "active": "awsui_active_umbhe_t9qqw_17"
4
+ "handle": "awsui_handle_umbhe_1bpr9_9",
5
+ "active": "awsui_active_umbhe_1bpr9_27"
6
6
  };
7
7
 
@@ -6,33 +6,24 @@
6
6
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
7
7
  SPDX-License-Identifier: Apache-2.0
8
8
  */
9
- .awsui_handle_umbhe_t9qqw_9:not(#\9) {
9
+ .awsui_handle_umbhe_1bpr9_9:not(#\9) {
10
10
  cursor: grab;
11
+ appearance: none;
12
+ background: transparent;
13
+ border: none;
14
+ padding-block: var(--space-scaled-xxs-pfm1nx, 4px);
15
+ padding-inline: var(--space-scaled-xxs-pfm1nx, 4px);
16
+ block-size: auto;
17
+ color: var(--color-text-interactive-default-ugh9wp, #424650);
11
18
  }
12
-
13
- .awsui_handle_umbhe_t9qqw_9:not(#\9):active {
14
- cursor: grabbing;
19
+ .awsui_handle_umbhe_1bpr9_9:not(#\9):hover {
20
+ color: var(--color-text-interactive-hover-6naf7i, #0f141a);
15
21
  }
16
22
 
17
- .awsui_handle_umbhe_t9qqw_9:not(#\9):not(.awsui_active_umbhe_t9qqw_17):focus-visible {
18
- position: relative;
19
- box-sizing: border-box;
20
- outline: 2px dotted transparent;
21
- outline-offset: 3px;
22
- }
23
- .awsui_handle_umbhe_t9qqw_9:not(#\9):not(.awsui_active_umbhe_t9qqw_17):focus-visible::before {
24
- content: " ";
25
- display: block;
26
- position: absolute;
27
- box-sizing: border-box;
28
- inset-inline-start: calc(-1 * 4px);
29
- inset-block-start: calc(-1 * 4px);
30
- inline-size: calc(100% + 2 * 4px);
31
- block-size: calc(100% + 2 * 4px);
32
- border-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
33
- border: 2px solid var(--color-border-item-focused-uk47pl, #006ce0);
23
+ .awsui_handle_umbhe_1bpr9_9:not(#\9):active {
24
+ cursor: grabbing;
34
25
  }
35
26
 
36
- .awsui_active_umbhe_t9qqw_17:not(#\9) {
27
+ .awsui_active_umbhe_1bpr9_27:not(#\9) {
37
28
  outline: none;
38
29
  }
@@ -2,7 +2,7 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "handle": "awsui_handle_umbhe_t9qqw_9",
6
- "active": "awsui_active_umbhe_t9qqw_17"
5
+ "handle": "awsui_handle_umbhe_1bpr9_9",
6
+ "active": "awsui_active_umbhe_1bpr9_27"
7
7
  };
8
8
 
@@ -1,6 +1,6 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "handle": "awsui_handle_cc1pu_hbgxa_5"
4
+ "active-uap": "awsui_active-uap_1k7af_1lr5y_5"
5
5
  };
6
6
 
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ .awsui_active-uap_1k7af_1lr5y_5:not(#\9) {
6
+ /* used in test-utils */
7
+ }
@@ -2,6 +2,6 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "handle": "awsui_handle_cc1pu_hbgxa_5"
5
+ "active-uap": "awsui_active-uap_1k7af_1lr5y_5"
6
6
  };
7
7
 
@@ -1,4 +1,4 @@
1
1
  export var PACKAGE_SOURCE = "board-components";
2
- export var PACKAGE_VERSION = "3.0.0 (af44212e)";
2
+ export var PACKAGE_VERSION = "3.0.0 (af05dce2)";
3
3
  export var THEME = "open-source-visual-refresh";
4
4
  export var ALWAYS_VISUAL_REFRESH = true;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "PACKAGE_SOURCE": "board-components",
3
- "PACKAGE_VERSION": "3.0.0 (af44212e)",
3
+ "PACKAGE_VERSION": "3.0.0 (af05dce2)",
4
4
  "THEME": "open-source-visual-refresh",
5
5
  "ALWAYS_VISUAL_REFRESH": true
6
6
  }
@@ -203,6 +203,7 @@ export const colorChartsPaletteCategorical47: string;
203
203
  export const colorChartsPaletteCategorical48: string;
204
204
  export const colorChartsPaletteCategorical49: string;
205
205
  export const colorChartsPaletteCategorical50: string;
206
+ export const colorChartsErrorBarMarker: string;
206
207
  export const colorSeverityDarkRed: string;
207
208
  export const colorSeverityRed: string;
208
209
  export const colorSeverityOrange: string;
@@ -203,6 +203,7 @@ export var colorChartsPaletteCategorical47 = "var(--color-charts-palette-categor
203
203
  export var colorChartsPaletteCategorical48 = "var(--color-charts-palette-categorical-48-5s2n0r, #014b44)";
204
204
  export var colorChartsPaletteCategorical49 = "var(--color-charts-palette-categorical-49-bub0l1, #431d84)";
205
205
  export var colorChartsPaletteCategorical50 = "var(--color-charts-palette-categorical-50-utrpu5, #732c02)";
206
+ export var colorChartsErrorBarMarker = "var(--color-charts-error-bar-marker-r10jgv, #131920)";
206
207
  export var colorSeverityDarkRed = "var(--color-severity-dark-red-j8bmoc, #870303)";
207
208
  export var colorSeverityRed = "var(--color-severity-red-wf5w2d, #ce3311)";
208
209
  export var colorSeverityOrange = "var(--color-severity-orange-rpbcus, #f89256)";
@@ -706,6 +706,10 @@ module.exports.preset = {
706
706
  "light": "{colorChartsOrange1000}",
707
707
  "dark": "{colorChartsOrange1000}"
708
708
  },
709
+ "colorChartsErrorBarMarker": {
710
+ "light": "{colorGrey900}",
711
+ "dark": "{colorWhite}"
712
+ },
709
713
  "colorSeverityDarkRed": {
710
714
  "light": "#870303",
711
715
  "dark": "#d63f38"
@@ -9938,6 +9942,7 @@ module.exports.preset = {
9938
9942
  "colorChartsPaletteCategorical48": "color",
9939
9943
  "colorChartsPaletteCategorical49": "color",
9940
9944
  "colorChartsPaletteCategorical50": "color",
9945
+ "colorChartsErrorBarMarker": "color",
9941
9946
  "colorSeverityDarkRed": "color",
9942
9947
  "colorSeverityRed": "color",
9943
9948
  "colorSeverityOrange": "color",
@@ -10461,6 +10466,7 @@ module.exports.preset = {
10461
10466
  "colorChartsPaletteCategorical48",
10462
10467
  "colorChartsPaletteCategorical49",
10463
10468
  "colorChartsPaletteCategorical50",
10469
+ "colorChartsErrorBarMarker",
10464
10470
  "colorBackgroundNotificationSeverityCritical",
10465
10471
  "colorBackgroundNotificationSeverityHigh",
10466
10472
  "colorBackgroundNotificationSeverityMedium",
@@ -10810,6 +10816,7 @@ module.exports.preset = {
10810
10816
  "colorChartsPaletteCategorical48",
10811
10817
  "colorChartsPaletteCategorical49",
10812
10818
  "colorChartsPaletteCategorical50",
10819
+ "colorChartsErrorBarMarker",
10813
10820
  "colorBackgroundNotificationSeverityCritical",
10814
10821
  "colorBackgroundNotificationSeverityHigh",
10815
10822
  "colorBackgroundNotificationSeverityMedium",
@@ -11250,6 +11257,7 @@ module.exports.preset = {
11250
11257
  "colorChartsPaletteCategorical48": "color-charts-palette-categorical-48",
11251
11258
  "colorChartsPaletteCategorical49": "color-charts-palette-categorical-49",
11252
11259
  "colorChartsPaletteCategorical50": "color-charts-palette-categorical-50",
11260
+ "colorChartsErrorBarMarker": "color-charts-error-bar-marker",
11253
11261
  "colorSeverityDarkRed": "color-severity-dark-red",
11254
11262
  "colorSeverityRed": "color-severity-red",
11255
11263
  "colorSeverityOrange": "color-severity-orange",
@@ -12007,6 +12015,7 @@ module.exports.preset = {
12007
12015
  "colorChartsPaletteCategorical48": "--color-charts-palette-categorical-48-5s2n0r",
12008
12016
  "colorChartsPaletteCategorical49": "--color-charts-palette-categorical-49-bub0l1",
12009
12017
  "colorChartsPaletteCategorical50": "--color-charts-palette-categorical-50-utrpu5",
12018
+ "colorChartsErrorBarMarker": "--color-charts-error-bar-marker-r10jgv",
12010
12019
  "colorSeverityDarkRed": "--color-severity-dark-red-j8bmoc",
12011
12020
  "colorSeverityRed": "--color-severity-red-wf5w2d",
12012
12021
  "colorSeverityOrange": "--color-severity-orange-rpbcus",
@@ -63,6 +63,7 @@ export declare interface TypedOverride {
63
63
  colorChartsPaletteCategorical48?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
64
64
  colorChartsPaletteCategorical49?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
65
65
  colorChartsPaletteCategorical50?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
66
+ colorChartsErrorBarMarker?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
66
67
  colorBackgroundNotificationSeverityCritical?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
67
68
  colorBackgroundNotificationSeverityHigh?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
68
69
  colorBackgroundNotificationSeverityMedium?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
@@ -321,6 +322,7 @@ export declare interface TypedOverride {
321
322
  colorChartsPaletteCategorical48?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
322
323
  colorChartsPaletteCategorical49?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
323
324
  colorChartsPaletteCategorical50?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
325
+ colorChartsErrorBarMarker?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
324
326
  colorBackgroundNotificationSeverityCritical?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
325
327
  colorBackgroundNotificationSeverityHigh?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
326
328
  colorBackgroundNotificationSeverityMedium?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
@@ -579,6 +581,7 @@ export declare interface TypedOverride {
579
581
  colorChartsPaletteCategorical48?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
580
582
  colorChartsPaletteCategorical49?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
581
583
  colorChartsPaletteCategorical50?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
584
+ colorChartsErrorBarMarker?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
582
585
  colorBackgroundNotificationSeverityCritical?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
583
586
  colorBackgroundNotificationSeverityHigh?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
584
587
  colorBackgroundNotificationSeverityMedium?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
@@ -837,6 +840,7 @@ export declare interface TypedOverride {
837
840
  colorChartsPaletteCategorical48?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
838
841
  colorChartsPaletteCategorical49?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
839
842
  colorChartsPaletteCategorical50?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
843
+ colorChartsErrorBarMarker?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
840
844
  colorBackgroundNotificationSeverityCritical?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
841
845
  colorBackgroundNotificationSeverityHigh?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
842
846
  colorBackgroundNotificationSeverityMedium?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
@@ -1095,6 +1099,7 @@ export declare interface TypedOverride {
1095
1099
  colorChartsPaletteCategorical48?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1096
1100
  colorChartsPaletteCategorical49?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1097
1101
  colorChartsPaletteCategorical50?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1102
+ colorChartsErrorBarMarker?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1098
1103
  colorBackgroundNotificationSeverityCritical?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1099
1104
  colorBackgroundNotificationSeverityHigh?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1100
1105
  colorBackgroundNotificationSeverityMedium?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
@@ -1353,6 +1358,7 @@ export declare interface TypedOverride {
1353
1358
  colorChartsPaletteCategorical48?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1354
1359
  colorChartsPaletteCategorical49?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1355
1360
  colorChartsPaletteCategorical50?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1361
+ colorChartsErrorBarMarker?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1356
1362
  colorBackgroundNotificationSeverityCritical?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1357
1363
  colorBackgroundNotificationSeverityHigh?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1358
1364
  colorBackgroundNotificationSeverityMedium?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
@@ -1611,6 +1617,7 @@ export declare interface TypedOverride {
1611
1617
  colorChartsPaletteCategorical48?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1612
1618
  colorChartsPaletteCategorical49?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1613
1619
  colorChartsPaletteCategorical50?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1620
+ colorChartsErrorBarMarker?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1614
1621
  colorBackgroundNotificationSeverityCritical?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1615
1622
  colorBackgroundNotificationSeverityHigh?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1616
1623
  colorBackgroundNotificationSeverityMedium?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
@@ -1869,6 +1876,7 @@ export declare interface TypedOverride {
1869
1876
  colorChartsPaletteCategorical48?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1870
1877
  colorChartsPaletteCategorical49?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1871
1878
  colorChartsPaletteCategorical50?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1879
+ colorChartsErrorBarMarker?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1872
1880
  colorBackgroundNotificationSeverityCritical?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1873
1881
  colorBackgroundNotificationSeverityHigh?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1874
1882
  colorBackgroundNotificationSeverityMedium?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
@@ -2127,6 +2135,7 @@ export declare interface TypedOverride {
2127
2135
  colorChartsPaletteCategorical48?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
2128
2136
  colorChartsPaletteCategorical49?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
2129
2137
  colorChartsPaletteCategorical50?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
2138
+ colorChartsErrorBarMarker?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
2130
2139
  colorBackgroundNotificationSeverityCritical?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
2131
2140
  colorBackgroundNotificationSeverityHigh?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
2132
2141
  colorBackgroundNotificationSeverityMedium?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;