@cloudscape-design/components-themeable 3.0.624 → 3.0.626

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 (87) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/annotation-context/annotation/arrow.scss +7 -0
  3. package/lib/internal/scss/button-dropdown/category-elements/styles.scss +5 -0
  4. package/lib/internal/scss/popover/arrow.scss +7 -0
  5. package/lib/internal/scss/popover/container.scss +10 -0
  6. package/lib/internal/template/alert/index.d.ts.map +1 -1
  7. package/lib/internal/template/alert/index.js +5 -1
  8. package/lib/internal/template/alert/index.js.map +1 -1
  9. package/lib/internal/template/annotation-context/annotation/styles.css.js +24 -24
  10. package/lib/internal/template/annotation-context/annotation/styles.scoped.css +33 -29
  11. package/lib/internal/template/annotation-context/annotation/styles.selectors.js +24 -24
  12. package/lib/internal/template/app-layout/index.d.ts.map +1 -1
  13. package/lib/internal/template/app-layout/index.js +16 -12
  14. package/lib/internal/template/app-layout/index.js.map +1 -1
  15. package/lib/internal/template/button-dropdown/category-elements/styles.css.js +14 -14
  16. package/lib/internal/template/button-dropdown/category-elements/styles.scoped.css +25 -22
  17. package/lib/internal/template/button-dropdown/category-elements/styles.selectors.js +14 -14
  18. package/lib/internal/template/container/index.d.ts.map +1 -1
  19. package/lib/internal/template/container/index.js +1 -1
  20. package/lib/internal/template/container/index.js.map +1 -1
  21. package/lib/internal/template/flashbar/flash.d.ts.map +1 -1
  22. package/lib/internal/template/flashbar/flash.js +8 -2
  23. package/lib/internal/template/flashbar/flash.js.map +1 -1
  24. package/lib/internal/template/form/index.js +2 -2
  25. package/lib/internal/template/form/index.js.map +1 -1
  26. package/lib/internal/template/internal/analytics/components/analytics-funnel.d.ts +4 -4
  27. package/lib/internal/template/internal/analytics/components/analytics-funnel.d.ts.map +1 -1
  28. package/lib/internal/template/internal/analytics/components/analytics-funnel.js +9 -9
  29. package/lib/internal/template/internal/analytics/components/analytics-funnel.js.map +1 -1
  30. package/lib/internal/template/internal/analytics/context/analytics-context.d.ts +2 -2
  31. package/lib/internal/template/internal/analytics/context/analytics-context.d.ts.map +1 -1
  32. package/lib/internal/template/internal/analytics/context/analytics-context.js.map +1 -1
  33. package/lib/internal/template/internal/analytics/hooks/use-funnel.d.ts +1 -1
  34. package/lib/internal/template/internal/analytics/hooks/use-funnel.js +3 -3
  35. package/lib/internal/template/internal/analytics/hooks/use-funnel.js.map +1 -1
  36. package/lib/internal/template/internal/analytics/interfaces.d.ts +13 -7
  37. package/lib/internal/template/internal/analytics/interfaces.d.ts.map +1 -1
  38. package/lib/internal/template/internal/analytics/interfaces.js.map +1 -1
  39. package/lib/internal/template/internal/components/chart-popover/index.d.ts +1 -1
  40. package/lib/internal/template/internal/components/chart-popover/index.d.ts.map +1 -1
  41. package/lib/internal/template/internal/components/chart-popover/index.js.map +1 -1
  42. package/lib/internal/template/internal/components/dropdown/dropdown-fit-handler.d.ts +12 -12
  43. package/lib/internal/template/internal/components/dropdown/dropdown-fit-handler.d.ts.map +1 -1
  44. package/lib/internal/template/internal/components/dropdown/dropdown-fit-handler.js +103 -83
  45. package/lib/internal/template/internal/components/dropdown/dropdown-fit-handler.js.map +1 -1
  46. package/lib/internal/template/internal/components/dropdown/index.d.ts.map +1 -1
  47. package/lib/internal/template/internal/components/dropdown/index.js +30 -29
  48. package/lib/internal/template/internal/components/dropdown/index.js.map +1 -1
  49. package/lib/internal/template/internal/components/tooltip/index.d.ts +1 -1
  50. package/lib/internal/template/internal/components/tooltip/index.d.ts.map +1 -1
  51. package/lib/internal/template/internal/components/tooltip/index.js.map +1 -1
  52. package/lib/internal/template/internal/direction.d.ts +14 -0
  53. package/lib/internal/template/internal/direction.d.ts.map +1 -1
  54. package/lib/internal/template/internal/direction.js +25 -0
  55. package/lib/internal/template/internal/direction.js.map +1 -1
  56. package/lib/internal/template/internal/environment.js +1 -1
  57. package/lib/internal/template/internal/environment.json +1 -1
  58. package/lib/internal/template/internal/generated/theming/index.cjs +14 -14
  59. package/lib/internal/template/internal/generated/theming/index.js +14 -14
  60. package/lib/internal/template/internal/hooks/use-performance-marks.js +2 -2
  61. package/lib/internal/template/internal/hooks/use-performance-marks.js.map +1 -1
  62. package/lib/internal/template/internal/utils/scrollable-containers.d.ts +5 -5
  63. package/lib/internal/template/internal/utils/scrollable-containers.d.ts.map +1 -1
  64. package/lib/internal/template/internal/utils/scrollable-containers.js +19 -19
  65. package/lib/internal/template/internal/utils/scrollable-containers.js.map +1 -1
  66. package/lib/internal/template/popover/container.d.ts +1 -1
  67. package/lib/internal/template/popover/container.d.ts.map +1 -1
  68. package/lib/internal/template/popover/container.js.map +1 -1
  69. package/lib/internal/template/popover/interfaces.d.ts +4 -4
  70. package/lib/internal/template/popover/interfaces.d.ts.map +1 -1
  71. package/lib/internal/template/popover/interfaces.js.map +1 -1
  72. package/lib/internal/template/popover/styles.css.js +50 -50
  73. package/lib/internal/template/popover/styles.scoped.css +76 -64
  74. package/lib/internal/template/popover/styles.selectors.js +50 -50
  75. package/lib/internal/template/popover/use-popover-position.d.ts +1 -1
  76. package/lib/internal/template/popover/use-popover-position.d.ts.map +1 -1
  77. package/lib/internal/template/popover/use-popover-position.js +32 -29
  78. package/lib/internal/template/popover/use-popover-position.js.map +1 -1
  79. package/lib/internal/template/popover/utils/positions.d.ts +2 -2
  80. package/lib/internal/template/popover/utils/positions.d.ts.map +1 -1
  81. package/lib/internal/template/popover/utils/positions.js +74 -74
  82. package/lib/internal/template/popover/utils/positions.js.map +1 -1
  83. package/lib/internal/template/wizard/index.js +1 -1
  84. package/lib/internal/template/wizard/index.js.map +1 -1
  85. package/lib/internal/template/wizard/wizard-form.js +1 -1
  86. package/lib/internal/template/wizard/wizard-form.js.map +1 -1
  87. package/package.json +1 -1
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "5250e7bcf024c19ad3baa90b91bbe1275295c4bd"
2
+ "commit": "171737fcd311f46b4887528dba9e9748f166e52d"
3
3
  }
@@ -56,6 +56,13 @@
56
56
  transform: rotate(45deg);
57
57
  transform-origin: 0 100%;
58
58
  }
59
+
60
+ @include styles.with-direction('rtl') {
61
+ &::after {
62
+ transform: rotate(-45deg);
63
+ transform-origin: 100% 100%;
64
+ }
65
+ }
59
66
  }
60
67
 
61
68
  &-outer {
@@ -107,7 +107,12 @@
107
107
 
108
108
  &-right {
109
109
  transform: rotate(-90deg);
110
+
111
+ @include styles.with-direction('rtl') {
112
+ transform: rotate(90deg);
113
+ }
110
114
  }
115
+
111
116
  @include styles.with-motion {
112
117
  transition: transform awsui.$motion-duration-rotate-180 awsui.$motion-easing-rotate-180;
113
118
  }
@@ -55,6 +55,13 @@
55
55
  transform: rotate(45deg);
56
56
  transform-origin: 0 100%;
57
57
  }
58
+
59
+ @include styles.with-direction('rtl') {
60
+ &::after {
61
+ transform: rotate(-45deg);
62
+ transform-origin: 100% 100%;
63
+ }
64
+ }
58
65
  }
59
66
 
60
67
  &-outer {
@@ -68,6 +68,11 @@
68
68
  &-position-right-bottom {
69
69
  transform: rotate(-90deg);
70
70
  transform-origin: 0 100%;
71
+
72
+ @include styles.with-direction('rtl') {
73
+ transform: rotate(90deg);
74
+ transform-origin: 100% 100%;
75
+ }
71
76
  }
72
77
 
73
78
  &-position-right-top {
@@ -84,6 +89,11 @@
84
89
  &-position-left-bottom {
85
90
  transform: rotate(90deg);
86
91
  transform-origin: 100% 100%;
92
+
93
+ @include styles.with-direction('rtl') {
94
+ transform: rotate(-90deg);
95
+ transform-origin: 0% 100%;
96
+ }
87
97
  }
88
98
 
89
99
  &-position-left-top {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/alert/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAO1C,OAAO,EAAE,UAAU,EAAE,CAAC;AAEtB,QAAA,MAAM,KAAK,mFAkDV,CAAC;AAGF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/alert/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAQ1C,OAAO,EAAE,UAAU,EAAE,CAAC;AAEtB,QAAA,MAAM,KAAK,mFAyDV,CAAC;AAGF,eAAe,KAAK,CAAC"}
@@ -8,11 +8,13 @@ import useBaseComponent from '../internal/hooks/use-base-component';
8
8
  import { FunnelMetrics } from '../internal/analytics';
9
9
  import { useFunnel, useFunnelStep, useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';
10
10
  import { getNameFromSelector, getSubStepAllSelector } from '../internal/analytics/selectors';
11
+ import { getAnalyticsMetadataProps } from '../internal/base-component';
11
12
  const Alert = React.forwardRef((_a, ref) => {
12
13
  var { type = 'info', visible = true } = _a, props = __rest(_a, ["type", "visible"]);
14
+ const analyticsMetadata = getAnalyticsMetadataProps(props);
13
15
  const baseComponentProps = useBaseComponent('Alert', {
14
16
  props: { type, visible, dismissible: props.dismissible },
15
- });
17
+ }, analyticsMetadata);
16
18
  const { funnelInteractionId, submissionAttempt, funnelState, errorCount } = useFunnel();
17
19
  const { stepNumber, stepNameSelector } = useFunnelStep();
18
20
  const { subStepSelector, subStepNameSelector } = useFunnelSubStep();
@@ -35,6 +37,8 @@ const Alert = React.forwardRef((_a, ref) => {
35
37
  stepName,
36
38
  stepNameSelector,
37
39
  subStepAllSelector: getSubStepAllSelector(),
40
+ instanceIdentifier: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.instanceIdentifier,
41
+ errorContext: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.errorContext,
38
42
  });
39
43
  }
40
44
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/alert/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,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U,CAAC,OAAO,EAAE,CAAC;YAErB,uFAAuF;YACvF,MAAM,cAAc,GAAG,CAAC,MAAA,MAAA,MAAA,kBAAkB,CAAC,iBAAiB,CAAC,OAAO,0CAAE,qBAAqB,EAAE,0CAAE,KAAK,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAC;YAE/G,IAAI,cAAc,EAAE;gBAClB,IAAI,eAAe,EAAE;oBACnB,aAAa,CAAC,kBAAkB,CAAC;wBAC/B,mBAAmB;wBACnB,eAAe;wBACf,WAAW;wBACX,mBAAmB;wBACnB,UAAU;wBACV,QAAQ;wBACR,gBAAgB;wBAChB,kBAAkB,EAAE,qBAAqB,EAAE;qBAC5C,CAAC,CAAC;iBACJ;qBAAM;oBACL,aAAa,CAAC,WAAW,CAAC;wBACxB,mBAAmB;qBACpB,CAAC,CAAC;iBACJ;aACF;YAED,OAAO,GAAG,EAAE;gBACV,uDAAuD;gBACvD,UAAU,CAAC,OAAO,EAAE,CAAC;YACvB,CAAC,CAAC;SACH;QAED,uDAAuD;IACzD,CAAC,EAAE,CAAC,mBAAmB,EAAE,OAAO,EAAE,iBAAiB,EAAE,UAAU,CAAC,CAAC,CAAC;IAElE,OAAO,oBAAC,aAAa,kBAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,IAAM,KAAK,EAAM,kBAAkB,IAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AACtG,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AACjC,eAAe,KAAK,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect } from 'react';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { AlertProps } from './interfaces';\nimport InternalAlert from './internal';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { FunnelMetrics } from '../internal/analytics';\nimport { useFunnel, useFunnelStep, useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport { getNameFromSelector, getSubStepAllSelector } from '../internal/analytics/selectors';\n\nexport { AlertProps };\n\nconst Alert = React.forwardRef(\n ({ type = 'info', visible = true, ...props }: AlertProps, ref: React.Ref<AlertProps.Ref>) => {\n const baseComponentProps = useBaseComponent<HTMLDivElement>('Alert', {\n props: { type, visible, dismissible: props.dismissible },\n });\n\n const { funnelInteractionId, submissionAttempt, funnelState, errorCount } = useFunnel();\n const { stepNumber, stepNameSelector } = useFunnelStep();\n const { subStepSelector, subStepNameSelector } = useFunnelSubStep();\n\n useEffect(() => {\n if (funnelInteractionId && visible && type === 'error' && funnelState.current !== 'complete') {\n const stepName = getNameFromSelector(stepNameSelector);\n const subStepName = getNameFromSelector(subStepNameSelector);\n\n errorCount.current++;\n\n // We don't want to report an error if it is hidden, e.g. inside an Expandable Section.\n const errorIsVisible = (baseComponentProps.__internalRootRef.current?.getBoundingClientRect()?.width ?? 0) > 0;\n\n if (errorIsVisible) {\n if (subStepSelector) {\n FunnelMetrics.funnelSubStepError({\n funnelInteractionId,\n subStepSelector,\n subStepName,\n subStepNameSelector,\n stepNumber,\n stepName,\n stepNameSelector,\n subStepAllSelector: getSubStepAllSelector(),\n });\n } else {\n FunnelMetrics.funnelError({\n funnelInteractionId,\n });\n }\n }\n\n return () => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n errorCount.current--;\n };\n }\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [funnelInteractionId, visible, submissionAttempt, errorCount]);\n\n return <InternalAlert type={type} visible={visible} {...props} {...baseComponentProps} ref={ref} />;\n }\n);\n\napplyDisplayName(Alert, 'Alert');\nexport default Alert;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/alert/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MA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CAAC,CAAC;YAE7D,UAAU,CAAC,OAAO,EAAE,CAAC;YAErB,uFAAuF;YACvF,MAAM,cAAc,GAAG,CAAC,MAAA,MAAA,MAAA,kBAAkB,CAAC,iBAAiB,CAAC,OAAO,0CAAE,qBAAqB,EAAE,0CAAE,KAAK,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAC;YAE/G,IAAI,cAAc,EAAE;gBAClB,IAAI,eAAe,EAAE;oBACnB,aAAa,CAAC,kBAAkB,CAAC;wBAC/B,mBAAmB;wBACnB,eAAe;wBACf,WAAW;wBACX,mBAAmB;wBACnB,UAAU;wBACV,QAAQ;wBACR,gBAAgB;wBAChB,kBAAkB,EAAE,qBAAqB,EAAE;wBAC3C,kBAAkB,EAAE,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,kBAAkB;wBACzD,YAAY,EAAE,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,YAAY;qBAC9C,CAAC,CAAC;iBACJ;qBAAM;oBACL,aAAa,CAAC,WAAW,CAAC;wBACxB,mBAAmB;qBACpB,CAAC,CAAC;iBACJ;aACF;YAED,OAAO,GAAG,EAAE;gBACV,uDAAuD;gBACvD,UAAU,CAAC,OAAO,EAAE,CAAC;YACvB,CAAC,CAAC;SACH;QAED,uDAAuD;IACzD,CAAC,EAAE,CAAC,mBAAmB,EAAE,OAAO,EAAE,iBAAiB,EAAE,UAAU,CAAC,CAAC,CAAC;IAElE,OAAO,oBAAC,aAAa,kBAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,IAAM,KAAK,EAAM,kBAAkB,IAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AACtG,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AACjC,eAAe,KAAK,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect } from 'react';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { AlertProps } from './interfaces';\nimport InternalAlert from './internal';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { FunnelMetrics } from '../internal/analytics';\nimport { useFunnel, useFunnelStep, useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport { getNameFromSelector, getSubStepAllSelector } from '../internal/analytics/selectors';\nimport { BasePropsWithAnalyticsMetadata, getAnalyticsMetadataProps } from '../internal/base-component';\n\nexport { AlertProps };\n\nconst Alert = React.forwardRef(\n ({ type = 'info', visible = true, ...props }: AlertProps, ref: React.Ref<AlertProps.Ref>) => {\n const analyticsMetadata = getAnalyticsMetadataProps(props as BasePropsWithAnalyticsMetadata);\n const baseComponentProps = useBaseComponent<HTMLDivElement>(\n 'Alert',\n {\n props: { type, visible, dismissible: props.dismissible },\n },\n analyticsMetadata\n );\n\n const { funnelInteractionId, submissionAttempt, funnelState, errorCount } = useFunnel();\n const { stepNumber, stepNameSelector } = useFunnelStep();\n const { subStepSelector, subStepNameSelector } = useFunnelSubStep();\n\n useEffect(() => {\n if (funnelInteractionId && visible && type === 'error' && funnelState.current !== 'complete') {\n const stepName = getNameFromSelector(stepNameSelector);\n const subStepName = getNameFromSelector(subStepNameSelector);\n\n errorCount.current++;\n\n // We don't want to report an error if it is hidden, e.g. inside an Expandable Section.\n const errorIsVisible = (baseComponentProps.__internalRootRef.current?.getBoundingClientRect()?.width ?? 0) > 0;\n\n if (errorIsVisible) {\n if (subStepSelector) {\n FunnelMetrics.funnelSubStepError({\n funnelInteractionId,\n subStepSelector,\n subStepName,\n subStepNameSelector,\n stepNumber,\n stepName,\n stepNameSelector,\n subStepAllSelector: getSubStepAllSelector(),\n instanceIdentifier: analyticsMetadata?.instanceIdentifier,\n errorContext: analyticsMetadata?.errorContext,\n });\n } else {\n FunnelMetrics.funnelError({\n funnelInteractionId,\n });\n }\n }\n\n return () => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n errorCount.current--;\n };\n }\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [funnelInteractionId, visible, submissionAttempt, errorCount]);\n\n return <InternalAlert type={type} visible={visible} {...props} {...baseComponentProps} ref={ref} />;\n }\n);\n\napplyDisplayName(Alert, 'Alert');\nexport default Alert;\n"]}
@@ -1,29 +1,29 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "arrow": "awsui_arrow_1hpp3_1yqjl_99",
5
- "arrow-outer": "awsui_arrow-outer_1hpp3_1yqjl_103",
6
- "arrow-inner": "awsui_arrow-inner_1hpp3_1yqjl_103",
7
- "arrow-position-right-top": "awsui_arrow-position-right-top_1hpp3_1yqjl_140",
8
- "arrow-position-right-bottom": "awsui_arrow-position-right-bottom_1hpp3_1yqjl_140",
9
- "arrow-position-left-top": "awsui_arrow-position-left-top_1hpp3_1yqjl_143",
10
- "arrow-position-left-bottom": "awsui_arrow-position-left-bottom_1hpp3_1yqjl_143",
11
- "arrow-position-top-center": "awsui_arrow-position-top-center_1hpp3_1yqjl_146",
12
- "arrow-position-top-responsive": "awsui_arrow-position-top-responsive_1hpp3_1yqjl_146",
13
- "arrow-position-bottom-center": "awsui_arrow-position-bottom-center_1hpp3_1yqjl_149",
14
- "arrow-position-bottom-responsive": "awsui_arrow-position-bottom-responsive_1hpp3_1yqjl_149",
15
- "annotation": "awsui_annotation_1hpp3_1yqjl_157",
16
- "next-button": "awsui_next-button_1hpp3_1yqjl_158",
17
- "previous-button": "awsui_previous-button_1hpp3_1yqjl_159",
18
- "finish-button": "awsui_finish-button_1hpp3_1yqjl_160",
19
- "header": "awsui_header_1hpp3_1yqjl_161",
20
- "step-counter-content": "awsui_step-counter-content_1hpp3_1yqjl_162",
21
- "content": "awsui_content_1hpp3_1yqjl_163",
22
- "description": "awsui_description_1hpp3_1yqjl_167",
23
- "actionBar": "awsui_actionBar_1hpp3_1yqjl_172",
24
- "stepCounter": "awsui_stepCounter_1hpp3_1yqjl_179",
25
- "divider": "awsui_divider_1hpp3_1yqjl_183",
26
- "hotspot": "awsui_hotspot_1hpp3_1yqjl_187",
27
- "icon": "awsui_icon_1hpp3_1yqjl_254"
4
+ "arrow": "awsui_arrow_1hpp3_ekxhq_99",
5
+ "arrow-outer": "awsui_arrow-outer_1hpp3_ekxhq_103",
6
+ "arrow-inner": "awsui_arrow-inner_1hpp3_ekxhq_103",
7
+ "arrow-position-right-top": "awsui_arrow-position-right-top_1hpp3_ekxhq_144",
8
+ "arrow-position-right-bottom": "awsui_arrow-position-right-bottom_1hpp3_ekxhq_144",
9
+ "arrow-position-left-top": "awsui_arrow-position-left-top_1hpp3_ekxhq_147",
10
+ "arrow-position-left-bottom": "awsui_arrow-position-left-bottom_1hpp3_ekxhq_147",
11
+ "arrow-position-top-center": "awsui_arrow-position-top-center_1hpp3_ekxhq_150",
12
+ "arrow-position-top-responsive": "awsui_arrow-position-top-responsive_1hpp3_ekxhq_150",
13
+ "arrow-position-bottom-center": "awsui_arrow-position-bottom-center_1hpp3_ekxhq_153",
14
+ "arrow-position-bottom-responsive": "awsui_arrow-position-bottom-responsive_1hpp3_ekxhq_153",
15
+ "annotation": "awsui_annotation_1hpp3_ekxhq_161",
16
+ "next-button": "awsui_next-button_1hpp3_ekxhq_162",
17
+ "previous-button": "awsui_previous-button_1hpp3_ekxhq_163",
18
+ "finish-button": "awsui_finish-button_1hpp3_ekxhq_164",
19
+ "header": "awsui_header_1hpp3_ekxhq_165",
20
+ "step-counter-content": "awsui_step-counter-content_1hpp3_ekxhq_166",
21
+ "content": "awsui_content_1hpp3_ekxhq_167",
22
+ "description": "awsui_description_1hpp3_ekxhq_171",
23
+ "actionBar": "awsui_actionBar_1hpp3_ekxhq_176",
24
+ "stepCounter": "awsui_stepCounter_1hpp3_ekxhq_183",
25
+ "divider": "awsui_divider_1hpp3_ekxhq_187",
26
+ "hotspot": "awsui_hotspot_1hpp3_ekxhq_191",
27
+ "icon": "awsui_icon_1hpp3_ekxhq_258"
28
28
  };
29
29
 
@@ -96,11 +96,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
96
96
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
97
97
  SPDX-License-Identifier: Apache-2.0
98
98
  */
99
- .awsui_arrow_1hpp3_1yqjl_99:not(#\9) {
99
+ .awsui_arrow_1hpp3_ekxhq_99:not(#\9) {
100
100
  inline-size: 20px;
101
101
  block-size: 10px;
102
102
  }
103
- .awsui_arrow-outer_1hpp3_1yqjl_103:not(#\9), .awsui_arrow-inner_1hpp3_1yqjl_103:not(#\9) {
103
+ .awsui_arrow-outer_1hpp3_ekxhq_103:not(#\9), .awsui_arrow-inner_1hpp3_ekxhq_103:not(#\9) {
104
104
  position: absolute;
105
105
  overflow: hidden;
106
106
  inline-size: 20px;
@@ -108,7 +108,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
108
108
  inset-block-start: 0;
109
109
  inset-inline-start: 0;
110
110
  }
111
- .awsui_arrow-outer_1hpp3_1yqjl_103:not(#\9)::after, .awsui_arrow-inner_1hpp3_1yqjl_103:not(#\9)::after {
111
+ .awsui_arrow-outer_1hpp3_ekxhq_103:not(#\9)::after, .awsui_arrow-inner_1hpp3_ekxhq_103:not(#\9)::after {
112
112
  content: "";
113
113
  box-sizing: border-box;
114
114
  display: inline-block;
@@ -124,29 +124,33 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
124
124
  transform: rotate(45deg);
125
125
  transform-origin: 0 100%;
126
126
  }
127
- .awsui_arrow-outer_1hpp3_1yqjl_103:not(#\9)::after {
127
+ .awsui_arrow-outer_1hpp3_ekxhq_103:not(#\9):dir(rtl)::after, .awsui_arrow-inner_1hpp3_ekxhq_103:not(#\9):dir(rtl)::after {
128
+ transform: rotate(-45deg);
129
+ transform-origin: 100% 100%;
130
+ }
131
+ .awsui_arrow-outer_1hpp3_ekxhq_103:not(#\9)::after {
128
132
  background-color: var(--color-border-status-info-q9np44, #0073bb);
129
133
  }
130
- .awsui_arrow-inner_1hpp3_1yqjl_103:not(#\9) {
134
+ .awsui_arrow-inner_1hpp3_ekxhq_103:not(#\9) {
131
135
  inset-block-start: 2px;
132
136
  }
133
- .awsui_arrow-inner_1hpp3_1yqjl_103:not(#\9)::after {
137
+ .awsui_arrow-inner_1hpp3_ekxhq_103:not(#\9)::after {
134
138
  border-start-start-radius: 1px;
135
139
  border-start-end-radius: 0;
136
140
  border-end-start-radius: 0;
137
141
  border-end-end-radius: 0;
138
142
  background-color: var(--color-background-status-info-pgxhez, #f1faff);
139
143
  }
140
- .awsui_arrow-position-right-top_1hpp3_1yqjl_140 > .awsui_arrow-outer_1hpp3_1yqjl_103:not(#\9)::after, .awsui_arrow-position-right-bottom_1hpp3_1yqjl_140 > .awsui_arrow-outer_1hpp3_1yqjl_103:not(#\9)::after {
144
+ .awsui_arrow-position-right-top_1hpp3_ekxhq_144 > .awsui_arrow-outer_1hpp3_ekxhq_103:not(#\9)::after, .awsui_arrow-position-right-bottom_1hpp3_ekxhq_144 > .awsui_arrow-outer_1hpp3_ekxhq_103:not(#\9)::after {
141
145
  box-shadow: -0.71px 0.71px 4px -2px var(--color-shadow-default-9hs6xx, rgba(0, 28, 36, 0.5));
142
146
  }
143
- .awsui_arrow-position-left-top_1hpp3_1yqjl_143 > .awsui_arrow-outer_1hpp3_1yqjl_103:not(#\9)::after, .awsui_arrow-position-left-bottom_1hpp3_1yqjl_143 > .awsui_arrow-outer_1hpp3_1yqjl_103:not(#\9)::after {
147
+ .awsui_arrow-position-left-top_1hpp3_ekxhq_147 > .awsui_arrow-outer_1hpp3_ekxhq_103:not(#\9)::after, .awsui_arrow-position-left-bottom_1hpp3_ekxhq_147 > .awsui_arrow-outer_1hpp3_ekxhq_103:not(#\9)::after {
144
148
  box-shadow: 0.71px -0.71px 4px -2px var(--color-shadow-default-9hs6xx, rgba(0, 28, 36, 0.5));
145
149
  }
146
- .awsui_arrow-position-top-center_1hpp3_1yqjl_146 > .awsui_arrow-outer_1hpp3_1yqjl_103:not(#\9)::after, .awsui_arrow-position-top-responsive_1hpp3_1yqjl_146 > .awsui_arrow-outer_1hpp3_1yqjl_103:not(#\9)::after {
150
+ .awsui_arrow-position-top-center_1hpp3_ekxhq_150 > .awsui_arrow-outer_1hpp3_ekxhq_103:not(#\9)::after, .awsui_arrow-position-top-responsive_1hpp3_ekxhq_150 > .awsui_arrow-outer_1hpp3_ekxhq_103:not(#\9)::after {
147
151
  box-shadow: -0.71px -0.71px 4px -2px var(--color-shadow-default-9hs6xx, rgba(0, 28, 36, 0.5));
148
152
  }
149
- .awsui_arrow-position-bottom-center_1hpp3_1yqjl_149 > .awsui_arrow-outer_1hpp3_1yqjl_103:not(#\9)::after, .awsui_arrow-position-bottom-responsive_1hpp3_1yqjl_149 > .awsui_arrow-outer_1hpp3_1yqjl_103:not(#\9)::after {
153
+ .awsui_arrow-position-bottom-center_1hpp3_ekxhq_153 > .awsui_arrow-outer_1hpp3_ekxhq_103:not(#\9)::after, .awsui_arrow-position-bottom-responsive_1hpp3_ekxhq_153 > .awsui_arrow-outer_1hpp3_ekxhq_103:not(#\9)::after {
150
154
  box-shadow: 0.71px 0.71px 4px -2px var(--color-shadow-default-9hs6xx, rgba(0, 28, 36, 0.5));
151
155
  }
152
156
 
@@ -154,37 +158,37 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
154
158
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
155
159
  SPDX-License-Identifier: Apache-2.0
156
160
  */
157
- .awsui_annotation_1hpp3_1yqjl_157:not(#\9),
158
- .awsui_next-button_1hpp3_1yqjl_158:not(#\9),
159
- .awsui_previous-button_1hpp3_1yqjl_159:not(#\9),
160
- .awsui_finish-button_1hpp3_1yqjl_160:not(#\9),
161
- .awsui_header_1hpp3_1yqjl_161:not(#\9),
162
- .awsui_step-counter-content_1hpp3_1yqjl_162:not(#\9),
163
- .awsui_content_1hpp3_1yqjl_163:not(#\9) {
161
+ .awsui_annotation_1hpp3_ekxhq_161:not(#\9),
162
+ .awsui_next-button_1hpp3_ekxhq_162:not(#\9),
163
+ .awsui_previous-button_1hpp3_ekxhq_163:not(#\9),
164
+ .awsui_finish-button_1hpp3_ekxhq_164:not(#\9),
165
+ .awsui_header_1hpp3_ekxhq_165:not(#\9),
166
+ .awsui_step-counter-content_1hpp3_ekxhq_166:not(#\9),
167
+ .awsui_content_1hpp3_ekxhq_167:not(#\9) {
164
168
  /* used in test-utils */
165
169
  }
166
170
 
167
- .awsui_description_1hpp3_1yqjl_167:not(#\9) {
171
+ .awsui_description_1hpp3_ekxhq_171:not(#\9) {
168
172
  overflow: hidden;
169
173
  margin-block-start: var(--space-xxs-9rrxti, 4px);
170
174
  }
171
175
 
172
- .awsui_actionBar_1hpp3_1yqjl_172:not(#\9) {
176
+ .awsui_actionBar_1hpp3_ekxhq_176:not(#\9) {
173
177
  display: flex;
174
178
  justify-content: space-between;
175
179
  align-items: center;
176
180
  position: relative;
177
181
  }
178
182
 
179
- .awsui_stepCounter_1hpp3_1yqjl_179:not(#\9) {
183
+ .awsui_stepCounter_1hpp3_ekxhq_183:not(#\9) {
180
184
  margin-inline-end: 20px;
181
185
  }
182
186
 
183
- .awsui_divider_1hpp3_1yqjl_183:not(#\9) {
187
+ .awsui_divider_1hpp3_ekxhq_187:not(#\9) {
184
188
  border-block-end: var(--border-divider-section-width-wl9k66, 1px) solid var(--color-border-divider-default-in8dkg, #eaeded);
185
189
  }
186
190
 
187
- .awsui_hotspot_1hpp3_1yqjl_187:not(#\9) {
191
+ .awsui_hotspot_1hpp3_ekxhq_191:not(#\9) {
188
192
  border-collapse: separate;
189
193
  border-spacing: 0;
190
194
  box-sizing: border-box;
@@ -228,17 +232,17 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
228
232
  inline-size: 16px;
229
233
  block-size: 16px;
230
234
  }
231
- .awsui_hotspot_1hpp3_1yqjl_187:not(#\9):focus {
235
+ .awsui_hotspot_1hpp3_ekxhq_191:not(#\9):focus {
232
236
  outline: none;
233
237
  }
234
- body[data-awsui-focus-visible=true] .awsui_hotspot_1hpp3_1yqjl_187:not(#\9):focus {
238
+ body[data-awsui-focus-visible=true] .awsui_hotspot_1hpp3_ekxhq_191:not(#\9):focus {
235
239
  position: relative;
236
240
  }
237
- body[data-awsui-focus-visible=true] .awsui_hotspot_1hpp3_1yqjl_187:not(#\9):focus {
241
+ body[data-awsui-focus-visible=true] .awsui_hotspot_1hpp3_ekxhq_191:not(#\9):focus {
238
242
  outline: 2px dotted transparent;
239
243
  outline-offset: calc(2px - 1px);
240
244
  }
241
- body[data-awsui-focus-visible=true] .awsui_hotspot_1hpp3_1yqjl_187:not(#\9):focus::before {
245
+ body[data-awsui-focus-visible=true] .awsui_hotspot_1hpp3_ekxhq_191:not(#\9):focus::before {
242
246
  content: " ";
243
247
  display: block;
244
248
  position: absolute;
@@ -252,13 +256,13 @@ body[data-awsui-focus-visible=true] .awsui_hotspot_1hpp3_1yqjl_187:not(#\9):focu
252
256
  border-end-end-radius: var(--border-radius-control-circular-focus-ring-mxepal, 50%);
253
257
  box-shadow: 0 0 0 2px var(--color-border-item-focused-v8nq2m, #0073bb);
254
258
  }
255
- .awsui_hotspot_1hpp3_1yqjl_187 > .awsui_icon_1hpp3_1yqjl_254:not(#\9) {
259
+ .awsui_hotspot_1hpp3_ekxhq_191 > .awsui_icon_1hpp3_ekxhq_258:not(#\9) {
256
260
  position: relative;
257
261
  stroke: var(--color-text-link-default-hop3gv, #0073bb);
258
262
  }
259
- .awsui_hotspot_1hpp3_1yqjl_187:not(#\9):hover > .awsui_icon_1hpp3_1yqjl_254 {
263
+ .awsui_hotspot_1hpp3_ekxhq_191:not(#\9):hover > .awsui_icon_1hpp3_ekxhq_258 {
260
264
  stroke: var(--color-text-link-hover-8s5z9d, #0a4a74);
261
265
  }
262
- .awsui_hotspot_1hpp3_1yqjl_187:not(#\9):active > .awsui_icon_1hpp3_1yqjl_254 {
266
+ .awsui_hotspot_1hpp3_ekxhq_191:not(#\9):active > .awsui_icon_1hpp3_ekxhq_258 {
263
267
  stroke: var(--color-text-link-default-hop3gv, #0073bb);
264
268
  }
@@ -2,29 +2,29 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "arrow": "awsui_arrow_1hpp3_1yqjl_99",
6
- "arrow-outer": "awsui_arrow-outer_1hpp3_1yqjl_103",
7
- "arrow-inner": "awsui_arrow-inner_1hpp3_1yqjl_103",
8
- "arrow-position-right-top": "awsui_arrow-position-right-top_1hpp3_1yqjl_140",
9
- "arrow-position-right-bottom": "awsui_arrow-position-right-bottom_1hpp3_1yqjl_140",
10
- "arrow-position-left-top": "awsui_arrow-position-left-top_1hpp3_1yqjl_143",
11
- "arrow-position-left-bottom": "awsui_arrow-position-left-bottom_1hpp3_1yqjl_143",
12
- "arrow-position-top-center": "awsui_arrow-position-top-center_1hpp3_1yqjl_146",
13
- "arrow-position-top-responsive": "awsui_arrow-position-top-responsive_1hpp3_1yqjl_146",
14
- "arrow-position-bottom-center": "awsui_arrow-position-bottom-center_1hpp3_1yqjl_149",
15
- "arrow-position-bottom-responsive": "awsui_arrow-position-bottom-responsive_1hpp3_1yqjl_149",
16
- "annotation": "awsui_annotation_1hpp3_1yqjl_157",
17
- "next-button": "awsui_next-button_1hpp3_1yqjl_158",
18
- "previous-button": "awsui_previous-button_1hpp3_1yqjl_159",
19
- "finish-button": "awsui_finish-button_1hpp3_1yqjl_160",
20
- "header": "awsui_header_1hpp3_1yqjl_161",
21
- "step-counter-content": "awsui_step-counter-content_1hpp3_1yqjl_162",
22
- "content": "awsui_content_1hpp3_1yqjl_163",
23
- "description": "awsui_description_1hpp3_1yqjl_167",
24
- "actionBar": "awsui_actionBar_1hpp3_1yqjl_172",
25
- "stepCounter": "awsui_stepCounter_1hpp3_1yqjl_179",
26
- "divider": "awsui_divider_1hpp3_1yqjl_183",
27
- "hotspot": "awsui_hotspot_1hpp3_1yqjl_187",
28
- "icon": "awsui_icon_1hpp3_1yqjl_254"
5
+ "arrow": "awsui_arrow_1hpp3_ekxhq_99",
6
+ "arrow-outer": "awsui_arrow-outer_1hpp3_ekxhq_103",
7
+ "arrow-inner": "awsui_arrow-inner_1hpp3_ekxhq_103",
8
+ "arrow-position-right-top": "awsui_arrow-position-right-top_1hpp3_ekxhq_144",
9
+ "arrow-position-right-bottom": "awsui_arrow-position-right-bottom_1hpp3_ekxhq_144",
10
+ "arrow-position-left-top": "awsui_arrow-position-left-top_1hpp3_ekxhq_147",
11
+ "arrow-position-left-bottom": "awsui_arrow-position-left-bottom_1hpp3_ekxhq_147",
12
+ "arrow-position-top-center": "awsui_arrow-position-top-center_1hpp3_ekxhq_150",
13
+ "arrow-position-top-responsive": "awsui_arrow-position-top-responsive_1hpp3_ekxhq_150",
14
+ "arrow-position-bottom-center": "awsui_arrow-position-bottom-center_1hpp3_ekxhq_153",
15
+ "arrow-position-bottom-responsive": "awsui_arrow-position-bottom-responsive_1hpp3_ekxhq_153",
16
+ "annotation": "awsui_annotation_1hpp3_ekxhq_161",
17
+ "next-button": "awsui_next-button_1hpp3_ekxhq_162",
18
+ "previous-button": "awsui_previous-button_1hpp3_ekxhq_163",
19
+ "finish-button": "awsui_finish-button_1hpp3_ekxhq_164",
20
+ "header": "awsui_header_1hpp3_ekxhq_165",
21
+ "step-counter-content": "awsui_step-counter-content_1hpp3_ekxhq_166",
22
+ "content": "awsui_content_1hpp3_ekxhq_167",
23
+ "description": "awsui_description_1hpp3_ekxhq_171",
24
+ "actionBar": "awsui_actionBar_1hpp3_ekxhq_176",
25
+ "stepCounter": "awsui_stepCounter_1hpp3_ekxhq_183",
26
+ "divider": "awsui_divider_1hpp3_ekxhq_187",
27
+ "hotspot": "awsui_hotspot_1hpp3_ekxhq_191",
28
+ "icon": "awsui_icon_1hpp3_ekxhq_258"
29
29
  };
30
30
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/app-layout/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAY9C,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B,QAAA,MAAM,SAAS,2FA+Fd,CAAC;AAGF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/app-layout/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAY9C,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B,QAAA,MAAM,SAAS,2FAmGd,CAAC;AAGF,eAAe,SAAS,CAAC"}
@@ -16,7 +16,7 @@ import { warnOnce } from '@cloudscape-design/component-toolkit/internal';
16
16
  import { useAppLayoutPlacement } from './utils/use-app-layout-placement';
17
17
  import { useMergeRefs } from '../internal/hooks/use-merge-refs';
18
18
  const AppLayout = React.forwardRef((_a, ref) => {
19
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
19
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
20
20
  var { contentType = 'default', headerSelector = '#b #h', footerSelector = '#b #f', navigationWidth = 280, toolsWidth = 290, maxContentWidth, minContentWidth, navigationOpen: controlledNavigationOpen, onNavigationChange: controlledOnNavigationChange } = _a, rest = __rest(_a, ["contentType", "headerSelector", "footerSelector", "navigationWidth", "toolsWidth", "maxContentWidth", "minContentWidth", "navigationOpen", "onNavigationChange"]);
21
21
  if (isDevelopment) {
22
22
  if (rest.toolsOpen && rest.toolsHide) {
@@ -37,23 +37,27 @@ const AppLayout = React.forwardRef((_a, ref) => {
37
37
  stickyNotifications: rest.stickyNotifications,
38
38
  disableContentHeaderOverlap: rest.disableContentHeaderOverlap,
39
39
  },
40
+ metadata: {
41
+ drawersCount: (_c = (_b = rest.drawers) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : null,
42
+ hasContentHeader: !!rest.contentHeader,
43
+ },
40
44
  });
41
45
  const isRefresh = useVisualRefresh();
42
46
  const isMobile = useMobile();
43
47
  const i18n = useInternalI18n('app-layout');
44
48
  const ariaLabels = {
45
- navigation: i18n('ariaLabels.navigation', (_b = rest.ariaLabels) === null || _b === void 0 ? void 0 : _b.navigation),
46
- navigationClose: i18n('ariaLabels.navigationClose', (_c = rest.ariaLabels) === null || _c === void 0 ? void 0 : _c.navigationClose),
47
- navigationToggle: i18n('ariaLabels.navigationToggle', (_d = rest.ariaLabels) === null || _d === void 0 ? void 0 : _d.navigationToggle),
48
- notifications: i18n('ariaLabels.notifications', (_e = rest.ariaLabels) === null || _e === void 0 ? void 0 : _e.notifications),
49
- tools: i18n('ariaLabels.tools', (_f = rest.ariaLabels) === null || _f === void 0 ? void 0 : _f.tools),
50
- toolsClose: i18n('ariaLabels.toolsClose', (_g = rest.ariaLabels) === null || _g === void 0 ? void 0 : _g.toolsClose),
51
- toolsToggle: i18n('ariaLabels.toolsToggle', (_h = rest.ariaLabels) === null || _h === void 0 ? void 0 : _h.toolsToggle),
52
- drawers: i18n('ariaLabels.drawers', (_j = rest.ariaLabels) === null || _j === void 0 ? void 0 : _j.drawers),
53
- drawersOverflow: i18n('ariaLabels.drawersOverflow', (_k = rest.ariaLabels) === null || _k === void 0 ? void 0 : _k.drawersOverflow),
54
- drawersOverflowWithBadge: i18n('ariaLabels.drawersOverflowWithBadge', (_l = rest.ariaLabels) === null || _l === void 0 ? void 0 : _l.drawersOverflowWithBadge),
49
+ navigation: i18n('ariaLabels.navigation', (_d = rest.ariaLabels) === null || _d === void 0 ? void 0 : _d.navigation),
50
+ navigationClose: i18n('ariaLabels.navigationClose', (_e = rest.ariaLabels) === null || _e === void 0 ? void 0 : _e.navigationClose),
51
+ navigationToggle: i18n('ariaLabels.navigationToggle', (_f = rest.ariaLabels) === null || _f === void 0 ? void 0 : _f.navigationToggle),
52
+ notifications: i18n('ariaLabels.notifications', (_g = rest.ariaLabels) === null || _g === void 0 ? void 0 : _g.notifications),
53
+ tools: i18n('ariaLabels.tools', (_h = rest.ariaLabels) === null || _h === void 0 ? void 0 : _h.tools),
54
+ toolsClose: i18n('ariaLabels.toolsClose', (_j = rest.ariaLabels) === null || _j === void 0 ? void 0 : _j.toolsClose),
55
+ toolsToggle: i18n('ariaLabels.toolsToggle', (_k = rest.ariaLabels) === null || _k === void 0 ? void 0 : _k.toolsToggle),
56
+ drawers: i18n('ariaLabels.drawers', (_l = rest.ariaLabels) === null || _l === void 0 ? void 0 : _l.drawers),
57
+ drawersOverflow: i18n('ariaLabels.drawersOverflow', (_m = rest.ariaLabels) === null || _m === void 0 ? void 0 : _m.drawersOverflow),
58
+ drawersOverflowWithBadge: i18n('ariaLabels.drawersOverflowWithBadge', (_o = rest.ariaLabels) === null || _o === void 0 ? void 0 : _o.drawersOverflowWithBadge),
55
59
  };
56
- const _m = applyDefaults(contentType, { maxContentWidth, minContentWidth }, isRefresh), { navigationOpen: defaultNavigationOpen } = _m, restDefaults = __rest(_m, ["navigationOpen"]);
60
+ const _p = applyDefaults(contentType, { maxContentWidth, minContentWidth }, isRefresh), { navigationOpen: defaultNavigationOpen } = _p, restDefaults = __rest(_p, ["navigationOpen"]);
57
61
  const [navigationOpen = false, setNavigationOpen] = useControllable(controlledNavigationOpen, controlledOnNavigationChange, isMobile ? false : defaultNavigationOpen, { componentName: 'AppLayout', controlledProp: 'navigationOpen', changeHandler: 'onNavigationChange' });
58
62
  const onNavigationChange = (event) => {
59
63
  setNavigationOpen(event.detail.open);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/app-layout/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EA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AE,WAAW,CAAC,CAAC;AACzC,eAAe,SAAS,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { useInternalI18n } from '../i18n/context';\nimport { getBaseProps } from '../internal/base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { AppLayoutProps } from './interfaces';\nimport { AppLayoutInternal } from './internal';\nimport { applyDefaults } from './defaults';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { useControllable } from '../internal/hooks/use-controllable';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport { NonCancelableCustomEvent } from '../internal/events';\nimport { isDevelopment } from '../internal/is-development';\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\nimport { useAppLayoutPlacement } from './utils/use-app-layout-placement';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\n\nexport { AppLayoutProps };\n\nconst AppLayout = React.forwardRef(\n (\n {\n contentType = 'default',\n headerSelector = '#b #h',\n footerSelector = '#b #f',\n navigationWidth = 280,\n toolsWidth = 290,\n maxContentWidth,\n minContentWidth,\n navigationOpen: controlledNavigationOpen,\n onNavigationChange: controlledOnNavigationChange,\n ...rest\n }: AppLayoutProps,\n ref: React.Ref<AppLayoutProps.Ref>\n ) => {\n if (isDevelopment) {\n if (rest.toolsOpen && rest.toolsHide) {\n warnOnce(\n 'AppLayout',\n `You have enabled both the \\`toolsOpen\\` prop and the \\`toolsHide\\` prop. This is not supported. Set \\`toolsOpen\\` to \\`false\\` when you set \\`toolsHide\\` to \\`true\\`.`\n );\n }\n }\n const { __internalRootRef } = useBaseComponent<HTMLDivElement>('AppLayout', {\n props: {\n contentType,\n disableContentPaddings: rest.disableContentPaddings,\n disableBodyScroll: rest.disableBodyScroll,\n navigationWidth,\n navigationHide: rest.navigationHide,\n toolsHide: rest.toolsHide,\n toolsWidth,\n maxContentWidth,\n minContentWidth,\n stickyNotifications: rest.stickyNotifications,\n disableContentHeaderOverlap: rest.disableContentHeaderOverlap,\n },\n });\n const isRefresh = useVisualRefresh();\n const isMobile = useMobile();\n\n const i18n = useInternalI18n('app-layout');\n const ariaLabels = {\n navigation: i18n('ariaLabels.navigation', rest.ariaLabels?.navigation),\n navigationClose: i18n('ariaLabels.navigationClose', rest.ariaLabels?.navigationClose),\n navigationToggle: i18n('ariaLabels.navigationToggle', rest.ariaLabels?.navigationToggle),\n notifications: i18n('ariaLabels.notifications', rest.ariaLabels?.notifications),\n tools: i18n('ariaLabels.tools', rest.ariaLabels?.tools),\n toolsClose: i18n('ariaLabels.toolsClose', rest.ariaLabels?.toolsClose),\n toolsToggle: i18n('ariaLabels.toolsToggle', rest.ariaLabels?.toolsToggle),\n drawers: i18n('ariaLabels.drawers', rest.ariaLabels?.drawers),\n drawersOverflow: i18n('ariaLabels.drawersOverflow', rest.ariaLabels?.drawersOverflow),\n drawersOverflowWithBadge: i18n('ariaLabels.drawersOverflowWithBadge', rest.ariaLabels?.drawersOverflowWithBadge),\n };\n const { navigationOpen: defaultNavigationOpen, ...restDefaults } = applyDefaults(\n contentType,\n { maxContentWidth, minContentWidth },\n isRefresh\n );\n\n const [navigationOpen = false, setNavigationOpen] = useControllable(\n controlledNavigationOpen,\n controlledOnNavigationChange,\n isMobile ? false : defaultNavigationOpen,\n { componentName: 'AppLayout', controlledProp: 'navigationOpen', changeHandler: 'onNavigationChange' }\n );\n const onNavigationChange = (event: NonCancelableCustomEvent<AppLayoutProps.ChangeDetail>) => {\n setNavigationOpen(event.detail.open);\n controlledOnNavigationChange?.(event);\n };\n\n const [rootRef, placement] = useAppLayoutPlacement(headerSelector, footerSelector);\n\n // This re-builds the props including the default values\n const props = {\n contentType,\n navigationWidth,\n toolsWidth,\n navigationOpen,\n onNavigationChange,\n ...restDefaults,\n ...rest,\n ariaLabels,\n placement,\n };\n\n const baseProps = getBaseProps(rest);\n\n return (\n <div ref={useMergeRefs(__internalRootRef, rootRef)} {...baseProps}>\n <AppLayoutInternal ref={ref} {...props} />\n </div>\n );\n }\n);\n\napplyDisplayName(AppLayout, 'AppLayout');\nexport default AppLayout;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/app-layout/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAExE,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAIhE,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAChC,CACE,EAWiB,EACjB,GAAkC,EAClC,EAAE;;QAbF,EACE,WAAW,GAAG,SAAS,EACvB,cAAc,GAAG,OAAO,EACxB,cAAc,GAAG,OAAO,EACxB,eAAe,GAAG,GAAG,EACrB,UAAU,GAAG,GAAG,EAChB,eAAe,EACf,eAAe,EACf,cAAc,EAAE,wBAAwB,EACxC,kBAAkB,EAAE,4BAA4B,OAEjC,EADZ,IAAI,cAVT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AqB,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IAEnF,wDAAwD;IACxD,MAAM,KAAK,+CACT,WAAW;QACX,eAAe;QACf,UAAU;QACV,cAAc;QACd,kBAAkB,IACf,YAAY,GACZ,IAAI,KACP,UAAU;QACV,SAAS,GACV,CAAC;IAEF,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IAErC,OAAO,CACL,2CAAK,GAAG,EAAE,YAAY,CAAC,iBAAiB,EAAE,OAAO,CAAC,IAAM,SAAS;QAC/D,oBAAC,iBAAiB,kBAAC,GAAG,EAAE,GAAG,IAAM,KAAK,EAAI,CACtC,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AACzC,eAAe,SAAS,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { useInternalI18n } from '../i18n/context';\nimport { getBaseProps } from '../internal/base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { AppLayoutProps } from './interfaces';\nimport { AppLayoutInternal } from './internal';\nimport { applyDefaults } from './defaults';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { useControllable } from '../internal/hooks/use-controllable';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport { NonCancelableCustomEvent } from '../internal/events';\nimport { isDevelopment } from '../internal/is-development';\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\nimport { useAppLayoutPlacement } from './utils/use-app-layout-placement';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\n\nexport { AppLayoutProps };\n\nconst AppLayout = React.forwardRef(\n (\n {\n contentType = 'default',\n headerSelector = '#b #h',\n footerSelector = '#b #f',\n navigationWidth = 280,\n toolsWidth = 290,\n maxContentWidth,\n minContentWidth,\n navigationOpen: controlledNavigationOpen,\n onNavigationChange: controlledOnNavigationChange,\n ...rest\n }: AppLayoutProps,\n ref: React.Ref<AppLayoutProps.Ref>\n ) => {\n if (isDevelopment) {\n if (rest.toolsOpen && rest.toolsHide) {\n warnOnce(\n 'AppLayout',\n `You have enabled both the \\`toolsOpen\\` prop and the \\`toolsHide\\` prop. This is not supported. Set \\`toolsOpen\\` to \\`false\\` when you set \\`toolsHide\\` to \\`true\\`.`\n );\n }\n }\n const { __internalRootRef } = useBaseComponent<HTMLDivElement>('AppLayout', {\n props: {\n contentType,\n disableContentPaddings: rest.disableContentPaddings,\n disableBodyScroll: rest.disableBodyScroll,\n navigationWidth,\n navigationHide: rest.navigationHide,\n toolsHide: rest.toolsHide,\n toolsWidth,\n maxContentWidth,\n minContentWidth,\n stickyNotifications: rest.stickyNotifications,\n disableContentHeaderOverlap: rest.disableContentHeaderOverlap,\n },\n metadata: {\n drawersCount: rest.drawers?.length ?? null,\n hasContentHeader: !!rest.contentHeader,\n },\n });\n const isRefresh = useVisualRefresh();\n const isMobile = useMobile();\n\n const i18n = useInternalI18n('app-layout');\n const ariaLabels = {\n navigation: i18n('ariaLabels.navigation', rest.ariaLabels?.navigation),\n navigationClose: i18n('ariaLabels.navigationClose', rest.ariaLabels?.navigationClose),\n navigationToggle: i18n('ariaLabels.navigationToggle', rest.ariaLabels?.navigationToggle),\n notifications: i18n('ariaLabels.notifications', rest.ariaLabels?.notifications),\n tools: i18n('ariaLabels.tools', rest.ariaLabels?.tools),\n toolsClose: i18n('ariaLabels.toolsClose', rest.ariaLabels?.toolsClose),\n toolsToggle: i18n('ariaLabels.toolsToggle', rest.ariaLabels?.toolsToggle),\n drawers: i18n('ariaLabels.drawers', rest.ariaLabels?.drawers),\n drawersOverflow: i18n('ariaLabels.drawersOverflow', rest.ariaLabels?.drawersOverflow),\n drawersOverflowWithBadge: i18n('ariaLabels.drawersOverflowWithBadge', rest.ariaLabels?.drawersOverflowWithBadge),\n };\n const { navigationOpen: defaultNavigationOpen, ...restDefaults } = applyDefaults(\n contentType,\n { maxContentWidth, minContentWidth },\n isRefresh\n );\n\n const [navigationOpen = false, setNavigationOpen] = useControllable(\n controlledNavigationOpen,\n controlledOnNavigationChange,\n isMobile ? false : defaultNavigationOpen,\n { componentName: 'AppLayout', controlledProp: 'navigationOpen', changeHandler: 'onNavigationChange' }\n );\n const onNavigationChange = (event: NonCancelableCustomEvent<AppLayoutProps.ChangeDetail>) => {\n setNavigationOpen(event.detail.open);\n controlledOnNavigationChange?.(event);\n };\n\n const [rootRef, placement] = useAppLayoutPlacement(headerSelector, footerSelector);\n\n // This re-builds the props including the default values\n const props = {\n contentType,\n navigationWidth,\n toolsWidth,\n navigationOpen,\n onNavigationChange,\n ...restDefaults,\n ...rest,\n ariaLabels,\n placement,\n };\n\n const baseProps = getBaseProps(rest);\n\n return (\n <div ref={useMergeRefs(__internalRootRef, rootRef)} {...baseProps}>\n <AppLayoutInternal ref={ref} {...props} />\n </div>\n );\n }\n);\n\napplyDisplayName(AppLayout, 'AppLayout');\nexport default AppLayout;\n"]}
@@ -1,19 +1,19 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "header": "awsui_header_16mm3_8foeb_99",
5
- "disabled": "awsui_disabled_16mm3_8foeb_116",
6
- "expandable-header": "awsui_expandable-header_16mm3_8foeb_120",
7
- "rolled-down": "awsui_rolled-down_16mm3_8foeb_131",
8
- "highlighted": "awsui_highlighted_16mm3_8foeb_134",
9
- "is-focused": "awsui_is-focused_16mm3_8foeb_152",
10
- "category": "awsui_category_16mm3_8foeb_157",
11
- "expandable": "awsui_expandable_16mm3_8foeb_120",
12
- "variant-navigation": "awsui_variant-navigation_16mm3_8foeb_172",
13
- "expand-icon": "awsui_expand-icon_16mm3_8foeb_179",
14
- "expand-icon-up": "awsui_expand-icon-up_16mm3_8foeb_186",
15
- "expand-icon-right": "awsui_expand-icon-right_16mm3_8foeb_189",
16
- "items-list-container": "awsui_items-list-container_16mm3_8foeb_203",
17
- "in-dropdown": "awsui_in-dropdown_16mm3_8foeb_212"
4
+ "header": "awsui_header_16mm3_42iuc_99",
5
+ "disabled": "awsui_disabled_16mm3_42iuc_116",
6
+ "expandable-header": "awsui_expandable-header_16mm3_42iuc_120",
7
+ "rolled-down": "awsui_rolled-down_16mm3_42iuc_131",
8
+ "highlighted": "awsui_highlighted_16mm3_42iuc_134",
9
+ "is-focused": "awsui_is-focused_16mm3_42iuc_152",
10
+ "category": "awsui_category_16mm3_42iuc_157",
11
+ "expandable": "awsui_expandable_16mm3_42iuc_120",
12
+ "variant-navigation": "awsui_variant-navigation_16mm3_42iuc_172",
13
+ "expand-icon": "awsui_expand-icon_16mm3_42iuc_179",
14
+ "expand-icon-up": "awsui_expand-icon-up_16mm3_42iuc_186",
15
+ "expand-icon-right": "awsui_expand-icon-right_16mm3_42iuc_189",
16
+ "items-list-container": "awsui_items-list-container_16mm3_42iuc_206",
17
+ "in-dropdown": "awsui_in-dropdown_16mm3_42iuc_215"
18
18
  };
19
19