@cloudscape-design/components 3.0.336 → 3.0.338
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.
- package/app-layout/styles.css.js +17 -17
- package/app-layout/styles.scoped.css +21 -21
- package/app-layout/styles.selectors.js +17 -17
- package/app-layout/visual-refresh/styles.css.js +69 -69
- package/app-layout/visual-refresh/styles.scoped.css +173 -169
- package/app-layout/visual-refresh/styles.selectors.js +69 -69
- package/area-chart/chart-container.d.ts +2 -2
- package/area-chart/chart-container.d.ts.map +1 -1
- package/area-chart/chart-container.js +1 -1
- package/area-chart/chart-container.js.map +1 -1
- package/area-chart/interfaces.d.ts +5 -1
- package/area-chart/interfaces.d.ts.map +1 -1
- package/area-chart/interfaces.js.map +1 -1
- package/area-chart/internal.d.ts +1 -1
- package/area-chart/internal.d.ts.map +1 -1
- package/area-chart/internal.js +2 -2
- package/area-chart/internal.js.map +1 -1
- package/attribute-editor/interfaces.d.ts +7 -0
- package/attribute-editor/interfaces.d.ts.map +1 -1
- package/attribute-editor/interfaces.js.map +1 -1
- package/attribute-editor/internal.d.ts.map +1 -1
- package/attribute-editor/internal.js +2 -2
- package/attribute-editor/internal.js.map +1 -1
- package/attribute-editor/row.d.ts +3 -2
- package/attribute-editor/row.d.ts.map +1 -1
- package/attribute-editor/row.js +2 -2
- package/attribute-editor/row.js.map +1 -1
- package/box/styles.css.js +189 -189
- package/box/styles.scoped.css +258 -258
- package/box/styles.selectors.js +189 -189
- package/button/styles.css.js +20 -20
- package/button/styles.scoped.css +154 -154
- package/button/styles.selectors.js +20 -20
- package/button-dropdown/category-elements/styles.css.js +13 -13
- package/button-dropdown/category-elements/styles.scoped.css +25 -25
- package/button-dropdown/category-elements/styles.selectors.js +13 -13
- package/button-dropdown/item-element/styles.css.js +14 -14
- package/button-dropdown/item-element/styles.scoped.css +20 -20
- package/button-dropdown/item-element/styles.selectors.js +14 -14
- package/cards/styles.css.js +38 -38
- package/cards/styles.scoped.css +57 -62
- package/cards/styles.selectors.js +38 -38
- package/container/styles.css.js +28 -28
- package/container/styles.scoped.css +57 -54
- package/container/styles.selectors.js +28 -28
- package/content-layout/styles.css.js +7 -7
- package/content-layout/styles.scoped.css +13 -13
- package/content-layout/styles.selectors.js +7 -7
- package/expandable-section/styles.css.js +29 -29
- package/expandable-section/styles.scoped.css +61 -61
- package/expandable-section/styles.selectors.js +29 -29
- package/flashbar/styles.css.js +46 -46
- package/flashbar/styles.scoped.css +146 -146
- package/flashbar/styles.selectors.js +46 -46
- package/form-field/internal.js +3 -2
- package/form-field/internal.js.map +1 -1
- package/header/internal.d.ts.map +1 -1
- package/header/internal.js +5 -5
- package/header/internal.js.map +1 -1
- package/header/styles.css.js +33 -44
- package/header/styles.scoped.css +85 -91
- package/header/styles.selectors.js +33 -44
- package/help-panel/styles.css.js +4 -4
- package/help-panel/styles.scoped.css +80 -80
- package/help-panel/styles.selectors.js +4 -4
- package/icon/styles.css.js +21 -21
- package/icon/styles.scoped.css +54 -54
- package/icon/styles.selectors.js +21 -21
- package/internal/analytics/components/analytics-funnel.d.ts.map +1 -1
- package/internal/analytics/components/analytics-funnel.js +14 -13
- package/internal/analytics/components/analytics-funnel.js.map +1 -1
- package/internal/analytics/context/analytics-context.d.ts +6 -7
- package/internal/analytics/context/analytics-context.d.ts.map +1 -1
- package/internal/analytics/context/analytics-context.js +2 -6
- package/internal/analytics/context/analytics-context.js.map +1 -1
- package/internal/analytics/hooks/use-funnel.d.ts +4 -7
- package/internal/analytics/hooks/use-funnel.d.ts.map +1 -1
- package/internal/analytics/hooks/use-funnel.js +9 -7
- package/internal/analytics/hooks/use-funnel.js.map +1 -1
- package/internal/base-component/styles.scoped.css +48 -35
- package/internal/components/button-trigger/index.d.ts +2 -1
- package/internal/components/button-trigger/index.d.ts.map +1 -1
- package/internal/components/button-trigger/index.js +2 -2
- package/internal/components/button-trigger/index.js.map +1 -1
- package/internal/components/cartesian-chart/interfaces.d.ts +10 -2
- package/internal/components/cartesian-chart/interfaces.d.ts.map +1 -1
- package/internal/components/cartesian-chart/interfaces.js.map +1 -1
- package/internal/components/dropdown/index.d.ts +1 -1
- package/internal/components/dropdown/index.d.ts.map +1 -1
- package/internal/components/dropdown/index.js +4 -4
- package/internal/components/dropdown/index.js.map +1 -1
- package/internal/components/dropdown/interfaces.d.ts +8 -0
- package/internal/components/dropdown/interfaces.d.ts.map +1 -1
- package/internal/components/dropdown/interfaces.js.map +1 -1
- package/internal/components/menu-dropdown/styles.css.js +7 -7
- package/internal/components/menu-dropdown/styles.scoped.css +14 -14
- package/internal/components/menu-dropdown/styles.selectors.js +7 -7
- package/internal/environment.js +1 -1
- package/internal/generated/theming/index.cjs +164 -120
- package/internal/generated/theming/index.js +164 -120
- package/internal/manifest.json +1 -1
- package/link/internal.d.ts.map +1 -1
- package/link/internal.js +3 -2
- package/link/internal.js.map +1 -1
- package/link/styles.css.js +20 -20
- package/link/styles.scoped.css +83 -83
- package/link/styles.selectors.js +20 -20
- package/mixed-line-bar-chart/internal.d.ts +1 -1
- package/mixed-line-bar-chart/internal.d.ts.map +1 -1
- package/mixed-line-bar-chart/internal.js +2 -2
- package/mixed-line-bar-chart/internal.js.map +1 -1
- package/modal/styles.css.js +23 -23
- package/modal/styles.scoped.css +40 -40
- package/modal/styles.selectors.js +23 -23
- package/package.json +1 -1
- package/pagination/styles.css.js +9 -9
- package/pagination/styles.scoped.css +24 -24
- package/pagination/styles.selectors.js +9 -9
- package/popover/styles.css.js +50 -50
- package/popover/styles.scoped.css +65 -65
- package/popover/styles.selectors.js +50 -50
- package/property-filter/index.d.ts.map +1 -1
- package/property-filter/index.js +4 -3
- package/property-filter/index.js.map +1 -1
- package/property-filter/interfaces.d.ts +16 -5
- package/property-filter/interfaces.d.ts.map +1 -1
- package/property-filter/interfaces.js.map +1 -1
- package/s3-resource-selector/index.d.ts.map +1 -1
- package/s3-resource-selector/index.js +2 -2
- package/s3-resource-selector/index.js.map +1 -1
- package/s3-resource-selector/interfaces.d.ts +7 -0
- package/s3-resource-selector/interfaces.d.ts.map +1 -1
- package/s3-resource-selector/interfaces.js.map +1 -1
- package/s3-resource-selector/s3-in-context/index.d.ts +1 -0
- package/s3-resource-selector/s3-in-context/index.d.ts.map +1 -1
- package/s3-resource-selector/s3-in-context/index.js +2 -2
- package/s3-resource-selector/s3-in-context/index.js.map +1 -1
- package/segmented-control/styles.css.js +14 -14
- package/segmented-control/styles.scoped.css +35 -35
- package/segmented-control/styles.selectors.js +14 -14
- package/select/utils/use-select.d.ts +5 -7
- package/select/utils/use-select.d.ts.map +1 -1
- package/select/utils/use-select.js +6 -0
- package/select/utils/use-select.js.map +1 -1
- package/side-navigation/internal.d.ts.map +1 -1
- package/side-navigation/internal.js +3 -1
- package/side-navigation/internal.js.map +1 -1
- package/side-navigation/styles.css.js +28 -27
- package/side-navigation/styles.scoped.css +52 -48
- package/side-navigation/styles.selectors.js +28 -27
- package/spinner/styles.css.js +13 -13
- package/spinner/styles.scoped.css +22 -22
- package/spinner/styles.selectors.js +13 -13
- package/split-panel/styles.css.js +56 -56
- package/split-panel/styles.scoped.css +80 -80
- package/split-panel/styles.selectors.js +56 -56
- package/table/header-cell/styles.css.js +24 -24
- package/table/header-cell/styles.scoped.css +41 -41
- package/table/header-cell/styles.selectors.js +24 -24
- package/table/styles.css.js +34 -34
- package/table/styles.scoped.css +45 -52
- package/table/styles.selectors.js +34 -34
- package/tabs/styles.css.js +21 -21
- package/tabs/styles.scoped.css +44 -41
- package/tabs/styles.selectors.js +21 -21
- package/tag-editor/styles.css.js +3 -3
- package/tag-editor/styles.scoped.css +11 -11
- package/tag-editor/styles.selectors.js +3 -3
- package/text-content/styles.css.js +1 -1
- package/text-content/styles.scoped.css +71 -71
- package/text-content/styles.selectors.js +1 -1
- package/tiles/styles.css.js +29 -28
- package/tiles/styles.scoped.css +76 -70
- package/tiles/styles.selectors.js +29 -28
- package/tiles/tile.d.ts.map +1 -1
- package/tiles/tile.js +3 -1
- package/tiles/tile.js.map +1 -1
- package/top-navigation/1.0-beta/styles.css.js +25 -25
- package/top-navigation/1.0-beta/styles.scoped.css +45 -45
- package/top-navigation/1.0-beta/styles.selectors.js +25 -25
- package/top-navigation/styles.css.js +47 -47
- package/top-navigation/styles.scoped.css +74 -74
- package/top-navigation/styles.selectors.js +47 -47
- package/tutorial-panel/components/tutorial-detail-view/styles.css.js +20 -20
- package/tutorial-panel/components/tutorial-detail-view/styles.scoped.css +22 -22
- package/tutorial-panel/components/tutorial-detail-view/styles.selectors.js +20 -20
- package/wizard/interfaces.d.ts +10 -3
- package/wizard/interfaces.d.ts.map +1 -1
- package/wizard/interfaces.js.map +1 -1
- package/wizard/internal.d.ts +1 -1
- package/wizard/internal.d.ts.map +1 -1
- package/wizard/internal.js +5 -5
- package/wizard/internal.js.map +1 -1
- package/wizard/styles.css.js +31 -31
- package/wizard/styles.scoped.css +67 -67
- package/wizard/styles.selectors.js +31 -31
- package/wizard/wizard-form.d.ts +2 -1
- package/wizard/wizard-form.d.ts.map +1 -1
- package/wizard/wizard-form.js +2 -2
- package/wizard/wizard-form.js.map +1 -1
|
@@ -60,6 +60,14 @@ export interface CartesianChartProps<T extends ChartDataTypes, Series> extends B
|
|
|
60
60
|
* @i18n
|
|
61
61
|
*/
|
|
62
62
|
i18nStrings?: CartesianChartProps.I18nStrings<T>;
|
|
63
|
+
/**
|
|
64
|
+
* Function to format the displayed label of an x axis tick.
|
|
65
|
+
*/
|
|
66
|
+
xTickFormatter?: CartesianChartProps.TickFormatter<T>;
|
|
67
|
+
/**
|
|
68
|
+
* Function to format the displayed label of a y axis tick.
|
|
69
|
+
*/
|
|
70
|
+
yTickFormatter?: CartesianChartProps.TickFormatter<number>;
|
|
63
71
|
/**
|
|
64
72
|
* An optional pixel value number that fixes the height of the chart area.
|
|
65
73
|
* If not set explicitly, the component will use a default height that is defined internally.
|
|
@@ -181,9 +189,9 @@ export declare namespace CartesianChartProps {
|
|
|
181
189
|
xAxisAriaRoleDescription?: string;
|
|
182
190
|
/** Name of the ARIA role description of the y axis, e.g. "y axis" */
|
|
183
191
|
yAxisAriaRoleDescription?: string;
|
|
184
|
-
/**
|
|
192
|
+
/** @deprecated Use `xTickFormatter` on the component instead. */
|
|
185
193
|
xTickFormatter?: TickFormatter<T>;
|
|
186
|
-
/**
|
|
194
|
+
/** @deprecated Use `yTickFormatter` on the component instead. */
|
|
187
195
|
yTickFormatter?: TickFormatter<number>;
|
|
188
196
|
}
|
|
189
197
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["internal/components/cartesian-chart/interfaces.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS,cAAc,EAAE,MAAM,CAAE,SAAQ,kBAAkB;IAC/F;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IAEvB;;OAEG;IACH,UAAU,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IAE9B;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,CAAC,SAAS,OAAO,GAAG,aAAa,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;IAElE;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAEhC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,WAAW,C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iB,kBAAkB,CAAC,MAAM;QACxC,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;KACtC;IAED,UAAiB,qBAAqB,CAAC,MAAM;QAC3C,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;KAClC;IAED,UAAiB,aAAa,CAAC,CAAC;QAC9B,CAAC,KAAK,EAAE,CAAC,GAAG,MAAM,CAAC;KACpB;IAED,UAAiB,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;QACjD,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,GAAG,MAAM,CAAC;KACxC;IAED,UAAiB,mBAAmB,CAAC,CAAC;QACpC,CAAC,MAAM,EAAE,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC;KAC9B;IAED,UAAiB,WAAW,CAAC,CAAC;QAC5B,0CAA0C;QAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;QAErB,6CAA6C;QAC7C,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAE3B,yFAAyF;QACzF,uBAAuB,CAAC,EAAE,MAAM,CAAC;QAEjC,sGAAsG;QACtG,eAAe,CAAC,EAAE,MAAM,CAAC;QAEzB,oDAAoD;QACpD,6BAA6B,CAAC,EAAE,MAAM,CAAC;QAEvC,wEAAwE;QACxE,wBAAwB,CAAC,EAAE,MAAM,CAAC;QAElC,qEAAqE;QACrE,wBAAwB,CAAC,EAAE,MAAM,CAAC;QAElC,qEAAqE;QACrE,wBAAwB,CAAC,EAAE,MAAM,CAAC;QAElC,
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["internal/components/cartesian-chart/interfaces.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS,cAAc,EAAE,MAAM,CAAE,SAAQ,kBAAkB;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,MAAM,MAAM,OAAO,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["internal/components/cartesian-chart/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../../base-component';\nimport { NonCancelableEventHandler } from '../../events';\n\nexport interface CartesianChartProps<T extends ChartDataTypes, Series> extends BaseComponentProps {\n /**\n * Determines the type of scale for values on the x axis.\n */\n xScaleType?: ScaleType;\n\n /**\n * Determines the type of scale for values on the y axis.\n */\n yScaleType?: 'linear' | 'log';\n\n /**\n * Determines the domain of the x axis, i.e. the range of values that will be visible in the chart.\n * For numerical and time-based data this is represented as an array with two values: `[minimumValue, maximumValue]`.\n * For categorical data this is represented as an array of strings that determine the categories to display.\n *\n * It is recommended to set this explicitly. If not, the component will determine a domain that fits all data points.\n * When controlling this directly, make sure to update the value based on filtering changes.\n */\n xDomain?: T extends unknown ? ReadonlyArray<T> : ReadonlyArray<T>;\n\n /**\n * Determines the domain of the y axis, i.e. the range of values that will be visible in the chart.\n * The domain is defined by a tuple: `[minimumValue, maximumValue]`.\n *\n * It is recommended to set this explicitly. If not, the component will determine a domain that fits all data points.\n * When controlling this directly, make sure to update the value based on filtering changes.\n */\n yDomain?: ReadonlyArray<number>;\n\n /**\n * The title of the x axis.\n */\n xTitle?: string;\n\n /**\n * The title of the y axis.\n */\n yTitle?: string;\n\n /**\n * Optional title for the legend.\n */\n legendTitle?: string;\n\n /**\n * ARIA label that is assigned to the chart itself. It should match the visible label on the page, e.g. in the container header.\n * Do not use `ariaLabel` and `ariaLabelledby` at the same time.\n */\n ariaLabel?: string;\n\n /**\n * Sets `aria-labelledby` on the chart itself.\n * If there is a visible label for the chart on the page, e.g. in the container header, set this property to the ID of that header element.\n * Do not use `ariaLabel` and `ariaLabelledby` at the same time.\n */\n ariaLabelledby?: string;\n\n /**\n * A description of the chart that assistive technologies can use (through `aria-describedby`).\n * Provide a concise summary of the data visualized in the chart.\n */\n ariaDescription?: string;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n * @i18n\n */\n i18nStrings?: CartesianChartProps.I18nStrings<T>;\n\n /**\n * An optional pixel value number that fixes the height of the chart area.\n * If not set explicitly, the component will use a default height that is defined internally.\n */\n height?: number;\n\n /**\n * Determines the maximum width the detail popover will be limited to.\n */\n detailPopoverSize?: 'small' | 'medium' | 'large';\n\n /**\n * Additional content that is displayed at the bottom of the detail popover.\n */\n detailPopoverFooter?: CartesianChartProps.DetailPopoverFooter<T>;\n\n /**\n * When set to `true`, the legend beneath the chart is not displayed.\n * It is highly recommended to keep this set to `false`.\n */\n hideLegend?: boolean;\n\n /**\n * When set to `true`, the default filtering dropdown is not displayed.\n * It is still possible to render additional filters with the `additionalFilters` slot.\n */\n hideFilter?: boolean;\n\n /**\n * Additional filters that are added above the chart component.\n * Make sure to update the `data` property when any of your custom filters change the data to be displayed.\n */\n additionalFilters?: React.ReactNode;\n\n /**\n * The currently highlighted data series, usually through hovering over a series or the legend.\n * A value of `null` means no series is highlighted.\n *\n * - If you do not set this property, series are highlighted automatically when hovering over one of the triggers (uncontrolled behavior).\n * - If you explicitly set this property, you must set an `onHighlightChange` listener to update this property when a series should be highlighted (controlled behavior).\n */\n highlightedSeries?: Series | null;\n\n /**\n * An array of series objects that determines which of the data series are currently displayed, i.e. not filtered out.\n * - If you do not set this property, series are shown and hidden automatically when using the default filter component (uncontrolled behavior).\n * - If you explicitly set this property, you must set an `onFilterChange` listener to update this property when the visible series should change, or when one of your custom filters changes the number of visible series (controlled behavior).\n */\n visibleSeries?: ReadonlyArray<Series>;\n\n /**\n * Specifies the current status of loading data.\n * * `loading`: data fetching is in progress.\n * * `finished`: data has loaded successfully.\n * * `error`: an error occurred during fetch. You should provide user an option to recover.\n **/\n statusType?: 'loading' | 'finished' | 'error';\n\n /**\n * Content that is displayed when the data passed to the component is empty.\n */\n empty?: React.ReactNode;\n\n /**\n * Content that is displayed when there is no data to display due to the built-in filtering.\n */\n noMatch?: React.ReactNode;\n\n /**\n * Text that is displayed when the chart is loading, i.e. when `statusType` is set to `\"loading\"`.\n * @i18n\n */\n loadingText?: string;\n\n /**\n * Text that is displayed when the chart is in error state, i.e. when `statusType` is set to `\"error\"`.\n * @i18n\n */\n errorText?: string;\n\n /**\n * Text for the recovery button that is displayed next to the error text.\n * @i18n\n **/\n recoveryText?: string;\n\n /**\n * Called when the user clicks the recovery button that appears when there is an error state.\n * Use this to enable the user to retry a failed request or provide another option for the user\n * to recover from the error.\n */\n onRecoveryClick?: NonCancelableEventHandler;\n\n /**\n * Called when the values of the internal filter component changed.\n * This will **not** be called for any custom filter components you have defined in `additionalFilters`.\n */\n onFilterChange?: NonCancelableEventHandler<CartesianChartProps.FilterChangeDetail<Series>>;\n\n /**\n * Called when the highlighted series has changed because of user interaction.\n */\n onHighlightChange?: NonCancelableEventHandler<CartesianChartProps.HighlightChangeDetail<Series>>;\n}\n\nexport namespace CartesianChartProps {\n export interface FilterChangeDetail<Series> {\n visibleSeries: ReadonlyArray<Series>;\n }\n\n export interface HighlightChangeDetail<Series> {\n highlightedSeries: Series | null;\n }\n\n export interface TickFormatter<T> {\n (value: T): string;\n }\n\n export interface ValueFormatter<YType, XType = null> {\n (yValue: YType, xValue: XType): string;\n }\n\n export interface DetailPopoverFooter<T> {\n (xValue: T): React.ReactNode;\n }\n\n export interface I18nStrings<T> {\n /** Visible label of the default filter */\n filterLabel?: string;\n\n /** Placeholder text of the default filter */\n filterPlaceholder?: string;\n\n /** ARIA label for the default filter which is appended to any option that is selected */\n filterSelectedAriaLabel?: string;\n\n /** ARIA label that is associated with the legend in case there is no visible `legendTitle` defined */\n legendAriaLabel?: string;\n\n /** ARIA label for details popover dismiss button */\n detailPopoverDismissAriaLabel?: string;\n\n /** Name of the ARIA role description of the chart, e.g. \"line chart\" */\n chartAriaRoleDescription?: string;\n\n /** Name of the ARIA role description of the x axis, e.g. \"x axis\" */\n xAxisAriaRoleDescription?: string;\n\n /** Name of the ARIA role description of the y axis, e.g. \"y axis\" */\n yAxisAriaRoleDescription?: string;\n\n /**
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["internal/components/cartesian-chart/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../../base-component';\nimport { NonCancelableEventHandler } from '../../events';\n\nexport interface CartesianChartProps<T extends ChartDataTypes, Series> extends BaseComponentProps {\n /**\n * Determines the type of scale for values on the x axis.\n */\n xScaleType?: ScaleType;\n\n /**\n * Determines the type of scale for values on the y axis.\n */\n yScaleType?: 'linear' | 'log';\n\n /**\n * Determines the domain of the x axis, i.e. the range of values that will be visible in the chart.\n * For numerical and time-based data this is represented as an array with two values: `[minimumValue, maximumValue]`.\n * For categorical data this is represented as an array of strings that determine the categories to display.\n *\n * It is recommended to set this explicitly. If not, the component will determine a domain that fits all data points.\n * When controlling this directly, make sure to update the value based on filtering changes.\n */\n xDomain?: T extends unknown ? ReadonlyArray<T> : ReadonlyArray<T>;\n\n /**\n * Determines the domain of the y axis, i.e. the range of values that will be visible in the chart.\n * The domain is defined by a tuple: `[minimumValue, maximumValue]`.\n *\n * It is recommended to set this explicitly. If not, the component will determine a domain that fits all data points.\n * When controlling this directly, make sure to update the value based on filtering changes.\n */\n yDomain?: ReadonlyArray<number>;\n\n /**\n * The title of the x axis.\n */\n xTitle?: string;\n\n /**\n * The title of the y axis.\n */\n yTitle?: string;\n\n /**\n * Optional title for the legend.\n */\n legendTitle?: string;\n\n /**\n * ARIA label that is assigned to the chart itself. It should match the visible label on the page, e.g. in the container header.\n * Do not use `ariaLabel` and `ariaLabelledby` at the same time.\n */\n ariaLabel?: string;\n\n /**\n * Sets `aria-labelledby` on the chart itself.\n * If there is a visible label for the chart on the page, e.g. in the container header, set this property to the ID of that header element.\n * Do not use `ariaLabel` and `ariaLabelledby` at the same time.\n */\n ariaLabelledby?: string;\n\n /**\n * A description of the chart that assistive technologies can use (through `aria-describedby`).\n * Provide a concise summary of the data visualized in the chart.\n */\n ariaDescription?: string;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n * @i18n\n */\n i18nStrings?: CartesianChartProps.I18nStrings<T>;\n\n /**\n * Function to format the displayed label of an x axis tick.\n */\n xTickFormatter?: CartesianChartProps.TickFormatter<T>;\n\n /**\n * Function to format the displayed label of a y axis tick.\n */\n yTickFormatter?: CartesianChartProps.TickFormatter<number>;\n\n /**\n * An optional pixel value number that fixes the height of the chart area.\n * If not set explicitly, the component will use a default height that is defined internally.\n */\n height?: number;\n\n /**\n * Determines the maximum width the detail popover will be limited to.\n */\n detailPopoverSize?: 'small' | 'medium' | 'large';\n\n /**\n * Additional content that is displayed at the bottom of the detail popover.\n */\n detailPopoverFooter?: CartesianChartProps.DetailPopoverFooter<T>;\n\n /**\n * When set to `true`, the legend beneath the chart is not displayed.\n * It is highly recommended to keep this set to `false`.\n */\n hideLegend?: boolean;\n\n /**\n * When set to `true`, the default filtering dropdown is not displayed.\n * It is still possible to render additional filters with the `additionalFilters` slot.\n */\n hideFilter?: boolean;\n\n /**\n * Additional filters that are added above the chart component.\n * Make sure to update the `data` property when any of your custom filters change the data to be displayed.\n */\n additionalFilters?: React.ReactNode;\n\n /**\n * The currently highlighted data series, usually through hovering over a series or the legend.\n * A value of `null` means no series is highlighted.\n *\n * - If you do not set this property, series are highlighted automatically when hovering over one of the triggers (uncontrolled behavior).\n * - If you explicitly set this property, you must set an `onHighlightChange` listener to update this property when a series should be highlighted (controlled behavior).\n */\n highlightedSeries?: Series | null;\n\n /**\n * An array of series objects that determines which of the data series are currently displayed, i.e. not filtered out.\n * - If you do not set this property, series are shown and hidden automatically when using the default filter component (uncontrolled behavior).\n * - If you explicitly set this property, you must set an `onFilterChange` listener to update this property when the visible series should change, or when one of your custom filters changes the number of visible series (controlled behavior).\n */\n visibleSeries?: ReadonlyArray<Series>;\n\n /**\n * Specifies the current status of loading data.\n * * `loading`: data fetching is in progress.\n * * `finished`: data has loaded successfully.\n * * `error`: an error occurred during fetch. You should provide user an option to recover.\n **/\n statusType?: 'loading' | 'finished' | 'error';\n\n /**\n * Content that is displayed when the data passed to the component is empty.\n */\n empty?: React.ReactNode;\n\n /**\n * Content that is displayed when there is no data to display due to the built-in filtering.\n */\n noMatch?: React.ReactNode;\n\n /**\n * Text that is displayed when the chart is loading, i.e. when `statusType` is set to `\"loading\"`.\n * @i18n\n */\n loadingText?: string;\n\n /**\n * Text that is displayed when the chart is in error state, i.e. when `statusType` is set to `\"error\"`.\n * @i18n\n */\n errorText?: string;\n\n /**\n * Text for the recovery button that is displayed next to the error text.\n * @i18n\n **/\n recoveryText?: string;\n\n /**\n * Called when the user clicks the recovery button that appears when there is an error state.\n * Use this to enable the user to retry a failed request or provide another option for the user\n * to recover from the error.\n */\n onRecoveryClick?: NonCancelableEventHandler;\n\n /**\n * Called when the values of the internal filter component changed.\n * This will **not** be called for any custom filter components you have defined in `additionalFilters`.\n */\n onFilterChange?: NonCancelableEventHandler<CartesianChartProps.FilterChangeDetail<Series>>;\n\n /**\n * Called when the highlighted series has changed because of user interaction.\n */\n onHighlightChange?: NonCancelableEventHandler<CartesianChartProps.HighlightChangeDetail<Series>>;\n}\n\nexport namespace CartesianChartProps {\n export interface FilterChangeDetail<Series> {\n visibleSeries: ReadonlyArray<Series>;\n }\n\n export interface HighlightChangeDetail<Series> {\n highlightedSeries: Series | null;\n }\n\n export interface TickFormatter<T> {\n (value: T): string;\n }\n\n export interface ValueFormatter<YType, XType = null> {\n (yValue: YType, xValue: XType): string;\n }\n\n export interface DetailPopoverFooter<T> {\n (xValue: T): React.ReactNode;\n }\n\n export interface I18nStrings<T> {\n /** Visible label of the default filter */\n filterLabel?: string;\n\n /** Placeholder text of the default filter */\n filterPlaceholder?: string;\n\n /** ARIA label for the default filter which is appended to any option that is selected */\n filterSelectedAriaLabel?: string;\n\n /** ARIA label that is associated with the legend in case there is no visible `legendTitle` defined */\n legendAriaLabel?: string;\n\n /** ARIA label for details popover dismiss button */\n detailPopoverDismissAriaLabel?: string;\n\n /** Name of the ARIA role description of the chart, e.g. \"line chart\" */\n chartAriaRoleDescription?: string;\n\n /** Name of the ARIA role description of the x axis, e.g. \"x axis\" */\n xAxisAriaRoleDescription?: string;\n\n /** Name of the ARIA role description of the y axis, e.g. \"y axis\" */\n yAxisAriaRoleDescription?: string;\n\n /** @deprecated Use `xTickFormatter` on the component instead. */\n xTickFormatter?: TickFormatter<T>;\n\n /** @deprecated Use `yTickFormatter` on the component instead. */\n yTickFormatter?: TickFormatter<number>;\n }\n}\n\nexport type ChartDataTypes = number | string | Date;\n\nexport type ScaleType = 'linear' | 'log' | 'time' | 'categorical';\nexport type XScaleType = 'linear' | 'log' | 'time' | 'categorical';\nexport type YScaleType = 'linear' | 'log';\nexport type ScaleRange = [number, number];\n\nexport type ChartDomain<T extends ChartDataTypes> = T extends unknown ? ReadonlyArray<T> : ReadonlyArray<T>;\nexport type XDomain<T extends ChartDataTypes> = ChartDomain<T>;\nexport type YDomain = ChartDomain<number>;\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { DropdownProps } from './interfaces';
|
|
3
|
-
declare const Dropdown: ({ children, trigger, open, onDropdownClose, onMouseDown, header, footer, dropdownId, stretchTriggerHeight, stretchWidth, stretchHeight, stretchToTriggerWidth, expandToViewport, preferCenter, interior, minWidth, scrollable, loopFocus, onFocus, onBlur, contentKey, }: DropdownProps) => JSX.Element;
|
|
3
|
+
declare const Dropdown: ({ children, trigger, open, onDropdownClose, onMouseDown, header, footer, dropdownId, stretchTriggerHeight, stretchWidth, stretchHeight, stretchToTriggerWidth, expandToViewport, preferCenter, interior, minWidth, scrollable, loopFocus, onFocus, onBlur, contentKey, dropdownContentId, dropdownContentRole, }: DropdownProps) => JSX.Element;
|
|
4
4
|
export default Dropdown;
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/components/dropdown/index.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/components/dropdown/index.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AA8G7C,QAAA,MAAM,QAAQ,qTAwBX,aAAa,gBAsRf,CAAC;AAMF,eAAe,QAAQ,CAAC"}
|
|
@@ -28,7 +28,7 @@ const DropdownContainer = ({ children, renderWithPortal = false, id, referrerId,
|
|
|
28
28
|
return React.createElement(React.Fragment, null, children);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
-
const TransitionContent = ({ state, transitionRef, dropdownClasses, stretchWidth, interior, isRefresh, dropdownRef, verticalContainerRef, expandToViewport, header, children, footer, position, open, onMouseDown, }) => {
|
|
31
|
+
const TransitionContent = ({ state, transitionRef, dropdownClasses, stretchWidth, interior, isRefresh, dropdownRef, verticalContainerRef, expandToViewport, header, children, footer, position, open, onMouseDown, id, role, }) => {
|
|
32
32
|
const contentRef = useMergeRefs(dropdownRef, transitionRef);
|
|
33
33
|
return (React.createElement("div", { className: clsx(styles.dropdown, dropdownClasses, {
|
|
34
34
|
[styles.open]: open,
|
|
@@ -38,7 +38,7 @@ const TransitionContent = ({ state, transitionRef, dropdownClasses, stretchWidth
|
|
|
38
38
|
[styles['is-empty']]: !header && !children,
|
|
39
39
|
[styles.refresh]: isRefresh,
|
|
40
40
|
[styles['use-portal']]: expandToViewport && !interior,
|
|
41
|
-
}), ref: contentRef, "data-open": open, "data-animating": state !== 'exited', "aria-hidden": !open, onMouseDown: onMouseDown },
|
|
41
|
+
}), ref: contentRef, id: id, role: role, "data-open": open, "data-animating": state !== 'exited', "aria-hidden": !open, onMouseDown: onMouseDown },
|
|
42
42
|
React.createElement("div", { className: clsx(styles['dropdown-content-wrapper'], isRefresh && styles.refresh) },
|
|
43
43
|
React.createElement("div", { className: styles['ie11-wrapper'] },
|
|
44
44
|
React.createElement("div", { ref: verticalContainerRef, className: styles['dropdown-content'] },
|
|
@@ -47,7 +47,7 @@ const TransitionContent = ({ state, transitionRef, dropdownClasses, stretchWidth
|
|
|
47
47
|
children,
|
|
48
48
|
footer))))));
|
|
49
49
|
};
|
|
50
|
-
const Dropdown = ({ children, trigger, open, onDropdownClose, onMouseDown, header, footer, dropdownId, stretchTriggerHeight = false, stretchWidth = true, stretchHeight = false, stretchToTriggerWidth = true, expandToViewport = false, preferCenter = false, interior = false, minWidth, scrollable = true, loopFocus = expandToViewport, onFocus, onBlur, contentKey, }) => {
|
|
50
|
+
const Dropdown = ({ children, trigger, open, onDropdownClose, onMouseDown, header, footer, dropdownId, stretchTriggerHeight = false, stretchWidth = true, stretchHeight = false, stretchToTriggerWidth = true, expandToViewport = false, preferCenter = false, interior = false, minWidth, scrollable = true, loopFocus = expandToViewport, onFocus, onBlur, contentKey, dropdownContentId, dropdownContentRole, }) => {
|
|
51
51
|
const wrapperRef = useRef(null);
|
|
52
52
|
const triggerRef = useRef(null);
|
|
53
53
|
const dropdownRef = useRef(null);
|
|
@@ -235,7 +235,7 @@ const Dropdown = ({ children, trigger, open, onDropdownClose, onMouseDown, heade
|
|
|
235
235
|
React.createElement(DropdownContainer, { renderWithPortal: expandToViewport && !interior, id: dropdownId, referrerId: referrerId, open: open },
|
|
236
236
|
React.createElement(Transition, { in: open !== null && open !== void 0 ? open : false, exit: false }, (state, ref) => (React.createElement("div", { ref: dropdownContainerRef },
|
|
237
237
|
React.createElement(TabTrap, { focusNextCallback: () => { var _a; return triggerRef.current && ((_a = getLastFocusable(triggerRef.current)) === null || _a === void 0 ? void 0 : _a.focus()); }, disabled: !open || !loopFocus }),
|
|
238
|
-
React.createElement(TransitionContent, { state: state, transitionRef: ref, dropdownClasses: dropdownClasses, open: open, stretchWidth: stretchWidth, interior: interior, header: header, expandToViewport: expandToViewport, footer: footer, onMouseDown: onMouseDown, isRefresh: isRefresh, dropdownRef: dropdownRef, verticalContainerRef: verticalContainerRef, position: position }, children),
|
|
238
|
+
React.createElement(TransitionContent, { state: state, transitionRef: ref, dropdownClasses: dropdownClasses, open: open, stretchWidth: stretchWidth, interior: interior, header: header, expandToViewport: expandToViewport, footer: footer, onMouseDown: onMouseDown, isRefresh: isRefresh, dropdownRef: dropdownRef, verticalContainerRef: verticalContainerRef, position: position, id: dropdownContentId, role: dropdownContentRole }, children),
|
|
239
239
|
React.createElement(TabTrap, { focusNextCallback: () => { var _a; return triggerRef.current && ((_a = getFirstFocusable(triggerRef.current)) === null || _a === void 0 ? void 0 : _a.focus()); }, disabled: !open || !loopFocus })))))));
|
|
240
240
|
};
|
|
241
241
|
const isInteriorPosition = (position) => position.bottom !== undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/dropdown/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EAA8C,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACvG,OAAO,EAAE,UAAU,EAAoB,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE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,IAAI,EACV,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,oBAAoB,EAAE,oBAAoB,EAC1C,QAAQ,EAAE,QAAQ,IAEjB,QAAQ,CACS;gBAEpB,oBAAC,OAAO,IACN,iBAAiB,EAAE,GAAG,EAAE,WAAC,OAAA,UAAU,CAAC,OAAO,KAAI,MAAA,iBAAiB,CAAC,UAAU,CAAC,OAAO,CAAC,0CAAE,KAAK,EAAE,CAAA,CAAA,EAAA,EAC7F,QAAQ,EAAE,CAAC,IAAI,IAAI,CAAC,SAAS,GAC7B,CACE,CACP,CACU,CACK,CAChB,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CACzB,QAAqD,EACf,EAAE,CAAE,QAAqC,CAAC,MAAM,KAAK,SAAS,CAAC;AAEvG,eAAe,QAAQ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport styles from './styles.css.js';\nimport clsx from 'clsx';\nimport { useMergeRefs } from '../../hooks/use-merge-refs';\nimport React, { useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport { fireNonCancelableEvent } from '../../events';\nimport { DropdownProps } from './interfaces';\nimport { DropdownPosition, InteriorDropdownPosition, calculatePosition } from './dropdown-fit-handler';\nimport { Transition, TransitionStatus } from '../transition';\nimport { useVisualRefresh } from '../../hooks/use-visual-mode';\nimport { usePortalModeClasses } from '../../hooks/use-portal-mode-classes';\nimport { DropdownContextProvider, DropdownContextProviderProps } from './context';\nimport { useMobile } from '../../hooks/use-mobile';\nimport TabTrap from '../tab-trap/index.js';\nimport { getFirstFocusable, getLastFocusable } from '../focus-lock/utils.js';\nimport { useUniqueId } from '../../hooks/use-unique-id/index.js';\n\ninterface DropdownContainerProps {\n children?: React.ReactNode;\n renderWithPortal?: boolean;\n id?: string;\n referrerId?: string;\n open?: boolean;\n}\n\nconst DropdownContainer = ({ children, renderWithPortal = false, id, referrerId, open }: DropdownContainerProps) => {\n if (renderWithPortal) {\n if (open) {\n return createPortal(\n <div id={id} data-awsui-referrer-id={referrerId}>\n {children}\n </div>,\n document.body\n );\n } else {\n return null;\n }\n } else {\n return <>{children}</>;\n }\n};\n\ninterface TransitionContentProps {\n state: TransitionStatus;\n transitionRef: React.MutableRefObject<any>;\n dropdownClasses: string;\n stretchWidth: boolean;\n interior: boolean;\n isRefresh: boolean;\n dropdownRef: React.RefObject<HTMLDivElement>;\n verticalContainerRef: React.RefObject<HTMLDivElement>;\n expandToViewport?: boolean;\n header?: React.ReactNode;\n children?: React.ReactNode;\n footer?: React.ReactNode;\n position?: DropdownContextProviderProps['position'];\n open?: boolean;\n onMouseDown?: React.MouseEventHandler<Element>;\n}\n\nconst TransitionContent = ({\n state,\n transitionRef,\n dropdownClasses,\n stretchWidth,\n interior,\n isRefresh,\n dropdownRef,\n verticalContainerRef,\n expandToViewport,\n header,\n children,\n footer,\n position,\n open,\n onMouseDown,\n}: TransitionContentProps) => {\n const contentRef = useMergeRefs(dropdownRef, transitionRef);\n return (\n <div\n className={clsx(styles.dropdown, dropdownClasses, {\n [styles.open]: open,\n [styles['with-limited-width']]: !stretchWidth,\n [styles['hide-upper-border']]: stretchWidth,\n [styles.interior]: interior,\n [styles['is-empty']]: !header && !children,\n [styles.refresh]: isRefresh,\n [styles['use-portal']]: expandToViewport && !interior,\n })}\n ref={contentRef}\n data-open={open}\n data-animating={state !== 'exited'}\n aria-hidden={!open}\n onMouseDown={onMouseDown}\n >\n <div className={clsx(styles['dropdown-content-wrapper'], isRefresh && styles.refresh)}>\n <div className={styles['ie11-wrapper']}>\n <div ref={verticalContainerRef} className={styles['dropdown-content']}>\n <DropdownContextProvider position={position}>\n {header}\n {children}\n {footer}\n </DropdownContextProvider>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nconst Dropdown = ({\n children,\n trigger,\n open,\n onDropdownClose,\n onMouseDown,\n header,\n footer,\n dropdownId,\n stretchTriggerHeight = false,\n stretchWidth = true,\n stretchHeight = false,\n stretchToTriggerWidth = true,\n expandToViewport = false,\n preferCenter = false,\n interior = false,\n minWidth,\n scrollable = true,\n loopFocus = expandToViewport,\n onFocus,\n onBlur,\n contentKey,\n}: DropdownProps) => {\n const wrapperRef = useRef<HTMLDivElement | null>(null);\n const triggerRef = useRef<HTMLDivElement | null>(null);\n const dropdownRef = useRef<HTMLDivElement | null>(null);\n const dropdownContainerRef = useRef<HTMLDivElement | null>(null);\n // This container is only needed to apply max-height to. We can't move max-height to it's parent\n // because of an IE11 issue with flexbox. https://github.com/philipwalton/flexbugs/issues/216\n const verticalContainerRef = useRef<HTMLDivElement>(null);\n // To keep track of the initial position (drop up/down) which is kept the same during fixed repositioning\n const fixedPosition = useRef<DropdownPosition | null>(null);\n\n const isRefresh = useVisualRefresh();\n\n const dropdownClasses = usePortalModeClasses(triggerRef);\n const [position, setPosition] = useState<DropdownContextProviderProps['position']>('bottom-right');\n\n const isMobile = useMobile();\n\n const setDropdownPosition = (\n position: DropdownPosition | InteriorDropdownPosition,\n triggerBox: DOMRect,\n target: HTMLDivElement,\n verticalContainer: HTMLDivElement\n ) => {\n const entireWidth = !interior && stretchWidth;\n if (!stretchWidth) {\n // 1px offset for dropdowns where the dropdown itself needs a border, rather than on the items\n verticalContainer.style.maxHeight = `${parseInt(position.height) + 1}px`;\n } else {\n verticalContainer.style.maxHeight = position.height;\n }\n\n if (entireWidth && !expandToViewport) {\n if (stretchToTriggerWidth) {\n target.classList.add(styles['occupy-entire-width']);\n }\n } else {\n target.style.width = position.width;\n }\n // Using styles for main dropdown to adjust its position as preferred alternative\n if (position.dropUp && !interior) {\n target.classList.add(styles['dropdown-drop-up']);\n if (!expandToViewport) {\n target.style.bottom = '100%';\n }\n } else {\n target.classList.remove(styles['dropdown-drop-up']);\n }\n target.classList.add(position.dropLeft ? styles['dropdown-drop-left'] : styles['dropdown-drop-right']);\n\n if (position.left && position.left !== 'auto') {\n target.style.left = position.left;\n }\n\n // Position normal overflow dropdowns with fixed positioning relative to viewport\n if (expandToViewport && !interior) {\n target.style.position = 'fixed';\n if (position.dropUp) {\n target.style.bottom = `calc(100% - ${triggerBox.top}px)`;\n } else {\n target.style.top = `${triggerBox.bottom}px`;\n }\n if (position.dropLeft) {\n target.style.left = `calc(${triggerBox.right}px - ${position.width})`;\n } else {\n target.style.left = `${triggerBox.left}px`;\n }\n // Keep track of the initial dropdown position and direction.\n // Dropdown direction doesn't need to change as the user scrolls, just needs to stay attached to the trigger.\n fixedPosition.current = position;\n return;\n }\n\n // For an interior dropdown (the fly out) we need exact values for positioning\n // and classes are not enough\n // usage of relative position is impossible due to overwrite of overflow-x\n if (interior && isInteriorPosition(position)) {\n if (position.dropUp) {\n target.style.bottom = position.bottom;\n } else {\n target.style.top = position.top;\n }\n target.style.left = position.left;\n }\n\n if (position.dropUp && position.dropLeft) {\n setPosition('top-left');\n } else if (position.dropUp) {\n setPosition('top-right');\n } else if (position.dropLeft) {\n setPosition('bottom-left');\n } else {\n setPosition('bottom-right');\n }\n };\n\n const isOutsideDropdown = (element: Element) =>\n (!wrapperRef.current || !wrapperRef.current.contains(element)) &&\n (!dropdownContainerRef.current || !dropdownContainerRef.current.contains(element));\n\n const focusHandler = (event: React.FocusEvent) => {\n if (!event.relatedTarget || isOutsideDropdown(event.relatedTarget)) {\n fireNonCancelableEvent(onFocus, event);\n }\n };\n\n const blurHandler = (event: React.FocusEvent) => {\n if (!event.relatedTarget || isOutsideDropdown(event.relatedTarget)) {\n fireNonCancelableEvent(onBlur, event);\n }\n };\n\n useLayoutEffect(() => {\n const onDropdownOpen = () => {\n if (open && dropdownRef.current && triggerRef.current && verticalContainerRef.current) {\n // calculate scroll width only for dropdowns that has a scrollbar and ignore it for date picker components\n if (scrollable) {\n dropdownRef.current.classList.add(styles.nowrap);\n }\n setDropdownPosition(\n ...calculatePosition(\n dropdownRef.current,\n triggerRef.current,\n verticalContainerRef.current,\n interior,\n expandToViewport,\n preferCenter,\n stretchWidth,\n stretchHeight,\n isMobile,\n minWidth\n ),\n dropdownRef.current,\n verticalContainerRef.current\n );\n if (scrollable) {\n dropdownRef.current.classList.remove(styles.nowrap);\n }\n }\n };\n onDropdownOpen();\n\n if (open) {\n // window may scroll when dropdown opens, for example when soft keyboard shows up\n window.addEventListener('scroll', onDropdownOpen);\n // only listen to window scroll within very short time after the dropdown opens\n // do not want to interfere dropdown position on scroll afterwards\n const timeoutId = setTimeout(() => {\n window.removeEventListener('scroll', onDropdownOpen);\n }, 500);\n\n return () => {\n clearTimeout(timeoutId);\n window.removeEventListener('scroll', onDropdownOpen);\n };\n }\n // See AWSUI-13040\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open, dropdownRef, triggerRef, verticalContainerRef, interior, stretchWidth, isMobile, contentKey]);\n\n // subscribe to outside click\n useEffect(() => {\n if (!open) {\n return;\n }\n const clickListener = (e: MouseEvent) => {\n if (!dropdownRef.current?.contains(e.target as Node) && !triggerRef.current?.contains(e.target as Node)) {\n fireNonCancelableEvent(onDropdownClose);\n }\n };\n window.addEventListener('click', clickListener, true);\n\n return () => {\n window.removeEventListener('click', clickListener, true);\n };\n }, [open, onDropdownClose]);\n\n // sync dropdown position on scroll and resize\n useLayoutEffect(() => {\n if (!expandToViewport || !open) {\n return;\n }\n const updateDropdownPosition = () => {\n if (triggerRef.current && dropdownRef.current && verticalContainerRef.current) {\n const triggerRect = triggerRef.current.getBoundingClientRect();\n const target = dropdownRef.current;\n if (fixedPosition.current) {\n if (fixedPosition.current.dropUp) {\n dropdownRef.current.style.bottom = `calc(100% - ${triggerRect.top}px)`;\n } else {\n target.style.top = `${triggerRect.bottom}px`;\n }\n if (fixedPosition.current.dropLeft) {\n target.style.left = `calc(${triggerRect.right}px - ${fixedPosition.current.width})`;\n } else {\n target.style.left = `${triggerRect.left}px`;\n }\n }\n }\n };\n\n updateDropdownPosition();\n\n window.addEventListener('scroll', updateDropdownPosition, true);\n window.addEventListener('resize', updateDropdownPosition, true);\n return () => {\n window.removeEventListener('scroll', updateDropdownPosition, true);\n window.removeEventListener('resize', updateDropdownPosition, true);\n };\n }, [open, expandToViewport]);\n\n const referrerId = useUniqueId();\n\n return (\n <div\n className={clsx(\n styles.root,\n interior && styles.interior,\n stretchTriggerHeight && styles['stretch-trigger-height']\n )}\n ref={wrapperRef}\n onFocus={focusHandler}\n onBlur={blurHandler}\n >\n <div id={referrerId} className={clsx(stretchTriggerHeight && styles['stretch-trigger-height'])} ref={triggerRef}>\n {trigger}\n </div>\n\n <TabTrap\n focusNextCallback={() => dropdownRef.current && getFirstFocusable(dropdownRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n\n <DropdownContainer\n renderWithPortal={expandToViewport && !interior}\n id={dropdownId}\n referrerId={referrerId}\n open={open}\n >\n <Transition in={open ?? false} exit={false}>\n {(state, ref) => (\n <div ref={dropdownContainerRef}>\n <TabTrap\n focusNextCallback={() => triggerRef.current && getLastFocusable(triggerRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n\n <TransitionContent\n state={state}\n transitionRef={ref}\n dropdownClasses={dropdownClasses}\n open={open}\n stretchWidth={stretchWidth}\n interior={interior}\n header={header}\n expandToViewport={expandToViewport}\n footer={footer}\n onMouseDown={onMouseDown}\n isRefresh={isRefresh}\n dropdownRef={dropdownRef}\n verticalContainerRef={verticalContainerRef}\n position={position}\n >\n {children}\n </TransitionContent>\n\n <TabTrap\n focusNextCallback={() => triggerRef.current && getFirstFocusable(triggerRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n </div>\n )}\n </Transition>\n </DropdownContainer>\n </div>\n );\n};\n\nconst isInteriorPosition = (\n position: DropdownPosition | InteriorDropdownPosition\n): position is InteriorDropdownPosition => (position as InteriorDropdownPosition).bottom !== undefined;\n\nexport default Dropdown;\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/dropdown/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EAA8C,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACvG,OAAO,EAAE,UAAU,EAAoB,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAgC,MAAM,WAAW,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAUjE,MAAM,iBAAiB,GAAG,CAAC,EAAE,QAAQ,EAAE,gBAAgB,GAAG,KAAK,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAA0B,EAAE,EAAE;IACjH,IAAI,gBAAgB,EAAE;QACpB,IAAI,IAAI,EAAE;YACR,OAAO,YAAY,CACjB,6BAAK,EAAE,EAAE,EAAE,4BAA0B,UAAU,IAC5C,QAAQ,CACL,EACN,QAAQ,CAAC,IAAI,C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IAAI,IAAI,CAAC,SAAS,GAC7B,CACE,CACP,CACU,CACK,CAChB,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CACzB,QAAqD,EACf,EAAE,CAAE,QAAqC,CAAC,MAAM,KAAK,SAAS,CAAC;AAEvG,eAAe,QAAQ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport styles from './styles.css.js';\nimport clsx from 'clsx';\nimport { useMergeRefs } from '../../hooks/use-merge-refs';\nimport React, { useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport { fireNonCancelableEvent } from '../../events';\nimport { DropdownProps } from './interfaces';\nimport { DropdownPosition, InteriorDropdownPosition, calculatePosition } from './dropdown-fit-handler';\nimport { Transition, TransitionStatus } from '../transition';\nimport { useVisualRefresh } from '../../hooks/use-visual-mode';\nimport { usePortalModeClasses } from '../../hooks/use-portal-mode-classes';\nimport { DropdownContextProvider, DropdownContextProviderProps } from './context';\nimport { useMobile } from '../../hooks/use-mobile';\nimport TabTrap from '../tab-trap/index.js';\nimport { getFirstFocusable, getLastFocusable } from '../focus-lock/utils.js';\nimport { useUniqueId } from '../../hooks/use-unique-id/index.js';\n\ninterface DropdownContainerProps {\n children?: React.ReactNode;\n renderWithPortal?: boolean;\n id?: string;\n referrerId?: string;\n open?: boolean;\n}\n\nconst DropdownContainer = ({ children, renderWithPortal = false, id, referrerId, open }: DropdownContainerProps) => {\n if (renderWithPortal) {\n if (open) {\n return createPortal(\n <div id={id} data-awsui-referrer-id={referrerId}>\n {children}\n </div>,\n document.body\n );\n } else {\n return null;\n }\n } else {\n return <>{children}</>;\n }\n};\n\ninterface TransitionContentProps {\n state: TransitionStatus;\n transitionRef: React.MutableRefObject<any>;\n dropdownClasses: string;\n stretchWidth: boolean;\n interior: boolean;\n isRefresh: boolean;\n dropdownRef: React.RefObject<HTMLDivElement>;\n verticalContainerRef: React.RefObject<HTMLDivElement>;\n expandToViewport?: boolean;\n header?: React.ReactNode;\n children?: React.ReactNode;\n footer?: React.ReactNode;\n position?: DropdownContextProviderProps['position'];\n open?: boolean;\n onMouseDown?: React.MouseEventHandler<Element>;\n id?: string;\n role?: string;\n}\n\nconst TransitionContent = ({\n state,\n transitionRef,\n dropdownClasses,\n stretchWidth,\n interior,\n isRefresh,\n dropdownRef,\n verticalContainerRef,\n expandToViewport,\n header,\n children,\n footer,\n position,\n open,\n onMouseDown,\n id,\n role,\n}: TransitionContentProps) => {\n const contentRef = useMergeRefs(dropdownRef, transitionRef);\n return (\n <div\n className={clsx(styles.dropdown, dropdownClasses, {\n [styles.open]: open,\n [styles['with-limited-width']]: !stretchWidth,\n [styles['hide-upper-border']]: stretchWidth,\n [styles.interior]: interior,\n [styles['is-empty']]: !header && !children,\n [styles.refresh]: isRefresh,\n [styles['use-portal']]: expandToViewport && !interior,\n })}\n ref={contentRef}\n id={id}\n role={role}\n data-open={open}\n data-animating={state !== 'exited'}\n aria-hidden={!open}\n onMouseDown={onMouseDown}\n >\n <div className={clsx(styles['dropdown-content-wrapper'], isRefresh && styles.refresh)}>\n <div className={styles['ie11-wrapper']}>\n <div ref={verticalContainerRef} className={styles['dropdown-content']}>\n <DropdownContextProvider position={position}>\n {header}\n {children}\n {footer}\n </DropdownContextProvider>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nconst Dropdown = ({\n children,\n trigger,\n open,\n onDropdownClose,\n onMouseDown,\n header,\n footer,\n dropdownId,\n stretchTriggerHeight = false,\n stretchWidth = true,\n stretchHeight = false,\n stretchToTriggerWidth = true,\n expandToViewport = false,\n preferCenter = false,\n interior = false,\n minWidth,\n scrollable = true,\n loopFocus = expandToViewport,\n onFocus,\n onBlur,\n contentKey,\n dropdownContentId,\n dropdownContentRole,\n}: DropdownProps) => {\n const wrapperRef = useRef<HTMLDivElement | null>(null);\n const triggerRef = useRef<HTMLDivElement | null>(null);\n const dropdownRef = useRef<HTMLDivElement | null>(null);\n const dropdownContainerRef = useRef<HTMLDivElement | null>(null);\n // This container is only needed to apply max-height to. We can't move max-height to it's parent\n // because of an IE11 issue with flexbox. https://github.com/philipwalton/flexbugs/issues/216\n const verticalContainerRef = useRef<HTMLDivElement>(null);\n // To keep track of the initial position (drop up/down) which is kept the same during fixed repositioning\n const fixedPosition = useRef<DropdownPosition | null>(null);\n\n const isRefresh = useVisualRefresh();\n\n const dropdownClasses = usePortalModeClasses(triggerRef);\n const [position, setPosition] = useState<DropdownContextProviderProps['position']>('bottom-right');\n\n const isMobile = useMobile();\n\n const setDropdownPosition = (\n position: DropdownPosition | InteriorDropdownPosition,\n triggerBox: DOMRect,\n target: HTMLDivElement,\n verticalContainer: HTMLDivElement\n ) => {\n const entireWidth = !interior && stretchWidth;\n if (!stretchWidth) {\n // 1px offset for dropdowns where the dropdown itself needs a border, rather than on the items\n verticalContainer.style.maxHeight = `${parseInt(position.height) + 1}px`;\n } else {\n verticalContainer.style.maxHeight = position.height;\n }\n\n if (entireWidth && !expandToViewport) {\n if (stretchToTriggerWidth) {\n target.classList.add(styles['occupy-entire-width']);\n }\n } else {\n target.style.width = position.width;\n }\n // Using styles for main dropdown to adjust its position as preferred alternative\n if (position.dropUp && !interior) {\n target.classList.add(styles['dropdown-drop-up']);\n if (!expandToViewport) {\n target.style.bottom = '100%';\n }\n } else {\n target.classList.remove(styles['dropdown-drop-up']);\n }\n target.classList.add(position.dropLeft ? styles['dropdown-drop-left'] : styles['dropdown-drop-right']);\n\n if (position.left && position.left !== 'auto') {\n target.style.left = position.left;\n }\n\n // Position normal overflow dropdowns with fixed positioning relative to viewport\n if (expandToViewport && !interior) {\n target.style.position = 'fixed';\n if (position.dropUp) {\n target.style.bottom = `calc(100% - ${triggerBox.top}px)`;\n } else {\n target.style.top = `${triggerBox.bottom}px`;\n }\n if (position.dropLeft) {\n target.style.left = `calc(${triggerBox.right}px - ${position.width})`;\n } else {\n target.style.left = `${triggerBox.left}px`;\n }\n // Keep track of the initial dropdown position and direction.\n // Dropdown direction doesn't need to change as the user scrolls, just needs to stay attached to the trigger.\n fixedPosition.current = position;\n return;\n }\n\n // For an interior dropdown (the fly out) we need exact values for positioning\n // and classes are not enough\n // usage of relative position is impossible due to overwrite of overflow-x\n if (interior && isInteriorPosition(position)) {\n if (position.dropUp) {\n target.style.bottom = position.bottom;\n } else {\n target.style.top = position.top;\n }\n target.style.left = position.left;\n }\n\n if (position.dropUp && position.dropLeft) {\n setPosition('top-left');\n } else if (position.dropUp) {\n setPosition('top-right');\n } else if (position.dropLeft) {\n setPosition('bottom-left');\n } else {\n setPosition('bottom-right');\n }\n };\n\n const isOutsideDropdown = (element: Element) =>\n (!wrapperRef.current || !wrapperRef.current.contains(element)) &&\n (!dropdownContainerRef.current || !dropdownContainerRef.current.contains(element));\n\n const focusHandler = (event: React.FocusEvent) => {\n if (!event.relatedTarget || isOutsideDropdown(event.relatedTarget)) {\n fireNonCancelableEvent(onFocus, event);\n }\n };\n\n const blurHandler = (event: React.FocusEvent) => {\n if (!event.relatedTarget || isOutsideDropdown(event.relatedTarget)) {\n fireNonCancelableEvent(onBlur, event);\n }\n };\n\n useLayoutEffect(() => {\n const onDropdownOpen = () => {\n if (open && dropdownRef.current && triggerRef.current && verticalContainerRef.current) {\n // calculate scroll width only for dropdowns that has a scrollbar and ignore it for date picker components\n if (scrollable) {\n dropdownRef.current.classList.add(styles.nowrap);\n }\n setDropdownPosition(\n ...calculatePosition(\n dropdownRef.current,\n triggerRef.current,\n verticalContainerRef.current,\n interior,\n expandToViewport,\n preferCenter,\n stretchWidth,\n stretchHeight,\n isMobile,\n minWidth\n ),\n dropdownRef.current,\n verticalContainerRef.current\n );\n if (scrollable) {\n dropdownRef.current.classList.remove(styles.nowrap);\n }\n }\n };\n onDropdownOpen();\n\n if (open) {\n // window may scroll when dropdown opens, for example when soft keyboard shows up\n window.addEventListener('scroll', onDropdownOpen);\n // only listen to window scroll within very short time after the dropdown opens\n // do not want to interfere dropdown position on scroll afterwards\n const timeoutId = setTimeout(() => {\n window.removeEventListener('scroll', onDropdownOpen);\n }, 500);\n\n return () => {\n clearTimeout(timeoutId);\n window.removeEventListener('scroll', onDropdownOpen);\n };\n }\n // See AWSUI-13040\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open, dropdownRef, triggerRef, verticalContainerRef, interior, stretchWidth, isMobile, contentKey]);\n\n // subscribe to outside click\n useEffect(() => {\n if (!open) {\n return;\n }\n const clickListener = (e: MouseEvent) => {\n if (!dropdownRef.current?.contains(e.target as Node) && !triggerRef.current?.contains(e.target as Node)) {\n fireNonCancelableEvent(onDropdownClose);\n }\n };\n window.addEventListener('click', clickListener, true);\n\n return () => {\n window.removeEventListener('click', clickListener, true);\n };\n }, [open, onDropdownClose]);\n\n // sync dropdown position on scroll and resize\n useLayoutEffect(() => {\n if (!expandToViewport || !open) {\n return;\n }\n const updateDropdownPosition = () => {\n if (triggerRef.current && dropdownRef.current && verticalContainerRef.current) {\n const triggerRect = triggerRef.current.getBoundingClientRect();\n const target = dropdownRef.current;\n if (fixedPosition.current) {\n if (fixedPosition.current.dropUp) {\n dropdownRef.current.style.bottom = `calc(100% - ${triggerRect.top}px)`;\n } else {\n target.style.top = `${triggerRect.bottom}px`;\n }\n if (fixedPosition.current.dropLeft) {\n target.style.left = `calc(${triggerRect.right}px - ${fixedPosition.current.width})`;\n } else {\n target.style.left = `${triggerRect.left}px`;\n }\n }\n }\n };\n\n updateDropdownPosition();\n\n window.addEventListener('scroll', updateDropdownPosition, true);\n window.addEventListener('resize', updateDropdownPosition, true);\n return () => {\n window.removeEventListener('scroll', updateDropdownPosition, true);\n window.removeEventListener('resize', updateDropdownPosition, true);\n };\n }, [open, expandToViewport]);\n\n const referrerId = useUniqueId();\n\n return (\n <div\n className={clsx(\n styles.root,\n interior && styles.interior,\n stretchTriggerHeight && styles['stretch-trigger-height']\n )}\n ref={wrapperRef}\n onFocus={focusHandler}\n onBlur={blurHandler}\n >\n <div id={referrerId} className={clsx(stretchTriggerHeight && styles['stretch-trigger-height'])} ref={triggerRef}>\n {trigger}\n </div>\n\n <TabTrap\n focusNextCallback={() => dropdownRef.current && getFirstFocusable(dropdownRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n\n <DropdownContainer\n renderWithPortal={expandToViewport && !interior}\n id={dropdownId}\n referrerId={referrerId}\n open={open}\n >\n <Transition in={open ?? false} exit={false}>\n {(state, ref) => (\n <div ref={dropdownContainerRef}>\n <TabTrap\n focusNextCallback={() => triggerRef.current && getLastFocusable(triggerRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n\n <TransitionContent\n state={state}\n transitionRef={ref}\n dropdownClasses={dropdownClasses}\n open={open}\n stretchWidth={stretchWidth}\n interior={interior}\n header={header}\n expandToViewport={expandToViewport}\n footer={footer}\n onMouseDown={onMouseDown}\n isRefresh={isRefresh}\n dropdownRef={dropdownRef}\n verticalContainerRef={verticalContainerRef}\n position={position}\n id={dropdownContentId}\n role={dropdownContentRole}\n >\n {children}\n </TransitionContent>\n\n <TabTrap\n focusNextCallback={() => triggerRef.current && getFirstFocusable(triggerRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n </div>\n )}\n </Transition>\n </DropdownContainer>\n </div>\n );\n};\n\nconst isInteriorPosition = (\n position: DropdownPosition | InteriorDropdownPosition\n): position is InteriorDropdownPosition => (position as InteriorDropdownPosition).bottom !== undefined;\n\nexport default Dropdown;\n"]}
|
|
@@ -119,6 +119,14 @@ export interface DropdownProps extends ExpandToViewport {
|
|
|
119
119
|
* Called when focus leaves the trigger or dropdown content.
|
|
120
120
|
*/
|
|
121
121
|
onBlur?: NonCancelableEventHandler<Pick<React.FocusEvent, 'target' | 'relatedTarget'>>;
|
|
122
|
+
/**
|
|
123
|
+
* ID for the dropdown content wrapper
|
|
124
|
+
*/
|
|
125
|
+
dropdownContentId?: string;
|
|
126
|
+
/**
|
|
127
|
+
* HTML role for the dropdown content wrapper
|
|
128
|
+
*/
|
|
129
|
+
dropdownContentRole?: string;
|
|
122
130
|
}
|
|
123
131
|
export interface ExpandToViewport {
|
|
124
132
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["internal/components/dropdown/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;AAC9D,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC7D;;;;;;;;;;OAUG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;;;;;;;;;;QAaI;IACJ,WAAW,CAAC,EAAE,yBAAyB,CAAC,sBAAsB,CAAC,CAAC;CACjE;AAED,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IACrD;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,eAAe,CAAC,EAAE,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAClD;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IACtC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,YAAY,CAA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e,CAAC,CAAC,CAAC;IAEvF;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["internal/components/dropdown/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { NonCancelableEventHandler } from '../../events';\nimport React from 'react';\n\nexport type OptionsFilteringType = 'none' | 'auto' | 'manual';\nexport interface OptionsLoadItemsDetail {\n filteringText: string;\n firstPage: boolean;\n samePage: boolean;\n}\n\nexport interface BaseDropdownHostProps extends ExpandToViewport {\n /**\n * If you have more than 500 options, enable this flag to apply a performance optimization\n * that makes the filtering experience smoother. We don't recommend enabling the feature if you\n * have less than 500 options, because the improvements to performance are offset by a\n * visible scrolling lag.\n *\n * When you set this flag to `true`, it removes options that are not currently in view from the DOM.\n * If your test accesses such options, you need to first scroll the options container\n * to the correct offset, before performing any operations on them. Use the element returned\n * by the `findOptionsContainer` test utility for this.\n */\n virtualScroll?: boolean;\n\n /**\n * Use this event to implement the asynchronous behavior for the component.\n *\n * The event is called in the following situations:\n * * The user scrolls to the end of the list of options, if `statusType` is set to `pending`.\n * * The user clicks on the recovery button in the error state.\n * * The user types inside the input field.\n * * The user focuses the input field.\n *\n * The detail object contains the following properties:\n * * `filteringText` - The value that you need to use to fetch options.\n * * `firstPage` - Indicates that you should fetch the first page of options 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<OptionsLoadItemsDetail>;\n}\n\nexport interface DropdownProps extends ExpandToViewport {\n /**\n * Trigger element.\n */\n trigger: React.ReactNode;\n /**\n * \"Sticky\" header of the dropdown content\n */\n header?: React.ReactNode;\n /**\n * Footer slot fixed at the bottom of the dropdown\n */\n footer?: React.ReactNode;\n /**\n * Dropdown content elements.\n */\n children?: React.ReactNode;\n /**\n * Updating content key triggers dropdown position re-evaluation.\n */\n contentKey?: string;\n /**\n * Open state of the dropdown.\n */\n open?: boolean;\n /**\n * Called when a user clicks outside of the dropdown content, when it is open.\n */\n onDropdownClose?: NonCancelableEventHandler<null>;\n /**\n * Called when a mouse button is pressed inside the dropdown content.\n */\n onMouseDown?: React.MouseEventHandler;\n /**\n * Dropdown id\n */\n dropdownId?: string;\n /**\n * Stretches dropdown to occupy entire width.\n */\n stretchWidth?: boolean;\n /**\n * Stretches dropdown to occupy entire height.\n */\n stretchHeight?: boolean;\n\n /**\n * Stretches the trigger to the height of the dropdown container.\n */\n stretchTriggerHeight?: boolean;\n\n /**\n * Whether the dropdown content should be at least as wide as the trigger.\n *\n * @defaultValue true\n */\n stretchToTriggerWidth?: boolean;\n\n /**\n * Determines that the dropdown should preferably be aligned to the center of the trigger\n * instead of dropping left or right.\n */\n preferCenter?: boolean;\n\n /**\n * Indicates if this dropdown lies within a parent dropdown and positions itself relative to it (as a fly out).\n */\n interior?: boolean;\n /**\n * Sets the min width of the dropdown (in px)\n */\n minWidth?: number;\n /**\n * Whether the dropdown will have a scrollbar or not\n */\n scrollable?: boolean;\n\n /**\n * Whether the dropdown will have a focus loop including trigger, header, content and footer.\n */\n loopFocus?: boolean;\n\n /**\n * Called when focus enters the trigger or dropdown content.\n */\n onFocus?: NonCancelableEventHandler<Pick<React.FocusEvent, 'target' | 'relatedTarget'>>;\n\n /**\n * Called when focus leaves the trigger or dropdown content.\n */\n onBlur?: NonCancelableEventHandler<Pick<React.FocusEvent, 'target' | 'relatedTarget'>>;\n}\n\nexport interface ExpandToViewport {\n /**\n * Enabling this property will allow the dropdown to extend beyond its parent by using fixed positioning and\n * [React Portals](https://reactjs.org/docs/portals.html).\n * If you want the dropdown to ignore the `overflow` CSS property of its parents,\n * such as in a split view layout, enable this property.\n * However, use discretion. If you don't need to, we recommend you don't enable this property because fixed positioning results\n * in a slight, visible lag when scrolling complex pages.\n */\n expandToViewport?: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["internal/components/dropdown/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { NonCancelableEventHandler } from '../../events';\nimport React from 'react';\n\nexport type OptionsFilteringType = 'none' | 'auto' | 'manual';\nexport interface OptionsLoadItemsDetail {\n filteringText: string;\n firstPage: boolean;\n samePage: boolean;\n}\n\nexport interface BaseDropdownHostProps extends ExpandToViewport {\n /**\n * If you have more than 500 options, enable this flag to apply a performance optimization\n * that makes the filtering experience smoother. We don't recommend enabling the feature if you\n * have less than 500 options, because the improvements to performance are offset by a\n * visible scrolling lag.\n *\n * When you set this flag to `true`, it removes options that are not currently in view from the DOM.\n * If your test accesses such options, you need to first scroll the options container\n * to the correct offset, before performing any operations on them. Use the element returned\n * by the `findOptionsContainer` test utility for this.\n */\n virtualScroll?: boolean;\n\n /**\n * Use this event to implement the asynchronous behavior for the component.\n *\n * The event is called in the following situations:\n * * The user scrolls to the end of the list of options, if `statusType` is set to `pending`.\n * * The user clicks on the recovery button in the error state.\n * * The user types inside the input field.\n * * The user focuses the input field.\n *\n * The detail object contains the following properties:\n * * `filteringText` - The value that you need to use to fetch options.\n * * `firstPage` - Indicates that you should fetch the first page of options 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<OptionsLoadItemsDetail>;\n}\n\nexport interface DropdownProps extends ExpandToViewport {\n /**\n * Trigger element.\n */\n trigger: React.ReactNode;\n /**\n * \"Sticky\" header of the dropdown content\n */\n header?: React.ReactNode;\n /**\n * Footer slot fixed at the bottom of the dropdown\n */\n footer?: React.ReactNode;\n /**\n * Dropdown content elements.\n */\n children?: React.ReactNode;\n /**\n * Updating content key triggers dropdown position re-evaluation.\n */\n contentKey?: string;\n /**\n * Open state of the dropdown.\n */\n open?: boolean;\n /**\n * Called when a user clicks outside of the dropdown content, when it is open.\n */\n onDropdownClose?: NonCancelableEventHandler<null>;\n /**\n * Called when a mouse button is pressed inside the dropdown content.\n */\n onMouseDown?: React.MouseEventHandler;\n /**\n * Dropdown id\n */\n dropdownId?: string;\n /**\n * Stretches dropdown to occupy entire width.\n */\n stretchWidth?: boolean;\n /**\n * Stretches dropdown to occupy entire height.\n */\n stretchHeight?: boolean;\n\n /**\n * Stretches the trigger to the height of the dropdown container.\n */\n stretchTriggerHeight?: boolean;\n\n /**\n * Whether the dropdown content should be at least as wide as the trigger.\n *\n * @defaultValue true\n */\n stretchToTriggerWidth?: boolean;\n\n /**\n * Determines that the dropdown should preferably be aligned to the center of the trigger\n * instead of dropping left or right.\n */\n preferCenter?: boolean;\n\n /**\n * Indicates if this dropdown lies within a parent dropdown and positions itself relative to it (as a fly out).\n */\n interior?: boolean;\n /**\n * Sets the min width of the dropdown (in px)\n */\n minWidth?: number;\n /**\n * Whether the dropdown will have a scrollbar or not\n */\n scrollable?: boolean;\n\n /**\n * Whether the dropdown will have a focus loop including trigger, header, content and footer.\n */\n loopFocus?: boolean;\n\n /**\n * Called when focus enters the trigger or dropdown content.\n */\n onFocus?: NonCancelableEventHandler<Pick<React.FocusEvent, 'target' | 'relatedTarget'>>;\n\n /**\n * Called when focus leaves the trigger or dropdown content.\n */\n onBlur?: NonCancelableEventHandler<Pick<React.FocusEvent, 'target' | 'relatedTarget'>>;\n\n /**\n * ID for the dropdown content wrapper\n */\n dropdownContentId?: string;\n /**\n * HTML role for the dropdown content wrapper\n */\n dropdownContentRole?: string;\n}\n\nexport interface ExpandToViewport {\n /**\n * Enabling this property will allow the dropdown to extend beyond its parent by using fixed positioning and\n * [React Portals](https://reactjs.org/docs/portals.html).\n * If you want the dropdown to ignore the `overflow` CSS property of its parents,\n * such as in a split view layout, enable this property.\n * However, use discretion. If you don't need to, we recommend you don't enable this property because fixed positioning results\n * in a slight, visible lag when scrolling complex pages.\n */\n expandToViewport?: boolean;\n}\n"]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"button": "
|
|
5
|
-
"expanded": "
|
|
6
|
-
"offset-right-none": "awsui_offset-right-
|
|
7
|
-
"offset-right-l": "awsui_offset-right-
|
|
8
|
-
"offset-right-xxl": "awsui_offset-right-
|
|
9
|
-
"text": "
|
|
10
|
-
"icon": "
|
|
4
|
+
"button": "awsui_button_m5h9f_adrtz_93",
|
|
5
|
+
"expanded": "awsui_expanded_m5h9f_adrtz_127",
|
|
6
|
+
"offset-right-none": "awsui_offset-right-none_m5h9f_adrtz_138",
|
|
7
|
+
"offset-right-l": "awsui_offset-right-l_m5h9f_adrtz_141",
|
|
8
|
+
"offset-right-xxl": "awsui_offset-right-xxl_m5h9f_adrtz_144",
|
|
9
|
+
"text": "awsui_text_m5h9f_adrtz_166",
|
|
10
|
+
"icon": "awsui_icon_m5h9f_adrtz_170"
|
|
11
11
|
};
|
|
12
12
|
|
|
@@ -90,7 +90,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
90
90
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
91
91
|
SPDX-License-Identifier: Apache-2.0
|
|
92
92
|
*/
|
|
93
|
-
.
|
|
93
|
+
.awsui_button_m5h9f_adrtz_93:not(#\9) {
|
|
94
94
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
95
95
|
border-collapse: separate;
|
|
96
96
|
border-spacing: 0;
|
|
@@ -130,7 +130,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
130
130
|
min-width: 0;
|
|
131
131
|
-ms-word-break: break-all;
|
|
132
132
|
word-break: break-word;
|
|
133
|
-
font-weight: var(--font-button-weight-
|
|
133
|
+
font-weight: var(--font-button-weight-44nug7, 700);
|
|
134
134
|
-webkit-font-smoothing: var(--font-smoothing-webkit-fyh4as, antialiased);
|
|
135
135
|
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-pa2uqe, grayscale);
|
|
136
136
|
display: flex;
|
|
@@ -146,38 +146,38 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
146
146
|
background: transparent;
|
|
147
147
|
color: var(--color-text-interactive-default-2sml2m, #414d5c);
|
|
148
148
|
}
|
|
149
|
-
.
|
|
149
|
+
.awsui_button_m5h9f_adrtz_93:not(#\9):hover {
|
|
150
150
|
color: var(--color-text-interactive-hover-8bpozs, #000716);
|
|
151
151
|
text-decoration: none;
|
|
152
152
|
}
|
|
153
|
-
.
|
|
153
|
+
.awsui_button_m5h9f_adrtz_93:not(#\9):active, .awsui_button_m5h9f_adrtz_93.awsui_expanded_m5h9f_adrtz_127:not(#\9) {
|
|
154
154
|
background: transparent;
|
|
155
155
|
color: var(--color-text-interactive-active-atr0kj, #000716);
|
|
156
156
|
}
|
|
157
|
-
.
|
|
157
|
+
.awsui_button_m5h9f_adrtz_93.awsui_expanded_m5h9f_adrtz_127:not(#\9) {
|
|
158
158
|
color: var(--color-text-accent-qh8xwn, #0972d3);
|
|
159
159
|
}
|
|
160
|
-
.
|
|
160
|
+
.awsui_button_m5h9f_adrtz_93:not(#\9):focus {
|
|
161
161
|
outline: none;
|
|
162
162
|
text-decoration: none;
|
|
163
163
|
}
|
|
164
|
-
.
|
|
164
|
+
.awsui_button_m5h9f_adrtz_93.awsui_offset-right-none_m5h9f_adrtz_138:not(#\9) {
|
|
165
165
|
margin-right: 0;
|
|
166
166
|
}
|
|
167
|
-
.
|
|
167
|
+
.awsui_button_m5h9f_adrtz_93.awsui_offset-right-l_m5h9f_adrtz_141:not(#\9) {
|
|
168
168
|
margin-right: var(--space-s-hdd878, 12px);
|
|
169
169
|
}
|
|
170
|
-
.
|
|
170
|
+
.awsui_button_m5h9f_adrtz_93.awsui_offset-right-xxl_m5h9f_adrtz_144:not(#\9) {
|
|
171
171
|
margin-right: var(--space-xl-gsucfg, 24px);
|
|
172
172
|
}
|
|
173
|
-
body[data-awsui-focus-visible=true] .
|
|
173
|
+
body[data-awsui-focus-visible=true] .awsui_button_m5h9f_adrtz_93:not(#\9):focus {
|
|
174
174
|
position: relative;
|
|
175
175
|
}
|
|
176
|
-
body[data-awsui-focus-visible=true] .
|
|
176
|
+
body[data-awsui-focus-visible=true] .awsui_button_m5h9f_adrtz_93:not(#\9):focus {
|
|
177
177
|
outline: 2px dotted transparent;
|
|
178
178
|
outline-offset: calc(-1px - 1px);
|
|
179
179
|
}
|
|
180
|
-
body[data-awsui-focus-visible=true] .
|
|
180
|
+
body[data-awsui-focus-visible=true] .awsui_button_m5h9f_adrtz_93:not(#\9):focus::before {
|
|
181
181
|
content: " ";
|
|
182
182
|
display: block;
|
|
183
183
|
position: absolute;
|
|
@@ -189,10 +189,10 @@ body[data-awsui-focus-visible=true] .awsui_button_m5h9f_1x1qc_93:not(#\9):focus:
|
|
|
189
189
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-4t19h5, #0972d3);
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
.
|
|
192
|
+
.awsui_text_m5h9f_adrtz_166:not(#\9) {
|
|
193
193
|
margin-right: var(--space-xs-edba2s, 8px);
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
.
|
|
196
|
+
.awsui_icon_m5h9f_adrtz_170 + .awsui_text_m5h9f_adrtz_166:not(#\9) {
|
|
197
197
|
margin-left: var(--space-xs-edba2s, 8px);
|
|
198
198
|
}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"button": "
|
|
6
|
-
"expanded": "
|
|
7
|
-
"offset-right-none": "awsui_offset-right-
|
|
8
|
-
"offset-right-l": "awsui_offset-right-
|
|
9
|
-
"offset-right-xxl": "awsui_offset-right-
|
|
10
|
-
"text": "
|
|
11
|
-
"icon": "
|
|
5
|
+
"button": "awsui_button_m5h9f_adrtz_93",
|
|
6
|
+
"expanded": "awsui_expanded_m5h9f_adrtz_127",
|
|
7
|
+
"offset-right-none": "awsui_offset-right-none_m5h9f_adrtz_138",
|
|
8
|
+
"offset-right-l": "awsui_offset-right-l_m5h9f_adrtz_141",
|
|
9
|
+
"offset-right-xxl": "awsui_offset-right-xxl_m5h9f_adrtz_144",
|
|
10
|
+
"text": "awsui_text_m5h9f_adrtz_166",
|
|
11
|
+
"icon": "awsui_icon_m5h9f_adrtz_170"
|
|
12
12
|
};
|
|
13
13
|
|
package/internal/environment.js
CHANGED