@daryasidorovich/modsen-datepicker 1.1.0 → 1.1.2
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/constants/dateMask.d.ts +3 -3
- package/dist/hooks/useCalendar.d.ts +1 -1
- package/dist/hooks/useValidate.d.ts +3 -3
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -2,17 +2,17 @@ export declare const DATE_MASK: {
|
|
|
2
2
|
readonly mask: "dd/mm/yyyy";
|
|
3
3
|
readonly blocks: {
|
|
4
4
|
readonly dd: {
|
|
5
|
-
readonly mask:
|
|
5
|
+
readonly mask: any;
|
|
6
6
|
readonly from: 1;
|
|
7
7
|
readonly to: 31;
|
|
8
8
|
};
|
|
9
9
|
readonly mm: {
|
|
10
|
-
readonly mask:
|
|
10
|
+
readonly mask: any;
|
|
11
11
|
readonly from: 1;
|
|
12
12
|
readonly to: 12;
|
|
13
13
|
};
|
|
14
14
|
readonly yyyy: {
|
|
15
|
-
readonly mask:
|
|
15
|
+
readonly mask: any;
|
|
16
16
|
readonly from: 1900;
|
|
17
17
|
readonly to: 2100;
|
|
18
18
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CalendarProps } from '@/components/
|
|
1
|
+
import { CalendarProps } from '@/components/CalendarGrid/types';
|
|
2
2
|
import { CalendarService } from '@/services/calendarService';
|
|
3
3
|
export declare function useCalendar(props: CalendarProps): {
|
|
4
4
|
calendar: CalendarService;
|
|
@@ -4,8 +4,8 @@ export declare function useValidate(selectedDate: Date | undefined): {
|
|
|
4
4
|
handleDateValidation: (value: string, startDate?: Date) => Date | undefined;
|
|
5
5
|
handleClearInput: () => void;
|
|
6
6
|
handleDateSelect: (date?: Date) => void;
|
|
7
|
-
ref:
|
|
8
|
-
value:
|
|
9
|
-
setValue:
|
|
7
|
+
ref: any;
|
|
8
|
+
value: any;
|
|
9
|
+
setValue: any;
|
|
10
10
|
error: string;
|
|
11
11
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -30,7 +30,7 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
|
30
30
|
|
|
31
31
|
var e=[],t$2=[];function n$1(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t$2[u]={}),a=t$2[u]&&t$2[u][s]?t$2[u][s]:t$2[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
32
32
|
|
|
33
|
-
var css$e = "*,\n::before,\n::after {\n box-sizing: border-box;\n}\n\n:where(ul, ol):where([class]) {\n padding-left: 0;\n}\n\nbody,\n:where(blockquote, figure):where([class]) {\n margin: 0;\n}\n\n:where(h1, h2, h3, h4, h5, h6, p, ul, ol, dl):where([class]) {\n margin-block: 0;\n}\n\n:where(dd[class]) {\n margin-left: 0;\n}\n\n:where(fieldset[class]) {\n margin-left: 0;\n padding: 0;\n border: none;\n}\n\n:where(ul[class]) {\n list-style: none;\n}\n\n:where(address[class]) {\n font-style: normal;\n}\n\np {\n margin-block: 0;\n}\n\nimg,\nvideo {\n display: block;\n max-width: 100%;\n height: auto;\n}\n\ninput,\ntextarea,\nselect,\nbutton {\n font: inherit;\n}\n\nhtml {\n height: 100%;\n scrollbar-gutter: stable;\n}\n\nhtml,\n:has(:target) {\n scroll-behavior: smooth;\n}\n\nbody {\n min-height: 100%;\n line-height: 1.5;\n}\n\na:where([class]) {\n display: inline-flex;\n}\n\nbutton,\nlabel {\n cursor: pointer;\n}\n\n[stroke] {\n stroke: currentColor;\n}\n\nsvg * {\n transition-property: fill, stroke;\n}\n\n@media (prefers-reduced-motion: reduce) {\n *,\n ::before,\n ::after {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n scroll-behavior: auto !important;\n }\n}\nhtml.
|
|
33
|
+
var css$e = "*,\n::before,\n::after {\n box-sizing: border-box;\n}\n\n:where(ul, ol):where([class]) {\n padding-left: 0;\n}\n\nbody,\n:where(blockquote, figure):where([class]) {\n margin: 0;\n}\n\n:where(h1, h2, h3, h4, h5, h6, p, ul, ol, dl):where([class]) {\n margin-block: 0;\n}\n\n:where(dd[class]) {\n margin-left: 0;\n}\n\n:where(fieldset[class]) {\n margin-left: 0;\n padding: 0;\n border: none;\n}\n\n:where(ul[class]) {\n list-style: none;\n}\n\n:where(address[class]) {\n font-style: normal;\n}\n\np {\n margin-block: 0;\n}\n\nimg,\nvideo {\n display: block;\n max-width: 100%;\n height: auto;\n}\n\ninput,\ntextarea,\nselect,\nbutton {\n font: inherit;\n}\n\nhtml {\n height: 100%;\n scrollbar-gutter: stable;\n}\n\nhtml,\n:has(:target) {\n scroll-behavior: smooth;\n}\n\nbody {\n min-height: 100%;\n line-height: 1.5;\n}\n\na:where([class]) {\n display: inline-flex;\n}\n\nbutton,\nlabel {\n cursor: pointer;\n}\n\n[stroke] {\n stroke: currentColor;\n}\n\nsvg * {\n transition-property: fill, stroke;\n}\n\n@media (prefers-reduced-motion: reduce) {\n *,\n ::before,\n ::after {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n scroll-behavior: auto !important;\n }\n}\nhtml.is-lock {\n overflow: hidden;\n}\n\nbody {\n font-weight: 400;\n font-family: \"Open Sans\", sans-serif;\n font-size: 14px;\n}\n.theme-light body {\n color: #333333;\n}\n.theme-dark body {\n color: #ffffff;\n}\n\nh1,\nh2 {\n margin: 0;\n}\n\nh1 {\n font-size: 15px;\n font-weight: 600;\n}\n\nh2 {\n font-weight: 700;\n}\n\na,\nbutton,\nlabel,\ninput,\ntextarea,\nselect,\nsvg * {\n transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, fill 0.2s ease, opacity 0.2s ease;\n}\n\na:has(svg),\nbutton:has(svg) {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.grid {\n display: grid;\n width: 100%;\n grid-template-columns: repeat(7, 1fr);\n}";
|
|
34
34
|
n$1(css$e,{});
|
|
35
35
|
|
|
36
36
|
const FIRST_DAY_OF_WEEK = {
|
|
@@ -6574,8 +6574,8 @@ function useValidate(selectedDate) {
|
|
|
6574
6574
|
};
|
|
6575
6575
|
}
|
|
6576
6576
|
|
|
6577
|
-
var css$2 = ".
|
|
6578
|
-
var modules_efc4e723$2 = {"datepicker":"
|
|
6577
|
+
var css$2 = ".styles_module_datepicker__c99d29d4 {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 8px;\n width: fit-content;\n}\n.theme-light .styles_module_datepicker__c99d29d4 {\n background-color: #ffffff;\n}\n.theme-dark .styles_module_datepicker__c99d29d4 {\n background-color: #333333;\n}";
|
|
6578
|
+
var modules_efc4e723$2 = {"datepicker":"styles_module_datepicker__c99d29d4"};
|
|
6579
6579
|
n$1(css$2,{});
|
|
6580
6580
|
|
|
6581
6581
|
const DatePicker = ({ selectedDate, monthDate = new Date(), onChange, ...props }) => {
|
|
@@ -6605,8 +6605,8 @@ const Clear = ({ onClick }) => {
|
|
|
6605
6605
|
return (jsxRuntime.jsx("button", { className: modules_efc4e723$1.clear, type: "button", onClick: onClick, children: "Clear" }));
|
|
6606
6606
|
};
|
|
6607
6607
|
|
|
6608
|
-
var css = ".
|
|
6609
|
-
var modules_efc4e723 = {"rangePicker":"
|
|
6608
|
+
var css = ".styles_module_rangePicker__1a42aac7 {\n display: flex;\n flex-direction: column;\n padding: 8px;\n width: fit-content;\n}\n.theme-light .styles_module_rangePicker__1a42aac7 {\n background-color: #ffffff;\n}\n.theme-dark .styles_module_rangePicker__1a42aac7 {\n background-color: #333333;\n}\n\n.styles_module_calendar__1a42aac7 {\n margin-top: 15px;\n}\n\n.styles_module_inputs__1a42aac7 {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}";
|
|
6609
|
+
var modules_efc4e723 = {"rangePicker":"styles_module_rangePicker__1a42aac7","calendar":"styles_module_calendar__1a42aac7","inputs":"styles_module_inputs__1a42aac7"};
|
|
6610
6610
|
n$1(css,{});
|
|
6611
6611
|
|
|
6612
6612
|
const RangePicker = ({ rangeStart, rangeEnd, monthDate = new Date(), onChangeStart, onChangeEnd, ...props }) => {
|