@salutejs/plasma-new-hope 0.324.0-dev.0 → 0.325.0-canary.1972.15208152297.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/components/Calendar/Calendar.tokens.js +4 -13
- 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 +11 -15
- package/cjs/components/Calendar/CalendarBase/CalendarBase.js +9 -3
- 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_fpdm18.css +2 -0
- package/cjs/components/Calendar/CalendarDouble/CalendarDouble.css +14 -18
- package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +9 -3
- 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/{es/components/Calendar/CalendarDouble/CalendarDouble.styles_e9ada0.css → cjs/components/Calendar/CalendarDouble/CalendarDouble.styles_dt34s7.css} +2 -2
- package/cjs/components/Calendar/hooks/useQuarters.js +1 -1
- package/cjs/components/Calendar/hooks/useQuarters.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.css +6 -7
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +3 -6
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.styles.js +3 -9
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.styles.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.styles_445k2m.css +2 -0
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.css +5 -6
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +2 -3
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js +1 -7
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.styles_3fk0w8.css +1 -0
- package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.css +5 -6
- package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +2 -3
- package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.styles.js +1 -7
- package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.styles.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.styles_g2v0cv.css +1 -0
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.css +5 -6
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +2 -3
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.styles.js +1 -7
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.styles.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.styles_97bjgu.css +1 -0
- package/cjs/components/Calendar/ui/DateStructureItem/DateStructureItem.css +4 -4
- package/cjs/components/Calendar/ui/DateStructureItem/DateStructureItem.styles.js +7 -7
- package/cjs/components/Calendar/ui/DateStructureItem/DateStructureItem.styles.js.map +1 -1
- package/cjs/components/Calendar/ui/DateStructureItem/DateStructureItem.styles_12b03hz.css +4 -0
- package/cjs/components/Calendar/utils/calendarGridHelper.js +10 -2
- package/cjs/components/Calendar/utils/calendarGridHelper.js.map +1 -1
- package/cjs/components/DatePicker/DatePicker.tokens.js +9 -11
- package/cjs/components/DatePicker/DatePicker.tokens.js.map +1 -1
- package/cjs/components/DatePicker/DatePickerBase.styles.js +19 -2
- package/cjs/components/DatePicker/DatePickerBase.styles.js.map +1 -1
- package/cjs/components/DatePicker/DatePickerBase.styles_10sa0ht.css +2 -0
- package/cjs/components/DatePicker/RangeDate/RangeDate.css +21 -25
- package/cjs/components/DatePicker/RangeDate/RangeDate.js +22 -10
- package/cjs/components/DatePicker/RangeDate/RangeDate.js.map +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDate.styles.js +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDate.styles.js.map +1 -1
- package/cjs/components/DatePicker/RangeDate/{RangeDate.styles_vzsqwo.css → RangeDate.styles_1q1mn0z.css} +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +19 -23
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +43 -2
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js.map +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +38 -5
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js.map +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles_1n0dbxm.css +2 -0
- package/cjs/components/DatePicker/SingleDate/SingleDate.css +19 -23
- package/cjs/components/DatePicker/SingleDate/SingleDate.js +31 -7
- package/cjs/components/DatePicker/SingleDate/SingleDate.js.map +1 -1
- package/cjs/components/DatePicker/SingleDate/SingleDate.styles.js +1 -1
- package/cjs/components/DatePicker/SingleDate/SingleDate.styles.js.map +1 -1
- package/cjs/components/DatePicker/SingleDate/{SingleDate.styles_4wd0mq.css → SingleDate.styles_7r4r8k.css} +1 -1
- package/cjs/index.css +24 -28
- package/emotion/cjs/components/Calendar/Calendar.tokens.js +4 -13
- package/emotion/cjs/components/Calendar/CalendarBase/CalendarBase.js +12 -3
- package/emotion/cjs/components/Calendar/CalendarBase/CalendarBase.styles.js +2 -2
- package/emotion/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +12 -3
- package/emotion/cjs/components/Calendar/CalendarDouble/CalendarDouble.styles.js +7 -7
- package/emotion/cjs/components/Calendar/hooks/useQuarters.js +1 -1
- package/emotion/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +3 -6
- package/emotion/cjs/components/Calendar/ui/CalendarDays/CalendarDays.styles.js +3 -8
- package/emotion/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +2 -3
- package/emotion/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js +3 -8
- package/emotion/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +2 -3
- package/emotion/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.styles.js +3 -8
- package/emotion/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +2 -3
- package/emotion/cjs/components/Calendar/ui/CalendarYears/CalendarYears.styles.js +3 -8
- package/emotion/cjs/components/Calendar/ui/DateStructureItem/DateStructureItem.styles.js +7 -7
- package/emotion/cjs/components/Calendar/utils/calendarGridHelper.js +10 -3
- package/emotion/cjs/components/DatePicker/DatePicker.tokens.js +9 -12
- package/emotion/cjs/components/DatePicker/DatePickerBase.styles.js +9 -3
- package/emotion/cjs/components/DatePicker/RangeDate/RangeDate.js +25 -9
- package/emotion/cjs/components/DatePicker/RangeDate/RangeDate.styles.js +4 -13
- package/emotion/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +47 -3
- package/emotion/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +14 -2
- package/emotion/cjs/components/DatePicker/SingleDate/SingleDate.js +33 -6
- package/emotion/cjs/components/DatePicker/SingleDate/SingleDate.styles.js +4 -4
- package/emotion/cjs/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +37 -29
- package/emotion/cjs/examples/plasma_b2c/components/Calendar/CalendarBase.config.js +5 -5
- package/emotion/cjs/examples/plasma_b2c/components/Calendar/CalendarDouble.config.js +5 -5
- package/emotion/cjs/examples/plasma_b2c/components/DatePicker/DatePicker.config.js +7 -7
- package/emotion/cjs/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +6 -0
- package/emotion/cjs/examples/plasma_web/components/Calendar/Calendar.stories.tsx +37 -29
- package/emotion/cjs/examples/plasma_web/components/Calendar/CalendarBase.config.js +5 -5
- package/emotion/cjs/examples/plasma_web/components/Calendar/CalendarDouble.config.js +5 -5
- package/emotion/cjs/examples/plasma_web/components/DatePicker/DatePicker.config.js +7 -7
- package/emotion/cjs/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +8 -6
- package/emotion/es/components/Calendar/Calendar.tokens.js +4 -13
- package/emotion/es/components/Calendar/CalendarBase/CalendarBase.js +12 -3
- package/emotion/es/components/Calendar/CalendarBase/CalendarBase.styles.js +3 -3
- package/emotion/es/components/Calendar/CalendarDouble/CalendarDouble.js +12 -3
- package/emotion/es/components/Calendar/CalendarDouble/CalendarDouble.styles.js +8 -8
- package/emotion/es/components/Calendar/hooks/useQuarters.js +1 -1
- package/emotion/es/components/Calendar/ui/CalendarDays/CalendarDays.js +5 -8
- package/emotion/es/components/Calendar/ui/CalendarDays/CalendarDays.styles.js +2 -7
- package/emotion/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +4 -5
- package/emotion/es/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js +2 -7
- package/emotion/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +4 -5
- package/emotion/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.styles.js +2 -7
- package/emotion/es/components/Calendar/ui/CalendarYears/CalendarYears.js +4 -5
- package/emotion/es/components/Calendar/ui/CalendarYears/CalendarYears.styles.js +2 -7
- package/emotion/es/components/Calendar/ui/DateStructureItem/DateStructureItem.styles.js +7 -7
- package/emotion/es/components/Calendar/utils/calendarGridHelper.js +9 -2
- package/emotion/es/components/DatePicker/DatePicker.tokens.js +8 -11
- package/emotion/es/components/DatePicker/DatePickerBase.styles.js +9 -3
- package/emotion/es/components/DatePicker/RangeDate/RangeDate.js +26 -10
- package/emotion/es/components/DatePicker/RangeDate/RangeDate.styles.js +5 -14
- package/emotion/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +46 -4
- package/emotion/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +15 -3
- package/emotion/es/components/DatePicker/SingleDate/SingleDate.js +34 -7
- package/emotion/es/components/DatePicker/SingleDate/SingleDate.styles.js +4 -4
- package/emotion/es/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +37 -29
- package/emotion/es/examples/plasma_b2c/components/Calendar/CalendarBase.config.js +5 -5
- package/emotion/es/examples/plasma_b2c/components/Calendar/CalendarDouble.config.js +5 -5
- package/emotion/es/examples/plasma_b2c/components/DatePicker/DatePicker.config.js +7 -7
- package/emotion/es/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +6 -0
- package/emotion/es/examples/plasma_web/components/Calendar/Calendar.stories.tsx +37 -29
- package/emotion/es/examples/plasma_web/components/Calendar/CalendarBase.config.js +5 -5
- package/emotion/es/examples/plasma_web/components/Calendar/CalendarDouble.config.js +5 -5
- package/emotion/es/examples/plasma_web/components/DatePicker/DatePicker.config.js +7 -7
- package/emotion/es/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +8 -6
- package/es/components/Calendar/Calendar.tokens.js +4 -13
- 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 +11 -15
- package/es/components/Calendar/CalendarBase/CalendarBase.js +9 -4
- 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_fpdm18.css +2 -0
- package/es/components/Calendar/CalendarDouble/CalendarDouble.css +14 -18
- package/es/components/Calendar/CalendarDouble/CalendarDouble.js +10 -5
- 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/{cjs/components/Calendar/CalendarDouble/CalendarDouble.styles_e9ada0.css → es/components/Calendar/CalendarDouble/CalendarDouble.styles_dt34s7.css} +2 -2
- package/es/components/Calendar/hooks/useQuarters.js +2 -2
- package/es/components/Calendar/hooks/useQuarters.js.map +1 -1
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.css +6 -7
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.js +5 -8
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.js.map +1 -1
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.styles.js +4 -9
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.styles.js.map +1 -1
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.styles_445k2m.css +2 -0
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.css +5 -6
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +4 -5
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js +2 -7
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js.map +1 -1
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.styles_3fk0w8.css +1 -0
- package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.css +5 -6
- package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +4 -5
- package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js.map +1 -1
- package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.styles.js +2 -7
- package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.styles.js.map +1 -1
- package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.styles_g2v0cv.css +1 -0
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.css +5 -6
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.js +4 -5
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.styles.js +2 -7
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.styles.js.map +1 -1
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.styles_97bjgu.css +1 -0
- package/es/components/Calendar/ui/DateStructureItem/DateStructureItem.css +4 -4
- package/es/components/Calendar/ui/DateStructureItem/DateStructureItem.styles.js +7 -7
- package/es/components/Calendar/ui/DateStructureItem/DateStructureItem.styles.js.map +1 -1
- package/es/components/Calendar/ui/DateStructureItem/DateStructureItem.styles_12b03hz.css +4 -0
- package/es/components/Calendar/utils/calendarGridHelper.js +10 -3
- package/es/components/Calendar/utils/calendarGridHelper.js.map +1 -1
- package/es/components/DatePicker/DatePicker.tokens.js +9 -12
- package/es/components/DatePicker/DatePicker.tokens.js.map +1 -1
- package/es/components/DatePicker/DatePickerBase.styles.js +19 -2
- package/es/components/DatePicker/DatePickerBase.styles.js.map +1 -1
- package/es/components/DatePicker/DatePickerBase.styles_10sa0ht.css +2 -0
- package/es/components/DatePicker/RangeDate/RangeDate.css +21 -25
- package/es/components/DatePicker/RangeDate/RangeDate.js +22 -11
- package/es/components/DatePicker/RangeDate/RangeDate.js.map +1 -1
- package/es/components/DatePicker/RangeDate/RangeDate.styles.js +1 -1
- package/es/components/DatePicker/RangeDate/RangeDate.styles.js.map +1 -1
- package/es/components/DatePicker/RangeDate/{RangeDate.styles_vzsqwo.css → RangeDate.styles_1q1mn0z.css} +1 -1
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +19 -23
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +43 -3
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js.map +1 -1
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +38 -5
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js.map +1 -1
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles_1n0dbxm.css +2 -0
- package/es/components/DatePicker/SingleDate/SingleDate.css +19 -23
- package/es/components/DatePicker/SingleDate/SingleDate.js +31 -8
- package/es/components/DatePicker/SingleDate/SingleDate.js.map +1 -1
- package/es/components/DatePicker/SingleDate/SingleDate.styles.js +1 -1
- package/es/components/DatePicker/SingleDate/SingleDate.styles.js.map +1 -1
- package/es/components/DatePicker/SingleDate/{SingleDate.styles_4wd0mq.css → SingleDate.styles_7r4r8k.css} +1 -1
- package/es/index.css +24 -28
- package/package.json +2 -2
- package/styled-components/cjs/components/Calendar/Calendar.tokens.js +4 -13
- package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.js +12 -3
- package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.styles.js +1 -1
- package/styled-components/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +12 -3
- package/styled-components/cjs/components/Calendar/CalendarDouble/CalendarDouble.styles.js +2 -2
- package/styled-components/cjs/components/Calendar/hooks/useQuarters.js +1 -1
- package/styled-components/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +3 -6
- package/styled-components/cjs/components/Calendar/ui/CalendarDays/CalendarDays.styles.js +4 -8
- package/styled-components/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +2 -3
- package/styled-components/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js +2 -6
- package/styled-components/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +2 -3
- package/styled-components/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.styles.js +2 -6
- package/styled-components/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +2 -3
- package/styled-components/cjs/components/Calendar/ui/CalendarYears/CalendarYears.styles.js +2 -6
- package/styled-components/cjs/components/Calendar/ui/DateStructureItem/DateStructureItem.styles.js +3 -3
- package/styled-components/cjs/components/Calendar/utils/calendarGridHelper.js +10 -3
- package/styled-components/cjs/components/DatePicker/DatePicker.tokens.js +9 -12
- package/styled-components/cjs/components/DatePicker/DatePickerBase.styles.js +8 -2
- package/styled-components/cjs/components/DatePicker/RangeDate/RangeDate.js +25 -9
- package/styled-components/cjs/components/DatePicker/RangeDate/RangeDate.styles.js +1 -1
- package/styled-components/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +47 -3
- package/styled-components/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +14 -2
- package/styled-components/cjs/components/DatePicker/SingleDate/SingleDate.js +33 -6
- package/styled-components/cjs/components/DatePicker/SingleDate/SingleDate.styles.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +37 -29
- package/styled-components/cjs/examples/plasma_b2c/components/Calendar/CalendarBase.config.js +4 -4
- package/styled-components/cjs/examples/plasma_b2c/components/Calendar/CalendarDouble.config.js +4 -4
- package/styled-components/cjs/examples/plasma_b2c/components/DatePicker/DatePicker.config.js +4 -4
- package/styled-components/cjs/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +6 -0
- package/styled-components/cjs/examples/plasma_web/components/Calendar/Calendar.stories.tsx +37 -29
- package/styled-components/cjs/examples/plasma_web/components/Calendar/CalendarBase.config.js +4 -4
- package/styled-components/cjs/examples/plasma_web/components/Calendar/CalendarDouble.config.js +4 -4
- package/styled-components/cjs/examples/plasma_web/components/DatePicker/DatePicker.config.js +4 -4
- package/styled-components/cjs/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +8 -6
- package/styled-components/es/components/Calendar/Calendar.tokens.js +4 -13
- package/styled-components/es/components/Calendar/CalendarBase/CalendarBase.js +12 -3
- package/styled-components/es/components/Calendar/CalendarBase/CalendarBase.styles.js +2 -2
- package/styled-components/es/components/Calendar/CalendarDouble/CalendarDouble.js +12 -3
- package/styled-components/es/components/Calendar/CalendarDouble/CalendarDouble.styles.js +3 -3
- package/styled-components/es/components/Calendar/hooks/useQuarters.js +1 -1
- package/styled-components/es/components/Calendar/ui/CalendarDays/CalendarDays.js +5 -8
- package/styled-components/es/components/Calendar/ui/CalendarDays/CalendarDays.styles.js +3 -7
- package/styled-components/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +4 -5
- package/styled-components/es/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js +1 -5
- package/styled-components/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +4 -5
- package/styled-components/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.styles.js +1 -5
- package/styled-components/es/components/Calendar/ui/CalendarYears/CalendarYears.js +4 -5
- package/styled-components/es/components/Calendar/ui/CalendarYears/CalendarYears.styles.js +1 -5
- package/styled-components/es/components/Calendar/ui/DateStructureItem/DateStructureItem.styles.js +3 -3
- package/styled-components/es/components/Calendar/utils/calendarGridHelper.js +9 -2
- package/styled-components/es/components/DatePicker/DatePicker.tokens.js +8 -11
- package/styled-components/es/components/DatePicker/DatePickerBase.styles.js +8 -2
- package/styled-components/es/components/DatePicker/RangeDate/RangeDate.js +26 -10
- package/styled-components/es/components/DatePicker/RangeDate/RangeDate.styles.js +2 -2
- package/styled-components/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +46 -4
- package/styled-components/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +15 -3
- package/styled-components/es/components/DatePicker/SingleDate/SingleDate.js +34 -7
- package/styled-components/es/components/DatePicker/SingleDate/SingleDate.styles.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +37 -29
- package/styled-components/es/examples/plasma_b2c/components/Calendar/CalendarBase.config.js +4 -4
- package/styled-components/es/examples/plasma_b2c/components/Calendar/CalendarDouble.config.js +4 -4
- package/styled-components/es/examples/plasma_b2c/components/DatePicker/DatePicker.config.js +4 -4
- package/styled-components/es/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +6 -0
- package/styled-components/es/examples/plasma_web/components/Calendar/Calendar.stories.tsx +37 -29
- package/styled-components/es/examples/plasma_web/components/Calendar/CalendarBase.config.js +4 -4
- package/styled-components/es/examples/plasma_web/components/Calendar/CalendarDouble.config.js +4 -4
- package/styled-components/es/examples/plasma_web/components/DatePicker/DatePicker.config.js +4 -4
- package/styled-components/es/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +8 -6
- package/types/components/Calendar/Calendar.tokens.d.ts +3 -12
- package/types/components/Calendar/Calendar.tokens.d.ts.map +1 -1
- package/types/components/Calendar/Calendar.types.d.ts +4 -0
- package/types/components/Calendar/Calendar.types.d.ts.map +1 -1
- 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.map +1 -1
- package/types/components/Calendar/CalendarDouble/CalendarDouble.styles.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarDays/CalendarDays.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarDays/CalendarDays.styles.d.ts +0 -1
- package/types/components/Calendar/ui/CalendarDays/CalendarDays.styles.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarMonths/CalendarMonths.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.d.ts +0 -1
- package/types/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarQuarters/CalendarQuarters.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarQuarters/CalendarQuarters.styles.d.ts +0 -1
- package/types/components/Calendar/ui/CalendarQuarters/CalendarQuarters.styles.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarYears/CalendarYears.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarYears/CalendarYears.styles.d.ts +0 -1
- package/types/components/Calendar/ui/CalendarYears/CalendarYears.styles.d.ts.map +1 -1
- package/types/components/Calendar/ui/DateStructureItem/DateStructureItem.styles.d.ts.map +1 -1
- package/types/components/Calendar/utils/calendarGridHelper.d.ts +1 -0
- package/types/components/Calendar/utils/calendarGridHelper.d.ts.map +1 -1
- package/types/components/DatePicker/DatePicker.tokens.d.ts +7 -10
- package/types/components/DatePicker/DatePicker.tokens.d.ts.map +1 -1
- package/types/components/DatePicker/DatePickerBase.styles.d.ts +4 -1
- package/types/components/DatePicker/DatePickerBase.styles.d.ts.map +1 -1
- package/types/components/DatePicker/DatePickerBase.types.d.ts +19 -0
- package/types/components/DatePicker/DatePickerBase.types.d.ts.map +1 -1
- package/types/components/DatePicker/RangeDate/RangeDate.d.ts +1 -1
- package/types/components/DatePicker/RangeDate/RangeDate.d.ts.map +1 -1
- package/types/components/DatePicker/RangeDate/RangeDate.styles.d.ts.map +1 -1
- package/types/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.d.ts +1 -1
- package/types/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.d.ts.map +1 -1
- package/types/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.d.ts +16 -3
- package/types/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.d.ts.map +1 -1
- package/types/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.types.d.ts +12 -20
- package/types/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.types.d.ts.map +1 -1
- package/types/components/DatePicker/SingleDate/SingleDate.d.ts +1 -1
- package/types/components/DatePicker/SingleDate/SingleDate.d.ts.map +1 -1
- package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts.map +1 -1
- package/cjs/components/Calendar/CalendarBase/CalendarBase.styles_zk3a46.css +0 -2
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.styles_1oq8sud.css +0 -3
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.styles_1v3msg.css +0 -2
- package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.styles_14gqhct.css +0 -2
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.styles_1d4ov6t.css +0 -2
- package/cjs/components/Calendar/ui/DateStructureItem/DateStructureItem.styles_1hkk03u.css +0 -4
- package/cjs/components/DatePicker/DatePickerBase.styles_1a5ddg3.css +0 -2
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles_1fhuiqs.css +0 -2
- package/es/components/Calendar/CalendarBase/CalendarBase.styles_zk3a46.css +0 -2
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.styles_1oq8sud.css +0 -3
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.styles_1v3msg.css +0 -2
- package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.styles_14gqhct.css +0 -2
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.styles_1d4ov6t.css +0 -2
- package/es/components/Calendar/ui/DateStructureItem/DateStructureItem.styles_1hkk03u.css +0 -4
- package/es/components/DatePicker/DatePickerBase.styles_1a5ddg3.css +0 -2
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles_1fhuiqs.css +0 -2
@@ -175,6 +175,9 @@ export const Default: StoryObj<StoryPropsDefault> = {
|
|
175
175
|
valueSuccess: false,
|
176
176
|
lang: 'ru',
|
177
177
|
format: 'DD.MM.YYYY',
|
178
|
+
calendarContainerWidth: 0,
|
179
|
+
calendarContainerHeight: 0,
|
180
|
+
stretched: false,
|
178
181
|
},
|
179
182
|
render: (args) => <StoryDefault {...args} />,
|
180
183
|
};
|
@@ -260,12 +263,8 @@ const StoryRange = ({
|
|
260
263
|
showDefaultTextBefore ? secondTextfieldTextBefore || 'ПО' : secondTextfieldTextBefore
|
261
264
|
}
|
262
265
|
onToggle={(is) => setIsOpen(is)}
|
263
|
-
onChangeFirstValue={
|
264
|
-
|
265
|
-
}}
|
266
|
-
onChangeSecondValue={(e, currentValue) => {
|
267
|
-
onChangeSecondValue(e, currentValue);
|
268
|
-
}}
|
266
|
+
onChangeFirstValue={onChangeFirstValue}
|
267
|
+
onChangeSecondValue={onChangeSecondValue}
|
269
268
|
lang={lang}
|
270
269
|
min={min}
|
271
270
|
max={max}
|
@@ -301,6 +300,9 @@ export const Range: StoryObj<StoryPropsRange> = {
|
|
301
300
|
secondTextfieldTextAfter: '',
|
302
301
|
size: 'l',
|
303
302
|
view: 'default',
|
303
|
+
calendarContainerWidth: 0,
|
304
|
+
calendarContainerHeight: 0,
|
305
|
+
stretched: false,
|
304
306
|
isDoubleCalendar: false,
|
305
307
|
closeAfterDateSelect: true,
|
306
308
|
dividerVariant: 'dash',
|
@@ -13,7 +13,8 @@ export var classes = {
|
|
13
13
|
hoveredItem: 'item-hovered',
|
14
14
|
doubleHeaderDate: 'double-header-date',
|
15
15
|
doubleHeaderLastDateWrapper: 'double-header--last-date-wrapper',
|
16
|
-
disabledPrevButton: 'disabled-prev-button'
|
16
|
+
disabledPrevButton: 'disabled-prev-button',
|
17
|
+
stretched: 'plasma-calendar-stretched'
|
17
18
|
};
|
18
19
|
export var innerTokens = {
|
19
20
|
dateStructureFontFamily: '--plasma-calendar-date-structure-font-family',
|
@@ -23,20 +24,16 @@ export var innerTokens = {
|
|
23
24
|
dateStructureFontLetterSpacing: '--plasma-calendar-date-structure-font-letter-spacing',
|
24
25
|
dateStructureFontLineHeight: '--plasma-calendar-date-structure-line-height',
|
25
26
|
dateStructureSelectedFontWeight: '--plasma-calendar-date-structure-selected-font-weight',
|
26
|
-
dateStructureWidth: '--plasma-calendar-date-structure-width',
|
27
|
-
dateStructureHeight: '--plasma-calendar-date-structure-height',
|
28
27
|
dateStructureBorderRadius: '--plasma-calendar-date-structure-border-radius'
|
29
28
|
};
|
30
29
|
export var tokens = {
|
31
|
-
|
32
|
-
|
30
|
+
calendarContainerWidth: '--plasma-calendar-container-width',
|
31
|
+
calendarContainerHeight: '--plasma-calendar-container-height',
|
33
32
|
calendarBorderWidth: '--plasma-calendar-border-width',
|
34
33
|
calendarBorderColor: '--plasma-calendar-border-color',
|
35
34
|
/* Токены размера сетки лет */
|
36
35
|
calendarYearsPadding: '--plasma-calendar-years-padding',
|
37
36
|
calendarYearItemBorderRadius: '--plasma-calendar-year-item-border-radius',
|
38
|
-
calendarYearItemWidth: '--plasma-calendar-year-item-width',
|
39
|
-
calendarYearItemHeight: '--plasma-calendar-year-item-height',
|
40
37
|
calendarYearFontFamily: '--plasma-calendar-year-font-family',
|
41
38
|
calendarYearFontSize: '--plasma-calendar-year-font-size',
|
42
39
|
calendarYearFontStyle: '--plasma-calendar-year-font-style',
|
@@ -47,8 +44,6 @@ export var tokens = {
|
|
47
44
|
/* Токены размера сетки дней */
|
48
45
|
calendarQuartersPadding: '--plasma-calendar-quarters-padding',
|
49
46
|
calendarQuarterItemBorderRadius: '--plasma-calendar-quarter-item-border-radius',
|
50
|
-
calendarQuarterItemWidth: '--plasma-calendar-quarter-item-width',
|
51
|
-
calendarQuarterItemHeight: '--plasma-calendar-quarter-item-height',
|
52
47
|
calendarQuarterFontFamily: '--plasma-calendar-quarter-font-family',
|
53
48
|
calendarQuarterFontSize: '--plasma-calendar-quarter-font-size',
|
54
49
|
calendarQuarterFontStyle: '--plasma-calendar-quarter-font-style',
|
@@ -59,8 +54,6 @@ export var tokens = {
|
|
59
54
|
/* Токены размера сетки месяцев */
|
60
55
|
calendarMonthsPadding: '--plasma-calendar-months-padding',
|
61
56
|
calendarMonthItemBorderRadius: '--plasma-calendar-month-item-border-radius',
|
62
|
-
calendarMonthItemWidth: '--plasma-calendar-month-item-width',
|
63
|
-
calendarMonthItemHeight: '--plasma-calendar-month-item-height',
|
64
57
|
calendarMonthFontFamily: '--plasma-calendar-month-font-family',
|
65
58
|
calendarMonthFontSize: '--plasma-calendar-month-font-size',
|
66
59
|
calendarMonthFontStyle: '--plasma-calendar-month-font-style',
|
@@ -71,8 +64,6 @@ export var tokens = {
|
|
71
64
|
/* Токены размера сетки дней */
|
72
65
|
calendarDaysPadding: '--plasma-calendar-days-padding',
|
73
66
|
calendarDayItemBorderRadius: '--plasma-calendar-day-item-border-radius',
|
74
|
-
calendarDayItemWidth: '--plasma-calendar-day-item-width',
|
75
|
-
calendarDayItemHeight: '--plasma-calendar-day-item-height',
|
76
67
|
calendarDayFontFamily: '--plasma-calendar-day-font-family',
|
77
68
|
calendarDayFontSize: '--plasma-calendar-day-font-size',
|
78
69
|
calendarDayFontStyle: '--plasma-calendar-day-font-style',
|
@@ -1,5 +1,9 @@
|
|
1
|
-
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
|
+
var _excluded = ["className", "value", "min", "max", "renderFromDate", "includeEdgeDates", "type", "eventList", "disabledList", "eventMonthList", "disabledMonthList", "eventQuarterList", "disabledQuarterList", "eventYearList", "disabledYearList", "locale", "stretched", "onChangeValue"];
|
2
3
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
3
7
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
4
8
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
5
9
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
@@ -9,11 +13,13 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
9
13
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
10
14
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
11
15
|
import React, { useCallback, useMemo, useReducer, useState, forwardRef, useEffect } from 'react';
|
16
|
+
import cls from 'classnames';
|
12
17
|
import { getInitialState, reducer, sizeMap } from "../store/reducer";
|
13
18
|
import { ActionType, CalendarState } from "../store/types";
|
14
19
|
import { I18N, isValueUpdate } from "../utils";
|
15
20
|
import { useKeyNavigation, useCalendarNavigation, useCalendarDateChange } from "../hooks";
|
16
21
|
import { CalendarDays, CalendarHeader, CalendarMonths, CalendarQuarters, CalendarYears } from "../ui";
|
22
|
+
import { classes } from "../Calendar.tokens";
|
17
23
|
import { base as viewCSS } from "./variations/_view/base";
|
18
24
|
import { base as sizeCSS } from "./variations/_size/base";
|
19
25
|
import { IsOutOfRange, StyledCalendar } from "./CalendarBase.styles";
|
@@ -22,7 +28,8 @@ import { IsOutOfRange, StyledCalendar } from "./CalendarBase.styles";
|
|
22
28
|
*/
|
23
29
|
export var calendarBaseRoot = function calendarBaseRoot(Root) {
|
24
30
|
return /*#__PURE__*/forwardRef(function (_ref, outerRootRef) {
|
25
|
-
var
|
31
|
+
var className = _ref.className,
|
32
|
+
externalValue = _ref.value,
|
26
33
|
minDate = _ref.min,
|
27
34
|
maxDate = _ref.max,
|
28
35
|
renderFromDate = _ref.renderFromDate,
|
@@ -37,9 +44,10 @@ export var calendarBaseRoot = function calendarBaseRoot(Root) {
|
|
37
44
|
disabledQuarterList = _ref.disabledQuarterList,
|
38
45
|
eventYearList = _ref.eventYearList,
|
39
46
|
disabledYearList = _ref.disabledYearList,
|
40
|
-
onChangeValue = _ref.onChangeValue,
|
41
47
|
_ref$locale = _ref.locale,
|
42
48
|
locale = _ref$locale === void 0 ? 'ru' : _ref$locale,
|
49
|
+
stretched = _ref.stretched,
|
50
|
+
onChangeValue = _ref.onChangeValue,
|
43
51
|
rest = _objectWithoutProperties(_ref, _excluded);
|
44
52
|
var _useMemo = useMemo(function () {
|
45
53
|
return Array.isArray(externalValue) ? externalValue : [externalValue];
|
@@ -148,6 +156,7 @@ export var calendarBaseRoot = function calendarBaseRoot(Root) {
|
|
148
156
|
}, [value]);
|
149
157
|
return /*#__PURE__*/React.createElement(Root, _extends({
|
150
158
|
ref: outerRootRef,
|
159
|
+
className: cls(className, _defineProperty({}, classes.stretched, stretched)),
|
151
160
|
"aria-label": I18N.selectDate[locale]
|
152
161
|
}, rest), isOutOfRange && /*#__PURE__*/React.createElement(IsOutOfRange, {
|
153
162
|
key: outOfRangeKey,
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import _styled from "@emotion/styled/base";
|
2
2
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
3
3
|
import { css } from '@emotion/react';
|
4
|
-
import { tokens } from "../Calendar.tokens";
|
5
|
-
export var StyledCalendar = /*#__PURE__*/css("position:relative;user-select:none;z-index:1;width:var(", tokens.
|
4
|
+
import { classes, tokens } from "../Calendar.tokens";
|
5
|
+
export var StyledCalendar = /*#__PURE__*/css("position:relative;user-select:none;z-index:1;width:var(", tokens.calendarContainerWidth, ");height:var(", tokens.calendarContainerHeight, ");border:var(", tokens.calendarBorderWidth, ") solid var(", tokens.calendarBorderColor, ");box-sizing:border-box;display:flex;flex-direction:column;&.", classes.stretched, "{width:100%;height:100%;};label:plasma-new-hope__StyledCalendar;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ2FsZW5kYXIvQ2FsZW5kYXJCYXNlL0NhbGVuZGFyQmFzZS5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS2lDIiwiZmlsZSI6Ii4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ2FsZW5kYXIvQ2FsZW5kYXJCYXNlL0NhbGVuZGFyQmFzZS5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmltcG9ydCB7IGNsYXNzZXMsIHRva2VucyB9IGZyb20gJy4uL0NhbGVuZGFyLnRva2Vucyc7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRDYWxlbmRhciA9IGNzc2BcbiAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgdXNlci1zZWxlY3Q6IG5vbmU7XG4gICAgei1pbmRleDogMTtcblxuICAgIHdpZHRoOiB2YXIoJHt0b2tlbnMuY2FsZW5kYXJDb250YWluZXJXaWR0aH0pO1xuICAgIGhlaWdodDogdmFyKCR7dG9rZW5zLmNhbGVuZGFyQ29udGFpbmVySGVpZ2h0fSk7XG4gICAgYm9yZGVyOiB2YXIoJHt0b2tlbnMuY2FsZW5kYXJCb3JkZXJXaWR0aH0pIHNvbGlkIHZhcigke3Rva2Vucy5jYWxlbmRhckJvcmRlckNvbG9yfSk7XG4gICAgYm94LXNpemluZzogYm9yZGVyLWJveDtcbiAgICBkaXNwbGF5OiBmbGV4O1xuICAgIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47XG5cbiAgICAmLiR7Y2xhc3Nlcy5zdHJldGNoZWR9IHtcbiAgICAgICAgd2lkdGg6IDEwMCU7XG4gICAgICAgIGhlaWdodDogMTAwJTtcbiAgICB9XG5gO1xuXG5leHBvcnQgY29uc3QgSXNPdXRPZlJhbmdlID0gc3R5bGVkLmRpdmBcbiAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgcGFkZGluZzogMDtcbiAgICBtYXJnaW46IDA7XG4gICAgaGVpZ2h0OiAwO1xuICAgIHdpZHRoOiAwO1xuICAgIGJvcmRlcjogMDtcbiAgICBvdmVyZmxvdzogaGlkZGVuO1xuICAgIGNsaXA6IHJlY3QoMCAwIDAgMCk7XG5gO1xuIl19 */"));
|
6
6
|
export var IsOutOfRange = /*#__PURE__*/_styled("div", {
|
7
7
|
target: "ejb438m0",
|
8
8
|
label: "plasma-new-hope__IsOutOfRange"
|
@@ -12,6 +12,6 @@ export var IsOutOfRange = /*#__PURE__*/_styled("div", {
|
|
12
12
|
} : {
|
13
13
|
name: "27ncmn",
|
14
14
|
styles: "position:absolute;padding:0;margin:0;height:0;width:0;border:0;overflow:hidden;clip:rect(0 0 0 0)",
|
15
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
15
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ2FsZW5kYXIvQ2FsZW5kYXJCYXNlL0NhbGVuZGFyQmFzZS5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBdUJzQyIsImZpbGUiOiIuLi8uLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL0NhbGVuZGFyL0NhbGVuZGFyQmFzZS9DYWxlbmRhckJhc2Uuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5pbXBvcnQgeyBjbGFzc2VzLCB0b2tlbnMgfSBmcm9tICcuLi9DYWxlbmRhci50b2tlbnMnO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkQ2FsZW5kYXIgPSBjc3NgXG4gICAgcG9zaXRpb246IHJlbGF0aXZlO1xuICAgIHVzZXItc2VsZWN0OiBub25lO1xuICAgIHotaW5kZXg6IDE7XG5cbiAgICB3aWR0aDogdmFyKCR7dG9rZW5zLmNhbGVuZGFyQ29udGFpbmVyV2lkdGh9KTtcbiAgICBoZWlnaHQ6IHZhcigke3Rva2Vucy5jYWxlbmRhckNvbnRhaW5lckhlaWdodH0pO1xuICAgIGJvcmRlcjogdmFyKCR7dG9rZW5zLmNhbGVuZGFyQm9yZGVyV2lkdGh9KSBzb2xpZCB2YXIoJHt0b2tlbnMuY2FsZW5kYXJCb3JkZXJDb2xvcn0pO1xuICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG4gICAgZGlzcGxheTogZmxleDtcbiAgICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuXG4gICAgJi4ke2NsYXNzZXMuc3RyZXRjaGVkfSB7XG4gICAgICAgIHdpZHRoOiAxMDAlO1xuICAgICAgICBoZWlnaHQ6IDEwMCU7XG4gICAgfVxuYDtcblxuZXhwb3J0IGNvbnN0IElzT3V0T2ZSYW5nZSA9IHN0eWxlZC5kaXZgXG4gICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgIHBhZGRpbmc6IDA7XG4gICAgbWFyZ2luOiAwO1xuICAgIGhlaWdodDogMDtcbiAgICB3aWR0aDogMDtcbiAgICBib3JkZXI6IDA7XG4gICAgb3ZlcmZsb3c6IGhpZGRlbjtcbiAgICBjbGlwOiByZWN0KDAgMCAwIDApO1xuYDtcbiJdfQ== */",
|
16
16
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
17
17
|
});
|
@@ -1,6 +1,10 @@
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
1
2
|
var _StyledSeparator, _StyledSeparator2, _StyledSeparator3, _StyledSeparator4;
|
2
|
-
var _excluded = ["value", "min", "max", "renderFromDate", "includeEdgeDates", "type", "eventList", "disabledList", "eventMonthList", "disabledMonthList", "eventQuarterList", "disabledQuarterList", "eventYearList", "disabledYearList", "
|
3
|
+
var _excluded = ["className", "value", "min", "max", "renderFromDate", "includeEdgeDates", "type", "eventList", "disabledList", "eventMonthList", "disabledMonthList", "eventQuarterList", "disabledQuarterList", "eventYearList", "disabledYearList", "locale", "stretched", "onChangeValue"];
|
3
4
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
5
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
4
8
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
5
9
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
6
10
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
@@ -10,12 +14,14 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
10
14
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
11
15
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
12
16
|
import React, { useState, useCallback, useMemo, forwardRef, useEffect, useReducer } from 'react';
|
17
|
+
import cls from 'classnames';
|
13
18
|
import { YEAR_RENDER_COUNT, getNextDate, isValueUpdate, I18N } from "../utils";
|
14
19
|
import { useKeyNavigation, useCalendarNavigation, useCalendarDateChange } from "../hooks";
|
15
20
|
import { CalendarDays, CalendarHeader, CalendarMonths, CalendarQuarters, CalendarYears } from "../ui";
|
16
21
|
import { getInitialState, reducer, sizeMap } from "../store/reducer";
|
17
22
|
import { ActionType, CalendarState } from "../store/types";
|
18
23
|
import { IsOutOfRange } from "../CalendarBase/CalendarBase.styles";
|
24
|
+
import { classes } from "../Calendar.tokens";
|
19
25
|
import { base as viewCSS } from "./variations/_view/base";
|
20
26
|
import { StyledCalendar, StyledSeparator, StyledWrapper } from "./CalendarDouble.styles";
|
21
27
|
/**
|
@@ -23,7 +29,8 @@ import { StyledCalendar, StyledSeparator, StyledWrapper } from "./CalendarDouble
|
|
23
29
|
*/
|
24
30
|
export var calendarDoubleRoot = function calendarDoubleRoot(Root) {
|
25
31
|
return /*#__PURE__*/forwardRef(function (_ref, outerRootRef) {
|
26
|
-
var
|
32
|
+
var className = _ref.className,
|
33
|
+
externalValue = _ref.value,
|
27
34
|
minDate = _ref.min,
|
28
35
|
maxDate = _ref.max,
|
29
36
|
renderFromDate = _ref.renderFromDate,
|
@@ -38,9 +45,10 @@ export var calendarDoubleRoot = function calendarDoubleRoot(Root) {
|
|
38
45
|
disabledQuarterList = _ref.disabledQuarterList,
|
39
46
|
eventYearList = _ref.eventYearList,
|
40
47
|
disabledYearList = _ref.disabledYearList,
|
41
|
-
onChangeValue = _ref.onChangeValue,
|
42
48
|
_ref$locale = _ref.locale,
|
43
49
|
locale = _ref$locale === void 0 ? 'ru' : _ref$locale,
|
50
|
+
stretched = _ref.stretched,
|
51
|
+
onChangeValue = _ref.onChangeValue,
|
44
52
|
rest = _objectWithoutProperties(_ref, _excluded);
|
45
53
|
var _useMemo = useMemo(function () {
|
46
54
|
return Array.isArray(externalValue) ? externalValue : [externalValue];
|
@@ -205,6 +213,7 @@ export var calendarDoubleRoot = function calendarDoubleRoot(Root) {
|
|
205
213
|
}, [date, calendarState]);
|
206
214
|
return /*#__PURE__*/React.createElement(Root, _extends({
|
207
215
|
ref: outerRootRef,
|
216
|
+
className: cls(className, _defineProperty({}, classes.stretched, stretched)),
|
208
217
|
"aria-label": I18N.selectDate[locale]
|
209
218
|
}, rest), isOutOfRange && /*#__PURE__*/React.createElement(IsOutOfRange, {
|
210
219
|
key: outOfRangeKey,
|
@@ -1,21 +1,21 @@
|
|
1
1
|
import _styled from "@emotion/styled/base";
|
2
2
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
3
3
|
import { css } from '@emotion/react';
|
4
|
-
import { tokens } from "../Calendar.tokens";
|
5
|
-
export var StyledCalendar = /*#__PURE__*/css("position:relative;user-select:none;z-index:1;display:flex;flex-direction:column;width:var(", tokens.
|
4
|
+
import { classes, tokens } from "../Calendar.tokens";
|
5
|
+
export var StyledCalendar = /*#__PURE__*/css("position:relative;user-select:none;z-index:1;display:flex;flex-direction:column;width:var(", tokens.calendarContainerWidth, ");height:var(", tokens.calendarContainerHeight, ");&.", classes.stretched, "{width:100%;height:100%;};label:plasma-new-hope__StyledCalendar;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ2FsZW5kYXIvQ2FsZW5kYXJEb3VibGUvQ2FsZW5kYXJEb3VibGUuc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUtpQyIsImZpbGUiOiIuLi8uLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL0NhbGVuZGFyL0NhbGVuZGFyRG91YmxlL0NhbGVuZGFyRG91YmxlLnN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuaW1wb3J0IHsgY2xhc3NlcywgdG9rZW5zIH0gZnJvbSAnLi4vQ2FsZW5kYXIudG9rZW5zJztcblxuZXhwb3J0IGNvbnN0IFN0eWxlZENhbGVuZGFyID0gY3NzYFxuICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcbiAgICB1c2VyLXNlbGVjdDogbm9uZTtcbiAgICB6LWluZGV4OiAxO1xuXG4gICAgZGlzcGxheTogZmxleDtcbiAgICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuXG4gICAgd2lkdGg6IHZhcigke3Rva2Vucy5jYWxlbmRhckNvbnRhaW5lcldpZHRofSk7XG4gICAgaGVpZ2h0OiB2YXIoJHt0b2tlbnMuY2FsZW5kYXJDb250YWluZXJIZWlnaHR9KTtcblxuICAgICYuJHtjbGFzc2VzLnN0cmV0Y2hlZH0ge1xuICAgICAgICB3aWR0aDogMTAwJTtcbiAgICAgICAgaGVpZ2h0OiAxMDAlO1xuICAgIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRTZXBhcmF0b3IgPSBzdHlsZWQuZGl2YFxuICAgIGJhY2tncm91bmQtY29sb3I6IHZhcigke3Rva2Vucy5jYWxlbmRhclNlcGFyYXRvckJhY2tncm91bmR9KTtcbiAgICBtaW4td2lkdGg6IDAuMDYzcmVtO1xuICAgIG1hcmdpbjogMC41cmVtIDFyZW0gMCAxcmVtO1xuYDtcblxuZXhwb3J0IGNvbnN0IFN0eWxlZFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgaGVpZ2h0OiAxMDAlO1xuYDtcbiJdfQ== */"));
|
6
6
|
export var StyledSeparator = /*#__PURE__*/_styled("div", {
|
7
7
|
target: "e18wrrje1",
|
8
8
|
label: "plasma-new-hope__StyledSeparator"
|
9
|
-
})("background-color:var(", tokens.calendarSeparatorBackground, ");min-width:0.063rem;margin:0.5rem 1rem 0 1rem;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
9
|
+
})("background-color:var(", tokens.calendarSeparatorBackground, ");min-width:0.063rem;margin:0.5rem 1rem 0 1rem;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ2FsZW5kYXIvQ2FsZW5kYXJEb3VibGUvQ2FsZW5kYXJEb3VibGUuc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXNCeUMiLCJmaWxlIjoiLi4vLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9DYWxlbmRhci9DYWxlbmRhckRvdWJsZS9DYWxlbmRhckRvdWJsZS5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmltcG9ydCB7IGNsYXNzZXMsIHRva2VucyB9IGZyb20gJy4uL0NhbGVuZGFyLnRva2Vucyc7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRDYWxlbmRhciA9IGNzc2BcbiAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgdXNlci1zZWxlY3Q6IG5vbmU7XG4gICAgei1pbmRleDogMTtcblxuICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblxuICAgIHdpZHRoOiB2YXIoJHt0b2tlbnMuY2FsZW5kYXJDb250YWluZXJXaWR0aH0pO1xuICAgIGhlaWdodDogdmFyKCR7dG9rZW5zLmNhbGVuZGFyQ29udGFpbmVySGVpZ2h0fSk7XG5cbiAgICAmLiR7Y2xhc3Nlcy5zdHJldGNoZWR9IHtcbiAgICAgICAgd2lkdGg6IDEwMCU7XG4gICAgICAgIGhlaWdodDogMTAwJTtcbiAgICB9XG5gO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkU2VwYXJhdG9yID0gc3R5bGVkLmRpdmBcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoJHt0b2tlbnMuY2FsZW5kYXJTZXBhcmF0b3JCYWNrZ3JvdW5kfSk7XG4gICAgbWluLXdpZHRoOiAwLjA2M3JlbTtcbiAgICBtYXJnaW46IDAuNXJlbSAxcmVtIDAgMXJlbTtcbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRXcmFwcGVyID0gc3R5bGVkLmRpdmBcbiAgICBkaXNwbGF5OiBmbGV4O1xuICAgIGhlaWdodDogMTAwJTtcbmA7XG4iXX0= */"));
|
10
10
|
export var StyledWrapper = /*#__PURE__*/_styled("div", {
|
11
11
|
target: "e18wrrje0",
|
12
12
|
label: "plasma-new-hope__StyledWrapper"
|
13
13
|
})(process.env.NODE_ENV === "production" ? {
|
14
|
-
name: "
|
15
|
-
styles: "display:flex"
|
14
|
+
name: "15currb",
|
15
|
+
styles: "display:flex;height:100%"
|
16
16
|
} : {
|
17
|
-
name: "
|
18
|
-
styles: "display:flex",
|
19
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
17
|
+
name: "15currb",
|
18
|
+
styles: "display:flex;height:100%",
|
19
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ2FsZW5kYXIvQ2FsZW5kYXJEb3VibGUvQ2FsZW5kYXJEb3VibGUuc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTRCdUMiLCJmaWxlIjoiLi4vLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9DYWxlbmRhci9DYWxlbmRhckRvdWJsZS9DYWxlbmRhckRvdWJsZS5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmltcG9ydCB7IGNsYXNzZXMsIHRva2VucyB9IGZyb20gJy4uL0NhbGVuZGFyLnRva2Vucyc7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRDYWxlbmRhciA9IGNzc2BcbiAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgdXNlci1zZWxlY3Q6IG5vbmU7XG4gICAgei1pbmRleDogMTtcblxuICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblxuICAgIHdpZHRoOiB2YXIoJHt0b2tlbnMuY2FsZW5kYXJDb250YWluZXJXaWR0aH0pO1xuICAgIGhlaWdodDogdmFyKCR7dG9rZW5zLmNhbGVuZGFyQ29udGFpbmVySGVpZ2h0fSk7XG5cbiAgICAmLiR7Y2xhc3Nlcy5zdHJldGNoZWR9IHtcbiAgICAgICAgd2lkdGg6IDEwMCU7XG4gICAgICAgIGhlaWdodDogMTAwJTtcbiAgICB9XG5gO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkU2VwYXJhdG9yID0gc3R5bGVkLmRpdmBcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoJHt0b2tlbnMuY2FsZW5kYXJTZXBhcmF0b3JCYWNrZ3JvdW5kfSk7XG4gICAgbWluLXdpZHRoOiAwLjA2M3JlbTtcbiAgICBtYXJnaW46IDAuNXJlbSAxcmVtIDAgMXJlbTtcbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRXcmFwcGVyID0gc3R5bGVkLmRpdmBcbiAgICBkaXNwbGF5OiBmbGV4O1xuICAgIGhlaWdodDogMTAwJTtcbmA7XG4iXX0= */",
|
20
20
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
21
21
|
});
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { useMemo } from 'react';
|
2
|
-
import { QUARTER_NAMES, getMatrix, isDateInRange, getDatesWithModifications, quarterDates, isSelectedMonth as isSelectedQuarter,
|
2
|
+
import { QUARTER_NAMES, getMatrix, isDateInRange, getDatesWithModifications, quarterDates, isSelectedMonth as isSelectedQuarter, isCurrentQuarter } from "../utils";
|
3
3
|
import { CalendarState } from "../store/types";
|
4
4
|
/**
|
5
5
|
* Хук для получения списка месяцев.
|
@@ -8,12 +8,12 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
8
8
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
9
9
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
10
10
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
11
|
-
import React, { useCallback, useEffect, useRef } from 'react';
|
11
|
+
import React, { Fragment, useCallback, useEffect, useRef } from 'react';
|
12
12
|
import { useDays } from "../../hooks";
|
13
13
|
import { canSelectDate, FULL_DAY_NAMES, getInRange, getSideInRange, isSameDay, isSelectProcess, ROW_STEP, SHORT_DAY_NAMES, I18N } from "../../utils";
|
14
14
|
import { DateStructureItem } from "../DateStructureItem/DateStructureItem";
|
15
15
|
import { innerTokens, tokens } from "../../Calendar.tokens";
|
16
|
-
import { StyledCalendarDays, StyledCalendarDaysHint
|
16
|
+
import { StyledCalendarDays, StyledCalendarDaysHint } from "./CalendarDays.styles";
|
17
17
|
/**
|
18
18
|
* Компонент дней в календаре.
|
19
19
|
*/
|
@@ -51,7 +51,7 @@ export var CalendarDays = function CalendarDays(_ref) {
|
|
51
51
|
var selectedRef = useRef(selected);
|
52
52
|
var onSetSelectedRef = useRef(onSetSelected);
|
53
53
|
var offset = isSecond ? ROW_STEP : 0;
|
54
|
-
var dayItemTokens = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(
|
54
|
+
var dayItemTokens = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(innerTokens.dateStructureFontFamily), "var(".concat(tokens.calendarDayFontFamily, ")")), "".concat(innerTokens.dateStructureFontSize), "var(".concat(tokens.calendarDayFontSize, ")")), "".concat(innerTokens.dateStructureFontWeight), "var(".concat(tokens.calendarDayFontWeight, ")")), "".concat(innerTokens.dateStructureFontLineHeight), "var(".concat(tokens.calendarDayFontLineHeight, ")")), "".concat(innerTokens.dateStructureFontLetterSpacing), "var(".concat(tokens.calendarDayFontLetterSpacing, ")")), "".concat(innerTokens.dateStructureFontStyle), "var(".concat(tokens.calendarDayFontStyle, ")")), "".concat(innerTokens.dateStructureSelectedFontWeight), "var(".concat(tokens.calendarDaySelectedFontWeight, ")")), "".concat(innerTokens.dateStructureBorderRadius), "var(".concat(tokens.calendarDayItemBorderRadius, ")"));
|
55
55
|
var getSelectedDate = useCallback(function (event) {
|
56
56
|
var _event$currentTarget$ = event.currentTarget.dataset,
|
57
57
|
day = _event$currentTarget$.day,
|
@@ -108,9 +108,7 @@ export var CalendarDays = function CalendarDays(_ref) {
|
|
108
108
|
onMouseLeave: handleMouseOutGrid
|
109
109
|
}, /*#__PURE__*/React.createElement(StyledCalendarDaysHint, {
|
110
110
|
id: "withShift"
|
111
|
-
}, I18N.navigationByShift[locale]), /*#__PURE__*/React.createElement(
|
112
|
-
role: "row"
|
113
|
-
}, SHORT_DAY_NAMES[locale].map(function (name) {
|
111
|
+
}, I18N.navigationByShift[locale]), /*#__PURE__*/React.createElement(React.Fragment, null, SHORT_DAY_NAMES[locale].map(function (name) {
|
114
112
|
return /*#__PURE__*/React.createElement(DateStructureItem, {
|
115
113
|
role: "columnheader",
|
116
114
|
"aria-label": FULL_DAY_NAMES[locale][name],
|
@@ -120,8 +118,7 @@ export var CalendarDays = function CalendarDays(_ref) {
|
|
120
118
|
style: dayItemTokens
|
121
119
|
}, name);
|
122
120
|
})), days.map(function (day, i) {
|
123
|
-
return /*#__PURE__*/React.createElement(
|
124
|
-
role: "row",
|
121
|
+
return /*#__PURE__*/React.createElement(Fragment, {
|
125
122
|
key: i
|
126
123
|
}, day.map(function (_ref2, j) {
|
127
124
|
var date = _ref2.date,
|
@@ -1,15 +1,10 @@
|
|
1
1
|
import _styled from "@emotion/styled/base";
|
2
2
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
3
|
-
import { flexCenter } from "../../mixins";
|
4
3
|
import { tokens } from "../../Calendar.tokens";
|
5
|
-
export var StyledFlex = /*#__PURE__*/_styled("div", {
|
6
|
-
target: "ehyu6ha2",
|
7
|
-
label: "plasma-new-hope__StyledFlex"
|
8
|
-
})(/*#__PURE__*/String(flexCenter), ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ2FsZW5kYXIvdWkvQ2FsZW5kYXJEYXlzL0NhbGVuZGFyRGF5cy5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS29DIiwiZmlsZSI6Ii4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ2FsZW5kYXIvdWkvQ2FsZW5kYXJEYXlzL0NhbGVuZGFyRGF5cy5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmltcG9ydCB7IGZsZXhDZW50ZXIgfSBmcm9tICcuLi8uLi9taXhpbnMnO1xuaW1wb3J0IHsgdG9rZW5zIH0gZnJvbSAnLi4vLi4vQ2FsZW5kYXIudG9rZW5zJztcblxuZXhwb3J0IGNvbnN0IFN0eWxlZEZsZXggPSBzdHlsZWQuZGl2YFxuICAgICR7U3RyaW5nKGZsZXhDZW50ZXIpfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRDYWxlbmRhckRheXMgPSBzdHlsZWQuZGl2YFxuICAgIG91dGxpbmU6IG5vbmU7XG5cbiAgICBwYWRkaW5nOiB2YXIoJHt0b2tlbnMuY2FsZW5kYXJEYXlzUGFkZGluZ30pO1xuICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5gO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkQ2FsZW5kYXJEYXlzSGludCA9IHN0eWxlZC5zcGFuYFxuICAgIGRpc3BsYXk6IG5vbmU7XG5gO1xuIl19 */"));
|
9
4
|
export var StyledCalendarDays = /*#__PURE__*/_styled("div", {
|
10
5
|
target: "ehyu6ha1",
|
11
6
|
label: "plasma-new-hope__StyledCalendarDays"
|
12
|
-
})("outline:none;padding:var(", tokens.calendarDaysPadding, ");box-sizing:border-box;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
7
|
+
})("outline:none;padding:var(", tokens.calendarDaysPadding, ");box-sizing:border-box;display:grid;grid-template-columns:repeat(7, 1fr);grid-template-rows:repeat(7, 1fr);width:100%;height:100%;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ2FsZW5kYXIvdWkvQ2FsZW5kYXJEYXlzL0NhbGVuZGFyRGF5cy5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSTRDIiwiZmlsZSI6Ii4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ2FsZW5kYXIvdWkvQ2FsZW5kYXJEYXlzL0NhbGVuZGFyRGF5cy5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmltcG9ydCB7IHRva2VucyB9IGZyb20gJy4uLy4uL0NhbGVuZGFyLnRva2Vucyc7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRDYWxlbmRhckRheXMgPSBzdHlsZWQuZGl2YFxuICAgIG91dGxpbmU6IG5vbmU7XG5cbiAgICBwYWRkaW5nOiB2YXIoJHt0b2tlbnMuY2FsZW5kYXJEYXlzUGFkZGluZ30pO1xuICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG4gICAgZGlzcGxheTogZ3JpZDtcbiAgICBncmlkLXRlbXBsYXRlLWNvbHVtbnM6IHJlcGVhdCg3LCAxZnIpO1xuICAgIGdyaWQtdGVtcGxhdGUtcm93czogcmVwZWF0KDcsIDFmcik7XG5cbiAgICB3aWR0aDogMTAwJTtcbiAgICBoZWlnaHQ6IDEwMCU7XG5gO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkQ2FsZW5kYXJEYXlzSGludCA9IHN0eWxlZC5zcGFuYFxuICAgIGRpc3BsYXk6IG5vbmU7XG5gO1xuIl19 */"));
|
13
8
|
export var StyledCalendarDaysHint = /*#__PURE__*/_styled("span", {
|
14
9
|
target: "ehyu6ha0",
|
15
10
|
label: "plasma-new-hope__StyledCalendarDaysHint"
|
@@ -19,6 +14,6 @@ export var StyledCalendarDaysHint = /*#__PURE__*/_styled("span", {
|
|
19
14
|
} : {
|
20
15
|
name: "eivff4",
|
21
16
|
styles: "display:none",
|
22
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
17
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ2FsZW5kYXIvdWkvQ2FsZW5kYXJEYXlzL0NhbGVuZGFyRGF5cy5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBaUJpRCIsImZpbGUiOiIuLi8uLi8uLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL0NhbGVuZGFyL3VpL0NhbGVuZGFyRGF5cy9DYWxlbmRhckRheXMuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5pbXBvcnQgeyB0b2tlbnMgfSBmcm9tICcuLi8uLi9DYWxlbmRhci50b2tlbnMnO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkQ2FsZW5kYXJEYXlzID0gc3R5bGVkLmRpdmBcbiAgICBvdXRsaW5lOiBub25lO1xuXG4gICAgcGFkZGluZzogdmFyKCR7dG9rZW5zLmNhbGVuZGFyRGF5c1BhZGRpbmd9KTtcbiAgICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuICAgIGRpc3BsYXk6IGdyaWQ7XG4gICAgZ3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiByZXBlYXQoNywgMWZyKTtcbiAgICBncmlkLXRlbXBsYXRlLXJvd3M6IHJlcGVhdCg3LCAxZnIpO1xuXG4gICAgd2lkdGg6IDEwMCU7XG4gICAgaGVpZ2h0OiAxMDAlO1xuYDtcblxuZXhwb3J0IGNvbnN0IFN0eWxlZENhbGVuZGFyRGF5c0hpbnQgPSBzdHlsZWQuc3BhbmBcbiAgICBkaXNwbGF5OiBub25lO1xuYDtcbiJdfQ== */",
|
23
18
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
24
19
|
});
|
@@ -8,12 +8,12 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
8
8
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
9
9
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
10
10
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
11
|
-
import React, { useCallback, useEffect, useRef } from 'react';
|
11
|
+
import React, { Fragment, useCallback, useEffect, useRef } from 'react';
|
12
12
|
import { useMonths } from "../../hooks";
|
13
13
|
import { innerTokens, tokens } from "../../Calendar.tokens";
|
14
14
|
import { ROW_MONTH_STEP, canSelectDate, getInRange, getSideInRange, isSameDay, isSelectProcess } from "../../utils";
|
15
15
|
import { DateStructureItem } from "../DateStructureItem/DateStructureItem";
|
16
|
-
import { StyledCalendarMonths
|
16
|
+
import { StyledCalendarMonths } from "./CalendarMonths.styles";
|
17
17
|
|
18
18
|
/**
|
19
19
|
* Компонент месяцев в календаре.
|
@@ -52,7 +52,7 @@ export var CalendarMonths = function CalendarMonths(_ref) {
|
|
52
52
|
var selectedRef = useRef(selected);
|
53
53
|
var onSetSelectedRef = useRef(onSetSelected);
|
54
54
|
var offset = isSecond ? ROW_MONTH_STEP : 0;
|
55
|
-
var monthItemTokens = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(
|
55
|
+
var monthItemTokens = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(innerTokens.dateStructureFontFamily), "var(".concat(tokens.calendarMonthFontFamily, ")")), "".concat(innerTokens.dateStructureFontSize), "var(".concat(tokens.calendarMonthFontSize, ")")), "".concat(innerTokens.dateStructureFontWeight), "var(".concat(tokens.calendarMonthFontWeight, ")")), "".concat(innerTokens.dateStructureFontLineHeight), "var(".concat(tokens.calendarMonthFontLineHeight, ")")), "".concat(innerTokens.dateStructureFontLetterSpacing), "var(".concat(tokens.calendarMonthFontLetterSpacing, ")")), "".concat(innerTokens.dateStructureFontStyle), "var(".concat(tokens.calendarMonthFontStyle, ")")), "".concat(innerTokens.dateStructureSelectedFontWeight), "var(".concat(tokens.calendarMonthSelectedFontWeight, ")")), "".concat(innerTokens.dateStructureBorderRadius), "var(".concat(tokens.calendarMonthItemBorderRadius, ")"));
|
56
56
|
var getSelectedDate = useCallback(function (event) {
|
57
57
|
var _event$currentTarget$ = event.currentTarget.dataset,
|
58
58
|
day = _event$currentTarget$.day,
|
@@ -112,8 +112,7 @@ export var CalendarMonths = function CalendarMonths(_ref) {
|
|
112
112
|
onKeyDown: onKeyDown,
|
113
113
|
onMouseLeave: handleMouseOutGrid
|
114
114
|
}, months.map(function (month, i) {
|
115
|
-
return /*#__PURE__*/React.createElement(
|
116
|
-
role: "row",
|
115
|
+
return /*#__PURE__*/React.createElement(Fragment, {
|
117
116
|
key: i
|
118
117
|
}, month.map(function (_ref2, j) {
|
119
118
|
var monthName = _ref2.monthName,
|
@@ -1,11 +1,6 @@
|
|
1
1
|
import _styled from "@emotion/styled/base";
|
2
2
|
import { tokens } from "../../Calendar.tokens";
|
3
|
-
import { flexCenter } from "../../mixins";
|
4
3
|
export var StyledCalendarMonths = /*#__PURE__*/_styled("div", {
|
5
|
-
target: "e1ifyd4q1",
|
6
|
-
label: "plasma-new-hope__StyledCalendarMonths"
|
7
|
-
})("padding:var(", tokens.calendarMonthsPadding, ");box-sizing:border-box;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ2FsZW5kYXIvdWkvQ2FsZW5kYXJNb250aHMvQ2FsZW5kYXJNb250aHMuc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUs4QyIsImZpbGUiOiIuLi8uLi8uLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL0NhbGVuZGFyL3VpL0NhbGVuZGFyTW9udGhzL0NhbGVuZGFyTW9udGhzLnN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuaW1wb3J0IHsgdG9rZW5zIH0gZnJvbSAnLi4vLi4vQ2FsZW5kYXIudG9rZW5zJztcbmltcG9ydCB7IGZsZXhDZW50ZXIgfSBmcm9tICcuLi8uLi9taXhpbnMnO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkQ2FsZW5kYXJNb250aHMgPSBzdHlsZWQuZGl2YFxuICAgIHBhZGRpbmc6IHZhcigke3Rva2Vucy5jYWxlbmRhck1vbnRoc1BhZGRpbmd9KTtcbiAgICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuYDtcblxuZXhwb3J0IGNvbnN0IFN0eWxlZEZsZXggPSBzdHlsZWQuZGl2YFxuICAgICR7U3RyaW5nKGZsZXhDZW50ZXIpfTtcbmA7XG4iXX0= */"));
|
8
|
-
export var StyledFlex = /*#__PURE__*/_styled("div", {
|
9
4
|
target: "e1ifyd4q0",
|
10
|
-
label: "plasma-new-
|
11
|
-
})(
|
5
|
+
label: "plasma-new-hope__StyledCalendarMonths"
|
6
|
+
})("padding:var(", tokens.calendarMonthsPadding, ");box-sizing:border-box;display:grid;grid-template-columns:repeat(3, 1fr);grid-template-rows:repeat(4, 1fr);width:100%;height:100%;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ2FsZW5kYXIvdWkvQ2FsZW5kYXJNb250aHMvQ2FsZW5kYXJNb250aHMuc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUk4QyIsImZpbGUiOiIuLi8uLi8uLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL0NhbGVuZGFyL3VpL0NhbGVuZGFyTW9udGhzL0NhbGVuZGFyTW9udGhzLnN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuaW1wb3J0IHsgdG9rZW5zIH0gZnJvbSAnLi4vLi4vQ2FsZW5kYXIudG9rZW5zJztcblxuZXhwb3J0IGNvbnN0IFN0eWxlZENhbGVuZGFyTW9udGhzID0gc3R5bGVkLmRpdmBcbiAgICBwYWRkaW5nOiB2YXIoJHt0b2tlbnMuY2FsZW5kYXJNb250aHNQYWRkaW5nfSk7XG4gICAgYm94LXNpemluZzogYm9yZGVyLWJveDtcblxuICAgIGRpc3BsYXk6IGdyaWQ7XG4gICAgZ3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiByZXBlYXQoMywgMWZyKTtcbiAgICBncmlkLXRlbXBsYXRlLXJvd3M6IHJlcGVhdCg0LCAxZnIpO1xuXG4gICAgd2lkdGg6IDEwMCU7XG4gICAgaGVpZ2h0OiAxMDAlO1xuYDtcbiJdfQ== */"));
|
@@ -8,12 +8,12 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
8
8
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
9
9
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
10
10
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
11
|
-
import React, { useCallback, useEffect, useRef } from 'react';
|
11
|
+
import React, { Fragment, useCallback, useEffect, useRef } from 'react';
|
12
12
|
import { useQuarters } from "../../hooks";
|
13
13
|
import { innerTokens, tokens } from "../../Calendar.tokens";
|
14
14
|
import { ROW_QUARTER_STEP, canSelectDate, getInRange, getSideInRange, isSameDay, isSelectProcess } from "../../utils";
|
15
15
|
import { DateStructureItem } from "../DateStructureItem/DateStructureItem";
|
16
|
-
import { StyledCalendarQuarters
|
16
|
+
import { StyledCalendarQuarters } from "./CalendarQuarters.styles";
|
17
17
|
|
18
18
|
/**
|
19
19
|
* Компонент кварталов в календаре.
|
@@ -50,7 +50,7 @@ export var CalendarQuarters = function CalendarQuarters(_ref) {
|
|
50
50
|
var selectedRef = useRef(selected);
|
51
51
|
var onSetSelectedRef = useRef(onSetSelected);
|
52
52
|
var offset = isSecond ? ROW_QUARTER_STEP : 0;
|
53
|
-
var quarterItemTokens = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(
|
53
|
+
var quarterItemTokens = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(innerTokens.dateStructureFontFamily), "var(".concat(tokens.calendarQuarterFontFamily, ")")), "".concat(innerTokens.dateStructureFontSize), "var(".concat(tokens.calendarQuarterFontSize, ")")), "".concat(innerTokens.dateStructureFontWeight), "var(".concat(tokens.calendarQuarterFontWeight, ")")), "".concat(innerTokens.dateStructureFontLineHeight), "var(".concat(tokens.calendarQuarterFontLineHeight, ")")), "".concat(innerTokens.dateStructureFontLetterSpacing), "var(".concat(tokens.calendarQuarterFontLetterSpacing, ")")), "".concat(innerTokens.dateStructureFontStyle), "var(".concat(tokens.calendarQuarterFontStyle, ")")), "".concat(innerTokens.dateStructureSelectedFontWeight), "var(".concat(tokens.calendarQuarterSelectedFontWeight, ")")), "".concat(innerTokens.dateStructureBorderRadius), "var(".concat(tokens.calendarQuarterItemBorderRadius, ")"));
|
54
54
|
var getSelectedDate = useCallback(function (event) {
|
55
55
|
var _event$currentTarget$ = event.currentTarget.dataset,
|
56
56
|
day = _event$currentTarget$.day,
|
@@ -110,8 +110,7 @@ export var CalendarQuarters = function CalendarQuarters(_ref) {
|
|
110
110
|
onKeyDown: onKeyDown,
|
111
111
|
onMouseLeave: handleMouseOutGrid
|
112
112
|
}, quarters.map(function (quarter, i) {
|
113
|
-
return /*#__PURE__*/React.createElement(
|
114
|
-
role: "row",
|
113
|
+
return /*#__PURE__*/React.createElement(Fragment, {
|
115
114
|
key: i
|
116
115
|
}, quarter.map(function (_ref2, j) {
|
117
116
|
var quarterName = _ref2.quarterName,
|
@@ -1,11 +1,6 @@
|
|
1
1
|
import _styled from "@emotion/styled/base";
|
2
2
|
import { tokens } from "../../Calendar.tokens";
|
3
|
-
import { flexCenter } from "../../mixins";
|
4
3
|
export var StyledCalendarQuarters = /*#__PURE__*/_styled("div", {
|
5
|
-
target: "e1upfrix1",
|
6
|
-
label: "plasma-new-hope__StyledCalendarQuarters"
|
7
|
-
})("padding:var(", tokens.calendarQuartersPadding, ");box-sizing:border-box;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ2FsZW5kYXIvdWkvQ2FsZW5kYXJRdWFydGVycy9DYWxlbmRhclF1YXJ0ZXJzLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLZ0QiLCJmaWxlIjoiLi4vLi4vLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9DYWxlbmRhci91aS9DYWxlbmRhclF1YXJ0ZXJzL0NhbGVuZGFyUXVhcnRlcnMuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5pbXBvcnQgeyB0b2tlbnMgfSBmcm9tICcuLi8uLi9DYWxlbmRhci50b2tlbnMnO1xuaW1wb3J0IHsgZmxleENlbnRlciB9IGZyb20gJy4uLy4uL21peGlucyc7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRDYWxlbmRhclF1YXJ0ZXJzID0gc3R5bGVkLmRpdmBcbiAgICBwYWRkaW5nOiB2YXIoJHt0b2tlbnMuY2FsZW5kYXJRdWFydGVyc1BhZGRpbmd9KTtcbiAgICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuYDtcblxuZXhwb3J0IGNvbnN0IFN0eWxlZEZsZXggPSBzdHlsZWQuZGl2YFxuICAgICR7U3RyaW5nKGZsZXhDZW50ZXIpfTtcbmA7XG4iXX0= */"));
|
8
|
-
export var StyledFlex = /*#__PURE__*/_styled("div", {
|
9
4
|
target: "e1upfrix0",
|
10
|
-
label: "plasma-new-
|
11
|
-
})(
|
5
|
+
label: "plasma-new-hope__StyledCalendarQuarters"
|
6
|
+
})("padding:var(", tokens.calendarQuartersPadding, ");box-sizing:border-box;display:grid;grid-template-columns:repeat(2, 1fr);grid-template-rows:repeat(2, 1fr);width:100%;height:100%;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ2FsZW5kYXIvdWkvQ2FsZW5kYXJRdWFydGVycy9DYWxlbmRhclF1YXJ0ZXJzLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJZ0QiLCJmaWxlIjoiLi4vLi4vLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9DYWxlbmRhci91aS9DYWxlbmRhclF1YXJ0ZXJzL0NhbGVuZGFyUXVhcnRlcnMuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5pbXBvcnQgeyB0b2tlbnMgfSBmcm9tICcuLi8uLi9DYWxlbmRhci50b2tlbnMnO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkQ2FsZW5kYXJRdWFydGVycyA9IHN0eWxlZC5kaXZgXG4gICAgcGFkZGluZzogdmFyKCR7dG9rZW5zLmNhbGVuZGFyUXVhcnRlcnNQYWRkaW5nfSk7XG4gICAgYm94LXNpemluZzogYm9yZGVyLWJveDtcblxuICAgIGRpc3BsYXk6IGdyaWQ7XG4gICAgZ3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiByZXBlYXQoMiwgMWZyKTtcbiAgICBncmlkLXRlbXBsYXRlLXJvd3M6IHJlcGVhdCgyLCAxZnIpO1xuXG4gICAgd2lkdGg6IDEwMCU7XG4gICAgaGVpZ2h0OiAxMDAlO1xuYDtcbiJdfQ== */"));
|
@@ -8,12 +8,12 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
8
8
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
9
9
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
10
10
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
11
|
-
import React, { useCallback, useEffect, useRef } from 'react';
|
11
|
+
import React, { Fragment, useCallback, useEffect, useRef } from 'react';
|
12
12
|
import { useYears } from "../../hooks";
|
13
13
|
import { innerTokens, tokens } from "../../Calendar.tokens";
|
14
14
|
import { ROW_YEAR_STEP, canSelectDate, getInRange, getSideInRange, isSameDay, isSelectProcess } from "../../utils";
|
15
15
|
import { DateStructureItem } from "../DateStructureItem/DateStructureItem";
|
16
|
-
import { StyledCalendarYears
|
16
|
+
import { StyledCalendarYears } from "./CalendarYears.styles";
|
17
17
|
|
18
18
|
/**
|
19
19
|
* Компонент годов в календаре.
|
@@ -52,7 +52,7 @@ export var CalendarYears = function CalendarYears(_ref) {
|
|
52
52
|
var selectedRef = useRef(selected);
|
53
53
|
var onSetSelectedRef = useRef(onSetSelected);
|
54
54
|
var offset = isSecond ? ROW_YEAR_STEP : 0;
|
55
|
-
var yearItemTokens = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(
|
55
|
+
var yearItemTokens = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(innerTokens.dateStructureFontFamily), "var(".concat(tokens.calendarYearFontFamily, ")")), "".concat(innerTokens.dateStructureFontSize), "var(".concat(tokens.calendarYearFontSize, ")")), "".concat(innerTokens.dateStructureFontWeight), "var(".concat(tokens.calendarYearFontWeight, ")")), "".concat(innerTokens.dateStructureFontLineHeight), "var(".concat(tokens.calendarYearFontLineHeight, ")")), "".concat(innerTokens.dateStructureFontLetterSpacing), "var(".concat(tokens.calendarYearFontLetterSpacing, ")")), "".concat(innerTokens.dateStructureFontStyle), "var(".concat(tokens.calendarYearFontStyle, ")")), "".concat(innerTokens.dateStructureSelectedFontWeight), "var(".concat(tokens.calendarYearSelectedFontWeight, ")")), "".concat(innerTokens.dateStructureBorderRadius), "var(".concat(tokens.calendarYearItemBorderRadius, ")"));
|
56
56
|
var getSelectedDate = useCallback(function (event) {
|
57
57
|
var _event$currentTarget$ = event.currentTarget.dataset,
|
58
58
|
day = _event$currentTarget$.day,
|
@@ -112,8 +112,7 @@ export var CalendarYears = function CalendarYears(_ref) {
|
|
112
112
|
onKeyDown: onKeyDown,
|
113
113
|
onMouseLeave: handleMouseOutGrid
|
114
114
|
}, years.map(function (year, i) {
|
115
|
-
return /*#__PURE__*/React.createElement(
|
116
|
-
role: "row",
|
115
|
+
return /*#__PURE__*/React.createElement(Fragment, {
|
117
116
|
key: i
|
118
117
|
}, year.map(function (_ref2, j) {
|
119
118
|
var yearValue = _ref2.yearValue,
|
@@ -1,11 +1,6 @@
|
|
1
1
|
import _styled from "@emotion/styled/base";
|
2
2
|
import { tokens } from "../../Calendar.tokens";
|
3
|
-
import { flexCenter } from "../../mixins";
|
4
3
|
export var StyledCalendarYears = /*#__PURE__*/_styled("div", {
|
5
|
-
target: "e4fgymq1",
|
6
|
-
label: "plasma-new-hope__StyledCalendarYears"
|
7
|
-
})("padding:var(", tokens.calendarYearsPadding, ");box-sizing:border-box;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ2FsZW5kYXIvdWkvQ2FsZW5kYXJZZWFycy9DYWxlbmRhclllYXJzLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLNkMiLCJmaWxlIjoiLi4vLi4vLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9DYWxlbmRhci91aS9DYWxlbmRhclllYXJzL0NhbGVuZGFyWWVhcnMuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5pbXBvcnQgeyB0b2tlbnMgfSBmcm9tICcuLi8uLi9DYWxlbmRhci50b2tlbnMnO1xuaW1wb3J0IHsgZmxleENlbnRlciB9IGZyb20gJy4uLy4uL21peGlucyc7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRDYWxlbmRhclllYXJzID0gc3R5bGVkLmRpdmBcbiAgICBwYWRkaW5nOiB2YXIoJHt0b2tlbnMuY2FsZW5kYXJZZWFyc1BhZGRpbmd9KTtcbiAgICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuYDtcblxuZXhwb3J0IGNvbnN0IFN0eWxlZEZsZXggPSBzdHlsZWQuZGl2YFxuICAgICR7U3RyaW5nKGZsZXhDZW50ZXIpfTtcbmA7XG4iXX0= */"));
|
8
|
-
export var StyledFlex = /*#__PURE__*/_styled("div", {
|
9
4
|
target: "e4fgymq0",
|
10
|
-
label: "plasma-new-
|
11
|
-
})(
|
5
|
+
label: "plasma-new-hope__StyledCalendarYears"
|
6
|
+
})("padding:var(", tokens.calendarYearsPadding, ");box-sizing:border-box;display:grid;grid-template-columns:repeat(3, 1fr);grid-template-rows:repeat(4, 1fr);width:100%;height:100%;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ2FsZW5kYXIvdWkvQ2FsZW5kYXJZZWFycy9DYWxlbmRhclllYXJzLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJNkMiLCJmaWxlIjoiLi4vLi4vLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9DYWxlbmRhci91aS9DYWxlbmRhclllYXJzL0NhbGVuZGFyWWVhcnMuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5pbXBvcnQgeyB0b2tlbnMgfSBmcm9tICcuLi8uLi9DYWxlbmRhci50b2tlbnMnO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkQ2FsZW5kYXJZZWFycyA9IHN0eWxlZC5kaXZgXG4gICAgcGFkZGluZzogdmFyKCR7dG9rZW5zLmNhbGVuZGFyWWVhcnNQYWRkaW5nfSk7XG4gICAgYm94LXNpemluZzogYm9yZGVyLWJveDtcblxuICAgIGRpc3BsYXk6IGdyaWQ7XG4gICAgZ3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiByZXBlYXQoMywgMWZyKTtcbiAgICBncmlkLXRlbXBsYXRlLXJvd3M6IHJlcGVhdCg0LCAxZnIpO1xuXG4gICAgd2lkdGg6IDEwMCU7XG4gICAgaGVpZ2h0OiAxMDAlO1xuYDtcbiJdfQ== */"));
|