@semcore/date-picker 4.17.0 → 4.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -1
- package/lib/cjs/DateRangeComparator.js +188 -0
- package/lib/cjs/DateRangeComparator.js.map +1 -0
- package/lib/cjs/MonthDateRangeComparator.js +223 -0
- package/lib/cjs/MonthDateRangeComparator.js.map +1 -0
- package/lib/cjs/components/Calendar.js +103 -63
- package/lib/cjs/components/Calendar.js.map +1 -1
- package/lib/cjs/components/DateRangeComparatorAbstract.js +584 -0
- package/lib/cjs/components/DateRangeComparatorAbstract.js.map +1 -0
- package/lib/cjs/components/InputTrigger.js +25 -18
- package/lib/cjs/components/InputTrigger.js.map +1 -1
- package/lib/cjs/components/PickerAbstract.js +25 -18
- package/lib/cjs/components/PickerAbstract.js.map +1 -1
- package/lib/cjs/components/RangePickerAbstract.js +25 -18
- package/lib/cjs/components/RangePickerAbstract.js.map +1 -1
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/cjs/index.js +17 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/style/calendar.shadow.css +57 -10
- package/lib/cjs/style/date-picker.shadow.css +31 -0
- package/lib/es6/DateRangeComparator.js +180 -0
- package/lib/es6/DateRangeComparator.js.map +1 -0
- package/lib/es6/MonthDateRangeComparator.js +215 -0
- package/lib/es6/MonthDateRangeComparator.js.map +1 -0
- package/lib/es6/components/Calendar.js +103 -63
- package/lib/es6/components/Calendar.js.map +1 -1
- package/lib/es6/components/DateRangeComparatorAbstract.js +574 -0
- package/lib/es6/components/DateRangeComparatorAbstract.js.map +1 -0
- package/lib/es6/components/InputTrigger.js +25 -18
- package/lib/es6/components/InputTrigger.js.map +1 -1
- package/lib/es6/components/PickerAbstract.js +25 -18
- package/lib/es6/components/PickerAbstract.js.map +1 -1
- package/lib/es6/components/RangePickerAbstract.js +25 -18
- package/lib/es6/components/RangePickerAbstract.js.map +1 -1
- package/lib/es6/index.d.js.map +1 -1
- package/lib/es6/index.js +2 -0
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/style/calendar.shadow.css +57 -10
- package/lib/es6/style/date-picker.shadow.css +31 -0
- package/lib/types/index.d.ts +136 -2
- package/package.json +5 -4
|
@@ -24,24 +24,31 @@ var _dropdown = _interopRequireDefault(require("@semcore/dropdown"));
|
|
|
24
24
|
var _i18nEnhance = _interopRequireDefault(require("@semcore/utils/lib/enhances/i18nEnhance"));
|
|
25
25
|
var _intergalacticDynamicLocales = require("../translations/__intergalactic-dynamic-locales");
|
|
26
26
|
/*__reshadow-styles__:"../style/date-picker.shadow.css"*/
|
|
27
|
-
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".
|
|
28
|
-
"__SHeader": "
|
|
29
|
-
"__STitle": "
|
|
30
|
-
"__SToday": "
|
|
31
|
-
"__SPeriod": "
|
|
32
|
-
"__SButton": "
|
|
33
|
-
"__SInner": "
|
|
34
|
-
"__SInputMask": "
|
|
35
|
-
"__SIndicator": "
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
27
|
+
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SPopper_opjge_gg_{padding:var(--intergalactic-spacing-4x, 16px);outline:0}.___SPopper_opjge_gg_::-moz-focus-inner{border:0;padding:0}.___SPopper_opjge_gg_:active,.___SPopper_opjge_gg_:focus{outline:0;-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___SPopper_opjge_gg_:hover{outline:0;-webkit-text-decoration:none;text-decoration:none}}.___SPopper_opjge_gg_:focus{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SHeader_opjge_gg_,.___STitle_opjge_gg_{display:flex;align-items:center}.___STitle_opjge_gg_{font-size:var(--intergalactic-fs-200, 14px);color:var(--intergalactic-text-primary, #191b23);height:32px;width:100%;justify-content:center}.___SToday_opjge_gg_{display:flex;margin-top:var(--intergalactic-spacing-3x, 12px);justify-content:center}.___SPeriod_opjge_gg_{display:flex;flex-direction:column;margin-bottom:var(--intergalactic-spacing-2x, 8px)}.___SButton_opjge_gg_ .___SInner_opjge_gg_{justify-content:flex-start}.___SInputMask_opjge_gg_{color:var(--intergalactic-text-primary, #191b23);line-height:normal}.___SIndicator_opjge_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___SRangeIndicator_opjge_gg_{border-radius:50%;flex-shrink:0}.___SRangeIndicator_opjge_gg_._range_value_opjge_gg_{background-color:var(--intergalactic-date-picker-cell-active, #2bb3ff)}.___SRangeIndicator_opjge_gg_._range_compare_opjge_gg_{background-color:var(--intergalactic-date-picker-cell-comparison-active, #8649e1)}.___SHumanizedDate_opjge_gg_{position:absolute;pointer-events:none}.___SDateRange_opjge_gg_ .___SMask_opjge_gg_,.___SDateRange_opjge_gg_ .___SValue_opjge_gg_,.___SSingleDateInput_opjge_gg_ .___SMask_opjge_gg_,.___SSingleDateInput_opjge_gg_ .___SValue_opjge_gg_{opacity:0}.___SSingleDateInput_opjge_gg_:focus-within .___SHumanizedDate_opjge_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SSingleDateInput_opjge_gg_:focus-within .___SMask_opjge_gg_,.___SSingleDateInput_opjge_gg_:focus-within .___SValue_opjge_gg_{opacity:1}.___SDateRange_opjge_gg_:focus-within .___SHumanizedDate_opjge_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SDateRange_opjge_gg_:focus-within .___SMask_opjge_gg_,.___SDateRange_opjge_gg_:focus-within .___SValue_opjge_gg_{opacity:1}.___SInputMask_opjge_gg_.__noHumanizedDate_opjge_gg_ .___SMask_opjge_gg_,.___SInputMask_opjge_gg_.__noHumanizedDate_opjge_gg_ .___SValue_opjge_gg_{opacity:1}.___SDateRange_opjge_gg_ .___SInputMask_opjge_gg_:focus-within .___SMask_opjge_gg_{background-color:var(--intergalactic-bg-highlight-focus, rgba(0, 143, 248, 0.2))}.___SDateRange_opjge_gg_:focus-within .___SRangeSep_opjge_gg_,.___SRangeSep_opjge_gg_.__fulfilled_opjge_gg_{color:var(--intergalactic-text-primary, #191b23)}.___SRangeComparatorHeader_opjge_gg_{border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SRangeCalendar_opjge_gg_,.___SRangeComparatorHeader_opjge_gg_{padding:var(--intergalactic-spacing-4x, 16px)}.___SFooter_opjge_gg_{border-top:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SFooter_opjge_gg_,.___SPeriodsList_opjge_gg_{padding:var(--intergalactic-spacing-4x, 16px)}" /*__inner_css_end__*/, "opjge_gg_") /*__reshadow_css_end__*/, {
|
|
28
|
+
"__SHeader": "___SHeader_opjge_gg_",
|
|
29
|
+
"__STitle": "___STitle_opjge_gg_",
|
|
30
|
+
"__SToday": "___SToday_opjge_gg_",
|
|
31
|
+
"__SPeriod": "___SPeriod_opjge_gg_",
|
|
32
|
+
"__SButton": "___SButton_opjge_gg_",
|
|
33
|
+
"__SInner": "___SInner_opjge_gg_",
|
|
34
|
+
"__SInputMask": "___SInputMask_opjge_gg_",
|
|
35
|
+
"__SIndicator": "___SIndicator_opjge_gg_",
|
|
36
|
+
"__SRangeIndicator": "___SRangeIndicator_opjge_gg_",
|
|
37
|
+
"_range_value": "_range_value_opjge_gg_",
|
|
38
|
+
"_range_compare": "_range_compare_opjge_gg_",
|
|
39
|
+
"__SHumanizedDate": "___SHumanizedDate_opjge_gg_",
|
|
40
|
+
"__SSingleDateInput": "___SSingleDateInput_opjge_gg_",
|
|
41
|
+
"__SValue": "___SValue_opjge_gg_",
|
|
42
|
+
"__SDateRange": "___SDateRange_opjge_gg_",
|
|
43
|
+
"__SMask": "___SMask_opjge_gg_",
|
|
44
|
+
"_noHumanizedDate": "__noHumanizedDate_opjge_gg_",
|
|
45
|
+
"__SRangeSep": "___SRangeSep_opjge_gg_",
|
|
46
|
+
"_fulfilled": "__fulfilled_opjge_gg_",
|
|
47
|
+
"__SRangeComparatorHeader": "___SRangeComparatorHeader_opjge_gg_",
|
|
48
|
+
"__SRangeCalendar": "___SRangeCalendar_opjge_gg_",
|
|
49
|
+
"__SFooter": "___SFooter_opjge_gg_",
|
|
50
|
+
"__SPeriodsList": "___SPeriodsList_opjge_gg_",
|
|
51
|
+
"__SPopper": "___SPopper_opjge_gg_"
|
|
45
52
|
});
|
|
46
53
|
var INTERACTION_TAGS = ['INPUT'];
|
|
47
54
|
var defaultDisplayedPeriod = new Date(new Date().setHours(0, 0, 0, 0));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RangePickerAbstract.js","names":["_core","require","_react","_interopRequireDefault","_dayjs","_button","_flexBox","_divider","_dropdown","_i18nEnhance","_intergalacticDynamicLocales","style","sstyled","insert","INTERACTION_TAGS","defaultDisplayedPeriod","Date","setHours","getEndDate","value","Array","isArray","_value","_slicedToArray2","startDate","_value$","endDate","RangePickerAbstract","_Component","_inherits2","_super","_createSuper2","_this","_classCallCheck2","_len","arguments","length","args","_key","call","apply","concat","_defineProperty2","_assertThisInitialized2","dirtyValue","defaultInteraction","direction","displayedPeriod","asProps","action","date","dayjs","navigateStep","toDate","handlers","navigateView","e","target","currentTarget","_this$asProps","highlighted","state","day","keyDiff","keyCode","setNextDisplayedPeriod","next_highlighted","_next_highlighted","right_period","month_right_period","getMonth","month_displayed_Period","subtract","handleChange","preventDefault","includes","tagName","add","keyStep","_value2","_value2$","setState","_createClass2","key","uncontrolledProps","_this2","visible","_this2$asProps$value","undefined","props","_value$2","_value$3","getDefaultPeriods","getButtonTriggerProps","_this$asProps2","size","empty","onKeyDown","handlerKeyDown","setDefaultInteractionToClick","getPopperProps","Picker","CORE_INSTANCE","_this$asProps3","_this$asProps3$period","periods","unclearable","buttons","createElement","Fragment","Apply","Reset","ml","tabIndex","children","Flex","Box","mr","Header","Prev","Title","Calendar","Next","m","orientation","h","Period","mt","getHeaderProps","getTitleProps","index","_this$asProps4","locale","Intl","DateTimeFormat","month","year","format","startOf","getNextProps","onClick","bindHandlerNavigateClick","getI18nText","getPrevProps","getCalendarProps","_props","_this$asProps5","disabled","onHighlightedChange","onVisibleChange","onChange","getPeriodProps","_this$asProps6","_this$asProps6$period","onDisplayedPeriodChange","handleApply","getApplyProps","_this3","_this$asProps7","getResetProps","_this4","render","_ref","_ref4","_this$asProps8","Children","styles","providedAriaLabel","Dropdown","assignProps","cn","defaultProps","_ref5","defaultValue","i18n","localizedMessages","defaultHighlighted","defaultVisible","Component","i18nEnhance","amount","unit","_ref2","arguments[0]","Button","_ref3","_default","exports"],"sources":["../../../src/components/RangePickerAbstract.jsx"],"sourcesContent":["import React from 'react';\nimport dayjs from 'dayjs';\nimport { Component, Root, CORE_INSTANCE, sstyled } from '@semcore/core';\nimport Button from '@semcore/button';\nimport { Box, Flex } from '@semcore/flex-box';\nimport Divider from '@semcore/divider';\nimport Dropdown from '@semcore/dropdown';\nimport i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';\nimport { localizedMessages } from '../translations/__intergalactic-dynamic-locales';\n\nimport style from '../style/date-picker.shadow.css';\n\nconst INTERACTION_TAGS = ['INPUT'];\n\nconst defaultDisplayedPeriod = new Date(new Date().setHours(0, 0, 0, 0));\n\nfunction getEndDate(value) {\n if (!Array.isArray(value)) return null;\n const [startDate, endDate = startDate] = value;\n return endDate;\n}\n\nclass RangePickerAbstract extends Component {\n static displayName = 'DatePicker';\n static style = style;\n\n static defaultProps({ value, defaultValue }) {\n return {\n i18n: localizedMessages,\n locale: 'en',\n defaultDisplayedPeriod:\n getEndDate(value) || getEndDate(defaultValue) || defaultDisplayedPeriod,\n defaultValue: [],\n defaultHighlighted: [],\n defaultVisible: false,\n disabled: [],\n size: 'm',\n };\n }\n\n static enhance = [i18nEnhance(localizedMessages)];\n\n static add = (date, amount, unit) => {\n return dayjs(date).add(amount, unit).toDate();\n };\n\n static subtract = (date, amount, unit) => {\n return dayjs(date).subtract(amount, unit).toDate();\n };\n\n navigateStep;\n keyDiff;\n keyStep;\n\n state = {\n dirtyValue: [],\n // To remove after removing button trigger\n defaultInteraction: 'focus',\n };\n\n uncontrolledProps() {\n return {\n displayedPeriod: null,\n visible: [\n null,\n (visible) => {\n if (!visible) {\n this.handlers.highlighted([]);\n this.setState({ dirtyValue: [] });\n this.handlers.displayedPeriod(\n getEndDate(this.asProps.value ?? undefined) || this.props.defaultDisplayedPeriod,\n );\n }\n },\n ],\n highlighted: null,\n value: [\n null,\n (value) => {\n this.handlers.visible(false);\n this.handlers.displayedPeriod(getEndDate([value[0] ?? undefined, value[1] ?? undefined]));\n },\n ],\n };\n }\n\n navigateView = (direction) => {\n const { displayedPeriod } = this.asProps;\n const action = direction >= 1 ? 'add' : 'subtract';\n const date = dayjs(displayedPeriod)[action](1, this.navigateStep).toDate();\n this.handlers.displayedPeriod(date);\n };\n\n bindHandlerNavigateClick = (direction) => () => this.navigateView(direction);\n\n handlerKeyDown = (e) => {\n if (e.target !== e.currentTarget) return;\n const { displayedPeriod, highlighted } = this.asProps;\n const { dirtyValue } = this.state;\n const day = this.keyDiff[e.keyCode];\n\n const setNextDisplayedPeriod = (next_highlighted) => {\n const [, right_period] = next_highlighted;\n\n if (right_period) {\n const month_right_period = right_period.getMonth();\n const month_displayed_Period = displayedPeriod.getMonth();\n if (month_right_period - month_displayed_Period > 1) {\n return RangePickerAbstract.subtract(right_period, 1, 'month');\n } else if (month_right_period - month_displayed_Period < 0) {\n return right_period;\n }\n }\n return displayedPeriod;\n };\n\n if (e.keyCode === 32 && highlighted.length) {\n this.handleChange(highlighted[1] || highlighted[0]);\n e.preventDefault();\n }\n if (day) {\n if (INTERACTION_TAGS.includes(e.target.tagName)) return;\n if (highlighted.length) {\n let next_highlighted;\n if (dirtyValue.length === 1) {\n next_highlighted = [\n dirtyValue[0],\n dayjs(highlighted[1] || highlighted[0])\n .add(day, this.keyStep)\n .toDate(),\n ];\n } else {\n next_highlighted = [\n dayjs(highlighted[0])\n .add(day, this.keyStep)\n .toDate(),\n ];\n }\n this.handlers.highlighted(next_highlighted);\n this.handlers.displayedPeriod(setNextDisplayedPeriod(next_highlighted));\n } else {\n this.handlers.highlighted([displayedPeriod]);\n }\n e.preventDefault();\n }\n };\n\n handleApply = (value) => {\n const [startDate, endDate = startDate] = value;\n this.handleChange([]);\n this.handlers.value([startDate, endDate]);\n };\n\n handleChange = (date) => {\n let { dirtyValue } = this.state;\n let highlighted = [];\n if (Array.isArray(date)) {\n dirtyValue = date;\n } else if (!dirtyValue.length) {\n dirtyValue = [date];\n highlighted = [date];\n } else if (dirtyValue.length >= 2) {\n dirtyValue = [date];\n highlighted = [date];\n } else if (dirtyValue[0] > date) {\n dirtyValue = [date, dirtyValue[0]];\n } else {\n dirtyValue = [dirtyValue[0], date];\n }\n\n this.setState({ dirtyValue }, () => {\n this.handlers.highlighted(highlighted);\n });\n };\n\n getDefaultPeriods() {\n return [];\n }\n\n setDefaultInteractionToClick = () => {\n if (this.state.defaultInteraction === 'click') return;\n this.setState({ defaultInteraction: 'click' });\n };\n\n getButtonTriggerProps() {\n const { value, size } = this.asProps;\n\n return {\n size,\n empty: !value[0] && !value[1],\n onKeyDown: this.handlerKeyDown,\n setDefaultInteractionToClick: this.setDefaultInteractionToClick,\n };\n }\n\n getPopperProps() {\n const Picker = this[CORE_INSTANCE];\n const { periods = this.getDefaultPeriods(), unclearable } = this.asProps;\n\n const buttons = (\n <>\n <Picker.Apply />\n {!unclearable && <Picker.Reset ml={2} />}\n </>\n );\n\n return {\n tabIndex: 0,\n onKeyDown: this.handlerKeyDown,\n children: (\n <>\n <Flex>\n <Box mr={2}>\n <Picker.Header>\n <Picker.Prev />\n <Picker.Title />\n </Picker.Header>\n <Picker.Calendar />\n </Box>\n <Box ml={2}>\n <Picker.Header>\n <Picker.Title />\n <Picker.Next />\n </Picker.Header>\n <Picker.Calendar />\n </Box>\n {periods.length ? (\n <>\n <Divider m='-16px 16px' orientation='vertical' h='auto' />\n <Flex direction='column'>\n <Picker.Period />\n <Flex mt='auto'>{buttons}</Flex>\n </Flex>\n </>\n ) : (\n <Flex mt={4}>{buttons}</Flex>\n )}\n </Flex>\n </>\n ),\n };\n }\n\n getHeaderProps() {\n const Picker = this[CORE_INSTANCE];\n return {\n children: (\n <>\n <Picker.Prev />\n <Picker.Title />\n <Picker.Next />\n </>\n ),\n };\n }\n\n getTitleProps(props, index) {\n const { locale, displayedPeriod } = this.asProps;\n return {\n children: new Intl.DateTimeFormat(locale, { month: 'long', year: 'numeric' }).format(\n dayjs(displayedPeriod).add(index, this.navigateStep).startOf(this.navigateStep).toDate(),\n ),\n };\n }\n\n getNextProps() {\n return {\n onClick: this.bindHandlerNavigateClick(1),\n getI18nText: this.asProps.getI18nText,\n };\n }\n\n getPrevProps() {\n return {\n onClick: this.bindHandlerNavigateClick(-1),\n getI18nText: this.asProps.getI18nText,\n };\n }\n\n getCalendarProps(_props, index) {\n const {\n locale,\n displayedPeriod,\n disabled,\n value,\n highlighted,\n onHighlightedChange,\n onVisibleChange,\n } = this.asProps;\n const { dirtyValue } = this.state;\n\n return {\n locale,\n displayedPeriod: dayjs(displayedPeriod)\n .add(index, this.navigateStep)\n .startOf(this.navigateStep)\n .toDate(),\n disabled,\n highlighted,\n onHighlightedChange,\n onVisibleChange,\n value: dirtyValue.length ? dirtyValue : value,\n onChange: this.handleChange,\n };\n }\n\n getPeriodProps() {\n const {\n periods = this.getDefaultPeriods(),\n value,\n onHighlightedChange,\n onDisplayedPeriodChange,\n } = this.asProps;\n const { dirtyValue } = this.state;\n return {\n periods,\n value: dirtyValue.length ? dirtyValue : value,\n onChange: this.handleApply,\n onHighlightedChange,\n onDisplayedPeriodChange,\n };\n }\n\n getApplyProps() {\n const { value, getI18nText } = this.asProps;\n const { dirtyValue } = this.state;\n return {\n getI18nText,\n onClick: () => this.handleApply(dirtyValue.length ? dirtyValue : value),\n };\n }\n\n getResetProps() {\n const { getI18nText } = this.asProps;\n return {\n getI18nText,\n onClick: () => this.handleApply([]),\n };\n }\n\n render() {\n const { Children, styles, 'aria-label': providedAriaLabel } = this.asProps;\n const { defaultInteraction } = this.state;\n\n return (\n <>\n {sstyled(styles)(\n <Root\n render={Dropdown}\n use:aria-label={providedAriaLabel}\n interaction={defaultInteraction}\n __excludeProps={['onChange', 'value']}\n >\n <Children />\n </Root>,\n )}\n </>\n );\n }\n}\n\nfunction Apply(props) {\n const { getI18nText } = props;\n return <Root render={Button} use='primary' children={getI18nText('apply')} />;\n}\n\nfunction Reset(props) {\n const { getI18nText } = props;\n return <Root render={Button} use='tertiary' theme='muted' children={getI18nText('reset')} />;\n}\n\nexport { Apply, Reset };\n\nexport default RangePickerAbstract;\n"],"mappings":";;;;;;;;;;;;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AAFA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,OAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,SAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,YAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,4BAAA,GAAAT,OAAA;AAAoF;AAAA,IAAAU,KAAA,+BAAAX,KAAA,CAAAY,OAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAIpF,IAAMC,gBAAgB,GAAG,CAAC,OAAO,CAAC;AAElC,IAAMC,sBAAsB,GAAG,IAAIC,IAAI,CAAC,IAAIA,IAAI,EAAE,CAACC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,C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AAgG,KAAA,GAAAF,YAAA;EACpB,IAAQzC,WAAW,GAAKrD,KAAK,CAArBqD,WAAW;EACnB,oBAAO5I,MAAA,YAAA0G,aAAA,CAAc4E,kBAAM,MAAAxL,KAAA,CAAAyK,WAAA;IAAA,OAAM,UAAU;IAAA,SAAO,OAAO;IAAA,YAAW3B,WAAW,CAAC,OAAO;EAAC,GAAA2C,KAAA,EAAI;AAC9F;AAAC,IAAAC,QAAA,GAIc/J,mBAAmB;AAAAgK,OAAA,cAAAD,QAAA"}
|
|
1
|
+
{"version":3,"file":"RangePickerAbstract.js","names":["_core","require","_react","_interopRequireDefault","_dayjs","_button","_flexBox","_divider","_dropdown","_i18nEnhance","_intergalacticDynamicLocales","style","sstyled","insert","INTERACTION_TAGS","defaultDisplayedPeriod","Date","setHours","getEndDate","value","Array","isArray","_value","_slicedToArray2","startDate","_value$","endDate","RangePickerAbstract","_Component","_inherits2","_super","_createSuper2","_this","_classCallCheck2","_len","arguments","length","args","_key","call","apply","concat","_defineProperty2","_assertThisInitialized2","dirtyValue","defaultInteraction","direction","displayedPeriod","asProps","action","date","dayjs","navigateStep","toDate","handlers","navigateView","e","target","currentTarget","_this$asProps","highlighted","state","day","keyDiff","keyCode","setNextDisplayedPeriod","next_highlighted","_next_highlighted","right_period","month_right_period","getMonth","month_displayed_Period","subtract","handleChange","preventDefault","includes","tagName","add","keyStep","_value2","_value2$","setState","_createClass2","key","uncontrolledProps","_this2","visible","_this2$asProps$value","undefined","props","_value$2","_value$3","getDefaultPeriods","getButtonTriggerProps","_this$asProps2","size","empty","onKeyDown","handlerKeyDown","setDefaultInteractionToClick","getPopperProps","Picker","CORE_INSTANCE","_this$asProps3","_this$asProps3$period","periods","unclearable","buttons","createElement","Fragment","Apply","Reset","ml","tabIndex","children","Flex","Box","mr","Header","Prev","Title","Calendar","Next","m","orientation","h","Period","mt","getHeaderProps","getTitleProps","index","_this$asProps4","locale","Intl","DateTimeFormat","month","year","format","startOf","getNextProps","onClick","bindHandlerNavigateClick","getI18nText","getPrevProps","getCalendarProps","_props","_this$asProps5","disabled","onHighlightedChange","onVisibleChange","onChange","getPeriodProps","_this$asProps6","_this$asProps6$period","onDisplayedPeriodChange","handleApply","getApplyProps","_this3","_this$asProps7","getResetProps","_this4","render","_ref","_ref4","_this$asProps8","Children","styles","providedAriaLabel","Dropdown","assignProps","cn","defaultProps","_ref5","defaultValue","i18n","localizedMessages","defaultHighlighted","defaultVisible","Component","i18nEnhance","amount","unit","_ref2","arguments[0]","Button","_ref3","_default","exports"],"sources":["../../../src/components/RangePickerAbstract.jsx"],"sourcesContent":["import React from 'react';\nimport dayjs from 'dayjs';\nimport { Component, Root, CORE_INSTANCE, sstyled } from '@semcore/core';\nimport Button from '@semcore/button';\nimport { Box, Flex } from '@semcore/flex-box';\nimport Divider from '@semcore/divider';\nimport Dropdown from '@semcore/dropdown';\nimport i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';\nimport { localizedMessages } from '../translations/__intergalactic-dynamic-locales';\n\nimport style from '../style/date-picker.shadow.css';\n\nconst INTERACTION_TAGS = ['INPUT'];\n\nconst defaultDisplayedPeriod = new Date(new Date().setHours(0, 0, 0, 0));\n\nfunction getEndDate(value) {\n if (!Array.isArray(value)) return null;\n const [startDate, endDate = startDate] = value;\n return endDate;\n}\n\nclass RangePickerAbstract extends Component {\n static displayName = 'DatePicker';\n static style = style;\n\n static defaultProps({ value, defaultValue }) {\n return {\n i18n: localizedMessages,\n locale: 'en',\n defaultDisplayedPeriod:\n getEndDate(value) || getEndDate(defaultValue) || defaultDisplayedPeriod,\n defaultValue: [],\n defaultHighlighted: [],\n defaultVisible: false,\n disabled: [],\n size: 'm',\n };\n }\n\n static enhance = [i18nEnhance(localizedMessages)];\n\n static add = (date, amount, unit) => {\n return dayjs(date).add(amount, unit).toDate();\n };\n\n static subtract = (date, amount, unit) => {\n return dayjs(date).subtract(amount, unit).toDate();\n };\n\n navigateStep;\n keyDiff;\n keyStep;\n\n state = {\n dirtyValue: [],\n // To remove after removing button trigger\n defaultInteraction: 'focus',\n };\n\n uncontrolledProps() {\n return {\n displayedPeriod: null,\n visible: [\n null,\n (visible) => {\n if (!visible) {\n this.handlers.highlighted([]);\n this.setState({ dirtyValue: [] });\n this.handlers.displayedPeriod(\n getEndDate(this.asProps.value ?? undefined) || this.props.defaultDisplayedPeriod,\n );\n }\n },\n ],\n highlighted: null,\n value: [\n null,\n (value) => {\n this.handlers.visible(false);\n this.handlers.displayedPeriod(getEndDate([value[0] ?? undefined, value[1] ?? undefined]));\n },\n ],\n };\n }\n\n navigateView = (direction) => {\n const { displayedPeriod } = this.asProps;\n const action = direction >= 1 ? 'add' : 'subtract';\n const date = dayjs(displayedPeriod)[action](1, this.navigateStep).toDate();\n this.handlers.displayedPeriod(date);\n };\n\n bindHandlerNavigateClick = (direction) => () => this.navigateView(direction);\n\n handlerKeyDown = (e) => {\n if (e.target !== e.currentTarget) return;\n const { displayedPeriod, highlighted } = this.asProps;\n const { dirtyValue } = this.state;\n const day = this.keyDiff[e.keyCode];\n\n const setNextDisplayedPeriod = (next_highlighted) => {\n const [, right_period] = next_highlighted;\n\n if (right_period) {\n const month_right_period = right_period.getMonth();\n const month_displayed_Period = displayedPeriod.getMonth();\n if (month_right_period - month_displayed_Period > 1) {\n return RangePickerAbstract.subtract(right_period, 1, 'month');\n } else if (month_right_period - month_displayed_Period < 0) {\n return right_period;\n }\n }\n return displayedPeriod;\n };\n\n if (e.keyCode === 32 && highlighted.length) {\n this.handleChange(highlighted[1] || highlighted[0]);\n e.preventDefault();\n }\n if (day) {\n if (INTERACTION_TAGS.includes(e.target.tagName)) return;\n if (highlighted.length) {\n let next_highlighted;\n if (dirtyValue.length === 1) {\n next_highlighted = [\n dirtyValue[0],\n dayjs(highlighted[1] || highlighted[0])\n .add(day, this.keyStep)\n .toDate(),\n ];\n } else {\n next_highlighted = [\n dayjs(highlighted[0])\n .add(day, this.keyStep)\n .toDate(),\n ];\n }\n this.handlers.highlighted(next_highlighted);\n this.handlers.displayedPeriod(setNextDisplayedPeriod(next_highlighted));\n } else {\n this.handlers.highlighted([displayedPeriod]);\n }\n e.preventDefault();\n }\n };\n\n handleApply = (value) => {\n const [startDate, endDate = startDate] = value;\n this.handleChange([]);\n this.handlers.value([startDate, endDate]);\n };\n\n handleChange = (date) => {\n let { dirtyValue } = this.state;\n let highlighted = [];\n if (Array.isArray(date)) {\n dirtyValue = date;\n } else if (!dirtyValue.length) {\n dirtyValue = [date];\n highlighted = [date];\n } else if (dirtyValue.length >= 2) {\n dirtyValue = [date];\n highlighted = [date];\n } else if (dirtyValue[0] > date) {\n dirtyValue = [date, dirtyValue[0]];\n } else {\n dirtyValue = [dirtyValue[0], date];\n }\n\n this.setState({ dirtyValue }, () => {\n this.handlers.highlighted(highlighted);\n });\n };\n\n getDefaultPeriods() {\n return [];\n }\n\n setDefaultInteractionToClick = () => {\n if (this.state.defaultInteraction === 'click') return;\n this.setState({ defaultInteraction: 'click' });\n };\n\n getButtonTriggerProps() {\n const { value, size } = this.asProps;\n\n return {\n size,\n empty: !value[0] && !value[1],\n onKeyDown: this.handlerKeyDown,\n setDefaultInteractionToClick: this.setDefaultInteractionToClick,\n };\n }\n\n getPopperProps() {\n const Picker = this[CORE_INSTANCE];\n const { periods = this.getDefaultPeriods(), unclearable } = this.asProps;\n\n const buttons = (\n <>\n <Picker.Apply />\n {!unclearable && <Picker.Reset ml={2} />}\n </>\n );\n\n return {\n tabIndex: 0,\n onKeyDown: this.handlerKeyDown,\n children: (\n <>\n <Flex>\n <Box mr={2}>\n <Picker.Header>\n <Picker.Prev />\n <Picker.Title />\n </Picker.Header>\n <Picker.Calendar />\n </Box>\n <Box ml={2}>\n <Picker.Header>\n <Picker.Title />\n <Picker.Next />\n </Picker.Header>\n <Picker.Calendar />\n </Box>\n {periods.length ? (\n <>\n <Divider m='-16px 16px' orientation='vertical' h='auto' />\n <Flex direction='column'>\n <Picker.Period />\n <Flex mt='auto'>{buttons}</Flex>\n </Flex>\n </>\n ) : (\n <Flex mt={4}>{buttons}</Flex>\n )}\n </Flex>\n </>\n ),\n };\n }\n\n getHeaderProps() {\n const Picker = this[CORE_INSTANCE];\n return {\n children: (\n <>\n <Picker.Prev />\n <Picker.Title />\n <Picker.Next />\n </>\n ),\n };\n }\n\n getTitleProps(props, index) {\n const { locale, displayedPeriod } = this.asProps;\n return {\n children: new Intl.DateTimeFormat(locale, { month: 'long', year: 'numeric' }).format(\n dayjs(displayedPeriod).add(index, this.navigateStep).startOf(this.navigateStep).toDate(),\n ),\n };\n }\n\n getNextProps() {\n return {\n onClick: this.bindHandlerNavigateClick(1),\n getI18nText: this.asProps.getI18nText,\n };\n }\n\n getPrevProps() {\n return {\n onClick: this.bindHandlerNavigateClick(-1),\n getI18nText: this.asProps.getI18nText,\n };\n }\n\n getCalendarProps(_props, index) {\n const {\n locale,\n displayedPeriod,\n disabled,\n value,\n highlighted,\n onHighlightedChange,\n onVisibleChange,\n } = this.asProps;\n const { dirtyValue } = this.state;\n\n return {\n locale,\n displayedPeriod: dayjs(displayedPeriod)\n .add(index, this.navigateStep)\n .startOf(this.navigateStep)\n .toDate(),\n disabled,\n highlighted,\n onHighlightedChange,\n onVisibleChange,\n value: dirtyValue.length ? dirtyValue : value,\n onChange: this.handleChange,\n };\n }\n\n getPeriodProps() {\n const {\n periods = this.getDefaultPeriods(),\n value,\n onHighlightedChange,\n onDisplayedPeriodChange,\n } = this.asProps;\n const { dirtyValue } = this.state;\n return {\n periods,\n value: dirtyValue.length ? dirtyValue : value,\n onChange: this.handleApply,\n onHighlightedChange,\n onDisplayedPeriodChange,\n };\n }\n\n getApplyProps() {\n const { value, getI18nText } = this.asProps;\n const { dirtyValue } = this.state;\n return {\n getI18nText,\n onClick: () => this.handleApply(dirtyValue.length ? dirtyValue : value),\n };\n }\n\n getResetProps() {\n const { getI18nText } = this.asProps;\n return {\n getI18nText,\n onClick: () => this.handleApply([]),\n };\n }\n\n render() {\n const { Children, styles, 'aria-label': providedAriaLabel } = this.asProps;\n const { defaultInteraction } = this.state;\n\n return (\n <>\n {sstyled(styles)(\n <Root\n render={Dropdown}\n use:aria-label={providedAriaLabel}\n interaction={defaultInteraction}\n __excludeProps={['onChange', 'value']}\n >\n <Children />\n </Root>,\n )}\n </>\n );\n }\n}\n\nfunction Apply(props) {\n const { getI18nText } = props;\n return <Root render={Button} use='primary' children={getI18nText('apply')} />;\n}\n\nfunction Reset(props) {\n const { getI18nText } = props;\n return <Root render={Button} use='tertiary' theme='muted' children={getI18nText('reset')} />;\n}\n\nexport { Apply, Reset };\n\nexport default RangePickerAbstract;\n"],"mappings":";;;;;;;;;;;;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AAFA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,OAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,SAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,YAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,4BAAA,GAAAT,OAAA;AAAoF;AAAA,IAAAU,KAAA,+BAAAX,KAAA,CAAAY,OAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAIpF,IAAMC,gBAAgB,GAAG,CAAC,OAAO,CAAC;AAElC,IAAMC,sBAAsB,GAAG,IAAIC,IAAI,CAAC,IAAIA,IAAI,EAAE,CAACC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAExE,SAASC,UAAUA,CAACC,KAAK,EAAE;EACzB,IAAI,CAACC,KAAK,C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,oBAAO5I,MAAA,YAAA0G,aAAA,CAAc4E,kBAAM,MAAAxL,KAAA,CAAAyK,WAAA;IAAA,OAAM,UAAU;IAAA,SAAO,OAAO;IAAA,YAAW3B,WAAW,CAAC,OAAO;EAAC,GAAA2C,KAAA,EAAI;AAC9F;AAAC,IAAAC,QAAA,GAIc/J,mBAAmB;AAAAgK,OAAA,cAAAD,QAAA"}
|
package/lib/cjs/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React, { ChangeEvent, ComponentProps } from 'react';\nimport dayjs from 'dayjs';\nimport { Box, BoxProps } from '@semcore/flex-box';\nimport { UnknownProperties, Intergalactic, PropGetterFn } from '@semcore/core';\nimport Button, { ButtonProps } from '@semcore/button';\nimport Dropdown, { DropdownProps, DropdownTriggerProps } from '@semcore/dropdown';\nimport { WithI18nEnhanceProps } from '@semcore/utils/lib/enhances/i18nEnhance';\nimport BaseTrigger, { BaseTriggerProps } from '@semcore/base-trigger';\nimport Input, { InputProps, InputValueProps } from '@semcore/input';\nimport { InputMaskValueProps } from '@semcore/input-mask';\n\nexport type DateConstructorParams = string | number | Date;\n\n/** @deprecated */\nexport interface ICalendarProps extends CalendarProps, UnknownProperties {}\nexport type CalendarProps = BoxProps & {\n /**\n * Locale for displaying the days of a week and months, to be transferred to `Intl`\n * @default en\n * */\n locale?: NavigatorLanguage['language'];\n /**\n * Array of dates blocked for selection\n * Accepts the date or the range of dates for specifying infinity ([Date | false, Date | false]), crontab(6,7)\n * */\n disabled?: (Date | (Date | false)[] | string)[];\n /**\n * @ignore\n * */\n highlighted?: DateConstructorParams[];\n /**\n * @ignore\n * */\n onHighlightedChange?: (date: Date[]) => void;\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n value?: DateConstructorParams[];\n /**\n * To be activated upon selecting the date\n * */\n onChange?: (date: Date[]) => void;\n /**\n * Date for showing the necessary month\n * @default new Date()\n * */\n displayedPeriod?: Date;\n\n renderOutdated?: boolean;\n};\n\n/** @deprecated */\nexport interface ICalendarDaysContext extends CalendarDaysContext, UnknownProperties {}\nexport type CalendarDaysContext = {\n days: CalendarUnitProps[];\n};\n\n/** @deprecated */\nexport interface ICalendarMonthsContext extends CalendarMonthsContext, UnknownProperties {}\nexport type CalendarMonthsContext = {\n months: CalendarUnitProps[];\n};\n\n/** @deprecated */\nexport interface ICalendarUnitProps extends CalendarUnitProps, UnknownProperties {}\nexport type CalendarUnitProps = BoxProps & {\n selected?: boolean;\n outdated?: boolean;\n disabled?: boolean;\n today?: boolean;\n startSelected?: boolean;\n endSelected?: boolean;\n highlighted?: boolean;\n startHighlighted?: boolean;\n endHighlighted?: boolean;\n date?: Date;\n children?: React.ReactNode;\n};\n\n/** @deprecated */\nexport interface ICalendarContext extends CalendarContext, UnknownProperties {}\nexport type CalendarContext = {\n getUnitProps: PropGetterFn;\n};\n\ndeclare const Calendar: Intergalactic.Component<\n 'div',\n CalendarProps,\n CalendarContext & CalendarDaysContext,\n [handlers: AbstractDatePickerHandlers]\n> & {\n Unit: Intergalactic.Component<'div', CalendarUnitProps>;\n};\n\n/** @deprecated */\nexport interface IDatePickerProps extends DatePickerProps, UnknownProperties {}\nexport type DatePickerProps = DropdownProps &\n WithI18nEnhanceProps & {\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n value?: DateConstructorParams;\n /**\n * To be activated upon selecting the date\n * */\n onChange?: (date: Date) => void;\n /**\n * Array of dates blocked for selection\n * */\n disabled?: (Date | (Date | false)[] | string)[];\n /**\n * Date for showing the necessary month\n * @default new Date()\n * */\n displayedPeriod?: DateConstructorParams;\n /**\n * To be activated upon changing the current shown month\n * */\n onDisplayedPeriodChange?: (date: Date) => void;\n /**\n * Component size\n * @default m\n */\n size?: 'm' | 'l';\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n highlighted?: DateConstructorParams[];\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultValue?: DateConstructorParams;\n /**\n * Default value date for showing the necessary month\n * */\n defaultDisplayedPeriod?: DateConstructorParams;\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultHighlighted?: DateConstructorParams[];\n };\n\n/** @deprecated */\nexport interface IDateRangePickerProps extends DateRangePickerProps, UnknownProperties {}\nexport type DateRangePickerProps = DropdownProps &\n WithI18nEnhanceProps & {\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n value?: DateConstructorParams[];\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultValue?: DateConstructorParams[];\n /**\n * Default value date for showing the necessary month\n * */\n defaultDisplayedPeriod?: DateConstructorParams;\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultHighlighted?: DateConstructorParams[];\n /**\n * To be activated upon selecting the date\n * */\n onChange?: (date: Date[]) => void;\n /**\n * Array of dates blocked for selection\n * */\n disabled?: (Date | (Date | false)[] | string)[];\n /**\n * Date for showing the necessary month\n * @default new Date()\n * */\n displayedPeriod?: DateConstructorParams;\n /**\n * To be activated upon changing the current shown month\n * */\n onDisplayedPeriodChange?: (date: Date) => void;\n /**\n * Component size\n * @default m\n */\n size?: 'm' | 'l' | 'xl';\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n highlighted?: DateConstructorParams[];\n /**\n * Remove the 'Reset' button\n * */\n unclearable?: boolean;\n /**\n * To be activated upon selecting the date\n * */\n onHighlightedChange?: (date: Date[]) => void;\n /**\n * Array of periods\n * [{value: [new Date(), new Date()], children: \"Today\"}]\n * @default Past 2 days / Past week / Past 2 week / Past month / Past 2 month\n * */\n periods?: (ButtonProps & { value: Date[] })[];\n };\n\n/** @deprecated */\nexport interface IDateRangePickerPeriodProps\n extends DateRangePickerPeriodProps,\n UnknownProperties {}\nexport type DateRangePickerPeriodProps = BoxProps & {\n /**\n * Current selected period\n * */\n value?: DateConstructorParams[];\n /**\n * To be activated by clicking the button for switching the selected period.\n * */\n onChange?: (date: Date[]) => void;\n /**\n * To be activated by hovering a cursor over the button for changing the current displayed month.\n * */\n onDisplayedPeriodChange?: (date: Date) => void;\n /**\n * To be activated by hovering a cursor over the button for selecting the dates.\n * */\n onHighlightedChange?: (date: Date[]) => void;\n /**\n * Array of periods\n * [{value: [new Date(), new Date()], children: \"Today\"}]\n * @default Past 2 days / Past week / Past 2 week / Past month / Past 2 month\n * */\n periods?: (ButtonProps & { value: Date[] })[];\n};\n\n/** @deprecated */\nexport interface IDatePickerContext extends DatePickerContext, UnknownProperties {}\nexport type DatePickerContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n getTodayProps: PropGetterFn;\n};\n\n/** @deprecated */\nexport interface IAbstractDatePickerHandlers\n extends AbstractDatePickerHandlers,\n UnknownProperties {}\nexport type AbstractDatePickerHandlers = {\n displayedPeriod: (value: DateConstructorParams) => void;\n visible: (index: boolean) => void;\n highlighted: (list: DateConstructorParams[]) => void;\n value: (index: DateConstructorParams) => void;\n};\n\n/** @deprecated */\nexport interface IDatePickerHandlers extends DatePickerHandlers, UnknownProperties {}\nexport type DatePickerHandlers = {\n visible: (index: boolean) => void;\n};\n\n/** @deprecated */\nexport interface IInputTriggerProps extends InputTriggerProps, UnknownProperties {}\ntype BaseInputTriggerProps = InputProps & {\n /**\n * Date input placeholder characters\n * @default { year: 'Y'; month: 'M'; day: 'D' }\n */\n placeholders?: { year: string; month: string; day: string };\n locale?: string;\n onDisplayedPeriodChange?: (date: Date) => void;\n};\nexport type InputTriggerProps = BaseInputTriggerProps & {\n value?: Date;\n onChange?: (date: Date, event: ChangeEvent) => void;\n};\n\nexport type RangeInputTriggerProps = BaseInputTriggerProps & {\n value?: Date[];\n onChange?: (date: Date[], event: ChangeEvent) => void;\n};\n\n/** @deprecated */\nexport interface ISingleDateInputProps extends SingleDateInputProps, UnknownProperties {}\nexport type SingleDateInputProps = InputTriggerProps & {};\n\n/** @deprecated */\nexport interface IDateRangeProps extends DateRangeProps, UnknownProperties {}\nexport type DateRangeProps = RangeInputTriggerProps & {};\n\n/** @deprecated */\nexport interface IDatePickerMaskedInputProps\n extends DatePickerMaskedInputProps,\n UnknownProperties {}\nexport type DatePickerMaskedInputProps = {\n date?: Date;\n onDateChange?: (date: Date, event: ChangeEvent) => void;\n onDisplayedPeriodChange?: (date: Date) => void;\n locale?: string;\n parts?: { year: Boolean; month: Boolean; day: Boolean };\n disabledDates?: (Date | (Date | false)[] | string)[];\n};\n\ndeclare const InputTrigger: Intergalactic.Component<\n 'div',\n DropdownTriggerProps & InputTriggerProps\n> & {\n Addon: typeof Input.Addon;\n Value: typeof Input.Value;\n SingleDateInput: Intergalactic.Component<'div', InputProps & SingleDateInputProps> & {\n Indicator: typeof Input.Addon;\n MaskedInput: Intergalactic.Component<'input', InputMaskValueProps & DatePickerMaskedInputProps>;\n };\n};\n\ndeclare const RangeInputTrigger: Intergalactic.Component<\n 'div',\n DropdownTriggerProps & RangeInputTriggerProps\n> & {\n Addon: typeof Input.Addon;\n Value: typeof Input.Value;\n DateRange: Intergalactic.Component<'div', InputValueProps & DateRangeProps> & {\n Indicator: typeof Input.Addon;\n RangeSep: typeof Input.Addon;\n FromMaskedInput: Intergalactic.Component<\n 'input',\n InputMaskValueProps & DatePickerMaskedInputProps\n >;\n ToMaskedInput: Intergalactic.Component<\n 'input',\n InputMaskValueProps & DatePickerMaskedInputProps\n >;\n };\n};\n\ndeclare const DatePicker: Intergalactic.Component<\n 'div',\n DatePickerProps,\n DatePickerContext & CalendarDaysContext\n> & {\n /** @deprecated `DatePicker.ButtonTrigger` is deprecated, consider migrating to `DatePicker.Trigger` instead */\n ButtonTrigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n Trigger: typeof InputTrigger;\n Popper: typeof Dropdown.Popper;\n Header: typeof Box;\n Title: Intergalactic.Component<'div', DatePickerProps, DatePickerContext>;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n Today: typeof Box;\n add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n};\n\n/** @deprecated */\nexport interface IDateRangePickerContext extends DateRangePickerContext, UnknownProperties {}\nexport type DateRangePickerContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n getPeriodProps: PropGetterFn;\n};\n\ndeclare const DateRangePicker: Intergalactic.Component<\n 'div',\n DateRangePickerProps,\n DateRangePickerContext & CalendarDaysContext,\n [handlers: DatePickerHandlers]\n> & {\n /** @deprecated `DatePicker.ButtonTrigger` is deprecated, consider migrating to `DatePicker.Trigger` instead */\n ButtonTrigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n Trigger: typeof RangeInputTrigger;\n Popper: typeof Dropdown.Popper;\n Header: typeof Box;\n Title: Intergalactic.Component<'div', DateRangePickerProps, DateRangePickerContext>;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n Period: Intergalactic.Component<'div', DateRangePickerPeriodProps>;\n Apply: typeof Button;\n Reset: typeof Button;\n add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n};\n\n/** @deprecated */\nexport interface IMonthPickerContext extends MonthPickerContext, UnknownProperties {}\nexport type MonthPickerContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n};\n\ndeclare const MonthPicker: Intergalactic.Component<\n 'div',\n DatePickerProps,\n MonthPickerContext & CalendarMonthsContext,\n [handlers: DatePickerHandlers]\n> & {\n /** @deprecated `DatePicker.ButtonTrigger` is deprecated, consider migrating to `DatePicker.Trigger` instead */\n ButtonTrigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n Trigger: typeof InputTrigger;\n Popper: typeof Dropdown.Popper;\n Header: typeof Box;\n Title: Intergalactic.Component<'div', DatePickerProps, MonthPickerContext>;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n};\n\n/** @deprecated */\nexport interface IMonthRangePickerContext extends MonthRangePickerContext, UnknownProperties {}\nexport type MonthRangePickerContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n getPeriodProps: PropGetterFn;\n};\n\ndeclare const MonthRangePicker: Intergalactic.Component<\n 'div',\n DateRangePickerProps,\n MonthRangePickerContext & CalendarMonthsContext,\n [handlers: DatePickerHandlers]\n> & {\n /** @deprecated `DatePicker.ButtonTrigger` is deprecated, consider migrating to `DatePicker.Trigger` instead */\n ButtonTrigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n Trigger: typeof RangeInputTrigger;\n Popper: typeof Dropdown.Popper;\n Header: typeof Box;\n Title: Intergalactic.Component<'div', DateRangePickerProps, MonthRangePickerContext>;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n Period: Intergalactic.Component<'div', DateRangePickerPeriodProps>;\n Apply: typeof Button;\n Reset: typeof Button;\n add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n};\n\nexport { DatePicker, DateRangePicker, MonthPicker, MonthRangePicker };\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React, { ChangeEvent, ComponentProps } from 'react';\nimport dayjs from 'dayjs';\nimport { Flex, Box, BoxProps } from '@semcore/flex-box';\nimport { UnknownProperties, Intergalactic, PropGetterFn } from '@semcore/core';\nimport Button, { ButtonProps } from '@semcore/button';\nimport Dropdown, { DropdownProps, DropdownTriggerProps } from '@semcore/dropdown';\nimport { WithI18nEnhanceProps } from '@semcore/utils/lib/enhances/i18nEnhance';\nimport BaseTrigger, { BaseTriggerProps } from '@semcore/base-trigger';\nimport Input, { InputProps, InputValueProps } from '@semcore/input';\nimport { InputMaskValueProps } from '@semcore/input-mask';\nimport Checkbox from '@semcore/checkbox';\n\nexport type DateConstructorParams = string | number | Date;\n\n/** @deprecated */\nexport interface ICalendarProps extends CalendarProps, UnknownProperties {}\nexport type CalendarProps = BoxProps & {\n /**\n * Locale for displaying the days of a week and months, to be transferred to `Intl`\n * @default en\n * */\n locale?: NavigatorLanguage['language'];\n /**\n * Array of dates blocked for selection\n * Accepts the date or the range of dates for specifying infinity ([Date | false, Date | false]), crontab(6,7)\n * */\n disabled?: (Date | (Date | false)[] | string)[];\n /**\n * @ignore\n * */\n highlighted?: DateConstructorParams[];\n /**\n * @ignore\n * */\n onHighlightedChange?: (date: Date[]) => void;\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n value?: DateConstructorParams[];\n /**\n * To be activated upon selecting the date\n * */\n onChange?: (date: Date[]) => void;\n /**\n * Date for showing the necessary month\n * @default new Date()\n * */\n displayedPeriod?: Date;\n\n renderOutdated?: boolean;\n};\n\n/** @deprecated */\nexport interface ICalendarDaysContext extends CalendarDaysContext, UnknownProperties {}\nexport type CalendarDaysContext = {\n days: CalendarUnitProps[];\n};\n\n/** @deprecated */\nexport interface ICalendarMonthsContext extends CalendarMonthsContext, UnknownProperties {}\nexport type CalendarMonthsContext = {\n months: CalendarUnitProps[];\n};\n\n/** @deprecated */\nexport interface ICalendarUnitProps extends CalendarUnitProps, UnknownProperties {}\nexport type CalendarUnitProps = BoxProps & {\n selected?: boolean;\n outdated?: boolean;\n disabled?: boolean;\n today?: boolean;\n startSelected?: boolean;\n endSelected?: boolean;\n highlighted?: boolean;\n startHighlighted?: boolean;\n endHighlighted?: boolean;\n date?: Date;\n children?: React.ReactNode;\n};\n\n/** @deprecated */\nexport interface ICalendarContext extends CalendarContext, UnknownProperties {}\nexport type CalendarContext = {\n getUnitProps: PropGetterFn;\n};\n\ndeclare const Calendar: Intergalactic.Component<\n 'div',\n CalendarProps,\n CalendarContext & CalendarDaysContext,\n [handlers: AbstractDatePickerHandlers]\n> & {\n Unit: Intergalactic.Component<'div', CalendarUnitProps>;\n};\n\n/** @deprecated */\nexport interface IDatePickerProps extends DatePickerProps, UnknownProperties {}\nexport type DatePickerProps = DropdownProps &\n WithI18nEnhanceProps & {\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n value?: DateConstructorParams;\n /**\n * To be activated upon selecting the date\n * */\n onChange?: (date: Date) => void;\n /**\n * Array of dates blocked for selection\n * */\n disabled?: (Date | (Date | false)[] | string)[];\n /**\n * Date for showing the necessary month\n * @default new Date()\n * */\n displayedPeriod?: DateConstructorParams;\n /**\n * To be activated upon changing the current shown month\n * */\n onDisplayedPeriodChange?: (date: Date) => void;\n /**\n * Component size\n * @default m\n */\n size?: 'm' | 'l';\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n highlighted?: DateConstructorParams[];\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultValue?: DateConstructorParams;\n /**\n * Default value date for showing the necessary month\n * */\n defaultDisplayedPeriod?: DateConstructorParams;\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultHighlighted?: DateConstructorParams[];\n };\n\n/** @deprecated */\nexport interface IDateRangePickerProps extends DateRangePickerProps, UnknownProperties {}\nexport type DateRangePickerProps = DropdownProps &\n WithI18nEnhanceProps & {\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n value?: DateConstructorParams[];\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultValue?: DateConstructorParams[];\n /**\n * Default value date for showing the necessary month\n * */\n defaultDisplayedPeriod?: DateConstructorParams;\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultHighlighted?: DateConstructorParams[];\n /**\n * To be activated upon selecting the date\n * */\n onChange?: (date: Date[]) => void;\n /**\n * Array of dates blocked for selection\n * */\n disabled?: (Date | (Date | false)[] | string)[];\n /**\n * Date for showing the necessary month\n * @default new Date()\n * */\n displayedPeriod?: DateConstructorParams;\n /**\n * To be activated upon changing the current shown month\n * */\n onDisplayedPeriodChange?: (date: Date) => void;\n /**\n * Component size\n * @default m\n */\n size?: 'm' | 'l' | 'xl';\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n highlighted?: DateConstructorParams[];\n /**\n * Remove the 'Reset' button\n * */\n unclearable?: boolean;\n /**\n * To be activated upon selecting the date\n * */\n onHighlightedChange?: (date: Date[]) => void;\n /**\n * Array of periods\n * [{value: [new Date(), new Date()], children: \"Today\"}]\n * @default Past 2 days / Past week / Past 2 week / Past month / Past 2 month\n * */\n periods?: (ButtonProps & { value: Date[] })[];\n };\n\n/** @deprecated */\nexport interface IDateRangePickerPeriodProps\n extends DateRangePickerPeriodProps,\n UnknownProperties {}\nexport type DateRangePickerPeriodProps = BoxProps & {\n /**\n * Current selected period\n * */\n value?: DateConstructorParams[];\n /**\n * To be activated by clicking the button for switching the selected period.\n * */\n onChange?: (date: Date[]) => void;\n /**\n * To be activated by hovering a cursor over the button for changing the current displayed month.\n * */\n onDisplayedPeriodChange?: (date: Date) => void;\n /**\n * To be activated by hovering a cursor over the button for selecting the dates.\n * */\n onHighlightedChange?: (date: Date[]) => void;\n /**\n * Array of periods\n * [{value: [new Date(), new Date()], children: \"Today\"}]\n * @default Past 2 days / Past week / Past 2 week / Past month / Past 2 month\n * */\n periods?: (ButtonProps & { value: Date[] })[];\n};\n\n/** @deprecated */\nexport interface IDatePickerContext extends DatePickerContext, UnknownProperties {}\nexport type DatePickerContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n getTodayProps: PropGetterFn;\n};\n\n/** @deprecated */\nexport interface IAbstractDatePickerHandlers\n extends AbstractDatePickerHandlers,\n UnknownProperties {}\nexport type AbstractDatePickerHandlers = {\n displayedPeriod: (value: DateConstructorParams) => void;\n visible: (index: boolean) => void;\n highlighted: (list: DateConstructorParams[]) => void;\n value: (index: DateConstructorParams) => void;\n};\n\n/** @deprecated */\nexport interface IDatePickerHandlers extends DatePickerHandlers, UnknownProperties {}\nexport type DatePickerHandlers = {\n visible: (index: boolean) => void;\n};\n\n/** @deprecated */\nexport interface IInputTriggerProps extends InputTriggerProps, UnknownProperties {}\ntype BaseInputTriggerProps = InputProps & {\n /**\n * Date input placeholder characters\n * @default { year: 'Y'; month: 'M'; day: 'D' }\n */\n placeholders?: { year: string; month: string; day: string };\n locale?: string;\n onDisplayedPeriodChange?: (date: Date) => void;\n};\nexport type InputTriggerProps = BaseInputTriggerProps & {\n value?: Date;\n onChange?: (date: Date, event: ChangeEvent) => void;\n};\n\nexport type RangeInputTriggerProps = BaseInputTriggerProps & {\n value?: Date[];\n onChange?: (date: Date[], event: ChangeEvent) => void;\n};\n\n/** @deprecated */\nexport interface ISingleDateInputProps extends SingleDateInputProps, UnknownProperties {}\nexport type SingleDateInputProps = InputTriggerProps & {};\n\n/** @deprecated */\nexport interface IDateRangeProps extends DateRangeProps, UnknownProperties {}\nexport type DateRangeProps = RangeInputTriggerProps & {};\n\n/** @deprecated */\nexport interface IDatePickerMaskedInputProps\n extends DatePickerMaskedInputProps,\n UnknownProperties {}\nexport type DatePickerMaskedInputProps = {\n date?: Date;\n onDateChange?: (date: Date, event: ChangeEvent) => void;\n onDisplayedPeriodChange?: (date: Date) => void;\n locale?: string;\n parts?: { year: Boolean; month: Boolean; day: Boolean };\n disabledDates?: (Date | (Date | false)[] | string)[];\n};\n\ndeclare const InputTrigger: Intergalactic.Component<\n 'div',\n DropdownTriggerProps & InputTriggerProps\n> & {\n Addon: typeof Input.Addon;\n Value: typeof Input.Value;\n SingleDateInput: Intergalactic.Component<'div', InputProps & SingleDateInputProps> & {\n Indicator: typeof Input.Addon;\n MaskedInput: Intergalactic.Component<'input', InputMaskValueProps & DatePickerMaskedInputProps>;\n };\n};\n\ndeclare const RangeInputTrigger: Intergalactic.Component<\n 'div',\n DropdownTriggerProps & RangeInputTriggerProps\n> & {\n Addon: typeof Input.Addon;\n Value: typeof Input.Value;\n DateRange: Intergalactic.Component<'div', InputValueProps & DateRangeProps> & {\n Indicator: typeof Input.Addon;\n RangeSep: typeof Input.Addon;\n FromMaskedInput: Intergalactic.Component<\n 'input',\n InputMaskValueProps & DatePickerMaskedInputProps\n >;\n ToMaskedInput: Intergalactic.Component<\n 'input',\n InputMaskValueProps & DatePickerMaskedInputProps\n >;\n };\n};\n\ndeclare const DatePicker: Intergalactic.Component<\n 'div',\n DatePickerProps,\n DatePickerContext & CalendarDaysContext\n> & {\n /** @deprecated `DatePicker.ButtonTrigger` is deprecated, consider migrating to `DatePicker.Trigger` instead */\n ButtonTrigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n Trigger: typeof InputTrigger;\n Popper: typeof Dropdown.Popper;\n Header: typeof Box;\n Title: Intergalactic.Component<'div', DatePickerProps, DatePickerContext>;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n Today: typeof Box;\n add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n};\n\n/** @deprecated */\nexport interface IDateRangePickerContext extends DateRangePickerContext, UnknownProperties {}\nexport type DateRangePickerContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n getPeriodProps: PropGetterFn;\n};\n\ndeclare const DateRangePicker: Intergalactic.Component<\n 'div',\n DateRangePickerProps,\n DateRangePickerContext & CalendarDaysContext,\n [handlers: DatePickerHandlers]\n> & {\n /** @deprecated `DatePicker.ButtonTrigger` is deprecated, consider migrating to `DatePicker.Trigger` instead */\n ButtonTrigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n Trigger: typeof RangeInputTrigger;\n Popper: typeof Dropdown.Popper;\n Header: typeof Box;\n Title: Intergalactic.Component<'div', DateRangePickerProps, DateRangePickerContext>;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n Period: Intergalactic.Component<'div', DateRangePickerPeriodProps>;\n Apply: typeof Button;\n Reset: typeof Button;\n add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n};\n\n/** @deprecated */\nexport interface IMonthPickerContext extends MonthPickerContext, UnknownProperties {}\nexport type MonthPickerContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n};\n\ndeclare const MonthPicker: Intergalactic.Component<\n 'div',\n DatePickerProps,\n MonthPickerContext & CalendarMonthsContext,\n [handlers: DatePickerHandlers]\n> & {\n /** @deprecated `DatePicker.ButtonTrigger` is deprecated, consider migrating to `DatePicker.Trigger` instead */\n ButtonTrigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n Trigger: typeof InputTrigger;\n Popper: typeof Dropdown.Popper;\n Header: typeof Box;\n Title: Intergalactic.Component<'div', DatePickerProps, MonthPickerContext>;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n};\n\n/** @deprecated */\nexport interface IMonthRangePickerContext extends MonthRangePickerContext, UnknownProperties {}\nexport type MonthRangePickerContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n getPeriodProps: PropGetterFn;\n};\n\ndeclare const MonthRangePicker: Intergalactic.Component<\n 'div',\n DateRangePickerProps,\n MonthRangePickerContext & CalendarMonthsContext,\n [handlers: DatePickerHandlers]\n> & {\n /** @deprecated `DatePicker.ButtonTrigger` is deprecated, consider migrating to `DatePicker.Trigger` instead */\n ButtonTrigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n Trigger: typeof RangeInputTrigger;\n Popper: typeof Dropdown.Popper;\n Header: typeof Box;\n Title: Intergalactic.Component<'div', DateRangePickerProps, MonthRangePickerContext>;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n Period: Intergalactic.Component<'div', DateRangePickerPeriodProps>;\n Apply: typeof Button;\n Reset: typeof Button;\n add: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;\n};\n\nexport type DateRangeComparatorProps = DropdownProps &\n WithI18nEnhanceProps & {\n /**\n * Selected date ranges\n * */\n value?: { value?: DateConstructorParams[]; compare?: DateConstructorParams[] };\n /**\n * Default value for selected date ranges\n * */\n defaultValue?: { value?: DateConstructorParams[]; compare?: DateConstructorParams[] };\n /**\n * Default value date for showing the necessary month\n * */\n defaultDisplayedPeriod?: DateConstructorParams;\n /**\n * Default value selected date, accepts everything which is accepted by `new Date()`\n * */\n defaultHighlighted?: DateConstructorParams[];\n /**\n * Called with selected date when user clicks `Apply` button.\n * */\n onChange?: (ranges: {\n value?: DateConstructorParams[];\n compare?: DateConstructorParams[];\n }) => void;\n /**\n * Array of dates blocked for selection\n * */\n disabled?: (Date | (Date | false)[] | string)[];\n /**\n * Date for showing the necessary month\n * @default new Date()\n * */\n displayedPeriod?: DateConstructorParams;\n /**\n * To be activated upon changing the current shown month\n * */\n onDisplayedPeriodChange?: (date: Date) => void;\n /**\n * Component size\n * @default m\n */\n size?: 'm' | 'l' | 'xl';\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n highlighted?: DateConstructorParams[];\n /**\n * To be activated upon selecting the date\n * */\n onHighlightedChange?: (date: Date[]) => void;\n /**\n * The selected date, accepts everything which is accepted by `new Date()`\n * */\n compareHighlighted?: DateConstructorParams[];\n /**\n * To be activated upon selecting the date\n * */\n onCompareHighlightedChange?: (date: Date[]) => void;\n /**\n * Remove the 'Reset' button\n * */\n unclearable?: boolean;\n /**\n * Array of periods\n * [{value: [new Date(), new Date()], children: \"Today\"}]\n * @default Past 2 days / Past week / Past 2 week / Past month / Past 2 month\n * */\n periods?: (ButtonProps & { value: Date[] })[];\n };\n\nexport type DateRangeComparatorContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n getHeaderProps: PropGetterFn;\n getTitleProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getCalendarProps: PropGetterFn;\n getPeriodProps: PropGetterFn;\n};\n\nexport type DateRangeComparatorTriggerProps = DropdownTriggerProps &\n BaseTriggerProps & {\n /**\n * Text between the selected date range and the compared date range when both are selected.\n * @default 'vs.'\n */\n separator?: string;\n /**\n * Trigger text when no ranges are selected.\n */\n placeholder?: string;\n };\n\ndeclare const DateRangeComparator: Intergalactic.Component<\n 'div',\n DateRangeComparatorProps,\n DateRangeComparatorContext & CalendarDaysContext\n> & {\n Popper: typeof Dropdown.Popper;\n Header: typeof Flex;\n Prev: typeof Button;\n Next: typeof Button;\n Calendar: typeof Calendar;\n Apply: typeof Button;\n Reset: typeof Button;\n\n CalendarHeader: typeof Box;\n Title: typeof Box;\n\n Trigger: Intergalactic.Component<'div', DropdownTriggerProps & BaseTriggerProps> & {\n Addon: typeof BaseTrigger.Addon;\n Text: typeof BaseTrigger.Text;\n };\n ValueDateRange: Intergalactic.Component<'div', InputTriggerProps>;\n CompareToggle: typeof Checkbox;\n CompareDateRange: Intergalactic.Component<'div', InputTriggerProps>;\n Body: typeof Flex;\n RangeCalendar: typeof Flex;\n Periods: typeof Flex;\n Footer: typeof Flex;\n};\n\ndeclare const MonthDateRangeComparator: typeof DateRangeComparator;\n\nexport {\n DatePicker,\n DateRangePicker,\n MonthPicker,\n MonthRangePicker,\n DateRangeComparator,\n MonthDateRangeComparator,\n};\n"],"mappings":""}
|
package/lib/cjs/index.js
CHANGED
|
@@ -8,8 +8,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
var _exportNames = {
|
|
9
9
|
DatePicker: true,
|
|
10
10
|
DateRangePicker: true,
|
|
11
|
+
DateRangeComparator: true,
|
|
11
12
|
MonthPicker: true,
|
|
12
|
-
MonthRangePicker: true
|
|
13
|
+
MonthRangePicker: true,
|
|
14
|
+
MonthDateRangeComparator: true
|
|
13
15
|
};
|
|
14
16
|
Object.defineProperty(exports, "DatePicker", {
|
|
15
17
|
enumerable: true,
|
|
@@ -17,12 +19,24 @@ Object.defineProperty(exports, "DatePicker", {
|
|
|
17
19
|
return _DatePicker["default"];
|
|
18
20
|
}
|
|
19
21
|
});
|
|
22
|
+
Object.defineProperty(exports, "DateRangeComparator", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function get() {
|
|
25
|
+
return _DateRangeComparator["default"];
|
|
26
|
+
}
|
|
27
|
+
});
|
|
20
28
|
Object.defineProperty(exports, "DateRangePicker", {
|
|
21
29
|
enumerable: true,
|
|
22
30
|
get: function get() {
|
|
23
31
|
return _DateRangePicker["default"];
|
|
24
32
|
}
|
|
25
33
|
});
|
|
34
|
+
Object.defineProperty(exports, "MonthDateRangeComparator", {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
get: function get() {
|
|
37
|
+
return _MonthDateRangeComparator["default"];
|
|
38
|
+
}
|
|
39
|
+
});
|
|
26
40
|
Object.defineProperty(exports, "MonthPicker", {
|
|
27
41
|
enumerable: true,
|
|
28
42
|
get: function get() {
|
|
@@ -48,6 +62,8 @@ Object.keys(_DatePicker).forEach(function (key) {
|
|
|
48
62
|
});
|
|
49
63
|
});
|
|
50
64
|
var _DateRangePicker = _interopRequireDefault(require("./DateRangePicker"));
|
|
65
|
+
var _DateRangeComparator = _interopRequireDefault(require("./DateRangeComparator"));
|
|
51
66
|
var _MonthPicker = _interopRequireDefault(require("./MonthPicker"));
|
|
52
67
|
var _MonthRangePicker = _interopRequireDefault(require("./MonthRangePicker"));
|
|
68
|
+
var _MonthDateRangeComparator = _interopRequireDefault(require("./MonthDateRangeComparator"));
|
|
53
69
|
//# sourceMappingURL=index.js.map
|
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_DatePicker","_interopRequireWildcard","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_DateRangePicker","_interopRequireDefault","_MonthPicker","_MonthRangePicker"],"sources":["../../src/index.js"],"sourcesContent":["export { default as DatePicker } from './DatePicker';\nexport * from './DatePicker';\n\nexport { default as DateRangePicker } from './DateRangePicker';\n\nexport { default as MonthPicker } from './MonthPicker';\n\nexport { default as MonthRangePicker } from './MonthRangePicker';\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_DatePicker","_interopRequireWildcard","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_DateRangePicker","_interopRequireDefault","_DateRangeComparator","_MonthPicker","_MonthRangePicker","_MonthDateRangeComparator"],"sources":["../../src/index.js"],"sourcesContent":["export { default as DatePicker } from './DatePicker';\nexport * from './DatePicker';\n\nexport { default as DateRangePicker } from './DateRangePicker';\n\nexport { default as DateRangeComparator } from './DateRangeComparator';\n\nexport { default as MonthPicker } from './MonthPicker';\n\nexport { default as MonthRangePicker } from './MonthRangePicker';\n\nexport { default as MonthDateRangeComparator } from './MonthDateRangeComparator';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,uBAAA,CAAAC,OAAA;AACAC,MAAA,CAAAC,IAAA,CAAAJ,WAAA,EAAAK,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAN,WAAA,CAAAM,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAd,WAAA,CAAAM,GAAA;IAAA;EAAA;AAAA;AAEA,IAAAS,gBAAA,GAAAC,sBAAA,CAAAd,OAAA;AAEA,IAAAe,oBAAA,GAAAD,sBAAA,CAAAd,OAAA;AAEA,IAAAgB,YAAA,GAAAF,sBAAA,CAAAd,OAAA;AAEA,IAAAiB,iBAAA,GAAAH,sBAAA,CAAAd,OAAA;AAEA,IAAAkB,yBAAA,GAAAJ,sBAAA,CAAAd,OAAA"}
|
|
@@ -47,7 +47,7 @@ SCalendarUnit {
|
|
|
47
47
|
user-select: none;
|
|
48
48
|
touch-action: manipulation;
|
|
49
49
|
-webkit-tap-highlight-color: transparent;
|
|
50
|
-
background: var(--intergalactic-date-picker-cell, #ffffff);
|
|
50
|
+
background-color: var(--intergalactic-date-picker-cell, #ffffff);
|
|
51
51
|
|
|
52
52
|
align-items: center;
|
|
53
53
|
border-radius: var(--intergalactic-control-rounded, 6px);
|
|
@@ -62,10 +62,11 @@ SCalendarUnit {
|
|
|
62
62
|
transition: color 0.15s, background 0.15s, border-radius 0.15s 0.15s;
|
|
63
63
|
outline: none;
|
|
64
64
|
margin: 0;
|
|
65
|
+
margin-top: 4px;
|
|
65
66
|
|
|
66
67
|
&:hover {
|
|
67
68
|
color: var(--intergalactic-text-primary, #191b23);
|
|
68
|
-
background: var(--intergalactic-date-picker-cell-hover, #e0e1e9);
|
|
69
|
+
background-color: var(--intergalactic-date-picker-cell-hover, #e0e1e9);
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
&:focus-visible {
|
|
@@ -96,30 +97,30 @@ SCalendarUnit[today]SCalendarUnit[endSelected] {
|
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
SCalendarUnit[selected] {
|
|
99
|
-
background: var(--intergalactic-date-picker-cell-range, #c4e5fe);
|
|
100
|
+
background-color: var(--intergalactic-date-picker-cell-range, #c4e5fe);
|
|
100
101
|
border-radius: 0;
|
|
101
102
|
transition: color 0.15s, background 0.15s, border-radius 0s 0s;
|
|
102
103
|
color: var(--intergalactic-text-primary, #191b23);
|
|
103
104
|
|
|
104
105
|
&:hover {
|
|
105
|
-
background: var(--intergalactic-date-picker-cell-range-hover, #8ecdff);
|
|
106
|
+
background-color: var(--intergalactic-date-picker-cell-range-hover, #8ecdff);
|
|
106
107
|
}
|
|
107
108
|
}
|
|
108
109
|
|
|
109
110
|
SCalendarUnit[highlighted] {
|
|
110
|
-
background: var(--intergalactic-date-picker-cell-range-hover, #8ecdff);
|
|
111
|
+
background-color: var(--intergalactic-date-picker-cell-range-hover, #8ecdff);
|
|
111
112
|
border-radius: 0;
|
|
112
113
|
transition: color 0.15s, background 0.15s, border-radius 0s 0s;
|
|
113
114
|
color: var(--intergalactic-text-primary, #191b23);
|
|
114
115
|
|
|
115
116
|
&:hover {
|
|
116
|
-
background: var(--intergalactic-date-picker-cell-range-hover, #8ecdff);
|
|
117
|
+
background-color: var(--intergalactic-date-picker-cell-range-hover, #8ecdff);
|
|
117
118
|
}
|
|
118
119
|
}
|
|
119
120
|
|
|
120
121
|
SCalendarUnit[startSelected] {
|
|
121
122
|
color: var(--intergalactic-text-primary-invert, #ffffff);
|
|
122
|
-
background: var(--intergalactic-date-picker-cell-active, #2bb3ff);
|
|
123
|
+
background-color: var(--intergalactic-date-picker-cell-active, #2bb3ff);
|
|
123
124
|
|
|
124
125
|
&:not([highlighted]) {
|
|
125
126
|
border-bottom-left-radius: var(--intergalactic-control-rounded, 6px);
|
|
@@ -130,12 +131,12 @@ SCalendarUnit[startSelected] {
|
|
|
130
131
|
|
|
131
132
|
&:hover {
|
|
132
133
|
color: var(--intergalactic-text-primary-invert, #ffffff);
|
|
133
|
-
background: var(--intergalactic-date-picker-cell-active-hover, #008ff8);
|
|
134
|
+
background-color: var(--intergalactic-date-picker-cell-active-hover, #008ff8);
|
|
134
135
|
}
|
|
135
136
|
}
|
|
136
137
|
|
|
137
138
|
SCalendarUnit[endSelected] {
|
|
138
|
-
background: var(--intergalactic-date-picker-cell-active, #2bb3ff);
|
|
139
|
+
background-color: var(--intergalactic-date-picker-cell-active, #2bb3ff);
|
|
139
140
|
color: var(--intergalactic-text-primary-invert, #ffffff);
|
|
140
141
|
|
|
141
142
|
&:not([highlighted]) {
|
|
@@ -147,7 +148,7 @@ SCalendarUnit[endSelected] {
|
|
|
147
148
|
|
|
148
149
|
&:hover {
|
|
149
150
|
color: var(--intergalactic-text-primary-invert, #ffffff);
|
|
150
|
-
background: var(--intergalactic-date-picker-cell-active-hover, #008ff8);
|
|
151
|
+
background-color: var(--intergalactic-date-picker-cell-active-hover, #008ff8);
|
|
151
152
|
}
|
|
152
153
|
}
|
|
153
154
|
|
|
@@ -179,6 +180,52 @@ SCalendarUnit[startSelected]SCalendarUnit[endSelected] {
|
|
|
179
180
|
border-top-right-radius: var(--intergalactic-control-rounded, 6px);
|
|
180
181
|
}
|
|
181
182
|
|
|
183
|
+
SCalendarUnit[compareHighlighted] {
|
|
184
|
+
border-top: 2px dashed var(--intergalactic-date-picker-cell-comparison-active, #8649e1);
|
|
185
|
+
border-bottom: 2px dashed var(--intergalactic-date-picker-cell-comparison-active, #8649e1);
|
|
186
|
+
border-radius: 0;
|
|
187
|
+
transition: none;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
SCalendarUnit[compareStartHighlighted],
|
|
192
|
+
SCalendarUnit[compareEndHighlighted] {
|
|
193
|
+
border-left: 2px dashed var(--intergalactic-date-picker-cell-comparison-active, #8649e1);
|
|
194
|
+
border-right: 2px dashed var(--intergalactic-date-picker-cell-comparison-active, #8649e1);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
SCalendarUnit[compareStart],
|
|
198
|
+
SCalendarUnit[compareEnd] {
|
|
199
|
+
border-radius: 0;
|
|
200
|
+
background-color: var(--intergalactic-date-picker-cell-comparison-active, #8649e1);
|
|
201
|
+
color: var(--intergalactic-text-primary-invert, #ffffff);
|
|
202
|
+
|
|
203
|
+
&:hover {
|
|
204
|
+
color: var(--intergalactic-text-primary-invert, #ffffff);
|
|
205
|
+
background-color: var(--intergalactic-date-picker-cell-comparison-active-hover, #5925ab);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
SCalendarUnit[compareStartHighlighted] {
|
|
210
|
+
border-top-left-radius: var(--intergalactic-control-rounded, 6px);
|
|
211
|
+
border-bottom-left-radius: var(--intergalactic-control-rounded, 6px);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
SCalendarUnit[compareEndHighlighted] {
|
|
215
|
+
border-top-right-radius: var(--intergalactic-control-rounded, 6px);
|
|
216
|
+
border-bottom-right-radius: var(--intergalactic-control-rounded, 6px);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
SCalendarUnit[compareStart]:not([compareHighlighted]) {
|
|
220
|
+
border-top-left-radius: var(--intergalactic-control-rounded, 6px);
|
|
221
|
+
border-bottom-left-radius: var(--intergalactic-control-rounded, 6px);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
SCalendarUnit[compareEnd]:not([compareHighlighted]) {
|
|
225
|
+
border-top-right-radius: var(--intergalactic-control-rounded, 6px);
|
|
226
|
+
border-bottom-right-radius: var(--intergalactic-control-rounded, 6px);
|
|
227
|
+
}
|
|
228
|
+
|
|
182
229
|
SCalendarUnit[outdated] {
|
|
183
230
|
opacity: 0.2;
|
|
184
231
|
}
|
|
@@ -59,6 +59,19 @@ SIndicator {
|
|
|
59
59
|
color: var(--intergalactic-text-secondary, #6c6e79);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
SRangeIndicator {
|
|
63
|
+
border-radius: 50%;
|
|
64
|
+
flex-shrink: 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
SRangeIndicator[range='value'] {
|
|
68
|
+
background-color: var(--intergalactic-date-picker-cell-active, #2bb3ff);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
SRangeIndicator[range='compare'] {
|
|
72
|
+
background-color: var(--intergalactic-date-picker-cell-comparison-active, #8649e1);
|
|
73
|
+
}
|
|
74
|
+
|
|
62
75
|
SHumanizedDate {
|
|
63
76
|
position: absolute;
|
|
64
77
|
pointer-events: none;
|
|
@@ -107,4 +120,22 @@ SDateRange SInputMask:focus-within SMask {
|
|
|
107
120
|
SRangeSep[fulfilled],
|
|
108
121
|
SDateRange:focus-within SRangeSep {
|
|
109
122
|
color: var(--intergalactic-text-primary, #191b23);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
SRangeComparatorHeader {
|
|
126
|
+
border-bottom: 1px solid var(--intergalactic-border-primary, #c4c7cf);
|
|
127
|
+
padding: var(--intergalactic-spacing-4x, 16px);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
SRangeCalendar {
|
|
131
|
+
padding: var(--intergalactic-spacing-4x, 16px);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
SFooter {
|
|
135
|
+
border-top: 1px solid var(--intergalactic-border-primary, #c4c7cf);
|
|
136
|
+
padding: var(--intergalactic-spacing-4x, 16px);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
SPeriodsList {
|
|
140
|
+
padding: var(--intergalactic-spacing-4x, 16px);
|
|
110
141
|
}
|