@gustavo-valsechi/client 1.4.253 → 1.4.255
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/components/types/form/index.js +1 -1
- package/dist/src/components/types/form/index.mjs +1 -1
- package/dist/src/components/types/form/types/datetime/index.js +14 -39
- package/dist/src/components/types/form/types/datetime/index.mjs +15 -40
- package/dist/src/components/types/form/types/datetime/picker/index.d.ts +2 -0
- package/dist/src/components/types/form/types/datetime/picker/index.js +101 -0
- package/dist/src/components/types/form/types/datetime/picker/index.mjs +71 -0
- package/dist/src/components/types/form/types/datetime/picker/styles.d.ts +2 -0
- package/dist/src/components/types/form/types/datetime/picker/styles.js +178 -0
- package/dist/src/components/types/form/types/datetime/picker/styles.mjs +143 -0
- package/dist/src/components/types/form/types/select/index.js +8 -2
- package/dist/src/components/types/form/types/select/index.mjs +8 -2
- package/dist/src/components/types/form/types/select/options/index.js +65 -17
- package/dist/src/components/types/form/types/select/options/index.mjs +67 -19
- package/dist/src/components/types/form/types/select/options/styles.js +43 -18
- package/dist/src/components/types/form/types/select/options/styles.mjs +43 -18
- package/dist/src/components/types/form/types/select/styles.js +6 -1
- package/dist/src/components/types/form/types/select/styles.mjs +6 -1
- package/dist/src/components/types/modal/styles.js +3 -3
- package/dist/src/components/types/modal/styles.mjs +3 -3
- package/dist/src/contexts/icon/assets/brands/index.js +1 -1
- package/dist/src/contexts/icon/assets/brands/index.mjs +1 -1
- package/dist/src/contexts/icon/assets/regular/index.js +1 -1
- package/dist/src/contexts/icon/assets/regular/index.mjs +1 -1
- package/dist/src/contexts/icon/assets/solid/index.js +1 -1
- package/dist/src/contexts/icon/assets/solid/index.mjs +1 -1
- package/dist/src/contexts/target/index.js +96 -50
- package/dist/src/contexts/target/index.mjs +97 -51
- package/dist/src/contexts/target/modal/index.d.ts +2 -0
- package/dist/src/contexts/target/modal/index.js +60 -0
- package/dist/src/contexts/target/modal/index.mjs +30 -0
- package/dist/src/contexts/target/modal/styles.d.ts +1 -0
- package/dist/src/contexts/target/modal/styles.js +43 -0
- package/dist/src/contexts/target/modal/styles.mjs +9 -0
- package/dist/src/contexts/theme/content.js +1 -0
- package/dist/src/contexts/theme/content.mjs +1 -0
- package/dist/src/contexts/theme/global.styles.js +8 -8
- package/dist/src/contexts/theme/global.styles.mjs +8 -8
- package/dist/src/contexts/theme/index.js +3 -0
- package/dist/src/contexts/theme/index.mjs +3 -0
- package/dist/src/interfaces/components/form/index.d.ts +1 -0
- package/dist/src/interfaces/components/form/select/index.d.ts +3 -1
- package/dist/src/interfaces/components/modal/index.d.ts +1 -0
- package/dist/src/interfaces/contexts/target/index.d.ts +3 -1
- package/dist/src/interfaces/contexts/theme/index.d.ts +1 -0
- package/dist/test/index.d.ts +1 -1
- package/dist/test/styles.d.ts +1 -0
- package/package.json +17 -4
- package/dist/test/setup.d.mts +0 -1
|
@@ -73,7 +73,6 @@ function Form(props) {
|
|
|
73
73
|
defaultValues: props.defaultValues,
|
|
74
74
|
mode: "all"
|
|
75
75
|
});
|
|
76
|
-
console.log(getValues());
|
|
77
76
|
(0, import_react.useEffect)(() => {
|
|
78
77
|
if (!props.clearWhen) return;
|
|
79
78
|
const defaultValues = {};
|
|
@@ -121,6 +120,7 @@ function Form(props) {
|
|
|
121
120
|
error: (_a = errors[data.name]) == null ? void 0 : _a.message,
|
|
122
121
|
register,
|
|
123
122
|
setValue,
|
|
123
|
+
getValues,
|
|
124
124
|
watch
|
|
125
125
|
}
|
|
126
126
|
);
|
|
@@ -39,7 +39,6 @@ function Form(props) {
|
|
|
39
39
|
defaultValues: props.defaultValues,
|
|
40
40
|
mode: "all"
|
|
41
41
|
});
|
|
42
|
-
console.log(getValues());
|
|
43
42
|
useEffect(() => {
|
|
44
43
|
if (!props.clearWhen) return;
|
|
45
44
|
const defaultValues = {};
|
|
@@ -87,6 +86,7 @@ function Form(props) {
|
|
|
87
86
|
error: (_a = errors[data.name]) == null ? void 0 : _a.message,
|
|
88
87
|
register,
|
|
89
88
|
setValue,
|
|
89
|
+
getValues,
|
|
90
90
|
watch
|
|
91
91
|
}
|
|
92
92
|
);
|
|
@@ -39,62 +39,38 @@ var import_styles = require("./styles");
|
|
|
39
39
|
var import_label = require("../label");
|
|
40
40
|
var import_error = require("../error");
|
|
41
41
|
var import_contexts = require("../../../../../contexts");
|
|
42
|
-
var import_LocalizationProvider = require("@mui/x-date-pickers/LocalizationProvider");
|
|
43
|
-
var import_AdapterDayjs = require("@mui/x-date-pickers/AdapterDayjs");
|
|
44
|
-
var import_DateTimePicker = require("@mui/x-date-pickers/DateTimePicker");
|
|
45
|
-
var import_PickersLayout = require("@mui/x-date-pickers/PickersLayout");
|
|
46
|
-
var import_locales = require("@mui/x-date-pickers/locales");
|
|
47
|
-
var import_dayjs = __toESM(require("dayjs"));
|
|
48
42
|
var import_lodash = __toESM(require("lodash"));
|
|
43
|
+
var import_picker = __toESM(require("./picker"));
|
|
49
44
|
function InputDateTime(props) {
|
|
50
45
|
const inputRef = (0, import_react.useRef)();
|
|
51
46
|
const toggleRef = (0, import_react.useRef)();
|
|
52
47
|
const target = (0, import_contexts.useTarget)();
|
|
53
48
|
const register = (props.register || ((name) => ({})))(props.name || "");
|
|
54
|
-
const [dateTime, setDateDime] = (0, import_react.useState)((0, import_dayjs.default)());
|
|
55
49
|
(0, import_react.useEffect)(() => {
|
|
56
50
|
if (!inputRef.current || !toggleRef.current) return;
|
|
57
51
|
target.add({
|
|
58
52
|
ref: inputRef,
|
|
59
53
|
toggleRef,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
onChange: setDateDime,
|
|
71
|
-
open: true,
|
|
72
|
-
enableAccessibleFieldDOMStructure: false,
|
|
73
|
-
slots: {
|
|
74
|
-
textField: () => null,
|
|
75
|
-
layout: import_PickersLayout.PickersLayout
|
|
76
|
-
},
|
|
77
|
-
slotProps: {
|
|
78
|
-
popper: {
|
|
79
|
-
disablePortal: true
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
)
|
|
84
|
-
}
|
|
85
|
-
)
|
|
54
|
+
mobileModal: {
|
|
55
|
+
noPadding: true,
|
|
56
|
+
buttons: [
|
|
57
|
+
{
|
|
58
|
+
label: "confirmar",
|
|
59
|
+
onClick: () => target.close(inputRef)
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
component: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_picker.default, { ...props })
|
|
86
64
|
});
|
|
87
65
|
}, [inputRef, toggleRef]);
|
|
88
|
-
(0, import_react.useEffect)(() => {
|
|
89
|
-
if (props.setValue) props.setValue(props.name, dateTime);
|
|
90
|
-
}, [dateTime]);
|
|
91
66
|
const onChange = (event) => {
|
|
67
|
+
var _a;
|
|
92
68
|
if (register.onChange) register.onChange(event);
|
|
93
|
-
if (props.onChange) props.onChange(event);
|
|
69
|
+
if (props.onChange) props.onChange(((_a = event == null ? void 0 : event.target) == null ? void 0 : _a.value) || "");
|
|
94
70
|
};
|
|
95
71
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.Container, { className: props.className, error: props.error, disabled: props.disabled, children: [
|
|
96
72
|
!!props.label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_label.InputLabel, { optional: props.optional, children: props.label }),
|
|
97
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "input-content", children: [
|
|
73
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ref: inputRef, className: "input-content", children: [
|
|
98
74
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
99
75
|
"input",
|
|
100
76
|
{
|
|
@@ -104,7 +80,6 @@ function InputDateTime(props) {
|
|
|
104
80
|
if (props.onFocus) props.onFocus(props.name);
|
|
105
81
|
},
|
|
106
82
|
...register,
|
|
107
|
-
ref: inputRef,
|
|
108
83
|
onChange
|
|
109
84
|
}
|
|
110
85
|
),
|
|
@@ -1,67 +1,43 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { useRef,
|
|
4
|
+
import { useRef, useEffect } from "react";
|
|
5
5
|
import { Container } from "./styles";
|
|
6
6
|
import { InputLabel } from "../label";
|
|
7
7
|
import { InputError } from "../error";
|
|
8
8
|
import { useTarget } from "../../../../../contexts";
|
|
9
|
-
import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider";
|
|
10
|
-
import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs";
|
|
11
|
-
import { DateTimePicker } from "@mui/x-date-pickers/DateTimePicker";
|
|
12
|
-
import { PickersLayout } from "@mui/x-date-pickers/PickersLayout";
|
|
13
|
-
import { ptBR } from "@mui/x-date-pickers/locales";
|
|
14
|
-
import dayjs from "dayjs";
|
|
15
9
|
import _ from "lodash";
|
|
10
|
+
import InputDateTimePicker from "./picker";
|
|
16
11
|
function InputDateTime(props) {
|
|
17
12
|
const inputRef = useRef();
|
|
18
13
|
const toggleRef = useRef();
|
|
19
14
|
const target = useTarget();
|
|
20
15
|
const register = (props.register || ((name) => ({})))(props.name || "");
|
|
21
|
-
const [dateTime, setDateDime] = useState(dayjs());
|
|
22
16
|
useEffect(() => {
|
|
23
17
|
if (!inputRef.current || !toggleRef.current) return;
|
|
24
18
|
target.add({
|
|
25
19
|
ref: inputRef,
|
|
26
20
|
toggleRef,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
onChange: setDateDime,
|
|
38
|
-
open: true,
|
|
39
|
-
enableAccessibleFieldDOMStructure: false,
|
|
40
|
-
slots: {
|
|
41
|
-
textField: () => null,
|
|
42
|
-
layout: PickersLayout
|
|
43
|
-
},
|
|
44
|
-
slotProps: {
|
|
45
|
-
popper: {
|
|
46
|
-
disablePortal: true
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
)
|
|
51
|
-
}
|
|
52
|
-
)
|
|
21
|
+
mobileModal: {
|
|
22
|
+
noPadding: true,
|
|
23
|
+
buttons: [
|
|
24
|
+
{
|
|
25
|
+
label: "confirmar",
|
|
26
|
+
onClick: () => target.close(inputRef)
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
component: /* @__PURE__ */ jsx(InputDateTimePicker, { ...props })
|
|
53
31
|
});
|
|
54
32
|
}, [inputRef, toggleRef]);
|
|
55
|
-
useEffect(() => {
|
|
56
|
-
if (props.setValue) props.setValue(props.name, dateTime);
|
|
57
|
-
}, [dateTime]);
|
|
58
33
|
const onChange = (event) => {
|
|
34
|
+
var _a;
|
|
59
35
|
if (register.onChange) register.onChange(event);
|
|
60
|
-
if (props.onChange) props.onChange(event);
|
|
36
|
+
if (props.onChange) props.onChange(((_a = event == null ? void 0 : event.target) == null ? void 0 : _a.value) || "");
|
|
61
37
|
};
|
|
62
38
|
return /* @__PURE__ */ jsxs(Container, { className: props.className, error: props.error, disabled: props.disabled, children: [
|
|
63
39
|
!!props.label && /* @__PURE__ */ jsx(InputLabel, { optional: props.optional, children: props.label }),
|
|
64
|
-
/* @__PURE__ */ jsxs("div", { className: "input-content", children: [
|
|
40
|
+
/* @__PURE__ */ jsxs("div", { ref: inputRef, className: "input-content", children: [
|
|
65
41
|
/* @__PURE__ */ jsx(
|
|
66
42
|
"input",
|
|
67
43
|
{
|
|
@@ -71,7 +47,6 @@ function InputDateTime(props) {
|
|
|
71
47
|
if (props.onFocus) props.onFocus(props.name);
|
|
72
48
|
},
|
|
73
49
|
...register,
|
|
74
|
-
ref: inputRef,
|
|
75
50
|
onChange
|
|
76
51
|
}
|
|
77
52
|
),
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
"use client";
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __export = (target, all) => {
|
|
11
|
+
for (var name in all)
|
|
12
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
13
|
+
};
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from))
|
|
17
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
28
|
+
mod
|
|
29
|
+
));
|
|
30
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
31
|
+
var picker_exports = {};
|
|
32
|
+
__export(picker_exports, {
|
|
33
|
+
default: () => InputDateTimePicker
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(picker_exports);
|
|
36
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
+
var import_react = require("react");
|
|
38
|
+
var import_contexts = require("../../../../../../contexts");
|
|
39
|
+
var import_styles = require("./styles");
|
|
40
|
+
var import_LocalizationProvider = require("@mui/x-date-pickers/LocalizationProvider");
|
|
41
|
+
var import_AdapterDayjs = require("@mui/x-date-pickers/AdapterDayjs");
|
|
42
|
+
var import_DateCalendar = require("@mui/x-date-pickers/DateCalendar");
|
|
43
|
+
var import_MultiSectionDigitalClock = require("@mui/x-date-pickers/MultiSectionDigitalClock");
|
|
44
|
+
var import_x_date_pickers = require("@mui/x-date-pickers");
|
|
45
|
+
var import_locales = require("@mui/x-date-pickers/locales");
|
|
46
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
47
|
+
var import_utils = __toESM(require("@gustavo-valsechi/utils"));
|
|
48
|
+
function InputDateTimePicker(props) {
|
|
49
|
+
const theme = (0, import_contexts.useTheme)();
|
|
50
|
+
const [dateTime, setDateTime] = (0, import_react.useState)((0, import_dayjs.default)());
|
|
51
|
+
(0, import_react.useEffect)(() => {
|
|
52
|
+
if (props.setValue) props.setValue(props.name, import_utils.default.moment(dateTime.toDate()).format("YYYY-MM-DD HH:mm"));
|
|
53
|
+
}, [dateTime]);
|
|
54
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
55
|
+
import_LocalizationProvider.LocalizationProvider,
|
|
56
|
+
{
|
|
57
|
+
dateAdapter: import_AdapterDayjs.AdapterDayjs,
|
|
58
|
+
adapterLocale: "pt-br",
|
|
59
|
+
localeText: import_locales.ptBR.components.MuiLocalizationProvider.defaultProps.localeText,
|
|
60
|
+
children: theme.content.isMobile ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.MobileContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
61
|
+
import_x_date_pickers.StaticDateTimePicker,
|
|
62
|
+
{
|
|
63
|
+
value: dateTime,
|
|
64
|
+
onChange: (value) => setDateTime(value),
|
|
65
|
+
minutesStep: 1,
|
|
66
|
+
timeSteps: { minutes: 1 },
|
|
67
|
+
ampm: false,
|
|
68
|
+
slots: { layout: import_x_date_pickers.PickersLayout }
|
|
69
|
+
}
|
|
70
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.Container, { children: [
|
|
71
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
72
|
+
import_DateCalendar.DateCalendar,
|
|
73
|
+
{
|
|
74
|
+
value: dateTime,
|
|
75
|
+
onChange: (newDate) => {
|
|
76
|
+
if (!newDate) return;
|
|
77
|
+
setDateTime(
|
|
78
|
+
(prev) => prev.year(newDate.year()).month(newDate.month()).date(newDate.date())
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
84
|
+
import_MultiSectionDigitalClock.MultiSectionDigitalClock,
|
|
85
|
+
{
|
|
86
|
+
value: dateTime,
|
|
87
|
+
minutesStep: 1,
|
|
88
|
+
timeSteps: { minutes: 1 },
|
|
89
|
+
ampm: false,
|
|
90
|
+
onChange: (newTime) => {
|
|
91
|
+
if (!newTime) return;
|
|
92
|
+
setDateTime(
|
|
93
|
+
(prev) => prev.hour(newTime.hour()).minute(newTime.minute())
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
] })
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { useEffect, useState } from "react";
|
|
5
|
+
import { useTheme } from "../../../../../../contexts";
|
|
6
|
+
import { Container, MobileContainer } from "./styles";
|
|
7
|
+
import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider";
|
|
8
|
+
import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs";
|
|
9
|
+
import { DateCalendar } from "@mui/x-date-pickers/DateCalendar";
|
|
10
|
+
import { MultiSectionDigitalClock } from "@mui/x-date-pickers/MultiSectionDigitalClock";
|
|
11
|
+
import { StaticDateTimePicker, PickersLayout } from "@mui/x-date-pickers";
|
|
12
|
+
import { ptBR } from "@mui/x-date-pickers/locales";
|
|
13
|
+
import dayjs from "dayjs";
|
|
14
|
+
import Utils from "@gustavo-valsechi/utils";
|
|
15
|
+
function InputDateTimePicker(props) {
|
|
16
|
+
const theme = useTheme();
|
|
17
|
+
const [dateTime, setDateTime] = useState(dayjs());
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
if (props.setValue) props.setValue(props.name, Utils.moment(dateTime.toDate()).format("YYYY-MM-DD HH:mm"));
|
|
20
|
+
}, [dateTime]);
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
LocalizationProvider,
|
|
23
|
+
{
|
|
24
|
+
dateAdapter: AdapterDayjs,
|
|
25
|
+
adapterLocale: "pt-br",
|
|
26
|
+
localeText: ptBR.components.MuiLocalizationProvider.defaultProps.localeText,
|
|
27
|
+
children: theme.content.isMobile ? /* @__PURE__ */ jsx(MobileContainer, { children: /* @__PURE__ */ jsx(
|
|
28
|
+
StaticDateTimePicker,
|
|
29
|
+
{
|
|
30
|
+
value: dateTime,
|
|
31
|
+
onChange: (value) => setDateTime(value),
|
|
32
|
+
minutesStep: 1,
|
|
33
|
+
timeSteps: { minutes: 1 },
|
|
34
|
+
ampm: false,
|
|
35
|
+
slots: { layout: PickersLayout }
|
|
36
|
+
}
|
|
37
|
+
) }) : /* @__PURE__ */ jsxs(Container, { children: [
|
|
38
|
+
/* @__PURE__ */ jsx(
|
|
39
|
+
DateCalendar,
|
|
40
|
+
{
|
|
41
|
+
value: dateTime,
|
|
42
|
+
onChange: (newDate) => {
|
|
43
|
+
if (!newDate) return;
|
|
44
|
+
setDateTime(
|
|
45
|
+
(prev) => prev.year(newDate.year()).month(newDate.month()).date(newDate.date())
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
/* @__PURE__ */ jsx(
|
|
51
|
+
MultiSectionDigitalClock,
|
|
52
|
+
{
|
|
53
|
+
value: dateTime,
|
|
54
|
+
minutesStep: 1,
|
|
55
|
+
timeSteps: { minutes: 1 },
|
|
56
|
+
ampm: false,
|
|
57
|
+
onChange: (newTime) => {
|
|
58
|
+
if (!newTime) return;
|
|
59
|
+
setDateTime(
|
|
60
|
+
(prev) => prev.hour(newTime.hour()).minute(newTime.minute())
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
] })
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
export {
|
|
70
|
+
InputDateTimePicker as default
|
|
71
|
+
};
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
"use client";
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __export = (target, all) => {
|
|
11
|
+
for (var name in all)
|
|
12
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
13
|
+
};
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from))
|
|
17
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
28
|
+
mod
|
|
29
|
+
));
|
|
30
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
31
|
+
var styles_exports = {};
|
|
32
|
+
__export(styles_exports, {
|
|
33
|
+
Container: () => Container,
|
|
34
|
+
MobileContainer: () => MobileContainer
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(styles_exports);
|
|
37
|
+
var import_styled_components = __toESM(require("styled-components"));
|
|
38
|
+
const Container = import_styled_components.default.div`
|
|
39
|
+
display: flex;
|
|
40
|
+
background-color: ${({ theme }) => theme.primary};
|
|
41
|
+
border: 1px solid ${({ theme }) => theme.t2};
|
|
42
|
+
color: ${({ theme }) => theme.t6};
|
|
43
|
+
border-radius: 5px;
|
|
44
|
+
width: 420px;
|
|
45
|
+
|
|
46
|
+
.css-5wchs2-MuiDateCalendar-root {
|
|
47
|
+
width: 1111px !important;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.css-1egrucl-MuiList-root-MuiMultiSectionDigitalClockSection-root,
|
|
51
|
+
.css-ooqz8u-MuiList-root-MuiMultiSectionDigitalClockSection-root {
|
|
52
|
+
border-left: 2px solid ${({ theme }) => theme.t05} !important;
|
|
53
|
+
scrollbar-width: initial !important;
|
|
54
|
+
max-height: 298px !important;
|
|
55
|
+
width: 60px !important;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.css-1n1xn3x-MuiPickersSlideTransition-root-MuiDayCalendar-slideTransition {
|
|
59
|
+
min-height: 192px !important;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.css-sabdtc-MuiMultiSectionDigitalClock-root {
|
|
63
|
+
max-height: 300px !important;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.css-5wchs2-MuiDateCalendar-root {
|
|
67
|
+
max-height: 298px !important;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.css-ux17pc-MuiButtonBase-root-MuiMenuItem-root-MuiMultiSectionDigitalClockSection-item {
|
|
71
|
+
font-size: .8rem !important;
|
|
72
|
+
color: ${({ theme }) => theme.t6} !important;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.css-ux17pc-MuiButtonBase-root-MuiMenuItem-root-MuiMultiSectionDigitalClockSection-item.Mui-selected {
|
|
76
|
+
color: ${({ theme }) => theme.secondary} !important;
|
|
77
|
+
background-color: ${({ theme }) => theme.tertiary} !important;
|
|
78
|
+
border-radius: 5px !important;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.css-4k4mmf-MuiButtonBase-root-MuiPickersDay-root,
|
|
82
|
+
.css-17f9e7e-MuiTypography-root-MuiDayCalendar-weekDayLabel {
|
|
83
|
+
color: ${({ theme }) => theme.t6} !important;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.css-16hplv9-MuiButtonBase-root-MuiIconButton-root-MuiPickersCalendarHeader-switchViewButton,
|
|
87
|
+
.css-15a32k7-MuiButtonBase-root-MuiIconButton-root-MuiPickersCalendarHeader-switchViewButton,
|
|
88
|
+
.css-1bsiu4i-MuiButtonBase-root-MuiIconButton-root-MuiPickersArrowSwitcher-button,
|
|
89
|
+
.css-xp4e7m-MuiButtonBase-root-MuiIconButton-root-MuiPickersArrowSwitcher-button {
|
|
90
|
+
color: ${({ theme }) => theme.t2} !important;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.css-qct7wd-MuiButtonBase-root-MuiPickersDay-root.Mui-selected,
|
|
94
|
+
.css-4k4mmf-MuiButtonBase-root-MuiPickersDay-root.Mui-selected {
|
|
95
|
+
color: ${({ theme }) => theme.secondary} !important;
|
|
96
|
+
background-color: ${({ theme }) => theme.tertiary} !important;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.css-qct7wd-MuiButtonBase-root-MuiPickersDay-root:not(.Mui-selected) {
|
|
100
|
+
color: ${({ theme }) => theme.t6} !important;
|
|
101
|
+
border: 1px solid ${({ theme }) => theme.t2} !important;
|
|
102
|
+
}
|
|
103
|
+
`;
|
|
104
|
+
const MobileContainer = import_styled_components.default.div`
|
|
105
|
+
color: ${({ theme }) => theme.t6};
|
|
106
|
+
|
|
107
|
+
.MuiPickersToolbar-title {
|
|
108
|
+
display: none;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.css-thpu5-MuiTypography-root-MuiPickersToolbarText-root,
|
|
112
|
+
.css-6mw38q-MuiTypography-root,
|
|
113
|
+
.css-1hkhsf8-MuiTypography-root-MuiPickersToolbarText-root,
|
|
114
|
+
.css-1vx8ao-MuiTypography-root-MuiPickersToolbarText-root,
|
|
115
|
+
.css-f9hx5u-MuiTypography-root-MuiPickersToolbarText-root-MuiDateTimePickerToolbar-separator,
|
|
116
|
+
.css-17f9e7e-MuiTypography-root-MuiDayCalendar-weekDayLabel,
|
|
117
|
+
.css-4k4mmf-MuiButtonBase-root-MuiPickersDay-root {
|
|
118
|
+
color: ${({ theme }) => theme.t6} !important;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.css-14yom7c-MuiSvgIcon-root-MuiPickersCalendarHeader-switchViewIcon,
|
|
122
|
+
.css-8cn20p-MuiButtonBase-root-MuiTab-root,
|
|
123
|
+
.css-xp4e7m-MuiButtonBase-root-MuiIconButton-root-MuiPickersArrowSwitcher-button,
|
|
124
|
+
.css-1bsiu4i-MuiButtonBase-root-MuiIconButton-root-MuiPickersArrowSwitcher-button {
|
|
125
|
+
color: ${({ theme }) => theme.t2} !important;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.css-8cn20p-MuiButtonBase-root-MuiTab-root.Mui-selected,
|
|
129
|
+
.css-qct7wd-MuiButtonBase-root-MuiPickersDay-root.Mui-selected,
|
|
130
|
+
.css-ux17pc-MuiButtonBase-root-MuiMenuItem-root-MuiMultiSectionDigitalClockSection-item.Mui-selected {
|
|
131
|
+
color: ${({ theme }) => theme.secondary} !important;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.css-1qltlow-MuiTabs-indicator {
|
|
135
|
+
background-color: ${({ theme }) => theme.secondary} !important;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.css-qct7wd-MuiButtonBase-root-MuiPickersDay-root.Mui-selected,
|
|
139
|
+
.css-ux17pc-MuiButtonBase-root-MuiMenuItem-root-MuiMultiSectionDigitalClockSection-item.Mui-selected {
|
|
140
|
+
background-color: ${({ theme }) => theme.tertiary} !important;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.css-ux17pc-MuiButtonBase-root-MuiMenuItem-root-MuiMultiSectionDigitalClockSection-item.Mui-selected {
|
|
144
|
+
border-radius: 5px !important;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.css-1vx8ao-MuiTypography-root-MuiPickersToolbarText-root,
|
|
148
|
+
.css-f9hx5u-MuiTypography-root-MuiPickersToolbarText-root-MuiDateTimePickerToolbar-separator {
|
|
149
|
+
font-size: 2rem !important;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.css-1x57bai-MuiDialogActions-root-MuiPickersLayout-actionBar {
|
|
153
|
+
display: none;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.MuiMultiSectionDigitalClock-root {
|
|
157
|
+
width: 100% !important;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.css-5wchs2-MuiDateCalendar-root {
|
|
161
|
+
height: 300px !important;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.css-10qtiir-MuiPickersToolbar-content {
|
|
165
|
+
padding: .3rem .5rem 0 .5rem;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
@media (max-width: ${({ theme }) => theme.mobileMinWidth}) {
|
|
169
|
+
.css-5wchs2-MuiDateCalendar-root {
|
|
170
|
+
width: 100% !important;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
`;
|
|
174
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
175
|
+
0 && (module.exports = {
|
|
176
|
+
Container,
|
|
177
|
+
MobileContainer
|
|
178
|
+
});
|