@salutejs/plasma-new-hope 0.325.0-canary.1972.15208152297.0 → 0.325.0-canary.1984.15208824153.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 +13 -4
- 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 +15 -11
- package/cjs/components/Calendar/CalendarBase/CalendarBase.js +3 -9
- 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_zk3a46.css +2 -0
- package/cjs/components/Calendar/CalendarDouble/CalendarDouble.css +18 -14
- package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +3 -9
- 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_dt34s7.css → cjs/components/Calendar/CalendarDouble/CalendarDouble.styles_e9ada0.css} +2 -2
- package/cjs/components/Calendar/hooks/useMonths.js +3 -1
- package/cjs/components/Calendar/hooks/useMonths.js.map +1 -1
- package/cjs/components/Calendar/hooks/useQuarters.js +4 -2
- package/cjs/components/Calendar/hooks/useQuarters.js.map +1 -1
- package/cjs/components/Calendar/hooks/useYears.js +3 -1
- package/cjs/components/Calendar/hooks/useYears.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.css +7 -6
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +6 -3
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.styles.js +9 -3
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.styles.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.styles_1oq8sud.css +3 -0
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.css +6 -5
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +3 -2
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js +7 -1
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.styles_1v3msg.css +2 -0
- package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.css +6 -5
- package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +3 -2
- package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.styles.js +7 -1
- package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.styles.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.styles_14gqhct.css +2 -0
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.css +6 -5
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +3 -2
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.styles.js +7 -1
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.styles.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.styles_1d4ov6t.css +2 -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_1hkk03u.css +4 -0
- package/cjs/components/Calendar/utils/calendarGridHelper.js +2 -10
- package/cjs/components/Calendar/utils/calendarGridHelper.js.map +1 -1
- package/cjs/components/Calendar/utils/getDateWithModification.js +28 -24
- package/cjs/components/Calendar/utils/getDateWithModification.js.map +1 -1
- package/cjs/components/DatePicker/DatePicker.tokens.js +11 -9
- package/cjs/components/DatePicker/DatePicker.tokens.js.map +1 -1
- package/cjs/components/DatePicker/DatePickerBase.styles.js +2 -19
- package/cjs/components/DatePicker/DatePickerBase.styles.js.map +1 -1
- package/cjs/components/DatePicker/DatePickerBase.styles_1a5ddg3.css +2 -0
- package/cjs/components/DatePicker/RangeDate/RangeDate.css +25 -21
- package/cjs/components/DatePicker/RangeDate/RangeDate.js +10 -22
- 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_1q1mn0z.css → RangeDate.styles_vzsqwo.css} +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +23 -19
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +2 -43
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js.map +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +5 -38
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js.map +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles_1fhuiqs.css +2 -0
- package/cjs/components/DatePicker/SingleDate/SingleDate.css +23 -19
- package/cjs/components/DatePicker/SingleDate/SingleDate.js +7 -31
- 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_7r4r8k.css → SingleDate.styles_4wd0mq.css} +1 -1
- package/cjs/index.css +28 -24
- package/emotion/cjs/components/Calendar/Calendar.tokens.js +13 -4
- package/emotion/cjs/components/Calendar/CalendarBase/CalendarBase.js +3 -12
- package/emotion/cjs/components/Calendar/CalendarBase/CalendarBase.styles.js +2 -2
- package/emotion/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +3 -12
- package/emotion/cjs/components/Calendar/CalendarDouble/CalendarDouble.styles.js +7 -7
- package/emotion/cjs/components/Calendar/hooks/useMonths.js +3 -1
- package/emotion/cjs/components/Calendar/hooks/useQuarters.js +4 -2
- package/emotion/cjs/components/Calendar/hooks/useYears.js +3 -1
- package/emotion/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +6 -3
- package/emotion/cjs/components/Calendar/ui/CalendarDays/CalendarDays.styles.js +8 -3
- package/emotion/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +3 -2
- package/emotion/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js +8 -3
- package/emotion/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +3 -2
- package/emotion/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.styles.js +8 -3
- package/emotion/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +3 -2
- package/emotion/cjs/components/Calendar/ui/CalendarYears/CalendarYears.styles.js +8 -3
- package/emotion/cjs/components/Calendar/ui/DateStructureItem/DateStructureItem.styles.js +7 -7
- package/emotion/cjs/components/Calendar/utils/calendarGridHelper.js +3 -10
- package/emotion/cjs/components/Calendar/utils/getDateWithModification.js +28 -24
- package/emotion/cjs/components/DatePicker/DatePicker.tokens.js +12 -9
- package/emotion/cjs/components/DatePicker/DatePickerBase.styles.js +3 -9
- package/emotion/cjs/components/DatePicker/RangeDate/RangeDate.js +9 -25
- package/emotion/cjs/components/DatePicker/RangeDate/RangeDate.styles.js +13 -4
- package/emotion/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +3 -47
- package/emotion/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +2 -14
- package/emotion/cjs/components/DatePicker/SingleDate/SingleDate.js +6 -33
- package/emotion/cjs/components/DatePicker/SingleDate/SingleDate.styles.js +4 -4
- package/emotion/cjs/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +29 -37
- 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 +0 -6
- package/emotion/cjs/examples/plasma_web/components/Calendar/Calendar.stories.tsx +29 -37
- 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 +6 -8
- package/emotion/es/components/Calendar/Calendar.tokens.js +13 -4
- package/emotion/es/components/Calendar/CalendarBase/CalendarBase.js +3 -12
- package/emotion/es/components/Calendar/CalendarBase/CalendarBase.styles.js +3 -3
- package/emotion/es/components/Calendar/CalendarDouble/CalendarDouble.js +3 -12
- package/emotion/es/components/Calendar/CalendarDouble/CalendarDouble.styles.js +8 -8
- package/emotion/es/components/Calendar/hooks/useMonths.js +3 -1
- package/emotion/es/components/Calendar/hooks/useQuarters.js +4 -2
- package/emotion/es/components/Calendar/hooks/useYears.js +3 -1
- package/emotion/es/components/Calendar/ui/CalendarDays/CalendarDays.js +8 -5
- package/emotion/es/components/Calendar/ui/CalendarDays/CalendarDays.styles.js +7 -2
- package/emotion/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +5 -4
- package/emotion/es/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js +7 -2
- package/emotion/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +5 -4
- package/emotion/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.styles.js +7 -2
- package/emotion/es/components/Calendar/ui/CalendarYears/CalendarYears.js +5 -4
- package/emotion/es/components/Calendar/ui/CalendarYears/CalendarYears.styles.js +7 -2
- package/emotion/es/components/Calendar/ui/DateStructureItem/DateStructureItem.styles.js +7 -7
- package/emotion/es/components/Calendar/utils/calendarGridHelper.js +2 -9
- package/emotion/es/components/Calendar/utils/getDateWithModification.js +28 -24
- package/emotion/es/components/DatePicker/DatePicker.tokens.js +11 -8
- package/emotion/es/components/DatePicker/DatePickerBase.styles.js +3 -9
- package/emotion/es/components/DatePicker/RangeDate/RangeDate.js +10 -26
- package/emotion/es/components/DatePicker/RangeDate/RangeDate.styles.js +14 -5
- package/emotion/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +4 -46
- package/emotion/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +3 -15
- package/emotion/es/components/DatePicker/SingleDate/SingleDate.js +7 -34
- package/emotion/es/components/DatePicker/SingleDate/SingleDate.styles.js +4 -4
- package/emotion/es/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +29 -37
- 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 +0 -6
- package/emotion/es/examples/plasma_web/components/Calendar/Calendar.stories.tsx +29 -37
- 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 +6 -8
- package/es/components/Calendar/Calendar.tokens.js +13 -4
- 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 +15 -11
- package/es/components/Calendar/CalendarBase/CalendarBase.js +4 -9
- 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_zk3a46.css +2 -0
- package/es/components/Calendar/CalendarDouble/CalendarDouble.css +18 -14
- package/es/components/Calendar/CalendarDouble/CalendarDouble.js +5 -10
- 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_dt34s7.css → es/components/Calendar/CalendarDouble/CalendarDouble.styles_e9ada0.css} +2 -2
- package/es/components/Calendar/hooks/useMonths.js +3 -1
- package/es/components/Calendar/hooks/useMonths.js.map +1 -1
- package/es/components/Calendar/hooks/useQuarters.js +5 -3
- package/es/components/Calendar/hooks/useQuarters.js.map +1 -1
- package/es/components/Calendar/hooks/useYears.js +3 -1
- package/es/components/Calendar/hooks/useYears.js.map +1 -1
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.css +7 -6
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.js +8 -5
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.js.map +1 -1
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.styles.js +9 -4
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.styles.js.map +1 -1
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.styles_1oq8sud.css +3 -0
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.css +6 -5
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +5 -4
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js +7 -2
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js.map +1 -1
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.styles_1v3msg.css +2 -0
- package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.css +6 -5
- package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +5 -4
- package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js.map +1 -1
- package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.styles.js +7 -2
- package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.styles.js.map +1 -1
- package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.styles_14gqhct.css +2 -0
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.css +6 -5
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.js +5 -4
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.styles.js +7 -2
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.styles.js.map +1 -1
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.styles_1d4ov6t.css +2 -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_1hkk03u.css +4 -0
- package/es/components/Calendar/utils/calendarGridHelper.js +3 -10
- package/es/components/Calendar/utils/calendarGridHelper.js.map +1 -1
- package/es/components/Calendar/utils/getDateWithModification.js +28 -24
- package/es/components/Calendar/utils/getDateWithModification.js.map +1 -1
- package/es/components/DatePicker/DatePicker.tokens.js +12 -9
- package/es/components/DatePicker/DatePicker.tokens.js.map +1 -1
- package/es/components/DatePicker/DatePickerBase.styles.js +2 -19
- package/es/components/DatePicker/DatePickerBase.styles.js.map +1 -1
- package/es/components/DatePicker/DatePickerBase.styles_1a5ddg3.css +2 -0
- package/es/components/DatePicker/RangeDate/RangeDate.css +25 -21
- package/es/components/DatePicker/RangeDate/RangeDate.js +11 -22
- 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_1q1mn0z.css → RangeDate.styles_vzsqwo.css} +1 -1
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +23 -19
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +3 -43
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js.map +1 -1
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +5 -38
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js.map +1 -1
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles_1fhuiqs.css +2 -0
- package/es/components/DatePicker/SingleDate/SingleDate.css +23 -19
- package/es/components/DatePicker/SingleDate/SingleDate.js +8 -31
- 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_7r4r8k.css → SingleDate.styles_4wd0mq.css} +1 -1
- package/es/index.css +28 -24
- package/package.json +2 -2
- package/styled-components/cjs/components/Calendar/Calendar.tokens.js +13 -4
- package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.js +3 -12
- package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.styles.js +1 -1
- package/styled-components/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +3 -12
- package/styled-components/cjs/components/Calendar/CalendarDouble/CalendarDouble.styles.js +2 -2
- package/styled-components/cjs/components/Calendar/hooks/useMonths.js +3 -1
- package/styled-components/cjs/components/Calendar/hooks/useQuarters.js +4 -2
- package/styled-components/cjs/components/Calendar/hooks/useYears.js +3 -1
- package/styled-components/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +6 -3
- package/styled-components/cjs/components/Calendar/ui/CalendarDays/CalendarDays.styles.js +8 -4
- package/styled-components/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +3 -2
- package/styled-components/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js +6 -2
- package/styled-components/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +3 -2
- package/styled-components/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.styles.js +6 -2
- package/styled-components/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +3 -2
- package/styled-components/cjs/components/Calendar/ui/CalendarYears/CalendarYears.styles.js +6 -2
- package/styled-components/cjs/components/Calendar/ui/DateStructureItem/DateStructureItem.styles.js +3 -3
- package/styled-components/cjs/components/Calendar/utils/calendarGridHelper.js +3 -10
- package/styled-components/cjs/components/Calendar/utils/getDateWithModification.js +28 -24
- package/styled-components/cjs/components/DatePicker/DatePicker.tokens.js +12 -9
- package/styled-components/cjs/components/DatePicker/DatePickerBase.styles.js +2 -8
- package/styled-components/cjs/components/DatePicker/RangeDate/RangeDate.js +9 -25
- package/styled-components/cjs/components/DatePicker/RangeDate/RangeDate.styles.js +1 -1
- package/styled-components/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +3 -47
- package/styled-components/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +2 -14
- package/styled-components/cjs/components/DatePicker/SingleDate/SingleDate.js +6 -33
- package/styled-components/cjs/components/DatePicker/SingleDate/SingleDate.styles.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +29 -37
- 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 +0 -6
- package/styled-components/cjs/examples/plasma_web/components/Calendar/Calendar.stories.tsx +29 -37
- 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 +6 -8
- package/styled-components/es/components/Calendar/Calendar.tokens.js +13 -4
- package/styled-components/es/components/Calendar/CalendarBase/CalendarBase.js +3 -12
- package/styled-components/es/components/Calendar/CalendarBase/CalendarBase.styles.js +2 -2
- package/styled-components/es/components/Calendar/CalendarDouble/CalendarDouble.js +3 -12
- package/styled-components/es/components/Calendar/CalendarDouble/CalendarDouble.styles.js +3 -3
- package/styled-components/es/components/Calendar/hooks/useMonths.js +3 -1
- package/styled-components/es/components/Calendar/hooks/useQuarters.js +4 -2
- package/styled-components/es/components/Calendar/hooks/useYears.js +3 -1
- package/styled-components/es/components/Calendar/ui/CalendarDays/CalendarDays.js +8 -5
- package/styled-components/es/components/Calendar/ui/CalendarDays/CalendarDays.styles.js +7 -3
- package/styled-components/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +5 -4
- package/styled-components/es/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js +5 -1
- package/styled-components/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +5 -4
- package/styled-components/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.styles.js +5 -1
- package/styled-components/es/components/Calendar/ui/CalendarYears/CalendarYears.js +5 -4
- package/styled-components/es/components/Calendar/ui/CalendarYears/CalendarYears.styles.js +5 -1
- package/styled-components/es/components/Calendar/ui/DateStructureItem/DateStructureItem.styles.js +3 -3
- package/styled-components/es/components/Calendar/utils/calendarGridHelper.js +2 -9
- package/styled-components/es/components/Calendar/utils/getDateWithModification.js +28 -24
- package/styled-components/es/components/DatePicker/DatePicker.tokens.js +11 -8
- package/styled-components/es/components/DatePicker/DatePickerBase.styles.js +2 -8
- package/styled-components/es/components/DatePicker/RangeDate/RangeDate.js +10 -26
- package/styled-components/es/components/DatePicker/RangeDate/RangeDate.styles.js +2 -2
- package/styled-components/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +4 -46
- package/styled-components/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +3 -15
- package/styled-components/es/components/DatePicker/SingleDate/SingleDate.js +7 -34
- package/styled-components/es/components/DatePicker/SingleDate/SingleDate.styles.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +29 -37
- 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 +0 -6
- package/styled-components/es/examples/plasma_web/components/Calendar/Calendar.stories.tsx +29 -37
- 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 +6 -8
- package/types/components/Calendar/Calendar.tokens.d.ts +12 -3
- package/types/components/Calendar/Calendar.tokens.d.ts.map +1 -1
- package/types/components/Calendar/Calendar.types.d.ts +0 -4
- 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/hooks/types.d.ts +7 -2
- package/types/components/Calendar/hooks/types.d.ts.map +1 -1
- package/types/components/Calendar/hooks/useMonths.d.ts +1 -1
- package/types/components/Calendar/hooks/useMonths.d.ts.map +1 -1
- package/types/components/Calendar/hooks/useQuarters.d.ts +1 -1
- package/types/components/Calendar/hooks/useQuarters.d.ts.map +1 -1
- package/types/components/Calendar/hooks/useYears.d.ts +1 -1
- package/types/components/Calendar/hooks/useYears.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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +0 -1
- package/types/components/Calendar/utils/calendarGridHelper.d.ts.map +1 -1
- package/types/components/Calendar/utils/getDateWithModification.d.ts.map +1 -1
- package/types/components/DatePicker/DatePicker.tokens.d.ts +10 -7
- package/types/components/DatePicker/DatePicker.tokens.d.ts.map +1 -1
- package/types/components/DatePicker/DatePickerBase.styles.d.ts +1 -4
- package/types/components/DatePicker/DatePickerBase.styles.d.ts.map +1 -1
- package/types/components/DatePicker/DatePickerBase.types.d.ts +0 -19
- 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 +3 -16
- package/types/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.d.ts.map +1 -1
- package/types/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.types.d.ts +20 -12
- 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_fpdm18.css +0 -2
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.styles_445k2m.css +0 -2
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.styles_3fk0w8.css +0 -1
- package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.styles_g2v0cv.css +0 -1
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.styles_97bjgu.css +0 -1
- package/cjs/components/Calendar/ui/DateStructureItem/DateStructureItem.styles_12b03hz.css +0 -4
- package/cjs/components/DatePicker/DatePickerBase.styles_10sa0ht.css +0 -2
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles_1n0dbxm.css +0 -2
- package/es/components/Calendar/CalendarBase/CalendarBase.styles_fpdm18.css +0 -2
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.styles_445k2m.css +0 -2
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.styles_3fk0w8.css +0 -1
- package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.styles_g2v0cv.css +0 -1
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.styles_97bjgu.css +0 -1
- package/es/components/Calendar/ui/DateStructureItem/DateStructureItem.styles_12b03hz.css +0 -4
- package/es/components/DatePicker/DatePickerBase.styles_10sa0ht.css +0 -2
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles_1n0dbxm.css +0 -2
@@ -175,9 +175,6 @@ 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,
|
181
178
|
},
|
182
179
|
render: (args) => <StoryDefault {...args} />,
|
183
180
|
};
|
@@ -263,8 +260,12 @@ const StoryRange = ({
|
|
263
260
|
showDefaultTextBefore ? secondTextfieldTextBefore || 'ПО' : secondTextfieldTextBefore
|
264
261
|
}
|
265
262
|
onToggle={(is) => setIsOpen(is)}
|
266
|
-
onChangeFirstValue={
|
267
|
-
|
263
|
+
onChangeFirstValue={(e, currentValue) => {
|
264
|
+
onChangeFirstValue(e, currentValue);
|
265
|
+
}}
|
266
|
+
onChangeSecondValue={(e, currentValue) => {
|
267
|
+
onChangeSecondValue(e, currentValue);
|
268
|
+
}}
|
268
269
|
lang={lang}
|
269
270
|
min={min}
|
270
271
|
max={max}
|
@@ -300,9 +301,6 @@ export const Range: StoryObj<StoryPropsRange> = {
|
|
300
301
|
secondTextfieldTextAfter: '',
|
301
302
|
size: 'l',
|
302
303
|
view: 'default',
|
303
|
-
calendarContainerWidth: 0,
|
304
|
-
calendarContainerHeight: 0,
|
305
|
-
stretched: false,
|
306
304
|
isDoubleCalendar: false,
|
307
305
|
closeAfterDateSelect: true,
|
308
306
|
dividerVariant: 'dash',
|
@@ -13,8 +13,7 @@ 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'
|
17
|
-
stretched: 'plasma-calendar-stretched'
|
16
|
+
disabledPrevButton: 'disabled-prev-button'
|
18
17
|
};
|
19
18
|
export var innerTokens = {
|
20
19
|
dateStructureFontFamily: '--plasma-calendar-date-structure-font-family',
|
@@ -24,16 +23,20 @@ export var innerTokens = {
|
|
24
23
|
dateStructureFontLetterSpacing: '--plasma-calendar-date-structure-font-letter-spacing',
|
25
24
|
dateStructureFontLineHeight: '--plasma-calendar-date-structure-line-height',
|
26
25
|
dateStructureSelectedFontWeight: '--plasma-calendar-date-structure-selected-font-weight',
|
26
|
+
dateStructureWidth: '--plasma-calendar-date-structure-width',
|
27
|
+
dateStructureHeight: '--plasma-calendar-date-structure-height',
|
27
28
|
dateStructureBorderRadius: '--plasma-calendar-date-structure-border-radius'
|
28
29
|
};
|
29
30
|
export var tokens = {
|
30
|
-
|
31
|
-
|
31
|
+
calendarWidth: '--plasma-calendar-width',
|
32
|
+
calendarHeight: '--plasma-calendar-height',
|
32
33
|
calendarBorderWidth: '--plasma-calendar-border-width',
|
33
34
|
calendarBorderColor: '--plasma-calendar-border-color',
|
34
35
|
/* Токены размера сетки лет */
|
35
36
|
calendarYearsPadding: '--plasma-calendar-years-padding',
|
36
37
|
calendarYearItemBorderRadius: '--plasma-calendar-year-item-border-radius',
|
38
|
+
calendarYearItemWidth: '--plasma-calendar-year-item-width',
|
39
|
+
calendarYearItemHeight: '--plasma-calendar-year-item-height',
|
37
40
|
calendarYearFontFamily: '--plasma-calendar-year-font-family',
|
38
41
|
calendarYearFontSize: '--plasma-calendar-year-font-size',
|
39
42
|
calendarYearFontStyle: '--plasma-calendar-year-font-style',
|
@@ -44,6 +47,8 @@ export var tokens = {
|
|
44
47
|
/* Токены размера сетки дней */
|
45
48
|
calendarQuartersPadding: '--plasma-calendar-quarters-padding',
|
46
49
|
calendarQuarterItemBorderRadius: '--plasma-calendar-quarter-item-border-radius',
|
50
|
+
calendarQuarterItemWidth: '--plasma-calendar-quarter-item-width',
|
51
|
+
calendarQuarterItemHeight: '--plasma-calendar-quarter-item-height',
|
47
52
|
calendarQuarterFontFamily: '--plasma-calendar-quarter-font-family',
|
48
53
|
calendarQuarterFontSize: '--plasma-calendar-quarter-font-size',
|
49
54
|
calendarQuarterFontStyle: '--plasma-calendar-quarter-font-style',
|
@@ -54,6 +59,8 @@ export var tokens = {
|
|
54
59
|
/* Токены размера сетки месяцев */
|
55
60
|
calendarMonthsPadding: '--plasma-calendar-months-padding',
|
56
61
|
calendarMonthItemBorderRadius: '--plasma-calendar-month-item-border-radius',
|
62
|
+
calendarMonthItemWidth: '--plasma-calendar-month-item-width',
|
63
|
+
calendarMonthItemHeight: '--plasma-calendar-month-item-height',
|
57
64
|
calendarMonthFontFamily: '--plasma-calendar-month-font-family',
|
58
65
|
calendarMonthFontSize: '--plasma-calendar-month-font-size',
|
59
66
|
calendarMonthFontStyle: '--plasma-calendar-month-font-style',
|
@@ -64,6 +71,8 @@ export var tokens = {
|
|
64
71
|
/* Токены размера сетки дней */
|
65
72
|
calendarDaysPadding: '--plasma-calendar-days-padding',
|
66
73
|
calendarDayItemBorderRadius: '--plasma-calendar-day-item-border-radius',
|
74
|
+
calendarDayItemWidth: '--plasma-calendar-day-item-width',
|
75
|
+
calendarDayItemHeight: '--plasma-calendar-day-item-height',
|
67
76
|
calendarDayFontFamily: '--plasma-calendar-day-font-family',
|
68
77
|
calendarDayFontSize: '--plasma-calendar-day-font-size',
|
69
78
|
calendarDayFontStyle: '--plasma-calendar-day-font-style',
|
@@ -1,9 +1,5 @@
|
|
1
|
-
|
2
|
-
var _excluded = ["className", "value", "min", "max", "renderFromDate", "includeEdgeDates", "type", "eventList", "disabledList", "eventMonthList", "disabledMonthList", "eventQuarterList", "disabledQuarterList", "eventYearList", "disabledYearList", "locale", "stretched", "onChangeValue"];
|
1
|
+
var _excluded = ["value", "min", "max", "renderFromDate", "includeEdgeDates", "type", "eventList", "disabledList", "eventMonthList", "disabledMonthList", "eventQuarterList", "disabledQuarterList", "eventYearList", "disabledYearList", "onChangeValue", "locale"];
|
3
2
|
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); }
|
7
3
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
8
4
|
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."); }
|
9
5
|
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; } }
|
@@ -13,13 +9,11 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
13
9
|
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; }
|
14
10
|
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; }
|
15
11
|
import React, { useCallback, useMemo, useReducer, useState, forwardRef, useEffect } from 'react';
|
16
|
-
import cls from 'classnames';
|
17
12
|
import { getInitialState, reducer, sizeMap } from "../store/reducer";
|
18
13
|
import { ActionType, CalendarState } from "../store/types";
|
19
14
|
import { I18N, isValueUpdate } from "../utils";
|
20
15
|
import { useKeyNavigation, useCalendarNavigation, useCalendarDateChange } from "../hooks";
|
21
16
|
import { CalendarDays, CalendarHeader, CalendarMonths, CalendarQuarters, CalendarYears } from "../ui";
|
22
|
-
import { classes } from "../Calendar.tokens";
|
23
17
|
import { base as viewCSS } from "./variations/_view/base";
|
24
18
|
import { base as sizeCSS } from "./variations/_size/base";
|
25
19
|
import { IsOutOfRange, StyledCalendar } from "./CalendarBase.styles";
|
@@ -28,8 +22,7 @@ import { IsOutOfRange, StyledCalendar } from "./CalendarBase.styles";
|
|
28
22
|
*/
|
29
23
|
export var calendarBaseRoot = function calendarBaseRoot(Root) {
|
30
24
|
return /*#__PURE__*/forwardRef(function (_ref, outerRootRef) {
|
31
|
-
var
|
32
|
-
externalValue = _ref.value,
|
25
|
+
var externalValue = _ref.value,
|
33
26
|
minDate = _ref.min,
|
34
27
|
maxDate = _ref.max,
|
35
28
|
renderFromDate = _ref.renderFromDate,
|
@@ -44,10 +37,9 @@ export var calendarBaseRoot = function calendarBaseRoot(Root) {
|
|
44
37
|
disabledQuarterList = _ref.disabledQuarterList,
|
45
38
|
eventYearList = _ref.eventYearList,
|
46
39
|
disabledYearList = _ref.disabledYearList,
|
40
|
+
onChangeValue = _ref.onChangeValue,
|
47
41
|
_ref$locale = _ref.locale,
|
48
42
|
locale = _ref$locale === void 0 ? 'ru' : _ref$locale,
|
49
|
-
stretched = _ref.stretched,
|
50
|
-
onChangeValue = _ref.onChangeValue,
|
51
43
|
rest = _objectWithoutProperties(_ref, _excluded);
|
52
44
|
var _useMemo = useMemo(function () {
|
53
45
|
return Array.isArray(externalValue) ? externalValue : [externalValue];
|
@@ -156,7 +148,6 @@ export var calendarBaseRoot = function calendarBaseRoot(Root) {
|
|
156
148
|
}, [value]);
|
157
149
|
return /*#__PURE__*/React.createElement(Root, _extends({
|
158
150
|
ref: outerRootRef,
|
159
|
-
className: cls(className, _defineProperty({}, classes.stretched, stretched)),
|
160
151
|
"aria-label": I18N.selectDate[locale]
|
161
152
|
}, rest), isOutOfRange && /*#__PURE__*/React.createElement(IsOutOfRange, {
|
162
153
|
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 {
|
5
|
-
export var StyledCalendar = /*#__PURE__*/css("position:relative;user-select:none;z-index:1;width:var(", tokens.
|
4
|
+
import { tokens } from "../Calendar.tokens";
|
5
|
+
export var StyledCalendar = /*#__PURE__*/css("position:relative;user-select:none;z-index:1;width:var(", tokens.calendarWidth, ");height:var(", tokens.calendarHeight, ");border:var(", tokens.calendarBorderWidth, ") solid var(", tokens.calendarBorderColor, ");box-sizing:border-box;;label:plasma-new-hope__StyledCalendar;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ2FsZW5kYXIvQ2FsZW5kYXJCYXNlL0NhbGVuZGFyQmFzZS5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS2lDIiwiZmlsZSI6Ii4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ2FsZW5kYXIvQ2FsZW5kYXJCYXNlL0NhbGVuZGFyQmFzZS5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmltcG9ydCB7IHRva2VucyB9IGZyb20gJy4uL0NhbGVuZGFyLnRva2Vucyc7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRDYWxlbmRhciA9IGNzc2BcbiAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgdXNlci1zZWxlY3Q6IG5vbmU7XG4gICAgei1pbmRleDogMTtcblxuICAgIHdpZHRoOiB2YXIoJHt0b2tlbnMuY2FsZW5kYXJXaWR0aH0pO1xuICAgIGhlaWdodDogdmFyKCR7dG9rZW5zLmNhbGVuZGFySGVpZ2h0fSk7XG4gICAgYm9yZGVyOiB2YXIoJHt0b2tlbnMuY2FsZW5kYXJCb3JkZXJXaWR0aH0pIHNvbGlkIHZhcigke3Rva2Vucy5jYWxlbmRhckJvcmRlckNvbG9yfSk7XG4gICAgYm94LXNpemluZzogYm9yZGVyLWJveDtcbmA7XG5cbmV4cG9ydCBjb25zdCBJc091dE9mUmFuZ2UgPSBzdHlsZWQuZGl2YFxuICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgICBwYWRkaW5nOiAwO1xuICAgIG1hcmdpbjogMDtcbiAgICBoZWlnaHQ6IDA7XG4gICAgd2lkdGg6IDA7XG4gICAgYm9yZGVyOiAwO1xuICAgIG92ZXJmbG93OiBoaWRkZW47XG4gICAgY2xpcDogcmVjdCgwIDAgMCAwKTtcbmA7XG4iXX0= */"));
|
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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ2FsZW5kYXIvQ2FsZW5kYXJCYXNlL0NhbGVuZGFyQmFzZS5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBZ0JzQyIsImZpbGUiOiIuLi8uLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL0NhbGVuZGFyL0NhbGVuZGFyQmFzZS9DYWxlbmRhckJhc2Uuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5pbXBvcnQgeyB0b2tlbnMgfSBmcm9tICcuLi9DYWxlbmRhci50b2tlbnMnO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkQ2FsZW5kYXIgPSBjc3NgXG4gICAgcG9zaXRpb246IHJlbGF0aXZlO1xuICAgIHVzZXItc2VsZWN0OiBub25lO1xuICAgIHotaW5kZXg6IDE7XG5cbiAgICB3aWR0aDogdmFyKCR7dG9rZW5zLmNhbGVuZGFyV2lkdGh9KTtcbiAgICBoZWlnaHQ6IHZhcigke3Rva2Vucy5jYWxlbmRhckhlaWdodH0pO1xuICAgIGJvcmRlcjogdmFyKCR7dG9rZW5zLmNhbGVuZGFyQm9yZGVyV2lkdGh9KSBzb2xpZCB2YXIoJHt0b2tlbnMuY2FsZW5kYXJCb3JkZXJDb2xvcn0pO1xuICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5gO1xuXG5leHBvcnQgY29uc3QgSXNPdXRPZlJhbmdlID0gc3R5bGVkLmRpdmBcbiAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgcGFkZGluZzogMDtcbiAgICBtYXJnaW46IDA7XG4gICAgaGVpZ2h0OiAwO1xuICAgIHdpZHRoOiAwO1xuICAgIGJvcmRlcjogMDtcbiAgICBvdmVyZmxvdzogaGlkZGVuO1xuICAgIGNsaXA6IHJlY3QoMCAwIDAgMCk7XG5gO1xuIl19 */",
|
16
16
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
17
17
|
});
|
@@ -1,10 +1,6 @@
|
|
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
1
|
var _StyledSeparator, _StyledSeparator2, _StyledSeparator3, _StyledSeparator4;
|
3
|
-
var _excluded = ["
|
2
|
+
var _excluded = ["value", "min", "max", "renderFromDate", "includeEdgeDates", "type", "eventList", "disabledList", "eventMonthList", "disabledMonthList", "eventQuarterList", "disabledQuarterList", "eventYearList", "disabledYearList", "onChangeValue", "locale"];
|
4
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); }
|
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); }
|
8
4
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
9
5
|
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."); }
|
10
6
|
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; } }
|
@@ -14,14 +10,12 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
14
10
|
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; }
|
15
11
|
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; }
|
16
12
|
import React, { useState, useCallback, useMemo, forwardRef, useEffect, useReducer } from 'react';
|
17
|
-
import cls from 'classnames';
|
18
13
|
import { YEAR_RENDER_COUNT, getNextDate, isValueUpdate, I18N } from "../utils";
|
19
14
|
import { useKeyNavigation, useCalendarNavigation, useCalendarDateChange } from "../hooks";
|
20
15
|
import { CalendarDays, CalendarHeader, CalendarMonths, CalendarQuarters, CalendarYears } from "../ui";
|
21
16
|
import { getInitialState, reducer, sizeMap } from "../store/reducer";
|
22
17
|
import { ActionType, CalendarState } from "../store/types";
|
23
18
|
import { IsOutOfRange } from "../CalendarBase/CalendarBase.styles";
|
24
|
-
import { classes } from "../Calendar.tokens";
|
25
19
|
import { base as viewCSS } from "./variations/_view/base";
|
26
20
|
import { StyledCalendar, StyledSeparator, StyledWrapper } from "./CalendarDouble.styles";
|
27
21
|
/**
|
@@ -29,8 +23,7 @@ import { StyledCalendar, StyledSeparator, StyledWrapper } from "./CalendarDouble
|
|
29
23
|
*/
|
30
24
|
export var calendarDoubleRoot = function calendarDoubleRoot(Root) {
|
31
25
|
return /*#__PURE__*/forwardRef(function (_ref, outerRootRef) {
|
32
|
-
var
|
33
|
-
externalValue = _ref.value,
|
26
|
+
var externalValue = _ref.value,
|
34
27
|
minDate = _ref.min,
|
35
28
|
maxDate = _ref.max,
|
36
29
|
renderFromDate = _ref.renderFromDate,
|
@@ -45,10 +38,9 @@ export var calendarDoubleRoot = function calendarDoubleRoot(Root) {
|
|
45
38
|
disabledQuarterList = _ref.disabledQuarterList,
|
46
39
|
eventYearList = _ref.eventYearList,
|
47
40
|
disabledYearList = _ref.disabledYearList,
|
41
|
+
onChangeValue = _ref.onChangeValue,
|
48
42
|
_ref$locale = _ref.locale,
|
49
43
|
locale = _ref$locale === void 0 ? 'ru' : _ref$locale,
|
50
|
-
stretched = _ref.stretched,
|
51
|
-
onChangeValue = _ref.onChangeValue,
|
52
44
|
rest = _objectWithoutProperties(_ref, _excluded);
|
53
45
|
var _useMemo = useMemo(function () {
|
54
46
|
return Array.isArray(externalValue) ? externalValue : [externalValue];
|
@@ -213,7 +205,6 @@ export var calendarDoubleRoot = function calendarDoubleRoot(Root) {
|
|
213
205
|
}, [date, calendarState]);
|
214
206
|
return /*#__PURE__*/React.createElement(Root, _extends({
|
215
207
|
ref: outerRootRef,
|
216
|
-
className: cls(className, _defineProperty({}, classes.stretched, stretched)),
|
217
208
|
"aria-label": I18N.selectDate[locale]
|
218
209
|
}, rest), isOutOfRange && /*#__PURE__*/React.createElement(IsOutOfRange, {
|
219
210
|
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 {
|
5
|
-
export var StyledCalendar = /*#__PURE__*/css("position:relative;user-select:none;z-index:1;display:flex;flex-direction:column;width:var(", tokens.
|
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.calendarWidth, ");height:var(", tokens.calendarHeight, ");;label:plasma-new-hope__StyledCalendar;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ2FsZW5kYXIvQ2FsZW5kYXJEb3VibGUvQ2FsZW5kYXJEb3VibGUuc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUtpQyIsImZpbGUiOiIuLi8uLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL0NhbGVuZGFyL0NhbGVuZGFyRG91YmxlL0NhbGVuZGFyRG91YmxlLnN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuaW1wb3J0IHsgdG9rZW5zIH0gZnJvbSAnLi4vQ2FsZW5kYXIudG9rZW5zJztcblxuZXhwb3J0IGNvbnN0IFN0eWxlZENhbGVuZGFyID0gY3NzYFxuICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcbiAgICB1c2VyLXNlbGVjdDogbm9uZTtcbiAgICB6LWluZGV4OiAxO1xuXG4gICAgZGlzcGxheTogZmxleDtcbiAgICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuXG4gICAgd2lkdGg6IHZhcigke3Rva2Vucy5jYWxlbmRhcldpZHRofSk7XG4gICAgaGVpZ2h0OiB2YXIoJHt0b2tlbnMuY2FsZW5kYXJIZWlnaHR9KTtcbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRTZXBhcmF0b3IgPSBzdHlsZWQuZGl2YFxuICAgIGJhY2tncm91bmQtY29sb3I6IHZhcigke3Rva2Vucy5jYWxlbmRhclNlcGFyYXRvckJhY2tncm91bmR9KTtcbiAgICBtaW4td2lkdGg6IDAuMDYzcmVtO1xuICAgIG1hcmdpbjogMC41cmVtIDFyZW0gMCAxcmVtO1xuYDtcblxuZXhwb3J0IGNvbnN0IFN0eWxlZFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuICAgIGRpc3BsYXk6IGZsZXg7XG5gO1xuIl19 */"));
|
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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ2FsZW5kYXIvQ2FsZW5kYXJEb3VibGUvQ2FsZW5kYXJEb3VibGUuc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWlCeUMiLCJmaWxlIjoiLi4vLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9DYWxlbmRhci9DYWxlbmRhckRvdWJsZS9DYWxlbmRhckRvdWJsZS5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmltcG9ydCB7IHRva2VucyB9IGZyb20gJy4uL0NhbGVuZGFyLnRva2Vucyc7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRDYWxlbmRhciA9IGNzc2BcbiAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgdXNlci1zZWxlY3Q6IG5vbmU7XG4gICAgei1pbmRleDogMTtcblxuICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblxuICAgIHdpZHRoOiB2YXIoJHt0b2tlbnMuY2FsZW5kYXJXaWR0aH0pO1xuICAgIGhlaWdodDogdmFyKCR7dG9rZW5zLmNhbGVuZGFySGVpZ2h0fSk7XG5gO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkU2VwYXJhdG9yID0gc3R5bGVkLmRpdmBcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoJHt0b2tlbnMuY2FsZW5kYXJTZXBhcmF0b3JCYWNrZ3JvdW5kfSk7XG4gICAgbWluLXdpZHRoOiAwLjA2M3JlbTtcbiAgICBtYXJnaW46IDAuNXJlbSAxcmVtIDAgMXJlbTtcbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRXcmFwcGVyID0gc3R5bGVkLmRpdmBcbiAgICBkaXNwbGF5OiBmbGV4O1xuYDtcbiJdfQ== */"));
|
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: "zjik7",
|
15
|
+
styles: "display:flex"
|
16
16
|
} : {
|
17
|
-
name: "
|
18
|
-
styles: "display:flex
|
19
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
17
|
+
name: "zjik7",
|
18
|
+
styles: "display:flex",
|
19
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ2FsZW5kYXIvQ2FsZW5kYXJEb3VibGUvQ2FsZW5kYXJEb3VibGUuc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXVCdUMiLCJmaWxlIjoiLi4vLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9DYWxlbmRhci9DYWxlbmRhckRvdWJsZS9DYWxlbmRhckRvdWJsZS5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmltcG9ydCB7IHRva2VucyB9IGZyb20gJy4uL0NhbGVuZGFyLnRva2Vucyc7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRDYWxlbmRhciA9IGNzc2BcbiAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgdXNlci1zZWxlY3Q6IG5vbmU7XG4gICAgei1pbmRleDogMTtcblxuICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblxuICAgIHdpZHRoOiB2YXIoJHt0b2tlbnMuY2FsZW5kYXJXaWR0aH0pO1xuICAgIGhlaWdodDogdmFyKCR7dG9rZW5zLmNhbGVuZGFySGVpZ2h0fSk7XG5gO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkU2VwYXJhdG9yID0gc3R5bGVkLmRpdmBcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoJHt0b2tlbnMuY2FsZW5kYXJTZXBhcmF0b3JCYWNrZ3JvdW5kfSk7XG4gICAgbWluLXdpZHRoOiAwLjA2M3JlbTtcbiAgICBtYXJnaW46IDAuNXJlbSAxcmVtIDAgMXJlbTtcbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRXcmFwcGVyID0gc3R5bGVkLmRpdmBcbiAgICBkaXNwbGF5OiBmbGV4O1xuYDtcbiJdfQ== */",
|
20
20
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
21
21
|
});
|
@@ -12,7 +12,8 @@ export var useMonths = function useMonths(_ref) {
|
|
12
12
|
min = _ref.min,
|
13
13
|
max = _ref.max,
|
14
14
|
_ref$locale = _ref.locale,
|
15
|
-
locale = _ref$locale === void 0 ? 'ru' : _ref$locale
|
15
|
+
locale = _ref$locale === void 0 ? 'ru' : _ref$locale,
|
16
|
+
includeEdgeDates = _ref.includeEdgeDates;
|
16
17
|
return useMemo(function () {
|
17
18
|
var months = SHORT_MONTH_NAME[locale].map(function (monthName, monthIndex) {
|
18
19
|
return {
|
@@ -37,6 +38,7 @@ export var useMonths = function useMonths(_ref) {
|
|
37
38
|
type: CalendarState.Months,
|
38
39
|
min: min,
|
39
40
|
max: max,
|
41
|
+
includeEdgeDates: includeEdgeDates,
|
40
42
|
eventList: eventList,
|
41
43
|
disabledList: disabledList
|
42
44
|
});
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { useMemo } from 'react';
|
2
|
-
import { QUARTER_NAMES, getMatrix, isDateInRange, getDatesWithModifications, quarterDates, isSelectedMonth as isSelectedQuarter, isCurrentQuarter } from "../utils";
|
2
|
+
import { QUARTER_NAMES, getMatrix, isDateInRange, getDatesWithModifications, quarterDates, isSelectedMonth as isSelectedQuarter, isCurrentMonth as isCurrentQuarter } from "../utils";
|
3
3
|
import { CalendarState } from "../store/types";
|
4
4
|
/**
|
5
5
|
* Хук для получения списка месяцев.
|
@@ -10,7 +10,8 @@ export var useQuarters = function useQuarters(_ref) {
|
|
10
10
|
eventList = _ref.eventList,
|
11
11
|
disabledList = _ref.disabledList,
|
12
12
|
min = _ref.min,
|
13
|
-
max = _ref.max
|
13
|
+
max = _ref.max,
|
14
|
+
includeEdgeDates = _ref.includeEdgeDates;
|
14
15
|
return useMemo(function () {
|
15
16
|
var quarters = QUARTER_NAMES.map(function (quarterName) {
|
16
17
|
var _quarterDates$quarter = quarterDates[quarterName],
|
@@ -36,6 +37,7 @@ export var useQuarters = function useQuarters(_ref) {
|
|
36
37
|
type: CalendarState.Quarters,
|
37
38
|
min: min,
|
38
39
|
max: max,
|
40
|
+
includeEdgeDates: includeEdgeDates,
|
39
41
|
eventList: eventList,
|
40
42
|
disabledList: disabledList
|
41
43
|
});
|
@@ -11,7 +11,8 @@ export var useYears = function useYears(_ref) {
|
|
11
11
|
eventList = _ref.eventList,
|
12
12
|
disabledList = _ref.disabledList,
|
13
13
|
min = _ref.min,
|
14
|
-
max = _ref.max
|
14
|
+
max = _ref.max,
|
15
|
+
includeEdgeDates = _ref.includeEdgeDates;
|
15
16
|
return useMemo(function () {
|
16
17
|
// type-coverage:ignore-next-line
|
17
18
|
var years = Array.from(Array(YEAR_RENDER_COUNT), function (_, i) {
|
@@ -36,6 +37,7 @@ export var useYears = function useYears(_ref) {
|
|
36
37
|
type: CalendarState.Years,
|
37
38
|
min: min,
|
38
39
|
max: max,
|
40
|
+
includeEdgeDates: includeEdgeDates,
|
39
41
|
eventList: eventList,
|
40
42
|
disabledList: disabledList
|
41
43
|
});
|
@@ -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, {
|
11
|
+
import React, { 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 } from "./CalendarDays.styles";
|
16
|
+
import { StyledCalendarDays, StyledCalendarDaysHint, StyledFlex } 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({}, "".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, ")"));
|
54
|
+
var dayItemTokens = _defineProperty(_defineProperty(_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.dateStructureWidth), "var(".concat(tokens.calendarDayItemWidth, ")")), "".concat(innerTokens.dateStructureHeight), "var(".concat(tokens.calendarDayItemHeight, ")")), "".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,7 +108,9 @@ 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(
|
111
|
+
}, I18N.navigationByShift[locale]), /*#__PURE__*/React.createElement(StyledFlex, {
|
112
|
+
role: "row"
|
113
|
+
}, SHORT_DAY_NAMES[locale].map(function (name) {
|
112
114
|
return /*#__PURE__*/React.createElement(DateStructureItem, {
|
113
115
|
role: "columnheader",
|
114
116
|
"aria-label": FULL_DAY_NAMES[locale][name],
|
@@ -118,7 +120,8 @@ export var CalendarDays = function CalendarDays(_ref) {
|
|
118
120
|
style: dayItemTokens
|
119
121
|
}, name);
|
120
122
|
})), days.map(function (day, i) {
|
121
|
-
return /*#__PURE__*/React.createElement(
|
123
|
+
return /*#__PURE__*/React.createElement(StyledFlex, {
|
124
|
+
role: "row",
|
122
125
|
key: i
|
123
126
|
}, day.map(function (_ref2, j) {
|
124
127
|
var date = _ref2.date,
|
@@ -1,10 +1,15 @@
|
|
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";
|
3
4
|
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 */"));
|
4
9
|
export var StyledCalendarDays = /*#__PURE__*/_styled("div", {
|
5
10
|
target: "ehyu6ha1",
|
6
11
|
label: "plasma-new-hope__StyledCalendarDays"
|
7
|
-
})("outline:none;padding:var(", tokens.calendarDaysPadding, ");box-sizing:border-box;
|
12
|
+
})("outline:none;padding:var(", tokens.calendarDaysPadding, ");box-sizing:border-box;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ2FsZW5kYXIvdWkvQ2FsZW5kYXJEYXlzL0NhbGVuZGFyRGF5cy5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBUzRDIiwiZmlsZSI6Ii4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ2FsZW5kYXIvdWkvQ2FsZW5kYXJEYXlzL0NhbGVuZGFyRGF5cy5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmltcG9ydCB7IGZsZXhDZW50ZXIgfSBmcm9tICcuLi8uLi9taXhpbnMnO1xuaW1wb3J0IHsgdG9rZW5zIH0gZnJvbSAnLi4vLi4vQ2FsZW5kYXIudG9rZW5zJztcblxuZXhwb3J0IGNvbnN0IFN0eWxlZEZsZXggPSBzdHlsZWQuZGl2YFxuICAgICR7U3RyaW5nKGZsZXhDZW50ZXIpfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRDYWxlbmRhckRheXMgPSBzdHlsZWQuZGl2YFxuICAgIG91dGxpbmU6IG5vbmU7XG5cbiAgICBwYWRkaW5nOiB2YXIoJHt0b2tlbnMuY2FsZW5kYXJEYXlzUGFkZGluZ30pO1xuICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5gO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkQ2FsZW5kYXJEYXlzSGludCA9IHN0eWxlZC5zcGFuYFxuICAgIGRpc3BsYXk6IG5vbmU7XG5gO1xuIl19 */"));
|
8
13
|
export var StyledCalendarDaysHint = /*#__PURE__*/_styled("span", {
|
9
14
|
target: "ehyu6ha0",
|
10
15
|
label: "plasma-new-hope__StyledCalendarDaysHint"
|
@@ -14,6 +19,6 @@ export var StyledCalendarDaysHint = /*#__PURE__*/_styled("span", {
|
|
14
19
|
} : {
|
15
20
|
name: "eivff4",
|
16
21
|
styles: "display:none",
|
17
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
22
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ2FsZW5kYXIvdWkvQ2FsZW5kYXJEYXlzL0NhbGVuZGFyRGF5cy5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBZ0JpRCIsImZpbGUiOiIuLi8uLi8uLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL0NhbGVuZGFyL3VpL0NhbGVuZGFyRGF5cy9DYWxlbmRhckRheXMuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5pbXBvcnQgeyBmbGV4Q2VudGVyIH0gZnJvbSAnLi4vLi4vbWl4aW5zJztcbmltcG9ydCB7IHRva2VucyB9IGZyb20gJy4uLy4uL0NhbGVuZGFyLnRva2Vucyc7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRGbGV4ID0gc3R5bGVkLmRpdmBcbiAgICAke1N0cmluZyhmbGV4Q2VudGVyKX07XG5gO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkQ2FsZW5kYXJEYXlzID0gc3R5bGVkLmRpdmBcbiAgICBvdXRsaW5lOiBub25lO1xuXG4gICAgcGFkZGluZzogdmFyKCR7dG9rZW5zLmNhbGVuZGFyRGF5c1BhZGRpbmd9KTtcbiAgICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuYDtcblxuZXhwb3J0IGNvbnN0IFN0eWxlZENhbGVuZGFyRGF5c0hpbnQgPSBzdHlsZWQuc3BhbmBcbiAgICBkaXNwbGF5OiBub25lO1xuYDtcbiJdfQ== */",
|
18
23
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
19
24
|
});
|
@@ -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, {
|
11
|
+
import React, { 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 } from "./CalendarMonths.styles";
|
16
|
+
import { StyledCalendarMonths, StyledFlex } 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({}, "".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, ")"));
|
55
|
+
var monthItemTokens = _defineProperty(_defineProperty(_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.dateStructureWidth), "var(".concat(tokens.calendarMonthItemWidth, ")")), "".concat(innerTokens.dateStructureHeight), "var(".concat(tokens.calendarMonthItemHeight, ")")), "".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,7 +112,8 @@ 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(
|
115
|
+
return /*#__PURE__*/React.createElement(StyledFlex, {
|
116
|
+
role: "row",
|
116
117
|
key: i
|
117
118
|
}, month.map(function (_ref2, j) {
|
118
119
|
var monthName = _ref2.monthName,
|
@@ -1,6 +1,11 @@
|
|
1
1
|
import _styled from "@emotion/styled/base";
|
2
2
|
import { tokens } from "../../Calendar.tokens";
|
3
|
+
import { flexCenter } from "../../mixins";
|
3
4
|
export var StyledCalendarMonths = /*#__PURE__*/_styled("div", {
|
4
|
-
target: "
|
5
|
+
target: "e1ifyd4q1",
|
5
6
|
label: "plasma-new-hope__StyledCalendarMonths"
|
6
|
-
})("padding:var(", tokens.calendarMonthsPadding, ");box-sizing:border-box;
|
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
|
+
target: "e1ifyd4q0",
|
10
|
+
label: "plasma-new-hope__StyledFlex"
|
11
|
+
})(/*#__PURE__*/String(flexCenter), ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ2FsZW5kYXIvdWkvQ2FsZW5kYXJNb250aHMvQ2FsZW5kYXJNb250aHMuc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVVvQyIsImZpbGUiOiIuLi8uLi8uLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL0NhbGVuZGFyL3VpL0NhbGVuZGFyTW9udGhzL0NhbGVuZGFyTW9udGhzLnN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuaW1wb3J0IHsgdG9rZW5zIH0gZnJvbSAnLi4vLi4vQ2FsZW5kYXIudG9rZW5zJztcbmltcG9ydCB7IGZsZXhDZW50ZXIgfSBmcm9tICcuLi8uLi9taXhpbnMnO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkQ2FsZW5kYXJNb250aHMgPSBzdHlsZWQuZGl2YFxuICAgIHBhZGRpbmc6IHZhcigke3Rva2Vucy5jYWxlbmRhck1vbnRoc1BhZGRpbmd9KTtcbiAgICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuYDtcblxuZXhwb3J0IGNvbnN0IFN0eWxlZEZsZXggPSBzdHlsZWQuZGl2YFxuICAgICR7U3RyaW5nKGZsZXhDZW50ZXIpfTtcbmA7XG4iXX0= */"));
|
@@ -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, {
|
11
|
+
import React, { 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 } from "./CalendarQuarters.styles";
|
16
|
+
import { StyledCalendarQuarters, StyledFlex } 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({}, "".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, ")"));
|
53
|
+
var quarterItemTokens = _defineProperty(_defineProperty(_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.dateStructureWidth), "var(".concat(tokens.calendarQuarterItemWidth, ")")), "".concat(innerTokens.dateStructureHeight), "var(".concat(tokens.calendarQuarterItemHeight, ")")), "".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,7 +110,8 @@ 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(
|
113
|
+
return /*#__PURE__*/React.createElement(StyledFlex, {
|
114
|
+
role: "row",
|
114
115
|
key: i
|
115
116
|
}, quarter.map(function (_ref2, j) {
|
116
117
|
var quarterName = _ref2.quarterName,
|
@@ -1,6 +1,11 @@
|
|
1
1
|
import _styled from "@emotion/styled/base";
|
2
2
|
import { tokens } from "../../Calendar.tokens";
|
3
|
+
import { flexCenter } from "../../mixins";
|
3
4
|
export var StyledCalendarQuarters = /*#__PURE__*/_styled("div", {
|
4
|
-
target: "
|
5
|
+
target: "e1upfrix1",
|
5
6
|
label: "plasma-new-hope__StyledCalendarQuarters"
|
6
|
-
})("padding:var(", tokens.calendarQuartersPadding, ");box-sizing:border-box;
|
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
|
+
target: "e1upfrix0",
|
10
|
+
label: "plasma-new-hope__StyledFlex"
|
11
|
+
})(/*#__PURE__*/String(flexCenter), ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQ2FsZW5kYXIvdWkvQ2FsZW5kYXJRdWFydGVycy9DYWxlbmRhclF1YXJ0ZXJzLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFVb0MiLCJmaWxlIjoiLi4vLi4vLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9DYWxlbmRhci91aS9DYWxlbmRhclF1YXJ0ZXJzL0NhbGVuZGFyUXVhcnRlcnMuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5pbXBvcnQgeyB0b2tlbnMgfSBmcm9tICcuLi8uLi9DYWxlbmRhci50b2tlbnMnO1xuaW1wb3J0IHsgZmxleENlbnRlciB9IGZyb20gJy4uLy4uL21peGlucyc7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRDYWxlbmRhclF1YXJ0ZXJzID0gc3R5bGVkLmRpdmBcbiAgICBwYWRkaW5nOiB2YXIoJHt0b2tlbnMuY2FsZW5kYXJRdWFydGVyc1BhZGRpbmd9KTtcbiAgICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuYDtcblxuZXhwb3J0IGNvbnN0IFN0eWxlZEZsZXggPSBzdHlsZWQuZGl2YFxuICAgICR7U3RyaW5nKGZsZXhDZW50ZXIpfTtcbmA7XG4iXX0= */"));
|
@@ -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, {
|
11
|
+
import React, { 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 } from "./CalendarYears.styles";
|
16
|
+
import { StyledCalendarYears, StyledFlex } 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({}, "".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, ")"));
|
55
|
+
var yearItemTokens = _defineProperty(_defineProperty(_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.dateStructureWidth), "var(".concat(tokens.calendarYearItemWidth, ")")), "".concat(innerTokens.dateStructureHeight), "var(".concat(tokens.calendarYearItemHeight, ")")), "".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,7 +112,8 @@ 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(
|
115
|
+
return /*#__PURE__*/React.createElement(StyledFlex, {
|
116
|
+
role: "row",
|
116
117
|
key: i
|
117
118
|
}, year.map(function (_ref2, j) {
|
118
119
|
var yearValue = _ref2.yearValue,
|