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.66 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{useDateTimePickerDefaultizedProps as t,dateTimePickerValueManager as a}from"../DateTimePicker/shared.js";import{DateTimePickerToolbar as s}from"../DateTimePicker/DateTimePickerToolbar.js";import{DesktopWrapper as i}from"../internals/components/wrappers/DesktopWrapper.js";import{useDateTimeValidation as p}from"../internals/hooks/validation/useDateTimeValidation.js";import{KeyboardDateInput as m}from"../internals/components/KeyboardDateInput.js";import{usePickerState as l}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=["onChange","PaperProps","PopperProps","ToolbarComponent","TransitionComponent","value","components","componentsProps","hideTabs"],f=n.forwardRef((function(r,f){const P=t(r,"MuiDesktopDateTimePicker"),T=null!==p(P),{pickerProps:h,inputProps:g,wrapperProps:D}=l(P,a),{PaperProps:y,PopperProps:k,ToolbarComponent:C=s,TransitionComponent:j,components:O,componentsProps:x,hideTabs:I=!0}=P,w=e(P,d),F=n.useMemo((()=>o({Tabs:c},O)),[O]),R=o({},g,w,{components:F,componentsProps:x,ref:f,validationError:T});return u(i,o({},D,{DateInputProps:R,KeyboardDateInputComponent:m,PopperProps:k,PaperProps:y,TransitionComponent:j,components:F,componentsProps:x,children:u(b,o({},h,{autoFocus:!0,toolbarTitle:P.label||P.toolbarTitle,ToolbarComponent:C,DateInputProps:R,components:F,componentsProps:x,hideTabs:I},w))}))}));"production"!==process.env.NODE_ENV&&(f.propTypes={acceptRegex:r.instanceOf(RegExp),ampm:r.bool,ampmInClock:r.bool,autoFocus:r.bool,children:r.node,className:r.string,closeOnSelect:r.bool,components:r.object,componentsProps:r.object,dateRangeIcon:r.node,dayOfWeekFormatter:r.func,defaultCalendarMonth:r.any,disabled:r.bool,disableFuture:r.bool,disableHighlightToday:r.bool,disableIgnoringDatePartForTimeValidation:r.bool,disableMaskedInput:r.bool,disableOpenPicker:r.bool,disablePast:r.bool,getClockLabelText:r.func,getOpenDialogAriaText:r.func,getViewSwitchingButtonText:r.func,hideTabs:r.bool,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,maxDateTime:r.any,maxTime:r.any,minDate:r.any,minDateTime:r.any,minTime:r.any,minutesStep:r.number,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","hours","minutes","month","seconds","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,shouldDisableTime:r.func,shouldDisableYear:r.func,showDaysOutsideCurrentMonth:r.bool,showToolbar:r.bool,timeIcon:r.node,ToolbarComponent:r.elementType,toolbarFormat:r.string,toolbarPlaceholder:r.node,toolbarTitle:r.node,TransitionComponent:r.elementType,value:r.any,views:r.arrayOf(r.oneOf(["day","hours","minutes","month","seconds","year"]).isRequired)});export{f as DesktopDateTimePicker};