@cloudscape-design/components-themeable 3.0.1081 → 3.0.1082
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/button/styles.scss +4 -0
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
- package/lib/internal/template/alert/interfaces.d.ts +0 -16
- package/lib/internal/template/alert/interfaces.d.ts.map +1 -1
- package/lib/internal/template/alert/interfaces.js.map +1 -1
- package/lib/internal/template/badge/interfaces.d.ts +0 -9
- package/lib/internal/template/badge/interfaces.d.ts.map +1 -1
- package/lib/internal/template/badge/interfaces.js.map +1 -1
- package/lib/internal/template/button/interfaces.d.ts +6 -12
- package/lib/internal/template/button/interfaces.d.ts.map +1 -1
- package/lib/internal/template/button/interfaces.js.map +1 -1
- package/lib/internal/template/button/style.d.ts.map +1 -1
- package/lib/internal/template/button/style.js +17 -12
- package/lib/internal/template/button/style.js.map +1 -1
- package/lib/internal/template/button/styles.css.js +22 -22
- package/lib/internal/template/button/styles.scoped.css +113 -69
- package/lib/internal/template/button/styles.selectors.js +22 -22
- package/lib/internal/template/checkbox/interfaces.d.ts +0 -1
- package/lib/internal/template/checkbox/interfaces.d.ts.map +1 -1
- package/lib/internal/template/checkbox/interfaces.js.map +1 -1
- package/lib/internal/template/container/interfaces.d.ts +0 -15
- package/lib/internal/template/container/interfaces.d.ts.map +1 -1
- package/lib/internal/template/container/interfaces.js.map +1 -1
- package/lib/internal/template/date-range-picker/time-offset.js +3 -3
- package/lib/internal/template/date-range-picker/time-offset.js.map +1 -1
- package/lib/internal/template/flashbar/interfaces.d.ts +0 -24
- package/lib/internal/template/flashbar/interfaces.d.ts.map +1 -1
- package/lib/internal/template/flashbar/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/utils/date-time/format-time-offset.d.ts +11 -0
- package/lib/internal/template/internal/utils/date-time/format-time-offset.d.ts.map +1 -1
- package/lib/internal/template/internal/utils/date-time/format-time-offset.js +17 -0
- package/lib/internal/template/internal/utils/date-time/format-time-offset.js.map +1 -1
- package/lib/internal/template/internal/utils/date-time/index.d.ts +1 -1
- package/lib/internal/template/internal/utils/date-time/index.d.ts.map +1 -1
- package/lib/internal/template/internal/utils/date-time/index.js +1 -1
- package/lib/internal/template/internal/utils/date-time/index.js.map +1 -1
- package/lib/internal/template/link/interfaces.d.ts +0 -6
- package/lib/internal/template/link/interfaces.d.ts.map +1 -1
- package/lib/internal/template/link/interfaces.js.map +1 -1
- package/lib/internal/template/radio-group/interfaces.d.ts +0 -1
- package/lib/internal/template/radio-group/interfaces.d.ts.map +1 -1
- package/lib/internal/template/radio-group/interfaces.js.map +1 -1
- package/lib/internal/template/toggle/interfaces.d.ts +0 -1
- package/lib/internal/template/toggle/interfaces.d.ts.map +1 -1
- package/lib/internal/template/toggle/interfaces.js.map +1 -1
- package/package.json +1 -1
|
@@ -69,21 +69,6 @@ export interface ContainerProps extends BaseComponentProps {
|
|
|
69
69
|
*/
|
|
70
70
|
variant?: 'default' | 'stacked';
|
|
71
71
|
/**
|
|
72
|
-
* Specifies an object of selectors and properties that are used to apply custom styles.
|
|
73
|
-
*
|
|
74
|
-
* - `root.background` (string) - (Optional) Background of the container.
|
|
75
|
-
* - `root.borderColor` (string) - (Optional) Border color of the container.
|
|
76
|
-
* - `root.borderRadius` (string) - (Optional) Border radius of the container.
|
|
77
|
-
* - `root.borderWidth` (string) - (Optional) Border width of the container.
|
|
78
|
-
* - `root.boxShadow` (string) - (Optional) Box shadow of the container.
|
|
79
|
-
* - `content.paddingBlock` (string) - (Optional) Block dimension padding of the content slot.
|
|
80
|
-
* - `content.paddingInline` (string) - (Optional) Inline dimension padding of the content slot.
|
|
81
|
-
* - `header.paddingBlock` (string) - (Optional) Block dimension padding of the header slot.
|
|
82
|
-
* - `header.paddingInline` (string) - (Optional) Inline dimension padding of the header slot.
|
|
83
|
-
* - `footer.root.paddingBlock` (string) - (Optional) Block dimension padding of the footer slot.
|
|
84
|
-
* - `footer.root.paddingInline` (string) - (Optional) Inline dimension padding of the footer slot.
|
|
85
|
-
* - `footer.divider.borderColor` (string) - (Optional) Border color of the footer divider.
|
|
86
|
-
* - `footer.divider.borderWidth` (string) - (Optional) Border width of the footer divider.
|
|
87
72
|
* @awsuiSystem core
|
|
88
73
|
*/
|
|
89
74
|
style?: ContainerProps.Style;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/container/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,MAAM,WAAW,cAAe,SAAQ,kBAAkB;IACxD;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,cAAc,CAAC,iBAAiB,CAAC;IAErD;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;;;;;;;;;;;;;;;;;OAkBG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;OAEG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAEhC
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"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;QACpB,IAAI,CAAC,EAAE;YACL,UAAU,CAAC,EAAE,MAAM,CAAC;YACpB,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,YAAY,CAAC,EAAE,MAAM,CAAC;YACtB,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,SAAS,CAAC,EAAE,MAAM,CAAC;SACpB,CAAC;QACF,OAAO,CAAC,EAAE;YACR,YAAY,CAAC,EAAE,MAAM,CAAC;YACtB,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB,CAAC;QACF,MAAM,CAAC,EAAE;YACP,YAAY,CAAC,EAAE,MAAM,CAAC;YACtB,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB,CAAC;QACF,MAAM,CAAC,EAAE;YACP,IAAI,EAAE;gBACJ,YAAY,CAAC,EAAE,MAAM,CAAC;gBACtB,aAAa,CAAC,EAAE,MAAM,CAAC;aACxB,CAAC;YACF,OAAO,EAAE;gBACP,WAAW,CAAC,EAAE,MAAM,CAAC;gBACrB,WAAW,CAAC,EAAE,MAAM,CAAC;aACtB,CAAC;SACH,CAAC;KACH;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/container/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 { BaseComponentProps } from '../internal/base-component';\n\nexport interface ContainerProps extends BaseComponentProps {\n /**\n * Specifies additional analytics-related metadata.\n * * `instanceIdentifier` - A unique string that identifies this component instance in your application.\n * @analytics\n */\n analyticsMetadata?: ContainerProps.AnalyticsMetadata;\n\n /**\n * Heading element of the container. Use the [header component](/components/header/).\n */\n header?: React.ReactNode;\n\n /**\n * Determines whether the container header has padding. If `true`, removes the default padding from the header.\n */\n disableHeaderPaddings?: boolean;\n\n /**\n *\n * Use this slot to render a media element. Supported element types are 'img', 'video', and 'picture'.\n * You can define different positions and sizes for the media element within the container.\n *\n * * `content` - Use this slot to render your media element. We support `img`, `video`, `picture`, and `iframe` elements.\n *\n * * `position` - Defines the media slot's position within the container. Defaults to `top`.\n *\n * * `width` - Defines the width of the media slot when positioned on the side. Corresponds to the `width` CSS-property.\n * When this value is set, media elements larger than the defined width may be cropped, with 'object-fit: cover' centering it.\n * Note: This value is considered only when `position` is set to `side`.\n * If no width is provided, the media slot will take a maximum of 66% of the container's width.\n *\n * * `height` - Defines the height of the media slot when position on the top. Corresponds to the `height` CSS-property.\n * When this value is set, media elements larger than the defined width may be cropped, with 'object-fit: cover' centering it. * Note: This value is only considered if `position` is set to `top`.\n * If no height is provided, the media slot will be displayed at its full height.\n *\n */\n media?: ContainerProps.Media;\n\n /**\n * Main content of the container.\n */\n children?: React.ReactNode;\n\n /**\n * Determines whether the container content has padding. If `true`, removes the default padding from the content area.\n */\n disableContentPaddings?: boolean;\n\n /**\n * Enabling this property will make the container to fit into available height. If content is too short, the container\n * will stretch, if too long, the container will shrink and show vertical scrollbar.\n *\n * Use this property to align heights of multiple containers displayed in a single row. It is recommended to stretch\n * all containers to the height of the longest one, to avoid extra vertical scroll areas.\n */\n fitHeight?: boolean;\n\n /**\n * Footer of the container.\n */\n footer?: React.ReactNode;\n\n /**\n * Determines whether the container footer has padding. If `true`, removes the default padding from the footer.\n * @awsuiSystem core\n */\n disableFooterPaddings?: boolean;\n\n /**\n * Specify a container variant with one of the following:\n * * `default` - Use this variant in standalone context.\n * * `stacked` - Use this variant adjacent to other stacked containers (such as a container,\n * table).\n * @visualrefresh `stacked` variant\n */\n variant?: 'default' | 'stacked';\n\n /**\n *
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/container/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 { BaseComponentProps } from '../internal/base-component';\n\nexport interface ContainerProps extends BaseComponentProps {\n /**\n * Specifies additional analytics-related metadata.\n * * `instanceIdentifier` - A unique string that identifies this component instance in your application.\n * @analytics\n */\n analyticsMetadata?: ContainerProps.AnalyticsMetadata;\n\n /**\n * Heading element of the container. Use the [header component](/components/header/).\n */\n header?: React.ReactNode;\n\n /**\n * Determines whether the container header has padding. If `true`, removes the default padding from the header.\n */\n disableHeaderPaddings?: boolean;\n\n /**\n *\n * Use this slot to render a media element. Supported element types are 'img', 'video', and 'picture'.\n * You can define different positions and sizes for the media element within the container.\n *\n * * `content` - Use this slot to render your media element. We support `img`, `video`, `picture`, and `iframe` elements.\n *\n * * `position` - Defines the media slot's position within the container. Defaults to `top`.\n *\n * * `width` - Defines the width of the media slot when positioned on the side. Corresponds to the `width` CSS-property.\n * When this value is set, media elements larger than the defined width may be cropped, with 'object-fit: cover' centering it.\n * Note: This value is considered only when `position` is set to `side`.\n * If no width is provided, the media slot will take a maximum of 66% of the container's width.\n *\n * * `height` - Defines the height of the media slot when position on the top. Corresponds to the `height` CSS-property.\n * When this value is set, media elements larger than the defined width may be cropped, with 'object-fit: cover' centering it. * Note: This value is only considered if `position` is set to `top`.\n * If no height is provided, the media slot will be displayed at its full height.\n *\n */\n media?: ContainerProps.Media;\n\n /**\n * Main content of the container.\n */\n children?: React.ReactNode;\n\n /**\n * Determines whether the container content has padding. If `true`, removes the default padding from the content area.\n */\n disableContentPaddings?: boolean;\n\n /**\n * Enabling this property will make the container to fit into available height. If content is too short, the container\n * will stretch, if too long, the container will shrink and show vertical scrollbar.\n *\n * Use this property to align heights of multiple containers displayed in a single row. It is recommended to stretch\n * all containers to the height of the longest one, to avoid extra vertical scroll areas.\n */\n fitHeight?: boolean;\n\n /**\n * Footer of the container.\n */\n footer?: React.ReactNode;\n\n /**\n * Determines whether the container footer has padding. If `true`, removes the default padding from the footer.\n * @awsuiSystem core\n */\n disableFooterPaddings?: boolean;\n\n /**\n * Specify a container variant with one of the following:\n * * `default` - Use this variant in standalone context.\n * * `stacked` - Use this variant adjacent to other stacked containers (such as a container,\n * table).\n * @visualrefresh `stacked` variant\n */\n variant?: 'default' | 'stacked';\n\n /**\n * @awsuiSystem core\n */\n style?: ContainerProps.Style;\n}\n\nexport namespace ContainerProps {\n export interface AnalyticsMetadata {\n instanceIdentifier?: string;\n }\n export interface Media {\n /**\n * Use this slot to render your media element. We support `img`, `video`, `picture`, and `iframe` elements.\n */\n content: React.ReactNode;\n\n /**\n * Defines the media slot's position within the container. Defaults to `top`.\n */\n position?: 'top' | 'side';\n\n /**\n * Defines the width of the media slot when positioned on the side. Corresponds to the `width` CSS-property.\n * When this value is set, the media element may be cropped, with `object-fit: cover` centering it.\n *\n * Note: This value is considered only when `position` is set to `side`.\n * If no width is provided, the media slot will take a maximum of 66% of the container's width.\n */\n width?: string | number;\n\n /**\n * Defines the height of the media slot when position on the top. Corresponds to the `height` CSS-property.\n * When this value is set, the media element may be cropped, with `object-fit: cover` centering it.\n *\n * Note: This value is only considered if `position` is set to `top`.\n * If no height is provided, the media slot will be displayed at its full height.\n */\n height?: string | number;\n }\n\n export interface Style {\n root?: {\n background?: string;\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n boxShadow?: string;\n };\n content?: {\n paddingBlock?: string;\n paddingInline?: string;\n };\n header?: {\n paddingBlock?: string;\n paddingInline?: string;\n };\n footer?: {\n root: {\n paddingBlock?: string;\n paddingInline?: string;\n };\n divider: {\n borderColor?: string;\n borderWidth?: string;\n };\n };\n }\n}\n"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import { addMinutes } from 'date-fns';
|
|
4
4
|
import { warnOnce } from '@cloudscape-design/component-toolkit/internal';
|
|
5
|
-
import {
|
|
5
|
+
import { formatTimeOffsetISOInternal, parseTimezoneOffset, shiftTimezoneOffset } from '../internal/utils/date-time';
|
|
6
6
|
/**
|
|
7
7
|
* Appends a time zone offset to a date string, replacing any existing timezone information.
|
|
8
8
|
*/
|
|
@@ -16,8 +16,8 @@ export function setTimeOffset(value, timeOffset) {
|
|
|
16
16
|
};
|
|
17
17
|
return {
|
|
18
18
|
type: 'absolute',
|
|
19
|
-
startDate: stripTimezone(value.startDate) +
|
|
20
|
-
endDate: stripTimezone(value.endDate) +
|
|
19
|
+
startDate: stripTimezone(value.startDate) + formatTimeOffsetISOInternal(value.startDate, timeOffset.startDate),
|
|
20
|
+
endDate: stripTimezone(value.endDate) + formatTimeOffsetISOInternal(value.endDate, timeOffset.endDate),
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time-offset.js","sourceRoot":"","sources":["../../../src/date-range-picker/time-offset.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEzE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"time-offset.js","sourceRoot":"","sources":["../../../src/date-range-picker/time-offset.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEzE,OAAO,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAGpH;;GAEG;AACH,MAAM,UAAU,aAAa,CAC3B,KAAwC,EACxC,UAAoD;IAEpD,IAAI,CAAC,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,MAAK,UAAU,CAAC,EAAE;QACjC,OAAO,KAAK,CAAC;KACd;IAED,MAAM,aAAa,GAAG,CAAC,UAAkB,EAAU,EAAE;QACnD,iEAAiE;QACjE,OAAO,UAAU,CAAC,OAAO,CAAC,wBAAwB,EAAE,EAAE,CAAC,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BACvD,OAAO,EAAE,aAAa,CAAC,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;aACpD,CAAC;SACH;aAAM,IAAI,UAAU,KAAK,SAAS,EAAE;YACnC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;SACvD;KACF;IACD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;AACtD,CAAC;AAED;;;;;;;;;;;;;;;EAeE;AACF,SAAS,YAAY,CAAC,aAAqB;IACzC,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,aAAa,CAAC,CAAC;IACrC,OAAO,UAAU,CAAC,IAAI,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC,CAAC;AAC9D,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { addMinutes } from 'date-fns';\n\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { formatTimeOffsetISOInternal, parseTimezoneOffset, shiftTimezoneOffset } from '../internal/utils/date-time';\nimport { DateRangePickerProps } from './interfaces';\n\n/**\n * Appends a time zone offset to a date string, replacing any existing timezone information.\n */\nexport function setTimeOffset(\n value: DateRangePickerProps.Value | null,\n timeOffset: { startDate?: number; endDate?: number }\n): DateRangePickerProps.Value | null {\n if (!(value?.type === 'absolute')) {\n return value;\n }\n\n const stripTimezone = (dateString: string): string => {\n // Remove existing timezone info: Z, +HH:MM, -HH:MM, +HHMM, -HHMM\n return dateString.replace(/[Z]$|[+-]\\d{2}:?\\d{2}$/, '');\n };\n\n return {\n type: 'absolute',\n startDate: stripTimezone(value.startDate) + formatTimeOffsetISOInternal(value.startDate, timeOffset.startDate),\n endDate: stripTimezone(value.endDate) + formatTimeOffsetISOInternal(value.endDate, timeOffset.endDate),\n };\n}\n\n/**\n * Re-formats an absolute date range so that it is expressed using the\n * target time offset. The returned value still represents the same range\n * in time, but contains no visible offset.\n */\nexport function shiftTimeOffset(\n value: null | DateRangePickerProps.Value,\n timeOffset: { startDate?: number; endDate?: number }\n): DateRangePickerProps.Value | null {\n if (!value || value.type !== 'absolute') {\n return value;\n }\n\n /*\n This regex matches an ISO date-time (non date-only or month-only) with\n - optional seconds;\n - optional milliseconds;\n - optional time offset or 'Z'.\n */\n const dateTimeRegex = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2})?(\\.\\d{1,3})?(((\\+|-)\\d{2}(:\\d{2})?)|Z)?$/;\n\n if (!dateTimeRegex.test(value.startDate) || !dateTimeRegex.test(value.endDate)) {\n warnOnce(\n 'DateRangePicker',\n 'You have provided a misformatted start or end date. The component will fall back to an empty value. ' +\n 'Dates have to be ISO8601-formatted with an optional time zone offset.'\n );\n return null;\n }\n\n return {\n type: 'absolute',\n startDate: shiftTimezoneOffset(value.startDate, timeOffset.startDate),\n endDate: shiftTimezoneOffset(value.endDate, timeOffset.endDate),\n };\n}\n\nexport type NormalizedTimeOffset =\n | {\n startDate: number;\n endDate: number;\n }\n | {\n startDate: undefined;\n endDate: undefined;\n };\n\nexport function normalizeTimeOffset(\n value: null | DateRangePickerProps.Value,\n getTimeOffset?: DateRangePickerProps.GetTimeOffsetFunction,\n timeOffset?: number\n): NormalizedTimeOffset {\n if (value && value.type === 'absolute') {\n if (getTimeOffset) {\n return {\n startDate: getTimeOffset(parseDateUTC(value.startDate)),\n endDate: getTimeOffset(parseDateUTC(value.endDate)),\n };\n } else if (timeOffset !== undefined) {\n return { startDate: timeOffset, endDate: timeOffset };\n }\n }\n return { startDate: undefined, endDate: undefined };\n}\n\n/*\n Before the getTimeOffset function is used there is no information on the preferred time offset.\n \n Besides, the ISO date string might or might not contain the offset:\n - 2021-02-03T01:02:03\n - 2021-02-03T01:02:03Z\n - 2021-02-03T01:02:03+01:00\n \n For every value above the date is converted to UTC and the following is true:\n date.getUTCFullYear() === 2021\n date.getUTCMonth() === 1\n date.getUTCDate() === 3\n date.getUTCHours() === 1\n date.getUTCMinutes() === 2\n date.getUTCSeconds() === 3\n*/\nfunction parseDateUTC(isoDateString: string): Date {\n const date = new Date(isoDateString);\n return addMinutes(date, parseTimezoneOffset(isoDateString));\n}\n"]}
|
|
@@ -196,30 +196,6 @@ export interface FlashbarProps extends BaseComponentProps {
|
|
|
196
196
|
*/
|
|
197
197
|
i18nStrings?: FlashbarProps.I18nStrings;
|
|
198
198
|
/**
|
|
199
|
-
* Specifies an object of selectors and properties that are used to apply custom styles.
|
|
200
|
-
*
|
|
201
|
-
* - `item.root.background` {error, info, inProgress, success, warning} - (Optional) Background for item types.
|
|
202
|
-
* - `item.root.borderColor` {error, info, inProgress, success, warning} - (Optional) Border color for item types.
|
|
203
|
-
* - `item.root.borderRadius` (string) - (Optional) Item border radius.
|
|
204
|
-
* - `item.root.borderWidth` (string) - (Optional) Item border width.
|
|
205
|
-
* - `item.root.color` {error, info, inProgress, success, warning} - (Optional) Color for item types.
|
|
206
|
-
* - `item.root.focusRing.borderColor` {error, info, inProgress, success, warning} - (Optional) Item focus ring border color.
|
|
207
|
-
* - `item.root.focusRing.borderRadius` (string) - (Optional) Item focus ring border radius.
|
|
208
|
-
* - `item.root.focusRing.borderWidth` (string) - (Optional) Item focus ring border width.
|
|
209
|
-
* - `item.dismissButton.color.active` {error, info, inProgress, success, warning} - (Optional) Color for dismiss button active state.
|
|
210
|
-
* - `item.dismissButton.color.default` {error, info, inProgress, success, warning} - (Optional) Color for dismiss button default state.
|
|
211
|
-
* - `item.dismissButton.color.hover` {error, info, inProgress, success, warning} - (Optional) Color for dismiss button hover state.
|
|
212
|
-
* - `item.dismissButton.focusRing.borderColor` {error, info, inProgress, success, warning} - (Optional) Dismiss button focus ring border color.
|
|
213
|
-
* - `item.dismissButton.focusRing.borderRadius` (string) - (Optional) Dismiss button focus ring border radius.
|
|
214
|
-
* - `item.dismissButton.focusRing.borderWidth` (string) - (Optional) Dismiss button focus ring border width.
|
|
215
|
-
* - `notificationBar.root.background` {active, default, hover} - (Optional) Background for notification bar states.
|
|
216
|
-
* - `notificationBar.root.borderColor` {active, default, hover} - (Optional) Border color for notification bar states.
|
|
217
|
-
* - `notificationBar.root.borderRadius` (string) - (Optional) Notification bar border radius.
|
|
218
|
-
* - `notificationBar.root.borderWidth` (string) - (Optional) Notification bar border width.
|
|
219
|
-
* - `notificationBar.root.color` {active, default, hover} - (Optional) Color for notification bar states.
|
|
220
|
-
* - `notificationBar.expandButton.focusRing.borderColor` (string) - (Optional) Border color for the expand button.
|
|
221
|
-
* - `notificationBar.expandButton.focusRing.borderRadius` (string) - (Optional) Border radius for the expand button.
|
|
222
|
-
* - `notificationBar.expandButton.focusRing.borderWidth` (string) - (Optional) Border width for the expand button.
|
|
223
199
|
* @awsuiSystem core
|
|
224
200
|
*/
|
|
225
201
|
style?: FlashbarProps.Style;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/flashbar/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,yBAAiB,aAAa,CAAC;IAC7B,UAAiB,iBAAiB;QAChC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QACzB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,IAAI,CAAC,EAAE,aAAa,CAAC,IAAI,CAAC;QAC1B,QAAQ,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC;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GAAG,OAAO,GAAG,aAAa,CAAC;IAC5E,KAAY,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;CAC3C;AAED,MAAM,WAAW,aAAc,SAAQ,kBAAkB;IACvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,KAAK,EAAE,aAAa,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAEtD;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;;;;;;;;;;;OAeG;IACH,WAAW,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC;IAExC;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC,KAAK,CAAC;CAC7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/flashbar/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { ButtonProps } from '../button/interfaces';\nimport { ErrorContext } from '../internal/analytics/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport namespace FlashbarProps {\n export interface MessageDefinition {\n header?: React.ReactNode;\n content?: React.ReactNode;\n dismissible?: boolean;\n dismissLabel?: string;\n statusIconAriaLabel?: string;\n loading?: boolean;\n type?: FlashbarProps.Type;\n ariaRole?: FlashbarProps.AriaRole;\n action?: React.ReactNode;\n id?: string;\n buttonText?: ButtonProps['children'];\n onButtonClick?: ButtonProps['onClick'];\n onDismiss?: ButtonProps['onClick'];\n analyticsMetadata?: FlashbarProps.ItemAnalyticsMetadata;\n }\n\n export interface ItemAnalyticsMetadata {\n suppressFlowMetricEvents?: boolean;\n errorContext?: ErrorContext;\n }\n\n export interface I18nStrings {\n ariaLabel?: string;\n errorIconAriaLabel?: string;\n infoIconAriaLabel?: string;\n inProgressIconAriaLabel?: string;\n notificationBarAriaLabel?: string;\n notificationBarText?: string;\n successIconAriaLabel?: string;\n warningIconAriaLabel?: string;\n }\n\n export interface Style {\n item?: {\n root?: {\n background?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderColor?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n color?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n focusRing?: {\n borderColor?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n dismissButton?: {\n color?: {\n active?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n default?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n hover?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n };\n focusRing?: {\n borderColor?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n };\n notificationBar?: {\n root?: {\n background?: {\n active?: string;\n default?: string;\n hover?: string;\n };\n borderColor?: {\n active?: string;\n default?: string;\n hover?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n color?: {\n active?: string;\n default?: string;\n hover?: string;\n };\n };\n expandButton?: {\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n };\n }\n\n export type Type = 'success' | 'warning' | 'info' | 'error' | 'in-progress';\n export type AriaRole = 'alert' | 'status';\n}\n\nexport interface FlashbarProps extends BaseComponentProps {\n /**\n * Specifies flash messages that appear in the same order that they are listed.\n * The value is an array of flash message definition objects.\n *\n * A flash message object contains the following properties:\n * * `header` (ReactNode) - Specifies the heading text.\n * * `content` (ReactNode) - Specifies the primary text displayed in the flash element.\n * * `type` (string) - Indicates the type of the message to be displayed. Allowed values are as follows: `success, error, warning, info, in-progress`. The default is `info`.\n * * `loading` (boolean) - Replaces the status icon with a spinner and forces the type to `info`.\n * * `dismissible` (boolean) - Determines whether the component includes a close button icon. By default, the close button is not included.\n * When a user clicks on this button the `onDismiss` handler is called.\n * * `dismissLabel` (string) - Specifies an `aria-label` for to the dismiss icon button for improved accessibility.\n * * `statusIconAriaLabel` (string) - Specifies an `aria-label` for to the status icon for improved accessibility.\n * If not provided, `i18nStrings.{type}IconAriaLabel` will be used as a fallback.\n * * `ariaRole` (string) - For flash messages added after page load, specifies how this message is communicated to assistive\n * technology. Use \"status\" for status updates or informational content. Use \"alert\" for important messages that need the\n * user's attention.\n * * `action` (ReactNode) - Specifies an action for the flash message. Although it is technically possible to insert any content,\n * our UX guidelines only allow you to add a button.\n * * `buttonText` (string) - Specifies that an action button should be displayed, with the specified text.\n * When a user clicks on this button the `onButtonClick` handler is called.\n * If the `action` property is set, this property is ignored. **Deprecated**, replaced by `action`.\n * * `onButtonClick` (event => void) - Called when a user clicks on the action button. This is not called if you create a custom button\n * using the `action` property. **Deprecated**, replaced by `action`.\n * * `onDismiss` (event => void) - (Optional) Called when a user clicks on the dismiss button.\n * * `id` (string) - Specifies a unique flash message identifier. This property is used in two ways:\n * 1. As a [keys](https://reactjs.org/docs/lists-and-keys.html#keys) source for React rendering.\n * 2. To identify which flash message will be removed from the DOM when it is dismissed, to animate it out.\n * * `analyticsMetadata` (FlashbarProps.ItemAnalyticsMetadata) - (Optional) Specifies additional analytics-related metadata.\n * * `suppressFlowMetricEvents` - Prevent this item from generating events related to flow metrics.\n * @analytics\n */\n items: ReadonlyArray<FlashbarProps.MessageDefinition>;\n\n /**\n * Specifies whether flash messages should be stacked.\n */\n stackItems?: boolean;\n\n /**\n * An object containing all the necessary localized strings required by the component. The object should contain:\n *\n * * `ariaLabel` - Specifies the ARIA label for the list of notifications.\n *\n * If `stackItems` is set to `true`, it should also contain:\n *\n * * `notificationBarAriaLabel` - (optional) Specifies the ARIA label for the notification bar\n * * `notificationBarText` - (optional) Specifies the text shown in the notification bar\n * * `errorIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `error`.\n * * `warningIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `warning`.\n * * `infoIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `info`.\n * * `successIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `success`.\n * * `inProgressIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `in-progress` or with `loading` set to `true`.\n * @i18n\n */\n i18nStrings?: FlashbarProps.I18nStrings;\n\n /**\n * Specifies an object of selectors and properties that are used to apply custom styles.\n *\n * - `item.root.background` {error, info, inProgress, success, warning} - (Optional) Background for item types.\n * - `item.root.borderColor` {error, info, inProgress, success, warning} - (Optional) Border color for item types.\n * - `item.root.borderRadius` (string) - (Optional) Item border radius.\n * - `item.root.borderWidth` (string) - (Optional) Item border width.\n * - `item.root.color` {error, info, inProgress, success, warning} - (Optional) Color for item types.\n * - `item.root.focusRing.borderColor` {error, info, inProgress, success, warning} - (Optional) Item focus ring border color.\n * - `item.root.focusRing.borderRadius` (string) - (Optional) Item focus ring border radius.\n * - `item.root.focusRing.borderWidth` (string) - (Optional) Item focus ring border width.\n * - `item.dismissButton.color.active` {error, info, inProgress, success, warning} - (Optional) Color for dismiss button active state.\n * - `item.dismissButton.color.default` {error, info, inProgress, success, warning} - (Optional) Color for dismiss button default state.\n * - `item.dismissButton.color.hover` {error, info, inProgress, success, warning} - (Optional) Color for dismiss button hover state.\n * - `item.dismissButton.focusRing.borderColor` {error, info, inProgress, success, warning} - (Optional) Dismiss button focus ring border color.\n * - `item.dismissButton.focusRing.borderRadius` (string) - (Optional) Dismiss button focus ring border radius.\n * - `item.dismissButton.focusRing.borderWidth` (string) - (Optional) Dismiss button focus ring border width.\n * - `notificationBar.root.background` {active, default, hover} - (Optional) Background for notification bar states.\n * - `notificationBar.root.borderColor` {active, default, hover} - (Optional) Border color for notification bar states.\n * - `notificationBar.root.borderRadius` (string) - (Optional) Notification bar border radius.\n * - `notificationBar.root.borderWidth` (string) - (Optional) Notification bar border width.\n * - `notificationBar.root.color` {active, default, hover} - (Optional) Color for notification bar states.\n * - `notificationBar.expandButton.focusRing.borderColor` (string) - (Optional) Border color for the expand button.\n * - `notificationBar.expandButton.focusRing.borderRadius` (string) - (Optional) Border radius for the expand button.\n * - `notificationBar.expandButton.focusRing.borderWidth` (string) - (Optional) Border width for the expand button.\n * @awsuiSystem core\n */\n style?: FlashbarProps.Style;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/flashbar/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { ButtonProps } from '../button/interfaces';\nimport { ErrorContext } from '../internal/analytics/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport namespace FlashbarProps {\n export interface MessageDefinition {\n header?: React.ReactNode;\n content?: React.ReactNode;\n dismissible?: boolean;\n dismissLabel?: string;\n statusIconAriaLabel?: string;\n loading?: boolean;\n type?: FlashbarProps.Type;\n ariaRole?: FlashbarProps.AriaRole;\n action?: React.ReactNode;\n id?: string;\n buttonText?: ButtonProps['children'];\n onButtonClick?: ButtonProps['onClick'];\n onDismiss?: ButtonProps['onClick'];\n analyticsMetadata?: FlashbarProps.ItemAnalyticsMetadata;\n }\n\n export interface ItemAnalyticsMetadata {\n suppressFlowMetricEvents?: boolean;\n errorContext?: ErrorContext;\n }\n\n export interface I18nStrings {\n ariaLabel?: string;\n errorIconAriaLabel?: string;\n infoIconAriaLabel?: string;\n inProgressIconAriaLabel?: string;\n notificationBarAriaLabel?: string;\n notificationBarText?: string;\n successIconAriaLabel?: string;\n warningIconAriaLabel?: string;\n }\n\n export interface Style {\n item?: {\n root?: {\n background?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderColor?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n color?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n focusRing?: {\n borderColor?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n dismissButton?: {\n color?: {\n active?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n default?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n hover?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n };\n focusRing?: {\n borderColor?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n };\n notificationBar?: {\n root?: {\n background?: {\n active?: string;\n default?: string;\n hover?: string;\n };\n borderColor?: {\n active?: string;\n default?: string;\n hover?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n color?: {\n active?: string;\n default?: string;\n hover?: string;\n };\n };\n expandButton?: {\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n };\n }\n\n export type Type = 'success' | 'warning' | 'info' | 'error' | 'in-progress';\n export type AriaRole = 'alert' | 'status';\n}\n\nexport interface FlashbarProps extends BaseComponentProps {\n /**\n * Specifies flash messages that appear in the same order that they are listed.\n * The value is an array of flash message definition objects.\n *\n * A flash message object contains the following properties:\n * * `header` (ReactNode) - Specifies the heading text.\n * * `content` (ReactNode) - Specifies the primary text displayed in the flash element.\n * * `type` (string) - Indicates the type of the message to be displayed. Allowed values are as follows: `success, error, warning, info, in-progress`. The default is `info`.\n * * `loading` (boolean) - Replaces the status icon with a spinner and forces the type to `info`.\n * * `dismissible` (boolean) - Determines whether the component includes a close button icon. By default, the close button is not included.\n * When a user clicks on this button the `onDismiss` handler is called.\n * * `dismissLabel` (string) - Specifies an `aria-label` for to the dismiss icon button for improved accessibility.\n * * `statusIconAriaLabel` (string) - Specifies an `aria-label` for to the status icon for improved accessibility.\n * If not provided, `i18nStrings.{type}IconAriaLabel` will be used as a fallback.\n * * `ariaRole` (string) - For flash messages added after page load, specifies how this message is communicated to assistive\n * technology. Use \"status\" for status updates or informational content. Use \"alert\" for important messages that need the\n * user's attention.\n * * `action` (ReactNode) - Specifies an action for the flash message. Although it is technically possible to insert any content,\n * our UX guidelines only allow you to add a button.\n * * `buttonText` (string) - Specifies that an action button should be displayed, with the specified text.\n * When a user clicks on this button the `onButtonClick` handler is called.\n * If the `action` property is set, this property is ignored. **Deprecated**, replaced by `action`.\n * * `onButtonClick` (event => void) - Called when a user clicks on the action button. This is not called if you create a custom button\n * using the `action` property. **Deprecated**, replaced by `action`.\n * * `onDismiss` (event => void) - (Optional) Called when a user clicks on the dismiss button.\n * * `id` (string) - Specifies a unique flash message identifier. This property is used in two ways:\n * 1. As a [keys](https://reactjs.org/docs/lists-and-keys.html#keys) source for React rendering.\n * 2. To identify which flash message will be removed from the DOM when it is dismissed, to animate it out.\n * * `analyticsMetadata` (FlashbarProps.ItemAnalyticsMetadata) - (Optional) Specifies additional analytics-related metadata.\n * * `suppressFlowMetricEvents` - Prevent this item from generating events related to flow metrics.\n * @analytics\n */\n items: ReadonlyArray<FlashbarProps.MessageDefinition>;\n\n /**\n * Specifies whether flash messages should be stacked.\n */\n stackItems?: boolean;\n\n /**\n * An object containing all the necessary localized strings required by the component. The object should contain:\n *\n * * `ariaLabel` - Specifies the ARIA label for the list of notifications.\n *\n * If `stackItems` is set to `true`, it should also contain:\n *\n * * `notificationBarAriaLabel` - (optional) Specifies the ARIA label for the notification bar\n * * `notificationBarText` - (optional) Specifies the text shown in the notification bar\n * * `errorIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `error`.\n * * `warningIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `warning`.\n * * `infoIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `info`.\n * * `successIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `success`.\n * * `inProgressIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `in-progress` or with `loading` set to `true`.\n * @i18n\n */\n i18nStrings?: FlashbarProps.I18nStrings;\n\n /**\n * @awsuiSystem core\n */\n style?: FlashbarProps.Style;\n}\n"]}
|
|
@@ -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 (ed72f6c6)";
|
|
3
|
+
export var GIT_SHA = "ed72f6c6";
|
|
4
4
|
export var THEME = "open-source-visual-refresh";
|
|
5
5
|
export var SYSTEM = "console";
|
|
6
6
|
export var ALWAYS_VISUAL_REFRESH = true;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formats timezone offset values used in for APIs, maintaining backward compatibility. Always
|
|
3
|
+
* returns "+HH:MM" format, even for UTC ("+00:00"). Used by onChange events to preserve existing
|
|
4
|
+
* API behavior.
|
|
5
|
+
*/
|
|
6
|
+
export declare function formatTimeOffsetISOInternal(isoDate: string, offsetInMinutes?: number): string;
|
|
7
|
+
/**
|
|
8
|
+
* Formats timezone offset for display purposes using succinct UTC notation.
|
|
9
|
+
* Returns "Z" for UTC, "+HH:MM" for other offsets.
|
|
10
|
+
* Used for visual display in components like date-range-picker trigger text.
|
|
11
|
+
*/
|
|
1
12
|
export declare function formatTimeOffsetISO(isoDate: string, offsetInMinutes?: number): string;
|
|
2
13
|
export declare function formatTimeOffsetLocalized(isoDate: string, offsetInMinutes?: number): string;
|
|
3
14
|
//# sourceMappingURL=format-time-offset.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-time-offset.d.ts","sourceRoot":"","sources":["../../../../../src/internal/utils/date-time/format-time-offset.ts"],"names":[],"mappings":"AAKA,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,UAW5E;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,UAYlF"}
|
|
1
|
+
{"version":3,"file":"format-time-offset.d.ts","sourceRoot":"","sources":["../../../../../src/internal/utils/date-time/format-time-offset.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,UAQpF;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,UAW5E;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,UAYlF"}
|
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import { padLeftZeros } from '../strings';
|
|
4
|
+
/**
|
|
5
|
+
* Formats timezone offset values used in for APIs, maintaining backward compatibility. Always
|
|
6
|
+
* returns "+HH:MM" format, even for UTC ("+00:00"). Used by onChange events to preserve existing
|
|
7
|
+
* API behavior.
|
|
8
|
+
*/
|
|
9
|
+
export function formatTimeOffsetISOInternal(isoDate, offsetInMinutes) {
|
|
10
|
+
offsetInMinutes = defaultToLocal(isoDate, offsetInMinutes);
|
|
11
|
+
const { hours, minutes } = getMinutesAndHours(offsetInMinutes);
|
|
12
|
+
const sign = offsetInMinutes < 0 ? '-' : '+';
|
|
13
|
+
const formattedOffset = `${sign}${formatISO2Digits(hours)}:${formatISO2Digits(minutes)}`;
|
|
14
|
+
return formattedOffset;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Formats timezone offset for display purposes using succinct UTC notation.
|
|
18
|
+
* Returns "Z" for UTC, "+HH:MM" for other offsets.
|
|
19
|
+
* Used for visual display in components like date-range-picker trigger text.
|
|
20
|
+
*/
|
|
4
21
|
export function formatTimeOffsetISO(isoDate, offsetInMinutes) {
|
|
5
22
|
offsetInMinutes = defaultToLocal(isoDate, offsetInMinutes);
|
|
6
23
|
if (offsetInMinutes === 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-time-offset.js","sourceRoot":"","sources":["../../../../../src/internal/utils/date-time/format-time-offset.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,UAAU,mBAAmB,CAAC,OAAe,EAAE,eAAwB;IAC3E,eAAe,GAAG,cAAc,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IAC3D,IAAI,eAAe,KAAK,CAAC,EAAE;QACzB,OAAO,GAAG,CAAC;KACZ;IACD,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC;IAE/D,MAAM,IAAI,GAAG,eAAe,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;IAC7C,MAAM,eAAe,GAAG,GAAG,IAAI,GAAG,gBAAgB,CAAC,KAAK,CAAC,IAAI,gBAAgB,CAAC,OAAO,CAAC,EAAE,CAAC;IAEzF,OAAO,eAAe,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,OAAe,EAAE,eAAwB;IACjF,eAAe,GAAG,cAAc,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IAC3D,IAAI,eAAe,KAAK,CAAC,EAAE;QACzB,OAAO,OAAO,CAAC;KAChB;IACD,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC;IAE/D,MAAM,IAAI,GAAG,eAAe,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;IAC7C,MAAM,gBAAgB,GAAG,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,OAAO,EAAE,CAAC;IAC5D,MAAM,eAAe,GAAG,OAAO,IAAI,GAAG,KAAK,GAAG,gBAAgB,GAAG,CAAC;IAElE,OAAO,eAAe,CAAC;AACzB,CAAC;AAED,SAAS,cAAc,CAAC,OAAe,EAAE,eAAwB;IAC/D,OAAO,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,CAAC,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,iBAAiB,EAAE,CAAC;AACtE,CAAC;AAED,SAAS,kBAAkB,CAAC,OAAe;IACzC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,OAAO,GAAG,EAAE,CAAC,EAAE,CAAC;AACxF,CAAC;AAED,SAAS,gBAAgB,CAAC,CAAS;IACjC,OAAO,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACvC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { padLeftZeros } from '../strings';\n\nexport function formatTimeOffsetISO(isoDate: string, offsetInMinutes?: number) {\n offsetInMinutes = defaultToLocal(isoDate, offsetInMinutes);\n if (offsetInMinutes === 0) {\n return 'Z';\n }\n const { hours, minutes } = getMinutesAndHours(offsetInMinutes);\n\n const sign = offsetInMinutes < 0 ? '-' : '+';\n const formattedOffset = `${sign}${formatISO2Digits(hours)}:${formatISO2Digits(minutes)}`;\n\n return formattedOffset;\n}\n\nexport function formatTimeOffsetLocalized(isoDate: string, offsetInMinutes?: number) {\n offsetInMinutes = defaultToLocal(isoDate, offsetInMinutes);\n if (offsetInMinutes === 0) {\n return '(UTC)';\n }\n const { hours, minutes } = getMinutesAndHours(offsetInMinutes);\n\n const sign = offsetInMinutes < 0 ? '-' : '+';\n const formattedMinutes = minutes === 0 ? '' : `:${minutes}`;\n const formattedOffset = `(UTC${sign}${hours}${formattedMinutes})`;\n\n return formattedOffset;\n}\n\nfunction defaultToLocal(isoDate: string, offsetInMinutes?: number) {\n return offsetInMinutes ?? 0 - new Date(isoDate).getTimezoneOffset();\n}\n\nfunction getMinutesAndHours(minutes: number) {\n return { hours: Math.floor(Math.abs(minutes) / 60), minutes: Math.abs(minutes % 60) };\n}\n\nfunction formatISO2Digits(n: number) {\n return padLeftZeros(n.toFixed(0), 2);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"format-time-offset.js","sourceRoot":"","sources":["../../../../../src/internal/utils/date-time/format-time-offset.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C;;;;GAIG;AACH,MAAM,UAAU,2BAA2B,CAAC,OAAe,EAAE,eAAwB;IACnF,eAAe,GAAG,cAAc,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IAC3D,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC;IAE/D,MAAM,IAAI,GAAG,eAAe,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;IAC7C,MAAM,eAAe,GAAG,GAAG,IAAI,GAAG,gBAAgB,CAAC,KAAK,CAAC,IAAI,gBAAgB,CAAC,OAAO,CAAC,EAAE,CAAC;IAEzF,OAAO,eAAe,CAAC;AACzB,CAAC;AAED;;;;GAIG;AACH,MAAM,U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C;AACtE,CAAC;AAED,SAAS,kBAAkB,CAAC,OAAe;IACzC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,OAAO,GAAG,EAAE,CAAC,EAAE,CAAC;AACxF,CAAC;AAED,SAAS,gBAAgB,CAAC,CAAS;IACjC,OAAO,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACvC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { padLeftZeros } from '../strings';\n\n/**\n * Formats timezone offset values used in for APIs, maintaining backward compatibility. Always\n * returns \"+HH:MM\" format, even for UTC (\"+00:00\"). Used by onChange events to preserve existing\n * API behavior.\n */\nexport function formatTimeOffsetISOInternal(isoDate: string, offsetInMinutes?: number) {\n offsetInMinutes = defaultToLocal(isoDate, offsetInMinutes);\n const { hours, minutes } = getMinutesAndHours(offsetInMinutes);\n\n const sign = offsetInMinutes < 0 ? '-' : '+';\n const formattedOffset = `${sign}${formatISO2Digits(hours)}:${formatISO2Digits(minutes)}`;\n\n return formattedOffset;\n}\n\n/**\n * Formats timezone offset for display purposes using succinct UTC notation.\n * Returns \"Z\" for UTC, \"+HH:MM\" for other offsets.\n * Used for visual display in components like date-range-picker trigger text.\n */\nexport function formatTimeOffsetISO(isoDate: string, offsetInMinutes?: number) {\n offsetInMinutes = defaultToLocal(isoDate, offsetInMinutes);\n if (offsetInMinutes === 0) {\n return 'Z';\n }\n const { hours, minutes } = getMinutesAndHours(offsetInMinutes);\n\n const sign = offsetInMinutes < 0 ? '-' : '+';\n const formattedOffset = `${sign}${formatISO2Digits(hours)}:${formatISO2Digits(minutes)}`;\n\n return formattedOffset;\n}\n\nexport function formatTimeOffsetLocalized(isoDate: string, offsetInMinutes?: number) {\n offsetInMinutes = defaultToLocal(isoDate, offsetInMinutes);\n if (offsetInMinutes === 0) {\n return '(UTC)';\n }\n const { hours, minutes } = getMinutesAndHours(offsetInMinutes);\n\n const sign = offsetInMinutes < 0 ? '-' : '+';\n const formattedMinutes = minutes === 0 ? '' : `:${minutes}`;\n const formattedOffset = `(UTC${sign}${hours}${formattedMinutes})`;\n\n return formattedOffset;\n}\n\nfunction defaultToLocal(isoDate: string, offsetInMinutes?: number) {\n return offsetInMinutes ?? 0 - new Date(isoDate).getTimezoneOffset();\n}\n\nfunction getMinutesAndHours(minutes: number) {\n return { hours: Math.floor(Math.abs(minutes) / 60), minutes: Math.abs(minutes % 60) };\n}\n\nfunction formatISO2Digits(n: number) {\n return padLeftZeros(n.toFixed(0), 2);\n}\n"]}
|
|
@@ -3,7 +3,7 @@ export { formatDateTimeWithOffset } from './format-date-time-with-offset';
|
|
|
3
3
|
export { formatDate } from './format-date';
|
|
4
4
|
export { formatTime } from './format-time';
|
|
5
5
|
export { formatDateTime } from './format-date-time';
|
|
6
|
-
export { formatTimeOffsetISO } from './format-time-offset';
|
|
6
|
+
export { formatTimeOffsetISO, formatTimeOffsetISOInternal } from './format-time-offset';
|
|
7
7
|
export { isIsoDateOnly, isIsoMonthOnly } from './is-iso-only';
|
|
8
8
|
export { joinDateTime, splitDateTime } from './join-date-time';
|
|
9
9
|
export { parseDate } from './parse-date';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/utils/date-time/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/utils/date-time/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -5,7 +5,7 @@ export { formatDateTimeWithOffset } from './format-date-time-with-offset';
|
|
|
5
5
|
export { formatDate } from './format-date';
|
|
6
6
|
export { formatTime } from './format-time';
|
|
7
7
|
export { formatDateTime } from './format-date-time';
|
|
8
|
-
export { formatTimeOffsetISO } from './format-time-offset';
|
|
8
|
+
export { formatTimeOffsetISO, formatTimeOffsetISOInternal } from './format-time-offset';
|
|
9
9
|
export { isIsoDateOnly, isIsoMonthOnly } from './is-iso-only';
|
|
10
10
|
export { joinDateTime, splitDateTime } from './join-date-time';
|
|
11
11
|
export { parseDate } from './parse-date';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/utils/date-time/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/utils/date-time/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport { isoToDisplay, displayToIso } from './display-format';\nexport { formatDateTimeWithOffset } from './format-date-time-with-offset';\nexport { formatDate } from './format-date';\nexport { formatTime } from './format-time';\nexport { formatDateTime } from './format-date-time';\nexport { formatTimeOffsetISO, formatTimeOffsetISOInternal } from './format-time-offset';\nexport { isIsoDateOnly, isIsoMonthOnly } from './is-iso-only';\nexport { joinDateTime, splitDateTime } from './join-date-time';\nexport { parseDate } from './parse-date';\nexport { parseTimezoneOffset } from './parse-timezone-offset';\nexport { shiftTimezoneOffset } from './shift-timezone-offset';\n"]}
|
|
@@ -87,12 +87,6 @@ export interface LinkProps extends BaseComponentProps {
|
|
|
87
87
|
*/
|
|
88
88
|
rel?: string;
|
|
89
89
|
/**
|
|
90
|
-
* Specifies an object of selectors and properties that are used to apply custom styles.
|
|
91
|
-
*
|
|
92
|
-
* - `root.color` {active, default, hover} (string) - (Optional) Text color for link.
|
|
93
|
-
* - `root.focusRing.borderColor` (string) - (Optional) Focus ring border color.
|
|
94
|
-
* - `root.focusRing.borderRadius` (string) - (Optional) Focus ring border radius.
|
|
95
|
-
* - `root.focusRing.borderWidth` (string) - (Optional) Focus ring border width.
|
|
96
90
|
* @awsuiSystem core
|
|
97
91
|
*/
|
|
98
92
|
style?: LinkProps.Style;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/link/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,WAAW,IAAI,YAAY,EAC3B,yBAAyB,EAC1B,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,SAAU,SAAQ,kBAAkB;IACnD;;;;;;;;;;;;;;;;;OAiBG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC;IAE5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC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;gBACtB,WAAW,CAAC,EAAE,MAAM,CAAC;aACtB,CAAC;SACH,CAAC;KACH;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/link/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 { BaseComponentProps } from '../internal/base-component';\nimport {\n BaseNavigationDetail,\n CancelableEventHandler,\n ClickDetail as _ClickDetail,\n NonCancelableEventHandler,\n} from '../internal/events';\n\nexport interface LinkProps extends BaseComponentProps {\n /**\n * Determines the visual style of the link as follows:\n *\n * - `primary` - Displays the link text with bold styling for sufficient contrast with surrounding text.\n * Use this for links where the context doesn't imply interactivity such as\n * \"Learn more\" links and links within paragraphs.\n * - `secondary` - Does not provide any additional indicators for interactivity (except for an underline when the user hovers over or focuses the link).\n * This can be used in cases where the interactivity is strongly implied by its context,\n * such as in a table or a list of external links.\n * - `info` - Use for \"info\" links that link to content in a help panel.\n *\n * The default is `secondary`, except inside the following components where it defaults to `primary`:\n * - Table\n * - Cards\n * - Alert\n * - Popover\n * - Help Panel (main `content` only)\n */\n variant?: LinkProps.Variant;\n\n /**\n * Determines the font size and line height.\n * This property is overridden if the variant is `info`.\n */\n fontSize?: LinkProps.FontSize;\n\n /**\n * Determines the text color of the link and its icon.\n *\n * - `normal`: Use in most cases where a link is required.\n * - `inverted`: Use to style links inside Flashbars.\n *\n * This property is overridden if the variant is `info`.\n */\n color?: LinkProps.Color;\n\n /**\n * Marks the link as external by adding an icon after the text. If `href`\n * is provided, opens the link in a new tab when clicked.\n */\n external?: boolean;\n\n /**\n * Specifies where to open the linked URL. Set this to `_blank` to open the URL\n * in a new tab. If you set this property to `_blank`, the component\n * automatically adds `rel=\"noopener noreferrer\"` to avoid performance\n * and security issues.\n *\n * For other options see the documentation for <a> tag's\n * [target attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target).\n */\n target?: string;\n\n /**\n * The URL that the link points to.\n * If an `href` is not provided, the component will render using a\n * \"button\" role and `target` will not be used.\n */\n href?: string;\n\n /**\n * The text to render inside the link.\n */\n children?: React.ReactNode;\n\n /**\n * Adds an aria-label to the HTML element.\n */\n ariaLabel?: string;\n\n /**\n * Adds an aria-label to the external icon.\n * @i18n\n */\n externalIconAriaLabel?: string;\n\n /**\n * Called when a link is clicked without any modifier keys. If the link has no `href` provided, it will be called on\n * all clicks.\n *\n * If you want to implement client-side routing yourself, use this event and prevent default browser navigation\n * (by calling `preventDefault`).\n */\n onFollow?: CancelableEventHandler<LinkProps.FollowDetail>;\n\n /**\n * Called when the user clicks on the link. Do not use this handler for navigation, use the `onFollow` event instead.\n */\n onClick?: NonCancelableEventHandler<LinkProps.ClickDetail>;\n\n /**\n * Adds a `rel` attribute to the link. If the `rel` property is provided, it overrides the default behaviour.\n * By default, the component sets the `rel` attribute to \"noopener noreferrer\" when `external` is `true` or `target` is `\"_blank\"`.\n */\n rel?: string;\n\n /**\n *
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/link/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 { BaseComponentProps } from '../internal/base-component';\nimport {\n BaseNavigationDetail,\n CancelableEventHandler,\n ClickDetail as _ClickDetail,\n NonCancelableEventHandler,\n} from '../internal/events';\n\nexport interface LinkProps extends BaseComponentProps {\n /**\n * Determines the visual style of the link as follows:\n *\n * - `primary` - Displays the link text with bold styling for sufficient contrast with surrounding text.\n * Use this for links where the context doesn't imply interactivity such as\n * \"Learn more\" links and links within paragraphs.\n * - `secondary` - Does not provide any additional indicators for interactivity (except for an underline when the user hovers over or focuses the link).\n * This can be used in cases where the interactivity is strongly implied by its context,\n * such as in a table or a list of external links.\n * - `info` - Use for \"info\" links that link to content in a help panel.\n *\n * The default is `secondary`, except inside the following components where it defaults to `primary`:\n * - Table\n * - Cards\n * - Alert\n * - Popover\n * - Help Panel (main `content` only)\n */\n variant?: LinkProps.Variant;\n\n /**\n * Determines the font size and line height.\n * This property is overridden if the variant is `info`.\n */\n fontSize?: LinkProps.FontSize;\n\n /**\n * Determines the text color of the link and its icon.\n *\n * - `normal`: Use in most cases where a link is required.\n * - `inverted`: Use to style links inside Flashbars.\n *\n * This property is overridden if the variant is `info`.\n */\n color?: LinkProps.Color;\n\n /**\n * Marks the link as external by adding an icon after the text. If `href`\n * is provided, opens the link in a new tab when clicked.\n */\n external?: boolean;\n\n /**\n * Specifies where to open the linked URL. Set this to `_blank` to open the URL\n * in a new tab. If you set this property to `_blank`, the component\n * automatically adds `rel=\"noopener noreferrer\"` to avoid performance\n * and security issues.\n *\n * For other options see the documentation for <a> tag's\n * [target attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target).\n */\n target?: string;\n\n /**\n * The URL that the link points to.\n * If an `href` is not provided, the component will render using a\n * \"button\" role and `target` will not be used.\n */\n href?: string;\n\n /**\n * The text to render inside the link.\n */\n children?: React.ReactNode;\n\n /**\n * Adds an aria-label to the HTML element.\n */\n ariaLabel?: string;\n\n /**\n * Adds an aria-label to the external icon.\n * @i18n\n */\n externalIconAriaLabel?: string;\n\n /**\n * Called when a link is clicked without any modifier keys. If the link has no `href` provided, it will be called on\n * all clicks.\n *\n * If you want to implement client-side routing yourself, use this event and prevent default browser navigation\n * (by calling `preventDefault`).\n */\n onFollow?: CancelableEventHandler<LinkProps.FollowDetail>;\n\n /**\n * Called when the user clicks on the link. Do not use this handler for navigation, use the `onFollow` event instead.\n */\n onClick?: NonCancelableEventHandler<LinkProps.ClickDetail>;\n\n /**\n * Adds a `rel` attribute to the link. If the `rel` property is provided, it overrides the default behaviour.\n * By default, the component sets the `rel` attribute to \"noopener noreferrer\" when `external` is `true` or `target` is `\"_blank\"`.\n */\n rel?: string;\n\n /**\n * @awsuiSystem core\n */\n style?: LinkProps.Style;\n}\n\nexport namespace LinkProps {\n export type Variant = 'primary' | 'secondary' | 'info' | 'awsui-value-large';\n export type FontSize =\n | 'body-s'\n | 'body-m'\n | 'heading-xs'\n | 'heading-s'\n | 'heading-m'\n | 'heading-l'\n | 'heading-xl'\n | 'display-l'\n | 'inherit';\n export type Color = 'normal' | 'inverted';\n\n export type FollowDetail = BaseNavigationDetail;\n\n export interface Ref {\n /**\n * Sets the browser focus on the anchor element.\n */\n focus(): void;\n }\n\n export type ClickDetail = _ClickDetail;\n export interface Style {\n root?: {\n color?: {\n active?: string;\n default?: string;\n hover?: string;\n };\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n }\n}\n"]}
|
|
@@ -52,7 +52,6 @@ export interface RadioGroupProps extends BaseComponentProps, FormFieldControlPro
|
|
|
52
52
|
*/
|
|
53
53
|
readOnly?: boolean;
|
|
54
54
|
/**
|
|
55
|
-
* Specifies an object of selectors and properties that are used to apply custom styles.
|
|
56
55
|
* @awsuiSystem core
|
|
57
56
|
*/
|
|
58
57
|
style?: RadioGroupProps.Style;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/radio-group/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,eAAgB,SAAQ,kBAAkB,EAAE,qBAAqB;IAChF;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC,e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MAAM,CAAC;gBACjB,OAAO,CAAC,EAAE,MAAM,CAAC;gBACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;gBAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;aACnB,CAAC;SACH,CAAC;QACF,WAAW,CAAC,EAAE;YACZ,KAAK,CAAC,EAAE;gBACN,OAAO,CAAC,EAAE,MAAM,CAAC;gBACjB,OAAO,CAAC,EAAE,MAAM,CAAC;gBACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;gBAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;aACnB,CAAC;SACH,CAAC;KACH;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/radio-group/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 { BaseComponentProps } from '../internal/base-component';\nimport { FormFieldControlProps } from '../internal/context/form-field-context';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface RadioGroupProps extends BaseComponentProps, FormFieldControlProps {\n /**\n * Specify a custom name for the radio buttons. If not provided, the radio group generates a random name.\n */\n name?: string;\n\n /**\n * Sets the value of the selected radio button.\n * If you want to clear the selection, use `null`.\n */\n value: string | null;\n\n /**\n * Specifies an array of radio buttons to display. Each of these objects have the following properties:\n *\n * - `value` (string) - Sets the value of the radio button. Assigned to the radio group when a user selects the radio button.\n * - `label` (ReactNode) - Specifies a label for the radio button.\n * - `description` (ReactNode) - (Optional) Specifies descriptive text that appears below the label.\n * - `disabled` (boolean) - (Optional) Determines whether the radio button is disabled, which prevents the user from selecting it.\n * - `controlId` (string) - (Optional) Sets the ID of the internal input. You can use it to relate a label element's `for` attribute to this control.\n * In general it's not recommended to set this because the ID is automatically set by the radio group component.\n */\n items?: ReadonlyArray<RadioGroupProps.RadioButtonDefinition>;\n\n /**\n * Adds `aria-label` to the group. If you are using this form element within a form field,\n * don't set this property because the form field component automatically sets the correct labels to make the component accessible.\n */\n ariaLabel?: string;\n\n /**\n * Adds `aria-required` to the group.\n */\n ariaRequired?: boolean;\n\n /**\n * Adds `aria-controls` attribute to the radio group.\n * If the radio group controls any secondary content (for example, another form field), use this to provide an ID referring to the secondary content.\n */\n ariaControls?: string;\n\n /**\n * Called when the user selects a different radio button. The event `detail` contains the current `value`.\n */\n onChange?: NonCancelableEventHandler<RadioGroupProps.ChangeDetail>;\n\n /**\n * @deprecated Has no effect.\n */\n controlId?: string;\n\n /**\n * Specifies if the whole group is read-only, which prevents the\n * user from modifying the value, but does not prevent the value from\n * being included in a form submission. A read-only control is still focusable.\n */\n readOnly?: boolean;\n\n /**\n *
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/radio-group/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 { BaseComponentProps } from '../internal/base-component';\nimport { FormFieldControlProps } from '../internal/context/form-field-context';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface RadioGroupProps extends BaseComponentProps, FormFieldControlProps {\n /**\n * Specify a custom name for the radio buttons. If not provided, the radio group generates a random name.\n */\n name?: string;\n\n /**\n * Sets the value of the selected radio button.\n * If you want to clear the selection, use `null`.\n */\n value: string | null;\n\n /**\n * Specifies an array of radio buttons to display. Each of these objects have the following properties:\n *\n * - `value` (string) - Sets the value of the radio button. Assigned to the radio group when a user selects the radio button.\n * - `label` (ReactNode) - Specifies a label for the radio button.\n * - `description` (ReactNode) - (Optional) Specifies descriptive text that appears below the label.\n * - `disabled` (boolean) - (Optional) Determines whether the radio button is disabled, which prevents the user from selecting it.\n * - `controlId` (string) - (Optional) Sets the ID of the internal input. You can use it to relate a label element's `for` attribute to this control.\n * In general it's not recommended to set this because the ID is automatically set by the radio group component.\n */\n items?: ReadonlyArray<RadioGroupProps.RadioButtonDefinition>;\n\n /**\n * Adds `aria-label` to the group. If you are using this form element within a form field,\n * don't set this property because the form field component automatically sets the correct labels to make the component accessible.\n */\n ariaLabel?: string;\n\n /**\n * Adds `aria-required` to the group.\n */\n ariaRequired?: boolean;\n\n /**\n * Adds `aria-controls` attribute to the radio group.\n * If the radio group controls any secondary content (for example, another form field), use this to provide an ID referring to the secondary content.\n */\n ariaControls?: string;\n\n /**\n * Called when the user selects a different radio button. The event `detail` contains the current `value`.\n */\n onChange?: NonCancelableEventHandler<RadioGroupProps.ChangeDetail>;\n\n /**\n * @deprecated Has no effect.\n */\n controlId?: string;\n\n /**\n * Specifies if the whole group is read-only, which prevents the\n * user from modifying the value, but does not prevent the value from\n * being included in a form submission. A read-only control is still focusable.\n */\n readOnly?: boolean;\n\n /**\n * @awsuiSystem core\n */\n style?: RadioGroupProps.Style;\n}\n\nexport namespace RadioGroupProps {\n export interface RadioButtonDefinition {\n value: string;\n label: React.ReactNode;\n description?: React.ReactNode;\n disabled?: boolean;\n controlId?: string;\n }\n\n export interface ChangeDetail {\n value: string;\n }\n\n export interface Ref {\n /**\n * Sets input focus onto the UI control.\n */\n focus(): void;\n }\n\n export interface Style {\n input?: {\n fill?: {\n checked?: string;\n default?: string;\n disabled?: string;\n readOnly?: string;\n };\n stroke?: {\n default?: string;\n disabled?: string;\n readOnly?: string;\n };\n circle?: {\n fill?: {\n checked?: string;\n disabled?: string;\n readOnly?: string;\n };\n };\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n label?: {\n color?: {\n checked?: string;\n default?: string;\n disabled?: string;\n readOnly?: string;\n };\n };\n description?: {\n color?: {\n checked?: string;\n default?: string;\n disabled?: string;\n readOnly?: string;\n };\n };\n }\n}\n"]}
|
|
@@ -9,7 +9,6 @@ export interface ToggleProps extends BaseCheckboxProps {
|
|
|
9
9
|
children?: React.ReactNode;
|
|
10
10
|
onChange?: NonCancelableEventHandler<ToggleProps.ChangeDetail>;
|
|
11
11
|
/**
|
|
12
|
-
* Specifies an object of selectors and properties that are used to apply custom styles.
|
|
13
12
|
* @awsuiSystem core
|
|
14
13
|
*/
|
|
15
14
|
style?: ToggleProps.Style;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/toggle/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,WAAY,SAAQ,iBAAiB;IACpD;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAM3B,QAAQ,CAAC,EAAE,yBAAyB,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IAE/D
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/toggle/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,WAAY,SAAQ,iBAAiB;IACpD;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAM3B,QAAQ,CAAC,EAAE,yBAAyB,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IAE/D;;OAEG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC;CAC3B;AAED,yBAAiB,WAAW,CAAC;IAC3B,UAAiB,GAAG;QAClB;;WAEG;QACH,KAAK,IAAI,IAAI,CAAC;KACf;IAED,UAAiB,YAAY;QAC3B,OAAO,EAAE,OAAO,CAAC;KAClB;IAED,UAAiB,KAAK;QACpB,KAAK,EAAE;YACL,UAAU,CAAC,EAAE;gBACX,OAAO,CAAC,EAAE,MAAM,CAAC;gBACjB,OAAO,CAAC,EAAE,MAAM,CAAC;gBACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;gBAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;aACnB,CAAC;YACF,MAAM,CAAC,EAAE;gBACP,UAAU,CAAC,EAAE;oBACX,OAAO,CAAC,EAAE,MAAM,CAAC;oBACjB,OAAO,CAAC,EAAE,MAAM,CAAC;oBACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;oBAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;iBACnB,CAAC;aACH,CAAC;YACF,SAAS,CAAC,EAAE;gBACV,WAAW,CAAC,EAAE,MAAM,CAAC;gBACrB,YAAY,CAAC,EAAE,MAAM,CAAC;gBACtB,WAAW,CAAC,EAAE,MAAM,CAAC;aACtB,CAAC;SACH,CAAC;QACF,KAAK,CAAC,EAAE;YACN,KAAK,CAAC,EAAE;gBACN,OAAO,CAAC,EAAE,MAAM,CAAC;gBACjB,OAAO,CAAC,EAAE,MAAM,CAAC;gBACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;gBAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;aACnB,CAAC;SACH,CAAC;KACH;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/toggle/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 { BaseCheckboxProps } from '../checkbox/base-checkbox';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface ToggleProps extends BaseCheckboxProps {\n /**\n * The control's label that's displayed next to the toggle. Clicking this will invoke a state change.\n * @displayname label\n */\n children?: React.ReactNode;\n\n /*\n * Called when the user changes their selection.\n * The event `detail` contains the current value for the `checked` property.\n */\n onChange?: NonCancelableEventHandler<ToggleProps.ChangeDetail>;\n\n /**\n *
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/toggle/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 { BaseCheckboxProps } from '../checkbox/base-checkbox';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface ToggleProps extends BaseCheckboxProps {\n /**\n * The control's label that's displayed next to the toggle. Clicking this will invoke a state change.\n * @displayname label\n */\n children?: React.ReactNode;\n\n /*\n * Called when the user changes their selection.\n * The event `detail` contains the current value for the `checked` property.\n */\n onChange?: NonCancelableEventHandler<ToggleProps.ChangeDetail>;\n\n /**\n * @awsuiSystem core\n */\n style?: ToggleProps.Style;\n}\n\nexport namespace ToggleProps {\n export interface Ref {\n /**\n * Sets input focus onto the UI control.\n */\n focus(): void;\n }\n\n export interface ChangeDetail {\n checked: boolean;\n }\n\n export interface Style {\n input: {\n background?: {\n checked?: string;\n default?: string;\n disabled?: string;\n readOnly?: string;\n };\n handle?: {\n background?: {\n checked?: string;\n default?: string;\n disabled?: string;\n readOnly?: string;\n };\n };\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n label?: {\n color?: {\n checked?: string;\n default?: string;\n disabled?: string;\n readOnly?: string;\n };\n };\n }\n}\n"]}
|