@cloudscape-design/components-themeable 3.0.1070 → 3.0.1072

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 (138) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/app-layout/visual-refresh-toolbar/skeleton/styles.scss +6 -0
  3. package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
  4. package/lib/internal/template/app-layout/utils/use-focus-control.d.ts +1 -0
  5. package/lib/internal/template/app-layout/utils/use-focus-control.d.ts.map +1 -1
  6. package/lib/internal/template/app-layout/utils/use-focus-control.js +66 -6
  7. package/lib/internal/template/app-layout/utils/use-focus-control.js.map +1 -1
  8. package/lib/internal/template/app-layout/utils/use-split-panel-focus-control.d.ts.map +1 -1
  9. package/lib/internal/template/app-layout/utils/use-split-panel-focus-control.js +15 -13
  10. package/lib/internal/template/app-layout/utils/use-split-panel-focus-control.js.map +1 -1
  11. package/lib/internal/template/app-layout/visual-refresh-toolbar/index.d.ts.map +1 -1
  12. package/lib/internal/template/app-layout/visual-refresh-toolbar/index.js +37 -350
  13. package/lib/internal/template/app-layout/visual-refresh-toolbar/index.js.map +1 -1
  14. package/lib/internal/template/app-layout/visual-refresh-toolbar/interfaces.d.ts +20 -0
  15. package/lib/internal/template/app-layout/visual-refresh-toolbar/interfaces.d.ts.map +1 -1
  16. package/lib/internal/template/app-layout/visual-refresh-toolbar/interfaces.js.map +1 -1
  17. package/lib/internal/template/app-layout/visual-refresh-toolbar/internal.d.ts +6 -0
  18. package/lib/internal/template/app-layout/visual-refresh-toolbar/internal.d.ts.map +1 -1
  19. package/lib/internal/template/app-layout/visual-refresh-toolbar/internal.js +13 -0
  20. package/lib/internal/template/app-layout/visual-refresh-toolbar/internal.js.map +1 -1
  21. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/index.js +1 -1
  22. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/index.js.map +1 -1
  23. package/lib/internal/template/app-layout/visual-refresh-toolbar/notifications/index.js +2 -2
  24. package/lib/internal/template/app-layout/visual-refresh-toolbar/notifications/index.js.map +1 -1
  25. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/index.d.ts +11 -16
  26. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/index.d.ts.map +1 -1
  27. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/index.js +21 -30
  28. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/index.js.map +1 -1
  29. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/interfaces.d.ts +21 -0
  30. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/interfaces.d.ts.map +1 -0
  31. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/interfaces.js +2 -0
  32. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/interfaces.js.map +1 -0
  33. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/multi-layout.d.ts +8 -0
  34. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/multi-layout.d.ts.map +1 -0
  35. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/multi-layout.js +41 -0
  36. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/multi-layout.js.map +1 -0
  37. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/{slot-skeletons.d.ts → skeleton-parts.d.ts} +9 -1
  38. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/skeleton-parts.d.ts.map +1 -0
  39. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/skeleton-parts.js +21 -0
  40. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/skeleton-parts.js.map +1 -0
  41. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/{slot-wrappers.d.ts → slots.d.ts} +7 -1
  42. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/slots.d.ts.map +1 -0
  43. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/{breadcrumbs/index.js → slots.js} +6 -3
  44. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/slots.js.map +1 -0
  45. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +23 -21
  46. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +42 -37
  47. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +23 -21
  48. package/lib/internal/template/app-layout/visual-refresh-toolbar/state/index.d.ts +18 -0
  49. package/lib/internal/template/app-layout/visual-refresh-toolbar/state/index.d.ts.map +1 -0
  50. package/lib/internal/template/app-layout/visual-refresh-toolbar/state/index.js +27 -0
  51. package/lib/internal/template/app-layout/visual-refresh-toolbar/state/index.js.map +1 -0
  52. package/lib/internal/template/app-layout/visual-refresh-toolbar/state/interfaces.d.ts +29 -0
  53. package/lib/internal/template/app-layout/visual-refresh-toolbar/state/interfaces.d.ts.map +1 -0
  54. package/lib/internal/template/app-layout/visual-refresh-toolbar/state/interfaces.js +2 -0
  55. package/lib/internal/template/app-layout/visual-refresh-toolbar/state/interfaces.js.map +1 -0
  56. package/lib/internal/template/app-layout/visual-refresh-toolbar/state/invariants.d.ts +3 -0
  57. package/lib/internal/template/app-layout/visual-refresh-toolbar/state/invariants.d.ts.map +1 -0
  58. package/lib/internal/template/app-layout/visual-refresh-toolbar/state/invariants.js +4 -0
  59. package/lib/internal/template/app-layout/visual-refresh-toolbar/state/invariants.js.map +1 -0
  60. package/lib/internal/template/app-layout/visual-refresh-toolbar/state/props-merger.d.ts +5 -0
  61. package/lib/internal/template/app-layout/visual-refresh-toolbar/state/props-merger.d.ts.map +1 -0
  62. package/lib/internal/template/app-layout/visual-refresh-toolbar/{multi-layout.js → state/props-merger.js} +28 -40
  63. package/lib/internal/template/app-layout/visual-refresh-toolbar/state/props-merger.js.map +1 -0
  64. package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-app-layout.d.ts +6 -0
  65. package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-app-layout.d.ts.map +1 -0
  66. package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-app-layout.js +322 -0
  67. package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-app-layout.js.map +1 -0
  68. package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-skeleton-slots-attributes.d.ts +4 -0
  69. package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-skeleton-slots-attributes.d.ts.map +1 -0
  70. package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-skeleton-slots-attributes.js +59 -0
  71. package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-skeleton-slots-attributes.js.map +1 -0
  72. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.d.ts +2 -2
  73. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.d.ts.map +1 -1
  74. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js.map +1 -1
  75. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.d.ts.map +1 -1
  76. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.js +2 -3
  77. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
  78. package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.d.ts +5 -0
  79. package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.d.ts.map +1 -0
  80. package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.js +29 -0
  81. package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.js.map +1 -0
  82. package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.d.ts +5 -0
  83. package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.d.ts.map +1 -0
  84. package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js +28 -0
  85. package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js.map +1 -0
  86. package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.d.ts +5 -0
  87. package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.d.ts.map +1 -0
  88. package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.js +17 -0
  89. package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.js.map +1 -0
  90. package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/top-content-slot.d.ts +5 -0
  91. package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/top-content-slot.d.ts.map +1 -0
  92. package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/top-content-slot.js +19 -0
  93. package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/top-content-slot.js.map +1 -0
  94. package/lib/internal/template/breadcrumb-group/internal.d.ts +2 -1
  95. package/lib/internal/template/breadcrumb-group/internal.d.ts.map +1 -1
  96. package/lib/internal/template/breadcrumb-group/internal.js +3 -2
  97. package/lib/internal/template/breadcrumb-group/internal.js.map +1 -1
  98. package/lib/internal/template/button/internal.d.ts.map +1 -1
  99. package/lib/internal/template/button/internal.js +3 -26
  100. package/lib/internal/template/button/internal.js.map +1 -1
  101. package/lib/internal/template/button/style.d.ts +8 -0
  102. package/lib/internal/template/button/style.d.ts.map +1 -0
  103. package/lib/internal/template/button/style.js +33 -0
  104. package/lib/internal/template/button/style.js.map +1 -0
  105. package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
  106. package/lib/internal/template/internal/environment.js +2 -2
  107. package/lib/internal/template/internal/environment.json +2 -2
  108. package/lib/internal/template/internal/types.d.ts +9 -0
  109. package/lib/internal/template/internal/types.d.ts.map +1 -1
  110. package/lib/internal/template/internal/types.js.map +1 -1
  111. package/lib/internal/template/internal/widget-exports.d.ts +5 -0
  112. package/lib/internal/template/internal/widget-exports.d.ts.map +1 -1
  113. package/lib/internal/template/internal/widget-exports.js +7 -0
  114. package/lib/internal/template/internal/widget-exports.js.map +1 -1
  115. package/lib/internal/template/internal/widgets/index.d.ts +2 -3
  116. package/lib/internal/template/internal/widgets/index.d.ts.map +1 -1
  117. package/lib/internal/template/internal/widgets/index.js.map +1 -1
  118. package/lib/internal/template/internal/widgets/loader-mock.d.ts +3 -0
  119. package/lib/internal/template/internal/widgets/loader-mock.d.ts.map +1 -0
  120. package/lib/internal/template/internal/widgets/loader-mock.js +43 -0
  121. package/lib/internal/template/internal/widgets/loader-mock.js.map +1 -0
  122. package/package.json +1 -1
  123. package/lib/internal/scss/app-layout/visual-refresh-toolbar/skeleton/breadcrumbs/styles.scss +0 -9
  124. package/lib/internal/template/app-layout/visual-refresh-toolbar/multi-layout.d.ts +0 -34
  125. package/lib/internal/template/app-layout/visual-refresh-toolbar/multi-layout.d.ts.map +0 -1
  126. package/lib/internal/template/app-layout/visual-refresh-toolbar/multi-layout.js.map +0 -1
  127. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/breadcrumbs/index.d.ts +0 -9
  128. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/breadcrumbs/index.d.ts.map +0 -1
  129. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/breadcrumbs/index.js.map +0 -1
  130. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/breadcrumbs/styles.css.js +0 -7
  131. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/breadcrumbs/styles.scoped.css +0 -7
  132. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/breadcrumbs/styles.selectors.js +0 -8
  133. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/slot-skeletons.d.ts.map +0 -1
  134. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/slot-skeletons.js +0 -9
  135. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/slot-skeletons.js.map +0 -1
  136. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/slot-wrappers.d.ts.map +0 -1
  137. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/slot-wrappers.js +0 -8
  138. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/slot-wrappers.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/internal/types.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,YAAY,CAAC,IAAI,EAAE,IAAI,SAAS,MAAM,IAAI,IAAI,IAAI,GAAG;KAC9D,GAAG,IAAI,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC;CAC3B,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,QAAQ,CAAC,IAAI,IAAI,IAAI,GAAG,SAAS,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/internal/types.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,YAAY,CAAC,IAAI,EAAE,IAAI,SAAS,MAAM,IAAI,IAAI,IAAI,GAAG;KAC9D,GAAG,IAAI,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC;CAC3B,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAElF;;;;;;;GAOG;AACH,MAAM,MAAM,QAAQ,CAAC,IAAI,IAAI,IAAI,GAAG,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/internal/types.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Makes specified properties required.\n *\n * @example\n * ```\n * import { AlertProps } from '~components/alert/interfaces'\n *\n * type InternalAlertProps = SomeRequired<AlertProps, 'type'>\n *\n * function Alert(props: AlertProps) { ... }\n * function InternalAlert(props: InternalAlertProps) { ... }\n * ```\n */\nexport type SomeRequired<Type, Keys extends keyof Type> = Type & {\n [Key in Keys]-?: Type[Key];\n};\n\n/**\n * Utility type that makes a union of given type and undefined.\n * @example\n * ```\n * type OptionalString = Optional<string>\n * type OptionalStringOrNumber = Optional<string | number>\n * ```\n */\nexport type Optional<Type> = Type | undefined;\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/internal/types.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Makes specified properties required.\n *\n * @example\n * ```\n * import { AlertProps } from '~components/alert/interfaces'\n *\n * type InternalAlertProps = SomeRequired<AlertProps, 'type'>\n *\n * function Alert(props: AlertProps) { ... }\n * function InternalAlert(props: InternalAlertProps) { ... }\n * ```\n */\nexport type SomeRequired<Type, Keys extends keyof Type> = Type & {\n [Key in Keys]-?: Type[Key];\n};\n\n/**\n * Makes specified properties optional.\n *\n * @example\n * ```\n * type PartialAlertProps = SomeOptional<AlertProps, 'type' | 'children'>\n * ```\n */\nexport type SomeOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;\n\n/**\n * Utility type that makes a union of given type and undefined.\n * @example\n * ```\n * type OptionalString = Optional<string>\n * type OptionalStringOrNumber = Optional<string | number>\n * ```\n */\nexport type Optional<Type> = Type | undefined;\n"]}
@@ -4,6 +4,11 @@ export { AppLayoutNavigationImplementation as AppLayoutNavigation } from '../app
4
4
  export { AppLayoutNotificationsImplementation as AppLayoutNotifications } from '../app-layout/visual-refresh-toolbar/notifications';
5
5
  export { AppLayoutSplitPanelDrawerBottomImplementation as AppLayoutSplitPanelBottom, AppLayoutSplitPanelDrawerSideImplementation as AppLayoutSplitPanelSide, } from '../app-layout/visual-refresh-toolbar/split-panel';
6
6
  export { AppLayoutToolbarImplementation as AppLayoutToolbar } from '../app-layout/visual-refresh-toolbar/toolbar';
7
+ export { BeforeMainSlotImplementation as AppLayoutBeforeMainSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/before-main-slot';
8
+ export { AfterMainSlotImplementation as AppLayoutAfterMainSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/after-main-slot';
9
+ export { TopContentSlotImplementation as AppLayoutTopContentSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/top-content-slot';
10
+ export { BottomContentSlotImplementation as AppLayoutBottomContentSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot';
11
+ export { AppLayoutStateProvider as AppLayoutWidgetizedState } from '../app-layout/visual-refresh-toolbar/state';
7
12
  export { SplitPanelImplementation as SplitPanel } from '../split-panel/implementation';
8
13
  export { BreadcrumbGroupImplementation as BreadcrumbGroup } from '../breadcrumb-group/implementation';
9
14
  export { DrawerImplementation as Drawer } from '../drawer/implementation';
@@ -1 +1 @@
1
- {"version":3,"file":"widget-exports.d.ts","sourceRoot":"","sources":["../../../src/internal/widget-exports.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EACL,6BAA6B,IAAI,eAAe,EAChD,oCAAoC,IAAI,sBAAsB,GAC/D,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,iCAAiC,IAAI,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAC3H,OAAO,EAAE,oCAAoC,IAAI,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AACpI,OAAO,EACL,6CAA6C,IAAI,yBAAyB,EAC1E,2CAA2C,IAAI,uBAAuB,GACvE,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,8BAA8B,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAClH,OAAO,E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M,+BAA+B,CAAC;AACvF,OAAO,EAAE,6BAA6B,IAAI,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACtG,OAAO,EAAE,oBAAoB,IAAI,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,4BAA4B,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnG,OAAO,EAAE,uBAAuB,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAC"}
@@ -1,11 +1,18 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  export { PACKAGE_VERSION } from './environment';
4
+ // Legacy widgetized parts
4
5
  export { AppLayoutDrawerImplementation as AppLayoutDrawer, AppLayoutGlobalDrawersImplementation as AppLayoutGlobalDrawers, } from '../app-layout/visual-refresh-toolbar/drawer';
5
6
  export { AppLayoutNavigationImplementation as AppLayoutNavigation } from '../app-layout/visual-refresh-toolbar/navigation';
6
7
  export { AppLayoutNotificationsImplementation as AppLayoutNotifications } from '../app-layout/visual-refresh-toolbar/notifications';
7
8
  export { AppLayoutSplitPanelDrawerBottomImplementation as AppLayoutSplitPanelBottom, AppLayoutSplitPanelDrawerSideImplementation as AppLayoutSplitPanelSide, } from '../app-layout/visual-refresh-toolbar/split-panel';
8
9
  export { AppLayoutToolbarImplementation as AppLayoutToolbar } from '../app-layout/visual-refresh-toolbar/toolbar';
10
+ // Refactored widgetized parts
11
+ export { BeforeMainSlotImplementation as AppLayoutBeforeMainSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/before-main-slot';
12
+ export { AfterMainSlotImplementation as AppLayoutAfterMainSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/after-main-slot';
13
+ export { TopContentSlotImplementation as AppLayoutTopContentSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/top-content-slot';
14
+ export { BottomContentSlotImplementation as AppLayoutBottomContentSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot';
15
+ export { AppLayoutStateProvider as AppLayoutWidgetizedState } from '../app-layout/visual-refresh-toolbar/state';
9
16
  export { SplitPanelImplementation as SplitPanel } from '../split-panel/implementation';
10
17
  export { BreadcrumbGroupImplementation as BreadcrumbGroup } from '../breadcrumb-group/implementation';
11
18
  export { DrawerImplementation as Drawer } from '../drawer/implementation';
@@ -1 +1 @@
1
- {"version":3,"file":"widget-exports.js","sourceRoot":"","sources":["../../../src/internal/widget-exports.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EACL,6BAA6B,IAAI,eAAe,EAChD,oCAAoC,IAAI,sBAAsB,GAC/D,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,iCAAiC,IAAI,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAC3H,OAAO,EAAE,oCAAoC,IAAI,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AACpI,OAAO,EACL,6CAA6C,IAAI,yBAAyB,EAC1E,2CAA2C,IAAI,uBAAuB,GACvE,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,8BAA8B,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAClH,OAAO,EAAE,wBAAwB,IAAI,UAAU,EAAE,MAAM,+BAA+B,CAAC;AACvF,OAAO,EAAE,6BAA6B,IAAI,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACtG,OAAO,EAAE,oBAAoB,IAAI,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,4BAA4B,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnG,OAAO,EAAE,uBAAuB,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport { PACKAGE_VERSION } from './environment';\nexport {\n AppLayoutDrawerImplementation as AppLayoutDrawer,\n AppLayoutGlobalDrawersImplementation as AppLayoutGlobalDrawers,\n} from '../app-layout/visual-refresh-toolbar/drawer';\nexport { AppLayoutNavigationImplementation as AppLayoutNavigation } from '../app-layout/visual-refresh-toolbar/navigation';\nexport { AppLayoutNotificationsImplementation as AppLayoutNotifications } from '../app-layout/visual-refresh-toolbar/notifications';\nexport {\n AppLayoutSplitPanelDrawerBottomImplementation as AppLayoutSplitPanelBottom,\n AppLayoutSplitPanelDrawerSideImplementation as AppLayoutSplitPanelSide,\n} from '../app-layout/visual-refresh-toolbar/split-panel';\nexport { AppLayoutToolbarImplementation as AppLayoutToolbar } from '../app-layout/visual-refresh-toolbar/toolbar';\nexport { SplitPanelImplementation as SplitPanel } from '../split-panel/implementation';\nexport { BreadcrumbGroupImplementation as BreadcrumbGroup } from '../breadcrumb-group/implementation';\nexport { DrawerImplementation as Drawer } from '../drawer/implementation';\nexport { SideNavigationImplementation as SideNavigation } from '../side-navigation/implementation';\nexport { HelpPanelImplementation as HelpPanel } from '../help-panel/implementation';\n"]}
1
+ {"version":3,"file":"widget-exports.js","sourceRoot":"","sources":["../../../src/internal/widget-exports.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,0BAA0B;AAC1B,OAAO,EACL,6BAA6B,IAAI,eAAe,EAChD,oCAAoC,IAAI,sBAAsB,GAC/D,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,iCAAiC,IAAI,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAC3H,OAAO,EAAE,oCAAoC,IAAI,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AACpI,OAAO,EACL,6CAA6C,IAAI,yBAAyB,EAC1E,2CAA2C,IAAI,uBAAuB,GACvE,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,8BAA8B,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAElH,8BAA8B;AAC9B,OAAO,EAAE,4BAA4B,IAAI,uBAAuB,EAAE,MAAM,oEAAoE,CAAC;AAC7I,OAAO,EAAE,2BAA2B,IAAI,sBAAsB,EAAE,MAAM,mEAAmE,CAAC;AAC1I,OAAO,EAAE,4BAA4B,IAAI,uBAAuB,EAAE,MAAM,oEAAoE,CAAC;AAC7I,OAAO,EAAE,+BAA+B,IAAI,0BAA0B,EAAE,MAAM,uEAAuE,CAAC;AACtJ,OAAO,EAAE,sBAAsB,IAAI,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AAEhH,OAAO,EAAE,wBAAwB,IAAI,UAAU,EAAE,MAAM,+BAA+B,CAAC;AACvF,OAAO,EAAE,6BAA6B,IAAI,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACtG,OAAO,EAAE,oBAAoB,IAAI,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,4BAA4B,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnG,OAAO,EAAE,uBAAuB,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport { PACKAGE_VERSION } from './environment';\n\n// Legacy widgetized parts\nexport {\n AppLayoutDrawerImplementation as AppLayoutDrawer,\n AppLayoutGlobalDrawersImplementation as AppLayoutGlobalDrawers,\n} from '../app-layout/visual-refresh-toolbar/drawer';\nexport { AppLayoutNavigationImplementation as AppLayoutNavigation } from '../app-layout/visual-refresh-toolbar/navigation';\nexport { AppLayoutNotificationsImplementation as AppLayoutNotifications } from '../app-layout/visual-refresh-toolbar/notifications';\nexport {\n AppLayoutSplitPanelDrawerBottomImplementation as AppLayoutSplitPanelBottom,\n AppLayoutSplitPanelDrawerSideImplementation as AppLayoutSplitPanelSide,\n} from '../app-layout/visual-refresh-toolbar/split-panel';\nexport { AppLayoutToolbarImplementation as AppLayoutToolbar } from '../app-layout/visual-refresh-toolbar/toolbar';\n\n// Refactored widgetized parts\nexport { BeforeMainSlotImplementation as AppLayoutBeforeMainSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/before-main-slot';\nexport { AfterMainSlotImplementation as AppLayoutAfterMainSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/after-main-slot';\nexport { TopContentSlotImplementation as AppLayoutTopContentSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/top-content-slot';\nexport { BottomContentSlotImplementation as AppLayoutBottomContentSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot';\nexport { AppLayoutStateProvider as AppLayoutWidgetizedState } from '../app-layout/visual-refresh-toolbar/state';\n\nexport { SplitPanelImplementation as SplitPanel } from '../split-panel/implementation';\nexport { BreadcrumbGroupImplementation as BreadcrumbGroup } from '../breadcrumb-group/implementation';\nexport { DrawerImplementation as Drawer } from '../drawer/implementation';\nexport { SideNavigationImplementation as SideNavigation } from '../side-navigation/implementation';\nexport { HelpPanelImplementation as HelpPanel } from '../help-panel/implementation';\n"]}
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- export type FunctionComponent<Props> = (props: Props) => JSX.Element;
3
- type PropsType<Component extends FunctionComponent<any>> = Component extends FunctionComponent<infer Props> ? Props : never;
2
+ export type FunctionComponent<Props extends object> = (props: Props) => JSX.Element | null;
3
+ export type PropsType<Component extends FunctionComponent<any>> = Component extends FunctionComponent<infer Props> ? Props : never;
4
4
  export declare function createWidgetizedComponent<Component extends FunctionComponent<any>>(Implementation: Component, Skeleton?: React.ForwardRefExoticComponent<PropsType<Component> & React.RefAttributes<HTMLElement>>): (Loader?: Component) => Component;
5
- export {};
6
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/internal/widgets/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,MAAM,iBAAiB,CAAC,KAAK,IAAI,CAAC,KAAK,EAAE,KAAK,KAAK,GAAG,CAAC,OAAO,CAAC;AACrE,KAAK,SAAS,CAAC,SAAS,SAAS,iBAAiB,CAAC,GAAG,CAAC,IACrD,SAAS,SAAS,iBAAiB,CAAC,MAAM,KAAK,CAAC,GAAG,KAAK,GAAG,KAAK,CAAC;AAEnE,wBAAgB,yBAAyB,CAAC,SAAS,SAAS,iBAAiB,CAAC,GAAG,CAAC,EAChF,cAAc,EAAE,SAAS,EACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,yBAAyB,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,aAElF,SAAS,KAAG,SAAS,CAUvC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/internal/widgets/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,MAAM,iBAAiB,CAAC,KAAK,SAAS,MAAM,IAAI,CAAC,KAAK,EAAE,KAAK,KAAK,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;AAC3F,MAAM,MAAM,SAAS,CAAC,SAAS,SAAS,iBAAiB,CAAC,GAAG,CAAC,IAC5D,SAAS,SAAS,iBAAiB,CAAC,MAAM,KAAK,CAAC,GAAG,KAAK,GAAG,KAAK,CAAC;AAEnE,wBAAgB,yBAAyB,CAAC,SAAS,SAAS,iBAAiB,CAAC,GAAG,CAAC,EAChF,cAAc,EAAE,SAAS,EACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,yBAAyB,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,aAElF,SAAS,KAAG,SAAS,CAUvC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/internal/widgets/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAC;AAE9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAO5D,MAAM,UAAU,yBAAyB,CACvC,cAAyB,EACzB,QAAmG;IAEnG,OAAO,CAAC,MAAkB,EAAa,EAAE;QACvC,OAAO,CAAC,KAAK,CAAC,EAAE;YACd,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAAC;YACrC,IAAI,SAAS,IAAI,aAAa,CAAC,iBAAiB,CAAC,IAAI,MAAM,EAAE;gBAC3D,OAAO,oBAAC,MAAM,kBAAC,QAAQ,EAAE,QAAQ,IAAO,KAAa,EAAI,CAAC;aAC3D;YAED,OAAO,oBAAC,cAAc,oBAAM,KAAa,EAAI,CAAC;QAChD,CAAC,CAAc,CAAC;IAClB,CAAC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { getGlobalFlag } from '@cloudscape-design/component-toolkit/internal';\n\nimport { useVisualRefresh } from '../hooks/use-visual-mode';\n\n// Built-in React.FunctionComponent has always present `children` property which is not desired\nexport type FunctionComponent<Props> = (props: Props) => JSX.Element;\ntype PropsType<Component extends FunctionComponent<any>> =\n Component extends FunctionComponent<infer Props> ? Props : never;\n\nexport function createWidgetizedComponent<Component extends FunctionComponent<any>>(\n Implementation: Component,\n Skeleton?: React.ForwardRefExoticComponent<PropsType<Component> & React.RefAttributes<HTMLElement>>\n) {\n return (Loader?: Component): Component => {\n return (props => {\n const isRefresh = useVisualRefresh();\n if (isRefresh && getGlobalFlag('appLayoutWidget') && Loader) {\n return <Loader Skeleton={Skeleton} {...(props as any)} />;\n }\n\n return <Implementation {...(props as any)} />;\n }) as Component;\n };\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/internal/widgets/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAC;AAE9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAO5D,MAAM,UAAU,yBAAyB,CACvC,cAAyB,EACzB,QAAmG;IAEnG,OAAO,CAAC,MAAkB,EAAa,EAAE;QACvC,OAAO,CAAC,KAAK,CAAC,EAAE;YACd,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAAC;YACrC,IAAI,SAAS,IAAI,aAAa,CAAC,iBAAiB,CAAC,IAAI,MAAM,EAAE;gBAC3D,OAAO,oBAAC,MAAM,kBAAC,QAAQ,EAAE,QAAQ,IAAO,KAAa,EAAI,CAAC;aAC3D;YAED,OAAO,oBAAC,cAAc,oBAAM,KAAa,EAAI,CAAC;QAChD,CAAC,CAAc,CAAC;IAClB,CAAC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { getGlobalFlag } from '@cloudscape-design/component-toolkit/internal';\n\nimport { useVisualRefresh } from '../hooks/use-visual-mode';\n\n// Built-in React.FunctionComponent has always present `children` property which is not desired\nexport type FunctionComponent<Props extends object> = (props: Props) => JSX.Element | null;\nexport type PropsType<Component extends FunctionComponent<any>> =\n Component extends FunctionComponent<infer Props> ? Props : never;\n\nexport function createWidgetizedComponent<Component extends FunctionComponent<any>>(\n Implementation: Component,\n Skeleton?: React.ForwardRefExoticComponent<PropsType<Component> & React.RefAttributes<HTMLElement>>\n) {\n return (Loader?: Component): Component => {\n return (props => {\n const isRefresh = useVisualRefresh();\n if (isRefresh && getGlobalFlag('appLayoutWidget') && Loader) {\n return <Loader Skeleton={Skeleton} {...(props as any)} />;\n }\n\n return <Implementation {...(props as any)} />;\n }) as Component;\n };\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import { FunctionComponent } from './index';
2
+ export declare function createLoadableComponent<ComponentType extends FunctionComponent<any>>(Component: ComponentType): ComponentType | undefined;
3
+ //# sourceMappingURL=loader-mock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loader-mock.d.ts","sourceRoot":"","sources":["../../../../src/internal/widgets/loader-mock.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAa,MAAM,SAAS,CAAC;AAgBvD,wBAAgB,uBAAuB,CAAC,aAAa,SAAS,iBAAiB,CAAC,GAAG,CAAC,EAClF,SAAS,EAAE,aAAa,GACvB,aAAa,GAAG,SAAS,CA8B3B"}
@@ -0,0 +1,43 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ import React, { useEffect, useState } from 'react';
4
+ const getCustomFlag = (flagName) => {
5
+ var _a;
6
+ const flagHolder = typeof window !== 'undefined' ? window : globalThis;
7
+ const awsuiCustomFlagsSymbol = Symbol.for('awsui-custom-flags');
8
+ return (_a = flagHolder === null || flagHolder === void 0 ? void 0 : flagHolder[awsuiCustomFlagsSymbol]) === null || _a === void 0 ? void 0 : _a[flagName];
9
+ };
10
+ const isAppLayoutDelayedWidget = () => {
11
+ return !!getCustomFlag('appLayoutDelayedWidget');
12
+ };
13
+ const enableDelayedComponents = isAppLayoutDelayedWidget();
14
+ let loadPromise;
15
+ export function createLoadableComponent(Component) {
16
+ if (!enableDelayedComponents) {
17
+ return;
18
+ }
19
+ return ((props) => {
20
+ const [mounted, setMounted] = useState(false);
21
+ useEffect(() => {
22
+ if (!loadPromise) {
23
+ loadPromise = new Promise(resolve => setTimeout(() => resolve(), 1000));
24
+ }
25
+ let mounted = true;
26
+ loadPromise.then(() => {
27
+ if (mounted) {
28
+ setMounted(true);
29
+ }
30
+ });
31
+ return () => {
32
+ mounted = false;
33
+ };
34
+ }, []);
35
+ if (mounted) {
36
+ return React.createElement(Component, Object.assign({}, props));
37
+ }
38
+ // this prop is injected in `createWidgetizedComponent` and is not a part of the component signature
39
+ const { Skeleton } = props;
40
+ return Skeleton ? React.createElement(Skeleton, Object.assign({}, props)) : React.createElement("div", null);
41
+ });
42
+ }
43
+ //# sourceMappingURL=loader-mock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loader-mock.js","sourceRoot":"","sources":["../../../../src/internal/widgets/loader-mock.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAInD,MAAM,aAAa,GAAG,CAAC,QAAgB,EAAE,EAAE;;IACzC,MAAM,UAAU,GAAQ,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC;IAC5E,MAAM,sBAAsB,GAAG,MAAM,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAChE,OAAO,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAG,sBAA6B,CAAC,0CAAG,QAAe,CAAC,CAAC;AACxE,CAAC,CAAC;AAEF,MAAM,wBAAwB,GAAG,GAAG,EAAE;IACpC,OAAO,CAAC,CAAC,aAAa,CAAC,wBAAwB,CAAC,CAAC;AACnD,CAAC,CAAC;AAEF,MAAM,uBAAuB,GAAG,wBAAwB,EAAE,CAAC;AAE3D,IAAI,WAA0B,CAAC;AAE/B,MAAM,UAAU,uBAAuB,CACrC,SAAwB;IAExB,IAAI,CAAC,uBAAuB,EAAE;QAC5B,OAAO;KACR;IACD,OAAO,CAAC,CAAC,KAA+B,EAAE,EAAE;QAC1C,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAE9C,SAAS,CAAC,GAAG,EAAE;YACb,IAAI,CAAC,WAAW,EAAE;gBAChB,WAAW,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;aACzE;YACD,IAAI,OAAO,GAAG,IAAI,CAAC;YACnB,WAAW,CAAC,IAAI,CAAC,GAAG,EAAE;gBACpB,IAAI,OAAO,EAAE;oBACX,UAAU,CAAC,IAAI,CAAC,CAAC;iBAClB;YACH,CAAC,CAAC,CAAC;YACH,OAAO,GAAG,EAAE;gBACV,OAAO,GAAG,KAAK,CAAC;YAClB,CAAC,CAAC;QACJ,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,IAAI,OAAO,EAAE;YACX,OAAO,oBAAC,SAAS,oBAAK,KAAK,EAAI,CAAC;SACjC;QACD,oGAAoG;QACpG,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAY,CAAC;QAElC,OAAO,QAAQ,CAAC,CAAC,CAAC,oBAAC,QAAQ,oBAAK,KAAK,EAAI,CAAC,CAAC,CAAC,gCAAO,CAAC;IACtD,CAAC,CAAkB,CAAC;AACtB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useState } from 'react';\n\nimport { FunctionComponent, PropsType } from './index';\n\nconst getCustomFlag = (flagName: string) => {\n const flagHolder: any = typeof window !== 'undefined' ? window : globalThis;\n const awsuiCustomFlagsSymbol = Symbol.for('awsui-custom-flags');\n return flagHolder?.[awsuiCustomFlagsSymbol as any]?.[flagName as any];\n};\n\nconst isAppLayoutDelayedWidget = () => {\n return !!getCustomFlag('appLayoutDelayedWidget');\n};\n\nconst enableDelayedComponents = isAppLayoutDelayedWidget();\n\nlet loadPromise: Promise<void>;\n\nexport function createLoadableComponent<ComponentType extends FunctionComponent<any>>(\n Component: ComponentType\n): ComponentType | undefined {\n if (!enableDelayedComponents) {\n return;\n }\n return ((props: PropsType<ComponentType>) => {\n const [mounted, setMounted] = useState(false);\n\n useEffect(() => {\n if (!loadPromise) {\n loadPromise = new Promise(resolve => setTimeout(() => resolve(), 1000));\n }\n let mounted = true;\n loadPromise.then(() => {\n if (mounted) {\n setMounted(true);\n }\n });\n return () => {\n mounted = false;\n };\n }, []);\n\n if (mounted) {\n return <Component {...props} />;\n }\n // this prop is injected in `createWidgetizedComponent` and is not a part of the component signature\n const { Skeleton } = props as any;\n\n return Skeleton ? <Skeleton {...props} /> : <div />;\n }) as ComponentType;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudscape-design/components-themeable",
3
- "version": "3.0.1070",
3
+ "version": "3.0.1072",
4
4
  "files": [
5
5
  "lib"
6
6
  ],
@@ -1,9 +0,0 @@
1
- /*
2
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
- SPDX-License-Identifier: Apache-2.0
4
- */
5
-
6
- // backward compatibility before this commit: f3bdaa292ae849b74404f32ef067c9fd6d2e8d7c
7
- .breadcrumbs-own:not(:empty) + .breadcrumbs-discovered {
8
- display: none;
9
- }
@@ -1,34 +0,0 @@
1
- import React from 'react';
2
- import { AppLayoutProps } from '../interfaces';
3
- import { OnChangeParams } from '../utils/use-drawers';
4
- import { Focusable, FocusControlMultipleStates } from '../utils/use-focus-control';
5
- import { SplitPanelToggleProps, ToolbarProps } from './toolbar';
6
- export interface SharedProps {
7
- forceDeduplicationType?: 'primary' | 'secondary' | 'suspended' | 'off';
8
- ariaLabels: AppLayoutProps.Labels | undefined;
9
- navigation: React.ReactNode;
10
- navigationOpen: boolean;
11
- onNavigationToggle: (open: boolean) => void;
12
- navigationFocusRef: React.Ref<Focusable> | undefined;
13
- breadcrumbs: React.ReactNode;
14
- activeDrawerId: string | null;
15
- drawers: ReadonlyArray<AppLayoutProps.Drawer> | undefined;
16
- onActiveDrawerChange: ((drawerId: string | null, params: OnChangeParams) => void) | undefined;
17
- drawersFocusRef: React.Ref<Focusable> | undefined;
18
- globalDrawersFocusControl?: FocusControlMultipleStates | undefined;
19
- globalDrawers?: ReadonlyArray<AppLayoutProps.Drawer> | undefined;
20
- activeGlobalDrawersIds?: Array<string> | undefined;
21
- onActiveGlobalDrawersChange?: ((newDrawerId: string, params: OnChangeParams) => void) | undefined;
22
- splitPanel: React.ReactNode;
23
- splitPanelToggleProps: SplitPanelToggleProps | undefined;
24
- splitPanelFocusRef: React.Ref<Focusable> | undefined;
25
- onSplitPanelToggle: () => void;
26
- expandedDrawerId?: string | null;
27
- setExpandedDrawerId: (value: string | null) => void;
28
- }
29
- export declare function mergeProps(ownProps: SharedProps, additionalProps: ReadonlyArray<Partial<SharedProps>>): ToolbarProps | null;
30
- export declare function useMultiAppLayout(props: SharedProps, isEnabled: boolean): {
31
- registered: boolean;
32
- toolbarProps: ToolbarProps | null;
33
- };
34
- //# sourceMappingURL=multi-layout.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"multi-layout.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/multi-layout.ts"],"names":[],"mappings":"AAEA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAMzD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEhE,MAAM,WAAW,WAAW;IAC1B,sBAAsB,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,WAAW,GAAG,KAAK,CAAC;IACvE,UAAU,EAAE,cAAc,CAAC,MAAM,GAAG,SAAS,CAAC;IAC9C,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,cAAc,EAAE,OAAO,CAAC;IACxB,kBAAkB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,kBAAkB,EAAE,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;IACrD,WAAW,EAAE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EAAE;YACV,UAAU,EAAE,CAAC;YACb,eAAe,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;QACzC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,sBAAsB,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;IAEnD,eAAe,CAAC,GAAG,EAAE;QACnB,IAAI,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI,MAAK,WAAW,EAAE;YACtC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;SAC5B;IACH,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,SAAS,EAAE;QACd,OAAO;YACL,UAAU,EAAE,IAAI;YAChB,2FAA2F;YAC3F,+DAA+D;YAC/D,YAAY,EAAE,UAAU,CAAC,KAAK,EAAE,EAAE,CAAC;SACpC,CAAC;KACH;IAED,OAAO;QACL,UAAU,EAAE,CAAC,CAAC,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI,CAAA;QAChC,YAAY,EAAE,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI,MAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,EAAE,YAAY,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,IAAI;KACxG,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useLayoutEffect, useState } from 'react';\n\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { awsuiPluginsInternal } from '../../internal/plugins/api';\nimport { RegistrationState } from '../../internal/plugins/controllers/app-layout-widget';\nimport { AppLayoutProps } from '../interfaces';\nimport { useAppLayoutFlagEnabled } from '../utils/feature-flags';\nimport { OnChangeParams } from '../utils/use-drawers';\nimport { Focusable, FocusControlMultipleStates } from '../utils/use-focus-control';\nimport { SplitPanelToggleProps, ToolbarProps } from './toolbar';\n\nexport interface SharedProps {\n forceDeduplicationType?: 'primary' | 'secondary' | 'suspended' | 'off';\n ariaLabels: AppLayoutProps.Labels | undefined;\n navigation: React.ReactNode;\n navigationOpen: boolean;\n onNavigationToggle: (open: boolean) => void;\n navigationFocusRef: React.Ref<Focusable> | undefined;\n breadcrumbs: React.ReactNode;\n activeDrawerId: string | null;\n drawers: ReadonlyArray<AppLayoutProps.Drawer> | undefined;\n onActiveDrawerChange: ((drawerId: string | null, params: OnChangeParams) => void) | undefined;\n drawersFocusRef: React.Ref<Focusable> | undefined;\n globalDrawersFocusControl?: FocusControlMultipleStates | undefined;\n globalDrawers?: ReadonlyArray<AppLayoutProps.Drawer> | undefined;\n activeGlobalDrawersIds?: Array<string> | undefined;\n onActiveGlobalDrawersChange?: ((newDrawerId: string, params: OnChangeParams) => void) | undefined;\n splitPanel: React.ReactNode;\n splitPanelToggleProps: SplitPanelToggleProps | undefined;\n splitPanelFocusRef: React.Ref<Focusable> | undefined;\n onSplitPanelToggle: () => void;\n expandedDrawerId?: string | null;\n setExpandedDrawerId: (value: string | null) => void;\n}\n\nfunction checkAlreadyExists(value: boolean, propName: string) {\n if (value) {\n warnOnce(\n 'AppLayout',\n `Another app layout instance on this page already defines ${propName} property. This instance will be ignored.`\n );\n return true;\n }\n return false;\n}\n\nexport function mergeProps(\n ownProps: SharedProps,\n additionalProps: ReadonlyArray<Partial<SharedProps>>\n): ToolbarProps | null {\n const toolbar: ToolbarProps = {};\n for (const props of [ownProps, ...additionalProps]) {\n toolbar.ariaLabels = Object.assign(toolbar.ariaLabels ?? {}, props.ariaLabels);\n if (\n props.drawers &&\n props.drawers.some(drawer => drawer.trigger) &&\n !checkAlreadyExists(!!toolbar.drawers, 'tools or drawers')\n ) {\n toolbar.drawers = props.drawers;\n toolbar.activeDrawerId = props.activeDrawerId;\n toolbar.drawersFocusRef = props.drawersFocusRef;\n toolbar.onActiveDrawerChange = props.onActiveDrawerChange;\n }\n if (props.globalDrawers && !checkAlreadyExists(!!toolbar.globalDrawers, 'globalDrawers')) {\n toolbar.globalDrawersFocusControl = props.globalDrawersFocusControl;\n toolbar.globalDrawers = props.globalDrawers;\n toolbar.activeGlobalDrawersIds = props.activeGlobalDrawersIds;\n toolbar.onActiveGlobalDrawersChange = props.onActiveGlobalDrawersChange;\n }\n if (props.navigation && !checkAlreadyExists(!!toolbar.hasNavigation, 'navigation')) {\n toolbar.hasNavigation = true;\n toolbar.navigationOpen = props.navigationOpen;\n toolbar.navigationFocusRef = props.navigationFocusRef;\n toolbar.onNavigationToggle = props.onNavigationToggle;\n }\n if (\n props.splitPanel &&\n props.splitPanelToggleProps?.displayed &&\n !checkAlreadyExists(!!toolbar.hasSplitPanel, 'splitPanel')\n ) {\n toolbar.hasSplitPanel = true;\n toolbar.splitPanelFocusRef = props.splitPanelFocusRef;\n toolbar.splitPanelToggleProps = props.splitPanelToggleProps;\n toolbar.onSplitPanelToggle = props.onSplitPanelToggle;\n }\n if (props.breadcrumbs && !checkAlreadyExists(!!toolbar.hasBreadcrumbsPortal, 'hasBreadcrumbsPortal')) {\n toolbar.hasBreadcrumbsPortal = true;\n }\n if (props.expandedDrawerId && !checkAlreadyExists(!!toolbar.expandedDrawerId, 'expandedDrawerId')) {\n toolbar.expandedDrawerId = props.expandedDrawerId;\n toolbar.setExpandedDrawerId = props.setExpandedDrawerId;\n }\n }\n // do not render toolbar if no fields are defined, except ariaLabels, which are always there\n return Object.keys(toolbar).filter(key => key !== 'ariaLabels').length > 0 ? toolbar : null;\n}\n\nexport function useMultiAppLayout(\n props: SharedProps,\n isEnabled: boolean\n): { registered: boolean; toolbarProps: ToolbarProps | null } {\n const [registration, setRegistration] = useState<RegistrationState<SharedProps> | null>(null);\n const { forceDeduplicationType } = props;\n const isToolbar = useAppLayoutFlagEnabled();\n\n useLayoutEffect(() => {\n if (!isEnabled || forceDeduplicationType === 'suspended' || !isToolbar) {\n return;\n }\n if (forceDeduplicationType === 'off') {\n setRegistration({ type: 'primary', discoveredProps: [] });\n return;\n }\n const unregister = awsuiPluginsInternal.appLayoutWidget.register(forceDeduplicationType, props =>\n setRegistration(props as RegistrationState<SharedProps>)\n );\n return () => {\n unregister();\n setRegistration({ type: 'suspended' });\n };\n }, [forceDeduplicationType, isEnabled, isToolbar]);\n\n useLayoutEffect(() => {\n if (registration?.type === 'secondary') {\n registration.update(props);\n }\n });\n\n if (!isToolbar) {\n return {\n registered: true,\n // mergeProps is needed here because the toolbar's behavior depends on reconciliation logic\n // in this function. For example, navigation trigger visibility\n toolbarProps: mergeProps(props, []),\n };\n }\n\n return {\n registered: !!registration?.type,\n toolbarProps: registration?.type === 'primary' ? mergeProps(props, registration.discoveredProps) : null,\n };\n}\n"]}
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { BreadcrumbGroupProps } from '../../../../breadcrumb-group/interfaces';
3
- interface BreadcrumbsSlotProps {
4
- ownBreadcrumbs: React.ReactNode;
5
- discoveredBreadcrumbs: BreadcrumbGroupProps | null;
6
- }
7
- export declare function BreadcrumbsSlot({ ownBreadcrumbs, discoveredBreadcrumbs }: BreadcrumbsSlotProps): JSX.Element;
8
- export {};
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/app-layout/visual-refresh-toolbar/skeleton/breadcrumbs/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAK/E,UAAU,oBAAoB;IAC5B,cAAc,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,qBAAqB,EAAE,oBAAoB,GAAG,IAAI,CAAC;CACpD;AAED,wBAAgB,eAAe,CAAC,EAAE,cAAc,EAAE,qBAAqB,EAAE,EAAE,oBAAoB,eAe9F"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/app-layout/visual-refresh-toolbar/skeleton/breadcrumbs/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAE5F,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAExD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAOrC,MAAM,UAAU,eAAe,CAAC,EAAE,cAAc,EAAE,qBAAqB,EAAwB;IAC7F,OAAO,CACL,oBAAC,sBAAsB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;QAC3D,6BAAK,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC,IAAG,cAAc,CAAO;QAChE,qBAAqB,IAAI,CACxB,6BAAK,SAAS,EAAE,MAAM,CAAC,wBAAwB,CAAC;YAC9C,oBAAC,6BAA6B,oBACxB,qBAAqB,yCACU,IAAI,EACvC,kCAAkC,EAAE,IAAI,IACxC,CACE,CACP,CAC+B,CACnC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BreadcrumbGroupImplementation } from '../../../../breadcrumb-group/implementation';\nimport { BreadcrumbGroupProps } from '../../../../breadcrumb-group/interfaces';\nimport { BreadcrumbsSlotContext } from '../../contexts';\n\nimport styles from './styles.css.js';\n\ninterface BreadcrumbsSlotProps {\n ownBreadcrumbs: React.ReactNode;\n discoveredBreadcrumbs: BreadcrumbGroupProps | null;\n}\n\nexport function BreadcrumbsSlot({ ownBreadcrumbs, discoveredBreadcrumbs }: BreadcrumbsSlotProps) {\n return (\n <BreadcrumbsSlotContext.Provider value={{ isInToolbar: true }}>\n <div className={styles['breadcrumbs-own']}>{ownBreadcrumbs}</div>\n {discoveredBreadcrumbs && (\n <div className={styles['breadcrumbs-discovered']}>\n <BreadcrumbGroupImplementation\n {...discoveredBreadcrumbs}\n data-awsui-discovered-breadcrumbs={true}\n __injectAnalyticsComponentMetadata={true}\n />\n </div>\n )}\n </BreadcrumbsSlotContext.Provider>\n );\n}\n"]}
@@ -1,7 +0,0 @@
1
-
2
- import './styles.scoped.css';
3
- export default {
4
- "breadcrumbs-own": "awsui_breadcrumbs-own_ete58_yonx9_5",
5
- "breadcrumbs-discovered": "awsui_breadcrumbs-discovered_ete58_yonx9_5"
6
- };
7
-
@@ -1,7 +0,0 @@
1
- /*
2
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
- SPDX-License-Identifier: Apache-2.0
4
- */
5
- .awsui_breadcrumbs-own_ete58_yonx9_5:not(#\9):not(:empty) + .awsui_breadcrumbs-discovered_ete58_yonx9_5 {
6
- display: none;
7
- }
@@ -1,8 +0,0 @@
1
-
2
- // es-module interop with Babel and Typescript
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- module.exports.default = {
5
- "breadcrumbs-own": "awsui_breadcrumbs-own_ete58_yonx9_5",
6
- "breadcrumbs-discovered": "awsui_breadcrumbs-discovered_ete58_yonx9_5"
7
- };
8
-
@@ -1 +0,0 @@
1
- {"version":3,"file":"slot-skeletons.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/skeleton/slot-skeletons.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,yCAAyC,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,mCAAmC,EAAE,MAAM,YAAY,CAAC;AAIjE,eAAO,MAAM,eAAe,yGAS3B,CAAC;AAEF,eAAO,MAAM,qBAAqB,+GAEjC,CAAC"}
@@ -1,9 +0,0 @@
1
- // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
- // SPDX-License-Identifier: Apache-2.0
3
- import React from 'react';
4
- import { BreadcrumbsSlot } from './breadcrumbs';
5
- import { NotificationsSlot, ToolbarSlot } from './slot-wrappers';
6
- export const ToolbarSkeleton = React.forwardRef(({ appLayoutInternals }, ref) => (React.createElement(ToolbarSlot, { ref: ref },
7
- React.createElement(BreadcrumbsSlot, { ownBreadcrumbs: appLayoutInternals.breadcrumbs, discoveredBreadcrumbs: appLayoutInternals.discoveredBreadcrumbs }))));
8
- export const NotificationsSkeleton = React.forwardRef((props, ref) => React.createElement(NotificationsSlot, { ref: ref }));
9
- //# sourceMappingURL=slot-skeletons.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"slot-skeletons.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/skeleton/slot-skeletons.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEjE,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC,UAAU,CAC7C,CAAC,EAAE,kBAAkB,EAAuC,EAAE,GAAG,EAAE,EAAE,CAAC,CACpE,oBAAC,WAAW,IAAC,GAAG,EAAE,GAAG;IACnB,oBAAC,eAAe,IACd,cAAc,EAAE,kBAAkB,CAAC,WAAW,EAC9C,qBAAqB,EAAE,kBAAkB,CAAC,qBAAqB,GAC/D,CACU,CACf,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,CAAC,UAAU,CACnD,CAAC,KAAgD,EAAE,GAAG,EAAE,EAAE,CAAC,oBAAC,iBAAiB,IAAC,GAAG,EAAE,GAAG,GAAI,CAC3F,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { AppLayoutNotificationsImplementationProps } from '../notifications';\nimport { AppLayoutToolbarImplementationProps } from '../toolbar';\nimport { BreadcrumbsSlot } from './breadcrumbs';\nimport { NotificationsSlot, ToolbarSlot } from './slot-wrappers';\n\nexport const ToolbarSkeleton = React.forwardRef<HTMLElement, AppLayoutToolbarImplementationProps>(\n ({ appLayoutInternals }: AppLayoutToolbarImplementationProps, ref) => (\n <ToolbarSlot ref={ref}>\n <BreadcrumbsSlot\n ownBreadcrumbs={appLayoutInternals.breadcrumbs}\n discoveredBreadcrumbs={appLayoutInternals.discoveredBreadcrumbs}\n />\n </ToolbarSlot>\n )\n);\n\nexport const NotificationsSkeleton = React.forwardRef<HTMLElement, AppLayoutNotificationsImplementationProps>(\n (props: AppLayoutNotificationsImplementationProps, ref) => <NotificationsSlot ref={ref} />\n);\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"slot-wrappers.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/skeleton/slot-wrappers.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,UAAU,gBAAgB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,WAAW,sFAItB,CAAC;AAEH,UAAU,sBAAsB;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,iBAAiB,4FAM7B,CAAC"}
@@ -1,8 +0,0 @@
1
- // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
- // SPDX-License-Identifier: Apache-2.0
3
- import React from 'react';
4
- import clsx from 'clsx';
5
- import styles from './styles.css.js';
6
- export const ToolbarSlot = React.forwardRef(({ className, style, children }, ref) => (React.createElement("section", { ref: ref, className: clsx(styles['toolbar-container'], className), style: style }, children)));
7
- export const NotificationsSlot = React.forwardRef(({ className, style, children }, ref) => (React.createElement("div", { ref: ref, className: clsx(styles['notifications-container'], className), style: style }, children)));
8
- //# sourceMappingURL=slot-wrappers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"slot-wrappers.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/skeleton/slot-wrappers.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAQrC,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAAgC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClH,iCAAS,GAAG,EAAE,GAAqB,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,IACvG,QAAQ,CACD,CACX,CAAC,CAAC;AAQH,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC,UAAU,CAC/C,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACvC,6BAAK,GAAG,EAAE,GAAqB,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,yBAAyB,CAAC,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,IACzG,QAAQ,CACL,CACP,CACF,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport styles from './styles.css.js';\n\ninterface ToolbarSlotProps {\n className?: string;\n style?: React.CSSProperties;\n children?: React.ReactNode;\n}\n\nexport const ToolbarSlot = React.forwardRef<HTMLElement, ToolbarSlotProps>(({ className, style, children }, ref) => (\n <section ref={ref as React.Ref<any>} className={clsx(styles['toolbar-container'], className)} style={style}>\n {children}\n </section>\n));\n\ninterface NotificationsSlotProps {\n className?: string;\n style?: React.CSSProperties;\n children?: React.ReactNode;\n}\n\nexport const NotificationsSlot = React.forwardRef<HTMLElement, NotificationsSlotProps>(\n ({ className, style, children }, ref) => (\n <div ref={ref as React.Ref<any>} className={clsx(styles['notifications-container'], className)} style={style}>\n {children}\n </div>\n )\n);\n"]}