@salutejs/plasma-new-hope 0.88.0-canary.1224.9413433725.0 → 0.88.0-canary.1224.9504044130.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Calendar/Calendar.tokens.js +3 -0
- package/cjs/components/Calendar/Calendar.tokens.js.map +1 -1
- package/cjs/components/Calendar/CalendarBase/CalendarBase.css +21 -21
- package/cjs/components/Calendar/CalendarDouble/CalendarDouble.css +21 -21
- package/cjs/components/Calendar/ui/CalendarDayItem/CalendarDayItem.css +4 -4
- package/cjs/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles.js +3 -3
- package/cjs/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles_fznpy7.css +4 -0
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.css +4 -4
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.css +8 -8
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js +5 -0
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +3 -3
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js.map +1 -1
- package/{es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles_1b92i4d.css → cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles_gnorek.css} +4 -4
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.css +4 -4
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js +1 -1
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.styles_wmlwil.css +4 -0
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.css +4 -4
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.styles.js +1 -1
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.styles.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.styles_f2aje6.css +4 -0
- package/cjs/components/DatePicker/DatePicker.tokens.js +3 -0
- package/cjs/components/DatePicker/DatePicker.tokens.js.map +1 -1
- package/cjs/components/DatePicker/DatePickerBase.styles.js +1 -1
- package/cjs/components/DatePicker/DatePickerBase.styles.js.map +1 -1
- package/cjs/components/DatePicker/{DatePickerBase.styles_1u3oyx8.css → DatePickerBase.styles_1thp2xv.css} +1 -1
- package/cjs/components/DatePicker/RangeDate/DatePicker.css +83 -81
- package/cjs/components/DatePicker/RangeDate/DatePicker.js +72 -128
- package/cjs/components/DatePicker/RangeDate/DatePicker.js.map +1 -1
- package/cjs/components/DatePicker/RangeDate/DatePicker.styles.js +13 -1
- package/cjs/components/DatePicker/RangeDate/DatePicker.styles.js.map +1 -1
- package/cjs/components/DatePicker/RangeDate/{DatePicker.styles_1aihs63.css → DatePicker.styles_6cvsgx.css} +2 -0
- package/cjs/components/DatePicker/RangeDate/{RangeDoubleDate/RangeDoubleDate.css → RangeDatePopover/RangeDatePopover.css} +31 -29
- package/cjs/components/DatePicker/RangeDate/{RangeDoubleDate/RangeDoubleDate.js → RangeDatePopover/RangeDatePopover.js} +37 -6
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js.map +1 -0
- package/cjs/components/DatePicker/RangeDate/{RangeDoubleDate/RangeDoubleDate.styles.js → RangeDatePopover/RangeDatePopover.styles.js} +20 -10
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js.map +1 -0
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles_wp3vfj.css +2 -0
- package/cjs/components/DatePicker/RangeDate/variations/_readonly/base.js +1 -1
- package/cjs/components/DatePicker/RangeDate/variations/_readonly/base.js.map +1 -1
- package/cjs/components/DatePicker/RangeDate/variations/_readonly/base_dhosc0.css +1 -0
- package/cjs/components/DatePicker/RangeDate/variations/_size/base.js +1 -1
- package/cjs/components/DatePicker/RangeDate/variations/_size/base.js.map +1 -1
- package/cjs/components/DatePicker/RangeDate/variations/_size/base_c0144z.css +1 -0
- package/cjs/components/DatePicker/RangeDate/variations/_view/base.js +1 -1
- package/cjs/components/DatePicker/RangeDate/variations/_view/base.js.map +1 -1
- package/cjs/components/DatePicker/RangeDate/variations/_view/base_1vly6xz.css +1 -0
- package/cjs/components/DatePicker/SingleDate/DatePicker.css +24 -24
- package/cjs/components/DatePicker/SingleDate/DatePicker.styles.js +1 -1
- package/cjs/components/DatePicker/SingleDate/DatePicker.styles.js.map +1 -1
- package/{es/components/DatePicker/SingleDate/DatePicker.styles_1udo3ch.css → cjs/components/DatePicker/SingleDate/DatePicker.styles_1reoff2.css} +1 -1
- package/cjs/components/Range/Range.css +6 -12
- package/cjs/components/Range/Range.js +32 -64
- package/cjs/components/Range/Range.js.map +1 -1
- package/cjs/components/Range/Range.styles.js +11 -23
- package/cjs/components/Range/Range.styles.js.map +1 -1
- package/cjs/components/Range/{Range.styles_nik84l.css → Range.styles_9rort8.css} +3 -4
- package/cjs/components/Range/variations/_readonly/base.js +1 -1
- package/cjs/components/Range/variations/_readonly/base_tzdxy8.css +1 -0
- package/cjs/components/Range/variations/_size/base.js +1 -1
- package/cjs/components/Range/variations/_size/{base_gbgxzj.css → base_16xiubi.css} +1 -1
- package/cjs/components/Range/variations/_view/base.js +1 -1
- package/cjs/components/Range/variations/_view/base_5iz3nr.css +1 -0
- package/cjs/index.css +39 -35
- package/es/components/Calendar/Calendar.tokens.js +3 -0
- package/es/components/Calendar/Calendar.tokens.js.map +1 -1
- package/es/components/Calendar/CalendarBase/CalendarBase.css +21 -21
- package/es/components/Calendar/CalendarDouble/CalendarDouble.css +21 -21
- package/es/components/Calendar/ui/CalendarDayItem/CalendarDayItem.css +4 -4
- package/es/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles.js +3 -3
- package/es/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles.js.map +1 -1
- package/es/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles_fznpy7.css +4 -0
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.css +4 -4
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.css +8 -8
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js +5 -0
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +3 -3
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js.map +1 -1
- package/{cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles_1b92i4d.css → es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles_gnorek.css} +4 -4
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.css +4 -4
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js +1 -1
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js.map +1 -1
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.styles_wmlwil.css +4 -0
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.css +4 -4
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.styles.js +1 -1
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.styles.js.map +1 -1
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.styles_f2aje6.css +4 -0
- package/es/components/DatePicker/DatePicker.tokens.js +3 -0
- package/es/components/DatePicker/DatePicker.tokens.js.map +1 -1
- package/es/components/DatePicker/DatePickerBase.styles.js +1 -1
- package/es/components/DatePicker/DatePickerBase.styles.js.map +1 -1
- package/es/components/DatePicker/{DatePickerBase.styles_1u3oyx8.css → DatePickerBase.styles_1thp2xv.css} +1 -1
- package/es/components/DatePicker/RangeDate/DatePicker.css +83 -81
- package/es/components/DatePicker/RangeDate/DatePicker.js +73 -129
- package/es/components/DatePicker/RangeDate/DatePicker.js.map +1 -1
- package/es/components/DatePicker/RangeDate/DatePicker.styles.js +12 -2
- package/es/components/DatePicker/RangeDate/DatePicker.styles.js.map +1 -1
- package/es/components/DatePicker/RangeDate/{DatePicker.styles_1aihs63.css → DatePicker.styles_6cvsgx.css} +2 -0
- package/es/components/DatePicker/RangeDate/{RangeDoubleDate/RangeDoubleDate.css → RangeDatePopover/RangeDatePopover.css} +31 -29
- package/es/components/DatePicker/RangeDate/{RangeDoubleDate/RangeDoubleDate.js → RangeDatePopover/RangeDatePopover.js} +36 -5
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js.map +1 -0
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +37 -0
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js.map +1 -0
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles_wp3vfj.css +2 -0
- package/es/components/DatePicker/RangeDate/variations/_readonly/base.js +1 -1
- package/es/components/DatePicker/RangeDate/variations/_readonly/base.js.map +1 -1
- package/es/components/DatePicker/RangeDate/variations/_readonly/base_dhosc0.css +1 -0
- package/es/components/DatePicker/RangeDate/variations/_size/base.js +1 -1
- package/es/components/DatePicker/RangeDate/variations/_size/base.js.map +1 -1
- package/es/components/DatePicker/RangeDate/variations/_size/base_c0144z.css +1 -0
- package/es/components/DatePicker/RangeDate/variations/_view/base.js +1 -1
- package/es/components/DatePicker/RangeDate/variations/_view/base.js.map +1 -1
- package/es/components/DatePicker/RangeDate/variations/_view/base_1vly6xz.css +1 -0
- package/es/components/DatePicker/SingleDate/DatePicker.css +24 -24
- package/es/components/DatePicker/SingleDate/DatePicker.styles.js +1 -1
- package/es/components/DatePicker/SingleDate/DatePicker.styles.js.map +1 -1
- package/{cjs/components/DatePicker/SingleDate/DatePicker.styles_1udo3ch.css → es/components/DatePicker/SingleDate/DatePicker.styles_1reoff2.css} +1 -1
- package/es/components/Range/Range.css +6 -12
- package/es/components/Range/Range.js +33 -65
- package/es/components/Range/Range.js.map +1 -1
- package/es/components/Range/Range.styles.js +12 -23
- package/es/components/Range/Range.styles.js.map +1 -1
- package/es/components/Range/{Range.styles_nik84l.css → Range.styles_9rort8.css} +3 -4
- package/es/components/Range/variations/_readonly/base.js +1 -1
- package/es/components/Range/variations/_readonly/base_tzdxy8.css +1 -0
- package/es/components/Range/variations/_size/base.js +1 -1
- package/es/components/Range/variations/_size/{base_gbgxzj.css → base_16xiubi.css} +1 -1
- package/es/components/Range/variations/_view/base.js +1 -1
- package/es/components/Range/variations/_view/base_5iz3nr.css +1 -0
- package/es/index.css +39 -35
- package/package.json +2 -2
- package/styled-components/cjs/components/Calendar/Calendar.tokens.js +3 -0
- package/styled-components/cjs/components/Calendar/mixins/selected.js +2 -7
- package/styled-components/cjs/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles.js +12 -17
- package/styled-components/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js +5 -0
- package/styled-components/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +4 -4
- package/styled-components/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js +7 -7
- package/styled-components/cjs/components/Calendar/ui/CalendarYears/CalendarYears.styles.js +8 -8
- package/styled-components/cjs/components/DatePicker/DatePicker.template-doc.mdx +150 -0
- package/styled-components/cjs/components/DatePicker/DatePicker.tokens.js +3 -0
- package/styled-components/cjs/components/DatePicker/DatePickerBase.styles.js +1 -1
- package/styled-components/cjs/components/DatePicker/RangeDate/DatePicker.js +72 -128
- package/styled-components/cjs/components/DatePicker/RangeDate/DatePicker.styles.js +8 -2
- package/styled-components/cjs/components/DatePicker/RangeDate/{RangeDoubleDate/RangeDoubleDate.js → RangeDatePopover/RangeDatePopover.js} +36 -5
- package/styled-components/cjs/components/DatePicker/RangeDate/{RangeDoubleDate/RangeDoubleDate.styles.js → RangeDatePopover/RangeDatePopover.styles.js} +12 -6
- package/styled-components/cjs/components/DatePicker/RangeDate/variations/_readonly/base.js +2 -1
- package/styled-components/cjs/components/DatePicker/RangeDate/variations/_size/base.js +2 -1
- package/styled-components/cjs/components/DatePicker/RangeDate/variations/_view/base.js +3 -1
- package/styled-components/cjs/components/DatePicker/SingleDate/DatePicker.styles.js +1 -1
- package/styled-components/cjs/components/Range/Range.js +32 -63
- package/styled-components/cjs/components/Range/Range.styles.js +8 -13
- package/styled-components/cjs/examples/plasma_b2c/components/Calendar/CalendarBase.config.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Calendar/CalendarDouble.config.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/DatePicker/DatePicker.config.js +5 -5
- package/styled-components/cjs/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +15 -66
- package/styled-components/cjs/examples/plasma_b2c/components/Range/Range.config.js +4 -4
- package/styled-components/cjs/examples/plasma_web/components/Calendar/CalendarBase.config.js +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Calendar/CalendarDouble.config.js +2 -2
- package/styled-components/cjs/examples/plasma_web/components/DatePicker/DatePicker.config.js +6 -6
- package/styled-components/cjs/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +15 -66
- package/styled-components/cjs/examples/plasma_web/components/Range/Range.config.js +4 -4
- package/styled-components/cjs/examples/sds_engineer/components/Calendar/CalendarBase.config.js +1 -1
- package/styled-components/cjs/examples/sds_engineer/components/Calendar/CalendarDouble.config.js +2 -2
- package/styled-components/es/components/Calendar/Calendar.tokens.js +3 -0
- package/styled-components/es/components/Calendar/mixins/selected.js +2 -7
- package/styled-components/es/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles.js +12 -17
- package/styled-components/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js +5 -0
- package/styled-components/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +4 -4
- package/styled-components/es/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.js +8 -8
- package/styled-components/es/components/Calendar/ui/CalendarYears/CalendarYears.styles.js +9 -9
- package/styled-components/es/components/DatePicker/DatePicker.template-doc.mdx +150 -0
- package/styled-components/es/components/DatePicker/DatePicker.tokens.js +3 -0
- package/styled-components/es/components/DatePicker/DatePickerBase.styles.js +1 -1
- package/styled-components/es/components/DatePicker/RangeDate/DatePicker.js +73 -129
- package/styled-components/es/components/DatePicker/RangeDate/DatePicker.styles.js +7 -1
- package/styled-components/es/components/DatePicker/RangeDate/{RangeDoubleDate/RangeDoubleDate.js → RangeDatePopover/RangeDatePopover.js} +34 -3
- package/styled-components/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +19 -0
- package/styled-components/es/components/DatePicker/RangeDate/variations/_readonly/base.js +2 -1
- package/styled-components/es/components/DatePicker/RangeDate/variations/_size/base.js +2 -1
- package/styled-components/es/components/DatePicker/RangeDate/variations/_view/base.js +3 -1
- package/styled-components/es/components/DatePicker/SingleDate/DatePicker.styles.js +2 -2
- package/styled-components/es/components/Range/Range.js +34 -65
- package/styled-components/es/components/Range/Range.styles.js +8 -13
- package/styled-components/es/examples/plasma_b2c/components/Calendar/CalendarBase.config.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Calendar/CalendarDouble.config.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/DatePicker/DatePicker.config.js +5 -5
- package/styled-components/es/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +15 -66
- package/styled-components/es/examples/plasma_b2c/components/Range/Range.config.js +4 -4
- package/styled-components/es/examples/plasma_web/components/Calendar/CalendarBase.config.js +1 -1
- package/styled-components/es/examples/plasma_web/components/Calendar/CalendarDouble.config.js +2 -2
- package/styled-components/es/examples/plasma_web/components/DatePicker/DatePicker.config.js +6 -6
- package/styled-components/es/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +15 -66
- package/styled-components/es/examples/plasma_web/components/Range/Range.config.js +4 -4
- package/styled-components/es/examples/sds_engineer/components/Calendar/CalendarBase.config.js +1 -1
- package/styled-components/es/examples/sds_engineer/components/Calendar/CalendarDouble.config.js +2 -2
- package/types/components/Calendar/Calendar.tokens.d.ts +3 -0
- package/types/components/Calendar/Calendar.tokens.d.ts.map +1 -1
- package/types/components/Calendar/mixins/selected.d.ts +0 -20
- package/types/components/Calendar/mixins/selected.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarMonths/CalendarMonths.styles.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarYears/CalendarYears.styles.d.ts.map +1 -1
- package/types/components/DatePicker/DatePicker.tokens.d.ts +3 -0
- package/types/components/DatePicker/DatePicker.tokens.d.ts.map +1 -1
- package/types/components/DatePicker/DatePickerBase.styles.d.ts.map +1 -1
- package/types/components/DatePicker/RangeDate/DatePicker.d.ts +598 -2
- package/types/components/DatePicker/RangeDate/DatePicker.d.ts.map +1 -1
- package/types/components/DatePicker/RangeDate/DatePicker.styles.d.ts +5 -30
- package/types/components/DatePicker/RangeDate/DatePicker.styles.d.ts.map +1 -1
- package/types/components/DatePicker/RangeDate/DatePicker.types.d.ts +7 -59
- package/types/components/DatePicker/RangeDate/DatePicker.types.d.ts.map +1 -1
- package/types/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.d.ts +4 -0
- package/types/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.d.ts.map +1 -0
- package/types/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.d.ts +5 -0
- package/types/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.d.ts.map +1 -0
- package/types/components/DatePicker/RangeDate/{RangeDoubleDate/RangeDoubleDate.types.d.ts → RangeDatePopover/RangeDatePopover.types.d.ts} +11 -3
- package/types/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.types.d.ts.map +1 -0
- package/types/components/DatePicker/RangeDate/variations/_readonly/base.d.ts.map +1 -1
- package/types/components/DatePicker/RangeDate/variations/_size/base.d.ts.map +1 -1
- package/types/components/DatePicker/RangeDate/variations/_view/base.d.ts.map +1 -1
- package/types/components/DatePicker/SingleDate/DatePicker.styles.d.ts.map +1 -1
- package/types/components/DatePicker/SingleDate/DatePicker.types.d.ts +5 -0
- package/types/components/DatePicker/SingleDate/DatePicker.types.d.ts.map +1 -1
- package/types/components/Range/Range.d.ts.map +1 -1
- package/types/components/Range/Range.styles.d.ts +0 -1
- package/types/components/Range/Range.styles.d.ts.map +1 -1
- package/types/components/Range/Range.types.d.ts +1 -42
- package/types/components/Range/Range.types.d.ts.map +1 -1
- package/types/components/Range/index.d.ts +1 -1
- package/types/components/Range/index.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Calendar/CalendarDouble.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/DatePicker/DatePicker.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/DatePicker/DatePicker.d.ts +4 -338
- package/types/examples/plasma_b2c/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Range/Range.d.ts +3 -30
- package/types/examples/plasma_b2c/components/Range/Range.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Calendar/CalendarDouble.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/DatePicker/DatePicker.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/DatePicker/DatePicker.d.ts +4 -338
- package/types/examples/plasma_web/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Range/Range.d.ts +3 -30
- package/types/examples/plasma_web/components/Range/Range.d.ts.map +1 -1
- package/types/examples/sds_engineer/components/Calendar/CalendarDouble.config.d.ts.map +1 -1
- package/cjs/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles_wuxgzs.css +0 -4
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.styles_7kz2z4.css +0 -4
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.styles_hbv1kh.css +0 -4
- package/cjs/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.js.map +0 -1
- package/cjs/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.styles.js.map +0 -1
- package/cjs/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.styles_x3to15.css +0 -1
- package/cjs/components/DatePicker/RangeDate/variations/_readonly/base_1851hxh.css +0 -1
- package/cjs/components/DatePicker/RangeDate/variations/_size/base_1yswrwb.css +0 -1
- package/cjs/components/DatePicker/RangeDate/variations/_view/base_x642ct.css +0 -1
- package/cjs/components/Range/variations/_readonly/base_yv1z2h.css +0 -1
- package/cjs/components/Range/variations/_view/base_87gpil.css +0 -1
- package/es/components/Calendar/ui/CalendarDayItem/CalendarDayItem.styles_wuxgzs.css +0 -4
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.styles_7kz2z4.css +0 -4
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.styles_hbv1kh.css +0 -4
- package/es/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.js.map +0 -1
- package/es/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.styles.js +0 -28
- package/es/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.styles.js.map +0 -1
- package/es/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.styles_x3to15.css +0 -1
- package/es/components/DatePicker/RangeDate/variations/_readonly/base_1851hxh.css +0 -1
- package/es/components/DatePicker/RangeDate/variations/_size/base_1yswrwb.css +0 -1
- package/es/components/DatePicker/RangeDate/variations/_view/base_x642ct.css +0 -1
- package/es/components/Range/variations/_readonly/base_yv1z2h.css +0 -1
- package/es/components/Range/variations/_view/base_87gpil.css +0 -1
- package/styled-components/es/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.styles.js +0 -13
- package/types/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.d.ts +0 -4
- package/types/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.d.ts.map +0 -1
- package/types/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.styles.d.ts +0 -4
- package/types/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.styles.d.ts.map +0 -1
- package/types/components/DatePicker/RangeDate/RangeDoubleDate/RangeDoubleDate.types.d.ts.map +0 -1
- /package/styled-components/cjs/components/DatePicker/RangeDate/{RangeDoubleDate/RangeDoubleDate.types.js → RangeDatePopover/RangeDatePopover.types.js} +0 -0
- /package/styled-components/es/components/DatePicker/RangeDate/{RangeDoubleDate/RangeDoubleDate.types.js → RangeDatePopover/RangeDatePopover.types.js} +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
var _excluded = ["className", "
|
1
|
+
var _excluded = ["className", "isDoubleCalendar", "isOpen", "label", "leftHelper", "contentLeft", "contentRight", "view", "size", "readOnly", "disabled", "dividerVariant", "dividerIcon", "defaultFirstDate", "defaultSecondDate", "firstValueError", "secondValueError", "firstValueSuccess", "secondValueSuccess", "firstPlaceholder", "secondPlaceholder", "firstTextfieldContentLeft", "firstTextfieldContentRight", "secondTextfieldContentLeft", "secondTextfieldContentRight", "firstTextfieldTextBefore", "secondTextfieldTextBefore", "firstTextfieldTextAfter", "secondTextfieldTextAfter", "format", "maskWithFormat", "min", "max", "includeEdgeDates", "eventList", "disabledList", "type", "placement", "closeOnOverlayClick", "closeOnEsc", "offset", "onToggle", "onChangeFirstValue", "onChangeSecondValue", "onCommitFirstDate", "onCommitSecondDate", "onFocusFirstTextfield", "onFocusSecondTextfield", "onBlurFirstTextfield", "onBlurSecondTextfield"];
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
3
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
4
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."); }
|
@@ -13,24 +13,20 @@ import { cx } from '../../../utils';
|
|
13
13
|
import { formatCalendarValue, formatInputValue, getDateFormatDelimiter } from '../utils/dateHelper';
|
14
14
|
import { useDatePicker } from '../hooks/useDatePicker';
|
15
15
|
import { classes } from '../DatePicker.tokens';
|
16
|
-
import { StyledCalendar } from '../DatePickerBase.styles';
|
17
16
|
import { base as sizeCSS } from './variations/_size/base';
|
18
17
|
import { base as viewCSS } from './variations/_view/base';
|
19
18
|
import { base as disabledCSS } from './variations/_disabled/base';
|
20
19
|
import { base as readOnlyCSS } from './variations/_readonly/base';
|
21
|
-
import { StyledRange, base } from './DatePicker.styles';
|
22
|
-
import {
|
20
|
+
import { LeftHelper, StyledLabel, StyledRange, base } from './DatePicker.styles';
|
21
|
+
import { RangeDatePopover } from './RangeDatePopover/RangeDatePopover';
|
23
22
|
export var datePickerRangeRoot = function datePickerRangeRoot(Root) {
|
24
23
|
return /*#__PURE__*/forwardRef(function (_ref, ref) {
|
25
24
|
var _rangeRef$current, _rangeRef$current2;
|
26
25
|
var className = _ref.className,
|
27
|
-
_ref$isOpenFirst = _ref.isOpenFirst,
|
28
|
-
isOpenFirst = _ref$isOpenFirst === void 0 ? false : _ref$isOpenFirst,
|
29
|
-
_ref$isOpenSecond = _ref.isOpenSecond,
|
30
|
-
isOpenSecond = _ref$isOpenSecond === void 0 ? false : _ref$isOpenSecond,
|
31
26
|
_ref$isDoubleCalendar = _ref.isDoubleCalendar,
|
32
27
|
isDoubleCalendar = _ref$isDoubleCalendar === void 0 ? false : _ref$isDoubleCalendar,
|
33
|
-
|
28
|
+
_ref$isOpen = _ref.isOpen,
|
29
|
+
isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
|
34
30
|
label = _ref.label,
|
35
31
|
leftHelper = _ref.leftHelper,
|
36
32
|
contentLeft = _ref.contentLeft,
|
@@ -77,10 +73,10 @@ export var datePickerRangeRoot = function datePickerRangeRoot(Root) {
|
|
77
73
|
placement = _ref$placement === void 0 ? ['top', 'bottom'] : _ref$placement,
|
78
74
|
_ref$closeOnOverlayCl = _ref.closeOnOverlayClick,
|
79
75
|
closeOnOverlayClick = _ref$closeOnOverlayCl === void 0 ? true : _ref$closeOnOverlayCl,
|
76
|
+
_ref$closeOnEsc = _ref.closeOnEsc,
|
77
|
+
closeOnEsc = _ref$closeOnEsc === void 0 ? true : _ref$closeOnEsc,
|
80
78
|
offset = _ref.offset,
|
81
|
-
|
82
|
-
onToggleFirst = _ref.onToggleFirst,
|
83
|
-
onToggleSecond = _ref.onToggleSecond,
|
79
|
+
onToggle = _ref.onToggle,
|
84
80
|
onChangeFirstValue = _ref.onChangeFirstValue,
|
85
81
|
onChangeSecondValue = _ref.onChangeSecondValue,
|
86
82
|
onCommitFirstDate = _ref.onCommitFirstDate,
|
@@ -100,34 +96,26 @@ export var datePickerRangeRoot = function datePickerRangeRoot(Root) {
|
|
100
96
|
_useState4 = _slicedToArray(_useState3, 2),
|
101
97
|
secondInputRef = _useState4[0],
|
102
98
|
setSecondInputRef = _useState4[1];
|
103
|
-
var _useState5 = useState(
|
99
|
+
var _useState5 = useState(isOpen),
|
104
100
|
_useState6 = _slicedToArray(_useState5, 2),
|
105
|
-
|
106
|
-
|
107
|
-
var _useState7 = useState(
|
101
|
+
isInnerOpen = _useState6[0],
|
102
|
+
setIsInnerOpen = _useState6[1];
|
103
|
+
var _useState7 = useState(formatCalendarValue(defaultFirstDate, format)),
|
108
104
|
_useState8 = _slicedToArray(_useState7, 2),
|
109
|
-
|
110
|
-
|
111
|
-
var _useState9 = useState(
|
105
|
+
calendarFirstValue = _useState8[0],
|
106
|
+
setCalendarFirstValue = _useState8[1];
|
107
|
+
var _useState9 = useState(formatInputValue(defaultFirstDate, format)),
|
112
108
|
_useState10 = _slicedToArray(_useState9, 2),
|
113
|
-
|
114
|
-
|
115
|
-
var _useState11 = useState(formatCalendarValue(
|
109
|
+
inputFirstValue = _useState10[0],
|
110
|
+
setInputFirstValue = _useState10[1];
|
111
|
+
var _useState11 = useState(formatCalendarValue(defaultSecondDate, format)),
|
116
112
|
_useState12 = _slicedToArray(_useState11, 2),
|
117
|
-
|
118
|
-
|
119
|
-
var _useState13 = useState(formatInputValue(
|
113
|
+
calendarSecondValue = _useState12[0],
|
114
|
+
setCalendarSecondValue = _useState12[1];
|
115
|
+
var _useState13 = useState(formatInputValue(defaultSecondDate, format)),
|
120
116
|
_useState14 = _slicedToArray(_useState13, 2),
|
121
|
-
|
122
|
-
|
123
|
-
var _useState15 = useState(formatCalendarValue(defaultSecondDate, format)),
|
124
|
-
_useState16 = _slicedToArray(_useState15, 2),
|
125
|
-
calendarSecondValue = _useState16[0],
|
126
|
-
setCalendarSecondValue = _useState16[1];
|
127
|
-
var _useState17 = useState(formatInputValue(defaultSecondDate, format)),
|
128
|
-
_useState18 = _slicedToArray(_useState17, 2),
|
129
|
-
inputSecondValue = _useState18[0],
|
130
|
-
setInputSecondValue = _useState18[1];
|
117
|
+
inputSecondValue = _useState14[0],
|
118
|
+
setInputSecondValue = _useState14[1];
|
131
119
|
var dateFormatDelimiter = useCallback(function () {
|
132
120
|
return getDateFormatDelimiter(format);
|
133
121
|
}, [format]);
|
@@ -135,7 +123,7 @@ export var datePickerRangeRoot = function datePickerRangeRoot(Root) {
|
|
135
123
|
currentValue: inputFirstValue,
|
136
124
|
setInputValue: setInputFirstValue,
|
137
125
|
setCalendarValue: setCalendarFirstValue,
|
138
|
-
setIsInnerOpen:
|
126
|
+
setIsInnerOpen: setIsInnerOpen,
|
139
127
|
dateFormatDelimiter: dateFormatDelimiter,
|
140
128
|
format: format,
|
141
129
|
disabled: disabled,
|
@@ -144,18 +132,16 @@ export var datePickerRangeRoot = function datePickerRangeRoot(Root) {
|
|
144
132
|
valueError: firstValueError,
|
145
133
|
valueSuccess: firstValueSuccess,
|
146
134
|
inputRef: firstInputRef,
|
147
|
-
onToggle: onToggleFirst,
|
148
135
|
onChangeValue: onChangeFirstValue,
|
149
136
|
onCommitDate: onCommitFirstDate
|
150
137
|
}),
|
151
|
-
handleToggleFirst = _useDatePicker.handleToggle,
|
152
138
|
handleChangeFirstValue = _useDatePicker.handleChangeValue,
|
153
139
|
handleCommitFirstDate = _useDatePicker.handleCommitDate;
|
154
140
|
var _useDatePicker2 = useDatePicker({
|
155
141
|
currentValue: inputSecondValue,
|
156
142
|
setInputValue: setInputSecondValue,
|
157
143
|
setCalendarValue: setCalendarSecondValue,
|
158
|
-
setIsInnerOpen:
|
144
|
+
setIsInnerOpen: setIsInnerOpen,
|
159
145
|
dateFormatDelimiter: dateFormatDelimiter,
|
160
146
|
format: format,
|
161
147
|
disabled: disabled,
|
@@ -164,63 +150,23 @@ export var datePickerRangeRoot = function datePickerRangeRoot(Root) {
|
|
164
150
|
valueError: secondValueError,
|
165
151
|
valueSuccess: secondValueSuccess,
|
166
152
|
inputRef: secondInputRef,
|
167
|
-
onToggle: onToggleSecond,
|
168
153
|
onChangeValue: onChangeSecondValue,
|
169
154
|
onCommitDate: onCommitSecondDate
|
170
155
|
}),
|
171
|
-
handleToggleSecond = _useDatePicker2.handleToggle,
|
172
156
|
handleChangeSecondValue = _useDatePicker2.handleChangeValue,
|
173
157
|
handleCommitSecondDate = _useDatePicker2.handleCommitDate;
|
174
|
-
var
|
158
|
+
var handleToggle = function handleToggle(opened, event) {
|
175
159
|
var _firstInputRef$curren, _secondInputRef$curre;
|
176
160
|
if (disabled || readOnly) {
|
177
161
|
return;
|
178
162
|
}
|
179
163
|
var isCalendarOpen = firstInputRef !== null && firstInputRef !== void 0 && (_firstInputRef$curren = firstInputRef.current) !== null && _firstInputRef$curren !== void 0 && _firstInputRef$curren.contains(event.target || null) || secondInputRef !== null && secondInputRef !== void 0 && (_secondInputRef$curre = secondInputRef.current) !== null && _secondInputRef$curre !== void 0 && _secondInputRef$curre.contains(event.target || null) ? true : opened;
|
180
|
-
if (
|
181
|
-
return
|
164
|
+
if (onToggle) {
|
165
|
+
return onToggle(isCalendarOpen, event);
|
182
166
|
}
|
183
|
-
|
167
|
+
setIsInnerOpen(isCalendarOpen);
|
184
168
|
};
|
185
|
-
var
|
186
|
-
value: calendarFirstValue,
|
187
|
-
type: type,
|
188
|
-
eventList: eventList,
|
189
|
-
disabledList: disabledList,
|
190
|
-
min: min,
|
191
|
-
max: calendarSecondValue || max,
|
192
|
-
includeEdgeDates: includeEdgeDates,
|
193
|
-
isRange: false,
|
194
|
-
onChangeValue: function onChangeValue(date) {
|
195
|
-
handleCommitFirstDate(date, false, true);
|
196
|
-
setIsInnerOpenFirst(false);
|
197
|
-
if (!calendarSecondValue || secondValueError) {
|
198
|
-
var _rangeRef$current3;
|
199
|
-
rangeRef === null || rangeRef === void 0 || (_rangeRef$current3 = rangeRef.current) === null || _rangeRef$current3 === void 0 || (_rangeRef$current3 = _rangeRef$current3.secondTextField()) === null || _rangeRef$current3 === void 0 || (_rangeRef$current3 = _rangeRef$current3.current) === null || _rangeRef$current3 === void 0 || _rangeRef$current3.focus();
|
200
|
-
setIsInnerOpenSecond(true);
|
201
|
-
}
|
202
|
-
}
|
203
|
-
});
|
204
|
-
var SecondCalendar = /*#__PURE__*/React.createElement(StyledCalendar, {
|
205
|
-
value: calendarSecondValue,
|
206
|
-
type: type,
|
207
|
-
eventList: eventList,
|
208
|
-
disabledList: disabledList,
|
209
|
-
min: calendarFirstValue || min,
|
210
|
-
max: max,
|
211
|
-
includeEdgeDates: includeEdgeDates,
|
212
|
-
isRange: false,
|
213
|
-
onChangeValue: function onChangeValue(date) {
|
214
|
-
handleCommitSecondDate(date, false, true);
|
215
|
-
setIsInnerOpenSecond(false);
|
216
|
-
if (!calendarFirstValue || firstValueError) {
|
217
|
-
var _rangeRef$current4;
|
218
|
-
rangeRef === null || rangeRef === void 0 || (_rangeRef$current4 = rangeRef.current) === null || _rangeRef$current4 === void 0 || (_rangeRef$current4 = _rangeRef$current4.firstTextField()) === null || _rangeRef$current4 === void 0 || (_rangeRef$current4 = _rangeRef$current4.current) === null || _rangeRef$current4 === void 0 || _rangeRef$current4.focus();
|
219
|
-
setIsInnerOpenFirst(true);
|
220
|
-
}
|
221
|
-
}
|
222
|
-
});
|
223
|
-
var RangeComponent = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledRange, _extends({
|
169
|
+
var RangeComponent = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledRange, {
|
224
170
|
ref: rangeRef,
|
225
171
|
dividerIcon: dividerIcon,
|
226
172
|
dividerVariant: dividerVariant,
|
@@ -228,8 +174,6 @@ export var datePickerRangeRoot = function datePickerRangeRoot(Root) {
|
|
228
174
|
readOnly: !disabled && readOnly,
|
229
175
|
firstPlaceholder: firstPlaceholder,
|
230
176
|
secondPlaceholder: secondPlaceholder,
|
231
|
-
label: label,
|
232
|
-
leftHelper: leftHelper,
|
233
177
|
contentLeft: contentLeft,
|
234
178
|
contentRight: contentRight,
|
235
179
|
firstTextfieldTextBefore: firstTextfieldTextBefore,
|
@@ -249,67 +193,67 @@ export var datePickerRangeRoot = function datePickerRangeRoot(Root) {
|
|
249
193
|
onChangeFirstValue: handleChangeFirstValue,
|
250
194
|
onChangeSecondValue: handleChangeSecondValue,
|
251
195
|
onSearchFirstValue: function onSearchFirstValue(_, date) {
|
252
|
-
|
196
|
+
handleCommitFirstDate(String(date), true, false);
|
197
|
+
if (!calendarSecondValue || secondValueError) {
|
198
|
+
var _rangeRef$current3;
|
199
|
+
rangeRef === null || rangeRef === void 0 || (_rangeRef$current3 = rangeRef.current) === null || _rangeRef$current3 === void 0 || (_rangeRef$current3 = _rangeRef$current3.secondTextField()) === null || _rangeRef$current3 === void 0 || (_rangeRef$current3 = _rangeRef$current3.current) === null || _rangeRef$current3 === void 0 || _rangeRef$current3.focus();
|
200
|
+
}
|
253
201
|
},
|
254
202
|
onSearchSecondValue: function onSearchSecondValue(_, date) {
|
255
|
-
|
203
|
+
handleCommitSecondDate(String(date), true, false);
|
204
|
+
if (!calendarFirstValue || firstValueError) {
|
205
|
+
var _rangeRef$current4;
|
206
|
+
rangeRef === null || rangeRef === void 0 || (_rangeRef$current4 = rangeRef.current) === null || _rangeRef$current4 === void 0 || (_rangeRef$current4 = _rangeRef$current4.firstTextField()) === null || _rangeRef$current4 === void 0 || (_rangeRef$current4 = _rangeRef$current4.current) === null || _rangeRef$current4 === void 0 || _rangeRef$current4.focus();
|
207
|
+
}
|
256
208
|
},
|
257
209
|
onFocusFirstTextfield: onFocusFirstTextfield,
|
258
210
|
onFocusSecondTextfield: onFocusSecondTextfield,
|
259
211
|
onBlurFirstTextfield: onBlurFirstTextfield,
|
260
212
|
onBlurSecondTextfield: onBlurSecondTextfield
|
261
|
-
}
|
262
|
-
isOpenFirst: isOpenFirst || isInnerOpenFirst,
|
263
|
-
isOpenSecond: isOpenSecond || isInnerOpenSecond,
|
264
|
-
onToggleFirst: handleToggleFirst,
|
265
|
-
onToggleSecond: handleToggleSecond,
|
266
|
-
firstInputPopoverContent: FirstCalendar,
|
267
|
-
secondInputPopoverContent: SecondCalendar,
|
268
|
-
offset: offset,
|
269
|
-
placement: placement,
|
270
|
-
closeOnOverlayClick: closeOnOverlayClick
|
271
|
-
})));
|
213
|
+
}));
|
272
214
|
useEffect(function () {
|
273
215
|
var _rangeRef$current5, _rangeRef$current6;
|
274
216
|
setFirstInputRef((_rangeRef$current5 = rangeRef.current) === null || _rangeRef$current5 === void 0 ? void 0 : _rangeRef$current5.firstTextField());
|
275
217
|
setSecondInputRef((_rangeRef$current6 = rangeRef.current) === null || _rangeRef$current6 === void 0 ? void 0 : _rangeRef$current6.secondTextField());
|
276
218
|
}, [rangeRef.current]);
|
277
|
-
if (isDoubleCalendar) {
|
278
|
-
return /*#__PURE__*/React.createElement(Root, _extends({
|
279
|
-
ref: rootRef,
|
280
|
-
view: view,
|
281
|
-
size: size,
|
282
|
-
className: cx(classes.datePickerRoot, className),
|
283
|
-
disabled: disabled,
|
284
|
-
readOnly: !disabled && readOnly
|
285
|
-
}, rest), /*#__PURE__*/React.createElement(RangeDoubleDate, {
|
286
|
-
calendarValue: [calendarFirstValue, calendarSecondValue],
|
287
|
-
target: RangeComponent,
|
288
|
-
isOpen: isOpenDouble || isInnerOpenDouble,
|
289
|
-
onToggle: handleToggleDouble,
|
290
|
-
onChangeStartOfRange: function onChangeStartOfRange(firstDate) {
|
291
|
-
handleCommitFirstDate(firstDate, false, true);
|
292
|
-
handleCommitSecondDate('');
|
293
|
-
},
|
294
|
-
onChangeValue: function onChangeValue(_ref2) {
|
295
|
-
var _ref3 = _slicedToArray(_ref2, 2),
|
296
|
-
firstDate = _ref3[0],
|
297
|
-
secondDate = _ref3[1];
|
298
|
-
firstDate && handleCommitFirstDate(firstDate, false, true);
|
299
|
-
secondDate && handleCommitSecondDate(secondDate, false, true);
|
300
|
-
if (firstDate && secondDate && !firstValueError && !secondValueError) {
|
301
|
-
setIsInnerOpenDouble(false);
|
302
|
-
}
|
303
|
-
}
|
304
|
-
}));
|
305
|
-
}
|
306
219
|
return /*#__PURE__*/React.createElement(Root, _extends({
|
220
|
+
ref: rootRef,
|
307
221
|
view: view,
|
308
222
|
size: size,
|
309
223
|
className: cx(classes.datePickerRoot, className),
|
310
224
|
disabled: disabled,
|
311
225
|
readOnly: !disabled && readOnly
|
312
|
-
}, rest),
|
226
|
+
}, rest), label && /*#__PURE__*/React.createElement(StyledLabel, null, label), /*#__PURE__*/React.createElement(RangeDatePopover, {
|
227
|
+
calendarValue: [calendarFirstValue, calendarSecondValue],
|
228
|
+
target: RangeComponent,
|
229
|
+
isOpen: isOpen || isInnerOpen,
|
230
|
+
includeEdgeDates: includeEdgeDates,
|
231
|
+
eventList: eventList,
|
232
|
+
disabledList: disabledList,
|
233
|
+
min: min,
|
234
|
+
max: max,
|
235
|
+
placement: placement,
|
236
|
+
closeOnOverlayClick: closeOnOverlayClick,
|
237
|
+
closeOnEsc: closeOnEsc,
|
238
|
+
offset: offset,
|
239
|
+
type: type,
|
240
|
+
onToggle: handleToggle,
|
241
|
+
isDoubleCalendar: isDoubleCalendar,
|
242
|
+
onChangeStartOfRange: function onChangeStartOfRange(firstDate) {
|
243
|
+
handleCommitFirstDate(firstDate, false, true);
|
244
|
+
handleCommitSecondDate('');
|
245
|
+
},
|
246
|
+
onChangeValue: function onChangeValue(_ref2) {
|
247
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
248
|
+
firstDate = _ref3[0],
|
249
|
+
secondDate = _ref3[1];
|
250
|
+
firstDate && handleCommitFirstDate(firstDate, false, true);
|
251
|
+
secondDate && handleCommitSecondDate(secondDate, false, true);
|
252
|
+
if (firstDate && secondDate && !firstValueError && !secondValueError) {
|
253
|
+
setIsInnerOpen(false);
|
254
|
+
}
|
255
|
+
}
|
256
|
+
}), leftHelper && /*#__PURE__*/React.createElement(LeftHelper, null, leftHelper));
|
313
257
|
});
|
314
258
|
};
|
315
259
|
export var datePickerRangeConfig = {
|
@@ -16,4 +16,10 @@ export var StyledPopover = /*#__PURE__*/styled(Popover).withConfig({
|
|
16
16
|
export var StyledRange = /*#__PURE__*/styled(Range).withConfig({
|
17
17
|
componentId: "plasma-new-hope__sc-zxqgpy-1"
|
18
18
|
})(["", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");"], rangeTokens.background, tokens.background, rangeTokens.backgroundError, tokens.backgroundError, rangeTokens.backgroundSuccess, tokens.backgroundSuccess, rangeTokens.borderColor, tokens.borderColor, rangeTokens.borderColorError, tokens.borderColorError, rangeTokens.borderColorSuccess, tokens.borderColorSuccess, rangeTokens.borderWidth, tokens.textFieldBorderWidth, rangeTokens.dividerColor, tokens.dividerColor, rangeTokens.labelColor, tokens.labelColor, rangeTokens.leftHelperColor, tokens.leftHelperColor, rangeTokens.textFieldColor, tokens.textFieldColor, rangeTokens.textFieldPlaceholderColor, tokens.textFieldPlaceholderColor, rangeTokens.textFieldCaretColor, tokens.textFieldCaretColor, rangeTokens.textFieldBackgroundColorFocus, tokens.textFieldBackgroundColorFocus, rangeTokens.textFieldBackgroundErrorColor, tokens.textFieldBackgroundErrorColor, rangeTokens.textFieldBackgroundErrorColorFocus, tokens.textFieldBackgroundErrorColorFocus, rangeTokens.textFieldBackgroundSuccessColor, tokens.textFieldBackgroundSuccessColor, rangeTokens.textFieldBackgroundSuccessColorFocus, tokens.textFieldBackgroundSuccessColorFocus, rangeTokens.textFieldBorderWidth, tokens.textFieldBorderWidth, rangeTokens.textFieldBorderColorFocus, tokens.textFieldBorderColorFocus, rangeTokens.textFieldBorderColorError, tokens.textFieldBorderColorError, rangeTokens.textFieldBorderColorErrorFocus, tokens.textFieldBorderColorErrorFocus, rangeTokens.textFieldBorderColorSuccess, tokens.textFieldBorderColorSuccess, rangeTokens.textFieldBorderColorSuccessFocus, tokens.textFieldBorderColorSuccessFocus, rangeTokens.textFieldTextBeforeColor, tokens.textFieldTextBeforeColor, rangeTokens.textFieldTextAfterColor, tokens.textFieldTextAfterColor, rangeTokens.focusColor, tokens.focusColor, rangeTokens.borderRadius, tokens.borderRadius, rangeTokens.dividerPadding, tokens.dividerPadding, rangeTokens.dividerFontFamily, tokens.dividerFontFamily, rangeTokens.dividerFontStyle, tokens.dividerFontStyle, rangeTokens.dividerFontSize, tokens.dividerFontSize, rangeTokens.dividerFontWeight, tokens.dividerFontWeight, rangeTokens.dividerLetterSpacing, tokens.dividerLetterSpacing, rangeTokens.dividerLineHeight, tokens.dividerLineHeight, rangeTokens.leftContentMargin, tokens.leftContentMargin, rangeTokens.rightContentMargin, tokens.rightContentMargin, rangeTokens.labelOffset, tokens.labelOffset, rangeTokens.labelFontFamily, tokens.labelFontFamily, rangeTokens.labelFontStyle, tokens.labelFontStyle, rangeTokens.labelFontSize, tokens.labelFontSize, rangeTokens.labelFontWeight, tokens.labelFontWeight, rangeTokens.labelLetterSpacing, tokens.labelLetterSpacing, rangeTokens.labelLineHeight, tokens.labelLineHeight, rangeTokens.textFieldHeight, tokens.textFieldHeight, rangeTokens.textFieldBorderRadius, tokens.textFieldBorderRadius, rangeTokens.textFieldPadding, tokens.textFieldPadding, rangeTokens.textFieldFontFamily, tokens.textFieldFontFamily, rangeTokens.textFieldFontStyle, tokens.textFieldFontStyle, rangeTokens.textFieldFontSize, tokens.textFieldFontSize, rangeTokens.textFieldFontWeight, tokens.textFieldFontWeight, rangeTokens.textFieldLetterSpacing, tokens.textFieldLetterSpacing, rangeTokens.textFieldLineHeight, tokens.textFieldLineHeight, rangeTokens.leftHelperOffset, tokens.leftHelperOffset, rangeTokens.leftHelperFontFamily, tokens.leftHelperFontFamily, rangeTokens.leftHelperFontStyle, tokens.leftHelperFontStyle, rangeTokens.leftHelperFontSize, tokens.leftHelperFontSize, rangeTokens.leftHelperFontWeight, tokens.leftHelperFontWeight, rangeTokens.leftHelperLetterSpacing, tokens.leftHelperLetterSpacing, rangeTokens.leftHelperLineHeight, tokens.leftHelperLineHeight, rangeTokens.textFieldLeftContentMargin, tokens.textFieldLeftContentMargin, rangeTokens.textFieldRightContentMargin, tokens.textFieldRightContentMargin, rangeTokens.textFieldTextBeforeMargin, tokens.textFieldTextBeforeMargin, rangeTokens.textFieldTextAfterMargin, tokens.textFieldTextAfterMargin, rangeTokens.backgroundReadOnly, tokens.backgroundReadOnly, rangeTokens.labelColorReadOnly, tokens.labelColorReadOnly, rangeTokens.leftHelperColorReadOnly, tokens.leftHelperColorReadOnly, rangeTokens.dividerColorReadOnly, tokens.dividerColorReadOnly, rangeTokens.textFieldColorReadOnly, tokens.textFieldColorReadOnly, rangeTokens.textFieldBackgroundColorReadOnly, tokens.textFieldBackgroundColorReadOnly, rangeTokens.textFieldPlaceholderColorReadOnly, tokens.textFieldPlaceholderColorReadOnly);
|
19
|
-
export var base = /*#__PURE__*/css([""]);
|
19
|
+
export var base = /*#__PURE__*/css(["display:inline-block;"]);
|
20
|
+
export var StyledLabel = /*#__PURE__*/styled.label.withConfig({
|
21
|
+
componentId: "plasma-new-hope__sc-zxqgpy-2"
|
22
|
+
})([""]);
|
23
|
+
export var LeftHelper = /*#__PURE__*/styled.div.withConfig({
|
24
|
+
componentId: "plasma-new-hope__sc-zxqgpy-3"
|
25
|
+
})([""]);
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { getPlacements } from '../../../../utils';
|
3
3
|
import { StyledPopover } from '../DatePicker.styles';
|
4
|
-
import { StyledCalendar } from './
|
5
|
-
export var
|
4
|
+
import { StyledCalendar, StyledCalendarDouble } from './RangeDatePopover.styles';
|
5
|
+
export var RangeDatePopover = function RangeDatePopover(_ref) {
|
6
6
|
var target = _ref.target,
|
7
7
|
isOpen = _ref.isOpen,
|
8
|
+
isDoubleCalendar = _ref.isDoubleCalendar,
|
8
9
|
calendarValue = _ref.calendarValue,
|
9
10
|
min = _ref.min,
|
10
11
|
max = _ref.max,
|
@@ -15,10 +16,37 @@ export var RangeDoubleDate = function RangeDoubleDate(_ref) {
|
|
15
16
|
placement = _ref$placement === void 0 ? ['top', 'bottom'] : _ref$placement,
|
16
17
|
_ref$closeOnOverlayCl = _ref.closeOnOverlayClick,
|
17
18
|
closeOnOverlayClick = _ref$closeOnOverlayCl === void 0 ? true : _ref$closeOnOverlayCl,
|
19
|
+
closeOnEsc = _ref.closeOnEsc,
|
18
20
|
offset = _ref.offset,
|
21
|
+
type = _ref.type,
|
22
|
+
size = _ref.size,
|
19
23
|
onChangeValue = _ref.onChangeValue,
|
20
24
|
onChangeStartOfRange = _ref.onChangeStartOfRange,
|
21
25
|
onToggle = _ref.onToggle;
|
26
|
+
if (isDoubleCalendar) {
|
27
|
+
return /*#__PURE__*/React.createElement(StyledPopover, {
|
28
|
+
isOpen: isOpen,
|
29
|
+
usePortal: false,
|
30
|
+
onToggle: onToggle,
|
31
|
+
offset: offset,
|
32
|
+
placement: getPlacements(placement),
|
33
|
+
trigger: "click",
|
34
|
+
closeOnOverlayClick: closeOnOverlayClick,
|
35
|
+
isFocusTrapped: false,
|
36
|
+
target: target,
|
37
|
+
preventOverflow: false
|
38
|
+
}, /*#__PURE__*/React.createElement(StyledCalendarDouble, {
|
39
|
+
size: size,
|
40
|
+
value: calendarValue,
|
41
|
+
eventList: eventList,
|
42
|
+
disabledList: disabledList,
|
43
|
+
min: min,
|
44
|
+
max: max,
|
45
|
+
includeEdgeDates: includeEdgeDates,
|
46
|
+
onChangeValue: onChangeValue,
|
47
|
+
onChangeStartOfRange: onChangeStartOfRange
|
48
|
+
}));
|
49
|
+
}
|
22
50
|
return /*#__PURE__*/React.createElement(StyledPopover, {
|
23
51
|
isOpen: isOpen,
|
24
52
|
usePortal: false,
|
@@ -29,13 +57,16 @@ export var RangeDoubleDate = function RangeDoubleDate(_ref) {
|
|
29
57
|
closeOnOverlayClick: closeOnOverlayClick,
|
30
58
|
isFocusTrapped: false,
|
31
59
|
target: target,
|
32
|
-
preventOverflow: false
|
60
|
+
preventOverflow: false,
|
61
|
+
closeOnEsc: closeOnEsc
|
33
62
|
}, /*#__PURE__*/React.createElement(StyledCalendar, {
|
63
|
+
size: size,
|
34
64
|
value: calendarValue,
|
35
65
|
eventList: eventList,
|
36
66
|
disabledList: disabledList,
|
37
67
|
min: min,
|
38
68
|
max: max,
|
69
|
+
type: type,
|
39
70
|
includeEdgeDates: includeEdgeDates,
|
40
71
|
onChangeValue: onChangeValue,
|
41
72
|
onChangeStartOfRange: onChangeStartOfRange
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import styled from 'styled-components';
|
2
|
+
import { calendarDoubleConfig, calendarBaseTokens, withRange, calendarBaseConfig } from '../../../Calendar';
|
3
|
+
import { tokens } from '../../DatePicker.tokens';
|
4
|
+
import { component, mergeConfig } from '../../../../engines';
|
5
|
+
import { baseCalendarTokens } from '../../DatePickerBase.styles';
|
6
|
+
var mergedCalendarDoubleConfig = /*#__PURE__*/mergeConfig(calendarDoubleConfig);
|
7
|
+
var CalendarDouble = /*#__PURE__*/component(mergedCalendarDoubleConfig);
|
8
|
+
var mergedCalendarConfig = /*#__PURE__*/mergeConfig(calendarBaseConfig);
|
9
|
+
var Calendar = /*#__PURE__*/component(mergedCalendarConfig);
|
10
|
+
var CalendarDoubleRange = /*#__PURE__*/withRange(CalendarDouble);
|
11
|
+
var CalendarRange = /*#__PURE__*/withRange(Calendar);
|
12
|
+
|
13
|
+
// NOTE: переопределение токенов Calendar
|
14
|
+
export var StyledCalendarDouble = /*#__PURE__*/styled(CalendarDoubleRange).withConfig({
|
15
|
+
componentId: "plasma-new-hope__sc-vflcna-0"
|
16
|
+
})(["", ":var(", ");", " ", ":calc(var(", ") * 2 + 2.063rem);"], calendarBaseTokens.calendarSeparatorBackground, tokens.calendarSeparatorBackground, baseCalendarTokens, calendarBaseTokens.calendarWidth, tokens.calendarWidth);
|
17
|
+
export var StyledCalendar = /*#__PURE__*/styled(CalendarRange).withConfig({
|
18
|
+
componentId: "plasma-new-hope__sc-vflcna-1"
|
19
|
+
})(["", ""], baseCalendarTokens);
|
@@ -1,3 +1,4 @@
|
|
1
1
|
import { css } from 'styled-components';
|
2
2
|
import { tokens } from '../../../DatePicker.tokens';
|
3
|
-
|
3
|
+
import { LeftHelper, StyledLabel } from '../../DatePicker.styles';
|
4
|
+
export var base = /*#__PURE__*/css(["&[readonly]{cursor:default;", ":transparent;", "{display:block;color:var(", ");}", "{color:var(", ");}}"], tokens.textFieldBackgroundColorReadOnly, StyledLabel, tokens.labelColorReadOnly, LeftHelper, tokens.leftHelperColorReadOnly);
|
@@ -1,3 +1,4 @@
|
|
1
1
|
import { css } from 'styled-components';
|
2
2
|
import { tokens } from '../../../DatePicker.tokens';
|
3
|
-
|
3
|
+
import { StyledLabel, LeftHelper } from '../../DatePicker.styles';
|
4
|
+
export var base = /*#__PURE__*/css(["width:var(", ");", "{margin:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}", "{margin:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}"], tokens.width, StyledLabel, tokens.labelOffset, tokens.labelFontFamily, tokens.labelFontSize, tokens.labelFontStyle, tokens.labelFontWeight, tokens.labelLetterSpacing, tokens.labelLineHeight, LeftHelper, tokens.leftHelperOffset, tokens.leftHelperFontFamily, tokens.leftHelperFontSize, tokens.leftHelperFontStyle, tokens.leftHelperFontWeight, tokens.leftHelperLetterSpacing, tokens.leftHelperLineHeight);
|
@@ -1,2 +1,4 @@
|
|
1
1
|
import { css } from 'styled-components';
|
2
|
-
|
2
|
+
import { LeftHelper, StyledLabel } from '../../DatePicker.styles';
|
3
|
+
import { tokens } from '../../../DatePicker.tokens';
|
4
|
+
export var base = /*#__PURE__*/css(["", "{display:block;color:var(", ");}", "{color:var(", ");}"], StyledLabel, tokens.labelColor, LeftHelper, tokens.leftHelperColor);
|
@@ -3,7 +3,7 @@ import { css } from 'styled-components';
|
|
3
3
|
import { component, mergeConfig } from '../../../engines';
|
4
4
|
import { textFieldConfig, textFieldTokens } from '../../TextField';
|
5
5
|
import { classes, tokens } from '../DatePicker.tokens';
|
6
|
-
import {
|
6
|
+
import { popoverConfig } from '../../Popover';
|
7
7
|
var mergedTextFieldConfig = /*#__PURE__*/mergeConfig(textFieldConfig);
|
8
8
|
var TextField = /*#__PURE__*/component(mergedTextFieldConfig);
|
9
9
|
var mergedPopoverConfig = /*#__PURE__*/mergeConfig(popoverConfig);
|
@@ -16,7 +16,7 @@ export var StyledPopover = /*#__PURE__*/styled(Popover).withConfig({
|
|
16
16
|
export var StyledInput = /*#__PURE__*/styled(TextField).withConfig({
|
17
17
|
componentId: "plasma-new-hope__sc-1ohdd6s-1"
|
18
18
|
})([" ", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");&.", "{", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");}&.", "{", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");}"], textFieldTokens.color, tokens.textFieldColor, textFieldTokens.placeholderColor, tokens.textFieldPlaceholderColor, textFieldTokens.caretColor, tokens.textFieldCaretColor, textFieldTokens.focusColor, tokens.textFieldFocusColor, textFieldTokens.backgroundColor, tokens.textFieldBackgroundColor, textFieldTokens.backgroundColorHover, tokens.textFieldBackgroundColorHover, textFieldTokens.backgroundColorFocus, tokens.textFieldBackgroundColorFocus, textFieldTokens.borderColor, tokens.borderColor, textFieldTokens.borderColorHover, tokens.borderColorHover, textFieldTokens.borderColorFocus, tokens.borderColorFocus, textFieldTokens.colorReadOnly, tokens.textFieldColorReadOnly, textFieldTokens.backgroundColorReadOnly, tokens.textFieldBackgroundColorReadOnly, textFieldTokens.borderColorReadOnly, tokens.textFieldBorderColorReadOnly, textFieldTokens.placeholderColorReadOnly, tokens.textFieldPlaceholderColorReadOnly, textFieldTokens.height, tokens.textFieldHeight, textFieldTokens.borderWidth, tokens.textFieldBorderWidth, textFieldTokens.borderRadius, tokens.textFieldBorderRadius, textFieldTokens.padding, tokens.textFieldPadding, textFieldTokens.leftContentMargin, tokens.textFieldLeftContentMargin, textFieldTokens.rightContentMargin, tokens.textFieldRightContentMargin, textFieldTokens.fontFamily, tokens.textFieldFontFamily, textFieldTokens.fontSize, tokens.textFieldFontSize, textFieldTokens.fontStyle, tokens.textFieldFontStyle, textFieldTokens.fontWeight, tokens.textFieldFontWeight, textFieldTokens.letterSpacing, tokens.textFieldLetterSpacing, textFieldTokens.lineHeight, tokens.textFieldLineHeight, textFieldTokens.disabledOpacity, tokens.disabledOpacity, textFieldTokens.textBeforeColor, tokens.textFieldTextBeforeColor, textFieldTokens.textAfterColor, tokens.textFieldTextAfterColor, textFieldTokens.textBeforeMargin, tokens.textFieldTextBeforeMargin, textFieldTokens.textAfterMargin, tokens.textFieldTextAfterMargin, classes.datePickerError, textFieldTokens.backgroundColor, tokens.textFieldBackgroundErrorColor, textFieldTokens.backgroundColorHover, tokens.textFieldBackgroundErrorColorHover, textFieldTokens.backgroundColorFocus, tokens.textFieldBackgroundErrorColorFocus, textFieldTokens.borderColor, tokens.textFieldBorderColorError, textFieldTokens.borderColorHover, tokens.textFieldBorderColorErrorHover, textFieldTokens.borderColorFocus, tokens.textFieldBorderColorErrorFocus, classes.datePickerSuccess, textFieldTokens.backgroundColor, tokens.textFieldBackgroundSuccessColor, textFieldTokens.backgroundColorHover, tokens.textFieldBackgroundSuccessColorHover, textFieldTokens.backgroundColorFocus, tokens.textFieldBackgroundSuccessColorFocus, textFieldTokens.borderColor, tokens.textFieldBorderColorSuccess, textFieldTokens.borderColorHover, tokens.textFieldBorderColorSuccessHover, textFieldTokens.borderColorFocus, tokens.textFieldBorderColorSuccessFocus);
|
19
|
-
export var base = /*#__PURE__*/css(["
|
19
|
+
export var base = /*#__PURE__*/css(["display:inline-block;"]);
|
20
20
|
export var StyledLabel = /*#__PURE__*/styled.label.withConfig({
|
21
21
|
componentId: "plasma-new-hope__sc-1ohdd6s-2"
|
22
22
|
})([""]);
|
@@ -1,16 +1,16 @@
|
|
1
1
|
var _StyledDivider;
|
2
|
-
var _excluded = ["label", "leftHelper", "contentLeft", "contentRight", "view", "size", "readOnly", "disabled", "dividerVariant", "dividerIcon", "firstValue", "secondValue", "firstValueError", "secondValueError", "firstValueSuccess", "secondValueSuccess", "firstPlaceholder", "secondPlaceholder", "firstTextfieldContentLeft", "firstTextfieldContentRight", "secondTextfieldContentLeft", "secondTextfieldContentRight", "firstTextfieldTextBefore", "secondTextfieldTextBefore", "firstTextfieldTextAfter", "secondTextfieldTextAfter", "
|
2
|
+
var _excluded = ["label", "leftHelper", "contentLeft", "contentRight", "view", "size", "readOnly", "disabled", "dividerVariant", "dividerIcon", "firstValue", "secondValue", "firstValueError", "secondValueError", "firstValueSuccess", "secondValueSuccess", "firstPlaceholder", "secondPlaceholder", "firstTextfieldContentLeft", "firstTextfieldContentRight", "secondTextfieldContentLeft", "secondTextfieldContentRight", "firstTextfieldTextBefore", "secondTextfieldTextBefore", "firstTextfieldTextAfter", "secondTextfieldTextAfter", "onChangeFirstValue", "onChangeSecondValue", "onSearchFirstValue", "onSearchSecondValue", "onFocusFirstTextfield", "onFocusSecondTextfield", "onBlurFirstTextfield", "onBlurSecondTextfield"];
|
3
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
4
4
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
6
6
|
import React, { forwardRef, useImperativeHandle, useMemo, useRef } from 'react';
|
7
|
-
import { cx
|
7
|
+
import { cx } from '../../utils';
|
8
8
|
import { base as sizeCSS } from './variations/_size/base';
|
9
9
|
import { base as viewCSS } from './variations/_view/base';
|
10
10
|
import { base as disabledCSS } from './variations/_disabled/base';
|
11
11
|
import { base as readOnlyCSS } from './variations/_readonly/base';
|
12
12
|
import { getChangeHandler, getSearchHandler } from './utils';
|
13
|
-
import { ContentWrapper, LeftHelper, StyledContentLeft, StyledContentRight, StyledDivider, StyledInput, StyledLabel,
|
13
|
+
import { ContentWrapper, LeftHelper, StyledContentLeft, StyledContentRight, StyledDivider, StyledInput, StyledLabel, base } from './Range.styles';
|
14
14
|
import { classes } from './Range.tokens';
|
15
15
|
export var rangeRoot = function rangeRoot(Root) {
|
16
16
|
return /*#__PURE__*/forwardRef(function (_ref, ref) {
|
@@ -44,15 +44,6 @@ export var rangeRoot = function rangeRoot(Root) {
|
|
44
44
|
secondTextfieldTextBefore = _ref.secondTextfieldTextBefore,
|
45
45
|
firstTextfieldTextAfter = _ref.firstTextfieldTextAfter,
|
46
46
|
secondTextfieldTextAfter = _ref.secondTextfieldTextAfter,
|
47
|
-
isOpenFirst = _ref.isOpenFirst,
|
48
|
-
onToggleFirst = _ref.onToggleFirst,
|
49
|
-
firstInputPopoverContent = _ref.firstInputPopoverContent,
|
50
|
-
isOpenSecond = _ref.isOpenSecond,
|
51
|
-
onToggleSecond = _ref.onToggleSecond,
|
52
|
-
secondInputPopoverContent = _ref.secondInputPopoverContent,
|
53
|
-
offset = _ref.offset,
|
54
|
-
placement = _ref.placement,
|
55
|
-
closeOnOverlayClick = _ref.closeOnOverlayClick,
|
56
47
|
onChangeFirstValue = _ref.onChangeFirstValue,
|
57
48
|
onChangeSecondValue = _ref.onChangeSecondValue,
|
58
49
|
onSearchFirstValue = _ref.onSearchFirstValue,
|
@@ -102,59 +93,37 @@ export var rangeRoot = function rangeRoot(Root) {
|
|
102
93
|
readOnly: !disabled && readOnly
|
103
94
|
}, rest), label && /*#__PURE__*/React.createElement(StyledLabel, null, label), /*#__PURE__*/React.createElement(ContentWrapper, {
|
104
95
|
className: cx(rangeErrorClass, rangeSuccessClass)
|
105
|
-
}, contentLeft && /*#__PURE__*/React.createElement(StyledContentLeft, null, contentLeft), /*#__PURE__*/React.createElement(
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
placement: getPlacements(placement),
|
137
|
-
trigger: "click",
|
138
|
-
closeOnOverlayClick: closeOnOverlayClick,
|
139
|
-
isFocusTrapped: false,
|
140
|
-
target: /*#__PURE__*/React.createElement(StyledInput, {
|
141
|
-
ref: secondTextFieldRef,
|
142
|
-
className: cx(secondValueErrorClass, secondValueSuccessClass),
|
143
|
-
value: secondValue,
|
144
|
-
readOnly: readOnly,
|
145
|
-
disabled: disabled,
|
146
|
-
placeholder: secondPlaceholder,
|
147
|
-
contentLeft: secondTextfieldContentLeft,
|
148
|
-
contentRight: secondTextfieldContentRight,
|
149
|
-
textBefore: secondTextfieldTextBefore,
|
150
|
-
textAfter: secondTextfieldTextAfter,
|
151
|
-
onChange: handleChangeSecondValue,
|
152
|
-
onSearch: handleSearchSecondValue,
|
153
|
-
onFocus: onFocusSecondTextfield,
|
154
|
-
onBlur: onBlurSecondTextfield
|
155
|
-
}),
|
156
|
-
preventOverflow: false
|
157
|
-
}, secondInputPopoverContent), contentRight && /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight)), leftHelper && /*#__PURE__*/React.createElement(LeftHelper, null, leftHelper));
|
96
|
+
}, contentLeft && /*#__PURE__*/React.createElement(StyledContentLeft, null, contentLeft), /*#__PURE__*/React.createElement(StyledInput, {
|
97
|
+
ref: firstTextFieldRef,
|
98
|
+
className: cx(firstValueErrorClass, firstValueSuccessClass),
|
99
|
+
value: firstValue,
|
100
|
+
readOnly: readOnly,
|
101
|
+
disabled: disabled,
|
102
|
+
placeholder: firstPlaceholder,
|
103
|
+
contentLeft: firstTextfieldContentLeft,
|
104
|
+
contentRight: firstTextfieldContentRight,
|
105
|
+
textBefore: firstTextfieldTextBefore,
|
106
|
+
textAfter: firstTextfieldTextAfter,
|
107
|
+
onChange: handleChangeFirstValue,
|
108
|
+
onSearch: handleSearchFirstValue,
|
109
|
+
onFocus: onFocusFirstTextfield,
|
110
|
+
onBlur: onBlurFirstTextfield
|
111
|
+
}), Divider, /*#__PURE__*/React.createElement(StyledInput, {
|
112
|
+
ref: secondTextFieldRef,
|
113
|
+
className: cx(secondValueErrorClass, secondValueSuccessClass),
|
114
|
+
value: secondValue,
|
115
|
+
readOnly: readOnly,
|
116
|
+
disabled: disabled,
|
117
|
+
placeholder: secondPlaceholder,
|
118
|
+
contentLeft: secondTextfieldContentLeft,
|
119
|
+
contentRight: secondTextfieldContentRight,
|
120
|
+
textBefore: secondTextfieldTextBefore,
|
121
|
+
textAfter: secondTextfieldTextAfter,
|
122
|
+
onChange: handleChangeSecondValue,
|
123
|
+
onSearch: handleSearchSecondValue,
|
124
|
+
onFocus: onFocusSecondTextfield,
|
125
|
+
onBlur: onBlurSecondTextfield
|
126
|
+
}), contentRight && /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight)), leftHelper && /*#__PURE__*/React.createElement(LeftHelper, null, leftHelper));
|
158
127
|
});
|
159
128
|
};
|
160
129
|
export var rangeConfig = {
|