impact-ui 4.0.0-alpha.10 → 4.0.0-alpha.11
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/dist/_virtual/index14.js +2 -2
- package/dist/_virtual/index15.js +2 -2
- package/dist/components/DateRangePicker/dateRangePickerDropdown.d.ts +4 -1
- package/dist/components/DateRangePicker/dateRangePickerDropdown.d.ts.map +1 -1
- package/dist/components/DateRangePicker/dateRangePickerDropdown.js +17 -2
- package/dist/components/DateRangePicker/index.d.ts.map +1 -1
- package/dist/components/DateRangePicker/index.js +11 -2
- package/dist/mcp-component-registry.json +2 -1
- package/dist/node_modules/call-bind/index.js +1 -1
- package/dist/node_modules/is-symbol/index.js +1 -1
- package/package.json +5 -5
package/dist/_virtual/index14.js
CHANGED
package/dist/_virtual/index15.js
CHANGED
|
@@ -36,6 +36,9 @@ export interface DateRangePickerDropdownProps {
|
|
|
36
36
|
endDateOffset?: (date: Moment) => Moment;
|
|
37
37
|
hasInputErrors?: boolean;
|
|
38
38
|
portalClassName?: string;
|
|
39
|
+
minDate?: Moment | null;
|
|
40
|
+
maxDate?: Moment | null;
|
|
41
|
+
isOutsideRange?: (day: Moment) => boolean;
|
|
39
42
|
}
|
|
40
|
-
export declare function DateRangePickerDropdown({ dropDownContainerRef, withPortal, portalContainer, containerRef, onDatesChange, onFocusChange, focusedInput, startDate, endDate, showWeekNumbers, selectedRange, selectedDaysNumber, handleResetDates, handleCancelDates, onSecondaryButtonClick, tertiaryButtonProps, handleApplyDates, primaryButtonProps, showRangeSelector, handleRangeSelectorChange, showMonthYearSelect, customYears, customWeekNumberData, suppressClickOnWeekNumber, setIsOpen, startDateOffset: startDateOffsetProp, endDateOffset: endDateOffsetProp, hasInputErrors, portalClassName, }: DateRangePickerDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
export declare function DateRangePickerDropdown({ dropDownContainerRef, withPortal, portalContainer, containerRef, onDatesChange, onFocusChange, focusedInput, startDate, endDate, showWeekNumbers, selectedRange, selectedDaysNumber, handleResetDates, handleCancelDates, onSecondaryButtonClick, tertiaryButtonProps, handleApplyDates, primaryButtonProps, showRangeSelector, handleRangeSelectorChange, showMonthYearSelect, customYears, customWeekNumberData, suppressClickOnWeekNumber, setIsOpen, startDateOffset: startDateOffsetProp, endDateOffset: endDateOffsetProp, hasInputErrors, portalClassName, minDate, maxDate, isOutsideRange, }: DateRangePickerDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
41
44
|
//# sourceMappingURL=dateRangePickerDropdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateRangePickerDropdown.d.ts","sourceRoot":"","sources":["../../../src/components/DateRangePicker/dateRangePickerDropdown.tsx"],"names":[],"mappings":"AAEA,OAAe,EAAE,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE7C,OAAO,wBAAwB,CAAC;AAOhC,OAAO,qCAAqC,CAAC;AAE7C,MAAM,WAAW,4BAA4B;IAC3C,oBAAoB,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC7D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,WAAW,CAAC;IAC9B,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACrD,aAAa,EAAE,CAAC,EACd,SAAS,EACT,OAAO,GACR,EAAE;QACD,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;QACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;KACxB,KAAK,IAAI,CAAC;IACX,aAAa,EAAE,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACrD,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,eAAe,CAAC,EAAE,O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AAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACjD,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,SAAS,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3C,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACzC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,cAAc,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;CAC3C;AAED,wBAAgB,uBAAuB,CAAC,EACtC,oBAAoB,EACpB,UAAU,EACV,eAA6E,EAC7E,YAAY,EACZ,aAAa,EACb,aAAa,EACb,YAAY,EACZ,SAAS,EACT,OAAO,EACP,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,yBAAyB,EACzB,mBAAmB,EACnB,WAAW,EACX,oBAAoB,EACpB,yBAAyB,EACzB,SAAS,EACT,eAAe,EAAE,mBAAmB,EACpC,aAAa,EAAE,iBAAiB,EAChC,cAAc,EACd,eAAe,EACf,OAAO,EACP,OAAO,EACP,cAAc,GACf,EAAE,4BAA4B,2CAyM9B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.PresetDateRangePicker_panel{padding:0 22px 11px}.PresetDateRangePicker_button{background:0 0;border:2px solid #00a699;-moz-box-sizing:border-box;box-sizing:border-box;color:#00a699;cursor:pointer;font:inherit;font-weight:700;height:100%;line-height:normal;margin-right:8px;overflow:visible;padding:4px 12px;position:relative;text-align:center}.PresetDateRangePicker_button:active{outline:0}.PresetDateRangePicker_button__selected{background:#00a699;color:#fff}.SingleDatePickerInput{background-color:#fff;display:inline-block}.SingleDatePickerInput__withBorder{border:1px solid #dbdbdb;border-radius:2px}.SingleDatePickerInput__rtl{direction:rtl}.SingleDatePickerInput__disabled{background-color:#f2f2f2}.SingleDatePickerInput__block{display:block}.SingleDatePickerInput__showClearDate{padding-right:30px}.SingleDatePickerInput_clearDate{background:0 0;border:0;color:inherit;cursor:pointer;font:inherit;line-height:normal;margin:0 10px 0 5px;overflow:visible;padding:10px;position:absolute;right:0;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.SingleDatePickerInput_clearDate__default:focus,.SingleDatePickerInput_clearDate__default:hover{background:#dbdbdb;border-radius:50%}.SingleDatePickerInput_clearDate__small{padding:6px}.SingleDatePickerInput_clearDate__hide{visibility:hidden}.SingleDatePickerInput_clearDate_svg{fill:#82888a;height:12px;vertical-align:middle;width:15px}.SingleDatePickerInput_clearDate_svg__small{height:9px}.SingleDatePickerInput_calendarIcon{background:0 0;border:0;color:inherit;cursor:pointer;display:inline-block;font:inherit;line-height:normal;margin:0 5px 0 10px;overflow:visible;padding:10px;vertical-align:middle}.SingleDatePickerInput_calendarIcon_svg{fill:#82888a;height:15px;vertical-align:middle;width:14px}.SingleDatePicker{display:inline-block;position:relative}.SingleDatePicker__block{display:block}.SingleDatePicker_picker{background-color:#fff;position:absolute;z-index:1}.SingleDatePicker_picker__rtl{direction:rtl}.SingleDatePicker_picker__directionLeft{left:0}.SingleDatePicker_picker__directionRight{right:0}.SingleDatePicker_picker__portal{background-color:#0000004d;height:100%;left:0;position:fixed;top:0;width:100%}.SingleDatePicker_picker__fullScreenPortal{background-color:#fff}.SingleDatePicker_closeButton{background:0 0;border:0;color:inherit;cursor:pointer;font:inherit;line-height:normal;overflow:visible;padding:15px;position:absolute;right:0;top:0;z-index:2}.SingleDatePicker_closeButton:focus,.SingleDatePicker_closeButton:hover{color:darken(#cacccd,10%);text-decoration:none}.SingleDatePicker_closeButton_svg{fill:#cacccd;height:15px;width:15px}.DayPickerKeyboardShortcuts_buttonReset{background:0 0;border:0;border-radius:0;color:inherit;cursor:pointer;font:inherit;font-size:14px;line-height:normal;overflow:visible;padding:0}.DayPickerKeyboardShortcuts_buttonReset:active{outline:0}.DayPickerKeyboardShortcuts_show{height:26px;position:absolute;width:33px;z-index:2}.DayPickerKeyboardShortcuts_show:before{content:"";display:block;position:absolute}.DayPickerKeyboardShortcuts_show__bottomRight{bottom:0;right:0}.DayPickerKeyboardShortcuts_show__bottomRight:before{border-right:33px solid #00a699;border-top:26px solid #0000;bottom:0;right:0}.DayPickerKeyboardShortcuts_show__bottomRight:hover:before{border-right:33px solid #008489}.DayPickerKeyboardShortcuts_show__topRight{right:0;top:0}.DayPickerKeyboardShortcuts_show__topRight:before{border-bottom:26px solid #0000;border-right:33px solid #00a699;right:0;top:0}.DayPickerKeyboardShortcuts_show__topRight:hover:before{border-right:33px solid #008489}.DayPickerKeyboardShortcuts_show__topLeft{left:0;top:0}.DayPickerKeyboardShortcuts_show__topLeft:before{border-bottom:26px solid #0000;border-left:33px solid #00a699;left:0;top:0}.DayPickerKeyboardShortcuts_show__topLeft:hover:before{border-left:33px solid #008489}.DayPickerKeyboardShortcuts_showSpan{color:#fff;position:absolute}.DayPickerKeyboardShortcuts_showSpan__bottomRight{bottom:0;right:5px}.DayPickerKeyboardShortcuts_showSpan__topRight{right:5px;top:1px}.DayPickerKeyboardShortcuts_showSpan__topLeft{left:5px;top:1px}.DayPickerKeyboardShortcuts_panel{background:#fff;border:1px solid #dbdbdb;border-radius:2px;bottom:0;left:0;margin:33px;overflow:auto;padding:22px;position:absolute;right:0;text-align:left;top:0;z-index:2}.DayPickerKeyboardShortcuts_title{font-size:16px;font-weight:700;margin:0}.DayPickerKeyboardShortcuts_list{font-size:14px;list-style:none;padding:0}.DayPickerKeyboardShortcuts_close{position:absolute;right:22px;top:22px;z-index:2}.DayPickerKeyboardShortcuts_close:active{outline:0}.DayPickerKeyboardShortcuts_closeSvg{fill:#cacccd;height:15px;width:15px}.DayPickerKeyboardShortcuts_closeSvg:focus,.DayPickerKeyboardShortcuts_closeSvg:hover{fill:#82888a}.CalendarDay{-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;font-size:14px;text-align:center}.CalendarDay:active{outline:0}.CalendarDay__defaultCursor{cursor:default}.CalendarDay__default{background:#fff;border:1px solid #e4e7e7;color:#484848}.CalendarDay__default:hover{background:#e4e7e7;border:1px solid #e4e7e7;color:inherit}.CalendarDay__hovered_offset{background:#f4f5f5;border:1px double #e4e7e7;color:inherit}.CalendarDay__outside{background:#fff;border:0;color:#484848}.CalendarDay__outside:hover{border:0}.CalendarDay__blocked_minimum_nights{background:#fff;border:1px solid #eceeee;color:#cacccd}.CalendarDay__blocked_minimum_nights:active,.CalendarDay__blocked_minimum_nights:hover{background:#fff;color:#cacccd}.CalendarDay__highlighted_calendar{background:#ffe8bc;color:#484848}.CalendarDay__highlighted_calendar:active,.CalendarDay__highlighted_calendar:hover{background:#ffce71;color:#484848}.CalendarDay__selected_span{background:#66e2da;border:1px double #33dacd;color:#fff}.CalendarDay__selected_span:active,.CalendarDay__selected_span:hover{background:#33dacd;border:1px double #33dacd;color:#fff}.CalendarDay__selected,.CalendarDay__selected:active,.CalendarDay__selected:hover{background:#00a699;border:1px double #00a699;color:#fff}.CalendarDay__hovered_span,.CalendarDay__hovered_span:hover{background:#b2f1ec;border:1px double #80e8e0;color:#007a87}.CalendarDay__hovered_span:active{background:#80e8e0;border:1px double #80e8e0;color:#007a87}.CalendarDay__blocked_calendar,.CalendarDay__blocked_calendar:active,.CalendarDay__blocked_calendar:hover{background:#cacccd;border:1px solid #cacccd;color:#82888a}.CalendarDay__blocked_out_of_range,.CalendarDay__blocked_out_of_range:active,.CalendarDay__blocked_out_of_range:hover{background:#fff;border:1px solid #e4e7e7;color:#cacccd}.CalendarDay__hovered_start_first_possible_end{background:#eceeee;border:1px double #eceeee}.CalendarDay__hovered_start_blocked_min_nights{background:#eceeee;border:1px double #e4e7e7}.CalendarMonth{background:#fff;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:top}.CalendarMonth_table{border-collapse:collapse;border-spacing:0}.CalendarMonth_verticalSpacing{border-collapse:initial}.CalendarMonth_caption{caption-side:top;color:#484848;font-size:18px;padding-bottom:37px;padding-top:22px;text-align:center}.CalendarMonth_caption__verticalScrollable{padding-bottom:7px;padding-top:12px}.CalendarMonthGrid{background:#fff;text-align:left;z-index:0}.CalendarMonthGrid__animating{z-index:1}.CalendarMonthGrid__horizontal{left:9px;position:absolute}.CalendarMonthGrid__vertical,.CalendarMonthGrid__vertical_scrollable{margin:0 auto}.CalendarMonthGrid_month__horizontal{display:inline-block;min-height:100%;vertical-align:top}.CalendarMonthGrid_month__hideForAnimation{opacity:0;pointer-events:none;position:absolute;z-index:-1}.CalendarMonthGrid_month__hidden{visibility:hidden}.DayPickerNavigation{position:relative;z-index:2}.DayPickerNavigation__horizontal{height:0}.DayPickerNavigation__verticalScrollable_prevNav{z-index:1}.DayPickerNavigation__verticalDefault{bottom:0;height:52px;left:0;position:absolute;width:100%}.DayPickerNavigation__verticalScrollableDefault{position:relative}.DayPickerNavigation__bottom{height:auto}.DayPickerNavigation__bottomDefault{-webkit-box-pack:justify;-ms-flex-pack:justify;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;justify-content:space-between}.DayPickerNavigation_button{border:0;cursor:pointer;margin:0;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.DayPickerNavigation_button__default{background-color:#fff;border:1px solid #e4e7e7;color:#757575}.DayPickerNavigation_button__default:focus,.DayPickerNavigation_button__default:hover{border:1px solid #c4c4c4}.DayPickerNavigation_button__default:active{background:#f2f2f2}.DayPickerNavigation_button__disabled{border:1px solid #f2f2f2;cursor:default}.DayPickerNavigation_button__disabled:focus,.DayPickerNavigation_button__disabled:hover{border:1px solid #f2f2f2}.DayPickerNavigation_button__disabled:active{background:0 0}.DayPickerNavigation_button__horizontalDefault{border-radius:3px;line-height:.78;padding:6px 9px;position:absolute;top:18px}.DayPickerNavigation_bottomButton__horizontalDefault{margin:-10px 22px 30px;position:static}.DayPickerNavigation_leftButton__horizontalDefault{left:22px}.DayPickerNavigation_rightButton__horizontalDefault{right:22px}.DayPickerNavigation_button__verticalDefault{background:#fff;box-shadow:0 0 5px 2px #0000001a;display:inline-block;height:100%;padding:5px;position:relative;text-align:center;width:50%}.DayPickerNavigation_nextButton__verticalDefault{border-left:0}.DayPickerNavigation_nextButton__verticalScrollableDefault,.DayPickerNavigation_prevButton__verticalScrollableDefault{width:100%}.DayPickerNavigation_svg__horizontal{display:block;fill:#82888a;height:19px;width:19px}.DayPickerNavigation_svg__vertical{fill:#484848;height:42px;width:42px}.DayPickerNavigation_svg__disabled{fill:#f2f2f2}.DayPicker{position:relative;text-align:left}.DayPicker,.DayPicker__horizontal{background:#fff}.DayPicker__verticalScrollable{height:100%}.DayPicker__hidden{visibility:hidden}.DayPicker__withBorder{border-radius:3px;box-shadow:0 2px 6px #0000000d,0 0 0 1px #00000012}.DayPicker_portal__horizontal{box-shadow:none;left:50%;position:absolute;top:50%}.DayPicker_portal__vertical{position:static}.DayPicker_focusRegion{outline:0}.DayPicker_calendarInfo__horizontal,.DayPicker_wrapper__horizontal{display:inline-block;vertical-align:top}.DayPicker_weekHeaders{position:relative}.DayPicker_weekHeaders__horizontal{margin-left:9px}.DayPicker_weekHeader{color:#757575;position:absolute;text-align:left;top:62px;z-index:2}.DayPicker_weekHeader__vertical{left:50%}.DayPicker_weekHeader__verticalScrollable{background:#fff;border-bottom:1px solid #dbdbdb;display:table-row;left:0;margin-left:0;text-align:center;top:0;width:100%}.DayPicker_weekHeader_ul{font-size:14px;list-style:none;margin:1px 0;padding-left:0;padding-right:0}.DayPicker_weekHeader_li{display:inline-block;text-align:center}.DayPicker_transitionContainer{border-radius:3px;overflow:hidden;position:relative}.DayPicker_transitionContainer__horizontal{-webkit-transition:height .2s ease-in-out;-moz-transition:height .2s ease-in-out;transition:height .2s ease-in-out}.DayPicker_transitionContainer__vertical{width:100%}.DayPicker_transitionContainer__verticalScrollable{bottom:0;height:100%;left:0;overflow-y:scroll;padding-top:20px;position:absolute;right:0;top:0}.DateInput{background:#fff;display:inline-block;margin:0;padding:0;position:relative;vertical-align:middle;width:130px}.DateInput__small{width:97px}.DateInput__block{width:100%}.DateInput__disabled{background:#f2f2f2;color:#dbdbdb}.DateInput_input{background-color:#fff;border:0;border-bottom:2px solid #0000;border-radius:0;color:#484848;font-size:19px;font-weight:200;line-height:24px;padding:11px 11px 9px;width:100%}.DateInput_input__small{font-size:15px;letter-spacing:.2px;line-height:18px;padding:7px 7px 5px}.DateInput_input__regular{font-weight:auto}.DateInput_input__readOnly{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.DateInput_input__focused{background:#fff;border:0;border-bottom:2px solid #008489;outline:0}.DateInput_input__disabled{background:#f2f2f2;font-style:italic}.DateInput_screenReaderMessage{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.DateInput_fang{height:10px;left:22px;position:absolute;width:20px;z-index:2}.DateInput_fangShape{fill:#fff}.DateInput_fangStroke{fill:#0000;stroke:#dbdbdb}.DateRangePickerInput{background-color:#fff;display:inline-block}.DateRangePickerInput__disabled{background:#f2f2f2}.DateRangePickerInput__withBorder{border:1px solid #dbdbdb;border-radius:2px}.DateRangePickerInput__rtl{direction:rtl}.DateRangePickerInput__block{display:block}.DateRangePickerInput__showClearDates{padding-right:30px}.DateRangePickerInput_arrow{color:#484848;display:inline-block;vertical-align:middle}.DateRangePickerInput_arrow_svg{fill:#484848;height:24px;vertical-align:middle;width:24px}.DateRangePickerInput_clearDates{background:0 0;border:0;color:inherit;cursor:pointer;font:inherit;line-height:normal;margin:0 10px 0 5px;overflow:visible;padding:10px;position:absolute;right:0;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.DateRangePickerInput_clearDates__small{padding:6px}.DateRangePickerInput_clearDates_default:focus,.DateRangePickerInput_clearDates_default:hover{background:#dbdbdb;border-radius:50%}.DateRangePickerInput_clearDates__hide{visibility:hidden}.DateRangePickerInput_clearDates_svg{fill:#82888a;height:12px;vertical-align:middle;width:15px}.DateRangePickerInput_clearDates_svg__small{height:9px}.DateRangePickerInput_calendarIcon{background:0 0;border:0;color:inherit;cursor:pointer;display:inline-block;font:inherit;line-height:normal;margin:0 5px 0 10px;overflow:visible;padding:10px;vertical-align:middle}.DateRangePickerInput_calendarIcon_svg{fill:#82888a;height:15px;vertical-align:middle;width:14px}.DateRangePicker{display:inline-block;position:relative}.DateRangePicker__block{display:block}.DateRangePicker_picker{background-color:#fff;position:absolute;z-index:1}.DateRangePicker_picker__rtl{direction:rtl}.DateRangePicker_picker__directionLeft{left:0}.DateRangePicker_picker__directionRight{right:0}.DateRangePicker_picker__portal{background-color:#0000004d;height:100%;left:0;position:fixed;top:0;width:100%}.DateRangePicker_picker__fullScreenPortal{background-color:#fff}.DateRangePicker_closeButton{background:0 0;border:0;color:inherit;cursor:pointer;font:inherit;line-height:normal;overflow:visible;padding:15px;position:absolute;right:0;top:0;z-index:2}.DateRangePicker_closeButton:focus,.DateRangePicker_closeButton:hover{color:darken(#cacccd,10%);text-decoration:none}.DateRangePicker_closeButton_svg{fill:#cacccd;height:15px;width:15px}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
|
|
2
2
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
3
|
-
import { useState, useLayoutEffect, useCallback } from "react";
|
|
3
|
+
import { useState, useLayoutEffect, useCallback, useMemo } from "react";
|
|
4
4
|
import moment from "moment";
|
|
5
5
|
import { DayPickerRangeController } from "react-dates";
|
|
6
6
|
import "../../node_modules/react-dates/lib/initialize.js";
|
|
@@ -39,7 +39,10 @@ function DateRangePickerDropdown({
|
|
|
39
39
|
startDateOffset: startDateOffsetProp,
|
|
40
40
|
endDateOffset: endDateOffsetProp,
|
|
41
41
|
hasInputErrors,
|
|
42
|
-
portalClassName
|
|
42
|
+
portalClassName,
|
|
43
|
+
minDate,
|
|
44
|
+
maxDate,
|
|
45
|
+
isOutsideRange
|
|
43
46
|
}) {
|
|
44
47
|
const [position, setPosition] = useState({
|
|
45
48
|
x: 0,
|
|
@@ -117,6 +120,17 @@ function DateRangePickerDropdown({
|
|
|
117
120
|
);
|
|
118
121
|
const startOffsetFn = startDateOffsetProp ?? (selectedRange === "custom" ? void 0 : (day) => setStartDateOffset(selectedRange, day));
|
|
119
122
|
const endOffsetFn = endDateOffsetProp ?? (selectedRange === "custom" ? void 0 : (day) => setEndDateOffset(selectedRange, day));
|
|
123
|
+
const isDayOutsideRange = useMemo(() => {
|
|
124
|
+
if (minDate == null && maxDate == null && isOutsideRange == null) {
|
|
125
|
+
return void 0;
|
|
126
|
+
}
|
|
127
|
+
return (day) => {
|
|
128
|
+
if (minDate != null && day.isBefore(minDate, "day")) return true;
|
|
129
|
+
if (maxDate != null && day.isAfter(maxDate, "day")) return true;
|
|
130
|
+
if (isOutsideRange == null ? void 0 : isOutsideRange(day)) return true;
|
|
131
|
+
return false;
|
|
132
|
+
};
|
|
133
|
+
}, [minDate, maxDate, isOutsideRange]);
|
|
120
134
|
const dropdownContent = /* @__PURE__ */ jsxs(
|
|
121
135
|
"div",
|
|
122
136
|
{
|
|
@@ -135,6 +149,7 @@ function DateRangePickerDropdown({
|
|
|
135
149
|
focusedInput,
|
|
136
150
|
horizontalMonthPadding: showWeekNumbers ? 16 : 12,
|
|
137
151
|
initialVisibleMonth: () => startDate ?? endDate ?? moment(),
|
|
152
|
+
isOutsideRange: isDayOutsideRange,
|
|
138
153
|
numberOfMonths: 2,
|
|
139
154
|
renderDayContents: showWeekNumbers ? renderDayContents : void 0,
|
|
140
155
|
renderMonthElement: showMonthYearSelect ? ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DateRangePicker/index.tsx"],"names":[],"mappings":"AAEA,OAAO,wBAAwB,CAAC;AAKhC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,qCAAqC,CAAC;AAC7C,OAAO,+BAA+B,CAAC;AAEvC,YAAY,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAEpE;;;GAGG;AACH,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DateRangePicker/index.tsx"],"names":[],"mappings":"AAEA,OAAO,wBAAwB,CAAC;AAKhC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,qCAAqC,CAAC;AAC7C,OAAO,+BAA+B,CAAC;AAEvC,YAAY,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAEpE;;;GAGG;AACH,eAAO,MAAM,eAAe,wHAwU3B,CAAC"}
|
|
@@ -102,7 +102,13 @@ const DateRangePicker = forwardRef(
|
|
|
102
102
|
handleFocusChange(focused, setFocusedInput, startDateInputRef, endDateInputRef);
|
|
103
103
|
return;
|
|
104
104
|
}
|
|
105
|
-
|
|
105
|
+
const nextFocused = focused ?? "startDate";
|
|
106
|
+
setFocusedInput(nextFocused);
|
|
107
|
+
if (nextFocused === "startDate") {
|
|
108
|
+
handleStartDateFocus == null ? void 0 : handleStartDateFocus(setFocusedInput);
|
|
109
|
+
} else if (nextFocused === "endDate") {
|
|
110
|
+
handleEndDateFocus == null ? void 0 : handleEndDateFocus(setFocusedInput);
|
|
111
|
+
}
|
|
106
112
|
setTimeout(() => {
|
|
107
113
|
var _a, _b, _c, _d;
|
|
108
114
|
if (focused === null || focused === "startDate") {
|
|
@@ -115,7 +121,7 @@ const DateRangePicker = forwardRef(
|
|
|
115
121
|
}
|
|
116
122
|
}, 0);
|
|
117
123
|
},
|
|
118
|
-
[handleFocusChange]
|
|
124
|
+
[handleFocusChange, handleStartDateFocus, handleEndDateFocus]
|
|
119
125
|
);
|
|
120
126
|
const handleRangeSelectorChange = useCallback((event) => {
|
|
121
127
|
setSelectedRange(event.target.value);
|
|
@@ -272,6 +278,9 @@ const DateRangePicker = forwardRef(
|
|
|
272
278
|
handleRangeSelectorChange,
|
|
273
279
|
handleResetDates,
|
|
274
280
|
hasInputErrors,
|
|
281
|
+
isOutsideRange,
|
|
282
|
+
maxDate: maxDate ?? null,
|
|
283
|
+
minDate: minDate ?? null,
|
|
275
284
|
portalClassName,
|
|
276
285
|
portalContainer,
|
|
277
286
|
primaryButtonProps,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
|
-
"generatedAt": "2026-06-
|
|
3
|
+
"generatedAt": "2026-06-06T09:34:39.718Z",
|
|
4
4
|
"components": {
|
|
5
5
|
"Accordion": {
|
|
6
6
|
"title": "Components/Accordion",
|
|
@@ -1094,6 +1094,7 @@
|
|
|
1094
1094
|
"WithMonthYearSelect",
|
|
1095
1095
|
"WithWeekNumbers",
|
|
1096
1096
|
"WithMinMax",
|
|
1097
|
+
"WithOutsideRange",
|
|
1097
1098
|
"FullInteractionFlow",
|
|
1098
1099
|
"ClickOutsideToClose",
|
|
1099
1100
|
"FocusStartThenEnd",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as callBind } from "../../_virtual/
|
|
1
|
+
import { __module as callBind } from "../../_virtual/index15.js";
|
|
2
2
|
import { __require as requireSetFunctionLength } from "../set-function-length/index.js";
|
|
3
3
|
import { __require as requireEsDefineProperty } from "../es-define-property/index.js";
|
|
4
4
|
import { __require as requireCallBindApplyHelpers } from "../call-bind-apply-helpers/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as isSymbol } from "../../_virtual/
|
|
1
|
+
import { __module as isSymbol } from "../../_virtual/index14.js";
|
|
2
2
|
import { __require as requireCallBound } from "../call-bound/index.js";
|
|
3
3
|
import { __require as requireHasSymbols } from "../has-symbols/index.js";
|
|
4
4
|
import { __require as requireSafeRegexTest } from "../safe-regex-test/index.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "impact-ui",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.11",
|
|
4
4
|
"description": "Impact Analytics UI library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/components/index.js",
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
"storybook": "^10.2.15",
|
|
177
177
|
"svgo": "^4.0.1",
|
|
178
178
|
"terser": "^5.46.0",
|
|
179
|
-
"typescript": "^5.
|
|
179
|
+
"typescript": "^5.3.3",
|
|
180
180
|
"vite": "^5.0.11",
|
|
181
181
|
"vite-plugin-css-injected-by-js": "^4.0.1",
|
|
182
182
|
"vite-plugin-dts": "^3.7.0",
|
|
@@ -219,9 +219,6 @@
|
|
|
219
219
|
}
|
|
220
220
|
},
|
|
221
221
|
"dependencies": {
|
|
222
|
-
"@dnd-kit/core": "^6.2.0",
|
|
223
|
-
"@dnd-kit/sortable": "^9.0.0",
|
|
224
|
-
"@dnd-kit/utilities": "^3.2.2",
|
|
225
222
|
"@tiptap/extension-highlight": "^2.26.1",
|
|
226
223
|
"@tiptap/extension-image": "^2.26.1",
|
|
227
224
|
"@tiptap/extension-link": "^2.26.1",
|
|
@@ -232,6 +229,9 @@
|
|
|
232
229
|
"@tiptap/starter-kit": "^2.26.1",
|
|
233
230
|
"@tiptap/suggestion": "^2.26.1",
|
|
234
231
|
"dompurify": "^3.2.7",
|
|
232
|
+
"@dnd-kit/core": "^6.2.0",
|
|
233
|
+
"@dnd-kit/sortable": "^9.0.0",
|
|
234
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
235
235
|
"emoji-picker-react": "^4.14.0",
|
|
236
236
|
"prosemirror-model": "^1.25.3",
|
|
237
237
|
"prosemirror-state": "^1.4.3",
|