@cloudscape-design/components-themeable 3.0.408 → 3.0.410

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 (90) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/app-layout/test-classes/styles.scss +0 -6
  3. package/lib/internal/scss/header/styles.scss +4 -0
  4. package/lib/internal/scss/internal/components/button-trigger/styles.scss +6 -0
  5. package/lib/internal/scss/select/parts/styles.scss +51 -0
  6. package/lib/internal/template/app-layout/drawer/index.d.ts.map +1 -1
  7. package/lib/internal/template/app-layout/drawer/index.js +3 -2
  8. package/lib/internal/template/app-layout/drawer/index.js.map +1 -1
  9. package/lib/internal/template/app-layout/drawer/interfaces.d.ts +2 -0
  10. package/lib/internal/template/app-layout/drawer/interfaces.d.ts.map +1 -1
  11. package/lib/internal/template/app-layout/drawer/interfaces.js.map +1 -1
  12. package/lib/internal/template/app-layout/index.d.ts.map +1 -1
  13. package/lib/internal/template/app-layout/index.js +2 -0
  14. package/lib/internal/template/app-layout/index.js.map +1 -1
  15. package/lib/internal/template/app-layout/mobile-toolbar/index.d.ts +3 -2
  16. package/lib/internal/template/app-layout/mobile-toolbar/index.d.ts.map +1 -1
  17. package/lib/internal/template/app-layout/mobile-toolbar/index.js +4 -3
  18. package/lib/internal/template/app-layout/mobile-toolbar/index.js.map +1 -1
  19. package/lib/internal/template/app-layout/test-classes/styles.css.js +17 -19
  20. package/lib/internal/template/app-layout/test-classes/styles.scoped.css +17 -25
  21. package/lib/internal/template/app-layout/test-classes/styles.selectors.js +17 -19
  22. package/lib/internal/template/app-layout/utils/use-drawers.d.ts +1 -0
  23. package/lib/internal/template/app-layout/utils/use-drawers.d.ts.map +1 -1
  24. package/lib/internal/template/app-layout/utils/use-drawers.js +1 -0
  25. package/lib/internal/template/app-layout/utils/use-drawers.js.map +1 -1
  26. package/lib/internal/template/app-layout/visual-refresh/context.d.ts +1 -0
  27. package/lib/internal/template/app-layout/visual-refresh/context.d.ts.map +1 -1
  28. package/lib/internal/template/app-layout/visual-refresh/context.js +1 -1
  29. package/lib/internal/template/app-layout/visual-refresh/context.js.map +1 -1
  30. package/lib/internal/template/app-layout/visual-refresh/drawers.d.ts.map +1 -1
  31. package/lib/internal/template/app-layout/visual-refresh/drawers.js +7 -6
  32. package/lib/internal/template/app-layout/visual-refresh/drawers.js.map +1 -1
  33. package/lib/internal/template/app-layout/visual-refresh/tools.d.ts +0 -6
  34. package/lib/internal/template/app-layout/visual-refresh/tools.d.ts.map +1 -1
  35. package/lib/internal/template/app-layout/visual-refresh/tools.js +0 -15
  36. package/lib/internal/template/app-layout/visual-refresh/tools.js.map +1 -1
  37. package/lib/internal/template/button-dropdown/category-elements/expandable-category-element.d.ts.map +1 -1
  38. package/lib/internal/template/button-dropdown/category-elements/expandable-category-element.js +1 -2
  39. package/lib/internal/template/button-dropdown/category-elements/expandable-category-element.js.map +1 -1
  40. package/lib/internal/template/button-dropdown/category-elements/mobile-expandable-category-element.d.ts.map +1 -1
  41. package/lib/internal/template/button-dropdown/category-elements/mobile-expandable-category-element.js +1 -2
  42. package/lib/internal/template/button-dropdown/category-elements/mobile-expandable-category-element.js.map +1 -1
  43. package/lib/internal/template/button-dropdown/item-element/index.d.ts.map +1 -1
  44. package/lib/internal/template/button-dropdown/item-element/index.js +1 -2
  45. package/lib/internal/template/button-dropdown/item-element/index.js.map +1 -1
  46. package/lib/internal/template/date-range-picker/index.js +1 -1
  47. package/lib/internal/template/date-range-picker/index.js.map +1 -1
  48. package/lib/internal/template/header/internal.d.ts.map +1 -1
  49. package/lib/internal/template/header/internal.js +3 -1
  50. package/lib/internal/template/header/internal.js.map +1 -1
  51. package/lib/internal/template/header/styles.css.js +33 -32
  52. package/lib/internal/template/header/styles.scoped.css +54 -48
  53. package/lib/internal/template/header/styles.selectors.js +33 -32
  54. package/lib/internal/template/input/internal.d.ts.map +1 -1
  55. package/lib/internal/template/input/internal.js +5 -1
  56. package/lib/internal/template/input/internal.js.map +1 -1
  57. package/lib/internal/template/internal/components/button-trigger/index.d.ts +1 -0
  58. package/lib/internal/template/internal/components/button-trigger/index.d.ts.map +1 -1
  59. package/lib/internal/template/internal/components/button-trigger/index.js +2 -2
  60. package/lib/internal/template/internal/components/button-trigger/index.js.map +1 -1
  61. package/lib/internal/template/internal/components/button-trigger/styles.css.js +10 -9
  62. package/lib/internal/template/internal/components/button-trigger/styles.scoped.css +27 -23
  63. package/lib/internal/template/internal/components/button-trigger/styles.selectors.js +10 -9
  64. package/lib/internal/template/internal/environment.js +1 -1
  65. package/lib/internal/template/internal/environment.json +1 -1
  66. package/lib/internal/template/multiselect/index.d.ts.map +1 -1
  67. package/lib/internal/template/multiselect/index.js +3 -1
  68. package/lib/internal/template/multiselect/index.js.map +1 -1
  69. package/lib/internal/template/multiselect/interfaces.d.ts +1 -0
  70. package/lib/internal/template/multiselect/interfaces.d.ts.map +1 -1
  71. package/lib/internal/template/multiselect/interfaces.js.map +1 -1
  72. package/lib/internal/template/multiselect/internal.d.ts +3 -1
  73. package/lib/internal/template/multiselect/internal.d.ts.map +1 -1
  74. package/lib/internal/template/multiselect/internal.js +3 -3
  75. package/lib/internal/template/multiselect/internal.js.map +1 -1
  76. package/lib/internal/template/select/parts/styles.css.js +16 -9
  77. package/lib/internal/template/select/parts/styles.scoped.css +58 -9
  78. package/lib/internal/template/select/parts/styles.selectors.js +16 -9
  79. package/lib/internal/template/select/parts/trigger.d.ts +3 -1
  80. package/lib/internal/template/select/parts/trigger.d.ts.map +1 -1
  81. package/lib/internal/template/select/parts/trigger.js +22 -3
  82. package/lib/internal/template/select/parts/trigger.js.map +1 -1
  83. package/lib/internal/template/test-utils/dom/app-layout/index.d.ts +1 -3
  84. package/lib/internal/template/test-utils/dom/app-layout/index.js +1 -7
  85. package/lib/internal/template/test-utils/dom/app-layout/index.js.map +1 -1
  86. package/lib/internal/template/test-utils/selectors/app-layout/index.d.ts +1 -3
  87. package/lib/internal/template/test-utils/selectors/app-layout/index.js +1 -7
  88. package/lib/internal/template/test-utils/selectors/app-layout/index.js.map +1 -1
  89. package/lib/internal/template/test-utils/tsconfig.tsbuildinfo +1 -1
  90. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["header/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAMhG,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAWjB;QAXiB,EACrC,OAAO,EACP,kBAAkB,EAClB,QAAQ,EACR,OAAO,EACP,OAAO,EACP,WAAW,EACX,IAAI,EACJ,iBAAiB,GAAG,IAAI,EACxB,wBAAwB,OAEJ,EADjB,SAAS,cAVyB,2IAWtC,CADa;IAEZ,MAAM,QAAQ,GAAG,SAAS,EAAE,CAAC;IAC7B,MAAM,UAAU,GAAG,kBAAkB,aAAlB,kBAAkB,cAAlB,kBAAkB,GAAI,CAAC,OAAO,KAAK,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAC1F,MA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AAC,EAChD,SAAS,IAAI,MAAM,CAAC,OAAO,CAC5B,IAEA,QAAQ,CACP,CACL,CAAC;QACF,IAAI,CACL,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React, { useContext } from 'react';\nimport { getBaseProps } from '../internal/base-component';\nimport { StickyHeaderContext } from '../container/use-sticky-header';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { HeaderProps } from './interfaces';\nimport styles from './styles.css.js';\nimport { SomeRequired } from '../internal/types';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport { InfoLinkLabelContext } from '../internal/context/info-link-label-context';\nimport { CollectionLabelContext } from '../internal/context/collection-label-context';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { DATA_ATTR_FUNNEL_KEY, FUNNEL_KEY_SUBSTEP_NAME } from '../internal/analytics/selectors';\n\ninterface InternalHeaderProps extends SomeRequired<HeaderProps, 'variant'>, InternalBaseComponentProps {\n __disableActionsWrapping?: boolean;\n}\n\nexport default function InternalHeader({\n variant,\n headingTagOverride,\n children,\n actions,\n counter,\n description,\n info,\n __internalRootRef = null,\n __disableActionsWrapping,\n ...restProps\n}: InternalHeaderProps) {\n const isMobile = useMobile();\n const HeadingTag = headingTagOverride ?? (variant === 'awsui-h1-sticky' ? 'h1' : variant);\n const { isStuck } = useContext(StickyHeaderContext);\n const baseProps = getBaseProps(restProps);\n const isRefresh = useVisualRefresh();\n const assignHeaderId = useContext(CollectionLabelContext).assignId;\n const headingId = useUniqueId('heading');\n if (assignHeaderId !== undefined) {\n assignHeaderId(headingId);\n }\n // If is mobile there is no need to have the dynamic variant because it's scrolled out of view\n const dynamicVariant = !isMobile && isStuck ? 'h2' : 'h1';\n const variantOverride = variant === 'awsui-h1-sticky' ? (isRefresh ? dynamicVariant : 'h2') : variant;\n\n return (\n <div\n {...baseProps}\n className={clsx(\n styles.root,\n baseProps.className,\n styles[`root-variant-${variantOverride}`],\n isRefresh && styles.refresh,\n !actions && [styles[`root-no-actions`]],\n description && [styles[`root-has-description`]]\n )}\n ref={__internalRootRef}\n >\n <div\n className={clsx(\n styles.main,\n styles[`main-variant-${variantOverride}`],\n isRefresh && styles.refresh,\n __disableActionsWrapping && [styles['no-wrap']]\n )}\n >\n <div className={clsx(styles.title, styles[`title-variant-${variantOverride}`], isRefresh && styles.refresh)}>\n <HeadingTag className={clsx(styles.heading, styles[`heading-variant-${variantOverride}`])}>\n <span\n {...(HeadingTag === 'h2' ? { [DATA_ATTR_FUNNEL_KEY]: FUNNEL_KEY_SUBSTEP_NAME } : {})}\n className={clsx(styles['heading-text'], styles[`heading-text-variant-${variantOverride}`])}\n id={headingId}\n >\n {children}\n </span>\n {counter !== undefined && <span className={styles.counter}> {counter}</span>}\n </HeadingTag>\n <InfoLinkLabelContext.Provider value={headingId}>\n {info && <span className={styles.info}>{info}</span>}\n </InfoLinkLabelContext.Provider>\n </div>\n {actions && (\n <div\n className={clsx(styles.actions, styles[`actions-variant-${variantOverride}`], isRefresh && styles.refresh)}\n >\n {actions}\n </div>\n )}\n </div>\n <Description variantOverride={variantOverride}>{description}</Description>\n </div>\n );\n}\n\nexport function Description({ children, variantOverride }: { children: React.ReactNode; variantOverride: string }) {\n const isRefresh = useVisualRefresh();\n return (\n (children && (\n <p\n className={clsx(\n styles.description,\n styles[`description-variant-${variantOverride}`],\n isRefresh && styles.refresh\n )}\n >\n {children}\n </p>\n )) ||\n null\n );\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["header/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,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,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC,wBAAwB,eAAe,EAAE,CAAC,CAAC,EAC1F,EAAE,EAAE,SAAS,KAEZ,QAAQ,CACJ;oBACN,OAAO,KAAK,SAAS,IAAI,8BAAM,SAAS,EAAE,MAAM,CAAC,OAAO;;wBAAI,OAAO,CAAQ,CACjE;gBACZ,IAAI,IAAI,CACP,oBAAC,oBAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,SAAS;oBAE7C,8BAAM,SAAS,EAAE,MAAM,CAAC,eAAe,CAAC,cAAgB;oBACxD,8BAAM,SAAS,EAAE,MAAM,CAAC,IAAI,IAAG,IAAI,CAAQ,CACb,CACjC,CACG;YACL,OAAO,IAAI,CACV,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,mBAAmB,eAAe,EAAE,CAAC,EAAE,SAAS,IAAI,MAAM,CAAC,OAAO,CAAC,IAEzG,OAAO,CACJ,CACP,CACG;QACN,oBAAC,WAAW,IAAC,eAAe,EAAE,eAAe,IAAG,WAAW,CAAe,CACtE,CACP,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,EAAE,QAAQ,EAAE,eAAe,EAA0D;IAC/G,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAAC;IACrC,OAAO,CACL,CAAC,QAAQ,IAAI,CACX,2BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,WAAW,EAClB,MAAM,CAAC,uBAAuB,eAAe,EAAE,CAAC,EAChD,SAAS,IAAI,MAAM,CAAC,OAAO,CAC5B,IAEA,QAAQ,CACP,CACL,CAAC;QACF,IAAI,CACL,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React, { useContext } from 'react';\nimport { getBaseProps } from '../internal/base-component';\nimport { StickyHeaderContext } from '../container/use-sticky-header';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { HeaderProps } from './interfaces';\nimport styles from './styles.css.js';\nimport { SomeRequired } from '../internal/types';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport { InfoLinkLabelContext } from '../internal/context/info-link-label-context';\nimport { CollectionLabelContext } from '../internal/context/collection-label-context';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { DATA_ATTR_FUNNEL_KEY, FUNNEL_KEY_SUBSTEP_NAME } from '../internal/analytics/selectors';\n\ninterface InternalHeaderProps extends SomeRequired<HeaderProps, 'variant'>, InternalBaseComponentProps {\n __disableActionsWrapping?: boolean;\n}\n\nexport default function InternalHeader({\n variant,\n headingTagOverride,\n children,\n actions,\n counter,\n description,\n info,\n __internalRootRef = null,\n __disableActionsWrapping,\n ...restProps\n}: InternalHeaderProps) {\n const isMobile = useMobile();\n const HeadingTag = headingTagOverride ?? (variant === 'awsui-h1-sticky' ? 'h1' : variant);\n const { isStuck } = useContext(StickyHeaderContext);\n const baseProps = getBaseProps(restProps);\n const isRefresh = useVisualRefresh();\n const assignHeaderId = useContext(CollectionLabelContext).assignId;\n const headingId = useUniqueId('heading');\n if (assignHeaderId !== undefined) {\n assignHeaderId(headingId);\n }\n // If is mobile there is no need to have the dynamic variant because it's scrolled out of view\n const dynamicVariant = !isMobile && isStuck ? 'h2' : 'h1';\n const variantOverride = variant === 'awsui-h1-sticky' ? (isRefresh ? dynamicVariant : 'h2') : variant;\n\n return (\n <div\n {...baseProps}\n className={clsx(\n styles.root,\n baseProps.className,\n styles[`root-variant-${variantOverride}`],\n isRefresh && styles.refresh,\n !actions && [styles[`root-no-actions`]],\n description && [styles[`root-has-description`]]\n )}\n ref={__internalRootRef}\n >\n <div\n className={clsx(\n styles.main,\n styles[`main-variant-${variantOverride}`],\n isRefresh && styles.refresh,\n __disableActionsWrapping && [styles['no-wrap']]\n )}\n >\n <div className={clsx(styles.title, styles[`title-variant-${variantOverride}`], isRefresh && styles.refresh)}>\n <HeadingTag className={clsx(styles.heading, styles[`heading-variant-${variantOverride}`])}>\n <span\n {...(HeadingTag === 'h2' ? { [DATA_ATTR_FUNNEL_KEY]: FUNNEL_KEY_SUBSTEP_NAME } : {})}\n className={clsx(styles['heading-text'], styles[`heading-text-variant-${variantOverride}`])}\n id={headingId}\n >\n {children}\n </span>\n {counter !== undefined && <span className={styles.counter}> {counter}</span>}\n </HeadingTag>\n {info && (\n <InfoLinkLabelContext.Provider value={headingId}>\n {/* Exists to create a space between heading text and info so that a double-click selection on the last word of the heading doesn't also include info */}\n <span className={styles['virtual-space']}> &nbsp;</span>\n <span className={styles.info}>{info}</span>\n </InfoLinkLabelContext.Provider>\n )}\n </div>\n {actions && (\n <div\n className={clsx(styles.actions, styles[`actions-variant-${variantOverride}`], isRefresh && styles.refresh)}\n >\n {actions}\n </div>\n )}\n </div>\n <Description variantOverride={variantOverride}>{description}</Description>\n </div>\n );\n}\n\nexport function Description({ children, variantOverride }: { children: React.ReactNode; variantOverride: string }) {\n const isRefresh = useVisualRefresh();\n return (\n (children && (\n <p\n className={clsx(\n styles.description,\n styles[`description-variant-${variantOverride}`],\n isRefresh && styles.refresh\n )}\n >\n {children}\n </p>\n )) ||\n null\n );\n}\n"]}
@@ -1,37 +1,38 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "root": "awsui_root_2qdw9_8poy5_93",
5
- "refresh": "awsui_refresh_2qdw9_8poy5_110",
6
- "root-no-actions": "awsui_root-no-actions_2qdw9_8poy5_110",
7
- "root-variant-h2": "awsui_root-variant-h2_2qdw9_8poy5_113",
8
- "root-variant-h3": "awsui_root-variant-h3_2qdw9_8poy5_113",
9
- "root-has-description": "awsui_root-has-description_2qdw9_8poy5_113",
10
- "root-variant-h1": "awsui_root-variant-h1_2qdw9_8poy5_122",
11
- "main": "awsui_main_2qdw9_8poy5_132",
12
- "no-wrap": "awsui_no-wrap_2qdw9_8poy5_142",
13
- "main-variant-h1": "awsui_main-variant-h1_2qdw9_8poy5_148",
14
- "actions": "awsui_actions_2qdw9_8poy5_156",
15
- "actions-variant-h1": "awsui_actions-variant-h1_2qdw9_8poy5_160",
16
- "actions-variant-h2": "awsui_actions-variant-h2_2qdw9_8poy5_163",
17
- "actions-variant-h3": "awsui_actions-variant-h3_2qdw9_8poy5_166",
18
- "title": "awsui_title_2qdw9_8poy5_179",
19
- "title-variant-h1": "awsui_title-variant-h1_2qdw9_8poy5_184",
20
- "title-variant-h2": "awsui_title-variant-h2_2qdw9_8poy5_191",
21
- "title-variant-h3": "awsui_title-variant-h3_2qdw9_8poy5_197",
22
- "info": "awsui_info_2qdw9_8poy5_218",
23
- "description": "awsui_description_2qdw9_8poy5_222",
24
- "description-variant-h1": "awsui_description-variant-h1_2qdw9_8poy5_227",
25
- "description-variant-h2": "awsui_description-variant-h2_2qdw9_8poy5_231",
26
- "description-variant-h3": "awsui_description-variant-h3_2qdw9_8poy5_238",
27
- "heading": "awsui_heading_2qdw9_8poy5_247",
28
- "heading-variant-h1": "awsui_heading-variant-h1_2qdw9_8poy5_256",
29
- "heading-variant-h2": "awsui_heading-variant-h2_2qdw9_8poy5_261",
30
- "heading-variant-h3": "awsui_heading-variant-h3_2qdw9_8poy5_266",
31
- "heading-text": "awsui_heading-text_2qdw9_8poy5_272",
32
- "heading-text-variant-h1": "awsui_heading-text-variant-h1_2qdw9_8poy5_275",
33
- "heading-text-variant-h2": "awsui_heading-text-variant-h2_2qdw9_8poy5_283",
34
- "heading-text-variant-h3": "awsui_heading-text-variant-h3_2qdw9_8poy5_291",
35
- "counter": "awsui_counter_2qdw9_8poy5_300"
4
+ "root": "awsui_root_2qdw9_6h6z2_93",
5
+ "refresh": "awsui_refresh_2qdw9_6h6z2_110",
6
+ "root-no-actions": "awsui_root-no-actions_2qdw9_6h6z2_110",
7
+ "root-variant-h2": "awsui_root-variant-h2_2qdw9_6h6z2_113",
8
+ "root-variant-h3": "awsui_root-variant-h3_2qdw9_6h6z2_113",
9
+ "root-has-description": "awsui_root-has-description_2qdw9_6h6z2_113",
10
+ "root-variant-h1": "awsui_root-variant-h1_2qdw9_6h6z2_122",
11
+ "main": "awsui_main_2qdw9_6h6z2_132",
12
+ "no-wrap": "awsui_no-wrap_2qdw9_6h6z2_142",
13
+ "main-variant-h1": "awsui_main-variant-h1_2qdw9_6h6z2_148",
14
+ "actions": "awsui_actions_2qdw9_6h6z2_156",
15
+ "actions-variant-h1": "awsui_actions-variant-h1_2qdw9_6h6z2_160",
16
+ "actions-variant-h2": "awsui_actions-variant-h2_2qdw9_6h6z2_163",
17
+ "actions-variant-h3": "awsui_actions-variant-h3_2qdw9_6h6z2_166",
18
+ "title": "awsui_title_2qdw9_6h6z2_179",
19
+ "title-variant-h1": "awsui_title-variant-h1_2qdw9_6h6z2_184",
20
+ "title-variant-h2": "awsui_title-variant-h2_2qdw9_6h6z2_191",
21
+ "title-variant-h3": "awsui_title-variant-h3_2qdw9_6h6z2_197",
22
+ "virtual-space": "awsui_virtual-space_2qdw9_6h6z2_218",
23
+ "info": "awsui_info_2qdw9_6h6z2_224",
24
+ "description": "awsui_description_2qdw9_6h6z2_228",
25
+ "description-variant-h1": "awsui_description-variant-h1_2qdw9_6h6z2_233",
26
+ "description-variant-h2": "awsui_description-variant-h2_2qdw9_6h6z2_237",
27
+ "description-variant-h3": "awsui_description-variant-h3_2qdw9_6h6z2_244",
28
+ "heading": "awsui_heading_2qdw9_6h6z2_253",
29
+ "heading-variant-h1": "awsui_heading-variant-h1_2qdw9_6h6z2_262",
30
+ "heading-variant-h2": "awsui_heading-variant-h2_2qdw9_6h6z2_267",
31
+ "heading-variant-h3": "awsui_heading-variant-h3_2qdw9_6h6z2_272",
32
+ "heading-text": "awsui_heading-text_2qdw9_6h6z2_278",
33
+ "heading-text-variant-h1": "awsui_heading-text-variant-h1_2qdw9_6h6z2_281",
34
+ "heading-text-variant-h2": "awsui_heading-text-variant-h2_2qdw9_6h6z2_289",
35
+ "heading-text-variant-h3": "awsui_heading-text-variant-h3_2qdw9_6h6z2_297",
36
+ "counter": "awsui_counter_2qdw9_6h6z2_306"
36
37
  };
37
38
 
@@ -90,7 +90,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
90
90
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
91
91
  SPDX-License-Identifier: Apache-2.0
92
92
  */
93
- .awsui_root_2qdw9_8poy5_93:not(#\9) {
93
+ .awsui_root_2qdw9_6h6z2_93:not(#\9) {
94
94
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
95
95
  border-collapse: separate;
96
96
  border-spacing: 0;
@@ -133,29 +133,29 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
133
133
  flex-wrap: wrap;
134
134
  justify-content: space-between;
135
135
  }
136
- .awsui_root_2qdw9_8poy5_93.awsui_refresh_2qdw9_8poy5_110:not(#\9), .awsui_root_2qdw9_8poy5_93:not(#\9):not(.awsui_root-no-actions_2qdw9_8poy5_110) {
136
+ .awsui_root_2qdw9_6h6z2_93.awsui_refresh_2qdw9_6h6z2_110:not(#\9), .awsui_root_2qdw9_6h6z2_93:not(#\9):not(.awsui_root-no-actions_2qdw9_6h6z2_110) {
137
137
  row-gap: var(--space-scaled-xxs-t7ij38, 4px);
138
138
  }
139
- .awsui_root-no-actions_2qdw9_8poy5_110.awsui_root-variant-h2_2qdw9_8poy5_113:not(#\9):not(.awsui_refresh_2qdw9_8poy5_110), .awsui_root-no-actions_2qdw9_8poy5_110.awsui_root-variant-h3_2qdw9_8poy5_113:not(#\9):not(.awsui_refresh_2qdw9_8poy5_110), .awsui_root-has-description_2qdw9_8poy5_113.awsui_root-variant-h2_2qdw9_8poy5_113:not(#\9):not(.awsui_refresh_2qdw9_8poy5_110), .awsui_root-has-description_2qdw9_8poy5_113.awsui_root-variant-h3_2qdw9_8poy5_113:not(#\9):not(.awsui_refresh_2qdw9_8poy5_110) {
139
+ .awsui_root-no-actions_2qdw9_6h6z2_110.awsui_root-variant-h2_2qdw9_6h6z2_113:not(#\9):not(.awsui_refresh_2qdw9_6h6z2_110), .awsui_root-no-actions_2qdw9_6h6z2_110.awsui_root-variant-h3_2qdw9_6h6z2_113:not(#\9):not(.awsui_refresh_2qdw9_6h6z2_110), .awsui_root-has-description_2qdw9_6h6z2_113.awsui_root-variant-h2_2qdw9_6h6z2_113:not(#\9):not(.awsui_refresh_2qdw9_6h6z2_110), .awsui_root-has-description_2qdw9_6h6z2_113.awsui_root-variant-h3_2qdw9_6h6z2_113:not(#\9):not(.awsui_refresh_2qdw9_6h6z2_110) {
140
140
  padding-bottom: var(--space-scaled-xxs-t7ij38, 4px);
141
141
  }
142
- .awsui_root-no-actions_2qdw9_8poy5_110:not(#\9):not(.awsui_root-has-description_2qdw9_8poy5_113):not(.awsui_refresh_2qdw9_8poy5_110) {
142
+ .awsui_root-no-actions_2qdw9_6h6z2_110:not(#\9):not(.awsui_root-has-description_2qdw9_6h6z2_113):not(.awsui_refresh_2qdw9_6h6z2_110) {
143
143
  padding-bottom: calc(var(--space-scaled-xs-x91h81, 8px) + var(--space-xxxs-z28114, 2px));
144
144
  }
145
- .awsui_root-no-actions_2qdw9_8poy5_110.awsui_refresh_2qdw9_8poy5_110.awsui_root-variant-h2_2qdw9_8poy5_113:not(#\9), .awsui_root-no-actions_2qdw9_8poy5_110.awsui_refresh_2qdw9_8poy5_110.awsui_root-variant-h3_2qdw9_8poy5_113:not(#\9) {
145
+ .awsui_root-no-actions_2qdw9_6h6z2_110.awsui_refresh_2qdw9_6h6z2_110.awsui_root-variant-h2_2qdw9_6h6z2_113:not(#\9), .awsui_root-no-actions_2qdw9_6h6z2_110.awsui_refresh_2qdw9_6h6z2_110.awsui_root-variant-h3_2qdw9_6h6z2_113:not(#\9) {
146
146
  row-gap: var(--space-scaled-xxxs-f7yq15, 2px);
147
147
  }
148
- .awsui_root_2qdw9_8poy5_93.awsui_root-variant-h1_2qdw9_8poy5_122:not(#\9):not(.awsui_refresh_2qdw9_8poy5_110) {
148
+ .awsui_root_2qdw9_6h6z2_93.awsui_root-variant-h1_2qdw9_6h6z2_122:not(#\9):not(.awsui_refresh_2qdw9_6h6z2_110) {
149
149
  row-gap: var(--space-scaled-xxs-t7ij38, 4px);
150
150
  }
151
- .awsui_root-no-actions_2qdw9_8poy5_110:not(#\9):not(.awsui_root-has-description_2qdw9_8poy5_113).awsui_refresh_2qdw9_8poy5_110.awsui_root-variant-h3_2qdw9_8poy5_113 {
151
+ .awsui_root-no-actions_2qdw9_6h6z2_110:not(#\9):not(.awsui_root-has-description_2qdw9_6h6z2_113).awsui_refresh_2qdw9_6h6z2_110.awsui_root-variant-h3_2qdw9_6h6z2_113 {
152
152
  padding-bottom: var(--space-scaled-xs-x91h81, 8px);
153
153
  }
154
- .awsui_root_2qdw9_8poy5_93.awsui_root-variant-h1_2qdw9_8poy5_122.awsui_root-has-description_2qdw9_8poy5_113:not(#\9):not(.awsui_refresh_2qdw9_8poy5_110) {
154
+ .awsui_root_2qdw9_6h6z2_93.awsui_root-variant-h1_2qdw9_6h6z2_122.awsui_root-has-description_2qdw9_6h6z2_113:not(#\9):not(.awsui_refresh_2qdw9_6h6z2_110) {
155
155
  padding-bottom: var(--space-scaled-2x-xxs-r5f1ts, 4px);
156
156
  }
157
157
 
158
- .awsui_main_2qdw9_8poy5_132:not(#\9) {
158
+ .awsui_main_2qdw9_6h6z2_132:not(#\9) {
159
159
  word-wrap: break-word;
160
160
  max-width: 100%;
161
161
  display: flex;
@@ -165,140 +165,146 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
165
165
  column-gap: var(--space-xs-xf5ch3, 8px);
166
166
  row-gap: calc(var(--space-scaled-xxs-t7ij38, 4px) + var(--space-scaled-xxxs-f7yq15, 2px));
167
167
  }
168
- .awsui_main_2qdw9_8poy5_132.awsui_no-wrap_2qdw9_8poy5_142:not(#\9) {
168
+ .awsui_main_2qdw9_6h6z2_132.awsui_no-wrap_2qdw9_6h6z2_142:not(#\9) {
169
169
  flex-wrap: nowrap;
170
170
  }
171
- .awsui_main_2qdw9_8poy5_132.awsui_refresh_2qdw9_8poy5_110:not(#\9) {
171
+ .awsui_main_2qdw9_6h6z2_132.awsui_refresh_2qdw9_6h6z2_110:not(#\9) {
172
172
  row-gap: var(--space-xxs-9rrxti, 4px);
173
173
  }
174
- .awsui_main-variant-h1_2qdw9_8poy5_148:not(#\9) {
174
+ .awsui_main-variant-h1_2qdw9_6h6z2_148:not(#\9) {
175
175
  row-gap: var(--space-scaled-2x-xxs-r5f1ts, 4px);
176
176
  }
177
177
 
178
- .awsui_root-has-description_2qdw9_8poy5_113 > .awsui_main_2qdw9_8poy5_132:not(#\9) {
178
+ .awsui_root-has-description_2qdw9_6h6z2_113 > .awsui_main_2qdw9_6h6z2_132:not(#\9) {
179
179
  row-gap: var(--space-scaled-2x-xxs-r5f1ts, 4px);
180
180
  }
181
181
 
182
- .awsui_actions_2qdw9_8poy5_156:not(#\9) {
182
+ .awsui_actions_2qdw9_6h6z2_156:not(#\9) {
183
183
  display: flex;
184
184
  align-items: flex-start;
185
185
  }
186
- .awsui_actions-variant-h1_2qdw9_8poy5_160.awsui_refresh_2qdw9_8poy5_110:not(#\9) {
186
+ .awsui_actions-variant-h1_2qdw9_6h6z2_160.awsui_refresh_2qdw9_6h6z2_110:not(#\9) {
187
187
  padding: calc((var(--line-height-heading-xl-v9hsvt, 36px) - var(--size-vertical-input-ubbp77, 32px)) / 2) 0;
188
188
  }
189
- .awsui_actions-variant-h2_2qdw9_8poy5_163.awsui_refresh_2qdw9_8poy5_110:not(#\9) {
189
+ .awsui_actions-variant-h2_2qdw9_6h6z2_163.awsui_refresh_2qdw9_6h6z2_110:not(#\9) {
190
190
  padding: calc((var(--line-height-heading-l-vog8w7, 22px) - var(--size-vertical-input-ubbp77, 32px)) / 2) 0;
191
191
  }
192
- .awsui_actions-variant-h3_2qdw9_8poy5_166.awsui_refresh_2qdw9_8poy5_110:not(#\9) {
192
+ .awsui_actions-variant-h3_2qdw9_6h6z2_166.awsui_refresh_2qdw9_6h6z2_110:not(#\9) {
193
193
  padding: calc((var(--line-height-heading-m-6mmwjh, 22px) - var(--size-vertical-input-ubbp77, 32px)) / 2) 0;
194
194
  }
195
- .awsui_actions-variant-h1_2qdw9_8poy5_160:not(#\9):not(.awsui_refresh_2qdw9_8poy5_110) {
195
+ .awsui_actions-variant-h1_2qdw9_6h6z2_160:not(#\9):not(.awsui_refresh_2qdw9_6h6z2_110) {
196
196
  padding: var(--space-scaled-xs-x91h81, 8px) 0;
197
197
  }
198
- .awsui_actions-variant-h2_2qdw9_8poy5_163:not(#\9):not(.awsui_refresh_2qdw9_8poy5_110), .awsui_actions-variant-h3_2qdw9_8poy5_166:not(#\9):not(.awsui_refresh_2qdw9_8poy5_110) {
198
+ .awsui_actions-variant-h2_2qdw9_6h6z2_163:not(#\9):not(.awsui_refresh_2qdw9_6h6z2_110), .awsui_actions-variant-h3_2qdw9_6h6z2_166:not(#\9):not(.awsui_refresh_2qdw9_6h6z2_110) {
199
199
  padding: var(--space-scaled-xxs-t7ij38, 4px) 0;
200
200
  }
201
- .awsui_root-has-description_2qdw9_8poy5_113 > .awsui_main_2qdw9_8poy5_132 > .awsui_actions_2qdw9_8poy5_156:not(#\9) {
201
+ .awsui_root-has-description_2qdw9_6h6z2_113 > .awsui_main_2qdw9_6h6z2_132 > .awsui_actions_2qdw9_6h6z2_156:not(#\9) {
202
202
  padding-bottom: 0;
203
203
  }
204
204
 
205
- .awsui_title_2qdw9_8poy5_179:not(#\9) {
205
+ .awsui_title_2qdw9_6h6z2_179:not(#\9) {
206
206
  min-width: 0;
207
207
  word-break: break-word;
208
208
  color: var(--color-text-heading-default-q5s9rq, #16191f);
209
209
  }
210
- .awsui_title-variant-h1_2qdw9_8poy5_184:not(#\9) {
210
+ .awsui_title-variant-h1_2qdw9_6h6z2_184:not(#\9) {
211
211
  font-size: var(--font-size-heading-xl-k9a0qt, 28px);
212
212
  padding-top: var(--space-scaled-2x-xxs-r5f1ts, 4px);
213
213
  }
214
- .awsui_title-variant-h1_2qdw9_8poy5_184.awsui_refresh_2qdw9_8poy5_110:not(#\9) {
214
+ .awsui_title-variant-h1_2qdw9_6h6z2_184.awsui_refresh_2qdw9_6h6z2_110:not(#\9) {
215
215
  padding-top: calc((var(--size-vertical-input-ubbp77, 32px) - var(--line-height-heading-xl-v9hsvt, 36px)) / 2);
216
216
  }
217
- .awsui_title-variant-h2_2qdw9_8poy5_191:not(#\9) {
217
+ .awsui_title-variant-h2_2qdw9_6h6z2_191:not(#\9) {
218
218
  font-size: var(--font-size-heading-l-l21r86, 18px);
219
219
  }
220
- .awsui_title-variant-h2_2qdw9_8poy5_191.awsui_refresh_2qdw9_8poy5_110:not(#\9) {
220
+ .awsui_title-variant-h2_2qdw9_6h6z2_191.awsui_refresh_2qdw9_6h6z2_110:not(#\9) {
221
221
  padding-top: calc((var(--size-vertical-input-ubbp77, 32px) - var(--line-height-heading-l-vog8w7, 22px)) / 2);
222
222
  }
223
- .awsui_title-variant-h3_2qdw9_8poy5_197:not(#\9) {
223
+ .awsui_title-variant-h3_2qdw9_6h6z2_197:not(#\9) {
224
224
  font-size: var(--font-size-heading-m-io97me, 18px);
225
225
  }
226
- .awsui_title-variant-h3_2qdw9_8poy5_197.awsui_refresh_2qdw9_8poy5_110:not(#\9) {
226
+ .awsui_title-variant-h3_2qdw9_6h6z2_197.awsui_refresh_2qdw9_6h6z2_110:not(#\9) {
227
227
  padding-top: calc((var(--size-vertical-input-ubbp77, 32px) - var(--line-height-heading-m-6mmwjh, 22px)) / 2);
228
228
  }
229
- .awsui_title-variant-h2_2qdw9_8poy5_191:not(#\9):not(.awsui_refresh_2qdw9_8poy5_110), .awsui_title-variant-h3_2qdw9_8poy5_197:not(#\9):not(.awsui_refresh_2qdw9_8poy5_110) {
229
+ .awsui_title-variant-h2_2qdw9_6h6z2_191:not(#\9):not(.awsui_refresh_2qdw9_6h6z2_110), .awsui_title-variant-h3_2qdw9_6h6z2_197:not(#\9):not(.awsui_refresh_2qdw9_6h6z2_110) {
230
230
  padding-top: var(--space-scaled-xs-x91h81, 8px);
231
231
  }
232
- .awsui_no-wrap_2qdw9_8poy5_142 > .awsui_title_2qdw9_8poy5_179:not(#\9):not(.awsui_refresh_2qdw9_8poy5_110) {
232
+ .awsui_no-wrap_2qdw9_6h6z2_142 > .awsui_title_2qdw9_6h6z2_179:not(#\9):not(.awsui_refresh_2qdw9_6h6z2_110) {
233
233
  padding-bottom: calc(var(--space-scaled-xxs-t7ij38, 4px) + var(--space-scaled-xxxs-f7yq15, 2px));
234
234
  }
235
235
 
236
- .awsui_root-no-actions_2qdw9_8poy5_110.awsui_root-has-description_2qdw9_8poy5_113 > .awsui_main_2qdw9_8poy5_132 > :not(#\9):not(.awsui_refresh_2qdw9_8poy5_110).awsui_title-variant-h2_2qdw9_8poy5_191, .awsui_root-no-actions_2qdw9_8poy5_110.awsui_root-has-description_2qdw9_8poy5_113 > .awsui_main_2qdw9_8poy5_132 > :not(#\9):not(.awsui_refresh_2qdw9_8poy5_110).awsui_title-variant-h3_2qdw9_8poy5_197 {
236
+ .awsui_root-no-actions_2qdw9_6h6z2_110.awsui_root-has-description_2qdw9_6h6z2_113 > .awsui_main_2qdw9_6h6z2_132 > :not(#\9):not(.awsui_refresh_2qdw9_6h6z2_110).awsui_title-variant-h2_2qdw9_6h6z2_191, .awsui_root-no-actions_2qdw9_6h6z2_110.awsui_root-has-description_2qdw9_6h6z2_113 > .awsui_main_2qdw9_6h6z2_132 > :not(#\9):not(.awsui_refresh_2qdw9_6h6z2_110).awsui_title-variant-h3_2qdw9_6h6z2_197 {
237
237
  padding-bottom: var(--space-scaled-xxs-t7ij38, 4px);
238
238
  }
239
239
 
240
- .awsui_root-variant-h1_2qdw9_8poy5_122.awsui_root-no-actions_2qdw9_8poy5_110:not(#\9):not(.awsui_root-has-description_2qdw9_8poy5_113):not(.awsui_refresh_2qdw9_8poy5_110) {
240
+ .awsui_root-variant-h1_2qdw9_6h6z2_122.awsui_root-no-actions_2qdw9_6h6z2_110:not(#\9):not(.awsui_root-has-description_2qdw9_6h6z2_113):not(.awsui_refresh_2qdw9_6h6z2_110) {
241
241
  padding-bottom: var(--space-scaled-2x-xxs-r5f1ts, 4px);
242
242
  }
243
243
 
244
- .awsui_info_2qdw9_8poy5_218:not(#\9) {
244
+ .awsui_virtual-space_2qdw9_6h6z2_218:not(#\9) {
245
+ position: absolute !important;
246
+ top: -9999px !important;
247
+ left: -9999px !important;
248
+ }
249
+
250
+ .awsui_info_2qdw9_6h6z2_224:not(#\9) {
245
251
  padding-right: var(--space-s-2025hl, 12px);
246
252
  }
247
253
 
248
- .awsui_description_2qdw9_8poy5_222:not(#\9) {
254
+ .awsui_description_2qdw9_6h6z2_228:not(#\9) {
249
255
  margin: 0;
250
256
  padding: 0;
251
257
  color: var(--color-text-heading-secondary-b83go1, #545b64);
252
258
  }
253
- .awsui_description-variant-h1_2qdw9_8poy5_227:not(#\9) {
259
+ .awsui_description-variant-h1_2qdw9_6h6z2_233:not(#\9) {
254
260
  font-size: var(--font-size-body-m-pa3mqb, 14px);
255
261
  line-height: var(--line-height-body-m-2zx78l, 22px);
256
262
  }
257
- .awsui_description-variant-h2_2qdw9_8poy5_231:not(#\9) {
263
+ .awsui_description-variant-h2_2qdw9_6h6z2_237:not(#\9) {
258
264
  font-size: var(--font-header-h2-description-size-zfw7u2, 12px);
259
265
  line-height: var(--font-header-h2-description-line-height-trwmd4, 16px);
260
266
  }
261
- .awsui_description-variant-h2_2qdw9_8poy5_231:not(#\9):not(.awsui_refresh_2qdw9_8poy5_110) {
267
+ .awsui_description-variant-h2_2qdw9_6h6z2_237:not(#\9):not(.awsui_refresh_2qdw9_6h6z2_110) {
262
268
  padding-bottom: var(--space-scaled-xxs-t7ij38, 4px);
263
269
  }
264
- .awsui_description-variant-h3_2qdw9_8poy5_238:not(#\9) {
270
+ .awsui_description-variant-h3_2qdw9_6h6z2_244:not(#\9) {
265
271
  font-size: var(--font-size-body-s-533prh, 12px);
266
272
  line-height: var(--line-height-body-s-n0pazd, 16px);
267
273
  letter-spacing: var(--letter-spacing-body-s-nkvets, normal);
268
274
  }
269
- .awsui_description-variant-h3_2qdw9_8poy5_238:not(#\9):not(.awsui_refresh_2qdw9_8poy5_110) {
275
+ .awsui_description-variant-h3_2qdw9_6h6z2_244:not(#\9):not(.awsui_refresh_2qdw9_6h6z2_110) {
270
276
  padding-bottom: var(--space-scaled-xxs-t7ij38, 4px);
271
277
  }
272
278
 
273
- .awsui_heading_2qdw9_8poy5_247:not(#\9) {
279
+ .awsui_heading_2qdw9_6h6z2_253:not(#\9) {
274
280
  margin: 0;
275
281
  display: inline;
276
282
  font-size: inherit;
277
283
  margin-right: var(--space-xs-xf5ch3, 8px);
278
284
  }
279
- .awsui_heading_2qdw9_8poy5_247:not(#\9):only-child {
285
+ .awsui_heading_2qdw9_6h6z2_253:not(#\9):only-child {
280
286
  margin: 0;
281
287
  }
282
- .awsui_heading-variant-h1_2qdw9_8poy5_256:not(#\9) {
288
+ .awsui_heading-variant-h1_2qdw9_6h6z2_262:not(#\9) {
283
289
  font-size: var(--font-size-heading-xl-k9a0qt, 28px);
284
290
  line-height: var(--line-height-heading-xl-v9hsvt, 36px);
285
291
  letter-spacing: var(--letter-spacing-heading-xl-87t96e, normal);
286
292
  }
287
- .awsui_heading-variant-h2_2qdw9_8poy5_261:not(#\9) {
293
+ .awsui_heading-variant-h2_2qdw9_6h6z2_267:not(#\9) {
288
294
  font-size: var(--font-size-heading-l-l21r86, 18px);
289
295
  line-height: var(--line-height-heading-l-vog8w7, 22px);
290
296
  letter-spacing: var(--letter-spacing-heading-l-bejyzw, normal);
291
297
  }
292
- .awsui_heading-variant-h3_2qdw9_8poy5_266:not(#\9) {
298
+ .awsui_heading-variant-h3_2qdw9_6h6z2_272:not(#\9) {
293
299
  font-size: var(--font-size-heading-m-io97me, 18px);
294
300
  line-height: var(--line-height-heading-m-6mmwjh, 22px);
295
301
  letter-spacing: var(--letter-spacing-heading-m-kfwhdw, normal);
296
302
  }
297
303
 
298
- .awsui_heading-text_2qdw9_8poy5_272:not(#\9) {
304
+ .awsui_heading-text_2qdw9_6h6z2_278:not(#\9) {
299
305
  /* used in test-utils */
300
306
  }
301
- .awsui_heading-text-variant-h1_2qdw9_8poy5_275:not(#\9) {
307
+ .awsui_heading-text-variant-h1_2qdw9_6h6z2_281:not(#\9) {
302
308
  font-size: var(--font-size-heading-xl-k9a0qt, 28px);
303
309
  line-height: var(--line-height-heading-xl-v9hsvt, 36px);
304
310
  letter-spacing: var(--letter-spacing-heading-xl-87t96e, normal);
@@ -306,7 +312,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
306
312
  -webkit-font-smoothing: var(--font-smoothing-webkit-8fiijr, auto);
307
313
  -moz-osx-font-smoothing: var(--font-smoothing-moz-osx-fw8n0n, auto);
308
314
  }
309
- .awsui_heading-text-variant-h2_2qdw9_8poy5_283:not(#\9) {
315
+ .awsui_heading-text-variant-h2_2qdw9_6h6z2_289:not(#\9) {
310
316
  font-size: var(--font-size-heading-l-l21r86, 18px);
311
317
  line-height: var(--line-height-heading-l-vog8w7, 22px);
312
318
  letter-spacing: var(--letter-spacing-heading-l-bejyzw, normal);
@@ -314,7 +320,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
314
320
  -webkit-font-smoothing: var(--font-smoothing-webkit-8fiijr, auto);
315
321
  -moz-osx-font-smoothing: var(--font-smoothing-moz-osx-fw8n0n, auto);
316
322
  }
317
- .awsui_heading-text-variant-h3_2qdw9_8poy5_291:not(#\9) {
323
+ .awsui_heading-text-variant-h3_2qdw9_6h6z2_297:not(#\9) {
318
324
  font-size: var(--font-size-heading-m-io97me, 18px);
319
325
  line-height: var(--line-height-heading-m-6mmwjh, 22px);
320
326
  letter-spacing: var(--letter-spacing-heading-m-kfwhdw, normal);
@@ -323,7 +329,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
323
329
  -moz-osx-font-smoothing: var(--font-smoothing-moz-osx-fw8n0n, auto);
324
330
  }
325
331
 
326
- .awsui_counter_2qdw9_8poy5_300:not(#\9) {
332
+ .awsui_counter_2qdw9_6h6z2_306:not(#\9) {
327
333
  color: var(--color-text-counter-f3a2pb, #687078);
328
334
  font-weight: 400;
329
335
  }
@@ -2,37 +2,38 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "root": "awsui_root_2qdw9_8poy5_93",
6
- "refresh": "awsui_refresh_2qdw9_8poy5_110",
7
- "root-no-actions": "awsui_root-no-actions_2qdw9_8poy5_110",
8
- "root-variant-h2": "awsui_root-variant-h2_2qdw9_8poy5_113",
9
- "root-variant-h3": "awsui_root-variant-h3_2qdw9_8poy5_113",
10
- "root-has-description": "awsui_root-has-description_2qdw9_8poy5_113",
11
- "root-variant-h1": "awsui_root-variant-h1_2qdw9_8poy5_122",
12
- "main": "awsui_main_2qdw9_8poy5_132",
13
- "no-wrap": "awsui_no-wrap_2qdw9_8poy5_142",
14
- "main-variant-h1": "awsui_main-variant-h1_2qdw9_8poy5_148",
15
- "actions": "awsui_actions_2qdw9_8poy5_156",
16
- "actions-variant-h1": "awsui_actions-variant-h1_2qdw9_8poy5_160",
17
- "actions-variant-h2": "awsui_actions-variant-h2_2qdw9_8poy5_163",
18
- "actions-variant-h3": "awsui_actions-variant-h3_2qdw9_8poy5_166",
19
- "title": "awsui_title_2qdw9_8poy5_179",
20
- "title-variant-h1": "awsui_title-variant-h1_2qdw9_8poy5_184",
21
- "title-variant-h2": "awsui_title-variant-h2_2qdw9_8poy5_191",
22
- "title-variant-h3": "awsui_title-variant-h3_2qdw9_8poy5_197",
23
- "info": "awsui_info_2qdw9_8poy5_218",
24
- "description": "awsui_description_2qdw9_8poy5_222",
25
- "description-variant-h1": "awsui_description-variant-h1_2qdw9_8poy5_227",
26
- "description-variant-h2": "awsui_description-variant-h2_2qdw9_8poy5_231",
27
- "description-variant-h3": "awsui_description-variant-h3_2qdw9_8poy5_238",
28
- "heading": "awsui_heading_2qdw9_8poy5_247",
29
- "heading-variant-h1": "awsui_heading-variant-h1_2qdw9_8poy5_256",
30
- "heading-variant-h2": "awsui_heading-variant-h2_2qdw9_8poy5_261",
31
- "heading-variant-h3": "awsui_heading-variant-h3_2qdw9_8poy5_266",
32
- "heading-text": "awsui_heading-text_2qdw9_8poy5_272",
33
- "heading-text-variant-h1": "awsui_heading-text-variant-h1_2qdw9_8poy5_275",
34
- "heading-text-variant-h2": "awsui_heading-text-variant-h2_2qdw9_8poy5_283",
35
- "heading-text-variant-h3": "awsui_heading-text-variant-h3_2qdw9_8poy5_291",
36
- "counter": "awsui_counter_2qdw9_8poy5_300"
5
+ "root": "awsui_root_2qdw9_6h6z2_93",
6
+ "refresh": "awsui_refresh_2qdw9_6h6z2_110",
7
+ "root-no-actions": "awsui_root-no-actions_2qdw9_6h6z2_110",
8
+ "root-variant-h2": "awsui_root-variant-h2_2qdw9_6h6z2_113",
9
+ "root-variant-h3": "awsui_root-variant-h3_2qdw9_6h6z2_113",
10
+ "root-has-description": "awsui_root-has-description_2qdw9_6h6z2_113",
11
+ "root-variant-h1": "awsui_root-variant-h1_2qdw9_6h6z2_122",
12
+ "main": "awsui_main_2qdw9_6h6z2_132",
13
+ "no-wrap": "awsui_no-wrap_2qdw9_6h6z2_142",
14
+ "main-variant-h1": "awsui_main-variant-h1_2qdw9_6h6z2_148",
15
+ "actions": "awsui_actions_2qdw9_6h6z2_156",
16
+ "actions-variant-h1": "awsui_actions-variant-h1_2qdw9_6h6z2_160",
17
+ "actions-variant-h2": "awsui_actions-variant-h2_2qdw9_6h6z2_163",
18
+ "actions-variant-h3": "awsui_actions-variant-h3_2qdw9_6h6z2_166",
19
+ "title": "awsui_title_2qdw9_6h6z2_179",
20
+ "title-variant-h1": "awsui_title-variant-h1_2qdw9_6h6z2_184",
21
+ "title-variant-h2": "awsui_title-variant-h2_2qdw9_6h6z2_191",
22
+ "title-variant-h3": "awsui_title-variant-h3_2qdw9_6h6z2_197",
23
+ "virtual-space": "awsui_virtual-space_2qdw9_6h6z2_218",
24
+ "info": "awsui_info_2qdw9_6h6z2_224",
25
+ "description": "awsui_description_2qdw9_6h6z2_228",
26
+ "description-variant-h1": "awsui_description-variant-h1_2qdw9_6h6z2_233",
27
+ "description-variant-h2": "awsui_description-variant-h2_2qdw9_6h6z2_237",
28
+ "description-variant-h3": "awsui_description-variant-h3_2qdw9_6h6z2_244",
29
+ "heading": "awsui_heading_2qdw9_6h6z2_253",
30
+ "heading-variant-h1": "awsui_heading-variant-h1_2qdw9_6h6z2_262",
31
+ "heading-variant-h2": "awsui_heading-variant-h2_2qdw9_6h6z2_267",
32
+ "heading-variant-h3": "awsui_heading-variant-h3_2qdw9_6h6z2_272",
33
+ "heading-text": "awsui_heading-text_2qdw9_6h6z2_278",
34
+ "heading-text-variant-h1": "awsui_heading-text-variant-h1_2qdw9_6h6z2_281",
35
+ "heading-text-variant-h2": "awsui_heading-text-variant-h2_2qdw9_6h6z2_289",
36
+ "heading-text-variant-h3": "awsui_heading-text-variant-h3_2qdw9_6h6z2_297",
37
+ "counter": "awsui_counter_2qdw9_6h6z2_306"
37
38
  };
38
39
 
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["input/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAG3C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,OAAO,EAA6C,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC1G,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC9F,OAAO,EAAE,kBAAkB,EAAgB,MAAM,4BAA4B,CAAC;AAG9E,OAAO,EAAE,+BA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AAM,4BAA4B,CAAC;AAG9E,OAAO,EAAE,+BAA+B,EAAuB,MAAM,wCAAwC,CAAC;AAC9G,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAIlF,MAAM,WAAW,kBACf,SAAQ,kBAAkB,EACxB,cAAc,EACd,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,EACxB,gBAAgB,EAChB,+BAA+B,EAC/B,0BAA0B;IAC5B,IAAI,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,GAAG,cAAc,CAAC;IAC3C,UAAU,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAC/B,iBAAiB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACzC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAE/B,WAAW,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAChC,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAEhC,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACzC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,gBAAgB,CAAC,EAAE,yBAAyB,CAAC,gBAAgB,CAAC,CAAC;IAC/D,kBAAkB,CAAC,EAAE,yBAAyB,CAAC;QAAE,aAAa,EAAE,IAAI,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;IAE/E,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;;AA8JD,wBAA+C"}
@@ -29,7 +29,11 @@ function InternalInput(_a, ref) {
29
29
  __onRightIconClick = __onRightIconClick !== null && __onRightIconClick !== void 0 ? __onRightIconClick : searchProps.__onRightIconClick;
30
30
  const formFieldContext = useFormFieldContext(rest);
31
31
  const { ariaLabelledby, ariaDescribedby, controlId, invalid } = __inheritFormFieldProps ? formFieldContext : rest;
32
- const attributes = Object.assign({ 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, name,
32
+ const attributes = Object.assign({ 'aria-label': ariaLabel,
33
+ // aria-labelledby has precedence over aria-label in accessible name calculation.
34
+ // When aria-label is provided for Input, it should override aria-labelledBy from form-field context.
35
+ // If both aria-label and aria-labelledby come from Input props, aria-labelledby will be used in accessible name
36
+ 'aria-labelledby': ariaLabel && !rest.ariaLabelledby ? undefined : ariaLabelledby, 'aria-describedby': ariaDescribedby, name,
33
37
  placeholder,
34
38
  autoFocus, id: controlId, className: clsx(styles.input, type && styles[`input-type-${type}`], __rightIcon && styles['input-has-icon-right'], __leftIcon && styles['input-has-icon-left'], __noBorderRadius && styles['input-has-no-border-radius'], {
35
39
  [styles['input-readonly']]: readOnly,
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["input/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAO,MAAM,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAEhE,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAA6B,MAAM,oBAAoB,CAAC;AAE1G,OAAO,EAAsB,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAmC,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAE9G,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AA0BlD,SAAS,aAAa,CACpB,EAqCqB,EACrB,GAA0B;QAtC1B,EACE,IAAI,GAAG,MAAM,EACb,IAA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EAAE,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC;YACpE,oBAAC,YAAY,IAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,iBAAiB,GAAI,CAC7F,CACR;QACD,6CAAO,GAAG,EAAE,SAAS,IAAM,UAAU,EAAI;QACxC,WAAW,IAAI,CACd,8BAAM,SAAS,EAAE,MAAM,CAAC,kBAAkB,CAAC;YACzC,oBAAC,cAAc;YACb,sBAAsB;YACtB,wDAAwD;;gBADxD,sBAAsB;gBACtB,wDAAwD;gBACxD,SAAS,EAAE,MAAM,CAAC,oBAAoB,CAAC,EACvC,OAAO,EAAC,aAAa,EACrB,UAAU,EAAC,MAAM,EACjB,QAAQ,EAAE,WAAW,EACrB,OAAO,EAAE,kBAAkB,EAC3B,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,EACzD,QAAQ,EAAE,QAAQ,GAClB,CACG,CACR,CACG,CACP,CAAC;AACJ,CAAC;AAED,eAAe,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { Ref, useRef } from 'react';\nimport clsx from 'clsx';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { IconProps } from '../icon/interfaces';\nimport InternalIcon from '../icon/internal';\nimport InternalButton from '../button/internal';\nimport { fireNonCancelableEvent, fireKeyboardEvent, NonCancelableEventHandler } from '../internal/events';\nimport { InputProps, BaseInputProps, InputAutoCorrect, BaseChangeDetail } from './interfaces';\nimport { BaseComponentProps, getBaseProps } from '../internal/base-component';\nimport { useSearchProps, convertAutoComplete } from './utils';\nimport { useDebounceCallback } from '../internal/hooks/use-debounce-callback';\nimport { FormFieldValidationControlProps, useFormFieldContext } from '../internal/context/form-field-context';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport styles from './styles.css.js';\nimport { useInternalI18n } from '../i18n/context';\n\nexport interface InternalInputProps\n extends BaseComponentProps,\n BaseInputProps,\n Omit<InputProps, 'type'>,\n InputAutoCorrect,\n FormFieldValidationControlProps,\n InternalBaseComponentProps {\n type?: InputProps['type'] | 'visualSearch';\n __leftIcon?: IconProps['name'];\n __leftIconVariant?: IconProps['variant'];\n __onLeftIconClick?: () => void;\n\n __rightIcon?: IconProps['name'];\n __onRightIconClick?: () => void;\n\n __nativeAttributes?: Record<string, any>;\n __noBorderRadius?: boolean;\n\n __onDelayedInput?: NonCancelableEventHandler<BaseChangeDetail>;\n __onBlurWithDetail?: NonCancelableEventHandler<{ relatedTarget: Node | null }>;\n\n __inheritFormFieldProps?: boolean;\n}\n\nfunction InternalInput(\n {\n type = 'text',\n step,\n inputMode,\n autoComplete = true,\n ariaLabel,\n clearAriaLabel: clearAriaLabelOverride,\n name,\n value,\n placeholder,\n autoFocus,\n disabled,\n readOnly,\n disableBrowserAutocorrect,\n spellcheck,\n __noBorderRadius,\n\n __leftIcon,\n __leftIconVariant = 'subtle',\n __onLeftIconClick,\n\n ariaRequired,\n\n __rightIcon,\n __onRightIconClick,\n\n onKeyDown,\n onKeyUp,\n onChange,\n __onDelayedInput,\n __onBlurWithDetail,\n onBlur,\n onFocus,\n __nativeAttributes,\n __internalRootRef,\n __inheritFormFieldProps,\n ...rest\n }: InternalInputProps,\n ref: Ref<HTMLInputElement>\n) {\n const baseProps = getBaseProps(rest);\n const i18n = useInternalI18n('input');\n const fireDelayedInput = useDebounceCallback((value: string) => fireNonCancelableEvent(__onDelayedInput, { value }));\n\n const handleChange = (value: string) => {\n fireDelayedInput(value);\n fireNonCancelableEvent(onChange, { value });\n };\n\n const inputRef = useRef<HTMLInputElement>(null);\n const searchProps = useSearchProps(type, disabled, readOnly, value, inputRef, handleChange);\n __leftIcon = __leftIcon ?? searchProps.__leftIcon;\n __rightIcon = __rightIcon ?? searchProps.__rightIcon;\n __onRightIconClick = __onRightIconClick ?? searchProps.__onRightIconClick;\n\n const formFieldContext = useFormFieldContext(rest);\n const { ariaLabelledby, ariaDescribedby, controlId, invalid } = __inheritFormFieldProps ? formFieldContext : rest;\n\n const attributes: React.InputHTMLAttributes<HTMLInputElement> = {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n name,\n placeholder,\n autoFocus,\n id: controlId,\n className: clsx(\n styles.input,\n type && styles[`input-type-${type}`],\n __rightIcon && styles['input-has-icon-right'],\n __leftIcon && styles['input-has-icon-left'],\n __noBorderRadius && styles['input-has-no-border-radius'],\n {\n [styles['input-readonly']]: readOnly,\n [styles['input-invalid']]: invalid,\n }\n ),\n autoComplete: convertAutoComplete(autoComplete),\n disabled,\n readOnly,\n type,\n step,\n inputMode,\n spellCheck: spellcheck,\n onKeyDown: onKeyDown && (event => fireKeyboardEvent(onKeyDown, event)),\n onKeyUp: onKeyUp && (event => fireKeyboardEvent(onKeyUp, event)),\n // We set a default value on the component in order to force it into the controlled mode.\n value: value ?? '',\n onChange: onChange && (event => handleChange(event.target.value)),\n onBlur: e => {\n onBlur && fireNonCancelableEvent(onBlur);\n __onBlurWithDetail && fireNonCancelableEvent(__onBlurWithDetail, { relatedTarget: e.relatedTarget });\n },\n onFocus: onFocus && (() => fireNonCancelableEvent(onFocus)),\n ...__nativeAttributes,\n };\n\n if (type === 'number') {\n // Chrome and Safari have a weird built-in behavior of letting focused\n // number inputs be controlled by scrolling on them. However, they don't\n // lock the browser's scroll, so it's very easy to accidentally increment\n // the input while scrolling down the page.\n attributes.onWheel = event => event.currentTarget.blur();\n }\n\n if (disableBrowserAutocorrect) {\n attributes.autoCorrect = 'off';\n attributes.autoCapitalize = 'off';\n }\n\n // ensure aria properties are string literal \"true\"\n if (ariaRequired) {\n attributes['aria-required'] = 'true';\n }\n if (invalid) {\n attributes['aria-invalid'] = 'true';\n }\n\n const mergedRef = useMergeRefs(ref, inputRef);\n\n // type = \"visualSearch\" renders a type=\"text' input\n if (attributes.type === 'visualSearch') {\n attributes.type = 'text';\n }\n\n return (\n <div {...baseProps} className={clsx(baseProps.className, styles['input-container'])} ref={__internalRootRef}>\n {__leftIcon && (\n <span onClick={__onLeftIconClick} className={styles['input-icon-left']}>\n <InternalIcon name={__leftIcon} variant={disabled || readOnly ? 'disabled' : __leftIconVariant} />\n </span>\n )}\n <input ref={mergedRef} {...attributes} />\n {__rightIcon && (\n <span className={styles['input-icon-right']}>\n <InternalButton\n // Used for test utils\n // eslint-disable-next-line react/forbid-component-props\n className={styles['input-button-right']}\n variant=\"inline-icon\"\n formAction=\"none\"\n iconName={__rightIcon}\n onClick={__onRightIconClick}\n ariaLabel={i18n('clearAriaLabel', clearAriaLabelOverride)}\n disabled={disabled}\n />\n </span>\n )}\n </div>\n );\n}\n\nexport default React.forwardRef(InternalInput);\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["input/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAO,MAAM,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAEhE,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAA6B,MAAM,oBAAoB,CAAC;AAE1G,OAAO,EAAsB,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAmC,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAE9G,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE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;QACtC,UAAU,CAAC,IAAI,GAAG,MAAM,CAAC;KAC1B;IAED,OAAO,CACL,6CAAS,SAAS,IAAE,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC,CAAC,EAAE,GAAG,EAAE,iBAAiB;QACxG,UAAU,IAAI,CACb,8BAAM,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC;YACpE,oBAAC,YAAY,IAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,iBAAiB,GAAI,CAC7F,CACR;QACD,6CAAO,GAAG,EAAE,SAAS,IAAM,UAAU,EAAI;QACxC,WAAW,IAAI,CACd,8BAAM,SAAS,EAAE,MAAM,CAAC,kBAAkB,CAAC;YACzC,oBAAC,cAAc;YACb,sBAAsB;YACtB,wDAAwD;;gBADxD,sBAAsB;gBACtB,wDAAwD;gBACxD,SAAS,EAAE,MAAM,CAAC,oBAAoB,CAAC,EACvC,OAAO,EAAC,aAAa,EACrB,UAAU,EAAC,MAAM,EACjB,QAAQ,EAAE,WAAW,EACrB,OAAO,EAAE,kBAAkB,EAC3B,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,EACzD,QAAQ,EAAE,QAAQ,GAClB,CACG,CACR,CACG,CACP,CAAC;AACJ,CAAC;AAED,eAAe,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { Ref, useRef } from 'react';\nimport clsx from 'clsx';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { IconProps } from '../icon/interfaces';\nimport InternalIcon from '../icon/internal';\nimport InternalButton from '../button/internal';\nimport { fireNonCancelableEvent, fireKeyboardEvent, NonCancelableEventHandler } from '../internal/events';\nimport { InputProps, BaseInputProps, InputAutoCorrect, BaseChangeDetail } from './interfaces';\nimport { BaseComponentProps, getBaseProps } from '../internal/base-component';\nimport { useSearchProps, convertAutoComplete } from './utils';\nimport { useDebounceCallback } from '../internal/hooks/use-debounce-callback';\nimport { FormFieldValidationControlProps, useFormFieldContext } from '../internal/context/form-field-context';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport styles from './styles.css.js';\nimport { useInternalI18n } from '../i18n/context';\n\nexport interface InternalInputProps\n extends BaseComponentProps,\n BaseInputProps,\n Omit<InputProps, 'type'>,\n InputAutoCorrect,\n FormFieldValidationControlProps,\n InternalBaseComponentProps {\n type?: InputProps['type'] | 'visualSearch';\n __leftIcon?: IconProps['name'];\n __leftIconVariant?: IconProps['variant'];\n __onLeftIconClick?: () => void;\n\n __rightIcon?: IconProps['name'];\n __onRightIconClick?: () => void;\n\n __nativeAttributes?: Record<string, any>;\n __noBorderRadius?: boolean;\n\n __onDelayedInput?: NonCancelableEventHandler<BaseChangeDetail>;\n __onBlurWithDetail?: NonCancelableEventHandler<{ relatedTarget: Node | null }>;\n\n __inheritFormFieldProps?: boolean;\n}\n\nfunction InternalInput(\n {\n type = 'text',\n step,\n inputMode,\n autoComplete = true,\n ariaLabel,\n clearAriaLabel: clearAriaLabelOverride,\n name,\n value,\n placeholder,\n autoFocus,\n disabled,\n readOnly,\n disableBrowserAutocorrect,\n spellcheck,\n __noBorderRadius,\n\n __leftIcon,\n __leftIconVariant = 'subtle',\n __onLeftIconClick,\n\n ariaRequired,\n\n __rightIcon,\n __onRightIconClick,\n\n onKeyDown,\n onKeyUp,\n onChange,\n __onDelayedInput,\n __onBlurWithDetail,\n onBlur,\n onFocus,\n __nativeAttributes,\n __internalRootRef,\n __inheritFormFieldProps,\n ...rest\n }: InternalInputProps,\n ref: Ref<HTMLInputElement>\n) {\n const baseProps = getBaseProps(rest);\n const i18n = useInternalI18n('input');\n const fireDelayedInput = useDebounceCallback((value: string) => fireNonCancelableEvent(__onDelayedInput, { value }));\n\n const handleChange = (value: string) => {\n fireDelayedInput(value);\n fireNonCancelableEvent(onChange, { value });\n };\n\n const inputRef = useRef<HTMLInputElement>(null);\n const searchProps = useSearchProps(type, disabled, readOnly, value, inputRef, handleChange);\n __leftIcon = __leftIcon ?? searchProps.__leftIcon;\n __rightIcon = __rightIcon ?? searchProps.__rightIcon;\n __onRightIconClick = __onRightIconClick ?? searchProps.__onRightIconClick;\n\n const formFieldContext = useFormFieldContext(rest);\n const { ariaLabelledby, ariaDescribedby, controlId, invalid } = __inheritFormFieldProps ? formFieldContext : rest;\n\n const attributes: React.InputHTMLAttributes<HTMLInputElement> = {\n 'aria-label': ariaLabel,\n // aria-labelledby has precedence over aria-label in accessible name calculation.\n // When aria-label is provided for Input, it should override aria-labelledBy from form-field context.\n // If both aria-label and aria-labelledby come from Input props, aria-labelledby will be used in accessible name\n 'aria-labelledby': ariaLabel && !rest.ariaLabelledby ? undefined : ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n name,\n placeholder,\n autoFocus,\n id: controlId,\n className: clsx(\n styles.input,\n type && styles[`input-type-${type}`],\n __rightIcon && styles['input-has-icon-right'],\n __leftIcon && styles['input-has-icon-left'],\n __noBorderRadius && styles['input-has-no-border-radius'],\n {\n [styles['input-readonly']]: readOnly,\n [styles['input-invalid']]: invalid,\n }\n ),\n autoComplete: convertAutoComplete(autoComplete),\n disabled,\n readOnly,\n type,\n step,\n inputMode,\n spellCheck: spellcheck,\n onKeyDown: onKeyDown && (event => fireKeyboardEvent(onKeyDown, event)),\n onKeyUp: onKeyUp && (event => fireKeyboardEvent(onKeyUp, event)),\n // We set a default value on the component in order to force it into the controlled mode.\n value: value ?? '',\n onChange: onChange && (event => handleChange(event.target.value)),\n onBlur: e => {\n onBlur && fireNonCancelableEvent(onBlur);\n __onBlurWithDetail && fireNonCancelableEvent(__onBlurWithDetail, { relatedTarget: e.relatedTarget });\n },\n onFocus: onFocus && (() => fireNonCancelableEvent(onFocus)),\n ...__nativeAttributes,\n };\n\n if (type === 'number') {\n // Chrome and Safari have a weird built-in behavior of letting focused\n // number inputs be controlled by scrolling on them. However, they don't\n // lock the browser's scroll, so it's very easy to accidentally increment\n // the input while scrolling down the page.\n attributes.onWheel = event => event.currentTarget.blur();\n }\n\n if (disableBrowserAutocorrect) {\n attributes.autoCorrect = 'off';\n attributes.autoCapitalize = 'off';\n }\n\n // ensure aria properties are string literal \"true\"\n if (ariaRequired) {\n attributes['aria-required'] = 'true';\n }\n if (invalid) {\n attributes['aria-invalid'] = 'true';\n }\n\n const mergedRef = useMergeRefs(ref, inputRef);\n\n // type = \"visualSearch\" renders a type=\"text' input\n if (attributes.type === 'visualSearch') {\n attributes.type = 'text';\n }\n\n return (\n <div {...baseProps} className={clsx(baseProps.className, styles['input-container'])} ref={__internalRootRef}>\n {__leftIcon && (\n <span onClick={__onLeftIconClick} className={styles['input-icon-left']}>\n <InternalIcon name={__leftIcon} variant={disabled || readOnly ? 'disabled' : __leftIconVariant} />\n </span>\n )}\n <input ref={mergedRef} {...attributes} />\n {__rightIcon && (\n <span className={styles['input-icon-right']}>\n <InternalButton\n // Used for test utils\n // eslint-disable-next-line react/forbid-component-props\n className={styles['input-button-right']}\n variant=\"inline-icon\"\n formAction=\"none\"\n iconName={__rightIcon}\n onClick={__onRightIconClick}\n ariaLabel={i18n('clearAriaLabel', clearAriaLabelOverride)}\n disabled={disabled}\n />\n </span>\n )}\n </div>\n );\n}\n\nexport default React.forwardRef(InternalInput);\n"]}
@@ -9,6 +9,7 @@ export interface ButtonTriggerProps extends BaseComponentProps {
9
9
  readOnly?: boolean;
10
10
  invalid?: boolean;
11
11
  inFilteringToken?: boolean;
12
+ inlineTokens?: boolean;
12
13
  ariaHasPopup?: 'true' | 'listbox' | 'dialog';
13
14
  ariaControls?: string;
14
15
  ariaLabel?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/components/button-trigger/index.ts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@@ import InternalIcon from '../../../icon/internal';
8
8
  import styles from './styles.css.js';
9
9
  import { fireKeyboardEvent, fireCancelableEvent } from '../../events';
10
10
  const ButtonTrigger = (_a, ref) => {
11
- var { children, pressed = false, hideCaret = false, disabled = false, readOnly = false, invalid = false, inFilteringToken, ariaHasPopup, ariaLabel, ariaLabelledby, ariaDescribedby, ariaControls, onKeyDown, onKeyUp, onMouseDown, onClick, onFocus, onBlur, autoFocus } = _a, restProps = __rest(_a, ["children", "pressed", "hideCaret", "disabled", "readOnly", "invalid", "inFilteringToken", "ariaHasPopup", "ariaLabel", "ariaLabelledby", "ariaDescribedby", "ariaControls", "onKeyDown", "onKeyUp", "onMouseDown", "onClick", "onFocus", "onBlur", "autoFocus"]);
11
+ var { children, pressed = false, hideCaret = false, disabled = false, readOnly = false, invalid = false, inlineTokens, inFilteringToken, ariaHasPopup, ariaLabel, ariaLabelledby, ariaDescribedby, ariaControls, onKeyDown, onKeyUp, onMouseDown, onClick, onFocus, onBlur, autoFocus } = _a, restProps = __rest(_a, ["children", "pressed", "hideCaret", "disabled", "readOnly", "invalid", "inlineTokens", "inFilteringToken", "ariaHasPopup", "ariaLabel", "ariaLabelledby", "ariaDescribedby", "ariaControls", "onKeyDown", "onKeyUp", "onMouseDown", "onClick", "onFocus", "onBlur", "autoFocus"]);
12
12
  const baseProps = getBaseProps(restProps);
13
- const attributes = Object.assign(Object.assign({}, baseProps), { type: 'button', className: clsx(styles['button-trigger'], baseProps.className, pressed && styles.pressed, disabled && styles.disabled, invalid && styles.invalid, !hideCaret && styles['has-caret'], readOnly && styles['read-only'], inFilteringToken && styles['in-filtering-token']), disabled: disabled || readOnly, 'aria-expanded': pressed, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, 'aria-haspopup': ariaHasPopup !== null && ariaHasPopup !== void 0 ? ariaHasPopup : 'listbox', 'aria-controls': ariaControls, onKeyDown: onKeyDown && (event => fireKeyboardEvent(onKeyDown, event)), onKeyUp: onKeyUp && (event => fireKeyboardEvent(onKeyUp, event)), onMouseDown: onMouseDown && (event => fireCancelableEvent(onMouseDown, {}, event)), onClick: onClick && (event => fireCancelableEvent(onClick, {}, event)), onFocus: onFocus && (event => fireCancelableEvent(onFocus, {}, event)), onBlur: onBlur && (event => fireCancelableEvent(onBlur, { relatedTarget: event.relatedTarget }, event)), autoFocus });
13
+ const attributes = Object.assign(Object.assign({}, baseProps), { type: 'button', className: clsx(styles['button-trigger'], baseProps.className, pressed && styles.pressed, disabled && styles.disabled, invalid && styles.invalid, !hideCaret && styles['has-caret'], readOnly && styles['read-only'], inFilteringToken && styles['in-filtering-token'], inlineTokens && styles['inline-tokens']), disabled: disabled || readOnly, 'aria-expanded': pressed, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, 'aria-haspopup': ariaHasPopup !== null && ariaHasPopup !== void 0 ? ariaHasPopup : 'listbox', 'aria-controls': ariaControls, onKeyDown: onKeyDown && (event => fireKeyboardEvent(onKeyDown, event)), onKeyUp: onKeyUp && (event => fireKeyboardEvent(onKeyUp, event)), onMouseDown: onMouseDown && (event => fireCancelableEvent(onMouseDown, {}, event)), onClick: onClick && (event => fireCancelableEvent(onClick, {}, event)), onFocus: onFocus && (event => fireCancelableEvent(onFocus, {}, event)), onBlur: onBlur && (event => fireCancelableEvent(onBlur, { relatedTarget: event.relatedTarget }, event)), autoFocus });
14
14
  if (invalid) {
15
15
  attributes['aria-invalid'] = invalid;
16
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/button-trigger/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAsB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO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,SAAS,EAAE,KAAK,CAAC,CAAC,EACtE,OAAO,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,EAChE,WAAW,EAAE,WAAW,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAAC,WAAW,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC,EAClF,OAAO,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAAC,OAAO,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC,EACtE,OAAO,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAAC,OAAO,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC,EACtE,MAAM,EAAE,MAAM,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAAC,MAAM,EAAE,EAAE,aAAa,EAAE,KAAK,CAAC,aAAa,EAAE,EAAE,KAAK,CAAC,CAAC,EACvG,SAAS,GACV,CAAC;IAEF,IAAI,OAAO,EAAE;QACX,UAAU,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC;KACtC;IAED,OAAO,CACL,8CAAQ,GAAG,EAAE,GAAG,IAAM,UAAU;QAC7B,QAAQ;QACR,CAAC,SAAS,IAAI,CACb,8BAAM,SAAS,EAAE,MAAM,CAAC,KAAK;YAC3B,oBAAC,YAAY,IAAC,IAAI,EAAC,mBAAmB,EAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,GAAI,CAC/E,CACR,CACM,CACV,CAAC;AACJ,CAAC,CAAC;AAQF,eAAe,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { ButtonHTMLAttributes } from 'react';\nimport clsx from 'clsx';\nimport { BaseComponentProps, getBaseProps } from '../../base-component';\nimport InternalIcon from '../../../icon/internal';\nimport styles from './styles.css.js';\nimport { fireKeyboardEvent, fireCancelableEvent, CancelableEventHandler, BaseKeyDetail } from '../../events';\n\nexport interface ButtonTriggerProps extends BaseComponentProps {\n children?: React.ReactNode;\n pressed?: boolean;\n hideCaret?: boolean;\n disabled?: boolean;\n readOnly?: boolean;\n invalid?: boolean;\n inFilteringToken?: boolean;\n ariaHasPopup?: 'true' | 'listbox' | 'dialog';\n ariaControls?: string;\n ariaLabel?: string;\n ariaLabelledby?: string;\n ariaDescribedby?: string;\n onKeyDown?: CancelableEventHandler<BaseKeyDetail>;\n onKeyUp?: CancelableEventHandler<BaseKeyDetail>;\n onMouseDown?: CancelableEventHandler;\n onClick?: CancelableEventHandler;\n onFocus?: CancelableEventHandler;\n onBlur?: CancelableEventHandler<{ relatedTarget: Node | null }>;\n autoFocus?: boolean;\n}\n\nconst ButtonTrigger = (\n {\n children,\n pressed = false,\n hideCaret = false,\n disabled = false,\n readOnly = false,\n invalid = false,\n inFilteringToken,\n ariaHasPopup,\n ariaLabel,\n ariaLabelledby,\n ariaDescribedby,\n ariaControls,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onClick,\n onFocus,\n onBlur,\n autoFocus,\n ...restProps\n }: ButtonTriggerProps,\n ref: React.Ref<HTMLButtonElement>\n) => {\n const baseProps = getBaseProps(restProps);\n const attributes: ButtonHTMLAttributes<HTMLButtonElement> = {\n ...baseProps,\n type: 'button',\n className: clsx(\n styles['button-trigger'],\n baseProps.className,\n pressed && styles.pressed,\n disabled && styles.disabled,\n invalid && styles.invalid,\n !hideCaret && styles['has-caret'],\n readOnly && styles['read-only'],\n inFilteringToken && styles['in-filtering-token']\n ),\n disabled: disabled || readOnly,\n 'aria-expanded': pressed,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'aria-haspopup': ariaHasPopup ?? 'listbox',\n 'aria-controls': ariaControls,\n onKeyDown: onKeyDown && (event => fireKeyboardEvent(onKeyDown, event)),\n onKeyUp: onKeyUp && (event => fireKeyboardEvent(onKeyUp, event)),\n onMouseDown: onMouseDown && (event => fireCancelableEvent(onMouseDown, {}, event)),\n onClick: onClick && (event => fireCancelableEvent(onClick, {}, event)),\n onFocus: onFocus && (event => fireCancelableEvent(onFocus, {}, event)),\n onBlur: onBlur && (event => fireCancelableEvent(onBlur, { relatedTarget: event.relatedTarget }, event)),\n autoFocus,\n };\n\n if (invalid) {\n attributes['aria-invalid'] = invalid;\n }\n\n return (\n <button ref={ref} {...attributes}>\n {children}\n {!hideCaret && (\n <span className={styles.arrow}>\n <InternalIcon name=\"caret-down-filled\" variant={disabled ? 'disabled' : 'normal'} />\n </span>\n )}\n </button>\n );\n};\n\nexport namespace ButtonTriggerProps {\n export interface Ref {\n focus(): void;\n }\n}\n\nexport default React.forwardRef(ButtonTrigger);\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/button-trigger/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAsB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAyC,MAAM,cAAc,CAAC;AAyB7G,MAAM,aAAa,GAAG,CACpB,EAsBqB,EACrB,GAAiC,EACjC,EAAE;QAxBF,EACE,QAAQ,EACR,OAAO,GAAG,KAAK,EACf,SAAS,GAAG,KAAK,EACjB,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,KAAK,EACf,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,SAAS,EACT,cAAc,EACd,eAAe,EACf,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CAAC,OAAO,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC,EACtE,OAAO,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAAC,OAAO,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC,EACtE,MAAM,EAAE,MAAM,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAAC,MAAM,EAAE,EAAE,aAAa,EAAE,KAAK,CAAC,aAAa,EAAE,EAAE,KAAK,CAAC,CAAC,EACvG,SAAS,GACV,CAAC;IAEF,IAAI,OAAO,EAAE;QACX,UAAU,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC;KACtC;IAED,OAAO,CACL,8CAAQ,GAAG,EAAE,GAAG,IAAM,UAAU;QAC7B,QAAQ;QACR,CAAC,SAAS,IAAI,CACb,8BAAM,SAAS,EAAE,MAAM,CAAC,KAAK;YAC3B,oBAAC,YAAY,IAAC,IAAI,EAAC,mBAAmB,EAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,GAAI,CAC/E,CACR,CACM,CACV,CAAC;AACJ,CAAC,CAAC;AAQF,eAAe,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { ButtonHTMLAttributes } from 'react';\nimport clsx from 'clsx';\nimport { BaseComponentProps, getBaseProps } from '../../base-component';\nimport InternalIcon from '../../../icon/internal';\nimport styles from './styles.css.js';\nimport { fireKeyboardEvent, fireCancelableEvent, CancelableEventHandler, BaseKeyDetail } from '../../events';\n\nexport interface ButtonTriggerProps extends BaseComponentProps {\n children?: React.ReactNode;\n pressed?: boolean;\n hideCaret?: boolean;\n disabled?: boolean;\n readOnly?: boolean;\n invalid?: boolean;\n inFilteringToken?: boolean;\n inlineTokens?: boolean;\n ariaHasPopup?: 'true' | 'listbox' | 'dialog';\n ariaControls?: string;\n ariaLabel?: string;\n ariaLabelledby?: string;\n ariaDescribedby?: string;\n onKeyDown?: CancelableEventHandler<BaseKeyDetail>;\n onKeyUp?: CancelableEventHandler<BaseKeyDetail>;\n onMouseDown?: CancelableEventHandler;\n onClick?: CancelableEventHandler;\n onFocus?: CancelableEventHandler;\n onBlur?: CancelableEventHandler<{ relatedTarget: Node | null }>;\n autoFocus?: boolean;\n}\n\nconst ButtonTrigger = (\n {\n children,\n pressed = false,\n hideCaret = false,\n disabled = false,\n readOnly = false,\n invalid = false,\n inlineTokens,\n inFilteringToken,\n ariaHasPopup,\n ariaLabel,\n ariaLabelledby,\n ariaDescribedby,\n ariaControls,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onClick,\n onFocus,\n onBlur,\n autoFocus,\n ...restProps\n }: ButtonTriggerProps,\n ref: React.Ref<HTMLButtonElement>\n) => {\n const baseProps = getBaseProps(restProps);\n const attributes: ButtonHTMLAttributes<HTMLButtonElement> = {\n ...baseProps,\n type: 'button',\n className: clsx(\n styles['button-trigger'],\n baseProps.className,\n pressed && styles.pressed,\n disabled && styles.disabled,\n invalid && styles.invalid,\n !hideCaret && styles['has-caret'],\n readOnly && styles['read-only'],\n inFilteringToken && styles['in-filtering-token'],\n inlineTokens && styles['inline-tokens']\n ),\n disabled: disabled || readOnly,\n 'aria-expanded': pressed,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'aria-haspopup': ariaHasPopup ?? 'listbox',\n 'aria-controls': ariaControls,\n onKeyDown: onKeyDown && (event => fireKeyboardEvent(onKeyDown, event)),\n onKeyUp: onKeyUp && (event => fireKeyboardEvent(onKeyUp, event)),\n onMouseDown: onMouseDown && (event => fireCancelableEvent(onMouseDown, {}, event)),\n onClick: onClick && (event => fireCancelableEvent(onClick, {}, event)),\n onFocus: onFocus && (event => fireCancelableEvent(onFocus, {}, event)),\n onBlur: onBlur && (event => fireCancelableEvent(onBlur, { relatedTarget: event.relatedTarget }, event)),\n autoFocus,\n };\n\n if (invalid) {\n attributes['aria-invalid'] = invalid;\n }\n\n return (\n <button ref={ref} {...attributes}>\n {children}\n {!hideCaret && (\n <span className={styles.arrow}>\n <InternalIcon name=\"caret-down-filled\" variant={disabled ? 'disabled' : 'normal'} />\n </span>\n )}\n </button>\n );\n};\n\nexport namespace ButtonTriggerProps {\n export interface Ref {\n focus(): void;\n }\n}\n\nexport default React.forwardRef(ButtonTrigger);\n"]}