1import { o as __toESM } from "./chunk-6z4oVpB-.js"; 2import { F as init_objectWithoutPropertiesLoose, J as init_extends, P as _objectWithoutPropertiesLoose, a as identifier_default, o as defaultTheme_default, q as _extends } from "./capitalize-YV0fqYBS.js"; 3import { t as require_react } from "./react-CCT1erMQ.js"; 4import { t as require_prop_types } from "./prop-types-BP3O0vhg.js"; 5import { t as require_jsx_runtime } from "./jsx-runtime-6ToSbptA.js"; 6import { r as useThemeProps$1 } from "./Stack-DHo_Jfjl.js"; 7function useThemeProps({ props, name }) { 8 return useThemeProps$1({ 9 props, 10 name, 11 defaultTheme: defaultTheme_default, 12 themeId: identifier_default 13 }); 14} 15init_extends(); 16init_objectWithoutPropertiesLoose(); 17var import_react = /* @__PURE__ */ __toESM(require_react()); 18var import_prop_types = /* @__PURE__ */ __toESM(require_prop_types()); 19var import_jsx_runtime = /* @__PURE__ */ __toESM(require_jsx_runtime()); 20var _excluded = ["localeText"]; 21const MuiPickersAdapterContext = /* @__PURE__ */ import_react.createContext(null); 22MuiPickersAdapterContext.displayName = "MuiPickersAdapterContext"; 23const LocalizationProvider = function LocalizationProvider$1(inProps) { 24 var _React$useContext; 25 const { localeText: inLocaleText } = inProps, otherInProps = _objectWithoutPropertiesLoose(inProps, _excluded); 26 const { utils: parentUtils, localeText: parentLocaleText } = (_React$useContext = import_react.useContext(MuiPickersAdapterContext)) != null ? _React$useContext : { 27 utils: void 0, 28 localeText: void 0 29 }; 30 const { children, dateAdapter: DateAdapter, dateFormats, dateLibInstance, adapterLocale, localeText: themeLocaleText } = useThemeProps({ 31 props: otherInProps, 32 name: "MuiLocalizationProvider" 33 }); 34 const localeText = import_react.useMemo(() => _extends({}, themeLocaleText, parentLocaleText, inLocaleText), [ 35 themeLocaleText, 36 parentLocaleText, 37 inLocaleText 38 ]); 39 const utils = import_react.useMemo(() => { 40 if (!DateAdapter) { 41 if (parentUtils) return parentUtils; 42 return null; 43 } 44 const adapter = new DateAdapter({ 45 locale: adapterLocale, 46 formats: dateFormats, 47 instance: dateLibInstance 48 }); 49 if (!adapter.isMUIAdapter) throw new Error([ 50 "MUI: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`", 51 "For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`", 52 "More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation" 53 ].join(`\n`)); 54 return adapter; 55 }, [ 56 DateAdapter, 57 adapterLocale, 58 dateFormats, 59 dateLibInstance, 60 parentUtils 61 ]); 62 const defaultDates = import_react.useMemo(() => { 63 if (!utils) return null; 64 return { 65 minDate: utils.date("1900-01-01T00:00:00.000"), 66 maxDate: utils.date("2099-12-31T00:00:00.000") 67 }; 68 }, [utils]); 69 const contextValue = import_react.useMemo(() => { 70 return { 71 utils, 72 defaultDates, 73 localeText 74 }; 75 }, [ 76 defaultDates, 77 utils, 78 localeText 79 ]); 80 return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MuiPickersAdapterContext.Provider, { 81 value: contextValue, 82 children 83 }); 84}; 85LocalizationProvider.propTypes = { 86 adapterLocale: import_prop_types.default.any, 87 children: import_prop_types.default.node, 88 dateAdapter: import_prop_types.default.func, 89 dateFormats: import_prop_types.default.shape({ 90 dayOfMonth: import_prop_types.default.string, 91 fullDate: import_prop_types.default.string, 92 fullDateTime: import_prop_types.default.string, 93 fullDateTime12h: import_prop_types.default.string, 94 fullDateTime24h: import_prop_types.default.string, 95 fullDateWithWeekday: import_prop_types.default.string, 96 fullTime: import_prop_types.default.string, 97 fullTime12h: import_prop_types.default.string, 98 fullTime24h: import_prop_types.default.string, 99 hours12h: import_prop_types.default.string, 100 hours24h: import_prop_types.default.string, 101 keyboardDate: import_prop_types.default.string, 102 keyboardDateTime: import_prop_types.default.string, 103 keyboardDateTime12h: import_prop_types.default.string, 104 keyboardDateTime24h: import_prop_types.default.string, 105 meridiem: import_prop_types.default.string, 106 minutes: import_prop_types.default.string, 107 month: import_prop_types.default.string, 108 monthAndDate: import_prop_types.default.string, 109 monthAndYear: import_prop_types.default.string, 110 monthShort: import_prop_types.default.string, 111 normalDate: import_prop_types.default.string, 112 normalDateWithWeekday: import_prop_types.default.string, 113 seconds: import_prop_types.default.string, 114 shortDate: import_prop_types.default.string, 115 weekday: import_prop_types.default.string, 116 weekdayShort: import_prop_types.default.string, 117 year: import_prop_types.default.string 118 }), 119 dateLibInstance: import_prop_types.default.any, 120 localeText: import_prop_types.default.object 121}; 122export { MuiPickersAdapterContext as n, useThemeProps as r, LocalizationProvider as t }; 123 124//# sourceMappingURL=LocalizationProvider-CaIheUAU.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.