@cloudscape-design/components-themeable 3.0.1102 → 3.0.1103
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/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/app-layout/visual-refresh-toolbar/drawer/styles.scss +10 -1
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
- package/lib/internal/template/app-layout/utils/use-ai-drawer.d.ts +0 -1
- package/lib/internal/template/app-layout/utils/use-ai-drawer.d.ts.map +1 -1
- package/lib/internal/template/app-layout/utils/use-ai-drawer.js +1 -1
- package/lib/internal/template/app-layout/utils/use-ai-drawer.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-ai-drawer.js +2 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-ai-drawer.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawers.d.ts +0 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawers.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawers.js +0 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawers.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/index.d.ts +2 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/index.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/index.js +2 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/index.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/local-drawer.d.ts +0 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/local-drawer.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/local-drawer.js +0 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/local-drawer.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.css.js +25 -24
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +74 -66
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +25 -24
- package/lib/internal/template/app-layout/visual-refresh-toolbar/internal.d.ts +0 -7
- package/lib/internal/template/app-layout/visual-refresh-toolbar/internal.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/internal.js +0 -14
- package/lib/internal/template/app-layout/visual-refresh-toolbar/internal.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/index.d.ts +0 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/index.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/index.js +0 -3
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/index.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/notifications/index.d.ts +0 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/notifications/index.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/notifications/index.js +0 -3
- package/lib/internal/template/app-layout/visual-refresh-toolbar/notifications/index.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/split-panel/index.d.ts +0 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/split-panel/index.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/split-panel/index.js +0 -3
- package/lib/internal/template/app-layout/visual-refresh-toolbar/split-panel/index.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.d.ts +0 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.js +0 -3
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/index.d.ts +4 -18
- package/lib/internal/template/date-range-picker/calendar/index.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/index.js +2 -2
- package/lib/internal/template/date-range-picker/calendar/index.js.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/interfaces.d.ts +22 -0
- package/lib/internal/template/date-range-picker/calendar/interfaces.d.ts.map +1 -0
- package/lib/internal/template/date-range-picker/calendar/interfaces.js +2 -0
- package/lib/internal/template/date-range-picker/calendar/interfaces.js.map +1 -0
- package/lib/internal/template/date-range-picker/calendar/range-inputs.d.ts +2 -20
- package/lib/internal/template/date-range-picker/calendar/range-inputs.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/range-inputs.js +11 -13
- package/lib/internal/template/date-range-picker/calendar/range-inputs.js.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/utils.d.ts +4 -0
- package/lib/internal/template/date-range-picker/calendar/utils.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/utils.js +40 -0
- package/lib/internal/template/date-range-picker/calendar/utils.js.map +1 -1
- package/lib/internal/template/date-range-picker/dropdown.d.ts +3 -2
- package/lib/internal/template/date-range-picker/dropdown.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/dropdown.js +2 -2
- package/lib/internal/template/date-range-picker/dropdown.js.map +1 -1
- package/lib/internal/template/date-range-picker/index.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/index.js +3 -2
- package/lib/internal/template/date-range-picker/index.js.map +1 -1
- package/lib/internal/template/date-range-picker/interfaces.d.ts +53 -11
- package/lib/internal/template/date-range-picker/interfaces.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/interfaces.js.map +1 -1
- package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
- package/lib/internal/template/internal/environment.js +2 -2
- package/lib/internal/template/internal/environment.json +2 -2
- package/lib/internal/template/internal/plugins/widget/internal.d.ts +4 -0
- package/lib/internal/template/internal/plugins/widget/internal.d.ts.map +1 -1
- package/lib/internal/template/internal/plugins/widget/internal.js +16 -0
- package/lib/internal/template/internal/plugins/widget/internal.js.map +1 -1
- package/lib/internal/template/internal/plugins/widget.d.ts +1 -1
- package/lib/internal/template/internal/plugins/widget.d.ts.map +1 -1
- package/lib/internal/template/internal/plugins/widget.js +1 -1
- package/lib/internal/template/internal/plugins/widget.js.map +1 -1
- package/lib/internal/template/internal/utils/date-time/format-date-time-with-offset.d.ts.map +1 -1
- package/lib/internal/template/internal/utils/date-time/format-date-time-with-offset.js +4 -0
- package/lib/internal/template/internal/utils/date-time/format-date-time-with-offset.js.map +1 -1
- package/lib/internal/template/mixed-line-bar-chart/bar-groups.d.ts.map +1 -1
- package/lib/internal/template/mixed-line-bar-chart/bar-groups.js +4 -1
- package/lib/internal/template/mixed-line-bar-chart/bar-groups.js.map +1 -1
- package/lib/internal/template/status-indicator/index.d.ts +1 -1
- package/lib/internal/template/status-indicator/index.d.ts.map +1 -1
- package/lib/internal/template/status-indicator/index.js.map +1 -1
- package/lib/internal/template/status-indicator/interfaces.d.ts +46 -0
- package/lib/internal/template/status-indicator/interfaces.d.ts.map +1 -0
- package/lib/internal/template/status-indicator/interfaces.js +2 -0
- package/lib/internal/template/status-indicator/interfaces.js.map +1 -0
- package/lib/internal/template/status-indicator/internal.d.ts +3 -31
- package/lib/internal/template/status-indicator/internal.d.ts.map +1 -1
- package/lib/internal/template/status-indicator/internal.js +6 -2
- package/lib/internal/template/status-indicator/internal.js.map +1 -1
- package/lib/internal/template/steps/interfaces.d.ts +1 -1
- package/lib/internal/template/steps/interfaces.d.ts.map +1 -1
- package/lib/internal/template/steps/interfaces.js.map +1 -1
- package/lib/internal/template/table/internal.js +2 -2
- package/lib/internal/template/table/internal.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/date-range-picker/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { CalendarProps } from '../calendar/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { ExpandToViewport } from '../internal/components/dropdown/interfaces';\nimport { FormFieldValidationControlProps } from '../internal/context/form-field-context';\nimport { NonCancelableEventHandler } from '../internal/events';\nimport { TimeInputProps } from '../time-input/interfaces';\n\nexport interface DateRangePickerBaseProps {\n /**\n * The current date range value. Can be either an absolute time range\n * or a relative time range.\n */\n value: null | DateRangePickerProps.Value;\n\n /**\n * A list of relative time ranges that are shown as suggestions.\n */\n relativeOptions: ReadonlyArray<DateRangePickerProps.RelativeOption>;\n\n /**\n * A function that defines whether a particular date should be enabled\n * in the calendar or not. Note that disabling a date in the calendar\n * still allows users to enter this date via keyboard. We therefore\n * recommend that you also validate these constraints client- and\n * server-side, in the same way as for other form elements.\n */\n isDateEnabled?: DateRangePickerProps.IsDateEnabledFunction;\n\n /**\n * Provides a reason why a particular date in the calendar is not enabled (only when `isDateEnabled` returns `false`).\n * If provided, the date becomes focusable.\n * @param date\n */\n dateDisabledReason?: DateRangePickerProps.DateDisabledReasonFunction;\n\n /**\n * The locale to be used for rendering month names and defining the\n * starting date of the week. If not provided, it will be determined\n * from the page and browser locales. Supported values and formats\n * are as-per the [JavaScript Intl API specification](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).\n */\n locale?: string;\n\n /**\n * Starting day of the week. [0-6] maps to [Sunday-Saturday].\n * By default the starting day of the week is defined by the locale,\n * but you can override it using this property.\n */\n startOfWeek?: number;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n * @i18n\n */\n i18nStrings?: DateRangePickerProps.I18nStrings;\n\n /**\n * Hides time inputs and changes the input format to date-only, e.g. 2021-04-06.\n *\n * Do not use `dateOnly` flag conditionally. The component does not trigger the value update\n * when the flag changes which means the value format can become inconsistent.\n *\n * This does not apply when the 'granularity' is set to 'month'\n *\n * Default: `false`.\n */\n dateOnly?: boolean;\n\n /**\n * Determines the range selector mode as follows:\n *\n * * `default` for combined absolute/relative range selector.\n * * `absolute-only` for absolute-only range selector.\n * * `relative-only` for relative-only range selector.\n *\n * By default, the range selector mode is `default`.\n */\n rangeSelectorMode?: DateRangePickerProps.RangeSelectorMode;\n\n /**\n * Specifies the format of the time input for absolute ranges.\n *\n * Use to restrict the granularity of time that the user can enter.\n *\n * Has no effect when `dateOnly` is true or `granularity` is set to 'month'.\n */\n timeInputFormat?: TimeInputProps.Format;\n\n /**\n * Fired whenever a user changes the component's value.\n * The event `detail` contains the current value of the field.\n */\n onChange?: NonCancelableEventHandler<DateRangePickerProps.ChangeDetail>;\n\n /**\n * The time offset from UTC in minutes that should be used to\n * display and produce values.\n *\n * Has no effect when `dateOnly` is true.\n *\n * Default: the user's current time offset as provided by the browser.\n *\n * @deprecated Use `getTimeOffset` instead.\n */\n timeOffset?: number;\n\n /**\n * A function that defines timezone offset from UTC in minutes for selected dates.\n * Use it to define time relative to the desired timezone.\n *\n * The function is called for the start date and the end date and takes a UTC date\n * corresponding the selected value as an argument.\n *\n * Has no effect when `dateOnly` is true.\n *\n * Default: the user's current time offset as provided by the browser.\n */\n getTimeOffset?: DateRangePickerProps.GetTimeOffsetFunction;\n}\nexport interface DateRangePickerProps\n extends BaseComponentProps,\n FormFieldValidationControlProps,\n ExpandToViewport,\n DateRangePickerBaseProps,\n Pick<CalendarProps, 'granularity'> {\n /**\n * Specifies the placeholder text that is rendered when the value is empty.\n */\n placeholder?: string;\n\n /**\n * Specifies that the component is disabled, preventing the user from\n * modifying the value. A disabled component cannot receive focus.\n */\n disabled?: boolean;\n\n /**\n * Specifies that the component is read-only, preventing the user from\n * modifying the value. A read-only component can receive focus.\n */\n readOnly?: boolean;\n\n /**\n * Fired when keyboard focus is set onto the UI control.\n */\n onFocus?: NonCancelableEventHandler<null>;\n\n /**\n * Fired when keyboard focus is removed from the UI control.\n */\n onBlur?: NonCancelableEventHandler<null>;\n\n /**\n * A function that defines whether a particular range is valid or not.\n *\n * Ensure that your function checks for missing fields in the value.\n */\n isValidRange: DateRangePickerProps.ValidationFunction;\n\n /**\n * Specifies whether the component should show a button that\n * allows the user to clear the selected value.\n */\n showClearButton?: boolean;\n\n /**\n * Specifies an additional control displayed in the dropdown, located below the range calendar.\n */\n customAbsoluteRangeControl?: DateRangePickerProps.AbsoluteRangeControl;\n\n /**\n * Specifies which time units to allow in the custom relative range control.\n */\n customRelativeRangeUnits?: DateRangePickerProps.TimeUnit[];\n\n /**\n * Specifies the time format to use for displaying the absolute time range.\n *\n * It can take the following values:\n * * `iso`: ISO 8601 format, e.g.: 2024-01-30T13:32:32+01:00 (or 2024-01-30 when `dateOnly` is true)\n * * `long-localized`: a more human-readable, localized format, e.g.: January 30, 2024, 13:32:32 (UTC+1) (or January 30, 2024 when `dateOnly` is true)\n *\n * Defaults to `iso`.\n */\n absoluteFormat?: DateRangePickerProps.AbsoluteFormat;\n\n /**\n * Specifies whether to hide the time offset in the displayed absolute time range.\n * Defaults to `false`.\n */\n hideTimeOffset?: boolean;\n}\n\nexport namespace DateRangePickerProps {\n export type Value = AbsoluteValue | RelativeValue;\n export interface AbsoluteValue {\n /**\n * In ISO8601 format, e.g.: 2021-04-06T17:23:50+02:00 (or 2021-04-06 when `dateOnly` is true)\n */\n startDate: string;\n /**\n * In ISO8601 format, e.g.: 2021-04-06T17:23:50+02:00 (or 2021-04-06 when `dateOnly` is true)\n */\n endDate: string;\n type: 'absolute';\n }\n\n export interface RelativeValue {\n /**\n * If provided, used to match this value\n * to a provided relative option.\n */\n key?: string;\n amount: number;\n unit: TimeUnit;\n type: 'relative';\n }\n export interface RelativeOption {\n /**\n * Used to uniquely identify this relative option.\n */\n key: string;\n amount: number;\n unit: TimeUnit;\n type: 'relative';\n }\n\n export type TimeUnit = 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'year';\n\n export type ValidationFunction = (value: Value | null) => ValidationResult;\n\n export type ValidationResult = ValidRangeResult | InvalidRangeResult;\n\n export interface ValidRangeResult {\n valid: true;\n }\n\n export interface InvalidRangeResult {\n valid: false;\n errorMessage: string;\n }\n\n export interface ChangeDetail {\n /**\n * The newly selected range of this date range picker.\n */\n value: null | Value;\n }\n\n export interface IsDateEnabledFunction {\n (date: Date): boolean;\n }\n\n export interface DateDisabledReasonFunction {\n (date: Date): string;\n }\n\n export interface GetTimeOffsetFunction {\n (date: Date): number;\n }\n\n export interface DateTimeStrings {\n date: string;\n time: string;\n }\n\n export interface PendingAbsoluteValue {\n start: DateTimeStrings;\n end: DateTimeStrings;\n }\n\n export type AbsoluteRangeControl = (\n selectedRange: PendingAbsoluteValue,\n setSelectedRange: React.Dispatch<React.SetStateAction<PendingAbsoluteValue>>\n ) => React.ReactNode;\n\n export type RangeSelectorMode = 'default' | 'absolute-only' | 'relative-only';\n\n export interface Ref {\n /**\n * Sets the browser focus on the UI control\n */\n focus(): void;\n }\n\n export interface I18nStrings {\n /**\n * Adds `aria-label` to the trigger and dropdown.\n */\n ariaLabel?: string;\n\n /**\n * Adds `aria-labelledby` to the trigger and dropdown.\n */\n ariaLabelledby?: string;\n\n /**\n * Adds `aria-describedby` to the trigger and dropdown.\n */\n ariaDescribedby?: string;\n\n /**\n * Label of the mode selection group. In the standard view, it adds 'aria-label' to the group of segments.\n * In a narrow container the label is visible and attached to the select component.\n * @i18n\n */\n modeSelectionLabel?: string;\n\n /**\n * Segment title of the relative range selection mode\n * @i18n\n */\n relativeModeTitle?: string;\n\n /**\n * Segment title of the absolute range selection mode\n * @i18n\n */\n absoluteModeTitle?: string;\n\n /**\n * Heading for the relative range selection area\n * @i18n\n */\n relativeRangeSelectionHeading?: string;\n\n /**\n * Description for the relative range selection area\n * @i18n\n */\n relativeRangeSelectionMonthlyDescription?: string;\n\n /**\n * Visible label of the Cancel button\n * @i18n\n */\n cancelButtonLabel?: string;\n\n /**\n * Visible label of the Clear and dismiss button\n * @i18n\n */\n clearButtonLabel?: string;\n\n /**\n * Visible label of the Apply button\n * @i18n\n */\n applyButtonLabel?: string;\n\n /**\n * Formatting function for relative ranges.\n * This function must convert a relative range to a human-readable string.\n * @i18n\n */\n formatRelativeRange?: (value: RelativeValue) => string;\n\n /**\n * Formatting function for time units.\n *\n * This function must return a localized form of the unit that fits the provided time value.\n * @i18n\n */\n formatUnit?: (unit: TimeUnit, value: number) => string;\n\n /**\n * Visible label for the option for selecting\n * a custom relative range.\n * @i18n\n */\n customRelativeRangeOptionLabel?: string;\n\n /**\n * Visible description for the option for selecting\n * a custom relative range.\n * @i18n\n */\n customRelativeRangeOptionDescription?: string;\n\n /**\n * Visible label for the duration selector for\n * the custom relative range.\n * @i18n\n */\n customRelativeRangeDurationLabel?: string;\n\n /**\n * Placeholder for the duration selector for\n * the custom relative range.\n * @i18n\n */\n customRelativeRangeDurationPlaceholder?: string;\n\n /**\n * Visible label for the unit selector for the\n * custom relative range.\n * @i18n\n */\n customRelativeRangeUnitLabel?: string;\n\n /**\n * Visible label for the Start Month input for the\n * absolute range.\n * @i18n\n */\n startMonthLabel?: string;\n\n /**\n * Visible label for the Start Date input for the\n * absolute range.\n * @i18n\n */\n startDateLabel?: string;\n\n /**\n * Visible label for the Start Time input for the\n * absolute range.\n * @i18n\n */\n startTimeLabel?: string;\n\n /**\n * Visible label for the End Month input for the\n * absolute range.\n * @i18n\n */\n endMonthLabel?: string;\n\n /**\n * Visible label for the End Date input for the\n * absolute range.\n * @i18n\n */\n endDateLabel?: string;\n\n /**\n * Visible label for the End Time input for the\n * absolute range.\n * @i18n\n */\n endTimeLabel?: string;\n\n /**\n * Constraint text for the date input field for the\n * absolute range with no time option.\n * @i18n\n */\n dateConstraintText?: string;\n\n /**\n * Constraint text for the input fields for the\n * absolute range.\n * @i18n\n */\n dateTimeConstraintText?: string;\n\n /**\n * Constraint text for the month input fields for the\n * absolute range.\n * @i18n\n */\n monthConstraintText?: string;\n\n /**\n * Provides a text alternative for the error icon in the error alert.\n * @i18n\n */\n errorIconAriaLabel?: string;\n\n /**\n * When the property is set, screen readers announce the selected range when the absolute range gets selected.\n */\n renderSelectedAbsoluteRangeAriaLive?: (startDate: string, endDate: string) => string;\n\n /**\n * Used as part of the `aria-label` for today's date in the calendar.\n * @i18n\n */\n todayAriaLabel?: string;\n\n /**\n * Specifies an `aria-label` for the 'next month' button.\n * @i18n\n */\n nextMonthAriaLabel?: string;\n\n /**\n * Specifies an `aria-label` for the 'previous month' button.\n * @i18n\n */\n previousMonthAriaLabel?: string;\n\n /**\n * Used as part of the `aria-label` for the current month in the calendar.\n * @i18n\n */\n currentMonthAriaLabel?: string;\n\n /**\n * Specifies an `aria-label` for the 'next year' button.\n * @i18n\n */\n nextYearAriaLabel?: string;\n\n /**\n * Specifies an `aria-label` for the 'previous year' button.\n * @i18n\n */\n previousYearAriaLabel?: string;\n }\n\n export type AbsoluteFormat = 'iso' | 'long-localized';\n}\n\nexport type DayIndex = 0 | 1 | 2 | 3 | 4 | 5 | 6;\n\nexport type QuarterIndex = 0 | 1 | 2;\n\nexport type RangeCalendarI18nStrings = Pick<\n DateRangePickerProps.I18nStrings,\n | 'todayAriaLabel'\n | 'nextMonthAriaLabel'\n | 'previousMonthAriaLabel'\n | 'currentMonthAriaLabel'\n | 'nextYearAriaLabel'\n | 'previousYearAriaLabel'\n | 'startMonthLabel'\n | 'startDateLabel'\n | 'startTimeLabel'\n | 'endMonthLabel'\n | 'endDateLabel'\n | 'endTimeLabel'\n | 'dateConstraintText'\n | 'dateTimeConstraintText'\n | 'monthConstraintText'\n | 'renderSelectedAbsoluteRangeAriaLive'\n>;\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/date-range-picker/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { CalendarProps } from '../calendar/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { ExpandToViewport } from '../internal/components/dropdown/interfaces';\nimport { FormFieldValidationControlProps } from '../internal/context/form-field-context';\nimport { NonCancelableEventHandler } from '../internal/events';\nimport { DateFormat, EditableDateFormat } from '../internal/utils/date-time/interfaces';\nimport { TimeInputProps } from '../time-input/interfaces';\n\nexport interface DateRangePickerBaseProps {\n /**\n * The current date range value. Can be either an absolute time range\n * or a relative time range.\n */\n value: null | DateRangePickerProps.Value;\n\n /**\n * A list of relative time ranges that are shown as suggestions.\n */\n relativeOptions: ReadonlyArray<DateRangePickerProps.RelativeOption>;\n\n /**\n * A function that defines whether a particular date should be enabled\n * in the calendar or not. Note that disabling a date in the calendar\n * still allows users to enter this date via keyboard. We therefore\n * recommend that you also validate these constraints client- and\n * server-side, in the same way as for other form elements.\n */\n isDateEnabled?: DateRangePickerProps.IsDateEnabledFunction;\n\n /**\n * Provides a reason why a particular date in the calendar is not enabled (only when `isDateEnabled` returns `false`).\n * If provided, the date becomes focusable.\n * @param date\n */\n dateDisabledReason?: DateRangePickerProps.DateDisabledReasonFunction;\n\n /**\n * The locale to be used for rendering month names and defining the\n * starting date of the week. If not provided, it will be determined\n * from the page and browser locales. Supported values and formats\n * are as-per the [JavaScript Intl API specification](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).\n */\n locale?: string;\n\n /**\n * Starting day of the week. [0-6] maps to [Sunday-Saturday].\n * By default the starting day of the week is defined by the locale,\n * but you can override it using this property.\n */\n startOfWeek?: number;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n * @i18n\n */\n i18nStrings?: DateRangePickerProps.I18nStrings;\n\n /**\n * Hides time inputs and changes the input format to date-only, e.g. 2021-04-06.\n *\n * Do not use `dateOnly` flag conditionally. The component does not trigger the value update\n * when the flag changes which means the value format can become inconsistent.\n *\n * This does not apply when the 'granularity' is set to 'month'\n *\n * Default: `false`.\n */\n dateOnly?: boolean;\n\n /**\n * Determines the range selector mode as follows:\n *\n * * `default` for combined absolute/relative range selector.\n * * `absolute-only` for absolute-only range selector.\n * * `relative-only` for relative-only range selector.\n *\n * By default, the range selector mode is `default`.\n */\n rangeSelectorMode?: DateRangePickerProps.RangeSelectorMode;\n\n /**\n * Specifies the date format to use on the date inputs in the absolute dropdown.\n *\n * The format of the input as it is being interacted with. It can take the following values:\n * * `iso`: ISO 8601 format without time, e.g.: 2024-01-30 (or 2024-01)\n * * `slashed`: similar to ISO 8601 but with '/' in place of '-'. e.g.: 2024/01/30 (or 2024/01)\n */\n dateInputFormat?: DateRangePickerProps.DateInputFormat;\n\n /**\n * Specifies the format of the time input for absolute ranges.\n *\n * Use to restrict the granularity of time that the user can enter.\n *\n * Has no effect when `dateOnly` is true or `granularity` is set to 'month'.\n */\n timeInputFormat?: DateRangePickerProps.TimeInputFormat;\n\n /**\n * Fired whenever a user changes the component's value.\n * The event `detail` contains the current value of the field.\n */\n onChange?: NonCancelableEventHandler<DateRangePickerProps.ChangeDetail>;\n\n /**\n * The time offset from UTC in minutes that should be used to\n * display and produce values.\n *\n * Has no effect when `dateOnly` is true.\n *\n * Default: the user's current time offset as provided by the browser.\n *\n * @deprecated Use `getTimeOffset` instead.\n */\n timeOffset?: number;\n\n /**\n * A function that defines timezone offset from UTC in minutes for selected dates.\n * Use it to define time relative to the desired timezone.\n *\n * The function is called for the start date and the end date and takes a UTC date\n * corresponding the selected value as an argument.\n *\n * Has no effect when `dateOnly` is true.\n *\n * Default: the user's current time offset as provided by the browser.\n */\n getTimeOffset?: DateRangePickerProps.GetTimeOffsetFunction;\n}\nexport interface DateRangePickerProps\n extends BaseComponentProps,\n FormFieldValidationControlProps,\n ExpandToViewport,\n DateRangePickerBaseProps,\n Pick<CalendarProps, 'granularity'> {\n /**\n * Specifies the placeholder text that is rendered when the value is empty.\n */\n placeholder?: string;\n\n /**\n * Specifies that the component is disabled, preventing the user from\n * modifying the value. A disabled component cannot receive focus.\n */\n disabled?: boolean;\n\n /**\n * Specifies that the component is read-only, preventing the user from\n * modifying the value. A read-only component can receive focus.\n */\n readOnly?: boolean;\n\n /**\n * Fired when keyboard focus is set onto the UI control.\n */\n onFocus?: NonCancelableEventHandler<null>;\n\n /**\n * Fired when keyboard focus is removed from the UI control.\n */\n onBlur?: NonCancelableEventHandler<null>;\n\n /**\n * A function that defines whether a particular range is valid or not.\n *\n * Ensure that your function checks for missing fields in the value.\n */\n isValidRange: DateRangePickerProps.ValidationFunction;\n\n /**\n * Specifies whether the component should show a button that\n * allows the user to clear the selected value.\n */\n showClearButton?: boolean;\n\n /**\n * Specifies an additional control displayed in the dropdown, located below the range calendar.\n */\n customAbsoluteRangeControl?: DateRangePickerProps.AbsoluteRangeControl;\n\n /**\n * Specifies which time units to allow in the custom relative range control.\n */\n customRelativeRangeUnits?: DateRangePickerProps.TimeUnit[];\n\n /**\n * Specifies the time format to use for displaying the absolute time range.\n *\n * It can take the following values:\n * * `iso`: ISO 8601 format, e.g.: 2024-01-30T13:32:32+01:00 (or 2024-01-30 when `dateOnly` is true)\n * * `long-localized`: a more human-readable, localized format, e.g.: January 30, 2024, 13:32:32 (UTC+1) (or January 30, 2024 when `dateOnly` is true)\n * * `slashed`: similar to ISO 8601 but with '/' in place of '-'. e.g.: 2024/01/30 (or 2024/01)\n */\n absoluteFormat?: DateRangePickerProps.AbsoluteFormat;\n\n /**\n * Specifies whether to hide the time offset in the displayed absolute time range.\n * Defaults to `false`.\n */\n hideTimeOffset?: boolean;\n}\n\nexport namespace DateRangePickerProps {\n export type Value = AbsoluteValue | RelativeValue;\n export interface AbsoluteValue {\n /**\n * In ISO8601 format, e.g.: 2021-04-06T17:23:50+02:00 (or 2021-04-06 when `dateOnly` is true)\n */\n startDate: string;\n /**\n * In ISO8601 format, e.g.: 2021-04-06T17:23:50+02:00 (or 2021-04-06 when `dateOnly` is true)\n */\n endDate: string;\n type: 'absolute';\n }\n\n export interface RelativeValue {\n /**\n * If provided, used to match this value\n * to a provided relative option.\n */\n key?: string;\n amount: number;\n unit: TimeUnit;\n type: 'relative';\n }\n export interface RelativeOption {\n /**\n * Used to uniquely identify this relative option.\n */\n key: string;\n amount: number;\n unit: TimeUnit;\n type: 'relative';\n }\n\n export type TimeUnit = 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'year';\n\n export type ValidationFunction = (value: Value | null) => ValidationResult;\n\n export type ValidationResult = ValidRangeResult | InvalidRangeResult;\n\n export interface ValidRangeResult {\n valid: true;\n }\n\n export interface InvalidRangeResult {\n valid: false;\n errorMessage: string;\n }\n\n export interface ChangeDetail {\n /**\n * The newly selected range of this date range picker.\n */\n value: null | Value;\n }\n\n export interface IsDateEnabledFunction {\n (date: Date): boolean;\n }\n\n export interface DateDisabledReasonFunction {\n (date: Date): string;\n }\n\n export interface GetTimeOffsetFunction {\n (date: Date): number;\n }\n\n export interface DateTimeStrings {\n date: string;\n time: string;\n }\n\n export interface PendingAbsoluteValue {\n start: DateTimeStrings;\n end: DateTimeStrings;\n }\n\n export type AbsoluteRangeControl = (\n selectedRange: PendingAbsoluteValue,\n setSelectedRange: React.Dispatch<React.SetStateAction<PendingAbsoluteValue>>\n ) => React.ReactNode;\n\n export type RangeSelectorMode = 'default' | 'absolute-only' | 'relative-only';\n\n export interface Ref {\n /**\n * Sets the browser focus on the UI control\n */\n focus(): void;\n }\n\n export interface I18nStrings {\n /**\n * Adds `aria-label` to the trigger and dropdown.\n */\n ariaLabel?: string;\n\n /**\n * Adds `aria-labelledby` to the trigger and dropdown.\n */\n ariaLabelledby?: string;\n\n /**\n * Adds `aria-describedby` to the trigger and dropdown.\n */\n ariaDescribedby?: string;\n\n /**\n * Label of the mode selection group. In the standard view, it adds 'aria-label' to the group of segments.\n * In a narrow container the label is visible and attached to the select component.\n * @i18n\n */\n modeSelectionLabel?: string;\n\n /**\n * Segment title of the relative range selection mode\n * @i18n\n */\n relativeModeTitle?: string;\n\n /**\n * Segment title of the absolute range selection mode\n * @i18n\n */\n absoluteModeTitle?: string;\n\n /**\n * Heading for the relative range selection area\n * @i18n\n */\n relativeRangeSelectionHeading?: string;\n\n /**\n * Description for the relative range selection area\n * @i18n\n */\n relativeRangeSelectionMonthlyDescription?: string;\n\n /**\n * Visible label of the Cancel button\n * @i18n\n */\n cancelButtonLabel?: string;\n\n /**\n * Visible label of the Clear and dismiss button\n * @i18n\n */\n clearButtonLabel?: string;\n\n /**\n * Visible label of the Apply button\n * @i18n\n */\n applyButtonLabel?: string;\n\n /**\n * Formatting function for relative ranges.\n * This function must convert a relative range to a human-readable string.\n * @i18n\n */\n formatRelativeRange?: (value: RelativeValue) => string;\n\n /**\n * Formatting function for time units.\n *\n * This function must return a localized form of the unit that fits the provided time value.\n * @i18n\n */\n formatUnit?: (unit: TimeUnit, value: number) => string;\n\n /**\n * Visible label for the option for selecting\n * a custom relative range.\n * @i18n\n */\n customRelativeRangeOptionLabel?: string;\n\n /**\n * Visible description for the option for selecting\n * a custom relative range.\n * @i18n\n */\n customRelativeRangeOptionDescription?: string;\n\n /**\n * Visible label for the duration selector for\n * the custom relative range.\n * @i18n\n */\n customRelativeRangeDurationLabel?: string;\n\n /**\n * Placeholder for the duration selector for\n * the custom relative range.\n * @i18n\n */\n customRelativeRangeDurationPlaceholder?: string;\n\n /**\n * Visible label for the unit selector for the\n * custom relative range.\n * @i18n\n */\n customRelativeRangeUnitLabel?: string;\n\n /**\n * Visible label for the Start Month input for the\n * absolute range.\n * @i18n\n */\n startMonthLabel?: string;\n\n /**\n * Visible label for the Start Date input for the\n * absolute range.\n * @i18n\n */\n startDateLabel?: string;\n\n /**\n * Visible label for the Start Time input for the\n * absolute range.\n * @i18n\n */\n startTimeLabel?: string;\n\n /**\n * Visible label for the End Month input for the\n * absolute range.\n * @i18n\n */\n endMonthLabel?: string;\n\n /**\n * Visible label for the End Date input for the\n * absolute range.\n * @i18n\n */\n endDateLabel?: string;\n\n /**\n * Visible label for the End Time input for the absolute range.\n * This serves as a fallback if no format specific date constraint test is provided\n *\n * @i18n\n */\n endTimeLabel?: string;\n\n /**\n * Constraint text for the date input field for the\n * absolute range with no time option.\n * @i18n\n */\n dateConstraintText?: string;\n\n /**\n * Constraint text for the input fields for the absolute range in 'slashed' format with no time option.\n * @i18n\n */\n slashedDateConstraintText?: string;\n\n /**\n * Constraint text for the input fields for the absolute range in 'iso' format with no time option.\n * @i18n\n */\n isoDateConstraintText?: string;\n\n /**\n * Constraint text for the input fields for the absolute range.\n * This serves as a fallback if no format specific datetime constraint test is provided\n *\n * @i18n\n */\n dateTimeConstraintText?: string;\n\n /**\n * Constraint text for the date input fields for the absolute range in 'slashed' format.\n * @i18n\n */\n slashedDateTimeConstraintText?: string;\n\n /**\n * Constraint text for the date input fields for the absolute range in 'iso' format with.\n * @i18n\n */\n isoDateTimeConstraintText?: string;\n\n /**\n * Constraint text for the month input fields for the absolute range.\n * This serves as a fallback if no format specific month constraint test is provided.\n *\n * @i18n\n */\n monthConstraintText?: string;\n\n /**\n * Constraint text for the month input fields for the absolute range in 'slashed' format.\n * @i18n\n */\n slashedMonthConstraintText?: string;\n\n /**\n * Constraint text for the month input fields for the absolute range in 'iso' format.\n * @i18n\n */\n isoMonthConstraintText?: string;\n\n /**\n * Provides a text alternative for the error icon in the error alert.\n * @i18n\n */\n errorIconAriaLabel?: string;\n\n /**\n * When the property is set, screen readers announce the selected range when the absolute range gets selected.\n */\n renderSelectedAbsoluteRangeAriaLive?: (startDate: string, endDate: string) => string;\n\n /**\n * Used as part of the `aria-label` for today's date in the calendar.\n * @i18n\n */\n todayAriaLabel?: string;\n\n /**\n * Specifies an `aria-label` for the 'next month' button.\n * @i18n\n */\n nextMonthAriaLabel?: string;\n\n /**\n * Specifies an `aria-label` for the 'previous month' button.\n * @i18n\n */\n previousMonthAriaLabel?: string;\n\n /**\n * Used as part of the `aria-label` for the current month in the calendar.\n * @i18n\n */\n currentMonthAriaLabel?: string;\n\n /**\n * Specifies an `aria-label` for the 'next year' button.\n * @i18n\n */\n nextYearAriaLabel?: string;\n\n /**\n * Specifies an `aria-label` for the 'previous year' button.\n * @i18n\n */\n previousYearAriaLabel?: string;\n }\n\n export type AbsoluteFormat = DateFormat;\n\n export type DateInputFormat = EditableDateFormat | undefined;\n\n export type TimeInputFormat = TimeInputProps.Format;\n}\n\nexport type DayIndex = 0 | 1 | 2 | 3 | 4 | 5 | 6;\n\nexport type QuarterIndex = 0 | 1 | 2;\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export var PACKAGE_SOURCE = "components";
|
|
2
|
-
export var PACKAGE_VERSION = "3.0.0 (
|
|
3
|
-
export var GIT_SHA = "
|
|
2
|
+
export var PACKAGE_VERSION = "3.0.0 (a463d12a)";
|
|
3
|
+
export var GIT_SHA = "a463d12a";
|
|
4
4
|
export var THEME = "open-source-visual-refresh";
|
|
5
5
|
export var SYSTEM = "console";
|
|
6
6
|
export var ALWAYS_VISUAL_REFRESH = true;
|
|
@@ -7,6 +7,10 @@ export declare function clearInitialMessages(): void;
|
|
|
7
7
|
* Returns whether there is an app layout present on this page or not
|
|
8
8
|
*/
|
|
9
9
|
export declare function isAppLayoutReady(): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Returns a promise that resolves once the app layout has loaded
|
|
12
|
+
*/
|
|
13
|
+
export declare function whenAppLayoutReady(): Promise<unknown>;
|
|
10
14
|
/**
|
|
11
15
|
* Registers a new runtime drawer to app layout
|
|
12
16
|
* @param drawer
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../../../src/internal/plugins/widget/internal.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../../../src/internal/plugins/widget/internal.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAY9G,KAAK,gBAAgB,GAAG,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;AAW1D,wBAAgB,wBAAwB,wCAEvC;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,gBAAgB,cAWjE;AAED,wBAAgB,oBAAoB,SAEnC;AAED;;GAEG;AACH,wBAAgB,gBAAgB,YAE/B;AAED;;GAEG;AACH,wBAAgB,kBAAkB,qBAOjC;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,aAAa,QAMvD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,sBAAsB,QAE3D"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { reportRuntimeApiWarning } from '../helpers/metrics';
|
|
4
4
|
const storageKeyMessageHandler = Symbol.for('awsui-widget-api-message-handler');
|
|
5
5
|
const storageKeyInitialMessages = Symbol.for('awsui-widget-api-initial-messages');
|
|
6
|
+
const storageKeyReadyDeferCallbacks = Symbol.for('awsui-widget-api-ready-defer');
|
|
6
7
|
function getWindow() {
|
|
7
8
|
return window;
|
|
8
9
|
}
|
|
@@ -14,11 +15,14 @@ export function getAppLayoutInitialState() {
|
|
|
14
15
|
return getWindow()[storageKeyInitialMessages];
|
|
15
16
|
}
|
|
16
17
|
export function registerAppLayoutHandler(handler) {
|
|
18
|
+
var _a;
|
|
17
19
|
const win = getWindow();
|
|
18
20
|
if (win[storageKeyMessageHandler]) {
|
|
19
21
|
reportRuntimeApiWarning('AppLayoutWidget', 'Double registration attempt, the old handler will be overridden');
|
|
20
22
|
}
|
|
21
23
|
win[storageKeyMessageHandler] = handler;
|
|
24
|
+
(_a = win[storageKeyReadyDeferCallbacks]) === null || _a === void 0 ? void 0 : _a.forEach(fn => fn());
|
|
25
|
+
win[storageKeyReadyDeferCallbacks] = [];
|
|
22
26
|
return () => {
|
|
23
27
|
win[storageKeyMessageHandler] = undefined;
|
|
24
28
|
};
|
|
@@ -32,6 +36,18 @@ export function clearInitialMessages() {
|
|
|
32
36
|
export function isAppLayoutReady() {
|
|
33
37
|
return !!getAppLayoutMessageHandler();
|
|
34
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Returns a promise that resolves once the app layout has loaded
|
|
41
|
+
*/
|
|
42
|
+
export function whenAppLayoutReady() {
|
|
43
|
+
var _a;
|
|
44
|
+
if (isAppLayoutReady()) {
|
|
45
|
+
return Promise.resolve();
|
|
46
|
+
}
|
|
47
|
+
const win = getWindow();
|
|
48
|
+
win[storageKeyReadyDeferCallbacks] = (_a = win[storageKeyReadyDeferCallbacks]) !== null && _a !== void 0 ? _a : [];
|
|
49
|
+
return new Promise(resolve => { var _a; return (_a = win[storageKeyReadyDeferCallbacks]) === null || _a === void 0 ? void 0 : _a.push(resolve); });
|
|
50
|
+
}
|
|
35
51
|
/**
|
|
36
52
|
* Registers a new runtime drawer to app layout
|
|
37
53
|
* @param drawer
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../../../src/internal/plugins/widget/internal.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAG7D,MAAM,wBAAwB,GAAG,MAAM,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;AAChF,MAAM,yBAAyB,GAAG,MAAM,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../../../src/internal/plugins/widget/internal.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAG7D,MAAM,wBAAwB,GAAG,MAAM,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;AAChF,MAAM,yBAAyB,GAAG,MAAM,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;AAClF,MAAM,6BAA6B,GAAG,MAAM,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;AAUjF,SAAS,SAAS;IAChB,OAAO,MAAiC,CAAC;AAC3C,CAAC;AAED,SAAS,0BAA0B;IACjC,MAAM,GAAG,GAAG,SAAS,EAAE,CAAC;IACxB,OAAO,GAAG,CAAC,wBAAwB,CAAC,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,wBAAwB;IACtC,OAAO,SAAS,EAAE,CAAC,yBAAyB,CAAC,CAAC;AAChD,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,OAAyB;;IAChE,MAAM,GAAG,GAAG,SAAS,EAAE,CAAC;IACxB,IAAI,GAAG,CAAC,wBAAwB,CAAC,EAAE;QACjC,uBAAuB,CAAC,iBAAiB,EAAE,iEAAiE,CAAC,CAAC;KAC/G;IACD,GAAG,CAAC,wBAAwB,CAAC,GAAG,OAAO,CAAC;IACxC,MAAA,GAAG,CAAC,6BAA6B,CAAC,0CAAE,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACxD,GAAG,CAAC,6BAA6B,CAAC,GAAG,EAAE,CAAC;IACxC,OAAO,GAAG,EAAE;QACV,GAAG,CAAC,wBAAwB,CAAC,GAAG,SAAS,CAAC;IAC5C,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,oBAAoB;IAClC,SAAS,EAAE,CAAC,yBAAyB,CAAC,GAAG,SAAS,CAAC;AACrD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO,CAAC,CAAC,0BAA0B,EAAE,CAAC;AACxC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB;;IAChC,IAAI,gBAAgB,EAAE,EAAE;QACtB,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;KAC1B;IACD,MAAM,GAAG,GAAG,SAAS,EAAE,CAAC;IACxB,GAAG,CAAC,6BAA6B,CAAC,GAAG,MAAA,GAAG,CAAC,6BAA6B,CAAC,mCAAI,EAAE,CAAC;IAC9E,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,WAAC,OAAA,MAAA,GAAG,CAAC,6BAA6B,CAAC,0CAAE,IAAI,CAAC,OAAO,CAAC,CAAA,EAAA,CAAC,CAAC;AACnF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAAqB;;IACtD,MAAM,GAAG,GAAG,SAAS,EAAE,CAAC;IACxB,MAAM,OAAO,GAA0B,EAAE,IAAI,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IACvF,GAAG,CAAC,yBAAyB,CAAC,GAAG,MAAA,GAAG,CAAC,yBAAyB,CAAC,mCAAI,EAAE,CAAC;IACtE,GAAG,CAAC,yBAAyB,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC7C,MAAA,0BAA0B,EAAE,0CAAG,OAAO,CAAC,CAAC;AAC1C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,OAA+B;;IAC1D,MAAA,0BAA0B,EAAE,0CAAG,OAAO,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { reportRuntimeApiWarning } from '../helpers/metrics';\nimport { AppLayoutMessage, AppLayoutUpdateMessage, DrawerPayload, RegisterDrawerMessage } from './interfaces';\n\nconst storageKeyMessageHandler = Symbol.for('awsui-widget-api-message-handler');\nconst storageKeyInitialMessages = Symbol.for('awsui-widget-api-initial-messages');\nconst storageKeyReadyDeferCallbacks = Symbol.for('awsui-widget-api-ready-defer');\n\ninterface WindowWithApi extends Window {\n [storageKeyMessageHandler]: AppLayoutHandler | undefined;\n [storageKeyInitialMessages]: Array<RegisterDrawerMessage> | undefined;\n [storageKeyReadyDeferCallbacks]: Array<(value?: unknown) => void> | undefined;\n}\n\ntype AppLayoutHandler = (event: AppLayoutMessage) => void;\n\nfunction getWindow() {\n return window as Window as WindowWithApi;\n}\n\nfunction getAppLayoutMessageHandler() {\n const win = getWindow();\n return win[storageKeyMessageHandler];\n}\n\nexport function getAppLayoutInitialState() {\n return getWindow()[storageKeyInitialMessages];\n}\n\nexport function registerAppLayoutHandler(handler: AppLayoutHandler) {\n const win = getWindow();\n if (win[storageKeyMessageHandler]) {\n reportRuntimeApiWarning('AppLayoutWidget', 'Double registration attempt, the old handler will be overridden');\n }\n win[storageKeyMessageHandler] = handler;\n win[storageKeyReadyDeferCallbacks]?.forEach(fn => fn());\n win[storageKeyReadyDeferCallbacks] = [];\n return () => {\n win[storageKeyMessageHandler] = undefined;\n };\n}\n\nexport function clearInitialMessages() {\n getWindow()[storageKeyInitialMessages] = undefined;\n}\n\n/**\n * Returns whether there is an app layout present on this page or not\n */\nexport function isAppLayoutReady() {\n return !!getAppLayoutMessageHandler();\n}\n\n/**\n * Returns a promise that resolves once the app layout has loaded\n */\nexport function whenAppLayoutReady() {\n if (isAppLayoutReady()) {\n return Promise.resolve();\n }\n const win = getWindow();\n win[storageKeyReadyDeferCallbacks] = win[storageKeyReadyDeferCallbacks] ?? [];\n return new Promise(resolve => win[storageKeyReadyDeferCallbacks]?.push(resolve));\n}\n\n/**\n * Registers a new runtime drawer to app layout\n * @param drawer\n */\nexport function registerLeftDrawer(drawer: DrawerPayload) {\n const win = getWindow();\n const message: RegisterDrawerMessage = { type: 'registerLeftDrawer', payload: drawer };\n win[storageKeyInitialMessages] = win[storageKeyInitialMessages] ?? [];\n win[storageKeyInitialMessages].push(message);\n getAppLayoutMessageHandler()?.(message);\n}\n\n/**\n * Interact with already registered app layout drawers\n * @param message\n */\nexport function updateDrawer(message: AppLayoutUpdateMessage) {\n getAppLayoutMessageHandler()?.(message);\n}\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export * from './widget/interfaces';
|
|
2
|
-
export { registerLeftDrawer, updateDrawer, isAppLayoutReady } from './widget/internal';
|
|
2
|
+
export { registerLeftDrawer, updateDrawer, isAppLayoutReady, whenAppLayoutReady } from './widget/internal';
|
|
3
3
|
//# sourceMappingURL=widget.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget.d.ts","sourceRoot":"","sources":["../../../../src/internal/plugins/widget.ts"],"names":[],"mappings":"AAEA,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"widget.d.ts","sourceRoot":"","sources":["../../../../src/internal/plugins/widget.ts"],"names":[],"mappings":"AAEA,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
export * from './widget/interfaces';
|
|
4
|
-
export { registerLeftDrawer, updateDrawer, isAppLayoutReady } from './widget/internal';
|
|
4
|
+
export { registerLeftDrawer, updateDrawer, isAppLayoutReady, whenAppLayoutReady } from './widget/internal';
|
|
5
5
|
//# sourceMappingURL=widget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget.js","sourceRoot":"","sources":["../../../../src/internal/plugins/widget.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport * from './widget/interfaces';\nexport { registerLeftDrawer, updateDrawer, isAppLayoutReady } from './widget/internal';\n"]}
|
|
1
|
+
{"version":3,"file":"widget.js","sourceRoot":"","sources":["../../../../src/internal/plugins/widget.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport * from './widget/interfaces';\nexport { registerLeftDrawer, updateDrawer, isAppLayoutReady, whenAppLayoutReady } from './widget/internal';\n"]}
|
package/lib/internal/template/internal/utils/date-time/format-date-time-with-offset.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-date-time-with-offset.d.ts","sourceRoot":"","sources":["../../../../../src/internal/utils/date-time/format-date-time-with-offset.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAK7E,wBAAgB,wBAAwB,CAAC,EACvC,IAAI,EACJ,MAAM,EACN,cAAc,EACd,UAAU,EACV,MAAM,GACP,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,oBAAoB,CAAC,cAAc,CAAC;IAC5C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,
|
|
1
|
+
{"version":3,"file":"format-date-time-with-offset.d.ts","sourceRoot":"","sources":["../../../../../src/internal/utils/date-time/format-date-time-with-offset.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAK7E,wBAAgB,wBAAwB,CAAC,EACvC,IAAI,EACJ,MAAM,EACN,cAAc,EACd,UAAU,EACV,MAAM,GACP,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,oBAAoB,CAAC,cAAc,CAAC;IAC5C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,UAeA"}
|
|
@@ -10,6 +10,10 @@ export function formatDateTimeWithOffset({ date, format, hideTimeOffset, timeOff
|
|
|
10
10
|
case 'long-localized': {
|
|
11
11
|
return formatDateLocalized({ date, hideTimeOffset, isDateOnly, isMonthOnly, locale, timeOffset });
|
|
12
12
|
}
|
|
13
|
+
case 'slashed': {
|
|
14
|
+
const formatted = formatDateIso({ date, hideTimeOffset, isDateOnly, isMonthOnly, timeOffset }).split('T');
|
|
15
|
+
return `${formatted[0].split('-').join('/')}${formatted[1] ? `T${formatted[1]}` : ''}`;
|
|
16
|
+
}
|
|
13
17
|
default: {
|
|
14
18
|
return formatDateIso({ date, hideTimeOffset, isDateOnly, isMonthOnly, timeOffset });
|
|
15
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-date-time-with-offset.js","sourceRoot":"","sources":["../../../../../src/internal/utils/date-time/format-date-time-with-offset.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAGtC,OAAO,aAAa,MAAM,mBAAmB,CAAC;AAC9C,OAAO,mBAAmB,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE9D,MAAM,UAAU,wBAAwB,CAAC,EACvC,IAAI,EACJ,MAAM,EACN,cAAc,EACd,UAAU,EACV,MAAM,GAOP;IACC,MAAM,UAAU,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IACvC,MAAM,WAAW,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IACzC,QAAQ,MAAM,EAAE;QACd,KAAK,gBAAgB,CAAC,CAAC;YACrB,OAAO,mBAAmB,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;SACnG;QACD,OAAO,CAAC,CAAC;YACP,OAAO,aAAa,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC,CAAC;SACrF;KACF;AACH,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { DateRangePickerProps } from '../../../date-range-picker/interfaces';\nimport formatDateIso from './format-date-iso';\nimport formatDateLocalized from './format-date-localized';\nimport { isIsoDateOnly, isIsoMonthOnly } from './is-iso-only';\n\nexport function formatDateTimeWithOffset({\n date,\n format,\n hideTimeOffset,\n timeOffset,\n locale,\n}: {\n date: string;\n format: DateRangePickerProps.AbsoluteFormat;\n hideTimeOffset?: boolean;\n timeOffset?: number;\n locale?: string;\n}) {\n const isDateOnly = isIsoDateOnly(date);\n const isMonthOnly = isIsoMonthOnly(date);\n switch (format) {\n case 'long-localized': {\n return formatDateLocalized({ date, hideTimeOffset, isDateOnly, isMonthOnly, locale, timeOffset });\n }\n default: {\n return formatDateIso({ date, hideTimeOffset, isDateOnly, isMonthOnly, timeOffset });\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"format-date-time-with-offset.js","sourceRoot":"","sources":["../../../../../src/internal/utils/date-time/format-date-time-with-offset.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAGtC,OAAO,aAAa,MAAM,mBAAmB,CAAC;AAC9C,OAAO,mBAAmB,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE9D,MAAM,UAAU,wBAAwB,CAAC,EACvC,IAAI,EACJ,MAAM,EACN,cAAc,EACd,UAAU,EACV,MAAM,GAOP;IACC,MAAM,UAAU,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IACvC,MAAM,WAAW,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IACzC,QAAQ,MAAM,EAAE;QACd,KAAK,gBAAgB,CAAC,CAAC;YACrB,OAAO,mBAAmB,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;SACnG;QACD,KAAK,SAAS,CAAC,CAAC;YACd,MAAM,SAAS,GAAG,aAAa,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC1G,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;SACxF;QACD,OAAO,CAAC,CAAC;YACP,OAAO,aAAa,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC,CAAC;SACrF;KACF;AACH,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { DateRangePickerProps } from '../../../date-range-picker/interfaces';\nimport formatDateIso from './format-date-iso';\nimport formatDateLocalized from './format-date-localized';\nimport { isIsoDateOnly, isIsoMonthOnly } from './is-iso-only';\n\nexport function formatDateTimeWithOffset({\n date,\n format,\n hideTimeOffset,\n timeOffset,\n locale,\n}: {\n date: string;\n format: DateRangePickerProps.AbsoluteFormat;\n hideTimeOffset?: boolean;\n timeOffset?: number;\n locale?: string;\n}) {\n const isDateOnly = isIsoDateOnly(date);\n const isMonthOnly = isIsoMonthOnly(date);\n switch (format) {\n case 'long-localized': {\n return formatDateLocalized({ date, hideTimeOffset, isDateOnly, isMonthOnly, locale, timeOffset });\n }\n case 'slashed': {\n const formatted = formatDateIso({ date, hideTimeOffset, isDateOnly, isMonthOnly, timeOffset }).split('T');\n return `${formatted[0].split('-').join('/')}${formatted[1] ? `T${formatted[1]}` : ''}`;\n }\n default: {\n return formatDateIso({ date, hideTimeOffset, isDateOnly, isMonthOnly, timeOffset });\n }\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bar-groups.d.ts","sourceRoot":"","sources":["../../../src/mixed-line-bar-chart/bar-groups.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAM1D,UAAU,SAAS,CAAC,CAAC,SAAS,cAAc;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/B,qBAAqB,EAAE,IAAI,GAAG,MAAM,CAAC;IACrC,mBAAmB,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;CACtD;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,CAAC,SAAS,cAAc,EAAE,EAC1D,SAAS,EACT,SAAS,EACT,eAAe,EACf,SAAS,EACT,qBAAqB,EACrB,mBAAmB,GACpB,EAAE,SAAS,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"bar-groups.d.ts","sourceRoot":"","sources":["../../../src/mixed-line-bar-chart/bar-groups.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAM1D,UAAU,SAAS,CAAC,CAAC,SAAS,cAAc;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/B,qBAAqB,EAAE,IAAI,GAAG,MAAM,CAAC;IACrC,mBAAmB,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;CACtD;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,CAAC,SAAS,cAAc,EAAE,EAC1D,SAAS,EACT,SAAS,EACT,eAAe,EACf,SAAS,EACT,qBAAqB,EACrB,mBAAmB,GACpB,EAAE,SAAS,CAAC,CAAC,CAAC,eAwBd"}
|
|
@@ -9,6 +9,9 @@ const OUTLINE_PADDING = 2;
|
|
|
9
9
|
* Other rectangles are only needed for the "findBarGroups" test-utils selector.
|
|
10
10
|
*/
|
|
11
11
|
export default function BarGroups({ ariaLabel, isRefresh, isPopoverPinned, barGroups, highlightedGroupIndex, highlightedGroupRef, }) {
|
|
12
|
-
return (React.createElement("g", { role: "group", "aria-hidden": "true" }, barGroups.map((group, index) => (React.createElement("rect", { key: index, x: Math.max(0, group.position.x - OUTLINE_PADDING), y: Math.max(0, group.position.y - OUTLINE_PADDING), width: group.position.width + 2 * OUTLINE_PADDING, height: group.position.height + 2 * OUTLINE_PADDING, ref: index === highlightedGroupIndex ? highlightedGroupRef : undefined, rx: isRefresh ? 4 : 2, role: "button", "aria-label": ariaLabel, "aria-haspopup": true, "aria-expanded": isPopoverPinned,
|
|
12
|
+
return (React.createElement("g", { role: "group", "aria-hidden": "true" }, barGroups.map((group, index) => (React.createElement("rect", { key: index, x: Math.max(0, group.position.x - OUTLINE_PADDING), y: Math.max(0, group.position.y - OUTLINE_PADDING), width: group.position.width + 2 * OUTLINE_PADDING, height: group.position.height + 2 * OUTLINE_PADDING, ref: index === highlightedGroupIndex ? highlightedGroupRef : undefined, rx: isRefresh ? 4 : 2, role: "button", "aria-label": ariaLabel, "aria-haspopup": true, "aria-expanded": isPopoverPinned,
|
|
13
|
+
// We must use "transparent" instead of "none" so that Firefox popover placement works correctly.
|
|
14
|
+
// When an SVG element has no stroke or fill color the Firefox optimizes it out.
|
|
15
|
+
fill: "transparent", className: styles['bar-group'] })))));
|
|
13
16
|
}
|
|
14
17
|
//# sourceMappingURL=bar-groups.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bar-groups.js","sourceRoot":"","sources":["../../../src/mixed-line-bar-chart/bar-groups.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,eAAe,GAAG,CAAC,CAAC;AAW1B;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAA2B,EAC1D,SAAS,EACT,SAAS,EACT,eAAe,EACf,SAAS,EACT,qBAAqB,EACrB,mBAAmB,GACN;IACb,OAAO,CACL,2BAAG,IAAI,EAAC,OAAO,iBAAa,MAAM,IAC/B,SAAS,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAC/B,8BACE,GAAG,EAAE,KAAK,EACV,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,GAAG,eAAe,CAAC,EAClD,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,GAAG,eAAe,CAAC,EAClD,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,GAAG,CAAC,GAAG,eAAe,EACjD,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,GAAG,eAAe,EACnD,GAAG,EAAE,KAAK,KAAK,qBAAqB,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,SAAS,EACtE,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EACrB,IAAI,EAAC,QAAQ,gBACD,SAAS,mBACN,IAAI,mBACJ,eAAe,
|
|
1
|
+
{"version":3,"file":"bar-groups.js","sourceRoot":"","sources":["../../../src/mixed-line-bar-chart/bar-groups.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,eAAe,GAAG,CAAC,CAAC;AAW1B;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAA2B,EAC1D,SAAS,EACT,SAAS,EACT,eAAe,EACf,SAAS,EACT,qBAAqB,EACrB,mBAAmB,GACN;IACb,OAAO,CACL,2BAAG,IAAI,EAAC,OAAO,iBAAa,MAAM,IAC/B,SAAS,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAC/B,8BACE,GAAG,EAAE,KAAK,EACV,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,GAAG,eAAe,CAAC,EAClD,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,GAAG,eAAe,CAAC,EAClD,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,GAAG,CAAC,GAAG,eAAe,EACjD,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,GAAG,eAAe,EACnD,GAAG,EAAE,KAAK,KAAK,qBAAqB,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,SAAS,EACtE,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EACrB,IAAI,EAAC,QAAQ,gBACD,SAAS,mBACN,IAAI,mBACJ,eAAe;QAC9B,iGAAiG;QACjG,gFAAgF;QAChF,IAAI,EAAC,aAAa,EAClB,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,GAC9B,CACH,CAAC,CACA,CACL,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { ChartDataTypes } from './interfaces';\nimport { ScaledBarGroup } from './make-scaled-bar-groups';\n\nimport styles from './styles.css.js';\n\nconst OUTLINE_PADDING = 2;\n\ninterface BarGroups<T extends ChartDataTypes> {\n ariaLabel: string;\n isRefresh: boolean;\n isPopoverPinned: boolean;\n barGroups: ScaledBarGroup<T>[];\n highlightedGroupIndex: null | number;\n highlightedGroupRef: React.RefObject<SVGRectElement>;\n}\n\n/**\n * The component renders empty SVG rectangles corresponding to the bar group slots.\n * The highlighted group rectangle is used for the pseudo-focus and therefore requires ARIA attributes.\n * Other rectangles are only needed for the \"findBarGroups\" test-utils selector.\n */\nexport default function BarGroups<T extends ChartDataTypes>({\n ariaLabel,\n isRefresh,\n isPopoverPinned,\n barGroups,\n highlightedGroupIndex,\n highlightedGroupRef,\n}: BarGroups<T>) {\n return (\n <g role=\"group\" aria-hidden=\"true\">\n {barGroups.map((group, index) => (\n <rect\n key={index}\n x={Math.max(0, group.position.x - OUTLINE_PADDING)}\n y={Math.max(0, group.position.y - OUTLINE_PADDING)}\n width={group.position.width + 2 * OUTLINE_PADDING}\n height={group.position.height + 2 * OUTLINE_PADDING}\n ref={index === highlightedGroupIndex ? highlightedGroupRef : undefined}\n rx={isRefresh ? 4 : 2}\n role=\"button\"\n aria-label={ariaLabel}\n aria-haspopup={true}\n aria-expanded={isPopoverPinned}\n // We must use \"transparent\" instead of \"none\" so that Firefox popover placement works correctly.\n // When an SVG element has no stroke or fill color the Firefox optimizes it out.\n fill=\"transparent\"\n className={styles['bar-group']}\n />\n ))}\n </g>\n );\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { StatusIndicatorProps } from './
|
|
2
|
+
import { StatusIndicatorProps } from './interfaces';
|
|
3
3
|
export { StatusIndicatorProps };
|
|
4
4
|
export default function StatusIndicator({ type, wrapText, ...props }: StatusIndicatorProps): JSX.Element;
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/status-indicator/index.tsx"],"names":[],"mappings":";AAOA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/status-indicator/index.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAGpD,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAEhC,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EAAE,IAAgB,EAAE,QAAe,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,eAK5G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/status-indicator/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/status-indicator/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAExE,OAAO,uBAAuB,MAAM,YAAY,CAAC;AAIjD,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EAAqE;QAArE,EAAE,IAAI,GAAG,SAAS,EAAE,QAAQ,GAAG,IAAI,OAAkC,EAA7B,KAAK,cAA7C,oBAA+C,CAAF;IACnF,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,iBAAiB,EAAE;QAC7D,KAAK,EAAE,EAAE,aAAa,EAAE,KAAK,CAAC,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC9D,CAAC,CAAC;IACH,OAAO,oBAAC,uBAAuB,kBAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,IAAM,KAAK,EAAM,kBAAkB,EAAI,CAAC;AACxG,CAAC;AAED,gBAAgB,CAAC,eAAe,EAAE,iBAAiB,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n'use client';\nimport React from 'react';\n\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { StatusIndicatorProps } from './interfaces';\nimport InternalStatusIndicator from './internal';\n\nexport { StatusIndicatorProps };\n\nexport default function StatusIndicator({ type = 'success', wrapText = true, ...props }: StatusIndicatorProps) {\n const baseComponentProps = useBaseComponent('StatusIndicator', {\n props: { colorOverride: props.colorOverride, type, wrapText },\n });\n return <InternalStatusIndicator type={type} wrapText={wrapText} {...props} {...baseComponentProps} />;\n}\n\napplyDisplayName(StatusIndicator, 'StatusIndicator');\n"]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BaseComponentProps } from '../internal/base-component';
|
|
3
|
+
/**
|
|
4
|
+
* @awsuiSystem core
|
|
5
|
+
*/
|
|
6
|
+
import { NativeAttributes } from '../internal/utils/with-native-attributes';
|
|
7
|
+
export interface StatusIndicatorProps extends BaseComponentProps {
|
|
8
|
+
/**
|
|
9
|
+
* Specifies the status type.
|
|
10
|
+
*/
|
|
11
|
+
type?: StatusIndicatorProps.Type;
|
|
12
|
+
/**
|
|
13
|
+
* A text fragment that communicates the status.
|
|
14
|
+
*/
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Specifies an `aria-label` for the icon. If the status text alone does not fully describe the status,
|
|
18
|
+
* use this to communicate additional context.
|
|
19
|
+
*/
|
|
20
|
+
iconAriaLabel?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Specifies an override for the status indicator color.
|
|
23
|
+
*/
|
|
24
|
+
colorOverride?: StatusIndicatorProps.Color;
|
|
25
|
+
/**
|
|
26
|
+
* Specifies if the text content should wrap. If you set it to false, it prevents the text from wrapping
|
|
27
|
+
* and truncates it with an ellipsis.
|
|
28
|
+
*/
|
|
29
|
+
wrapText?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Attributes to add to the native element.
|
|
32
|
+
* Some attributes will be automatically combined with internal attribute values:
|
|
33
|
+
* - `className` will be appended.
|
|
34
|
+
* - Event handlers will be chained, unless the default is prevented.
|
|
35
|
+
*
|
|
36
|
+
* We do not support using this attribute to apply custom styling.
|
|
37
|
+
*
|
|
38
|
+
* @awsuiSystem core
|
|
39
|
+
*/
|
|
40
|
+
nativeAttributes?: NativeAttributes<React.HTMLAttributes<HTMLElement>>;
|
|
41
|
+
}
|
|
42
|
+
export declare namespace StatusIndicatorProps {
|
|
43
|
+
type Type = 'error' | 'warning' | 'success' | 'info' | 'stopped' | 'pending' | 'in-progress' | 'loading';
|
|
44
|
+
type Color = 'blue' | 'grey' | 'green' | 'red' | 'yellow';
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=interfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/status-indicator/interfaces.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAE5E,MAAM,WAAW,oBAAqB,SAAQ,kBAAkB;IAC9D;;OAEG;IACH,IAAI,CAAC,EAAE,oBAAoB,CAAC,IAAI,CAAC;IACjC;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,aAAa,CAAC,EAAE,oBAAoB,CAAC,KAAK,CAAC;IAC3C;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;;;OASG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC;CACxE;AAED,yBAAiB,oBAAoB,CAAC;IAGpC,KAAY,IAAI,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,CAAC;IAChH,KAAY,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;CAClE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/status-indicator/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 '../internal/base-component';\n/**\n * @awsuiSystem core\n */\nimport { NativeAttributes } from '../internal/utils/with-native-attributes';\n\nexport interface StatusIndicatorProps extends BaseComponentProps {\n /**\n * Specifies the status type.\n */\n type?: StatusIndicatorProps.Type;\n /**\n * A text fragment that communicates the status.\n */\n children?: React.ReactNode;\n /**\n * Specifies an `aria-label` for the icon. If the status text alone does not fully describe the status,\n * use this to communicate additional context.\n */\n iconAriaLabel?: string;\n /**\n * Specifies an override for the status indicator color.\n */\n colorOverride?: StatusIndicatorProps.Color;\n /**\n * Specifies if the text content should wrap. If you set it to false, it prevents the text from wrapping\n * and truncates it with an ellipsis.\n */\n wrapText?: boolean;\n /**\n * Attributes to add to the native element.\n * Some attributes will be automatically combined with internal attribute values:\n * - `className` will be appended.\n * - Event handlers will be chained, unless the default is prevented.\n *\n * We do not support using this attribute to apply custom styling.\n *\n * @awsuiSystem core\n */\n nativeAttributes?: NativeAttributes<React.HTMLAttributes<HTMLElement>>;\n}\n\nexport namespace StatusIndicatorProps {\n // Why not enums? Explained there\n // https://stackoverflow.com/questions/52393730/typescript-string-literal-union-type-from-enum\n export type Type = 'error' | 'warning' | 'success' | 'info' | 'stopped' | 'pending' | 'in-progress' | 'loading';\n export type Color = 'blue' | 'grey' | 'green' | 'red' | 'yellow';\n}\n"]}
|
|
@@ -1,32 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { IconProps } from '../icon/interfaces';
|
|
3
|
-
import { BaseComponentProps } from '../internal/base-component';
|
|
4
3
|
import { InternalBaseComponentProps } from '../internal/hooks/use-base-component';
|
|
5
4
|
import { SomeRequired } from '../internal/types';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Specifies the status type.
|
|
9
|
-
*/
|
|
10
|
-
type?: StatusIndicatorProps.Type;
|
|
11
|
-
/**
|
|
12
|
-
* A text fragment that communicates the status.
|
|
13
|
-
*/
|
|
14
|
-
children?: React.ReactNode;
|
|
15
|
-
/**
|
|
16
|
-
* Specifies an `aria-label` for the icon. If the status text alone does not fully describe the status,
|
|
17
|
-
* use this to communicate additional context.
|
|
18
|
-
*/
|
|
19
|
-
iconAriaLabel?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Specifies an override for the status indicator color.
|
|
22
|
-
*/
|
|
23
|
-
colorOverride?: StatusIndicatorProps.Color;
|
|
24
|
-
/**
|
|
25
|
-
* Specifies if the text content should wrap. If you set it to false, it prevents the text from wrapping
|
|
26
|
-
* and truncates it with an ellipsis.
|
|
27
|
-
*/
|
|
28
|
-
wrapText?: boolean;
|
|
29
|
-
}
|
|
5
|
+
import { StatusIndicatorProps } from './interfaces';
|
|
30
6
|
export interface InternalStatusIndicatorProps extends SomeRequired<StatusIndicatorProps, 'type'>, InternalBaseComponentProps {
|
|
31
7
|
/**
|
|
32
8
|
* Play an animation on the error icon when first rendered
|
|
@@ -41,9 +17,5 @@ export interface InternalStatusIndicatorProps extends SomeRequired<StatusIndicat
|
|
|
41
17
|
*/
|
|
42
18
|
__display?: 'inline' | 'inline-block';
|
|
43
19
|
}
|
|
44
|
-
export
|
|
45
|
-
type Type = 'error' | 'warning' | 'success' | 'info' | 'stopped' | 'pending' | 'in-progress' | 'loading';
|
|
46
|
-
type Color = 'blue' | 'grey' | 'green' | 'red' | 'yellow';
|
|
47
|
-
}
|
|
48
|
-
export default function StatusIndicator({ type, children, iconAriaLabel, colorOverride, wrapText, __animate, __internalRootRef, __size, __display, ...rest }: InternalStatusIndicatorProps): JSX.Element;
|
|
20
|
+
export default function StatusIndicator({ type, children, iconAriaLabel, colorOverride, wrapText, nativeAttributes, __animate, __internalRootRef, __size, __display, ...rest }: InternalStatusIndicatorProps): JSX.Element;
|
|
49
21
|
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/status-indicator/internal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/status-indicator/internal.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAMjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAIpD,MAAM,WAAW,4BACf,SAAQ,YAAY,CAAC,oBAAoB,EAAE,MAAM,CAAC,EAChD,0BAA0B;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC;IAExB;;OAEG;IACH,SAAS,CAAC,EAAE,QAAQ,GAAG,cAAc,CAAC;CACvC;AAaD,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,aAAa,EACb,QAAe,EACf,gBAAgB,EAChB,SAAiB,EACjB,iBAAiB,EACjB,MAAiB,EACjB,SAA0B,EAC1B,GAAG,IAAI,EACR,EAAE,4BAA4B,eAsC9B"}
|
|
@@ -5,6 +5,10 @@ import React from 'react';
|
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import InternalIcon from '../icon/internal';
|
|
7
7
|
import { getBaseProps } from '../internal/base-component';
|
|
8
|
+
/**
|
|
9
|
+
* @awsuiSystem core
|
|
10
|
+
*/
|
|
11
|
+
import WithNativeAttributes from '../internal/utils/with-native-attributes';
|
|
8
12
|
import InternalSpinner from '../spinner/internal';
|
|
9
13
|
import styles from './styles.css.js';
|
|
10
14
|
const typeToIcon = size => ({
|
|
@@ -18,9 +22,9 @@ const typeToIcon = size => ({
|
|
|
18
22
|
loading: React.createElement(InternalSpinner, null),
|
|
19
23
|
});
|
|
20
24
|
export default function StatusIndicator(_a) {
|
|
21
|
-
var { type, children, iconAriaLabel, colorOverride, wrapText = true, __animate = false, __internalRootRef, __size = 'normal', __display = 'inline-block' } = _a, rest = __rest(_a, ["type", "children", "iconAriaLabel", "colorOverride", "wrapText", "__animate", "__internalRootRef", "__size", "__display"]);
|
|
25
|
+
var { type, children, iconAriaLabel, colorOverride, wrapText = true, nativeAttributes, __animate = false, __internalRootRef, __size = 'normal', __display = 'inline-block' } = _a, rest = __rest(_a, ["type", "children", "iconAriaLabel", "colorOverride", "wrapText", "nativeAttributes", "__animate", "__internalRootRef", "__size", "__display"]);
|
|
22
26
|
const baseProps = getBaseProps(rest);
|
|
23
|
-
return (React.createElement(
|
|
27
|
+
return (React.createElement(WithNativeAttributes, Object.assign({}, baseProps, { tag: "span", componentName: "StatusIndicator", nativeAttributes: nativeAttributes, className: clsx(styles.root, styles[`status-${type}`], {
|
|
24
28
|
[styles[`color-override-${colorOverride}`]]: colorOverride,
|
|
25
29
|
}, baseProps.className), ref: __internalRootRef }),
|
|
26
30
|
React.createElement("span", { className: clsx(styles.container, styles[`display-${__display}`], wrapText === false && styles['overflow-ellipsis'], __animate && styles['container-fade-in']) },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/status-indicator/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/status-indicator/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG1D;;GAEG;AACH,OAAO,oBAAoB,MAAM,0CAA0C,CAAC;AAC5E,OAAO,eAAe,MAAM,qBAAqB,CAAC;AAGlD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAqBrC,MAAM,UAAU,GAA6E,IAAI,CAAC,EAAE,CAAC,CAAC;IACpG,KAAK,EAAE,oBAAC,YAAY,IAAC,IAAI,EAAC,iBAAiB,EAAC,IAAI,EAAE,IAAI,GAAI;IAC1D,OAAO,EAAE,oBAAC,YAAY,IAAC,IAAI,EAAC,gBAAgB,EAAC,IAAI,EAAE,IAAI,GAAI;IAC3D,OAAO,EAAE,oBAAC,YAAY,IAAC,IAAI,EAAC,iBAAiB,EAAC,IAAI,EAAE,IAAI,GAAI;IAC5D,IAAI,EAAE,oBAAC,YAAY,IAAC,IAAI,EAAC,aAAa,EAAC,IAAI,EAAE,IAAI,GAAI;IACrD,OAAO,EAAE,oBAAC,YAAY,IAAC,IAAI,EAAC,gBAAgB,EAAC,IAAI,EAAE,IAAI,GAAI;IAC3D,OAAO,EAAE,oBAAC,YAAY,IAAC,IAAI,EAAC,gBAAgB,EAAC,IAAI,EAAE,IAAI,GAAI;IAC3D,aAAa,EAAE,oBAAC,YAAY,IAAC,IAAI,EAAC,oBAAoB,EAAC,IAAI,EAAE,IAAI,GAAI;IACrE,OAAO,EAAE,oBAAC,eAAe,OAAG;CAC7B,CAAC,CAAC;AAEH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EAYT;QAZS,EACtC,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,aAAa,EACb,QAAQ,GAAG,IAAI,EACf,gBAAgB,EAChB,SAAS,GAAG,KAAK,EACjB,iBAAiB,EACjB,MAAM,GAAG,QAAQ,EACjB,SAAS,GAAG,cAAc,OAEG,EAD1B,IAAI,cAX+B,+IAYvC,CADQ;IAEP,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC,OAAO,CACL,oBAAC,oBAAoB,oBACf,SAAS,IACb,GAAG,EAAC,MAAM,EACV,aAAa,EAAC,iBAAiB,EAC/B,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,IAAI,EACX,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC,EACxB;YACE,CAAC,MAAM,CAAC,kBAAkB,aAAa,EAAE,CAAC,CAAC,EAAE,aAAa;SAC3D,EACD,SAAS,CAAC,SAAS,CACpB,EACD,GAAG,EAAE,iBAAiB;QAEtB,8BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,SAAS,EAChB,MAAM,CAAC,WAAW,SAAS,EAAE,CAAC,EAC9B,QAAQ,KAAK,KAAK,IAAI,MAAM,CAAC,mBAAmB,CAAC,EACjD,SAAS,IAAI,MAAM,CAAC,mBAAmB,CAAC,CACzC;YAED,8BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC,gBACnD,aAAa,EACzB,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS;gBAEtC,UAAU,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC;gBACxB,SAAS,KAAK,QAAQ,IAAI,mDAAW,CACjC;YACN,QAAQ,CACJ,CACc,CACxB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { IconProps } from '../icon/interfaces';\nimport InternalIcon from '../icon/internal';\nimport { getBaseProps } from '../internal/base-component';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { SomeRequired } from '../internal/types';\n/**\n * @awsuiSystem core\n */\nimport WithNativeAttributes from '../internal/utils/with-native-attributes';\nimport InternalSpinner from '../spinner/internal';\nimport { StatusIndicatorProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\nexport interface InternalStatusIndicatorProps\n extends SomeRequired<StatusIndicatorProps, 'type'>,\n InternalBaseComponentProps {\n /**\n * Play an animation on the error icon when first rendered\n */\n __animate?: boolean;\n\n /**\n * Size of icon.\n */\n __size?: IconProps.Size;\n\n /**\n * The CSS behavior of the status indicator container element.\n */\n __display?: 'inline' | 'inline-block';\n}\n\nconst typeToIcon: (size: IconProps.Size) => Record<StatusIndicatorProps.Type, JSX.Element> = size => ({\n error: <InternalIcon name=\"status-negative\" size={size} />,\n warning: <InternalIcon name=\"status-warning\" size={size} />,\n success: <InternalIcon name=\"status-positive\" size={size} />,\n info: <InternalIcon name=\"status-info\" size={size} />,\n stopped: <InternalIcon name=\"status-stopped\" size={size} />,\n pending: <InternalIcon name=\"status-pending\" size={size} />,\n 'in-progress': <InternalIcon name=\"status-in-progress\" size={size} />,\n loading: <InternalSpinner />,\n});\n\nexport default function StatusIndicator({\n type,\n children,\n iconAriaLabel,\n colorOverride,\n wrapText = true,\n nativeAttributes,\n __animate = false,\n __internalRootRef,\n __size = 'normal',\n __display = 'inline-block',\n ...rest\n}: InternalStatusIndicatorProps) {\n const baseProps = getBaseProps(rest);\n return (\n <WithNativeAttributes\n {...baseProps}\n tag=\"span\"\n componentName=\"StatusIndicator\"\n nativeAttributes={nativeAttributes}\n className={clsx(\n styles.root,\n styles[`status-${type}`],\n {\n [styles[`color-override-${colorOverride}`]]: colorOverride,\n },\n baseProps.className\n )}\n ref={__internalRootRef}\n >\n <span\n className={clsx(\n styles.container,\n styles[`display-${__display}`],\n wrapText === false && styles['overflow-ellipsis'],\n __animate && styles['container-fade-in']\n )}\n >\n <span\n className={clsx(styles.icon, __animate && styles['icon-shake'])}\n aria-label={iconAriaLabel}\n role={iconAriaLabel ? 'img' : undefined}\n >\n {typeToIcon(__size)[type]}\n {__display === 'inline' && <> </>}\n </span>\n {children}\n </span>\n </WithNativeAttributes>\n );\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { BaseComponentProps } from '../internal/base-component';
|
|
3
|
-
import { StatusIndicatorProps } from '../status-indicator/
|
|
3
|
+
import { StatusIndicatorProps } from '../status-indicator/interfaces';
|
|
4
4
|
export interface StepsProps extends BaseComponentProps {
|
|
5
5
|
/**
|
|
6
6
|
* An array of individual steps
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/steps/interfaces.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/steps/interfaces.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAEtE,MAAM,WAAW,UAAW,SAAQ,kBAAkB;IACpD;;;;;;;;OAQG;IACH,KAAK,EAAE,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACtC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,yBAAiB,UAAU,CAAC;IAC1B,KAAY,MAAM,GAAG,oBAAoB,CAAC,IAAI,CAAC;IAE/C,UAAiB,IAAI;QACnB,MAAM,EAAE,MAAM,CAAC;QACf,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;QACxB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;KAC3B;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/steps/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 '../internal/base-component';\nimport { StatusIndicatorProps } from '../status-indicator/
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/steps/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 '../internal/base-component';\nimport { StatusIndicatorProps } from '../status-indicator/interfaces';\n\nexport interface StepsProps extends BaseComponentProps {\n /**\n * An array of individual steps\n *\n * Each step definition has the following properties:\n * * `status` (string) - Status of the step corresponding to a status indicator.\n * * `statusIconAriaLabel` - (string) - (Optional) Alternative text for the status icon.\n * * `header` (ReactNode) - Summary corresponding to the step.\n * * `details` (ReactNode) - (Optional) Additional information corresponding to the step.\n */\n steps: ReadonlyArray<StepsProps.Step>;\n /**\n * Provides an `aria-label` to the progress steps container.\n * Don't use `ariaLabel` and `ariaLabelledby` at the same time.\n */\n ariaLabel?: string;\n /**\n * Sets the `aria-labelledby` property on the progress steps container.\n * If there's a visible label element that you can reference, use this instead of `ariaLabel`.\n * Don't use `ariaLabel` and `ariaLabelledby` at the same time.\n */\n ariaLabelledby?: string;\n /**\n * Sets the `aria-describedby` property on the progress steps container.\n */\n ariaDescribedby?: string;\n}\n\nexport namespace StepsProps {\n export type Status = StatusIndicatorProps.Type;\n\n export interface Step {\n status: Status;\n statusIconAriaLabel?: string;\n header: React.ReactNode;\n details?: React.ReactNode;\n }\n}\n"]}
|
|
@@ -80,10 +80,10 @@ const InternalTable = React.forwardRef((_a, ref) => {
|
|
|
80
80
|
getLoadingStatus,
|
|
81
81
|
getExpandableItemProps,
|
|
82
82
|
});
|
|
83
|
-
const [containerWidth, wrapperMeasureRef] = useContainerQuery(rect => rect.
|
|
83
|
+
const [containerWidth, wrapperMeasureRef] = useContainerQuery(rect => rect.borderBoxWidth);
|
|
84
84
|
const wrapperMeasureRefObject = useRef(null);
|
|
85
85
|
const wrapperMeasureMergedRef = useMergeRefs(wrapperMeasureRef, wrapperMeasureRefObject);
|
|
86
|
-
const [tableWidth, tableMeasureRef] = useContainerQuery(rect => rect.
|
|
86
|
+
const [tableWidth, tableMeasureRef] = useContainerQuery(rect => rect.borderBoxWidth);
|
|
87
87
|
const tableRefObject = useRef(null);
|
|
88
88
|
const secondaryWrapperRef = React.useRef(null);
|
|
89
89
|
const theadRef = useRef(null);
|