@salutejs/plasma-new-hope 0.88.0-canary.1223.9405589989.0 → 0.88.0-canary.1224.9413433725.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Calendar/Calendar.tokens.js +64 -28
- package/cjs/components/Calendar/Calendar.tokens.js.map +1 -1
- package/cjs/components/Calendar/Calendar.types.js.map +1 -1
- package/cjs/components/Calendar/CalendarBase/CalendarBase.css +57 -29
- package/cjs/components/Calendar/CalendarBase/CalendarBase.js +6 -0
- package/cjs/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
- package/cjs/components/Calendar/CalendarBase/CalendarBase.styles.js +1 -1
- package/cjs/components/Calendar/CalendarBase/CalendarBase.styles.js.map +1 -1
- package/cjs/components/Calendar/CalendarBase/{CalendarBase.styles_rv9ax9.css → CalendarBase.styles_1m6uih1.css} +1 -1
- package/cjs/components/Calendar/CalendarDouble/CalendarDouble.css +58 -30
- package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +1 -0
- package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
- package/cjs/components/Calendar/CalendarDouble/CalendarDouble.styles.js +1 -1
- package/cjs/components/Calendar/CalendarDouble/CalendarDouble.styles.js.map +1 -1
- package/cjs/components/Calendar/CalendarDouble/{CalendarDouble.styles_1rc2ejs.css → CalendarDouble.styles_e9ada0.css} +2 -2
- package/cjs/components/Calendar/hoc/withRange.js.map +1 -1
- package/cjs/components/Calendar/hooks/useDays.js +1 -1
- package/cjs/components/Calendar/hooks/useDays.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarDayItem/CalendarDayItem.css +4 -4
- package/cjs/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles.js +9 -9
- package/cjs/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles_wuxgzs.css +4 -0
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.css +7 -7
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.styles.js +1 -1
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.styles.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarDays/{CalendarDays.styles_bnrjbd.css → CalendarDays.styles_1oq8sud.css} +1 -1
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.css +36 -8
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js +26 -17
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +27 -12
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles_1b92i4d.css +8 -0
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.css +4 -4
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +1 -1
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js +1 -1
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.styles_7kz2z4.css +4 -0
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.css +4 -4
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +1 -1
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.styles.js +1 -1
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.styles.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.styles_hbv1kh.css +4 -0
- package/cjs/components/Calendar/utils/index.js.map +1 -1
- package/cjs/components/Combobox/Combobox.js +2 -2
- package/cjs/components/Combobox/Combobox.js.map +1 -1
- package/cjs/components/DatePicker/DatePicker.tokens.js +186 -0
- package/cjs/components/DatePicker/DatePicker.tokens.js.map +1 -0
- package/cjs/components/DatePicker/DatePickerBase.styles.js +30 -0
- package/cjs/components/DatePicker/DatePickerBase.styles.js.map +1 -0
- package/cjs/components/DatePicker/DatePickerBase.styles_1u3oyx8.css +1 -0
- package/cjs/components/DatePicker/RangeDate/DatePicker.css +150 -0
- package/cjs/components/DatePicker/RangeDate/DatePicker.js +341 -0
- package/cjs/components/DatePicker/RangeDate/DatePicker.js.map +1 -0
- package/cjs/components/DatePicker/RangeDate/DatePicker.styles.js +39 -0
- package/cjs/components/DatePicker/RangeDate/DatePicker.styles.js.map +1 -0
- package/cjs/components/DatePicker/RangeDate/DatePicker.styles_1aihs63.css +3 -0
- package/cjs/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.css +142 -0
- package/cjs/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.js +52 -0
- package/cjs/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.js.map +1 -0
- package/cjs/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.styles.js +32 -0
- package/cjs/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.styles.js.map +1 -0
- package/cjs/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.styles_x3to15.css +1 -0
- package/cjs/components/{Accordion/variations/_view → DatePicker/RangeDate/variations/_disabled}/base.js +2 -2
- package/cjs/components/DatePicker/RangeDate/variations/_disabled/base.js.map +1 -0
- package/cjs/components/DatePicker/RangeDate/variations/_disabled/base_tl4jc7.css +1 -0
- package/cjs/components/DatePicker/RangeDate/variations/_readonly/base.js +9 -0
- package/cjs/components/DatePicker/RangeDate/variations/_readonly/base.js.map +1 -0
- package/cjs/components/DatePicker/RangeDate/variations/_readonly/base_1851hxh.css +1 -0
- package/cjs/components/DatePicker/RangeDate/variations/_size/base.js +9 -0
- package/cjs/components/DatePicker/RangeDate/variations/_size/base.js.map +1 -0
- package/cjs/components/DatePicker/RangeDate/variations/_size/base_1yswrwb.css +1 -0
- package/cjs/components/{Accordion/variations/_size → DatePicker/RangeDate/variations/_view}/base.js +1 -1
- package/cjs/components/DatePicker/RangeDate/variations/_view/base.js.map +1 -0
- package/cjs/components/DatePicker/SingleDate/DatePicker.css +134 -0
- package/cjs/components/DatePicker/SingleDate/DatePicker.js +183 -0
- package/cjs/components/DatePicker/SingleDate/DatePicker.js.map +1 -0
- package/cjs/components/DatePicker/SingleDate/DatePicker.styles.js +51 -0
- package/cjs/components/DatePicker/SingleDate/DatePicker.styles.js.map +1 -0
- package/cjs/components/DatePicker/SingleDate/DatePicker.styles_1udo3ch.css +5 -0
- package/cjs/components/DatePicker/SingleDate/variations/_disabled/base.js +9 -0
- package/cjs/components/DatePicker/SingleDate/variations/_disabled/base.js.map +1 -0
- package/cjs/components/DatePicker/SingleDate/variations/_disabled/base_1rfgfsz.css +1 -0
- package/cjs/components/DatePicker/SingleDate/variations/_readonly/base.js +9 -0
- package/cjs/components/DatePicker/SingleDate/variations/_readonly/base.js.map +1 -0
- package/cjs/components/DatePicker/SingleDate/variations/_readonly/base_ayigv4.css +1 -0
- package/cjs/components/DatePicker/SingleDate/variations/_size/base.js +9 -0
- package/cjs/components/DatePicker/SingleDate/variations/_size/base.js.map +1 -0
- package/cjs/components/DatePicker/SingleDate/variations/_size/base_jrds3p.css +1 -0
- package/cjs/components/DatePicker/SingleDate/variations/_view/base.js +9 -0
- package/cjs/components/DatePicker/SingleDate/variations/_view/base.js.map +1 -0
- package/cjs/components/DatePicker/SingleDate/variations/_view/base_163gwfv.css +1 -0
- package/cjs/components/DatePicker/hooks/useDatePicker.js +79 -0
- package/cjs/components/DatePicker/hooks/useDatePicker.js.map +1 -0
- package/cjs/components/DatePicker/utils/dateHelper.js +84 -0
- package/cjs/components/DatePicker/utils/dateHelper.js.map +1 -0
- package/cjs/components/Dropdown/Dropdown.js +2 -1
- package/cjs/components/Dropdown/Dropdown.js.map +1 -1
- package/cjs/components/Dropdown/utils/index.js +0 -17
- package/cjs/components/Dropdown/utils/index.js.map +1 -1
- package/cjs/components/Range/Range.css +14 -8
- package/cjs/components/Range/Range.js +79 -32
- package/cjs/components/Range/Range.js.map +1 -1
- package/cjs/components/Range/Range.styles.js +23 -11
- package/cjs/components/Range/Range.styles.js.map +1 -1
- package/cjs/components/Range/Range.styles_nik84l.css +9 -0
- package/cjs/components/Range/variations/_readonly/base.js +1 -1
- package/cjs/components/Range/variations/_readonly/base_yv1z2h.css +1 -0
- package/cjs/components/Range/variations/_size/base.js +1 -1
- package/cjs/components/Range/variations/_size/{base_16xiubi.css → base_gbgxzj.css} +1 -1
- package/cjs/components/Range/variations/_view/base.js +1 -1
- package/cjs/components/Range/variations/_view/base_87gpil.css +1 -0
- package/cjs/components/Select/Select.js +2 -2
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/Slider/Slider.css +3 -3
- package/cjs/components/Slider/components/Double/Double.css +3 -3
- package/cjs/components/TextField/TextField.tokens.js +1 -1
- package/cjs/components/TextField/TextField.tokens.js.map +1 -1
- package/cjs/components/TextField/variations/_read-only/base.js +1 -1
- package/cjs/components/TextField/variations/_read-only/base_1vu13zn.css +1 -0
- package/cjs/components/TextField/variations/_size/base.js +1 -1
- package/cjs/components/TextField/variations/_size/base.js.map +1 -1
- package/cjs/components/TextField/variations/_size/base_orwx1f.css +1 -0
- package/cjs/components/TextField/variations/_view/base.js +1 -1
- package/cjs/components/TextField/variations/_view/base_18ea6z7.css +1 -0
- package/cjs/components/_Icon/Icon.assets/DisclosureDownFill.js +23 -0
- package/cjs/components/_Icon/Icon.assets/DisclosureDownFill.js.map +1 -0
- package/cjs/components/_Icon/Icon.assets/DisclosureLeft.js +1 -1
- package/cjs/components/_Icon/Icon.assets/DisclosureLeft.js.map +1 -1
- package/cjs/components/_Icon/Icon.assets/DisclosureRight.js +5 -15
- package/cjs/components/_Icon/Icon.assets/DisclosureRight.js.map +1 -1
- package/cjs/components/_Icon/Icons/{IconMinus.js → IconDisclosureDownFill.js} +5 -5
- package/cjs/components/_Icon/Icons/IconDisclosureDownFill.js.map +1 -0
- package/cjs/index.css +68 -41
- package/cjs/index.js +12 -8
- package/cjs/index.js.map +1 -1
- package/cjs/utils/datejs.js +12 -0
- package/cjs/utils/datejs.js.map +1 -0
- package/cjs/utils/getPopoverPlacement.js +23 -0
- package/cjs/utils/getPopoverPlacement.js.map +1 -0
- package/cjs/utils/index.js.map +1 -1
- package/es/components/Calendar/Calendar.tokens.js +64 -28
- package/es/components/Calendar/Calendar.tokens.js.map +1 -1
- package/es/components/Calendar/Calendar.types.js.map +1 -1
- package/es/components/Calendar/CalendarBase/CalendarBase.css +57 -29
- package/es/components/Calendar/CalendarBase/CalendarBase.js +7 -1
- package/es/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
- package/es/components/Calendar/CalendarBase/CalendarBase.styles.js +1 -1
- package/es/components/Calendar/CalendarBase/CalendarBase.styles.js.map +1 -1
- package/es/components/Calendar/CalendarBase/{CalendarBase.styles_rv9ax9.css → CalendarBase.styles_1m6uih1.css} +1 -1
- package/es/components/Calendar/CalendarDouble/CalendarDouble.css +58 -30
- package/es/components/Calendar/CalendarDouble/CalendarDouble.js +1 -0
- package/es/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
- package/es/components/Calendar/CalendarDouble/CalendarDouble.styles.js +1 -1
- package/es/components/Calendar/CalendarDouble/CalendarDouble.styles.js.map +1 -1
- package/es/components/Calendar/CalendarDouble/{CalendarDouble.styles_1rc2ejs.css → CalendarDouble.styles_e9ada0.css} +2 -2
- package/es/components/Calendar/hoc/withRange.js.map +1 -1
- package/es/components/Calendar/hooks/useDays.js +1 -1
- package/es/components/Calendar/hooks/useDays.js.map +1 -1
- package/es/components/Calendar/ui/CalendarDayItem/CalendarDayItem.css +4 -4
- package/es/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles.js +9 -9
- package/es/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles.js.map +1 -1
- package/es/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles_wuxgzs.css +4 -0
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.css +7 -7
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.styles.js +1 -1
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.styles.js.map +1 -1
- package/es/components/Calendar/ui/CalendarDays/{CalendarDays.styles_bnrjbd.css → CalendarDays.styles_1oq8sud.css} +1 -1
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.css +36 -8
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js +27 -18
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +26 -13
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js.map +1 -1
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles_1b92i4d.css +8 -0
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.css +4 -4
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +1 -1
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js +1 -1
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js.map +1 -1
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.styles_7kz2z4.css +4 -0
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.css +4 -4
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.js +1 -1
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.styles.js +1 -1
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.styles.js.map +1 -1
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.styles_hbv1kh.css +4 -0
- package/es/components/Calendar/utils/index.js.map +1 -1
- package/es/components/Combobox/Combobox.js +1 -1
- package/es/components/Combobox/Combobox.js.map +1 -1
- package/es/components/DatePicker/DatePicker.tokens.js +181 -0
- package/es/components/DatePicker/DatePicker.tokens.js.map +1 -0
- package/es/components/DatePicker/DatePickerBase.styles.js +26 -0
- package/es/components/DatePicker/DatePickerBase.styles.js.map +1 -0
- package/es/components/DatePicker/DatePickerBase.styles_1u3oyx8.css +1 -0
- package/es/components/DatePicker/RangeDate/DatePicker.css +150 -0
- package/es/components/DatePicker/RangeDate/DatePicker.js +336 -0
- package/es/components/DatePicker/RangeDate/DatePicker.js.map +1 -0
- package/es/components/DatePicker/RangeDate/DatePicker.styles.js +33 -0
- package/es/components/DatePicker/RangeDate/DatePicker.styles.js.map +1 -0
- package/es/components/DatePicker/RangeDate/DatePicker.styles_1aihs63.css +3 -0
- package/es/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.css +142 -0
- package/es/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.js +48 -0
- package/es/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.js.map +1 -0
- package/es/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.styles.js +28 -0
- package/es/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.styles.js.map +1 -0
- package/es/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.styles_x3to15.css +1 -0
- package/es/components/{Accordion/variations/_size → DatePicker/RangeDate/variations/_disabled}/base.js +2 -2
- package/es/components/DatePicker/RangeDate/variations/_disabled/base.js.map +1 -0
- package/es/components/DatePicker/RangeDate/variations/_disabled/base_tl4jc7.css +1 -0
- package/es/components/DatePicker/RangeDate/variations/_readonly/base.js +5 -0
- package/es/components/DatePicker/RangeDate/variations/_readonly/base.js.map +1 -0
- package/es/components/DatePicker/RangeDate/variations/_readonly/base_1851hxh.css +1 -0
- package/es/components/DatePicker/RangeDate/variations/_size/base.js +5 -0
- package/es/components/DatePicker/RangeDate/variations/_size/base.js.map +1 -0
- package/es/components/DatePicker/RangeDate/variations/_size/base_1yswrwb.css +1 -0
- package/es/components/{Accordion → DatePicker/RangeDate}/variations/_view/base.js +1 -1
- package/es/components/DatePicker/RangeDate/variations/_view/base.js.map +1 -0
- package/es/components/DatePicker/SingleDate/DatePicker.css +134 -0
- package/es/components/DatePicker/SingleDate/DatePicker.js +178 -0
- package/es/components/DatePicker/SingleDate/DatePicker.js.map +1 -0
- package/es/components/DatePicker/SingleDate/DatePicker.styles.js +43 -0
- package/es/components/DatePicker/SingleDate/DatePicker.styles.js.map +1 -0
- package/es/components/DatePicker/SingleDate/DatePicker.styles_1udo3ch.css +5 -0
- package/es/components/DatePicker/SingleDate/variations/_disabled/base.js +5 -0
- package/es/components/DatePicker/SingleDate/variations/_disabled/base.js.map +1 -0
- package/es/components/DatePicker/SingleDate/variations/_disabled/base_1rfgfsz.css +1 -0
- package/es/components/DatePicker/SingleDate/variations/_readonly/base.js +5 -0
- package/es/components/DatePicker/SingleDate/variations/_readonly/base.js.map +1 -0
- package/es/components/DatePicker/SingleDate/variations/_readonly/base_ayigv4.css +1 -0
- package/es/components/DatePicker/SingleDate/variations/_size/base.js +5 -0
- package/es/components/DatePicker/SingleDate/variations/_size/base.js.map +1 -0
- package/es/components/DatePicker/SingleDate/variations/_size/base_jrds3p.css +1 -0
- package/es/components/DatePicker/SingleDate/variations/_view/base.js +5 -0
- package/es/components/DatePicker/SingleDate/variations/_view/base.js.map +1 -0
- package/es/components/DatePicker/SingleDate/variations/_view/base_163gwfv.css +1 -0
- package/es/components/DatePicker/hooks/useDatePicker.js +75 -0
- package/es/components/DatePicker/hooks/useDatePicker.js.map +1 -0
- package/es/components/DatePicker/utils/dateHelper.js +76 -0
- package/es/components/DatePicker/utils/dateHelper.js.map +1 -0
- package/es/components/Dropdown/Dropdown.js +2 -1
- package/es/components/Dropdown/Dropdown.js.map +1 -1
- package/es/components/Dropdown/utils/index.js +1 -16
- package/es/components/Dropdown/utils/index.js.map +1 -1
- package/es/components/Range/Range.css +14 -8
- package/es/components/Range/Range.js +81 -34
- package/es/components/Range/Range.js.map +1 -1
- package/es/components/Range/Range.styles.js +23 -12
- package/es/components/Range/Range.styles.js.map +1 -1
- package/es/components/Range/Range.styles_nik84l.css +9 -0
- package/es/components/Range/variations/_readonly/base.js +1 -1
- package/es/components/Range/variations/_readonly/base_yv1z2h.css +1 -0
- package/es/components/Range/variations/_size/base.js +1 -1
- package/es/components/Range/variations/_size/{base_16xiubi.css → base_gbgxzj.css} +1 -1
- package/es/components/Range/variations/_view/base.js +1 -1
- package/es/components/Range/variations/_view/base_87gpil.css +1 -0
- package/es/components/Select/Select.js +1 -1
- package/es/components/Select/Select.js.map +1 -1
- package/es/components/Slider/Slider.css +3 -3
- package/es/components/Slider/components/Double/Double.css +3 -3
- package/es/components/TextField/TextField.tokens.js +1 -1
- package/es/components/TextField/TextField.tokens.js.map +1 -1
- package/es/components/TextField/variations/_read-only/base.js +1 -1
- package/es/components/TextField/variations/_read-only/base_1vu13zn.css +1 -0
- package/es/components/TextField/variations/_size/base.js +1 -1
- package/es/components/TextField/variations/_size/base.js.map +1 -1
- package/es/components/TextField/variations/_size/base_orwx1f.css +1 -0
- package/es/components/TextField/variations/_view/base.js +1 -1
- package/es/components/TextField/variations/_view/base_18ea6z7.css +1 -0
- package/es/components/_Icon/Icon.assets/DisclosureDownFill.js +19 -0
- package/es/components/_Icon/Icon.assets/DisclosureDownFill.js.map +1 -0
- package/es/components/_Icon/Icon.assets/DisclosureLeft.js +1 -1
- package/es/components/_Icon/Icon.assets/DisclosureLeft.js.map +1 -1
- package/es/components/_Icon/Icon.assets/DisclosureRight.js +5 -15
- package/es/components/_Icon/Icon.assets/DisclosureRight.js.map +1 -1
- package/es/components/_Icon/Icons/{IconMinus.js → IconDisclosureDownFill.js} +5 -5
- package/es/components/_Icon/Icons/IconDisclosureDownFill.js.map +1 -0
- package/es/index.css +68 -41
- package/es/index.js +4 -3
- package/es/index.js.map +1 -1
- package/es/utils/datejs.js +8 -0
- package/es/utils/datejs.js.map +1 -0
- package/es/utils/getPopoverPlacement.js +18 -0
- package/es/utils/getPopoverPlacement.js.map +1 -0
- package/es/utils/index.js.map +1 -1
- package/package.json +3 -2
- package/styled-components/cjs/components/Calendar/Calendar.tokens.js +64 -28
- package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.js +6 -0
- package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.styles.js +2 -1
- package/styled-components/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +1 -0
- package/styled-components/cjs/components/Calendar/CalendarDouble/CalendarDouble.styles.js +2 -2
- package/styled-components/cjs/components/Calendar/hooks/useDays.js +1 -1
- package/styled-components/cjs/components/Calendar/mixins/active.js +12 -0
- package/styled-components/cjs/components/Calendar/mixins/flex.js +8 -0
- package/styled-components/cjs/components/Calendar/mixins/index.js +30 -29
- package/styled-components/cjs/components/Calendar/mixins/selected.js +29 -0
- package/styled-components/cjs/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles.js +26 -14
- package/styled-components/cjs/components/Calendar/ui/CalendarDays/CalendarDays.styles.js +2 -1
- package/styled-components/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js +25 -16
- package/styled-components/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +29 -11
- package/styled-components/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +1 -1
- package/styled-components/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js +26 -12
- package/styled-components/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +1 -1
- package/styled-components/cjs/components/Calendar/ui/CalendarYears/CalendarYears.styles.js +26 -14
- package/styled-components/cjs/components/Combobox/Combobox.js +6 -7
- package/styled-components/cjs/components/DatePicker/DatePicker.tokens.js +184 -0
- package/styled-components/cjs/components/DatePicker/DatePickerBase.styles.js +19 -0
- package/styled-components/cjs/components/DatePicker/RangeDate/DatePicker.js +349 -0
- package/styled-components/cjs/components/DatePicker/RangeDate/DatePicker.styles.js +27 -0
- package/styled-components/cjs/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.js +50 -0
- package/styled-components/cjs/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.styles.js +20 -0
- package/styled-components/cjs/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.types.js +5 -0
- package/styled-components/cjs/components/DatePicker/RangeDate/variations/_disabled/base.js +9 -0
- package/styled-components/cjs/components/DatePicker/RangeDate/variations/_disabled/tokens.json +0 -0
- package/styled-components/cjs/components/{Accordion/variations/_view → DatePicker/RangeDate/variations/_readonly}/base.js +2 -1
- package/styled-components/cjs/components/DatePicker/RangeDate/variations/_readonly/tokens.json +4 -0
- package/styled-components/cjs/components/{Accordion/variations/_stretching → DatePicker/RangeDate/variations/_size}/base.js +2 -1
- package/styled-components/cjs/components/DatePicker/RangeDate/variations/_size/tokens.json +0 -0
- package/styled-components/cjs/components/DatePicker/RangeDate/variations/_view/tokens.json +0 -0
- package/styled-components/cjs/components/DatePicker/SingleDate/DatePicker.js +190 -0
- package/styled-components/cjs/components/DatePicker/SingleDate/DatePicker.styles.js +33 -0
- package/styled-components/cjs/components/DatePicker/SingleDate/DatePicker.types.js +5 -0
- package/styled-components/cjs/components/DatePicker/SingleDate/variations/_disabled/base.js +9 -0
- package/styled-components/cjs/components/DatePicker/SingleDate/variations/_disabled/tokens.json +4 -0
- package/styled-components/cjs/components/DatePicker/SingleDate/variations/_readonly/base.js +10 -0
- package/styled-components/cjs/components/DatePicker/SingleDate/variations/_readonly/tokens.json +4 -0
- package/styled-components/cjs/components/DatePicker/SingleDate/variations/_size/base.js +10 -0
- package/styled-components/cjs/components/DatePicker/SingleDate/variations/_size/tokens.json +16 -0
- package/styled-components/cjs/components/DatePicker/SingleDate/variations/_view/base.js +10 -0
- package/styled-components/cjs/components/DatePicker/SingleDate/variations/_view/tokens.json +1 -0
- package/styled-components/cjs/components/DatePicker/hooks/useDatePicker.js +77 -0
- package/styled-components/cjs/components/DatePicker/index.js +44 -0
- package/styled-components/cjs/components/DatePicker/utils/dateHelper.js +78 -0
- package/styled-components/cjs/components/Dropdown/Dropdown.js +1 -1
- package/styled-components/cjs/components/Dropdown/utils/index.js +1 -16
- package/styled-components/cjs/components/Range/Range.js +78 -32
- package/styled-components/cjs/components/Range/Range.styles.js +16 -10
- package/styled-components/cjs/components/Select/Select.js +7 -8
- package/styled-components/cjs/components/TextField/TextField.tokens.js +1 -1
- package/styled-components/cjs/components/TextField/variations/_size/base.js +1 -1
- package/styled-components/cjs/components/_Icon/Icon.assets/{Minus.js → DisclosureDownFill.js} +5 -4
- package/styled-components/cjs/components/_Icon/Icon.assets/DisclosureLeft.js +1 -1
- package/styled-components/cjs/components/_Icon/Icon.assets/DisclosureRight.js +5 -15
- package/styled-components/cjs/components/_Icon/Icons/{IconMinus.js → IconDisclosureDownFill.js} +4 -4
- package/styled-components/cjs/components/_Icon/index.js +8 -15
- package/styled-components/cjs/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +24 -6
- package/styled-components/cjs/examples/plasma_b2c/components/Calendar/CalendarBase.config.js +5 -2
- package/styled-components/cjs/examples/plasma_b2c/components/Calendar/CalendarDouble.config.js +4 -1
- package/styled-components/cjs/examples/plasma_b2c/components/DatePicker/DatePicker.config.js +31 -0
- package/styled-components/cjs/examples/plasma_b2c/components/DatePicker/DatePicker.js +13 -0
- package/styled-components/cjs/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +302 -0
- package/styled-components/cjs/examples/plasma_web/components/Calendar/Calendar.stories.tsx +24 -6
- package/styled-components/cjs/examples/plasma_web/components/Calendar/CalendarBase.config.js +5 -2
- package/styled-components/cjs/examples/plasma_web/components/Calendar/CalendarDouble.config.js +4 -1
- package/styled-components/cjs/examples/plasma_web/components/DatePicker/DatePicker.config.js +31 -0
- package/styled-components/cjs/examples/plasma_web/components/DatePicker/DatePicker.js +13 -0
- package/styled-components/cjs/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +302 -0
- package/styled-components/cjs/examples/sds_engineer/components/Calendar/Calendar.stories.tsx +24 -6
- package/styled-components/cjs/examples/sds_engineer/components/Calendar/CalendarBase.config.js +5 -2
- package/styled-components/cjs/examples/sds_engineer/components/Calendar/CalendarDouble.config.js +4 -1
- package/styled-components/cjs/index.js +4 -4
- package/styled-components/cjs/utils/datejs.js +11 -0
- package/styled-components/cjs/utils/getPopoverPlacement.js +21 -0
- package/styled-components/cjs/utils/index.js +22 -0
- package/styled-components/es/components/Calendar/Calendar.tokens.js +64 -28
- package/styled-components/es/components/Calendar/CalendarBase/CalendarBase.js +7 -1
- package/styled-components/es/components/Calendar/CalendarBase/CalendarBase.styles.js +2 -1
- package/styled-components/es/components/Calendar/CalendarDouble/CalendarDouble.js +1 -0
- package/styled-components/es/components/Calendar/CalendarDouble/CalendarDouble.styles.js +2 -2
- package/styled-components/es/components/Calendar/hooks/useDays.js +1 -1
- package/styled-components/es/components/Calendar/mixins/active.js +6 -0
- package/styled-components/es/components/Calendar/mixins/flex.js +2 -0
- package/styled-components/es/components/Calendar/mixins/index.js +3 -27
- package/styled-components/es/components/Calendar/mixins/selected.js +23 -0
- package/styled-components/es/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles.js +24 -12
- package/styled-components/es/components/Calendar/ui/CalendarDays/CalendarDays.styles.js +2 -1
- package/styled-components/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js +27 -18
- package/styled-components/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +29 -11
- package/styled-components/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +1 -1
- package/styled-components/es/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js +24 -10
- package/styled-components/es/components/Calendar/ui/CalendarYears/CalendarYears.js +1 -1
- package/styled-components/es/components/Calendar/ui/CalendarYears/CalendarYears.styles.js +24 -12
- package/styled-components/es/components/Combobox/Combobox.js +1 -2
- package/styled-components/es/components/DatePicker/DatePicker.tokens.js +178 -0
- package/styled-components/es/components/DatePicker/DatePickerBase.styles.js +12 -0
- package/styled-components/es/components/DatePicker/RangeDate/DatePicker.js +340 -0
- package/styled-components/es/components/DatePicker/RangeDate/DatePicker.styles.js +19 -0
- package/styled-components/es/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.js +43 -0
- package/styled-components/es/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.styles.js +13 -0
- package/styled-components/es/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.types.js +1 -0
- package/styled-components/es/components/DatePicker/RangeDate/variations/_disabled/base.js +3 -0
- package/styled-components/es/components/DatePicker/RangeDate/variations/_disabled/tokens.json +0 -0
- package/styled-components/es/components/DatePicker/RangeDate/variations/_readonly/base.js +3 -0
- package/styled-components/es/components/DatePicker/RangeDate/variations/_readonly/tokens.json +4 -0
- package/styled-components/es/components/DatePicker/RangeDate/variations/_size/base.js +3 -0
- package/styled-components/es/components/DatePicker/RangeDate/variations/_size/tokens.json +0 -0
- package/styled-components/es/components/DatePicker/RangeDate/variations/_view/tokens.json +0 -0
- package/styled-components/es/components/DatePicker/SingleDate/DatePicker.js +181 -0
- package/styled-components/es/components/DatePicker/SingleDate/DatePicker.styles.js +25 -0
- package/styled-components/es/components/DatePicker/SingleDate/DatePicker.types.js +1 -0
- package/styled-components/es/components/DatePicker/SingleDate/variations/_disabled/base.js +3 -0
- package/styled-components/es/components/DatePicker/SingleDate/variations/_disabled/tokens.json +4 -0
- package/styled-components/es/components/DatePicker/SingleDate/variations/_readonly/base.js +4 -0
- package/styled-components/es/components/DatePicker/SingleDate/variations/_readonly/tokens.json +4 -0
- package/styled-components/es/components/DatePicker/SingleDate/variations/_size/base.js +4 -0
- package/styled-components/es/components/DatePicker/SingleDate/variations/_size/tokens.json +16 -0
- package/styled-components/es/components/DatePicker/SingleDate/variations/_view/base.js +4 -0
- package/styled-components/es/components/DatePicker/SingleDate/variations/_view/tokens.json +1 -0
- package/styled-components/es/components/DatePicker/hooks/useDatePicker.js +71 -0
- package/styled-components/es/components/DatePicker/index.js +3 -0
- package/styled-components/es/components/DatePicker/utils/dateHelper.js +72 -0
- package/styled-components/es/components/Dropdown/Dropdown.js +2 -2
- package/styled-components/es/components/Dropdown/utils/index.js +0 -15
- package/styled-components/es/components/Range/Range.js +81 -35
- package/styled-components/es/components/Range/Range.styles.js +15 -9
- package/styled-components/es/components/Select/Select.js +1 -2
- package/styled-components/es/components/TextField/TextField.tokens.js +1 -1
- package/styled-components/es/components/TextField/variations/_size/base.js +1 -1
- package/styled-components/es/components/_Icon/Icon.assets/{Minus.js → DisclosureDownFill.js} +4 -3
- package/styled-components/es/components/_Icon/Icon.assets/DisclosureLeft.js +1 -1
- package/styled-components/es/components/_Icon/Icon.assets/DisclosureRight.js +5 -15
- package/styled-components/es/components/_Icon/Icons/{IconMinus.js → IconDisclosureDownFill.js} +3 -3
- package/styled-components/es/components/_Icon/index.js +2 -3
- package/styled-components/es/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +24 -6
- package/styled-components/es/examples/plasma_b2c/components/Calendar/CalendarBase.config.js +5 -2
- package/styled-components/es/examples/plasma_b2c/components/Calendar/CalendarDouble.config.js +4 -1
- package/styled-components/es/examples/plasma_b2c/components/DatePicker/DatePicker.config.js +25 -0
- package/styled-components/es/examples/plasma_b2c/components/DatePicker/DatePicker.js +7 -0
- package/styled-components/es/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +302 -0
- package/styled-components/es/examples/plasma_web/components/Calendar/Calendar.stories.tsx +24 -6
- package/styled-components/es/examples/plasma_web/components/Calendar/CalendarBase.config.js +5 -2
- package/styled-components/es/examples/plasma_web/components/Calendar/CalendarDouble.config.js +4 -1
- package/styled-components/es/examples/plasma_web/components/DatePicker/DatePicker.config.js +25 -0
- package/styled-components/es/examples/plasma_web/components/DatePicker/DatePicker.js +7 -0
- package/styled-components/es/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +302 -0
- package/styled-components/es/examples/sds_engineer/components/Calendar/Calendar.stories.tsx +24 -6
- package/styled-components/es/examples/sds_engineer/components/Calendar/CalendarBase.config.js +5 -2
- package/styled-components/es/examples/sds_engineer/components/Calendar/CalendarDouble.config.js +4 -1
- package/styled-components/es/index.js +1 -1
- package/styled-components/es/utils/datejs.js +4 -0
- package/styled-components/es/utils/getPopoverPlacement.js +15 -0
- package/styled-components/es/utils/index.js +1 -0
- package/types/components/Calendar/Calendar.tokens.d.ts +57 -26
- package/types/components/Calendar/Calendar.tokens.d.ts.map +1 -1
- package/types/components/Calendar/Calendar.types.d.ts +1 -1
- package/types/components/Calendar/Calendar.types.d.ts.map +1 -1
- package/types/components/Calendar/CalendarBase/CalendarBase.d.ts +27 -3
- package/types/components/Calendar/CalendarBase/CalendarBase.d.ts.map +1 -1
- package/types/components/Calendar/CalendarBase/CalendarBase.styles.d.ts.map +1 -1
- package/types/components/Calendar/CalendarDouble/CalendarDouble.d.ts +30 -3
- package/types/components/Calendar/CalendarDouble/CalendarDouble.d.ts.map +1 -1
- package/types/components/Calendar/hooks/useDays.d.ts.map +1 -1
- package/types/components/Calendar/mixins/active.d.ts +17 -0
- package/types/components/Calendar/mixins/active.d.ts.map +1 -0
- package/types/components/Calendar/mixins/flex.d.ts +3 -0
- package/types/components/Calendar/mixins/flex.d.ts.map +1 -0
- package/types/components/Calendar/mixins/index.d.ts +3 -8
- package/types/components/Calendar/mixins/index.d.ts.map +1 -1
- package/types/components/Calendar/mixins/selected.d.ts +60 -0
- package/types/components/Calendar/mixins/selected.d.ts.map +1 -0
- package/types/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarDays/CalendarDays.styles.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarHeader/CalendarHeader.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.d.ts +47 -7
- package/types/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarHeader/CalendarHeader.types.d.ts +1 -0
- package/types/components/Calendar/ui/CalendarHeader/CalendarHeader.types.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarYears/CalendarYears.styles.d.ts.map +1 -1
- package/types/components/Calendar/utils/index.d.ts +1 -1
- package/types/components/Calendar/utils/index.d.ts.map +1 -1
- package/types/components/Combobox/Combobox.d.ts.map +1 -1
- package/types/components/DatePicker/DatePicker.tokens.d.ts +179 -0
- package/types/components/DatePicker/DatePicker.tokens.d.ts.map +1 -0
- package/types/components/DatePicker/DatePickerBase.styles.d.ts +8 -0
- package/types/components/DatePicker/DatePickerBase.styles.d.ts.map +1 -0
- package/types/components/DatePicker/DatePickerBase.types.d.ts +37 -0
- package/types/components/DatePicker/DatePickerBase.types.d.ts.map +1 -0
- package/types/components/DatePicker/RangeDate/DatePicker.d.ts +32 -0
- package/types/components/DatePicker/RangeDate/DatePicker.d.ts.map +1 -0
- package/types/components/DatePicker/RangeDate/DatePicker.styles.d.ts +140 -0
- package/types/components/DatePicker/RangeDate/DatePicker.styles.d.ts.map +1 -0
- package/types/components/DatePicker/RangeDate/DatePicker.types.d.ts +128 -0
- package/types/components/DatePicker/RangeDate/DatePicker.types.d.ts.map +1 -0
- package/types/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.d.ts +4 -0
- package/types/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.d.ts.map +1 -0
- package/types/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.styles.d.ts +4 -0
- package/types/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.styles.d.ts.map +1 -0
- package/types/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.types.d.ts +21 -0
- package/types/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.types.d.ts.map +1 -0
- package/types/components/DatePicker/RangeDate/variations/_disabled/base.d.ts.map +1 -0
- package/types/components/DatePicker/RangeDate/variations/_readonly/base.d.ts.map +1 -0
- package/types/components/DatePicker/RangeDate/variations/_size/base.d.ts.map +1 -0
- package/types/components/{Accordion/Accordion.styles.d.ts → DatePicker/RangeDate/variations/_view/base.d.ts} +1 -1
- package/types/components/DatePicker/RangeDate/variations/_view/base.d.ts.map +1 -0
- package/types/components/DatePicker/SingleDate/DatePicker.d.ts +31 -0
- package/types/components/DatePicker/SingleDate/DatePicker.d.ts.map +1 -0
- package/types/components/DatePicker/SingleDate/DatePicker.styles.d.ts +45 -0
- package/types/components/DatePicker/SingleDate/DatePicker.styles.d.ts.map +1 -0
- package/types/components/DatePicker/SingleDate/DatePicker.types.d.ts +115 -0
- package/types/components/DatePicker/SingleDate/DatePicker.types.d.ts.map +1 -0
- package/types/components/DatePicker/SingleDate/variations/_disabled/base.d.ts +2 -0
- package/types/components/DatePicker/SingleDate/variations/_disabled/base.d.ts.map +1 -0
- package/types/components/DatePicker/SingleDate/variations/_readonly/base.d.ts +2 -0
- package/types/components/DatePicker/SingleDate/variations/_readonly/base.d.ts.map +1 -0
- package/types/components/DatePicker/SingleDate/variations/_size/base.d.ts +2 -0
- package/types/components/DatePicker/SingleDate/variations/_size/base.d.ts.map +1 -0
- package/types/components/DatePicker/SingleDate/variations/_view/base.d.ts +2 -0
- package/types/components/DatePicker/SingleDate/variations/_view/base.d.ts.map +1 -0
- package/types/components/DatePicker/hooks/useDatePicker.d.ts +10 -0
- package/types/components/DatePicker/hooks/useDatePicker.d.ts.map +1 -0
- package/types/components/DatePicker/index.d.ts +6 -0
- package/types/components/DatePicker/index.d.ts.map +1 -0
- package/types/components/DatePicker/utils/dateHelper.d.ts +10 -0
- package/types/components/DatePicker/utils/dateHelper.d.ts.map +1 -0
- package/types/components/Dropdown/utils/index.d.ts +1 -3
- package/types/components/Dropdown/utils/index.d.ts.map +1 -1
- package/types/components/Range/Range.d.ts +3 -3
- package/types/components/Range/Range.d.ts.map +1 -1
- package/types/components/Range/Range.styles.d.ts +1 -0
- package/types/components/Range/Range.styles.d.ts.map +1 -1
- package/types/components/Range/Range.types.d.ts +46 -1
- package/types/components/Range/Range.types.d.ts.map +1 -1
- package/types/components/Select/Select.d.ts.map +1 -1
- package/types/components/TextField/variations/_size/base.d.ts.map +1 -1
- package/types/components/_Icon/Icon.assets/DisclosureDownFill.d.ts +4 -0
- package/types/components/_Icon/Icon.assets/DisclosureDownFill.d.ts.map +1 -0
- package/types/components/_Icon/Icon.assets/DisclosureRight.d.ts.map +1 -1
- package/types/components/_Icon/Icons/IconDisclosureDownFill.d.ts +4 -0
- package/types/components/_Icon/Icons/IconDisclosureDownFill.d.ts.map +1 -0
- package/types/components/_Icon/index.d.ts +1 -2
- package/types/components/_Icon/index.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Calendar/Calendar.d.ts +15 -4
- package/types/examples/plasma_b2c/components/Calendar/Calendar.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Calendar/CalendarBase.config.d.ts +3 -0
- package/types/examples/plasma_b2c/components/Calendar/CalendarBase.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Calendar/CalendarDouble.config.d.ts +3 -0
- package/types/examples/plasma_b2c/components/Calendar/CalendarDouble.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/{Accordion/Accordion.config.d.ts → DatePicker/DatePicker.config.d.ts} +7 -2
- package/types/examples/plasma_b2c/components/DatePicker/DatePicker.config.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/DatePicker/DatePicker.d.ts +668 -0
- package/types/examples/plasma_b2c/components/DatePicker/DatePicker.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/Range/Range.d.ts +30 -3
- package/types/examples/plasma_b2c/components/Range/Range.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Calendar/Calendar.d.ts +15 -4
- package/types/examples/plasma_web/components/Calendar/Calendar.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Calendar/CalendarBase.config.d.ts +3 -0
- package/types/examples/plasma_web/components/Calendar/CalendarBase.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Calendar/CalendarDouble.config.d.ts +3 -0
- package/types/examples/plasma_web/components/Calendar/CalendarDouble.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/{Accordion/Accordion.config.d.ts → DatePicker/DatePicker.config.d.ts} +6 -5
- package/types/examples/plasma_web/components/DatePicker/DatePicker.config.d.ts.map +1 -0
- package/types/examples/plasma_web/components/DatePicker/DatePicker.d.ts +668 -0
- package/types/examples/plasma_web/components/DatePicker/DatePicker.d.ts.map +1 -0
- package/types/examples/plasma_web/components/Range/Range.d.ts +30 -3
- package/types/examples/plasma_web/components/Range/Range.d.ts.map +1 -1
- package/types/examples/sds_engineer/components/Calendar/Calendar.d.ts +15 -4
- package/types/examples/sds_engineer/components/Calendar/Calendar.d.ts.map +1 -1
- package/types/examples/sds_engineer/components/Calendar/CalendarBase.config.d.ts +3 -0
- package/types/examples/sds_engineer/components/Calendar/CalendarBase.config.d.ts.map +1 -1
- package/types/examples/sds_engineer/components/Calendar/CalendarDouble.config.d.ts +3 -0
- package/types/examples/sds_engineer/components/Calendar/CalendarDouble.config.d.ts.map +1 -1
- package/types/index.d.ts +1 -1
- package/types/index.d.ts.map +1 -1
- package/types/utils/datejs.d.ts +3 -0
- package/types/utils/datejs.d.ts.map +1 -0
- package/types/utils/getPopoverPlacement.d.ts +5 -0
- package/types/utils/getPopoverPlacement.d.ts.map +1 -0
- package/types/utils/index.d.ts +1 -0
- package/types/utils/index.d.ts.map +1 -1
- package/cjs/components/Accordion/Accordion.css +0 -1
- package/cjs/components/Accordion/Accordion.js +0 -68
- package/cjs/components/Accordion/Accordion.js.map +0 -1
- package/cjs/components/Accordion/Accordion.styles.js +0 -9
- package/cjs/components/Accordion/Accordion.styles.js.map +0 -1
- package/cjs/components/Accordion/Accordion.styles_rsiff6.css +0 -1
- package/cjs/components/Accordion/Accordion.tokens.js +0 -45
- package/cjs/components/Accordion/Accordion.tokens.js.map +0 -1
- package/cjs/components/Accordion/ui/AccordionItem/AccordionItem.js +0 -103
- package/cjs/components/Accordion/ui/AccordionItem/AccordionItem.js.map +0 -1
- package/cjs/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +0 -63
- package/cjs/components/Accordion/ui/AccordionItem/AccordionItem.styles.js.map +0 -1
- package/cjs/components/Accordion/utils/index.js +0 -27
- package/cjs/components/Accordion/utils/index.js.map +0 -1
- package/cjs/components/Accordion/variations/_size/base.js.map +0 -1
- package/cjs/components/Accordion/variations/_view/base.js.map +0 -1
- package/cjs/components/Calendar/mixins/index.js +0 -18
- package/cjs/components/Calendar/mixins/index.js.map +0 -1
- package/cjs/components/Calendar/mixins/index_o3bz9l.css +0 -1
- package/cjs/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles_xf9c5e.css +0 -4
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles_1c4p417.css +0 -6
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.styles_1jnzviu.css +0 -4
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.styles_1lubnwe.css +0 -4
- package/cjs/components/Range/Range.styles_mc4w65.css +0 -8
- package/cjs/components/Range/variations/_readonly/base_tzdxy8.css +0 -1
- package/cjs/components/Range/variations/_view/base_5iz3nr.css +0 -1
- package/cjs/components/TextField/variations/_read-only/base_134hshp.css +0 -1
- package/cjs/components/TextField/variations/_size/base_ntoddv.css +0 -1
- package/cjs/components/TextField/variations/_view/base_19gxyva.css +0 -1
- package/cjs/components/_Icon/Icon.assets/ChevronDownFill.js +0 -24
- package/cjs/components/_Icon/Icon.assets/ChevronDownFill.js.map +0 -1
- package/cjs/components/_Icon/Icon.assets/Minus.js +0 -22
- package/cjs/components/_Icon/Icon.assets/Minus.js.map +0 -1
- package/cjs/components/_Icon/Icons/IconChevronDownFill.js +0 -23
- package/cjs/components/_Icon/Icons/IconChevronDownFill.js.map +0 -1
- package/cjs/components/_Icon/Icons/IconMinus.js.map +0 -1
- package/es/components/Accordion/Accordion.css +0 -1
- package/es/components/Accordion/Accordion.js +0 -63
- package/es/components/Accordion/Accordion.js.map +0 -1
- package/es/components/Accordion/Accordion.styles.js +0 -5
- package/es/components/Accordion/Accordion.styles.js.map +0 -1
- package/es/components/Accordion/Accordion.styles_rsiff6.css +0 -1
- package/es/components/Accordion/Accordion.tokens.js +0 -40
- package/es/components/Accordion/Accordion.tokens.js.map +0 -1
- package/es/components/Accordion/ui/AccordionItem/AccordionItem.js +0 -99
- package/es/components/Accordion/ui/AccordionItem/AccordionItem.js.map +0 -1
- package/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +0 -49
- package/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js.map +0 -1
- package/es/components/Accordion/utils/index.js +0 -22
- package/es/components/Accordion/utils/index.js.map +0 -1
- package/es/components/Accordion/variations/_size/base.js.map +0 -1
- package/es/components/Accordion/variations/_size/base_x642ct.css +0 -1
- package/es/components/Accordion/variations/_view/base.js.map +0 -1
- package/es/components/Accordion/variations/_view/base_x642ct.css +0 -1
- package/es/components/Calendar/mixins/index.js +0 -14
- package/es/components/Calendar/mixins/index.js.map +0 -1
- package/es/components/Calendar/mixins/index_o3bz9l.css +0 -1
- package/es/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles_xf9c5e.css +0 -4
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles_1c4p417.css +0 -6
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.styles_1jnzviu.css +0 -4
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.styles_1lubnwe.css +0 -4
- package/es/components/Range/Range.styles_mc4w65.css +0 -8
- package/es/components/Range/variations/_readonly/base_tzdxy8.css +0 -1
- package/es/components/Range/variations/_view/base_5iz3nr.css +0 -1
- package/es/components/TextField/variations/_read-only/base_134hshp.css +0 -1
- package/es/components/TextField/variations/_size/base_ntoddv.css +0 -1
- package/es/components/TextField/variations/_view/base_19gxyva.css +0 -1
- package/es/components/_Icon/Icon.assets/ChevronDownFill.js +0 -20
- package/es/components/_Icon/Icon.assets/ChevronDownFill.js.map +0 -1
- package/es/components/_Icon/Icon.assets/Minus.js +0 -18
- package/es/components/_Icon/Icon.assets/Minus.js.map +0 -1
- package/es/components/_Icon/Icons/IconChevronDownFill.js +0 -19
- package/es/components/_Icon/Icons/IconChevronDownFill.js.map +0 -1
- package/es/components/_Icon/Icons/IconMinus.js.map +0 -1
- package/styled-components/cjs/components/Accordion/Accordion.js +0 -73
- package/styled-components/cjs/components/Accordion/Accordion.styles.js +0 -9
- package/styled-components/cjs/components/Accordion/Accordion.tokens.js +0 -43
- package/styled-components/cjs/components/Accordion/index.js +0 -38
- package/styled-components/cjs/components/Accordion/ui/AccordionItem/AccordionItem.js +0 -109
- package/styled-components/cjs/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +0 -49
- package/styled-components/cjs/components/Accordion/utils/index.js +0 -24
- package/styled-components/cjs/components/Accordion/variations/_size/tokens.json +0 -6
- package/styled-components/cjs/components/Accordion/variations/_stretching/tokens.json +0 -1
- package/styled-components/cjs/components/Accordion/variations/_view/tokens.json +0 -8
- package/styled-components/cjs/components/_Icon/Icon.assets/ChevronDownFill.js +0 -23
- package/styled-components/cjs/components/_Icon/Icons/IconChevronDownFill.js +0 -22
- package/styled-components/cjs/examples/plasma_b2c/components/Accordion/Accordion.config.js +0 -26
- package/styled-components/cjs/examples/plasma_b2c/components/Accordion/Accordion.js +0 -17
- package/styled-components/cjs/examples/plasma_b2c/components/Accordion/Accordion.stories.tsx +0 -66
- package/styled-components/cjs/examples/plasma_web/components/Accordion/Accordion.config.js +0 -30
- package/styled-components/cjs/examples/plasma_web/components/Accordion/Accordion.js +0 -17
- package/styled-components/cjs/examples/plasma_web/components/Accordion/Accordion.stories.tsx +0 -65
- package/styled-components/es/components/Accordion/Accordion.js +0 -64
- package/styled-components/es/components/Accordion/Accordion.styles.js +0 -3
- package/styled-components/es/components/Accordion/Accordion.tokens.js +0 -37
- package/styled-components/es/components/Accordion/index.js +0 -3
- package/styled-components/es/components/Accordion/ui/AccordionItem/AccordionItem.js +0 -100
- package/styled-components/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +0 -42
- package/styled-components/es/components/Accordion/utils/index.js +0 -18
- package/styled-components/es/components/Accordion/variations/_size/tokens.json +0 -6
- package/styled-components/es/components/Accordion/variations/_stretching/base.js +0 -2
- package/styled-components/es/components/Accordion/variations/_stretching/tokens.json +0 -1
- package/styled-components/es/components/Accordion/variations/_view/base.js +0 -2
- package/styled-components/es/components/Accordion/variations/_view/tokens.json +0 -8
- package/styled-components/es/components/_Icon/Icon.assets/ChevronDownFill.js +0 -16
- package/styled-components/es/components/_Icon/Icons/IconChevronDownFill.js +0 -15
- package/styled-components/es/examples/plasma_b2c/components/Accordion/Accordion.config.js +0 -20
- package/styled-components/es/examples/plasma_b2c/components/Accordion/Accordion.js +0 -6
- package/styled-components/es/examples/plasma_b2c/components/Accordion/Accordion.stories.tsx +0 -66
- package/styled-components/es/examples/plasma_web/components/Accordion/Accordion.config.js +0 -24
- package/styled-components/es/examples/plasma_web/components/Accordion/Accordion.js +0 -6
- package/styled-components/es/examples/plasma_web/components/Accordion/Accordion.stories.tsx +0 -65
- package/types/components/Accordion/Accordion.d.ts +0 -43
- package/types/components/Accordion/Accordion.d.ts.map +0 -1
- package/types/components/Accordion/Accordion.styles.d.ts.map +0 -1
- package/types/components/Accordion/Accordion.tokens.d.ts +0 -38
- package/types/components/Accordion/Accordion.tokens.d.ts.map +0 -1
- package/types/components/Accordion/Accordion.types.d.ts +0 -36
- package/types/components/Accordion/Accordion.types.d.ts.map +0 -1
- package/types/components/Accordion/index.d.ts +0 -5
- package/types/components/Accordion/index.d.ts.map +0 -1
- package/types/components/Accordion/ui/AccordionItem/AccordionItem.d.ts +0 -4
- package/types/components/Accordion/ui/AccordionItem/AccordionItem.d.ts.map +0 -1
- package/types/components/Accordion/ui/AccordionItem/AccordionItem.styles.d.ts +0 -13
- package/types/components/Accordion/ui/AccordionItem/AccordionItem.styles.d.ts.map +0 -1
- package/types/components/Accordion/ui/AccordionItem/AccordionItem.types.d.ts +0 -47
- package/types/components/Accordion/ui/AccordionItem/AccordionItem.types.d.ts.map +0 -1
- package/types/components/Accordion/utils/index.d.ts +0 -16
- package/types/components/Accordion/utils/index.d.ts.map +0 -1
- package/types/components/Accordion/variations/_size/base.d.ts.map +0 -1
- package/types/components/Accordion/variations/_stretching/base.d.ts.map +0 -1
- package/types/components/Accordion/variations/_view/base.d.ts.map +0 -1
- package/types/components/_Icon/Icon.assets/ChevronDownFill.d.ts +0 -4
- package/types/components/_Icon/Icon.assets/ChevronDownFill.d.ts.map +0 -1
- package/types/components/_Icon/Icon.assets/Minus.d.ts +0 -4
- package/types/components/_Icon/Icon.assets/Minus.d.ts.map +0 -1
- package/types/components/_Icon/Icons/IconChevronDownFill.d.ts +0 -4
- package/types/components/_Icon/Icons/IconChevronDownFill.d.ts.map +0 -1
- package/types/components/_Icon/Icons/IconMinus.d.ts +0 -4
- package/types/components/_Icon/Icons/IconMinus.d.ts.map +0 -1
- package/types/examples/plasma_b2c/components/Accordion/Accordion.config.d.ts.map +0 -1
- package/types/examples/plasma_b2c/components/Accordion/Accordion.d.ts +0 -26
- package/types/examples/plasma_b2c/components/Accordion/Accordion.d.ts.map +0 -1
- package/types/examples/plasma_web/components/Accordion/Accordion.config.d.ts.map +0 -1
- package/types/examples/plasma_web/components/Accordion/Accordion.d.ts +0 -30
- package/types/examples/plasma_web/components/Accordion/Accordion.d.ts.map +0 -1
- /package/cjs/components/{Accordion/variations/_size → DatePicker/RangeDate/variations/_view}/base_x642ct.css +0 -0
- /package/cjs/components/{Accordion/ui/AccordionItem/AccordionItem.css → _Icon/Icons/IconClose.css} +0 -0
- /package/{cjs/components/Accordion → es/components/DatePicker/RangeDate}/variations/_view/base_x642ct.css +0 -0
- /package/es/components/{Accordion/ui/AccordionItem/AccordionItem.css → _Icon/Icons/IconClose.css} +0 -0
- /package/styled-components/cjs/components/{Accordion/Accordion.types.js → DatePicker/DatePickerBase.types.js} +0 -0
- /package/styled-components/cjs/components/{Accordion/ui/AccordionItem/AccordionItem.types.js → DatePicker/RangeDate/DatePicker.types.js} +0 -0
- /package/styled-components/cjs/components/{Accordion/variations/_size → DatePicker/RangeDate/variations/_view}/base.js +0 -0
- /package/styled-components/es/components/{Accordion/Accordion.types.js → DatePicker/DatePickerBase.types.js} +0 -0
- /package/styled-components/es/components/{Accordion/ui/AccordionItem/AccordionItem.types.js → DatePicker/RangeDate/DatePicker.types.js} +0 -0
- /package/styled-components/es/components/{Accordion/variations/_size → DatePicker/RangeDate/variations/_view}/base.js +0 -0
- /package/types/components/{Accordion/variations/_size → DatePicker/RangeDate/variations/_disabled}/base.d.ts +0 -0
- /package/types/components/{Accordion/variations/_stretching → DatePicker/RangeDate/variations/_readonly}/base.d.ts +0 -0
- /package/types/components/{Accordion/variations/_view → DatePicker/RangeDate/variations/_size}/base.d.ts +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CalendarHeader.styles.js","sources":["../../../../../src/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport {
|
1
|
+
{"version":3,"file":"CalendarHeader.styles.js","sources":["../../../../../src/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { classes, tokens } from '../../Calendar.tokens';\nimport { component, mergeConfig } from '../../../../engines';\nimport { iconButtonConfig, iconButtonTokens } from '../../../IconButton';\nimport { flexCenter } from '../../mixins';\nimport { addFocus } from '../../../../mixins';\n\nconst mergedIconButtonConfig = mergeConfig(iconButtonConfig);\nconst IconButton = component(mergedIconButtonConfig);\n\nexport const StyledCalendarHeader = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n`;\n\nexport const StyledHeader = styled.button`\n border: none;\n background-color: transparent;\n padding: 0;\n outline: none;\n color: var(${tokens.calendarContentPrimaryColor});\n font-family: var(${tokens.calendarHeaderFontFamily});\n font-size: var(${tokens.calendarHeaderFontSize});\n font-style: var(${tokens.calendarHeaderFontStyle});\n font-weight: var(${tokens.calendarHeaderFontWeightBold});\n letter-spacing: var(${tokens.calendarHeaderFontLetterSpacing});\n line-height: var(${tokens.calendarHeaderFontLineHeight});\n padding: var(${tokens.calendarHeaderPadding});\n\n cursor: pointer;\n display: flex;\n gap: var(${tokens.calendarHeaderDateGap});\n justify-content: space-between;\n align-items: center;\n\n ${addFocus({\n outlineSize: '0.063rem',\n outlineOffset: '-0.125rem',\n outlineColor: `var(${tokens.calendarOutlineFocusColor})`,\n outlineRadius: '0.563rem',\n })};\n`;\n\nexport const StyledHeaderDate = styled.span`\n ${flexCenter};\n pointer-events: none;\n`;\n\nexport const StyledArrows = styled.div`\n display: flex;\n gap: var(${tokens.calendarHeaderArrowGap});\n`;\n\n// NOTE: переопределение токенов IconButton\nexport const StyledArrow = styled(IconButton)`\n ${iconButtonTokens.iconButtonColor}: var(${tokens.iconButtonColor});\n ${iconButtonTokens.iconButtonBackgroundColor}: var(${tokens.iconButtonBackgroundColor});\n ${iconButtonTokens.iconButtonColorHover}: var(${tokens.iconButtonColorHover});\n ${iconButtonTokens.iconButtonBackgroundColorHover}: var(${tokens.iconButtonBackgroundColorHover});\n ${iconButtonTokens.iconButtonColorActive}: var(${tokens.iconButtonColorActive});\n ${iconButtonTokens.iconButtonBackgroundColorActive}: var(${tokens.iconButtonBackgroundColorActive});\n ${iconButtonTokens.iconButtonHeight}: var(${tokens.iconButtonHeight});\n ${iconButtonTokens.iconButtonWidth}: var(${tokens.iconButtonWidth});\n ${iconButtonTokens.iconButtonPadding}: var(${tokens.iconButtonPadding});\n ${iconButtonTokens.iconButtonRadius}: var(${tokens.iconButtonRadius});\n`;\n\nexport const StyledNavigation = styled.div`\n width: 100%;\n ${flexCenter};\n`;\n\nexport const StyledDoubleHeaderWrapper = styled.div`\n width: 100%;\n display: grid;\n grid-template-columns: var(${tokens.iconButtonWidth}) 1fr var(${tokens.iconButtonWidth});\n grid-template-areas: 'a b c';\n\n ${StyledArrow} {\n grid-area: a;\n }\n\n &.${classes.doubleHeaderLastDateWrapper} ${StyledArrow} {\n grid-area: c;\n }\n`;\n\nexport const StyledHeaderDouble = styled.h4`\n font-family: var(${tokens.calendarHeaderFontFamily});\n font-size: var(${tokens.calendarHeaderFontSize});\n font-style: var(${tokens.calendarHeaderFontStyle});\n font-weight: var(${tokens.calendarHeaderFontWeightBold});\n letter-spacing: var(${tokens.calendarHeaderFontLetterSpacing});\n line-height: var(${tokens.calendarHeaderFontLineHeight});\n\n grid-area: b;\n justify-self: center;\n cursor: pointer;\n display: flex;\n gap: var(${tokens.calendarHeaderDateGap});\n justify-content: space-between;\n align-items: center;\n margin: 0;\n\n ${String(flexCenter)};\n`;\n"],"names":["mergedIconButtonConfig","mergeConfig","iconButtonConfig","IconButton","component","StyledCalendarHeader","styled","name","class","propsAsIs","StyledHeader","StyledHeaderDate","StyledArrows","_exp13","StyledArrow","StyledNavigation","StyledDoubleHeaderWrapper","StyledHeaderDouble"],"mappings":";;;;;;;;;AAQA,IAAMA,sBAAsB,gBAAGC,kBAAW,CAACC,6BAAgB,CAAC,CAAA;AAC5D,IAAMC,UAAU,gBAAGC,gBAAS,CAACJ,sBAAsB,CAAC,CAAA;AAE7C,IAAMK,oBAAoB,gBAAGC,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,sBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAIzC,EAAA;AAEM,IAAMC,YAAY,gBAAGJ,YAAM,CAAA,QAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,cAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CA0BjC,EAAA;AAEM,IAAME,gBAAgB,gBAAGL,YAAM,CAAA,MAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,kBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAGrC,EAAA;AAEM,IAAMG,YAAY,gBAAGN,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,cAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAGjC,EAAA;;AAED;AAAA,IAAAI,MAAA,GAtDkBA,SAsDlBA,MAAAA,GAAA;AAAA,EAAA,OACkCV,UAAU,CAAA;AAAA,CAAA,CAAA;AAArC,IAAMW,WAAW,gBAAGR,YAAM,CAAAO,MAAA,EAAA,CAAA,CAAA;AAAAN,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAWhC,EAAA;AAEM,IAAMM,gBAAgB,gBAAGT,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,kBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAGrC,EAAA;AAEM,IAAMO,yBAAyB,gBAAGV,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,2BAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAa9C,EAAA;AAEM,IAAMQ,kBAAkB,gBAAGX,YAAM,CAAA,IAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,oBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAkBvC;;;;;;;;;;;"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
.sjaqipy{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
|
2
|
+
.s1k7jebr{border:none;background-color:transparent;padding:0;outline:none;color:var(--plasma-calendar-content-primary-color);font-family:var(--plasma-calendar-header-font-family);font-size:var(--plasma-calendar-header-font-size);font-style:var(--plasma-calendar-header-font-style);font-weight:var(--plasma-calendar-header-font-weight-bold);-webkit-letter-spacing:var(--plasma-calendar-header-font-letter-spacing);-moz-letter-spacing:var(--plasma-calendar-header-font-letter-spacing);-ms-letter-spacing:var(--plasma-calendar-header-font-letter-spacing);letter-spacing:var(--plasma-calendar-header-font-letter-spacing);line-height:var(--plasma-calendar-header-line-height);padding:var(--plasma-calendar-header-padding);cursor:pointer;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-calendar-header-date-gap);-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:relative;}.s1k7jebr::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:0.563rem;-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.s1k7jebr.focus-visible:focus::before,.s1k7jebr[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.063rem var(--plasma-calendar-outline-focus-color);}
|
3
|
+
.s1b07tlr{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;pointer-events:none;}
|
4
|
+
.s13yvda3{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-calendar-arrow-container-gap);}
|
5
|
+
.s1i8jkj2{--plasma-icon-button-color:var(--plasma-calendar-icon-button-color);--plasma-icon-button-background-color:var(--plasma-calendar-icon-button-background);--plasma-icon-button-color-hover:var(--plasma-calendar-icon-button-color-hover);--plasma-icon-button-background-color-hover:var(--plasma-calendar-icon-button-background-hover);--plasma-icon-button-color-active:var(--plasma-calendar-icon-button-color-active);--plasma-icon-button-background-color-active:var(--plasma-calendar-icon-button-background-active);--plasma-icon-button-height:var(--plasma-calendar-icon-button-height);--plasma-icon-button-width:var(--plasma-calendar-icon-button-width);--plasma-icon-button-padding:var(--plasma-calendar-icon-button-padding);--plasma-icon-button-radius:var(--plasma-calendar-icon-button-radius);}
|
6
|
+
.sw3by8z{width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
|
7
|
+
.sdke0q6{width:100%;display:grid;grid-template-columns:var(--plasma-calendar-icon-button-width) 1fr var(--plasma-calendar-icon-button-width);grid-template-areas:'a b c';}.sdke0q6 .s1i8jkj2{grid-area:a;}.sdke0q6.double-header--last-date-wrapper .s1i8jkj2{grid-area:c;}
|
8
|
+
.sdtpxcv{font-family:var(--plasma-calendar-header-font-family);font-size:var(--plasma-calendar-header-font-size);font-style:var(--plasma-calendar-header-font-style);font-weight:var(--plasma-calendar-header-font-weight-bold);-webkit-letter-spacing:var(--plasma-calendar-header-font-letter-spacing);-moz-letter-spacing:var(--plasma-calendar-header-font-letter-spacing);-ms-letter-spacing:var(--plasma-calendar-header-font-letter-spacing);letter-spacing:var(--plasma-calendar-header-font-letter-spacing);line-height:var(--plasma-calendar-header-line-height);grid-area:b;justify-self:center;cursor:pointer;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-calendar-header-date-gap);-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
.
|
2
|
-
.
|
3
|
-
.
|
4
|
-
.
|
1
|
+
.CalendarMonths_styles_7kz2z4_s2fb05v__b195f607{padding:var(--plasma-calendar-months-padding);box-sizing:border-box;}
|
2
|
+
.CalendarMonths_styles_7kz2z4_s1nlg4aa__b195f607{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
|
3
|
+
.CalendarMonths_styles_7kz2z4_s1cvx4bk__b195f607{border-radius:calc(var(--plasma-calendar-month-item-border-radius) - 0.125rem);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
|
4
|
+
.CalendarMonths_styles_7kz2z4_s14caaqm__b195f607{font-family:var(--plasma-calendar-month-font-family);font-size:var(--plasma-calendar-month-font-size);font-style:var(--plasma-calendar-month-font-style);font-weight:var(--plasma-calendar-month-font-weight);-webkit-letter-spacing:var(--plasma-calendar-month-font-letter-spacing);-moz-letter-spacing:var(--plasma-calendar-month-font-letter-spacing);-ms-letter-spacing:var(--plasma-calendar-month-font-letter-spacing);letter-spacing:var(--plasma-calendar-month-font-letter-spacing);line-height:var(--plasma-calendar-month-line-height);position:relative;box-sizing:border-box;min-height:var(--plasma-calendar-month-item-height);min-width:var(--plasma-calendar-month-item-width);border-radius:var(--plasma-calendar-month-item-border-radius);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;outline:none;cursor:pointer;position:relative;}.CalendarMonths_styles_7kz2z4_s14caaqm__b195f607:hover{background-color:var(--plasma-calendar-selectable-item-bg-hover);}.CalendarMonths_styles_7kz2z4_s14caaqm__b195f607.CalendarMonths_styles_7kz2z4_itemHovered__b195f607,.CalendarMonths_styles_7kz2z4_s14caaqm__b195f607.CalendarMonths_styles_7kz2z4_itemHovered__b195f607:hover{background-color:var(--plasma-calendar-hovered-item-bg);color:var(--plasma-calendar-hovered-item-color);cursor:pointer;font-weight:var(--plasma-calendar-month-selected-font-weight);}.CalendarMonths_styles_7kz2z4_s14caaqm__b195f607.CalendarMonths_styles_7kz2z4_itemSelected__b195f607:not(.CalendarMonths_styles_7kz2z4_itemCurrent__b195f607){border:0;background-color:var(--plasma-calendar-selected-item-background);color:var(--plasma-calendar-selected-item-color);cursor:default;font-weight:var(--plasma-calendar-month-selected-font-weight);}.CalendarMonths_styles_7kz2z4_s14caaqm__b195f607:active{background-color:var(--plasma-calendar-active-item-bg);color:var(--plasma-calendar-active-item-color);font-weight:var(--plasma-calendar-month-selected-font-weight);}.CalendarMonths_styles_7kz2z4_s14caaqm__b195f607.CalendarMonths_styles_7kz2z4_itemCurrent__b195f607{border:0.063rem solid var(--plasma-calendar-current-item-border-color);}.CalendarMonths_styles_7kz2z4_s14caaqm__b195f607.CalendarMonths_styles_7kz2z4_itemCurrent__b195f607.CalendarMonths_styles_7kz2z4_itemSelected__b195f607{background-color:initial;color:var(--plasma-calendar-selected-item-color);font-weight:var(--plasma-calendar-month-selected-font-weight);}.CalendarMonths_styles_7kz2z4_s14caaqm__b195f607.CalendarMonths_styles_7kz2z4_itemCurrent__b195f607.CalendarMonths_styles_7kz2z4_itemSelected__b195f607 > div:first-of-type{background-color:var(--plasma-calendar-selected-item-background);min-width:calc(var(--plasma-calendar-month-item-width) - 0.25rem);min-height:calc(var(--plasma-calendar-month-item-height) - 0.25rem);}.CalendarMonths_styles_7kz2z4_s14caaqm__b195f607.CalendarMonths_styles_7kz2z4_itemCurrent__b195f607:not(.CalendarMonths_styles_7kz2z4_itemSelected__b195f607):hover{background-color:var(--plasma-calendar-current-item-bg-hover);color:var(--plasma-calendar-current-item-color-hover);}.CalendarMonths_styles_7kz2z4_s14caaqm__b195f607.CalendarMonths_styles_7kz2z4_itemCurrent__b195f607:not(.CalendarMonths_styles_7kz2z4_itemSelected__b195f607):hover > div:first-of-type{background-color:var(--plasma-calendar-current-item-child-bg-hover);min-width:calc(var(--plasma-calendar-month-item-width) - 0.25rem);min-height:calc(var(--plasma-calendar-month-item-height) - 0.25rem);}.CalendarMonths_styles_7kz2z4_s14caaqm__b195f607.CalendarMonths_styles_7kz2z4_itemCurrent__b195f607:not(.CalendarMonths_styles_7kz2z4_itemSelected__b195f607):hover:active > div:first-of-type{background-color:var(--plasma-calendar-selected-item-background);}.CalendarMonths_styles_7kz2z4_s14caaqm__b195f607.CalendarMonths_styles_7kz2z4_itemCurrent__b195f607.CalendarMonths_styles_7kz2z4_itemHovered__b195f607:not(.CalendarMonths_styles_7kz2z4_itemSelected__b195f607):hover{background-color:initial;color:var(--plasma-calendar-hovered-item-color);font-weight:var(--plasma-calendar-month-selected-font-weight);}.CalendarMonths_styles_7kz2z4_s14caaqm__b195f607.CalendarMonths_styles_7kz2z4_itemCurrent__b195f607.CalendarMonths_styles_7kz2z4_itemHovered__b195f607:not(.CalendarMonths_styles_7kz2z4_itemSelected__b195f607):hover > div:first-of-type{background-color:var(--plasma-calendar-hovered-item-bg);min-width:calc(var(--plasma-calendar-month-item-width) - 0.25rem);min-height:calc(var(--plasma-calendar-month-item-height) - 0.25rem);}.CalendarMonths_styles_7kz2z4_s14caaqm__b195f607::before{content:'';position:absolute;top:-0.063rem;left:-0.063rem;right:-0.063rem;bottom:-0.063rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:calc(var(--plasma-calendar-month-item-border-radius) - 0.125rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.CalendarMonths_styles_7kz2z4_s14caaqm__b195f607.CalendarMonths_styles_7kz2z4_focusVisible__b195f607:focus::before,.CalendarMonths_styles_7kz2z4_s14caaqm__b195f607[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.063rem var(--plasma-calendar-outline-focus-color);}
|
@@ -59,7 +59,7 @@ var CalendarMonths = function CalendarMonths(_ref) {
|
|
59
59
|
isCurrent = _ref2.isCurrent,
|
60
60
|
monthFullName = _ref2.monthFullName;
|
61
61
|
var selectedClass = isSelected ? Calendar_tokens.classes.selectedItem : undefined;
|
62
|
-
var currentClass =
|
62
|
+
var currentClass = isCurrent ? Calendar_tokens.classes.currentItem : undefined;
|
63
63
|
return /*#__PURE__*/React.createElement(CalendarMonths_styles.StyledMonthRoot, {
|
64
64
|
id: "month-test-".concat(i, "-").concat(j),
|
65
65
|
className: index.cx(selectedClass, currentClass, Calendar_tokens.classes.selectableItem),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CalendarMonths.js","sources":["../../../../../src/components/Calendar/ui/CalendarMonths/CalendarMonths.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useRef } from 'react';\n\nimport { cx } from '../../../../utils';\nimport { useMonths } from '../../hooks';\nimport { classes } from '../../Calendar.tokens';\n\nimport type { CalendarMonthsProps } from './CalendarMonths.types';\nimport { StyledCalendarMonths, StyledFlex, StyledMonth, StyledMonthRoot } from './CalendarMonths.styles';\n\n/**\n * Компонент месяцев в календаре.\n */\nexport const CalendarMonths: React.FC<CalendarMonthsProps> = ({\n date: currentDate,\n selectIndexes,\n outerRefs,\n onChangeMonth,\n onSetSelected,\n onKeyDown,\n}) => {\n const [months, selected] = useMonths(currentDate);\n const selectedRef = useRef(selected);\n const onSetSelectedRef = useRef(onSetSelected);\n\n const handleOnChangeMonth = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n /**\n * нужно вызвать stopImmediatePropagation для случаев, когда\n * обработчик события onClick навешивается снаружи.\n * Как, например, в компоненте Popup\n */\n event.nativeEvent.stopImmediatePropagation();\n\n const { monthIndex } = event.currentTarget.dataset;\n onChangeMonth(Number(monthIndex));\n },\n [onChangeMonth],\n );\n\n const getRefs = useCallback(\n (element: HTMLDivElement, i: number, j: number) => {\n outerRefs.current[i][j] = element;\n },\n [outerRefs],\n );\n\n useEffect(() => {\n if (selectedRef.current) {\n onSetSelectedRef.current?.(selectedRef.current);\n }\n }, []);\n\n return (\n <StyledCalendarMonths role=\"grid\" aria-labelledby=\"id-grid-label\" onKeyDown={onKeyDown}>\n {months.map((month, i) => (\n <StyledFlex role=\"row\" key={i}>\n {month.map(({ monthName, monthIndex, isSelected, isCurrent, monthFullName }, j) => {\n const selectedClass = isSelected ? classes.selectedItem : undefined;\n const currentClass =
|
1
|
+
{"version":3,"file":"CalendarMonths.js","sources":["../../../../../src/components/Calendar/ui/CalendarMonths/CalendarMonths.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useRef } from 'react';\n\nimport { cx } from '../../../../utils';\nimport { useMonths } from '../../hooks';\nimport { classes } from '../../Calendar.tokens';\n\nimport type { CalendarMonthsProps } from './CalendarMonths.types';\nimport { StyledCalendarMonths, StyledFlex, StyledMonth, StyledMonthRoot } from './CalendarMonths.styles';\n\n/**\n * Компонент месяцев в календаре.\n */\nexport const CalendarMonths: React.FC<CalendarMonthsProps> = ({\n date: currentDate,\n selectIndexes,\n outerRefs,\n onChangeMonth,\n onSetSelected,\n onKeyDown,\n}) => {\n const [months, selected] = useMonths(currentDate);\n const selectedRef = useRef(selected);\n const onSetSelectedRef = useRef(onSetSelected);\n\n const handleOnChangeMonth = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n /**\n * нужно вызвать stopImmediatePropagation для случаев, когда\n * обработчик события onClick навешивается снаружи.\n * Как, например, в компоненте Popup\n */\n event.nativeEvent.stopImmediatePropagation();\n\n const { monthIndex } = event.currentTarget.dataset;\n onChangeMonth(Number(monthIndex));\n },\n [onChangeMonth],\n );\n\n const getRefs = useCallback(\n (element: HTMLDivElement, i: number, j: number) => {\n outerRefs.current[i][j] = element;\n },\n [outerRefs],\n );\n\n useEffect(() => {\n if (selectedRef.current) {\n onSetSelectedRef.current?.(selectedRef.current);\n }\n }, []);\n\n return (\n <StyledCalendarMonths role=\"grid\" aria-labelledby=\"id-grid-label\" onKeyDown={onKeyDown}>\n {months.map((month, i) => (\n <StyledFlex role=\"row\" key={i}>\n {month.map(({ monthName, monthIndex, isSelected, isCurrent, monthFullName }, j) => {\n const selectedClass = isSelected ? classes.selectedItem : undefined;\n const currentClass = isCurrent ? classes.currentItem : undefined;\n\n return (\n <StyledMonthRoot\n id={`month-test-${i}-${j}`}\n className={cx(selectedClass, currentClass, classes.selectableItem)}\n ref={(element: HTMLDivElement) => getRefs(element, i, j)}\n tabIndex={i === selectIndexes?.[0] && j === selectIndexes?.[1] ? 0 : -1}\n onClick={handleOnChangeMonth}\n data-month-index={monthIndex}\n aria-selected={isSelected}\n role=\"gridcell\"\n key={`StyledMonth-${i}-${j}`}\n aria-label={monthFullName}\n >\n <StyledMonth>{monthName}</StyledMonth>\n </StyledMonthRoot>\n );\n })}\n </StyledFlex>\n ))}\n </StyledCalendarMonths>\n );\n};\n"],"names":["CalendarMonths","_ref","currentDate","date","selectIndexes","outerRefs","onChangeMonth","onSetSelected","onKeyDown","_useMonths","useMonths","_useMonths2","_slicedToArray","months","selected","selectedRef","useRef","onSetSelectedRef","handleOnChangeMonth","useCallback","event","nativeEvent","stopImmediatePropagation","monthIndex","currentTarget","dataset","Number","getRefs","element","i","j","current","useEffect","_onSetSelectedRef$cur","call","React","createElement","StyledCalendarMonths","role","map","month","StyledFlex","key","_ref2","monthName","isSelected","isCurrent","monthFullName","selectedClass","classes","selectedItem","undefined","currentClass","currentItem","StyledMonthRoot","id","concat","className","cx","selectableItem","ref","tabIndex","onClick","StyledMonth"],"mappings":";;;;;;;;;;;AASA;AACA;AACA;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AAA2B,MAAA,CAAI1B,CAAC,CAAG;QAC3B2B,SAAS,EAAEC,QAAE,CAACV,aAAa,EAAEI,YAAY,EAAEH,uBAAO,CAACU,cAAc,CAAE;QACnEC,GAAG,EAAE,SAAAA,GAAAA,CAAChC,OAAuB,EAAA;AAAA,UAAA,OAAKD,OAAO,CAACC,OAAO,EAAEC,CAAC,EAAEC,CAAC,CAAC,CAAA;SAAC;QACzD+B,QAAQ,EAAEhC,CAAC,MAAKzB,aAAa,KAAA,IAAA,IAAbA,aAAa,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAbA,aAAa,CAAG,CAAC,CAAC,CAAI0B,IAAAA,CAAC,MAAK1B,aAAa,KAAA,IAAA,IAAbA,aAAa,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAbA,aAAa,CAAG,CAAC,CAAC,CAAG,GAAA,CAAC,GAAG,CAAC,CAAE;AACxE0D,QAAAA,OAAO,EAAE5C,mBAAoB;AAC7B,QAAA,kBAAA,EAAkBK,UAAW;AAC7B,QAAA,eAAA,EAAesB,UAAW;AAC1BP,QAAAA,IAAI,EAAC,UAAU;QACfI,GAAG,EAAA,cAAA,CAAAc,MAAA,CAAiB3B,CAAC,OAAA2B,MAAA,CAAI1B,CAAC,CAAG;QAC7B,YAAYiB,EAAAA,aAAAA;OAEZZ,eAAAA,KAAA,CAAAC,aAAA,CAAC2B,iCAAW,EAAEnB,IAAAA,EAAAA,SAAuB,CACxB,CAAC,CAAA;AAE1B,KAAC,CACO,CAAC,CAAA;AAAA,GAChB,CACiB,CAAC,CAAA;AAE/B;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CalendarMonths.styles.js","sources":["../../../../../src/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport {
|
1
|
+
{"version":3,"file":"CalendarMonths.styles.js","sources":["../../../../../src/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { tokens } from '../../Calendar.tokens';\nimport { addFocus } from '../../../../mixins';\nimport { addSelected, flexCenter } from '../../mixins';\n\nexport const StyledCalendarMonths = styled.div`\n padding: var(${tokens.calendarMonthsPadding});\n box-sizing: border-box;\n`;\n\nexport const StyledFlex = styled.div`\n ${String(flexCenter)};\n`;\n\nexport const StyledMonth = styled.div`\n border-radius: calc(var(${tokens.calendarMonthItemBorderRadius}) - 0.125rem);\n\n ${String(flexCenter)};\n`;\n\nexport const StyledMonthRoot = styled.div`\n font-family: var(${tokens.calendarMonthFontFamily});\n font-size: var(${tokens.calendarMonthFontSize});\n font-style: var(${tokens.calendarMonthFontStyle});\n font-weight: var(${tokens.calendarMonthFontWeight});\n letter-spacing: var(${tokens.calendarMonthFontLetterSpacing});\n line-height: var(${tokens.calendarMonthFontLineHeight});\n position: relative;\n box-sizing: border-box;\n\n min-height: var(${tokens.calendarMonthItemHeight});\n min-width: var(${tokens.calendarMonthItemWidth});\n\n border-radius: var(${tokens.calendarMonthItemBorderRadius});\n\n ${String(flexCenter)};\n\n ${addSelected({\n minWidth: `calc(var(${tokens.calendarMonthItemWidth}) - 0.25rem)`,\n minHeight: `calc(var(${tokens.calendarMonthItemHeight}) - 0.25rem)`,\n selectedFontWeight: `var(${tokens.calendarMonthSelectedFontWeight})`,\n selectedBackground: `var(${tokens.calendarSelectedItemBackground})`,\n selectedColor: `var(${tokens.calendarSelectedItemColor})`,\n selectableBackgroundHover: `var(${tokens.calendarSelectableItemBackgroundHover})`,\n currentBorderColor: `var(${tokens.calendarCurrentItemBorderColor})`,\n currentBackgroundHover: `var(${tokens.calendarCurrentItemBackgroundHover})`,\n currentColorHover: `var(${tokens.calendarCurrentItemColorHover})`,\n currentChildBackgroundHover: `var(${tokens.calendarCurrentItemChildBackgroundHover})`,\n hoveredBackground: `var(${tokens.calendarHoveredItemBackground})`,\n hoveredColor: `var(${tokens.calendarHoveredItemColor})`,\n activeBackground: `var(${tokens.calendarActiveItemBackground})`,\n activeColor: `var(${tokens.calendarActiveItemColor})`,\n })};\n\n ${addFocus({\n outlineSize: '0.063rem',\n outlineOffset: '-0.063rem',\n outlineColor: `var(${tokens.calendarOutlineFocusColor})`,\n outlineRadius: `calc(var(${tokens.calendarMonthItemBorderRadius}) - 0.125rem)`,\n })};\n`;\n"],"names":["StyledCalendarMonths","styled","name","class","propsAsIs","StyledFlex","StyledMonth","StyledMonthRoot"],"mappings":";;;;;;AAMO,IAAMA,oBAAoB,gBAAGC,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,sBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAGzC,EAAA;AAEM,IAAMC,UAAU,gBAAGJ,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAE/B,EAAA;AAEM,IAAME,WAAW,gBAAGL,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAIhC,EAAA;AAEM,IAAMG,eAAe,gBAAGN,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,iBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAwCpC;;;;;;;"}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
.s2fb05v{padding:var(--plasma-calendar-months-padding);box-sizing:border-box;}
|
2
|
+
.s1nlg4aa{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
|
3
|
+
.s1cvx4bk{border-radius:calc(var(--plasma-calendar-month-item-border-radius) - 0.125rem);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
|
4
|
+
.s14caaqm{font-family:var(--plasma-calendar-month-font-family);font-size:var(--plasma-calendar-month-font-size);font-style:var(--plasma-calendar-month-font-style);font-weight:var(--plasma-calendar-month-font-weight);-webkit-letter-spacing:var(--plasma-calendar-month-font-letter-spacing);-moz-letter-spacing:var(--plasma-calendar-month-font-letter-spacing);-ms-letter-spacing:var(--plasma-calendar-month-font-letter-spacing);letter-spacing:var(--plasma-calendar-month-font-letter-spacing);line-height:var(--plasma-calendar-month-line-height);position:relative;box-sizing:border-box;min-height:var(--plasma-calendar-month-item-height);min-width:var(--plasma-calendar-month-item-width);border-radius:var(--plasma-calendar-month-item-border-radius);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;outline:none;cursor:pointer;position:relative;}.s14caaqm:hover{background-color:var(--plasma-calendar-selectable-item-bg-hover);}.s14caaqm.item-hovered,.s14caaqm.item-hovered:hover{background-color:var(--plasma-calendar-hovered-item-bg);color:var(--plasma-calendar-hovered-item-color);cursor:pointer;font-weight:var(--plasma-calendar-month-selected-font-weight);}.s14caaqm.item-selected:not(.item-current){border:0;background-color:var(--plasma-calendar-selected-item-background);color:var(--plasma-calendar-selected-item-color);cursor:default;font-weight:var(--plasma-calendar-month-selected-font-weight);}.s14caaqm:active{background-color:var(--plasma-calendar-active-item-bg);color:var(--plasma-calendar-active-item-color);font-weight:var(--plasma-calendar-month-selected-font-weight);}.s14caaqm.item-current{border:0.063rem solid var(--plasma-calendar-current-item-border-color);}.s14caaqm.item-current.item-selected{background-color:initial;color:var(--plasma-calendar-selected-item-color);font-weight:var(--plasma-calendar-month-selected-font-weight);}.s14caaqm.item-current.item-selected > div:first-of-type{background-color:var(--plasma-calendar-selected-item-background);min-width:calc(var(--plasma-calendar-month-item-width) - 0.25rem);min-height:calc(var(--plasma-calendar-month-item-height) - 0.25rem);}.s14caaqm.item-current:not(.item-selected):hover{background-color:var(--plasma-calendar-current-item-bg-hover);color:var(--plasma-calendar-current-item-color-hover);}.s14caaqm.item-current:not(.item-selected):hover > div:first-of-type{background-color:var(--plasma-calendar-current-item-child-bg-hover);min-width:calc(var(--plasma-calendar-month-item-width) - 0.25rem);min-height:calc(var(--plasma-calendar-month-item-height) - 0.25rem);}.s14caaqm.item-current:not(.item-selected):hover:active > div:first-of-type{background-color:var(--plasma-calendar-selected-item-background);}.s14caaqm.item-current.item-hovered:not(.item-selected):hover{background-color:initial;color:var(--plasma-calendar-hovered-item-color);font-weight:var(--plasma-calendar-month-selected-font-weight);}.s14caaqm.item-current.item-hovered:not(.item-selected):hover > div:first-of-type{background-color:var(--plasma-calendar-hovered-item-bg);min-width:calc(var(--plasma-calendar-month-item-width) - 0.25rem);min-height:calc(var(--plasma-calendar-month-item-height) - 0.25rem);}.s14caaqm::before{content:'';position:absolute;top:-0.063rem;left:-0.063rem;right:-0.063rem;bottom:-0.063rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:calc(var(--plasma-calendar-month-item-border-radius) - 0.125rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.s14caaqm.focus-visible:focus::before,.s14caaqm[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.063rem var(--plasma-calendar-outline-focus-color);}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
.
|
2
|
-
.
|
3
|
-
.
|
4
|
-
.
|
1
|
+
.CalendarYears_styles_hbv1kh_sq90exc__e51e94e4{padding:var(--plasma-calendar-years-padding);box-sizing:border-box;}
|
2
|
+
.CalendarYears_styles_hbv1kh_sp45mzt__e51e94e4{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
|
3
|
+
.CalendarYears_styles_hbv1kh_s1rv7a6a__e51e94e4{border-radius:calc(var(--plasma-calendar-year-item-border-radius) - 0.125rem);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
|
4
|
+
.CalendarYears_styles_hbv1kh_s1fgpu0g__e51e94e4{font-family:var(--plasma-calendar-year-font-family);font-size:var(--plasma-calendar-year-font-size);font-style:var(--plasma-calendar-year-font-style);font-weight:var(--plasma-calendar-year-font-weight);-webkit-letter-spacing:var(--plasma-calendar-year-font-letter-spacing);-moz-letter-spacing:var(--plasma-calendar-year-font-letter-spacing);-ms-letter-spacing:var(--plasma-calendar-year-font-letter-spacing);letter-spacing:var(--plasma-calendar-year-font-letter-spacing);line-height:var(--plasma-calendar-year-line-height);position:relative;box-sizing:border-box;min-height:var(--plasma-calendar-year-item-height);min-width:var(--plasma-calendar-year-item-width);border-radius:var(--plasma-calendar-year-item-border-radius);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;outline:none;cursor:pointer;position:relative;}.CalendarYears_styles_hbv1kh_s1fgpu0g__e51e94e4:hover{background-color:var(--plasma-calendar-selectable-item-bg-hover);}.CalendarYears_styles_hbv1kh_s1fgpu0g__e51e94e4.CalendarYears_styles_hbv1kh_itemHovered__e51e94e4,.CalendarYears_styles_hbv1kh_s1fgpu0g__e51e94e4.CalendarYears_styles_hbv1kh_itemHovered__e51e94e4:hover{background-color:var(--plasma-calendar-hovered-item-bg);color:var(--plasma-calendar-hovered-item-color);cursor:pointer;font-weight:var(--plasma-calendar-year-selected-font-weight);}.CalendarYears_styles_hbv1kh_s1fgpu0g__e51e94e4.CalendarYears_styles_hbv1kh_itemSelected__e51e94e4:not(.CalendarYears_styles_hbv1kh_itemCurrent__e51e94e4){border:0;background-color:var(--plasma-calendar-selected-item-background);color:var(--plasma-calendar-selected-item-color);cursor:default;font-weight:var(--plasma-calendar-year-selected-font-weight);}.CalendarYears_styles_hbv1kh_s1fgpu0g__e51e94e4:active{background-color:var(--plasma-calendar-active-item-bg);color:var(--plasma-calendar-active-item-color);font-weight:var(--plasma-calendar-year-selected-font-weight);}.CalendarYears_styles_hbv1kh_s1fgpu0g__e51e94e4.CalendarYears_styles_hbv1kh_itemCurrent__e51e94e4{border:0.063rem solid var(--plasma-calendar-current-item-border-color);}.CalendarYears_styles_hbv1kh_s1fgpu0g__e51e94e4.CalendarYears_styles_hbv1kh_itemCurrent__e51e94e4.CalendarYears_styles_hbv1kh_itemSelected__e51e94e4{background-color:initial;color:var(--plasma-calendar-selected-item-color);font-weight:var(--plasma-calendar-year-selected-font-weight);}.CalendarYears_styles_hbv1kh_s1fgpu0g__e51e94e4.CalendarYears_styles_hbv1kh_itemCurrent__e51e94e4.CalendarYears_styles_hbv1kh_itemSelected__e51e94e4 > div:first-of-type{background-color:var(--plasma-calendar-selected-item-background);min-width:calc(var(--plasma-calendar-year-item-width) - 0.25rem);min-height:calc(var(--plasma-calendar-year-item-height) - 0.25rem);}.CalendarYears_styles_hbv1kh_s1fgpu0g__e51e94e4.CalendarYears_styles_hbv1kh_itemCurrent__e51e94e4:not(.CalendarYears_styles_hbv1kh_itemSelected__e51e94e4):hover{background-color:var(--plasma-calendar-current-item-bg-hover);color:var(--plasma-calendar-current-item-color-hover);}.CalendarYears_styles_hbv1kh_s1fgpu0g__e51e94e4.CalendarYears_styles_hbv1kh_itemCurrent__e51e94e4:not(.CalendarYears_styles_hbv1kh_itemSelected__e51e94e4):hover > div:first-of-type{background-color:var(--plasma-calendar-current-item-child-bg-hover);min-width:calc(var(--plasma-calendar-year-item-width) - 0.25rem);min-height:calc(var(--plasma-calendar-year-item-height) - 0.25rem);}.CalendarYears_styles_hbv1kh_s1fgpu0g__e51e94e4.CalendarYears_styles_hbv1kh_itemCurrent__e51e94e4:not(.CalendarYears_styles_hbv1kh_itemSelected__e51e94e4):hover:active > div:first-of-type{background-color:var(--plasma-calendar-selected-item-background);}.CalendarYears_styles_hbv1kh_s1fgpu0g__e51e94e4.CalendarYears_styles_hbv1kh_itemCurrent__e51e94e4.CalendarYears_styles_hbv1kh_itemHovered__e51e94e4:not(.CalendarYears_styles_hbv1kh_itemSelected__e51e94e4):hover{background-color:initial;color:var(--plasma-calendar-hovered-item-color);font-weight:var(--plasma-calendar-year-selected-font-weight);}.CalendarYears_styles_hbv1kh_s1fgpu0g__e51e94e4.CalendarYears_styles_hbv1kh_itemCurrent__e51e94e4.CalendarYears_styles_hbv1kh_itemHovered__e51e94e4:not(.CalendarYears_styles_hbv1kh_itemSelected__e51e94e4):hover > div:first-of-type{background-color:var(--plasma-calendar-hovered-item-bg);min-width:calc(var(--plasma-calendar-year-item-width) - 0.25rem);min-height:calc(var(--plasma-calendar-year-item-height) - 0.25rem);}.CalendarYears_styles_hbv1kh_s1fgpu0g__e51e94e4::before{content:'';position:absolute;top:-0.063rem;left:-0.063rem;right:-0.063rem;bottom:-0.063rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:calc(var(--plasma-calendar-month-item-border-radius) - 0.125rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.CalendarYears_styles_hbv1kh_s1fgpu0g__e51e94e4.CalendarYears_styles_hbv1kh_focusVisible__e51e94e4:focus::before,.CalendarYears_styles_hbv1kh_s1fgpu0g__e51e94e4[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.063rem var(--plasma-calendar-outline-focus-color);}
|
@@ -58,7 +58,7 @@ var CalendarYears = function CalendarYears(_ref) {
|
|
58
58
|
isSelected = _ref2.isSelected,
|
59
59
|
isCurrent = _ref2.isCurrent;
|
60
60
|
var selectedClass = isSelected ? Calendar_tokens.classes.selectedItem : undefined;
|
61
|
-
var currentClass =
|
61
|
+
var currentClass = isCurrent ? Calendar_tokens.classes.currentItem : undefined;
|
62
62
|
return /*#__PURE__*/React.createElement(CalendarYears_styles.StyledYearRoot, {
|
63
63
|
className: index.cx(selectedClass, currentClass, Calendar_tokens.classes.selectableItem),
|
64
64
|
ref: function ref(element) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CalendarYears.js","sources":["../../../../../src/components/Calendar/ui/CalendarYears/CalendarYears.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useRef } from 'react';\n\nimport { cx } from '../../../../utils';\nimport { useYears } from '../../hooks';\nimport { classes } from '../../Calendar.tokens';\n\nimport type { CalendarYearsProps } from './CalendarYears.types';\nimport { StyledCalendarYears, StyledFlex, StyledYear, StyledYearRoot } from './CalendarYears.styles';\n\n/**\n * Компонент годов в календаре.\n */\nexport const CalendarYears: React.FC<CalendarYearsProps> = ({\n date: currentDate,\n startYear,\n selectIndexes,\n outerRefs,\n onChangeYear,\n onSetSelected,\n onKeyDown,\n}) => {\n const [years, selected] = useYears(currentDate, startYear);\n const selectedRef = useRef(selected);\n const onSetSelectedRef = useRef(onSetSelected);\n\n const handleOnChangeYear = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n /**\n * нужно вызвать stopImmediatePropagation для случаев, когда\n * обработчик события onClick навешивается снаружи.\n * Как, например, в компоненте Popup\n */\n event.nativeEvent.stopImmediatePropagation();\n\n const { year } = event.currentTarget.dataset;\n onChangeYear(Number(year));\n },\n [onChangeYear],\n );\n\n const getRefs = useCallback(\n (element: HTMLDivElement, i: number, j: number) => {\n outerRefs.current[i][j] = element;\n },\n [outerRefs],\n );\n\n useEffect(() => {\n if (selectedRef.current) {\n onSetSelectedRef.current?.(selectedRef.current);\n }\n }, []);\n\n return (\n <StyledCalendarYears role=\"grid\" aria-labelledby=\"id-grid-label\" onKeyDown={onKeyDown}>\n {years.map((year, i) => (\n <StyledFlex role=\"row\" key={i}>\n {year.map(({ yearValue, isSelected, isCurrent }, j) => {\n const selectedClass = isSelected ? classes.selectedItem : undefined;\n const currentClass =
|
1
|
+
{"version":3,"file":"CalendarYears.js","sources":["../../../../../src/components/Calendar/ui/CalendarYears/CalendarYears.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useRef } from 'react';\n\nimport { cx } from '../../../../utils';\nimport { useYears } from '../../hooks';\nimport { classes } from '../../Calendar.tokens';\n\nimport type { CalendarYearsProps } from './CalendarYears.types';\nimport { StyledCalendarYears, StyledFlex, StyledYear, StyledYearRoot } from './CalendarYears.styles';\n\n/**\n * Компонент годов в календаре.\n */\nexport const CalendarYears: React.FC<CalendarYearsProps> = ({\n date: currentDate,\n startYear,\n selectIndexes,\n outerRefs,\n onChangeYear,\n onSetSelected,\n onKeyDown,\n}) => {\n const [years, selected] = useYears(currentDate, startYear);\n const selectedRef = useRef(selected);\n const onSetSelectedRef = useRef(onSetSelected);\n\n const handleOnChangeYear = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n /**\n * нужно вызвать stopImmediatePropagation для случаев, когда\n * обработчик события onClick навешивается снаружи.\n * Как, например, в компоненте Popup\n */\n event.nativeEvent.stopImmediatePropagation();\n\n const { year } = event.currentTarget.dataset;\n onChangeYear(Number(year));\n },\n [onChangeYear],\n );\n\n const getRefs = useCallback(\n (element: HTMLDivElement, i: number, j: number) => {\n outerRefs.current[i][j] = element;\n },\n [outerRefs],\n );\n\n useEffect(() => {\n if (selectedRef.current) {\n onSetSelectedRef.current?.(selectedRef.current);\n }\n }, []);\n\n return (\n <StyledCalendarYears role=\"grid\" aria-labelledby=\"id-grid-label\" onKeyDown={onKeyDown}>\n {years.map((year, i) => (\n <StyledFlex role=\"row\" key={i}>\n {year.map(({ yearValue, isSelected, isCurrent }, j) => {\n const selectedClass = isSelected ? classes.selectedItem : undefined;\n const currentClass = isCurrent ? classes.currentItem : undefined;\n\n return (\n <StyledYearRoot\n className={cx(selectedClass, currentClass, classes.selectableItem)}\n ref={(element: HTMLDivElement) => getRefs(element, i, j)}\n tabIndex={i === selectIndexes?.[0] && j === selectIndexes?.[1] ? 0 : -1}\n onClick={handleOnChangeYear}\n data-year={yearValue}\n aria-selected={isSelected}\n role=\"gridcell\"\n key={`StyledYear-${i}-${j}`}\n aria-label={String(yearValue)}\n >\n <StyledYear>{yearValue}</StyledYear>\n </StyledYearRoot>\n );\n })}\n </StyledFlex>\n ))}\n </StyledCalendarYears>\n );\n};\n"],"names":["CalendarYears","_ref","currentDate","date","startYear","selectIndexes","outerRefs","onChangeYear","onSetSelected","onKeyDown","_useYears","useYears","_useYears2","_slicedToArray","years","selected","selectedRef","useRef","onSetSelectedRef","handleOnChangeYear","useCallback","event","nativeEvent","stopImmediatePropagation","year","currentTarget","dataset","Number","getRefs","element","i","j","current","useEffect","_onSetSelectedRef$cur","call","React","createElement","StyledCalendarYears","role","map","StyledFlex","key","_ref2","yearValue","isSelected","isCurrent","selectedClass","classes","selectedItem","undefined","currentClass","currentItem","StyledYearRoot","className","cx","selectableItem","ref","tabIndex","onClick","concat","String","StyledYear"],"mappings":";;;;;;;;;;;AASA;AACA;AACA;IACaA,aAA2C,GAAG,SAA9CA,aAA2CA,CAAAC,IAAA,EAQlD;AAAA,EAAA,IAPIC,WAAW,GAAAD,IAAA,CAAjBE,IAAI;IACJC,SAAS,GAAAH,IAAA,CAATG,SAAS;IACTC,aAAa,GAAAJ,IAAA,CAAbI,aAAa;IACbC,SAAS,GAAAL,IAAA,CAATK,SAAS;IACTC,YAAY,GAAAN,IAAA,CAAZM,YAAY;IACZC,aAAa,GAAAP,IAAA,CAAbO,aAAa;IACbC,SAAS,GAAAR,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IAAA,IAAbA,aAAa,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAbA,aAAa,CAAG,CAAC,CAAC,CAAG,GAAA,CAAC,GAAG,CAAC,CAAE;AACxEsD,QAAAA,OAAO,EAAExC,kBAAmB;AAC5B,QAAA,WAAA,EAAWyB,SAAU;AACrB,QAAA,eAAA,EAAeC,UAAW;AAC1BN,QAAAA,IAAI,EAAC,UAAU;QACfG,GAAG,EAAA,aAAA,CAAAkB,MAAA,CAAgB9B,CAAC,OAAA8B,MAAA,CAAI7B,CAAC,CAAG;QAC5B,YAAY8B,EAAAA,MAAM,CAACjB,SAAS,CAAA;OAE5BR,eAAAA,KAAA,CAAAC,aAAA,CAACyB,+BAAU,EAAElB,IAAAA,EAAAA,SAAsB,CACvB,CAAC,CAAA;AAEzB,KAAC,CACO,CAAC,CAAA;AAAA,GAChB,CACgB,CAAC,CAAA;AAE9B;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CalendarYears.styles.js","sources":["../../../../../src/components/Calendar/ui/CalendarYears/CalendarYears.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport {
|
1
|
+
{"version":3,"file":"CalendarYears.styles.js","sources":["../../../../../src/components/Calendar/ui/CalendarYears/CalendarYears.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { tokens } from '../../Calendar.tokens';\nimport { addFocus } from '../../../../mixins';\nimport { addSelected, flexCenter } from '../../mixins';\n\nexport const StyledCalendarYears = styled.div`\n padding: var(${tokens.calendarYearsPadding});\n box-sizing: border-box;\n`;\n\nexport const StyledFlex = styled.div`\n ${String(flexCenter)};\n`;\n\nexport const StyledYear = styled.div`\n border-radius: calc(var(${tokens.calendarYearItemBorderRadius}) - 0.125rem);\n\n ${String(flexCenter)};\n`;\n\nexport const StyledYearRoot = styled.div`\n font-family: var(${tokens.calendarYearFontFamily});\n font-size: var(${tokens.calendarYearFontSize});\n font-style: var(${tokens.calendarYearFontStyle});\n font-weight: var(${tokens.calendarYearFontWeight});\n letter-spacing: var(${tokens.calendarYearFontLetterSpacing});\n line-height: var(${tokens.calendarYearFontLineHeight});\n position: relative;\n box-sizing: border-box;\n\n min-height: var(${tokens.calendarYearItemHeight});\n min-width: var(${tokens.calendarYearItemWidth});\n\n border-radius: var(${tokens.calendarYearItemBorderRadius});\n\n ${String(flexCenter)};\n\n ${addSelected({\n minWidth: `calc(var(${tokens.calendarYearItemWidth}) - 0.25rem)`,\n minHeight: `calc(var(${tokens.calendarYearItemHeight}) - 0.25rem)`,\n selectedFontWeight: `var(${tokens.calendarYearSelectedFontWeight})`,\n selectedBackground: `var(${tokens.calendarSelectedItemBackground})`,\n selectedColor: `var(${tokens.calendarSelectedItemColor})`,\n selectableBackgroundHover: `var(${tokens.calendarSelectableItemBackgroundHover})`,\n currentBorderColor: `var(${tokens.calendarCurrentItemBorderColor})`,\n currentBackgroundHover: `var(${tokens.calendarCurrentItemBackgroundHover})`,\n currentColorHover: `var(${tokens.calendarCurrentItemColorHover})`,\n currentChildBackgroundHover: `var(${tokens.calendarCurrentItemChildBackgroundHover})`,\n hoveredBackground: `var(${tokens.calendarHoveredItemBackground})`,\n hoveredColor: `var(${tokens.calendarHoveredItemColor})`,\n activeBackground: `var(${tokens.calendarActiveItemBackground})`,\n activeColor: `var(${tokens.calendarActiveItemColor})`,\n })};\n\n ${addFocus({\n outlineSize: '0.063rem',\n outlineOffset: '-0.063rem',\n outlineColor: `var(${tokens.calendarOutlineFocusColor})`,\n outlineRadius: `calc(var(${tokens.calendarMonthItemBorderRadius}) - 0.125rem)`,\n })};\n`;\n"],"names":["StyledCalendarYears","styled","name","class","propsAsIs","StyledFlex","StyledYear","StyledYearRoot"],"mappings":";;;;;;AAMO,IAAMA,mBAAmB,gBAAGC,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,qBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAGxC,EAAA;AAEM,IAAMC,UAAU,gBAAGJ,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAE/B,EAAA;AAEM,IAAME,UAAU,gBAAGL,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAI/B,EAAA;AAEM,IAAMG,cAAc,gBAAGN,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,gBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAwCnC;;;;;;;"}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
.sq90exc{padding:var(--plasma-calendar-years-padding);box-sizing:border-box;}
|
2
|
+
.sp45mzt{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
|
3
|
+
.s1rv7a6a{border-radius:calc(var(--plasma-calendar-year-item-border-radius) - 0.125rem);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
|
4
|
+
.s1fgpu0g{font-family:var(--plasma-calendar-year-font-family);font-size:var(--plasma-calendar-year-font-size);font-style:var(--plasma-calendar-year-font-style);font-weight:var(--plasma-calendar-year-font-weight);-webkit-letter-spacing:var(--plasma-calendar-year-font-letter-spacing);-moz-letter-spacing:var(--plasma-calendar-year-font-letter-spacing);-ms-letter-spacing:var(--plasma-calendar-year-font-letter-spacing);letter-spacing:var(--plasma-calendar-year-font-letter-spacing);line-height:var(--plasma-calendar-year-line-height);position:relative;box-sizing:border-box;min-height:var(--plasma-calendar-year-item-height);min-width:var(--plasma-calendar-year-item-width);border-radius:var(--plasma-calendar-year-item-border-radius);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;outline:none;cursor:pointer;position:relative;}.s1fgpu0g:hover{background-color:var(--plasma-calendar-selectable-item-bg-hover);}.s1fgpu0g.item-hovered,.s1fgpu0g.item-hovered:hover{background-color:var(--plasma-calendar-hovered-item-bg);color:var(--plasma-calendar-hovered-item-color);cursor:pointer;font-weight:var(--plasma-calendar-year-selected-font-weight);}.s1fgpu0g.item-selected:not(.item-current){border:0;background-color:var(--plasma-calendar-selected-item-background);color:var(--plasma-calendar-selected-item-color);cursor:default;font-weight:var(--plasma-calendar-year-selected-font-weight);}.s1fgpu0g:active{background-color:var(--plasma-calendar-active-item-bg);color:var(--plasma-calendar-active-item-color);font-weight:var(--plasma-calendar-year-selected-font-weight);}.s1fgpu0g.item-current{border:0.063rem solid var(--plasma-calendar-current-item-border-color);}.s1fgpu0g.item-current.item-selected{background-color:initial;color:var(--plasma-calendar-selected-item-color);font-weight:var(--plasma-calendar-year-selected-font-weight);}.s1fgpu0g.item-current.item-selected > div:first-of-type{background-color:var(--plasma-calendar-selected-item-background);min-width:calc(var(--plasma-calendar-year-item-width) - 0.25rem);min-height:calc(var(--plasma-calendar-year-item-height) - 0.25rem);}.s1fgpu0g.item-current:not(.item-selected):hover{background-color:var(--plasma-calendar-current-item-bg-hover);color:var(--plasma-calendar-current-item-color-hover);}.s1fgpu0g.item-current:not(.item-selected):hover > div:first-of-type{background-color:var(--plasma-calendar-current-item-child-bg-hover);min-width:calc(var(--plasma-calendar-year-item-width) - 0.25rem);min-height:calc(var(--plasma-calendar-year-item-height) - 0.25rem);}.s1fgpu0g.item-current:not(.item-selected):hover:active > div:first-of-type{background-color:var(--plasma-calendar-selected-item-background);}.s1fgpu0g.item-current.item-hovered:not(.item-selected):hover{background-color:initial;color:var(--plasma-calendar-hovered-item-color);font-weight:var(--plasma-calendar-year-selected-font-weight);}.s1fgpu0g.item-current.item-hovered:not(.item-selected):hover > div:first-of-type{background-color:var(--plasma-calendar-hovered-item-bg);min-width:calc(var(--plasma-calendar-year-item-width) - 0.25rem);min-height:calc(var(--plasma-calendar-year-item-height) - 0.25rem);}.s1fgpu0g::before{content:'';position:absolute;top:-0.063rem;left:-0.063rem;right:-0.063rem;bottom:-0.063rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:calc(var(--plasma-calendar-month-item-border-radius) - 0.125rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.s1fgpu0g.focus-visible:focus::before,.s1fgpu0g[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.063rem var(--plasma-calendar-outline-focus-color);}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/Calendar/utils/index.ts"],"sourcesContent":["import type { CalendarStateType } from '../store/types';\nimport type { CalendarValueType, DateObject, DisabledDay, ItemProps } from '../Calendar.types';\n\nexport const ROW_STEP = 6;\n\nexport const YEAR_RENDER_COUNT = 12;\n\nexport const SHORT_DAY_NAMES = ['Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб', 'Вс'] as const;\n\nexport const FULL_DAY_NAMES: Record<typeof SHORT_DAY_NAMES[number], string> = {\n Пн: 'Понедельник',\n Вт: 'Вторник',\n Ср: 'Среда',\n Чт: 'Четверг',\n Пт: 'Пятница',\n Сб: 'Суббота',\n Вс: 'Воскресенье',\n};\n\nexport const SHORT_MONTH_NAME = ['Янв', 'Фев', 'Март', 'Апр', 'Май', 'Июнь', 'Июль', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек'];\n\nexport const MONTH_NAMES = [\n 'Январь',\n 'Февраль',\n 'Март',\n 'Апрель',\n 'Май',\n 'Июнь',\n 'Июль',\n 'Август',\n 'Сентябрь',\n 'Октябрь',\n 'Ноябрь',\n 'Декабрь',\n];\n\nexport const getDaysInMonth = (monthIndex: number, year: number) => new Date(year, monthIndex + 1, 0).getDate();\n\nexport const getOffsetDayInWeek = (monthIndex: number, year: number) => (new Date(year, monthIndex).getDay() || 7) - 1;\n\nexport const getStartYear = (year: number) => Math.trunc((year - 1) * 0.1) * 10 - 1;\n\nexport const getNextDate = (currentYear: number, currentMonth: number) =>\n currentMonth + 1 === MONTH_NAMES.length ? [currentYear + 1, 0] : [currentYear, currentMonth + 1];\n\nexport const getPrevDate = (currentYear: number, currentMonth: number) =>\n currentMonth - 1 < 0 ? [currentYear - 1, 11] : [currentYear, currentMonth - 1];\n\nexport const getDateFromValue = (date: Date | undefined): DateObject => {\n const state = date || new Date();\n\n return {\n day: date !== undefined ? state.getDate() : 0,\n monthIndex: state.getMonth(),\n year: state.getFullYear(),\n };\n};\n\nexport const getDateFromNow = (): DateObject => {\n const nowDate = new Date();\n\n return {\n day: nowDate.getDate(),\n monthIndex: nowDate.getMonth(),\n year: nowDate.getFullYear(),\n };\n};\n\nexport const IsCurrentDay = (date: DateObject, currentDay: number) => {\n const { day, monthIndex: currentMonthIndex, year: currentYear } = getDateFromNow();\n return day === currentDay && date.monthIndex === currentMonthIndex && date.year === currentYear;\n};\n\nexport const isSelectedDay = (date: DateObject, currentDay: number, value?: Date) => {\n if (!value) {\n return false;\n }\n\n const { day, monthIndex, year } = getDateFromValue(value);\n return day === currentDay && date.monthIndex === monthIndex && date.year === year;\n};\n\nexport const isCurrentMonth = (date: DateObject, monthIndex: number) => {\n const { monthIndex: currentMonthIndex, year: currentYear } = getDateFromNow();\n return monthIndex === currentMonthIndex && date.year === currentYear;\n};\n\nexport const isSelectedMonth = (date: DateObject, monthIndex: number) => date.monthIndex === monthIndex;\n\nexport const isCurrentYear = (year: number) => {\n const { year: currentYear } = getDateFromNow();\n return year === currentYear;\n};\n\nexport const isSelectedYear = (date: DateObject, year: number) => date.year === year;\n\nexport const getSortedValues = (values: [Date | undefined, (Date | undefined)?]) =>\n values.sort((start, end) => {\n if (!start || !end) {\n return -1;\n }\n\n return start.getTime() - end.getTime();\n });\n\nexport const isDayInRange = (\n year: number,\n monthIndex: number,\n currentDay: number,\n values: [Date | undefined, Date?],\n) => {\n const [startValue, endValue] = getSortedValues(values);\n\n if (!endValue || !startValue) {\n return false;\n }\n\n const day = new Date(year, monthIndex, currentDay);\n return startValue < day && day <= endValue;\n};\n\nexport const isSameDay = (firstDate: DateObject, secondDate?: DateObject) =>\n secondDate &&\n firstDate.day === secondDate.day &&\n firstDate.monthIndex === secondDate.monthIndex &&\n firstDate.year === secondDate.year;\n\nexport const isValueUpdate = (value: Date | [Date, Date?], prevValue: Date | [Date, Date?]) => {\n if (!Array.isArray(value) && !Array.isArray(prevValue)) {\n return prevValue?.getTime() !== value?.getTime();\n }\n\n if (Array.isArray(value) && Array.isArray(prevValue)) {\n return prevValue[0]?.getTime() !== value[0]?.getTime() || prevValue[1]?.getTime() !== value[1]?.getTime();\n }\n\n return false;\n};\n\n/**\n * Метод проверяет, находится ли календарь в режиме выбора второго значения.\n */\nexport const isSelectProcess = (array: unknown | unknown[]): array is [Date, Date?] =>\n Array.isArray(array) && !array[1];\n\n/**\n * Метод возвращает сторону, когда выбор второго значения диапазона завершён.\n */\nexport const getSideForSelected = (date: DateObject, startValue: Date, endValue: Date) => {\n const currentDateTime = new Date(date.year, date.monthIndex, date.day).getTime();\n const startValueTime = startValue.getTime();\n const endValueTime = endValue.getTime();\n\n if (currentDateTime === startValueTime) {\n return 'right';\n }\n\n if (currentDateTime === endValueTime) {\n return 'left';\n }\n\n return undefined;\n};\n\n/**\n * Метод возвращает сторону, во время выбора второго значения диапазона.\n */\nexport const getSideForHovered = (date: DateObject, hoveredDay: DateObject, startValue: Date, isSelected?: boolean) => {\n const dateHover = new Date(hoveredDay.year, hoveredDay.monthIndex, hoveredDay.day);\n const isHovered = isSameDay(date, hoveredDay);\n\n if ((isSelected && startValue > dateHover) || (isHovered && startValue < dateHover)) {\n return 'left';\n }\n\n if ((isSelected && startValue < dateHover) || (isHovered && startValue > dateHover)) {\n return 'right';\n }\n\n return undefined;\n};\n\n/**\n * Метод возвращает сторону, с которой нужно отрисовать направление полоски диапазона.\n */\nexport const getSideInRange = (\n value: CalendarValueType,\n date: DateObject,\n hoveredDay?: DateObject,\n isSelected?: boolean,\n) => {\n if (!Array.isArray(value)) {\n return undefined;\n }\n\n const [startValue, endValue] = value;\n\n if (startValue && isSelected && endValue) {\n return getSideForSelected(date, startValue, endValue);\n }\n\n if (startValue && hoveredDay) {\n return getSideForHovered(date, hoveredDay, startValue, isSelected);\n }\n\n return undefined;\n};\n\n/**\n * Метод проверяет, находится ли выбранный день в диапазоне.\n */\nexport const getInRange = (value: CalendarValueType, date: DateObject, hoveredDay?: DateObject, inRange?: boolean) => {\n if (!isSelectProcess(value) || !hoveredDay) {\n return inRange;\n }\n\n const dateSelected = value[0];\n const dateHover = new Date(hoveredDay.year, hoveredDay.monthIndex, hoveredDay.day);\n const dateCurrent = new Date(date.year, date.monthIndex, date.day);\n\n if (\n (dateSelected < dateCurrent && dateCurrent < dateHover) ||\n (dateSelected > dateCurrent && dateCurrent > dateHover)\n ) {\n return true;\n }\n\n return inRange;\n};\n\n/**\n * Метод проверяет, можно ли выбрать день.\n */\nexport const canSelectDate = (\n { year, monthIndex, day }: DateObject,\n value: CalendarValueType,\n disabledList?: DisabledDay[],\n) => {\n if (!isSelectProcess(value)) {\n return true;\n }\n\n const hoverDate = new Date(year, monthIndex, day);\n const [startDate] = value;\n\n if (!disabledList?.length) {\n return true;\n }\n\n const offDisabledRange = disabledList.some(\n ({ date }) => (startDate < date && date < hoverDate) || (startDate > date && date > hoverDate),\n );\n\n return !offDisabledRange;\n};\n\n/**\n * Метод для получения двумерного массива и возвращения выбранного элемента.\n */\nexport const getMatrix = <T extends ItemProps>(items: T[], rowSize = 7): readonly [T[][], number[] | undefined] => {\n const newItems = [...items];\n\n let selected: [number, number] | undefined;\n\n const result = newItems.reduce((acc: T[][], item, index) => {\n if (index % rowSize === 0) {\n acc.push([]);\n }\n\n acc[acc.length - 1].push(item);\n\n if (item.isSelected) {\n selected = [acc.length - 1, index % rowSize];\n }\n\n return acc;\n }, []);\n\n return [result, selected] as const;\n};\n\nexport const getCalendarType = (type: CalendarStateType) => {\n switch (type) {\n case 'Months':\n return 'год';\n case 'Years':\n return 'период';\n default:\n return 'месяц';\n }\n};\n"],"names":["ROW_STEP","YEAR_RENDER_COUNT","SHORT_DAY_NAMES","FULL_DAY_NAMES","Пн","Вт","Ср","Чт","Пт","Сб","Вс","SHORT_MONTH_NAME","MONTH_NAMES","getDaysInMonth","monthIndex","year","Date","getDate","getOffsetDayInWeek","getDay","getStartYear","Math","trunc","getNextDate","currentYear","currentMonth","length","getPrevDate","getDateFromValue","date","state","day","undefined","getMonth","getFullYear","getDateFromNow","nowDate","IsCurrentDay","currentDay","_getDateFromNow","currentMonthIndex","isSelectedDay","value","_getDateFromValue","isCurrentMonth","_getDateFromNow2","isSelectedMonth","isCurrentYear","_getDateFromNow3","isSelectedYear","getSortedValues","values","sort","start","end","getTime","isDayInRange","_getSortedValues","_getSortedValues2","_slicedToArray","startValue","endValue","isSameDay","firstDate","secondDate","isValueUpdate","prevValue","Array","isArray","_prevValue$","_value$","_prevValue$2","_value$2","isSelectProcess","array","getSideForSelected","currentDateTime","startValueTime","endValueTime","getSideForHovered","hoveredDay","isSelected","dateHover","isHovered","getSideInRange","_value","getInRange","inRange","dateSelected","dateCurrent","canSelectDate","_ref","disabledList","hoverDate","_value2","startDate","offDisabledRange","some","_ref2","getMatrix","items","rowSize","arguments","newItems","_toConsumableArray","selected","result","reduce","acc","item","index","push","getCalendarType","type"],"mappings":";;;;;;AAGO,IAAMA,QAAQ,GAA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A,CAAOJ,KAAK,CAAC,CAAA;AAE3B,EAAA,IAAIK,QAAsC,CAAA;AAE1C,EAAA,IAAMC,MAAM,GAAGH,QAAQ,CAACI,MAAM,CAAC,UAACC,GAAU,EAAEC,IAAI,EAAEC,KAAK,EAAK;AACxD,IAAA,IAAIA,KAAK,GAAGT,OAAO,KAAK,CAAC,EAAE;AACvBO,MAAAA,GAAG,CAACG,IAAI,CAAC,EAAE,CAAC,CAAA;AAChB,KAAA;IAEAH,GAAG,CAACA,GAAG,CAAClF,MAAM,GAAG,CAAC,CAAC,CAACqF,IAAI,CAACF,IAAI,CAAC,CAAA;IAE9B,IAAIA,IAAI,CAAC5B,UAAU,EAAE;MACjBwB,QAAQ,GAAG,CAACG,GAAG,CAAClF,MAAM,GAAG,CAAC,EAAEoF,KAAK,GAAGT,OAAO,CAAC,CAAA;AAChD,KAAA;AAEA,IAAA,OAAOO,GAAG,CAAA;GACb,EAAE,EAAE,CAAC,CAAA;AAEN,EAAA,OAAO,CAACF,MAAM,EAAED,QAAQ,CAAC,CAAA;AAC7B,EAAC;IAEYO,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,IAAuB,EAAK;AACxD,EAAA,QAAQA,IAAI;AACR,IAAA,KAAK,QAAQ;AACT,MAAA,OAAO,KAAK,CAAA;AAChB,IAAA,KAAK,OAAO;AACR,MAAA,OAAO,QAAQ,CAAA;AACnB,IAAA;AACI,MAAA,OAAO,OAAO,CAAA;AACtB,GAAA;AACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/Calendar/utils/index.ts"],"sourcesContent":["import type { CalendarStateType } from '../store/types';\nimport type { CalendarValueType, DateObject, DisabledDay, ItemProps } from '../Calendar.types';\n\nexport const ROW_STEP = 6;\n\nexport const YEAR_RENDER_COUNT = 12;\n\nexport const SHORT_DAY_NAMES = ['Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб', 'Вс'] as const;\n\nexport const FULL_DAY_NAMES: Record<typeof SHORT_DAY_NAMES[number], string> = {\n Пн: 'Понедельник',\n Вт: 'Вторник',\n Ср: 'Среда',\n Чт: 'Четверг',\n Пт: 'Пятница',\n Сб: 'Суббота',\n Вс: 'Воскресенье',\n};\n\nexport const SHORT_MONTH_NAME = ['Янв', 'Фев', 'Март', 'Апр', 'Май', 'Июнь', 'Июль', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек'];\n\nexport const MONTH_NAMES = [\n 'Январь',\n 'Февраль',\n 'Март',\n 'Апрель',\n 'Май',\n 'Июнь',\n 'Июль',\n 'Август',\n 'Сентябрь',\n 'Октябрь',\n 'Ноябрь',\n 'Декабрь',\n];\n\nexport const getDaysInMonth = (monthIndex: number, year: number) => new Date(year, monthIndex + 1, 0).getDate();\n\nexport const getOffsetDayInWeek = (monthIndex: number, year: number) => (new Date(year, monthIndex).getDay() || 7) - 1;\n\nexport const getStartYear = (year: number) => Math.trunc((year - 1) * 0.1) * 10 - 1;\n\nexport const getNextDate = (currentYear: number, currentMonth: number) =>\n currentMonth + 1 === MONTH_NAMES.length ? [currentYear + 1, 0] : [currentYear, currentMonth + 1];\n\nexport const getPrevDate = (currentYear: number, currentMonth: number) =>\n currentMonth - 1 < 0 ? [currentYear - 1, 11] : [currentYear, currentMonth - 1];\n\nexport const getDateFromValue = (date: Date | undefined): DateObject => {\n const state = date || new Date();\n\n return {\n day: date !== undefined ? state.getDate() : 0,\n monthIndex: state.getMonth(),\n year: state.getFullYear(),\n };\n};\n\nexport const getDateFromNow = (): DateObject => {\n const nowDate = new Date();\n\n return {\n day: nowDate.getDate(),\n monthIndex: nowDate.getMonth(),\n year: nowDate.getFullYear(),\n };\n};\n\nexport const IsCurrentDay = (date: DateObject, currentDay: number) => {\n const { day, monthIndex: currentMonthIndex, year: currentYear } = getDateFromNow();\n return day === currentDay && date.monthIndex === currentMonthIndex && date.year === currentYear;\n};\n\nexport const isSelectedDay = (date: DateObject, currentDay: number, value?: Date) => {\n if (!value) {\n return false;\n }\n\n const { day, monthIndex, year } = getDateFromValue(value);\n return day === currentDay && date.monthIndex === monthIndex && date.year === year;\n};\n\nexport const isCurrentMonth = (date: DateObject, monthIndex: number) => {\n const { monthIndex: currentMonthIndex, year: currentYear } = getDateFromNow();\n return monthIndex === currentMonthIndex && date.year === currentYear;\n};\n\nexport const isSelectedMonth = (date: DateObject, monthIndex: number) => date.monthIndex === monthIndex;\n\nexport const isCurrentYear = (year: number) => {\n const { year: currentYear } = getDateFromNow();\n return year === currentYear;\n};\n\nexport const isSelectedYear = (date: DateObject, year: number) => date.year === year;\n\nexport const getSortedValues = (values: [Date | undefined, (Date | undefined)?]) =>\n values.sort((start, end) => {\n if (!start || !end) {\n return -1;\n }\n\n return start.getTime() - end.getTime();\n });\n\nexport const isDayInRange = (\n year: number,\n monthIndex: number,\n currentDay: number,\n values: [Date | undefined, Date?],\n) => {\n const [startValue, endValue] = getSortedValues(values);\n\n if (!endValue || !startValue) {\n return false;\n }\n\n const day = new Date(year, monthIndex, currentDay);\n return startValue < day && day <= endValue;\n};\n\nexport const isSameDay = (firstDate: DateObject, secondDate?: DateObject) =>\n secondDate &&\n firstDate.day === secondDate.day &&\n firstDate.monthIndex === secondDate.monthIndex &&\n firstDate.year === secondDate.year;\n\nexport const isValueUpdate = (value: Date | [Date?, Date?], prevValue: Date | [Date?, Date?]) => {\n if (!Array.isArray(value) && !Array.isArray(prevValue)) {\n return prevValue?.getTime() !== value?.getTime();\n }\n\n if (Array.isArray(value) && Array.isArray(prevValue)) {\n return prevValue[0]?.getTime() !== value[0]?.getTime() || prevValue[1]?.getTime() !== value[1]?.getTime();\n }\n\n return false;\n};\n\n/**\n * Метод проверяет, находится ли календарь в режиме выбора второго значения.\n */\nexport const isSelectProcess = (array: unknown | unknown[]): array is [Date, Date?] =>\n Array.isArray(array) && !array[1];\n\n/**\n * Метод возвращает сторону, когда выбор второго значения диапазона завершён.\n */\nexport const getSideForSelected = (date: DateObject, startValue: Date, endValue: Date) => {\n const currentDateTime = new Date(date.year, date.monthIndex, date.day).getTime();\n const startValueTime = startValue.getTime();\n const endValueTime = endValue.getTime();\n\n if (currentDateTime === startValueTime) {\n return 'right';\n }\n\n if (currentDateTime === endValueTime) {\n return 'left';\n }\n\n return undefined;\n};\n\n/**\n * Метод возвращает сторону, во время выбора второго значения диапазона.\n */\nexport const getSideForHovered = (date: DateObject, hoveredDay: DateObject, startValue: Date, isSelected?: boolean) => {\n const dateHover = new Date(hoveredDay.year, hoveredDay.monthIndex, hoveredDay.day);\n const isHovered = isSameDay(date, hoveredDay);\n\n if ((isSelected && startValue > dateHover) || (isHovered && startValue < dateHover)) {\n return 'left';\n }\n\n if ((isSelected && startValue < dateHover) || (isHovered && startValue > dateHover)) {\n return 'right';\n }\n\n return undefined;\n};\n\n/**\n * Метод возвращает сторону, с которой нужно отрисовать направление полоски диапазона.\n */\nexport const getSideInRange = (\n value: CalendarValueType,\n date: DateObject,\n hoveredDay?: DateObject,\n isSelected?: boolean,\n) => {\n if (!Array.isArray(value)) {\n return undefined;\n }\n\n const [startValue, endValue] = value;\n\n if (startValue && isSelected && endValue) {\n return getSideForSelected(date, startValue, endValue);\n }\n\n if (startValue && hoveredDay) {\n return getSideForHovered(date, hoveredDay, startValue, isSelected);\n }\n\n return undefined;\n};\n\n/**\n * Метод проверяет, находится ли выбранный день в диапазоне.\n */\nexport const getInRange = (value: CalendarValueType, date: DateObject, hoveredDay?: DateObject, inRange?: boolean) => {\n if (!isSelectProcess(value) || !hoveredDay) {\n return inRange;\n }\n\n const dateSelected = value[0];\n const dateHover = new Date(hoveredDay.year, hoveredDay.monthIndex, hoveredDay.day);\n const dateCurrent = new Date(date.year, date.monthIndex, date.day);\n\n if (\n (dateSelected < dateCurrent && dateCurrent < dateHover) ||\n (dateSelected > dateCurrent && dateCurrent > dateHover)\n ) {\n return true;\n }\n\n return inRange;\n};\n\n/**\n * Метод проверяет, можно ли выбрать день.\n */\nexport const canSelectDate = (\n { year, monthIndex, day }: DateObject,\n value: CalendarValueType,\n disabledList?: DisabledDay[],\n) => {\n if (!isSelectProcess(value)) {\n return true;\n }\n\n const hoverDate = new Date(year, monthIndex, day);\n const [startDate] = value;\n\n if (!disabledList?.length) {\n return true;\n }\n\n const offDisabledRange = disabledList.some(\n ({ date }) => (startDate < date && date < hoverDate) || (startDate > date && date > hoverDate),\n );\n\n return !offDisabledRange;\n};\n\n/**\n * Метод для получения двумерного массива и возвращения выбранного элемента.\n */\nexport const getMatrix = <T extends ItemProps>(items: T[], rowSize = 7): readonly [T[][], number[] | undefined] => {\n const newItems = [...items];\n\n let selected: [number, number] | undefined;\n\n const result = newItems.reduce((acc: T[][], item, index) => {\n if (index % rowSize === 0) {\n acc.push([]);\n }\n\n acc[acc.length - 1].push(item);\n\n if (item.isSelected) {\n selected = [acc.length - 1, index % rowSize];\n }\n\n return acc;\n }, []);\n\n return [result, selected] as const;\n};\n\nexport const getCalendarType = (type: CalendarStateType) => {\n switch (type) {\n case 'Months':\n return 'год';\n case 'Years':\n return 'период';\n default:\n return 'месяц';\n }\n};\n"],"names":["ROW_STEP","YEAR_RENDER_COUNT","SHORT_DAY_NAMES","FULL_DAY_NAMES","Пн","Вт","Ср","Чт","Пт","Сб","Вс","SHORT_MONTH_NAME","MONTH_NAMES","getDaysInMonth","monthIndex","year","Date","getDate","getOffsetDayInWeek","getDay","getStartYear","Math","trunc","getNextDate","currentYear","currentMonth","length","getPrevDate","getDateFromValue","date","state","day","undefined","getMonth","getFullYear","getDateFromNow","nowDate","IsCurrentDay","currentDay","_getDateFromNow","currentMonthIndex","isSelectedDay","value","_getDateFromValue","isCurrentMonth","_getDateFromNow2","isSelectedMonth","isCurrentYear","_getDateFromNow3","isSelectedYear","getSortedValues","values","sort","start","end","getTime","isDayInRange","_getSortedValues","_getSortedValues2","_slicedToArray","startValue","endValue","isSameDay","firstDate","secondDate","isValueUpdate","prevValue","Array","isArray","_prevValue$","_value$","_prevValue$2","_value$2","isSelectProcess","array","getSideForSelected","currentDateTime","startValueTime","endValueTime","getSideForHovered","hoveredDay","isSelected","dateHover","isHovered","getSideInRange","_value","getInRange","inRange","dateSelected","dateCurrent","canSelectDate","_ref","disabledList","hoverDate","_value2","startDate","offDisabledRange","some","_ref2","getMatrix","items","rowSize","arguments","newItems","_toConsumableArray","selected","result","reduce","acc","item","index","push","getCalendarType","type"],"mappings":";;;;;;AAGO,IAAMA,QAAQ,GAAG,EAAC;AAElB,IAAMC,iBAAiB,GAAG,GAAE;IAEtBC,eAAe,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAU;AAE3E,IAAMC,cAA8D,GAAG;AAC1EC,EAAAA,EAAE,EAAE,aAAa;AACjBC,EAAAA,EAAE,EAAE,SAAS;AACbC,EAAAA,EAAE,EAAE,OAAO;AACXC,EAAAA,EAAE,EAAE,SAAS;AACbC,EAAAA,EAAE,EAAE,SAAS;AACbC,EAAAA,EAAE,EAAE,SAAS;AACbC,EAAAA,EAAE,EAAE,aAAA;AACR,EAAC;AAEM,IAAMC,gBAAgB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAC;AAEhH,IAAMC,WAAW,GAAG,CACvB,QAAQ,EACR,SAAS,EACT,MAAM,EACN,QAAQ,EACR,KAAK,EACL,MAAM,EACN,MAAM,EACN,QAAQ,EACR,UAAU,EACV,SAAS,EACT,QAAQ,EACR,SAAS,EACZ;AAEM,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,UAAkB,EAAEC,IAAY,EAAA;AAAA,EAAA,OAAK,IAAIC,IAAI,CAACD,IAAI,EAAED,UAAU,GAAG,CAAC,EAAE,CAAC,CAAC,CAACG,OAAO,EAAE,CAAA;AAAA,EAAA;AAExG,IAAMC,k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6 @@ var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelper
|
|
6
6
|
var React = require('react');
|
7
7
|
var plasmaCore = require('@salutejs/plasma-core');
|
8
8
|
var index$1 = require('../../utils/index.js');
|
9
|
-
var index$2 = require('../Dropdown/utils/index.js');
|
10
9
|
var index = require('../Select/utils/index.js');
|
11
10
|
var useKeyNavigation = require('../Select/hooks/useKeyNavigation.js');
|
12
11
|
var useForceUpdate = require('../../hooks/useForceUpdate.js');
|
@@ -21,6 +20,7 @@ require('react-popper');
|
|
21
20
|
require('styled-components');
|
22
21
|
var ComboboxTarget = require('./ui/ComboboxTarget/ComboboxTarget.js');
|
23
22
|
var Combobox_styles = require('./Combobox.styles.js');
|
23
|
+
var getPopoverPlacement = require('../../utils/getPopoverPlacement.js');
|
24
24
|
|
25
25
|
var _excluded = ["name", "form", "readOnly", "disabled", "label", "placeholder", "id", "children", "role", "view", "size", "frame", "usePortal", "negativeResultContent", "enumerationType", "opened", "placement", "onToggle", "onKeyDown", "filterFunction"];
|
26
26
|
/**
|
@@ -222,7 +222,7 @@ var comboboxRoot = function comboboxRoot(Root) {
|
|
222
222
|
,
|
223
223
|
id: innerId,
|
224
224
|
offset: offset,
|
225
|
-
placement:
|
225
|
+
placement: getPopoverPlacement.getPlacements(placement),
|
226
226
|
usePortal: usePortal,
|
227
227
|
selectWidth: dynamicTargetWidth,
|
228
228
|
frame: frame,
|