@cloudscape-design/components 3.0.75 → 3.0.77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/app-layout/drawer.d.ts +2 -1
  2. package/app-layout/drawer.d.ts.map +1 -1
  3. package/app-layout/drawer.js +8 -2
  4. package/app-layout/drawer.js.map +1 -1
  5. package/app-layout/index.d.ts.map +1 -1
  6. package/app-layout/index.js +6 -5
  7. package/app-layout/index.js.map +1 -1
  8. package/app-layout/interfaces.d.ts +6 -0
  9. package/app-layout/interfaces.d.ts.map +1 -1
  10. package/app-layout/interfaces.js.map +1 -1
  11. package/app-layout/notifications/index.js +1 -1
  12. package/app-layout/notifications/index.js.map +1 -1
  13. package/app-layout/tools-and-split-panel.d.ts +2 -1
  14. package/app-layout/tools-and-split-panel.d.ts.map +1 -1
  15. package/app-layout/tools-and-split-panel.js +2 -2
  16. package/app-layout/tools-and-split-panel.js.map +1 -1
  17. package/app-layout/utils/use-focus-control.d.ts +10 -4
  18. package/app-layout/utils/use-focus-control.d.ts.map +1 -1
  19. package/app-layout/utils/use-focus-control.js +30 -9
  20. package/app-layout/utils/use-focus-control.js.map +1 -1
  21. package/app-layout/visual-refresh/app-bar.js +2 -2
  22. package/app-layout/visual-refresh/app-bar.js.map +1 -1
  23. package/app-layout/visual-refresh/context.d.ts +3 -1
  24. package/app-layout/visual-refresh/context.d.ts.map +1 -1
  25. package/app-layout/visual-refresh/context.js +8 -4
  26. package/app-layout/visual-refresh/context.js.map +1 -1
  27. package/app-layout/visual-refresh/navigation.js +1 -1
  28. package/app-layout/visual-refresh/navigation.js.map +1 -1
  29. package/app-layout/visual-refresh/notifications.js +2 -2
  30. package/app-layout/visual-refresh/notifications.js.map +1 -1
  31. package/app-layout/visual-refresh/tools.d.ts.map +1 -1
  32. package/app-layout/visual-refresh/tools.js +7 -4
  33. package/app-layout/visual-refresh/tools.js.map +1 -1
  34. package/calendar/styles.css.js +18 -18
  35. package/calendar/styles.scoped.css +40 -38
  36. package/calendar/styles.selectors.js +18 -18
  37. package/date-picker/index.js +10 -14
  38. package/date-picker/index.js.map +1 -1
  39. package/date-range-picker/calendar/grids/grid.d.ts +14 -0
  40. package/date-range-picker/calendar/grids/grid.d.ts.map +1 -1
  41. package/date-range-picker/calendar/grids/grid.js +9 -5
  42. package/date-range-picker/calendar/grids/grid.js.map +1 -1
  43. package/date-range-picker/calendar/grids/styles.css.js +25 -25
  44. package/date-range-picker/calendar/grids/styles.scoped.css +45 -42
  45. package/date-range-picker/calendar/grids/styles.selectors.js +25 -25
  46. package/date-range-picker/calendar/index.d.ts.map +1 -1
  47. package/date-range-picker/calendar/index.js +23 -27
  48. package/date-range-picker/calendar/index.js.map +1 -1
  49. package/date-range-picker/index.js +1 -1
  50. package/date-range-picker/index.js.map +1 -1
  51. package/date-range-picker/styles.css.js +36 -37
  52. package/date-range-picker/styles.scoped.css +50 -54
  53. package/date-range-picker/styles.selectors.js +36 -37
  54. package/input/internal.d.ts.map +1 -1
  55. package/input/internal.js +2 -3
  56. package/input/internal.js.map +1 -1
  57. package/internal/base-component/styles.scoped.css +4 -0
  58. package/internal/components/autosuggest-input/index.d.ts.map +1 -1
  59. package/internal/components/autosuggest-input/index.js +4 -5
  60. package/internal/components/autosuggest-input/index.js.map +1 -1
  61. package/internal/components/button-trigger/index.d.ts.map +1 -1
  62. package/internal/components/button-trigger/index.js +2 -3
  63. package/internal/components/button-trigger/index.js.map +1 -1
  64. package/internal/components/chart-popover/index.js +1 -1
  65. package/internal/components/chart-popover/index.js.map +1 -1
  66. package/internal/components/dropdown/index.d.ts.map +1 -1
  67. package/internal/components/dropdown/index.js +1 -1
  68. package/internal/components/dropdown/index.js.map +1 -1
  69. package/internal/components/dropdown-status/index.d.ts.map +1 -1
  70. package/internal/components/dropdown-status/index.js +2 -4
  71. package/internal/components/dropdown-status/index.js.map +1 -1
  72. package/internal/components/options-list/index.d.ts.map +1 -1
  73. package/internal/components/options-list/index.js +2 -2
  74. package/internal/components/options-list/index.js.map +1 -1
  75. package/internal/environment.js +1 -1
  76. package/internal/events/index.d.ts +0 -9
  77. package/internal/events/index.d.ts.map +1 -1
  78. package/internal/events/index.js +0 -11
  79. package/internal/events/index.js.map +1 -1
  80. package/internal/generated/theming/index.cjs +23 -0
  81. package/internal/generated/theming/index.js +23 -0
  82. package/package.json +1 -1
  83. package/popover/internal.js +2 -2
  84. package/popover/internal.js.map +1 -1
  85. package/popover/styles.css.js +50 -49
  86. package/popover/styles.scoped.css +67 -62
  87. package/popover/styles.selectors.js +50 -49
  88. package/table/header-cell/index.d.ts.map +1 -1
  89. package/table/header-cell/index.js +1 -0
  90. package/table/header-cell/index.js.map +1 -1
  91. package/table/header-cell/styles.css.js +15 -14
  92. package/table/header-cell/styles.scoped.css +27 -24
  93. package/table/header-cell/styles.selectors.js +15 -14
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/internal/events/index.ts"],"names":[],"mappings":"AAYA;IAGE,yBAAmB,UAA2B,EAAS,MAAuB;QAA3D,2BAAA,EAAA,kBAA2B;QAAS,uBAAA,EAAA,aAAuB;QAA3D,eAAU,GAAV,UAAU,CAAiB;QAAS,WAAM,GAAN,MAAM,CAAiB;QAF9E,qBAAgB,GAAG,KAAK,CAAC;QACzB,iBAAY,GAAG,KAAK,CAAC;IAC4D,CAAC;IAElF,wCAAc,GAAd;QACE,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAC/B,CAAC;IAED,yCAAe,GAAf;QACE,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;IAC3B,CAAC;IACH,sBAAC;AAAD,CAAC,AAZD,IAYC;AAyBD,MAAM,UAAU,iBAAiB,CAAI,EAA0C;QAAxC,UAAU,gBAAA,EAAE,MAAM,YAAA;IACvD,OAAO,IAAI,eAAe,CAAC,UAAU,EAAE,MAAM,CAAgB,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAW,OAAiD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CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;QAC5C,CAAC,KAAK,CAAC,OAAO;QACd,CAAC,KAAK,CAAC,MAAM;QACb,CAAC,KAAK,CAAC,QAAQ;QACf,CAAC,KAAK,CAAC,OAAO,CACf,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,IAAM,yBAAyB,GAAG,UAAC,KAAiB;IACzD,OAAO,CAAC,KAAK,CAAC,aAAa,IAAI,QAAQ,CAAC,aAAa,CAAgB,CAAC;AACxE,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\n// This is a part of our public types API. We cannot change this in the current major version\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport type NonCancelableEventHandler<Detail = {}> = (event: NonCancelableCustomEvent<Detail>) => void;\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport type CancelableEventHandler<Detail = {}> = (event: CustomEvent<Detail>) => void;\n\nexport type NonCancelableCustomEvent<DetailType> = Omit<CustomEvent<DetailType>, 'preventDefault'>;\n\nclass CustomEventStub<T> {\n defaultPrevented = false;\n cancelBubble = false;\n constructor(public cancelable: boolean = false, public detail: T | null = null) {}\n\n preventDefault() {\n this.defaultPrevented = true;\n }\n\n stopPropagation() {\n this.cancelBubble = true;\n }\n}\n\nexport interface BaseKeyDetail {\n keyCode: number;\n key: string;\n ctrlKey: boolean;\n shiftKey: boolean;\n altKey: boolean;\n metaKey: boolean;\n}\n\nexport interface ClickDetail {\n button: number;\n ctrlKey: boolean;\n shiftKey: boolean;\n altKey: boolean;\n metaKey: boolean;\n}\n\nexport interface BaseNavigationDetail {\n href: string | undefined;\n external?: boolean;\n target?: string;\n}\n\nexport function createCustomEvent<T>({ cancelable, detail }: CustomEventInit<T>): CustomEvent<T> {\n return new CustomEventStub(cancelable, detail) as CustomEvent;\n}\n\nexport function fireNonCancelableEvent<T = null>(handler: NonCancelableEventHandler<T> | undefined, detail?: T) {\n if (!handler) {\n return;\n }\n const event = createCustomEvent({ cancelable: false, detail });\n handler(event);\n}\n\nexport function fireCancelableEvent<T>(\n handler: CancelableEventHandler<T> | undefined,\n detail: T,\n sourceEvent?: React.SyntheticEvent | Event\n) {\n if (!handler) {\n return false;\n }\n const event = createCustomEvent({ cancelable: true, detail });\n handler(event);\n if (event.defaultPrevented && sourceEvent) {\n sourceEvent.preventDefault();\n }\n if (event.cancelBubble && sourceEvent) {\n sourceEvent.stopPropagation();\n }\n return event.defaultPrevented;\n}\n\nexport function fireKeyboardEvent(handler: CancelableEventHandler<BaseKeyDetail>, reactEvent: React.KeyboardEvent) {\n return fireCancelableEvent(\n handler,\n {\n keyCode: reactEvent.keyCode,\n key: reactEvent.key,\n ctrlKey: reactEvent.ctrlKey,\n shiftKey: reactEvent.shiftKey,\n altKey: reactEvent.altKey,\n metaKey: reactEvent.metaKey,\n },\n reactEvent\n );\n}\n\nconst isMouseEvent = (e: React.MouseEvent | React.KeyboardEvent): e is React.MouseEvent => {\n return (e as React.MouseEvent).button !== undefined;\n};\n\nexport function isPlainLeftClick(event?: React.MouseEvent | React.KeyboardEvent) {\n return (\n event &&\n (!isMouseEvent(event) || event.button === 0) &&\n !event.ctrlKey &&\n !event.altKey &&\n !event.shiftKey &&\n !event.metaKey\n );\n}\n\n/**\n * Returns the element the focus is going to, when a blur event is fired.\n * IE11 does not support `realtedTarget` on blur FocusEvent's. However, it\n * moves the focus before the blur event is fired, so we can get the needed\n * element by accessing `document.activeElement`\n * @param event FocusEvent - native focus event\n * @returns Node | null - the element recieving the focus\n */\nexport const getBlurEventRelatedTarget = (event: FocusEvent): Node | null => {\n return (event.relatedTarget || document.activeElement) as Node | null;\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/internal/events/index.ts"],"names":[],"mappings":"AAYA;IAGE,yBAAmB,UAA2B,EAAS,MAAuB;QAA3D,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AAC,gBAAgB,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,OAA8C,EAAE,UAA+B;IAC/G,OAAO,mBAAmB,CACxB,OAAO,EACP;QACE,OAAO,EAAE,UAAU,CAAC,OAAO;QAC3B,GAAG,EAAE,UAAU,CAAC,GAAG;QACnB,OAAO,EAAE,UAAU,CAAC,OAAO;QAC3B,QAAQ,EAAE,UAAU,CAAC,QAAQ;QAC7B,MAAM,EAAE,UAAU,CAAC,MAAM;QACzB,OAAO,EAAE,UAAU,CAAC,OAAO;KAC5B,EACD,UAAU,CACX,CAAC;AACJ,CAAC;AAED,IAAM,YAAY,GAAG,UAAC,CAAyC;IAC7D,OAAQ,CAAsB,CAAC,MAAM,KAAK,SAAS,CAAC;AACtD,CAAC,CAAC;AAEF,MAAM,UAAU,gBAAgB,CAAC,KAA8C;IAC7E,OAAO,CACL,KAAK;QACL,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;QAC5C,CAAC,KAAK,CAAC,OAAO;QACd,CAAC,KAAK,CAAC,MAAM;QACb,CAAC,KAAK,CAAC,QAAQ;QACf,CAAC,KAAK,CAAC,OAAO,CACf,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\n// This is a part of our public types API. We cannot change this in the current major version\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport type NonCancelableEventHandler<Detail = {}> = (event: NonCancelableCustomEvent<Detail>) => void;\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport type CancelableEventHandler<Detail = {}> = (event: CustomEvent<Detail>) => void;\n\nexport type NonCancelableCustomEvent<DetailType> = Omit<CustomEvent<DetailType>, 'preventDefault'>;\n\nclass CustomEventStub<T> {\n defaultPrevented = false;\n cancelBubble = false;\n constructor(public cancelable: boolean = false, public detail: T | null = null) {}\n\n preventDefault() {\n this.defaultPrevented = true;\n }\n\n stopPropagation() {\n this.cancelBubble = true;\n }\n}\n\nexport interface BaseKeyDetail {\n keyCode: number;\n key: string;\n ctrlKey: boolean;\n shiftKey: boolean;\n altKey: boolean;\n metaKey: boolean;\n}\n\nexport interface ClickDetail {\n button: number;\n ctrlKey: boolean;\n shiftKey: boolean;\n altKey: boolean;\n metaKey: boolean;\n}\n\nexport interface BaseNavigationDetail {\n href: string | undefined;\n external?: boolean;\n target?: string;\n}\n\nexport function createCustomEvent<T>({ cancelable, detail }: CustomEventInit<T>): CustomEvent<T> {\n return new CustomEventStub(cancelable, detail) as CustomEvent;\n}\n\nexport function fireNonCancelableEvent<T = null>(handler: NonCancelableEventHandler<T> | undefined, detail?: T) {\n if (!handler) {\n return;\n }\n const event = createCustomEvent({ cancelable: false, detail });\n handler(event);\n}\n\nexport function fireCancelableEvent<T>(\n handler: CancelableEventHandler<T> | undefined,\n detail: T,\n sourceEvent?: React.SyntheticEvent | Event\n) {\n if (!handler) {\n return false;\n }\n const event = createCustomEvent({ cancelable: true, detail });\n handler(event);\n if (event.defaultPrevented && sourceEvent) {\n sourceEvent.preventDefault();\n }\n if (event.cancelBubble && sourceEvent) {\n sourceEvent.stopPropagation();\n }\n return event.defaultPrevented;\n}\n\nexport function fireKeyboardEvent(handler: CancelableEventHandler<BaseKeyDetail>, reactEvent: React.KeyboardEvent) {\n return fireCancelableEvent(\n handler,\n {\n keyCode: reactEvent.keyCode,\n key: reactEvent.key,\n ctrlKey: reactEvent.ctrlKey,\n shiftKey: reactEvent.shiftKey,\n altKey: reactEvent.altKey,\n metaKey: reactEvent.metaKey,\n },\n reactEvent\n );\n}\n\nconst isMouseEvent = (e: React.MouseEvent | React.KeyboardEvent): e is React.MouseEvent => {\n return (e as React.MouseEvent).button !== undefined;\n};\n\nexport function isPlainLeftClick(event?: React.MouseEvent | React.KeyboardEvent) {\n return (\n event &&\n (!isMouseEvent(event) || event.button === 0) &&\n !event.ctrlKey &&\n !event.altKey &&\n !event.shiftKey &&\n !event.metaKey\n );\n}\n"]}
@@ -1154,6 +1154,10 @@ module.exports.preset = {
1154
1154
  "light": "{colorGrey500}",
1155
1155
  "dark": "{colorGrey450}"
1156
1156
  },
1157
+ "colorBorderDividerInteractiveDefault": {
1158
+ "light": "{colorBorderDividerDefault}",
1159
+ "dark": "{colorBorderDividerDefault}"
1160
+ },
1157
1161
  "colorBorderTabsDivider": {
1158
1162
  "light": "{colorGrey200}",
1159
1163
  "dark": "{colorGrey600}"
@@ -2674,6 +2678,10 @@ module.exports.preset = {
2674
2678
  "light": "{colorGrey450}",
2675
2679
  "dark": "{colorGrey450}"
2676
2680
  },
2681
+ "colorBorderDividerInteractiveDefault": {
2682
+ "light": "{colorBorderDividerDefault}",
2683
+ "dark": "{colorBorderDividerDefault}"
2684
+ },
2677
2685
  "colorBorderTabsDivider": {
2678
2686
  "light": "{colorGrey600}",
2679
2687
  "dark": "{colorGrey600}"
@@ -3576,6 +3584,10 @@ module.exports.preset = {
3576
3584
  "light": "{colorGrey450}",
3577
3585
  "dark": "{colorGrey450}"
3578
3586
  },
3587
+ "colorBorderDividerInteractiveDefault": {
3588
+ "light": "{colorBorderDividerDefault}",
3589
+ "dark": "{colorBorderDividerDefault}"
3590
+ },
3579
3591
  "colorBorderTabsDivider": {
3580
3592
  "light": "{colorGrey600}",
3581
3593
  "dark": "{colorGrey600}"
@@ -4426,6 +4438,10 @@ module.exports.preset = {
4426
4438
  "light": "{colorGrey500}",
4427
4439
  "dark": "{colorGrey450}"
4428
4440
  },
4441
+ "colorBorderDividerInteractiveDefault": {
4442
+ "light": "{colorBorderDividerDefault}",
4443
+ "dark": "{colorBorderDividerDefault}"
4444
+ },
4429
4445
  "colorBorderTabsDivider": {
4430
4446
  "light": "{colorGrey200}",
4431
4447
  "dark": "{colorGrey600}"
@@ -5276,6 +5292,10 @@ module.exports.preset = {
5276
5292
  "light": "{colorGrey500}",
5277
5293
  "dark": "{colorGrey450}"
5278
5294
  },
5295
+ "colorBorderDividerInteractiveDefault": {
5296
+ "light": "{colorBorderDividerDefault}",
5297
+ "dark": "{colorBorderDividerDefault}"
5298
+ },
5279
5299
  "colorBorderTabsDivider": {
5280
5300
  "light": "{colorGrey200}",
5281
5301
  "dark": "{colorGrey600}"
@@ -5936,6 +5956,7 @@ module.exports.preset = {
5936
5956
  "colorBorderStatusInfo": "color",
5937
5957
  "colorBorderStatusSuccess": "color",
5938
5958
  "colorBorderStatusWarning": "color",
5959
+ "colorBorderDividerInteractiveDefault": "color",
5939
5960
  "colorBorderTabsDivider": "color",
5940
5961
  "colorBorderTabsShadow": "color",
5941
5962
  "colorBorderTabsUnderline": "color",
@@ -6936,6 +6957,7 @@ module.exports.preset = {
6936
6957
  "colorBorderStatusInfo": "color-border-status-info",
6937
6958
  "colorBorderStatusSuccess": "color-border-status-success",
6938
6959
  "colorBorderStatusWarning": "color-border-status-warning",
6960
+ "colorBorderDividerInteractiveDefault": "color-border-divider-interactive-default",
6939
6961
  "colorBorderTabsDivider": "color-border-tabs-divider",
6940
6962
  "colorBorderTabsShadow": "color-border-tabs-shadow",
6941
6963
  "colorBorderTabsUnderline": "color-border-tabs-underline",
@@ -7579,6 +7601,7 @@ module.exports.preset = {
7579
7601
  "colorBorderStatusInfo": "--color-border-status-info-546i7i",
7580
7602
  "colorBorderStatusSuccess": "--color-border-status-success-cqi45f",
7581
7603
  "colorBorderStatusWarning": "--color-border-status-warning-hg85ut",
7604
+ "colorBorderDividerInteractiveDefault": "--color-border-divider-interactive-default-rcasvw",
7582
7605
  "colorBorderTabsDivider": "--color-border-tabs-divider-69fx5i",
7583
7606
  "colorBorderTabsShadow": "--color-border-tabs-shadow-4lmh2z",
7584
7607
  "colorBorderTabsUnderline": "--color-border-tabs-underline-9bcfzu",
@@ -1154,6 +1154,10 @@ export var preset = {
1154
1154
  "light": "{colorGrey500}",
1155
1155
  "dark": "{colorGrey450}"
1156
1156
  },
1157
+ "colorBorderDividerInteractiveDefault": {
1158
+ "light": "{colorBorderDividerDefault}",
1159
+ "dark": "{colorBorderDividerDefault}"
1160
+ },
1157
1161
  "colorBorderTabsDivider": {
1158
1162
  "light": "{colorGrey200}",
1159
1163
  "dark": "{colorGrey600}"
@@ -2674,6 +2678,10 @@ export var preset = {
2674
2678
  "light": "{colorGrey450}",
2675
2679
  "dark": "{colorGrey450}"
2676
2680
  },
2681
+ "colorBorderDividerInteractiveDefault": {
2682
+ "light": "{colorBorderDividerDefault}",
2683
+ "dark": "{colorBorderDividerDefault}"
2684
+ },
2677
2685
  "colorBorderTabsDivider": {
2678
2686
  "light": "{colorGrey600}",
2679
2687
  "dark": "{colorGrey600}"
@@ -3576,6 +3584,10 @@ export var preset = {
3576
3584
  "light": "{colorGrey450}",
3577
3585
  "dark": "{colorGrey450}"
3578
3586
  },
3587
+ "colorBorderDividerInteractiveDefault": {
3588
+ "light": "{colorBorderDividerDefault}",
3589
+ "dark": "{colorBorderDividerDefault}"
3590
+ },
3579
3591
  "colorBorderTabsDivider": {
3580
3592
  "light": "{colorGrey600}",
3581
3593
  "dark": "{colorGrey600}"
@@ -4426,6 +4438,10 @@ export var preset = {
4426
4438
  "light": "{colorGrey500}",
4427
4439
  "dark": "{colorGrey450}"
4428
4440
  },
4441
+ "colorBorderDividerInteractiveDefault": {
4442
+ "light": "{colorBorderDividerDefault}",
4443
+ "dark": "{colorBorderDividerDefault}"
4444
+ },
4429
4445
  "colorBorderTabsDivider": {
4430
4446
  "light": "{colorGrey200}",
4431
4447
  "dark": "{colorGrey600}"
@@ -5276,6 +5292,10 @@ export var preset = {
5276
5292
  "light": "{colorGrey500}",
5277
5293
  "dark": "{colorGrey450}"
5278
5294
  },
5295
+ "colorBorderDividerInteractiveDefault": {
5296
+ "light": "{colorBorderDividerDefault}",
5297
+ "dark": "{colorBorderDividerDefault}"
5298
+ },
5279
5299
  "colorBorderTabsDivider": {
5280
5300
  "light": "{colorGrey200}",
5281
5301
  "dark": "{colorGrey600}"
@@ -5936,6 +5956,7 @@ export var preset = {
5936
5956
  "colorBorderStatusInfo": "color",
5937
5957
  "colorBorderStatusSuccess": "color",
5938
5958
  "colorBorderStatusWarning": "color",
5959
+ "colorBorderDividerInteractiveDefault": "color",
5939
5960
  "colorBorderTabsDivider": "color",
5940
5961
  "colorBorderTabsShadow": "color",
5941
5962
  "colorBorderTabsUnderline": "color",
@@ -6936,6 +6957,7 @@ export var preset = {
6936
6957
  "colorBorderStatusInfo": "color-border-status-info",
6937
6958
  "colorBorderStatusSuccess": "color-border-status-success",
6938
6959
  "colorBorderStatusWarning": "color-border-status-warning",
6960
+ "colorBorderDividerInteractiveDefault": "color-border-divider-interactive-default",
6939
6961
  "colorBorderTabsDivider": "color-border-tabs-divider",
6940
6962
  "colorBorderTabsShadow": "color-border-tabs-shadow",
6941
6963
  "colorBorderTabsUnderline": "color-border-tabs-underline",
@@ -7579,6 +7601,7 @@ export var preset = {
7579
7601
  "colorBorderStatusInfo": "--color-border-status-info-546i7i",
7580
7602
  "colorBorderStatusSuccess": "--color-border-status-success-cqi45f",
7581
7603
  "colorBorderStatusWarning": "--color-border-status-warning-hg85ut",
7604
+ "colorBorderDividerInteractiveDefault": "--color-border-divider-interactive-default-rcasvw",
7582
7605
  "colorBorderTabsDivider": "--color-border-tabs-divider-69fx5i",
7583
7606
  "colorBorderTabsShadow": "--color-border-tabs-shadow-4lmh2z",
7584
7607
  "colorBorderTabsUnderline": "--color-border-tabs-underline-9bcfzu",
package/package.json CHANGED
@@ -113,6 +113,6 @@
113
113
  "./internal/base-component/index.js",
114
114
  "./internal/base-component/styles.css.js"
115
115
  ],
116
- "version": "3.0.75",
116
+ "version": "3.0.77",
117
117
  "license": "Apache-2.0"
118
118
  }
@@ -65,10 +65,10 @@ function InternalPopover(_a, ref) {
65
65
  onKeyDown: onTriggerKeyDown,
66
66
  className: clsx(styles.trigger, styles["trigger-type-".concat(triggerType)])
67
67
  };
68
- var popoverContent = (React.createElement("span", { "aria-live": dismissButton ? undefined : 'polite', "aria-atomic": dismissButton ? undefined : true, className: popoverClasses }, visible && (React.createElement(PopoverContainer, { size: size, fixedWidth: fixedWidth, position: position, trackRef: triggerRef, arrow: function (position) { return React.createElement(Arrow, { position: position }); }, renderWithPortal: renderWithPortal, zIndex: renderWithPortal ? 7000 : undefined },
68
+ var popoverContent = (React.createElement("div", { "aria-live": dismissButton ? undefined : 'polite', "aria-atomic": dismissButton ? undefined : true, className: clsx(popoverClasses, styles['popover-content']) }, visible && (React.createElement(PopoverContainer, { size: size, fixedWidth: fixedWidth, position: position, trackRef: triggerRef, arrow: function (position) { return React.createElement(Arrow, { position: position }); }, renderWithPortal: renderWithPortal, zIndex: renderWithPortal ? 7000 : undefined },
69
69
  React.createElement(PopoverBody, { dismissButton: dismissButton, dismissAriaLabel: dismissAriaLabel, header: header, onDismiss: onDismiss, overflowVisible: "both" }, content)))));
70
70
  var mergedRef = useMergeRefs(popoverRef, __internalRootRef);
71
- return (React.createElement("span", __assign({}, baseProps, { className: clsx(styles.root, baseProps.className), ref: mergedRef, onMouseDown: function () {
71
+ return (React.createElement("div", __assign({}, baseProps, { className: clsx(styles.root, baseProps.className), ref: mergedRef, onMouseDown: function () {
72
72
  // Indicate there was a click inside popover recently, including nested portals.
73
73
  clickFrameId.current = requestAnimationFrame(function () {
74
74
  clickFrameId.current = null;
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/popover/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAE9D,OAAO,KAAK,MAAM,SAAS,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AC,OAAO,GAAG,IAAI,CAAC;YAC9B,CAAC,CAAC,CAAC;QACL,CAAC;QAEA,WAAW,KAAK,MAAM,CAAC,CAAC,CAAC,CACxB,2CAAY,YAAY,IAAE,IAAI,EAAC,QAAQ,mBAAe,QAAQ,IAAK,YAAY;YAC7E,8BAAM,SAAS,EAAE,MAAM,CAAC,oBAAoB,CAAC,IAAG,QAAQ,CAAQ,CACzD,CACV,CAAC,CAAC,CAAC,CACF,yCAAU,YAAY,GAAG,QAAQ,CAAQ,CAC1C;QACA,gBAAgB,CAAC,CAAC,CAAC,oBAAC,MAAM,QAAE,cAAc,CAAU,CAAC,CAAC,CAAC,cAAc,CACjE,CACR,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useEffect, useRef, useState, useImperativeHandle } from 'react';\nimport clsx from 'clsx';\n\nimport { KeyCode } from '../internal/keycode';\nimport { getBaseProps } from '../internal/base-component';\nimport useFocusVisible from '../internal/hooks/focus-visible';\n\nimport Arrow from './arrow';\nimport Portal from '../internal/components/portal';\nimport { PopoverProps } from './interfaces';\nimport PopoverContainer from './container';\nimport PopoverBody from './body';\n\nimport styles from './styles.css.js';\nimport { NonCancelableEventHandler, fireNonCancelableEvent } from '../internal/events/index';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { usePortalModeClasses } from '../internal/hooks/use-portal-mode-classes';\n\nexport interface InternalPopoverProps extends PopoverProps, InternalBaseComponentProps {\n __onOpen?: NonCancelableEventHandler<null>;\n}\n\nexport interface InternalPopoverRef {\n dismissPopover: () => void;\n}\n\nexport default React.forwardRef(InternalPopover);\n\nfunction InternalPopover(\n {\n position = 'right',\n size = 'medium',\n fixedWidth = false,\n triggerType = 'text',\n dismissButton = true,\n dismissAriaLabel,\n\n children,\n header,\n content,\n\n renderWithPortal = false,\n\n __onOpen,\n __internalRootRef = null,\n ...restProps\n }: InternalPopoverProps,\n ref: React.Ref<InternalPopoverRef>\n) {\n const baseProps = getBaseProps(restProps);\n const focusVisible = useFocusVisible();\n const triggerRef = useRef<HTMLElement | null>(null);\n const popoverRef = useRef<HTMLSpanElement | null>(null);\n const clickFrameId = useRef<number | null>(null);\n\n const [visible, setVisible] = useState(false);\n\n const onTriggerClick = useCallback(() => {\n fireNonCancelableEvent(__onOpen);\n setVisible(true);\n }, [__onOpen]);\n\n const onDismiss = useCallback(() => {\n setVisible(false);\n }, []);\n\n const onTriggerKeyDown = useCallback((event: React.KeyboardEvent) => {\n if (event.keyCode === KeyCode.tab || event.keyCode === KeyCode.escape) {\n setVisible(false);\n }\n }, []);\n\n useImperativeHandle(ref, () => ({\n dismissPopover: onDismiss,\n }));\n\n useEffect(() => {\n if (!triggerRef.current) {\n return;\n }\n const document = triggerRef.current.ownerDocument;\n\n const onDocumentClick = () => {\n // Dismiss popover unless there was a click inside within the last animation frame.\n if (clickFrameId.current === null) {\n setVisible(false);\n }\n };\n\n // useCapture=false makes sure this listener is called after the one attached to the element.\n // the options.capture notation is unsupported by IE.\n document.addEventListener('mousedown', onDocumentClick, false);\n\n return () => {\n document.removeEventListener('mousedown', onDocumentClick, false);\n };\n }, []);\n\n const popoverClasses = usePortalModeClasses(triggerRef);\n\n const triggerProps = {\n // https://github.com/microsoft/TypeScript/issues/36659\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref: triggerRef as any,\n onClick: onTriggerClick,\n onKeyDown: onTriggerKeyDown,\n className: clsx(styles.trigger, styles[`trigger-type-${triggerType}`]),\n };\n\n const popoverContent = (\n <span\n aria-live={dismissButton ? undefined : 'polite'}\n aria-atomic={dismissButton ? undefined : true}\n className={popoverClasses}\n >\n {visible && (\n <PopoverContainer\n size={size}\n fixedWidth={fixedWidth}\n position={position}\n trackRef={triggerRef}\n arrow={position => <Arrow position={position} />}\n renderWithPortal={renderWithPortal}\n zIndex={renderWithPortal ? 7000 : undefined}\n >\n <PopoverBody\n dismissButton={dismissButton}\n dismissAriaLabel={dismissAriaLabel}\n header={header}\n onDismiss={onDismiss}\n overflowVisible=\"both\"\n >\n {content}\n </PopoverBody>\n </PopoverContainer>\n )}\n </span>\n );\n\n const mergedRef = useMergeRefs(popoverRef, __internalRootRef);\n\n return (\n <span\n {...baseProps}\n className={clsx(styles.root, baseProps.className)}\n ref={mergedRef}\n onMouseDown={() => {\n // Indicate there was a click inside popover recently, including nested portals.\n clickFrameId.current = requestAnimationFrame(() => {\n clickFrameId.current = null;\n });\n }}\n >\n {triggerType === 'text' ? (\n <button {...triggerProps} type=\"button\" aria-haspopup=\"dialog\" {...focusVisible}>\n <span className={styles['trigger-inner-text']}>{children}</span>\n </button>\n ) : (\n <span {...triggerProps}>{children}</span>\n )}\n {renderWithPortal ? <Portal>{popoverContent}</Portal> : popoverContent}\n </span>\n );\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/popover/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAE9D,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,MAAM,MAAM,+BAA+B,CAAC;AAEnD,OAAO,gBAAgB,MAAM,aAAa,CAAC;AAC3C,OAAO,WAAW,MAAM,QAAQ,CAAC;AAEjC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAA6B,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAE7F,OAAO,EAAE,YAAY,E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AAS,EAAE,MAAM,CAAC,oBAAoB,CAAC,IAAG,QAAQ,CAAQ,CACzD,CACV,CAAC,CAAC,CAAC,CACF,yCAAU,YAAY,GAAG,QAAQ,CAAQ,CAC1C;QACA,gBAAgB,CAAC,CAAC,CAAC,oBAAC,MAAM,QAAE,cAAc,CAAU,CAAC,CAAC,CAAC,cAAc,CAClE,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useEffect, useRef, useState, useImperativeHandle } from 'react';\nimport clsx from 'clsx';\n\nimport { KeyCode } from '../internal/keycode';\nimport { getBaseProps } from '../internal/base-component';\nimport useFocusVisible from '../internal/hooks/focus-visible';\n\nimport Arrow from './arrow';\nimport Portal from '../internal/components/portal';\nimport { PopoverProps } from './interfaces';\nimport PopoverContainer from './container';\nimport PopoverBody from './body';\n\nimport styles from './styles.css.js';\nimport { NonCancelableEventHandler, fireNonCancelableEvent } from '../internal/events/index';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { usePortalModeClasses } from '../internal/hooks/use-portal-mode-classes';\n\nexport interface InternalPopoverProps extends PopoverProps, InternalBaseComponentProps {\n __onOpen?: NonCancelableEventHandler<null>;\n}\n\nexport interface InternalPopoverRef {\n dismissPopover: () => void;\n}\n\nexport default React.forwardRef(InternalPopover);\n\nfunction InternalPopover(\n {\n position = 'right',\n size = 'medium',\n fixedWidth = false,\n triggerType = 'text',\n dismissButton = true,\n dismissAriaLabel,\n\n children,\n header,\n content,\n\n renderWithPortal = false,\n\n __onOpen,\n __internalRootRef = null,\n ...restProps\n }: InternalPopoverProps,\n ref: React.Ref<InternalPopoverRef>\n) {\n const baseProps = getBaseProps(restProps);\n const focusVisible = useFocusVisible();\n const triggerRef = useRef<HTMLElement | null>(null);\n const popoverRef = useRef<HTMLDivElement | null>(null);\n const clickFrameId = useRef<number | null>(null);\n\n const [visible, setVisible] = useState(false);\n\n const onTriggerClick = useCallback(() => {\n fireNonCancelableEvent(__onOpen);\n setVisible(true);\n }, [__onOpen]);\n\n const onDismiss = useCallback(() => {\n setVisible(false);\n }, []);\n\n const onTriggerKeyDown = useCallback((event: React.KeyboardEvent) => {\n if (event.keyCode === KeyCode.tab || event.keyCode === KeyCode.escape) {\n setVisible(false);\n }\n }, []);\n\n useImperativeHandle(ref, () => ({\n dismissPopover: onDismiss,\n }));\n\n useEffect(() => {\n if (!triggerRef.current) {\n return;\n }\n const document = triggerRef.current.ownerDocument;\n\n const onDocumentClick = () => {\n // Dismiss popover unless there was a click inside within the last animation frame.\n if (clickFrameId.current === null) {\n setVisible(false);\n }\n };\n\n // useCapture=false makes sure this listener is called after the one attached to the element.\n // the options.capture notation is unsupported by IE.\n document.addEventListener('mousedown', onDocumentClick, false);\n\n return () => {\n document.removeEventListener('mousedown', onDocumentClick, false);\n };\n }, []);\n\n const popoverClasses = usePortalModeClasses(triggerRef);\n\n const triggerProps = {\n // https://github.com/microsoft/TypeScript/issues/36659\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref: triggerRef as any,\n onClick: onTriggerClick,\n onKeyDown: onTriggerKeyDown,\n className: clsx(styles.trigger, styles[`trigger-type-${triggerType}`]),\n };\n\n const popoverContent = (\n <div\n aria-live={dismissButton ? undefined : 'polite'}\n aria-atomic={dismissButton ? undefined : true}\n className={clsx(popoverClasses, styles['popover-content'])}\n >\n {visible && (\n <PopoverContainer\n size={size}\n fixedWidth={fixedWidth}\n position={position}\n trackRef={triggerRef}\n arrow={position => <Arrow position={position} />}\n renderWithPortal={renderWithPortal}\n zIndex={renderWithPortal ? 7000 : undefined}\n >\n <PopoverBody\n dismissButton={dismissButton}\n dismissAriaLabel={dismissAriaLabel}\n header={header}\n onDismiss={onDismiss}\n overflowVisible=\"both\"\n >\n {content}\n </PopoverBody>\n </PopoverContainer>\n )}\n </div>\n );\n\n const mergedRef = useMergeRefs(popoverRef, __internalRootRef);\n\n return (\n <div\n {...baseProps}\n className={clsx(styles.root, baseProps.className)}\n ref={mergedRef}\n onMouseDown={() => {\n // Indicate there was a click inside popover recently, including nested portals.\n clickFrameId.current = requestAnimationFrame(() => {\n clickFrameId.current = null;\n });\n }}\n >\n {triggerType === 'text' ? (\n <button {...triggerProps} type=\"button\" aria-haspopup=\"dialog\" {...focusVisible}>\n <span className={styles['trigger-inner-text']}>{children}</span>\n </button>\n ) : (\n <span {...triggerProps}>{children}</span>\n )}\n {renderWithPortal ? <Portal>{popoverContent}</Portal> : popoverContent}\n </div>\n );\n}\n"]}
@@ -1,54 +1,55 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "arrow": "awsui_arrow_xjuzf_1aa2b_185",
5
- "arrow-outer": "awsui_arrow-outer_xjuzf_1aa2b_189",
6
- "arrow-inner": "awsui_arrow-inner_xjuzf_1aa2b_189",
7
- "arrow-position-right-top": "awsui_arrow-position-right-top_xjuzf_1aa2b_220",
8
- "arrow-position-right-bottom": "awsui_arrow-position-right-bottom_xjuzf_1aa2b_220",
9
- "arrow-position-left-top": "awsui_arrow-position-left-top_xjuzf_1aa2b_223",
10
- "arrow-position-left-bottom": "awsui_arrow-position-left-bottom_xjuzf_1aa2b_223",
11
- "arrow-position-top-center": "awsui_arrow-position-top-center_xjuzf_1aa2b_226",
12
- "arrow-position-top-right": "awsui_arrow-position-top-right_xjuzf_1aa2b_226",
13
- "arrow-position-top-left": "awsui_arrow-position-top-left_xjuzf_1aa2b_226",
14
- "arrow-position-top-responsive": "awsui_arrow-position-top-responsive_xjuzf_1aa2b_226",
15
- "arrow-position-bottom-center": "awsui_arrow-position-bottom-center_xjuzf_1aa2b_229",
16
- "arrow-position-bottom-right": "awsui_arrow-position-bottom-right_xjuzf_1aa2b_229",
17
- "arrow-position-bottom-left": "awsui_arrow-position-bottom-left_xjuzf_1aa2b_229",
18
- "arrow-position-bottom-responsive": "awsui_arrow-position-bottom-responsive_xjuzf_1aa2b_229",
19
- "body": "awsui_body_xjuzf_1aa2b_325",
20
- "body-overflow-visible": "awsui_body-overflow-visible_xjuzf_1aa2b_339",
21
- "has-dismiss": "awsui_has-dismiss_xjuzf_1aa2b_343",
22
- "dismiss": "awsui_dismiss_xjuzf_1aa2b_348",
23
- "dismiss-control": "awsui_dismiss-control_xjuzf_1aa2b_355",
24
- "header-row": "awsui_header-row_xjuzf_1aa2b_359",
25
- "header": "awsui_header_xjuzf_1aa2b_359",
26
- "content": "awsui_content_xjuzf_1aa2b_381",
27
- "content-overflow-visible": "awsui_content-overflow-visible_xjuzf_1aa2b_388",
28
- "container": "awsui_container_xjuzf_1aa2b_484",
29
- "container-body": "awsui_container-body_xjuzf_1aa2b_492",
30
- "container-body-variant-annotation": "awsui_container-body-variant-annotation_xjuzf_1aa2b_507",
31
- "container-body-size-small": "awsui_container-body-size-small_xjuzf_1aa2b_512",
32
- "fixed-width": "awsui_fixed-width_xjuzf_1aa2b_515",
33
- "container-body-size-medium": "awsui_container-body-size-medium_xjuzf_1aa2b_519",
34
- "container-body-size-large": "awsui_container-body-size-large_xjuzf_1aa2b_526",
35
- "container-arrow": "awsui_container-arrow_xjuzf_1aa2b_538",
36
- "container-arrow-position-right-top": "awsui_container-arrow-position-right-top_xjuzf_1aa2b_542",
37
- "container-arrow-position-right-bottom": "awsui_container-arrow-position-right-bottom_xjuzf_1aa2b_542",
38
- "container-arrow-position-left-top": "awsui_container-arrow-position-left-top_xjuzf_1aa2b_554",
39
- "container-arrow-position-left-bottom": "awsui_container-arrow-position-left-bottom_xjuzf_1aa2b_554",
40
- "container-arrow-position-top-center": "awsui_container-arrow-position-top-center_xjuzf_1aa2b_566",
41
- "container-arrow-position-top-right": "awsui_container-arrow-position-top-right_xjuzf_1aa2b_566",
42
- "container-arrow-position-top-left": "awsui_container-arrow-position-top-left_xjuzf_1aa2b_566",
43
- "container-arrow-position-top-responsive": "awsui_container-arrow-position-top-responsive_xjuzf_1aa2b_566",
44
- "container-arrow-position-bottom-center": "awsui_container-arrow-position-bottom-center_xjuzf_1aa2b_582",
45
- "container-arrow-position-bottom-right": "awsui_container-arrow-position-bottom-right_xjuzf_1aa2b_586",
46
- "container-arrow-position-bottom-left": "awsui_container-arrow-position-bottom-left_xjuzf_1aa2b_590",
47
- "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_xjuzf_1aa2b_1",
48
- "refresh": "awsui_refresh_xjuzf_1aa2b_708",
49
- "root": "awsui_root_xjuzf_1aa2b_730",
50
- "trigger": "awsui_trigger_xjuzf_1aa2b_742",
51
- "trigger-type-text": "awsui_trigger-type-text_xjuzf_1aa2b_749",
52
- "trigger-inner-text": "awsui_trigger-inner-text_xjuzf_1aa2b_778"
4
+ "arrow": "awsui_arrow_xjuzf_10pru_185",
5
+ "arrow-outer": "awsui_arrow-outer_xjuzf_10pru_189",
6
+ "arrow-inner": "awsui_arrow-inner_xjuzf_10pru_189",
7
+ "arrow-position-right-top": "awsui_arrow-position-right-top_xjuzf_10pru_220",
8
+ "arrow-position-right-bottom": "awsui_arrow-position-right-bottom_xjuzf_10pru_220",
9
+ "arrow-position-left-top": "awsui_arrow-position-left-top_xjuzf_10pru_223",
10
+ "arrow-position-left-bottom": "awsui_arrow-position-left-bottom_xjuzf_10pru_223",
11
+ "arrow-position-top-center": "awsui_arrow-position-top-center_xjuzf_10pru_226",
12
+ "arrow-position-top-right": "awsui_arrow-position-top-right_xjuzf_10pru_226",
13
+ "arrow-position-top-left": "awsui_arrow-position-top-left_xjuzf_10pru_226",
14
+ "arrow-position-top-responsive": "awsui_arrow-position-top-responsive_xjuzf_10pru_226",
15
+ "arrow-position-bottom-center": "awsui_arrow-position-bottom-center_xjuzf_10pru_229",
16
+ "arrow-position-bottom-right": "awsui_arrow-position-bottom-right_xjuzf_10pru_229",
17
+ "arrow-position-bottom-left": "awsui_arrow-position-bottom-left_xjuzf_10pru_229",
18
+ "arrow-position-bottom-responsive": "awsui_arrow-position-bottom-responsive_xjuzf_10pru_229",
19
+ "body": "awsui_body_xjuzf_10pru_325",
20
+ "body-overflow-visible": "awsui_body-overflow-visible_xjuzf_10pru_339",
21
+ "has-dismiss": "awsui_has-dismiss_xjuzf_10pru_343",
22
+ "dismiss": "awsui_dismiss_xjuzf_10pru_348",
23
+ "dismiss-control": "awsui_dismiss-control_xjuzf_10pru_355",
24
+ "header-row": "awsui_header-row_xjuzf_10pru_359",
25
+ "header": "awsui_header_xjuzf_10pru_359",
26
+ "content": "awsui_content_xjuzf_10pru_381",
27
+ "content-overflow-visible": "awsui_content-overflow-visible_xjuzf_10pru_388",
28
+ "container": "awsui_container_xjuzf_10pru_484",
29
+ "container-body": "awsui_container-body_xjuzf_10pru_492",
30
+ "container-body-variant-annotation": "awsui_container-body-variant-annotation_xjuzf_10pru_507",
31
+ "container-body-size-small": "awsui_container-body-size-small_xjuzf_10pru_512",
32
+ "fixed-width": "awsui_fixed-width_xjuzf_10pru_515",
33
+ "container-body-size-medium": "awsui_container-body-size-medium_xjuzf_10pru_519",
34
+ "container-body-size-large": "awsui_container-body-size-large_xjuzf_10pru_526",
35
+ "container-arrow": "awsui_container-arrow_xjuzf_10pru_538",
36
+ "container-arrow-position-right-top": "awsui_container-arrow-position-right-top_xjuzf_10pru_542",
37
+ "container-arrow-position-right-bottom": "awsui_container-arrow-position-right-bottom_xjuzf_10pru_542",
38
+ "container-arrow-position-left-top": "awsui_container-arrow-position-left-top_xjuzf_10pru_554",
39
+ "container-arrow-position-left-bottom": "awsui_container-arrow-position-left-bottom_xjuzf_10pru_554",
40
+ "container-arrow-position-top-center": "awsui_container-arrow-position-top-center_xjuzf_10pru_566",
41
+ "container-arrow-position-top-right": "awsui_container-arrow-position-top-right_xjuzf_10pru_566",
42
+ "container-arrow-position-top-left": "awsui_container-arrow-position-top-left_xjuzf_10pru_566",
43
+ "container-arrow-position-top-responsive": "awsui_container-arrow-position-top-responsive_xjuzf_10pru_566",
44
+ "container-arrow-position-bottom-center": "awsui_container-arrow-position-bottom-center_xjuzf_10pru_582",
45
+ "container-arrow-position-bottom-right": "awsui_container-arrow-position-bottom-right_xjuzf_10pru_586",
46
+ "container-arrow-position-bottom-left": "awsui_container-arrow-position-bottom-left_xjuzf_10pru_590",
47
+ "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_xjuzf_10pru_1",
48
+ "refresh": "awsui_refresh_xjuzf_10pru_708",
49
+ "root": "awsui_root_xjuzf_10pru_730",
50
+ "trigger": "awsui_trigger_xjuzf_10pru_743",
51
+ "trigger-type-text": "awsui_trigger-type-text_xjuzf_10pru_750",
52
+ "trigger-inner-text": "awsui_trigger-inner-text_xjuzf_10pru_779",
53
+ "popover-content": "awsui_popover-content_xjuzf_10pru_783"
53
54
  };
54
55