From: Philippe Perrin Date: Mon, 6 Feb 2023 10:15:30 +0000 (+0100) Subject: SONAR-16788 Bump react-day-picker to 8.4.1 X-Git-Tag: 10.0.0.68432~257 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=204e3d4e66c441b2fd0fa1efec72f5001d9e3f23;p=sonarqube.git SONAR-16788 Bump react-day-picker to 8.4.1 --- diff --git a/server/sonar-web/package.json b/server/sonar-web/package.json index 404017b79dc..6d8fdaecb6a 100644 --- a/server/sonar-web/package.json +++ b/server/sonar-web/package.json @@ -23,7 +23,7 @@ "lodash": "4.17.21", "lunr": "2.3.9", "react": "16.14.0", - "react-day-picker": "7.4.10", + "react-day-picker": "8.5.1", "react-dom": "16.14.0", "react-draggable": "4.4.5", "react-helmet-async": "1.3.0", diff --git a/server/sonar-web/src/main/js/apps/groups/components/EditMembersModal.tsx b/server/sonar-web/src/main/js/apps/groups/components/EditMembersModal.tsx index fb27911c2d4..322294ed3bd 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/EditMembersModal.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/EditMembersModal.tsx @@ -165,7 +165,7 @@ export default class EditMembersModal extends React.PureComponent
- {translate('Done')} + {translate('done')}
); diff --git a/server/sonar-web/src/main/js/apps/groups/components/__tests__/__snapshots__/EditMembersModal-test.tsx.snap b/server/sonar-web/src/main/js/apps/groups/components/__tests__/__snapshots__/EditMembersModal-test.tsx.snap index 73c64b6bdd7..ecc4e6f75b2 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/__tests__/__snapshots__/EditMembersModal-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/groups/components/__tests__/__snapshots__/EditMembersModal-test.tsx.snap @@ -40,7 +40,7 @@ exports[`should render modal properly 1`] = ` - Done + done diff --git a/server/sonar-web/src/main/js/apps/users/components/GroupsForm.tsx b/server/sonar-web/src/main/js/apps/users/components/GroupsForm.tsx index 6fed5d8c7fa..50338c76e9c 100644 --- a/server/sonar-web/src/main/js/apps/users/components/GroupsForm.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/GroupsForm.tsx @@ -175,7 +175,7 @@ export default class GroupsForm extends React.PureComponent { diff --git a/server/sonar-web/src/main/js/apps/users/components/TokensFormModal.tsx b/server/sonar-web/src/main/js/apps/users/components/TokensFormModal.tsx index 67d94378661..d924351573a 100644 --- a/server/sonar-web/src/main/js/apps/users/components/TokensFormModal.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/TokensFormModal.tsx @@ -52,7 +52,7 @@ export default function TokensFormModal(props: Props) { />
- {translate('Done')} + {translate('done')}
); diff --git a/server/sonar-web/src/main/js/apps/users/components/__tests__/__snapshots__/GroupsForm-test.tsx.snap b/server/sonar-web/src/main/js/apps/users/components/__tests__/__snapshots__/GroupsForm-test.tsx.snap index 42d2eea5e78..5bceb55bb99 100644 --- a/server/sonar-web/src/main/js/apps/users/components/__tests__/__snapshots__/GroupsForm-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/users/components/__tests__/__snapshots__/GroupsForm-test.tsx.snap @@ -46,7 +46,7 @@ exports[`should render correctly 1`] = ` href="#" onClick={[Function]} > - Done + done diff --git a/server/sonar-web/src/main/js/apps/users/components/__tests__/__snapshots__/TokensFormModal-test.tsx.snap b/server/sonar-web/src/main/js/apps/users/components/__tests__/__snapshots__/TokensFormModal-test.tsx.snap index b2fc2f786f1..153c5c0ed03 100644 --- a/server/sonar-web/src/main/js/apps/users/components/__tests__/__snapshots__/TokensFormModal-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/users/components/__tests__/__snapshots__/TokensFormModal-test.tsx.snap @@ -39,7 +39,7 @@ exports[`should render correctly 1`] = ` - Done + done diff --git a/server/sonar-web/src/main/js/components/controls/DateInput.css b/server/sonar-web/src/main/js/components/controls/DateInput.css new file mode 100644 index 00000000000..82655a31f12 --- /dev/null +++ b/server/sonar-web/src/main/js/components/controls/DateInput.css @@ -0,0 +1,99 @@ +/* + * SonarQube + * Copyright (C) 2009-2023 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +.rdp { + --rdp-cell-size: 30px; + --rdp-outline: none; +} + +.rdp-day_selected { + background-color: var(--blue) !important; +} + +.date-input-control { + position: relative; + display: inline-block; + cursor: pointer; +} + +.date-input-control-input { + width: 130px; + padding-left: var(--controlHeight) !important; + cursor: pointer; +} + +.date-input-control-input.is-filled { + padding-right: 16px !important; +} + +.date-input-control-icon { + position: absolute; + top: 4px; + left: 4px; +} + +.date-input-control-icon path { + fill: var(--neutral600); + opacity: 0.9; +} + +.date-input-control-input:focus + .date-input-control-icon path { + fill: var(--info500); +} + +.date-input-control-reset { + position: absolute; + top: 4px; + right: 4px; + border: none; +} + +.date-input-calendar { + position: absolute; + z-index: var(--dropdownMenuZIndex); + top: 100%; + left: 0; + border: 1px solid var(--barBorderColor); + background-color: #fff; + box-shadow: var(--defaultShadow); +} + +.date-input-calendar.align-right { + left: initial; + right: 0; +} + +.date-input-calendar-nav { + display: flex; + justify-content: space-between; + align-items: center; + padding-top: var(--gridSize); + padding-left: var(--gridSize); + padding-right: var(--gridSize); +} + +.date-input-calender-month { + display: flex; + justify-content: center; +} + +.date-input-calender-month .date-input-calender-month-select { + width: 70px; +} diff --git a/server/sonar-web/src/main/js/components/controls/DateInput.tsx b/server/sonar-web/src/main/js/components/controls/DateInput.tsx index 1c3766ea0d7..d6c20cdea49 100644 --- a/server/sonar-web/src/main/js/components/controls/DateInput.tsx +++ b/server/sonar-web/src/main/js/components/controls/DateInput.tsx @@ -21,7 +21,8 @@ import classNames from 'classnames'; import { addMonths, setMonth, setYear, subMonths } from 'date-fns'; import { range } from 'lodash'; import * as React from 'react'; -import DayPicker, { DayModifiers, Modifier, Modifiers } from 'react-day-picker'; +import { ActiveModifiers, DayPicker, Matcher } from 'react-day-picker'; +import 'react-day-picker/dist/style.css'; import { injectIntl, WrappedComponentProps } from 'react-intl'; import { ButtonIcon, ClearButton } from '../../components/controls/buttons'; import OutsideClickHandler from '../../components/controls/OutsideClickHandler'; @@ -32,15 +33,13 @@ import { getMonthName, getShortMonthName, getShortWeekDayName, - getWeekDayName, translate, translateWithParameters, } from '../../helpers/l10n'; -import './DayPicker.css'; +import './DateInput.css'; import EscKeydownHandler from './EscKeydownHandler'; import FocusOutHandler from './FocusOutHandler'; import Select from './Select'; -import './styles.css'; interface Props { alignRight?: boolean; @@ -64,9 +63,8 @@ interface State { lastHovered?: Date; } -type Week = [string, string, string, string, string, string, string]; - -const MONTH_IN_YEAR = 12; +const MONTHS_IN_YEAR = 12; +const YEARS_TO_DISPLAY = 10; export default class DateInput extends React.PureComponent { input?: HTMLInputElement | null; @@ -100,14 +98,14 @@ export default class DateInput extends React.PureComponent { this.setState({ open: false }); }; - handleDayClick = (day: Date, modifiers: DayModifiers) => { + handleDayClick = (day: Date, modifiers: ActiveModifiers) => { if (!modifiers.disabled) { this.closeCalendar(); this.props.onChange(day); } }; - handleDayMouseEnter = (day: Date, modifiers: DayModifiers) => { + handleDayMouseEnter = (day: Date, modifiers: ActiveModifiers) => { this.setState({ lastHovered: modifiers.disabled ? undefined : day }); }; @@ -129,24 +127,24 @@ export default class DateInput extends React.PureComponent { getPreviousMonthAriaLabel = () => { const { currentMonth } = this.state; - const previous = (currentMonth.getMonth() + MONTH_IN_YEAR - 1) % MONTH_IN_YEAR; + const previous = (currentMonth.getMonth() + MONTHS_IN_YEAR - 1) % MONTHS_IN_YEAR; return translateWithParameters( 'show_month_x_of_year_y', getMonthName(previous), - currentMonth.getFullYear() - Math.floor(previous / (MONTH_IN_YEAR - 1)) + currentMonth.getFullYear() - Math.floor(previous / (MONTHS_IN_YEAR - 1)) ); }; getNextMonthAriaLabel = () => { const { currentMonth } = this.state; - const next = (currentMonth.getMonth() + MONTH_IN_YEAR + 1) % MONTH_IN_YEAR; + const next = (currentMonth.getMonth() + MONTHS_IN_YEAR + 1) % MONTHS_IN_YEAR; return translateWithParameters( 'show_month_x_of_year_y', getMonthName(next), - currentMonth.getFullYear() + 1 - Math.ceil(next / (MONTH_IN_YEAR - 1)) + currentMonth.getFullYear() + 1 - Math.ceil(next / (MONTHS_IN_YEAR - 1)) ); }; @@ -156,7 +154,7 @@ export default class DateInput extends React.PureComponent { highlightFrom, highlightTo, minDate, - value, + value: selectedDay, name, className, inputClassName, @@ -167,31 +165,22 @@ export default class DateInput extends React.PureComponent { const after = this.props.maxDate || new Date(); - const months = range(MONTH_IN_YEAR); - const years = range(new Date().getFullYear() - 10, new Date().getFullYear() + 1); - - const selectedDays: Modifier[] = value ? [value] : []; - let modifiers: Partial | undefined; - const lastHoveredOrValue = lastHovered || value; + const years = range(new Date().getFullYear() - YEARS_TO_DISPLAY, new Date().getFullYear() + 1); + const yearOptions = years.map((year) => ({ label: String(year), value: year })); + const monthOptions = range(MONTHS_IN_YEAR).map((month) => ({ + label: getShortMonthName(month), + value: month, + })); + let highlighted: Matcher = false; + const lastHoveredOrValue = lastHovered || selectedDay; if (highlightFrom && lastHoveredOrValue) { - modifiers = { highlighted: { from: highlightFrom, to: lastHoveredOrValue } }; - selectedDays.push(highlightFrom); + highlighted = { from: highlightFrom, to: lastHoveredOrValue }; } if (highlightTo && lastHoveredOrValue) { - modifiers = { highlighted: { from: lastHoveredOrValue, to: highlightTo } }; - selectedDays.push(highlightTo); + highlighted = { from: lastHoveredOrValue, to: highlightTo }; } - const weekdaysLong = range(7).map(getWeekDayName) as Week; - const weekdaysShort = range(7).map(getShortWeekDayName) as Week; - - const monthOptions = months.map((month) => ({ - label: getShortMonthName(month), - value: month, - })); - const yearOptions = years.map((year) => ({ label: String(year), value: year })); - return ( @@ -199,7 +188,7 @@ export default class DateInput extends React.PureComponent { (this.input = node)} @@ -208,10 +197,10 @@ export default class DateInput extends React.PureComponent { placeholder={placeholder} readOnly={true} type="text" - value={value} + value={selectedDay} /> - {value !== undefined && ( + {selectedDay !== undefined && ( { } - disabledDays={{ after, before: minDate }} - firstDayOfWeek={1} - modifiers={modifiers} + mode="default" + disableNavigation={true} + components={{ CaptionLabel: () => null }} + disabled={{ after, before: minDate }} + weekStartsOn={1} + formatters={{ + formatWeekdayName: (date) => getShortWeekDayName(date.getDay()), + }} + modifiers={{ highlighted }} + modifiersClassNames={{ highlighted: 'highlighted' }} month={currentMonth} - navbarElement={} + selected={selectedDay} onDayClick={this.handleDayClick} onDayMouseEnter={this.handleDayMouseEnter} - selectedDays={selectedDays} - weekdaysLong={weekdaysLong} - weekdaysShort={weekdaysShort} /> )} @@ -286,10 +278,6 @@ export default class DateInput extends React.PureComponent { } } -function NullComponent() { - return null; -} - type InputWrapperProps = Omit, 'value'> & WrappedComponentProps & { innerRef: React.Ref; diff --git a/server/sonar-web/src/main/js/components/controls/DayPicker.css b/server/sonar-web/src/main/js/components/controls/DayPicker.css deleted file mode 100644 index d60c33bb2e2..00000000000 --- a/server/sonar-web/src/main/js/components/controls/DayPicker.css +++ /dev/null @@ -1,124 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2023 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -.DayPicker { - display: inline-block; -} - -.DayPicker-wrapper { - position: relative; - user-select: none; - padding-bottom: var(--gridSize); - flex-direction: row; -} - -.DayPicker-Months { - display: flex; - flex-wrap: wrap; - justify-content: center; -} - -.DayPicker-Month { - display: table; - border-collapse: collapse; - border-spacing: 0; - user-select: none; - margin: 0 var(--gridSize); - margin-top: var(--gridSize); -} - -.DayPicker-Weekdays { - display: table-header-group; -} - -.DayPicker-WeekdaysRow { - display: table-row; -} - -.DayPicker-Weekday { - display: table-cell; - padding: var(--gridSize); - font-size: var(--smallFontSize); - text-align: center; -} - -.DayPicker-Weekday abbr[title] { - border-bottom: none; - text-decoration: none; -} - -.DayPicker-Body { - display: table-row-group; -} - -.DayPicker-Week { - display: table-row; -} - -.DayPicker-Day { - display: table-cell; - line-height: 15px; - padding: var(--gridSize); - text-align: center; - cursor: pointer; - vertical-align: top; - outline: none; -} - -.DayPicker--interactionDisabled .DayPicker-Day { - cursor: default; -} - -.DayPicker-Footer { - padding-top: var(--gridSize); -} - -/* Default modifiers */ - -.DayPicker-Day--today { - font-weight: bold; -} - -.DayPicker-Day--outside { - cursor: default; - color: #8b9898; -} - -.DayPicker-Day--disabled { - color: var(--gray80); - cursor: not-allowed; -} - -.DayPicker-Day--selected:not(.DayPicker-Day--disabled):not(.DayPicker-Day--outside) { - background-color: var(--blue); - color: #fff; -} - -.DayPicker:not(.DayPicker--interactionDisabled) - .DayPicker-Day:not(.DayPicker-Day--disabled):not(.DayPicker-Day--selected):not( - .DayPicker-Day--highlighted - ):not(.DayPicker-Day--outside):hover { - background-color: var(--barBackgroundColor); -} - -.DayPicker-Day--highlighted:not(.DayPicker-Day--disabled):not(.DayPicker-Day--selected):not( - .DayPicker-Day--outside - ) { - background-color: var(--lightBlue); -} diff --git a/server/sonar-web/src/main/js/components/controls/__tests__/DateInput-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/DateInput-test.tsx index 35067dd5e93..a904d7a3ad6 100644 --- a/server/sonar-web/src/main/js/components/controls/__tests__/DateInput-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/DateInput-test.tsx @@ -20,6 +20,7 @@ import { addDays, setMonth, setYear, subDays, subMonths } from 'date-fns'; import { shallow } from 'enzyme'; import * as React from 'react'; +import { DayPicker } from 'react-day-picker'; import { parseDate } from '../../../helpers/dates'; import DateInput from '../DateInput'; @@ -65,11 +66,11 @@ it('should select a day', () => { const { wrapper, instance } = shallowRender({ onChange }); wrapper.setState({ open: true }); - instance.handleDayClick(dateA, { disabled: true, outside: undefined, today: undefined }); + instance.handleDayClick(dateA, { disabled: true }); expect(onChange).not.toHaveBeenCalled(); expect(wrapper.state().open).toBe(true); - instance.handleDayClick(dateA, { outside: undefined, today: undefined }); + instance.handleDayClick(dateA, {}); expect(onChange).toHaveBeenLastCalledWith(dateA); wrapper.update(); expect(wrapper.state().open).toBe(false); @@ -84,11 +85,10 @@ it('should hightlightFrom range', () => { wrapper.setState({ open: true }); const dateC = addDays(dateA, 3); - instance.handleDayMouseEnter(dateC, { outside: undefined, today: undefined }); + instance.handleDayMouseEnter(dateC, {}); wrapper.update(); - const dayPicker = wrapper.find('DayPicker'); - expect(dayPicker.prop('modifiers')).toEqual({ highlighted: { from: dateA, to: dateC } }); - expect(dayPicker.prop('selectedDays')).toEqual([dateA]); + const dayPicker = wrapper.find(DayPicker); + expect(dayPicker.props().modifiers).toEqual({ highlighted: { from: dateA, to: dateC } }); }); it('should hightlightTo range', () => { @@ -96,11 +96,10 @@ it('should hightlightTo range', () => { wrapper.setState({ open: true }); const dateC = subDays(dateB, 5); - instance.handleDayMouseEnter(dateC, { outside: undefined, today: undefined }); + instance.handleDayMouseEnter(dateC, {}); wrapper.update(); - const dayPicker = wrapper.find('DayPicker'); - expect(dayPicker.prop('modifiers')).toEqual({ highlighted: { from: dateC, to: dateB } }); - expect(dayPicker.prop('selectedDays')).toEqual([dateB]); + const dayPicker = wrapper.find(DayPicker); + expect(dayPicker.props().modifiers).toEqual({ highlighted: { from: dateC, to: dateB } }); }); it('should announce the proper month and year for next/previous buttons aria label', () => { diff --git a/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/DateInput-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/DateInput-test.tsx.snap index b6d12dc1f09..647cd74437b 100644 --- a/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/DateInput-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/DateInput-test.tsx.snap @@ -258,110 +258,39 @@ exports[`should render 3`] = ` } - classNames={ + components={ { - "body": "DayPicker-Body", - "caption": "DayPicker-Caption", - "container": "DayPicker", - "day": "DayPicker-Day", - "disabled": "disabled", - "footer": "DayPicker-Footer", - "interactionDisabled": "DayPicker--interactionDisabled", - "month": "DayPicker-Month", - "months": "DayPicker-Months", - "navBar": "DayPicker-NavBar", - "navButtonInteractionDisabled": "DayPicker-NavButton--interactionDisabled", - "navButtonNext": "DayPicker-NavButton DayPicker-NavButton--next", - "navButtonPrev": "DayPicker-NavButton DayPicker-NavButton--prev", - "outside": "outside", - "selected": "selected", - "today": "today", - "todayButton": "DayPicker-TodayButton", - "week": "DayPicker-Week", - "weekNumber": "DayPicker-WeekNumber", - "weekday": "DayPicker-Weekday", - "weekdays": "DayPicker-Weekdays", - "weekdaysRow": "DayPicker-WeekdaysRow", - "wrapper": "DayPicker-wrapper", + "CaptionLabel": [Function], } } - disabledDays={ + disableNavigation={true} + disabled={ { "after": 2018-02-05T00:00:00.000Z, "before": 2018-01-17T00:00:00.000Z, } } - enableOutsideDaysClick={true} - firstDayOfWeek={1} - fixedWeeks={false} - labels={ + formatters={ { - "nextMonth": "Next Month", - "previousMonth": "Previous Month", + "formatWeekdayName": [Function], } } - locale="en" - localeUtils={ + mode="default" + modifiers={ { - "default": { - "formatDay": [Function], - "formatMonthTitle": [Function], - "formatWeekdayLong": [Function], - "formatWeekdayShort": [Function], - "getFirstDayOfWeek": [Function], - "getMonths": [Function], - }, - "formatDay": [Function], - "formatMonthTitle": [Function], - "formatWeekdayLong": [Function], - "formatWeekdayShort": [Function], - "getFirstDayOfWeek": [Function], - "getMonths": [Function], + "highlighted": false, + } + } + modifiersClassNames={ + { + "highlighted": "highlighted", } } month={2018-01-17T00:00:00.000Z} - navbarElement={} - numberOfMonths={1} onDayClick={[Function]} onDayMouseEnter={[Function]} - pagedNavigation={false} - renderDay={[Function]} - renderWeek={[Function]} - reverseMonths={false} - selectedDays={ - [ - 2018-01-17T00:00:00.000Z, - ] - } - showOutsideDays={false} - showWeekDays={true} - showWeekNumbers={false} - tabIndex={0} - weekdayElement={} - weekdaysLong={ - [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday", - ] - } - weekdaysShort={ - [ - "Sun", - "Mon", - "Tue", - "Wed", - "Thu", - "Fri", - "Sat", - ] - } + selected={2018-01-17T00:00:00.000Z} + weekStartsOn={1} /> diff --git a/server/sonar-web/src/main/js/components/controls/styles.css b/server/sonar-web/src/main/js/components/controls/styles.css deleted file mode 100644 index dc7fb5defe0..00000000000 --- a/server/sonar-web/src/main/js/components/controls/styles.css +++ /dev/null @@ -1,89 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2023 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -.date-input-control { - position: relative; - display: inline-block; - cursor: pointer; -} - -.date-input-control-input { - width: 130px; - padding-left: var(--controlHeight) !important; - cursor: pointer; -} - -.date-input-control-input.is-filled { - padding-right: 16px !important; -} - -.date-input-control-icon { - position: absolute; - top: 4px; - left: 4px; -} - -.date-input-control-icon path { - fill: var(--neutral600); - opacity: 0.9; -} - -.date-input-control-input:focus + .date-input-control-icon path { - fill: var(--info500); -} - -.date-input-control-reset { - position: absolute; - top: 4px; - right: 4px; - border: none; -} - -.date-input-calendar { - position: absolute; - z-index: var(--dropdownMenuZIndex); - top: 100%; - left: 0; - border: 1px solid var(--barBorderColor); - background-color: #fff; - box-shadow: var(--defaultShadow); -} - -.date-input-calendar.align-right { - left: initial; - right: 0; -} - -.date-input-calendar-nav { - display: flex; - justify-content: space-between; - align-items: center; - padding-top: var(--gridSize); - padding-left: var(--gridSize); - padding-right: var(--gridSize); -} - -.date-input-calender-month { - display: flex; - justify-content: center; -} - -.date-input-calender-month .date-input-calender-month-select { - width: 70px; -} diff --git a/server/sonar-web/yarn.lock b/server/sonar-web/yarn.lock index 7208c8d20c5..a35c81616c1 100644 --- a/server/sonar-web/yarn.lock +++ b/server/sonar-web/yarn.lock @@ -2907,7 +2907,7 @@ __metadata: postcss-custom-properties: 12.1.11 prettier: 2.8.3 react: 16.14.0 - react-day-picker: 7.4.10 + react-day-picker: 8.5.1 react-dom: 16.14.0 react-draggable: 4.4.5 react-helmet-async: 1.3.0 @@ -8464,14 +8464,13 @@ __metadata: languageName: node linkType: hard -"react-day-picker@npm:7.4.10": - version: 7.4.10 - resolution: "react-day-picker@npm:7.4.10" - dependencies: - prop-types: ^15.6.2 +"react-day-picker@npm:8.5.1": + version: 8.5.1 + resolution: "react-day-picker@npm:8.5.1" peerDependencies: - react: ~0.13.x || ~0.14.x || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 33a4614bb4d457a3e72462d092fa131d3d7ec1ba858ac7e70d65b59e464606ffc039afdd226db37ead1326e248ca9a103007ee0bb829b277cd7297e5f5807ad1 + date-fns: ^2.28.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: 0d444710bccf07db869673f19975e68962b44a1de8a176710e2a0297e0c7d98e610b7d7e5b24a19dc695dac7e3745191cfef3f656d87f6fbafc1ecc8833a212c languageName: node linkType: hard diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties index d3ac510f007..415d73c4f32 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -70,6 +70,7 @@ dismiss=Dismiss dismiss_permanently=Dismiss permanently display=Display documentation=documentation +done=Done download_verb=Download duplications=Duplications end_date=End Date @@ -317,14 +318,10 @@ work_duration.about=~ {0} #------------------------------------------------------------------------------ # -# CALENDAR +# DAY PICKER # #------------------------------------------------------------------------------ -Done=Done -Prev=Prev -Next=Next -Today=Today January=January February=February March=March @@ -370,8 +367,8 @@ Th=Th Fr=Fr Sa=Sa select_month=Select a month -show_month_x_of_year_y=Show {0} of {1} select_year=Select a year +show_month_x_of_year_y=Show {0} of {1} date.select_month_and_year_x=Select the month and year, currently {0} #------------------------------------------------------------------------------