@rpcbase/ui 0.161.0 → 0.162.0
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/components/DayPickerField/index.d.ts.map +1 -1
- package/dist/index10.js +1 -1
- package/dist/index11.js +97 -89
- package/dist/index11.js.map +1 -1
- package/dist/index112.js +36 -36
- package/dist/index113.js +1 -1
- package/dist/index12.js +1 -1
- package/dist/index124.js +6 -6
- package/dist/index127.js +10 -10
- package/dist/index129.js +2 -2
- package/dist/index13.js +2 -2
- package/dist/index130.js +3 -3
- package/dist/index131.js +1 -1
- package/dist/index133.js +2 -2
- package/dist/index135.js +1 -1
- package/dist/index14.js +4 -4
- package/dist/index15.js +1 -1
- package/dist/index158.js +2 -2
- package/dist/index159.js +2 -2
- package/dist/index16.js +1 -1
- package/dist/index160.js +2 -2
- package/dist/index161.js +3 -3
- package/dist/index163.js +1 -1
- package/dist/index164.js +5 -5
- package/dist/index165.js +2 -2
- package/dist/index166.js +1 -1
- package/dist/index167.js +1 -1
- package/dist/index169.js +1 -1
- package/dist/index17.js +1 -1
- package/dist/index170.js +1 -1
- package/dist/index176.js +1 -1
- package/dist/index177.js +599 -40
- package/dist/index177.js.map +1 -1
- package/dist/index178.js +41 -200
- package/dist/index178.js.map +1 -1
- package/dist/index179.js +204 -20
- package/dist/index179.js.map +1 -1
- package/dist/index18.js +236 -236
- package/dist/index18.js.map +1 -1
- package/dist/index180.js +22 -25
- package/dist/index180.js.map +1 -1
- package/dist/index181.js +23 -398
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +383 -589
- package/dist/index182.js.map +1 -1
- package/dist/index184.js +4 -4
- package/dist/index189.js +1 -1
- package/dist/index19.js +7 -7
- package/dist/index190.js +1 -1
- package/dist/index197.js +1 -1
- package/dist/index198.js +6 -6
- package/dist/index20.js +2 -2
- package/dist/index200.js +4 -4
- package/dist/index202.js +1 -1
- package/dist/index205.js +1 -1
- package/dist/index206.js +1 -1
- package/dist/index21.js +1 -1
- package/dist/index211.js +3 -16
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +57 -4
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +8 -5
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +55 -47
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +17 -64
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +16 -6
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +5 -4
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +5 -7
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +6 -17
- package/dist/index219.js.map +1 -1
- package/dist/index22.js +1 -1
- package/dist/index220.js +4 -5
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +7 -5
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +17 -13
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +5 -10
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +5 -14
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +13 -14
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +10 -5
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +14 -6
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +14 -7
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +5 -6
- package/dist/index229.js.map +1 -1
- package/dist/index23.js +1 -1
- package/dist/index230.js +6 -9
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +7 -5
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +6 -5
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +8 -8
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +5 -5
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +5 -5
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +9 -4
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +5 -11
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +5 -10
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +4 -10
- package/dist/index239.js.map +1 -1
- package/dist/index24.js +1 -1
- package/dist/index240.js +11 -11
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +10 -11
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +10 -10
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +11 -7
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +11 -6
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +10 -5
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +7 -6
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +6 -7
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +5 -6
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +6 -55
- package/dist/index249.js.map +1 -1
- package/dist/index250.js +7 -8
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +6 -19
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +53 -21
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +22 -15
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +16 -7
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +7 -10
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +9 -9
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +10 -21
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +21 -10
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +10 -9
- package/dist/index259.js.map +1 -1
- package/dist/index260.js +6 -6
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +9 -4
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +4 -5
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +5 -16
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +16 -9
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +9 -18
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +15 -12
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +12 -9
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +12 -29
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +62 -10
- package/dist/index269.js.map +1 -1
- package/dist/index27.js +3 -37
- package/dist/index27.js.map +1 -1
- package/dist/index270.js +48 -25
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +39 -5
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +98 -62
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +96 -47
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +88 -28
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +29 -100
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +12 -97
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +23 -97
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +5 -3
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +65 -22
- package/dist/index279.js.map +1 -1
- package/dist/index28.js +125 -3
- package/dist/index28.js.map +1 -1
- package/dist/index280.js +179 -27
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +47 -5
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +22 -65
- package/dist/index282.js.map +1 -1
- package/dist/index283.js +27 -179
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +5 -47
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +31 -2
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +10 -2
- package/dist/index286.js.map +1 -1
- package/dist/index287.js +46 -12
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +10 -153
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +42 -28
- package/dist/index289.js.map +1 -1
- package/dist/index29.js +47 -124
- package/dist/index29.js.map +1 -1
- package/dist/index290.js +95 -9
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +82 -43
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +104 -10
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +50 -42
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +12 -94
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +10 -85
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +28 -96
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +8 -52
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +153 -10
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +110 -31
- package/dist/index299.js.map +1 -1
- package/dist/index30.js +219 -47
- package/dist/index30.js.map +1 -1
- package/dist/index300.js +17 -8
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +13 -114
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +3 -17
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +33 -12
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +20 -3
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +9 -36
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +8 -20
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +19 -9
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +28 -8
- package/dist/index308.js.map +1 -1
- package/dist/index309.js +15 -18
- package/dist/index309.js.map +1 -1
- package/dist/index31.js +40 -216
- package/dist/index31.js.map +1 -1
- package/dist/index310.js +2 -29
- package/dist/index310.js.map +1 -1
- package/dist/index311.js +2 -17
- package/dist/index311.js.map +1 -1
- package/dist/index318.js +1 -1
- package/dist/index319.js +1 -1
- package/dist/index32.js +38 -41
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +24 -36
- package/dist/index33.js.map +1 -1
- package/dist/index331.js +2 -2
- package/dist/index334.js +1 -1
- package/dist/index335.js +2 -2
- package/dist/index337.js +1 -1
- package/dist/index338.js +1 -1
- package/dist/index339.js +1 -1
- package/dist/index34.js +38 -21
- package/dist/index34.js.map +1 -1
- package/dist/index340.js +1 -1
- package/dist/index341.js +1 -1
- package/dist/index342.js +1 -1
- package/dist/index345.js +1 -1
- package/dist/index35.js +30 -44
- package/dist/index35.js.map +1 -1
- package/dist/index359.js +11 -21
- package/dist/index359.js.map +1 -1
- package/dist/index36.js +26 -30
- package/dist/index36.js.map +1 -1
- package/dist/index360.js +26 -11
- package/dist/index360.js.map +1 -1
- package/dist/index361.js +4 -27
- package/dist/index361.js.map +1 -1
- package/dist/index362.js +22 -4
- package/dist/index362.js.map +1 -1
- package/dist/index37.js +23 -28
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +123 -17
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +230 -127
- package/dist/index39.js.map +1 -1
- package/dist/index40.js +49 -230
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +2640 -50
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +351 -2598
- package/dist/index42.js.map +1 -1
- package/dist/index43.js +214 -375
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +19 -230
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +138 -18
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +170 -125
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +64 -174
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +88 -74
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +5 -90
- package/dist/index49.js.map +1 -1
- package/dist/index5.js +1 -1
- package/dist/index50.js +843 -5
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +54 -832
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +37 -66
- package/dist/index52.js.map +1 -1
- package/dist/index55.js +1 -1
- package/dist/index56.js +1 -1
- package/dist/index57.js +2 -2
- package/dist/index59.js +1 -1
- package/dist/index64.js +2 -2
- package/dist/index65.js +1 -1
- package/dist/index66.js +1 -1
- package/dist/index68.js +1 -1
- package/dist/index70.js +5 -5
- package/dist/index71.js +1 -1
- package/dist/index72.js +1 -1
- package/dist/index76.js +1 -1
- package/dist/index78.js +3 -3
- package/dist/index79.js +53 -5
- package/dist/index79.js.map +1 -1
- package/dist/index8.js +1 -1
- package/dist/index80.js +2 -8
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +2 -6
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +5 -53
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +8 -2
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +6 -2
- package/dist/index84.js.map +1 -1
- package/dist/index9.js +1 -1
- package/package.json +1 -1
package/dist/index362.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index362.js","sources":["../../../node_modules/
|
|
1
|
+
{"version":3,"file":"index362.js","sources":["../../../node_modules/react-remove-scroll-bar/dist/es2015/utils.js"],"sourcesContent":["export var zeroGap = {\n left: 0,\n top: 0,\n right: 0,\n gap: 0,\n};\nvar parse = function (x) { return parseInt(x || '', 10) || 0; };\nvar getOffset = function (gapMode) {\n var cs = window.getComputedStyle(document.body);\n var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];\n var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];\n var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];\n return [parse(left), parse(top), parse(right)];\n};\nexport var getGapWidth = function (gapMode) {\n if (gapMode === void 0) { gapMode = 'margin'; }\n if (typeof window === 'undefined') {\n return zeroGap;\n }\n var offsets = getOffset(gapMode);\n var documentWidth = document.documentElement.clientWidth;\n var windowWidth = window.innerWidth;\n return {\n left: offsets[0],\n top: offsets[1],\n right: offsets[2],\n gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0]),\n };\n};\n"],"names":["zeroGap","parse","x","getOffset","gapMode","cs","left","top","right","getGapWidth","offsets","documentWidth","windowWidth"],"mappings":"AAAU,IAACA,IAAU;AAAA,EACjB,MAAM;AAAA,EACN,KAAK;AAAA,EACL,OAAO;AAAA,EACP,KAAK;AACT,GACIC,IAAQ,SAAUC,GAAG;AAAE,SAAO,SAASA,KAAK,IAAI,EAAE,KAAK;AAAG,GAC1DC,IAAY,SAAUC,GAAS;AAC/B,MAAIC,IAAK,OAAO,iBAAiB,SAAS,IAAI,GAC1CC,IAAOD,EAAGD,MAAY,YAAY,gBAAgB,YAAY,GAC9DG,IAAMF,EAAGD,MAAY,YAAY,eAAe,WAAW,GAC3DI,IAAQH,EAAGD,MAAY,YAAY,iBAAiB,aAAa;AACrE,SAAO,CAACH,EAAMK,CAAI,GAAGL,EAAMM,CAAG,GAAGN,EAAMO,CAAK,CAAC;AACjD,GACWC,IAAc,SAAUL,GAAS;AAExC,MADIA,MAAY,WAAUA,IAAU,WAChC,OAAO,SAAW;AAClB,WAAOJ;AAEX,MAAIU,IAAUP,EAAUC,CAAO,GAC3BO,IAAgB,SAAS,gBAAgB,aACzCC,IAAc,OAAO;AACzB,SAAO;AAAA,IACH,MAAMF,EAAQ,CAAC;AAAA,IACf,KAAKA,EAAQ,CAAC;AAAA,IACd,OAAOA,EAAQ,CAAC;AAAA,IAChB,KAAK,KAAK,IAAI,GAAGE,IAAcD,IAAgBD,EAAQ,CAAC,IAAIA,EAAQ,CAAC,CAAC;AAAA,EAC9E;AACA;","x_google_ignoreList":[0]}
|
package/dist/index37.js
CHANGED
|
@@ -1,31 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
clear() {
|
|
24
|
-
this.states.length = 0, this.currentIndex = 0;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
s.MAX_LENGTH = 100;
|
|
1
|
+
import e from "react";
|
|
2
|
+
import p from "./index38.js";
|
|
3
|
+
import "./index30.js";
|
|
4
|
+
import "./index31.js";
|
|
5
|
+
import "./index32.js";
|
|
6
|
+
import "./index33.js";
|
|
7
|
+
import "./index34.js";
|
|
8
|
+
import "./index35.js";
|
|
9
|
+
import "./index36.js";
|
|
10
|
+
const i = p((t) => {
|
|
11
|
+
let {
|
|
12
|
+
inputRef: r,
|
|
13
|
+
...o
|
|
14
|
+
} = t;
|
|
15
|
+
return e.createElement("input", {
|
|
16
|
+
...o,
|
|
17
|
+
ref: r
|
|
18
|
+
});
|
|
19
|
+
}), m = (t, r) => e.createElement(i, {
|
|
20
|
+
...t,
|
|
21
|
+
ref: r
|
|
22
|
+
}), k = e.forwardRef(m);
|
|
28
23
|
export {
|
|
29
|
-
|
|
24
|
+
k as default
|
|
30
25
|
};
|
|
31
26
|
//# sourceMappingURL=index37.js.map
|
package/dist/index37.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index37.js","sources":["../../../node_modules/imask/esm/
|
|
1
|
+
{"version":3,"file":"index37.js","sources":["../../../node_modules/react-imask/esm/input.js"],"sourcesContent":["import React from 'react';\nimport IMaskMixin from './mixin.js';\nimport 'prop-types';\nimport 'imask/esm/imask';\n\nconst IMaskInputClass = IMaskMixin(_ref => {\n let {\n inputRef,\n ...props\n } = _ref;\n return React.createElement('input', {\n ...props,\n ref: inputRef\n });\n});\nconst IMaskInputFn = (props, ref) => React.createElement(IMaskInputClass, {\n ...props,\n ref\n}) // TODO fix no idea\n;\nconst IMaskInput = React.forwardRef(IMaskInputFn);\n\nexport { IMaskInput as default };\n"],"names":["IMaskInputClass","IMaskMixin","_ref","inputRef","props","React","IMaskInputFn","ref","IMaskInput"],"mappings":";;;;;;;;;AAKA,MAAMA,IAAkBC,EAAW,CAAAC,MAAQ;AACzC,MAAI;AAAA,IACF,UAAAC;AAAA,IACA,GAAGC;AAAA,EACP,IAAMF;AACJ,SAAOG,EAAM,cAAc,SAAS;AAAA,IAClC,GAAGD;AAAA,IACH,KAAKD;AAAA,EACT,CAAG;AACH,CAAC,GACKG,IAAe,CAACF,GAAOG,MAAQF,EAAM,cAAcL,GAAiB;AAAA,EACxE,GAAGI;AAAA,EACH,KAAAG;AACF,CAAC,GAEKC,IAAaH,EAAM,WAAWC,CAAY;","x_google_ignoreList":[0]}
|
package/dist/index38.js
CHANGED
|
@@ -1,26 +1,132 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import o from "react";
|
|
2
|
+
import e from "./index170.js";
|
|
3
|
+
import "./index30.js";
|
|
4
|
+
import p from "./index156.js";
|
|
3
5
|
import "./index31.js";
|
|
4
6
|
import "./index32.js";
|
|
5
7
|
import "./index33.js";
|
|
6
8
|
import "./index34.js";
|
|
7
9
|
import "./index35.js";
|
|
8
10
|
import "./index36.js";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
11
|
+
const m = {
|
|
12
|
+
// common
|
|
13
|
+
mask: e.oneOfType([e.array, e.func, e.string, e.instanceOf(RegExp), e.oneOf([Date, Number, p.Masked]), e.instanceOf(p.Masked)]),
|
|
14
|
+
value: e.any,
|
|
15
|
+
unmask: e.oneOfType([e.bool, e.oneOf(["typed"])]),
|
|
16
|
+
prepare: e.func,
|
|
17
|
+
prepareChar: e.func,
|
|
18
|
+
validate: e.func,
|
|
19
|
+
commit: e.func,
|
|
20
|
+
overwrite: e.oneOfType([e.bool, e.oneOf(["shift"])]),
|
|
21
|
+
eager: e.oneOfType([e.bool, e.oneOf(["append", "remove"])]),
|
|
22
|
+
skipInvalid: e.bool,
|
|
23
|
+
// events
|
|
24
|
+
onAccept: e.func,
|
|
25
|
+
onComplete: e.func,
|
|
26
|
+
// pattern
|
|
27
|
+
placeholderChar: e.string,
|
|
28
|
+
displayChar: e.string,
|
|
29
|
+
lazy: e.bool,
|
|
30
|
+
definitions: e.object,
|
|
31
|
+
blocks: e.object,
|
|
32
|
+
// enum
|
|
33
|
+
enum: e.arrayOf(e.string),
|
|
34
|
+
// range
|
|
35
|
+
maxLength: e.number,
|
|
36
|
+
from: e.number,
|
|
37
|
+
to: e.number,
|
|
38
|
+
// date
|
|
39
|
+
pattern: e.string,
|
|
40
|
+
format: e.func,
|
|
41
|
+
parse: e.func,
|
|
42
|
+
autofix: e.oneOfType([e.bool, e.oneOf(["pad"])]),
|
|
43
|
+
// number
|
|
44
|
+
radix: e.string,
|
|
45
|
+
thousandsSeparator: e.string,
|
|
46
|
+
mapToRadix: e.arrayOf(e.string),
|
|
47
|
+
scale: e.number,
|
|
48
|
+
normalizeZeros: e.bool,
|
|
49
|
+
padFractionalZeros: e.bool,
|
|
50
|
+
min: e.oneOfType([e.number, e.instanceOf(Date)]),
|
|
51
|
+
max: e.oneOfType([e.number, e.instanceOf(Date)]),
|
|
52
|
+
// dynamic
|
|
53
|
+
dispatch: e.func,
|
|
54
|
+
// ref
|
|
55
|
+
inputRef: e.oneOfType([e.func, e.shape({
|
|
56
|
+
current: e.object
|
|
57
|
+
})])
|
|
58
|
+
}, u = Object.keys(m).filter((i) => i !== "value"), h = ["value", "unmask", "onAccept", "onComplete", "inputRef"], c = u.filter((i) => h.indexOf(i) < 0);
|
|
59
|
+
function T(i) {
|
|
60
|
+
var a;
|
|
61
|
+
const r = (a = class extends o.Component {
|
|
62
|
+
constructor(t) {
|
|
63
|
+
super(t), this._inputRef = this._inputRef.bind(this);
|
|
64
|
+
}
|
|
65
|
+
componentDidMount() {
|
|
66
|
+
this.props.mask && this.initMask();
|
|
67
|
+
}
|
|
68
|
+
componentDidUpdate() {
|
|
69
|
+
const t = this.props, s = this._extractMaskOptionsFromProps(t);
|
|
70
|
+
if (s.mask)
|
|
71
|
+
this.maskRef ? (this.maskRef.updateOptions(s), "value" in t && t.value !== void 0 && (this.maskValue = t.value)) : this.initMask(s);
|
|
72
|
+
else if (this.destroyMask(), "value" in t && t.value !== void 0) {
|
|
73
|
+
var n;
|
|
74
|
+
(n = this.element) != null && n.isContentEditable && this.element.tagName !== "INPUT" && this.element.tagName !== "TEXTAREA" ? this.element.textContent = t.value : this.element.value = t.value;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
componentWillUnmount() {
|
|
78
|
+
this.destroyMask();
|
|
79
|
+
}
|
|
80
|
+
_inputRef(t) {
|
|
81
|
+
this.element = t, this.props.inputRef && (Object.prototype.hasOwnProperty.call(this.props.inputRef, "current") ? this.props.inputRef.current = t : this.props.inputRef(t));
|
|
82
|
+
}
|
|
83
|
+
initMask(t) {
|
|
84
|
+
t === void 0 && (t = this._extractMaskOptionsFromProps(this.props)), this.maskRef = p(this.element, t).on("accept", this._onAccept.bind(this)).on("complete", this._onComplete.bind(this)), "value" in this.props && this.props.value !== void 0 && (this.maskValue = this.props.value);
|
|
85
|
+
}
|
|
86
|
+
destroyMask() {
|
|
87
|
+
this.maskRef && (this.maskRef.destroy(), delete this.maskRef);
|
|
88
|
+
}
|
|
89
|
+
_extractMaskOptionsFromProps(t) {
|
|
90
|
+
const {
|
|
91
|
+
...s
|
|
92
|
+
} = t;
|
|
93
|
+
return Object.keys(s).filter((n) => c.indexOf(n) < 0).forEach((n) => {
|
|
94
|
+
delete s[n];
|
|
95
|
+
}), s;
|
|
96
|
+
}
|
|
97
|
+
_extractNonMaskProps(t) {
|
|
98
|
+
const {
|
|
99
|
+
...s
|
|
100
|
+
} = t;
|
|
101
|
+
return u.forEach((n) => {
|
|
102
|
+
n !== "maxLength" && delete s[n];
|
|
103
|
+
}), "defaultValue" in s || (s.defaultValue = t.mask ? "" : s.value), delete s.value, s;
|
|
104
|
+
}
|
|
105
|
+
get maskValue() {
|
|
106
|
+
return this.maskRef ? this.props.unmask === "typed" ? this.maskRef.typedValue : this.props.unmask ? this.maskRef.unmaskedValue : this.maskRef.value : "";
|
|
107
|
+
}
|
|
108
|
+
set maskValue(t) {
|
|
109
|
+
this.maskRef && (t = t == null && this.props.unmask !== "typed" ? "" : t, this.props.unmask === "typed" ? this.maskRef.typedValue = t : this.props.unmask ? this.maskRef.unmaskedValue = t : this.maskRef.value = t);
|
|
110
|
+
}
|
|
111
|
+
_onAccept(t) {
|
|
112
|
+
this.props.onAccept && this.maskRef && this.props.onAccept(this.maskValue, this.maskRef, t);
|
|
113
|
+
}
|
|
114
|
+
_onComplete(t) {
|
|
115
|
+
this.props.onComplete && this.maskRef && this.props.onComplete(this.maskValue, this.maskRef, t);
|
|
116
|
+
}
|
|
117
|
+
render() {
|
|
118
|
+
return o.createElement(i, {
|
|
119
|
+
...this._extractNonMaskProps(this.props),
|
|
120
|
+
inputRef: this._inputRef
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}, a.displayName = void 0, a.propTypes = void 0, a), l = i.displayName || i.name || "Component";
|
|
124
|
+
return r.displayName = "IMask(" + l + ")", r.propTypes = m, o.forwardRef((f, t) => o.createElement(r, {
|
|
125
|
+
...f,
|
|
126
|
+
ref: t
|
|
127
|
+
}));
|
|
128
|
+
}
|
|
23
129
|
export {
|
|
24
|
-
|
|
130
|
+
T as default
|
|
25
131
|
};
|
|
26
132
|
//# sourceMappingURL=index38.js.map
|
package/dist/index38.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index38.js","sources":["../../../node_modules/react-imask/esm/input.js"],"sourcesContent":["import React from 'react';\nimport IMaskMixin from './mixin.js';\nimport 'prop-types';\nimport 'imask/esm/imask';\n\nconst IMaskInputClass = IMaskMixin(_ref => {\n let {\n inputRef,\n ...props\n } = _ref;\n return React.createElement('input', {\n ...props,\n ref: inputRef\n });\n});\nconst IMaskInputFn = (props, ref) => React.createElement(IMaskInputClass, {\n ...props,\n ref\n}) // TODO fix no idea\n;\nconst IMaskInput = React.forwardRef(IMaskInputFn);\n\nexport { IMaskInput as default };\n"],"names":["IMaskInputClass","IMaskMixin","_ref","inputRef","props","React","IMaskInputFn","ref","IMaskInput"],"mappings":";;;;;;;;;AAKA,MAAMA,IAAkBC,EAAW,CAAAC,MAAQ;AACzC,MAAI;AAAA,IACF,UAAAC;AAAA,IACA,GAAGC;AAAA,EACP,IAAMF;AACJ,SAAOG,EAAM,cAAc,SAAS;AAAA,IAClC,GAAGD;AAAA,IACH,KAAKD;AAAA,EACT,CAAG;AACH,CAAC,GACKG,IAAe,CAACF,GAAOG,MAAQF,EAAM,cAAcL,GAAiB;AAAA,EACxE,GAAGI;AAAA,EACH,KAAAG;AACF,CAAC,GAEKC,IAAaH,EAAM,WAAWC,CAAY;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index38.js","sources":["../../../node_modules/react-imask/esm/mixin.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport IMask from 'imask/esm/imask';\n\nconst MASK_PROPS = {\n // common\n mask: PropTypes.oneOfType([PropTypes.array, PropTypes.func, PropTypes.string, PropTypes.instanceOf(RegExp), PropTypes.oneOf([Date, Number, IMask.Masked]), PropTypes.instanceOf(IMask.Masked)]),\n value: PropTypes.any,\n unmask: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['typed'])]),\n prepare: PropTypes.func,\n prepareChar: PropTypes.func,\n validate: PropTypes.func,\n commit: PropTypes.func,\n overwrite: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['shift'])]),\n eager: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['append', 'remove'])]),\n skipInvalid: PropTypes.bool,\n // events\n onAccept: PropTypes.func,\n onComplete: PropTypes.func,\n // pattern\n placeholderChar: PropTypes.string,\n displayChar: PropTypes.string,\n lazy: PropTypes.bool,\n definitions: PropTypes.object,\n blocks: PropTypes.object,\n // enum\n enum: PropTypes.arrayOf(PropTypes.string),\n // range\n maxLength: PropTypes.number,\n from: PropTypes.number,\n to: PropTypes.number,\n // date\n pattern: PropTypes.string,\n format: PropTypes.func,\n parse: PropTypes.func,\n autofix: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['pad'])]),\n // number\n radix: PropTypes.string,\n thousandsSeparator: PropTypes.string,\n mapToRadix: PropTypes.arrayOf(PropTypes.string),\n scale: PropTypes.number,\n normalizeZeros: PropTypes.bool,\n padFractionalZeros: PropTypes.bool,\n min: PropTypes.oneOfType([PropTypes.number, PropTypes.instanceOf(Date)]),\n max: PropTypes.oneOfType([PropTypes.number, PropTypes.instanceOf(Date)]),\n // dynamic\n dispatch: PropTypes.func,\n // ref\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.object\n })])\n};\nconst MASK_PROPS_NAMES = Object.keys(MASK_PROPS).filter(p => p !== 'value');\nconst NON_MASK_OPTIONS_NAMES = ['value', 'unmask', 'onAccept', 'onComplete', 'inputRef'];\nconst MASK_OPTIONS_NAMES = MASK_PROPS_NAMES.filter(pName => NON_MASK_OPTIONS_NAMES.indexOf(pName) < 0);\nfunction IMaskMixin(ComposedComponent) {\n var _Class;\n const MaskedComponent = (_Class = class MaskedComponent extends React.Component {\n constructor(props) {\n super(props);\n this._inputRef = this._inputRef.bind(this);\n }\n componentDidMount() {\n if (!this.props.mask) return;\n this.initMask();\n }\n componentDidUpdate() {\n const props = this.props;\n const maskOptions = this._extractMaskOptionsFromProps(props);\n if (maskOptions.mask) {\n if (this.maskRef) {\n this.maskRef.updateOptions(maskOptions); // TODO fix\n if ('value' in props && props.value !== undefined) this.maskValue = props.value;\n } else {\n this.initMask(maskOptions);\n }\n } else {\n this.destroyMask();\n if ('value' in props && props.value !== undefined) {\n var _this$element;\n if ((_this$element = this.element) != null && _this$element.isContentEditable && this.element.tagName !== 'INPUT' && this.element.tagName !== 'TEXTAREA') this.element.textContent = props.value;else this.element.value = props.value;\n }\n }\n }\n componentWillUnmount() {\n this.destroyMask();\n }\n _inputRef(el) {\n this.element = el;\n if (this.props.inputRef) {\n if (Object.prototype.hasOwnProperty.call(this.props.inputRef, 'current')) this.props.inputRef.current = el;else this.props.inputRef(el);\n }\n }\n initMask(maskOptions) {\n if (maskOptions === void 0) {\n maskOptions = this._extractMaskOptionsFromProps(this.props);\n }\n this.maskRef = IMask(this.element, maskOptions).on('accept', this._onAccept.bind(this)).on('complete', this._onComplete.bind(this));\n if ('value' in this.props && this.props.value !== undefined) this.maskValue = this.props.value;\n }\n destroyMask() {\n if (this.maskRef) {\n this.maskRef.destroy();\n delete this.maskRef;\n }\n }\n _extractMaskOptionsFromProps(props) {\n const {\n ...cloneProps\n } = props;\n\n // keep only mask options\n Object.keys(cloneProps).filter(prop => MASK_OPTIONS_NAMES.indexOf(prop) < 0).forEach(nonMaskProp => {\n delete cloneProps[nonMaskProp];\n });\n return cloneProps;\n }\n _extractNonMaskProps(props) {\n const {\n ...cloneProps\n } = props;\n MASK_PROPS_NAMES.forEach(maskProp => {\n if (maskProp !== 'maxLength') delete cloneProps[maskProp];\n });\n if (!('defaultValue' in cloneProps)) cloneProps.defaultValue = props.mask ? '' : cloneProps.value;\n delete cloneProps.value;\n return cloneProps;\n }\n get maskValue() {\n if (!this.maskRef) return '';\n if (this.props.unmask === 'typed') return this.maskRef.typedValue;\n if (this.props.unmask) return this.maskRef.unmaskedValue;\n return this.maskRef.value;\n }\n set maskValue(value) {\n if (!this.maskRef) return;\n value = value == null && this.props.unmask !== 'typed' ? '' : value;\n if (this.props.unmask === 'typed') this.maskRef.typedValue = value;else if (this.props.unmask) this.maskRef.unmaskedValue = value;else this.maskRef.value = value;\n }\n _onAccept(e) {\n if (this.props.onAccept && this.maskRef) this.props.onAccept(this.maskValue, this.maskRef, e);\n }\n _onComplete(e) {\n if (this.props.onComplete && this.maskRef) this.props.onComplete(this.maskValue, this.maskRef, e);\n }\n render() {\n return React.createElement(ComposedComponent, {\n ...this._extractNonMaskProps(this.props),\n inputRef: this._inputRef\n });\n }\n }, _Class.displayName = void 0, _Class.propTypes = void 0, _Class);\n const nestedComponentName = ComposedComponent.displayName || ComposedComponent.name || 'Component';\n MaskedComponent.displayName = \"IMask(\" + nestedComponentName + \")\";\n MaskedComponent.propTypes = MASK_PROPS;\n return React.forwardRef((props, ref) => React.createElement(MaskedComponent, {\n ...props,\n ref\n }));\n}\n\nexport { IMaskMixin as default };\n"],"names":["MASK_PROPS","PropTypes","IMask","MASK_PROPS_NAMES","p","NON_MASK_OPTIONS_NAMES","MASK_OPTIONS_NAMES","pName","IMaskMixin","ComposedComponent","_Class","MaskedComponent","React","props","maskOptions","_this$element","el","cloneProps","prop","nonMaskProp","maskProp","value","e","nestedComponentName","ref"],"mappings":";;;;;;;;;;AAIA,MAAMA,IAAa;AAAA;AAAA,EAEjB,MAAMC,EAAU,UAAU,CAACA,EAAU,OAAOA,EAAU,MAAMA,EAAU,QAAQA,EAAU,WAAW,MAAM,GAAGA,EAAU,MAAM,CAAC,MAAM,QAAQC,EAAM,MAAM,CAAC,GAAGD,EAAU,WAAWC,EAAM,MAAM,CAAC,CAAC;AAAA,EAC9L,OAAOD,EAAU;AAAA,EACjB,QAAQA,EAAU,UAAU,CAACA,EAAU,MAAMA,EAAU,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;AAAA,EACxE,SAASA,EAAU;AAAA,EACnB,aAAaA,EAAU;AAAA,EACvB,UAAUA,EAAU;AAAA,EACpB,QAAQA,EAAU;AAAA,EAClB,WAAWA,EAAU,UAAU,CAACA,EAAU,MAAMA,EAAU,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;AAAA,EAC3E,OAAOA,EAAU,UAAU,CAACA,EAAU,MAAMA,EAAU,MAAM,CAAC,UAAU,QAAQ,CAAC,CAAC,CAAC;AAAA,EAClF,aAAaA,EAAU;AAAA;AAAA,EAEvB,UAAUA,EAAU;AAAA,EACpB,YAAYA,EAAU;AAAA;AAAA,EAEtB,iBAAiBA,EAAU;AAAA,EAC3B,aAAaA,EAAU;AAAA,EACvB,MAAMA,EAAU;AAAA,EAChB,aAAaA,EAAU;AAAA,EACvB,QAAQA,EAAU;AAAA;AAAA,EAElB,MAAMA,EAAU,QAAQA,EAAU,MAAM;AAAA;AAAA,EAExC,WAAWA,EAAU;AAAA,EACrB,MAAMA,EAAU;AAAA,EAChB,IAAIA,EAAU;AAAA;AAAA,EAEd,SAASA,EAAU;AAAA,EACnB,QAAQA,EAAU;AAAA,EAClB,OAAOA,EAAU;AAAA,EACjB,SAASA,EAAU,UAAU,CAACA,EAAU,MAAMA,EAA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EAAM,cAAcD,GAAiB;AAAA,IAC3E,GAAGE;AAAA,IACH,KAAAW;AAAA,EACJ,CAAG,CAAC;AACJ;","x_google_ignoreList":[0]}
|
package/dist/index39.js
CHANGED
|
@@ -1,132 +1,235 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import "./
|
|
9
|
-
import "./
|
|
10
|
-
import "./
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
1
|
+
import l, { useMemo as T, useCallback as h, useRef as Re } from "react";
|
|
2
|
+
import { DateLib as Ze } from "./index112.js";
|
|
3
|
+
import { createGetModifiers as Ie } from "./index113.js";
|
|
4
|
+
import { getClassNamesForModifiers as Ge } from "./index114.js";
|
|
5
|
+
import { getComponents as He } from "./index115.js";
|
|
6
|
+
import { getDataAttributes as _e } from "./index116.js";
|
|
7
|
+
import { getDefaultClassNames as Ue } from "./index117.js";
|
|
8
|
+
import { getFormatters as je } from "./index118.js";
|
|
9
|
+
import { getLabels as Ve } from "./index119.js";
|
|
10
|
+
import { getMonthOptions as $e } from "./index120.js";
|
|
11
|
+
import { getStyleForModifiers as qe } from "./index121.js";
|
|
12
|
+
import { getWeekdays as ze } from "./index122.js";
|
|
13
|
+
import { getYearOptions as Je } from "./index123.js";
|
|
14
|
+
import { createNoonOverrides as Qe } from "./index124.js";
|
|
15
|
+
import { UI as n, DayFlag as Xe, SelectionState as w } from "./index125.js";
|
|
16
|
+
import { useAnimation as et } from "./index126.js";
|
|
17
|
+
import { useCalendar as tt } from "./index127.js";
|
|
18
|
+
import { dayPickerContext as at } from "./index128.js";
|
|
19
|
+
import { useFocus as ot } from "./index129.js";
|
|
20
|
+
import { useSelection as nt } from "./index130.js";
|
|
21
|
+
import { convertMatchersToTimeZone as K } from "./index131.js";
|
|
22
|
+
import { rangeIncludesDate as st } from "./index132.js";
|
|
23
|
+
import { toTimeZone as k } from "./index133.js";
|
|
24
|
+
import { isDateRange as rt } from "./index134.js";
|
|
25
|
+
import { enUS as it } from "./index135.js";
|
|
26
|
+
function Yt(R) {
|
|
27
|
+
let e = R;
|
|
28
|
+
const u = e.timeZone;
|
|
29
|
+
if (u && (e = {
|
|
30
|
+
...R,
|
|
31
|
+
timeZone: u
|
|
32
|
+
}, e.today && (e.today = k(e.today, u)), e.month && (e.month = k(e.month, u)), e.defaultMonth && (e.defaultMonth = k(e.defaultMonth, u)), e.startMonth && (e.startMonth = k(e.startMonth, u)), e.endMonth && (e.endMonth = k(e.endMonth, u)), e.mode === "single" && e.selected ? e.selected = k(e.selected, u) : e.mode === "multiple" && e.selected ? e.selected = e.selected?.map((o) => k(o, u)) : e.mode === "range" && e.selected && (e.selected = {
|
|
33
|
+
from: e.selected.from ? k(e.selected.from, u) : e.selected.from,
|
|
34
|
+
to: e.selected.to ? k(e.selected.to, u) : e.selected.to
|
|
35
|
+
}), e.disabled !== void 0 && (e.disabled = K(e.disabled, u)), e.hidden !== void 0 && (e.hidden = K(e.hidden, u)), e.modifiers)) {
|
|
36
|
+
const o = {};
|
|
37
|
+
Object.keys(e.modifiers).forEach((i) => {
|
|
38
|
+
o[i] = K(e.modifiers?.[i], u);
|
|
39
|
+
}), e.modifiers = o;
|
|
40
|
+
}
|
|
41
|
+
const { components: m, formatters: v, labels: Z, dateLib: a, locale: se, classNames: d } = T(() => {
|
|
42
|
+
const o = { ...it, ...e.locale }, i = e.broadcastCalendar ? 1 : e.weekStartsOn, t = e.noonSafe && e.timeZone ? Qe(e.timeZone, {
|
|
43
|
+
weekStartsOn: i,
|
|
44
|
+
locale: o
|
|
45
|
+
}) : void 0, r = e.dateLib && t ? { ...t, ...e.dateLib } : e.dateLib ?? t, f = new Ze({
|
|
46
|
+
locale: o,
|
|
47
|
+
weekStartsOn: i,
|
|
48
|
+
firstWeekContainsDate: e.firstWeekContainsDate,
|
|
49
|
+
useAdditionalWeekYearTokens: e.useAdditionalWeekYearTokens,
|
|
50
|
+
useAdditionalDayOfYearTokens: e.useAdditionalDayOfYearTokens,
|
|
51
|
+
timeZone: e.timeZone,
|
|
52
|
+
numerals: e.numerals
|
|
53
|
+
}, r);
|
|
54
|
+
return {
|
|
55
|
+
dateLib: f,
|
|
56
|
+
components: He(e.components),
|
|
57
|
+
formatters: je(e.formatters),
|
|
58
|
+
labels: Ve(e.labels, f.options),
|
|
59
|
+
locale: o,
|
|
60
|
+
classNames: { ...Ue(), ...e.classNames }
|
|
61
|
+
};
|
|
62
|
+
}, [
|
|
63
|
+
e.locale,
|
|
64
|
+
e.broadcastCalendar,
|
|
65
|
+
e.weekStartsOn,
|
|
66
|
+
e.firstWeekContainsDate,
|
|
67
|
+
e.useAdditionalWeekYearTokens,
|
|
68
|
+
e.useAdditionalDayOfYearTokens,
|
|
69
|
+
e.timeZone,
|
|
70
|
+
e.numerals,
|
|
71
|
+
e.dateLib,
|
|
72
|
+
e.noonSafe,
|
|
73
|
+
e.components,
|
|
74
|
+
e.formatters,
|
|
75
|
+
e.labels,
|
|
76
|
+
e.classNames
|
|
77
|
+
]);
|
|
78
|
+
e.today || (e = { ...e, today: a.today() });
|
|
79
|
+
const { captionLayout: N, mode: C, navLayout: D, numberOfMonths: I = 1, onDayBlur: G, onDayClick: W, onDayFocus: H, onDayKeyDown: _, onDayMouseEnter: U, onDayMouseLeave: j, onNextClick: V, onPrevClick: $, showWeekNumber: q, styles: c } = e, { formatCaption: z, formatDay: J, formatMonthDropdown: re, formatWeekNumber: ie, formatWeekNumberHeader: de, formatWeekdayName: le, formatYearDropdown: me } = v, Q = tt(e, a), { days: ce, months: E, navStart: B, navEnd: O, previousMonth: p, nextMonth: b, goToMonth: y } = Q, S = Ie(ce, e, B, O, a), { isSelected: x, select: L, selected: g } = nt(e, a) ?? {}, { blur: X, focused: ee, isFocusTarget: ue, moveFocus: te, setFocused: M } = ot(e, Q, S, x ?? (() => !1), a), { labelDayButton: fe, labelGridcell: pe, labelGrid: be, labelMonthDropdown: he, labelNav: ae, labelPrevious: ye, labelNext: ke, labelWeekday: Ne, labelWeekNumber: ve, labelWeekNumberHeader: De, labelYearDropdown: ge } = Z, Me = T(() => ze(a, e.ISOWeek, e.broadcastCalendar, e.today), [a, e.ISOWeek, e.broadcastCalendar, e.today]), oe = C !== void 0 || W !== void 0, Y = h(() => {
|
|
80
|
+
p && (y(p), $?.(p));
|
|
81
|
+
}, [p, y, $]), P = h(() => {
|
|
82
|
+
b && (y(b), V?.(b));
|
|
83
|
+
}, [y, b, V]), we = h((o, i) => (t) => {
|
|
84
|
+
t.preventDefault(), t.stopPropagation(), M(o), !i.disabled && (L?.(o.date, i, t), W?.(o.date, i, t));
|
|
85
|
+
}, [L, W, M]), Ce = h((o, i) => (t) => {
|
|
86
|
+
M(o), H?.(o.date, i, t);
|
|
87
|
+
}, [H, M]), We = h((o, i) => (t) => {
|
|
88
|
+
X(), G?.(o.date, i, t);
|
|
89
|
+
}, [X, G]), Ee = h((o, i) => (t) => {
|
|
90
|
+
const r = {
|
|
91
|
+
ArrowLeft: [
|
|
92
|
+
t.shiftKey ? "month" : "day",
|
|
93
|
+
e.dir === "rtl" ? "after" : "before"
|
|
94
|
+
],
|
|
95
|
+
ArrowRight: [
|
|
96
|
+
t.shiftKey ? "month" : "day",
|
|
97
|
+
e.dir === "rtl" ? "before" : "after"
|
|
98
|
+
],
|
|
99
|
+
ArrowDown: [t.shiftKey ? "year" : "week", "after"],
|
|
100
|
+
ArrowUp: [t.shiftKey ? "year" : "week", "before"],
|
|
101
|
+
PageUp: [t.shiftKey ? "year" : "month", "before"],
|
|
102
|
+
PageDown: [t.shiftKey ? "year" : "month", "after"],
|
|
103
|
+
Home: ["startOfWeek", "before"],
|
|
104
|
+
End: ["endOfWeek", "after"]
|
|
105
|
+
};
|
|
106
|
+
if (r[t.key]) {
|
|
107
|
+
t.preventDefault(), t.stopPropagation();
|
|
108
|
+
const [f, s] = r[t.key];
|
|
109
|
+
te(f, s);
|
|
64
110
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
111
|
+
_?.(o.date, i, t);
|
|
112
|
+
}, [te, _, e.dir]), Be = h((o, i) => (t) => {
|
|
113
|
+
U?.(o.date, i, t);
|
|
114
|
+
}, [U]), Oe = h((o, i) => (t) => {
|
|
115
|
+
j?.(o.date, i, t);
|
|
116
|
+
}, [j]), Se = h((o) => (i) => {
|
|
117
|
+
const t = Number(i.target.value), r = a.setMonth(a.startOfMonth(o), t);
|
|
118
|
+
y(r);
|
|
119
|
+
}, [a, y]), xe = h((o) => (i) => {
|
|
120
|
+
const t = Number(i.target.value), r = a.setYear(a.startOfMonth(o), t);
|
|
121
|
+
y(r);
|
|
122
|
+
}, [a, y]), { className: Le, style: Ye } = T(() => ({
|
|
123
|
+
className: [d[n.Root], e.className].filter(Boolean).join(" "),
|
|
124
|
+
style: { ...c?.[n.Root], ...e.style }
|
|
125
|
+
}), [d, e.className, e.style, c]), Pe = _e(e), ne = Re(null);
|
|
126
|
+
et(ne, !!e.animate, {
|
|
127
|
+
classNames: d,
|
|
128
|
+
months: E,
|
|
129
|
+
focused: ee,
|
|
130
|
+
dateLib: a
|
|
131
|
+
});
|
|
132
|
+
const Fe = {
|
|
133
|
+
dayPickerProps: e,
|
|
134
|
+
selected: g,
|
|
135
|
+
select: L,
|
|
136
|
+
isSelected: x,
|
|
137
|
+
months: E,
|
|
138
|
+
nextMonth: b,
|
|
139
|
+
previousMonth: p,
|
|
140
|
+
goToMonth: y,
|
|
141
|
+
getModifiers: S,
|
|
142
|
+
components: m,
|
|
143
|
+
classNames: d,
|
|
144
|
+
styles: c,
|
|
145
|
+
labels: Z,
|
|
146
|
+
formatters: v
|
|
147
|
+
};
|
|
148
|
+
return l.createElement(
|
|
149
|
+
at.Provider,
|
|
150
|
+
{ value: Fe },
|
|
151
|
+
l.createElement(
|
|
152
|
+
m.Root,
|
|
153
|
+
{ rootRef: e.animate ? ne : void 0, className: Le, style: Ye, dir: e.dir, id: e.id, lang: e.lang, nonce: e.nonce, title: e.title, role: e.role, "aria-label": e["aria-label"], "aria-labelledby": e["aria-labelledby"], ...Pe },
|
|
154
|
+
l.createElement(
|
|
155
|
+
m.Months,
|
|
156
|
+
{ className: d[n.Months], style: c?.[n.Months] },
|
|
157
|
+
!e.hideNavigation && !D && l.createElement(m.Nav, { "data-animated-nav": e.animate ? "true" : void 0, className: d[n.Nav], style: c?.[n.Nav], "aria-label": ae(), onPreviousClick: Y, onNextClick: P, previousMonth: p, nextMonth: b }),
|
|
158
|
+
E.map((o, i) => l.createElement(
|
|
159
|
+
m.Month,
|
|
160
|
+
{
|
|
161
|
+
"data-animated-month": e.animate ? "true" : void 0,
|
|
162
|
+
className: d[n.Month],
|
|
163
|
+
style: c?.[n.Month],
|
|
164
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: breaks animation
|
|
165
|
+
key: i,
|
|
166
|
+
displayIndex: i,
|
|
167
|
+
calendarMonth: o
|
|
168
|
+
},
|
|
169
|
+
D === "around" && !e.hideNavigation && i === 0 && l.createElement(
|
|
170
|
+
m.PreviousMonthButton,
|
|
171
|
+
{ type: "button", className: d[n.PreviousMonthButton], tabIndex: p ? void 0 : -1, "aria-disabled": p ? void 0 : !0, "aria-label": ye(p), onClick: Y, "data-animated-button": e.animate ? "true" : void 0 },
|
|
172
|
+
l.createElement(m.Chevron, { disabled: p ? void 0 : !0, className: d[n.Chevron], orientation: e.dir === "rtl" ? "right" : "left" })
|
|
173
|
+
),
|
|
174
|
+
l.createElement(m.MonthCaption, { "data-animated-caption": e.animate ? "true" : void 0, className: d[n.MonthCaption], style: c?.[n.MonthCaption], calendarMonth: o, displayIndex: i }, N?.startsWith("dropdown") ? l.createElement(
|
|
175
|
+
m.DropdownNav,
|
|
176
|
+
{ className: d[n.Dropdowns], style: c?.[n.Dropdowns] },
|
|
177
|
+
(() => {
|
|
178
|
+
const t = N === "dropdown" || N === "dropdown-months" ? l.createElement(m.MonthsDropdown, { key: "month", className: d[n.MonthsDropdown], "aria-label": he(), classNames: d, components: m, disabled: !!e.disableNavigation, onChange: Se(o.date), options: $e(o.date, B, O, v, a), style: c?.[n.Dropdown], value: a.getMonth(o.date) }) : l.createElement("span", { key: "month" }, re(o.date, a)), r = N === "dropdown" || N === "dropdown-years" ? l.createElement(m.YearsDropdown, { key: "year", className: d[n.YearsDropdown], "aria-label": ge(a.options), classNames: d, components: m, disabled: !!e.disableNavigation, onChange: xe(o.date), options: Je(B, O, v, a, !!e.reverseYears), style: c?.[n.Dropdown], value: a.getYear(o.date) }) : l.createElement("span", { key: "year" }, me(o.date, a));
|
|
179
|
+
return a.getMonthYearOrder() === "year-first" ? [r, t] : [t, r];
|
|
180
|
+
})(),
|
|
181
|
+
l.createElement("span", { role: "status", "aria-live": "polite", style: {
|
|
182
|
+
border: 0,
|
|
183
|
+
clip: "rect(0 0 0 0)",
|
|
184
|
+
height: "1px",
|
|
185
|
+
margin: "-1px",
|
|
186
|
+
overflow: "hidden",
|
|
187
|
+
padding: 0,
|
|
188
|
+
position: "absolute",
|
|
189
|
+
width: "1px",
|
|
190
|
+
whiteSpace: "nowrap",
|
|
191
|
+
wordWrap: "normal"
|
|
192
|
+
} }, z(o.date, a.options, a))
|
|
193
|
+
) : l.createElement(m.CaptionLabel, { className: d[n.CaptionLabel], role: "status", "aria-live": "polite" }, z(o.date, a.options, a))),
|
|
194
|
+
D === "around" && !e.hideNavigation && i === I - 1 && l.createElement(
|
|
195
|
+
m.NextMonthButton,
|
|
196
|
+
{ type: "button", className: d[n.NextMonthButton], tabIndex: b ? void 0 : -1, "aria-disabled": b ? void 0 : !0, "aria-label": ke(b), onClick: P, "data-animated-button": e.animate ? "true" : void 0 },
|
|
197
|
+
l.createElement(m.Chevron, { disabled: b ? void 0 : !0, className: d[n.Chevron], orientation: e.dir === "rtl" ? "left" : "right" })
|
|
198
|
+
),
|
|
199
|
+
i === I - 1 && D === "after" && !e.hideNavigation && l.createElement(m.Nav, { "data-animated-nav": e.animate ? "true" : void 0, className: d[n.Nav], style: c?.[n.Nav], "aria-label": ae(), onPreviousClick: Y, onNextClick: P, previousMonth: p, nextMonth: b }),
|
|
200
|
+
l.createElement(
|
|
201
|
+
m.MonthGrid,
|
|
202
|
+
{ role: "grid", "aria-multiselectable": C === "multiple" || C === "range", "aria-label": be(o.date, a.options, a) || void 0, className: d[n.MonthGrid], style: c?.[n.MonthGrid] },
|
|
203
|
+
!e.hideWeekdays && l.createElement(
|
|
204
|
+
m.Weekdays,
|
|
205
|
+
{ "data-animated-weekdays": e.animate ? "true" : void 0, className: d[n.Weekdays], style: c?.[n.Weekdays] },
|
|
206
|
+
q && l.createElement(m.WeekNumberHeader, { "aria-label": De(a.options), className: d[n.WeekNumberHeader], style: c?.[n.WeekNumberHeader], scope: "col" }, de()),
|
|
207
|
+
Me.map((t) => l.createElement(m.Weekday, { "aria-label": Ne(t, a.options, a), className: d[n.Weekday], key: String(t), style: c?.[n.Weekday], scope: "col" }, le(t, a.options, a)))
|
|
208
|
+
),
|
|
209
|
+
l.createElement(m.Weeks, { "data-animated-weeks": e.animate ? "true" : void 0, className: d[n.Weeks], style: c?.[n.Weeks] }, o.weeks.map((t) => l.createElement(
|
|
210
|
+
m.Week,
|
|
211
|
+
{ className: d[n.Week], key: t.weekNumber, style: c?.[n.Week], week: t },
|
|
212
|
+
q && l.createElement(m.WeekNumber, { week: t, style: c?.[n.WeekNumber], "aria-label": ve(t.weekNumber, {
|
|
213
|
+
locale: se
|
|
214
|
+
}), className: d[n.WeekNumber], scope: "row", role: "rowheader" }, ie(t.weekNumber, a)),
|
|
215
|
+
t.days.map((r) => {
|
|
216
|
+
const { date: f } = r, s = S(r);
|
|
217
|
+
if (s[Xe.focused] = !s.hidden && !!ee?.isEqualTo(r), s[w.selected] = x?.(f) || s.selected, rt(g)) {
|
|
218
|
+
const { from: F, to: A } = g;
|
|
219
|
+
s[w.range_start] = !!(F && A && a.isSameDay(f, F)), s[w.range_end] = !!(F && A && a.isSameDay(f, A)), s[w.range_middle] = st(g, f, !0, a);
|
|
220
|
+
}
|
|
221
|
+
const Ae = qe(s, c, e.modifiersStyles), Te = Ge(s, d, e.modifiersClassNames), Ke = !oe && !s.hidden ? pe(f, s, a.options, a) : void 0;
|
|
222
|
+
return l.createElement(m.Day, { key: `${r.isoDate}_${r.displayMonthId}`, day: r, modifiers: s, className: Te.join(" "), style: Ae, role: "gridcell", "aria-selected": s.selected || void 0, "aria-label": Ke, "data-day": r.isoDate, "data-month": r.outside ? r.dateMonthId : void 0, "data-selected": s.selected || void 0, "data-disabled": s.disabled || void 0, "data-hidden": s.hidden || void 0, "data-outside": r.outside || void 0, "data-focused": s.focused || void 0, "data-today": s.today || void 0 }, !s.hidden && oe ? l.createElement(m.DayButton, { className: d[n.DayButton], style: c?.[n.DayButton], type: "button", day: r, modifiers: s, disabled: !s.focused && s.disabled || void 0, "aria-disabled": s.focused && s.disabled || void 0, tabIndex: ue(r) ? 0 : -1, "aria-label": fe(f, s, a.options, a), onClick: we(r, s), onBlur: We(r, s), onFocus: Ce(r, s), onKeyDown: Ee(r, s), onMouseEnter: Be(r, s), onMouseLeave: Oe(r, s) }, J(f, a.options, a)) : !s.hidden && J(r.date, a.options, a));
|
|
223
|
+
})
|
|
224
|
+
)))
|
|
225
|
+
)
|
|
226
|
+
))
|
|
227
|
+
),
|
|
228
|
+
e.footer && l.createElement(m.Footer, { className: d[n.Footer], style: c?.[n.Footer], role: "status", "aria-live": "polite" }, e.footer)
|
|
229
|
+
)
|
|
230
|
+
);
|
|
128
231
|
}
|
|
129
232
|
export {
|
|
130
|
-
|
|
233
|
+
Yt as DayPicker
|
|
131
234
|
};
|
|
132
235
|
//# sourceMappingURL=index39.js.map
|