@salutejs/plasma-new-hope 0.81.0-canary.1194.9112023499.0 → 0.81.0-canary.1203.9111654116.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Calendar/Calendar.types.js.map +1 -1
- package/cjs/components/Calendar/CalendarBase/CalendarBase.js +3 -1
- package/cjs/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
- package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +4 -1
- package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
- package/cjs/components/Calendar/hooks/useDays.js +6 -3
- package/cjs/components/Calendar/hooks/useDays.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +2 -1
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js.map +1 -1
- package/cjs/components/Combobox/hooks/useFocusController.js +0 -1
- package/cjs/components/Combobox/hooks/useFocusController.js.map +1 -1
- package/cjs/components/TextField/TextField.js +3 -12
- package/cjs/components/TextField/TextField.js.map +1 -1
- package/cjs/engines/common.js +0 -4
- package/cjs/engines/common.js.map +1 -1
- package/cjs/engines/index.js.map +1 -1
- package/cjs/index.css +0 -25
- package/cjs/index.js +0 -14
- package/cjs/index.js.map +1 -1
- package/cjs/utils/index.js.map +1 -1
- package/es/components/Calendar/Calendar.types.js.map +1 -1
- package/es/components/Calendar/CalendarBase/CalendarBase.js +3 -1
- package/es/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
- package/es/components/Calendar/CalendarDouble/CalendarDouble.js +4 -1
- package/es/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
- package/es/components/Calendar/hooks/useDays.js +6 -3
- package/es/components/Calendar/hooks/useDays.js.map +1 -1
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.js +2 -1
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.js.map +1 -1
- package/es/components/Combobox/hooks/useFocusController.js +0 -1
- package/es/components/Combobox/hooks/useFocusController.js.map +1 -1
- package/es/components/TextField/TextField.js +3 -12
- package/es/components/TextField/TextField.js.map +1 -1
- package/es/engines/common.js +0 -4
- package/es/engines/common.js.map +1 -1
- package/es/engines/index.js.map +1 -1
- package/es/index.css +0 -25
- package/es/index.js +0 -8
- package/es/index.js.map +1 -1
- package/es/utils/index.js.map +1 -1
- package/package.json +2 -3
- package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.js +3 -1
- package/styled-components/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +4 -1
- package/styled-components/cjs/components/Calendar/hooks/useDays.js +6 -3
- package/styled-components/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +2 -1
- package/styled-components/cjs/components/TextField/TextField.js +3 -12
- package/styled-components/cjs/engines/common.js +0 -4
- package/styled-components/cjs/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +18 -6
- package/styled-components/cjs/examples/plasma_web/components/Calendar/Calendar.stories.tsx +18 -6
- package/styled-components/cjs/examples/sds_engineer/components/Calendar/Calendar.stories.tsx +18 -6
- package/styled-components/cjs/hooks/index.js +1 -8
- package/styled-components/cjs/index.js +0 -11
- package/styled-components/cjs/utils/index.js +0 -7
- package/styled-components/es/components/Calendar/CalendarBase/CalendarBase.js +3 -1
- package/styled-components/es/components/Calendar/CalendarDouble/CalendarDouble.js +4 -1
- package/styled-components/es/components/Calendar/hooks/useDays.js +6 -3
- package/styled-components/es/components/Calendar/ui/CalendarDays/CalendarDays.js +2 -1
- package/styled-components/es/components/TextField/TextField.js +3 -12
- package/styled-components/es/engines/common.js +0 -4
- package/styled-components/es/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +18 -6
- package/styled-components/es/examples/plasma_web/components/Calendar/Calendar.stories.tsx +18 -6
- package/styled-components/es/examples/sds_engineer/components/Calendar/Calendar.stories.tsx +18 -6
- package/styled-components/es/hooks/index.js +1 -2
- package/styled-components/es/index.js +1 -2
- package/styled-components/es/utils/index.js +0 -1
- package/types/components/Calendar/Calendar.types.d.ts +4 -0
- package/types/components/Calendar/Calendar.types.d.ts.map +1 -1
- package/types/components/Calendar/CalendarBase/CalendarBase.d.ts.map +1 -1
- package/types/components/Calendar/CalendarDouble/CalendarDouble.d.ts.map +1 -1
- package/types/components/Calendar/hooks/useDays.d.ts +1 -1
- package/types/components/Calendar/hooks/useDays.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarDays/CalendarDays.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarDays/CalendarDays.types.d.ts +1 -0
- package/types/components/Calendar/ui/CalendarDays/CalendarDays.types.d.ts.map +1 -1
- package/types/components/TextField/TextField.d.ts.map +1 -1
- package/types/engines/common.d.ts +3 -3
- package/types/engines/common.d.ts.map +1 -1
- package/types/engines/index.d.ts +1 -1
- package/types/engines/index.d.ts.map +1 -1
- package/types/engines/types.d.ts +0 -4
- package/types/engines/types.d.ts.map +1 -1
- package/types/hooks/index.d.ts +0 -1
- package/types/hooks/index.d.ts.map +1 -1
- package/types/index.d.ts +0 -1
- package/types/index.d.ts.map +1 -1
- package/types/utils/index.d.ts +0 -1
- package/types/utils/index.d.ts.map +1 -1
- package/cjs/components/Slider/Slider.css +0 -69
- package/cjs/components/Slider/Slider.js +0 -48
- package/cjs/components/Slider/Slider.js.map +0 -1
- package/cjs/components/Slider/Slider.tokens.js +0 -79
- package/cjs/components/Slider/Slider.tokens.js.map +0 -1
- package/cjs/components/Slider/components/Double/Double.css +0 -62
- package/cjs/components/Slider/components/Double/Double.js +0 -288
- package/cjs/components/Slider/components/Double/Double.js.map +0 -1
- package/cjs/components/Slider/components/Double/Double.styles.js +0 -61
- package/cjs/components/Slider/components/Double/Double.styles.js.map +0 -1
- package/cjs/components/Slider/components/Double/Double.styles_1jhda4u.css +0 -7
- package/cjs/components/Slider/components/Single/Single.css +0 -16
- package/cjs/components/Slider/components/Single/Single.js +0 -162
- package/cjs/components/Slider/components/Single/Single.js.map +0 -1
- package/cjs/components/Slider/components/Single/Single.styles.js +0 -45
- package/cjs/components/Slider/components/Single/Single.styles.js.map +0 -1
- package/cjs/components/Slider/components/Single/Single.styles_1r9f1e0.css +0 -6
- package/cjs/components/Slider/components/SliderBase/SliderBase.css +0 -4
- package/cjs/components/Slider/components/SliderBase/SliderBase.js +0 -82
- package/cjs/components/Slider/components/SliderBase/SliderBase.js.map +0 -1
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +0 -33
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js.map +0 -1
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles_7is2ll.css +0 -4
- package/cjs/components/Slider/ui/Handler/Handler.css +0 -4
- package/cjs/components/Slider/ui/Handler/Handler.js +0 -174
- package/cjs/components/Slider/ui/Handler/Handler.js.map +0 -1
- package/cjs/components/Slider/ui/Handler/Handler.styles.js +0 -21
- package/cjs/components/Slider/ui/Handler/Handler.styles.js.map +0 -1
- package/cjs/components/Slider/ui/Handler/Handler.styles_8crx5z.css +0 -2
- package/cjs/components/Slider/ui/Thumb/Thumb.css +0 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.js +0 -31
- package/cjs/components/Slider/ui/Thumb/Thumb.js.map +0 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.styles.js +0 -15
- package/cjs/components/Slider/ui/Thumb/Thumb.styles.js.map +0 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +0 -1
- package/cjs/components/Slider/utils/index.js +0 -56
- package/cjs/components/Slider/utils/index.js.map +0 -1
- package/cjs/components/Slider/variations/_disabled/base.js +0 -9
- package/cjs/components/Slider/variations/_disabled/base.js.map +0 -1
- package/cjs/components/Slider/variations/_disabled/base_x642ct.css +0 -1
- package/cjs/components/Slider/variations/_size/base.js +0 -9
- package/cjs/components/Slider/variations/_size/base.js.map +0 -1
- package/cjs/components/Slider/variations/_size/base_x642ct.css +0 -1
- package/cjs/components/Slider/variations/_view/base.js +0 -9
- package/cjs/components/Slider/variations/_view/base.js.map +0 -1
- package/cjs/components/Slider/variations/_view/base_x642ct.css +0 -1
- package/cjs/hooks/useIsomorphicLayoutEffect.js +0 -15
- package/cjs/hooks/useIsomorphicLayoutEffect.js.map +0 -1
- package/cjs/utils/canUseDOM.js +0 -12
- package/cjs/utils/canUseDOM.js.map +0 -1
- package/es/components/Slider/Slider.css +0 -69
- package/es/components/Slider/Slider.js +0 -43
- package/es/components/Slider/Slider.js.map +0 -1
- package/es/components/Slider/Slider.tokens.js +0 -74
- package/es/components/Slider/Slider.tokens.js.map +0 -1
- package/es/components/Slider/components/Double/Double.css +0 -62
- package/es/components/Slider/components/Double/Double.js +0 -284
- package/es/components/Slider/components/Double/Double.js.map +0 -1
- package/es/components/Slider/components/Double/Double.styles.js +0 -51
- package/es/components/Slider/components/Double/Double.styles.js.map +0 -1
- package/es/components/Slider/components/Double/Double.styles_1jhda4u.css +0 -7
- package/es/components/Slider/components/Single/Single.css +0 -16
- package/es/components/Slider/components/Single/Single.js +0 -158
- package/es/components/Slider/components/Single/Single.js.map +0 -1
- package/es/components/Slider/components/Single/Single.styles.js +0 -36
- package/es/components/Slider/components/Single/Single.styles.js.map +0 -1
- package/es/components/Slider/components/Single/Single.styles_1r9f1e0.css +0 -6
- package/es/components/Slider/components/SliderBase/SliderBase.css +0 -4
- package/es/components/Slider/components/SliderBase/SliderBase.js +0 -78
- package/es/components/Slider/components/SliderBase/SliderBase.js.map +0 -1
- package/es/components/Slider/components/SliderBase/SliderBase.styles.js +0 -26
- package/es/components/Slider/components/SliderBase/SliderBase.styles.js.map +0 -1
- package/es/components/Slider/components/SliderBase/SliderBase.styles_7is2ll.css +0 -4
- package/es/components/Slider/ui/Handler/Handler.css +0 -4
- package/es/components/Slider/ui/Handler/Handler.js +0 -170
- package/es/components/Slider/ui/Handler/Handler.js.map +0 -1
- package/es/components/Slider/ui/Handler/Handler.styles.js +0 -16
- package/es/components/Slider/ui/Handler/Handler.styles.js.map +0 -1
- package/es/components/Slider/ui/Handler/Handler.styles_8crx5z.css +0 -2
- package/es/components/Slider/ui/Thumb/Thumb.css +0 -1
- package/es/components/Slider/ui/Thumb/Thumb.js +0 -27
- package/es/components/Slider/ui/Thumb/Thumb.js.map +0 -1
- package/es/components/Slider/ui/Thumb/Thumb.styles.js +0 -11
- package/es/components/Slider/ui/Thumb/Thumb.styles.js.map +0 -1
- package/es/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +0 -1
- package/es/components/Slider/utils/index.js +0 -50
- package/es/components/Slider/utils/index.js.map +0 -1
- package/es/components/Slider/variations/_disabled/base.js +0 -5
- package/es/components/Slider/variations/_disabled/base.js.map +0 -1
- package/es/components/Slider/variations/_disabled/base_x642ct.css +0 -1
- package/es/components/Slider/variations/_size/base.js +0 -5
- package/es/components/Slider/variations/_size/base.js.map +0 -1
- package/es/components/Slider/variations/_size/base_x642ct.css +0 -1
- package/es/components/Slider/variations/_view/base.js +0 -5
- package/es/components/Slider/variations/_view/base.js.map +0 -1
- package/es/components/Slider/variations/_view/base_x642ct.css +0 -1
- package/es/hooks/useIsomorphicLayoutEffect.js +0 -11
- package/es/hooks/useIsomorphicLayoutEffect.js.map +0 -1
- package/es/utils/canUseDOM.js +0 -8
- package/es/utils/canUseDOM.js.map +0 -1
- package/styled-components/cjs/components/Slider/Slider.js +0 -47
- package/styled-components/cjs/components/Slider/Slider.tokens.js +0 -77
- package/styled-components/cjs/components/Slider/Slider.types.js +0 -5
- package/styled-components/cjs/components/Slider/components/Double/Double.js +0 -300
- package/styled-components/cjs/components/Slider/components/Double/Double.styles.js +0 -36
- package/styled-components/cjs/components/Slider/components/Double/Double.types.js +0 -5
- package/styled-components/cjs/components/Slider/components/Single/Single.js +0 -174
- package/styled-components/cjs/components/Slider/components/Single/Single.styles.js +0 -27
- package/styled-components/cjs/components/Slider/components/Single/Single.types.js +0 -5
- package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.js +0 -83
- package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +0 -21
- package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.types.js +0 -5
- package/styled-components/cjs/components/Slider/components/index.js +0 -27
- package/styled-components/cjs/components/Slider/index.js +0 -32
- package/styled-components/cjs/components/Slider/ui/Handler/Handler.js +0 -183
- package/styled-components/cjs/components/Slider/ui/Handler/Handler.styles.js +0 -15
- package/styled-components/cjs/components/Slider/ui/Handler/Handler.types.js +0 -5
- package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.js +0 -32
- package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.styles.js +0 -18
- package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.types.js +0 -5
- package/styled-components/cjs/components/Slider/ui/index.js +0 -63
- package/styled-components/cjs/components/Slider/utils/index.js +0 -55
- package/styled-components/cjs/components/Slider/variations/_disabled/base.js +0 -8
- package/styled-components/cjs/components/Slider/variations/_disabled/tokens.json +0 -4
- package/styled-components/cjs/components/Slider/variations/_size/base.js +0 -8
- package/styled-components/cjs/components/Slider/variations/_size/tokens.json +0 -0
- package/styled-components/cjs/components/Slider/variations/_view/base.js +0 -8
- package/styled-components/cjs/components/Slider/variations/_view/tokens.json +0 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.config.js +0 -29
- package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.js +0 -16
- package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.stories.tsx +0 -164
- package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.config.js +0 -29
- package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.js +0 -16
- package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.stories.tsx +0 -163
- package/styled-components/cjs/hooks/useIsomorphicLayoutEffect.js +0 -12
- package/styled-components/cjs/utils/canUseDOM.js +0 -11
- package/styled-components/es/components/Slider/Slider.js +0 -38
- package/styled-components/es/components/Slider/Slider.tokens.js +0 -71
- package/styled-components/es/components/Slider/Slider.types.js +0 -1
- package/styled-components/es/components/Slider/components/Double/Double.js +0 -292
- package/styled-components/es/components/Slider/components/Double/Double.styles.js +0 -29
- package/styled-components/es/components/Slider/components/Double/Double.types.js +0 -1
- package/styled-components/es/components/Slider/components/Single/Single.js +0 -166
- package/styled-components/es/components/Slider/components/Single/Single.styles.js +0 -20
- package/styled-components/es/components/Slider/components/Single/Single.types.js +0 -1
- package/styled-components/es/components/Slider/components/SliderBase/SliderBase.js +0 -74
- package/styled-components/es/components/Slider/components/SliderBase/SliderBase.styles.js +0 -14
- package/styled-components/es/components/Slider/components/SliderBase/SliderBase.types.js +0 -1
- package/styled-components/es/components/Slider/components/index.js +0 -3
- package/styled-components/es/components/Slider/index.js +0 -3
- package/styled-components/es/components/Slider/ui/Handler/Handler.js +0 -174
- package/styled-components/es/components/Slider/ui/Handler/Handler.styles.js +0 -8
- package/styled-components/es/components/Slider/ui/Handler/Handler.types.js +0 -1
- package/styled-components/es/components/Slider/ui/Thumb/Thumb.js +0 -25
- package/styled-components/es/components/Slider/ui/Thumb/Thumb.styles.js +0 -11
- package/styled-components/es/components/Slider/ui/Thumb/Thumb.types.js +0 -1
- package/styled-components/es/components/Slider/ui/index.js +0 -5
- package/styled-components/es/components/Slider/utils/index.js +0 -47
- package/styled-components/es/components/Slider/variations/_disabled/base.js +0 -2
- package/styled-components/es/components/Slider/variations/_disabled/tokens.json +0 -4
- package/styled-components/es/components/Slider/variations/_size/base.js +0 -2
- package/styled-components/es/components/Slider/variations/_size/tokens.json +0 -0
- package/styled-components/es/components/Slider/variations/_view/base.js +0 -2
- package/styled-components/es/components/Slider/variations/_view/tokens.json +0 -0
- package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.config.js +0 -23
- package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.js +0 -10
- package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.stories.tsx +0 -164
- package/styled-components/es/examples/plasma_web/components/Slider/Slider.config.js +0 -23
- package/styled-components/es/examples/plasma_web/components/Slider/Slider.js +0 -10
- package/styled-components/es/examples/plasma_web/components/Slider/Slider.stories.tsx +0 -163
- package/styled-components/es/hooks/useIsomorphicLayoutEffect.js +0 -7
- package/styled-components/es/utils/canUseDOM.js +0 -5
- package/types/components/Slider/Slider.d.ts +0 -27
- package/types/components/Slider/Slider.d.ts.map +0 -1
- package/types/components/Slider/Slider.tokens.d.ts +0 -72
- package/types/components/Slider/Slider.tokens.d.ts.map +0 -1
- package/types/components/Slider/Slider.types.d.ts +0 -3
- package/types/components/Slider/Slider.types.d.ts.map +0 -1
- package/types/components/Slider/components/Double/Double.d.ts +0 -4
- package/types/components/Slider/components/Double/Double.d.ts.map +0 -1
- package/types/components/Slider/components/Double/Double.styles.d.ts +0 -43
- package/types/components/Slider/components/Double/Double.styles.d.ts.map +0 -1
- package/types/components/Slider/components/Double/Double.types.d.ts +0 -65
- package/types/components/Slider/components/Double/Double.types.d.ts.map +0 -1
- package/types/components/Slider/components/Single/Single.d.ts +0 -4
- package/types/components/Slider/components/Single/Single.d.ts.map +0 -1
- package/types/components/Slider/components/Single/Single.styles.d.ts +0 -8
- package/types/components/Slider/components/Single/Single.styles.d.ts.map +0 -1
- package/types/components/Slider/components/Single/Single.types.d.ts +0 -55
- package/types/components/Slider/components/Single/Single.types.d.ts.map +0 -1
- package/types/components/Slider/components/SliderBase/SliderBase.d.ts +0 -4
- package/types/components/Slider/components/SliderBase/SliderBase.d.ts.map +0 -1
- package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts +0 -6
- package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts.map +0 -1
- package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts +0 -45
- package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts.map +0 -1
- package/types/components/Slider/components/index.d.ts +0 -6
- package/types/components/Slider/components/index.d.ts.map +0 -1
- package/types/components/Slider/index.d.ts +0 -6
- package/types/components/Slider/index.d.ts.map +0 -1
- package/types/components/Slider/ui/Handler/Handler.d.ts +0 -9
- package/types/components/Slider/ui/Handler/Handler.d.ts.map +0 -1
- package/types/components/Slider/ui/Handler/Handler.styles.d.ts +0 -4
- package/types/components/Slider/ui/Handler/Handler.styles.d.ts.map +0 -1
- package/types/components/Slider/ui/Handler/Handler.types.d.ts +0 -24
- package/types/components/Slider/ui/Handler/Handler.types.d.ts.map +0 -1
- package/types/components/Slider/ui/Thumb/Thumb.d.ts +0 -4
- package/types/components/Slider/ui/Thumb/Thumb.d.ts.map +0 -1
- package/types/components/Slider/ui/Thumb/Thumb.styles.d.ts +0 -5
- package/types/components/Slider/ui/Thumb/Thumb.styles.d.ts.map +0 -1
- package/types/components/Slider/ui/Thumb/Thumb.types.d.ts +0 -12
- package/types/components/Slider/ui/Thumb/Thumb.types.d.ts.map +0 -1
- package/types/components/Slider/ui/index.d.ts +0 -6
- package/types/components/Slider/ui/index.d.ts.map +0 -1
- package/types/components/Slider/utils/index.d.ts +0 -33
- package/types/components/Slider/utils/index.d.ts.map +0 -1
- package/types/components/Slider/variations/_disabled/base.d.ts +0 -2
- package/types/components/Slider/variations/_disabled/base.d.ts.map +0 -1
- package/types/components/Slider/variations/_size/base.d.ts +0 -2
- package/types/components/Slider/variations/_size/base.d.ts.map +0 -1
- package/types/components/Slider/variations/_view/base.d.ts +0 -2
- package/types/components/Slider/variations/_view/base.d.ts.map +0 -1
- package/types/examples/plasma_b2c/components/Slider/Slider.config.d.ts +0 -22
- package/types/examples/plasma_b2c/components/Slider/Slider.config.d.ts.map +0 -1
- package/types/examples/plasma_b2c/components/Slider/Slider.d.ts +0 -21
- package/types/examples/plasma_b2c/components/Slider/Slider.d.ts.map +0 -1
- package/types/examples/plasma_web/components/Slider/Slider.config.d.ts +0 -22
- package/types/examples/plasma_web/components/Slider/Slider.config.d.ts.map +0 -1
- package/types/examples/plasma_web/components/Slider/Slider.d.ts +0 -21
- package/types/examples/plasma_web/components/Slider/Slider.d.ts.map +0 -1
- package/types/hooks/useIsomorphicLayoutEffect.d.ts +0 -6
- package/types/hooks/useIsomorphicLayoutEffect.d.ts.map +0 -1
- package/types/utils/canUseDOM.d.ts +0 -6
- package/types/utils/canUseDOM.d.ts.map +0 -1
package/styled-components/cjs/examples/sds_engineer/components/Calendar/Calendar.stories.tsx
CHANGED
@@ -79,7 +79,7 @@ const baseEvents = [
|
|
79
79
|
];
|
80
80
|
|
81
81
|
const StoryDefault = (args: CalendarProps) => {
|
82
|
-
const { isRange, isDouble, min, max, date } = args;
|
82
|
+
const { isRange, isDouble, min, max, date, includeEdgeDates } = args;
|
83
83
|
const [value, setValue] = useState(new Date(2023, 10, 16));
|
84
84
|
const [valueRange, setValueRange] = useState<[Date, Date?]>([new Date(2023, 10, 16), new Date(2023, 10, 23)]);
|
85
85
|
|
@@ -110,6 +110,7 @@ const StoryDefault = (args: CalendarProps) => {
|
|
110
110
|
disabledList={disabledDays}
|
111
111
|
min={min}
|
112
112
|
max={max}
|
113
|
+
includeEdgeDates={includeEdgeDates}
|
113
114
|
onChangeValue={(isRange ? handleOnRangeChange : handleOnChange) as (value: Date | [Date, Date?]) => void}
|
114
115
|
/>
|
115
116
|
);
|
@@ -121,12 +122,13 @@ export const Default: StoryObj<CalendarProps> = {
|
|
121
122
|
max: new Date(2023, 11, 24),
|
122
123
|
isDouble: false,
|
123
124
|
isRange: false,
|
125
|
+
includeEdgeDates: false,
|
124
126
|
},
|
125
127
|
render: (args) => <StoryDefault {...args} />,
|
126
128
|
};
|
127
129
|
|
128
130
|
const StoryBase = (args: CalendarBaseProps) => {
|
129
|
-
const { min, max, type } = args;
|
131
|
+
const { min, max, type, includeEdgeDates } = args;
|
130
132
|
const [value, setValue] = useState(new Date(2023, 10, 16));
|
131
133
|
|
132
134
|
const handleOnChange = useCallback((newValue: Date) => {
|
@@ -150,6 +152,7 @@ const StoryBase = (args: CalendarBaseProps) => {
|
|
150
152
|
disabledList={disabledDays}
|
151
153
|
min={min}
|
152
154
|
max={max}
|
155
|
+
includeEdgeDates={includeEdgeDates}
|
153
156
|
type={type}
|
154
157
|
onChangeValue={handleOnChange}
|
155
158
|
/>
|
@@ -168,13 +171,14 @@ export const Base: StoryObj<CalendarBaseProps> = {
|
|
168
171
|
args: {
|
169
172
|
min: new Date(2023, 10, 1),
|
170
173
|
max: new Date(2023, 11, 24),
|
174
|
+
includeEdgeDates: false,
|
171
175
|
type: 'Days',
|
172
176
|
},
|
173
177
|
render: (args) => <StoryBase {...args} />,
|
174
178
|
};
|
175
179
|
|
176
180
|
const StoryDouble = (args: CalendarDoubleProps) => {
|
177
|
-
const { min, max } = args;
|
181
|
+
const { min, max, includeEdgeDates } = args;
|
178
182
|
const [value, setValue] = useState(new Date(2023, 10, 16));
|
179
183
|
const handleOnChange = useCallback((newValue: Date) => {
|
180
184
|
setValue(newValue);
|
@@ -197,6 +201,7 @@ const StoryDouble = (args: CalendarDoubleProps) => {
|
|
197
201
|
disabledList={disabledDays}
|
198
202
|
min={min}
|
199
203
|
max={max}
|
204
|
+
includeEdgeDates={includeEdgeDates}
|
200
205
|
onChangeValue={handleOnChange}
|
201
206
|
/>
|
202
207
|
);
|
@@ -206,12 +211,13 @@ export const Double: StoryObj<CalendarDoubleProps> = {
|
|
206
211
|
args: {
|
207
212
|
min: new Date(2023, 10, 1),
|
208
213
|
max: new Date(2023, 11, 24),
|
214
|
+
includeEdgeDates: false,
|
209
215
|
},
|
210
216
|
render: (args) => <StoryDouble {...args} />,
|
211
217
|
};
|
212
218
|
|
213
219
|
const StoryRange = (args: CalendarBaseRangeProps) => {
|
214
|
-
const { min, max, type } = args;
|
220
|
+
const { min, max, type, includeEdgeDates } = args;
|
215
221
|
const [values, setValue] = useState<[Date, Date?]>([new Date(2023, 10, 15), new Date(2023, 10, 24)]);
|
216
222
|
const handleOnChange = useCallback((newValue: [Date, Date?]) => {
|
217
223
|
onChangeValue(newValue);
|
@@ -237,6 +243,7 @@ const StoryRange = (args: CalendarBaseRangeProps) => {
|
|
237
243
|
disabledList={disabledList}
|
238
244
|
min={min}
|
239
245
|
max={max}
|
246
|
+
includeEdgeDates={includeEdgeDates}
|
240
247
|
type={type}
|
241
248
|
onChangeValue={handleOnChange}
|
242
249
|
/>
|
@@ -255,13 +262,14 @@ export const Range: StoryObj<CalendarBaseRangeProps> = {
|
|
255
262
|
args: {
|
256
263
|
min: new Date(2023, 10, 1),
|
257
264
|
max: new Date(2023, 11, 24),
|
265
|
+
includeEdgeDates: false,
|
258
266
|
type: 'Days',
|
259
267
|
},
|
260
268
|
render: (args) => <StoryRange {...args} />,
|
261
269
|
};
|
262
270
|
|
263
271
|
const StoryRangeDouble = (args: CalendarBaseRangeProps) => {
|
264
|
-
const { min, max } = args;
|
272
|
+
const { min, max, includeEdgeDates } = args;
|
265
273
|
const [values, setValue] = useState<[Date, Date?]>([new Date(2023, 10, 15), new Date(2023, 10, 24)]);
|
266
274
|
const handleOnChange = useCallback((newValue: [Date, Date?]) => {
|
267
275
|
onChangeValue(newValue);
|
@@ -287,6 +295,7 @@ const StoryRangeDouble = (args: CalendarBaseRangeProps) => {
|
|
287
295
|
disabledList={disabledList}
|
288
296
|
min={min}
|
289
297
|
max={max}
|
298
|
+
includeEdgeDates={includeEdgeDates}
|
290
299
|
onChangeValue={handleOnChange}
|
291
300
|
/>
|
292
301
|
);
|
@@ -296,12 +305,13 @@ export const RangeDouble: StoryObj<CalendarBaseRangeProps> = {
|
|
296
305
|
args: {
|
297
306
|
min: new Date(2023, 10, 1),
|
298
307
|
max: new Date(2023, 11, 24),
|
308
|
+
includeEdgeDates: false,
|
299
309
|
},
|
300
310
|
render: (args) => <StoryRangeDouble {...args} />,
|
301
311
|
};
|
302
312
|
|
303
313
|
const StoryWithPopover = (args: CalendarProps) => {
|
304
|
-
const { isDouble, min, max } = args;
|
314
|
+
const { isDouble, min, max, includeEdgeDates } = args;
|
305
315
|
const [isOpen, setIsOpen] = useState(false);
|
306
316
|
const [textValue, setTextValue] = useState('2023-10-16');
|
307
317
|
const [value, setValue] = useState(new Date(textValue));
|
@@ -340,6 +350,7 @@ const StoryWithPopover = (args: CalendarProps) => {
|
|
340
350
|
disabledList={disabledDays}
|
341
351
|
min={min}
|
342
352
|
max={max}
|
353
|
+
includeEdgeDates={includeEdgeDates}
|
343
354
|
isDouble={isDouble}
|
344
355
|
isRange={false}
|
345
356
|
onChangeValue={handleOnChange}
|
@@ -353,6 +364,7 @@ export const WithPopover: StoryObj<CalendarProps> = {
|
|
353
364
|
min: new Date(2023, 9, 1),
|
354
365
|
max: new Date(2023, 11, 24),
|
355
366
|
isDouble: false,
|
367
|
+
includeEdgeDates: false,
|
356
368
|
},
|
357
369
|
render: (args) => <StoryWithPopover {...args} />,
|
358
370
|
};
|
@@ -15,12 +15,6 @@ Object.defineProperty(exports, "useForceUpdate", {
|
|
15
15
|
return _useForceUpdate.useForceUpdate;
|
16
16
|
}
|
17
17
|
});
|
18
|
-
Object.defineProperty(exports, "useIsomorphicLayoutEffect", {
|
19
|
-
enumerable: true,
|
20
|
-
get: function get() {
|
21
|
-
return _useIsomorphicLayoutEffect.useIsomorphicLayoutEffect;
|
22
|
-
}
|
23
|
-
});
|
24
18
|
Object.defineProperty(exports, "usePreviousValue", {
|
25
19
|
enumerable: true,
|
26
20
|
get: function get() {
|
@@ -36,5 +30,4 @@ Object.defineProperty(exports, "useUniqId", {
|
|
36
30
|
var _useUniqId = /*#__PURE__*/require("./useUniqId");
|
37
31
|
var _usePreviousValue = /*#__PURE__*/require("./usePreviousValue");
|
38
32
|
var _useForceUpdate = /*#__PURE__*/require("./useForceUpdate");
|
39
|
-
var _useDidMountEffect = /*#__PURE__*/require("./useDidMountEffect");
|
40
|
-
var _useIsomorphicLayoutEffect = /*#__PURE__*/require("./useIsomorphicLayoutEffect");
|
33
|
+
var _useDidMountEffect = /*#__PURE__*/require("./useDidMountEffect");
|
@@ -508,15 +508,4 @@ Object.keys(_Toolbar).forEach(function (key) {
|
|
508
508
|
return _Toolbar[key];
|
509
509
|
}
|
510
510
|
});
|
511
|
-
});
|
512
|
-
var _Slider = /*#__PURE__*/require("./components/Slider");
|
513
|
-
Object.keys(_Slider).forEach(function (key) {
|
514
|
-
if (key === "default" || key === "__esModule") return;
|
515
|
-
if (key in exports && exports[key] === _Slider[key]) return;
|
516
|
-
Object.defineProperty(exports, key, {
|
517
|
-
enumerable: true,
|
518
|
-
get: function get() {
|
519
|
-
return _Slider[key];
|
520
|
-
}
|
521
|
-
});
|
522
511
|
});
|
@@ -9,12 +9,6 @@ Object.defineProperty(exports, "IS_REACT_18", {
|
|
9
9
|
return _react.IS_REACT_18;
|
10
10
|
}
|
11
11
|
});
|
12
|
-
Object.defineProperty(exports, "canUseDOM", {
|
13
|
-
enumerable: true,
|
14
|
-
get: function get() {
|
15
|
-
return _canUseDOM.canUseDOM;
|
16
|
-
}
|
17
|
-
});
|
18
12
|
exports.cx = exports.composableStyle = void 0;
|
19
13
|
Object.defineProperty(exports, "extractTextFrom", {
|
20
14
|
enumerable: true,
|
@@ -40,7 +34,6 @@ Object.defineProperty(exports, "safeUseId", {
|
|
40
34
|
return _react.safeUseId;
|
41
35
|
}
|
42
36
|
});
|
43
|
-
var _canUseDOM = /*#__PURE__*/require("./canUseDOM");
|
44
37
|
var _extractTextFrom = /*#__PURE__*/require("./extractTextFrom");
|
45
38
|
var _getSizeValueFromProp = /*#__PURE__*/require("./getSizeValueFromProp");
|
46
39
|
var _react = /*#__PURE__*/require("./react");
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var _excluded = ["value", "min", "max", "type", "eventList", "disabledList", "onChangeValue"];
|
1
|
+
var _excluded = ["value", "min", "max", "includeEdgeDates", "type", "eventList", "disabledList", "onChangeValue"];
|
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."); }
|
@@ -25,6 +25,7 @@ export var calendarBaseRoot = function calendarBaseRoot(Root) {
|
|
25
25
|
var externalValue = _ref.value,
|
26
26
|
min = _ref.min,
|
27
27
|
max = _ref.max,
|
28
|
+
includeEdgeDates = _ref.includeEdgeDates,
|
28
29
|
_ref$type = _ref.type,
|
29
30
|
type = _ref$type === void 0 ? 'Days' : _ref$type,
|
30
31
|
eventList = _ref.eventList,
|
@@ -233,6 +234,7 @@ export var calendarBaseRoot = function calendarBaseRoot(Root) {
|
|
233
234
|
disabledList: disabledList,
|
234
235
|
min: min,
|
235
236
|
max: max,
|
237
|
+
includeEdgeDates: includeEdgeDates,
|
236
238
|
value: externalValue,
|
237
239
|
date: date,
|
238
240
|
hoveredDay: hoveredDay,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
var _StyledSeparator;
|
2
|
-
var _excluded = ["value", "min", "max", "eventList", "disabledList", "onChangeValue"];
|
2
|
+
var _excluded = ["value", "min", "max", "includeEdgeDates", "eventList", "disabledList", "onChangeValue"];
|
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
5
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."); }
|
@@ -23,6 +23,7 @@ export var calendarDoubleRoot = function calendarDoubleRoot(Root) {
|
|
23
23
|
var externalValue = _ref.value,
|
24
24
|
min = _ref.min,
|
25
25
|
max = _ref.max,
|
26
|
+
includeEdgeDates = _ref.includeEdgeDates,
|
26
27
|
eventList = _ref.eventList,
|
27
28
|
disabledList = _ref.disabledList,
|
28
29
|
onChangeValue = _ref.onChangeValue,
|
@@ -146,6 +147,7 @@ export var calendarDoubleRoot = function calendarDoubleRoot(Root) {
|
|
146
147
|
disabledList: disabledList,
|
147
148
|
min: min,
|
148
149
|
max: max,
|
150
|
+
includeEdgeDates: includeEdgeDates,
|
149
151
|
value: externalValue,
|
150
152
|
date: firstDate,
|
151
153
|
hoveredDay: hoveredDay,
|
@@ -162,6 +164,7 @@ export var calendarDoubleRoot = function calendarDoubleRoot(Root) {
|
|
162
164
|
disabledList: disabledList,
|
163
165
|
min: min,
|
164
166
|
max: max,
|
167
|
+
includeEdgeDates: includeEdgeDates,
|
165
168
|
value: externalValue,
|
166
169
|
date: secondDate,
|
167
170
|
hoveredDay: hoveredDay,
|
@@ -182,6 +182,7 @@ var getDaysWithModifications = function getDaysWithModifications(days) {
|
|
182
182
|
var disabledList = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
183
183
|
var min = arguments.length > 3 ? arguments[3] : undefined;
|
184
184
|
var max = arguments.length > 4 ? arguments[4] : undefined;
|
185
|
+
var includeEdgeDates = arguments.length > 5 ? arguments[5] : undefined;
|
185
186
|
var eventsMap = getPropsMap(eventList);
|
186
187
|
var disabledDaysMap = getPropsMap(disabledList);
|
187
188
|
var daysList = days.filter(function (_ref3) {
|
@@ -199,7 +200,9 @@ var getDaysWithModifications = function getDaysWithModifications(days) {
|
|
199
200
|
day = date.day;
|
200
201
|
var keyDay = "".concat(year, "-").concat(monthIndex, "-").concat(day);
|
201
202
|
var currentDate = new Date(year, monthIndex, day);
|
202
|
-
var
|
203
|
+
var minValue = min && (includeEdgeDates ? min > currentDate : min >= currentDate);
|
204
|
+
var maxValue = max && (includeEdgeDates ? max < currentDate : max <= currentDate);
|
205
|
+
var isOutOfMinMaxRange = minValue || maxValue;
|
203
206
|
dayItem.events = eventsMap.get(keyDay);
|
204
207
|
dayItem.disabled = disabledDaysMap.has(keyDay) || isOutOfMinMaxRange;
|
205
208
|
dayItem.isOutOfMinMaxRange = isOutOfMinMaxRange;
|
@@ -212,7 +215,7 @@ var getDaysWithModifications = function getDaysWithModifications(days) {
|
|
212
215
|
/**
|
213
216
|
* Хук для получения списка дней.
|
214
217
|
*/
|
215
|
-
export var useDays = function useDays(date, value, eventList, disabledList, min, max) {
|
218
|
+
export var useDays = function useDays(date, value, eventList, disabledList, min, max, includeEdgeDates) {
|
216
219
|
return useMemo(function () {
|
217
220
|
var monthIndex = date.monthIndex,
|
218
221
|
year = date.year;
|
@@ -220,7 +223,7 @@ export var useDays = function useDays(date, value, eventList, disabledList, min,
|
|
220
223
|
var offsetDayInWeek = getOffsetDayInWeek(monthIndex, year);
|
221
224
|
var days = [].concat(_toConsumableArray(getDaysInPrevMonth(date, offsetDayInWeek, value)), _toConsumableArray(getDaysInCurrentMonth(date, daysInMonth, value)), _toConsumableArray(getDaysInNextMonth(date, daysInMonth, offsetDayInWeek, value)));
|
222
225
|
if (eventList !== null && eventList !== void 0 && eventList.length || disabledList !== null && disabledList !== void 0 && disabledList.length || max || min) {
|
223
|
-
var modifiedDays = getDaysWithModifications(days, eventList, disabledList, min, max);
|
226
|
+
var modifiedDays = getDaysWithModifications(days, eventList, disabledList, min, max, includeEdgeDates);
|
224
227
|
return getMatrix(modifiedDays);
|
225
228
|
}
|
226
229
|
return getMatrix(days);
|
@@ -20,6 +20,7 @@ export var CalendarDays = function CalendarDays(_ref) {
|
|
20
20
|
disabledList = _ref.disabledList,
|
21
21
|
min = _ref.min,
|
22
22
|
max = _ref.max,
|
23
|
+
includeEdgeDates = _ref.includeEdgeDates,
|
23
24
|
hoveredDay = _ref.hoveredDay,
|
24
25
|
selectIndexes = _ref.selectIndexes,
|
25
26
|
isDouble = _ref.isDouble,
|
@@ -29,7 +30,7 @@ export var CalendarDays = function CalendarDays(_ref) {
|
|
29
30
|
onHoverDay = _ref.onHoverDay,
|
30
31
|
onSetSelected = _ref.onSetSelected,
|
31
32
|
onKeyDown = _ref.onKeyDown;
|
32
|
-
var _useDays = useDays(currentDate, value, eventList, disabledList, min, max),
|
33
|
+
var _useDays = useDays(currentDate, value, eventList, disabledList, min, max, includeEdgeDates),
|
33
34
|
_useDays2 = _slicedToArray(_useDays, 2),
|
34
35
|
days = _useDays2[0],
|
35
36
|
selected = _useDays2[1];
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var _excluded = ["id", "
|
1
|
+
var _excluded = ["id", "contentLeft", "contentRight", "label", "labelPlacement", "placeholder", "leftHelper", "enumerationType", "view", "size", "readOnly", "disabled", "chips", "onChange", "onChangeChips", "onSearch"];
|
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."); }
|
@@ -25,8 +25,6 @@ export var base = /*#__PURE__*/css(["display:block;overflow:hidden;"]);
|
|
25
25
|
export var textFieldRoot = function textFieldRoot(Root) {
|
26
26
|
return /*#__PURE__*/forwardRef(function (_ref, ref) {
|
27
27
|
var id = _ref.id,
|
28
|
-
className = _ref.className,
|
29
|
-
style = _ref.style,
|
30
28
|
contentLeft = _ref.contentLeft,
|
31
29
|
contentRight = _ref.contentRight,
|
32
30
|
label = _ref.label,
|
@@ -45,7 +43,6 @@ export var textFieldRoot = function textFieldRoot(Root) {
|
|
45
43
|
onChange = _ref.onChange,
|
46
44
|
onChangeChips = _ref.onChangeChips,
|
47
45
|
onSearch = _ref.onSearch,
|
48
|
-
onKeyDown = _ref.onKeyDown,
|
49
46
|
rest = _objectWithoutProperties(_ref, _excluded);
|
50
47
|
var contentRef = useRef(null);
|
51
48
|
var inputRef = useRef(null);
|
@@ -125,10 +122,6 @@ export var textFieldRoot = function textFieldRoot(Root) {
|
|
125
122
|
chipsRefs.current[index] = element;
|
126
123
|
}
|
127
124
|
};
|
128
|
-
var handleOnKeyDown = function handleOnKeyDown(event) {
|
129
|
-
handleInputKeydown(event);
|
130
|
-
onKeyDown && onKeyDown(event);
|
131
|
-
};
|
132
125
|
useEffect(function () {
|
133
126
|
if (!isChipEnumeration && !(values !== null && values !== void 0 && values.length)) {
|
134
127
|
return;
|
@@ -147,9 +140,7 @@ export var textFieldRoot = function textFieldRoot(Root) {
|
|
147
140
|
disabled: disabled,
|
148
141
|
readOnly: !disabled && readOnly,
|
149
142
|
labelPlacement: innerLabelPlacementValue,
|
150
|
-
onClick: handleInputFocus
|
151
|
-
className: className,
|
152
|
-
style: style
|
143
|
+
onClick: handleInputFocus
|
153
144
|
}, labelInside || innerLabelValue && /*#__PURE__*/React.createElement(Label, {
|
154
145
|
id: labelId,
|
155
146
|
htmlFor: id
|
@@ -190,7 +181,7 @@ export var textFieldRoot = function textFieldRoot(Root) {
|
|
190
181
|
disabled: disabled,
|
191
182
|
readOnly: !disabled && readOnly,
|
192
183
|
onChange: handleChange,
|
193
|
-
onKeyDown:
|
184
|
+
onKeyDown: handleInputKeydown
|
194
185
|
})), labelInside && /*#__PURE__*/React.createElement(Label, {
|
195
186
|
id: labelId,
|
196
187
|
htmlFor: innerId
|
@@ -13,10 +13,6 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
13
13
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
14
14
|
import React from 'react';
|
15
15
|
import { _component } from './styled-components';
|
16
|
-
//
|
17
|
-
// Тип HTMLAttributesOmitOnChange требуется чтобы использовать компонент с кастомным пропсом onChange
|
18
|
-
//
|
19
|
-
|
20
16
|
export var getStaticVariants = function getStaticVariants(config) {
|
21
17
|
if (!config.variations) {
|
22
18
|
return [];
|
@@ -79,7 +79,7 @@ const baseEvents = [
|
|
79
79
|
];
|
80
80
|
|
81
81
|
const StoryDefault = (args: CalendarProps) => {
|
82
|
-
const { isRange, isDouble, min, max, date } = args;
|
82
|
+
const { isRange, isDouble, min, max, date, includeEdgeDates } = args;
|
83
83
|
const [value, setValue] = useState(new Date(2023, 10, 16));
|
84
84
|
const [valueRange, setValueRange] = useState<[Date, Date?]>([new Date(2023, 10, 16), new Date(2023, 10, 23)]);
|
85
85
|
|
@@ -110,6 +110,7 @@ const StoryDefault = (args: CalendarProps) => {
|
|
110
110
|
disabledList={disabledDays}
|
111
111
|
min={min}
|
112
112
|
max={max}
|
113
|
+
includeEdgeDates={includeEdgeDates}
|
113
114
|
onChangeValue={(isRange ? handleOnRangeChange : handleOnChange) as (value: Date | [Date, Date?]) => void}
|
114
115
|
/>
|
115
116
|
);
|
@@ -121,12 +122,13 @@ export const Default: StoryObj<CalendarProps> = {
|
|
121
122
|
max: new Date(2023, 11, 24),
|
122
123
|
isDouble: false,
|
123
124
|
isRange: false,
|
125
|
+
includeEdgeDates: false,
|
124
126
|
},
|
125
127
|
render: (args) => <StoryDefault {...args} />,
|
126
128
|
};
|
127
129
|
|
128
130
|
const StoryBase = (args: CalendarBaseProps) => {
|
129
|
-
const { min, max, type } = args;
|
131
|
+
const { min, max, type, includeEdgeDates } = args;
|
130
132
|
const [value, setValue] = useState(new Date(2023, 10, 16));
|
131
133
|
|
132
134
|
const handleOnChange = useCallback((newValue: Date) => {
|
@@ -150,6 +152,7 @@ const StoryBase = (args: CalendarBaseProps) => {
|
|
150
152
|
disabledList={disabledDays}
|
151
153
|
min={min}
|
152
154
|
max={max}
|
155
|
+
includeEdgeDates={includeEdgeDates}
|
153
156
|
type={type}
|
154
157
|
onChangeValue={handleOnChange}
|
155
158
|
/>
|
@@ -168,13 +171,14 @@ export const Base: StoryObj<CalendarBaseProps> = {
|
|
168
171
|
args: {
|
169
172
|
min: new Date(2023, 10, 1),
|
170
173
|
max: new Date(2023, 11, 24),
|
174
|
+
includeEdgeDates: false,
|
171
175
|
type: 'Days',
|
172
176
|
},
|
173
177
|
render: (args) => <StoryBase {...args} />,
|
174
178
|
};
|
175
179
|
|
176
180
|
const StoryDouble = (args: CalendarDoubleProps) => {
|
177
|
-
const { min, max } = args;
|
181
|
+
const { min, max, includeEdgeDates } = args;
|
178
182
|
const [value, setValue] = useState(new Date(2023, 10, 16));
|
179
183
|
const handleOnChange = useCallback((newValue: Date) => {
|
180
184
|
setValue(newValue);
|
@@ -197,6 +201,7 @@ const StoryDouble = (args: CalendarDoubleProps) => {
|
|
197
201
|
disabledList={disabledDays}
|
198
202
|
min={min}
|
199
203
|
max={max}
|
204
|
+
includeEdgeDates={includeEdgeDates}
|
200
205
|
onChangeValue={handleOnChange}
|
201
206
|
/>
|
202
207
|
);
|
@@ -206,12 +211,13 @@ export const Double: StoryObj<CalendarDoubleProps> = {
|
|
206
211
|
args: {
|
207
212
|
min: new Date(2023, 10, 1),
|
208
213
|
max: new Date(2023, 11, 24),
|
214
|
+
includeEdgeDates: false,
|
209
215
|
},
|
210
216
|
render: (args) => <StoryDouble {...args} />,
|
211
217
|
};
|
212
218
|
|
213
219
|
const StoryRange = (args: CalendarBaseRangeProps) => {
|
214
|
-
const { min, max, type } = args;
|
220
|
+
const { min, max, type, includeEdgeDates } = args;
|
215
221
|
const [values, setValue] = useState<[Date, Date?]>([new Date(2023, 10, 15), new Date(2023, 10, 24)]);
|
216
222
|
const handleOnChange = useCallback((newValue: [Date, Date?]) => {
|
217
223
|
onChangeValue(newValue);
|
@@ -237,6 +243,7 @@ const StoryRange = (args: CalendarBaseRangeProps) => {
|
|
237
243
|
disabledList={disabledList}
|
238
244
|
min={min}
|
239
245
|
max={max}
|
246
|
+
includeEdgeDates={includeEdgeDates}
|
240
247
|
type={type}
|
241
248
|
onChangeValue={handleOnChange}
|
242
249
|
/>
|
@@ -255,13 +262,14 @@ export const Range: StoryObj<CalendarBaseRangeProps> = {
|
|
255
262
|
args: {
|
256
263
|
min: new Date(2023, 10, 1),
|
257
264
|
max: new Date(2023, 11, 24),
|
265
|
+
includeEdgeDates: false,
|
258
266
|
type: 'Days',
|
259
267
|
},
|
260
268
|
render: (args) => <StoryRange {...args} />,
|
261
269
|
};
|
262
270
|
|
263
271
|
const StoryRangeDouble = (args: CalendarBaseRangeProps) => {
|
264
|
-
const { min, max } = args;
|
272
|
+
const { min, max, includeEdgeDates } = args;
|
265
273
|
const [values, setValue] = useState<[Date, Date?]>([new Date(2023, 10, 15), new Date(2023, 10, 24)]);
|
266
274
|
const handleOnChange = useCallback((newValue: [Date, Date?]) => {
|
267
275
|
onChangeValue(newValue);
|
@@ -287,6 +295,7 @@ const StoryRangeDouble = (args: CalendarBaseRangeProps) => {
|
|
287
295
|
disabledList={disabledList}
|
288
296
|
min={min}
|
289
297
|
max={max}
|
298
|
+
includeEdgeDates={includeEdgeDates}
|
290
299
|
onChangeValue={handleOnChange}
|
291
300
|
/>
|
292
301
|
);
|
@@ -296,12 +305,13 @@ export const RangeDouble: StoryObj<CalendarBaseRangeProps> = {
|
|
296
305
|
args: {
|
297
306
|
min: new Date(2023, 10, 1),
|
298
307
|
max: new Date(2023, 11, 24),
|
308
|
+
includeEdgeDates: false,
|
299
309
|
},
|
300
310
|
render: (args) => <StoryRangeDouble {...args} />,
|
301
311
|
};
|
302
312
|
|
303
313
|
const StoryWithPopover = (args: CalendarProps) => {
|
304
|
-
const { isDouble, min, max } = args;
|
314
|
+
const { isDouble, min, max, includeEdgeDates } = args;
|
305
315
|
const [isOpen, setIsOpen] = useState(false);
|
306
316
|
const [textValue, setTextValue] = useState('2023-10-16');
|
307
317
|
const [value, setValue] = useState(new Date(textValue));
|
@@ -340,6 +350,7 @@ const StoryWithPopover = (args: CalendarProps) => {
|
|
340
350
|
disabledList={disabledDays}
|
341
351
|
min={min}
|
342
352
|
max={max}
|
353
|
+
includeEdgeDates={includeEdgeDates}
|
343
354
|
isDouble={isDouble}
|
344
355
|
isRange={false}
|
345
356
|
onChangeValue={handleOnChange}
|
@@ -353,6 +364,7 @@ export const WithPopover: StoryObj<CalendarProps> = {
|
|
353
364
|
min: new Date(2023, 9, 1),
|
354
365
|
max: new Date(2023, 11, 24),
|
355
366
|
isDouble: false,
|
367
|
+
includeEdgeDates: false,
|
356
368
|
},
|
357
369
|
render: (args) => <StoryWithPopover {...args} />,
|
358
370
|
};
|
@@ -79,7 +79,7 @@ const baseEvents = [
|
|
79
79
|
];
|
80
80
|
|
81
81
|
const StoryDefault = (args: CalendarProps) => {
|
82
|
-
const { isRange, isDouble, min, max, date } = args;
|
82
|
+
const { isRange, isDouble, min, max, date, includeEdgeDates } = args;
|
83
83
|
const [value, setValue] = useState(new Date(2023, 10, 16));
|
84
84
|
const [valueRange, setValueRange] = useState<[Date, Date?]>([new Date(2023, 10, 16), new Date(2023, 10, 23)]);
|
85
85
|
|
@@ -110,6 +110,7 @@ const StoryDefault = (args: CalendarProps) => {
|
|
110
110
|
disabledList={disabledDays}
|
111
111
|
min={min}
|
112
112
|
max={max}
|
113
|
+
includeEdgeDates={includeEdgeDates}
|
113
114
|
onChangeValue={(isRange ? handleOnRangeChange : handleOnChange) as (value: Date | [Date, Date?]) => void}
|
114
115
|
/>
|
115
116
|
);
|
@@ -121,12 +122,13 @@ export const Default: StoryObj<CalendarProps> = {
|
|
121
122
|
max: new Date(2023, 11, 24),
|
122
123
|
isDouble: false,
|
123
124
|
isRange: false,
|
125
|
+
includeEdgeDates: false,
|
124
126
|
},
|
125
127
|
render: (args) => <StoryDefault {...args} />,
|
126
128
|
};
|
127
129
|
|
128
130
|
const StoryBase = (args: CalendarBaseProps) => {
|
129
|
-
const { min, max, type } = args;
|
131
|
+
const { min, max, type, includeEdgeDates } = args;
|
130
132
|
const [value, setValue] = useState(new Date(2023, 10, 16));
|
131
133
|
|
132
134
|
const handleOnChange = useCallback((newValue: Date) => {
|
@@ -150,6 +152,7 @@ const StoryBase = (args: CalendarBaseProps) => {
|
|
150
152
|
disabledList={disabledDays}
|
151
153
|
min={min}
|
152
154
|
max={max}
|
155
|
+
includeEdgeDates={includeEdgeDates}
|
153
156
|
type={type}
|
154
157
|
onChangeValue={handleOnChange}
|
155
158
|
/>
|
@@ -168,13 +171,14 @@ export const Base: StoryObj<CalendarBaseProps> = {
|
|
168
171
|
args: {
|
169
172
|
min: new Date(2023, 10, 1),
|
170
173
|
max: new Date(2023, 11, 24),
|
174
|
+
includeEdgeDates: false,
|
171
175
|
type: 'Days',
|
172
176
|
},
|
173
177
|
render: (args) => <StoryBase {...args} />,
|
174
178
|
};
|
175
179
|
|
176
180
|
const StoryDouble = (args: CalendarDoubleProps) => {
|
177
|
-
const { min, max } = args;
|
181
|
+
const { min, max, includeEdgeDates } = args;
|
178
182
|
const [value, setValue] = useState(new Date(2023, 10, 16));
|
179
183
|
const handleOnChange = useCallback((newValue: Date) => {
|
180
184
|
setValue(newValue);
|
@@ -197,6 +201,7 @@ const StoryDouble = (args: CalendarDoubleProps) => {
|
|
197
201
|
disabledList={disabledDays}
|
198
202
|
min={min}
|
199
203
|
max={max}
|
204
|
+
includeEdgeDates={includeEdgeDates}
|
200
205
|
onChangeValue={handleOnChange}
|
201
206
|
/>
|
202
207
|
);
|
@@ -206,12 +211,13 @@ export const Double: StoryObj<CalendarDoubleProps> = {
|
|
206
211
|
args: {
|
207
212
|
min: new Date(2023, 10, 1),
|
208
213
|
max: new Date(2023, 11, 24),
|
214
|
+
includeEdgeDates: false,
|
209
215
|
},
|
210
216
|
render: (args) => <StoryDouble {...args} />,
|
211
217
|
};
|
212
218
|
|
213
219
|
const StoryRange = (args: CalendarBaseRangeProps) => {
|
214
|
-
const { min, max, type } = args;
|
220
|
+
const { min, max, type, includeEdgeDates } = args;
|
215
221
|
const [values, setValue] = useState<[Date, Date?]>([new Date(2023, 10, 15), new Date(2023, 10, 24)]);
|
216
222
|
const handleOnChange = useCallback((newValue: [Date, Date?]) => {
|
217
223
|
onChangeValue(newValue);
|
@@ -237,6 +243,7 @@ const StoryRange = (args: CalendarBaseRangeProps) => {
|
|
237
243
|
disabledList={disabledList}
|
238
244
|
min={min}
|
239
245
|
max={max}
|
246
|
+
includeEdgeDates={includeEdgeDates}
|
240
247
|
type={type}
|
241
248
|
onChangeValue={handleOnChange}
|
242
249
|
/>
|
@@ -255,13 +262,14 @@ export const Range: StoryObj<CalendarBaseRangeProps> = {
|
|
255
262
|
args: {
|
256
263
|
min: new Date(2023, 10, 1),
|
257
264
|
max: new Date(2023, 11, 24),
|
265
|
+
includeEdgeDates: false,
|
258
266
|
type: 'Days',
|
259
267
|
},
|
260
268
|
render: (args) => <StoryRange {...args} />,
|
261
269
|
};
|
262
270
|
|
263
271
|
const StoryRangeDouble = (args: CalendarBaseRangeProps) => {
|
264
|
-
const { min, max } = args;
|
272
|
+
const { min, max, includeEdgeDates } = args;
|
265
273
|
const [values, setValue] = useState<[Date, Date?]>([new Date(2023, 10, 15), new Date(2023, 10, 24)]);
|
266
274
|
const handleOnChange = useCallback((newValue: [Date, Date?]) => {
|
267
275
|
onChangeValue(newValue);
|
@@ -287,6 +295,7 @@ const StoryRangeDouble = (args: CalendarBaseRangeProps) => {
|
|
287
295
|
disabledList={disabledList}
|
288
296
|
min={min}
|
289
297
|
max={max}
|
298
|
+
includeEdgeDates={includeEdgeDates}
|
290
299
|
onChangeValue={handleOnChange}
|
291
300
|
/>
|
292
301
|
);
|
@@ -296,12 +305,13 @@ export const RangeDouble: StoryObj<CalendarBaseRangeProps> = {
|
|
296
305
|
args: {
|
297
306
|
min: new Date(2023, 10, 1),
|
298
307
|
max: new Date(2023, 11, 24),
|
308
|
+
includeEdgeDates: false,
|
299
309
|
},
|
300
310
|
render: (args) => <StoryRangeDouble {...args} />,
|
301
311
|
};
|
302
312
|
|
303
313
|
const StoryWithPopover = (args: CalendarProps) => {
|
304
|
-
const { isDouble, min, max } = args;
|
314
|
+
const { isDouble, min, max, includeEdgeDates } = args;
|
305
315
|
const [isOpen, setIsOpen] = useState(false);
|
306
316
|
const [textValue, setTextValue] = useState('2023-10-16');
|
307
317
|
const [value, setValue] = useState(new Date(textValue));
|
@@ -340,6 +350,7 @@ const StoryWithPopover = (args: CalendarProps) => {
|
|
340
350
|
disabledList={disabledDays}
|
341
351
|
min={min}
|
342
352
|
max={max}
|
353
|
+
includeEdgeDates={includeEdgeDates}
|
343
354
|
isDouble={isDouble}
|
344
355
|
isRange={false}
|
345
356
|
onChangeValue={handleOnChange}
|
@@ -353,6 +364,7 @@ export const WithPopover: StoryObj<CalendarProps> = {
|
|
353
364
|
min: new Date(2023, 9, 1),
|
354
365
|
max: new Date(2023, 11, 24),
|
355
366
|
isDouble: false,
|
367
|
+
includeEdgeDates: false,
|
356
368
|
},
|
357
369
|
render: (args) => <StoryWithPopover {...args} />,
|
358
370
|
};
|