@cloudscape-design/components-themeable 3.0.1149 → 3.0.1151

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 (60) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/input/styles.scss +7 -3
  3. package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
  4. package/lib/internal/scss/internal/styles/forms/mixins.scss +12 -4
  5. package/lib/internal/template/alert/interfaces.d.ts +12 -0
  6. package/lib/internal/template/alert/interfaces.d.ts.map +1 -1
  7. package/lib/internal/template/alert/interfaces.js.map +1 -1
  8. package/lib/internal/template/alert/internal.d.ts.map +1 -1
  9. package/lib/internal/template/alert/internal.js +35 -3
  10. package/lib/internal/template/alert/internal.js.map +1 -1
  11. package/lib/internal/template/autosuggest/interfaces.d.ts +48 -0
  12. package/lib/internal/template/autosuggest/interfaces.d.ts.map +1 -1
  13. package/lib/internal/template/autosuggest/interfaces.js.map +1 -1
  14. package/lib/internal/template/autosuggest/internal.d.ts.map +1 -1
  15. package/lib/internal/template/autosuggest/internal.js +2 -2
  16. package/lib/internal/template/autosuggest/internal.js.map +1 -1
  17. package/lib/internal/template/flashbar/collapsible-flashbar.d.ts.map +1 -1
  18. package/lib/internal/template/flashbar/collapsible-flashbar.js +14 -13
  19. package/lib/internal/template/flashbar/collapsible-flashbar.js.map +1 -1
  20. package/lib/internal/template/flashbar/common.d.ts +2 -1
  21. package/lib/internal/template/flashbar/common.d.ts.map +1 -1
  22. package/lib/internal/template/flashbar/common.js +67 -1
  23. package/lib/internal/template/flashbar/common.js.map +1 -1
  24. package/lib/internal/template/flashbar/flash.d.ts.map +1 -1
  25. package/lib/internal/template/flashbar/flash.js +4 -4
  26. package/lib/internal/template/flashbar/flash.js.map +1 -1
  27. package/lib/internal/template/flashbar/interfaces.d.ts +8 -0
  28. package/lib/internal/template/flashbar/interfaces.d.ts.map +1 -1
  29. package/lib/internal/template/flashbar/interfaces.js.map +1 -1
  30. package/lib/internal/template/flashbar/non-collapsible-flashbar.d.ts.map +1 -1
  31. package/lib/internal/template/flashbar/non-collapsible-flashbar.js +7 -6
  32. package/lib/internal/template/flashbar/non-collapsible-flashbar.js.map +1 -1
  33. package/lib/internal/template/input/styles.css.js +13 -13
  34. package/lib/internal/template/input/styles.d.ts.map +1 -1
  35. package/lib/internal/template/input/styles.js +26 -36
  36. package/lib/internal/template/input/styles.js.map +1 -1
  37. package/lib/internal/template/input/styles.scoped.css +34 -34
  38. package/lib/internal/template/input/styles.selectors.js +13 -13
  39. package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
  40. package/lib/internal/template/internal/components/autosuggest-input/index.d.ts +2 -1
  41. package/lib/internal/template/internal/components/autosuggest-input/index.d.ts.map +1 -1
  42. package/lib/internal/template/internal/components/autosuggest-input/index.js +2 -2
  43. package/lib/internal/template/internal/components/autosuggest-input/index.js.map +1 -1
  44. package/lib/internal/template/internal/environment.js +2 -2
  45. package/lib/internal/template/internal/environment.json +2 -2
  46. package/lib/internal/template/internal/persistence/index.d.ts +15 -0
  47. package/lib/internal/template/internal/persistence/index.d.ts.map +1 -0
  48. package/lib/internal/template/internal/persistence/index.js +42 -0
  49. package/lib/internal/template/internal/persistence/index.js.map +1 -0
  50. package/lib/internal/template/text-filter/interfaces.d.ts +48 -0
  51. package/lib/internal/template/text-filter/interfaces.d.ts.map +1 -1
  52. package/lib/internal/template/text-filter/interfaces.js.map +1 -1
  53. package/lib/internal/template/text-filter/internal.d.ts.map +1 -1
  54. package/lib/internal/template/text-filter/internal.js +2 -2
  55. package/lib/internal/template/text-filter/internal.js.map +1 -1
  56. package/lib/internal/template/text-filter/styles.d.ts +3 -0
  57. package/lib/internal/template/text-filter/styles.d.ts.map +1 -0
  58. package/lib/internal/template/text-filter/styles.js +44 -0
  59. package/lib/internal/template/text-filter/styles.js.map +1 -0
  60. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/flashbar/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { ButtonProps } from '../button/interfaces';\nimport { ErrorContext } from '../internal/analytics/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\n\nexport namespace FlashbarProps {\n export interface MessageDefinition {\n header?: React.ReactNode;\n content?: React.ReactNode;\n dismissible?: boolean;\n dismissLabel?: string;\n statusIconAriaLabel?: string;\n loading?: boolean;\n type?: FlashbarProps.Type;\n ariaRole?: FlashbarProps.AriaRole;\n action?: React.ReactNode;\n id?: string;\n buttonText?: ButtonProps['children'];\n onButtonClick?: ButtonProps['onClick'];\n onDismiss?: ButtonProps['onClick'];\n analyticsMetadata?: FlashbarProps.ItemAnalyticsMetadata;\n }\n\n export interface ItemAnalyticsMetadata {\n suppressFlowMetricEvents?: boolean;\n errorContext?: ErrorContext;\n }\n\n export interface I18nStrings {\n ariaLabel?: string;\n errorIconAriaLabel?: string;\n infoIconAriaLabel?: string;\n inProgressIconAriaLabel?: string;\n notificationBarAriaLabel?: string;\n notificationBarText?: string;\n successIconAriaLabel?: string;\n warningIconAriaLabel?: string;\n }\n\n export interface Style {\n item?: {\n root?: {\n background?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderColor?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n color?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n focusRing?: {\n borderColor?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n dismissButton?: {\n color?: {\n active?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n default?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n hover?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n };\n focusRing?: {\n borderColor?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n };\n notificationBar?: {\n root?: {\n background?: {\n active?: string;\n default?: string;\n hover?: string;\n };\n borderColor?: {\n active?: string;\n default?: string;\n hover?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n color?: {\n active?: string;\n default?: string;\n hover?: string;\n };\n };\n expandButton?: {\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n };\n }\n\n export type Type = 'success' | 'warning' | 'info' | 'error' | 'in-progress';\n export type AriaRole = 'alert' | 'status';\n}\n\nexport interface FlashbarProps extends BaseComponentProps {\n /**\n * Specifies flash messages that appear in the same order that they are listed.\n * The value is an array of flash message definition objects.\n *\n * A flash message object contains the following properties:\n * * `header` (ReactNode) - Specifies the heading text.\n * * `content` (ReactNode) - Specifies the primary text displayed in the flash element.\n * * `type` (string) - Indicates the type of the message to be displayed. Allowed values are as follows: `success, error, warning, info, in-progress`. The default is `info`.\n * * `loading` (boolean) - Replaces the status icon with a spinner and forces the type to `info`.\n * * `dismissible` (boolean) - Determines whether the component includes a close button icon. By default, the close button is not included.\n * When a user clicks on this button the `onDismiss` handler is called.\n * * `dismissLabel` (string) - Specifies an `aria-label` for to the dismiss icon button for improved accessibility.\n * * `statusIconAriaLabel` (string) - Specifies an `aria-label` for to the status icon for improved accessibility.\n * If not provided, `i18nStrings.{type}IconAriaLabel` will be used as a fallback.\n * * `ariaRole` (string) - For flash messages added after page load, specifies how this message is communicated to assistive\n * technology. Use \"status\" for status updates or informational content. Use \"alert\" for important messages that need the\n * user's attention.\n * * `action` (ReactNode) - Specifies an action for the flash message. Although it is technically possible to insert any content,\n * our UX guidelines only allow you to add a button.\n * * `buttonText` (string) - Specifies that an action button should be displayed, with the specified text.\n * When a user clicks on this button the `onButtonClick` handler is called.\n * If the `action` property is set, this property is ignored. **Deprecated**, replaced by `action`.\n * * `onButtonClick` (event => void) - Called when a user clicks on the action button. This is not called if you create a custom button\n * using the `action` property. **Deprecated**, replaced by `action`.\n * * `onDismiss` (event => void) - (Optional) Called when a user clicks on the dismiss button.\n * * `id` (string) - Specifies a unique flash message identifier. This property is used in two ways:\n * 1. As a [keys](https://reactjs.org/docs/lists-and-keys.html#keys) source for React rendering.\n * 2. To identify which flash message will be removed from the DOM when it is dismissed, to animate it out.\n * * `analyticsMetadata` (FlashbarProps.ItemAnalyticsMetadata) - (Optional) Specifies additional analytics-related metadata.\n * * `suppressFlowMetricEvents` - Prevent this item from generating events related to flow metrics.\n * @analytics\n */\n items: ReadonlyArray<FlashbarProps.MessageDefinition>;\n\n /**\n * Specifies whether flash messages should be stacked.\n */\n stackItems?: boolean;\n\n /**\n * An object containing all the necessary localized strings required by the component. The object should contain:\n *\n * * `ariaLabel` - Specifies the ARIA label for the list of notifications.\n *\n * If `stackItems` is set to `true`, it should also contain:\n *\n * * `notificationBarAriaLabel` - (optional) Specifies the ARIA label for the notification bar\n * * `notificationBarText` - (optional) Specifies the text shown in the notification bar\n * * `errorIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `error`.\n * * `warningIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `warning`.\n * * `infoIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `info`.\n * * `successIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `success`.\n * * `inProgressIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `in-progress` or with `loading` set to `true`.\n * @i18n\n */\n i18nStrings?: FlashbarProps.I18nStrings;\n\n /**\n * @awsuiSystem core\n */\n style?: FlashbarProps.Style;\n}\n\nexport type InternalFlashbarProps = FlashbarProps & InternalBaseComponentProps;\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/flashbar/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { ButtonProps } from '../button/interfaces';\nimport { ErrorContext } from '../internal/analytics/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\n\nexport namespace FlashbarProps {\n export interface MessageDefinition {\n header?: React.ReactNode;\n content?: React.ReactNode;\n dismissible?: boolean;\n dismissLabel?: string;\n statusIconAriaLabel?: string;\n loading?: boolean;\n type?: FlashbarProps.Type;\n ariaRole?: FlashbarProps.AriaRole;\n action?: React.ReactNode;\n id?: string;\n buttonText?: ButtonProps['children'];\n onButtonClick?: ButtonProps['onClick'];\n onDismiss?: ButtonProps['onClick'];\n analyticsMetadata?: FlashbarProps.ItemAnalyticsMetadata;\n persistenceConfig?: FlashbarProps.PersistenceConfig;\n }\n\n export interface ItemAnalyticsMetadata {\n suppressFlowMetricEvents?: boolean;\n errorContext?: ErrorContext;\n }\n export interface PersistenceConfig {\n uniqueKey: string;\n crossServicePersistence?: boolean;\n }\n\n export interface I18nStrings {\n ariaLabel?: string;\n errorIconAriaLabel?: string;\n infoIconAriaLabel?: string;\n inProgressIconAriaLabel?: string;\n notificationBarAriaLabel?: string;\n notificationBarText?: string;\n successIconAriaLabel?: string;\n warningIconAriaLabel?: string;\n }\n\n export interface Style {\n item?: {\n root?: {\n background?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderColor?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n color?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n focusRing?: {\n borderColor?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n dismissButton?: {\n color?: {\n active?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n default?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n hover?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n };\n focusRing?: {\n borderColor?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n };\n notificationBar?: {\n root?: {\n background?: {\n active?: string;\n default?: string;\n hover?: string;\n };\n borderColor?: {\n active?: string;\n default?: string;\n hover?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n color?: {\n active?: string;\n default?: string;\n hover?: string;\n };\n };\n expandButton?: {\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n };\n }\n\n export type Type = 'success' | 'warning' | 'info' | 'error' | 'in-progress';\n export type AriaRole = 'alert' | 'status';\n}\n\nexport interface FlashbarProps extends BaseComponentProps {\n /**\n * Specifies flash messages that appear in the same order that they are listed.\n * The value is an array of flash message definition objects.\n *\n * A flash message object contains the following properties:\n * * `header` (ReactNode) - Specifies the heading text.\n * * `content` (ReactNode) - Specifies the primary text displayed in the flash element.\n * * `type` (string) - Indicates the type of the message to be displayed. Allowed values are as follows: `success, error, warning, info, in-progress`. The default is `info`.\n * * `loading` (boolean) - Replaces the status icon with a spinner and forces the type to `info`.\n * * `dismissible` (boolean) - Determines whether the component includes a close button icon. By default, the close button is not included.\n * When a user clicks on this button the `onDismiss` handler is called.\n * * `dismissLabel` (string) - Specifies an `aria-label` for to the dismiss icon button for improved accessibility.\n * * `statusIconAriaLabel` (string) - Specifies an `aria-label` for to the status icon for improved accessibility.\n * If not provided, `i18nStrings.{type}IconAriaLabel` will be used as a fallback.\n * * `ariaRole` (string) - For flash messages added after page load, specifies how this message is communicated to assistive\n * technology. Use \"status\" for status updates or informational content. Use \"alert\" for important messages that need the\n * user's attention.\n * * `action` (ReactNode) - Specifies an action for the flash message. Although it is technically possible to insert any content,\n * our UX guidelines only allow you to add a button.\n * * `buttonText` (string) - Specifies that an action button should be displayed, with the specified text.\n * When a user clicks on this button the `onButtonClick` handler is called.\n * If the `action` property is set, this property is ignored. **Deprecated**, replaced by `action`.\n * * `onButtonClick` (event => void) - Called when a user clicks on the action button. This is not called if you create a custom button\n * using the `action` property. **Deprecated**, replaced by `action`.\n * * `onDismiss` (event => void) - (Optional) Called when a user clicks on the dismiss button.\n * * `id` (string) - Specifies a unique flash message identifier. This property is used in two ways:\n * 1. As a [keys](https://reactjs.org/docs/lists-and-keys.html#keys) source for React rendering.\n * 2. To identify which flash message will be removed from the DOM when it is dismissed, to animate it out.\n * * `persistenceConfig` (FlashbarProps.PersistenceConfig) - Config to persist dismiss state for dismissable Flashbar item, used only in AWS Management Console.\n * * `uniqueKey` (string) - This key to store the persistence state, it must be unique across your console.\n * * `crossServicePersistence` (boolean) - If true, the persistence state will be shared across AWS services.\n * * `analyticsMetadata` (FlashbarProps.ItemAnalyticsMetadata) - (Optional) Specifies additional analytics-related metadata.\n * * `suppressFlowMetricEvents` - Prevent this item from generating events related to flow metrics.\n * @analytics\n */\n items: ReadonlyArray<FlashbarProps.MessageDefinition>;\n\n /**\n * Specifies whether flash messages should be stacked.\n */\n stackItems?: boolean;\n\n /**\n * An object containing all the necessary localized strings required by the component. The object should contain:\n *\n * * `ariaLabel` - Specifies the ARIA label for the list of notifications.\n *\n * If `stackItems` is set to `true`, it should also contain:\n *\n * * `notificationBarAriaLabel` - (optional) Specifies the ARIA label for the notification bar\n * * `notificationBarText` - (optional) Specifies the text shown in the notification bar\n * * `errorIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `error`.\n * * `warningIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `warning`.\n * * `infoIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `info`.\n * * `successIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `success`.\n * * `inProgressIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `in-progress` or with `loading` set to `true`.\n * @i18n\n */\n i18nStrings?: FlashbarProps.I18nStrings;\n\n /**\n * @awsuiSystem core\n */\n style?: FlashbarProps.Style;\n}\n\nexport type InternalFlashbarProps = FlashbarProps & InternalBaseComponentProps;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"non-collapsible-flashbar.d.ts","sourceRoot":"","sources":["../../../src/flashbar/non-collapsible-flashbar.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAiB,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAIpE,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,SAAS,EAAE,EAAE,qBAAqB,eAgIhH"}
1
+ {"version":3,"file":"non-collapsible-flashbar.d.ts","sourceRoot":"","sources":["../../../src/flashbar/non-collapsible-flashbar.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAiB,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAIpE,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,SAAS,EAAE,EAAE,qBAAqB,eAkIhH"}
@@ -7,13 +7,14 @@ import { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-tool
7
7
  import { useInternalI18n } from '../i18n/context';
8
8
  import { Transition } from '../internal/components/transition';
9
9
  import { getComponentsAnalyticsMetadata, getItemAnalyticsMetadata } from './analytics-metadata/utils';
10
- import { useFlashbar } from './common';
10
+ import { useFlashbar, useFlashbarVisibility } from './common';
11
11
  import { TIMEOUT_FOR_ENTERING_ANIMATION } from './constant';
12
12
  import { Flash } from './flash';
13
13
  import styles from './styles.css.js';
14
14
  export default function NonCollapsibleFlashbar({ items, i18nStrings, style, ...restProps }) {
15
+ const visibleItems = useFlashbarVisibility(items);
15
16
  const { allItemsHaveId, baseProps, isReducedMotion, isVisualRefresh, mergedRef, flashRefs, handleFlashDismissed } = useFlashbar({
16
- items,
17
+ items: visibleItems,
17
18
  ...restProps,
18
19
  });
19
20
  const i18n = useInternalI18n('flashbar');
@@ -37,12 +38,12 @@ export default function NonCollapsibleFlashbar({ items, i18nStrings, style, ...r
37
38
  * from the flashbar will render with visual transitions.
38
39
  */
39
40
  function renderFlatItemsWithTransitions() {
40
- if (motionDisabled || !items) {
41
+ if (motionDisabled || !visibleItems) {
41
42
  return;
42
43
  }
43
44
  return (
44
45
  // This is a proxy for <ul>, so we're not applying a class to another actual component.
45
- React.createElement(TransitionGroup, { component: "ul", className: styles['flash-list'], "aria-label": ariaLabel }, items.map((item, index) => {
46
+ React.createElement(TransitionGroup, { component: "ul", className: styles['flash-list'], "aria-label": ariaLabel }, visibleItems.map((item, index) => {
46
47
  var _a;
47
48
  return (React.createElement(Transition, { transitionChangeDelay: { entering: TIMEOUT_FOR_ENTERING_ANIMATION }, key: (_a = item.id) !== null && _a !== void 0 ? _a : index, in: true }, (state, transitionRootElement) => {
48
49
  var _a;
@@ -55,10 +56,10 @@ export default function NonCollapsibleFlashbar({ items, i18nStrings, style, ...r
55
56
  * from the flashbar will render without visual transitions.
56
57
  */
57
58
  function renderFlatItemsWithoutTransitions() {
58
- if (!motionDisabled || !items) {
59
+ if (!motionDisabled || !visibleItems) {
59
60
  return;
60
61
  }
61
- return (React.createElement("ul", { className: styles['flash-list'], "aria-label": ariaLabel, ...getAnalyticsMetadataAttribute(getComponentsAnalyticsMetadata(items.length, false)) }, items.map((item, index) => {
62
+ return (React.createElement("ul", { className: styles['flash-list'], "aria-label": ariaLabel, ...getAnalyticsMetadataAttribute(getComponentsAnalyticsMetadata(visibleItems.length, false)) }, visibleItems.map((item, index) => {
62
63
  var _a, _b;
63
64
  return (React.createElement("li", { key: (_a = item.id) !== null && _a !== void 0 ? _a : index, className: styles['flash-list-item'], ...getAnalyticsMetadataAttribute(getItemAnalyticsMetadata(index + 1, item.type || 'info', item.id)) }, renderItem(item, (_b = item.id) !== null && _b !== void 0 ? _b : index)));
64
65
  })));
@@ -1 +1 @@
1
- {"version":3,"file":"non-collapsible-flashbar.js","sourceRoot":"","sources":["../../../src/flashbar/non-collapsible-flashbar.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,8BAA8B,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtG,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,8BAA8B,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,SAAS,EAAyB;IAC/G,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,eAAe,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,oBAAoB,EAAE,GAC/G,WAAW,CAAC;QACV,KAAK;QACL,GAAG,SAAS;KACb,CAAC,CAAC;IAEL,MAAM,IAAI,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;IACzC,MAAM,SAAS,GAAG,IAAI,CAAC,uBAAuB,EAAE,WAAW,aAAX,WAAW,u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SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;gBAC5B,0DAA0D;gBAC1D,IAAI,qBAAqB,IAAI,OAAO,qBAAqB,KAAK,UAAU,EAAE,CAAC;oBACzE,qBAAqB,CAAC,EAAE,CAAC,CAAC;gBAC5B,CAAC;qBAAM,IACL,qBAAqB;oBACrB,OAAO,qBAAqB,KAAK,QAAQ;oBACzC,SAAS,IAAI,qBAAqB,EAClC,CAAC;oBACA,qBAAuE,CAAC,OAAO,GAAG,EAAE,CAAC;gBACxF,CAAC;YACH,CAAC,EACD,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,cAAc,EAC3B,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,oBAAoB,KAC7B,IAAI,GACR,CACH,CAAC;IACJ,CAAC;IAED,4EAA4E;IAE5E,OAAO,CACL,gCAAS,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,SAAS;QACtF,8BAA8B,EAAE;QAChC,iCAAiC,EAAE,CAChC,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { TransitionGroup } from 'react-transition-group';\nimport clsx from 'clsx';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { useInternalI18n } from '../i18n/context';\nimport { Transition } from '../internal/components/transition';\nimport { getComponentsAnalyticsMetadata, getItemAnalyticsMetadata } from './analytics-metadata/utils';\nimport { useFlashbar } from './common';\nimport { TIMEOUT_FOR_ENTERING_ANIMATION } from './constant';\nimport { Flash } from './flash';\nimport { FlashbarProps, InternalFlashbarProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\nexport default function NonCollapsibleFlashbar({ items, i18nStrings, style, ...restProps }: InternalFlashbarProps) {\n const { allItemsHaveId, baseProps, isReducedMotion, isVisualRefresh, mergedRef, flashRefs, handleFlashDismissed } =\n useFlashbar({\n items,\n ...restProps,\n });\n\n const i18n = useInternalI18n('flashbar');\n const ariaLabel = i18n('i18nStrings.ariaLabel', i18nStrings?.ariaLabel);\n const iconAriaLabels = {\n errorIconAriaLabel: i18n('i18nStrings.errorIconAriaLabel', i18nStrings?.errorIconAriaLabel),\n inProgressIconAriaLabel: i18n('i18nStrings.inProgressIconAriaLabel', i18nStrings?.inProgressIconAriaLabel),\n infoIconAriaLabel: i18n('i18nStrings.infoIconAriaLabel', i18nStrings?.infoIconAriaLabel),\n successIconAriaLabel: i18n('i18nStrings.successIconAriaLabel', i18nStrings?.successIconAriaLabel),\n warningIconAriaLabel: i18n('i18nStrings.warningIconAriaLabel', i18nStrings?.warningIconAriaLabel),\n };\n\n /**\n * All the flash items should have ids so we can identify which DOM element is being\n * removed from the DOM to animate it. Motion will be disabled if any of the provided\n * flash messages does not contain an `id`.\n */\n const motionDisabled = isReducedMotion || !isVisualRefresh || !allItemsHaveId;\n\n const animateFlash = !isReducedMotion && isVisualRefresh;\n\n /**\n * If the flashbar is flat and motion is `enabled` then the adding and removing of items\n * from the flashbar will render with visual transitions.\n */\n function renderFlatItemsWithTransitions() {\n if (motionDisabled || !items) {\n return;\n }\n\n return (\n // This is a proxy for <ul>, so we're not applying a class to another actual component.\n\n <TransitionGroup component=\"ul\" className={styles['flash-list']} aria-label={ariaLabel}>\n {items.map((item, index) => (\n <Transition\n transitionChangeDelay={{ entering: TIMEOUT_FOR_ENTERING_ANIMATION }}\n key={item.id ?? index}\n in={true}\n >\n {(state: string, transitionRootElement: React.Ref<HTMLDivElement> | undefined) => (\n <li className={styles['flash-list-item']}>\n {renderItem(item, item.id ?? index, transitionRootElement, state)}\n </li>\n )}\n </Transition>\n ))}\n </TransitionGroup>\n );\n }\n\n /**\n * If the flashbar is flat and motion is `disabled` then the adding and removing of items\n * from the flashbar will render without visual transitions.\n */\n function renderFlatItemsWithoutTransitions() {\n if (!motionDisabled || !items) {\n return;\n }\n\n return (\n <ul\n className={styles['flash-list']}\n aria-label={ariaLabel}\n {...getAnalyticsMetadataAttribute(getComponentsAnalyticsMetadata(items.length, false))}\n >\n {items.map((item, index) => (\n <li\n key={item.id ?? index}\n className={styles['flash-list-item']}\n {...getAnalyticsMetadataAttribute(getItemAnalyticsMetadata(index + 1, item.type || 'info', item.id))}\n >\n {renderItem(item, item.id ?? index)}\n </li>\n ))}\n </ul>\n );\n }\n\n /**\n * This is a shared render function for a single flashbar item to be used\n * by the stacking, motion, and non-motion item group render functions.\n */\n function renderItem(\n item: FlashbarProps.MessageDefinition,\n key: string | number,\n transitionRootElement?: React.Ref<HTMLDivElement> | undefined,\n transitionState?: string | undefined\n ) {\n return (\n <Flash\n className={clsx(animateFlash && styles['flash-with-motion'], isVisualRefresh && styles['flash-refresh'])}\n key={key}\n ref={el => {\n flashRefs.current[key] = el;\n // If there's a transition root element ref, update it too\n if (transitionRootElement && typeof transitionRootElement === 'function') {\n transitionRootElement(el);\n } else if (\n transitionRootElement &&\n typeof transitionRootElement === 'object' &&\n 'current' in transitionRootElement\n ) {\n (transitionRootElement as React.MutableRefObject<HTMLDivElement | null>).current = el;\n }\n }}\n transitionState={transitionState}\n i18nStrings={iconAriaLabels}\n style={style}\n onDismissed={handleFlashDismissed}\n {...item}\n />\n );\n }\n\n // The handleFlashDismissed function is now provided by the useFlashbar hook\n\n return (\n <div {...baseProps} className={clsx(baseProps.className, styles.flashbar)} ref={mergedRef}>\n {renderFlatItemsWithTransitions()}\n {renderFlatItemsWithoutTransitions()}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"non-collapsible-flashbar.js","sourceRoot":"","sources":["../../../src/flashbar/non-collapsible-flashbar.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,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AAG,EAAE,CAAC;gBACxF,CAAC;YACH,CAAC,EACD,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,cAAc,EAC3B,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,oBAAoB,KAC7B,IAAI,GACR,CACH,CAAC;IACJ,CAAC;IAED,4EAA4E;IAE5E,OAAO,CACL,gCAAS,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,SAAS;QACtF,8BAA8B,EAAE;QAChC,iCAAiC,EAAE,CAChC,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { TransitionGroup } from 'react-transition-group';\nimport clsx from 'clsx';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { useInternalI18n } from '../i18n/context';\nimport { Transition } from '../internal/components/transition';\nimport { getComponentsAnalyticsMetadata, getItemAnalyticsMetadata } from './analytics-metadata/utils';\nimport { useFlashbar, useFlashbarVisibility } from './common';\nimport { TIMEOUT_FOR_ENTERING_ANIMATION } from './constant';\nimport { Flash } from './flash';\nimport { FlashbarProps, InternalFlashbarProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\nexport default function NonCollapsibleFlashbar({ items, i18nStrings, style, ...restProps }: InternalFlashbarProps) {\n const visibleItems = useFlashbarVisibility(items);\n\n const { allItemsHaveId, baseProps, isReducedMotion, isVisualRefresh, mergedRef, flashRefs, handleFlashDismissed } =\n useFlashbar({\n items: visibleItems,\n ...restProps,\n });\n\n const i18n = useInternalI18n('flashbar');\n const ariaLabel = i18n('i18nStrings.ariaLabel', i18nStrings?.ariaLabel);\n const iconAriaLabels = {\n errorIconAriaLabel: i18n('i18nStrings.errorIconAriaLabel', i18nStrings?.errorIconAriaLabel),\n inProgressIconAriaLabel: i18n('i18nStrings.inProgressIconAriaLabel', i18nStrings?.inProgressIconAriaLabel),\n infoIconAriaLabel: i18n('i18nStrings.infoIconAriaLabel', i18nStrings?.infoIconAriaLabel),\n successIconAriaLabel: i18n('i18nStrings.successIconAriaLabel', i18nStrings?.successIconAriaLabel),\n warningIconAriaLabel: i18n('i18nStrings.warningIconAriaLabel', i18nStrings?.warningIconAriaLabel),\n };\n\n /**\n * All the flash items should have ids so we can identify which DOM element is being\n * removed from the DOM to animate it. Motion will be disabled if any of the provided\n * flash messages does not contain an `id`.\n */\n const motionDisabled = isReducedMotion || !isVisualRefresh || !allItemsHaveId;\n\n const animateFlash = !isReducedMotion && isVisualRefresh;\n\n /**\n * If the flashbar is flat and motion is `enabled` then the adding and removing of items\n * from the flashbar will render with visual transitions.\n */\n function renderFlatItemsWithTransitions() {\n if (motionDisabled || !visibleItems) {\n return;\n }\n\n return (\n // This is a proxy for <ul>, so we're not applying a class to another actual component.\n\n <TransitionGroup component=\"ul\" className={styles['flash-list']} aria-label={ariaLabel}>\n {visibleItems.map((item, index) => (\n <Transition\n transitionChangeDelay={{ entering: TIMEOUT_FOR_ENTERING_ANIMATION }}\n key={item.id ?? index}\n in={true}\n >\n {(state: string, transitionRootElement: React.Ref<HTMLDivElement> | undefined) => (\n <li className={styles['flash-list-item']}>\n {renderItem(item, item.id ?? index, transitionRootElement, state)}\n </li>\n )}\n </Transition>\n ))}\n </TransitionGroup>\n );\n }\n\n /**\n * If the flashbar is flat and motion is `disabled` then the adding and removing of items\n * from the flashbar will render without visual transitions.\n */\n function renderFlatItemsWithoutTransitions() {\n if (!motionDisabled || !visibleItems) {\n return;\n }\n\n return (\n <ul\n className={styles['flash-list']}\n aria-label={ariaLabel}\n {...getAnalyticsMetadataAttribute(getComponentsAnalyticsMetadata(visibleItems.length, false))}\n >\n {visibleItems.map((item, index) => (\n <li\n key={item.id ?? index}\n className={styles['flash-list-item']}\n {...getAnalyticsMetadataAttribute(getItemAnalyticsMetadata(index + 1, item.type || 'info', item.id))}\n >\n {renderItem(item, item.id ?? index)}\n </li>\n ))}\n </ul>\n );\n }\n\n /**\n * This is a shared render function for a single flashbar item to be used\n * by the stacking, motion, and non-motion item group render functions.\n */\n function renderItem(\n item: FlashbarProps.MessageDefinition,\n key: string | number,\n transitionRootElement?: React.Ref<HTMLDivElement> | undefined,\n transitionState?: string | undefined\n ) {\n return (\n <Flash\n className={clsx(animateFlash && styles['flash-with-motion'], isVisualRefresh && styles['flash-refresh'])}\n key={key}\n ref={el => {\n flashRefs.current[key] = el;\n // If there's a transition root element ref, update it too\n if (transitionRootElement && typeof transitionRootElement === 'function') {\n transitionRootElement(el);\n } else if (\n transitionRootElement &&\n typeof transitionRootElement === 'object' &&\n 'current' in transitionRootElement\n ) {\n (transitionRootElement as React.MutableRefObject<HTMLDivElement | null>).current = el;\n }\n }}\n transitionState={transitionState}\n i18nStrings={iconAriaLabels}\n style={style}\n onDismissed={handleFlashDismissed}\n {...item}\n />\n );\n }\n\n // The handleFlashDismissed function is now provided by the useFlashbar hook\n\n return (\n <div {...baseProps} className={clsx(baseProps.className, styles.flashbar)} ref={mergedRef}>\n {renderFlatItemsWithTransitions()}\n {renderFlatItemsWithoutTransitions()}\n </div>\n );\n}\n"]}
@@ -1,18 +1,18 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "root": "awsui_root_2rhyz_q1m0j_145",
5
- "input": "awsui_input_2rhyz_q1m0j_149",
6
- "input-readonly": "awsui_input-readonly_2rhyz_q1m0j_203",
7
- "input-invalid": "awsui_input-invalid_2rhyz_q1m0j_266",
8
- "input-has-icon-left": "awsui_input-has-icon-left_2rhyz_q1m0j_275",
9
- "input-warning": "awsui_input-warning_2rhyz_q1m0j_278",
10
- "input-type-search": "awsui_input-type-search_2rhyz_q1m0j_290",
11
- "input-has-icon-right": "awsui_input-has-icon-right_2rhyz_q1m0j_303",
12
- "input-has-no-border-radius": "awsui_input-has-no-border-radius_2rhyz_q1m0j_306",
13
- "input-container": "awsui_input-container_2rhyz_q1m0j_313",
14
- "input-icon-left": "awsui_input-icon-left_2rhyz_q1m0j_318",
15
- "input-icon-right": "awsui_input-icon-right_2rhyz_q1m0j_325",
16
- "input-button-right": "awsui_input-button-right_2rhyz_q1m0j_331"
4
+ "root": "awsui_root_2rhyz_1fmui_145",
5
+ "input": "awsui_input_2rhyz_1fmui_149",
6
+ "input-readonly": "awsui_input-readonly_2rhyz_1fmui_203",
7
+ "input-invalid": "awsui_input-invalid_2rhyz_1fmui_266",
8
+ "input-has-icon-left": "awsui_input-has-icon-left_2rhyz_1fmui_275",
9
+ "input-warning": "awsui_input-warning_2rhyz_1fmui_278",
10
+ "input-type-search": "awsui_input-type-search_2rhyz_1fmui_290",
11
+ "input-has-icon-right": "awsui_input-has-icon-right_2rhyz_1fmui_303",
12
+ "input-has-no-border-radius": "awsui_input-has-no-border-radius_2rhyz_1fmui_306",
13
+ "input-container": "awsui_input-container_2rhyz_1fmui_313",
14
+ "input-icon-left": "awsui_input-icon-left_2rhyz_1fmui_318",
15
+ "input-icon-right": "awsui_input-icon-right_2rhyz_1fmui_325",
16
+ "input-button-right": "awsui_input-button-right_2rhyz_1fmui_331"
17
17
  };
18
18
 
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/input/styles.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC,kBAiDxD"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/input/styles.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC,kBAuCxD"}
@@ -3,9 +3,9 @@
3
3
  import { SYSTEM } from '../internal/environment';
4
4
  import customCssProps from '../internal/generated/custom-css-properties';
5
5
  export function getInputStyles(style) {
6
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
6
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25;
7
7
  let properties = {};
8
- if ((style === null || style === void 0 ? void 0 : style.root) && SYSTEM === 'core') {
8
+ if (SYSTEM === 'core') {
9
9
  properties = {
10
10
  borderRadius: (_a = style === null || style === void 0 ? void 0 : style.root) === null || _a === void 0 ? void 0 : _a.borderRadius,
11
11
  borderWidth: (_b = style === null || style === void 0 ? void 0 : style.root) === null || _b === void 0 ? void 0 : _b.borderWidth,
@@ -13,40 +13,30 @@ export function getInputStyles(style) {
13
13
  fontWeight: (_d = style === null || style === void 0 ? void 0 : style.root) === null || _d === void 0 ? void 0 : _d.fontWeight,
14
14
  paddingBlock: (_e = style === null || style === void 0 ? void 0 : style.root) === null || _e === void 0 ? void 0 : _e.paddingBlock,
15
15
  paddingInline: (_f = style === null || style === void 0 ? void 0 : style.root) === null || _f === void 0 ? void 0 : _f.paddingInline,
16
- ...(((_g = style === null || style === void 0 ? void 0 : style.root) === null || _g === void 0 ? void 0 : _g.backgroundColor) && {
17
- [customCssProps.styleBackgroundDefault]: (_h = style.root.backgroundColor) === null || _h === void 0 ? void 0 : _h.default,
18
- [customCssProps.styleBackgroundDisabled]: (_j = style.root.backgroundColor) === null || _j === void 0 ? void 0 : _j.disabled,
19
- [customCssProps.styleBackgroundHover]: (_k = style.root.backgroundColor) === null || _k === void 0 ? void 0 : _k.hover,
20
- [customCssProps.styleBackgroundFocus]: (_l = style.root.backgroundColor) === null || _l === void 0 ? void 0 : _l.focus,
21
- [customCssProps.styleBackgroundReadonly]: (_m = style.root.backgroundColor) === null || _m === void 0 ? void 0 : _m.readonly,
22
- }),
23
- ...(((_o = style === null || style === void 0 ? void 0 : style.root) === null || _o === void 0 ? void 0 : _o.borderColor) && {
24
- [customCssProps.styleBorderColorDefault]: (_p = style.root.borderColor) === null || _p === void 0 ? void 0 : _p.default,
25
- [customCssProps.styleBorderColorDisabled]: (_q = style.root.borderColor) === null || _q === void 0 ? void 0 : _q.disabled,
26
- [customCssProps.styleBorderColorHover]: (_r = style.root.borderColor) === null || _r === void 0 ? void 0 : _r.hover,
27
- [customCssProps.styleBorderColorFocus]: (_s = style.root.borderColor) === null || _s === void 0 ? void 0 : _s.focus,
28
- [customCssProps.styleBorderColorReadonly]: (_t = style.root.borderColor) === null || _t === void 0 ? void 0 : _t.readonly,
29
- }),
30
- ...(((_u = style === null || style === void 0 ? void 0 : style.root) === null || _u === void 0 ? void 0 : _u.boxShadow) && {
31
- [customCssProps.styleBoxShadowDefault]: (_v = style.root.boxShadow) === null || _v === void 0 ? void 0 : _v.default,
32
- [customCssProps.styleBoxShadowDisabled]: (_w = style.root.boxShadow) === null || _w === void 0 ? void 0 : _w.disabled,
33
- [customCssProps.styleBoxShadowHover]: (_x = style.root.boxShadow) === null || _x === void 0 ? void 0 : _x.hover,
34
- [customCssProps.styleBoxShadowFocus]: (_y = style.root.boxShadow) === null || _y === void 0 ? void 0 : _y.focus,
35
- [customCssProps.styleBoxShadowReadonly]: (_z = style.root.boxShadow) === null || _z === void 0 ? void 0 : _z.readonly,
36
- }),
37
- ...(((_0 = style === null || style === void 0 ? void 0 : style.root) === null || _0 === void 0 ? void 0 : _0.color) && {
38
- [customCssProps.styleColorDefault]: (_1 = style.root.color) === null || _1 === void 0 ? void 0 : _1.default,
39
- [customCssProps.styleColorDisabled]: (_2 = style.root.color) === null || _2 === void 0 ? void 0 : _2.disabled,
40
- [customCssProps.styleColorHover]: (_3 = style.root.color) === null || _3 === void 0 ? void 0 : _3.hover,
41
- [customCssProps.styleColorFocus]: (_4 = style.root.color) === null || _4 === void 0 ? void 0 : _4.focus,
42
- [customCssProps.styleColorReadonly]: (_5 = style.root.color) === null || _5 === void 0 ? void 0 : _5.readonly,
43
- }),
44
- ...((style === null || style === void 0 ? void 0 : style.placeholder) && {
45
- [customCssProps.stylePlaceholderColor]: (_6 = style.placeholder) === null || _6 === void 0 ? void 0 : _6.color,
46
- [customCssProps.stylePlaceholderFontSize]: (_7 = style.placeholder) === null || _7 === void 0 ? void 0 : _7.fontSize,
47
- [customCssProps.stylePlaceholderFontWeight]: (_8 = style.placeholder) === null || _8 === void 0 ? void 0 : _8.fontWeight,
48
- [customCssProps.stylePlaceholderFontStyle]: (_9 = style.placeholder) === null || _9 === void 0 ? void 0 : _9.fontStyle,
49
- }),
16
+ [customCssProps.styleBackgroundDefault]: (_h = (_g = style === null || style === void 0 ? void 0 : style.root) === null || _g === void 0 ? void 0 : _g.backgroundColor) === null || _h === void 0 ? void 0 : _h.default,
17
+ [customCssProps.styleBackgroundDisabled]: (_k = (_j = style === null || style === void 0 ? void 0 : style.root) === null || _j === void 0 ? void 0 : _j.backgroundColor) === null || _k === void 0 ? void 0 : _k.disabled,
18
+ [customCssProps.styleBackgroundHover]: (_m = (_l = style === null || style === void 0 ? void 0 : style.root) === null || _l === void 0 ? void 0 : _l.backgroundColor) === null || _m === void 0 ? void 0 : _m.hover,
19
+ [customCssProps.styleBackgroundFocus]: (_p = (_o = style === null || style === void 0 ? void 0 : style.root) === null || _o === void 0 ? void 0 : _o.backgroundColor) === null || _p === void 0 ? void 0 : _p.focus,
20
+ [customCssProps.styleBackgroundReadonly]: (_r = (_q = style === null || style === void 0 ? void 0 : style.root) === null || _q === void 0 ? void 0 : _q.backgroundColor) === null || _r === void 0 ? void 0 : _r.readonly,
21
+ [customCssProps.styleBorderColorDefault]: (_t = (_s = style === null || style === void 0 ? void 0 : style.root) === null || _s === void 0 ? void 0 : _s.borderColor) === null || _t === void 0 ? void 0 : _t.default,
22
+ [customCssProps.styleBorderColorDisabled]: (_v = (_u = style === null || style === void 0 ? void 0 : style.root) === null || _u === void 0 ? void 0 : _u.borderColor) === null || _v === void 0 ? void 0 : _v.disabled,
23
+ [customCssProps.styleBorderColorHover]: (_x = (_w = style === null || style === void 0 ? void 0 : style.root) === null || _w === void 0 ? void 0 : _w.borderColor) === null || _x === void 0 ? void 0 : _x.hover,
24
+ [customCssProps.styleBorderColorFocus]: (_z = (_y = style === null || style === void 0 ? void 0 : style.root) === null || _y === void 0 ? void 0 : _y.borderColor) === null || _z === void 0 ? void 0 : _z.focus,
25
+ [customCssProps.styleBorderColorReadonly]: (_1 = (_0 = style === null || style === void 0 ? void 0 : style.root) === null || _0 === void 0 ? void 0 : _0.borderColor) === null || _1 === void 0 ? void 0 : _1.readonly,
26
+ [customCssProps.styleBoxShadowDefault]: (_3 = (_2 = style === null || style === void 0 ? void 0 : style.root) === null || _2 === void 0 ? void 0 : _2.boxShadow) === null || _3 === void 0 ? void 0 : _3.default,
27
+ [customCssProps.styleBoxShadowDisabled]: (_5 = (_4 = style === null || style === void 0 ? void 0 : style.root) === null || _4 === void 0 ? void 0 : _4.boxShadow) === null || _5 === void 0 ? void 0 : _5.disabled,
28
+ [customCssProps.styleBoxShadowHover]: (_7 = (_6 = style === null || style === void 0 ? void 0 : style.root) === null || _6 === void 0 ? void 0 : _6.boxShadow) === null || _7 === void 0 ? void 0 : _7.hover,
29
+ [customCssProps.styleBoxShadowFocus]: (_9 = (_8 = style === null || style === void 0 ? void 0 : style.root) === null || _8 === void 0 ? void 0 : _8.boxShadow) === null || _9 === void 0 ? void 0 : _9.focus,
30
+ [customCssProps.styleBoxShadowReadonly]: (_11 = (_10 = style === null || style === void 0 ? void 0 : style.root) === null || _10 === void 0 ? void 0 : _10.boxShadow) === null || _11 === void 0 ? void 0 : _11.readonly,
31
+ [customCssProps.styleColorDefault]: (_13 = (_12 = style === null || style === void 0 ? void 0 : style.root) === null || _12 === void 0 ? void 0 : _12.color) === null || _13 === void 0 ? void 0 : _13.default,
32
+ [customCssProps.styleColorDisabled]: (_15 = (_14 = style === null || style === void 0 ? void 0 : style.root) === null || _14 === void 0 ? void 0 : _14.color) === null || _15 === void 0 ? void 0 : _15.disabled,
33
+ [customCssProps.styleColorHover]: (_17 = (_16 = style === null || style === void 0 ? void 0 : style.root) === null || _16 === void 0 ? void 0 : _16.color) === null || _17 === void 0 ? void 0 : _17.hover,
34
+ [customCssProps.styleColorFocus]: (_19 = (_18 = style === null || style === void 0 ? void 0 : style.root) === null || _18 === void 0 ? void 0 : _18.color) === null || _19 === void 0 ? void 0 : _19.focus,
35
+ [customCssProps.styleColorReadonly]: (_21 = (_20 = style === null || style === void 0 ? void 0 : style.root) === null || _20 === void 0 ? void 0 : _20.color) === null || _21 === void 0 ? void 0 : _21.readonly,
36
+ [customCssProps.stylePlaceholderColor]: (_22 = style === null || style === void 0 ? void 0 : style.placeholder) === null || _22 === void 0 ? void 0 : _22.color,
37
+ [customCssProps.stylePlaceholderFontSize]: (_23 = style === null || style === void 0 ? void 0 : style.placeholder) === null || _23 === void 0 ? void 0 : _23.fontSize,
38
+ [customCssProps.stylePlaceholderFontWeight]: (_24 = style === null || style === void 0 ? void 0 : style.placeholder) === null || _24 === void 0 ? void 0 : _24.fontWeight,
39
+ [customCssProps.stylePlaceholderFontStyle]: (_25 = style === null || style === void 0 ? void 0 : style.placeholder) === null || _25 === void 0 ? void 0 : _25.fontStyle,
50
40
  };
51
41
  return properties;
52
42
  }
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/input/styles.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,cAAc,MAAM,6CAA6C,CAAC;AAGzE,MAAM,UAAU,cAAc,CAAC,KAA0B;;IACvD,IAAI,UAAU,GAAG,EAAE,CAAC;IAEpB,IAAI,CAAA,KAAK,aAAL,KAAK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AAK,CAAC,IAAI,CAAC,KAAK,0CAAE,OAAO;gBAC7D,CAAC,cAAc,CAAC,kBAAkB,CAAC,EAAE,MAAA,KAAK,CAAC,IAAI,CAAC,KAAK,0CAAE,QAAQ;gBAC/D,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,MAAA,KAAK,CAAC,IAAI,CAAC,KAAK,0CAAE,KAAK;gBACzD,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,MAAA,KAAK,CAAC,IAAI,CAAC,KAAK,0CAAE,KAAK;gBACzD,CAAC,cAAc,CAAC,kBAAkB,CAAC,EAAE,MAAA,KAAK,CAAC,IAAI,CAAC,KAAK,0CAAE,QAAQ;aAChE,CAAC;YACF,GAAG,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,WAAW,KAAI;gBACxB,CAAC,cAAc,CAAC,qBAAqB,CAAC,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,KAAK;gBAChE,CAAC,cAAc,CAAC,wBAAwB,CAAC,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,QAAQ;gBACtE,CAAC,cAAc,CAAC,0BAA0B,CAAC,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,UAAU;gBAC1E,CAAC,cAAc,CAAC,yBAAyB,CAAC,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,SAAS;aACzE,CAAC;SACH,CAAC;QAEF,OAAO,UAAU,CAAC;IACpB,CAAC;AACH,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { SYSTEM } from '../internal/environment';\nimport customCssProps from '../internal/generated/custom-css-properties';\nimport { InputProps } from './interfaces';\n\nexport function getInputStyles(style: InputProps['style']) {\n let properties = {};\n\n if (style?.root && SYSTEM === 'core') {\n properties = {\n borderRadius: style?.root?.borderRadius,\n borderWidth: style?.root?.borderWidth,\n fontSize: style?.root?.fontSize,\n fontWeight: style?.root?.fontWeight,\n paddingBlock: style?.root?.paddingBlock,\n paddingInline: style?.root?.paddingInline,\n ...(style?.root?.backgroundColor && {\n [customCssProps.styleBackgroundDefault]: style.root.backgroundColor?.default,\n [customCssProps.styleBackgroundDisabled]: style.root.backgroundColor?.disabled,\n [customCssProps.styleBackgroundHover]: style.root.backgroundColor?.hover,\n [customCssProps.styleBackgroundFocus]: style.root.backgroundColor?.focus,\n [customCssProps.styleBackgroundReadonly]: style.root.backgroundColor?.readonly,\n }),\n ...(style?.root?.borderColor && {\n [customCssProps.styleBorderColorDefault]: style.root.borderColor?.default,\n [customCssProps.styleBorderColorDisabled]: style.root.borderColor?.disabled,\n [customCssProps.styleBorderColorHover]: style.root.borderColor?.hover,\n [customCssProps.styleBorderColorFocus]: style.root.borderColor?.focus,\n [customCssProps.styleBorderColorReadonly]: style.root.borderColor?.readonly,\n }),\n ...(style?.root?.boxShadow && {\n [customCssProps.styleBoxShadowDefault]: style.root.boxShadow?.default,\n [customCssProps.styleBoxShadowDisabled]: style.root.boxShadow?.disabled,\n [customCssProps.styleBoxShadowHover]: style.root.boxShadow?.hover,\n [customCssProps.styleBoxShadowFocus]: style.root.boxShadow?.focus,\n [customCssProps.styleBoxShadowReadonly]: style.root.boxShadow?.readonly,\n }),\n ...(style?.root?.color && {\n [customCssProps.styleColorDefault]: style.root.color?.default,\n [customCssProps.styleColorDisabled]: style.root.color?.disabled,\n [customCssProps.styleColorHover]: style.root.color?.hover,\n [customCssProps.styleColorFocus]: style.root.color?.focus,\n [customCssProps.styleColorReadonly]: style.root.color?.readonly,\n }),\n ...(style?.placeholder && {\n [customCssProps.stylePlaceholderColor]: style.placeholder?.color,\n [customCssProps.stylePlaceholderFontSize]: style.placeholder?.fontSize,\n [customCssProps.stylePlaceholderFontWeight]: style.placeholder?.fontWeight,\n [customCssProps.stylePlaceholderFontStyle]: style.placeholder?.fontStyle,\n }),\n };\n\n return properties;\n }\n}\n"]}
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/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AAK,uBAAL,KAAK,CAAE,WAAW,4CAAE,SAAS;SAC1E,CAAC;QAEF,OAAO,UAAU,CAAC;IACpB,CAAC;AACH,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { SYSTEM } from '../internal/environment';\nimport customCssProps from '../internal/generated/custom-css-properties';\nimport { InputProps } from './interfaces';\n\nexport function getInputStyles(style: InputProps['style']) {\n let properties = {};\n\n if (SYSTEM === 'core') {\n properties = {\n borderRadius: style?.root?.borderRadius,\n borderWidth: style?.root?.borderWidth,\n fontSize: style?.root?.fontSize,\n fontWeight: style?.root?.fontWeight,\n paddingBlock: style?.root?.paddingBlock,\n paddingInline: style?.root?.paddingInline,\n [customCssProps.styleBackgroundDefault]: style?.root?.backgroundColor?.default,\n [customCssProps.styleBackgroundDisabled]: style?.root?.backgroundColor?.disabled,\n [customCssProps.styleBackgroundHover]: style?.root?.backgroundColor?.hover,\n [customCssProps.styleBackgroundFocus]: style?.root?.backgroundColor?.focus,\n [customCssProps.styleBackgroundReadonly]: style?.root?.backgroundColor?.readonly,\n [customCssProps.styleBorderColorDefault]: style?.root?.borderColor?.default,\n [customCssProps.styleBorderColorDisabled]: style?.root?.borderColor?.disabled,\n [customCssProps.styleBorderColorHover]: style?.root?.borderColor?.hover,\n [customCssProps.styleBorderColorFocus]: style?.root?.borderColor?.focus,\n [customCssProps.styleBorderColorReadonly]: style?.root?.borderColor?.readonly,\n [customCssProps.styleBoxShadowDefault]: style?.root?.boxShadow?.default,\n [customCssProps.styleBoxShadowDisabled]: style?.root?.boxShadow?.disabled,\n [customCssProps.styleBoxShadowHover]: style?.root?.boxShadow?.hover,\n [customCssProps.styleBoxShadowFocus]: style?.root?.boxShadow?.focus,\n [customCssProps.styleBoxShadowReadonly]: style?.root?.boxShadow?.readonly,\n [customCssProps.styleColorDefault]: style?.root?.color?.default,\n [customCssProps.styleColorDisabled]: style?.root?.color?.disabled,\n [customCssProps.styleColorHover]: style?.root?.color?.hover,\n [customCssProps.styleColorFocus]: style?.root?.color?.focus,\n [customCssProps.styleColorReadonly]: style?.root?.color?.readonly,\n [customCssProps.stylePlaceholderColor]: style?.placeholder?.color,\n [customCssProps.stylePlaceholderFontSize]: style?.placeholder?.fontSize,\n [customCssProps.stylePlaceholderFontWeight]: style?.placeholder?.fontWeight,\n [customCssProps.stylePlaceholderFontStyle]: style?.placeholder?.fontStyle,\n };\n\n return properties;\n }\n}\n"]}
@@ -142,11 +142,11 @@
142
142
  */
143
143
  /* Style used for links in slots/components that are text heavy, to help links stand out among
144
144
  surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
145
- .awsui_root_2rhyz_q1m0j_145:not(#\9) {
145
+ .awsui_root_2rhyz_1fmui_145:not(#\9) {
146
146
  /* used in test-utils for component to distinguish input from other input-like components, for example autosuggest */
147
147
  }
148
148
 
149
- .awsui_input_2rhyz_q1m0j_149:not(#\9) {
149
+ .awsui_input_2rhyz_1fmui_149:not(#\9) {
150
150
  border-collapse: separate;
151
151
  border-spacing: 0;
152
152
  box-sizing: border-box;
@@ -194,20 +194,20 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
194
194
  line-height: var(--line-height-body-m-bedeoh, 22px);
195
195
  block-size: var(--size-vertical-input-8gzd1t, 32px);
196
196
  }
197
- .awsui_input_2rhyz_q1m0j_149:not(#\9):hover {
197
+ .awsui_input_2rhyz_1fmui_149:not(#\9):hover {
198
198
  border-color: var(--awsui-style-border-color-hover-d43v8n, var(--awsui-style-border-color-default-d43v8n, var(--color-border-input-default-txli8y, #687078)));
199
199
  color: var(--awsui-style-color-hover-d43v8n, var(--awsui-style-border-color-default-d43v8n, var(--color-text-body-default-5qid0u, #16191f)));
200
200
  background-color: var(--awsui-style-background-hover-d43v8n, var(--awsui-style-background-default-d43v8n, var(--color-background-input-default-1z2buq, #ffffff)));
201
201
  box-shadow: var(--awsui-style-box-shadow-hover-d43v8n, --awsui-style-box-shadow-default-d43v8n);
202
202
  }
203
- .awsui_input_2rhyz_q1m0j_149.awsui_input-readonly_2rhyz_q1m0j_203:not(#\9) {
203
+ .awsui_input_2rhyz_1fmui_149.awsui_input-readonly_2rhyz_1fmui_203:not(#\9) {
204
204
  background-color: var(--awsui-style-background-readonly-d43v8n, var(--awsui-style-background-default-d43v8n, var(--color-background-input-default-1z2buq, #ffffff)));
205
205
  border-block: var(--border-width-field-9k1tdz, 1px) solid var(--awsui-style-border-color-readonly-d43v8n, var(--awsui-style-border-color-default-d43v8n, var(--color-border-input-disabled-tz38ro, #eaeded)));
206
206
  border-inline: var(--border-width-field-9k1tdz, 1px) solid var(--awsui-style-border-color-readonly-d43v8n, var(--awsui-style-border-color-default-d43v8n, var(--color-border-input-disabled-tz38ro, #eaeded)));
207
207
  color: var(--awsui-style-color-readonly-d43v8n, var(--awsui-style-color-default-d43v8n, var(--color-text-body-default-5qid0u, #16191f)));
208
208
  box-shadow: var(--awsui-style-box-shadow-readonly-d43v8n);
209
209
  }
210
- .awsui_input_2rhyz_q1m0j_149:not(#\9)::-webkit-input-placeholder {
210
+ .awsui_input_2rhyz_1fmui_149:not(#\9)::-webkit-input-placeholder {
211
211
  color: var(--awsui-style-placeholder-color-d43v8n, var(--color-text-input-placeholder-hvcry0, #687078));
212
212
  font-size: var(--awsui-style-placeholder-font-size-d43v8n);
213
213
  font-style: var(--awsui-style-placeholder-font-style-d43v8n, italic);
@@ -215,21 +215,21 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
215
215
  -webkit-user-select: none;
216
216
  user-select: none;
217
217
  }
218
- .awsui_input_2rhyz_q1m0j_149:not(#\9)::-moz-placeholder {
218
+ .awsui_input_2rhyz_1fmui_149:not(#\9)::-moz-placeholder {
219
219
  color: var(--awsui-style-placeholder-color-d43v8n, var(--color-text-input-placeholder-hvcry0, #687078));
220
220
  font-size: var(--awsui-style-placeholder-font-size-d43v8n);
221
221
  font-style: var(--awsui-style-placeholder-font-style-d43v8n, italic);
222
222
  font-weight: var(--awsui-style-placeholder-font-weight-d43v8n);
223
223
  opacity: 1;
224
224
  }
225
- .awsui_input_2rhyz_q1m0j_149:not(#\9):-moz-placeholder {
225
+ .awsui_input_2rhyz_1fmui_149:not(#\9):-moz-placeholder {
226
226
  color: var(--awsui-style-placeholder-color-d43v8n, var(--color-text-input-placeholder-hvcry0, #687078));
227
227
  font-size: var(--awsui-style-placeholder-font-size-d43v8n);
228
228
  font-style: var(--awsui-style-placeholder-font-style-d43v8n, italic);
229
229
  font-weight: var(--awsui-style-placeholder-font-weight-d43v8n);
230
230
  opacity: 1;
231
231
  }
232
- .awsui_input_2rhyz_q1m0j_149:not(#\9):focus {
232
+ .awsui_input_2rhyz_1fmui_149:not(#\9):focus {
233
233
  outline: 2px dotted transparent;
234
234
  border-block: var(--border-width-field-9k1tdz, 1px) solid var(--awsui-style-border-color-focus-d43v8n, var(--color-border-input-focused-lslq4r, #0073bb));
235
235
  border-inline: var(--border-width-field-9k1tdz, 1px) solid var(--awsui-style-border-color-focus-d43v8n, var(--color-border-input-focused-lslq4r, #0073bb));
@@ -241,7 +241,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
241
241
  color: var(--awsui-style-color-focus-d43v8n, var(--color-text-body-default-5qid0u, #16191f));
242
242
  background-color: var(--awsui-style-background-focus-d43v8n, var(--color-background-input-default-1z2buq, #ffffff));
243
243
  }
244
- .awsui_input_2rhyz_q1m0j_149:not(#\9):disabled {
244
+ .awsui_input_2rhyz_1fmui_149:not(#\9):disabled {
245
245
  background-color: var(--awsui-style-background-disabled-d43v8n, var(--color-background-input-disabled-4vlau3, #eaeded));
246
246
  border-block: var(--border-width-field-9k1tdz, 1px) solid var(--awsui-style-border-color-disabled-d43v8n, var(--color-border-input-disabled-tz38ro, #eaeded));
247
247
  border-inline: var(--border-width-field-9k1tdz, 1px) solid var(--awsui-style-border-color-disabled-d43v8n, var(--color-border-input-disabled-tz38ro, #eaeded));
@@ -249,87 +249,87 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
249
249
  cursor: default;
250
250
  box-shadow: var(--awsui-style-box-shadow-disabled-d43v8n);
251
251
  }
252
- .awsui_input_2rhyz_q1m0j_149:not(#\9):disabled::-webkit-input-placeholder {
253
- color: var(--color-text-input-placeholder-disabled-x4lauf, #687078);
252
+ .awsui_input_2rhyz_1fmui_149:not(#\9):disabled::-webkit-input-placeholder {
253
+ color: var(--awsui-style-placeholder-color-d43v8n, var(--color-text-input-placeholder-disabled-x4lauf, #687078));
254
254
  -webkit-user-select: none;
255
255
  user-select: none;
256
256
  }
257
- .awsui_input_2rhyz_q1m0j_149:not(#\9):disabled::-moz-placeholder {
258
- color: var(--color-text-input-placeholder-disabled-x4lauf, #687078);
257
+ .awsui_input_2rhyz_1fmui_149:not(#\9):disabled::-moz-placeholder {
258
+ color: var(--awsui-style-placeholder-color-d43v8n, var(--color-text-input-placeholder-disabled-x4lauf, #687078));
259
259
  opacity: 1;
260
260
  }
261
- .awsui_input_2rhyz_q1m0j_149:not(#\9):disabled:-moz-placeholder {
262
- color: var(--color-text-input-placeholder-disabled-x4lauf, #687078);
261
+ .awsui_input_2rhyz_1fmui_149:not(#\9):disabled:-moz-placeholder {
262
+ color: var(--awsui-style-placeholder-color-d43v8n, var(--color-text-input-placeholder-disabled-x4lauf, #687078));
263
263
  opacity: 1;
264
264
  }
265
- .awsui_input_2rhyz_q1m0j_149:not(#\9):invalid {
265
+ .awsui_input_2rhyz_1fmui_149:not(#\9):invalid {
266
266
  box-shadow: none;
267
267
  }
268
- .awsui_input_2rhyz_q1m0j_149.awsui_input-invalid_2rhyz_q1m0j_266:not(#\9) {
268
+ .awsui_input_2rhyz_1fmui_149.awsui_input-invalid_2rhyz_1fmui_266:not(#\9) {
269
269
  color: var(--awsui-style-color-default-d43v8n, var(--color-text-status-error-aknuvu, #d13212));
270
270
  border-color: var(--awsui-style-border-color-default-d43v8n, var(--color-text-status-error-aknuvu, #d13212));
271
271
  padding-inline-start: calc(var(--space-field-horizontal-n5peob, 8px) - (var(--border-invalid-width-z5cnpo, 4px) - var(--border-width-field-9k1tdz, 1px)));
272
272
  border-inline-start-width: var(--border-invalid-width-z5cnpo, 4px);
273
273
  }
274
- .awsui_input_2rhyz_q1m0j_149.awsui_input-invalid_2rhyz_q1m0j_266:not(#\9):focus {
275
- box-shadow: 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-t0us6n, 1px) var(--color-border-item-focused-r5f6xl, #0073bb);
274
+ .awsui_input_2rhyz_1fmui_149.awsui_input-invalid_2rhyz_1fmui_266:not(#\9):focus {
275
+ box-shadow: var(--awsui-style-box-shadow-focus-d43v8n, 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-t0us6n, 1px) var(--color-border-item-focused-r5f6xl, #0073bb));
276
276
  }
277
- .awsui_input_2rhyz_q1m0j_149.awsui_input-invalid_2rhyz_q1m0j_266.awsui_input-has-icon-left_2rhyz_q1m0j_275:not(#\9) {
277
+ .awsui_input_2rhyz_1fmui_149.awsui_input-invalid_2rhyz_1fmui_266.awsui_input-has-icon-left_2rhyz_1fmui_275:not(#\9) {
278
278
  padding-inline-start: calc(var(--space-field-icon-offset-ihoxql, 32px) - (var(--border-invalid-width-z5cnpo, 4px) - var(--border-width-field-9k1tdz, 1px)));
279
279
  }
280
- .awsui_input_2rhyz_q1m0j_149.awsui_input-warning_2rhyz_q1m0j_278:not(#\9) {
280
+ .awsui_input_2rhyz_1fmui_149.awsui_input-warning_2rhyz_1fmui_278:not(#\9) {
281
281
  color: var(--awsui-style-color-default-d43v8n, var(--color-text-status-warning-9b45qh, #906806));
282
282
  border-color: var(--awsui-style-border-color-default-d43v8n, var(--color-text-status-warning-9b45qh, #906806));
283
283
  padding-inline-start: calc(var(--space-field-horizontal-n5peob, 8px) - (var(--border-invalid-width-z5cnpo, 4px) - var(--border-width-field-9k1tdz, 1px)));
284
284
  border-inline-start-width: var(--border-invalid-width-z5cnpo, 4px);
285
285
  }
286
- .awsui_input_2rhyz_q1m0j_149.awsui_input-warning_2rhyz_q1m0j_278:not(#\9):focus {
287
- box-shadow: 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-t0us6n, 1px) var(--color-border-item-focused-r5f6xl, #0073bb);
286
+ .awsui_input_2rhyz_1fmui_149.awsui_input-warning_2rhyz_1fmui_278:not(#\9):focus {
287
+ box-shadow: var(--awsui-style-box-shadow-focus-d43v8n, 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-t0us6n, 1px) var(--color-border-item-focused-r5f6xl, #0073bb));
288
288
  }
289
- .awsui_input_2rhyz_q1m0j_149.awsui_input-warning_2rhyz_q1m0j_278.awsui_input-has-icon-left_2rhyz_q1m0j_275:not(#\9) {
289
+ .awsui_input_2rhyz_1fmui_149.awsui_input-warning_2rhyz_1fmui_278.awsui_input-has-icon-left_2rhyz_1fmui_275:not(#\9) {
290
290
  padding-inline-start: calc(var(--space-field-icon-offset-ihoxql, 32px) - (var(--border-invalid-width-z5cnpo, 4px) - var(--border-width-field-9k1tdz, 1px)));
291
291
  }
292
- .awsui_input_2rhyz_q1m0j_149.awsui_input-type-search_2rhyz_q1m0j_290:not(#\9) {
292
+ .awsui_input_2rhyz_1fmui_149.awsui_input-type-search_2rhyz_1fmui_290:not(#\9) {
293
293
  box-sizing: border-box;
294
294
  -webkit-appearance: none;
295
295
  }
296
- .awsui_input_2rhyz_q1m0j_149.awsui_input-type-search_2rhyz_q1m0j_290:not(#\9)::-webkit-search-decoration {
296
+ .awsui_input_2rhyz_1fmui_149.awsui_input-type-search_2rhyz_1fmui_290:not(#\9)::-webkit-search-decoration {
297
297
  -webkit-appearance: none;
298
298
  }
299
- .awsui_input_2rhyz_q1m0j_149.awsui_input-type-search_2rhyz_q1m0j_290:not(#\9)::-webkit-search-cancel-button {
299
+ .awsui_input_2rhyz_1fmui_149.awsui_input-type-search_2rhyz_1fmui_290:not(#\9)::-webkit-search-cancel-button {
300
300
  display: none;
301
301
  }
302
- .awsui_input_2rhyz_q1m0j_149.awsui_input-has-icon-left_2rhyz_q1m0j_275:not(#\9) {
302
+ .awsui_input_2rhyz_1fmui_149.awsui_input-has-icon-left_2rhyz_1fmui_275:not(#\9) {
303
303
  padding-inline-start: var(--space-field-icon-offset-ihoxql, 32px);
304
304
  }
305
- .awsui_input_2rhyz_q1m0j_149.awsui_input-has-icon-right_2rhyz_q1m0j_303:not(#\9) {
305
+ .awsui_input_2rhyz_1fmui_149.awsui_input-has-icon-right_2rhyz_1fmui_303:not(#\9) {
306
306
  padding-inline-end: var(--space-field-icon-offset-ihoxql, 32px);
307
307
  }
308
- .awsui_input_2rhyz_q1m0j_149.awsui_input-has-no-border-radius_2rhyz_q1m0j_306:not(#\9) {
308
+ .awsui_input_2rhyz_1fmui_149.awsui_input-has-no-border-radius_2rhyz_1fmui_306:not(#\9) {
309
309
  border-start-start-radius: var(--border-radius-dropdown-oaxffg, 0px);
310
310
  border-start-end-radius: var(--border-radius-dropdown-oaxffg, 0px);
311
311
  border-end-start-radius: var(--border-radius-dropdown-oaxffg, 0px);
312
312
  border-end-end-radius: var(--border-radius-dropdown-oaxffg, 0px);
313
313
  }
314
314
 
315
- .awsui_input-container_2rhyz_q1m0j_313:not(#\9) {
315
+ .awsui_input-container_2rhyz_1fmui_313:not(#\9) {
316
316
  display: flex;
317
317
  position: relative;
318
318
  }
319
319
 
320
- .awsui_input-icon-left_2rhyz_q1m0j_318:not(#\9) {
320
+ .awsui_input-icon-left_2rhyz_1fmui_318:not(#\9) {
321
321
  position: absolute;
322
322
  pointer-events: none;
323
323
  inset-inline-start: var(--space-field-horizontal-n5peob, 8px);
324
324
  inset-block-start: calc(50% - var(--line-height-body-m-bedeoh, 22px) / 2);
325
325
  }
326
326
 
327
- .awsui_input-icon-right_2rhyz_q1m0j_325:not(#\9) {
327
+ .awsui_input-icon-right_2rhyz_1fmui_325:not(#\9) {
328
328
  position: absolute;
329
329
  inset-block-start: calc(calc(50% - var(--line-height-body-m-bedeoh, 22px) / 2) - var(--space-xxxs-3w1kr2, 2px));
330
330
  inset-inline-end: calc(var(--space-field-horizontal-n5peob, 8px) - var(--space-xxs-jnczic, 4px));
331
331
  }
332
332
 
333
- .awsui_input-button-right_2rhyz_q1m0j_331:not(#\9) {
333
+ .awsui_input-button-right_2rhyz_1fmui_331:not(#\9) {
334
334
  /* used in test-utils */
335
335
  }
@@ -2,18 +2,18 @@
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_2rhyz_q1m0j_145",
6
- "input": "awsui_input_2rhyz_q1m0j_149",
7
- "input-readonly": "awsui_input-readonly_2rhyz_q1m0j_203",
8
- "input-invalid": "awsui_input-invalid_2rhyz_q1m0j_266",
9
- "input-has-icon-left": "awsui_input-has-icon-left_2rhyz_q1m0j_275",
10
- "input-warning": "awsui_input-warning_2rhyz_q1m0j_278",
11
- "input-type-search": "awsui_input-type-search_2rhyz_q1m0j_290",
12
- "input-has-icon-right": "awsui_input-has-icon-right_2rhyz_q1m0j_303",
13
- "input-has-no-border-radius": "awsui_input-has-no-border-radius_2rhyz_q1m0j_306",
14
- "input-container": "awsui_input-container_2rhyz_q1m0j_313",
15
- "input-icon-left": "awsui_input-icon-left_2rhyz_q1m0j_318",
16
- "input-icon-right": "awsui_input-icon-right_2rhyz_q1m0j_325",
17
- "input-button-right": "awsui_input-button-right_2rhyz_q1m0j_331"
5
+ "root": "awsui_root_2rhyz_1fmui_145",
6
+ "input": "awsui_input_2rhyz_1fmui_149",
7
+ "input-readonly": "awsui_input-readonly_2rhyz_1fmui_203",
8
+ "input-invalid": "awsui_input-invalid_2rhyz_1fmui_266",
9
+ "input-has-icon-left": "awsui_input-has-icon-left_2rhyz_1fmui_275",
10
+ "input-warning": "awsui_input-warning_2rhyz_1fmui_278",
11
+ "input-type-search": "awsui_input-type-search_2rhyz_1fmui_290",
12
+ "input-has-icon-right": "awsui_input-has-icon-right_2rhyz_1fmui_303",
13
+ "input-has-no-border-radius": "awsui_input-has-no-border-radius_2rhyz_1fmui_306",
14
+ "input-container": "awsui_input-container_2rhyz_1fmui_313",
15
+ "input-icon-left": "awsui_input-icon-left_2rhyz_1fmui_318",
16
+ "input-icon-right": "awsui_input-icon-right_2rhyz_1fmui_325",
17
+ "input-button-right": "awsui_input-button-right_2rhyz_1fmui_331"
18
18
  };
19
19
 
@@ -3925,5 +3925,5 @@ body {
3925
3925
  }
3926
3926
  }
3927
3927
  :root {
3928
- --awsui-version-info-c99509e0: true;
3928
+ --awsui-version-info-1128662a: true;
3929
3929
  }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { AutosuggestProps } from '../../../autosuggest/interfaces';
3
- import { BaseChangeDetail, BaseInputProps, InputAutoCorrect, InputClearLabel, InputKeyEvents } from '../../../input/interfaces';
3
+ import { BaseChangeDetail, BaseInputProps, InputAutoCorrect, InputClearLabel, InputKeyEvents, InputProps } from '../../../input/interfaces';
4
4
  import { BaseComponentProps } from '../../base-component';
5
5
  import { FormFieldValidationControlProps } from '../../context/form-field-context';
6
6
  import { NonCancelableEventHandler } from '../../events';
@@ -21,6 +21,7 @@ interface AutosuggestInputProps extends BaseComponentProps, BaseInputProps, Inpu
21
21
  onPressArrowDown?: () => void;
22
22
  onPressArrowUp?: () => void;
23
23
  onPressEnter?: () => boolean;
24
+ style?: InputProps['style'];
24
25
  }
25
26
  interface AutosuggestInputFocusOptions {
26
27
  preventDropdown?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/autosuggest-input/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAgE,MAAM,OAAO,CAAC;AAGrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,cAAc,EACf,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AAI,CAAC;IACb,KAAK,IAAI,IAAI,CAAC;CACf;AAED,QAAA,MAAM,gBAAgB,mGA8QrB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/autosuggest-input/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAgE,MAAM,OAAO,CAAC;AAGrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,UAAU,EACX,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,kBAAkB,EAAgB,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,+BAA+B,EAAuB,MAAM,kCAAkC,CAAC;AACxG,OAAO,EAA8D,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACrH,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAK5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI1D,UAAU,qBACR,SAAQ,kBAAkB,EACxB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,+BAA+B,EAC/B,gBAAgB,EAChB,0BAA0B;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAClD,cAAc,CAAC,EAAE,yBAAyB,CAAC,gBAAgB,CAAC,CAAC;IAC7D,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC;IAC7B,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;CAC7B;AAED,UAAU,4BAA4B;IACpC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,mBAAoB,SAAQ,gBAAgB,CAAC,GAAG;IAC/D,KAAK,CAAC,OAAO,CAAC,EAAE,4BAA4B,GAAG,IAAI,CAAC;IACpD,IAAI,IAAI,IAAI,CAAC;IACb,KAAK,IAAI,IAAI,CAAC;CACf;AAED,QAAA,MAAM,gBAAgB,mGAgRrB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -11,7 +11,7 @@ import { nodeBelongs } from '../../utils/node-belongs';
11
11
  import { processAttributes } from '../../utils/with-native-attributes';
12
12
  import Dropdown from '../dropdown';
13
13
  import styles from './styles.css.js';
14
- const AutosuggestInput = React.forwardRef(({ value, onChange, onBlur, onFocus, onKeyUp, onKeyDown, name, placeholder, disabled, readOnly, autoFocus, ariaLabel, ariaRequired, disableBrowserAutocorrect = false, expandToViewport, ariaControls, ariaActivedescendant, clearAriaLabel, dropdownExpanded = true, dropdownContentKey, dropdownContentFocusable = false, dropdownContent = null, dropdownFooter = null, dropdownWidth, loopFocus, nativeInputAttributes, onCloseDropdown, onDelayedInput, onPressArrowDown, onPressArrowUp, onPressEnter, __internalRootRef, ...restProps }, ref) => {
14
+ const AutosuggestInput = React.forwardRef(({ value, onChange, onBlur, onFocus, onKeyUp, onKeyDown, name, placeholder, disabled, readOnly, autoFocus, ariaLabel, ariaRequired, disableBrowserAutocorrect = false, expandToViewport, ariaControls, ariaActivedescendant, clearAriaLabel, dropdownExpanded = true, dropdownContentKey, dropdownContentFocusable = false, dropdownContent = null, dropdownFooter = null, dropdownWidth, loopFocus, nativeInputAttributes, onCloseDropdown, onDelayedInput, onPressArrowDown, onPressArrowUp, onPressEnter, style, __internalRootRef, ...restProps }, ref) => {
15
15
  const baseProps = getBaseProps(restProps);
16
16
  const formFieldContext = useFormFieldContext(restProps);
17
17
  const inputRef = useRef(null);
@@ -174,7 +174,7 @@ const AutosuggestInput = React.forwardRef(({ value, onChange, onBlur, onFocus, o
174
174
  }
175
175
  };
176
176
  return (React.createElement("div", { ...baseProps, className: clsx(baseProps.className, styles.root), ref: __internalRootRef },
177
- React.createElement(Dropdown, { minWidth: dropdownWidth, stretchWidth: !dropdownWidth, stretchBeyondTriggerWidth: true, contentKey: dropdownContentKey, onFocus: handleFocus, onBlur: handleBlur, trigger: React.createElement(InternalInput, { type: "visualSearch", value: value, onChange: event => handleChange(event.detail.value), __onDelayedInput: event => handleDelayedInput(event.detail.value), onKeyDown: handleKeyDown, onKeyUp: onKeyUp, disabled: disabled, disableBrowserAutocorrect: disableBrowserAutocorrect, readOnly: readOnly, ariaRequired: ariaRequired, clearAriaLabel: clearAriaLabel, ref: inputRef, autoComplete: false, nativeInputAttributes: processAttributes(nativeAttributes, nativeInputAttributes, 'Autosuggest'), __skipNativeAttributesWarnings: Object.keys(nativeAttributes), ...formFieldContext }), onMouseDown: handleDropdownMouseDown, open: open && (!!dropdownContent || !!dropdownFooter), footer: dropdownFooterRef && (React.createElement("div", { ref: dropdownFooterRef, className: styles['dropdown-footer'], onKeyDown: handleDropdownKeyDown }, open && dropdownFooter ? dropdownFooter : null)), expandToViewport: expandToViewport, loopFocus: loopFocus }, open && dropdownContent ? (React.createElement("div", { ref: dropdownContentRef, className: styles['dropdown-content'] }, dropdownContent)) : null)));
177
+ React.createElement(Dropdown, { minWidth: dropdownWidth, stretchWidth: !dropdownWidth, stretchBeyondTriggerWidth: true, contentKey: dropdownContentKey, onFocus: handleFocus, onBlur: handleBlur, trigger: React.createElement(InternalInput, { type: "visualSearch", value: value, onChange: event => handleChange(event.detail.value), __onDelayedInput: event => handleDelayedInput(event.detail.value), onKeyDown: handleKeyDown, onKeyUp: onKeyUp, disabled: disabled, disableBrowserAutocorrect: disableBrowserAutocorrect, readOnly: readOnly, ariaRequired: ariaRequired, clearAriaLabel: clearAriaLabel, ref: inputRef, autoComplete: false, nativeInputAttributes: processAttributes(nativeAttributes, nativeInputAttributes, 'Autosuggest'), __skipNativeAttributesWarnings: Object.keys(nativeAttributes), style: style, ...formFieldContext }), onMouseDown: handleDropdownMouseDown, open: open && (!!dropdownContent || !!dropdownFooter), footer: dropdownFooterRef && (React.createElement("div", { ref: dropdownFooterRef, className: styles['dropdown-footer'], onKeyDown: handleDropdownKeyDown }, open && dropdownFooter ? dropdownFooter : null)), expandToViewport: expandToViewport, loopFocus: loopFocus }, open && dropdownContent ? (React.createElement("div", { ref: dropdownContentRef, className: styles['dropdown-content'] }, dropdownContent)) : null)));
178
178
  });
179
179
  export default AutosuggestInput;
180
180
  //# sourceMappingURL=index.js.map