@cloudscape-design/components-themeable 3.0.805 → 3.0.806

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 (110) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/alert/styles.scss +5 -0
  3. package/lib/internal/scss/flashbar/collapsible.scss +2 -2
  4. package/lib/internal/scss/flashbar/styles.scss +5 -11
  5. package/lib/internal/scss/property-filter/styles.scss +28 -0
  6. package/lib/internal/scss/tutorial-panel/components/tutorial-detail-view/styles.scss +1 -0
  7. package/lib/internal/template/alert/internal.d.ts.map +1 -1
  8. package/lib/internal/template/alert/internal.js +3 -3
  9. package/lib/internal/template/alert/internal.js.map +1 -1
  10. package/lib/internal/template/alert/styles.css.js +28 -27
  11. package/lib/internal/template/alert/styles.scoped.css +47 -42
  12. package/lib/internal/template/alert/styles.selectors.js +28 -27
  13. package/lib/internal/template/app-layout/visual-refresh-toolbar/compute-layout.d.ts +1 -0
  14. package/lib/internal/template/app-layout/visual-refresh-toolbar/compute-layout.d.ts.map +1 -1
  15. package/lib/internal/template/app-layout/visual-refresh-toolbar/compute-layout.js +2 -2
  16. package/lib/internal/template/app-layout/visual-refresh-toolbar/compute-layout.js.map +1 -1
  17. package/lib/internal/template/app-layout/visual-refresh-toolbar/contexts.d.ts +7 -0
  18. package/lib/internal/template/app-layout/visual-refresh-toolbar/contexts.d.ts.map +1 -0
  19. package/lib/internal/template/app-layout/visual-refresh-toolbar/contexts.js +6 -0
  20. package/lib/internal/template/app-layout/visual-refresh-toolbar/contexts.js.map +1 -0
  21. package/lib/internal/template/app-layout/visual-refresh-toolbar/index.d.ts.map +1 -1
  22. package/lib/internal/template/app-layout/visual-refresh-toolbar/index.js +56 -20
  23. package/lib/internal/template/app-layout/visual-refresh-toolbar/index.js.map +1 -1
  24. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.d.ts.map +1 -1
  25. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.js +3 -2
  26. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
  27. package/lib/internal/template/button-dropdown/internal.js +3 -3
  28. package/lib/internal/template/button-dropdown/internal.js.map +1 -1
  29. package/lib/internal/template/flashbar/flash.d.ts.map +1 -1
  30. package/lib/internal/template/flashbar/flash.js +3 -3
  31. package/lib/internal/template/flashbar/flash.js.map +1 -1
  32. package/lib/internal/template/flashbar/styles.css.js +50 -50
  33. package/lib/internal/template/flashbar/styles.scoped.css +151 -164
  34. package/lib/internal/template/flashbar/styles.selectors.js +50 -50
  35. package/lib/internal/template/internal/environment.js +1 -1
  36. package/lib/internal/template/internal/environment.json +1 -1
  37. package/lib/internal/template/internal/plugins/api.d.ts +3 -0
  38. package/lib/internal/template/internal/plugins/api.d.ts.map +1 -1
  39. package/lib/internal/template/internal/plugins/api.js +3 -0
  40. package/lib/internal/template/internal/plugins/api.js.map +1 -1
  41. package/lib/internal/template/internal/plugins/controllers/alert-flash-content.d.ts +9 -0
  42. package/lib/internal/template/internal/plugins/controllers/alert-flash-content.d.ts.map +1 -1
  43. package/lib/internal/template/internal/plugins/controllers/alert-flash-content.js +9 -1
  44. package/lib/internal/template/internal/plugins/controllers/alert-flash-content.js.map +1 -1
  45. package/lib/internal/template/internal/plugins/controllers/shared-react-contexts.d.ts +10 -0
  46. package/lib/internal/template/internal/plugins/controllers/shared-react-contexts.d.ts.map +1 -0
  47. package/lib/internal/template/internal/plugins/controllers/shared-react-contexts.js +27 -0
  48. package/lib/internal/template/internal/plugins/controllers/shared-react-contexts.js.map +1 -0
  49. package/lib/internal/template/internal/plugins/helpers/use-discovered-content.d.ts +3 -2
  50. package/lib/internal/template/internal/plugins/helpers/use-discovered-content.d.ts.map +1 -1
  51. package/lib/internal/template/internal/plugins/helpers/use-discovered-content.js +9 -2
  52. package/lib/internal/template/internal/plugins/helpers/use-discovered-content.js.map +1 -1
  53. package/lib/internal/template/internal/plugins/helpers/use-global-breadcrumbs.d.ts.map +1 -1
  54. package/lib/internal/template/internal/plugins/helpers/use-global-breadcrumbs.js +11 -3
  55. package/lib/internal/template/internal/plugins/helpers/use-global-breadcrumbs.js.map +1 -1
  56. package/lib/internal/template/multiselect/embedded.d.ts.map +1 -1
  57. package/lib/internal/template/multiselect/embedded.js +2 -7
  58. package/lib/internal/template/multiselect/embedded.js.map +1 -1
  59. package/lib/internal/template/multiselect/use-multiselect.d.ts +1 -1
  60. package/lib/internal/template/multiselect/use-multiselect.d.ts.map +1 -1
  61. package/lib/internal/template/multiselect/use-multiselect.js.map +1 -1
  62. package/lib/internal/template/property-filter/i18n-utils.d.ts.map +1 -1
  63. package/lib/internal/template/property-filter/i18n-utils.js +6 -3
  64. package/lib/internal/template/property-filter/i18n-utils.js.map +1 -1
  65. package/lib/internal/template/property-filter/index.d.ts.map +1 -1
  66. package/lib/internal/template/property-filter/index.js +20 -2
  67. package/lib/internal/template/property-filter/index.js.map +1 -1
  68. package/lib/internal/template/property-filter/interfaces.d.ts +4 -2
  69. package/lib/internal/template/property-filter/interfaces.d.ts.map +1 -1
  70. package/lib/internal/template/property-filter/interfaces.js.map +1 -1
  71. package/lib/internal/template/property-filter/internal.d.ts.map +1 -1
  72. package/lib/internal/template/property-filter/internal.js +5 -3
  73. package/lib/internal/template/property-filter/internal.js.map +1 -1
  74. package/lib/internal/template/property-filter/property-editor.d.ts +13 -2
  75. package/lib/internal/template/property-filter/property-editor.d.ts.map +1 -1
  76. package/lib/internal/template/property-filter/property-editor.js +19 -1
  77. package/lib/internal/template/property-filter/property-editor.js.map +1 -1
  78. package/lib/internal/template/property-filter/styles.css.js +39 -35
  79. package/lib/internal/template/property-filter/styles.scoped.css +66 -37
  80. package/lib/internal/template/property-filter/styles.selectors.js +39 -35
  81. package/lib/internal/template/property-filter/token-editor-inputs.d.ts +3 -3
  82. package/lib/internal/template/property-filter/token-editor-inputs.d.ts.map +1 -1
  83. package/lib/internal/template/property-filter/token-editor-inputs.js +29 -4
  84. package/lib/internal/template/property-filter/token-editor-inputs.js.map +1 -1
  85. package/lib/internal/template/property-filter/token-editor.d.ts.map +1 -1
  86. package/lib/internal/template/property-filter/token-editor.js +9 -1
  87. package/lib/internal/template/property-filter/token-editor.js.map +1 -1
  88. package/lib/internal/template/property-filter/utils.d.ts.map +1 -1
  89. package/lib/internal/template/property-filter/utils.js +10 -3
  90. package/lib/internal/template/property-filter/utils.js.map +1 -1
  91. package/lib/internal/template/select/utils/use-select.d.ts.map +1 -1
  92. package/lib/internal/template/select/utils/use-select.js +14 -7
  93. package/lib/internal/template/select/utils/use-select.js.map +1 -1
  94. package/lib/internal/template/table/use-column-widths.d.ts.map +1 -1
  95. package/lib/internal/template/table/use-column-widths.js +7 -1
  96. package/lib/internal/template/table/use-column-widths.js.map +1 -1
  97. package/lib/internal/template/test-utils/tsconfig.tsbuildinfo +1 -1
  98. package/lib/internal/template/text-filter/index.d.ts.map +1 -1
  99. package/lib/internal/template/text-filter/index.js +3 -1
  100. package/lib/internal/template/text-filter/index.js.map +1 -1
  101. package/lib/internal/template/text-filter/interfaces.d.ts +2 -1
  102. package/lib/internal/template/text-filter/interfaces.d.ts.map +1 -1
  103. package/lib/internal/template/text-filter/interfaces.js.map +1 -1
  104. package/lib/internal/template/text-filter/internal.d.ts.map +1 -1
  105. package/lib/internal/template/text-filter/internal.js +2 -2
  106. package/lib/internal/template/text-filter/internal.js.map +1 -1
  107. package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/styles.css.js +20 -20
  108. package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/styles.scoped.css +22 -21
  109. package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/styles.selectors.js +20 -20
  110. package/package.json +1 -1
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "b69c9b27102544ac0bcffca849df80d3812c89c3"
2
+ "commit": "a457e66cf263c01eb5a7b9869b715f58f3802ee4"
3
3
  }
@@ -54,6 +54,11 @@
54
54
  .hidden {
55
55
  display: none;
56
56
  }
57
+ // visibly hidden, but focusable
58
+ .initial-hidden {
59
+ overflow: hidden;
60
+ block-size: 0;
61
+ }
57
62
 
58
63
  .header,
59
64
  .header-replacement {
@@ -90,8 +90,8 @@ the grid layout will be:
90
90
  );
91
91
  }
92
92
 
93
- > .item:not(:last-child) > .flash::before,
94
- > .item.flash::before {
93
+ > .item:not(:last-child) > .flash,
94
+ > .item.flash {
95
95
  box-shadow: awsui.$shadow-flash-collapsed;
96
96
  }
97
97
  }
@@ -38,18 +38,12 @@
38
38
  color: awsui.$color-text-notification-default;
39
39
  overflow-wrap: break-word;
40
40
  word-wrap: break-word;
41
+ box-shadow: awsui.$shadow-flash-sticky;
42
+ }
41
43
 
42
- &::before {
43
- @include styles.base-pseudo-element;
44
- border-start-start-radius: awsui.$border-radius-flashbar;
45
- border-start-end-radius: awsui.$border-radius-flashbar;
46
- border-end-start-radius: awsui.$border-radius-flashbar;
47
- border-end-end-radius: awsui.$border-radius-flashbar;
48
- box-shadow: awsui.$shadow-flash-sticky;
49
- }
50
- &-refresh::before {
51
- z-index: -1;
52
- }
44
+ .initial-hidden {
45
+ overflow: hidden;
46
+ block-size: 0;
53
47
  }
54
48
 
55
49
  .flash-list {
@@ -55,6 +55,18 @@ $operator-field-width: 120px;
55
55
  padding-inline: awsui.$space-s;
56
56
  }
57
57
 
58
+ &-header-enum {
59
+ display: flex;
60
+ gap: awsui.$space-xs;
61
+
62
+ @include styles.default-text-style;
63
+ font-weight: bold;
64
+ color: awsui.$color-text-dropdown-group-label;
65
+
66
+ padding-block: styles.$group-option-padding-with-border-placeholder-vertical;
67
+ padding-inline: calc(#{styles.$control-padding-horizontal} + #{awsui.$border-item-width});
68
+ }
69
+
58
70
  &-form {
59
71
  padding-block-start: awsui.$space-xxs;
60
72
  padding-block-end: awsui.$space-s;
@@ -75,6 +87,11 @@ $operator-field-width: 120px;
75
87
  }
76
88
  }
77
89
 
90
+ .property-editor-enum {
91
+ display: flex;
92
+ flex-direction: column;
93
+ }
94
+
78
95
  .token-editor {
79
96
  display: flex;
80
97
  flex-direction: column;
@@ -98,6 +115,17 @@ $operator-field-width: 120px;
98
115
  flex-grow: 2;
99
116
  }
100
117
 
118
+ &-multiselect-wrapper {
119
+ position: relative;
120
+ block-size: awsui.$size-vertical-input;
121
+ min-inline-size: 200px;
122
+
123
+ &-inner {
124
+ position: absolute;
125
+ inline-size: 100%;
126
+ }
127
+ }
128
+
101
129
  &-cancel {
102
130
  margin-inline-end: awsui.$space-xs;
103
131
  }
@@ -56,6 +56,7 @@
56
56
 
57
57
  &--status {
58
58
  line-height: inherit;
59
+ flex-shrink: 0;
59
60
  }
60
61
  }
61
62
 
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/alert/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAgBtC,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAQlF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAiB1C,QAAA,MAAM,aAAa;;qFAgJlB,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/alert/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAgBtC,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAQlF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAiB1C,QAAA,MAAM,aAAa;;qFAqJlB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -28,7 +28,7 @@ const typeToIcon = {
28
28
  info: 'status-info',
29
29
  };
30
30
  const useDiscoveredAction = createUseDiscoveredAction(awsuiPluginsInternal.alert.onActionRegistered);
31
- const useDiscoveredContent = createUseDiscoveredContent('alert', awsuiPluginsInternal.alertContent.onContentRegistered);
31
+ const useDiscoveredContent = createUseDiscoveredContent('alert', awsuiPluginsInternal.alertContent);
32
32
  const InternalAlert = React.forwardRef((_a, ref) => {
33
33
  var { type, statusIconAriaLabel, visible = true, dismissible, dismissAriaLabel, children, header, buttonText, action, onDismiss, onButtonClick, __internalRootRef = null } = _a, rest = __rest(_a, ["type", "statusIconAriaLabel", "visible", "dismissible", "dismissAriaLabel", "children", "header", "buttonText", "action", "onDismiss", "onButtonClick", "__internalRootRef"]);
34
34
  const baseProps = getBaseProps(rest);
@@ -38,7 +38,7 @@ const InternalAlert = React.forwardRef((_a, ref) => {
38
38
  const [breakpoint, breakpointRef] = useContainerBreakpoints(['xs']);
39
39
  const mergedRef = useMergeRefs(breakpointRef, __internalRootRef);
40
40
  const { discoveredActions, headerRef: headerRefAction, contentRef: contentRefAction } = useDiscoveredAction(type);
41
- const { headerReplacementType, contentReplacementType, headerRef: headerRefContent, contentRef: contentRefContent, replacementHeaderRef, replacementContentRef, } = useDiscoveredContent({ type, header, children });
41
+ const { initialHidden, headerReplacementType, contentReplacementType, headerRef: headerRefContent, contentRef: contentRefContent, replacementHeaderRef, replacementContentRef, } = useDiscoveredContent({ type, header, children });
42
42
  const headerRef = useMergeRefs(headerRefAction, headerRefContent);
43
43
  const contentRef = useMergeRefs(contentRefAction, contentRefContent);
44
44
  const isRefresh = useVisualRefresh();
@@ -51,7 +51,7 @@ const InternalAlert = React.forwardRef((_a, ref) => {
51
51
  const analyticsAttributes = {
52
52
  [DATA_ATTR_ANALYTICS_ALERT]: type,
53
53
  };
54
- return (React.createElement("div", Object.assign({}, baseProps, analyticsAttributes, { "aria-hidden": !visible, className: clsx(styles.root, { [styles.hidden]: !visible }, baseProps.className), ref: mergedRef }),
54
+ return (React.createElement("div", Object.assign({}, baseProps, analyticsAttributes, { "aria-hidden": !visible, className: clsx(styles.root, { [styles.hidden]: !visible, [styles['initial-hidden']]: initialHidden }, baseProps.className), ref: mergedRef }),
55
55
  React.createElement(LinkDefaultVariantContext.Provider, { value: { defaultVariant: 'primary' } },
56
56
  React.createElement(VisualContext, { contextName: "alert" },
57
57
  React.createElement("div", { className: clsx(styles.alert, styles[`type-${type}`], styles[`icon-size-${size}`], hasAction && styles['with-action'], dismissible && styles['with-dismiss'], styles[`breakpoint-${breakpoint}`]) },
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/alert/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,aAAa,MAAM,uCAAuC,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,kDAAkD,CAAC;AAC7F,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAE9D,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAEpG,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAInD,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AACpE,OAAO,MAAM,MAAM,iBAAiB,CAAC;A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S,EAAE,MAAM,CAAC,MAAM,EACxB,eAAe,EAAE;4BACf,UAAU,EAAE,MAAM,CAAC,aAAa,CAAC;4BACjC,YAAY,EAAE,MAAM,CAAC,eAAe,CAAC;yBACtC,EACD,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,iBAAiB,EACpC,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,aAAa,CAAC,GAC1D;oBACD,WAAW,IAAI,CACd,2CACE,SAAS,EAAE,MAAM,CAAC,OAAO,IACrB,6BAA6B,CAAC;wBAChC,MAAM,EAAE,SAAS;qBACiC,CAAC;wBAErD,oBAAC,cAAc,IACb,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,EACnC,OAAO,EAAC,MAAM,EACd,QAAQ,EAAC,OAAO,EAChB,UAAU,EAAC,MAAM,EACjB,SAAS,EAAE,IAAI,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,EACrD,OAAO,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,SAAS,CAAC,GAChD,CACE,CACP,CACG,CACQ,CACmB,CACjC,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { InternalButton } from '../button/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { IconProps } from '../icon/interfaces';\nimport InternalIcon from '../icon/internal';\nimport { DATA_ATTR_ANALYTICS_ALERT } from '../internal/analytics/selectors';\nimport { getBaseProps } from '../internal/base-component';\nimport VisualContext from '../internal/components/visual-context';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { useContainerBreakpoints } from '../internal/hooks/container-queries';\nimport useForwardFocus from '../internal/hooks/forward-focus';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { awsuiPluginsInternal } from '../internal/plugins/api';\nimport { createUseDiscoveredAction, createUseDiscoveredContent } from '../internal/plugins/helpers';\nimport { SomeRequired } from '../internal/types';\nimport { ActionsWrapper } from './actions-wrapper';\nimport { GeneratedAnalyticsMetadataAlertDismiss } from './analytics-metadata/interfaces';\nimport { AlertProps } from './interfaces';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\nconst typeToIcon: Record<AlertProps.Type, IconProps['name']> = {\n error: 'status-negative',\n warning: 'status-warning',\n success: 'status-positive',\n info: 'status-info',\n};\n\ntype InternalAlertProps = SomeRequired<AlertProps, 'type'> & InternalBaseComponentProps<HTMLDivElement>;\n\nconst useDiscoveredAction = createUseDiscoveredAction(awsuiPluginsInternal.alert.onActionRegistered);\nconst useDiscoveredContent = createUseDiscoveredContent('alert', awsuiPluginsInternal.alertContent.onContentRegistered);\n\nconst InternalAlert = React.forwardRef(\n (\n {\n type,\n statusIconAriaLabel,\n visible = true,\n dismissible,\n dismissAriaLabel,\n children,\n header,\n buttonText,\n action,\n onDismiss,\n onButtonClick,\n __internalRootRef = null,\n ...rest\n }: InternalAlertProps,\n ref: React.Ref<AlertProps.Ref>\n ) => {\n const baseProps = getBaseProps(rest);\n const i18n = useInternalI18n('alert');\n\n const focusRef = useRef<HTMLDivElement>(null);\n useForwardFocus(ref, focusRef);\n\n const [breakpoint, breakpointRef] = useContainerBreakpoints(['xs']);\n const mergedRef = useMergeRefs(breakpointRef, __internalRootRef);\n\n const { discoveredActions, headerRef: headerRefAction, contentRef: contentRefAction } = useDiscoveredAction(type);\n const {\n headerReplacementType,\n contentReplacementType,\n headerRef: headerRefContent,\n contentRef: contentRefContent,\n replacementHeaderRef,\n replacementContentRef,\n } = useDiscoveredContent({ type, header, children });\n\n const headerRef = useMergeRefs(headerRefAction, headerRefContent);\n const contentRef = useMergeRefs(contentRefAction, contentRefContent);\n\n const isRefresh = useVisualRefresh();\n const size = isRefresh\n ? 'normal'\n : headerReplacementType !== 'remove' && header && contentReplacementType !== 'remove' && children\n ? 'big'\n : 'normal';\n\n const hasAction = Boolean(action || buttonText || discoveredActions.length);\n\n const analyticsAttributes = {\n [DATA_ATTR_ANALYTICS_ALERT]: type,\n };\n\n return (\n <div\n {...baseProps}\n {...analyticsAttributes}\n aria-hidden={!visible}\n className={clsx(styles.root, { [styles.hidden]: !visible }, baseProps.className)}\n ref={mergedRef}\n >\n <LinkDefaultVariantContext.Provider value={{ defaultVariant: 'primary' }}>\n <VisualContext contextName=\"alert\">\n <div\n className={clsx(\n styles.alert,\n styles[`type-${type}`],\n styles[`icon-size-${size}`],\n hasAction && styles['with-action'],\n dismissible && styles['with-dismiss'],\n styles[`breakpoint-${breakpoint}`]\n )}\n >\n <div className={styles['alert-focus-wrapper']} tabIndex={-1} ref={focusRef}>\n <div className={clsx(styles.icon, styles.text)} role=\"img\" aria-label={statusIconAriaLabel}>\n <InternalIcon name={typeToIcon[type]} size={size} />\n </div>\n <div className={clsx(styles.message, styles.text)}>\n <div\n className={clsx(\n header && styles.header,\n headerReplacementType !== 'original' ? styles.hidden : analyticsSelectors.header\n )}\n ref={headerRef}\n >\n {header}\n </div>\n <div\n className={clsx(\n styles['header-replacement'],\n headerReplacementType !== 'replaced' ? styles.hidden : analyticsSelectors.header\n )}\n ref={replacementHeaderRef}\n ></div>\n <div\n className={clsx(styles.content, contentReplacementType !== 'original' && styles.hidden)}\n ref={contentRef}\n >\n {children}\n </div>\n <div\n className={clsx(\n styles['content-replacement'],\n contentReplacementType !== 'replaced' && styles.hidden\n )}\n ref={replacementContentRef}\n ></div>\n </div>\n </div>\n <ActionsWrapper\n className={styles.action}\n testUtilClasses={{\n actionSlot: styles['action-slot'],\n actionButton: styles['action-button'],\n }}\n action={action}\n discoveredActions={discoveredActions}\n buttonText={buttonText}\n onButtonClick={() => fireNonCancelableEvent(onButtonClick)}\n />\n {dismissible && (\n <div\n className={styles.dismiss}\n {...getAnalyticsMetadataAttribute({\n action: 'dismiss',\n } as Partial<GeneratedAnalyticsMetadataAlertDismiss>)}\n >\n <InternalButton\n className={styles['dismiss-button']}\n variant=\"icon\"\n iconName=\"close\"\n formAction=\"none\"\n ariaLabel={i18n('dismissAriaLabel', dismissAriaLabel)}\n onClick={() => fireNonCancelableEvent(onDismiss)}\n />\n </div>\n )}\n </div>\n </VisualContext>\n </LinkDefaultVariantContext.Provider>\n </div>\n );\n }\n);\n\nexport default InternalAlert;\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/alert/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,aAAa,MAAM,uCAAuC,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,kDAAkD,CAAC;AAC7F,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAE9D,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AACh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BAAoB,GACpB;4BACP,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,sBAAsB,KAAK,UAAU,IAAI,MAAM,CAAC,MAAM,CAAC,EACvF,GAAG,EAAE,UAAU,IAEd,QAAQ,CACL;4BACN,6BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,qBAAqB,CAAC,EAC7B,sBAAsB,KAAK,UAAU,IAAI,MAAM,CAAC,MAAM,CACvD,EACD,GAAG,EAAE,qBAAqB,GACrB,CACH,CACF;oBACN,oBAAC,cAAc,IACb,SAAS,EAAE,MAAM,CAAC,MAAM,EACxB,eAAe,EAAE;4BACf,UAAU,EAAE,MAAM,CAAC,aAAa,CAAC;4BACjC,YAAY,EAAE,MAAM,CAAC,eAAe,CAAC;yBACtC,EACD,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,iBAAiB,EACpC,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,aAAa,CAAC,GAC1D;oBACD,WAAW,IAAI,CACd,2CACE,SAAS,EAAE,MAAM,CAAC,OAAO,IACrB,6BAA6B,CAAC;wBAChC,MAAM,EAAE,SAAS;qBACiC,CAAC;wBAErD,oBAAC,cAAc,IACb,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,EACnC,OAAO,EAAC,MAAM,EACd,QAAQ,EAAC,OAAO,EAChB,UAAU,EAAC,MAAM,EACjB,SAAS,EAAE,IAAI,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,EACrD,OAAO,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,SAAS,CAAC,GAChD,CACE,CACP,CACG,CACQ,CACmB,CACjC,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { InternalButton } from '../button/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { IconProps } from '../icon/interfaces';\nimport InternalIcon from '../icon/internal';\nimport { DATA_ATTR_ANALYTICS_ALERT } from '../internal/analytics/selectors';\nimport { getBaseProps } from '../internal/base-component';\nimport VisualContext from '../internal/components/visual-context';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { useContainerBreakpoints } from '../internal/hooks/container-queries';\nimport useForwardFocus from '../internal/hooks/forward-focus';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { awsuiPluginsInternal } from '../internal/plugins/api';\nimport { createUseDiscoveredAction, createUseDiscoveredContent } from '../internal/plugins/helpers';\nimport { SomeRequired } from '../internal/types';\nimport { ActionsWrapper } from './actions-wrapper';\nimport { GeneratedAnalyticsMetadataAlertDismiss } from './analytics-metadata/interfaces';\nimport { AlertProps } from './interfaces';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\nconst typeToIcon: Record<AlertProps.Type, IconProps['name']> = {\n error: 'status-negative',\n warning: 'status-warning',\n success: 'status-positive',\n info: 'status-info',\n};\n\ntype InternalAlertProps = SomeRequired<AlertProps, 'type'> & InternalBaseComponentProps<HTMLDivElement>;\n\nconst useDiscoveredAction = createUseDiscoveredAction(awsuiPluginsInternal.alert.onActionRegistered);\nconst useDiscoveredContent = createUseDiscoveredContent('alert', awsuiPluginsInternal.alertContent);\n\nconst InternalAlert = React.forwardRef(\n (\n {\n type,\n statusIconAriaLabel,\n visible = true,\n dismissible,\n dismissAriaLabel,\n children,\n header,\n buttonText,\n action,\n onDismiss,\n onButtonClick,\n __internalRootRef = null,\n ...rest\n }: InternalAlertProps,\n ref: React.Ref<AlertProps.Ref>\n ) => {\n const baseProps = getBaseProps(rest);\n const i18n = useInternalI18n('alert');\n\n const focusRef = useRef<HTMLDivElement>(null);\n useForwardFocus(ref, focusRef);\n\n const [breakpoint, breakpointRef] = useContainerBreakpoints(['xs']);\n const mergedRef = useMergeRefs(breakpointRef, __internalRootRef);\n\n const { discoveredActions, headerRef: headerRefAction, contentRef: contentRefAction } = useDiscoveredAction(type);\n const {\n initialHidden,\n headerReplacementType,\n contentReplacementType,\n headerRef: headerRefContent,\n contentRef: contentRefContent,\n replacementHeaderRef,\n replacementContentRef,\n } = useDiscoveredContent({ type, header, children });\n\n const headerRef = useMergeRefs(headerRefAction, headerRefContent);\n const contentRef = useMergeRefs(contentRefAction, contentRefContent);\n\n const isRefresh = useVisualRefresh();\n const size = isRefresh\n ? 'normal'\n : headerReplacementType !== 'remove' && header && contentReplacementType !== 'remove' && children\n ? 'big'\n : 'normal';\n\n const hasAction = Boolean(action || buttonText || discoveredActions.length);\n\n const analyticsAttributes = {\n [DATA_ATTR_ANALYTICS_ALERT]: type,\n };\n\n return (\n <div\n {...baseProps}\n {...analyticsAttributes}\n aria-hidden={!visible}\n className={clsx(\n styles.root,\n { [styles.hidden]: !visible, [styles['initial-hidden']]: initialHidden },\n baseProps.className\n )}\n ref={mergedRef}\n >\n <LinkDefaultVariantContext.Provider value={{ defaultVariant: 'primary' }}>\n <VisualContext contextName=\"alert\">\n <div\n className={clsx(\n styles.alert,\n styles[`type-${type}`],\n styles[`icon-size-${size}`],\n hasAction && styles['with-action'],\n dismissible && styles['with-dismiss'],\n styles[`breakpoint-${breakpoint}`]\n )}\n >\n <div className={styles['alert-focus-wrapper']} tabIndex={-1} ref={focusRef}>\n <div className={clsx(styles.icon, styles.text)} role=\"img\" aria-label={statusIconAriaLabel}>\n <InternalIcon name={typeToIcon[type]} size={size} />\n </div>\n <div className={clsx(styles.message, styles.text)}>\n <div\n className={clsx(\n header && styles.header,\n headerReplacementType !== 'original' ? styles.hidden : analyticsSelectors.header\n )}\n ref={headerRef}\n >\n {header}\n </div>\n <div\n className={clsx(\n styles['header-replacement'],\n headerReplacementType !== 'replaced' ? styles.hidden : analyticsSelectors.header\n )}\n ref={replacementHeaderRef}\n ></div>\n <div\n className={clsx(styles.content, contentReplacementType !== 'original' && styles.hidden)}\n ref={contentRef}\n >\n {children}\n </div>\n <div\n className={clsx(\n styles['content-replacement'],\n contentReplacementType !== 'replaced' && styles.hidden\n )}\n ref={replacementContentRef}\n ></div>\n </div>\n </div>\n <ActionsWrapper\n className={styles.action}\n testUtilClasses={{\n actionSlot: styles['action-slot'],\n actionButton: styles['action-button'],\n }}\n action={action}\n discoveredActions={discoveredActions}\n buttonText={buttonText}\n onButtonClick={() => fireNonCancelableEvent(onButtonClick)}\n />\n {dismissible && (\n <div\n className={styles.dismiss}\n {...getAnalyticsMetadataAttribute({\n action: 'dismiss',\n } as Partial<GeneratedAnalyticsMetadataAlertDismiss>)}\n >\n <InternalButton\n className={styles['dismiss-button']}\n variant=\"icon\"\n iconName=\"close\"\n formAction=\"none\"\n ariaLabel={i18n('dismissAriaLabel', dismissAriaLabel)}\n onClick={() => fireNonCancelableEvent(onDismiss)}\n />\n </div>\n )}\n </div>\n </VisualContext>\n </LinkDefaultVariantContext.Provider>\n </div>\n );\n }\n);\n\nexport default InternalAlert;\n"]}
@@ -1,32 +1,33 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "alert": "awsui_alert_mx3cw_1chw7_189",
5
- "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_mx3cw_1chw7_1",
6
- "root": "awsui_root_mx3cw_1chw7_211",
7
- "hidden": "awsui_hidden_mx3cw_1chw7_249",
8
- "with-dismiss": "awsui_with-dismiss_mx3cw_1chw7_299",
9
- "with-action": "awsui_with-action_mx3cw_1chw7_299",
10
- "breakpoint-default": "awsui_breakpoint-default_mx3cw_1chw7_305",
11
- "header": "awsui_header_mx3cw_1chw7_316",
12
- "header-replacement": "awsui_header-replacement_mx3cw_1chw7_317",
13
- "action": "awsui_action_mx3cw_1chw7_321",
14
- "action-slot": "awsui_action-slot_mx3cw_1chw7_326",
15
- "action-button": "awsui_action-button_mx3cw_1chw7_327",
16
- "alert-focus-wrapper": "awsui_alert-focus-wrapper_mx3cw_1chw7_331",
17
- "text": "awsui_text_mx3cw_1chw7_360",
18
- "icon": "awsui_icon_mx3cw_1chw7_367",
19
- "message": "awsui_message_mx3cw_1chw7_370",
20
- "icon-size-medium": "awsui_icon-size-medium_mx3cw_1chw7_378",
21
- "icon-size-big": "awsui_icon-size-big_mx3cw_1chw7_381",
22
- "icon-size-normal": "awsui_icon-size-normal_mx3cw_1chw7_384",
23
- "content": "awsui_content_mx3cw_1chw7_388",
24
- "content-replacement": "awsui_content-replacement_mx3cw_1chw7_389",
25
- "dismiss": "awsui_dismiss_mx3cw_1chw7_393",
26
- "dismiss-button": "awsui_dismiss-button_mx3cw_1chw7_398",
27
- "type-error": "awsui_type-error_mx3cw_1chw7_402",
28
- "type-warning": "awsui_type-warning_mx3cw_1chw7_410",
29
- "type-success": "awsui_type-success_mx3cw_1chw7_418",
30
- "type-info": "awsui_type-info_mx3cw_1chw7_426"
4
+ "alert": "awsui_alert_mx3cw_zvebu_189",
5
+ "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_mx3cw_zvebu_1",
6
+ "root": "awsui_root_mx3cw_zvebu_211",
7
+ "hidden": "awsui_hidden_mx3cw_zvebu_249",
8
+ "with-dismiss": "awsui_with-dismiss_mx3cw_zvebu_299",
9
+ "with-action": "awsui_with-action_mx3cw_zvebu_299",
10
+ "breakpoint-default": "awsui_breakpoint-default_mx3cw_zvebu_305",
11
+ "initial-hidden": "awsui_initial-hidden_mx3cw_zvebu_316",
12
+ "header": "awsui_header_mx3cw_zvebu_321",
13
+ "header-replacement": "awsui_header-replacement_mx3cw_zvebu_322",
14
+ "action": "awsui_action_mx3cw_zvebu_326",
15
+ "action-slot": "awsui_action-slot_mx3cw_zvebu_331",
16
+ "action-button": "awsui_action-button_mx3cw_zvebu_332",
17
+ "alert-focus-wrapper": "awsui_alert-focus-wrapper_mx3cw_zvebu_336",
18
+ "text": "awsui_text_mx3cw_zvebu_365",
19
+ "icon": "awsui_icon_mx3cw_zvebu_372",
20
+ "message": "awsui_message_mx3cw_zvebu_375",
21
+ "icon-size-medium": "awsui_icon-size-medium_mx3cw_zvebu_383",
22
+ "icon-size-big": "awsui_icon-size-big_mx3cw_zvebu_386",
23
+ "icon-size-normal": "awsui_icon-size-normal_mx3cw_zvebu_389",
24
+ "content": "awsui_content_mx3cw_zvebu_393",
25
+ "content-replacement": "awsui_content-replacement_mx3cw_zvebu_394",
26
+ "dismiss": "awsui_dismiss_mx3cw_zvebu_398",
27
+ "dismiss-button": "awsui_dismiss-button_mx3cw_zvebu_403",
28
+ "type-error": "awsui_type-error_mx3cw_zvebu_407",
29
+ "type-warning": "awsui_type-warning_mx3cw_zvebu_415",
30
+ "type-success": "awsui_type-success_mx3cw_zvebu_423",
31
+ "type-info": "awsui_type-info_mx3cw_zvebu_431"
31
32
  };
32
33
 
@@ -186,10 +186,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
186
186
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
187
187
  SPDX-License-Identifier: Apache-2.0
188
188
  */
189
- .awsui_alert_mx3cw_1chw7_189:not(#\9) {
190
- animation: awsui_awsui-motion-fade-in_mx3cw_1chw7_1 var(--motion-duration-show-paced-kxd6k3, 180ms) var(--motion-easing-show-paced-2zwyek, ease-out);
189
+ .awsui_alert_mx3cw_zvebu_189:not(#\9) {
190
+ animation: awsui_awsui-motion-fade-in_mx3cw_zvebu_1 var(--motion-duration-show-paced-kxd6k3, 180ms) var(--motion-easing-show-paced-2zwyek, ease-out);
191
191
  }
192
- @keyframes awsui_awsui-motion-fade-in_mx3cw_1chw7_1 {
192
+ @keyframes awsui_awsui-motion-fade-in_mx3cw_zvebu_1 {
193
193
  from {
194
194
  opacity: 0.2;
195
195
  }
@@ -198,17 +198,17 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
198
198
  }
199
199
  }
200
200
  @media (prefers-reduced-motion: reduce) {
201
- .awsui_alert_mx3cw_1chw7_189:not(#\9) {
201
+ .awsui_alert_mx3cw_zvebu_189:not(#\9) {
202
202
  animation: none;
203
203
  transition: none;
204
204
  }
205
205
  }
206
- .awsui-motion-disabled .awsui_alert_mx3cw_1chw7_189:not(#\9), .awsui-mode-entering .awsui_alert_mx3cw_1chw7_189:not(#\9) {
206
+ .awsui-motion-disabled .awsui_alert_mx3cw_zvebu_189:not(#\9), .awsui-mode-entering .awsui_alert_mx3cw_zvebu_189:not(#\9) {
207
207
  animation: none;
208
208
  transition: none;
209
209
  }
210
210
 
211
- .awsui_root_mx3cw_1chw7_211:not(#\9) {
211
+ .awsui_root_mx3cw_zvebu_211:not(#\9) {
212
212
  border-collapse: separate;
213
213
  border-spacing: 0;
214
214
  box-sizing: border-box;
@@ -247,11 +247,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
247
247
  overflow: hidden;
248
248
  display: block;
249
249
  }
250
- .awsui_root_mx3cw_1chw7_211.awsui_hidden_mx3cw_1chw7_249:not(#\9) {
250
+ .awsui_root_mx3cw_zvebu_211.awsui_hidden_mx3cw_zvebu_249:not(#\9) {
251
251
  display: none;
252
252
  }
253
253
 
254
- .awsui_alert_mx3cw_1chw7_189:not(#\9) {
254
+ .awsui_alert_mx3cw_zvebu_189:not(#\9) {
255
255
  border-collapse: separate;
256
256
  border-spacing: 0;
257
257
  box-sizing: border-box;
@@ -298,53 +298,58 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
298
298
  padding-inline: var(--space-alert-horizontal-2ra2vu, 20px);
299
299
  background-color: var(--color-background-container-content-myy7cn, #ffffff);
300
300
  }
301
- .awsui_alert_mx3cw_1chw7_189.awsui_with-dismiss_mx3cw_1chw7_299:not(#\9), .awsui_alert_mx3cw_1chw7_189.awsui_with-action_mx3cw_1chw7_299:not(#\9) {
301
+ .awsui_alert_mx3cw_zvebu_189.awsui_with-dismiss_mx3cw_zvebu_299:not(#\9), .awsui_alert_mx3cw_zvebu_189.awsui_with-action_mx3cw_zvebu_299:not(#\9) {
302
302
  grid-template-columns: 1fr auto;
303
303
  }
304
- .awsui_alert_mx3cw_1chw7_189.awsui_with-action_mx3cw_1chw7_299.awsui_with-dismiss_mx3cw_1chw7_299:not(#\9) {
304
+ .awsui_alert_mx3cw_zvebu_189.awsui_with-action_mx3cw_zvebu_299.awsui_with-dismiss_mx3cw_zvebu_299:not(#\9) {
305
305
  grid-template-columns: 1fr auto auto;
306
306
  }
307
- .awsui_alert_mx3cw_1chw7_189.awsui_breakpoint-default_mx3cw_1chw7_305.awsui_with-action_mx3cw_1chw7_299:not(#\9) {
307
+ .awsui_alert_mx3cw_zvebu_189.awsui_breakpoint-default_mx3cw_zvebu_305.awsui_with-action_mx3cw_zvebu_299:not(#\9) {
308
308
  grid-template-columns: 1fr auto;
309
309
  }
310
- .awsui_alert_mx3cw_1chw7_189.awsui_breakpoint-default_mx3cw_1chw7_305:not(#\9):not(.awsui_with-dismiss_mx3cw_1chw7_299) {
310
+ .awsui_alert_mx3cw_zvebu_189.awsui_breakpoint-default_mx3cw_zvebu_305:not(#\9):not(.awsui_with-dismiss_mx3cw_zvebu_299) {
311
311
  grid-template-columns: 1fr;
312
312
  }
313
313
 
314
- .awsui_hidden_mx3cw_1chw7_249:not(#\9) {
314
+ .awsui_hidden_mx3cw_zvebu_249:not(#\9) {
315
315
  display: none;
316
316
  }
317
317
 
318
- .awsui_header_mx3cw_1chw7_316:not(#\9),
319
- .awsui_header-replacement_mx3cw_1chw7_317:not(#\9) {
318
+ .awsui_initial-hidden_mx3cw_zvebu_316:not(#\9) {
319
+ overflow: hidden;
320
+ block-size: 0;
321
+ }
322
+
323
+ .awsui_header_mx3cw_zvebu_321:not(#\9),
324
+ .awsui_header-replacement_mx3cw_zvebu_322:not(#\9) {
320
325
  font-weight: 700;
321
326
  }
322
327
 
323
- .awsui_action_mx3cw_1chw7_321:not(#\9) {
328
+ .awsui_action_mx3cw_zvebu_326:not(#\9) {
324
329
  white-space: nowrap;
325
330
  margin-inline-start: var(--space-alert-action-left-soet49, 20px);
326
331
  }
327
332
 
328
- .awsui_action-slot_mx3cw_1chw7_326:not(#\9),
329
- .awsui_action-button_mx3cw_1chw7_327:not(#\9) {
333
+ .awsui_action-slot_mx3cw_zvebu_331:not(#\9),
334
+ .awsui_action-button_mx3cw_zvebu_332:not(#\9) {
330
335
  /* used in test-utils */
331
336
  }
332
337
 
333
- .awsui_alert-focus-wrapper_mx3cw_1chw7_331:not(#\9) {
338
+ .awsui_alert-focus-wrapper_mx3cw_zvebu_336:not(#\9) {
334
339
  display: grid;
335
340
  grid-template-columns: min-content auto;
336
341
  }
337
- .awsui_alert-focus-wrapper_mx3cw_1chw7_331:not(#\9):focus {
342
+ .awsui_alert-focus-wrapper_mx3cw_zvebu_336:not(#\9):focus {
338
343
  outline: none;
339
344
  }
340
- body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_1chw7_331:not(#\9):focus {
345
+ body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_zvebu_336:not(#\9):focus {
341
346
  position: relative;
342
347
  }
343
- body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_1chw7_331:not(#\9):focus {
348
+ body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_zvebu_336:not(#\9):focus {
344
349
  outline: 2px dotted transparent;
345
350
  outline-offset: calc(var(--space-button-focus-outline-gutter-90p0io, 3px) - 1px);
346
351
  }
347
- body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_1chw7_331:not(#\9):focus::before {
352
+ body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_zvebu_336:not(#\9):focus::before {
348
353
  content: " ";
349
354
  display: block;
350
355
  position: absolute;
@@ -359,76 +364,76 @@ body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_1chw7_331:n
359
364
  box-shadow: 0 0 0 2px var(--color-border-item-focused-q68bgg, #0073bb);
360
365
  }
361
366
 
362
- .awsui_text_mx3cw_1chw7_360:not(#\9) {
367
+ .awsui_text_mx3cw_zvebu_365:not(#\9) {
363
368
  min-inline-size: 0;
364
369
  padding-block: var(--border-field-width-fjuzc5, 1px);
365
370
  padding-inline: 0;
366
371
  margin-block: var(--space-scaled-xxs-krq5fq, 4px);
367
372
  margin-inline: var(--space-xxs-y2432o, 4px);
368
373
  }
369
- .awsui_text_mx3cw_1chw7_360.awsui_icon_mx3cw_1chw7_367:not(#\9) {
374
+ .awsui_text_mx3cw_zvebu_365.awsui_icon_mx3cw_zvebu_372:not(#\9) {
370
375
  margin-inline-start: 0;
371
376
  }
372
- .awsui_text_mx3cw_1chw7_360.awsui_message_mx3cw_1chw7_370:not(#\9) {
377
+ .awsui_text_mx3cw_zvebu_365.awsui_message_mx3cw_zvebu_375:not(#\9) {
373
378
  margin-inline-end: var(--space-alert-message-right-6y4tnf, 0px);
374
379
  }
375
380
 
376
- .awsui_breakpoint-default_mx3cw_1chw7_305 > .awsui_action_mx3cw_1chw7_321:not(#\9) {
381
+ .awsui_breakpoint-default_mx3cw_zvebu_305 > .awsui_action_mx3cw_zvebu_326:not(#\9) {
377
382
  grid-row: 2;
378
383
  margin-block-end: var(--space-xxs-y2432o, 4px);
379
384
  }
380
- .awsui_breakpoint-default_mx3cw_1chw7_305.awsui_icon-size-medium_mx3cw_1chw7_378 > .awsui_action_mx3cw_1chw7_321:not(#\9) {
385
+ .awsui_breakpoint-default_mx3cw_zvebu_305.awsui_icon-size-medium_mx3cw_zvebu_383 > .awsui_action_mx3cw_zvebu_326:not(#\9) {
381
386
  margin-inline-start: calc(var(--size-icon-medium-r52788, 16px) + var(--space-xs-6dgkww, 8px));
382
387
  }
383
- .awsui_breakpoint-default_mx3cw_1chw7_305.awsui_icon-size-big_mx3cw_1chw7_381 > .awsui_action_mx3cw_1chw7_321:not(#\9) {
388
+ .awsui_breakpoint-default_mx3cw_zvebu_305.awsui_icon-size-big_mx3cw_zvebu_386 > .awsui_action_mx3cw_zvebu_326:not(#\9) {
384
389
  margin-inline-start: calc(var(--size-icon-big-fdyugp, 32px) + var(--space-xs-6dgkww, 8px));
385
390
  }
386
- .awsui_breakpoint-default_mx3cw_1chw7_305.awsui_icon-size-normal_mx3cw_1chw7_384 > .awsui_action_mx3cw_1chw7_321:not(#\9) {
391
+ .awsui_breakpoint-default_mx3cw_zvebu_305.awsui_icon-size-normal_mx3cw_zvebu_389 > .awsui_action_mx3cw_zvebu_326:not(#\9) {
387
392
  margin-inline-start: calc(var(--size-icon-normal-19036g, 16px) + var(--space-xs-6dgkww, 8px));
388
393
  }
389
394
 
390
- .awsui_content_mx3cw_1chw7_388:not(#\9),
391
- .awsui_content-replacement_mx3cw_1chw7_389:not(#\9) {
395
+ .awsui_content_mx3cw_zvebu_393:not(#\9),
396
+ .awsui_content-replacement_mx3cw_zvebu_394:not(#\9) {
392
397
  /* used in test-utils */
393
398
  }
394
399
 
395
- .awsui_dismiss_mx3cw_1chw7_393:not(#\9) {
400
+ .awsui_dismiss_mx3cw_zvebu_398:not(#\9) {
396
401
  margin-inline-end: calc(-1 * var(--space-xxs-y2432o, 4px));
397
402
  margin-inline-start: var(--space-s-vmutj3, 12px);
398
403
  }
399
404
 
400
- .awsui_dismiss-button_mx3cw_1chw7_398:not(#\9) {
405
+ .awsui_dismiss-button_mx3cw_zvebu_403:not(#\9) {
401
406
  /* used in test-utils */
402
407
  }
403
408
 
404
- .awsui_type-error_mx3cw_1chw7_402:not(#\9) {
409
+ .awsui_type-error_mx3cw_zvebu_407:not(#\9) {
405
410
  border-color: var(--color-border-status-error-5n723o, #d13212);
406
411
  background-color: var(--color-background-status-error-ljmwh5, #fdf3f1);
407
412
  }
408
- .awsui_type-error_mx3cw_1chw7_402 > .awsui_alert-focus-wrapper_mx3cw_1chw7_331 > .awsui_icon_mx3cw_1chw7_367:not(#\9) {
413
+ .awsui_type-error_mx3cw_zvebu_407 > .awsui_alert-focus-wrapper_mx3cw_zvebu_336 > .awsui_icon_mx3cw_zvebu_372:not(#\9) {
409
414
  color: var(--color-text-status-error-p5bdwa, #d13212);
410
415
  }
411
416
 
412
- .awsui_type-warning_mx3cw_1chw7_410:not(#\9) {
417
+ .awsui_type-warning_mx3cw_zvebu_415:not(#\9) {
413
418
  border-color: var(--color-border-status-warning-wkps52, #906806);
414
419
  background-color: var(--color-background-status-warning-bqz9of, #fffef0);
415
420
  }
416
- .awsui_type-warning_mx3cw_1chw7_410 > .awsui_alert-focus-wrapper_mx3cw_1chw7_331 > .awsui_icon_mx3cw_1chw7_367:not(#\9) {
421
+ .awsui_type-warning_mx3cw_zvebu_415 > .awsui_alert-focus-wrapper_mx3cw_zvebu_336 > .awsui_icon_mx3cw_zvebu_372:not(#\9) {
417
422
  color: var(--color-text-status-warning-3hbtsc, #906806);
418
423
  }
419
424
 
420
- .awsui_type-success_mx3cw_1chw7_418:not(#\9) {
425
+ .awsui_type-success_mx3cw_zvebu_423:not(#\9) {
421
426
  border-color: var(--color-border-status-success-acmcj0, #1d8102);
422
427
  background-color: var(--color-background-status-success-igaq7v, #f2f8f0);
423
428
  }
424
- .awsui_type-success_mx3cw_1chw7_418 > .awsui_alert-focus-wrapper_mx3cw_1chw7_331 > .awsui_icon_mx3cw_1chw7_367:not(#\9) {
429
+ .awsui_type-success_mx3cw_zvebu_423 > .awsui_alert-focus-wrapper_mx3cw_zvebu_336 > .awsui_icon_mx3cw_zvebu_372:not(#\9) {
425
430
  color: var(--color-text-status-success-sh9pg0, #1d8102);
426
431
  }
427
432
 
428
- .awsui_type-info_mx3cw_1chw7_426:not(#\9) {
433
+ .awsui_type-info_mx3cw_zvebu_431:not(#\9) {
429
434
  border-color: var(--color-border-status-info-7kw04i, #0073bb);
430
435
  background-color: var(--color-background-status-info-zgt1yi, #f1faff);
431
436
  }
432
- .awsui_type-info_mx3cw_1chw7_426 > .awsui_alert-focus-wrapper_mx3cw_1chw7_331 > .awsui_icon_mx3cw_1chw7_367:not(#\9) {
437
+ .awsui_type-info_mx3cw_zvebu_431 > .awsui_alert-focus-wrapper_mx3cw_zvebu_336 > .awsui_icon_mx3cw_zvebu_372:not(#\9) {
433
438
  color: var(--color-text-status-info-1ypqr6, #0073bb);
434
439
  }
@@ -2,32 +2,33 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "alert": "awsui_alert_mx3cw_1chw7_189",
6
- "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_mx3cw_1chw7_1",
7
- "root": "awsui_root_mx3cw_1chw7_211",
8
- "hidden": "awsui_hidden_mx3cw_1chw7_249",
9
- "with-dismiss": "awsui_with-dismiss_mx3cw_1chw7_299",
10
- "with-action": "awsui_with-action_mx3cw_1chw7_299",
11
- "breakpoint-default": "awsui_breakpoint-default_mx3cw_1chw7_305",
12
- "header": "awsui_header_mx3cw_1chw7_316",
13
- "header-replacement": "awsui_header-replacement_mx3cw_1chw7_317",
14
- "action": "awsui_action_mx3cw_1chw7_321",
15
- "action-slot": "awsui_action-slot_mx3cw_1chw7_326",
16
- "action-button": "awsui_action-button_mx3cw_1chw7_327",
17
- "alert-focus-wrapper": "awsui_alert-focus-wrapper_mx3cw_1chw7_331",
18
- "text": "awsui_text_mx3cw_1chw7_360",
19
- "icon": "awsui_icon_mx3cw_1chw7_367",
20
- "message": "awsui_message_mx3cw_1chw7_370",
21
- "icon-size-medium": "awsui_icon-size-medium_mx3cw_1chw7_378",
22
- "icon-size-big": "awsui_icon-size-big_mx3cw_1chw7_381",
23
- "icon-size-normal": "awsui_icon-size-normal_mx3cw_1chw7_384",
24
- "content": "awsui_content_mx3cw_1chw7_388",
25
- "content-replacement": "awsui_content-replacement_mx3cw_1chw7_389",
26
- "dismiss": "awsui_dismiss_mx3cw_1chw7_393",
27
- "dismiss-button": "awsui_dismiss-button_mx3cw_1chw7_398",
28
- "type-error": "awsui_type-error_mx3cw_1chw7_402",
29
- "type-warning": "awsui_type-warning_mx3cw_1chw7_410",
30
- "type-success": "awsui_type-success_mx3cw_1chw7_418",
31
- "type-info": "awsui_type-info_mx3cw_1chw7_426"
5
+ "alert": "awsui_alert_mx3cw_zvebu_189",
6
+ "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_mx3cw_zvebu_1",
7
+ "root": "awsui_root_mx3cw_zvebu_211",
8
+ "hidden": "awsui_hidden_mx3cw_zvebu_249",
9
+ "with-dismiss": "awsui_with-dismiss_mx3cw_zvebu_299",
10
+ "with-action": "awsui_with-action_mx3cw_zvebu_299",
11
+ "breakpoint-default": "awsui_breakpoint-default_mx3cw_zvebu_305",
12
+ "initial-hidden": "awsui_initial-hidden_mx3cw_zvebu_316",
13
+ "header": "awsui_header_mx3cw_zvebu_321",
14
+ "header-replacement": "awsui_header-replacement_mx3cw_zvebu_322",
15
+ "action": "awsui_action_mx3cw_zvebu_326",
16
+ "action-slot": "awsui_action-slot_mx3cw_zvebu_331",
17
+ "action-button": "awsui_action-button_mx3cw_zvebu_332",
18
+ "alert-focus-wrapper": "awsui_alert-focus-wrapper_mx3cw_zvebu_336",
19
+ "text": "awsui_text_mx3cw_zvebu_365",
20
+ "icon": "awsui_icon_mx3cw_zvebu_372",
21
+ "message": "awsui_message_mx3cw_zvebu_375",
22
+ "icon-size-medium": "awsui_icon-size-medium_mx3cw_zvebu_383",
23
+ "icon-size-big": "awsui_icon-size-big_mx3cw_zvebu_386",
24
+ "icon-size-normal": "awsui_icon-size-normal_mx3cw_zvebu_389",
25
+ "content": "awsui_content_mx3cw_zvebu_393",
26
+ "content-replacement": "awsui_content-replacement_mx3cw_zvebu_394",
27
+ "dismiss": "awsui_dismiss_mx3cw_zvebu_398",
28
+ "dismiss-button": "awsui_dismiss-button_mx3cw_zvebu_403",
29
+ "type-error": "awsui_type-error_mx3cw_zvebu_407",
30
+ "type-warning": "awsui_type-warning_mx3cw_zvebu_415",
31
+ "type-success": "awsui_type-success_mx3cw_zvebu_423",
32
+ "type-info": "awsui_type-info_mx3cw_zvebu_431"
32
33
  };
33
34
 
@@ -11,6 +11,7 @@ interface HorizontalLayoutInput {
11
11
  isMobile: boolean;
12
12
  activeGlobalDrawersSizes: Record<string, number>;
13
13
  }
14
+ export declare const CONTENT_PADDING: number;
14
15
  export declare function computeHorizontalLayout({ navigationOpen, navigationWidth, placement, minContentWidth, activeDrawerSize, splitPanelOpen, splitPanelPosition, splitPanelSize, isMobile, activeGlobalDrawersSizes, }: HorizontalLayoutInput): {
15
16
  splitPanelPosition: "bottom" | "side";
16
17
  splitPanelForcedPosition: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"compute-layout.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/compute-layout.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAG3D,UAAU,qBAAqB;IAC7B,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,0BAA0B,CAAC,WAAW,CAAC,CAAC;IACnD,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,OAAO,CAAC;IACxB,kBAAkB,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;IAClD,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClD;AAED,wBAAgB,uBAAuB,CAAC,EACtC,cAAc,EACd,eAAe,EACf,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,QAAQ,EACR,wBAAwB,GACzB,EAAE,qBAAqB;;;;;;;;;EAyCvB;AAED,UAAU,mBAAmB;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,qBAAqB,CAAC,EACpC,SAAS,EACT,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,mBAAmB,GACpB,EAAE,mBAAmB,GAAG,oBAAoB,CAe5C;AAED,wBAAgB,kBAAkB,CAChC,eAAe,EAAE,oBAAoB,EACrC,QAAQ,EAAE,OAAO,EACjB,SAAS,EAAE,0BAA0B,CAAC,WAAW,CAAC,UAGnD"}
1
+ {"version":3,"file":"compute-layout.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/compute-layout.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAG3D,UAAU,qBAAqB;IAC7B,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,0BAA0B,CAAC,WAAW,CAAC,CAAC;IACnD,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,OAAO,CAAC;IACxB,kBAAkB,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;IAClD,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClD;AAED,eAAO,MAAM,eAAe,QAAS,CAAC;AAEtC,wBAAgB,uBAAuB,CAAC,EACtC,cAAc,EACd,eAAe,EACf,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,QAAQ,EACR,wBAAwB,GACzB,EAAE,qBAAqB;;;;;;;;;EAwCvB;AAED,UAAU,mBAAmB;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,qBAAqB,CAAC,EACpC,SAAS,EACT,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,mBAAmB,GACpB,EAAE,mBAAmB,GAAG,oBAAoB,CAe5C;AAED,wBAAgB,kBAAkB,CAChC,eAAe,EAAE,oBAAoB,EACrC,QAAQ,EAAE,OAAO,EACjB,SAAS,EAAE,0BAA0B,CAAC,WAAW,CAAC,UAGnD"}
@@ -1,10 +1,10 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { checkSplitPanelForcedPosition } from '../split-panel/split-panel-utils';
4
+ export const CONTENT_PADDING = 2 * 24; // space-xl
4
5
  export function computeHorizontalLayout({ navigationOpen, navigationWidth, placement, minContentWidth, activeDrawerSize, splitPanelOpen, splitPanelPosition, splitPanelSize, isMobile, activeGlobalDrawersSizes, }) {
5
- const contentPadding = 2 * 24; // space-xl
6
6
  const activeNavigationWidth = navigationOpen ? navigationWidth : 0;
7
- let resizableSpaceAvailable = Math.max(0, placement.inlineSize - minContentWidth - contentPadding - activeNavigationWidth);
7
+ let resizableSpaceAvailable = Math.max(0, placement.inlineSize - minContentWidth - CONTENT_PADDING - activeNavigationWidth);
8
8
  const totalActiveGlobalDrawersSize = Object.values(activeGlobalDrawersSizes).reduce((acc, size) => acc + size, 0);
9
9
  const splitPanelMaxWidth = resizableSpaceAvailable - activeDrawerSize;
10
10
  const splitPanelForcedPosition = checkSplitPanelForcedPosition({ isMobile, splitPanelMaxWidth });
@@ -1 +1 @@
1
- {"version":3,"file":"compute-layout.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/compute-layout.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAGtC,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AAejF,MAAM,UAAU,uBAAuB,CAAC,EACtC,cAAc,EACd,eAAe,EACf,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,QAAQ,EACR,wBAAwB,GACF;IACtB,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,WAAW;IAC1C,MAAM,qBAAqB,GAAG,cAAc,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;IAEnE,IAAI,uBAAuB,GAAG,IAAI,CAAC,GAAG,CACpC,CAAC,EACD,SAAS,CAAC,UAAU,GAAG,eAAe,GAAG,cAAc,GAAG,qBAAqB,CAChF,CAAC;IACF,MAAM,4BAA4B,GAAG,MAAM,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC;IAElH,MAAM,kBAAkB,GAAG,uBAAuB,GAAG,gBAAgB,CAAC;IACtE,MAAM,wBAAwB,GAAG,6BAA6B,CAAC,EAAE,QAAQ,EAAE,kBAAkB,EAAE,CAAC,CAAC;IACjG,MAAM,0BAA0B,GAAG,wBAAwB,CAAC,CAAC,CAAC,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3B,IAAI,mBAAmB,EAAE;QACvB,MAAM,IAAI,mBAAmB,CAAC;KAC/B;IAED,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;AACrD,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,eAAqC,EACrC,QAAiB,EACjB,SAAkD;;IAElD,OAAO,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,MAAA,eAAe,CAAC,OAAO,mCAAI,SAAS,CAAC,eAAe,CAAC;AACnG,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { AppLayoutPropsWithDefaults } from '../interfaces';\nimport { checkSplitPanelForcedPosition } from '../split-panel/split-panel-utils';\n\ninterface HorizontalLayoutInput {\n navigationOpen: boolean;\n navigationWidth: number;\n placement: AppLayoutPropsWithDefaults['placement'];\n minContentWidth: number;\n activeDrawerSize: number;\n splitPanelOpen: boolean;\n splitPanelPosition: 'side' | 'bottom' | undefined;\n splitPanelSize: number;\n isMobile: boolean;\n activeGlobalDrawersSizes: Record<string, number>;\n}\n\nexport function computeHorizontalLayout({\n navigationOpen,\n navigationWidth,\n placement,\n minContentWidth,\n activeDrawerSize,\n splitPanelOpen,\n splitPanelPosition,\n splitPanelSize,\n isMobile,\n activeGlobalDrawersSizes,\n}: HorizontalLayoutInput) {\n const contentPadding = 2 * 24; // space-xl\n const activeNavigationWidth = navigationOpen ? navigationWidth : 0;\n\n let resizableSpaceAvailable = Math.max(\n 0,\n placement.inlineSize - minContentWidth - contentPadding - activeNavigationWidth\n );\n const totalActiveGlobalDrawersSize = Object.values(activeGlobalDrawersSizes).reduce((acc, size) => acc + size, 0);\n\n const splitPanelMaxWidth = resizableSpaceAvailable - activeDrawerSize;\n const splitPanelForcedPosition = checkSplitPanelForcedPosition({ isMobile, splitPanelMaxWidth });\n const resolvedSplitPanelPosition = splitPanelForcedPosition ? 'bottom' : splitPanelPosition ?? 'bottom';\n const sideSplitPanelSize = resolvedSplitPanelPosition === 'side' && splitPanelOpen ? splitPanelSize ?? 0 : 0;\n const maxSplitPanelSize = Math.max(resizableSpaceAvailable - totalActiveGlobalDrawersSize - activeDrawerSize, 0);\n resizableSpaceAvailable -= sideSplitPanelSize;\n const maxDrawerSize = resizableSpaceAvailable - totalActiveGlobalDrawersSize;\n const maxGlobalDrawersSizes: Record<string, number> = Object.keys(activeGlobalDrawersSizes).reduce(\n (acc, drawerId) => {\n return {\n ...acc,\n [drawerId]:\n resizableSpaceAvailable -\n activeDrawerSize -\n totalActiveGlobalDrawersSize +\n activeGlobalDrawersSizes[drawerId],\n };\n },\n {}\n );\n\n return {\n splitPanelPosition: resolvedSplitPanelPosition,\n splitPanelForcedPosition,\n sideSplitPanelSize,\n maxSplitPanelSize,\n maxDrawerSize,\n maxGlobalDrawersSizes,\n totalActiveGlobalDrawersSize,\n resizableSpaceAvailable,\n };\n}\n\ninterface VerticalLayoutInput {\n topOffset: number;\n hasVisibleToolbar: boolean;\n toolbarHeight: number;\n stickyNotifications: boolean;\n notificationsHeight: number;\n}\n\nexport interface VerticalLayoutOutput {\n toolbar: number;\n notifications: number;\n header: number;\n drawers: number;\n}\n\nexport function computeVerticalLayout({\n topOffset,\n hasVisibleToolbar,\n toolbarHeight,\n stickyNotifications,\n notificationsHeight,\n}: VerticalLayoutInput): VerticalLayoutOutput {\n const toolbar = topOffset;\n let notifications = topOffset;\n let drawers = topOffset;\n\n if (hasVisibleToolbar) {\n notifications += toolbarHeight;\n drawers += toolbarHeight;\n }\n let header = notifications;\n if (stickyNotifications) {\n header += notificationsHeight;\n }\n\n return { toolbar, notifications, header, drawers };\n}\n\nexport function getDrawerTopOffset(\n verticalOffsets: VerticalLayoutOutput,\n isMobile: boolean,\n placement: AppLayoutPropsWithDefaults['placement']\n) {\n return isMobile ? verticalOffsets.toolbar : verticalOffsets.drawers ?? placement.insetBlockStart;\n}\n"]}
1
+ {"version":3,"file":"compute-layout.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/compute-layout.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAGtC,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AAejF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,WAAW;AAElD,MAAM,UAAU,uBAAuB,CAAC,EACtC,cAAc,EACd,eAAe,EACf,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,QAAQ,EACR,wBAAwB,GACF;IACtB,MAAM,qBAAqB,GAAG,cAAc,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;IAEnE,IAAI,uBAAuB,GAAG,IAAI,CAAC,GAAG,CACpC,CAAC,EACD,SAAS,CAAC,UAAU,GAAG,eAAe,GAAG,eAAe,GAAG,qBAAqB,CACjF,CAAC;IACF,MAAM,4BAA4B,GAAG,MAAM,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC;IAElH,MAAM,kBAAkB,GAAG,uBAAuB,GAAG,gBAAgB,CAAC;IACtE,MAAM,wBAAwB,GAAG,6BAA6B,CAAC,EAAE,QAAQ,EAAE,kBAAkB,EAAE,CAAC,CAAC;IACjG,MAAM,0BAA0B,GAAG,wBAAwB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,kBAAkB,aAAlB,kBAAkB,cAAlB,kBAAkB,GAAI,QAAQ,CAAC;IACxG,MAAM,kBAAkB,GAAG,0BAA0B,KAAK,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7G,MAAM,i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C,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,MAAA,eAAe,CAAC,OAAO,mCAAI,SAAS,CAAC,eAAe,CAAC;AACnG,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { AppLayoutPropsWithDefaults } from '../interfaces';\nimport { checkSplitPanelForcedPosition } from '../split-panel/split-panel-utils';\n\ninterface HorizontalLayoutInput {\n navigationOpen: boolean;\n navigationWidth: number;\n placement: AppLayoutPropsWithDefaults['placement'];\n minContentWidth: number;\n activeDrawerSize: number;\n splitPanelOpen: boolean;\n splitPanelPosition: 'side' | 'bottom' | undefined;\n splitPanelSize: number;\n isMobile: boolean;\n activeGlobalDrawersSizes: Record<string, number>;\n}\n\nexport const CONTENT_PADDING = 2 * 24; // space-xl\n\nexport function computeHorizontalLayout({\n navigationOpen,\n navigationWidth,\n placement,\n minContentWidth,\n activeDrawerSize,\n splitPanelOpen,\n splitPanelPosition,\n splitPanelSize,\n isMobile,\n activeGlobalDrawersSizes,\n}: HorizontalLayoutInput) {\n const activeNavigationWidth = navigationOpen ? navigationWidth : 0;\n\n let resizableSpaceAvailable = Math.max(\n 0,\n placement.inlineSize - minContentWidth - CONTENT_PADDING - activeNavigationWidth\n );\n const totalActiveGlobalDrawersSize = Object.values(activeGlobalDrawersSizes).reduce((acc, size) => acc + size, 0);\n\n const splitPanelMaxWidth = resizableSpaceAvailable - activeDrawerSize;\n const splitPanelForcedPosition = checkSplitPanelForcedPosition({ isMobile, splitPanelMaxWidth });\n const resolvedSplitPanelPosition = splitPanelForcedPosition ? 'bottom' : splitPanelPosition ?? 'bottom';\n const sideSplitPanelSize = resolvedSplitPanelPosition === 'side' && splitPanelOpen ? splitPanelSize ?? 0 : 0;\n const maxSplitPanelSize = Math.max(resizableSpaceAvailable - totalActiveGlobalDrawersSize - activeDrawerSize, 0);\n resizableSpaceAvailable -= sideSplitPanelSize;\n const maxDrawerSize = resizableSpaceAvailable - totalActiveGlobalDrawersSize;\n const maxGlobalDrawersSizes: Record<string, number> = Object.keys(activeGlobalDrawersSizes).reduce(\n (acc, drawerId) => {\n return {\n ...acc,\n [drawerId]:\n resizableSpaceAvailable -\n activeDrawerSize -\n totalActiveGlobalDrawersSize +\n activeGlobalDrawersSizes[drawerId],\n };\n },\n {}\n );\n\n return {\n splitPanelPosition: resolvedSplitPanelPosition,\n splitPanelForcedPosition,\n sideSplitPanelSize,\n maxSplitPanelSize,\n maxDrawerSize,\n maxGlobalDrawersSizes,\n totalActiveGlobalDrawersSize,\n resizableSpaceAvailable,\n };\n}\n\ninterface VerticalLayoutInput {\n topOffset: number;\n hasVisibleToolbar: boolean;\n toolbarHeight: number;\n stickyNotifications: boolean;\n notificationsHeight: number;\n}\n\nexport interface VerticalLayoutOutput {\n toolbar: number;\n notifications: number;\n header: number;\n drawers: number;\n}\n\nexport function computeVerticalLayout({\n topOffset,\n hasVisibleToolbar,\n toolbarHeight,\n stickyNotifications,\n notificationsHeight,\n}: VerticalLayoutInput): VerticalLayoutOutput {\n const toolbar = topOffset;\n let notifications = topOffset;\n let drawers = topOffset;\n\n if (hasVisibleToolbar) {\n notifications += toolbarHeight;\n drawers += toolbarHeight;\n }\n let header = notifications;\n if (stickyNotifications) {\n header += notificationsHeight;\n }\n\n return { toolbar, notifications, header, drawers };\n}\n\nexport function getDrawerTopOffset(\n verticalOffsets: VerticalLayoutOutput,\n isMobile: boolean,\n placement: AppLayoutPropsWithDefaults['placement']\n) {\n return isMobile ? verticalOffsets.toolbar : verticalOffsets.drawers ?? placement.insetBlockStart;\n}\n"]}