intergalactic 15.81.0 → 15.82.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 +39 -33
- package/color-picker/lib/cjs/ColorPicker.js +23 -23
- package/color-picker/lib/cjs/PaletteManager.js +23 -23
- package/color-picker/lib/cjs/components/InputColor.js +23 -23
- package/color-picker/lib/es6/ColorPicker.js +23 -23
- package/color-picker/lib/es6/PaletteManager.js +23 -23
- package/color-picker/lib/es6/components/InputColor.js +23 -23
- package/components.json +19 -19
- package/d3-chart/lib/cjs/Area.js +11 -11
- package/d3-chart/lib/cjs/Axis.js +14 -14
- package/d3-chart/lib/cjs/Bar.js +10 -10
- package/d3-chart/lib/cjs/Bubble.js +12 -12
- package/d3-chart/lib/cjs/Donut.js +9 -9
- package/d3-chart/lib/cjs/Dots.js +8 -8
- package/d3-chart/lib/cjs/HorizontalBar.js +10 -10
- package/d3-chart/lib/cjs/Hover.js +3 -3
- package/d3-chart/lib/cjs/Line.js +9 -9
- package/d3-chart/lib/cjs/Plot.js +3 -3
- package/d3-chart/lib/cjs/Radar.js +19 -19
- package/d3-chart/lib/cjs/RadialTree.js +11 -11
- package/d3-chart/lib/cjs/ReferenceLine.js +9 -9
- package/d3-chart/lib/cjs/ScatterPlot.js +9 -9
- package/d3-chart/lib/cjs/Tooltip.js +9 -9
- package/d3-chart/lib/cjs/Venn.js +9 -9
- package/d3-chart/lib/cjs/a11y/PlotA11yModule.js +2 -2
- package/d3-chart/lib/cjs/a11y/PlotA11yView.js +2 -2
- package/d3-chart/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
- package/d3-chart/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +17 -17
- package/d3-chart/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +6 -6
- package/d3-chart/lib/es6/Area.js +11 -11
- package/d3-chart/lib/es6/Axis.js +14 -14
- package/d3-chart/lib/es6/Bar.js +10 -10
- package/d3-chart/lib/es6/Bubble.js +12 -12
- package/d3-chart/lib/es6/Donut.js +9 -9
- package/d3-chart/lib/es6/Dots.js +8 -8
- package/d3-chart/lib/es6/HorizontalBar.js +10 -10
- package/d3-chart/lib/es6/Hover.js +3 -3
- package/d3-chart/lib/es6/Line.js +9 -9
- package/d3-chart/lib/es6/Plot.js +3 -3
- package/d3-chart/lib/es6/Radar.js +19 -19
- package/d3-chart/lib/es6/RadialTree.js +11 -11
- package/d3-chart/lib/es6/ReferenceLine.js +9 -9
- package/d3-chart/lib/es6/ScatterPlot.js +9 -9
- package/d3-chart/lib/es6/Tooltip.js +9 -9
- package/d3-chart/lib/es6/Venn.js +9 -9
- package/d3-chart/lib/es6/a11y/PlotA11yModule.js +2 -2
- package/d3-chart/lib/es6/a11y/PlotA11yView.js +2 -2
- package/d3-chart/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
- package/d3-chart/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +17 -17
- package/d3-chart/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +6 -6
- package/data-table/Body.d.ts +1 -0
- package/data-table/DataTable.d.ts +4 -0
- package/data-table/Head.d.ts +7 -1
- package/data-table/lib/cjs/Body.js +13 -6
- package/data-table/lib/cjs/Body.js.map +1 -1
- package/data-table/lib/cjs/DataTable.js +70 -53
- package/data-table/lib/cjs/DataTable.js.map +1 -1
- package/data-table/lib/cjs/Head.js +63 -9
- package/data-table/lib/cjs/Head.js.map +1 -1
- package/data-table/lib/cjs/style/data-table.shadow.css +19 -6
- package/data-table/lib/cjs/types.js.map +1 -1
- package/data-table/lib/es6/Body.js +13 -6
- package/data-table/lib/es6/Body.js.map +1 -1
- package/data-table/lib/es6/DataTable.js +70 -53
- package/data-table/lib/es6/DataTable.js.map +1 -1
- package/data-table/lib/es6/Head.js +61 -8
- package/data-table/lib/es6/Head.js.map +1 -1
- package/data-table/lib/es6/style/data-table.shadow.css +19 -6
- package/data-table/lib/es6/types.js.map +1 -1
- package/data-table/lib/types/Body.d.ts +1 -0
- package/data-table/lib/types/DataTable.d.ts +4 -0
- package/data-table/lib/types/Head.d.ts +7 -1
- package/data-table/lib/types/types.d.ts +2 -4
- package/data-table/types.d.ts +2 -4
- package/date-picker/index.d.ts +6 -5
- package/date-picker/lib/cjs/MonthDateRangeComparator.js +6 -1
- package/date-picker/lib/cjs/MonthDateRangeComparator.js.map +1 -1
- package/date-picker/lib/cjs/components/Calendar.js +21 -21
- package/date-picker/lib/cjs/components/DateRangeComparatorAbstract.js +29 -29
- package/date-picker/lib/cjs/components/InputTrigger.js +48 -39
- package/date-picker/lib/cjs/components/InputTrigger.js.map +1 -1
- package/date-picker/lib/cjs/components/PickerAbstract.js +29 -29
- package/date-picker/lib/cjs/components/RangePickerAbstract.js +29 -29
- package/date-picker/lib/cjs/index.d.js.map +1 -1
- package/date-picker/lib/es6/MonthDateRangeComparator.js +6 -1
- package/date-picker/lib/es6/MonthDateRangeComparator.js.map +1 -1
- package/date-picker/lib/es6/components/Calendar.js +21 -21
- package/date-picker/lib/es6/components/DateRangeComparatorAbstract.js +29 -29
- package/date-picker/lib/es6/components/InputTrigger.js +48 -39
- package/date-picker/lib/es6/components/InputTrigger.js.map +1 -1
- package/date-picker/lib/es6/components/PickerAbstract.js +29 -29
- package/date-picker/lib/es6/components/RangePickerAbstract.js +29 -29
- package/date-picker/lib/es6/index.d.js.map +1 -1
- package/date-picker/lib/types/index.d.ts +6 -5
- package/dropdown/lib/cjs/Dropdown.js +2 -2
- package/dropdown/lib/es6/Dropdown.js +2 -2
- package/dropdown-menu/lib/cjs/DropdownMenu.js +16 -16
- package/dropdown-menu/lib/cjs/styleScrollArea.js +6 -6
- package/dropdown-menu/lib/es6/DropdownMenu.js +16 -16
- package/dropdown-menu/lib/es6/styleScrollArea.js +6 -6
- package/feature-popover/lib/cjs/FeaturePopover.js +10 -10
- package/feature-popover/lib/es6/FeaturePopover.js +10 -10
- package/inline-input/lib/cjs/InlineInput.js +18 -18
- package/inline-input/lib/es6/InlineInput.js +18 -18
- package/input/index.d.ts +1 -1
- package/input/lib/cjs/Input.js +29 -20
- package/input/lib/cjs/Input.js.map +1 -1
- package/input/lib/cjs/index.d.js.map +1 -1
- package/input/lib/es6/Input.js +29 -20
- package/input/lib/es6/Input.js.map +1 -1
- package/input/lib/es6/index.d.js.map +1 -1
- package/input/lib/types/index.d.ts +1 -1
- package/input-mask/lib/cjs/InputMask.js +6 -6
- package/input-mask/lib/es6/InputMask.js +6 -6
- package/input-number/lib/cjs/InputNumber.js +18 -9
- package/input-number/lib/cjs/InputNumber.js.map +1 -1
- package/input-number/lib/es6/InputNumber.js +18 -9
- package/input-number/lib/es6/InputNumber.js.map +1 -1
- package/input-tags/lib/cjs/InputTags.js +12 -12
- package/input-tags/lib/es6/InputTags.js +12 -12
- package/package.json +1 -1
- package/pagination/lib/cjs/Pagination.js +10 -10
- package/pagination/lib/es6/Pagination.js +10 -10
- package/popper/lib/cjs/Popper.js +21 -11
- package/popper/lib/cjs/Popper.js.map +1 -1
- package/popper/lib/es6/Popper.js +21 -11
- package/popper/lib/es6/Popper.js.map +1 -1
- package/select/lib/cjs/InputSearch.js +6 -6
- package/select/lib/cjs/Select.js +8 -8
- package/select/lib/es6/InputSearch.js +6 -6
- package/select/lib/es6/Select.js +8 -8
- package/tab-line/lib/cjs/TabLine.js +13 -14
- package/tab-line/lib/cjs/TabLine.js.map +1 -1
- package/tab-line/lib/es6/TabLine.js +13 -14
- package/tab-line/lib/es6/TabLine.js.map +1 -1
- package/tab-panel/lib/cjs/TabPanel.js +8 -9
- package/tab-panel/lib/cjs/TabPanel.js.map +1 -1
- package/tab-panel/lib/es6/TabPanel.js +8 -9
- package/tab-panel/lib/es6/TabPanel.js.map +1 -1
- package/time-picker/lib/cjs/TimePicker.js +12 -12
- package/time-picker/lib/es6/TimePicker.js +12 -12
- package/tooltip/lib/cjs/Tooltip.js +9 -9
- package/tooltip/lib/es6/Tooltip.js +9 -9
@@ -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 { Flex, Box, BoxProps } from '@semcore/flex-box';\nimport { UnknownProperties, Intergalactic, PropGetterFn } from '@semcore/core';\nimport Button, { ButtonProps } from '@semcore/button';\nimport Divider from '@semcore/divider';\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';\nimport { TooltipProps } from '@semcore/tooltip';\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 = Intergalactic.InternalTypings.EfficientOmit<\n DropdownProps,\n 'disabled'\n> &\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 * Error message when user attempts to input a disabled date\n * */\n disabledErrorText?: ((attemptedDate: Date) => string) | string | null;\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 = Intergalactic.InternalTypings.EfficientOmit<\n DropdownProps,\n 'disabled'\n> &\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 * Error message when user attempts to input a disabled date\n * */\n disabledErrorText?: ((attemptedDate: Date) => string) | string | null;\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 * 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 * Intermediate value between `highlighted` and `value` that user see before explicitly applying it.\n */\n preselectedValue?: DateConstructorParams[];\n /**\n * Normally called when user preselects a date range and when user applies this range.\n */\n onPreselectedValueChange?: (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 {}\nexport type BaseInputTriggerProps = InputProps &\n TooltipProps & {\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 TooltipProps & {\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 = Intergalactic.InternalTypings.EfficientOmit<\n DropdownProps,\n 'disabled'\n> &\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 * Error message when user attempts to input a disabled date\n * */\n disabledErrorText?: ((attemptedDate: Date) => string) | string | null;\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 * 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 * Intermediate value between `highlighted` and `value` that user see before explicitly applying it.\n */\n preselectedValue?: DateConstructorParams[];\n /**\n * Normally called when user preselects a date range and when user applies this range.\n */\n onPreselectedValueChange?: (date: Date[]) => void;\n /**\n * Intermediate value between `compareHighlighted` and `compare` that user see before explicitly applying it.\n */\n preselectedCompare?: DateConstructorParams[];\n /**\n * Normally called when user preselects a compare range and when user applies ranges.\n */\n onPreselectedCompareChange?: (date: Date[]) => void;\n /**\n * Controls that compare range input is enabled.\n */\n compareToggle?: boolean;\n /**\n * Toggles when compare range input enables or disables.\n */\n onCompareToggleChange?: (compareToggle: boolean) => void;\n /**\n * Controls which date range is focused.\n */\n focusedRange?: 'value' | 'compare';\n /**\n * Called when user focuses or is focused on some of the date ranges.\n */\n onFocusedRangeChange?: (focusedRange: 'value' | 'compare') => 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 Divider: typeof Divider;\n Column: typeof Flex;\n Options: typeof Flex;\n Controls: typeof Flex;\n };\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":""}
|
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 Divider from '@semcore/divider';\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';\nimport { TooltipProps } from '@semcore/tooltip';\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 = Intergalactic.InternalTypings.EfficientOmit<\n DropdownProps,\n 'disabled'\n> &\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 * Error message when user attempts to input a disabled date\n * */\n disabledErrorText?: ((attemptedDate: Date) => string) | string | null;\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 = Intergalactic.InternalTypings.EfficientOmit<\n DropdownProps,\n 'disabled'\n> &\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 * Error message when user attempts to input a disabled date\n * */\n disabledErrorText?: ((attemptedDate: Date) => string) | string | null;\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 * 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 * Intermediate value between `highlighted` and `value` that user see before explicitly applying it.\n */\n preselectedValue?: DateConstructorParams[];\n /**\n * Normally called when user preselects a date range and when user applies this range.\n */\n onPreselectedValueChange?: (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 {}\nexport type BaseInputTriggerProps = InputProps &\n TooltipProps & {\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 /** Flag to show or hide error state (and tooltip with error message) on Input */\n showError?: boolean;\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 = Intergalactic.InternalTypings.EfficientOmit<\n DropdownProps,\n 'disabled'\n> &\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 * Error message when user attempts to input a disabled date\n * */\n disabledErrorText?: ((attemptedDate: Date) => string) | string | null;\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 * 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 * Intermediate value between `highlighted` and `value` that user see before explicitly applying it.\n */\n preselectedValue?: DateConstructorParams[];\n /**\n * Normally called when user preselects a date range and when user applies this range.\n */\n onPreselectedValueChange?: (date: Date[]) => void;\n /**\n * Intermediate value between `compareHighlighted` and `compare` that user see before explicitly applying it.\n */\n preselectedCompare?: DateConstructorParams[];\n /**\n * Normally called when user preselects a compare range and when user applies ranges.\n */\n onPreselectedCompareChange?: (date: Date[]) => void;\n /**\n * Controls that compare range input is enabled.\n */\n compareToggle?: boolean;\n /**\n * Toggles when compare range input enables or disables.\n */\n onCompareToggleChange?: (compareToggle: boolean) => void;\n /**\n * Controls which date range is focused.\n */\n focusedRange?: 'value' | 'compare';\n /**\n * Called when user focuses or is focused on some of the date ranges.\n */\n onFocusedRangeChange?: (focusedRange: 'value' | 'compare') => 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 Divider: typeof Divider;\n Column: typeof Flex;\n Options: typeof Flex;\n Controls: typeof Flex;\n };\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":""}
|
@@ -176,7 +176,12 @@ function CompareDateRange(props) {
|
|
176
176
|
function RangeCalendar(props) {
|
177
177
|
var _ref5;
|
178
178
|
var SRangeCalendar = props.Root,
|
179
|
-
styles = props.styles
|
179
|
+
styles = props.styles,
|
180
|
+
Children = props.Children,
|
181
|
+
hasChildren = props.children;
|
182
|
+
if (hasChildren) {
|
183
|
+
return /*#__PURE__*/React.createElement(Children, null);
|
184
|
+
}
|
180
185
|
return _ref5 = sstyled(styles), /*#__PURE__*/React.createElement(SRangeCalendar, _ref5.cn("SRangeCalendar", {
|
181
186
|
"render": Flex,
|
182
187
|
"gap": 8
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MonthDateRangeComparator.js","names":["React","createComponent","Root","sstyled","Header","CalendarHeader","Next","Period","Popper","Prev","Title","CalendarMonths","Calendar","Box","Flex","dayjs","Divider","RangeComparatorAbstract","Apply","Reset","Trigger","CompareToggle","Body","Footer","InputTriggerBase","dateParts","day","month","year","RangeInput","props","_ref","arguments[0]","_ref2","styles","SComparatorRangeInput","SRangeIndicator","createElement","cn","_objectSpread","_assignProps","DateRange","range","disabled","Indicator","FromMaskedInput","RangeSep","ToMaskedInput","MaskedInput","Addon","SingleDateInput","DateRangeFromInput","DateRangeToInput","MonthDateRangeComparatorRoot","_RangeComparatorAbstr","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","_createClass","key","value","getTitleProps","index","_this$asProps","asProps","displayedPeriod","locale","_get","_getPrototypeOf","prototype","children","Intl","DateTimeFormat","format","add","navigateStep","startOf","toDate","getRangeInput","MonthDateRangeComparator","getValueDateRangeProps","w","getCompareDateRangeProps","getPopperProps","Fragment","showButtons","getHeaderProps","ValueDateRange","CompareDateRange","getBodyProps","_ref11","RangeCalendar","Periods","getPeriodsProps","_ref12","_ref12$unclearable","unclearable","Column","Options","Controls","getFooterProps","_ref13","_ref13$unclearable","defaultProps","_ref3","SValueDateRange","_ref4","SCompareDateRange","_ref5","SRangeCalendar","tag","_ref6","SPeriods","PeriodsDivider","_ref7","SPeriodsDivider","PeriodsColumn","_ref8","SPeriodsColumn","PeriodsOptions","_ref9","SPeriodsList","PeriodsControls","_ref10","SPeriodsControls","parent"],"sources":["../../src/MonthDateRangeComparator.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Root, sstyled } from '@semcore/core';\nimport { Header as CalendarHeader, Next, Period, Popper, Prev, Title } from './components';\nimport { CalendarMonths as Calendar } from './components/Calendar';\nimport { Box, Flex } from '@semcore/flex-box';\nimport dayjs from 'dayjs';\nimport Divider from '@semcore/divider';\nimport RangeComparatorAbstract, {\n Apply,\n Reset,\n Header,\n Trigger,\n CompareToggle,\n Body,\n Footer,\n} from './components/DateRangeComparatorAbstract';\nimport InputTriggerBase from './components/InputTrigger';\n\nconst dateParts = { day: false, month: true, year: true };\n\nfunction RangeInput(props) {\n const { styles } = props;\n const SComparatorRangeInput = Root;\n const SRangeIndicator = Box;\n return sstyled(styles)(\n <SComparatorRangeInput\n data-name='SComparatorRangeInput'\n render={Box}\n tag={InputTriggerBase}\n parts={dateParts}\n __excludeProps={['role', 'aria-haspopup', 'aria-expanded', 'onChange', 'value', 'id']}\n >\n <InputTriggerBase.DateRange>\n <SRangeIndicator range={props.range} disabled={props.disabled} w={12} h={12} ml={2} />\n <InputTriggerBase.DateRange.Indicator />\n <InputTriggerBase.DateRange.FromMaskedInput />\n <InputTriggerBase.DateRange.RangeSep />\n <InputTriggerBase.DateRange.ToMaskedInput />\n </InputTriggerBase.DateRange>\n </SComparatorRangeInput>,\n );\n}\nRangeInput.Indicator = InputTriggerBase.Indicator;\nRangeInput.MaskedInput = InputTriggerBase.MaskedInput;\nRangeInput.Addon = InputTriggerBase.Addon;\nRangeInput.SingleDateInput = InputTriggerBase.SingleDateInput;\nRangeInput.DateRange = InputTriggerBase.DateRange;\nRangeInput.DateRangeFromInput = InputTriggerBase.DateRangeFromInput;\nRangeInput.DateRangeToInput = InputTriggerBase.DateRangeToInput;\n\nclass MonthDateRangeComparatorRoot extends RangeComparatorAbstract {\n static displayName = 'MonthDateRangeComparator';\n static defaultProps = (props) => {\n return {\n ...RangeComparatorAbstract.defaultProps(props),\n children: (\n <>\n <MonthDateRangeComparator.Trigger />\n <MonthDateRangeComparator.Popper />\n </>\n ),\n };\n };\n\n navigateStep = 'year';\n keyStep = 'month';\n keyDiff = {\n ArrowLeft: -1,\n ArrowUp: -3,\n ArrowRight: 1,\n ArrowDown: 3,\n };\n\n getTitleProps(props, index) {\n const { displayedPeriod, locale } = this.asProps;\n return {\n ...super.getTitleProps(props, index),\n children: new Intl.DateTimeFormat(locale, { year: 'numeric' }).format(\n dayjs(displayedPeriod).add(index, this.navigateStep).startOf(this.navigateStep).toDate(),\n ),\n };\n }\n\n getRangeInput() {\n return <MonthDateRangeComparator.RangeInput.DateRange />;\n }\n\n getValueDateRangeProps() {\n const props = super.getValueDateRangeProps();\n return {\n ...props,\n w: props.w - 60,\n };\n }\n\n getCompareDateRangeProps() {\n const props = super.getCompareDateRangeProps();\n return {\n ...props,\n w: props.w - 60,\n };\n }\n\n getPopperProps() {\n return {\n ...super.getPopperProps(),\n children: (\n <>\n <MonthDateRangeComparator.Header />\n <MonthDateRangeComparator.Body showButtons={true} />\n </>\n ),\n };\n }\n\n getHeaderProps() {\n return {\n children: (\n <>\n <MonthDateRangeComparator.ValueDateRange />\n <MonthDateRangeComparator.CompareToggle />\n <MonthDateRangeComparator.CompareDateRange />\n </>\n ),\n };\n }\n\n getBodyProps({ showButtons }) {\n return {\n children: (\n <>\n <MonthDateRangeComparator.RangeCalendar />\n <MonthDateRangeComparator.Periods showButtons={showButtons} />\n </>\n ),\n };\n }\n\n getPeriodsProps({ showButtons, unclearable = false }) {\n return {\n children: (\n <>\n <MonthDateRangeComparator.Periods.Divider />\n <MonthDateRangeComparator.Periods.Column>\n <MonthDateRangeComparator.Periods.Options />\n {showButtons && (\n <MonthDateRangeComparator.Periods.Controls>\n <MonthDateRangeComparator.Apply />\n {!unclearable && <MonthDateRangeComparator.Reset />}\n </MonthDateRangeComparator.Periods.Controls>\n )}\n </MonthDateRangeComparator.Periods.Column>\n </>\n ),\n };\n }\n\n getFooterProps({ unclearable = false }) {\n return {\n children: (\n <>\n <MonthDateRangeComparator.Apply />\n {!unclearable && <MonthDateRangeComparator.Reset />}\n </>\n ),\n };\n }\n}\n\nfunction ValueDateRange(props) {\n const { Root: SValueDateRange, styles } = props;\n return sstyled(styles)(\n <SValueDateRange render={MonthDateRangeComparator.RangeInput} range='value' />,\n );\n}\n\nfunction CompareDateRange(props) {\n const { Root: SCompareDateRange, styles } = props;\n return sstyled(styles)(\n <SCompareDateRange render={MonthDateRangeComparator.RangeInput} range='compare' />,\n );\n}\n\nfunction RangeCalendar(props) {\n const { Root: SRangeCalendar, styles } = props;\n return sstyled(styles)(\n <SRangeCalendar render={Flex} gap={8}>\n <Flex direction='column'>\n <MonthDateRangeComparator.CalendarHeader tag={Flex}>\n <MonthDateRangeComparator.Prev />\n <MonthDateRangeComparator.Title />\n </MonthDateRangeComparator.CalendarHeader>\n <MonthDateRangeComparator.Calendar />\n </Flex>\n <Flex direction='column'>\n <MonthDateRangeComparator.CalendarHeader tag={Flex}>\n <MonthDateRangeComparator.Title />\n <MonthDateRangeComparator.Next />\n </MonthDateRangeComparator.CalendarHeader>\n <MonthDateRangeComparator.Calendar />\n </Flex>\n </SRangeCalendar>,\n );\n}\nfunction Periods(props) {\n const { Root: SPeriods, styles } = props;\n return sstyled(styles)(<SPeriods render={Flex} />);\n}\nfunction PeriodsDivider(props) {\n const { Root: SPeriodsDivider, styles } = props;\n return sstyled(styles)(<SPeriodsDivider orientation='vertical' h='auto' render={Divider} />);\n}\nfunction PeriodsColumn(props) {\n const { Root: SPeriodsColumn, styles } = props;\n return sstyled(styles)(\n <SPeriodsColumn render={Flex} direction='column' justifyContent='space-between' p={1} />,\n );\n}\nfunction PeriodsOptions(props) {\n const { styles, Root: SPeriodsList } = props;\n return sstyled(styles)(<SPeriodsList render={MonthDateRangeComparator.Period} />);\n}\nfunction PeriodsControls(props) {\n const { styles, Root: SPeriodsControls } = props;\n return sstyled(styles)(<SPeriodsControls render={Flex} p={4} gap={2} />);\n}\n\nconst MonthDateRangeComparator = createComponent(\n MonthDateRangeComparatorRoot,\n {\n Popper,\n CalendarHeader,\n Title,\n Header,\n Prev,\n Next,\n Calendar,\n Period,\n Apply,\n Reset,\n\n Trigger,\n ValueDateRange,\n CompareToggle,\n CompareDateRange,\n Body,\n RangeCalendar,\n Periods: [\n Periods,\n {\n Divider: PeriodsDivider,\n Column: PeriodsColumn,\n Options: PeriodsOptions,\n Controls: PeriodsControls,\n },\n ],\n Footer,\n RangeInput,\n },\n {\n parent: Calendar,\n },\n);\n\nexport default MonthDateRangeComparator;\n"],"mappings":";;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,eAAe,IAAIC,IAAI,EAAEC,OAAO,QAAQ,eAAe;AAC9D,SAASC,MAAM,IAAIC,cAAc,EAAEC,IAAI,EAAEC,MAAM,EAAEC,MAAM,EAAEC,IAAI,EAAEC,KAAK,QAAQ,cAAc;AAC1F,SAASC,cAAc,IAAIC,QAAQ,QAAQ,uBAAuB;AAClE,SAASC,GAAG,EAAEC,IAAI,QAAQ,mBAAmB;AAC7C,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,OAAO,MAAM,kBAAkB;AACtC,OAAOC,uBAAuB,IAC5BC,KAAK,EACLC,KAAK,EACLf,MAAM,EACNgB,OAAO,EACPC,aAAa,EACbC,IAAI,EACJC,MAAM,QACD,0CAA0C;AACjD,OAAOC,gBAAgB,MAAM,2BAA2B;AAExD,IAAMC,SAAS,GAAG;EAAEC,GAAG,EAAE,KAAK;EAAEC,KAAK,EAAE,IAAI;EAAEC,IAAI,EAAE;AAAK,CAAC;AAEzD,SAASC,UAAUA,CAACC,KAAK,EAAE;EAAA,IAAAC,IAAA,GAAAC,YAAA;IAAAC,KAAA;EACzB,IAAQC,MAAM,GAAKJ,KAAK,CAAhBI,MAAM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BAA4B,EAC5B;EACE7C,MAAM,EAANA,MAAM;EACNH,cAAc,EAAdA,cAAc;EACdK,KAAK,EAALA,KAAK;EACLN,MAAM,EAANA,MAAM;EACNK,IAAI,EAAJA,IAAI;EACJH,IAAI,EAAJA,IAAI;EACJM,QAAQ,EAARA,QAAQ;EACRL,MAAM,EAANA,MAAM;EACNW,KAAK,EAALA,KAAK;EACLC,KAAK,EAALA,KAAK;EAELC,OAAO,EAAPA,OAAO;EACPoF,cAAc,EAAdA,cAAc;EACdnF,aAAa,EAAbA,aAAa;EACboF,gBAAgB,EAAhBA,gBAAgB;EAChBnF,IAAI,EAAJA,IAAI;EACJsF,aAAa,EAAbA,aAAa;EACbC,OAAO,EAAE,CACPA,OAAO,EACP;IACE7F,OAAO,EAAEkH,cAAc;IACvBhB,MAAM,EAAEmB,aAAa;IACrBlB,OAAO,EAAEqB,cAAc;IACvBpB,QAAQ,EAAEuB;EACZ,CAAC,CACF;EACDpH,MAAM,EAANA,MAAM;EACNM,UAAU,EAAVA;AACF,CAAC,EACD;EACEiH,MAAM,EAAElI;AACV,CAAC,CACF;AAED,eAAeoF,wBAAwB"}
|
1
|
+
{"version":3,"file":"MonthDateRangeComparator.js","names":["React","createComponent","Root","sstyled","Header","CalendarHeader","Next","Period","Popper","Prev","Title","CalendarMonths","Calendar","Box","Flex","dayjs","Divider","RangeComparatorAbstract","Apply","Reset","Trigger","CompareToggle","Body","Footer","InputTriggerBase","dateParts","day","month","year","RangeInput","props","_ref","arguments[0]","_ref2","styles","SComparatorRangeInput","SRangeIndicator","createElement","cn","_objectSpread","_assignProps","DateRange","range","disabled","Indicator","FromMaskedInput","RangeSep","ToMaskedInput","MaskedInput","Addon","SingleDateInput","DateRangeFromInput","DateRangeToInput","MonthDateRangeComparatorRoot","_RangeComparatorAbstr","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","_createClass","key","value","getTitleProps","index","_this$asProps","asProps","displayedPeriod","locale","_get","_getPrototypeOf","prototype","children","Intl","DateTimeFormat","format","add","navigateStep","startOf","toDate","getRangeInput","MonthDateRangeComparator","getValueDateRangeProps","w","getCompareDateRangeProps","getPopperProps","Fragment","showButtons","getHeaderProps","ValueDateRange","CompareDateRange","getBodyProps","_ref11","RangeCalendar","Periods","getPeriodsProps","_ref12","_ref12$unclearable","unclearable","Column","Options","Controls","getFooterProps","_ref13","_ref13$unclearable","defaultProps","_ref3","SValueDateRange","_ref4","SCompareDateRange","_ref5","SRangeCalendar","Children","hasChildren","tag","_ref6","SPeriods","PeriodsDivider","_ref7","SPeriodsDivider","PeriodsColumn","_ref8","SPeriodsColumn","PeriodsOptions","_ref9","SPeriodsList","PeriodsControls","_ref10","SPeriodsControls","parent"],"sources":["../../src/MonthDateRangeComparator.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Root, sstyled } from '@semcore/core';\nimport { Header as CalendarHeader, Next, Period, Popper, Prev, Title } from './components';\nimport { CalendarMonths as Calendar } from './components/Calendar';\nimport { Box, Flex } from '@semcore/flex-box';\nimport dayjs from 'dayjs';\nimport Divider from '@semcore/divider';\nimport RangeComparatorAbstract, {\n Apply,\n Reset,\n Header,\n Trigger,\n CompareToggle,\n Body,\n Footer,\n} from './components/DateRangeComparatorAbstract';\nimport InputTriggerBase from './components/InputTrigger';\n\nconst dateParts = { day: false, month: true, year: true };\n\nfunction RangeInput(props) {\n const { styles } = props;\n const SComparatorRangeInput = Root;\n const SRangeIndicator = Box;\n return sstyled(styles)(\n <SComparatorRangeInput\n data-name='SComparatorRangeInput'\n render={Box}\n tag={InputTriggerBase}\n parts={dateParts}\n __excludeProps={['role', 'aria-haspopup', 'aria-expanded', 'onChange', 'value', 'id']}\n >\n <InputTriggerBase.DateRange>\n <SRangeIndicator range={props.range} disabled={props.disabled} w={12} h={12} ml={2} />\n <InputTriggerBase.DateRange.Indicator />\n <InputTriggerBase.DateRange.FromMaskedInput />\n <InputTriggerBase.DateRange.RangeSep />\n <InputTriggerBase.DateRange.ToMaskedInput />\n </InputTriggerBase.DateRange>\n </SComparatorRangeInput>,\n );\n}\nRangeInput.Indicator = InputTriggerBase.Indicator;\nRangeInput.MaskedInput = InputTriggerBase.MaskedInput;\nRangeInput.Addon = InputTriggerBase.Addon;\nRangeInput.SingleDateInput = InputTriggerBase.SingleDateInput;\nRangeInput.DateRange = InputTriggerBase.DateRange;\nRangeInput.DateRangeFromInput = InputTriggerBase.DateRangeFromInput;\nRangeInput.DateRangeToInput = InputTriggerBase.DateRangeToInput;\n\nclass MonthDateRangeComparatorRoot extends RangeComparatorAbstract {\n static displayName = 'MonthDateRangeComparator';\n static defaultProps = (props) => {\n return {\n ...RangeComparatorAbstract.defaultProps(props),\n children: (\n <>\n <MonthDateRangeComparator.Trigger />\n <MonthDateRangeComparator.Popper />\n </>\n ),\n };\n };\n\n navigateStep = 'year';\n keyStep = 'month';\n keyDiff = {\n ArrowLeft: -1,\n ArrowUp: -3,\n ArrowRight: 1,\n ArrowDown: 3,\n };\n\n getTitleProps(props, index) {\n const { displayedPeriod, locale } = this.asProps;\n return {\n ...super.getTitleProps(props, index),\n children: new Intl.DateTimeFormat(locale, { year: 'numeric' }).format(\n dayjs(displayedPeriod).add(index, this.navigateStep).startOf(this.navigateStep).toDate(),\n ),\n };\n }\n\n getRangeInput() {\n return <MonthDateRangeComparator.RangeInput.DateRange />;\n }\n\n getValueDateRangeProps() {\n const props = super.getValueDateRangeProps();\n return {\n ...props,\n w: props.w - 60,\n };\n }\n\n getCompareDateRangeProps() {\n const props = super.getCompareDateRangeProps();\n return {\n ...props,\n w: props.w - 60,\n };\n }\n\n getPopperProps() {\n return {\n ...super.getPopperProps(),\n children: (\n <>\n <MonthDateRangeComparator.Header />\n <MonthDateRangeComparator.Body showButtons={true} />\n </>\n ),\n };\n }\n\n getHeaderProps() {\n return {\n children: (\n <>\n <MonthDateRangeComparator.ValueDateRange />\n <MonthDateRangeComparator.CompareToggle />\n <MonthDateRangeComparator.CompareDateRange />\n </>\n ),\n };\n }\n\n getBodyProps({ showButtons }) {\n return {\n children: (\n <>\n <MonthDateRangeComparator.RangeCalendar />\n <MonthDateRangeComparator.Periods showButtons={showButtons} />\n </>\n ),\n };\n }\n\n getPeriodsProps({ showButtons, unclearable = false }) {\n return {\n children: (\n <>\n <MonthDateRangeComparator.Periods.Divider />\n <MonthDateRangeComparator.Periods.Column>\n <MonthDateRangeComparator.Periods.Options />\n {showButtons && (\n <MonthDateRangeComparator.Periods.Controls>\n <MonthDateRangeComparator.Apply />\n {!unclearable && <MonthDateRangeComparator.Reset />}\n </MonthDateRangeComparator.Periods.Controls>\n )}\n </MonthDateRangeComparator.Periods.Column>\n </>\n ),\n };\n }\n\n getFooterProps({ unclearable = false }) {\n return {\n children: (\n <>\n <MonthDateRangeComparator.Apply />\n {!unclearable && <MonthDateRangeComparator.Reset />}\n </>\n ),\n };\n }\n}\n\nfunction ValueDateRange(props) {\n const { Root: SValueDateRange, styles } = props;\n return sstyled(styles)(\n <SValueDateRange render={MonthDateRangeComparator.RangeInput} range='value' />,\n );\n}\n\nfunction CompareDateRange(props) {\n const { Root: SCompareDateRange, styles } = props;\n return sstyled(styles)(\n <SCompareDateRange render={MonthDateRangeComparator.RangeInput} range='compare' />,\n );\n}\n\nfunction RangeCalendar(props) {\n const { Root: SRangeCalendar, styles, Children, children: hasChildren } = props;\n\n if (hasChildren) {\n return <Children />;\n }\n\n return sstyled(styles)(\n <SRangeCalendar render={Flex} gap={8}>\n <Flex direction='column'>\n <MonthDateRangeComparator.CalendarHeader tag={Flex}>\n <MonthDateRangeComparator.Prev />\n <MonthDateRangeComparator.Title />\n </MonthDateRangeComparator.CalendarHeader>\n <MonthDateRangeComparator.Calendar />\n </Flex>\n <Flex direction='column'>\n <MonthDateRangeComparator.CalendarHeader tag={Flex}>\n <MonthDateRangeComparator.Title />\n <MonthDateRangeComparator.Next />\n </MonthDateRangeComparator.CalendarHeader>\n <MonthDateRangeComparator.Calendar />\n </Flex>\n </SRangeCalendar>,\n );\n}\nfunction Periods(props) {\n const { Root: SPeriods, styles } = props;\n return sstyled(styles)(<SPeriods render={Flex} />);\n}\nfunction PeriodsDivider(props) {\n const { Root: SPeriodsDivider, styles } = props;\n return sstyled(styles)(<SPeriodsDivider orientation='vertical' h='auto' render={Divider} />);\n}\nfunction PeriodsColumn(props) {\n const { Root: SPeriodsColumn, styles } = props;\n return sstyled(styles)(\n <SPeriodsColumn render={Flex} direction='column' justifyContent='space-between' p={1} />,\n );\n}\nfunction PeriodsOptions(props) {\n const { styles, Root: SPeriodsList } = props;\n return sstyled(styles)(<SPeriodsList render={MonthDateRangeComparator.Period} />);\n}\nfunction PeriodsControls(props) {\n const { styles, Root: SPeriodsControls } = props;\n return sstyled(styles)(<SPeriodsControls render={Flex} p={4} gap={2} />);\n}\n\nconst MonthDateRangeComparator = createComponent(\n MonthDateRangeComparatorRoot,\n {\n Popper,\n CalendarHeader,\n Title,\n Header,\n Prev,\n Next,\n Calendar,\n Period,\n Apply,\n Reset,\n\n Trigger,\n ValueDateRange,\n CompareToggle,\n CompareDateRange,\n Body,\n RangeCalendar,\n Periods: [\n Periods,\n {\n Divider: PeriodsDivider,\n Column: PeriodsColumn,\n Options: PeriodsOptions,\n Controls: PeriodsControls,\n },\n ],\n Footer,\n RangeInput,\n },\n {\n parent: Calendar,\n },\n);\n\nexport default MonthDateRangeComparator;\n"],"mappings":";;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,eAAe,IAAIC,IAAI,EAAEC,OAAO,QAAQ,eAAe;AAC9D,SAASC,MAAM,IAAIC,cAAc,EAAEC,IAAI,EAAEC,MAAM,EAAEC,MAAM,EAAEC,IAAI,EAAEC,KAAK,QAAQ,cAAc;AAC1F,SAASC,cAAc,IAAIC,QAAQ,QAAQ,uBAAuB;AAClE,SAASC,GAAG,EAAEC,IAAI,QAAQ,mBAAmB;AAC7C,OAAOC,KAAK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AANA,MAAM;EACNM,UAAU,EAAVA;AACF,CAAC,EACD;EACEmH,MAAM,EAAEpI;AACV,CAAC,CACF;AAED,eAAeoF,wBAAwB"}
|
@@ -26,27 +26,27 @@ import { formatDDMMYY, formatMMYY } from '../utils/formatDate';
|
|
26
26
|
import keyboardFocusEnhance from 'intergalactic/utils/lib/enhances/keyboardFocusEnhance';
|
27
27
|
import { ScreenReaderOnly } from 'intergalactic/utils/lib/ScreenReaderOnly';
|
28
28
|
/*__reshadow-styles__:"../style/calendar.shadow.css"*/
|
29
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
30
|
-
"__SCalendar": "
|
31
|
-
"__SGridDays": "
|
32
|
-
"__SGridMonths": "
|
33
|
-
"__SWeekDays": "
|
34
|
-
"__SWeekDay": "
|
35
|
-
"__SCalendarUnit": "
|
36
|
-
"_startHighlighted": "
|
37
|
-
"_selected": "
|
38
|
-
"_endHighlighted": "
|
39
|
-
"_startSelected": "
|
40
|
-
"_endSelected": "
|
41
|
-
"_compareHighlighted": "
|
42
|
-
"_compareStartHighlighted": "
|
43
|
-
"_compareEndHighlighted": "
|
44
|
-
"_compareStart": "
|
45
|
-
"_compareEnd": "
|
46
|
-
"_outdated": "
|
47
|
-
"_disabled": "
|
48
|
-
"_highlighted": "
|
49
|
-
"_today": "
|
29
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SCalendar_sdo52_gg_{display:flex;flex-direction:column}.___SGridDays_sdo52_gg_{display:grid;grid-template-columns:repeat(7,minmax(32px,auto));grid-template-rows:repeat(auto-fit,minmax(32px,auto))}.___SGridMonths_sdo52_gg_{display:grid;grid-row-gap:var(--intergalactic-spacing-2x, 8px);grid-template-columns:repeat(3,minmax(60px,auto));grid-template-rows:repeat(4,minmax(32px,auto))}.___SWeekDays_sdo52_gg_{display:grid;grid-template-columns:repeat(7,minmax(32px,auto))}.___SCalendarUnit_sdo52_gg_,.___SWeekDay_sdo52_gg_{align-items:center;display:flex;font-size:var(--intergalactic-fs-200, 14px);justify-content:center;min-height:32px;min-width:32px}.___SWeekDay_sdo52_gg_{color:var(--intergalactic-text-secondary, #6c6e79);font-weight:var(--intergalactic-regular, 400);overflow:hidden}.___SCalendarUnit_sdo52_gg_{font-family:inherit;font-weight:400;line-height:normal;-webkit-text-decoration:none;text-decoration:none;text-align:center;vertical-align:middle;border:1px solid transparent;color:var(--intergalactic-text-primary, #191b23);box-shadow:none;overflow:visible;-webkit-user-select:none;-moz-user-select:none;user-select:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent;background-color:var(--intergalactic-date-picker-cell, #ffffff);border-radius:var(--intergalactic-control-rounded, 6px);box-sizing:border-box;cursor:pointer;position:relative;transition:color .15s,background .15s,box-shadow .15s,border-radius .15s .15s;outline:0;margin:4px 0 0}@media (hover:hover){.___SCalendarUnit_sdo52_gg_:hover{color:var(--intergalactic-text-primary, #191b23);background-color:var(--intergalactic-date-picker-cell-hover, #e0e1e9)}}.___SCalendarUnit_sdo52_gg_:focus{z-index:1}.___SCalendarUnit_sdo52_gg_:focus-visible{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SCalendarUnit_sdo52_gg_.__today_sdo52_gg_:before{content:\"\";position:absolute;display:block;top:1px;left:1px;border-radius:var(--intergalactic-control-rounded, 6px);width:calc(100% - 2px);height:calc(100% - 2px);box-sizing:border-box;border:1px solid var(--intergalactic-date-picker-cell-current, #8a8e9b)}.___SCalendarUnit_sdo52_gg_.___SCalendarUnit_sdo52_gg_.__today_sdo52_gg_.__endSelected_sdo52_gg_:before,.___SCalendarUnit_sdo52_gg_.___SCalendarUnit_sdo52_gg_.__today_sdo52_gg_.__startSelected_sdo52_gg_:before{border-color:var(--intergalactic-border-secondary, #e0e1e9)}.___SCalendarUnit_sdo52_gg_.__highlighted_sdo52_gg_,.___SCalendarUnit_sdo52_gg_.__selected_sdo52_gg_{border-radius:0;transition:color .15s,background .15s,box-shadow .15s,border-radius 0s 0s;color:var(--intergalactic-text-primary, #191b23)}.___SCalendarUnit_sdo52_gg_.__selected_sdo52_gg_{background-color:var(--intergalactic-date-picker-cell-range, #c4e5fe)}@media (hover:hover){.___SCalendarUnit_sdo52_gg_.__selected_sdo52_gg_:hover{background-color:var(--intergalactic-date-picker-cell-range-hover, #8ecdff)}}.___SCalendarUnit_sdo52_gg_.__highlighted_sdo52_gg_{background-color:var(--intergalactic-date-picker-cell-range-hover, #8ecdff)}@media (hover:hover){.___SCalendarUnit_sdo52_gg_.__highlighted_sdo52_gg_:hover{background-color:var(--intergalactic-date-picker-cell-range-hover, #8ecdff)}}.___SCalendarUnit_sdo52_gg_.__startSelected_sdo52_gg_{color:var(--intergalactic-text-primary-invert, #ffffff);background-color:var(--intergalactic-date-picker-cell-active, #2bb3ff)}.___SCalendarUnit_sdo52_gg_.__startSelected_sdo52_gg_:not(.__highlighted_sdo52_gg_){border-bottom-left-radius:var(--intergalactic-control-rounded, 6px);border-bottom-right-radius:0;border-top-left-radius:var(--intergalactic-control-rounded, 6px);border-top-right-radius:0}@media (hover:hover){.___SCalendarUnit_sdo52_gg_.__startSelected_sdo52_gg_:hover{color:var(--intergalactic-text-primary-invert, #ffffff);background-color:var(--intergalactic-date-picker-cell-active-hover, #008ff8)}}.___SCalendarUnit_sdo52_gg_.__endSelected_sdo52_gg_{background-color:var(--intergalactic-date-picker-cell-active, #2bb3ff);color:var(--intergalactic-text-primary-invert, #ffffff)}.___SCalendarUnit_sdo52_gg_.__endSelected_sdo52_gg_:not(.__highlighted_sdo52_gg_){border-bottom-left-radius:0;border-bottom-right-radius:var(--intergalactic-control-rounded, 6px);border-top-left-radius:0;border-top-right-radius:var(--intergalactic-control-rounded, 6px)}@media (hover:hover){.___SCalendarUnit_sdo52_gg_.__endSelected_sdo52_gg_:hover{color:var(--intergalactic-text-primary-invert, #ffffff);background-color:var(--intergalactic-date-picker-cell-active-hover, #008ff8)}}.___SCalendarUnit_sdo52_gg_.__startHighlighted_sdo52_gg_:not(.__selected_sdo52_gg_){border-bottom-left-radius:var(--intergalactic-control-rounded, 6px);border-bottom-right-radius:0;border-top-left-radius:var(--intergalactic-control-rounded, 6px);border-top-right-radius:0}.___SCalendarUnit_sdo52_gg_.__endHighlighted_sdo52_gg_:not(.__selected_sdo52_gg_){border-bottom-left-radius:0;border-bottom-right-radius:var(--intergalactic-control-rounded, 6px);border-top-left-radius:0;border-top-right-radius:var(--intergalactic-control-rounded, 6px)}.___SCalendarUnit_sdo52_gg_.__startHighlighted_sdo52_gg_.___SCalendarUnit_sdo52_gg_.__endHighlighted_sdo52_gg_,.___SCalendarUnit_sdo52_gg_.__startSelected_sdo52_gg_.___SCalendarUnit_sdo52_gg_.__endSelected_sdo52_gg_{border-bottom-left-radius:var(--intergalactic-control-rounded, 6px);border-bottom-right-radius:var(--intergalactic-control-rounded, 6px);border-top-left-radius:var(--intergalactic-control-rounded, 6px);border-top-right-radius:var(--intergalactic-control-rounded, 6px)}.___SCalendarUnit_sdo52_gg_.__compareHighlighted_sdo52_gg_{border-top:2px dashed var(--intergalactic-date-picker-cell-comparison-active, #8649e1);border-bottom:2px dashed var(--intergalactic-date-picker-cell-comparison-active, #8649e1);border-radius:0;transition:none}.___SCalendarUnit_sdo52_gg_.__compareEndHighlighted_sdo52_gg_,.___SCalendarUnit_sdo52_gg_.__compareStartHighlighted_sdo52_gg_{border-left:2px dashed var(--intergalactic-date-picker-cell-comparison-active, #8649e1);border-right:2px dashed var(--intergalactic-date-picker-cell-comparison-active, #8649e1)}.___SCalendarUnit_sdo52_gg_.__compareEnd_sdo52_gg_,.___SCalendarUnit_sdo52_gg_.__compareStart_sdo52_gg_{border-radius:0;background-color:var(--intergalactic-date-picker-cell-comparison-active, #8649e1);color:var(--intergalactic-text-primary-invert, #ffffff)}@media (hover:hover){.___SCalendarUnit_sdo52_gg_.__compareEnd_sdo52_gg_:hover,.___SCalendarUnit_sdo52_gg_.__compareStart_sdo52_gg_:hover{color:var(--intergalactic-text-primary-invert, #ffffff);background-color:var(--intergalactic-date-picker-cell-comparison-active-hover, #5925ab)}}.___SCalendarUnit_sdo52_gg_.__compareStartHighlighted_sdo52_gg_{border-top-left-radius:var(--intergalactic-control-rounded, 6px);border-bottom-left-radius:var(--intergalactic-control-rounded, 6px)}.___SCalendarUnit_sdo52_gg_.__compareEndHighlighted_sdo52_gg_{border-top-right-radius:var(--intergalactic-control-rounded, 6px);border-bottom-right-radius:var(--intergalactic-control-rounded, 6px)}.___SCalendarUnit_sdo52_gg_.__compareStart_sdo52_gg_:not(.__compareHighlighted_sdo52_gg_){border-top-left-radius:var(--intergalactic-control-rounded, 6px);border-bottom-left-radius:var(--intergalactic-control-rounded, 6px)}.___SCalendarUnit_sdo52_gg_.__compareEnd_sdo52_gg_:not(.__compareHighlighted_sdo52_gg_){border-top-right-radius:var(--intergalactic-control-rounded, 6px);border-bottom-right-radius:var(--intergalactic-control-rounded, 6px)}.___SCalendarUnit_sdo52_gg_.__outdated_sdo52_gg_{opacity:.2}.___SCalendarUnit_sdo52_gg_.__disabled_sdo52_gg_{opacity:.4;cursor:default;pointer-events:none}@media (prefers-reduced-motion){.___SCalendarUnit_sdo52_gg_,.___SCalendarUnit_sdo52_gg_.__highlighted_sdo52_gg_,.___SCalendarUnit_sdo52_gg_.__selected_sdo52_gg_{transition:none}}" /*__inner_css_end__*/, "sdo52_gg_") /*__reshadow_css_end__*/, {
|
30
|
+
"__SCalendar": "___SCalendar_sdo52_gg_",
|
31
|
+
"__SGridDays": "___SGridDays_sdo52_gg_",
|
32
|
+
"__SGridMonths": "___SGridMonths_sdo52_gg_",
|
33
|
+
"__SWeekDays": "___SWeekDays_sdo52_gg_",
|
34
|
+
"__SWeekDay": "___SWeekDay_sdo52_gg_",
|
35
|
+
"__SCalendarUnit": "___SCalendarUnit_sdo52_gg_",
|
36
|
+
"_startHighlighted": "__startHighlighted_sdo52_gg_",
|
37
|
+
"_selected": "__selected_sdo52_gg_",
|
38
|
+
"_endHighlighted": "__endHighlighted_sdo52_gg_",
|
39
|
+
"_startSelected": "__startSelected_sdo52_gg_",
|
40
|
+
"_endSelected": "__endSelected_sdo52_gg_",
|
41
|
+
"_compareHighlighted": "__compareHighlighted_sdo52_gg_",
|
42
|
+
"_compareStartHighlighted": "__compareStartHighlighted_sdo52_gg_",
|
43
|
+
"_compareEndHighlighted": "__compareEndHighlighted_sdo52_gg_",
|
44
|
+
"_compareStart": "__compareStart_sdo52_gg_",
|
45
|
+
"_compareEnd": "__compareEnd_sdo52_gg_",
|
46
|
+
"_outdated": "__outdated_sdo52_gg_",
|
47
|
+
"_disabled": "__disabled_sdo52_gg_",
|
48
|
+
"_highlighted": "__highlighted_sdo52_gg_",
|
49
|
+
"_today": "__today_sdo52_gg_"
|
50
50
|
});
|
51
51
|
dayjs.extend(isBetween);
|
52
52
|
var range = function range(N, cb) {
|
@@ -22,35 +22,35 @@ import Checkbox from 'intergalactic/checkbox';
|
|
22
22
|
import { LinkTrigger } from 'intergalactic/base-trigger';
|
23
23
|
import { formatDDMMYY, formatMMYY } from '../utils/formatDate';
|
24
24
|
/*__reshadow-styles__:"../style/date-picker.shadow.css"*/
|
25
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
26
|
-
"__SHeader": "
|
27
|
-
"__STitle": "
|
28
|
-
"__SToday": "
|
29
|
-
"__SPeriod": "
|
30
|
-
"__SButton": "
|
31
|
-
"__SInner": "
|
32
|
-
"__SInputMask": "
|
33
|
-
"_animationsDisabled": "
|
34
|
-
"__SValue": "
|
35
|
-
"__SIndicator": "
|
36
|
-
"__SRangeIndicator": "
|
37
|
-
"_range_value": "
|
38
|
-
"_range_compare": "
|
39
|
-
"_disabled": "
|
40
|
-
"__SHumanizedDate": "
|
41
|
-
"__SMask": "
|
42
|
-
"__SSingleDateInput": "
|
43
|
-
"__SDateRange": "
|
44
|
-
"_noHumanizedDate": "
|
45
|
-
"__SRangeSep": "
|
46
|
-
"_fulfilled": "
|
47
|
-
"__SRangeComparatorHeader": "
|
48
|
-
"__SRangeCalendar": "
|
49
|
-
"__SFooter": "
|
50
|
-
"__SPeriodsList": "
|
51
|
-
"__STooltip": "
|
52
|
-
"__SCompareToggle": "
|
53
|
-
"__SPopper": "
|
25
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SPopper_s8e9p_gg_{padding:var(--intergalactic-spacing-4x, 16px);outline:0}.___SPopper_s8e9p_gg_::-moz-focus-inner{border:0;padding:0}.___SPopper_s8e9p_gg_:active,.___SPopper_s8e9p_gg_:focus{outline:0;-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___SPopper_s8e9p_gg_:hover{outline:0;-webkit-text-decoration:none;text-decoration:none}}.___SPopper_s8e9p_gg_:focus{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SHeader_s8e9p_gg_,.___STitle_s8e9p_gg_{display:flex;align-items:center}.___STitle_s8e9p_gg_{font-size:var(--intergalactic-fs-200, 14px);color:var(--intergalactic-text-primary, #191b23);height:32px;width:100%;justify-content:center}.___SToday_s8e9p_gg_{display:flex;margin-top:var(--intergalactic-spacing-3x, 12px);justify-content:center}.___SPeriod_s8e9p_gg_{display:flex;flex-direction:column;margin-bottom:var(--intergalactic-spacing-2x, 8px)}.___SButton_s8e9p_gg_ .___SInner_s8e9p_gg_{justify-content:flex-start}.___SInputMask_s8e9p_gg_{color:var(--intergalactic-text-primary, #191b23);line-height:normal;padding-right:var(--intergalactic-spacing-2x, 8px);transition:width calc(var(--intergalactic-duration-medium, 300)*1ms) ease,min-width calc(var(--intergalactic-duration-medium, 300)*1ms) ease}.___SInputMask_s8e9p_gg_.__animationsDisabled_s8e9p_gg_{transition:none}.___SInputMask_s8e9p_gg_ .___SValue_s8e9p_gg_{letter-spacing:0}.___SIndicator_s8e9p_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___SRangeIndicator_s8e9p_gg_{border-radius:50%;flex-shrink:0}.___SRangeIndicator_s8e9p_gg_._range_value_s8e9p_gg_{background-color:var(--intergalactic-date-picker-cell-active, #2bb3ff)}.___SRangeIndicator_s8e9p_gg_._range_compare_s8e9p_gg_{background-color:var(--intergalactic-date-picker-cell-comparison-active, #8649e1)}.___SRangeIndicator_s8e9p_gg_.__disabled_s8e9p_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3)}.___SHumanizedDate_s8e9p_gg_{position:absolute;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}.___SMask_s8e9p_gg_{letter-spacing:0;white-space:nowrap;overflow:hidden}.___SDateRange_s8e9p_gg_ .___SMask_s8e9p_gg_,.___SDateRange_s8e9p_gg_ .___SValue_s8e9p_gg_,.___SSingleDateInput_s8e9p_gg_ .___SMask_s8e9p_gg_,.___SSingleDateInput_s8e9p_gg_ .___SValue_s8e9p_gg_{opacity:0}.___SSingleDateInput_s8e9p_gg_:focus-within .___SHumanizedDate_s8e9p_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SSingleDateInput_s8e9p_gg_:focus-within .___SMask_s8e9p_gg_,.___SSingleDateInput_s8e9p_gg_:focus-within .___SValue_s8e9p_gg_{opacity:1}.___SDateRange_s8e9p_gg_:focus-within .___SHumanizedDate_s8e9p_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SDateRange_s8e9p_gg_:focus-within .___SMask_s8e9p_gg_,.___SDateRange_s8e9p_gg_:focus-within .___SValue_s8e9p_gg_{opacity:1}.___SInputMask_s8e9p_gg_.__noHumanizedDate_s8e9p_gg_ .___SMask_s8e9p_gg_,.___SInputMask_s8e9p_gg_.__noHumanizedDate_s8e9p_gg_ .___SValue_s8e9p_gg_{opacity:1}.___SDateRange_s8e9p_gg_ .___SInputMask_s8e9p_gg_:focus-within .___SMask_s8e9p_gg_{background-color:var(--intergalactic-bg-highlight-focus, rgba(0, 143, 248, 0.2))}.___SDateRange_s8e9p_gg_:focus-within .___SRangeSep_s8e9p_gg_,.___SRangeSep_s8e9p_gg_.__fulfilled_s8e9p_gg_{color:var(--intergalactic-text-primary, #191b23)}.___SRangeComparatorHeader_s8e9p_gg_{border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SRangeCalendar_s8e9p_gg_,.___SRangeComparatorHeader_s8e9p_gg_{padding:var(--intergalactic-spacing-4x, 16px)}.___SFooter_s8e9p_gg_{border-top:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SFooter_s8e9p_gg_,.___SPeriodsList_s8e9p_gg_{padding:var(--intergalactic-spacing-4x, 16px)}.___STooltip_s8e9p_gg_{padding:var(--intergalactic-spacing-3x, 12px)}.___SCompareToggle_s8e9p_gg_{white-space:nowrap}@media (prefers-reduced-motion){.___SInputMask_s8e9p_gg_{transition:none}}" /*__inner_css_end__*/, "s8e9p_gg_") /*__reshadow_css_end__*/, {
|
26
|
+
"__SHeader": "___SHeader_s8e9p_gg_",
|
27
|
+
"__STitle": "___STitle_s8e9p_gg_",
|
28
|
+
"__SToday": "___SToday_s8e9p_gg_",
|
29
|
+
"__SPeriod": "___SPeriod_s8e9p_gg_",
|
30
|
+
"__SButton": "___SButton_s8e9p_gg_",
|
31
|
+
"__SInner": "___SInner_s8e9p_gg_",
|
32
|
+
"__SInputMask": "___SInputMask_s8e9p_gg_",
|
33
|
+
"_animationsDisabled": "__animationsDisabled_s8e9p_gg_",
|
34
|
+
"__SValue": "___SValue_s8e9p_gg_",
|
35
|
+
"__SIndicator": "___SIndicator_s8e9p_gg_",
|
36
|
+
"__SRangeIndicator": "___SRangeIndicator_s8e9p_gg_",
|
37
|
+
"_range_value": "_range_value_s8e9p_gg_",
|
38
|
+
"_range_compare": "_range_compare_s8e9p_gg_",
|
39
|
+
"_disabled": "__disabled_s8e9p_gg_",
|
40
|
+
"__SHumanizedDate": "___SHumanizedDate_s8e9p_gg_",
|
41
|
+
"__SMask": "___SMask_s8e9p_gg_",
|
42
|
+
"__SSingleDateInput": "___SSingleDateInput_s8e9p_gg_",
|
43
|
+
"__SDateRange": "___SDateRange_s8e9p_gg_",
|
44
|
+
"_noHumanizedDate": "__noHumanizedDate_s8e9p_gg_",
|
45
|
+
"__SRangeSep": "___SRangeSep_s8e9p_gg_",
|
46
|
+
"_fulfilled": "__fulfilled_s8e9p_gg_",
|
47
|
+
"__SRangeComparatorHeader": "___SRangeComparatorHeader_s8e9p_gg_",
|
48
|
+
"__SRangeCalendar": "___SRangeCalendar_s8e9p_gg_",
|
49
|
+
"__SFooter": "___SFooter_s8e9p_gg_",
|
50
|
+
"__SPeriodsList": "___SPeriodsList_s8e9p_gg_",
|
51
|
+
"__STooltip": "___STooltip_s8e9p_gg_",
|
52
|
+
"__SCompareToggle": "___SCompareToggle_s8e9p_gg_",
|
53
|
+
"__SPopper": "___SPopper_s8e9p_gg_"
|
54
54
|
});
|
55
55
|
var INTERACTION_TAGS = ['INPUT'];
|
56
56
|
var INTERACTION_KEYS = ['ArrowDown', 'Enter', ' '];
|
@@ -19,9 +19,9 @@ import { assignProps as _assignProps2 } from 'intergalactic/core';
|
|
19
19
|
import { assignProps as _assignProps } from 'intergalactic/core';
|
20
20
|
var _excluded = ["children", "id", "role", "aria-haspopup", "aria-expanded", "aria-label", "style"],
|
21
21
|
_excluded2 = ["children", "id", "role", "aria-haspopup", "aria-label", "aria-expanded", "style"],
|
22
|
-
_excluded3 = ["value", "onChange", "onDisplayedPeriodChange", "locale", "w", "ariaHasPopup"],
|
23
|
-
_excluded4 = ["value", "locale", "onDisplayedPeriodChange", "ariaHasPopup"],
|
24
|
-
_excluded5 = ["value", "locale", "onDisplayedPeriodChange", "ariaHasPopup", "inputId"],
|
22
|
+
_excluded3 = ["value", "onChange", "onDisplayedPeriodChange", "locale", "w", "ariaHasPopup", "showError"],
|
23
|
+
_excluded4 = ["value", "locale", "onDisplayedPeriodChange", "ariaHasPopup", "showError"],
|
24
|
+
_excluded5 = ["value", "locale", "onDisplayedPeriodChange", "ariaHasPopup", "inputId", "showError"],
|
25
25
|
_excluded6 = ["date", "onDateChange", "onDisplayedPeriodChange", "locale", "styles", "parts", "disabledDates", "forwardRef", "placeholders", "labelPrefix", "onMaskPipeBlock", "containerFocused", "animationsDisabled", "getI18nText", "inputId", "__excludeProps", "Root"];
|
26
26
|
import React from 'react';
|
27
27
|
import BaseTrigger from 'intergalactic/base-trigger';
|
@@ -35,35 +35,35 @@ import includesDate from '../utils/includesDate';
|
|
35
35
|
import dayjs from 'dayjs';
|
36
36
|
import useEnhancedEffect from 'intergalactic/utils/lib/use/useEnhancedEffect';
|
37
37
|
/*__reshadow-styles__:"../style/date-picker.shadow.css"*/
|
38
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
39
|
-
"__SHeader": "
|
40
|
-
"__STitle": "
|
41
|
-
"__SToday": "
|
42
|
-
"__SPeriod": "
|
43
|
-
"__SButton": "
|
44
|
-
"__SInner": "
|
45
|
-
"__SInputMask": "
|
46
|
-
"_animationsDisabled": "
|
47
|
-
"__SValue": "
|
48
|
-
"__SIndicator": "
|
49
|
-
"__SRangeIndicator": "
|
50
|
-
"_range_value": "
|
51
|
-
"_range_compare": "
|
52
|
-
"_disabled": "
|
53
|
-
"__SHumanizedDate": "
|
54
|
-
"__SMask": "
|
55
|
-
"__SSingleDateInput": "
|
56
|
-
"__SDateRange": "
|
57
|
-
"_noHumanizedDate": "
|
58
|
-
"__SRangeSep": "
|
59
|
-
"_fulfilled": "
|
60
|
-
"__SRangeComparatorHeader": "
|
61
|
-
"__SRangeCalendar": "
|
62
|
-
"__SFooter": "
|
63
|
-
"__SPeriodsList": "
|
64
|
-
"__STooltip": "
|
65
|
-
"__SCompareToggle": "
|
66
|
-
"__SPopper": "
|
38
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SPopper_s8e9p_gg_{padding:var(--intergalactic-spacing-4x, 16px);outline:0}.___SPopper_s8e9p_gg_::-moz-focus-inner{border:0;padding:0}.___SPopper_s8e9p_gg_:active,.___SPopper_s8e9p_gg_:focus{outline:0;-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___SPopper_s8e9p_gg_:hover{outline:0;-webkit-text-decoration:none;text-decoration:none}}.___SPopper_s8e9p_gg_:focus{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SHeader_s8e9p_gg_,.___STitle_s8e9p_gg_{display:flex;align-items:center}.___STitle_s8e9p_gg_{font-size:var(--intergalactic-fs-200, 14px);color:var(--intergalactic-text-primary, #191b23);height:32px;width:100%;justify-content:center}.___SToday_s8e9p_gg_{display:flex;margin-top:var(--intergalactic-spacing-3x, 12px);justify-content:center}.___SPeriod_s8e9p_gg_{display:flex;flex-direction:column;margin-bottom:var(--intergalactic-spacing-2x, 8px)}.___SButton_s8e9p_gg_ .___SInner_s8e9p_gg_{justify-content:flex-start}.___SInputMask_s8e9p_gg_{color:var(--intergalactic-text-primary, #191b23);line-height:normal;padding-right:var(--intergalactic-spacing-2x, 8px);transition:width calc(var(--intergalactic-duration-medium, 300)*1ms) ease,min-width calc(var(--intergalactic-duration-medium, 300)*1ms) ease}.___SInputMask_s8e9p_gg_.__animationsDisabled_s8e9p_gg_{transition:none}.___SInputMask_s8e9p_gg_ .___SValue_s8e9p_gg_{letter-spacing:0}.___SIndicator_s8e9p_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}.___SRangeIndicator_s8e9p_gg_{border-radius:50%;flex-shrink:0}.___SRangeIndicator_s8e9p_gg_._range_value_s8e9p_gg_{background-color:var(--intergalactic-date-picker-cell-active, #2bb3ff)}.___SRangeIndicator_s8e9p_gg_._range_compare_s8e9p_gg_{background-color:var(--intergalactic-date-picker-cell-comparison-active, #8649e1)}.___SRangeIndicator_s8e9p_gg_.__disabled_s8e9p_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3)}.___SHumanizedDate_s8e9p_gg_{position:absolute;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}.___SMask_s8e9p_gg_{letter-spacing:0;white-space:nowrap;overflow:hidden}.___SDateRange_s8e9p_gg_ .___SMask_s8e9p_gg_,.___SDateRange_s8e9p_gg_ .___SValue_s8e9p_gg_,.___SSingleDateInput_s8e9p_gg_ .___SMask_s8e9p_gg_,.___SSingleDateInput_s8e9p_gg_ .___SValue_s8e9p_gg_{opacity:0}.___SSingleDateInput_s8e9p_gg_:focus-within .___SHumanizedDate_s8e9p_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SSingleDateInput_s8e9p_gg_:focus-within .___SMask_s8e9p_gg_,.___SSingleDateInput_s8e9p_gg_:focus-within .___SValue_s8e9p_gg_{opacity:1}.___SDateRange_s8e9p_gg_:focus-within .___SHumanizedDate_s8e9p_gg_{opacity:0;z-index:var(--intergalactic-z-index-deep, -999)}.___SDateRange_s8e9p_gg_:focus-within .___SMask_s8e9p_gg_,.___SDateRange_s8e9p_gg_:focus-within .___SValue_s8e9p_gg_{opacity:1}.___SInputMask_s8e9p_gg_.__noHumanizedDate_s8e9p_gg_ .___SMask_s8e9p_gg_,.___SInputMask_s8e9p_gg_.__noHumanizedDate_s8e9p_gg_ .___SValue_s8e9p_gg_{opacity:1}.___SDateRange_s8e9p_gg_ .___SInputMask_s8e9p_gg_:focus-within .___SMask_s8e9p_gg_{background-color:var(--intergalactic-bg-highlight-focus, rgba(0, 143, 248, 0.2))}.___SDateRange_s8e9p_gg_:focus-within .___SRangeSep_s8e9p_gg_,.___SRangeSep_s8e9p_gg_.__fulfilled_s8e9p_gg_{color:var(--intergalactic-text-primary, #191b23)}.___SRangeComparatorHeader_s8e9p_gg_{border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SRangeCalendar_s8e9p_gg_,.___SRangeComparatorHeader_s8e9p_gg_{padding:var(--intergalactic-spacing-4x, 16px)}.___SFooter_s8e9p_gg_{border-top:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SFooter_s8e9p_gg_,.___SPeriodsList_s8e9p_gg_{padding:var(--intergalactic-spacing-4x, 16px)}.___STooltip_s8e9p_gg_{padding:var(--intergalactic-spacing-3x, 12px)}.___SCompareToggle_s8e9p_gg_{white-space:nowrap}@media (prefers-reduced-motion){.___SInputMask_s8e9p_gg_{transition:none}}" /*__inner_css_end__*/, "s8e9p_gg_") /*__reshadow_css_end__*/, {
|
39
|
+
"__SHeader": "___SHeader_s8e9p_gg_",
|
40
|
+
"__STitle": "___STitle_s8e9p_gg_",
|
41
|
+
"__SToday": "___SToday_s8e9p_gg_",
|
42
|
+
"__SPeriod": "___SPeriod_s8e9p_gg_",
|
43
|
+
"__SButton": "___SButton_s8e9p_gg_",
|
44
|
+
"__SInner": "___SInner_s8e9p_gg_",
|
45
|
+
"__SInputMask": "___SInputMask_s8e9p_gg_",
|
46
|
+
"_animationsDisabled": "__animationsDisabled_s8e9p_gg_",
|
47
|
+
"__SValue": "___SValue_s8e9p_gg_",
|
48
|
+
"__SIndicator": "___SIndicator_s8e9p_gg_",
|
49
|
+
"__SRangeIndicator": "___SRangeIndicator_s8e9p_gg_",
|
50
|
+
"_range_value": "_range_value_s8e9p_gg_",
|
51
|
+
"_range_compare": "_range_compare_s8e9p_gg_",
|
52
|
+
"_disabled": "__disabled_s8e9p_gg_",
|
53
|
+
"__SHumanizedDate": "___SHumanizedDate_s8e9p_gg_",
|
54
|
+
"__SMask": "___SMask_s8e9p_gg_",
|
55
|
+
"__SSingleDateInput": "___SSingleDateInput_s8e9p_gg_",
|
56
|
+
"__SDateRange": "___SDateRange_s8e9p_gg_",
|
57
|
+
"_noHumanizedDate": "__noHumanizedDate_s8e9p_gg_",
|
58
|
+
"__SRangeSep": "___SRangeSep_s8e9p_gg_",
|
59
|
+
"_fulfilled": "__fulfilled_s8e9p_gg_",
|
60
|
+
"__SRangeComparatorHeader": "___SRangeComparatorHeader_s8e9p_gg_",
|
61
|
+
"__SRangeCalendar": "___SRangeCalendar_s8e9p_gg_",
|
62
|
+
"__SFooter": "___SFooter_s8e9p_gg_",
|
63
|
+
"__SPeriodsList": "___SPeriodsList_s8e9p_gg_",
|
64
|
+
"__STooltip": "___STooltip_s8e9p_gg_",
|
65
|
+
"__SCompareToggle": "___SCompareToggle_s8e9p_gg_",
|
66
|
+
"__SPopper": "___SPopper_s8e9p_gg_"
|
67
67
|
});
|
68
68
|
import assignProps from 'intergalactic/utils/lib/assignProps';
|
69
69
|
var defaultAllowedParts = {
|
@@ -195,6 +195,7 @@ var SingleDateInputRoot = /*#__PURE__*/function (_Component2) {
|
|
195
195
|
locale = _this$asProps4.locale,
|
196
196
|
w = _this$asProps4.w,
|
197
197
|
ariaHasPopup = _this$asProps4.ariaHasPopup,
|
198
|
+
showError = _this$asProps4.showError,
|
198
199
|
otherProps = _objectWithoutProperties(_this$asProps4, _excluded3);
|
199
200
|
return _objectSpread({
|
200
201
|
date: value,
|
@@ -214,10 +215,12 @@ var SingleDateInputRoot = /*#__PURE__*/function (_Component2) {
|
|
214
215
|
Children = _this$asProps5.Children,
|
215
216
|
forwardRef = _this$asProps5.forwardRef,
|
216
217
|
styles = _this$asProps5.styles,
|
217
|
-
state = _this$asProps5.state
|
218
|
+
state = _this$asProps5.state,
|
219
|
+
showErrorProps = _this$asProps5.showError;
|
218
220
|
var _this$state = this.state,
|
219
221
|
errorText = _this$state.errorText,
|
220
|
-
|
222
|
+
showErrorState = _this$state.showError;
|
223
|
+
var showError = showErrorState && showErrorProps;
|
221
224
|
var SSingleDateInput = InputMask;
|
222
225
|
return _ref9 = sstyled(styles), /*#__PURE__*/React.createElement(SSingleDateInput, _ref9.cn("SSingleDateInput", _objectSpread({}, _assignProps2({
|
223
226
|
"tag": Tooltip,
|
@@ -239,7 +242,8 @@ _defineProperty(SingleDateInputRoot, "defaultProps", {
|
|
239
242
|
children: function children() {
|
240
243
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SingleDateInput.Indicator, null), /*#__PURE__*/React.createElement(SingleDateInput.MaskedInput, null));
|
241
244
|
},
|
242
|
-
defaultDisabledDateInputAttempt: false
|
245
|
+
defaultDisabledDateInputAttempt: false,
|
246
|
+
showError: true
|
243
247
|
});
|
244
248
|
var DateRangeRoot = /*#__PURE__*/function (_Component3) {
|
245
249
|
_inherits(DateRangeRoot, _Component3);
|
@@ -372,6 +376,7 @@ var DateRangeRoot = /*#__PURE__*/function (_Component3) {
|
|
372
376
|
locale = _this$asProps6.locale,
|
373
377
|
onDisplayedPeriodChange = _this$asProps6.onDisplayedPeriodChange,
|
374
378
|
ariaHasPopup = _this$asProps6.ariaHasPopup,
|
379
|
+
showError = _this$asProps6.showError,
|
375
380
|
otherProps = _objectWithoutProperties(_this$asProps6, _excluded4);
|
376
381
|
return assignProps({
|
377
382
|
ref: this.fromRef,
|
@@ -395,6 +400,7 @@ var DateRangeRoot = /*#__PURE__*/function (_Component3) {
|
|
395
400
|
onDisplayedPeriodChange = _this$asProps7.onDisplayedPeriodChange,
|
396
401
|
ariaHasPopup = _this$asProps7.ariaHasPopup,
|
397
402
|
inputId = _this$asProps7.inputId,
|
403
|
+
showError = _this$asProps7.showError,
|
398
404
|
otherProps = _objectWithoutProperties(_this$asProps7, _excluded5);
|
399
405
|
var ariaLabel = this.asProps.getI18nText('toDate', {
|
400
406
|
date: this.asProps.getI18nText('input')
|
@@ -431,11 +437,13 @@ var DateRangeRoot = /*#__PURE__*/function (_Component3) {
|
|
431
437
|
Children = _this$asProps8.Children,
|
432
438
|
styles = _this$asProps8.styles,
|
433
439
|
w = _this$asProps8.w,
|
434
|
-
state = _this$asProps8.state
|
440
|
+
state = _this$asProps8.state,
|
441
|
+
showErrorProps = _this$asProps8.showError;
|
435
442
|
var _this$state2 = this.state,
|
436
443
|
errorText = _this$state2.errorText,
|
437
|
-
|
438
|
-
|
444
|
+
lastChangedInput = _this$state2.lastChangedInput,
|
445
|
+
showErrorState = _this$state2.showError;
|
446
|
+
var showError = showErrorState && showErrorProps;
|
439
447
|
return _ref10 = sstyled(styles), /*#__PURE__*/React.createElement(SDateRange, _ref10.cn("SDateRange", _objectSpread({}, _assignProps3({
|
440
448
|
"tag": Tooltip,
|
441
449
|
"placement": lastChangedInput === 'to' ? 'top-end' : 'top-start',
|
@@ -458,7 +466,8 @@ _defineProperty(DateRangeRoot, "defaultProps", {
|
|
458
466
|
children: function children() {
|
459
467
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DateRange.Indicator, null), /*#__PURE__*/React.createElement(DateRange.FromMaskedInput, null), /*#__PURE__*/React.createElement(DateRange.RangeSep, null), /*#__PURE__*/React.createElement(DateRange.ToMaskedInput, null));
|
460
468
|
},
|
461
|
-
defaultDisabledDateInputAttempt: false
|
469
|
+
defaultDisabledDateInputAttempt: false,
|
470
|
+
showError: true
|
462
471
|
});
|
463
472
|
var FromMaskedInput = function FromMaskedInput(props) {
|
464
473
|
var _ref4 = arguments[0],
|