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.45 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 t from"../../../prop-types/index.js";import{useDateTimePickerDefaultizedProps as r,dateTimePickerValueManager as a}from"../DateTimePicker/shared.js";import{DateTimePickerToolbar as i}from"../DateTimePicker/DateTimePickerToolbar.js";import{MobileWrapper as s}from"../internals/components/wrappers/MobileWrapper.js";import{useDateTimeValidation as l}from"../internals/hooks/validation/useDateTimeValidation.js";import{PureDateInput as p}from"../internals/components/PureDateInput.js";import{usePickerState as m}from"../internals/hooks/usePickerState.js";import{DateTimePickerTabs as c}from"../DateTimePicker/DateTimePickerTabs.js";import{jsx as u}from"react/jsx-runtime";import{CalendarOrClockPicker as b}from"../internals/components/CalendarOrClockPicker/CalendarOrClockPicker.js";const d=["ToolbarComponent","value","onChange","components","componentsProps","hideTabs"],f=n.forwardRef((function(t,f){const T=r(t,"MuiMobileDateTimePicker"),h=null!==l(T),{pickerProps:P,inputProps:g,wrapperProps:D}=m(T,a),{ToolbarComponent:y=i,components:k,componentsProps:j,hideTabs:C=!1}=T,O=e(T,d),x=n.useMemo((()=>o({Tabs:c},k)),[k]),I=o({},g,O,{components:x,componentsProps:j,ref:f,validationError:h});return u(s,o({},O,D,{DateInputProps:I,PureDateInputComponent:p,components:x,componentsProps:j,children:u(b,o({},P,{autoFocus:!0,toolbarTitle:T.label||T.toolbarTitle,ToolbarComponent:y,DateInputProps:I,components:x,componentsProps:j,hideTabs:C},O))}))}));"production"!==process.env.NODE_ENV&&(f.propTypes={acceptRegex:t.instanceOf(RegExp),ampm:t.bool,ampmInClock:t.bool,autoFocus:t.bool,children:t.node,className:t.string,closeOnSelect:t.bool,components:t.object,componentsProps:t.object,dateRangeIcon:t.node,dayOfWeekFormatter:t.func,defaultCalendarMonth:t.any,DialogProps:t.object,disabled:t.bool,disableFuture:t.bool,disableHighlightToday:t.bool,disableIgnoringDatePartForTimeValidation:t.bool,disableMaskedInput:t.bool,disableOpenPicker:t.bool,disablePast:t.bool,getClockLabelText:t.func,getOpenDialogAriaText:t.func,getViewSwitchingButtonText:t.func,hideTabs:t.bool,ignoreInvalidInputs:t.bool,InputAdornmentProps:t.object,inputFormat:t.string,InputProps:t.object,inputRef:t.oneOfType([t.func,t.shape({current:t.object})]),label:t.node,leftArrowButtonText:t.string,loading:t.bool,mask:t.string,maxDate:t.any,maxDateTime:t.any,maxTime:t.any,minDate:t.any,minDateTime:t.any,minTime:t.any,minutesStep:t.number,onAccept:t.func,onChange:t.func.isRequired,onClose:t.func,onError:t.func,onMonthChange:t.func,onOpen:t.func,onViewChange:t.func,onYearChange:t.func,open:t.bool,OpenPickerButtonProps:t.object,openTo:t.oneOf(["day","hours","minutes","month","seconds","year"]),orientation:t.oneOf(["landscape","portrait"]),readOnly:t.bool,reduceAnimations:t.bool,renderDay:t.func,renderInput:t.func.isRequired,renderLoading:t.func,rifmFormatter:t.func,rightArrowButtonText:t.string,shouldDisableDate:t.func,shouldDisableMonth:t.func,shouldDisableTime:t.func,shouldDisableYear:t.func,showDaysOutsideCurrentMonth:t.bool,showToolbar:t.bool,timeIcon:t.node,ToolbarComponent:t.elementType,toolbarFormat:t.string,toolbarPlaceholder:t.node,toolbarTitle:t.node,value:t.any,views:t.arrayOf(t.oneOf(["day","hours","minutes","month","seconds","year"]).isRequired)});export{f as MobileDateTimePicker};