@cloudscape-design/components-themeable 3.0.843 → 3.0.845

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/badge/styles.scss +10 -10
  3. package/lib/internal/template/app-layout/classic.js +3 -3
  4. package/lib/internal/template/app-layout/classic.js.map +1 -1
  5. package/lib/internal/template/app-layout/runtime-drawer/index.d.ts +8 -4
  6. package/lib/internal/template/app-layout/runtime-drawer/index.d.ts.map +1 -1
  7. package/lib/internal/template/app-layout/runtime-drawer/index.js.map +1 -1
  8. package/lib/internal/template/app-layout/utils/use-drawers.d.ts +7 -4
  9. package/lib/internal/template/app-layout/utils/use-drawers.d.ts.map +1 -1
  10. package/lib/internal/template/app-layout/utils/use-drawers.js +19 -10
  11. package/lib/internal/template/app-layout/utils/use-drawers.js.map +1 -1
  12. package/lib/internal/template/app-layout/visual-refresh/context.js +1 -1
  13. package/lib/internal/template/app-layout/visual-refresh/context.js.map +1 -1
  14. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawer.js +1 -1
  15. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawer.js.map +1 -1
  16. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/local-drawer.js +1 -1
  17. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/local-drawer.js.map +1 -1
  18. package/lib/internal/template/app-layout/visual-refresh-toolbar/index.d.ts.map +1 -1
  19. package/lib/internal/template/app-layout/visual-refresh-toolbar/index.js +4 -4
  20. package/lib/internal/template/app-layout/visual-refresh-toolbar/index.js.map +1 -1
  21. package/lib/internal/template/app-layout/visual-refresh-toolbar/interfaces.d.ts +3 -2
  22. package/lib/internal/template/app-layout/visual-refresh-toolbar/interfaces.d.ts.map +1 -1
  23. package/lib/internal/template/app-layout/visual-refresh-toolbar/interfaces.js.map +1 -1
  24. package/lib/internal/template/app-layout/visual-refresh-toolbar/multi-layout.d.ts +3 -2
  25. package/lib/internal/template/app-layout/visual-refresh-toolbar/multi-layout.d.ts.map +1 -1
  26. package/lib/internal/template/app-layout/visual-refresh-toolbar/multi-layout.js.map +1 -1
  27. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.d.ts +3 -2
  28. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.d.ts.map +1 -1
  29. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js +4 -4
  30. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js.map +1 -1
  31. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.d.ts +3 -2
  32. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.d.ts.map +1 -1
  33. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
  34. package/lib/internal/template/badge/styles.css.js +10 -10
  35. package/lib/internal/template/badge/styles.scoped.css +20 -20
  36. package/lib/internal/template/badge/styles.selectors.js +10 -10
  37. package/lib/internal/template/date-range-picker/calendar/grids/grid-cell.d.ts +7 -0
  38. package/lib/internal/template/date-range-picker/calendar/grids/grid-cell.d.ts.map +1 -0
  39. package/lib/internal/template/date-range-picker/calendar/grids/grid-cell.js +51 -0
  40. package/lib/internal/template/date-range-picker/calendar/grids/grid-cell.js.map +1 -0
  41. package/lib/internal/template/date-range-picker/calendar/grids/index.js +3 -3
  42. package/lib/internal/template/date-range-picker/calendar/grids/index.js.map +1 -1
  43. package/lib/internal/template/date-range-picker/calendar/grids/{grid.d.ts → monthly-grid.d.ts} +2 -2
  44. package/lib/internal/template/date-range-picker/calendar/grids/monthly-grid.d.ts.map +1 -0
  45. package/lib/internal/template/date-range-picker/calendar/grids/{grid.js → monthly-grid.js} +4 -49
  46. package/lib/internal/template/date-range-picker/calendar/grids/monthly-grid.js.map +1 -0
  47. package/lib/internal/template/internal/base-component/styles.scoped.css +23 -49
  48. package/lib/internal/template/internal/environment.js +1 -1
  49. package/lib/internal/template/internal/environment.json +1 -1
  50. package/lib/internal/template/internal/generated/styles/tokens.d.ts +15 -10
  51. package/lib/internal/template/internal/generated/styles/tokens.js +15 -10
  52. package/lib/internal/template/internal/generated/theming/index.cjs +125 -310
  53. package/lib/internal/template/internal/generated/theming/index.cjs.d.ts +80 -0
  54. package/lib/internal/template/internal/generated/theming/index.d.ts +80 -0
  55. package/lib/internal/template/internal/generated/theming/index.js +125 -310
  56. package/lib/internal/template/internal/plugins/controllers/drawers.d.ts +13 -5
  57. package/lib/internal/template/internal/plugins/controllers/drawers.d.ts.map +1 -1
  58. package/lib/internal/template/internal/plugins/controllers/drawers.js +4 -4
  59. package/lib/internal/template/internal/plugins/controllers/drawers.js.map +1 -1
  60. package/package.json +1 -1
  61. package/lib/internal/template/date-range-picker/calendar/grids/grid.d.ts.map +0 -1
  62. package/lib/internal/template/date-range-picker/calendar/grids/grid.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/date-range-picker/calendar/grids/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/E,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACtH,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,OAAO,SAAS,MAAM,oCAAoC,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AA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com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { addMonths, isAfter, isBefore, isSameMonth, max, min } from 'date-fns';\n\nimport { getBaseDay, moveNextDay, moveNextWeek, movePrevDay, movePrevWeek } from '../../../calendar/utils/navigation';\nimport { useDateCache } from '../../../internal/hooks/use-date-cache';\nimport { KeyCode } from '../../../internal/keycode';\nimport handleKey from '../../../internal/utils/handle-key';\nimport { hasValue } from '../../../internal/utils/has-value';\nimport InternalSpaceBetween from '../../../space-between/internal';\nimport { DateRangePickerProps, DayIndex } from '../../interfaces';\nimport { findDateToFocus } from '../utils';\nimport { Grid } from './grid';\n\nimport styles from '../../styles.css.js';\n\nfunction isVisible(date: Date, baseDate: Date, isSingleGrid: boolean) {\n if (isSingleGrid) {\n return isSameMonth(date, baseDate);\n }\n\n const previousMonth = addMonths(baseDate, -1);\n\n return isSameMonth(date, previousMonth) || isSameMonth(date, baseDate);\n}\n\nexport interface GridProps {\n baseDate: Date;\n selectedStartDate: Date | null;\n selectedEndDate: Date | null;\n\n focusedDate: Date | null;\n onFocusedDateChange: React.Dispatch<React.SetStateAction<Date | null>>;\n\n isDateEnabled: DateRangePickerProps.IsDateEnabledFunction;\n dateDisabledReason: DateRangePickerProps.DateDisabledReasonFunction;\n isSingleGrid: boolean;\n\n onSelectDate: (date: Date) => void;\n onChangeMonth: (date: Date) => void;\n\n locale: string;\n startOfWeek: DayIndex;\n todayAriaLabel?: string;\n headingIdPrefix: string;\n}\n\nexport const Grids = ({\n baseDate,\n selectedStartDate,\n selectedEndDate,\n\n focusedDate,\n onFocusedDateChange,\n\n isDateEnabled,\n dateDisabledReason,\n isSingleGrid,\n\n onSelectDate,\n onChangeMonth,\n\n locale,\n startOfWeek,\n todayAriaLabel,\n headingIdPrefix,\n}: GridProps) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const [gridHasFocus, setGridHasFocus] = useState(false);\n\n const focusedDateRef = useRef<HTMLTableCellElement>(null);\n\n const dateCache = useDateCache();\n baseDate = dateCache(baseDate);\n focusedDate = focusedDate ? dateCache(focusedDate) : null;\n\n const isDateFocusable = useCallback(\n (date: Date) => {\n return isDateEnabled(date) || (!isDateEnabled(date) && !!dateDisabledReason(date));\n },\n [isDateEnabled, dateDisabledReason]\n );\n\n useEffect(() => {\n if (focusedDate && !isVisible(focusedDate, baseDate, isSingleGrid)) {\n const direction = isAfter(focusedDate, baseDate) ? -1 : 1;\n\n const newMonth = !isSingleGrid && direction === -1 ? addMonths(baseDate, -1) : baseDate;\n const nearestBaseDate = getBaseDay(newMonth, isDateFocusable);\n\n const newFocusedDate = findDateToFocus(focusedDate, nearestBaseDate, isDateFocusable);\n\n onFocusedDateChange(newFocusedDate);\n }\n }, [baseDate, focusedDate, isSingleGrid, isDateFocusable, onFocusedDateChange]);\n\n const onGridKeyDownHandler = (event: React.KeyboardEvent<HTMLElement>) => {\n let updatedFocusDate;\n\n const keys = [KeyCode.up, KeyCode.down, KeyCode.left, KeyCode.right, KeyCode.space, KeyCode.enter];\n\n if (focusedDate === null || keys.indexOf(event.keyCode) === -1) {\n return;\n }\n\n event.preventDefault();\n\n handleKey(event, {\n onActivate: () => {\n if (!focusedDate || !isDateEnabled(focusedDate)) {\n return;\n }\n\n onSelectDate(focusedDate);\n },\n onBlockEnd: () => focusedDate && (updatedFocusDate = moveNextWeek(focusedDate, isDateFocusable)),\n onBlockStart: () => focusedDate && (updatedFocusDate = movePrevWeek(focusedDate, isDateFocusable)),\n onInlineEnd: () => focusedDate && (updatedFocusDate = moveNextDay(focusedDate, isDateFocusable)),\n onInlineStart: () => focusedDate && (updatedFocusDate = movePrevDay(focusedDate, isDateFocusable)),\n });\n\n if (!updatedFocusDate) {\n return;\n }\n\n const updatedDateIsVisible = isVisible(updatedFocusDate, baseDate, isSingleGrid);\n\n if (!updatedDateIsVisible) {\n const newMonthIsOnLeftSide = !isSingleGrid && isBefore(updatedFocusDate, baseDate);\n\n onChangeMonth(newMonthIsOnLeftSide ? addMonths(updatedFocusDate, 1) : updatedFocusDate);\n }\n onFocusedDateChange(updatedFocusDate);\n };\n\n useEffect(() => {\n // focus current date if the focus is already inside the calendar\n if (focusedDate !== null && gridHasFocus) {\n if (focusedDateRef.current && focusedDateRef.current !== document.activeElement) {\n focusedDateRef.current.focus();\n }\n }\n }, [focusedDate, gridHasFocus]);\n\n const onGridBlur = (event: React.FocusEvent) => {\n const newFocusTarget = event.relatedTarget || document.activeElement;\n const newFocusTargetIsInGrid = containerRef.current?.contains(newFocusTarget as Node);\n if (newFocusTarget && !newFocusTargetIsInGrid && gridHasFocus) {\n setGridHasFocus(false);\n }\n };\n\n const onGridFocus = () => {\n if (!gridHasFocus) {\n setGridHasFocus(true);\n }\n };\n\n const isRangeVisible = (selectedStartDate && selectedEndDate) || gridHasFocus;\n\n const rangeEnds: Date[] = [selectedStartDate ?? focusedDate, selectedEndDate ?? focusedDate].filter(hasValue);\n\n const rangeStartDate = min(rangeEnds);\n const rangeEndDate = max(rangeEnds);\n\n return (\n <div ref={containerRef} onFocus={onGridFocus} onBlur={onGridBlur}>\n <InternalSpaceBetween size=\"xs\" direction=\"horizontal\">\n {!isSingleGrid && (\n <Grid\n className={styles['first-grid']}\n baseDate={addMonths(baseDate, -1)}\n selectedEndDate={selectedEndDate}\n selectedStartDate={selectedStartDate}\n rangeStartDate={isRangeVisible ? rangeStartDate : null}\n rangeEndDate={isRangeVisible ? rangeEndDate : null}\n focusedDate={focusedDate}\n focusedDateRef={focusedDateRef}\n isDateEnabled={isDateEnabled}\n dateDisabledReason={dateDisabledReason}\n onSelectDate={onSelectDate}\n onGridKeyDownHandler={onGridKeyDownHandler}\n onFocusedDateChange={onFocusedDateChange}\n locale={locale}\n startOfWeek={startOfWeek}\n todayAriaLabel={todayAriaLabel}\n ariaLabelledby={`${headingIdPrefix}-prevmonth`}\n />\n )}\n <Grid\n className={styles['second-grid']}\n baseDate={baseDate}\n selectedEndDate={selectedEndDate}\n selectedStartDate={selectedStartDate}\n rangeStartDate={isRangeVisible ? rangeStartDate : null}\n rangeEndDate={isRangeVisible ? rangeEndDate : null}\n focusedDate={focusedDate}\n focusedDateRef={focusedDateRef}\n isDateEnabled={isDateEnabled}\n dateDisabledReason={dateDisabledReason}\n onSelectDate={onSelectDate}\n onGridKeyDownHandler={onGridKeyDownHandler}\n onFocusedDateChange={onFocusedDateChange}\n locale={locale}\n startOfWeek={startOfWeek}\n todayAriaLabel={todayAriaLabel}\n ariaLabelledby={`${headingIdPrefix}-currentmonth`}\n />\n </InternalSpaceBetween>\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/date-range-picker/calendar/grids/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/E,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACtH,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,OAAO,SAAS,MAAM,oCAAoC,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAC7D,OAAO,oBAAoB,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAEzC,SAAS,SAAS,CAAC,IAAU,EAAE,QAAc,EAAE,YAAqB;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AAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,EAClD,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,EAC5B,kBAAkB,EAAE,kBAAkB,EACtC,YAAY,EAAE,YAAY,EAC1B,oBAAoB,EAAE,oBAAoB,EAC1C,mBAAmB,EAAE,mBAAmB,EACxC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,GAAG,eAAe,YAAY,GAC9C,CACH;YACD,oBAAC,WAAW,IACV,SAAS,EAAE,MAAM,CAAC,aAAa,CAAC,EAChC,QAAQ,EAAE,QAAQ,EAClB,eAAe,EAAE,eAAe,EAChC,iBAAiB,EAAE,iBAAiB,EACpC,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,EACtD,YAAY,EAAE,cAAc,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,EAClD,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,EAC5B,kBAAkB,EAAE,kBAAkB,EACtC,YAAY,EAAE,YAAY,EAC1B,oBAAoB,EAAE,oBAAoB,EAC1C,mBAAmB,EAAE,mBAAmB,EACxC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,GAAG,eAAe,eAAe,GACjD,CACmB,CACnB,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { addMonths, isAfter, isBefore, isSameMonth, max, min } from 'date-fns';\n\nimport { getBaseDay, moveNextDay, moveNextWeek, movePrevDay, movePrevWeek } from '../../../calendar/utils/navigation';\nimport { useDateCache } from '../../../internal/hooks/use-date-cache';\nimport { KeyCode } from '../../../internal/keycode';\nimport handleKey from '../../../internal/utils/handle-key';\nimport { hasValue } from '../../../internal/utils/has-value';\nimport InternalSpaceBetween from '../../../space-between/internal';\nimport { DateRangePickerProps, DayIndex } from '../../interfaces';\nimport { findDateToFocus } from '../utils';\nimport { MonthlyGrid } from './monthly-grid';\n\nimport styles from '../../styles.css.js';\n\nfunction isVisible(date: Date, baseDate: Date, isSingleGrid: boolean) {\n if (isSingleGrid) {\n return isSameMonth(date, baseDate);\n }\n\n const previousMonth = addMonths(baseDate, -1);\n\n return isSameMonth(date, previousMonth) || isSameMonth(date, baseDate);\n}\n\nexport interface GridProps {\n baseDate: Date;\n selectedStartDate: Date | null;\n selectedEndDate: Date | null;\n\n focusedDate: Date | null;\n onFocusedDateChange: React.Dispatch<React.SetStateAction<Date | null>>;\n\n isDateEnabled: DateRangePickerProps.IsDateEnabledFunction;\n dateDisabledReason: DateRangePickerProps.DateDisabledReasonFunction;\n isSingleGrid: boolean;\n\n onSelectDate: (date: Date) => void;\n onChangeMonth: (date: Date) => void;\n\n locale: string;\n startOfWeek: DayIndex;\n todayAriaLabel?: string;\n headingIdPrefix: string;\n}\n\nexport const Grids = ({\n baseDate,\n selectedStartDate,\n selectedEndDate,\n\n focusedDate,\n onFocusedDateChange,\n\n isDateEnabled,\n dateDisabledReason,\n isSingleGrid,\n\n onSelectDate,\n onChangeMonth,\n\n locale,\n startOfWeek,\n todayAriaLabel,\n headingIdPrefix,\n}: GridProps) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const [gridHasFocus, setGridHasFocus] = useState(false);\n\n const focusedDateRef = useRef<HTMLTableCellElement>(null);\n\n const dateCache = useDateCache();\n baseDate = dateCache(baseDate);\n focusedDate = focusedDate ? dateCache(focusedDate) : null;\n\n const isDateFocusable = useCallback(\n (date: Date) => {\n return isDateEnabled(date) || (!isDateEnabled(date) && !!dateDisabledReason(date));\n },\n [isDateEnabled, dateDisabledReason]\n );\n\n useEffect(() => {\n if (focusedDate && !isVisible(focusedDate, baseDate, isSingleGrid)) {\n const direction = isAfter(focusedDate, baseDate) ? -1 : 1;\n\n const newMonth = !isSingleGrid && direction === -1 ? addMonths(baseDate, -1) : baseDate;\n const nearestBaseDate = getBaseDay(newMonth, isDateFocusable);\n\n const newFocusedDate = findDateToFocus(focusedDate, nearestBaseDate, isDateFocusable);\n\n onFocusedDateChange(newFocusedDate);\n }\n }, [baseDate, focusedDate, isSingleGrid, isDateFocusable, onFocusedDateChange]);\n\n const onGridKeyDownHandler = (event: React.KeyboardEvent<HTMLElement>) => {\n let updatedFocusDate;\n\n const keys = [KeyCode.up, KeyCode.down, KeyCode.left, KeyCode.right, KeyCode.space, KeyCode.enter];\n\n if (focusedDate === null || keys.indexOf(event.keyCode) === -1) {\n return;\n }\n\n event.preventDefault();\n\n handleKey(event, {\n onActivate: () => {\n if (!focusedDate || !isDateEnabled(focusedDate)) {\n return;\n }\n\n onSelectDate(focusedDate);\n },\n onBlockEnd: () => focusedDate && (updatedFocusDate = moveNextWeek(focusedDate, isDateFocusable)),\n onBlockStart: () => focusedDate && (updatedFocusDate = movePrevWeek(focusedDate, isDateFocusable)),\n onInlineEnd: () => focusedDate && (updatedFocusDate = moveNextDay(focusedDate, isDateFocusable)),\n onInlineStart: () => focusedDate && (updatedFocusDate = movePrevDay(focusedDate, isDateFocusable)),\n });\n\n if (!updatedFocusDate) {\n return;\n }\n\n const updatedDateIsVisible = isVisible(updatedFocusDate, baseDate, isSingleGrid);\n\n if (!updatedDateIsVisible) {\n const newMonthIsOnLeftSide = !isSingleGrid && isBefore(updatedFocusDate, baseDate);\n\n onChangeMonth(newMonthIsOnLeftSide ? addMonths(updatedFocusDate, 1) : updatedFocusDate);\n }\n onFocusedDateChange(updatedFocusDate);\n };\n\n useEffect(() => {\n // focus current date if the focus is already inside the calendar\n if (focusedDate !== null && gridHasFocus) {\n if (focusedDateRef.current && focusedDateRef.current !== document.activeElement) {\n focusedDateRef.current.focus();\n }\n }\n }, [focusedDate, gridHasFocus]);\n\n const onGridBlur = (event: React.FocusEvent) => {\n const newFocusTarget = event.relatedTarget || document.activeElement;\n const newFocusTargetIsInGrid = containerRef.current?.contains(newFocusTarget as Node);\n if (newFocusTarget && !newFocusTargetIsInGrid && gridHasFocus) {\n setGridHasFocus(false);\n }\n };\n\n const onGridFocus = () => {\n if (!gridHasFocus) {\n setGridHasFocus(true);\n }\n };\n\n const isRangeVisible = (selectedStartDate && selectedEndDate) || gridHasFocus;\n\n const rangeEnds: Date[] = [selectedStartDate ?? focusedDate, selectedEndDate ?? focusedDate].filter(hasValue);\n\n const rangeStartDate = min(rangeEnds);\n const rangeEndDate = max(rangeEnds);\n\n return (\n <div ref={containerRef} onFocus={onGridFocus} onBlur={onGridBlur}>\n <InternalSpaceBetween size=\"xs\" direction=\"horizontal\">\n {!isSingleGrid && (\n <MonthlyGrid\n className={styles['first-grid']}\n baseDate={addMonths(baseDate, -1)}\n selectedEndDate={selectedEndDate}\n selectedStartDate={selectedStartDate}\n rangeStartDate={isRangeVisible ? rangeStartDate : null}\n rangeEndDate={isRangeVisible ? rangeEndDate : null}\n focusedDate={focusedDate}\n focusedDateRef={focusedDateRef}\n isDateEnabled={isDateEnabled}\n dateDisabledReason={dateDisabledReason}\n onSelectDate={onSelectDate}\n onGridKeyDownHandler={onGridKeyDownHandler}\n onFocusedDateChange={onFocusedDateChange}\n locale={locale}\n startOfWeek={startOfWeek}\n todayAriaLabel={todayAriaLabel}\n ariaLabelledby={`${headingIdPrefix}-prevmonth`}\n />\n )}\n <MonthlyGrid\n className={styles['second-grid']}\n baseDate={baseDate}\n selectedEndDate={selectedEndDate}\n selectedStartDate={selectedStartDate}\n rangeStartDate={isRangeVisible ? rangeStartDate : null}\n rangeEndDate={isRangeVisible ? rangeEndDate : null}\n focusedDate={focusedDate}\n focusedDateRef={focusedDateRef}\n isDateEnabled={isDateEnabled}\n dateDisabledReason={dateDisabledReason}\n onSelectDate={onSelectDate}\n onGridKeyDownHandler={onGridKeyDownHandler}\n onFocusedDateChange={onFocusedDateChange}\n locale={locale}\n startOfWeek={startOfWeek}\n todayAriaLabel={todayAriaLabel}\n ariaLabelledby={`${headingIdPrefix}-currentmonth`}\n />\n </InternalSpaceBetween>\n </div>\n );\n};\n"]}
@@ -33,5 +33,5 @@ export interface GridProps {
33
33
  ariaLabelledby: string;
34
34
  className?: string;
35
35
  }
36
- export declare function Grid({ baseDate, selectedStartDate, selectedEndDate, rangeStartDate, rangeEndDate, focusedDate, focusedDateRef, onSelectDate, onGridKeyDownHandler, onFocusedDateChange, isDateEnabled, dateDisabledReason, locale, startOfWeek, todayAriaLabel, ariaLabelledby, className, }: GridProps): JSX.Element;
37
- //# sourceMappingURL=grid.d.ts.map
36
+ export declare function MonthlyGrid({ baseDate, selectedStartDate, selectedEndDate, rangeStartDate, rangeEndDate, focusedDate, focusedDateRef, onSelectDate, onGridKeyDownHandler, onFocusedDateChange, isDateEnabled, dateDisabledReason, locale, startOfWeek, todayAriaLabel, ariaLabelledby, className, }: GridProps): JSX.Element;
37
+ //# sourceMappingURL=monthly-grid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monthly-grid.d.ts","sourceRoot":"","sources":["../../../../../src/date-range-picker/calendar/grids/monthly-grid.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAkBvC,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAKlE;;;;;;;;;;;;;GAaG;AAEH,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,IAAI,CAAC;IACf,iBAAiB,EAAE,IAAI,GAAG,IAAI,CAAC;IAC/B,eAAe,EAAE,IAAI,GAAG,IAAI,CAAC;IAE7B,cAAc,EAAE,IAAI,GAAG,IAAI,CAAC;IAC5B,YAAY,EAAE,IAAI,GAAG,IAAI,CAAC;IAE1B,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,cAAc,EAAE,KAAK,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;IAEtD,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACnC,oBAAoB,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACpE,mBAAmB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC;IAEvE,aAAa,EAAE,oBAAoB,CAAC,qBAAqB,CAAC;IAC1D,kBAAkB,EAAE,oBAAoB,CAAC,0BAA0B,CAAC;IAEpE,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,QAAQ,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IAEvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,YAAY,EACZ,WAAW,EAEX,cAAc,EAEd,YAAY,EACZ,oBAAoB,EACpB,mBAAmB,EAEnB,aAAa,EACb,kBAAkB,EAElB,MAAM,EACN,WAAW,EACX,cAAc,EACd,cAAc,EAEd,SAAS,GACV,EAAE,SAAS,eAyIX"}
@@ -1,60 +1,15 @@
1
- import { __rest } from "tslib";
2
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
2
  // SPDX-License-Identifier: Apache-2.0
4
- import React, { forwardRef, useMemo, useRef, useState } from 'react';
3
+ import React, { useMemo } from 'react';
5
4
  import clsx from 'clsx';
6
5
  import { addDays, addWeeks, getDaysInMonth, isAfter, isBefore, isLastDayOfMonth, isSameDay, isSameMonth, isToday, } from 'date-fns';
7
6
  import { getCalendarMonth } from 'mnth';
8
7
  import { getDateLabel, renderDayName } from '../../../calendar/utils/intl';
9
8
  import ScreenreaderOnly from '../../../internal/components/screenreader-only/index.js';
10
- import Tooltip from '../../../internal/components/tooltip';
11
- import useHiddenDescription from '../../../internal/hooks/use-hidden-description';
12
- import { useMergeRefs } from '../../../internal/hooks/use-merge-refs';
13
- import { applyDisplayName } from '../../../internal/utils/apply-display-name';
14
9
  import { formatDate } from '../../../internal/utils/date-time';
10
+ import { GridCell } from './grid-cell';
15
11
  import styles from './styles.css.js';
16
- const GridCell = forwardRef((props, focusedDateRef) => {
17
- const { disabledReason } = props, rest = __rest(props, ["disabledReason"]);
18
- const isDisabledWithReason = !!disabledReason;
19
- const { targetProps, descriptionEl } = useHiddenDescription(disabledReason);
20
- const ref = useRef(null);
21
- const [showTooltip, setShowTooltip] = useState(false);
22
- return (React.createElement("td", Object.assign({ ref: useMergeRefs(focusedDateRef, ref) }, rest, (isDisabledWithReason ? targetProps : {}), { onFocus: event => {
23
- if (rest.onFocus) {
24
- rest.onFocus(event);
25
- }
26
- if (isDisabledWithReason) {
27
- setShowTooltip(true);
28
- }
29
- }, onBlur: event => {
30
- if (rest.onBlur) {
31
- rest.onBlur(event);
32
- }
33
- if (isDisabledWithReason) {
34
- setShowTooltip(false);
35
- }
36
- }, onMouseEnter: event => {
37
- if (rest.onMouseEnter) {
38
- rest.onMouseEnter(event);
39
- }
40
- if (isDisabledWithReason) {
41
- setShowTooltip(true);
42
- }
43
- }, onMouseLeave: event => {
44
- if (rest.onMouseLeave) {
45
- rest.onMouseLeave(event);
46
- }
47
- if (isDisabledWithReason) {
48
- setShowTooltip(false);
49
- }
50
- } }),
51
- props.children,
52
- isDisabledWithReason && (React.createElement(React.Fragment, null,
53
- descriptionEl,
54
- showTooltip && (React.createElement(Tooltip, { className: styles['disabled-reason-tooltip'], trackRef: ref, value: disabledReason }))))));
55
- });
56
- applyDisplayName(GridCell, 'GridCell');
57
- export function Grid({ baseDate, selectedStartDate, selectedEndDate, rangeStartDate, rangeEndDate, focusedDate, focusedDateRef, onSelectDate, onGridKeyDownHandler, onFocusedDateChange, isDateEnabled, dateDisabledReason, locale, startOfWeek, todayAriaLabel, ariaLabelledby, className, }) {
12
+ export function MonthlyGrid({ baseDate, selectedStartDate, selectedEndDate, rangeStartDate, rangeEndDate, focusedDate, focusedDateRef, onSelectDate, onGridKeyDownHandler, onFocusedDateChange, isDateEnabled, dateDisabledReason, locale, startOfWeek, todayAriaLabel, ariaLabelledby, className, }) {
58
13
  const baseDateTime = baseDate === null || baseDate === void 0 ? void 0 : baseDate.getTime();
59
14
  // `baseDateTime` is used as a more stable replacement for baseDate
60
15
  const weeks = useMemo(() => getCalendarMonth(baseDate, { firstDayOfWeek: startOfWeek }),
@@ -145,4 +100,4 @@ function isInRange(date, dateOne, dateTwo) {
145
100
  const inRange = (isAfter(date, dateOne) && isBefore(date, dateTwo)) || (isAfter(date, dateTwo) && isBefore(date, dateOne));
146
101
  return inRange || isSameDay(date, dateOne) || isSameDay(date, dateTwo);
147
102
  }
148
- //# sourceMappingURL=grid.js.map
103
+ //# sourceMappingURL=monthly-grid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monthly-grid.js","sourceRoot":"","sources":["../../../../../src/date-range-picker/calendar/grids/monthly-grid.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EACL,OAAO,EACP,QAAQ,EACR,cAAc,EACd,OAAO,EACP,QAAQ,EACR,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,OAAO,GACR,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,gBAAgB,EAAE,MAAM,MAAM,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,gBAAgB,MAAM,yDAAyD,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AA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M,IACrD,IAAI,CAAC,OAAO,EAAE,CACV;oBACP,oBAAC,gBAAgB,QAAE,eAAe,CAAoB,CAC7C,CACZ,CAAC;YACJ,CAAC,CAAC,CACC,CACN,CAAC;QACJ,CAAC,CAAC,CACI,CACF,CACT,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAAC,IAAU,EAAE,OAAoB,EAAE,OAAoB;IACvE,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,IAAI,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE;QACvD,OAAO,KAAK,CAAC;KACd;IAED,MAAM,OAAO,GACX,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IAE7G,OAAO,OAAO,IAAI,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACzE,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useMemo } from 'react';\nimport clsx from 'clsx';\nimport {\n addDays,\n addWeeks,\n getDaysInMonth,\n isAfter,\n isBefore,\n isLastDayOfMonth,\n isSameDay,\n isSameMonth,\n isToday,\n} from 'date-fns';\nimport { getCalendarMonth } from 'mnth';\n\nimport { getDateLabel, renderDayName } from '../../../calendar/utils/intl';\nimport ScreenreaderOnly from '../../../internal/components/screenreader-only/index.js';\nimport { formatDate } from '../../../internal/utils/date-time';\nimport { DateRangePickerProps, DayIndex } from '../../interfaces';\nimport { GridCell } from './grid-cell';\n\nimport styles from './styles.css.js';\n\n/**\n * Calendar grid supports two mechanisms of keyboard navigation:\n * - Native screen-reader table navigation (semantic table markup);\n * - Keyboard arrow-keys navigation (a custom key-down handler).\n *\n * The implementation largely follows the w3 example (https://www.w3.org/WAI/ARIA/apg/example-index/dialog-modal/datepicker-dialog) and shares the following issues:\n * - (table navigation) Chrome+VO - weekday is announced twice when navigating to the calendar's header;\n * - (table navigation) Safari+VO - \"dimmed\" state is announced twice;\n * - (table navigation) Firefox/Chrome+NVDA - cannot use table navigation if any cell has a focus;\n * - (keyboard navigation) Firefox+NVDA - every day is announced as \"not selected\";\n * - (keyboard navigation) Safari/Chrome+VO - weekdays are not announced;\n * - (keyboard navigation) Safari/Chrome+VO - days are not announced as interactive (clickable or selectable);\n * - (keyboard navigation) Safari/Chrome+VO - day announcements are not interruptive and can be missed if navigating fast.\n */\n\nexport interface GridProps {\n baseDate: Date;\n selectedStartDate: Date | null;\n selectedEndDate: Date | null;\n\n rangeStartDate: Date | null;\n rangeEndDate: Date | null;\n\n focusedDate: Date | null;\n focusedDateRef: React.RefObject<HTMLTableCellElement>;\n\n onSelectDate: (date: Date) => void;\n onGridKeyDownHandler: (e: React.KeyboardEvent<HTMLElement>) => void;\n onFocusedDateChange: React.Dispatch<React.SetStateAction<Date | null>>;\n\n isDateEnabled: DateRangePickerProps.IsDateEnabledFunction;\n dateDisabledReason: DateRangePickerProps.DateDisabledReasonFunction;\n\n locale: string;\n startOfWeek: DayIndex;\n todayAriaLabel?: string;\n ariaLabelledby: string;\n\n className?: string;\n}\n\nexport function MonthlyGrid({\n baseDate,\n selectedStartDate,\n selectedEndDate,\n rangeStartDate,\n rangeEndDate,\n focusedDate,\n\n focusedDateRef,\n\n onSelectDate,\n onGridKeyDownHandler,\n onFocusedDateChange,\n\n isDateEnabled,\n dateDisabledReason,\n\n locale,\n startOfWeek,\n todayAriaLabel,\n ariaLabelledby,\n\n className,\n}: GridProps) {\n const baseDateTime = baseDate?.getTime();\n // `baseDateTime` is used as a more stable replacement for baseDate\n const weeks = useMemo<Date[][]>(\n () => getCalendarMonth(baseDate, { firstDayOfWeek: startOfWeek }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [baseDateTime, startOfWeek]\n );\n const weekdays = weeks[0].map(date => date.getDay());\n\n return (\n <table role=\"grid\" aria-labelledby={ariaLabelledby} className={clsx(styles.grid, className)}>\n <thead>\n <tr>\n {weekdays.map(dayIndex => (\n <th key={dayIndex} scope=\"col\" className={clsx(styles['grid-cell'], styles['day-header'])}>\n <span aria-hidden=\"true\">{renderDayName(locale, dayIndex, 'short')}</span>\n <ScreenreaderOnly>{renderDayName(locale, dayIndex, 'long')}</ScreenreaderOnly>\n </th>\n ))}\n </tr>\n </thead>\n <tbody onKeyDown={onGridKeyDownHandler}>\n {weeks.map((week, weekIndex) => {\n return (\n <tr key={weekIndex} className={styles.week}>\n {week.map((date, dateIndex) => {\n const isStartDate = !!selectedStartDate && isSameDay(date, selectedStartDate);\n const isEndDate = !!selectedEndDate && isSameDay(date, selectedEndDate);\n const isSelected = isStartDate || isEndDate;\n const isRangeStartDate = !!rangeStartDate && isSameDay(date, rangeStartDate);\n const isRangeEndDate = !!rangeEndDate && isSameDay(date, rangeEndDate);\n\n const isFocused = !!focusedDate && isSameDay(date, focusedDate) && isSameMonth(date, baseDate);\n\n const dateIsInRange = isStartDate || isEndDate || isInRange(date, rangeStartDate, rangeEndDate);\n const inRangeStartWeek =\n rangeStartDate && isInRange(date, rangeStartDate, addDays(addWeeks(rangeStartDate, 1), -1));\n const inRangeEndWeek =\n rangeEndDate && isInRange(date, rangeEndDate, addDays(addWeeks(rangeEndDate, -1), 1));\n const onlyOneSelected =\n !!rangeStartDate && !!rangeEndDate\n ? isSameDay(rangeStartDate, rangeEndDate)\n : !selectedStartDate || !selectedEndDate;\n\n const isEnabled = !isDateEnabled || isDateEnabled(date);\n const disabledReason = dateDisabledReason(date);\n const isDisabledWithReason = !isEnabled && !!disabledReason;\n const isFocusable = isFocused && (isEnabled || isDisabledWithReason);\n\n const baseClasses = {\n [styles.day]: true,\n [styles['grid-cell']]: true,\n [styles['in-first-row']]: weekIndex === 0,\n [styles['in-first-column']]: dateIndex === 0,\n };\n\n if (!isSameMonth(date, baseDate)) {\n return (\n <td\n key={`${weekIndex}:${dateIndex}`}\n ref={isFocused ? focusedDateRef : undefined}\n className={clsx(baseClasses, {\n [styles['in-previous-month']]: isBefore(date, baseDate),\n [styles['last-day-of-month']]: isLastDayOfMonth(date),\n [styles['in-next-month']]: isAfter(date, baseDate),\n })}\n ></td>\n );\n }\n\n const handlers: React.HTMLAttributes<HTMLDivElement> = {};\n if (isEnabled) {\n handlers.onClick = () => onSelectDate(date);\n handlers.onFocus = () => onFocusedDateChange(date);\n }\n\n // Can't be focused.\n let tabIndex = undefined;\n if (isFocusable && (isEnabled || isDisabledWithReason)) {\n // Next focus target.\n tabIndex = 0;\n } else if (isEnabled || isDisabledWithReason) {\n // Can be focused programmatically.\n tabIndex = -1;\n }\n\n // Screen-reader announcement for the focused day.\n let dayAnnouncement = getDateLabel(locale, date, 'short');\n if (isToday(date)) {\n dayAnnouncement += '. ' + todayAriaLabel;\n }\n\n return (\n <GridCell\n ref={isFocused ? focusedDateRef : undefined}\n key={`${weekIndex}:${dateIndex}`}\n className={clsx(baseClasses, {\n [styles['in-current-month']]: isSameMonth(date, baseDate),\n [styles.enabled]: isEnabled,\n [styles.selected]: isSelected,\n [styles['start-date']]: isStartDate,\n [styles['end-date']]: isEndDate,\n [styles['range-start-date']]: isRangeStartDate,\n [styles['range-end-date']]: isRangeEndDate,\n [styles['no-range']]: isSelected && onlyOneSelected,\n [styles['in-range']]: dateIsInRange,\n [styles['in-range-border-block-start']]: !!inRangeStartWeek || date.getDate() <= 7,\n [styles['in-range-border-block-end']]:\n !!inRangeEndWeek || date.getDate() > getDaysInMonth(date) - 7,\n [styles['in-range-border-inline-start']]:\n dateIndex === 0 || date.getDate() === 1 || isRangeStartDate,\n [styles['in-range-border-inline-end']]:\n dateIndex === week.length - 1 || isLastDayOfMonth(date) || isRangeEndDate,\n [styles.today]: isToday(date),\n })}\n aria-selected={isEnabled ? isSelected || dateIsInRange : undefined}\n aria-current={isToday(date) ? 'date' : undefined}\n data-date={formatDate(date)}\n aria-disabled={!isEnabled}\n tabIndex={tabIndex}\n disabledReason={isDisabledWithReason ? disabledReason : undefined}\n {...handlers}\n >\n <span className={styles['day-inner']} aria-hidden=\"true\">\n {date.getDate()}\n </span>\n <ScreenreaderOnly>{dayAnnouncement}</ScreenreaderOnly>\n </GridCell>\n );\n })}\n </tr>\n );\n })}\n </tbody>\n </table>\n );\n}\n\nfunction isInRange(date: Date, dateOne: Date | null, dateTwo: Date | null) {\n if (!dateOne || !dateTwo || isSameDay(dateOne, dateTwo)) {\n return false;\n }\n\n const inRange =\n (isAfter(date, dateOne) && isBefore(date, dateTwo)) || (isAfter(date, dateTwo) && isBefore(date, dateOne));\n\n return inRange || isSameDay(date, dateOne) || isSameDay(date, dateTwo);\n}\n"]}
@@ -162,6 +162,16 @@
162
162
  --color-charts-palette-categorical-48-h3si0h:#014b44;
163
163
  --color-charts-palette-categorical-49-o7nrnh:#431d84;
164
164
  --color-charts-palette-categorical-50-ns14x2:#732c02;
165
+ --color-background-notification-severity-critical-r8qduk:#870303;
166
+ --color-background-notification-severity-high-ipqig7:#ce3311;
167
+ --color-background-notification-severity-medium-pc92au:#f89256;
168
+ --color-background-notification-severity-low-yi1y5f:#f2cd54;
169
+ --color-background-notification-severity-neutral-evlvrx:#687078;
170
+ --color-text-notification-severity-critical-xegc5z:#fafafa;
171
+ --color-text-notification-severity-high-aqyfhk:#fafafa;
172
+ --color-text-notification-severity-medium-88cm7g:#000000;
173
+ --color-text-notification-severity-low-6zo5bx:#16191f;
174
+ --color-text-notification-severity-neutral-z3jtx1:#fafafa;
165
175
  --color-background-badge-icon-xibra9:#d13212;
166
176
  --color-background-button-link-active-5rokvx:#eaeded;
167
177
  --color-background-button-link-hover-e1np1p:#fafafa;
@@ -407,16 +417,6 @@
407
417
  --color-dropzone-text-hover-r1nuki:#545b64;
408
418
  --color-dropzone-border-default-9spjwe:#879596;
409
419
  --color-dropzone-border-hover-1qv9u8:#002b66;
410
- --color-background-severity-critical-w8h6a3:#7d2105;
411
- --color-text-severity-critical-smsuqm:#fafafa;
412
- --color-background-severity-high-3zqnfy:#ba2e0f;
413
- --color-text-severity-high-4aeglu:#fafafa;
414
- --color-background-severity-medium-iczbic:#cc5f21;
415
- --color-text-severity-medium-3ueten:#000000;
416
- --color-background-severity-low-invu5a:#b2911c;
417
- --color-text-severity-low-9in1kr:#16191f;
418
- --color-background-severity-neutral-5e64wy:#545b64;
419
- --color-text-severity-neutral-3gz34u:#fafafa;
420
420
  --font-box-value-large-weight-sx9gnf:300;
421
421
  --font-button-letter-spacing-47n0nr:0.25px;
422
422
  --font-button-weight-6haenw:700;
@@ -816,6 +816,11 @@
816
816
  --color-charts-palette-categorical-48-h3si0h:#ace9db;
817
817
  --color-charts-palette-categorical-49-o7nrnh:#f5edff;
818
818
  --color-charts-palette-categorical-50-ns14x2:#ffd4bb;
819
+ --color-background-notification-severity-critical-r8qduk:#d63f38;
820
+ --color-background-notification-severity-high-ipqig7:#fe6e73;
821
+ --color-text-notification-severity-critical-xegc5z:#000000;
822
+ --color-text-notification-severity-high-aqyfhk:#16191f;
823
+ --color-text-notification-severity-medium-88cm7g:#16191f;
819
824
  --color-background-badge-icon-xibra9:#ff5d64;
820
825
  --color-background-button-link-active-5rokvx:#16191f;
821
826
  --color-background-button-link-hover-e1np1p:#21252c;
@@ -1016,14 +1021,6 @@
1016
1021
  --color-dropzone-text-hover-r1nuki:#c6c6cd;
1017
1022
  --color-dropzone-border-default-9spjwe:#687078;
1018
1023
  --color-dropzone-border-hover-1qv9u8:#44b9d6;
1019
- --color-background-severity-critical-w8h6a3:#d63f38;
1020
- --color-text-severity-critical-smsuqm:#000000;
1021
- --color-background-severity-high-3zqnfy:#fe6e73;
1022
- --color-text-severity-high-4aeglu:#16191f;
1023
- --color-background-severity-medium-iczbic:#f89256;
1024
- --color-text-severity-medium-3ueten:#16191f;
1025
- --color-background-severity-low-invu5a:#dfb52c;
1026
- --color-background-severity-neutral-5e64wy:#687078;
1027
1024
  --shadow-container-8g76zh:0 1px 1px 0 rgba(0, 0, 0, 0.3), 1px 1px 1px 0 rgba(0, 0, 0, 0.3), -1px 1px 1px 0 rgba(0, 0, 0, 0.3);
1028
1025
  --shadow-dropdown-w4gfk2:0 1px 1px 0 rgba(0, 0, 0, 0.3), 1px 1px 1px 0 rgba(0, 0, 0, 0.3), -1px 1px 1px 0 rgba(0, 0, 0, 0.3);
1029
1026
  --shadow-dropup-onasja:0 -1px 1px 0 rgba(0, 0, 0, 0.3), 1px -1px 1px 0 rgba(0, 0, 0, 0.3), -1px -1px 1px 0 rgba(0, 0, 0, 0.3);
@@ -1334,10 +1331,6 @@
1334
1331
  --color-dropzone-text-hover-r1nuki:#c6c6cd;
1335
1332
  --color-dropzone-border-default-9spjwe:#687078;
1336
1333
  --color-dropzone-border-hover-1qv9u8:#44b9d6;
1337
- --color-text-severity-critical-smsuqm:#000000;
1338
- --color-text-severity-high-4aeglu:#16191f;
1339
- --color-text-severity-medium-3ueten:#16191f;
1340
- --color-background-severity-neutral-5e64wy:#687078;
1341
1334
  }
1342
1335
 
1343
1336
  .awsui-context-flashbar:not(#\9) {
@@ -1479,6 +1472,12 @@
1479
1472
  --color-charts-line-grid-z7yjnd:#dedee3;
1480
1473
  --color-charts-line-tick-kpqd8n:#dedee3;
1481
1474
  --color-charts-line-axis-lfw0ld:#dedee3;
1475
+ --color-background-notification-severity-neutral-evlvrx:#656871;
1476
+ --color-text-notification-severity-critical-xegc5z:#f9f9fa;
1477
+ --color-text-notification-severity-high-aqyfhk:#f9f9fa;
1478
+ --color-text-notification-severity-medium-88cm7g:#0f141a;
1479
+ --color-text-notification-severity-low-6zo5bx:#0f141a;
1480
+ --color-text-notification-severity-neutral-z3jtx1:#f9f9fa;
1482
1481
  --color-background-badge-icon-xibra9:#db0000;
1483
1482
  --color-background-button-link-active-5rokvx:#d1f1ff;
1484
1483
  --color-background-button-link-hover-e1np1p:#f0fbff;
@@ -1688,12 +1687,6 @@
1688
1687
  --color-dropzone-text-default-bz3n93:#424650;
1689
1688
  --color-dropzone-text-hover-r1nuki:#424650;
1690
1689
  --color-dropzone-border-default-9spjwe:#8c8c94;
1691
- --color-text-severity-critical-smsuqm:#f9f9fa;
1692
- --color-text-severity-high-4aeglu:#f9f9fa;
1693
- --color-text-severity-medium-3ueten:#0f141a;
1694
- --color-text-severity-low-9in1kr:#0f141a;
1695
- --color-background-severity-neutral-5e64wy:#424650;
1696
- --color-text-severity-neutral-3gz34u:#f9f9fa;
1697
1690
  --font-box-value-large-weight-sx9gnf:700;
1698
1691
  --font-button-letter-spacing-47n0nr:0.005em;
1699
1692
  --font-chart-detail-size-z60lhi:12px;
@@ -1848,6 +1841,8 @@
1848
1841
  --color-charts-line-grid-z7yjnd:#424650;
1849
1842
  --color-charts-line-tick-kpqd8n:#424650;
1850
1843
  --color-charts-line-axis-lfw0ld:#424650;
1844
+ --color-text-notification-severity-critical-xegc5z:#000000;
1845
+ --color-text-notification-severity-high-aqyfhk:#0f141a;
1851
1846
  --color-background-badge-icon-xibra9:#ff7a7a;
1852
1847
  --color-background-button-link-active-5rokvx:#333843;
1853
1848
  --color-background-button-link-hover-e1np1p:#1b232d;
@@ -2048,9 +2043,6 @@
2048
2043
  --color-dropzone-text-hover-r1nuki:#c6c6cd;
2049
2044
  --color-dropzone-border-default-9spjwe:#656871;
2050
2045
  --color-dropzone-border-hover-1qv9u8:#75cfff;
2051
- --color-text-severity-critical-smsuqm:#000000;
2052
- --color-text-severity-high-4aeglu:#0f141a;
2053
- --color-background-severity-neutral-5e64wy:#656871;
2054
2046
  --shadow-container-8g76zh:0px 1px 8px 2px rgba(0, 7, 22, 0.6);
2055
2047
  --shadow-container-active-b0dn3h:0px 1px 1px 1px #192534, 0px 6px 36px #00040c;
2056
2048
  --shadow-dropdown-w4gfk2:0px 4px 20px 1px rgba(0, 4, 12, 1);
@@ -2330,9 +2322,6 @@
2330
2322
  --color-dropzone-background-hover-v8kdg9:#001129;
2331
2323
  --color-dropzone-border-default-9spjwe:#656871;
2332
2324
  --color-dropzone-border-hover-1qv9u8:#75cfff;
2333
- --color-text-severity-high-4aeglu:#0f141a;
2334
- --color-text-severity-medium-3ueten:#0f141a;
2335
- --color-background-severity-neutral-5e64wy:#656871;
2336
2325
  }
2337
2326
 
2338
2327
  .awsui-context-top-navigation.awsui-visual-refresh:not(#\9) {
@@ -2536,9 +2525,6 @@
2536
2525
  --color-dropzone-text-hover-r1nuki:#c6c6cd;
2537
2526
  --color-dropzone-border-default-9spjwe:#656871;
2538
2527
  --color-dropzone-border-hover-1qv9u8:#75cfff;
2539
- --color-text-severity-critical-smsuqm:#000000;
2540
- --color-text-severity-high-4aeglu:#0f141a;
2541
- --color-background-severity-neutral-5e64wy:#656871;
2542
2528
  }
2543
2529
 
2544
2530
  .awsui-visual-refresh .awsui-context-content-header:not(#\9) {
@@ -2744,9 +2730,6 @@
2744
2730
  --color-dropzone-text-hover-r1nuki:#c6c6cd;
2745
2731
  --color-dropzone-border-default-9spjwe:#656871;
2746
2732
  --color-dropzone-border-hover-1qv9u8:#75cfff;
2747
- --color-text-severity-critical-smsuqm:#000000;
2748
- --color-text-severity-high-4aeglu:#0f141a;
2749
- --color-background-severity-neutral-5e64wy:#656871;
2750
2733
  --shadow-container-8g76zh:0px 1px 8px 2px rgba(0, 7, 22, 0.6);
2751
2734
  --shadow-container-active-b0dn3h:0px 1px 1px 1px #192534, 0px 6px 36px #00040c;
2752
2735
  --shadow-dropdown-w4gfk2:0px 4px 20px 1px rgba(0, 4, 12, 1);
@@ -2964,9 +2947,6 @@
2964
2947
  --color-dropzone-text-hover-r1nuki:#c6c6cd;
2965
2948
  --color-dropzone-border-default-9spjwe:#656871;
2966
2949
  --color-dropzone-border-hover-1qv9u8:#75cfff;
2967
- --color-text-severity-critical-smsuqm:#000000;
2968
- --color-text-severity-high-4aeglu:#0f141a;
2969
- --color-background-severity-neutral-5e64wy:#656871;
2970
2950
  --shadow-container-8g76zh:0px 1px 8px 2px rgba(0, 7, 22, 0.6);
2971
2951
  --shadow-container-active-b0dn3h:0px 1px 1px 1px #192534, 0px 6px 36px #00040c;
2972
2952
  --shadow-dropdown-w4gfk2:0px 4px 20px 1px rgba(0, 4, 12, 1);
@@ -3382,9 +3362,6 @@
3382
3362
  --color-dropzone-text-hover-r1nuki:#c6c6cd;
3383
3363
  --color-dropzone-border-default-9spjwe:#656871;
3384
3364
  --color-dropzone-border-hover-1qv9u8:#75cfff;
3385
- --color-text-severity-critical-smsuqm:#000000;
3386
- --color-text-severity-high-4aeglu:#0f141a;
3387
- --color-background-severity-neutral-5e64wy:#656871;
3388
3365
  }
3389
3366
 
3390
3367
  .awsui-context-content-header .awsui-context-alert.awsui-visual-refresh:not(#\9) {
@@ -3590,9 +3567,6 @@
3590
3567
  --color-dropzone-text-hover-r1nuki:#c6c6cd;
3591
3568
  --color-dropzone-border-default-9spjwe:#656871;
3592
3569
  --color-dropzone-border-hover-1qv9u8:#75cfff;
3593
- --color-text-severity-critical-smsuqm:#000000;
3594
- --color-text-severity-high-4aeglu:#0f141a;
3595
- --color-background-severity-neutral-5e64wy:#656871;
3596
3570
  }
3597
3571
 
3598
3572
  @media not print {
@@ -1,4 +1,4 @@
1
1
  export var PACKAGE_SOURCE = "components";
2
- export var PACKAGE_VERSION = "3.0.0 (d8a1a65c)";
2
+ export var PACKAGE_VERSION = "3.0.0 (0c31f9fb)";
3
3
  export var THEME = "open-source-visual-refresh";
4
4
  export var ALWAYS_VISUAL_REFRESH = true;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "PACKAGE_SOURCE": "components",
3
- "PACKAGE_VERSION": "3.0.0 (d8a1a65c)",
3
+ "PACKAGE_VERSION": "3.0.0 (0c31f9fb)",
4
4
  "THEME": "default",
5
5
  "ALWAYS_VISUAL_REFRESH": false
6
6
  }
@@ -206,6 +206,21 @@ export const colorChartsPaletteCategorical47: string;
206
206
  export const colorChartsPaletteCategorical48: string;
207
207
  export const colorChartsPaletteCategorical49: string;
208
208
  export const colorChartsPaletteCategorical50: string;
209
+ export const colorSeverityDarkRed: string;
210
+ export const colorSeverityRed: string;
211
+ export const colorSeverityOrange: string;
212
+ export const colorSeverityYellow: string;
213
+ export const colorSeverityGrey: string;
214
+ export const colorBackgroundNotificationSeverityCritical: string;
215
+ export const colorBackgroundNotificationSeverityHigh: string;
216
+ export const colorBackgroundNotificationSeverityMedium: string;
217
+ export const colorBackgroundNotificationSeverityLow: string;
218
+ export const colorBackgroundNotificationSeverityNeutral: string;
219
+ export const colorTextNotificationSeverityCritical: string;
220
+ export const colorTextNotificationSeverityHigh: string;
221
+ export const colorTextNotificationSeverityMedium: string;
222
+ export const colorTextNotificationSeverityLow: string;
223
+ export const colorTextNotificationSeverityNeutral: string;
209
224
  export const colorGreyOpaque10: string;
210
225
  export const colorGreyOpaque25: string;
211
226
  export const colorGreyOpaque40: string;
@@ -468,16 +483,6 @@ export const colorDropzoneTextDefault: string;
468
483
  export const colorDropzoneTextHover: string;
469
484
  export const colorDropzoneBorderDefault: string;
470
485
  export const colorDropzoneBorderHover: string;
471
- export const colorBackgroundSeverityCritical: string;
472
- export const colorTextSeverityCritical: string;
473
- export const colorBackgroundSeverityHigh: string;
474
- export const colorTextSeverityHigh: string;
475
- export const colorBackgroundSeverityMedium: string;
476
- export const colorTextSeverityMedium: string;
477
- export const colorBackgroundSeverityLow: string;
478
- export const colorTextSeverityLow: string;
479
- export const colorBackgroundSeverityNeutral: string;
480
- export const colorTextSeverityNeutral: string;
481
486
  export const fontBoxValueLargeWeight: string;
482
487
  export const fontButtonLetterSpacing: string;
483
488
  export const fontButtonWeight: string;
@@ -206,6 +206,21 @@ export var colorChartsPaletteCategorical47 = "var(--color-charts-palette-categor
206
206
  export var colorChartsPaletteCategorical48 = "var(--color-charts-palette-categorical-48-tptw1p, #014b44)";
207
207
  export var colorChartsPaletteCategorical49 = "var(--color-charts-palette-categorical-49-6lrkes, #431d84)";
208
208
  export var colorChartsPaletteCategorical50 = "var(--color-charts-palette-categorical-50-mqbaxr, #732c02)";
209
+ export var colorSeverityDarkRed = "var(--color-severity-dark-red-26aton, #870303)";
210
+ export var colorSeverityRed = "var(--color-severity-red-mjb3fl, #ce3311)";
211
+ export var colorSeverityOrange = "var(--color-severity-orange-3ez4cr, #f89256)";
212
+ export var colorSeverityYellow = "var(--color-severity-yellow-mn9wrz, #f2cd54)";
213
+ export var colorSeverityGrey = "var(--color-severity-grey-s6nlyg, #656871)";
214
+ export var colorBackgroundNotificationSeverityCritical = "var(--color-background-notification-severity-critical-m6z340, #870303)";
215
+ export var colorBackgroundNotificationSeverityHigh = "var(--color-background-notification-severity-high-zn7yde, #ce3311)";
216
+ export var colorBackgroundNotificationSeverityMedium = "var(--color-background-notification-severity-medium-empymi, #f89256)";
217
+ export var colorBackgroundNotificationSeverityLow = "var(--color-background-notification-severity-low-jkxbp4, #f2cd54)";
218
+ export var colorBackgroundNotificationSeverityNeutral = "var(--color-background-notification-severity-neutral-wtuxqz, #656871)";
219
+ export var colorTextNotificationSeverityCritical = "var(--color-text-notification-severity-critical-cmj0dk, #f9f9fa)";
220
+ export var colorTextNotificationSeverityHigh = "var(--color-text-notification-severity-high-rgh0m2, #f9f9fa)";
221
+ export var colorTextNotificationSeverityMedium = "var(--color-text-notification-severity-medium-9rk0hm, #0f141a)";
222
+ export var colorTextNotificationSeverityLow = "var(--color-text-notification-severity-low-so8wqb, #0f141a)";
223
+ export var colorTextNotificationSeverityNeutral = "var(--color-text-notification-severity-neutral-h04hdx, #f9f9fa)";
209
224
  export var colorGreyOpaque10 = "var(--color-grey-opaque-10-xipm4s, rgba(0, 0, 0, 0.1))";
210
225
  export var colorGreyOpaque25 = "var(--color-grey-opaque-25-igqnxy, rgba(255, 255, 255, 0.25))";
211
226
  export var colorGreyOpaque40 = "var(--color-grey-opaque-40-wxjof3, rgba(0, 0, 0, 0.4))";
@@ -468,16 +483,6 @@ export var colorDropzoneTextDefault = "var(--color-dropzone-text-default-owo5k2,
468
483
  export var colorDropzoneTextHover = "var(--color-dropzone-text-hover-wteupn, #424650)";
469
484
  export var colorDropzoneBorderDefault = "var(--color-dropzone-border-default-phwpnt, #8c8c94)";
470
485
  export var colorDropzoneBorderHover = "var(--color-dropzone-border-hover-tpluhc, #002b66)";
471
- export var colorBackgroundSeverityCritical = "var(--color-background-severity-critical-idosdq, #7d2105)";
472
- export var colorTextSeverityCritical = "var(--color-text-severity-critical-gtjw4w, #f9f9fa)";
473
- export var colorBackgroundSeverityHigh = "var(--color-background-severity-high-434xpy, #ba2e0f)";
474
- export var colorTextSeverityHigh = "var(--color-text-severity-high-wt51jx, #f9f9fa)";
475
- export var colorBackgroundSeverityMedium = "var(--color-background-severity-medium-n5069n, #cc5f21)";
476
- export var colorTextSeverityMedium = "var(--color-text-severity-medium-tezhp2, #0f141a)";
477
- export var colorBackgroundSeverityLow = "var(--color-background-severity-low-5ab62f, #b2911c)";
478
- export var colorTextSeverityLow = "var(--color-text-severity-low-f87ni8, #0f141a)";
479
- export var colorBackgroundSeverityNeutral = "var(--color-background-severity-neutral-e76h14, #424650)";
480
- export var colorTextSeverityNeutral = "var(--color-text-severity-neutral-x89dxu, #f9f9fa)";
481
486
  export var fontBoxValueLargeWeight = "var(--font-box-value-large-weight-onoq9k, 700)";
482
487
  export var fontButtonLetterSpacing = "var(--font-button-letter-spacing-65ug0o, 0.005em)";
483
488
  export var fontButtonWeight = "var(--font-button-weight-hv56tz, 700)";