UNPKG

@gsretail.com/gui-core

Version:

A skeleton to create your own React component library using Rollup, TypeScript, Sass and Storybook

2 lines (1 loc) 3.15 kB
import o from"../../../@babel/runtime/helpers/esm/extends.js";import e from"../../../@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js";import*as n from"react";import r from"../../../prop-types/index.js";import{useDatePickerDefaultizedProps as t,datePickerValueManager as a}from"../DatePicker/shared.js";import{DatePickerToolbar as s}from"../DatePicker/DatePickerToolbar.js";import{DesktopWrapper as p}from"../internals/components/wrappers/DesktopWrapper.js";import{useDateValidation as i}from"../internals/hooks/validation/useDateValidation.js";import{KeyboardDateInput as l}from"../internals/components/KeyboardDateInput.js";import{usePickerState as c}from"../internals/hooks/usePickerState.js";import{jsx as m}from"react/jsx-runtime";import{CalendarOrClockPicker as u}from"../internals/components/CalendarOrClockPicker/CalendarOrClockPicker.js";const b=["onChange","PopperProps","PaperProps","ToolbarComponent","TransitionComponent","value","components","componentsProps"],d=n.forwardRef((function(n,r){const d=t(n,"MuiDesktopDatePicker"),f=null!==i(d),{pickerProps:P,inputProps:h,wrapperProps:g}=c(d,a),{PopperProps:T,PaperProps:y,ToolbarComponent:C=s,TransitionComponent:D,components:j,componentsProps:k}=d,O=e(d,b),w=o({},h,O,{components:j,componentsProps:k,ref:r,validationError:f});return m(p,o({},g,{DateInputProps:w,KeyboardDateInputComponent:l,PopperProps:T,PaperProps:y,TransitionComponent:D,components:j,componentsProps:k,children:m(u,o({},P,{autoFocus:!0,toolbarTitle:d.label||d.toolbarTitle,ToolbarComponent:C,DateInputProps:w,components:j,componentsProps:k},O))}))}));"production"!==process.env.NODE_ENV&&(d.propTypes={acceptRegex:r.instanceOf(RegExp),autoFocus:r.bool,children:r.node,className:r.string,closeOnSelect:r.bool,components:r.object,componentsProps:r.object,dayOfWeekFormatter:r.func,defaultCalendarMonth:r.any,disabled:r.bool,disableFuture:r.bool,disableHighlightToday:r.bool,disableMaskedInput:r.bool,disableOpenPicker:r.bool,disablePast:r.bool,getOpenDialogAriaText:r.func,getViewSwitchingButtonText:r.func,ignoreInvalidInputs:r.bool,InputAdornmentProps:r.object,inputFormat:r.string,InputProps:r.object,inputRef:r.oneOfType([r.func,r.shape({current:r.object})]),label:r.node,leftArrowButtonText:r.string,loading:r.bool,mask:r.string,maxDate:r.any,minDate:r.any,onAccept:r.func,onChange:r.func.isRequired,onClose:r.func,onError:r.func,onMonthChange:r.func,onOpen:r.func,onViewChange:r.func,onYearChange:r.func,open:r.bool,OpenPickerButtonProps:r.object,openTo:r.oneOf(["day","month","year"]),orientation:r.oneOf(["landscape","portrait"]),PaperProps:r.object,PopperProps:r.object,readOnly:r.bool,reduceAnimations:r.bool,renderDay:r.func,renderInput:r.func.isRequired,renderLoading:r.func,rifmFormatter:r.func,rightArrowButtonText:r.string,shouldDisableDate:r.func,shouldDisableMonth:r.func,shouldDisableYear:r.func,showDaysOutsideCurrentMonth:r.bool,showToolbar:r.bool,ToolbarComponent:r.elementType,toolbarFormat:r.string,toolbarPlaceholder:r.node,toolbarTitle:r.node,TransitionComponent:r.elementType,value:r.any,views:r.arrayOf(r.oneOf(["day","month","year"]).isRequired)});export{d as DesktopDatePicker};