@cloudscape-design/components 3.0.801 → 3.0.803

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 (163) hide show
  1. package/attribute-editor/additional-info.js +1 -1
  2. package/attribute-editor/additional-info.js.map +1 -1
  3. package/attribute-editor/internal.js +1 -1
  4. package/attribute-editor/internal.js.map +1 -1
  5. package/button/internal.d.ts.map +1 -1
  6. package/button/internal.js +1 -1
  7. package/button/internal.js.map +1 -1
  8. package/button-group/icon-button-item.d.ts.map +1 -1
  9. package/button-group/icon-button-item.js +1 -1
  10. package/button-group/icon-button-item.js.map +1 -1
  11. package/cards/index.js +1 -1
  12. package/cards/index.js.map +1 -1
  13. package/code-editor/index.js +1 -1
  14. package/code-editor/index.js.map +1 -1
  15. package/code-editor/status-bar.js +1 -1
  16. package/code-editor/status-bar.js.map +1 -1
  17. package/date-picker/index.js +1 -1
  18. package/date-picker/index.js.map +1 -1
  19. package/date-range-picker/calendar/header/index.d.ts.map +1 -1
  20. package/date-range-picker/calendar/header/index.js +2 -2
  21. package/date-range-picker/calendar/header/index.js.map +1 -1
  22. package/date-range-picker/calendar/index.js +1 -1
  23. package/date-range-picker/calendar/index.js.map +1 -1
  24. package/date-range-picker/dropdown.js +1 -1
  25. package/date-range-picker/dropdown.js.map +1 -1
  26. package/drawer/implementation.d.ts.map +1 -1
  27. package/drawer/implementation.js +1 -1
  28. package/drawer/implementation.js.map +1 -1
  29. package/flashbar/flash.js +1 -1
  30. package/flashbar/flash.js.map +1 -1
  31. package/form/internal.d.ts.map +1 -1
  32. package/form/internal.js +1 -1
  33. package/form/internal.js.map +1 -1
  34. package/form-field/internal.js +1 -1
  35. package/form-field/internal.js.map +1 -1
  36. package/help-panel/implementation.d.ts.map +1 -1
  37. package/help-panel/implementation.js +1 -1
  38. package/help-panel/implementation.js.map +1 -1
  39. package/index.d.ts +1 -0
  40. package/index.d.ts.map +1 -1
  41. package/index.js +1 -0
  42. package/index.js.map +1 -1
  43. package/internal/analytics/index.d.ts.map +1 -1
  44. package/internal/analytics/index.js +1 -0
  45. package/internal/analytics/index.js.map +1 -1
  46. package/internal/analytics/interfaces.d.ts +12 -1
  47. package/internal/analytics/interfaces.d.ts.map +1 -1
  48. package/internal/analytics/interfaces.js.map +1 -1
  49. package/internal/base-component/styles.scoped.css +11 -17
  50. package/internal/components/chart-plot/index.d.ts.map +1 -1
  51. package/internal/components/chart-plot/index.js +1 -1
  52. package/internal/components/chart-plot/index.js.map +1 -1
  53. package/internal/components/chart-status-container/index.d.ts.map +1 -1
  54. package/internal/components/chart-status-container/index.js +1 -1
  55. package/internal/components/chart-status-container/index.js.map +1 -1
  56. package/internal/components/dropdown-footer/index.js +1 -1
  57. package/internal/components/dropdown-footer/index.js.map +1 -1
  58. package/internal/environment.js +1 -1
  59. package/internal/environment.json +1 -1
  60. package/internal/generated/styles/tokens.js +3 -3
  61. package/internal/generated/theming/index.cjs +34 -32
  62. package/internal/generated/theming/index.cjs.d.ts +16 -0
  63. package/internal/generated/theming/index.d.ts +16 -0
  64. package/internal/generated/theming/index.js +34 -32
  65. package/internal/hooks/use-dom-attribute/index.d.ts +5 -0
  66. package/internal/hooks/use-dom-attribute/index.d.ts.map +1 -0
  67. package/internal/hooks/use-dom-attribute/index.js +19 -0
  68. package/internal/hooks/use-dom-attribute/index.js.map +1 -0
  69. package/internal/hooks/use-performance-marks/index.d.ts +1 -1
  70. package/internal/hooks/use-performance-marks/index.d.ts.map +1 -1
  71. package/internal/hooks/use-performance-marks/index.js +3 -18
  72. package/internal/hooks/use-performance-marks/index.js.map +1 -1
  73. package/internal/hooks/use-table-interaction-metrics/index.d.ts +8 -1
  74. package/internal/hooks/use-table-interaction-metrics/index.d.ts.map +1 -1
  75. package/internal/hooks/use-table-interaction-metrics/index.js +24 -6
  76. package/internal/hooks/use-table-interaction-metrics/index.js.map +1 -1
  77. package/internal/manifest.json +1 -1
  78. package/live-region/controller.d.ts.map +1 -0
  79. package/{internal/components/live-region → live-region}/controller.js +2 -2
  80. package/live-region/controller.js.map +1 -0
  81. package/live-region/index.d.ts.map +1 -0
  82. package/{internal/components/live-region → live-region}/index.js +3 -5
  83. package/live-region/index.js.map +1 -0
  84. package/{internal/components/live-region → live-region}/interfaces.d.ts +5 -11
  85. package/live-region/interfaces.d.ts.map +1 -0
  86. package/live-region/interfaces.js.map +1 -0
  87. package/{internal/components/live-region → live-region}/internal.d.ts +1 -1
  88. package/live-region/internal.d.ts.map +1 -0
  89. package/{internal/components/live-region → live-region}/internal.js +11 -11
  90. package/live-region/internal.js.map +1 -0
  91. package/live-region/styles.css.js +7 -0
  92. package/{internal/components/live-region → live-region}/styles.scoped.css +3 -3
  93. package/{internal/components/live-region → live-region}/styles.selectors.js +2 -2
  94. package/live-region/test-classes/styles.css.js +7 -0
  95. package/live-region/test-classes/styles.scoped.css +11 -0
  96. package/live-region/test-classes/styles.selectors.js +8 -0
  97. package/package.json +2 -1
  98. package/pie-chart/pie-chart.d.ts.map +1 -1
  99. package/pie-chart/pie-chart.js +1 -1
  100. package/pie-chart/pie-chart.js.map +1 -1
  101. package/progress-bar/index.js +1 -1
  102. package/progress-bar/index.js.map +1 -1
  103. package/property-filter/token-editor.d.ts.map +1 -1
  104. package/property-filter/token-editor.js +5 -1
  105. package/property-filter/token-editor.js.map +1 -1
  106. package/s3-resource-selector/s3-in-context/index.js +2 -2
  107. package/s3-resource-selector/s3-in-context/index.js.map +1 -1
  108. package/s3-resource-selector/s3-modal/basic-table.d.ts.map +1 -1
  109. package/s3-resource-selector/s3-modal/basic-table.js +1 -1
  110. package/s3-resource-selector/s3-modal/basic-table.js.map +1 -1
  111. package/select/parts/filter.d.ts +1 -1
  112. package/table/body-cell/disabled-inline-editor.js +1 -1
  113. package/table/body-cell/disabled-inline-editor.js.map +1 -1
  114. package/table/body-cell/index.d.ts.map +1 -1
  115. package/table/body-cell/index.js +2 -2
  116. package/table/body-cell/index.js.map +1 -1
  117. package/table/body-cell/inline-editor.d.ts.map +1 -1
  118. package/table/body-cell/inline-editor.js +4 -4
  119. package/table/body-cell/inline-editor.js.map +1 -1
  120. package/table/internal.d.ts.map +1 -1
  121. package/table/internal.js +26 -14
  122. package/table/internal.js.map +1 -1
  123. package/table/no-data-cell.js +1 -1
  124. package/table/no-data-cell.js.map +1 -1
  125. package/table/progressive-loading/items-loader.js +1 -1
  126. package/table/progressive-loading/items-loader.js.map +1 -1
  127. package/tag-editor/index.js +1 -1
  128. package/tag-editor/index.js.map +1 -1
  129. package/test-utils/dom/index.d.ts +3 -0
  130. package/test-utils/dom/index.js +10 -2
  131. package/test-utils/dom/index.js.map +1 -1
  132. package/test-utils/dom/{internal/live-region.js → live-region/index.js} +2 -2
  133. package/test-utils/dom/live-region/index.js.map +1 -0
  134. package/test-utils/selectors/index.d.ts +3 -0
  135. package/test-utils/selectors/index.js +10 -2
  136. package/test-utils/selectors/index.js.map +1 -1
  137. package/test-utils/selectors/{internal/live-region.js → live-region/index.js} +2 -2
  138. package/test-utils/selectors/live-region/index.js.map +1 -0
  139. package/test-utils/tsconfig.tsbuildinfo +1 -1
  140. package/text-filter/search-results.js +1 -1
  141. package/text-filter/search-results.js.map +1 -1
  142. package/tutorial-panel/components/tutorial-list/index.js +1 -1
  143. package/tutorial-panel/components/tutorial-list/index.js.map +1 -1
  144. package/internal/components/live-region/controller.d.ts.map +0 -1
  145. package/internal/components/live-region/controller.js.map +0 -1
  146. package/internal/components/live-region/index.d.ts.map +0 -1
  147. package/internal/components/live-region/index.js.map +0 -1
  148. package/internal/components/live-region/interfaces.d.ts.map +0 -1
  149. package/internal/components/live-region/interfaces.js.map +0 -1
  150. package/internal/components/live-region/internal.d.ts.map +0 -1
  151. package/internal/components/live-region/internal.js.map +0 -1
  152. package/internal/components/live-region/styles.css.js +0 -7
  153. package/internal/hooks/use-component-analytics/index.d.ts +0 -8
  154. package/internal/hooks/use-component-analytics/index.d.ts.map +0 -1
  155. package/internal/hooks/use-component-analytics/index.js +0 -28
  156. package/internal/hooks/use-component-analytics/index.js.map +0 -1
  157. package/test-utils/dom/internal/live-region.js.map +0 -1
  158. package/test-utils/selectors/internal/live-region.js.map +0 -1
  159. /package/{internal/components/live-region → live-region}/controller.d.ts +0 -0
  160. /package/{internal/components/live-region → live-region}/index.d.ts +0 -0
  161. /package/{internal/components/live-region → live-region}/interfaces.js +0 -0
  162. /package/test-utils/dom/{internal/live-region.d.ts → live-region/index.d.ts} +0 -0
  163. /package/test-utils/selectors/{internal/live-region.d.ts → live-region/index.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/form-field/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AACzE,OAAO,EAAE,8BAA8B,EAAE,MAAM,kEAAkE,CAAC;AAElH,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AACpG,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,kBAAkB,MAAM,6CAA6C,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC/F,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAA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BAAC,cAAc,IAAC,EAAE,EAAE,OAAO,CAAC,UAAU,EAAE,iBAAiB,EAAE,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,WAAW,IACpF,cAAc,CACA,CAClB,CACG,CACP,CACG,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\nimport { copyAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalGrid from '../grid/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport InternalIcon from '../icon/internal';\nimport { FunnelMetrics } from '../internal/analytics';\nimport { useFunnel, useFunnelStep, useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport {\n DATA_ATTR_FIELD_ERROR,\n DATA_ATTR_FIELD_LABEL,\n getFieldSlotSeletor,\n getSubStepAllSelector,\n getTextFromSelector,\n} from '../internal/analytics/selectors';\nimport { getBaseProps } from '../internal/base-component';\nimport InternalLiveRegion from '../internal/components/live-region/internal';\nimport { FormFieldContext, useFormFieldContext } from '../internal/context/form-field-context';\nimport { InfoLinkLabelContext } from '../internal/context/info-link-label-context';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { joinStrings } from '../internal/utils/strings';\nimport { InternalFormFieldProps } from './interfaces';\nimport { getAriaDescribedBy, getGridDefinition, getSlotIds } from './util';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\ninterface FormFieldErrorProps {\n id?: string;\n children?: React.ReactNode;\n errorIconAriaLabel?: string;\n}\n\ninterface FormFieldWarningProps {\n id?: string;\n children?: React.ReactNode;\n warningIconAriaLabel?: string;\n}\n\nexport function FormFieldError({ id, children, errorIconAriaLabel }: FormFieldErrorProps) {\n const i18n = useInternalI18n('form-field');\n const contentRef = useRef<HTMLDivElement | null>(null);\n const i18nErrorIconAriaLabel = i18n('i18nStrings.errorIconAriaLabel', errorIconAriaLabel);\n\n return (\n <>\n <div id={id} className={styles.error}>\n <div className={styles['error-icon-shake-wrapper']}>\n <div role=\"img\" aria-label={i18nErrorIconAriaLabel} className={styles['error-icon-scale-wrapper']}>\n <InternalIcon name=\"status-negative\" size=\"small\" />\n </div>\n </div>\n <span className={styles.error__message} ref={contentRef}>\n {children}\n </span>\n </div>\n\n <InternalLiveRegion assertive={true} tagName=\"span\" sources={[i18nErrorIconAriaLabel, contentRef]} />\n </>\n );\n}\n\nexport function FormFieldWarning({ id, children, warningIconAriaLabel }: FormFieldWarningProps) {\n const i18n = useInternalI18n('form-field');\n const contentRef = useRef<HTMLDivElement | null>(null);\n const i18nWarningIconAriaLabel = i18n('i18nStrings.warningIconAriaLabel', warningIconAriaLabel);\n\n return (\n <>\n <div id={id} className={styles.warning}>\n <div className={styles['warning-icon-shake-wrapper']}>\n <div role=\"img\" aria-label={i18nWarningIconAriaLabel} className={styles['warning-icon-scale-wrapper']}>\n <InternalIcon name=\"status-warning\" size=\"small\" />\n </div>\n </div>\n <span className={styles.warning__message} ref={contentRef}>\n {children}\n </span>\n </div>\n\n <InternalLiveRegion assertive={true} tagName=\"span\" sources={[i18nWarningIconAriaLabel, contentRef]} />\n </>\n );\n}\n\nexport function ConstraintText({\n id,\n hasValidationText,\n children,\n}: {\n id?: string;\n hasValidationText: boolean;\n children: React.ReactNode;\n}) {\n return (\n <div id={id} className={clsx(styles.constraint, hasValidationText && styles['constraint-has-validation-text'])}>\n {children}\n </div>\n );\n}\n\nexport default function InternalFormField({\n controlId,\n stretch = false,\n label,\n info,\n i18nStrings,\n children,\n secondaryControl,\n description,\n constraintText,\n errorText,\n warningText,\n __hideLabel,\n __internalRootRef = null,\n __disableGutters = false,\n __analyticsMetadata = undefined,\n ...rest\n}: InternalFormFieldProps) {\n const baseProps = getBaseProps(rest);\n const isRefresh = useVisualRefresh();\n\n const instanceUniqueId = useUniqueId('formField');\n const generatedControlId = controlId || instanceUniqueId;\n const formFieldId = controlId || generatedControlId;\n\n const { funnelIdentifier, funnelInteractionId, submissionAttempt, funnelState, errorCount } = useFunnel();\n const { stepIdentifier, stepNumber, stepNameSelector } = useFunnelStep();\n const { subStepErrorContext, subStepIdentifier, subStepSelector, subStepNameSelector } = useFunnelSubStep();\n\n const showWarning = warningText && !errorText;\n\n if (warningText && errorText) {\n warnOnce('FileUpload', 'Both `errorText` and `warningText` exist. `warningText` will not be shown.');\n }\n\n const slotIds = getSlotIds(\n formFieldId,\n label,\n description,\n constraintText,\n errorText,\n showWarning ? warningText : undefined\n );\n\n const ariaDescribedBy = getAriaDescribedBy(slotIds);\n\n const gridDefinition = getGridDefinition(stretch, !!secondaryControl, isRefresh);\n\n const {\n ariaLabelledby: parentAriaLabelledby,\n ariaDescribedby: parentAriaDescribedby,\n invalid: parentInvalid,\n warning: parentWarning,\n } = useFormFieldContext({});\n\n const contextValuesWithoutControlId = {\n ariaLabelledby: joinStrings(parentAriaLabelledby, slotIds.label) || undefined,\n ariaDescribedby: joinStrings(parentAriaDescribedby, ariaDescribedBy) || undefined,\n invalid: !!errorText || !!parentInvalid,\n warning: (!!warningText && !errorText) || (!!parentWarning && !parentInvalid),\n };\n\n const analyticsAttributes = {\n [DATA_ATTR_FIELD_LABEL]: slotIds.label ? getFieldSlotSeletor(slotIds.label) : undefined,\n [DATA_ATTR_FIELD_ERROR]: slotIds.error ? getFieldSlotSeletor(slotIds.error) : undefined,\n };\n\n useEffect(() => {\n if (funnelInteractionId && errorText && funnelState.current !== 'complete') {\n const stepName = getTextFromSelector(stepNameSelector);\n const subStepName = getTextFromSelector(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 = (__internalRootRef?.current?.getBoundingClientRect()?.width ?? 0) > 0;\n\n if (errorIsVisible) {\n FunnelMetrics.funnelSubStepError({\n funnelInteractionId,\n funnelIdentifier,\n subStepSelector,\n subStepName,\n subStepNameSelector,\n subStepIdentifier,\n stepNumber,\n stepName,\n stepNameSelector,\n stepIdentifier,\n subStepErrorContext,\n fieldErrorSelector: `${getFieldSlotSeletor(slotIds.error)} .${styles.error__message}`,\n fieldLabelSelector: getFieldSlotSeletor(slotIds.label),\n subStepAllSelector: getSubStepAllSelector(),\n fieldIdentifier: __analyticsMetadata?.instanceIdentifier,\n fieldErrorContext: __analyticsMetadata?.errorContext,\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, errorText, submissionAttempt, errorCount]);\n\n return (\n <div\n {...baseProps}\n className={clsx(baseProps.className, styles.root)}\n ref={__internalRootRef}\n {...analyticsAttributes}\n {...copyAnalyticsMetadataAttribute(rest)}\n >\n <div className={clsx(styles['label-wrapper'], __hideLabel && styles['visually-hidden'])}>\n {label && (\n <label\n className={clsx(styles.label, analyticsSelectors.label)}\n id={slotIds.label}\n htmlFor={generatedControlId}\n >\n {label}\n </label>\n )}\n <InfoLinkLabelContext.Provider value={slotIds.label}>\n {!__hideLabel && info && <span className={styles.info}>{info}</span>}\n </InfoLinkLabelContext.Provider>\n </div>\n\n {description && (\n <div className={styles.description} id={slotIds.description}>\n {description}\n </div>\n )}\n\n <div className={clsx(styles.controls, __hideLabel && styles['label-hidden'])}>\n <InternalGrid gridDefinition={gridDefinition} disableGutters={__disableGutters}>\n <FormFieldContext.Provider\n value={{\n controlId: generatedControlId,\n ...contextValuesWithoutControlId,\n }}\n >\n {children && <div className={styles.control}>{children}</div>}\n </FormFieldContext.Provider>\n\n {secondaryControl && (\n <FormFieldContext.Provider value={contextValuesWithoutControlId}>\n <div className={styles['secondary-control']}>{secondaryControl}</div>\n </FormFieldContext.Provider>\n )}\n </InternalGrid>\n </div>\n\n {(constraintText || errorText || warningText) && (\n <div className={styles.hints}>\n {errorText && (\n <FormFieldError id={slotIds.error} errorIconAriaLabel={i18nStrings?.errorIconAriaLabel}>\n {errorText}\n </FormFieldError>\n )}\n {showWarning && (\n <FormFieldWarning id={slotIds.warning} warningIconAriaLabel={i18nStrings?.warningIconAriaLabel}>\n {warningText}\n </FormFieldWarning>\n )}\n {constraintText && (\n <ConstraintText id={slotIds.constraint} hasValidationText={!!errorText || !!warningText}>\n {constraintText}\n </ConstraintText>\n )}\n </div>\n )}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/form-field/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AACzE,OAAO,EAAE,8BAA8B,EAAE,MAAM,kEAAkE,CAAC;AAElH,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AACpG,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC/F,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;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,IAAC,EAAE,EAAE,OAAO,CAAC,UAAU,EAAE,iBAAiB,EAAE,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,WAAW,IACpF,cAAc,CACA,CAClB,CACG,CACP,CACG,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\nimport { copyAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalGrid from '../grid/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport InternalIcon from '../icon/internal';\nimport { FunnelMetrics } from '../internal/analytics';\nimport { useFunnel, useFunnelStep, useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport {\n DATA_ATTR_FIELD_ERROR,\n DATA_ATTR_FIELD_LABEL,\n getFieldSlotSeletor,\n getSubStepAllSelector,\n getTextFromSelector,\n} from '../internal/analytics/selectors';\nimport { getBaseProps } from '../internal/base-component';\nimport { FormFieldContext, useFormFieldContext } from '../internal/context/form-field-context';\nimport { InfoLinkLabelContext } from '../internal/context/info-link-label-context';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { joinStrings } from '../internal/utils/strings';\nimport InternalLiveRegion from '../live-region/internal';\nimport { InternalFormFieldProps } from './interfaces';\nimport { getAriaDescribedBy, getGridDefinition, getSlotIds } from './util';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\ninterface FormFieldErrorProps {\n id?: string;\n children?: React.ReactNode;\n errorIconAriaLabel?: string;\n}\n\ninterface FormFieldWarningProps {\n id?: string;\n children?: React.ReactNode;\n warningIconAriaLabel?: string;\n}\n\nexport function FormFieldError({ id, children, errorIconAriaLabel }: FormFieldErrorProps) {\n const i18n = useInternalI18n('form-field');\n const contentRef = useRef<HTMLDivElement | null>(null);\n const i18nErrorIconAriaLabel = i18n('i18nStrings.errorIconAriaLabel', errorIconAriaLabel);\n\n return (\n <>\n <div id={id} className={styles.error}>\n <div className={styles['error-icon-shake-wrapper']}>\n <div role=\"img\" aria-label={i18nErrorIconAriaLabel} className={styles['error-icon-scale-wrapper']}>\n <InternalIcon name=\"status-negative\" size=\"small\" />\n </div>\n </div>\n <span className={styles.error__message} ref={contentRef}>\n {children}\n </span>\n </div>\n\n <InternalLiveRegion assertive={true} tagName=\"span\" sources={[i18nErrorIconAriaLabel, contentRef]} />\n </>\n );\n}\n\nexport function FormFieldWarning({ id, children, warningIconAriaLabel }: FormFieldWarningProps) {\n const i18n = useInternalI18n('form-field');\n const contentRef = useRef<HTMLDivElement | null>(null);\n const i18nWarningIconAriaLabel = i18n('i18nStrings.warningIconAriaLabel', warningIconAriaLabel);\n\n return (\n <>\n <div id={id} className={styles.warning}>\n <div className={styles['warning-icon-shake-wrapper']}>\n <div role=\"img\" aria-label={i18nWarningIconAriaLabel} className={styles['warning-icon-scale-wrapper']}>\n <InternalIcon name=\"status-warning\" size=\"small\" />\n </div>\n </div>\n <span className={styles.warning__message} ref={contentRef}>\n {children}\n </span>\n </div>\n\n <InternalLiveRegion assertive={true} tagName=\"span\" sources={[i18nWarningIconAriaLabel, contentRef]} />\n </>\n );\n}\n\nexport function ConstraintText({\n id,\n hasValidationText,\n children,\n}: {\n id?: string;\n hasValidationText: boolean;\n children: React.ReactNode;\n}) {\n return (\n <div id={id} className={clsx(styles.constraint, hasValidationText && styles['constraint-has-validation-text'])}>\n {children}\n </div>\n );\n}\n\nexport default function InternalFormField({\n controlId,\n stretch = false,\n label,\n info,\n i18nStrings,\n children,\n secondaryControl,\n description,\n constraintText,\n errorText,\n warningText,\n __hideLabel,\n __internalRootRef = null,\n __disableGutters = false,\n __analyticsMetadata = undefined,\n ...rest\n}: InternalFormFieldProps) {\n const baseProps = getBaseProps(rest);\n const isRefresh = useVisualRefresh();\n\n const instanceUniqueId = useUniqueId('formField');\n const generatedControlId = controlId || instanceUniqueId;\n const formFieldId = controlId || generatedControlId;\n\n const { funnelIdentifier, funnelInteractionId, submissionAttempt, funnelState, errorCount } = useFunnel();\n const { stepIdentifier, stepNumber, stepNameSelector } = useFunnelStep();\n const { subStepErrorContext, subStepIdentifier, subStepSelector, subStepNameSelector } = useFunnelSubStep();\n\n const showWarning = warningText && !errorText;\n\n if (warningText && errorText) {\n warnOnce('FileUpload', 'Both `errorText` and `warningText` exist. `warningText` will not be shown.');\n }\n\n const slotIds = getSlotIds(\n formFieldId,\n label,\n description,\n constraintText,\n errorText,\n showWarning ? warningText : undefined\n );\n\n const ariaDescribedBy = getAriaDescribedBy(slotIds);\n\n const gridDefinition = getGridDefinition(stretch, !!secondaryControl, isRefresh);\n\n const {\n ariaLabelledby: parentAriaLabelledby,\n ariaDescribedby: parentAriaDescribedby,\n invalid: parentInvalid,\n warning: parentWarning,\n } = useFormFieldContext({});\n\n const contextValuesWithoutControlId = {\n ariaLabelledby: joinStrings(parentAriaLabelledby, slotIds.label) || undefined,\n ariaDescribedby: joinStrings(parentAriaDescribedby, ariaDescribedBy) || undefined,\n invalid: !!errorText || !!parentInvalid,\n warning: (!!warningText && !errorText) || (!!parentWarning && !parentInvalid),\n };\n\n const analyticsAttributes = {\n [DATA_ATTR_FIELD_LABEL]: slotIds.label ? getFieldSlotSeletor(slotIds.label) : undefined,\n [DATA_ATTR_FIELD_ERROR]: slotIds.error ? getFieldSlotSeletor(slotIds.error) : undefined,\n };\n\n useEffect(() => {\n if (funnelInteractionId && errorText && funnelState.current !== 'complete') {\n const stepName = getTextFromSelector(stepNameSelector);\n const subStepName = getTextFromSelector(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 = (__internalRootRef?.current?.getBoundingClientRect()?.width ?? 0) > 0;\n\n if (errorIsVisible) {\n FunnelMetrics.funnelSubStepError({\n funnelInteractionId,\n funnelIdentifier,\n subStepSelector,\n subStepName,\n subStepNameSelector,\n subStepIdentifier,\n stepNumber,\n stepName,\n stepNameSelector,\n stepIdentifier,\n subStepErrorContext,\n fieldErrorSelector: `${getFieldSlotSeletor(slotIds.error)} .${styles.error__message}`,\n fieldLabelSelector: getFieldSlotSeletor(slotIds.label),\n subStepAllSelector: getSubStepAllSelector(),\n fieldIdentifier: __analyticsMetadata?.instanceIdentifier,\n fieldErrorContext: __analyticsMetadata?.errorContext,\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, errorText, submissionAttempt, errorCount]);\n\n return (\n <div\n {...baseProps}\n className={clsx(baseProps.className, styles.root)}\n ref={__internalRootRef}\n {...analyticsAttributes}\n {...copyAnalyticsMetadataAttribute(rest)}\n >\n <div className={clsx(styles['label-wrapper'], __hideLabel && styles['visually-hidden'])}>\n {label && (\n <label\n className={clsx(styles.label, analyticsSelectors.label)}\n id={slotIds.label}\n htmlFor={generatedControlId}\n >\n {label}\n </label>\n )}\n <InfoLinkLabelContext.Provider value={slotIds.label}>\n {!__hideLabel && info && <span className={styles.info}>{info}</span>}\n </InfoLinkLabelContext.Provider>\n </div>\n\n {description && (\n <div className={styles.description} id={slotIds.description}>\n {description}\n </div>\n )}\n\n <div className={clsx(styles.controls, __hideLabel && styles['label-hidden'])}>\n <InternalGrid gridDefinition={gridDefinition} disableGutters={__disableGutters}>\n <FormFieldContext.Provider\n value={{\n controlId: generatedControlId,\n ...contextValuesWithoutControlId,\n }}\n >\n {children && <div className={styles.control}>{children}</div>}\n </FormFieldContext.Provider>\n\n {secondaryControl && (\n <FormFieldContext.Provider value={contextValuesWithoutControlId}>\n <div className={styles['secondary-control']}>{secondaryControl}</div>\n </FormFieldContext.Provider>\n )}\n </InternalGrid>\n </div>\n\n {(constraintText || errorText || warningText) && (\n <div className={styles.hints}>\n {errorText && (\n <FormFieldError id={slotIds.error} errorIconAriaLabel={i18nStrings?.errorIconAriaLabel}>\n {errorText}\n </FormFieldError>\n )}\n {showWarning && (\n <FormFieldWarning id={slotIds.warning} warningIconAriaLabel={i18nStrings?.warningIconAriaLabel}>\n {warningText}\n </FormFieldWarning>\n )}\n {constraintText && (\n <ConstraintText id={slotIds.constraint} hasValidationText={!!errorText || !!warningText}>\n {constraintText}\n </ConstraintText>\n )}\n </div>\n )}\n </div>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"implementation.d.ts","sourceRoot":"","sources":["../../../src/help-panel/implementation.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAGlF,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAI9C,MAAM,MAAM,sBAAsB,GAAG,cAAc,GAAG,0BAA0B,CAAC;AAEjF,wBAAgB,uBAAuB,CAAC,EACtC,MAAM,EACN,MAAM,EACN,QAAQ,EACR,OAAO,EACP,WAAW,EACX,iBAAiB,EACjB,GAAG,SAAS,EACb,EAAE,sBAAsB,eAuBxB;AAED,eAAO,MAAM,yBAAyB,yFAAqD,CAAC"}
1
+ {"version":3,"file":"implementation.d.ts","sourceRoot":"","sources":["../../../src/help-panel/implementation.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAIlF,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAI9C,MAAM,MAAM,sBAAsB,GAAG,cAAc,GAAG,0BAA0B,CAAC;AAEjF,wBAAgB,uBAAuB,CAAC,EACtC,MAAM,EACN,MAAM,EACN,QAAQ,EACR,OAAO,EACP,WAAW,EACX,iBAAiB,EACjB,GAAG,SAAS,EACb,EAAE,sBAAsB,eAuBxB;AAED,eAAO,MAAM,yBAAyB,yFAAqD,CAAC"}
@@ -6,9 +6,9 @@ import clsx from 'clsx';
6
6
  import { useAppLayoutToolbarEnabled } from '../app-layout/utils/feature-flags';
7
7
  import { useInternalI18n } from '../i18n/context';
8
8
  import { getBaseProps } from '../internal/base-component';
9
- import InternalLiveRegion from '../internal/components/live-region/internal';
10
9
  import { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';
11
10
  import { createWidgetizedComponent } from '../internal/widgets';
11
+ import InternalLiveRegion from '../live-region/internal';
12
12
  import InternalStatusIndicator from '../status-indicator/internal';
13
13
  import styles from './styles.css.js';
14
14
  export function HelpPanelImplementation(_a) {
@@ -1 +1 @@
1
- {"version":3,"file":"implementation.js","sourceRoot":"","sources":["../../../src/help-panel/implementation.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,kBAAkB,MAAM,6CAA6C,CAAC;AAC7E,OAAO,EAAE,yBAAyB,EAAE,MAAM,kDAAkD,CAAC;AAE7F,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,uBAAuB,MAAM,8BAA8B,CAAC;AAGnE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAIrC,MAAM,UAAU,uBAAuB,CAAC,EAQf;QARe,EACtC,MAAM,EACN,MAAM,EACN,QAAQ,EACR,OAAO,EACP,WAAW,EACX,iBAAiB,OAEM,EADpB,SAAS,cAP0B,+EAQvC,CADa;IAEZ,MAAM,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC;IAC1C,MAAM,SAAS,GAAG,0BAA0B,EAAE,CAAC;IAC/C,MAAM,IAAI,GAAG,eAAe,CAAC,YAAY,CAAC,CAAC;IAC3C,MAAM,cAAc,mCACf,SAAS,KACZ,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,YAAY,CAAC,EAAE,SAAS,IAAI,MAAM,CAAC,cAAc,CAAC,CAAC,GAChG,CAAC;IACF,OAAO,OAAO,CAAC,CAAC,CAAC,CACf,6CAAS,cAAc,IAAE,GAAG,EAAE,iBAAiB;QAC7C,oBAAC,uBAAuB,IAAC,IAAI,EAAC,SAAS;YACrC,oBAAC,kBAAkB,IAAC,OAAO,EAAC,MAAM,IAAE,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,CAAsB,CAClE,CACtB,CACP,CAAC,CAAC,CAAC,CACF,6CAAS,cAAc,IAAE,GAAG,EAAE,iBAAiB;QAC5C,MAAM,IAAI,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAG,MAAM,CAAO;QAC9D,oBAAC,yBAAyB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE;YACtE,6BAAK,SAAS,EAAE,MAAM,CAAC,OAAO,IAAG,QAAQ,CAAO,CACb;QACpC,MAAM,IAAI,6BAAK,SAAS,EAAE,MAAM,CAAC,MAAM,IAAG,MAAM,CAAO,CACpD,CACP,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAG,yBAAyB,CAAC,uBAAuB,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { useAppLayoutToolbarEnabled } from '../app-layout/utils/feature-flags';\nimport { useInternalI18n } from '../i18n/context';\nimport { getBaseProps } from '../internal/base-component';\nimport InternalLiveRegion from '../internal/components/live-region/internal';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { createWidgetizedComponent } from '../internal/widgets';\nimport InternalStatusIndicator from '../status-indicator/internal';\nimport { HelpPanelProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\nexport type HelpPanelInternalProps = HelpPanelProps & InternalBaseComponentProps;\n\nexport function HelpPanelImplementation({\n header,\n footer,\n children,\n loading,\n loadingText,\n __internalRootRef,\n ...restProps\n}: HelpPanelInternalProps) {\n const baseProps = getBaseProps(restProps);\n const isToolbar = useAppLayoutToolbarEnabled();\n const i18n = useInternalI18n('help-panel');\n const containerProps = {\n ...baseProps,\n className: clsx(baseProps.className, styles['help-panel'], isToolbar && styles['with-toolbar']),\n };\n return loading ? (\n <div {...containerProps} ref={__internalRootRef}>\n <InternalStatusIndicator type=\"loading\">\n <InternalLiveRegion tagName=\"span\">{i18n('loadingText', loadingText)}</InternalLiveRegion>\n </InternalStatusIndicator>\n </div>\n ) : (\n <div {...containerProps} ref={__internalRootRef}>\n {header && <div className={clsx(styles.header)}>{header}</div>}\n <LinkDefaultVariantContext.Provider value={{ defaultVariant: 'primary' }}>\n <div className={styles.content}>{children}</div>\n </LinkDefaultVariantContext.Provider>\n {footer && <div className={styles.footer}>{footer}</div>}\n </div>\n );\n}\n\nexport const createWidgetizedHelpPanel = createWidgetizedComponent(HelpPanelImplementation);\n"]}
1
+ {"version":3,"file":"implementation.js","sourceRoot":"","sources":["../../../src/help-panel/implementation.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,kDAAkD,CAAC;AAE7F,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,kBAAkB,MAAM,yBAA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,MAAM,yBAAyB,GAAG,yBAAyB,CAAC,uBAAuB,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { useAppLayoutToolbarEnabled } from '../app-layout/utils/feature-flags';\nimport { useInternalI18n } from '../i18n/context';\nimport { getBaseProps } from '../internal/base-component';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { createWidgetizedComponent } from '../internal/widgets';\nimport InternalLiveRegion from '../live-region/internal';\nimport InternalStatusIndicator from '../status-indicator/internal';\nimport { HelpPanelProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\nexport type HelpPanelInternalProps = HelpPanelProps & InternalBaseComponentProps;\n\nexport function HelpPanelImplementation({\n header,\n footer,\n children,\n loading,\n loadingText,\n __internalRootRef,\n ...restProps\n}: HelpPanelInternalProps) {\n const baseProps = getBaseProps(restProps);\n const isToolbar = useAppLayoutToolbarEnabled();\n const i18n = useInternalI18n('help-panel');\n const containerProps = {\n ...baseProps,\n className: clsx(baseProps.className, styles['help-panel'], isToolbar && styles['with-toolbar']),\n };\n return loading ? (\n <div {...containerProps} ref={__internalRootRef}>\n <InternalStatusIndicator type=\"loading\">\n <InternalLiveRegion tagName=\"span\">{i18n('loadingText', loadingText)}</InternalLiveRegion>\n </InternalStatusIndicator>\n </div>\n ) : (\n <div {...containerProps} ref={__internalRootRef}>\n {header && <div className={clsx(styles.header)}>{header}</div>}\n <LinkDefaultVariantContext.Provider value={{ defaultVariant: 'primary' }}>\n <div className={styles.content}>{children}</div>\n </LinkDefaultVariantContext.Provider>\n {footer && <div className={styles.footer}>{footer}</div>}\n </div>\n );\n}\n\nexport const createWidgetizedHelpPanel = createWidgetizedComponent(HelpPanelImplementation);\n"]}
package/index.d.ts CHANGED
@@ -39,6 +39,7 @@ export { default as Input, InputProps } from './input';
39
39
  export { default as KeyValuePairs, KeyValuePairsProps } from './key-value-pairs';
40
40
  export { default as LineChart, LineChartProps } from './line-chart';
41
41
  export { default as Link, LinkProps } from './link';
42
+ export { default as LiveRegion, LiveRegionProps } from './live-region';
42
43
  export { default as MixedLineBarChart, MixedLineBarChartProps } from './mixed-line-bar-chart';
43
44
  export { default as Modal, ModalProps } from './modal';
44
45
  export { default as Multiselect, MultiselectProps } from './multiselect';
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AACtF,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AACtF,OAAO,EAAE,OAAO,IAAI,MAAM,EA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IAAI,QAAQ,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC1D,cAAc,cAAc,CAAC"}
package/index.js CHANGED
@@ -39,6 +39,7 @@ export { default as Input } from './input';
39
39
  export { default as KeyValuePairs } from './key-value-pairs';
40
40
  export { default as LineChart } from './line-chart';
41
41
  export { default as Link } from './link';
42
+ export { default as LiveRegion } from './live-region';
42
43
  export { default as MixedLineBarChart } from './mixed-line-bar-chart';
43
44
  export { default as Modal } from './modal';
44
45
  export { default as Multiselect } from './multiselect';
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAc,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAyB,MAAM,qBAAqB,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAA0B,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EAAE,OAAO,IAAI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,EAAa,MAAM,QAAQ,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAkB,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAoB,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,UAAU,EAAmB,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAiB,MAAM,YAAY,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAc,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAkB,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAe,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAqB,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,UAAU,EAAmB,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAsB,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAsB,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,OAAO,IAAI,MAAM,EAAe,MAAM,UAAU,CAAC;AAC1D,cAAc,cAAc,CAAC","sourcesContent":["export { default as Alert, AlertProps } from './alert';\nexport { default as AnchorNavigation, AnchorNavigationProps } from './anchor-navigation';\nexport { default as AnnotationContext, AnnotationContextProps } from './annotation-context';\nexport { default as AppLayout, AppLayoutProps } from './app-layout';\nexport { default as AreaChart, AreaChartProps } from './area-chart';\nexport { default as AttributeEditor, AttributeEditorProps } from './attribute-editor';\nexport { default as Autosuggest, AutosuggestProps } from './autosuggest';\nexport { default as Badge, BadgeProps } from './badge';\nexport { default as BarChart, BarChartProps } from './bar-chart';\nexport { default as Box, BoxProps } from './box';\nexport { default as BreadcrumbGroup, BreadcrumbGroupProps } from './breadcrumb-group';\nexport { default as Button, ButtonProps } from './button';\nexport { default as ButtonDropdown, ButtonDropdownProps } from './button-dropdown';\nexport { default as ButtonGroup, ButtonGroupProps } from './button-group';\nexport { default as Calendar, CalendarProps } from './calendar';\nexport { default as Cards, CardsProps } from './cards';\nexport { default as Checkbox, CheckboxProps } from './checkbox';\nexport { default as CodeEditor, CodeEditorProps } from './code-editor';\nexport { default as CollectionPreferences, CollectionPreferencesProps } from './collection-preferences';\nexport { default as ColumnLayout, ColumnLayoutProps } from './column-layout';\nexport { default as Container, ContainerProps } from './container';\nexport { default as ContentLayout, ContentLayoutProps } from './content-layout';\nexport { default as CopyToClipboard, CopyToClipboardProps } from './copy-to-clipboard';\nexport { default as DateInput, DateInputProps } from './date-input';\nexport { default as DatePicker, DatePickerProps } from './date-picker';\nexport { default as DateRangePicker, DateRangePickerProps } from './date-range-picker';\nexport { default as Drawer, DrawerProps } from './drawer';\nexport { default as ExpandableSection, ExpandableSectionProps } from './expandable-section';\nexport { default as FileUpload, FileUploadProps } from './file-upload';\nexport { default as Flashbar, FlashbarProps } from './flashbar';\nexport { default as Form, FormProps } from './form';\nexport { default as FormField, FormFieldProps } from './form-field';\nexport { default as Grid, GridProps } from './grid';\nexport { default as Header, HeaderProps } from './header';\nexport { default as HelpPanel, HelpPanelProps } from './help-panel';\nexport { default as Hotspot, HotspotProps } from './hotspot';\nexport { default as Icon, IconProps } from './icon';\nexport { default as Input, InputProps } from './input';\nexport { default as KeyValuePairs, KeyValuePairsProps } from './key-value-pairs';\nexport { default as LineChart, LineChartProps } from './line-chart';\nexport { default as Link, LinkProps } from './link';\nexport { default as MixedLineBarChart, MixedLineBarChartProps } from './mixed-line-bar-chart';\nexport { default as Modal, ModalProps } from './modal';\nexport { default as Multiselect, MultiselectProps } from './multiselect';\nexport { default as Pagination, PaginationProps } from './pagination';\nexport { default as PieChart, PieChartProps } from './pie-chart';\nexport { default as Popover, PopoverProps } from './popover';\nexport { default as ProgressBar, ProgressBarProps } from './progress-bar';\nexport { default as PromptInput, PromptInputProps } from './prompt-input';\nexport { default as PropertyFilter, PropertyFilterProps } from './property-filter';\nexport { default as RadioGroup, RadioGroupProps } from './radio-group';\nexport { default as S3ResourceSelector, S3ResourceSelectorProps } from './s3-resource-selector';\nexport { default as SegmentedControl, SegmentedControlProps } from './segmented-control';\nexport { default as Select, SelectProps } from './select';\nexport { default as SideNavigation, SideNavigationProps } from './side-navigation';\nexport { default as Slider, SliderProps } from './slider';\nexport { default as SpaceBetween, SpaceBetweenProps } from './space-between';\nexport { default as Spinner, SpinnerProps } from './spinner';\nexport { default as SplitPanel, SplitPanelProps } from './split-panel';\nexport { default as StatusIndicator, StatusIndicatorProps } from './status-indicator';\nexport { default as Steps, StepsProps } from './steps';\nexport { default as Table, TableProps } from './table';\nexport { default as Tabs, TabsProps } from './tabs';\nexport { default as TagEditor, TagEditorProps } from './tag-editor';\nexport { default as TextContent, TextContentProps } from './text-content';\nexport { default as TextFilter, TextFilterProps } from './text-filter';\nexport { default as Textarea, TextareaProps } from './textarea';\nexport { default as Tiles, TilesProps } from './tiles';\nexport { default as TimeInput, TimeInputProps } from './time-input';\nexport { default as Toggle, ToggleProps } from './toggle';\nexport { default as ToggleButton, ToggleButtonProps } from './toggle-button';\nexport { default as TokenGroup, TokenGroupProps } from './token-group';\nexport { default as TopNavigation, TopNavigationProps } from './top-navigation';\nexport { default as TutorialPanel, TutorialPanelProps } from './tutorial-panel';\nexport { default as Wizard, WizardProps } from './wizard';\nexport * from './interfaces';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAc,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAyB,MAAM,qBAAqB,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAA0B,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EAAE,OAAO,IAAI,SAAS,EAAkB,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,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IAAI,IAAI,EAAa,MAAM,QAAQ,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAkB,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAoB,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,UAAU,EAAmB,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAiB,MAAM,YAAY,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAc,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAkB,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAe,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAqB,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,UAAU,EAAmB,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAsB,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAsB,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,OAAO,IAAI,MAAM,EAAe,MAAM,UAAU,CAAC;AAC1D,cAAc,cAAc,CAAC","sourcesContent":["export { default as Alert, AlertProps } from './alert';\nexport { default as AnchorNavigation, AnchorNavigationProps } from './anchor-navigation';\nexport { default as AnnotationContext, AnnotationContextProps } from './annotation-context';\nexport { default as AppLayout, AppLayoutProps } from './app-layout';\nexport { default as AreaChart, AreaChartProps } from './area-chart';\nexport { default as AttributeEditor, AttributeEditorProps } from './attribute-editor';\nexport { default as Autosuggest, AutosuggestProps } from './autosuggest';\nexport { default as Badge, BadgeProps } from './badge';\nexport { default as BarChart, BarChartProps } from './bar-chart';\nexport { default as Box, BoxProps } from './box';\nexport { default as BreadcrumbGroup, BreadcrumbGroupProps } from './breadcrumb-group';\nexport { default as Button, ButtonProps } from './button';\nexport { default as ButtonDropdown, ButtonDropdownProps } from './button-dropdown';\nexport { default as ButtonGroup, ButtonGroupProps } from './button-group';\nexport { default as Calendar, CalendarProps } from './calendar';\nexport { default as Cards, CardsProps } from './cards';\nexport { default as Checkbox, CheckboxProps } from './checkbox';\nexport { default as CodeEditor, CodeEditorProps } from './code-editor';\nexport { default as CollectionPreferences, CollectionPreferencesProps } from './collection-preferences';\nexport { default as ColumnLayout, ColumnLayoutProps } from './column-layout';\nexport { default as Container, ContainerProps } from './container';\nexport { default as ContentLayout, ContentLayoutProps } from './content-layout';\nexport { default as CopyToClipboard, CopyToClipboardProps } from './copy-to-clipboard';\nexport { default as DateInput, DateInputProps } from './date-input';\nexport { default as DatePicker, DatePickerProps } from './date-picker';\nexport { default as DateRangePicker, DateRangePickerProps } from './date-range-picker';\nexport { default as Drawer, DrawerProps } from './drawer';\nexport { default as ExpandableSection, ExpandableSectionProps } from './expandable-section';\nexport { default as FileUpload, FileUploadProps } from './file-upload';\nexport { default as Flashbar, FlashbarProps } from './flashbar';\nexport { default as Form, FormProps } from './form';\nexport { default as FormField, FormFieldProps } from './form-field';\nexport { default as Grid, GridProps } from './grid';\nexport { default as Header, HeaderProps } from './header';\nexport { default as HelpPanel, HelpPanelProps } from './help-panel';\nexport { default as Hotspot, HotspotProps } from './hotspot';\nexport { default as Icon, IconProps } from './icon';\nexport { default as Input, InputProps } from './input';\nexport { default as KeyValuePairs, KeyValuePairsProps } from './key-value-pairs';\nexport { default as LineChart, LineChartProps } from './line-chart';\nexport { default as Link, LinkProps } from './link';\nexport { default as LiveRegion, LiveRegionProps } from './live-region';\nexport { default as MixedLineBarChart, MixedLineBarChartProps } from './mixed-line-bar-chart';\nexport { default as Modal, ModalProps } from './modal';\nexport { default as Multiselect, MultiselectProps } from './multiselect';\nexport { default as Pagination, PaginationProps } from './pagination';\nexport { default as PieChart, PieChartProps } from './pie-chart';\nexport { default as Popover, PopoverProps } from './popover';\nexport { default as ProgressBar, ProgressBarProps } from './progress-bar';\nexport { default as PromptInput, PromptInputProps } from './prompt-input';\nexport { default as PropertyFilter, PropertyFilterProps } from './property-filter';\nexport { default as RadioGroup, RadioGroupProps } from './radio-group';\nexport { default as S3ResourceSelector, S3ResourceSelectorProps } from './s3-resource-selector';\nexport { default as SegmentedControl, SegmentedControlProps } from './segmented-control';\nexport { default as Select, SelectProps } from './select';\nexport { default as SideNavigation, SideNavigationProps } from './side-navigation';\nexport { default as Slider, SliderProps } from './slider';\nexport { default as SpaceBetween, SpaceBetweenProps } from './space-between';\nexport { default as Spinner, SpinnerProps } from './spinner';\nexport { default as SplitPanel, SplitPanelProps } from './split-panel';\nexport { default as StatusIndicator, StatusIndicatorProps } from './status-indicator';\nexport { default as Steps, StepsProps } from './steps';\nexport { default as Table, TableProps } from './table';\nexport { default as Tabs, TabsProps } from './tabs';\nexport { default as TagEditor, TagEditorProps } from './tag-editor';\nexport { default as TextContent, TextContentProps } from './text-content';\nexport { default as TextFilter, TextFilterProps } from './text-filter';\nexport { default as Textarea, TextareaProps } from './textarea';\nexport { default as Tiles, TilesProps } from './tiles';\nexport { default as TimeInput, TimeInputProps } from './time-input';\nexport { default as Toggle, ToggleProps } from './toggle';\nexport { default as ToggleButton, ToggleButtonProps } from './toggle-button';\nexport { default as TokenGroup, TokenGroupProps } from './token-group';\nexport { default as TopNavigation, TopNavigationProps } from './top-navigation';\nexport { default as TutorialPanel, TutorialPanelProps } from './tutorial-panel';\nexport { default as Wizard, WizardProps } from './wizard';\nexport * from './interfaces';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/internal/analytics/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEtF,wBAAgB,gBAAgB,CAAC,aAAa,EAAE,cAAc,QAE7D;AACD,wBAAgB,qBAAqB,CAAC,kBAAkB,EAAE,mBAAmB,QAE5E;AACD,wBAAgB,mBAAmB,CAAC,gBAAgB,EAAE,iBAAiB,QAEtE;AAED;;;GAGG;AACH,eAAO,IAAI,aAAa,EAAE,cAoBzB,CAAC;AAEF;;;GAGG;AACH,eAAO,IAAI,kBAAkB,EAAE,mBAI9B,CAAC;AAEF,eAAO,IAAI,gBAAgB,EAAE,iBAI5B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/internal/analytics/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEtF,wBAAgB,gBAAgB,CAAC,aAAa,EAAE,cAAc,QAE7D;AACD,wBAAgB,qBAAqB,CAAC,kBAAkB,EAAE,mBAAmB,QAE5E;AACD,wBAAgB,mBAAmB,CAAC,gBAAgB,EAAE,iBAAiB,QAEtE;AAED;;;GAGG;AACH,eAAO,IAAI,aAAa,EAAE,cAoBzB,CAAC;AAEF;;;GAGG;AACH,eAAO,IAAI,kBAAkB,EAAE,mBAI9B,CAAC;AAEF,eAAO,IAAI,gBAAgB,EAAE,iBAM5B,CAAC"}
@@ -47,5 +47,6 @@ export let ComponentMetrics = {
47
47
  componentMounted() {
48
48
  return '';
49
49
  },
50
+ componentUpdated() { },
50
51
  };
51
52
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/internal/analytics/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,0BAA0B;AAI1B,MAAM,UAAU,gBAAgB,CAAC,aAA6B;IAC5D,aAAa,GAAG,aAAa,CAAC;AAChC,CAAC;AACD,MAAM,UAAU,qBAAqB,CAAC,kBAAuC;IAC3E,kBAAkB,GAAG,kBAAkB,CAAC;AAC1C,CAAC;AACD,MAAM,UAAU,mBAAmB,CAAC,gBAAmC;IACrE,gBAAgB,GAAG,gBAAgB,CAAC;AACtC,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,IAAI,aAAa,GAAmB;IACzC,WAAW;QACT,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,WAAW,KAAU,CAAC;IACtB,cAAc,KAAU,CAAC;IACzB,gBAAgB,KAAU,CAAC;IAC3B,eAAe,KAAU,CAAC;IAC1B,YAAY,KAAU,CAAC;IACvB,eAAe,KAAU,CAAC;IAC1B,kBAAkB,KAAU,CAAC;IAC7B,oBAAoB,KAAU,CAAC;IAC/B,eAAe,KAAU,CAAC;IAC1B,gBAAgB,KAAU,CAAC;IAC3B,kBAAkB,KAAU,CAAC;IAC7B,qBAAqB,KAAU,CAAC;IAChC,kBAAkB,KAAU,CAAC;IAC7B,mBAAmB,KAAU,CAAC;IAC9B,sBAAsB,KAAU,CAAC;CAClC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,IAAI,kBAAkB,GAAwB;IACnD,gBAAgB,KAAU,CAAC;IAC3B,kBAAkB,KAAU,CAAC;IAC7B,oBAAoB,KAAU,CAAC;CAChC,CAAC;AAEF,MAAM,CAAC,IAAI,gBAAgB,GAAsB;IAC/C,gBAAgB;QACd,OAAO,EAAE,CAAC;IACZ,CAAC;CACF,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/* istanbul ignore file */\n\nimport { IComponentMetrics, IFunnelMetrics, IPerformanceMetrics } from './interfaces';\n\nexport function setFunnelMetrics(funnelMetrics: IFunnelMetrics) {\n FunnelMetrics = funnelMetrics;\n}\nexport function setPerformanceMetrics(performanceMetrics: IPerformanceMetrics) {\n PerformanceMetrics = performanceMetrics;\n}\nexport function setComponentMetrics(componentMetrics: IComponentMetrics) {\n ComponentMetrics = componentMetrics;\n}\n\n/**\n * This is a stub implementation of the FunnelMetrics interface and will be replaced during\n * build time with the actual implementation.\n */\nexport let FunnelMetrics: IFunnelMetrics = {\n funnelStart(): string {\n return '';\n },\n\n funnelError(): void {},\n funnelComplete(): void {},\n funnelSuccessful(): void {},\n funnelCancelled(): void {},\n funnelChange(): void {},\n funnelStepStart(): void {},\n funnelStepComplete(): void {},\n funnelStepNavigation(): void {},\n funnelStepError(): void {},\n funnelStepChange(): void {},\n funnelSubStepStart(): void {},\n funnelSubStepComplete(): void {},\n funnelSubStepError(): void {},\n helpPanelInteracted(): void {},\n externalLinkInteracted(): void {},\n};\n\n/**\n * This is a stub implementation of the PerformanceMetrics interface and will be replaced during\n * build time with the actual implementation.\n */\nexport let PerformanceMetrics: IPerformanceMetrics = {\n tableInteraction(): void {},\n taskCompletionData(): void {},\n modalPerformanceData(): void {},\n};\n\nexport let ComponentMetrics: IComponentMetrics = {\n componentMounted(): string {\n return '';\n },\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/internal/analytics/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,0BAA0B;AAI1B,MAAM,UAAU,gBAAgB,CAAC,aAA6B;IAC5D,aAAa,GAAG,aAAa,CAAC;AAChC,CAAC;AACD,MAAM,UAAU,qBAAqB,CAAC,kBAAuC;IAC3E,kBAAkB,GAAG,kBAAkB,CAAC;AAC1C,CAAC;AACD,MAAM,UAAU,mBAAmB,CAAC,gBAAmC;IACrE,gBAAgB,GAAG,gBAAgB,CAAC;AACtC,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,IAAI,aAAa,GAAmB;IACzC,WAAW;QACT,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,WAAW,KAAU,CAAC;IACtB,cAAc,KAAU,CAAC;IACzB,gBAAgB,KAAU,CAAC;IAC3B,eAAe,KAAU,CAAC;IAC1B,YAAY,KAAU,CAAC;IACvB,eAAe,KAAU,CAAC;IAC1B,kBAAkB,KAAU,CAAC;IAC7B,oBAAoB,KAAU,CAAC;IAC/B,eAAe,KAAU,CAAC;IAC1B,gBAAgB,KAAU,CAAC;IAC3B,kBAAkB,KAAU,CAAC;IAC7B,qBAAqB,KAAU,CAAC;IAChC,kBAAkB,KAAU,CAAC;IAC7B,mBAAmB,KAAU,CAAC;IAC9B,sBAAsB,KAAU,CAAC;CAClC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,IAAI,kBAAkB,GAAwB;IACnD,gBAAgB,KAAU,CAAC;IAC3B,kBAAkB,KAAU,CAAC;IAC7B,oBAAoB,KAAU,CAAC;CAChC,CAAC;AAEF,MAAM,CAAC,IAAI,gBAAgB,GAAsB;IAC/C,gBAAgB;QACd,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,gBAAgB,KAAU,CAAC;CAC5B,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/* istanbul ignore file */\n\nimport { IComponentMetrics, IFunnelMetrics, IPerformanceMetrics } from './interfaces';\n\nexport function setFunnelMetrics(funnelMetrics: IFunnelMetrics) {\n FunnelMetrics = funnelMetrics;\n}\nexport function setPerformanceMetrics(performanceMetrics: IPerformanceMetrics) {\n PerformanceMetrics = performanceMetrics;\n}\nexport function setComponentMetrics(componentMetrics: IComponentMetrics) {\n ComponentMetrics = componentMetrics;\n}\n\n/**\n * This is a stub implementation of the FunnelMetrics interface and will be replaced during\n * build time with the actual implementation.\n */\nexport let FunnelMetrics: IFunnelMetrics = {\n funnelStart(): string {\n return '';\n },\n\n funnelError(): void {},\n funnelComplete(): void {},\n funnelSuccessful(): void {},\n funnelCancelled(): void {},\n funnelChange(): void {},\n funnelStepStart(): void {},\n funnelStepComplete(): void {},\n funnelStepNavigation(): void {},\n funnelStepError(): void {},\n funnelStepChange(): void {},\n funnelSubStepStart(): void {},\n funnelSubStepComplete(): void {},\n funnelSubStepError(): void {},\n helpPanelInteracted(): void {},\n externalLinkInteracted(): void {},\n};\n\n/**\n * This is a stub implementation of the PerformanceMetrics interface and will be replaced during\n * build time with the actual implementation.\n */\nexport let PerformanceMetrics: IPerformanceMetrics = {\n tableInteraction(): void {},\n taskCompletionData(): void {},\n modalPerformanceData(): void {},\n};\n\nexport let ComponentMetrics: IComponentMetrics = {\n componentMounted(): string {\n return '';\n },\n\n componentUpdated(): void {},\n};\n"]}
@@ -127,14 +127,24 @@ export interface IPerformanceMetrics {
127
127
  taskCompletionData: TaskCompletionDataMethod;
128
128
  modalPerformanceData: ModalPerformanceDataMethod;
129
129
  }
130
+ type JSONValue = string | number | boolean | null | undefined;
131
+ export interface JSONObject {
132
+ [key: string]: JSONObject | JSONValue;
133
+ }
130
134
  export interface ComponentMountedProps {
131
135
  componentName: string;
132
136
  taskInteractionId?: string;
133
- details: Record<string, string | boolean | number | undefined>;
137
+ componentConfiguration: JSONObject;
138
+ }
139
+ export interface ComponentUpdatedProps extends ComponentMountedProps {
140
+ taskInteractionId: string;
141
+ actionType: string;
134
142
  }
135
143
  export type ComponentMountedMethod = (props: ComponentMountedProps) => string;
144
+ export type ComponentUpdatedMethod = (props: ComponentUpdatedProps) => void;
136
145
  export interface IComponentMetrics {
137
146
  componentMounted: ComponentMountedMethod;
147
+ componentUpdated: ComponentUpdatedMethod;
138
148
  }
139
149
  export interface ModalPerformanceDataProps {
140
150
  timeToContentReadyInModal: number;
@@ -143,4 +153,5 @@ export interface ModalPerformanceDataProps {
143
153
  modalMetadata?: string;
144
154
  }
145
155
  export type ModalPerformanceDataMethod = (props: ModalPerformanceDataProps) => void;
156
+ export {};
146
157
  //# sourceMappingURL=interfaces.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../src/internal/analytics/interfaces.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,UAAU,GAAG,aAAa,GAAG,YAAY,GAAG,OAAO,CAAC;AAChE,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,eAAe,CAAC;AAC7F,MAAM,WAAW,iBAAiB;IAChC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,E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vC;AAED,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sBAAsB,EAAE,UAAU,CAAC;CACpC;AAED,MAAM,WAAW,qBAAsB,SAAQ,qBAAqB;IAClE,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,sBAAsB,GAAG,CAAC,KAAK,EAAE,qBAAqB,KAAK,MAAM,CAAC;AAC9E,MAAM,MAAM,sBAAsB,GAAG,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;AAC5E,MAAM,WAAW,iBAAiB;IAChC,gBAAgB,EAAE,sBAAsB,CAAC;IACzC,gBAAgB,EAAE,sBAAsB,CAAC;CAC1C;AAGD,MAAM,WAAW,yBAAyB;IAGxC,yBAAyB,EAAE,MAAM,CAAC;IAGlC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAG5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,MAAM,0BAA0B,GAAG,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../src/internal/analytics/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport type FunnelType = 'single-page' | 'multi-page' | 'modal';\nexport type FlowType = 'create' | 'edit' | 'delete' | 'home' | 'dashboard' | 'view-resource';\nexport interface AnalyticsMetadata {\n instanceIdentifier?: string;\n flowType?: FlowType;\n errorContext?: string;\n resourceType?: string;\n}\n\n// Common properties for all funnels\nexport interface BaseFunnelProps {\n funnelIdentifier?: string;\n funnelInteractionId: string;\n currentDocument?: Document;\n}\n\nexport interface FunnelErrorProps extends BaseFunnelProps {\n funnelErrorContext?: string;\n}\n\nexport interface FunnelStartProps extends Omit<BaseFunnelProps, 'funnelInteractionId'> {\n flowType?: FlowType;\n resourceType?: string;\n funnelName: string;\n funnelNameSelector: string;\n totalFunnelSteps: number;\n optionalStepNumbers: number[];\n stepConfiguration?: StepConfiguration[];\n funnelType: FunnelType;\n funnelVersion: string;\n componentVersion: string;\n componentTheme: string;\n funnelInteractionId?: string;\n}\n\n// A function type for a generic funnel method\nexport type FunnelMethod<T extends BaseFunnelProps> = (props: T) => void;\n\n// Interface for table interaction method props\nexport interface TableInteractionProps {\n // Time to render table in either no data state or with data after user actions like filtering, pagination.\n // in milliseconds\n interactionTime: number;\n // User action like sorting, filtering, pagination which triggered new data load in table.\n userAction: string;\n // Unique instance identifier for the component.\n // Default: ''\n instanceIdentifier?: string;\n // Component identifier like table header which can be used to identify the table\n // Default: ''\n componentIdentifier?: string;\n // Number of resources in table after user action\n // Default: 0\n noOfResourcesInTable?: number;\n // Additional metadata related to user interaction\n interactionMetadata?: string;\n}\n\nexport type TableInteractionMethod = (props: TableInteractionProps) => void;\n\n// A function type specifically for funnelStart\nexport type FunnelStartMethod = (props: FunnelStartProps) => string;\n\n// Define individual method props by extending the base\nexport interface FunnelStepProps extends BaseFunnelProps {\n stepIdentifier?: string;\n stepNumber: number;\n stepName?: string | undefined;\n stepNameSelector?: string;\n subStepAllSelector: string;\n totalSubSteps?: number;\n subStepConfiguration?: SubStepConfiguration[];\n}\n\nexport interface FunnelStepNavigationProps extends FunnelStepProps {\n destinationStepNumber: number;\n navigationType: string;\n totalSubSteps?: number;\n}\n\nexport interface FunnelStepErrorProps extends FunnelStepProps {\n stepErrorContext?: string;\n stepErrorSelector: string;\n}\n\nexport interface FunnelSubStepProps extends FunnelStepProps {\n subStepIdentifier?: string;\n subStepSelector: string;\n subStepName?: string | undefined;\n subStepNameSelector: string;\n subStepNumber?: number;\n}\n\nexport interface FunnelSubStepErrorProps extends FunnelSubStepProps {\n subStepErrorContext?: string;\n fieldIdentifier?: string;\n fieldErrorContext?: string;\n fieldLabelSelector: string;\n fieldErrorSelector: string;\n}\n\nexport interface OptionalFunnelSubStepErrorProps extends FunnelSubStepProps {\n subStepErrorContext?: string;\n fieldIdentifier?: string;\n fieldErrorContext?: string;\n fieldLabelSelector?: string;\n fieldErrorSelector?: string;\n}\n\nexport interface FunnelLinkInteractionProps extends FunnelSubStepProps {\n elementSelector: string;\n}\n\nexport interface FunnelChangeProps extends BaseFunnelProps {\n stepConfiguration: StepConfiguration[];\n}\n\nexport interface StepConfiguration {\n number: number;\n name: string;\n isOptional: boolean;\n stepIdentifier?: string;\n}\n\nexport interface SubStepConfiguration {\n number: number;\n name: string;\n subStepIdentifier?: string;\n}\n\n// Define the interface using the method type\nexport interface IFunnelMetrics {\n funnelStart: FunnelStartMethod;\n funnelError: FunnelMethod<FunnelErrorProps>;\n funnelComplete: FunnelMethod<BaseFunnelProps>;\n funnelSuccessful: FunnelMethod<BaseFunnelProps>;\n funnelCancelled: FunnelMethod<BaseFunnelProps>;\n funnelChange: FunnelMethod<FunnelChangeProps>;\n\n funnelStepStart: FunnelMethod<FunnelStepProps>;\n funnelStepComplete: FunnelMethod<FunnelStepProps>;\n funnelStepNavigation: FunnelMethod<FunnelStepNavigationProps>;\n funnelStepError: FunnelMethod<FunnelStepErrorProps>;\n funnelStepChange: FunnelMethod<FunnelStepProps>;\n\n funnelSubStepStart: FunnelMethod<FunnelSubStepProps>;\n funnelSubStepComplete: FunnelMethod<FunnelSubStepProps>;\n funnelSubStepError: FunnelMethod<OptionalFunnelSubStepErrorProps>;\n\n helpPanelInteracted: FunnelMethod<FunnelLinkInteractionProps>;\n externalLinkInteracted: FunnelMethod<FunnelLinkInteractionProps>;\n}\n\n// Interface for task completion method props\nexport interface TaskCompletionDataProps {\n // Time taken to respond to customers after customers submit the form\n // in milliseconds\n timeToRespondAfterFormSubmit: number;\n // Unique identifier for the task aka funnelInteractionId.\n // Default: ''\n taskInteractionId: string;\n // Task name identifier to identify the task aka funnelName\n // Default: ''\n taskIdentifier?: string;\n // To identify create or edit flow\n // Default: ''\n taskFlowType?: string;\n //\"single-page\" | \"multi-page\"\n // Default: ''\n taskType?: FunnelType;\n // Additional metadata related to completion such as success or error\n completionMetadata?: string;\n}\n\nexport type TaskCompletionDataMethod = (props: TaskCompletionDataProps) => void;\n\nexport interface IPerformanceMetrics {\n tableInteraction: TableInteractionMethod;\n taskCompletionData: TaskCompletionDataMethod;\n modalPerformanceData: ModalPerformanceDataMethod;\n}\n\nexport interface ComponentMountedProps {\n componentName: string;\n taskInteractionId?: string;\n details: Record<string, string | boolean | number | undefined>;\n}\nexport type ComponentMountedMethod = (props: ComponentMountedProps) => string;\nexport interface IComponentMetrics {\n componentMounted: ComponentMountedMethod;\n}\n\n// Interface for modal metrics\nexport interface ModalPerformanceDataProps {\n // Time span from when the modal begins loading to when the primary button or modal has finished loading.\n // in milliseconds\n timeToContentReadyInModal: number;\n // Unique instance identifier for the component.\n // Default: ''\n instanceIdentifier?: string;\n // Component identifier like modal header which can be used to identify the modal\n // Default: ''\n componentIdentifier?: string;\n // Additional metadata related to modal\n modalMetadata?: string;\n}\n\nexport type ModalPerformanceDataMethod = (props: ModalPerformanceDataProps) => void;\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../src/internal/analytics/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport type FunnelType = 'single-page' | 'multi-page' | 'modal';\nexport type FlowType = 'create' | 'edit' | 'delete' | 'home' | 'dashboard' | 'view-resource';\nexport interface AnalyticsMetadata {\n instanceIdentifier?: string;\n flowType?: FlowType;\n errorContext?: string;\n resourceType?: string;\n}\n\n// Common properties for all funnels\nexport interface BaseFunnelProps {\n funnelIdentifier?: string;\n funnelInteractionId: string;\n currentDocument?: Document;\n}\n\nexport interface FunnelErrorProps extends BaseFunnelProps {\n funnelErrorContext?: string;\n}\n\nexport interface FunnelStartProps extends Omit<BaseFunnelProps, 'funnelInteractionId'> {\n flowType?: FlowType;\n resourceType?: string;\n funnelName: string;\n funnelNameSelector: string;\n totalFunnelSteps: number;\n optionalStepNumbers: number[];\n stepConfiguration?: StepConfiguration[];\n funnelType: FunnelType;\n funnelVersion: string;\n componentVersion: string;\n componentTheme: string;\n funnelInteractionId?: string;\n}\n\n// A function type for a generic funnel method\nexport type FunnelMethod<T extends BaseFunnelProps> = (props: T) => void;\n\n// Interface for table interaction method props\nexport interface TableInteractionProps {\n // Time to render table in either no data state or with data after user actions like filtering, pagination.\n // in milliseconds\n interactionTime: number;\n // User action like sorting, filtering, pagination which triggered new data load in table.\n userAction: string;\n // Unique instance identifier for the component.\n // Default: ''\n instanceIdentifier?: string;\n // Component identifier like table header which can be used to identify the table\n // Default: ''\n componentIdentifier?: string;\n // Number of resources in table after user action\n // Default: 0\n noOfResourcesInTable?: number;\n // Additional metadata related to user interaction\n interactionMetadata?: string;\n}\n\nexport type TableInteractionMethod = (props: TableInteractionProps) => void;\n\n// A function type specifically for funnelStart\nexport type FunnelStartMethod = (props: FunnelStartProps) => string;\n\n// Define individual method props by extending the base\nexport interface FunnelStepProps extends BaseFunnelProps {\n stepIdentifier?: string;\n stepNumber: number;\n stepName?: string | undefined;\n stepNameSelector?: string;\n subStepAllSelector: string;\n totalSubSteps?: number;\n subStepConfiguration?: SubStepConfiguration[];\n}\n\nexport interface FunnelStepNavigationProps extends FunnelStepProps {\n destinationStepNumber: number;\n navigationType: string;\n totalSubSteps?: number;\n}\n\nexport interface FunnelStepErrorProps extends FunnelStepProps {\n stepErrorContext?: string;\n stepErrorSelector: string;\n}\n\nexport interface FunnelSubStepProps extends FunnelStepProps {\n subStepIdentifier?: string;\n subStepSelector: string;\n subStepName?: string | undefined;\n subStepNameSelector: string;\n subStepNumber?: number;\n}\n\nexport interface FunnelSubStepErrorProps extends FunnelSubStepProps {\n subStepErrorContext?: string;\n fieldIdentifier?: string;\n fieldErrorContext?: string;\n fieldLabelSelector: string;\n fieldErrorSelector: string;\n}\n\nexport interface OptionalFunnelSubStepErrorProps extends FunnelSubStepProps {\n subStepErrorContext?: string;\n fieldIdentifier?: string;\n fieldErrorContext?: string;\n fieldLabelSelector?: string;\n fieldErrorSelector?: string;\n}\n\nexport interface FunnelLinkInteractionProps extends FunnelSubStepProps {\n elementSelector: string;\n}\n\nexport interface FunnelChangeProps extends BaseFunnelProps {\n stepConfiguration: StepConfiguration[];\n}\n\nexport interface StepConfiguration {\n number: number;\n name: string;\n isOptional: boolean;\n stepIdentifier?: string;\n}\n\nexport interface SubStepConfiguration {\n number: number;\n name: string;\n subStepIdentifier?: string;\n}\n\n// Define the interface using the method type\nexport interface IFunnelMetrics {\n funnelStart: FunnelStartMethod;\n funnelError: FunnelMethod<FunnelErrorProps>;\n funnelComplete: FunnelMethod<BaseFunnelProps>;\n funnelSuccessful: FunnelMethod<BaseFunnelProps>;\n funnelCancelled: FunnelMethod<BaseFunnelProps>;\n funnelChange: FunnelMethod<FunnelChangeProps>;\n\n funnelStepStart: FunnelMethod<FunnelStepProps>;\n funnelStepComplete: FunnelMethod<FunnelStepProps>;\n funnelStepNavigation: FunnelMethod<FunnelStepNavigationProps>;\n funnelStepError: FunnelMethod<FunnelStepErrorProps>;\n funnelStepChange: FunnelMethod<FunnelStepProps>;\n\n funnelSubStepStart: FunnelMethod<FunnelSubStepProps>;\n funnelSubStepComplete: FunnelMethod<FunnelSubStepProps>;\n funnelSubStepError: FunnelMethod<OptionalFunnelSubStepErrorProps>;\n\n helpPanelInteracted: FunnelMethod<FunnelLinkInteractionProps>;\n externalLinkInteracted: FunnelMethod<FunnelLinkInteractionProps>;\n}\n\n// Interface for task completion method props\nexport interface TaskCompletionDataProps {\n // Time taken to respond to customers after customers submit the form\n // in milliseconds\n timeToRespondAfterFormSubmit: number;\n // Unique identifier for the task aka funnelInteractionId.\n // Default: ''\n taskInteractionId: string;\n // Task name identifier to identify the task aka funnelName\n // Default: ''\n taskIdentifier?: string;\n // To identify create or edit flow\n // Default: ''\n taskFlowType?: string;\n //\"single-page\" | \"multi-page\"\n // Default: ''\n taskType?: FunnelType;\n // Additional metadata related to completion such as success or error\n completionMetadata?: string;\n}\n\nexport type TaskCompletionDataMethod = (props: TaskCompletionDataProps) => void;\n\nexport interface IPerformanceMetrics {\n tableInteraction: TableInteractionMethod;\n taskCompletionData: TaskCompletionDataMethod;\n modalPerformanceData: ModalPerformanceDataMethod;\n}\n\ntype JSONValue = string | number | boolean | null | undefined;\nexport interface JSONObject {\n [key: string]: JSONObject | JSONValue;\n}\n\nexport interface ComponentMountedProps {\n componentName: string;\n taskInteractionId?: string;\n componentConfiguration: JSONObject;\n}\n\nexport interface ComponentUpdatedProps extends ComponentMountedProps {\n taskInteractionId: string;\n actionType: string;\n}\n\nexport type ComponentMountedMethod = (props: ComponentMountedProps) => string;\nexport type ComponentUpdatedMethod = (props: ComponentUpdatedProps) => void;\nexport interface IComponentMetrics {\n componentMounted: ComponentMountedMethod;\n componentUpdated: ComponentUpdatedMethod;\n}\n\n// Interface for modal metrics\nexport interface ModalPerformanceDataProps {\n // Time span from when the modal begins loading to when the primary button or modal has finished loading.\n // in milliseconds\n timeToContentReadyInModal: number;\n // Unique instance identifier for the component.\n // Default: ''\n instanceIdentifier?: string;\n // Component identifier like modal header which can be used to identify the modal\n // Default: ''\n componentIdentifier?: string;\n // Additional metadata related to modal\n modalMetadata?: string;\n}\n\nexport type ModalPerformanceDataMethod = (props: ModalPerformanceDataProps) => void;\n"]}
@@ -244,8 +244,8 @@
244
244
  --color-background-loading-bar-gen-ai-7qfi9s:linear-gradient(90deg, #99f7ff 0%, #0096fa 10%, #bf80ff 24%, #7300e5 50%, #bf80ff 76%, #0096fa 90%, #99f7ff 100%);
245
245
  --color-background-chat-bubble-outgoing-pfqan2:transparent;
246
246
  --color-background-chat-bubble-incoming-brq006:#f3f3f7;
247
- --color-text-chat-bubble-outgoing-bvbr0v:#0f141a;
248
- --color-text-chat-bubble-incoming-x2kig8:#0f141a;
247
+ --color-text-chat-bubble-outgoing-25z5e0:#424650;
248
+ --color-text-chat-bubble-incoming-t2slde:#424650;
249
249
  --color-border-button-normal-active-mn0ayd:#002b66;
250
250
  --color-border-button-normal-default-uzqi0v:#006ce0;
251
251
  --color-border-toggle-button-normal-pressed-lylxt2:#006ce0;
@@ -497,7 +497,7 @@
497
497
  --border-radius-tabs-focus-ring-1q0rjo:20px;
498
498
  --border-radius-tiles-60y8e6:8px;
499
499
  --border-radius-token-923jqq:8px;
500
- --border-radius-chat-bubble-ur269r:2px;
500
+ --border-radius-chat-bubble-qvkt36:8px;
501
501
  --border-radius-tutorial-panel-item-b44p0a:8px;
502
502
  --border-table-sticky-width-87kf12:1px;
503
503
  --border-link-focus-ring-outline-kkfop6:0;
@@ -875,8 +875,8 @@
875
875
  --color-background-toggle-checked-disabled-wk1i1j:#002b66;
876
876
  --color-background-toggle-default-ywflhx:#8c8c94;
877
877
  --color-background-chat-bubble-incoming-brq006:#131920;
878
- --color-text-chat-bubble-outgoing-bvbr0v:#c6c6cd;
879
- --color-text-chat-bubble-incoming-x2kig8:#c6c6cd;
878
+ --color-text-chat-bubble-outgoing-25z5e0:#c6c6cd;
879
+ --color-text-chat-bubble-incoming-t2slde:#c6c6cd;
880
880
  --color-border-button-normal-active-mn0ayd:#75cfff;
881
881
  --color-border-button-normal-default-uzqi0v:#42b4ff;
882
882
  --color-border-toggle-button-normal-pressed-lylxt2:#42b4ff;
@@ -1187,8 +1187,8 @@
1187
1187
  --color-background-toggle-checked-disabled-wk1i1j:#002b66;
1188
1188
  --color-background-toggle-default-ywflhx:#8c8c94;
1189
1189
  --color-background-chat-bubble-incoming-brq006:#131920;
1190
- --color-text-chat-bubble-outgoing-bvbr0v:#c6c6cd;
1191
- --color-text-chat-bubble-incoming-x2kig8:#c6c6cd;
1190
+ --color-text-chat-bubble-outgoing-25z5e0:#c6c6cd;
1191
+ --color-text-chat-bubble-incoming-t2slde:#c6c6cd;
1192
1192
  --color-border-button-normal-active-mn0ayd:#75cfff;
1193
1193
  --color-border-button-normal-default-uzqi0v:#42b4ff;
1194
1194
  --color-border-toggle-button-normal-pressed-lylxt2:#42b4ff;
@@ -1393,8 +1393,8 @@
1393
1393
  --color-background-toggle-checked-disabled-wk1i1j:#002b66;
1394
1394
  --color-background-toggle-default-ywflhx:#8c8c94;
1395
1395
  --color-background-chat-bubble-incoming-brq006:#131920;
1396
- --color-text-chat-bubble-outgoing-bvbr0v:#c6c6cd;
1397
- --color-text-chat-bubble-incoming-x2kig8:#c6c6cd;
1396
+ --color-text-chat-bubble-outgoing-25z5e0:#c6c6cd;
1397
+ --color-text-chat-bubble-incoming-t2slde:#c6c6cd;
1398
1398
  --color-border-button-normal-active-mn0ayd:#75cfff;
1399
1399
  --color-border-button-normal-default-uzqi0v:#42b4ff;
1400
1400
  --color-border-toggle-button-normal-pressed-lylxt2:#42b4ff;
@@ -1556,8 +1556,6 @@
1556
1556
  --color-background-button-primary-hover-0qidjj:#ffffff;
1557
1557
  --color-background-segment-default-voaiuw:transparent;
1558
1558
  --color-background-segment-hover-jbzuvp:transparent;
1559
- --color-text-chat-bubble-outgoing-bvbr0v:#f9f9fa;
1560
- --color-text-chat-bubble-incoming-x2kig8:#f9f9fa;
1561
1559
  --color-border-button-normal-active-mn0ayd:#ffffff;
1562
1560
  --color-border-button-normal-default-uzqi0v:#f9f9fa;
1563
1561
  --color-border-button-normal-hover-2d2g0m:#ffffff;
@@ -1701,8 +1699,8 @@
1701
1699
  --color-background-toggle-checked-disabled-wk1i1j:#002b66;
1702
1700
  --color-background-toggle-default-ywflhx:#8c8c94;
1703
1701
  --color-background-chat-bubble-incoming-brq006:#131920;
1704
- --color-text-chat-bubble-outgoing-bvbr0v:#c6c6cd;
1705
- --color-text-chat-bubble-incoming-x2kig8:#c6c6cd;
1702
+ --color-text-chat-bubble-outgoing-25z5e0:#c6c6cd;
1703
+ --color-text-chat-bubble-incoming-t2slde:#c6c6cd;
1706
1704
  --color-border-button-normal-active-mn0ayd:#ffffff;
1707
1705
  --color-border-button-normal-default-uzqi0v:#dedee3;
1708
1706
  --color-border-toggle-button-normal-pressed-lylxt2:#42b4ff;
@@ -1846,16 +1844,12 @@
1846
1844
 
1847
1845
  @media not print {
1848
1846
  .awsui-dark-mode .awsui-context-flashbar-warning:not(#\9) {
1849
- --color-text-chat-bubble-outgoing-bvbr0v:#0f141a;
1850
- --color-text-chat-bubble-incoming-x2kig8:#0f141a;
1851
1847
  --color-text-body-default-7v1jfn:#0f141a;
1852
1848
  --color-text-expandable-section-default-7w1jwq:#0f141a;
1853
1849
  }
1854
1850
  }
1855
1851
  @media not print {
1856
1852
  .awsui-context-flashbar-warning.awsui-dark-mode:not(#\9) {
1857
- --color-text-chat-bubble-outgoing-bvbr0v:#0f141a;
1858
- --color-text-chat-bubble-incoming-x2kig8:#0f141a;
1859
1853
  --color-text-body-default-7v1jfn:#0f141a;
1860
1854
  --color-text-expandable-section-default-7w1jwq:#0f141a;
1861
1855
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/chart-plot/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAMjF,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAUvC,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,aAAa,CAAC;IACnB,SAAS,IAAI,IAAI,CAAC;IAClB,gBAAgB,IAAI,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CA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C;CAC3B;AAED;;;;;;;;;EASE;;AACF,wBAAqC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/chart-plot/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAOjF,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AASvC,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,aAAa,CAAC;IACnB,SAAS,IAAI,IAAI,CAAC;IAClB,gBAAgB,IAAI,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,gBAAgB,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACpD,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAChD,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,IAAI,CAAC;IAC3D,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,IAAI,CAAC;IAC/D,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,IAAI,CAAC;IAC9D,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,OAAO,GAAG,UAAU,KAAK,IAAI,CAAC;IACnG,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACnE,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC9D,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;;EASE;;AACF,wBAAqC"}
@@ -3,9 +3,9 @@
3
3
  import React, { forwardRef, useImperativeHandle, useRef, useState } from 'react';
4
4
  import clsx from 'clsx';
5
5
  import { useInternalI18n } from '../../../i18n/context';
6
+ import InternalLiveRegion from '../../../live-region/internal';
6
7
  import { useUniqueId } from '../../hooks/use-unique-id';
7
8
  import { KeyCode } from '../../keycode';
8
- import InternalLiveRegion from '../live-region/internal';
9
9
  import ApplicationController from './application-controller';
10
10
  import FocusOutline from './focus-outline';
11
11
  import styles from './styles.css.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/chart-plot/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjF,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB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B,IAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAC,MAAM,IAC7C,cAAc,CACI,CACpB,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, useImperativeHandle, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useInternalI18n } from '../../../i18n/context';\nimport { useUniqueId } from '../../hooks/use-unique-id';\nimport { KeyCode } from '../../keycode';\nimport { Offset } from '../interfaces';\nimport InternalLiveRegion from '../live-region/internal';\nimport ApplicationController, { ApplicationRef } from './application-controller';\nimport FocusOutline from './focus-outline';\n\nimport styles from './styles.css.js';\n\nconst DEFAULT_PLOT_FOCUS_OFFSET = 3;\nconst DEFAULT_ELEMENT_FOCUS_OFFSET = 3;\n\nexport interface ChartPlotRef {\n svg: SVGSVGElement;\n focusPlot(): void;\n focusApplication(): void;\n}\n\nexport interface ChartPlotProps {\n width: number | string;\n height: number | string;\n transform?: string;\n offsetTop?: number;\n offsetBottom?: number;\n offsetLeft?: number;\n offsetRight?: number;\n focusOffset?: number;\n ariaLabel?: string;\n ariaLabelledby?: string;\n ariaDescription?: string;\n ariaDescribedby?: string;\n ariaRoleDescription?: string;\n activeElementKey?: null | string | number | boolean;\n activeElementRef?: React.RefObject<SVGGElement>;\n activeElementFocusOffset?: Offset;\n ariaLiveRegion?: string;\n isClickable?: boolean;\n isPrecise?: boolean;\n onClick?: (event: React.MouseEvent<SVGSVGElement>) => void;\n onMouseMove?: (event: React.MouseEvent<SVGSVGElement>) => void;\n onMouseOut?: (event: React.MouseEvent<SVGSVGElement>) => void;\n onApplicationFocus?: (event: React.FocusEvent<SVGGElement>, trigger: 'mouse' | 'keyboard') => void;\n onApplicationBlur?: (event: React.FocusEvent<SVGGElement>) => void;\n onKeyDown?: (event: React.KeyboardEvent<SVGGElement>) => void;\n children: React.ReactNode;\n}\n\n/**\n An extension for the SVG to be used for charts. It includes a controller element to\n handle the focus and keyboard interactions in a way that is supported by screen readers.\n\n The application mimics the aria-activedescendant behavior which is unsupported by Safari. The\n activeElementRef is the pointer to the secondary-focus element and activeElementKey denotes when\n the focus transition was made.\n\n Alternatively, ariaLiveRegion can be used to make announcements.\n*/\nexport default forwardRef(ChartPlot);\n\nfunction ChartPlot(\n {\n width,\n height,\n transform,\n offsetTop,\n offsetBottom,\n offsetLeft,\n offsetRight,\n ariaLabel,\n ariaLabelledby,\n ariaRoleDescription,\n ariaDescription,\n ariaDescribedby,\n activeElementKey,\n activeElementRef,\n ariaLiveRegion,\n isClickable,\n isPrecise,\n children,\n onClick,\n onKeyDown,\n focusOffset = DEFAULT_PLOT_FOCUS_OFFSET,\n activeElementFocusOffset = DEFAULT_ELEMENT_FOCUS_OFFSET,\n onMouseMove,\n onMouseOut,\n onApplicationBlur,\n onApplicationFocus,\n }: ChartPlotProps,\n ref: React.Ref<ChartPlotRef>\n) {\n const i18n = useInternalI18n('[charts]');\n const svgRef = useRef<SVGSVGElement>(null);\n const applicationRef = useRef<ApplicationRef>(null);\n const plotClickedRef = useRef(false);\n const [isPlotFocused, setPlotFocused] = useState(false);\n const [isApplicationFocused, setApplicationFocused] = useState(false);\n\n const internalDescriptionId = useUniqueId('awsui-chart-plot__description');\n const ariaDescriptionId = [ariaDescription && internalDescriptionId, ariaDescribedby].filter(Boolean).join(' ');\n\n useImperativeHandle(ref, () => ({\n svg: svgRef.current!,\n focusPlot: () => svgRef.current!.focus(),\n focusApplication: () => applicationRef.current!.focus(),\n }));\n\n const onPlotMouseDown = () => {\n // Record the click was made for the application focus handler.\n plotClickedRef.current = true;\n };\n const onPlotFocus = (event: React.FocusEvent<SVGSVGElement>) => {\n // If focused via click or an element was highlighted,\n // focus the internal application, which will manage and show focus accordingly on its internal elements.\n if (plotClickedRef.current || !!activeElementKey) {\n applicationRef.current!.focus();\n } else if (event.target === svgRef.current) {\n // Otherwise, focus the entire plot if it was focused with the keyboard.\n setPlotFocused(true);\n }\n };\n const onPlotClick = (event: React.MouseEvent<SVGSVGElement, MouseEvent>) => {\n onClick && onClick(event);\n };\n const onPlotBlur = (event: React.FocusEvent<SVGSVGElement>) => {\n if (event.target === svgRef.current) {\n setPlotFocused(false);\n }\n };\n // Once one of the expected keys is pressed the focus is delegated to the application controller.\n const onPlotKeyDown = (event: React.KeyboardEvent) => {\n if (isPlotFocused) {\n // Delegate the focus to the application if one of the expected keys was pressed.\n const codes = [KeyCode.space, KeyCode.enter, KeyCode.up, KeyCode.left, KeyCode.right, KeyCode.down];\n if (codes.indexOf(event.keyCode) !== -1) {\n applicationRef.current!.focus();\n }\n }\n };\n\n const onPlotApplicationFocus = (event: React.FocusEvent<SVGGElement>) => {\n onApplicationFocus && onApplicationFocus(event, plotClickedRef.current ? 'mouse' : 'keyboard');\n // \"Release\" the click reference to not affect the next call of this handler.\n plotClickedRef.current = false;\n setApplicationFocused(true);\n };\n const onPlotApplicationBlur = (event: React.FocusEvent<SVGGElement>) => {\n onApplicationBlur && onApplicationBlur(event);\n setApplicationFocused(false);\n };\n const onApplicationKeyDown = onKeyDown;\n\n const plotFocusable = !isApplicationFocused;\n const plotTabIndex = plotFocusable ? 0 : -1;\n const plotAria = !isApplicationFocused\n ? {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescriptionId,\n 'aria-roledescription': i18n('i18nStrings.chartAriaRoleDescription', ariaRoleDescription),\n }\n : {};\n\n return (\n <>\n <svg\n onMouseMove={onMouseMove}\n onMouseOut={onMouseOut}\n focusable={plotFocusable}\n tabIndex={plotTabIndex}\n role=\"application\"\n aria-hidden=\"false\"\n {...plotAria}\n ref={svgRef}\n style={{\n width,\n height,\n marginTop: offsetTop,\n marginBottom: offsetBottom,\n marginLeft: offsetLeft,\n marginRight: offsetRight,\n }}\n className={clsx(styles.root, {\n [styles.clickable]: isClickable,\n [styles.precise]: isPrecise,\n })}\n onMouseDown={onPlotMouseDown}\n onClick={onPlotClick}\n onFocus={onPlotFocus}\n onBlur={onPlotBlur}\n onKeyDown={onPlotKeyDown}\n >\n <FocusOutline elementRef={svgRef} elementKey={isPlotFocused} offset={focusOffset} />\n\n <g transform={transform}>\n <ApplicationController\n activeElementKey={(isApplicationFocused && activeElementKey) || null}\n activeElementRef={activeElementRef}\n ref={applicationRef}\n onFocus={onPlotApplicationFocus}\n onBlur={onPlotApplicationBlur}\n onKeyDown={onApplicationKeyDown}\n />\n\n {/* Only show description when plot is focusable to avoid repetition in Safari and Firefox */}\n {ariaDescription && plotFocusable && (\n <desc aria-hidden=\"true\" id={internalDescriptionId}>\n {ariaDescription}\n </desc>\n )}\n\n {children}\n\n <FocusOutline\n elementRef={activeElementRef}\n elementKey={isApplicationFocused && activeElementKey}\n offset={activeElementFocusOffset}\n />\n </g>\n </svg>\n\n <InternalLiveRegion hidden={true} tagName=\"span\">\n {ariaLiveRegion}\n </InternalLiveRegion>\n </>\n );\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/chart-plot/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjF,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,kBAAkB,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,qBAAyC,MAAM,0BAA0B,CAAC;AACjF,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAE3C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,yBAAyB,GAAG,CAAC,CAAC;AACpC,MAAM,4BAA4B,GAAG,CAAC,CAAC;AAqCvC;;;;;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AC,IAAI,EAAE;gBAC3B,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,WAAW;gBAC/B,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,SAAS;aAC5B,CAAC,EACF,WAAW,EAAE,eAAe,EAC5B,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,aAAa;YAExB,oBAAC,YAAY,IAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,GAAI;YAEpF,2BAAG,SAAS,EAAE,SAAS;gBACrB,oBAAC,qBAAqB,IACpB,gBAAgB,EAAE,CAAC,oBAAoB,IAAI,gBAAgB,CAAC,IAAI,IAAI,EACpE,gBAAgB,EAAE,gBAAgB,EAClC,GAAG,EAAE,cAAc,EACnB,OAAO,EAAE,sBAAsB,EAC/B,MAAM,EAAE,qBAAqB,EAC7B,SAAS,EAAE,oBAAoB,GAC/B;gBAGD,eAAe,IAAI,aAAa,IAAI,CACnC,6CAAkB,MAAM,EAAC,EAAE,EAAE,qBAAqB,IAC/C,eAAe,CACX,CACR;gBAEA,QAAQ;gBAET,oBAAC,YAAY,IACX,UAAU,EAAE,gBAAgB,EAC5B,UAAU,EAAE,oBAAoB,IAAI,gBAAgB,EACpD,MAAM,EAAE,wBAAwB,GAChC,CACA,CACA;QAEN,oBAAC,kBAAkB,IAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAC,MAAM,IAC7C,cAAc,CACI,CACpB,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, useImperativeHandle, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useInternalI18n } from '../../../i18n/context';\nimport InternalLiveRegion from '../../../live-region/internal';\nimport { useUniqueId } from '../../hooks/use-unique-id';\nimport { KeyCode } from '../../keycode';\nimport { Offset } from '../interfaces';\nimport ApplicationController, { ApplicationRef } from './application-controller';\nimport FocusOutline from './focus-outline';\n\nimport styles from './styles.css.js';\n\nconst DEFAULT_PLOT_FOCUS_OFFSET = 3;\nconst DEFAULT_ELEMENT_FOCUS_OFFSET = 3;\n\nexport interface ChartPlotRef {\n svg: SVGSVGElement;\n focusPlot(): void;\n focusApplication(): void;\n}\n\nexport interface ChartPlotProps {\n width: number | string;\n height: number | string;\n transform?: string;\n offsetTop?: number;\n offsetBottom?: number;\n offsetLeft?: number;\n offsetRight?: number;\n focusOffset?: number;\n ariaLabel?: string;\n ariaLabelledby?: string;\n ariaDescription?: string;\n ariaDescribedby?: string;\n ariaRoleDescription?: string;\n activeElementKey?: null | string | number | boolean;\n activeElementRef?: React.RefObject<SVGGElement>;\n activeElementFocusOffset?: Offset;\n ariaLiveRegion?: string;\n isClickable?: boolean;\n isPrecise?: boolean;\n onClick?: (event: React.MouseEvent<SVGSVGElement>) => void;\n onMouseMove?: (event: React.MouseEvent<SVGSVGElement>) => void;\n onMouseOut?: (event: React.MouseEvent<SVGSVGElement>) => void;\n onApplicationFocus?: (event: React.FocusEvent<SVGGElement>, trigger: 'mouse' | 'keyboard') => void;\n onApplicationBlur?: (event: React.FocusEvent<SVGGElement>) => void;\n onKeyDown?: (event: React.KeyboardEvent<SVGGElement>) => void;\n children: React.ReactNode;\n}\n\n/**\n An extension for the SVG to be used for charts. It includes a controller element to\n handle the focus and keyboard interactions in a way that is supported by screen readers.\n\n The application mimics the aria-activedescendant behavior which is unsupported by Safari. The\n activeElementRef is the pointer to the secondary-focus element and activeElementKey denotes when\n the focus transition was made.\n\n Alternatively, ariaLiveRegion can be used to make announcements.\n*/\nexport default forwardRef(ChartPlot);\n\nfunction ChartPlot(\n {\n width,\n height,\n transform,\n offsetTop,\n offsetBottom,\n offsetLeft,\n offsetRight,\n ariaLabel,\n ariaLabelledby,\n ariaRoleDescription,\n ariaDescription,\n ariaDescribedby,\n activeElementKey,\n activeElementRef,\n ariaLiveRegion,\n isClickable,\n isPrecise,\n children,\n onClick,\n onKeyDown,\n focusOffset = DEFAULT_PLOT_FOCUS_OFFSET,\n activeElementFocusOffset = DEFAULT_ELEMENT_FOCUS_OFFSET,\n onMouseMove,\n onMouseOut,\n onApplicationBlur,\n onApplicationFocus,\n }: ChartPlotProps,\n ref: React.Ref<ChartPlotRef>\n) {\n const i18n = useInternalI18n('[charts]');\n const svgRef = useRef<SVGSVGElement>(null);\n const applicationRef = useRef<ApplicationRef>(null);\n const plotClickedRef = useRef(false);\n const [isPlotFocused, setPlotFocused] = useState(false);\n const [isApplicationFocused, setApplicationFocused] = useState(false);\n\n const internalDescriptionId = useUniqueId('awsui-chart-plot__description');\n const ariaDescriptionId = [ariaDescription && internalDescriptionId, ariaDescribedby].filter(Boolean).join(' ');\n\n useImperativeHandle(ref, () => ({\n svg: svgRef.current!,\n focusPlot: () => svgRef.current!.focus(),\n focusApplication: () => applicationRef.current!.focus(),\n }));\n\n const onPlotMouseDown = () => {\n // Record the click was made for the application focus handler.\n plotClickedRef.current = true;\n };\n const onPlotFocus = (event: React.FocusEvent<SVGSVGElement>) => {\n // If focused via click or an element was highlighted,\n // focus the internal application, which will manage and show focus accordingly on its internal elements.\n if (plotClickedRef.current || !!activeElementKey) {\n applicationRef.current!.focus();\n } else if (event.target === svgRef.current) {\n // Otherwise, focus the entire plot if it was focused with the keyboard.\n setPlotFocused(true);\n }\n };\n const onPlotClick = (event: React.MouseEvent<SVGSVGElement, MouseEvent>) => {\n onClick && onClick(event);\n };\n const onPlotBlur = (event: React.FocusEvent<SVGSVGElement>) => {\n if (event.target === svgRef.current) {\n setPlotFocused(false);\n }\n };\n // Once one of the expected keys is pressed the focus is delegated to the application controller.\n const onPlotKeyDown = (event: React.KeyboardEvent) => {\n if (isPlotFocused) {\n // Delegate the focus to the application if one of the expected keys was pressed.\n const codes = [KeyCode.space, KeyCode.enter, KeyCode.up, KeyCode.left, KeyCode.right, KeyCode.down];\n if (codes.indexOf(event.keyCode) !== -1) {\n applicationRef.current!.focus();\n }\n }\n };\n\n const onPlotApplicationFocus = (event: React.FocusEvent<SVGGElement>) => {\n onApplicationFocus && onApplicationFocus(event, plotClickedRef.current ? 'mouse' : 'keyboard');\n // \"Release\" the click reference to not affect the next call of this handler.\n plotClickedRef.current = false;\n setApplicationFocused(true);\n };\n const onPlotApplicationBlur = (event: React.FocusEvent<SVGGElement>) => {\n onApplicationBlur && onApplicationBlur(event);\n setApplicationFocused(false);\n };\n const onApplicationKeyDown = onKeyDown;\n\n const plotFocusable = !isApplicationFocused;\n const plotTabIndex = plotFocusable ? 0 : -1;\n const plotAria = !isApplicationFocused\n ? {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescriptionId,\n 'aria-roledescription': i18n('i18nStrings.chartAriaRoleDescription', ariaRoleDescription),\n }\n : {};\n\n return (\n <>\n <svg\n onMouseMove={onMouseMove}\n onMouseOut={onMouseOut}\n focusable={plotFocusable}\n tabIndex={plotTabIndex}\n role=\"application\"\n aria-hidden=\"false\"\n {...plotAria}\n ref={svgRef}\n style={{\n width,\n height,\n marginTop: offsetTop,\n marginBottom: offsetBottom,\n marginLeft: offsetLeft,\n marginRight: offsetRight,\n }}\n className={clsx(styles.root, {\n [styles.clickable]: isClickable,\n [styles.precise]: isPrecise,\n })}\n onMouseDown={onPlotMouseDown}\n onClick={onPlotClick}\n onFocus={onPlotFocus}\n onBlur={onPlotBlur}\n onKeyDown={onPlotKeyDown}\n >\n <FocusOutline elementRef={svgRef} elementKey={isPlotFocused} offset={focusOffset} />\n\n <g transform={transform}>\n <ApplicationController\n activeElementKey={(isApplicationFocused && activeElementKey) || null}\n activeElementRef={activeElementRef}\n ref={applicationRef}\n onFocus={onPlotApplicationFocus}\n onBlur={onPlotApplicationBlur}\n onKeyDown={onApplicationKeyDown}\n />\n\n {/* Only show description when plot is focusable to avoid repetition in Safari and Firefox */}\n {ariaDescription && plotFocusable && (\n <desc aria-hidden=\"true\" id={internalDescriptionId}>\n {ariaDescription}\n </desc>\n )}\n\n {children}\n\n <FocusOutline\n elementRef={activeElementRef}\n elementKey={isApplicationFocused && activeElementKey}\n offset={activeElementFocusOffset}\n />\n </g>\n </svg>\n\n <InternalLiveRegion hidden={true} tagName=\"span\">\n {ariaLiveRegion}\n </InternalLiveRegion>\n </>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/chart-status-container/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAKvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAA0B,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAKjF,UAAU,yBAA0B,SAAQ,kBAAkB;IAC5D,UAAU,EAAE,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;IAE7C,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,eAAe,CAAC,EAAE,yBAAyB,CAAC;IAG5C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,EACnC,YAAY,EACZ,WAAW,EACX,UAAU,GACX,EAAE;IACD,YAAY,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAC/B,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAC9B,UAAU,EAAE,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;CAC9C;;;;EAKA;AAED,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAC3C,UAAU,EACV,SAAS,EACT,WAAW,EACX,YAAY,EACZ,OAAO,EACP,KAAK,EACL,eAAe,EACf,SAAS,EACT,OAAO,EACP,SAAS,GACV,EAAE,yBAAyB,eAwC3B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/chart-status-container/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAMvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAA0B,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAIjF,UAAU,yBAA0B,SAAQ,kBAAkB;IAC5D,UAAU,EAAE,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;IAE7C,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,eAAe,CAAC,EAAE,yBAAyB,CAAC;IAG5C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,EACnC,YAAY,EACZ,WAAW,EACX,UAAU,GACX,EAAE;IACD,YAAY,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAC/B,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAC9B,UAAU,EAAE,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;CAC9C;;;;EAKA;AAED,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAC3C,UAAU,EACV,SAAS,EACT,WAAW,EACX,YAAY,EACZ,OAAO,EACP,KAAK,EACL,eAAe,EACf,SAAS,EACT,OAAO,EACP,SAAS,GACV,EAAE,yBAAyB,eAwC3B"}
@@ -3,9 +3,9 @@
3
3
  import React, { useMemo } from 'react';
4
4
  import { useInternalI18n } from '../../../i18n/context';
5
5
  import InternalLink from '../../../link/internal';
6
+ import InternalLiveRegion from '../../../live-region/internal';
6
7
  import InternalStatusIndicator from '../../../status-indicator/internal';
7
8
  import { fireNonCancelableEvent } from '../../events';
8
- import InternalLiveRegion from '../live-region/internal';
9
9
  import styles from './styles.css.js';
10
10
  export function getChartStatus({ externalData, visibleData, statusType, }) {
11
11
  const isEmpty = !visibleData || visibleData.length === 0;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/chart-status-container/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,uBAAuB,MAAM,oCAAoC,CAAC;AAEzE,OAAO,EAAE,sBAAsB,EAA6B,MAAM,cAAc,CAAC;AACjF,OAAO,kBAAkB,MAAM,yBAAyB,CAAC;AAEzD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAoBrC,MAAM,UAAU,cAAc,CAAO,EACnC,YAAY,EACZ,WAAW,EACX,UAAU,GAKX;IACC,MAAM,OAAO,GAAG,CAAC,WAAW,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,CAAC;IACzD,MAAM,SAAS,GAAG,OAAO,IAAI,WAAW,CAAC,MAAM,KAAK,YAAY,CAAC,MAAM,CAAC;IACxE,MAAM,SAAS,GAAG,UAAU,KAAK,UAAU,IAAI,CAAC,OAAO,CAAC;IACxD,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;AAC3C,CAAC;AAED,MAAM,CAAC,OAAO,UAAU,oBAA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WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;IAElH,OAAO,CACL,6BAAK,SAAS,EAAE,MAAM,CAAC,IAAI;QACzB,oBAAC,kBAAkB,QAAE,CAAC,SAAS,IAAI,eAAe,CAAsB,CACpE,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useMemo } from 'react';\n\nimport { useInternalI18n } from '../../../i18n/context';\nimport InternalLink from '../../../link/internal';\nimport InternalStatusIndicator from '../../../status-indicator/internal';\nimport { BaseComponentProps } from '../../base-component';\nimport { fireNonCancelableEvent, NonCancelableEventHandler } from '../../events';\nimport InternalLiveRegion from '../live-region/internal';\n\nimport styles from './styles.css.js';\n\ninterface ChartStatusContainerProps extends BaseComponentProps {\n statusType: 'loading' | 'finished' | 'error';\n\n empty?: React.ReactNode;\n noMatch?: React.ReactNode;\n\n loadingText?: string;\n errorText?: string;\n recoveryText?: string;\n\n onRecoveryClick?: NonCancelableEventHandler;\n\n // From `getChartStatus`\n isEmpty?: boolean;\n isNoMatch?: boolean;\n showChart?: boolean;\n}\n\nexport function getChartStatus<T, U>({\n externalData,\n visibleData,\n statusType,\n}: {\n externalData: ReadonlyArray<T>;\n visibleData: ReadonlyArray<U>;\n statusType: 'loading' | 'finished' | 'error';\n}) {\n const isEmpty = !visibleData || visibleData.length === 0;\n const isNoMatch = isEmpty && visibleData.length !== externalData.length;\n const showChart = statusType === 'finished' && !isEmpty;\n return { isEmpty, isNoMatch, showChart };\n}\n\nexport default function ChartStatusContainer({\n statusType,\n errorText,\n loadingText,\n recoveryText,\n noMatch,\n empty,\n onRecoveryClick,\n isNoMatch,\n isEmpty,\n showChart,\n}: ChartStatusContainerProps) {\n const i18n = useInternalI18n('[charts]');\n\n const statusContainer = useMemo(() => {\n const handleRecoveryClick = (event: CustomEvent) => {\n event.preventDefault();\n fireNonCancelableEvent(onRecoveryClick);\n };\n if (statusType === 'error') {\n const renderedRecoveryText = i18n('recoveryText', recoveryText);\n return (\n <span>\n <InternalStatusIndicator type=\"error\">{i18n('errorText', errorText)}</InternalStatusIndicator>{' '}\n {!!renderedRecoveryText && !!onRecoveryClick && (\n <InternalLink onFollow={handleRecoveryClick} variant=\"recovery\">\n {renderedRecoveryText}\n </InternalLink>\n )}\n </span>\n );\n }\n\n if (statusType === 'loading') {\n return <InternalStatusIndicator type=\"loading\">{i18n('loadingText', loadingText)}</InternalStatusIndicator>;\n }\n\n if (isNoMatch) {\n return <div className={styles.empty}>{noMatch}</div>;\n }\n\n if (isEmpty) {\n return <div className={styles.empty}>{empty}</div>;\n }\n }, [i18n, statusType, onRecoveryClick, isEmpty, isNoMatch, recoveryText, loadingText, errorText, empty, noMatch]);\n\n return (\n <div className={styles.root}>\n <InternalLiveRegion>{!showChart && statusContainer}</InternalLiveRegion>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/chart-status-container/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,kBAAkB,MAAM,+BAA+B,CAAC;AAC/D,OAAO,uBAAuB,MAAM,oCAAoC,CAAC;AAEzE,OAAO,EAAE,sBAAsB,EAA6B,MAAM,cAAc,CAAC;AAEjF,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAoBrC,MAAM,UAAU,cAAc,CAAO,EACnC,YAAY,EACZ,WAAW,EACX,UAAU,GAKX;IACC,MAAM,OAAO,GAAG,CAAC,WAAW,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,CAAC;IACzD,MAAM,SAAS,GAAG,OAAO,IAAI,WAAW,CAAC,MAAM,KAAK,YA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AED,IAAI,OAAO,EAAE;YACX,OAAO,6BAAK,SAAS,EAAE,MAAM,CAAC,KAAK,IAAG,KAAK,CAAO,CAAC;SACpD;IACH,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,eAAe,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;IAElH,OAAO,CACL,6BAAK,SAAS,EAAE,MAAM,CAAC,IAAI;QACzB,oBAAC,kBAAkB,QAAE,CAAC,SAAS,IAAI,eAAe,CAAsB,CACpE,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useMemo } from 'react';\n\nimport { useInternalI18n } from '../../../i18n/context';\nimport InternalLink from '../../../link/internal';\nimport InternalLiveRegion from '../../../live-region/internal';\nimport InternalStatusIndicator from '../../../status-indicator/internal';\nimport { BaseComponentProps } from '../../base-component';\nimport { fireNonCancelableEvent, NonCancelableEventHandler } from '../../events';\n\nimport styles from './styles.css.js';\n\ninterface ChartStatusContainerProps extends BaseComponentProps {\n statusType: 'loading' | 'finished' | 'error';\n\n empty?: React.ReactNode;\n noMatch?: React.ReactNode;\n\n loadingText?: string;\n errorText?: string;\n recoveryText?: string;\n\n onRecoveryClick?: NonCancelableEventHandler;\n\n // From `getChartStatus`\n isEmpty?: boolean;\n isNoMatch?: boolean;\n showChart?: boolean;\n}\n\nexport function getChartStatus<T, U>({\n externalData,\n visibleData,\n statusType,\n}: {\n externalData: ReadonlyArray<T>;\n visibleData: ReadonlyArray<U>;\n statusType: 'loading' | 'finished' | 'error';\n}) {\n const isEmpty = !visibleData || visibleData.length === 0;\n const isNoMatch = isEmpty && visibleData.length !== externalData.length;\n const showChart = statusType === 'finished' && !isEmpty;\n return { isEmpty, isNoMatch, showChart };\n}\n\nexport default function ChartStatusContainer({\n statusType,\n errorText,\n loadingText,\n recoveryText,\n noMatch,\n empty,\n onRecoveryClick,\n isNoMatch,\n isEmpty,\n showChart,\n}: ChartStatusContainerProps) {\n const i18n = useInternalI18n('[charts]');\n\n const statusContainer = useMemo(() => {\n const handleRecoveryClick = (event: CustomEvent) => {\n event.preventDefault();\n fireNonCancelableEvent(onRecoveryClick);\n };\n if (statusType === 'error') {\n const renderedRecoveryText = i18n('recoveryText', recoveryText);\n return (\n <span>\n <InternalStatusIndicator type=\"error\">{i18n('errorText', errorText)}</InternalStatusIndicator>{' '}\n {!!renderedRecoveryText && !!onRecoveryClick && (\n <InternalLink onFollow={handleRecoveryClick} variant=\"recovery\">\n {renderedRecoveryText}\n </InternalLink>\n )}\n </span>\n );\n }\n\n if (statusType === 'loading') {\n return <InternalStatusIndicator type=\"loading\">{i18n('loadingText', loadingText)}</InternalStatusIndicator>;\n }\n\n if (isNoMatch) {\n return <div className={styles.empty}>{noMatch}</div>;\n }\n\n if (isEmpty) {\n return <div className={styles.empty}>{empty}</div>;\n }\n }, [i18n, statusType, onRecoveryClick, isEmpty, isNoMatch, recoveryText, loadingText, errorText, empty, noMatch]);\n\n return (\n <div className={styles.root}>\n <InternalLiveRegion>{!showChart && statusContainer}</InternalLiveRegion>\n </div>\n );\n}\n"]}