@cloudscape-design/components 3.0.128 → 3.0.129

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 (198) hide show
  1. package/annotation-context/annotation/annotation-popover.d.ts.map +1 -1
  2. package/annotation-context/annotation/annotation-popover.js +8 -2
  3. package/annotation-context/annotation/annotation-popover.js.map +1 -1
  4. package/annotation-context/annotation/annotation-trigger.d.ts +2 -0
  5. package/annotation-context/annotation/annotation-trigger.d.ts.map +1 -1
  6. package/annotation-context/annotation/annotation-trigger.js +2 -2
  7. package/annotation-context/annotation/annotation-trigger.js.map +1 -1
  8. package/annotation-context/annotation/closed-annotation.d.ts +3 -1
  9. package/annotation-context/annotation/closed-annotation.d.ts.map +1 -1
  10. package/annotation-context/annotation/closed-annotation.js +2 -2
  11. package/annotation-context/annotation/closed-annotation.js.map +1 -1
  12. package/annotation-context/annotation/open-annotation.d.ts.map +1 -1
  13. package/annotation-context/annotation/open-annotation.js +1 -1
  14. package/annotation-context/annotation/open-annotation.js.map +1 -1
  15. package/annotation-context/annotation/styles.css.js +24 -24
  16. package/annotation-context/annotation/styles.scoped.css +30 -30
  17. package/annotation-context/annotation/styles.selectors.js +24 -24
  18. package/annotation-context/index.d.ts.map +1 -1
  19. package/annotation-context/index.js +3 -1
  20. package/annotation-context/index.js.map +1 -1
  21. package/annotation-context/interfaces.d.ts +1 -1
  22. package/annotation-context/interfaces.d.ts.map +1 -1
  23. package/annotation-context/interfaces.js.map +1 -1
  24. package/app-layout/visual-refresh/main.d.ts.map +1 -1
  25. package/app-layout/visual-refresh/main.js +8 -3
  26. package/app-layout/visual-refresh/main.js.map +1 -1
  27. package/app-layout/visual-refresh/styles.css.js +60 -60
  28. package/app-layout/visual-refresh/styles.scoped.css +255 -237
  29. package/app-layout/visual-refresh/styles.selectors.js +60 -60
  30. package/area-chart/internal.d.ts.map +1 -1
  31. package/area-chart/internal.js +5 -0
  32. package/area-chart/internal.js.map +1 -1
  33. package/area-chart/model/index.d.ts +1 -0
  34. package/area-chart/model/index.d.ts.map +1 -1
  35. package/area-chart/model/index.js.map +1 -1
  36. package/area-chart/model/use-chart-model.d.ts.map +1 -1
  37. package/area-chart/model/use-chart-model.js +8 -1
  38. package/area-chart/model/use-chart-model.js.map +1 -1
  39. package/attribute-editor/row.d.ts.map +1 -1
  40. package/attribute-editor/row.js +4 -3
  41. package/attribute-editor/row.js.map +1 -1
  42. package/attribute-editor/styles.css.js +13 -12
  43. package/attribute-editor/styles.scoped.css +27 -23
  44. package/attribute-editor/styles.selectors.js +13 -12
  45. package/breadcrumb-group/interfaces.d.ts +1 -0
  46. package/breadcrumb-group/interfaces.d.ts.map +1 -1
  47. package/breadcrumb-group/interfaces.js.map +1 -1
  48. package/breadcrumb-group/internal.d.ts.map +1 -1
  49. package/breadcrumb-group/internal.js +1 -1
  50. package/breadcrumb-group/internal.js.map +1 -1
  51. package/breadcrumb-group/item/item.d.ts +1 -1
  52. package/breadcrumb-group/item/item.d.ts.map +1 -1
  53. package/breadcrumb-group/item/item.js +68 -8
  54. package/breadcrumb-group/item/item.js.map +1 -1
  55. package/breadcrumb-group/item/styles.css.js +9 -7
  56. package/breadcrumb-group/item/styles.scoped.css +26 -16
  57. package/breadcrumb-group/item/styles.selectors.js +9 -7
  58. package/code-editor/index.d.ts.map +1 -1
  59. package/code-editor/index.js +11 -16
  60. package/code-editor/index.js.map +1 -1
  61. package/code-editor/interfaces.d.ts +12 -1
  62. package/code-editor/interfaces.d.ts.map +1 -1
  63. package/code-editor/interfaces.js.map +1 -1
  64. package/code-editor/status-bar.d.ts.map +1 -1
  65. package/code-editor/status-bar.js +7 -1
  66. package/code-editor/status-bar.js.map +1 -1
  67. package/code-editor/util.js +1 -1
  68. package/code-editor/util.js.map +1 -1
  69. package/container/internal.d.ts.map +1 -1
  70. package/container/internal.js +7 -4
  71. package/container/internal.js.map +1 -1
  72. package/date-range-picker/calendar/grids/index.d.ts +0 -1
  73. package/date-range-picker/calendar/grids/index.d.ts.map +1 -1
  74. package/date-range-picker/calendar/grids/index.js +2 -14
  75. package/date-range-picker/calendar/grids/index.js.map +1 -1
  76. package/date-range-picker/calendar/index.d.ts +6 -4
  77. package/date-range-picker/calendar/index.d.ts.map +1 -1
  78. package/date-range-picker/calendar/index.js +111 -123
  79. package/date-range-picker/calendar/index.js.map +1 -1
  80. package/date-range-picker/calendar/utils.d.ts +4 -0
  81. package/date-range-picker/calendar/utils.d.ts.map +1 -0
  82. package/date-range-picker/calendar/utils.js +31 -0
  83. package/date-range-picker/calendar/utils.js.map +1 -0
  84. package/date-range-picker/dropdown.d.ts +2 -1
  85. package/date-range-picker/dropdown.d.ts.map +1 -1
  86. package/date-range-picker/dropdown.js +8 -6
  87. package/date-range-picker/dropdown.js.map +1 -1
  88. package/date-range-picker/index.d.ts.map +1 -1
  89. package/date-range-picker/index.js +2 -2
  90. package/date-range-picker/index.js.map +1 -1
  91. package/date-range-picker/interfaces.d.ts +14 -4
  92. package/date-range-picker/interfaces.d.ts.map +1 -1
  93. package/date-range-picker/interfaces.js.map +1 -1
  94. package/date-range-picker/styles.css.js +38 -38
  95. package/date-range-picker/styles.scoped.css +45 -50
  96. package/date-range-picker/styles.selectors.js +38 -38
  97. package/date-range-picker/utils.d.ts +2 -8
  98. package/date-range-picker/utils.d.ts.map +1 -1
  99. package/date-range-picker/utils.js +17 -12
  100. package/date-range-picker/utils.js.map +1 -1
  101. package/flashbar/styles.css.js +33 -33
  102. package/flashbar/styles.scoped.css +121 -121
  103. package/flashbar/styles.selectors.js +33 -33
  104. package/internal/components/dropdown/index.d.ts.map +1 -1
  105. package/internal/components/dropdown/index.js +2 -9
  106. package/internal/components/dropdown/index.js.map +1 -1
  107. package/internal/components/dropdown-status/index.d.ts +1 -4
  108. package/internal/components/dropdown-status/index.d.ts.map +1 -1
  109. package/internal/components/dropdown-status/index.js +3 -5
  110. package/internal/components/dropdown-status/index.js.map +1 -1
  111. package/internal/components/filtering-token/index.d.ts +2 -1
  112. package/internal/components/filtering-token/index.d.ts.map +1 -1
  113. package/internal/components/filtering-token/index.js +2 -2
  114. package/internal/components/filtering-token/index.js.map +1 -1
  115. package/internal/components/option/index.js +4 -4
  116. package/internal/components/option/index.js.map +1 -1
  117. package/internal/environment.js +1 -1
  118. package/internal/generated/custom-css-properties/index.d.ts.map +1 -1
  119. package/internal/generated/custom-css-properties/index.js +27 -26
  120. package/internal/generated/custom-css-properties/index.js.map +1 -1
  121. package/internal/hooks/use-analytics/index.d.ts +2 -0
  122. package/internal/hooks/use-analytics/index.d.ts.map +1 -0
  123. package/internal/hooks/use-analytics/index.js +16 -0
  124. package/internal/hooks/use-analytics/index.js.map +1 -0
  125. package/internal/manifest.json +1 -1
  126. package/internal/utils/date-time/format-date-time.d.ts +2 -0
  127. package/internal/utils/date-time/format-date-time.d.ts.map +1 -0
  128. package/internal/utils/date-time/format-date-time.js +8 -0
  129. package/internal/utils/date-time/format-date-time.js.map +1 -0
  130. package/internal/utils/date-time/index.d.ts +2 -1
  131. package/internal/utils/date-time/index.d.ts.map +1 -1
  132. package/internal/utils/date-time/index.js +2 -1
  133. package/internal/utils/date-time/index.js.map +1 -1
  134. package/internal/utils/date-time/join-date-time.d.ts +4 -0
  135. package/internal/utils/date-time/join-date-time.d.ts.map +1 -1
  136. package/internal/utils/date-time/join-date-time.js +4 -0
  137. package/internal/utils/date-time/join-date-time.js.map +1 -1
  138. package/mixed-line-bar-chart/chart-container.d.ts.map +1 -1
  139. package/mixed-line-bar-chart/chart-container.js +14 -5
  140. package/mixed-line-bar-chart/chart-container.js.map +1 -1
  141. package/package.json +1 -1
  142. package/pie-chart/pie-chart.d.ts.map +1 -1
  143. package/pie-chart/pie-chart.js +10 -1
  144. package/pie-chart/pie-chart.js.map +1 -1
  145. package/popover/body.d.ts +2 -1
  146. package/popover/body.d.ts.map +1 -1
  147. package/popover/body.js +2 -2
  148. package/popover/body.js.map +1 -1
  149. package/property-filter/interfaces.d.ts +1 -0
  150. package/property-filter/interfaces.d.ts.map +1 -1
  151. package/property-filter/interfaces.js.map +1 -1
  152. package/property-filter/token.d.ts.map +1 -1
  153. package/property-filter/token.js +1 -1
  154. package/property-filter/token.js.map +1 -1
  155. package/select/parts/filter.d.ts +1 -1
  156. package/select/utils/use-select.d.ts +1 -7
  157. package/select/utils/use-select.d.ts.map +1 -1
  158. package/select/utils/use-select.js +1 -1
  159. package/select/utils/use-select.js.map +1 -1
  160. package/table/styles.css.js +34 -34
  161. package/table/styles.scoped.css +42 -40
  162. package/table/styles.selectors.js +34 -34
  163. package/tabs/index.d.ts.map +1 -1
  164. package/tabs/index.js +9 -11
  165. package/tabs/index.js.map +1 -1
  166. package/tabs/styles.css.js +21 -21
  167. package/tabs/styles.scoped.css +48 -41
  168. package/tabs/styles.selectors.js +21 -21
  169. package/tabs/tab-header-bar.d.ts +4 -0
  170. package/tabs/tab-header-bar.d.ts.map +1 -1
  171. package/tabs/tab-header-bar.js +5 -1
  172. package/tabs/tab-header-bar.js.map +1 -1
  173. package/tag-editor/internal.d.ts.map +1 -1
  174. package/tag-editor/internal.js +6 -7
  175. package/tag-editor/internal.js.map +1 -1
  176. package/test-utils/tsconfig.tsbuildinfo +1 -1
  177. package/tutorial-panel/components/tutorial-detail-view/index.d.ts.map +1 -1
  178. package/tutorial-panel/components/tutorial-detail-view/index.js +3 -1
  179. package/tutorial-panel/components/tutorial-detail-view/index.js.map +1 -1
  180. package/tutorial-panel/components/tutorial-detail-view/task.d.ts.map +1 -1
  181. package/tutorial-panel/components/tutorial-detail-view/task.js +2 -1
  182. package/tutorial-panel/components/tutorial-detail-view/task.js.map +1 -1
  183. package/tutorial-panel/components/tutorial-list/index.d.ts.map +1 -1
  184. package/tutorial-panel/components/tutorial-list/index.js +2 -2
  185. package/tutorial-panel/components/tutorial-list/index.js.map +1 -1
  186. package/tutorial-panel/interfaces.d.ts +2 -0
  187. package/tutorial-panel/interfaces.d.ts.map +1 -1
  188. package/tutorial-panel/interfaces.js.map +1 -1
  189. package/wizard/index.d.ts.map +1 -1
  190. package/wizard/index.js +9 -5
  191. package/wizard/index.js.map +1 -1
  192. package/wizard/wizard-form.d.ts.map +1 -1
  193. package/wizard/wizard-form.js +7 -2
  194. package/wizard/wizard-form.js.map +1 -1
  195. package/date-range-picker/calendar/use-date-time.d.ts +0 -9
  196. package/date-range-picker/calendar/use-date-time.d.ts.map +0 -1
  197. package/date-range-picker/calendar/use-date-time.js +0 -16
  198. package/date-range-picker/calendar/use-date-time.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/property-filter/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React from 'react';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\nimport { DropdownStatusProps } from '../internal/components/dropdown-status';\nimport { AutosuggestProps } from '../autosuggest/interfaces';\nimport { ExpandToViewport } from '../internal/components/dropdown/interfaces';\nimport {\n PropertyFilterOperation,\n PropertyFilterOperator,\n PropertyFilterOperatorExtended,\n PropertyFilterOperatorForm,\n PropertyFilterOperatorFormat,\n PropertyFilterOperatorFormProps,\n PropertyFilterOption,\n PropertyFilterProperty,\n PropertyFilterToken,\n} from '@cloudscape-design/collection-hooks';\n\nexport interface PropertyFilterProps extends BaseComponentProps, ExpandToViewport {\n /**\n * If set to `true`, the filtering input will be disabled.\n * Use it, for example, if you are fetching new items upon filtering change\n * in order to prevent the user from changing the filtering query.\n */\n disabled?: boolean;\n /**\n * An object containing all the necessary localized strings required by the component.\n */\n i18nStrings: PropertyFilterProps.I18nStrings;\n /**\n * Accepts a human-readable, localized string that indicates the number of results. For example, \"1 match\" or \"165 matches.\"\n * If the total number of results is unknown, also include an indication that there may be more results than\n * the number listed. For example, \"25+ matches.\"\n *\n * The count text is only displayed when `query.tokens` isn't empty.\n */\n countText?: string;\n /**\n * An object representing the current query displayed in the property filter. Has two properties: `tokens` and `operation`.\n * `tokens` is an array of objects that will be displayed to the user beneath the filtering input.\n * Each token has the following properties:\n *\n * * value [string]: The string value of the token to be used as a filter.\n * * propertyKey [string]: The key of the corresponding property in filteringProperties.\n * * operator ['<' | '<=' | '>' | '>=' | ':' | '!:' | '=' | '!=']: The operator which indicates how to filter the dataset using this token.\n *\n * `operation` has two valid values [and, or] and controls the join operation to be applied between tokens when filtering the items.\n */\n query: PropertyFilterProps.Query;\n /**\n * If hideOperations it set, the indicator of the operation (that is, `and` or `or`) and the selection of operations\n * (applied to the property and value token) are hidden from the user. Only use when you have a custom\n * filtering logic which combines tokens in different way than the default one. When used, ensure that\n * operations are communicated to the user in another way.\n */\n hideOperations?: boolean;\n /**\n * Fired when the `query` gets changed. Filter the dataset in response to this event using the values in the `detail` object.\n */\n onChange: NonCancelableEventHandler<PropertyFilterProps.Query>;\n /**\n * An array of properties by which the data set can be filtered. Each element has the following properties:\n *\n * * groupValuesLabel [string]: Localized string to display for the 'Values' group label for a specific property.\n * * key [string]: The identifier of this property.\n * * propertyLabel [string]: A human-readable string for the property.\n * * operators [Array]: A list of all operators supported by this property. If you omit the equals operator because your API does not support it, make sure to set `defaultOperator` to a supported operator from this list.\n * * group [string]: Optional identifier of a custom group that this filtering option is assigned to. Use to create additional groups below the default one. Make sure to also define labels for the group in the customGroupsText property. Notice that only one level of options nesting is supported.\n * * defaultOperator [ComparisonOperator]: Optional parameter that changes the default operator used with this filtering property. Use it only if your API does not support \"equals\" filtering terms with this property.\n */\n filteringProperties: ReadonlyArray<PropertyFilterProps.FilteringProperty>;\n /**\n * An array of possible values of the individual `filteringProperties`. Each element has the following properties:\n *\n * * `propertyKey` [string]: The key of the corresponding filtering property in the `filteringProperties` array.\n * * `value` [string]: The value that will be used as a suggestion when creating or modifying a filtering token.\n */\n filteringOptions?: ReadonlyArray<PropertyFilterProps.FilteringOption>;\n /**\n * An array of objects that contain localized, human-readable strings for the labels of custom groups within the filtering dropdown. Use group property to associate the strings with your custom group of options. Define the following values for each group:\n *\n * * properties [string]: The group label in the filtering dropdown that contains the list of properties from this group. For example: Tags.\n * * values [string]: The group label in the filtering dropdown that contains the list of values from this group. For example: Tags values.\n * * group [string]: The identifier of a custom group.\n */\n customGroupsText?: PropertyFilterProps.GroupText[];\n /**\n * Set `disableFreeTextFiltering` only if you can’t filter the dataset using a filter that is applied to every column,\n * instead of a specific property. This would stop the user from creating such tokens.\n */\n disableFreeTextFiltering?: boolean;\n /**\n * Use this event to asynchronously load filteringOptions, component currently needs. The detail object contains following properties:\n *\n * * `filteringProperty` - The property for which you need to fetch the options.\n * * `filteringOperator` - The operator for which you need to fetch the options.\n * * `filteringText` - The value that you need to use to fetch options.\n * * `firstPage` - Indicates that you should fetch the first page of options for a `filteringProperty` that match the `filteringText`.\n * * `samePage` - Indicates that you should fetch the same page that you have previously fetched (for example, when the user clicks on the recovery button).\n */\n onLoadItems?: NonCancelableEventHandler<PropertyFilterProps.LoadItemsDetail>;\n /**\n * If you have more than 500 `filteringOptions`, enable this flag to apply a performance optimization that makes\n * the filtering experience smoother. We don't recommend enabling the feature if you have less than 500 options,\n * because the improvements to performance are offset by a visible scrolling lag. When you set this flag to true,\n * it removes options that are not currently in view from the DOM.\n */\n virtualScroll?: boolean;\n /**\n * A slot located before the filtering input. Use it if for a Select component if your dataset supports property\n * filter queries only after an initial filter is applied.\n */\n customControl?: React.ReactNode;\n /**\n * Set `asyncProperties` if you need to load `filteringProperties` asynchronousely. This would cause extra `onLoadMore`\n * events to fire calling for more properties.\n */\n asyncProperties?: boolean;\n /**\n * Specifies the maximum number of displayed tokens. If the property isn't set, all of the tokens are displayed.\n */\n tokenLimit?: number;\n /**\n * Displayed when there are no options to display.\n * This is only shown when `statusType` is set to `finished` or not set at all.\n */\n filteringEmpty?: React.ReactNode;\n /**\n * Specifies the text to display when in the loading state.\n **/\n filteringLoadingText?: string;\n /**\n * Specifies the text to display at the bottom of the dropdown menu after pagination has reached the end.\n **/\n filteringFinishedText?: string;\n /**\n * Specifies the text to display when a data fetching error occurs. Make sure that you provide `recoveryText`.\n **/\n filteringErrorText?: string;\n /**\n * Specifies the text for the recovery button. The text is displayed next to the error text.\n * Use the `onLoadItems` event to perform a recovery action (for example, retrying the request).\n **/\n filteringRecoveryText?: string;\n /**\n * Specifies the current status of loading more options.\n * * `pending` - Indicates that no request in progress, but more options may be loaded.\n * * `loading` - Indicates that data fetching is in progress.\n * * `finished` - Indicates that pagination has finished and no more requests are expected.\n * * `error` - Indicates that an error occurred during fetch. You should use `recoveryText` to enable the user to recover.\n **/\n filteringStatusType?: DropdownStatusProps.StatusType;\n}\n\nexport namespace PropertyFilterProps {\n export type Token = PropertyFilterToken;\n export type JoinOperation = PropertyFilterOperation;\n export type ComparisonOperator = PropertyFilterOperator;\n export type ExtendedOperator<TokenValue> = PropertyFilterOperatorExtended<TokenValue>;\n export type ExtendedOperatorFormProps<TokenValue> = PropertyFilterOperatorFormProps<TokenValue>;\n export type ExtendedOperatorForm<TokenValue> = PropertyFilterOperatorForm<TokenValue>;\n export type ExtendedOperatorFormat<TokenValue> = PropertyFilterOperatorFormat<TokenValue>;\n export type FilteringOption = PropertyFilterOption;\n export type FilteringProperty = PropertyFilterProperty;\n\n export interface Query {\n tokens: ReadonlyArray<PropertyFilterProps.Token>;\n operation: PropertyFilterProps.JoinOperation;\n }\n\n export interface LoadItemsDetail {\n filteringProperty?: FilteringProperty;\n filteringOperator?: ComparisonOperator;\n filteringText: string;\n firstPage: boolean;\n samePage: boolean;\n }\n\n export interface I18nStrings {\n /**\n * Label that will be passed down to the Autosuggest `ariaLabel` property.\n * See the [Autosuggest API](/system/components/autosuggest/?tabId=api) page for more details.\n */\n filteringAriaLabel: string;\n dismissAriaLabel: string;\n\n filteringPlaceholder?: string;\n groupValuesText: string;\n groupPropertiesText: string;\n operatorsText: string;\n\n operationAndText: string;\n operationOrText: string;\n\n operatorLessText: string;\n operatorLessOrEqualText: string;\n operatorGreaterText: string;\n operatorGreaterOrEqualText: string;\n operatorContainsText: string;\n operatorDoesNotContainText: string;\n operatorEqualsText: string;\n operatorDoesNotEqualText: string;\n\n editTokenHeader: string;\n propertyText: string;\n operatorText: string;\n valueText: string;\n cancelActionText: string;\n applyActionText: string;\n allPropertiesLabel: string;\n\n tokenLimitShowMore?: string;\n tokenLimitShowFewer?: string;\n clearFiltersText: string;\n removeTokenButtonAriaLabel: (token: PropertyFilterProps.Token) => string;\n enteredTextLabel: AutosuggestProps.EnteredTextLabel;\n }\n\n export interface GroupText {\n properties: string;\n values: string;\n group: string;\n }\n\n export interface FilteringChangeDetail {\n filteringText: string;\n filteringProperty?: FilteringProperty;\n }\n\n export interface Ref {\n /**\n * Sets focus on the underlying input control.\n */\n focus(): void;\n }\n}\n\n// Re-exported namespace interfaces to use module-style imports internally\n\nexport type Token = PropertyFilterProps.Token;\nexport type JoinOperation = PropertyFilterProps.JoinOperation;\nexport type ComparisonOperator = PropertyFilterProps.ComparisonOperator;\nexport type ExtendedOperator<TokenValue> = PropertyFilterOperatorExtended<TokenValue>;\nexport type ExtendedOperatorFormProps<TokenValue> = PropertyFilterOperatorFormProps<TokenValue>;\nexport type ExtendedOperatorForm<TokenValue> = PropertyFilterOperatorForm<TokenValue>;\nexport type ExtendedOperatorFormat<TokenValue> = PropertyFilterOperatorFormat<TokenValue>;\nexport type FilteringOption = PropertyFilterProps.FilteringOption;\nexport type FilteringProperty = PropertyFilterProps.FilteringProperty;\nexport type Query = PropertyFilterProps.Query;\nexport type LoadItemsDetail = PropertyFilterProps.LoadItemsDetail;\nexport type I18nStrings = PropertyFilterProps.I18nStrings;\nexport type GroupText = PropertyFilterProps.GroupText;\nexport type FilteringChangeDetail = PropertyFilterProps.FilteringChangeDetail;\nexport type Ref = PropertyFilterProps.Ref;\n\n// Utility types\n\nexport type ParsedText =\n | { step: 'property'; property: FilteringProperty; operator: ComparisonOperator; value: string }\n | { step: 'operator'; property: FilteringProperty; operatorPrefix: string }\n | { step: 'free-text'; operator?: ComparisonOperator; value: string };\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/property-filter/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React from 'react';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\nimport { DropdownStatusProps } from '../internal/components/dropdown-status';\nimport { AutosuggestProps } from '../autosuggest/interfaces';\nimport { ExpandToViewport } from '../internal/components/dropdown/interfaces';\nimport {\n PropertyFilterOperation,\n PropertyFilterOperator,\n PropertyFilterOperatorExtended,\n PropertyFilterOperatorForm,\n PropertyFilterOperatorFormat,\n PropertyFilterOperatorFormProps,\n PropertyFilterOption,\n PropertyFilterProperty,\n PropertyFilterToken,\n} from '@cloudscape-design/collection-hooks';\n\nexport interface PropertyFilterProps extends BaseComponentProps, ExpandToViewport {\n /**\n * If set to `true`, the filtering input will be disabled.\n * Use it, for example, if you are fetching new items upon filtering change\n * in order to prevent the user from changing the filtering query.\n */\n disabled?: boolean;\n /**\n * An object containing all the necessary localized strings required by the component.\n */\n i18nStrings: PropertyFilterProps.I18nStrings;\n /**\n * Accepts a human-readable, localized string that indicates the number of results. For example, \"1 match\" or \"165 matches.\"\n * If the total number of results is unknown, also include an indication that there may be more results than\n * the number listed. For example, \"25+ matches.\"\n *\n * The count text is only displayed when `query.tokens` isn't empty.\n */\n countText?: string;\n /**\n * An object representing the current query displayed in the property filter. Has two properties: `tokens` and `operation`.\n * `tokens` is an array of objects that will be displayed to the user beneath the filtering input.\n * Each token has the following properties:\n *\n * * value [string]: The string value of the token to be used as a filter.\n * * propertyKey [string]: The key of the corresponding property in filteringProperties.\n * * operator ['<' | '<=' | '>' | '>=' | ':' | '!:' | '=' | '!=']: The operator which indicates how to filter the dataset using this token.\n *\n * `operation` has two valid values [and, or] and controls the join operation to be applied between tokens when filtering the items.\n */\n query: PropertyFilterProps.Query;\n /**\n * If hideOperations it set, the indicator of the operation (that is, `and` or `or`) and the selection of operations\n * (applied to the property and value token) are hidden from the user. Only use when you have a custom\n * filtering logic which combines tokens in different way than the default one. When used, ensure that\n * operations are communicated to the user in another way.\n */\n hideOperations?: boolean;\n /**\n * Fired when the `query` gets changed. Filter the dataset in response to this event using the values in the `detail` object.\n */\n onChange: NonCancelableEventHandler<PropertyFilterProps.Query>;\n /**\n * An array of properties by which the data set can be filtered. Each element has the following properties:\n *\n * * groupValuesLabel [string]: Localized string to display for the 'Values' group label for a specific property.\n * * key [string]: The identifier of this property.\n * * propertyLabel [string]: A human-readable string for the property.\n * * operators [Array]: A list of all operators supported by this property. If you omit the equals operator because your API does not support it, make sure to set `defaultOperator` to a supported operator from this list.\n * * group [string]: Optional identifier of a custom group that this filtering option is assigned to. Use to create additional groups below the default one. Make sure to also define labels for the group in the customGroupsText property. Notice that only one level of options nesting is supported.\n * * defaultOperator [ComparisonOperator]: Optional parameter that changes the default operator used with this filtering property. Use it only if your API does not support \"equals\" filtering terms with this property.\n */\n filteringProperties: ReadonlyArray<PropertyFilterProps.FilteringProperty>;\n /**\n * An array of possible values of the individual `filteringProperties`. Each element has the following properties:\n *\n * * `propertyKey` [string]: The key of the corresponding filtering property in the `filteringProperties` array.\n * * `value` [string]: The value that will be used as a suggestion when creating or modifying a filtering token.\n */\n filteringOptions?: ReadonlyArray<PropertyFilterProps.FilteringOption>;\n /**\n * An array of objects that contain localized, human-readable strings for the labels of custom groups within the filtering dropdown. Use group property to associate the strings with your custom group of options. Define the following values for each group:\n *\n * * properties [string]: The group label in the filtering dropdown that contains the list of properties from this group. For example: Tags.\n * * values [string]: The group label in the filtering dropdown that contains the list of values from this group. For example: Tags values.\n * * group [string]: The identifier of a custom group.\n */\n customGroupsText?: PropertyFilterProps.GroupText[];\n /**\n * Set `disableFreeTextFiltering` only if you can’t filter the dataset using a filter that is applied to every column,\n * instead of a specific property. This would stop the user from creating such tokens.\n */\n disableFreeTextFiltering?: boolean;\n /**\n * Use this event to asynchronously load filteringOptions, component currently needs. The detail object contains following properties:\n *\n * * `filteringProperty` - The property for which you need to fetch the options.\n * * `filteringOperator` - The operator for which you need to fetch the options.\n * * `filteringText` - The value that you need to use to fetch options.\n * * `firstPage` - Indicates that you should fetch the first page of options for a `filteringProperty` that match the `filteringText`.\n * * `samePage` - Indicates that you should fetch the same page that you have previously fetched (for example, when the user clicks on the recovery button).\n */\n onLoadItems?: NonCancelableEventHandler<PropertyFilterProps.LoadItemsDetail>;\n /**\n * If you have more than 500 `filteringOptions`, enable this flag to apply a performance optimization that makes\n * the filtering experience smoother. We don't recommend enabling the feature if you have less than 500 options,\n * because the improvements to performance are offset by a visible scrolling lag. When you set this flag to true,\n * it removes options that are not currently in view from the DOM.\n */\n virtualScroll?: boolean;\n /**\n * A slot located before the filtering input. Use it if for a Select component if your dataset supports property\n * filter queries only after an initial filter is applied.\n */\n customControl?: React.ReactNode;\n /**\n * Set `asyncProperties` if you need to load `filteringProperties` asynchronousely. This would cause extra `onLoadMore`\n * events to fire calling for more properties.\n */\n asyncProperties?: boolean;\n /**\n * Specifies the maximum number of displayed tokens. If the property isn't set, all of the tokens are displayed.\n */\n tokenLimit?: number;\n /**\n * Displayed when there are no options to display.\n * This is only shown when `statusType` is set to `finished` or not set at all.\n */\n filteringEmpty?: React.ReactNode;\n /**\n * Specifies the text to display when in the loading state.\n **/\n filteringLoadingText?: string;\n /**\n * Specifies the text to display at the bottom of the dropdown menu after pagination has reached the end.\n **/\n filteringFinishedText?: string;\n /**\n * Specifies the text to display when a data fetching error occurs. Make sure that you provide `recoveryText`.\n **/\n filteringErrorText?: string;\n /**\n * Specifies the text for the recovery button. The text is displayed next to the error text.\n * Use the `onLoadItems` event to perform a recovery action (for example, retrying the request).\n **/\n filteringRecoveryText?: string;\n /**\n * Specifies the current status of loading more options.\n * * `pending` - Indicates that no request in progress, but more options may be loaded.\n * * `loading` - Indicates that data fetching is in progress.\n * * `finished` - Indicates that pagination has finished and no more requests are expected.\n * * `error` - Indicates that an error occurred during fetch. You should use `recoveryText` to enable the user to recover.\n **/\n filteringStatusType?: DropdownStatusProps.StatusType;\n}\n\nexport namespace PropertyFilterProps {\n export type Token = PropertyFilterToken;\n export type JoinOperation = PropertyFilterOperation;\n export type ComparisonOperator = PropertyFilterOperator;\n export type ExtendedOperator<TokenValue> = PropertyFilterOperatorExtended<TokenValue>;\n export type ExtendedOperatorFormProps<TokenValue> = PropertyFilterOperatorFormProps<TokenValue>;\n export type ExtendedOperatorForm<TokenValue> = PropertyFilterOperatorForm<TokenValue>;\n export type ExtendedOperatorFormat<TokenValue> = PropertyFilterOperatorFormat<TokenValue>;\n export type FilteringOption = PropertyFilterOption;\n export type FilteringProperty = PropertyFilterProperty;\n\n export interface Query {\n tokens: ReadonlyArray<PropertyFilterProps.Token>;\n operation: PropertyFilterProps.JoinOperation;\n }\n\n export interface LoadItemsDetail {\n filteringProperty?: FilteringProperty;\n filteringOperator?: ComparisonOperator;\n filteringText: string;\n firstPage: boolean;\n samePage: boolean;\n }\n\n export interface I18nStrings {\n /**\n * Label that will be passed down to the Autosuggest `ariaLabel` property.\n * See the [Autosuggest API](/system/components/autosuggest/?tabId=api) page for more details.\n */\n filteringAriaLabel: string;\n dismissAriaLabel: string;\n\n filteringPlaceholder?: string;\n groupValuesText: string;\n groupPropertiesText: string;\n operatorsText: string;\n\n operationAndText: string;\n operationOrText: string;\n\n operatorLessText: string;\n operatorLessOrEqualText: string;\n operatorGreaterText: string;\n operatorGreaterOrEqualText: string;\n operatorContainsText: string;\n operatorDoesNotContainText: string;\n operatorEqualsText: string;\n operatorDoesNotEqualText: string;\n\n editTokenHeader: string;\n propertyText: string;\n operatorText: string;\n valueText: string;\n cancelActionText: string;\n applyActionText: string;\n allPropertiesLabel: string;\n\n tokenLimitShowMore?: string;\n tokenLimitShowFewer?: string;\n clearFiltersText: string;\n tokenOperatorAriaLabel?: string;\n removeTokenButtonAriaLabel: (token: PropertyFilterProps.Token) => string;\n enteredTextLabel: AutosuggestProps.EnteredTextLabel;\n }\n\n export interface GroupText {\n properties: string;\n values: string;\n group: string;\n }\n\n export interface FilteringChangeDetail {\n filteringText: string;\n filteringProperty?: FilteringProperty;\n }\n\n export interface Ref {\n /**\n * Sets focus on the underlying input control.\n */\n focus(): void;\n }\n}\n\n// Re-exported namespace interfaces to use module-style imports internally\n\nexport type Token = PropertyFilterProps.Token;\nexport type JoinOperation = PropertyFilterProps.JoinOperation;\nexport type ComparisonOperator = PropertyFilterProps.ComparisonOperator;\nexport type ExtendedOperator<TokenValue> = PropertyFilterOperatorExtended<TokenValue>;\nexport type ExtendedOperatorFormProps<TokenValue> = PropertyFilterOperatorFormProps<TokenValue>;\nexport type ExtendedOperatorForm<TokenValue> = PropertyFilterOperatorForm<TokenValue>;\nexport type ExtendedOperatorFormat<TokenValue> = PropertyFilterOperatorFormat<TokenValue>;\nexport type FilteringOption = PropertyFilterProps.FilteringOption;\nexport type FilteringProperty = PropertyFilterProps.FilteringProperty;\nexport type Query = PropertyFilterProps.Query;\nexport type LoadItemsDetail = PropertyFilterProps.LoadItemsDetail;\nexport type I18nStrings = PropertyFilterProps.I18nStrings;\nexport type GroupText = PropertyFilterProps.GroupText;\nexport type FilteringChangeDetail = PropertyFilterProps.FilteringChangeDetail;\nexport type Ref = PropertyFilterProps.Ref;\n\n// Utility types\n\nexport type ParsedText =\n | { step: 'property'; property: FilteringProperty; operator: ComparisonOperator; value: string }\n | { step: 'operator'; property: FilteringProperty; operatorPrefix: string }\n | { step: 'free-text'; operator?: ComparisonOperator; value: string };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../../src/property-filter/token.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,eAAe,EACf,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,aAAa,EACb,eAAe,EACf,KAAK,EACN,MAAM,cAAc,CAAC;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O,CAAC;IAC1B,UAAU,EAAE,mBAAmB,CAAC;IAChC,gBAAgB,EAAE,SAAS,SAAS,EAAE,CAAC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gBAAgB,EAAE,SAAS,eAAe,EAAE,CAAC;IAC7C,mBAAmB,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAClD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,EAAE,WAAW,CAAC;IACzB,WAAW,CAAC,EAAE,yBAAyB,CAAC,eAAe,CAAC,CAAC;IACzD,SAAS,EAAE,aAAa,CAAC;IACzB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,YAAY,EAAE,CAAC,YAAY,EAAE,aAAa,KAAK,IAAI,CAAC;IACpD,QAAQ,EAAE,CAAC,QAAQ,EAAE,KAAK,KAAK,IAAI,CAAC;IACpC,KAAK,EAAE,KAAK,CAAC;CACd;AAED,eAAO,MAAM,WAAW,4PAkBrB,UAAU,gBAsCZ,CAAC"}
@@ -12,7 +12,7 @@ export var TokenButton = function (_a) {
12
12
  var property = token.propertyKey && getPropertyByKey(filteringProperties, token.propertyKey);
13
13
  var propertyLabel = property && property.propertyLabel;
14
14
  var tokenValue = valueFormatter ? valueFormatter(token.value) : token.value;
15
- return (React.createElement(FilteringToken, { showOperation: !first && !hideOperations, operation: operation, andText: i18nStrings.operationAndText, orText: i18nStrings.operationOrText, dismissAriaLabel: i18nStrings.removeTokenButtonAriaLabel(token), onChange: setOperation, onDismiss: removeToken, disabled: disabled },
15
+ return (React.createElement(FilteringToken, { showOperation: !first && !hideOperations, operation: operation, andText: i18nStrings.operationAndText, orText: i18nStrings.operationOrText, dismissAriaLabel: i18nStrings.removeTokenButtonAriaLabel(token), operatorAriaLabel: i18nStrings.tokenOperatorAriaLabel, onChange: setOperation, onDismiss: removeToken, disabled: disabled },
16
16
  React.createElement(TokenEditor, { setToken: setToken, triggerComponent: React.createElement("span", { className: styles['token-trigger'] },
17
17
  React.createElement(TokenTrigger, { property: propertyLabel, operator: token.operator, value: tokenValue })), filteringOptions: filteringOptions, filteringProperties: filteringProperties, token: token, asyncProps: asyncProps, onLoadItems: onLoadItems, i18nStrings: i18nStrings, asyncProperties: asyncProperties, customGroupsText: customGroupsText, disableFreeTextFiltering: disableFreeTextFiltering, expandToViewport: expandToViewport })));
18
18
  };
@@ -1 +1 @@
1
- {"version":3,"file":"token.js","sourceRoot":"","sources":["../../../src/property-filter/token.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErE,OAAO,cAAc,MAAM,wCAAwC,CAAC;AAwBpE,MAAM,CAAC,IAAM,WAAW,GAAG,UAAC,EAkBf;;QAjBX,KAAK,WAAA,EACL,iBAAiB,EAAjB,SAAS,mBAAG,KAAK,KAAA,EACjB,KAAK,WAAA,EACL,WAAW,iBAAA,EACX,QAAQ,cAAA,EACR,YAAY,kBAAA,EACZ,gBAAgB,sBAAA,EAChB,mBAAmB,yBAAA,EACnB,UAAU,gBAAA,EACV,WAAW,iBAAA,EACX,WAAW,iBAAA,EACX,eAAe,qBAAA,EACf,cAAc,oBAAA,EACd,gBAAgB,sBAAA,EAChB,QAAQ,cAAA,EACR,wBAAwB,8BAAA,EACxB,gBAAgB,sBAAA;IAEhB,IAAM,cAAc,GAClB,KAAK,CAAC,WAAW,KAAI,MAAA,mBAAmB,CAAC,mBAAmB,EAAE,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,0CAAE,MAAM,CAAA,C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K,WAAA;IAML,IAAI,QAAQ,EAAE;QACZ,QAAQ,IAAI,GAAG,CAAC;KACjB;IACD,IAAM,qBAAqB,GAAG,QAAQ,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC5D,IAAM,YAAY,GAAG,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,GAAG,CAAC;IACjE,OAAO,CACL;QACG,QAAQ;QACT,8BAAM,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,IAAG,YAAY,CAAQ;QAC/D,KAAK,CACL,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport {\n ComparisonOperator,\n FilteringOption,\n FilteringProperty,\n GroupText,\n I18nStrings,\n JoinOperation,\n LoadItemsDetail,\n Token,\n} from './interfaces';\nimport styles from './styles.css.js';\nimport { TokenEditor } from './token-editor';\nimport { getExtendedOperator, getPropertyByKey } from './controller';\n\nimport FilteringToken from '../internal/components/filtering-token';\nimport { NonCancelableEventHandler } from '../internal/events';\nimport { DropdownStatusProps } from '../internal/components/dropdown-status/interfaces';\n\ninterface TokenProps {\n asyncProperties?: boolean;\n asyncProps: DropdownStatusProps;\n customGroupsText: readonly GroupText[];\n disabled?: boolean;\n disableFreeTextFiltering?: boolean;\n expandToViewport?: boolean;\n filteringOptions: readonly FilteringOption[];\n filteringProperties: readonly FilteringProperty[];\n first?: boolean;\n hideOperations?: boolean;\n i18nStrings: I18nStrings;\n onLoadItems?: NonCancelableEventHandler<LoadItemsDetail>;\n operation: JoinOperation;\n removeToken: () => void;\n setOperation: (newOperation: JoinOperation) => void;\n setToken: (newToken: Token) => void;\n token: Token;\n}\n\nexport const TokenButton = ({\n token,\n operation = 'and',\n first,\n removeToken,\n setToken,\n setOperation,\n filteringOptions,\n filteringProperties,\n asyncProps,\n onLoadItems,\n i18nStrings,\n asyncProperties,\n hideOperations,\n customGroupsText,\n disabled,\n disableFreeTextFiltering,\n expandToViewport,\n}: TokenProps) => {\n const valueFormatter =\n token.propertyKey && getExtendedOperator(filteringProperties, token.propertyKey, token.operator)?.format;\n const property = token.propertyKey && getPropertyByKey(filteringProperties, token.propertyKey);\n const propertyLabel = property && property.propertyLabel;\n const tokenValue = valueFormatter ? valueFormatter(token.value) : token.value;\n return (\n <FilteringToken\n showOperation={!first && !hideOperations}\n operation={operation}\n andText={i18nStrings.operationAndText}\n orText={i18nStrings.operationOrText}\n dismissAriaLabel={i18nStrings.removeTokenButtonAriaLabel(token)}\n onChange={setOperation}\n onDismiss={removeToken}\n disabled={disabled}\n >\n <TokenEditor\n setToken={setToken}\n triggerComponent={\n <span className={styles['token-trigger']}>\n <TokenTrigger property={propertyLabel} operator={token.operator} value={tokenValue} />\n </span>\n }\n filteringOptions={filteringOptions}\n filteringProperties={filteringProperties}\n token={token}\n asyncProps={asyncProps}\n onLoadItems={onLoadItems}\n i18nStrings={i18nStrings}\n asyncProperties={asyncProperties}\n customGroupsText={customGroupsText}\n disableFreeTextFiltering={disableFreeTextFiltering}\n expandToViewport={expandToViewport}\n />\n </FilteringToken>\n );\n};\n\nconst TokenTrigger = ({\n property,\n operator,\n value,\n}: {\n property?: string;\n operator?: ComparisonOperator;\n value: string;\n}) => {\n if (property) {\n property += ' ';\n }\n const freeTextContainsToken = operator === ':' && !property;\n const operatorText = freeTextContainsToken ? '' : operator + ' ';\n return (\n <>\n {property}\n <span className={styles['token-operator']}>{operatorText}</span>\n {value}\n </>\n );\n};\n"]}
1
+ {"version":3,"file":"token.js","sourceRoot":"","sources":["../../../src/property-filter/token.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,mBAAm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Q,EAAE,YAAY,EACtB,SAAS,EAAE,WAAW,EACtB,QAAQ,EAAE,QAAQ;QAElB,oBAAC,WAAW,IACV,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EACd,8BAAM,SAAS,EAAE,MAAM,CAAC,eAAe,CAAC;gBACtC,oBAAC,YAAY,IAAC,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,UAAU,GAAI,CACjF,EAET,gBAAgB,EAAE,gBAAgB,EAClC,mBAAmB,EAAE,mBAAmB,EACxC,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,eAAe,EAChC,gBAAgB,EAAE,gBAAgB,EAClC,wBAAwB,EAAE,wBAAwB,EAClD,gBAAgB,EAAE,gBAAgB,GAClC,CACa,CAClB,CAAC;AACJ,CAAC,CAAC;AAEF,IAAM,YAAY,GAAG,UAAC,EAQrB;QAPC,QAAQ,cAAA,EACR,QAAQ,cAAA,EACR,KAAK,WAAA;IAML,IAAI,QAAQ,EAAE;QACZ,QAAQ,IAAI,GAAG,CAAC;KACjB;IACD,IAAM,qBAAqB,GAAG,QAAQ,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC5D,IAAM,YAAY,GAAG,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,GAAG,CAAC;IACjE,OAAO,CACL;QACG,QAAQ;QACT,8BAAM,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,IAAG,YAAY,CAAQ;QAC/D,KAAK,CACL,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport {\n ComparisonOperator,\n FilteringOption,\n FilteringProperty,\n GroupText,\n I18nStrings,\n JoinOperation,\n LoadItemsDetail,\n Token,\n} from './interfaces';\nimport styles from './styles.css.js';\nimport { TokenEditor } from './token-editor';\nimport { getExtendedOperator, getPropertyByKey } from './controller';\n\nimport FilteringToken from '../internal/components/filtering-token';\nimport { NonCancelableEventHandler } from '../internal/events';\nimport { DropdownStatusProps } from '../internal/components/dropdown-status/interfaces';\n\ninterface TokenProps {\n asyncProperties?: boolean;\n asyncProps: DropdownStatusProps;\n customGroupsText: readonly GroupText[];\n disabled?: boolean;\n disableFreeTextFiltering?: boolean;\n expandToViewport?: boolean;\n filteringOptions: readonly FilteringOption[];\n filteringProperties: readonly FilteringProperty[];\n first?: boolean;\n hideOperations?: boolean;\n i18nStrings: I18nStrings;\n onLoadItems?: NonCancelableEventHandler<LoadItemsDetail>;\n operation: JoinOperation;\n removeToken: () => void;\n setOperation: (newOperation: JoinOperation) => void;\n setToken: (newToken: Token) => void;\n token: Token;\n}\n\nexport const TokenButton = ({\n token,\n operation = 'and',\n first,\n removeToken,\n setToken,\n setOperation,\n filteringOptions,\n filteringProperties,\n asyncProps,\n onLoadItems,\n i18nStrings,\n asyncProperties,\n hideOperations,\n customGroupsText,\n disabled,\n disableFreeTextFiltering,\n expandToViewport,\n}: TokenProps) => {\n const valueFormatter =\n token.propertyKey && getExtendedOperator(filteringProperties, token.propertyKey, token.operator)?.format;\n const property = token.propertyKey && getPropertyByKey(filteringProperties, token.propertyKey);\n const propertyLabel = property && property.propertyLabel;\n const tokenValue = valueFormatter ? valueFormatter(token.value) : token.value;\n return (\n <FilteringToken\n showOperation={!first && !hideOperations}\n operation={operation}\n andText={i18nStrings.operationAndText}\n orText={i18nStrings.operationOrText}\n dismissAriaLabel={i18nStrings.removeTokenButtonAriaLabel(token)}\n operatorAriaLabel={i18nStrings.tokenOperatorAriaLabel}\n onChange={setOperation}\n onDismiss={removeToken}\n disabled={disabled}\n >\n <TokenEditor\n setToken={setToken}\n triggerComponent={\n <span className={styles['token-trigger']}>\n <TokenTrigger property={propertyLabel} operator={token.operator} value={tokenValue} />\n </span>\n }\n filteringOptions={filteringOptions}\n filteringProperties={filteringProperties}\n token={token}\n asyncProps={asyncProps}\n onLoadItems={onLoadItems}\n i18nStrings={i18nStrings}\n asyncProperties={asyncProperties}\n customGroupsText={customGroupsText}\n disableFreeTextFiltering={disableFreeTextFiltering}\n expandToViewport={expandToViewport}\n />\n </FilteringToken>\n );\n};\n\nconst TokenTrigger = ({\n property,\n operator,\n value,\n}: {\n property?: string;\n operator?: ComparisonOperator;\n value: string;\n}) => {\n if (property) {\n property += ' ';\n }\n const freeTextContainsToken = operator === ':' && !property;\n const operatorText = freeTextContainsToken ? '' : operator + ' ';\n return (\n <>\n {property}\n <span className={styles['token-operator']}>{operatorText}</span>\n {value}\n </>\n );\n};\n"]}
@@ -5,6 +5,6 @@ export interface FilterProps extends InternalInputProps {
5
5
  ref?: React.Ref<HTMLInputElement>;
6
6
  filteringType: SelectProps.FilteringType;
7
7
  }
8
- declare const Filter: React.ForwardRefExoticComponent<Pick<FilterProps, "disabled" | "autoComplete" | "autoFocus" | "name" | "className" | "id" | "placeholder" | "inputMode" | "type" | "readOnly" | "step" | "value" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "onKeyUp" | "invalid" | "__internalRootRef" | "ariaLabel" | "__nativeAttributes" | "ariaLabelledby" | "ariaDescribedby" | "controlId" | "ariaRequired" | "disableBrowserAutocorrect" | "spellcheck" | "__leftIcon" | "__leftIconVariant" | "__onLeftIconClick" | "__rightIcon" | "__rightIconVariant" | "__onRightIconClick" | "__noBorderRadius" | "__onDelayedInput" | "__onBlurWithDetail" | "__inheritFormFieldProps" | "filteringType"> & React.RefAttributes<HTMLInputElement>>;
8
+ declare const Filter: React.ForwardRefExoticComponent<Pick<FilterProps, "disabled" | "autoComplete" | "autoFocus" | "name" | "className" | "id" | "placeholder" | "inputMode" | "type" | "readOnly" | "step" | "value" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "onKeyUp" | "invalid" | "__internalRootRef" | "ariaLabel" | "__nativeAttributes" | "ariaLabelledby" | "ariaDescribedby" | "controlId" | "filteringType" | "ariaRequired" | "disableBrowserAutocorrect" | "spellcheck" | "__leftIcon" | "__leftIconVariant" | "__onLeftIconClick" | "__rightIcon" | "__rightIconVariant" | "__onRightIconClick" | "__noBorderRadius" | "__onDelayedInput" | "__onBlurWithDetail" | "__inheritFormFieldProps"> & React.RefAttributes<HTMLInputElement>>;
9
9
  export default Filter;
10
10
  //# sourceMappingURL=filter.d.ts.map
@@ -4,7 +4,7 @@ import { DropdownOption, OptionDefinition } from '../../internal/components/opti
4
4
  import { OptionsListProps } from '../../internal/components/options-list';
5
5
  import { FilterProps } from '../parts/filter';
6
6
  import { ItemProps } from '../parts/item';
7
- import { BaseKeyDetail, NonCancelableEventHandler, CancelableEventHandler } from '../../internal/events';
7
+ import { BaseKeyDetail, NonCancelableEventHandler } from '../../internal/events';
8
8
  export declare type MenuProps = Omit<OptionsListProps, 'children'> & {
9
9
  ref: React.RefObject<HTMLUListElement>;
10
10
  };
@@ -28,12 +28,6 @@ export interface SelectTriggerProps {
28
28
  onKeyDown?: (event: CustomEvent<BaseKeyDetail>) => void;
29
29
  onFocus: NonCancelableEventHandler;
30
30
  }
31
- export interface RecoveryLinkProps {
32
- ref: RefObject<HTMLAnchorElement>;
33
- onBlur: CancelableEventHandler<{
34
- relatedTarget: Node | null;
35
- }>;
36
- }
37
31
  export declare function useSelect({ selectedOptions, updateSelectedOption, options, filteringType, onBlur, onFocus, externalRef, keepOpen, fireLoadItems, setFilteringValue, useInteractiveGroups, }: UseSelectProps): {
38
32
  isOpen: boolean;
39
33
  highlightedOption: DropdownOption | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"use-select.d.ts","sourceRoot":"","sources":["../../../../src/select/utils/use-select.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAC;AAC9E,OAA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ptionId } from '../../internal/components/options-list/utils/use-id
7
7
  import { connectOptionsByValue } from './connect-options';
8
8
  import useForwardFocus from '../../internal/hooks/forward-focus';
9
9
  import { usePrevious } from '../../internal/hooks/use-previous';
10
- import { fireNonCancelableEvent, } from '../../internal/events';
10
+ import { fireNonCancelableEvent } from '../../internal/events';
11
11
  import { useUniqueId } from '../../internal/hooks/use-unique-id';
12
12
  export function useSelect(_a) {
13
13
  var selectedOptions = _a.selectedOptions, updateSelectedOption = _a.updateSelectedOption, options = _a.options, filteringType = _a.filteringType, onBlur = _a.onBlur, onFocus = _a.onFocus, externalRef = _a.externalRef, keepOpen = _a.keepOpen, fireLoadItems = _a.fireLoadItems, setFilteringValue = _a.setFilteringValue, _b = _a.useInteractiveGroups, useInteractiveGroups = _b === void 0 ? false : _b;
@@ -1 +1 @@
1
- {"version":3,"file":"use-select.js","sourceRoot":"","sources":["../../../../src/select/utils/use-select.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,uDAAuD,CAAC;AACnH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,mEAAmE,CAAC;AACzG,OAAO,EAAE,YAAY,EAAE,MAAM,6DAA6D,CAAC;AAC3F,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,2DAA2D,CAAC;AAChH,OAAO,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAC;AACnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,eAAe,MAAM,oCAAoC,CAAC;AAIjE,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAIL,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AA+BjE,MAAM,UAAU,SAAS,CAAC,EAYT;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AO;QACL,MAAM,QAAA;QACN,iBAAiB,mBAAA;QACjB,gBAAgB,kBAAA;QAChB,aAAa,eAAA;QACb,eAAe,iBAAA;QACf,gBAAgB,kBAAA;QAChB,YAAY,cAAA;QACZ,cAAc,gBAAA;QACd,cAAc,gBAAA;QACd,eAAe,EAAE,2BAA2B;QAC5C,YAAY,cAAA;QACZ,gBAAgB,kBAAA;KACjB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { RefObject } from 'react';\nimport { DropdownProps } from '../../internal/components/dropdown/interfaces';\nimport { DropdownOption, OptionDefinition, OptionGroup } from '../../internal/components/option/interfaces';\nimport { isInteractive, isGroupInteractive, isGroup } from '../../internal/components/option/utils/filter-options';\nimport { useEffect, useRef } from 'react';\nimport { useHighlightedOption } from '../../internal/components/options-list/utils/use-highlight-option';\nimport { useOpenState } from '../../internal/components/options-list/utils/use-open-state';\nimport { useMenuKeyboard, useTriggerKeyboard } from '../../internal/components/options-list/utils/use-keyboard';\nimport { getOptionId } from '../../internal/components/options-list/utils/use-ids';\nimport { connectOptionsByValue } from './connect-options';\nimport useForwardFocus from '../../internal/hooks/forward-focus';\nimport { OptionsListProps } from '../../internal/components/options-list';\nimport { FilterProps } from '../parts/filter';\nimport { ItemProps } from '../parts/item';\nimport { usePrevious } from '../../internal/hooks/use-previous';\nimport {\n BaseKeyDetail,\n NonCancelableEventHandler,\n CancelableEventHandler,\n fireNonCancelableEvent,\n} from '../../internal/events';\nimport { useUniqueId } from '../../internal/hooks/use-unique-id';\n\nexport type MenuProps = Omit<OptionsListProps, 'children'> & { ref: React.RefObject<HTMLUListElement> };\nexport type GetOptionProps = (option: DropdownOption, index: number) => ItemProps;\n\ninterface UseSelectProps {\n selectedOptions: ReadonlyArray<OptionDefinition>;\n updateSelectedOption: (option: OptionDefinition) => void;\n options: ReadonlyArray<DropdownOption>;\n filteringType: string;\n keepOpen?: boolean;\n onBlur?: NonCancelableEventHandler;\n onFocus?: NonCancelableEventHandler;\n externalRef: React.Ref<any>;\n fireLoadItems: (filteringText: string) => void;\n setFilteringValue: (filteringText: string) => void;\n useInteractiveGroups?: boolean;\n}\n\nexport interface SelectTriggerProps {\n ref: RefObject<HTMLButtonElement>;\n onMouseDown?: (event: CustomEvent) => void;\n onKeyDown?: (event: CustomEvent<BaseKeyDetail>) => void;\n onFocus: NonCancelableEventHandler;\n}\n\nexport interface RecoveryLinkProps {\n ref: RefObject<HTMLAnchorElement>;\n onBlur: CancelableEventHandler<{ relatedTarget: Node | null }>;\n}\n\nexport function useSelect({\n selectedOptions,\n updateSelectedOption,\n options,\n filteringType,\n onBlur,\n onFocus,\n externalRef,\n keepOpen,\n fireLoadItems,\n setFilteringValue,\n useInteractiveGroups = false,\n}: UseSelectProps) {\n const interactivityCheck = useInteractiveGroups ? isGroupInteractive : isInteractive;\n\n const isHighlightable = (option?: DropdownOption) => !!option && (useInteractiveGroups || option.type !== 'parent');\n\n const filterRef = useRef<HTMLInputElement>(null);\n const triggerRef = useRef<HTMLButtonElement>(null);\n const menuRef = useRef<HTMLUListElement>(null);\n const hasFilter = filteringType !== 'none';\n const activeRef = hasFilter ? filterRef : menuRef;\n const isSelectingUsingSpace = useRef<boolean>(false);\n const __selectedOptions = connectOptionsByValue(options, selectedOptions);\n const __selectedValuesSet = selectedOptions.reduce((selectedValuesSet: Set<string>, item: OptionDefinition) => {\n if (item.value) {\n selectedValuesSet.add(item.value);\n }\n return selectedValuesSet;\n }, new Set<string>());\n const [\n { highlightType, highlightedOption, highlightedIndex },\n {\n moveHighlightWithKeyboard,\n resetHighlightWithKeyboard,\n setHighlightedIndexWithMouse,\n highlightOptionWithKeyboard,\n goHomeWithKeyboard,\n goEndWithKeyboard,\n },\n ] = useHighlightedOption({ options, isHighlightable });\n\n const { isOpen, openDropdown, closeDropdown, toggleDropdown } = useOpenState({\n onOpen: () => fireLoadItems(''),\n onClose: () => {\n resetHighlightWithKeyboard();\n setFilteringValue('');\n },\n });\n\n const handleFocus = () => {\n fireNonCancelableEvent(onFocus, {});\n };\n\n const handleBlur = () => {\n fireNonCancelableEvent(onBlur, {});\n closeDropdown();\n };\n\n const hasSelectedOption = __selectedOptions.length > 0;\n const menuId = useUniqueId('option-list');\n const highlightedOptionId = getOptionId(menuId, highlightedIndex);\n\n const selectOption = (option?: DropdownOption) => {\n isSelectingUsingSpace.current = false;\n const optionToSelect = option || highlightedOption;\n if (!optionToSelect || !interactivityCheck(optionToSelect)) {\n return;\n }\n updateSelectedOption(optionToSelect.option);\n if (!keepOpen) {\n triggerRef.current?.focus();\n closeDropdown();\n }\n };\n\n const activeKeyDownHandler = useMenuKeyboard({\n moveHighlight: moveHighlightWithKeyboard,\n selectOption,\n goHome: goHomeWithKeyboard,\n goEnd: goEndWithKeyboard,\n closeDropdown: () => {\n triggerRef.current?.focus();\n closeDropdown();\n },\n isSelectingUsingSpace,\n preventNativeSpace: !hasFilter,\n });\n\n const triggerKeyDownHandler = useTriggerKeyboard({ openDropdown, goHome: goHomeWithKeyboard });\n\n const getDropdownProps: () => Pick<DropdownProps, 'onFocus' | 'onBlur'> = () => ({\n onFocus: handleFocus,\n onBlur: handleBlur,\n });\n\n const getTriggerProps = (disabled = false) => {\n const triggerProps: SelectTriggerProps = {\n ref: triggerRef,\n onFocus: () => closeDropdown(),\n };\n if (!disabled) {\n triggerProps.onMouseDown = (event: CustomEvent) => {\n event.preventDefault(); // prevent current focus from blurring as it immediately closes the dropdown\n if (isOpen) {\n triggerRef.current?.focus();\n }\n toggleDropdown();\n };\n triggerProps.onKeyDown = triggerKeyDownHandler;\n }\n return triggerProps;\n };\n\n const getFilterProps = (): Partial<FilterProps> => {\n if (!hasFilter) {\n return {};\n }\n\n return {\n ref: filterRef,\n onKeyDown: activeKeyDownHandler,\n onChange: event => {\n setFilteringValue(event.detail.value);\n resetHighlightWithKeyboard();\n },\n __onDelayedInput: event => {\n fireLoadItems(event.detail.value);\n },\n __nativeAttributes: {\n 'aria-activedescendant': highlightedOptionId,\n ['aria-owns']: menuId,\n ['aria-controls']: menuId,\n },\n };\n };\n\n const getMenuProps = () => {\n const menuProps: MenuProps = {\n id: menuId,\n ref: menuRef,\n open: isOpen,\n onMouseUp: itemIndex => {\n if (itemIndex > -1) {\n selectOption(options[itemIndex]);\n }\n },\n onMouseMove: itemIndex => {\n if (itemIndex > -1) {\n setHighlightedIndexWithMouse(itemIndex);\n }\n },\n };\n if (!hasFilter) {\n menuProps.onKeyDown = activeKeyDownHandler;\n menuProps.nativeAttributes = {\n 'aria-activedescendant': highlightedOptionId,\n };\n }\n return menuProps;\n };\n const getGroupState = (option: OptionGroup) => {\n const totalSelected = option.options.filter(item => !!item.value && __selectedValuesSet.has(item.value)).length;\n const hasSelected = totalSelected > 0;\n const allSelected = totalSelected === option.options.length;\n return {\n selected: hasSelected && allSelected,\n indeterminate: hasSelected && !allSelected,\n };\n };\n\n const getOptionProps = (option: DropdownOption, index: number) => {\n const highlighted = option === highlightedOption;\n const groupState = isGroup(option.option) ? getGroupState(option.option) : undefined;\n const selected = __selectedOptions.indexOf(option) > -1 || !!groupState?.selected;\n const nextOption = options[index + 1]?.option;\n const isNextSelected =\n !!nextOption && isGroup(nextOption)\n ? getGroupState(nextOption).selected\n : __selectedOptions.indexOf(options[index + 1]) > -1;\n\n const optionProps: any = {\n key: index,\n option,\n highlighted,\n selected,\n isNextSelected,\n indeterminate: !!groupState?.indeterminate,\n ['data-mouse-target']: isHighlightable(option) ? index : -1,\n id: getOptionId(menuId, index),\n };\n\n return optionProps;\n };\n\n const prevOpen = usePrevious<boolean>(isOpen);\n useEffect(() => {\n // highlight the first selected option, when opening the Select component\n if (isOpen && !prevOpen && hasSelectedOption) {\n setHighlightedIndexWithMouse(options.indexOf(__selectedOptions[0]));\n }\n }, [isOpen, __selectedOptions, hasSelectedOption, setHighlightedIndexWithMouse, options, prevOpen]);\n\n useEffect(() => {\n if (isOpen) {\n // dropdown-fit calculations ensure that the dropdown will fit inside the current\n // viewport, so prevent the browser from trying to scroll it into view (e.g. if\n // scroll-padding-top is set on a parent)\n activeRef.current?.focus({ preventScroll: true });\n }\n }, [isOpen, activeRef]);\n\n useForwardFocus(externalRef, triggerRef as React.RefObject<HTMLElement>);\n const highlightedGroupSelected =\n !!highlightedOption && isGroup(highlightedOption.option) && getGroupState(highlightedOption.option).selected;\n const announceSelected =\n !!highlightedOption && (__selectedOptions.indexOf(highlightedOption) > -1 || highlightedGroupSelected);\n\n return {\n isOpen,\n highlightedOption,\n highlightedIndex,\n highlightType,\n getTriggerProps,\n getDropdownProps,\n getMenuProps,\n getFilterProps,\n getOptionProps,\n highlightOption: highlightOptionWithKeyboard,\n selectOption,\n announceSelected,\n };\n}\n"]}
1
+ {"version":3,"file":"use-select.js","sourceRoot":"","sources":["../../../../src/select/utils/use-select.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,uDAAuD,CAAC;AACnH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,mEAAmE,CAAC;AACzG,OAAO,EAAE,YAAY,EAAE,MAAM,6DAA6D,CAAC;AAC3F,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,2DAA2D,CAAC;AAChH,OAAO,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAC;AACnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,eAAe,MAAM,oCAAoC,CAAC;AAIjE,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAA4C,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACzG,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AA0BjE,MAAM,UAAU,SAAS,CAAC,EAYT;QAXf,eAAe,qBAAA,EACf,oBAAoB,0BAAA,EACp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jB,gBAAgB,kBAAA;QAChB,aAAa,eAAA;QACb,eAAe,iBAAA;QACf,gBAAgB,kBAAA;QAChB,YAAY,cAAA;QACZ,cAAc,gBAAA;QACd,cAAc,gBAAA;QACd,eAAe,EAAE,2BAA2B;QAC5C,YAAY,cAAA;QACZ,gBAAgB,kBAAA;KACjB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { RefObject } from 'react';\nimport { DropdownProps } from '../../internal/components/dropdown/interfaces';\nimport { DropdownOption, OptionDefinition, OptionGroup } from '../../internal/components/option/interfaces';\nimport { isInteractive, isGroupInteractive, isGroup } from '../../internal/components/option/utils/filter-options';\nimport { useEffect, useRef } from 'react';\nimport { useHighlightedOption } from '../../internal/components/options-list/utils/use-highlight-option';\nimport { useOpenState } from '../../internal/components/options-list/utils/use-open-state';\nimport { useMenuKeyboard, useTriggerKeyboard } from '../../internal/components/options-list/utils/use-keyboard';\nimport { getOptionId } from '../../internal/components/options-list/utils/use-ids';\nimport { connectOptionsByValue } from './connect-options';\nimport useForwardFocus from '../../internal/hooks/forward-focus';\nimport { OptionsListProps } from '../../internal/components/options-list';\nimport { FilterProps } from '../parts/filter';\nimport { ItemProps } from '../parts/item';\nimport { usePrevious } from '../../internal/hooks/use-previous';\nimport { BaseKeyDetail, NonCancelableEventHandler, fireNonCancelableEvent } from '../../internal/events';\nimport { useUniqueId } from '../../internal/hooks/use-unique-id';\n\nexport type MenuProps = Omit<OptionsListProps, 'children'> & { ref: React.RefObject<HTMLUListElement> };\nexport type GetOptionProps = (option: DropdownOption, index: number) => ItemProps;\n\ninterface UseSelectProps {\n selectedOptions: ReadonlyArray<OptionDefinition>;\n updateSelectedOption: (option: OptionDefinition) => void;\n options: ReadonlyArray<DropdownOption>;\n filteringType: string;\n keepOpen?: boolean;\n onBlur?: NonCancelableEventHandler;\n onFocus?: NonCancelableEventHandler;\n externalRef: React.Ref<any>;\n fireLoadItems: (filteringText: string) => void;\n setFilteringValue: (filteringText: string) => void;\n useInteractiveGroups?: boolean;\n}\n\nexport interface SelectTriggerProps {\n ref: RefObject<HTMLButtonElement>;\n onMouseDown?: (event: CustomEvent) => void;\n onKeyDown?: (event: CustomEvent<BaseKeyDetail>) => void;\n onFocus: NonCancelableEventHandler;\n}\n\nexport function useSelect({\n selectedOptions,\n updateSelectedOption,\n options,\n filteringType,\n onBlur,\n onFocus,\n externalRef,\n keepOpen,\n fireLoadItems,\n setFilteringValue,\n useInteractiveGroups = false,\n}: UseSelectProps) {\n const interactivityCheck = useInteractiveGroups ? isGroupInteractive : isInteractive;\n\n const isHighlightable = (option?: DropdownOption) => !!option && (useInteractiveGroups || option.type !== 'parent');\n\n const filterRef = useRef<HTMLInputElement>(null);\n const triggerRef = useRef<HTMLButtonElement>(null);\n const menuRef = useRef<HTMLUListElement>(null);\n const hasFilter = filteringType !== 'none';\n const activeRef = hasFilter ? filterRef : menuRef;\n const isSelectingUsingSpace = useRef<boolean>(false);\n const __selectedOptions = connectOptionsByValue(options, selectedOptions);\n const __selectedValuesSet = selectedOptions.reduce((selectedValuesSet: Set<string>, item: OptionDefinition) => {\n if (item.value) {\n selectedValuesSet.add(item.value);\n }\n return selectedValuesSet;\n }, new Set<string>());\n const [\n { highlightType, highlightedOption, highlightedIndex },\n {\n moveHighlightWithKeyboard,\n resetHighlightWithKeyboard,\n setHighlightedIndexWithMouse,\n highlightOptionWithKeyboard,\n goHomeWithKeyboard,\n goEndWithKeyboard,\n },\n ] = useHighlightedOption({ options, isHighlightable });\n\n const { isOpen, openDropdown, closeDropdown, toggleDropdown } = useOpenState({\n onOpen: () => fireLoadItems(''),\n onClose: () => {\n resetHighlightWithKeyboard();\n setFilteringValue('');\n },\n });\n\n const handleFocus = () => {\n fireNonCancelableEvent(onFocus, {});\n };\n\n const handleBlur = () => {\n fireNonCancelableEvent(onBlur, {});\n closeDropdown();\n };\n\n const hasSelectedOption = __selectedOptions.length > 0;\n const menuId = useUniqueId('option-list');\n const highlightedOptionId = getOptionId(menuId, highlightedIndex);\n\n const selectOption = (option?: DropdownOption) => {\n isSelectingUsingSpace.current = false;\n const optionToSelect = option || highlightedOption;\n if (!optionToSelect || !interactivityCheck(optionToSelect)) {\n return;\n }\n updateSelectedOption(optionToSelect.option);\n if (!keepOpen) {\n triggerRef.current?.focus();\n closeDropdown();\n }\n };\n\n const activeKeyDownHandler = useMenuKeyboard({\n moveHighlight: moveHighlightWithKeyboard,\n selectOption,\n goHome: goHomeWithKeyboard,\n goEnd: goEndWithKeyboard,\n closeDropdown: () => {\n triggerRef.current?.focus();\n closeDropdown();\n },\n isSelectingUsingSpace,\n preventNativeSpace: !hasFilter,\n });\n\n const triggerKeyDownHandler = useTriggerKeyboard({ openDropdown, goHome: goHomeWithKeyboard });\n\n const getDropdownProps: () => Pick<DropdownProps, 'onFocus' | 'onBlur'> = () => ({\n onFocus: handleFocus,\n onBlur: handleBlur,\n });\n\n const getTriggerProps = (disabled = false) => {\n const triggerProps: SelectTriggerProps = {\n ref: triggerRef,\n onFocus: () => closeDropdown(),\n };\n if (!disabled) {\n triggerProps.onMouseDown = (event: CustomEvent) => {\n event.preventDefault(); // prevent current focus from blurring as it immediately closes the dropdown\n if (isOpen) {\n triggerRef.current?.focus();\n }\n toggleDropdown();\n };\n triggerProps.onKeyDown = triggerKeyDownHandler;\n }\n return triggerProps;\n };\n\n const getFilterProps = (): Partial<FilterProps> => {\n if (!hasFilter) {\n return {};\n }\n\n return {\n ref: filterRef,\n onKeyDown: activeKeyDownHandler,\n onChange: event => {\n setFilteringValue(event.detail.value);\n resetHighlightWithKeyboard();\n },\n __onDelayedInput: event => {\n fireLoadItems(event.detail.value);\n },\n __nativeAttributes: {\n 'aria-activedescendant': highlightedOptionId,\n ['aria-owns']: menuId,\n ['aria-controls']: menuId,\n },\n };\n };\n\n const getMenuProps = () => {\n const menuProps: MenuProps = {\n id: menuId,\n ref: menuRef,\n open: isOpen,\n onMouseUp: itemIndex => {\n if (itemIndex > -1) {\n selectOption(options[itemIndex]);\n }\n },\n onMouseMove: itemIndex => {\n if (itemIndex > -1) {\n setHighlightedIndexWithMouse(itemIndex);\n }\n },\n };\n if (!hasFilter) {\n menuProps.onKeyDown = activeKeyDownHandler;\n menuProps.nativeAttributes = {\n 'aria-activedescendant': highlightedOptionId,\n };\n }\n return menuProps;\n };\n const getGroupState = (option: OptionGroup) => {\n const totalSelected = option.options.filter(item => !!item.value && __selectedValuesSet.has(item.value)).length;\n const hasSelected = totalSelected > 0;\n const allSelected = totalSelected === option.options.length;\n return {\n selected: hasSelected && allSelected,\n indeterminate: hasSelected && !allSelected,\n };\n };\n\n const getOptionProps = (option: DropdownOption, index: number) => {\n const highlighted = option === highlightedOption;\n const groupState = isGroup(option.option) ? getGroupState(option.option) : undefined;\n const selected = __selectedOptions.indexOf(option) > -1 || !!groupState?.selected;\n const nextOption = options[index + 1]?.option;\n const isNextSelected =\n !!nextOption && isGroup(nextOption)\n ? getGroupState(nextOption).selected\n : __selectedOptions.indexOf(options[index + 1]) > -1;\n\n const optionProps: any = {\n key: index,\n option,\n highlighted,\n selected,\n isNextSelected,\n indeterminate: !!groupState?.indeterminate,\n ['data-mouse-target']: isHighlightable(option) ? index : -1,\n id: getOptionId(menuId, index),\n };\n\n return optionProps;\n };\n\n const prevOpen = usePrevious<boolean>(isOpen);\n useEffect(() => {\n // highlight the first selected option, when opening the Select component\n if (isOpen && !prevOpen && hasSelectedOption) {\n setHighlightedIndexWithMouse(options.indexOf(__selectedOptions[0]));\n }\n }, [isOpen, __selectedOptions, hasSelectedOption, setHighlightedIndexWithMouse, options, prevOpen]);\n\n useEffect(() => {\n if (isOpen) {\n // dropdown-fit calculations ensure that the dropdown will fit inside the current\n // viewport, so prevent the browser from trying to scroll it into view (e.g. if\n // scroll-padding-top is set on a parent)\n activeRef.current?.focus({ preventScroll: true });\n }\n }, [isOpen, activeRef]);\n\n useForwardFocus(externalRef, triggerRef as React.RefObject<HTMLElement>);\n const highlightedGroupSelected =\n !!highlightedOption && isGroup(highlightedOption.option) && getGroupState(highlightedOption.option).selected;\n const announceSelected =\n !!highlightedOption && (__selectedOptions.indexOf(highlightedOption) > -1 || highlightedGroupSelected);\n\n return {\n isOpen,\n highlightedOption,\n highlightedIndex,\n highlightType,\n getTriggerProps,\n getDropdownProps,\n getMenuProps,\n getFilterProps,\n getOptionProps,\n highlightOption: highlightOptionWithKeyboard,\n selectOption,\n announceSelected,\n };\n}\n"]}
@@ -1,39 +1,39 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "root": "awsui_root_wih1l_sal8y_97",
5
- "tools": "awsui_tools_wih1l_sal8y_106",
6
- "tools-filtering": "awsui_tools-filtering_wih1l_sal8y_112",
7
- "tools-align-right": "awsui_tools-align-right_wih1l_sal8y_117",
8
- "tools-pagination": "awsui_tools-pagination_wih1l_sal8y_121",
9
- "tools-preferences": "awsui_tools-preferences_wih1l_sal8y_121",
10
- "tools-small": "awsui_tools-small_wih1l_sal8y_127",
11
- "table": "awsui_table_wih1l_sal8y_133",
12
- "table-layout-fixed": "awsui_table-layout-fixed_wih1l_sal8y_139",
13
- "wrapper": "awsui_wrapper_wih1l_sal8y_143",
14
- "variant-stacked": "awsui_variant-stacked_wih1l_sal8y_153",
15
- "variant-container": "awsui_variant-container_wih1l_sal8y_153",
16
- "variant-embedded": "awsui_variant-embedded_wih1l_sal8y_157",
17
- "has-header": "awsui_has-header_wih1l_sal8y_160",
18
- "has-footer": "awsui_has-footer_wih1l_sal8y_163",
19
- "cell-merged": "awsui_cell-merged_wih1l_sal8y_173",
20
- "cell-merged-content": "awsui_cell-merged-content_wih1l_sal8y_177",
21
- "empty": "awsui_empty_wih1l_sal8y_192",
22
- "loading": "awsui_loading_wih1l_sal8y_196",
23
- "selection-control": "awsui_selection-control_wih1l_sal8y_200",
24
- "selection-control-header": "awsui_selection-control-header_wih1l_sal8y_207",
25
- "sticky-scrollbar": "awsui_sticky-scrollbar_wih1l_sal8y_212",
26
- "sticky-scrollbar-content": "awsui_sticky-scrollbar-content_wih1l_sal8y_222",
27
- "sticky-scrollbar-visible": "awsui_sticky-scrollbar-visible_wih1l_sal8y_225",
28
- "dark-header": "awsui_dark-header_wih1l_sal8y_233",
29
- "header-secondary": "awsui_header-secondary_wih1l_sal8y_237",
30
- "table-has-header": "awsui_table-has-header_wih1l_sal8y_253",
31
- "header-controls": "awsui_header-controls_wih1l_sal8y_257",
32
- "divider": "awsui_divider_wih1l_sal8y_271",
33
- "footer-wrapper": "awsui_footer-wrapper_wih1l_sal8y_278",
34
- "footer": "awsui_footer_wih1l_sal8y_278",
35
- "thead-active": "awsui_thead-active_wih1l_sal8y_287",
36
- "row": "awsui_row_wih1l_sal8y_288",
37
- "row-selected": "awsui_row-selected_wih1l_sal8y_289"
4
+ "root": "awsui_root_wih1l_1qjbt_97",
5
+ "tools": "awsui_tools_wih1l_1qjbt_106",
6
+ "tools-filtering": "awsui_tools-filtering_wih1l_1qjbt_112",
7
+ "tools-align-right": "awsui_tools-align-right_wih1l_1qjbt_117",
8
+ "tools-pagination": "awsui_tools-pagination_wih1l_1qjbt_121",
9
+ "tools-preferences": "awsui_tools-preferences_wih1l_1qjbt_121",
10
+ "tools-small": "awsui_tools-small_wih1l_1qjbt_127",
11
+ "table": "awsui_table_wih1l_1qjbt_133",
12
+ "table-layout-fixed": "awsui_table-layout-fixed_wih1l_1qjbt_139",
13
+ "wrapper": "awsui_wrapper_wih1l_1qjbt_143",
14
+ "variant-stacked": "awsui_variant-stacked_wih1l_1qjbt_151",
15
+ "variant-container": "awsui_variant-container_wih1l_1qjbt_151",
16
+ "variant-embedded": "awsui_variant-embedded_wih1l_1qjbt_155",
17
+ "has-header": "awsui_has-header_wih1l_1qjbt_158",
18
+ "has-footer": "awsui_has-footer_wih1l_1qjbt_161",
19
+ "cell-merged": "awsui_cell-merged_wih1l_1qjbt_175",
20
+ "cell-merged-content": "awsui_cell-merged-content_wih1l_1qjbt_179",
21
+ "empty": "awsui_empty_wih1l_1qjbt_194",
22
+ "loading": "awsui_loading_wih1l_1qjbt_198",
23
+ "selection-control": "awsui_selection-control_wih1l_1qjbt_202",
24
+ "selection-control-header": "awsui_selection-control-header_wih1l_1qjbt_209",
25
+ "sticky-scrollbar": "awsui_sticky-scrollbar_wih1l_1qjbt_214",
26
+ "sticky-scrollbar-content": "awsui_sticky-scrollbar-content_wih1l_1qjbt_224",
27
+ "sticky-scrollbar-visible": "awsui_sticky-scrollbar-visible_wih1l_1qjbt_227",
28
+ "dark-header": "awsui_dark-header_wih1l_1qjbt_235",
29
+ "header-secondary": "awsui_header-secondary_wih1l_1qjbt_239",
30
+ "table-has-header": "awsui_table-has-header_wih1l_1qjbt_255",
31
+ "header-controls": "awsui_header-controls_wih1l_1qjbt_259",
32
+ "divider": "awsui_divider_wih1l_1qjbt_273",
33
+ "footer-wrapper": "awsui_footer-wrapper_wih1l_1qjbt_280",
34
+ "footer": "awsui_footer_wih1l_1qjbt_280",
35
+ "thead-active": "awsui_thead-active_wih1l_1qjbt_289",
36
+ "row": "awsui_row_wih1l_1qjbt_290",
37
+ "row-selected": "awsui_row-selected_wih1l_1qjbt_291"
38
38
  };
39
39
 
@@ -94,7 +94,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
94
94
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
95
95
  SPDX-License-Identifier: Apache-2.0
96
96
  */
97
- .awsui_root_wih1l_sal8y_97:not(#\9) {
97
+ .awsui_root_wih1l_1qjbt_97:not(#\9) {
98
98
  font-size: var(--font-body-m-size-sregvd, 14px);
99
99
  line-height: var(--font-body-m-line-height-i7xxvv, 22px);
100
100
  color: var(--color-text-body-default-ajf1h5, #000716);
@@ -103,78 +103,80 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
103
103
  width: 100%;
104
104
  }
105
105
 
106
- .awsui_tools_wih1l_sal8y_106:not(#\9) {
106
+ .awsui_tools_wih1l_1qjbt_106:not(#\9) {
107
107
  display: flex;
108
108
  align-items: flex-start;
109
109
  flex-wrap: wrap;
110
110
  padding: var(--space-scaled-xs-6859qs, 8px) 0 var(--space-scaled-xxs-95dhkm, 4px);
111
111
  }
112
- .awsui_tools-filtering_wih1l_sal8y_112:not(#\9) {
112
+ .awsui_tools-filtering_wih1l_1qjbt_112:not(#\9) {
113
113
  flex: 1 1 0%;
114
114
  max-width: 100%;
115
115
  margin-right: var(--space-l-4vl6xu, 20px);
116
116
  }
117
- .awsui_tools-align-right_wih1l_sal8y_117:not(#\9) {
117
+ .awsui_tools-align-right_wih1l_1qjbt_117:not(#\9) {
118
118
  display: flex;
119
119
  margin-left: auto;
120
120
  }
121
- .awsui_tools-pagination_wih1l_sal8y_121 + .awsui_tools-preferences_wih1l_sal8y_121:not(#\9) {
121
+ .awsui_tools-pagination_wih1l_1qjbt_121 + .awsui_tools-preferences_wih1l_1qjbt_121:not(#\9) {
122
122
  border-left: var(--border-divider-section-width-4wm2it, 2px) solid var(--color-border-divider-default-7s2wjw, #e9ebed);
123
123
  box-sizing: border-box;
124
124
  margin-left: var(--space-xs-rsr2qu, 8px);
125
125
  padding-left: var(--space-xs-rsr2qu, 8px);
126
126
  }
127
- .awsui_tools-small_wih1l_sal8y_127 > .awsui_tools-filtering_wih1l_sal8y_112:not(#\9) {
127
+ .awsui_tools-small_wih1l_1qjbt_127 > .awsui_tools-filtering_wih1l_1qjbt_112:not(#\9) {
128
128
  margin-right: 0;
129
129
  margin-bottom: var(--space-scaled-xs-6859qs, 8px);
130
130
  flex-basis: 100%;
131
131
  }
132
132
 
133
- .awsui_table_wih1l_sal8y_133:not(#\9) {
133
+ .awsui_table_wih1l_1qjbt_133:not(#\9) {
134
134
  width: 100%;
135
135
  border-spacing: 0;
136
136
  position: relative;
137
137
  box-sizing: border-box;
138
138
  }
139
- .awsui_table-layout-fixed_wih1l_sal8y_139:not(#\9) {
139
+ .awsui_table-layout-fixed_wih1l_1qjbt_139:not(#\9) {
140
140
  table-layout: fixed;
141
141
  }
142
142
 
143
- .awsui_wrapper_wih1l_sal8y_143:not(#\9) {
143
+ .awsui_wrapper_wih1l_1qjbt_143:not(#\9) {
144
144
  position: relative;
145
145
  box-sizing: border-box;
146
146
  width: 100%;
147
147
  padding-top: var(--space-table-content-top-t15dd1, 12px);
148
148
  padding-bottom: var(--space-table-content-bottom-pg6yvn, 4px);
149
149
  overflow-x: auto;
150
- border-top-right-radius: var(--border-radius-container-gh9ysk, 16px);
151
- border-top-left-radius: var(--border-radius-container-gh9ysk, 16px);
152
150
  }
153
- .awsui_wrapper_wih1l_sal8y_143.awsui_variant-stacked_wih1l_sal8y_153 > .awsui_table_wih1l_sal8y_133:not(#\9), .awsui_wrapper_wih1l_sal8y_143.awsui_variant-container_wih1l_sal8y_153 > .awsui_table_wih1l_sal8y_133:not(#\9) {
151
+ .awsui_wrapper_wih1l_1qjbt_143.awsui_variant-stacked_wih1l_1qjbt_151 > .awsui_table_wih1l_1qjbt_133:not(#\9), .awsui_wrapper_wih1l_1qjbt_143.awsui_variant-container_wih1l_1qjbt_151 > .awsui_table_wih1l_1qjbt_133:not(#\9) {
154
152
  padding-left: var(--space-table-horizontal-58vuca, 24px);
155
153
  padding-right: var(--space-table-horizontal-58vuca, 24px);
156
154
  }
157
- .awsui_wrapper_wih1l_sal8y_143.awsui_variant-embedded_wih1l_sal8y_157:not(#\9) {
155
+ .awsui_wrapper_wih1l_1qjbt_143.awsui_variant-embedded_wih1l_1qjbt_155:not(#\9) {
158
156
  padding-bottom: var(--space-table-embedded-content-bottom-7vc5vt, 0px);
159
157
  }
160
- .awsui_wrapper_wih1l_sal8y_143.awsui_has-header_wih1l_sal8y_160:not(#\9) {
158
+ .awsui_wrapper_wih1l_1qjbt_143.awsui_has-header_wih1l_1qjbt_158:not(#\9) {
161
159
  padding-top: 0px;
162
160
  }
163
- .awsui_wrapper_wih1l_sal8y_143.awsui_has-footer_wih1l_sal8y_163:not(#\9) {
161
+ .awsui_wrapper_wih1l_1qjbt_143.awsui_has-footer_wih1l_1qjbt_161:not(#\9) {
164
162
  padding-bottom: 0px;
165
163
  }
166
- .awsui_wrapper_wih1l_sal8y_143[data-awsui-focus-visible=true]:not(#\9):focus {
164
+ .awsui_wrapper_wih1l_1qjbt_143:not(#\9):not(.awsui_has-header_wih1l_1qjbt_158) {
165
+ border-top-right-radius: var(--border-radius-container-gh9ysk, 16px);
166
+ border-top-left-radius: var(--border-radius-container-gh9ysk, 16px);
167
+ }
168
+ .awsui_wrapper_wih1l_1qjbt_143[data-awsui-focus-visible=true]:not(#\9):focus {
167
169
  outline: 2px dotted transparent;
168
170
  outline-offset: 2px;
169
171
  border-radius: var(--border-radius-container-gh9ysk, 16px);
170
172
  box-shadow: 0 0 0 2px var(--color-border-item-focused-ap3b6s, #0972d3);
171
173
  }
172
174
 
173
- .awsui_cell-merged_wih1l_sal8y_173:not(#\9) {
175
+ .awsui_cell-merged_wih1l_1qjbt_175:not(#\9) {
174
176
  text-align: center;
175
177
  padding: 0;
176
178
  }
177
- .awsui_cell-merged-content_wih1l_sal8y_177:not(#\9) {
179
+ .awsui_cell-merged-content_wih1l_1qjbt_179:not(#\9) {
178
180
  box-sizing: border-box;
179
181
  width: 100%;
180
182
  padding: var(--space-scaled-m-pv0fmt, 16px) var(--space-l-4vl6xu, 20px) var(--space-scaled-l-t03y3z, 20px);
@@ -182,34 +184,34 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
182
184
  /* stylelint-enable plugin/no-unsupported-browser-features */
183
185
  }
184
186
  @supports (position: sticky) {
185
- .awsui_cell-merged-content_wih1l_sal8y_177:not(#\9) {
187
+ .awsui_cell-merged-content_wih1l_1qjbt_179:not(#\9) {
186
188
  position: sticky;
187
189
  left: 0;
188
190
  margin: 0 calc(-2 * var(--space-table-horizontal-58vuca, 24px));
189
191
  }
190
192
  }
191
193
 
192
- .awsui_empty_wih1l_sal8y_192:not(#\9) {
194
+ .awsui_empty_wih1l_1qjbt_194:not(#\9) {
193
195
  color: var(--color-text-empty-fjv325, #5f6b7a);
194
196
  }
195
197
 
196
- .awsui_loading_wih1l_sal8y_196:not(#\9) {
198
+ .awsui_loading_wih1l_1qjbt_198:not(#\9) {
197
199
  /* used in test-utils */
198
200
  }
199
201
 
200
- .awsui_selection-control_wih1l_sal8y_200:not(#\9) {
202
+ .awsui_selection-control_wih1l_1qjbt_202:not(#\9) {
201
203
  position: relative;
202
204
  box-sizing: border-box;
203
205
  width: 54px;
204
206
  max-width: 54px;
205
207
  min-width: 54px;
206
208
  }
207
- .awsui_selection-control_wih1l_sal8y_200.awsui_selection-control-header_wih1l_sal8y_207:not(#\9) {
209
+ .awsui_selection-control_wih1l_1qjbt_202.awsui_selection-control-header_wih1l_1qjbt_209:not(#\9) {
208
210
  padding: var(--space-scaled-xs-6859qs, 8px) var(--space-scaled-l-t03y3z, 20px);
209
211
  border-left: var(--border-item-width-qbbbsa, 2px) solid transparent;
210
212
  }
211
213
 
212
- .awsui_sticky-scrollbar_wih1l_sal8y_212:not(#\9) {
214
+ .awsui_sticky-scrollbar_wih1l_1qjbt_214:not(#\9) {
213
215
  height: 15px;
214
216
  position: fixed;
215
217
  display: none;
@@ -219,10 +221,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
219
221
  bottom: 0;
220
222
  width: 100%;
221
223
  }
222
- .awsui_sticky-scrollbar-content_wih1l_sal8y_222:not(#\9) {
224
+ .awsui_sticky-scrollbar-content_wih1l_1qjbt_224:not(#\9) {
223
225
  height: 15px;
224
226
  }
225
- .awsui_sticky-scrollbar-visible_wih1l_sal8y_225:not(#\9) {
227
+ .awsui_sticky-scrollbar-visible_wih1l_1qjbt_227:not(#\9) {
226
228
  display: block;
227
229
  }
228
230
 
@@ -230,11 +232,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
230
232
  The dynamic height dark header needs a background that will cover
231
233
  the default white background of the container component.
232
234
  */
233
- .awsui_dark-header_wih1l_sal8y_233:not(#\9) {
235
+ .awsui_dark-header_wih1l_1qjbt_235:not(#\9) {
234
236
  background-color: var(--color-background-layout-main-sfhm4y, #ffffff);
235
237
  }
236
238
 
237
- .awsui_header-secondary_wih1l_sal8y_237:not(#\9) {
239
+ .awsui_header-secondary_wih1l_1qjbt_239:not(#\9) {
238
240
  overflow: auto;
239
241
  -ms-overflow-style: none; /* Internet Explorer 10+ */
240
242
  scrollbar-width: none; /* Firefox */
@@ -243,49 +245,49 @@ the default white background of the container component.
243
245
  border-radius: 0;
244
246
  background: var(--color-background-table-header-i1pa1g, #ffffff);
245
247
  }
246
- .awsui_header-secondary_wih1l_sal8y_237.awsui_variant-stacked_wih1l_sal8y_153 > .awsui_table_wih1l_sal8y_133:not(#\9), .awsui_header-secondary_wih1l_sal8y_237.awsui_variant-container_wih1l_sal8y_153 > .awsui_table_wih1l_sal8y_133:not(#\9) {
248
+ .awsui_header-secondary_wih1l_1qjbt_239.awsui_variant-stacked_wih1l_1qjbt_151 > .awsui_table_wih1l_1qjbt_133:not(#\9), .awsui_header-secondary_wih1l_1qjbt_239.awsui_variant-container_wih1l_1qjbt_151 > .awsui_table_wih1l_1qjbt_133:not(#\9) {
247
249
  padding-left: var(--space-table-horizontal-58vuca, 24px);
248
250
  padding-right: var(--space-table-horizontal-58vuca, 24px);
249
251
  }
250
- .awsui_header-secondary_wih1l_sal8y_237:not(#\9)::-webkit-scrollbar {
252
+ .awsui_header-secondary_wih1l_1qjbt_239:not(#\9)::-webkit-scrollbar {
251
253
  display: none; /* Safari and Chrome */
252
254
  }
253
- .awsui_header-secondary_wih1l_sal8y_237.awsui_table-has-header_wih1l_sal8y_253:not(#\9) {
255
+ .awsui_header-secondary_wih1l_1qjbt_239.awsui_table-has-header_wih1l_1qjbt_255:not(#\9) {
254
256
  border-top: var(--border-divider-list-width-hacikr, 1px) solid var(--color-border-container-divider-4ade7z, transparent);
255
257
  }
256
258
 
257
- .awsui_header-controls_wih1l_sal8y_257:not(#\9) {
259
+ .awsui_header-controls_wih1l_1qjbt_259:not(#\9) {
258
260
  padding-top: var(--space-container-header-vertical-zsjhel, 12px);
259
261
  padding-bottom: var(--space-container-header-vertical-zsjhel, 12px);
260
262
  }
261
- .awsui_header-controls_wih1l_sal8y_257.awsui_variant-stacked_wih1l_sal8y_153:not(#\9), .awsui_header-controls_wih1l_sal8y_257.awsui_variant-container_wih1l_sal8y_153:not(#\9) {
263
+ .awsui_header-controls_wih1l_1qjbt_259.awsui_variant-stacked_wih1l_1qjbt_151:not(#\9), .awsui_header-controls_wih1l_1qjbt_259.awsui_variant-container_wih1l_1qjbt_151:not(#\9) {
262
264
  padding-left: calc(var(--space-table-horizontal-58vuca, 24px) + var(--space-table-header-horizontal-et2ko8, 0px));
263
265
  padding-right: calc(var(--space-table-horizontal-58vuca, 24px) + var(--space-table-header-horizontal-et2ko8, 0px));
264
266
  }
265
- .awsui_header-controls_wih1l_sal8y_257.awsui_variant-embedded_wih1l_sal8y_157:not(#\9) {
267
+ .awsui_header-controls_wih1l_1qjbt_259.awsui_variant-embedded_wih1l_1qjbt_155:not(#\9) {
266
268
  padding-left: var(--space-table-header-horizontal-et2ko8, 0px);
267
269
  padding-right: var(--space-table-header-horizontal-et2ko8, 0px);
268
270
  padding-top: var(--space-table-embedded-header-top-zf07fk, 0px);
269
271
  }
270
272
 
271
- .awsui_divider_wih1l_sal8y_271:not(#\9) {
273
+ .awsui_divider_wih1l_1qjbt_273:not(#\9) {
272
274
  border: none;
273
275
  margin: 0;
274
276
  height: 0;
275
277
  border-top: var(--border-divider-section-width-4wm2it, 2px) solid var(--color-border-divider-default-7s2wjw, #e9ebed);
276
278
  }
277
279
 
278
- .awsui_footer-wrapper_wih1l_sal8y_278.awsui_variant-stacked_wih1l_sal8y_153:not(#\9), .awsui_footer-wrapper_wih1l_sal8y_278.awsui_variant-container_wih1l_sal8y_153:not(#\9) {
280
+ .awsui_footer-wrapper_wih1l_1qjbt_280.awsui_variant-stacked_wih1l_1qjbt_151:not(#\9), .awsui_footer-wrapper_wih1l_1qjbt_280.awsui_variant-container_wih1l_1qjbt_151:not(#\9) {
279
281
  padding-left: var(--space-table-horizontal-58vuca, 24px);
280
282
  padding-right: var(--space-table-horizontal-58vuca, 24px);
281
283
  }
282
284
 
283
- .awsui_footer_wih1l_sal8y_278:not(#\9) {
285
+ .awsui_footer_wih1l_1qjbt_280:not(#\9) {
284
286
  padding: var(--space-scaled-s-cu1hzn, 12px) var(--space-table-footer-horizontal-8o6sk8, 0px);
285
287
  }
286
288
 
287
- .awsui_thead-active_wih1l_sal8y_287:not(#\9),
288
- .awsui_row_wih1l_sal8y_288:not(#\9),
289
- .awsui_row-selected_wih1l_sal8y_289:not(#\9) {
289
+ .awsui_thead-active_wih1l_1qjbt_289:not(#\9),
290
+ .awsui_row_wih1l_1qjbt_290:not(#\9),
291
+ .awsui_row-selected_wih1l_1qjbt_291:not(#\9) {
290
292
  /* used in test-utils */
291
293
  }