@gsretail.com/gui-core
Version:
A skeleton to create your own React component library using Rollup, TypeScript, Sass and Storybook
2 lines (1 loc) • 2.93 kB
JavaScript
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{MobileWrapper as i}from"../internals/components/wrappers/MobileWrapper.js";import{useDateValidation as p}from"../internals/hooks/validation/useDateValidation.js";import{PureDateInput as l}from"../internals/components/PureDateInput.js";import{usePickerState as c}from"../internals/hooks/usePickerState.js";import{jsx as u}from"react/jsx-runtime";import{CalendarOrClockPicker as m}from"../internals/components/CalendarOrClockPicker/CalendarOrClockPicker.js";const b=["ToolbarComponent","value","onChange","components","componentsProps"],d=n.forwardRef((function(n,r){const d=t(n,"MuiMobileDatePicker"),f=null!==p(d),{pickerProps:h,inputProps:P,wrapperProps:g}=c(d,a),{ToolbarComponent:D=s,components:j,componentsProps:y}=d,T=e(d,b),k=o({},P,T,{components:j,componentsProps:y,ref:r,validationError:f});return u(i,o({},T,g,{DateInputProps:k,PureDateInputComponent:l,components:j,componentsProps:y,children:u(m,o({},h,{autoFocus:!0,toolbarTitle:d.label||d.toolbarTitle,ToolbarComponent:D,DateInputProps:k,components:j,componentsProps:y},T))}))}));"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,DialogProps:r.object,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"]),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,value:r.any,views:r.arrayOf(r.oneOf(["day","month","year"]).isRequired)});export{d as MobileDatePicker};