@easypost/easy-ui 1.0.0-alpha.117 → 1.0.0-alpha.119
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/CHANGELOG.md +12 -0
- package/Calendar/CalendarCell.d.ts.map +1 -1
- package/Calendar/index.js +1 -1
- package/Calendar/index.mjs +1 -1
- package/DatePicker/index.js +3 -3
- package/DatePicker/index.mjs +3 -3
- package/DateRangePicker/index.js +3 -3
- package/DateRangePicker/index.mjs +3 -3
- package/Drawer/index.js +1 -1
- package/Drawer/index.mjs +1 -1
- package/Notification/index.js +1 -1
- package/Notification/index.mjs +1 -1
- package/Provider/index.js +1 -1
- package/Provider/index.mjs +1 -1
- package/RangeCalendar/index.js +1 -1
- package/RangeCalendar/index.mjs +1 -1
- package/Tooltip/Tooltip.test.d.ts.map +1 -1
- package/__chunks__/{CSSTransition-BXyX0mUc.js → CSSTransition-C23znX_H.js} +3 -5
- package/__chunks__/{CSSTransition-C4FQrt4m.mjs → CSSTransition-DZuEb-M0.mjs} +3 -5
- package/__chunks__/{Calendar-DLzAtdfg.mjs → Calendar-BEjAu6AJ.mjs} +1 -1
- package/__chunks__/{Calendar-C9zdRov0.js → Calendar-QlM--CET.js} +1 -1
- package/__chunks__/{CalendarBase-DJ38_qK6.mjs → CalendarBase-BuIkpPIv.mjs} +5 -14
- package/__chunks__/{CalendarBase-M-f289w8.js → CalendarBase-CSr5E__l.js} +5 -14
- package/__chunks__/{DatePickerBase-BQc8LKWg.mjs → DatePickerBase-BQA4SEJK.mjs} +1 -1
- package/__chunks__/{DatePickerBase-BYYfRTEY.js → DatePickerBase-Cas79CEI.js} +1 -1
- package/__chunks__/{Notification-DDQHWloB.js → Notification-CFtJx7Uz.js} +1 -1
- package/__chunks__/{Notification-DnNx0rb6.mjs → Notification-YATlp3lK.mjs} +1 -1
- package/__chunks__/{RangeCalendar-BdTjX8NT.mjs → RangeCalendar-DVnJU360.mjs} +1 -1
- package/__chunks__/{RangeCalendar-Dz6LyRYS.js → RangeCalendar-Ph-WM1Bb.js} +1 -1
- package/__chunks__/config-ChibgUKd.js +5 -0
- package/__chunks__/config-DeltQABu.mjs +6 -0
- package/package.json +1 -1
- package/utilities/test.d.ts +4 -5
- package/utilities/test.d.ts.map +1 -1
- package/utilities/test.js +163 -0
- package/utilities/test.mjs +163 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @easypost/easy-ui
|
|
2
2
|
|
|
3
|
+
## 1.0.0-alpha.119
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1774142: fix: expose test utilities as published entry point
|
|
8
|
+
|
|
9
|
+
## 1.0.0-alpha.118
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 69d990f: Fixes CalendarCell date range selection
|
|
14
|
+
|
|
3
15
|
## 1.0.0-alpha.117
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarCell.d.ts","sourceRoot":"","sources":["../../src/Calendar/CalendarCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAE,YAAY,EAA2B,MAAM,yBAAyB,CAAC;AAMhF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,aAAa,GAAG,kBAAkB,CAAC;IAC1C;;OAEG;IACH,IAAI,EAAE,YAAY,CAAC;CACpB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"CalendarCell.d.ts","sourceRoot":"","sources":["../../src/Calendar/CalendarCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAE,YAAY,EAA2B,MAAM,yBAAyB,CAAC;AAMhF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,aAAa,GAAG,kBAAkB,CAAC;IAC1C;;OAEG;IACH,IAAI,EAAE,YAAY,CAAC;CACpB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,iBAAiB,qBAmF9D"}
|
package/Calendar/index.js
CHANGED
package/Calendar/index.mjs
CHANGED
package/DatePicker/index.js
CHANGED
|
@@ -21,9 +21,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
21
21
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
22
22
|
const jsxRuntime = require("react/jsx-runtime");
|
|
23
23
|
const React = require("react");
|
|
24
|
-
const DatePickerBase = require("../__chunks__/DatePickerBase-
|
|
25
|
-
const Calendar = require("../__chunks__/Calendar-
|
|
26
|
-
const CalendarBase = require("../__chunks__/CalendarBase-
|
|
24
|
+
const DatePickerBase = require("../__chunks__/DatePickerBase-Cas79CEI.js");
|
|
25
|
+
const Calendar = require("../__chunks__/Calendar-QlM--CET.js");
|
|
26
|
+
const CalendarBase = require("../__chunks__/CalendarBase-CSr5E__l.js");
|
|
27
27
|
const useFormValidation = require("../__chunks__/useFormValidation-joghLMcB.js");
|
|
28
28
|
const Overlay = require("../__chunks__/Overlay-BNP_t3v4.js");
|
|
29
29
|
const useControlledState = require("../__chunks__/useControlledState-CcM4H_K0.js");
|
package/DatePicker/index.mjs
CHANGED
|
@@ -19,9 +19,9 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { jsx } from "react/jsx-runtime";
|
|
21
21
|
import React__default, { useState, useMemo, useRef } from "react";
|
|
22
|
-
import { $ as $35a22f14a1f04b11$export$2440da353cedad43, h as $35a22f14a1f04b11$export$f18627323ab57ac0, b as $35a22f14a1f04b11$export$7e319ea407e63bc0, c as $35a22f14a1f04b11$export$c5221a78ef73c5e9, d as $3dfb0f96be0d6a08$export$4a931266a3838b86, f as $16f0b7bb276bc17e$export$300019f83c56d282, e as $dfb4eba373ed9493$exports, D as DatePickerBase } from "../__chunks__/DatePickerBase-
|
|
23
|
-
import { C as Calendar } from "../__chunks__/Calendar-
|
|
24
|
-
import { m as $fb18d541ea1ad717$export$ad991b66133851cf, n as $11d87f3f76e88657$export$b21e0b124e224484, d as $11d87f3f76e88657$export$93522d1a439f3617 } from "../__chunks__/CalendarBase-
|
|
22
|
+
import { $ as $35a22f14a1f04b11$export$2440da353cedad43, h as $35a22f14a1f04b11$export$f18627323ab57ac0, b as $35a22f14a1f04b11$export$7e319ea407e63bc0, c as $35a22f14a1f04b11$export$c5221a78ef73c5e9, d as $3dfb0f96be0d6a08$export$4a931266a3838b86, f as $16f0b7bb276bc17e$export$300019f83c56d282, e as $dfb4eba373ed9493$exports, D as DatePickerBase } from "../__chunks__/DatePickerBase-BQA4SEJK.mjs";
|
|
23
|
+
import { C as Calendar } from "../__chunks__/Calendar-BEjAu6AJ.mjs";
|
|
24
|
+
import { m as $fb18d541ea1ad717$export$ad991b66133851cf, n as $11d87f3f76e88657$export$b21e0b124e224484, d as $11d87f3f76e88657$export$93522d1a439f3617 } from "../__chunks__/CalendarBase-BuIkpPIv.mjs";
|
|
25
25
|
import { $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, c as $e5be200c675c3b3a$export$a763b9476acd3eb } from "../__chunks__/useFormValidation-Bdyc51B-.mjs";
|
|
26
26
|
import { a as $fc909762b330b746$export$61c6a8c84e605fb6 } from "../__chunks__/Overlay-Dkjxuk6V.mjs";
|
|
27
27
|
import { $ as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "../__chunks__/useControlledState-BPR3PrW4.mjs";
|
package/DateRangePicker/index.js
CHANGED
|
@@ -21,9 +21,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
21
21
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
22
22
|
const jsxRuntime = require("react/jsx-runtime");
|
|
23
23
|
const React = require("react");
|
|
24
|
-
const RangeCalendar = require("../__chunks__/RangeCalendar-
|
|
25
|
-
const DatePickerBase = require("../__chunks__/DatePickerBase-
|
|
26
|
-
const CalendarBase = require("../__chunks__/CalendarBase-
|
|
24
|
+
const RangeCalendar = require("../__chunks__/RangeCalendar-Ph-WM1Bb.js");
|
|
25
|
+
const DatePickerBase = require("../__chunks__/DatePickerBase-Cas79CEI.js");
|
|
26
|
+
const CalendarBase = require("../__chunks__/CalendarBase-CSr5E__l.js");
|
|
27
27
|
const useFormValidation = require("../__chunks__/useFormValidation-joghLMcB.js");
|
|
28
28
|
const Overlay = require("../__chunks__/Overlay-BNP_t3v4.js");
|
|
29
29
|
const useControlledState = require("../__chunks__/useControlledState-CcM4H_K0.js");
|
|
@@ -19,9 +19,9 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { jsx } from "react/jsx-runtime";
|
|
21
21
|
import React__default, { useState, useMemo, useRef } from "react";
|
|
22
|
-
import { R as RangeCalendar } from "../__chunks__/RangeCalendar-
|
|
23
|
-
import { $ as $35a22f14a1f04b11$export$2440da353cedad43, a as $35a22f14a1f04b11$export$80ff8fc0ae339c13, b as $35a22f14a1f04b11$export$7e319ea407e63bc0, c as $35a22f14a1f04b11$export$c5221a78ef73c5e9, d as $3dfb0f96be0d6a08$export$4a931266a3838b86, e as $dfb4eba373ed9493$exports, f as $16f0b7bb276bc17e$export$300019f83c56d282, g as $16f0b7bb276bc17e$export$7b3062cd49e80452, D as DatePickerBase } from "../__chunks__/DatePickerBase-
|
|
24
|
-
import { m as $fb18d541ea1ad717$export$ad991b66133851cf, n as $11d87f3f76e88657$export$b21e0b124e224484, d as $11d87f3f76e88657$export$93522d1a439f3617 } from "../__chunks__/CalendarBase-
|
|
22
|
+
import { R as RangeCalendar } from "../__chunks__/RangeCalendar-DVnJU360.mjs";
|
|
23
|
+
import { $ as $35a22f14a1f04b11$export$2440da353cedad43, a as $35a22f14a1f04b11$export$80ff8fc0ae339c13, b as $35a22f14a1f04b11$export$7e319ea407e63bc0, c as $35a22f14a1f04b11$export$c5221a78ef73c5e9, d as $3dfb0f96be0d6a08$export$4a931266a3838b86, e as $dfb4eba373ed9493$exports, f as $16f0b7bb276bc17e$export$300019f83c56d282, g as $16f0b7bb276bc17e$export$7b3062cd49e80452, D as DatePickerBase } from "../__chunks__/DatePickerBase-BQA4SEJK.mjs";
|
|
24
|
+
import { m as $fb18d541ea1ad717$export$ad991b66133851cf, n as $11d87f3f76e88657$export$b21e0b124e224484, d as $11d87f3f76e88657$export$93522d1a439f3617 } from "../__chunks__/CalendarBase-BuIkpPIv.mjs";
|
|
25
25
|
import { $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, b as $e5be200c675c3b3a$export$dad6ae84456c676a, c as $e5be200c675c3b3a$export$a763b9476acd3eb, d as $e5be200c675c3b3a$export$75ee7c75d68f5b0e } from "../__chunks__/useFormValidation-Bdyc51B-.mjs";
|
|
26
26
|
import { a as $fc909762b330b746$export$61c6a8c84e605fb6 } from "../__chunks__/Overlay-Dkjxuk6V.mjs";
|
|
27
27
|
import { $ as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "../__chunks__/useControlledState-BPR3PrW4.mjs";
|
package/Drawer/index.js
CHANGED
|
@@ -39,7 +39,7 @@ const Icon = require("../__chunks__/Icon-BRlbo3RF.js");
|
|
|
39
39
|
const Text = require("../__chunks__/Text-DkzMEqky.js");
|
|
40
40
|
const useModalOverlay = require("../__chunks__/useModalOverlay-C4Gci3MA.js");
|
|
41
41
|
const Overlay = require("../__chunks__/Overlay-BNP_t3v4.js");
|
|
42
|
-
const CSSTransition = require("../__chunks__/CSSTransition-
|
|
42
|
+
const CSSTransition = require("../__chunks__/CSSTransition-C23znX_H.js");
|
|
43
43
|
const useOverlayTrigger = require("../__chunks__/useOverlayTrigger-DP9RbCAF.js");
|
|
44
44
|
const useDialog = require("../__chunks__/useDialog-uxNR0maK.js");
|
|
45
45
|
function _interopNamespaceDefault(e) {
|
package/Drawer/index.mjs
CHANGED
|
@@ -38,7 +38,7 @@ import { I as Icon } from "../__chunks__/Icon-BIpaQJ_I.mjs";
|
|
|
38
38
|
import { T as Text } from "../__chunks__/Text-D6oT5WJQ.mjs";
|
|
39
39
|
import { $ as $8ac8429251c45e4b$export$dbc0f175b25fb0fb } from "../__chunks__/useModalOverlay-BmYXH7rq.mjs";
|
|
40
40
|
import { d as $337b884510726a0d$export$c6fdb837b070b4ff, a as $fc909762b330b746$export$61c6a8c84e605fb6 } from "../__chunks__/Overlay-Dkjxuk6V.mjs";
|
|
41
|
-
import { C as CSSTransition } from "../__chunks__/CSSTransition-
|
|
41
|
+
import { C as CSSTransition } from "../__chunks__/CSSTransition-DZuEb-M0.mjs";
|
|
42
42
|
import { $ as $628037886ba31236$export$f9d5c8beee7d008d } from "../__chunks__/useOverlayTrigger-CIVwezu3.mjs";
|
|
43
43
|
import { $ as $40df3f8667284809$export$d55e7ee900f34e93 } from "../__chunks__/useDialog-nKMoC_Cs.mjs";
|
|
44
44
|
const underlayBg = "_underlayBg_pn8iw_4";
|
package/Notification/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const Notification = require("../__chunks__/Notification-
|
|
3
|
+
const Notification = require("../__chunks__/Notification-CFtJx7Uz.js");
|
|
4
4
|
exports.Notification = Notification.Notification;
|
|
5
5
|
exports.NotificationContext = Notification.NotificationContext;
|
|
6
6
|
exports.NotificationProvider = Notification.NotificationProvider;
|
package/Notification/index.mjs
CHANGED
package/Provider/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const useFocusVisible = require("../__chunks__/useFocusVisible-BNcpO5Sv.js");
|
|
5
|
-
const Notification = require("../__chunks__/Notification-
|
|
5
|
+
const Notification = require("../__chunks__/Notification-CFtJx7Uz.js");
|
|
6
6
|
const Theme = require("../__chunks__/Theme-C2nSZUpG.js");
|
|
7
7
|
function Provider({ children, theme, colorScheme, notificationPlacement, navigate, useHref }) {
|
|
8
8
|
return jsxRuntime.jsx(EasyUIRouterProvider, {
|
package/Provider/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { o as $ea8dcbcb9ea1b556$export$323e4fc2fa4753fb } from "../__chunks__/useFocusVisible-DDvp2PwR.mjs";
|
|
3
|
-
import { b as NotificationProvider } from "../__chunks__/Notification-
|
|
3
|
+
import { b as NotificationProvider } from "../__chunks__/Notification-YATlp3lK.mjs";
|
|
4
4
|
import { T as ThemeProvider } from "../__chunks__/Theme-M__gFMM3.mjs";
|
|
5
5
|
function Provider({ children, theme, colorScheme, notificationPlacement, navigate, useHref }) {
|
|
6
6
|
return jsx(EasyUIRouterProvider, {
|
package/RangeCalendar/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const RangeCalendar = require("../__chunks__/RangeCalendar-
|
|
3
|
+
const RangeCalendar = require("../__chunks__/RangeCalendar-Ph-WM1Bb.js");
|
|
4
4
|
exports.RangeCalendar = RangeCalendar.RangeCalendar;
|
package/RangeCalendar/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.test.d.ts","sourceRoot":"","sources":["../../src/Tooltip/Tooltip.test.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,oDAAoD,CAAC;
|
|
1
|
+
{"version":3,"file":"Tooltip.test.d.ts","sourceRoot":"","sources":["../../src/Tooltip/Tooltip.test.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,oDAAoD,CAAC;AA6F/E,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,SAAS,EACf,EAAE,EAAE,WAAW,EACf,EAAE,SAAgB,EAAE;;CAAK,iBAS1B"}
|
|
@@ -3,6 +3,7 @@ const objectWithoutPropertiesLoose = require("./objectWithoutPropertiesLoose-C4M
|
|
|
3
3
|
const _commonjsHelpers = require("./_commonjsHelpers-Bc2YnDe1.js");
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const ReactDOM = require("react-dom");
|
|
6
|
+
const config = require("./config-ChibgUKd.js");
|
|
6
7
|
function _setPrototypeOf(t, e) {
|
|
7
8
|
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e2) {
|
|
8
9
|
return t2.__proto__ = e2, t2;
|
|
@@ -977,9 +978,6 @@ function removeClass$1(element, className) {
|
|
|
977
978
|
element.setAttribute("class", replaceClassName(element.className && element.className.baseVal || "", className));
|
|
978
979
|
}
|
|
979
980
|
}
|
|
980
|
-
const config = {
|
|
981
|
-
disabled: false
|
|
982
|
-
};
|
|
983
981
|
var timeoutsShape = process.env.NODE_ENV !== "production" ? PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
984
982
|
enter: PropTypes.number,
|
|
985
983
|
exit: PropTypes.number,
|
|
@@ -1110,7 +1108,7 @@ var Transition = /* @__PURE__ */ function(_React$Component) {
|
|
|
1110
1108
|
var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing], maybeNode = _ref2[0], maybeAppearing = _ref2[1];
|
|
1111
1109
|
var timeouts = this.getTimeouts();
|
|
1112
1110
|
var enterTimeout = appearing ? timeouts.appear : timeouts.enter;
|
|
1113
|
-
if (!mounting && !enter || config.disabled) {
|
|
1111
|
+
if (!mounting && !enter || config.reactTransitionGroupConfig.disabled) {
|
|
1114
1112
|
this.safeSetState({
|
|
1115
1113
|
status: ENTERED
|
|
1116
1114
|
}, function() {
|
|
@@ -1137,7 +1135,7 @@ var Transition = /* @__PURE__ */ function(_React$Component) {
|
|
|
1137
1135
|
var exit = this.props.exit;
|
|
1138
1136
|
var timeouts = this.getTimeouts();
|
|
1139
1137
|
var maybeNode = this.props.nodeRef ? void 0 : ReactDOM.findDOMNode(this);
|
|
1140
|
-
if (!exit || config.disabled) {
|
|
1138
|
+
if (!exit || config.reactTransitionGroupConfig.disabled) {
|
|
1141
1139
|
this.safeSetState({
|
|
1142
1140
|
status: EXITED
|
|
1143
1141
|
}, function() {
|
|
@@ -2,6 +2,7 @@ import { _ as _objectWithoutPropertiesLoose, a as _extends } from "./objectWitho
|
|
|
2
2
|
import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-DWwsNxpa.mjs";
|
|
3
3
|
import React__default from "react";
|
|
4
4
|
import ReactDOM from "react-dom";
|
|
5
|
+
import { r as reactTransitionGroupConfig } from "./config-DeltQABu.mjs";
|
|
5
6
|
function _setPrototypeOf(t, e) {
|
|
6
7
|
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e2) {
|
|
7
8
|
return t2.__proto__ = e2, t2;
|
|
@@ -976,9 +977,6 @@ function removeClass$1(element, className) {
|
|
|
976
977
|
element.setAttribute("class", replaceClassName(element.className && element.className.baseVal || "", className));
|
|
977
978
|
}
|
|
978
979
|
}
|
|
979
|
-
const config = {
|
|
980
|
-
disabled: false
|
|
981
|
-
};
|
|
982
980
|
var timeoutsShape = process.env.NODE_ENV !== "production" ? PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
983
981
|
enter: PropTypes.number,
|
|
984
982
|
exit: PropTypes.number,
|
|
@@ -1109,7 +1107,7 @@ var Transition = /* @__PURE__ */ function(_React$Component) {
|
|
|
1109
1107
|
var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing], maybeNode = _ref2[0], maybeAppearing = _ref2[1];
|
|
1110
1108
|
var timeouts = this.getTimeouts();
|
|
1111
1109
|
var enterTimeout = appearing ? timeouts.appear : timeouts.enter;
|
|
1112
|
-
if (!mounting && !enter ||
|
|
1110
|
+
if (!mounting && !enter || reactTransitionGroupConfig.disabled) {
|
|
1113
1111
|
this.safeSetState({
|
|
1114
1112
|
status: ENTERED
|
|
1115
1113
|
}, function() {
|
|
@@ -1136,7 +1134,7 @@ var Transition = /* @__PURE__ */ function(_React$Component) {
|
|
|
1136
1134
|
var exit = this.props.exit;
|
|
1137
1135
|
var timeouts = this.getTimeouts();
|
|
1138
1136
|
var maybeNode = this.props.nodeRef ? void 0 : ReactDOM.findDOMNode(this);
|
|
1139
|
-
if (!exit ||
|
|
1137
|
+
if (!exit || reactTransitionGroupConfig.disabled) {
|
|
1140
1138
|
this.safeSetState({
|
|
1141
1139
|
status: EXITED
|
|
1142
1140
|
}, function() {
|
|
@@ -19,7 +19,7 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { jsx } from "react/jsx-runtime";
|
|
21
21
|
import React__default from "react";
|
|
22
|
-
import { $ as $c4acc1de3ab169cf$export$d652b3ea2d672d5b, a as $131cf43a05231e1e$export$6d095e787d2b5e1f, C as CalendarBase, b as $64244302c3013299$export$dd0bbc9b26defe37 } from "./CalendarBase-
|
|
22
|
+
import { $ as $c4acc1de3ab169cf$export$d652b3ea2d672d5b, a as $131cf43a05231e1e$export$6d095e787d2b5e1f, C as CalendarBase, b as $64244302c3013299$export$dd0bbc9b26defe37 } from "./CalendarBase-BuIkpPIv.mjs";
|
|
23
23
|
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-5UR8ToA1.mjs";
|
|
24
24
|
function $9942cad8a072a530$export$3ee915f8151bd4f1(props, state) {
|
|
25
25
|
return $c4acc1de3ab169cf$export$d652b3ea2d672d5b(props, state);
|
|
@@ -20,7 +20,7 @@ var __spreadValues = (a, b) => {
|
|
|
20
20
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
21
|
const jsxRuntime = require("react/jsx-runtime");
|
|
22
22
|
const React = require("react");
|
|
23
|
-
const CalendarBase = require("./CalendarBase-
|
|
23
|
+
const CalendarBase = require("./CalendarBase-CSr5E__l.js");
|
|
24
24
|
const context = require("./context-DJdNiOsb.js");
|
|
25
25
|
function $9942cad8a072a530$export$3ee915f8151bd4f1(props, state) {
|
|
26
26
|
return CalendarBase.$c4acc1de3ab169cf$export$d652b3ea2d672d5b(props, state);
|
|
@@ -3446,25 +3446,16 @@ function CalendarCell({ state, date }) {
|
|
|
3446
3446
|
}, state, ref);
|
|
3447
3447
|
const isRangeCalendar = lodashExports.has(state, "highlightedRange");
|
|
3448
3448
|
const rangeState = state;
|
|
3449
|
-
const singleState = state;
|
|
3450
3449
|
const isNextMonth = date.compare(state.visibleRange.end) > 0;
|
|
3451
3450
|
const isPreviousMonth = date.compare(state.visibleRange.start) < 0;
|
|
3452
|
-
const handleMonthNavigation = () => {
|
|
3453
|
-
if (
|
|
3454
|
-
if (isNextMonth && !isUnavailable2) {
|
|
3451
|
+
const handleMonthNavigation = (e) => {
|
|
3452
|
+
if (isNextMonth && !isUnavailable2 && !state.isDisabled && !state.isReadOnly) {
|
|
3455
3453
|
state.focusNextPage();
|
|
3456
|
-
}
|
|
3457
|
-
if (isPreviousMonth && !isUnavailable2) {
|
|
3454
|
+
} else if (isPreviousMonth && !isUnavailable2 && !state.isDisabled && !state.isReadOnly) {
|
|
3458
3455
|
state.focusPreviousPage();
|
|
3459
3456
|
}
|
|
3460
|
-
if (
|
|
3461
|
-
|
|
3462
|
-
if (!rangeState.anchorDate) {
|
|
3463
|
-
rangeState.setValue(rangeState.highlightedRange);
|
|
3464
|
-
}
|
|
3465
|
-
} else {
|
|
3466
|
-
singleState.setValue(date);
|
|
3467
|
-
}
|
|
3457
|
+
if (buttonProps.onClick) {
|
|
3458
|
+
buttonProps.onClick(e);
|
|
3468
3459
|
}
|
|
3469
3460
|
};
|
|
3470
3461
|
const isSelectionStart = rangeState.highlightedRange ? $14e0f24ef4ac5c92$export$ea39ec197993aef0(date, rangeState.highlightedRange.start) : isSelected2;
|
|
@@ -3447,25 +3447,16 @@ function CalendarCell({ state, date }) {
|
|
|
3447
3447
|
}, state, ref);
|
|
3448
3448
|
const isRangeCalendar = lodash.lodashExports.has(state, "highlightedRange");
|
|
3449
3449
|
const rangeState = state;
|
|
3450
|
-
const singleState = state;
|
|
3451
3450
|
const isNextMonth = date.compare(state.visibleRange.end) > 0;
|
|
3452
3451
|
const isPreviousMonth = date.compare(state.visibleRange.start) < 0;
|
|
3453
|
-
const handleMonthNavigation = () => {
|
|
3454
|
-
if (
|
|
3455
|
-
if (isNextMonth && !isUnavailable2) {
|
|
3452
|
+
const handleMonthNavigation = (e) => {
|
|
3453
|
+
if (isNextMonth && !isUnavailable2 && !state.isDisabled && !state.isReadOnly) {
|
|
3456
3454
|
state.focusNextPage();
|
|
3457
|
-
}
|
|
3458
|
-
if (isPreviousMonth && !isUnavailable2) {
|
|
3455
|
+
} else if (isPreviousMonth && !isUnavailable2 && !state.isDisabled && !state.isReadOnly) {
|
|
3459
3456
|
state.focusPreviousPage();
|
|
3460
3457
|
}
|
|
3461
|
-
if (
|
|
3462
|
-
|
|
3463
|
-
if (!rangeState.anchorDate) {
|
|
3464
|
-
rangeState.setValue(rangeState.highlightedRange);
|
|
3465
|
-
}
|
|
3466
|
-
} else {
|
|
3467
|
-
singleState.setValue(date);
|
|
3468
|
-
}
|
|
3458
|
+
if (buttonProps.onClick) {
|
|
3459
|
+
buttonProps.onClick(e);
|
|
3469
3460
|
}
|
|
3470
3461
|
};
|
|
3471
3462
|
const isSelectionStart = rangeState.highlightedRange ? $14e0f24ef4ac5c92$export$ea39ec197993aef0(date, rangeState.highlightedRange.start) : isSelected2;
|
|
@@ -22,7 +22,7 @@ import * as React from "react";
|
|
|
22
22
|
import React__default, { useState, useMemo, useRef, useEffect } from "react";
|
|
23
23
|
import { I as InputIcon, l as logWarningForMissingAriaLabel } from "./InputIcon-CEATdJ1j.mjs";
|
|
24
24
|
import { U as UnstyledButton } from "./UnstyledButton-DxJLvL-G.mjs";
|
|
25
|
-
import { o as $35ea8db9cb2ccb90$export$680ea196effce5f, m as $fb18d541ea1ad717$export$ad991b66133851cf, k as $11d87f3f76e88657$export$b4a036af3fc0b032, p as $14e0f24ef4ac5c92$export$461939dd4422153, q as $14e0f24ef4ac5c92$export$aa8b41735afcabd2, d as $11d87f3f76e88657$export$93522d1a439f3617, n as $11d87f3f76e88657$export$b21e0b124e224484, r as $14e0f24ef4ac5c92$export$dbc69fd56b53d5e, l as $3b62074eb05584b2$export$80ee6245ec4f29ec, s as $14e0f24ef4ac5c92$export$b2f4953d301981d5, t as $14e0f24ef4ac5c92$export$5412ac11713b72ad, u as $896ba0a80a8f4d36$export$85fd5fdf27bacc79, v as $35ea8db9cb2ccb90$export$99faa760c7908e4f, b as $64244302c3013299$export$dd0bbc9b26defe37 } from "./CalendarBase-
|
|
25
|
+
import { o as $35ea8db9cb2ccb90$export$680ea196effce5f, m as $fb18d541ea1ad717$export$ad991b66133851cf, k as $11d87f3f76e88657$export$b4a036af3fc0b032, p as $14e0f24ef4ac5c92$export$461939dd4422153, q as $14e0f24ef4ac5c92$export$aa8b41735afcabd2, d as $11d87f3f76e88657$export$93522d1a439f3617, n as $11d87f3f76e88657$export$b21e0b124e224484, r as $14e0f24ef4ac5c92$export$dbc69fd56b53d5e, l as $3b62074eb05584b2$export$80ee6245ec4f29ec, s as $14e0f24ef4ac5c92$export$b2f4953d301981d5, t as $14e0f24ef4ac5c92$export$5412ac11713b72ad, u as $896ba0a80a8f4d36$export$85fd5fdf27bacc79, v as $35ea8db9cb2ccb90$export$99faa760c7908e4f, b as $64244302c3013299$export$dd0bbc9b26defe37 } from "./CalendarBase-BuIkpPIv.mjs";
|
|
26
26
|
import { H as HorizontalStack } from "./HorizontalStack-CJavrBHm.mjs";
|
|
27
27
|
import { classNames, variationName } from "../utilities/css.mjs";
|
|
28
28
|
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-5UR8ToA1.mjs";
|
|
@@ -22,7 +22,7 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
22
22
|
const React = require("react");
|
|
23
23
|
const InputIcon = require("./InputIcon-DDKBJ_Tk.js");
|
|
24
24
|
const UnstyledButton = require("./UnstyledButton-DW8CjaXN.js");
|
|
25
|
-
const CalendarBase = require("./CalendarBase-
|
|
25
|
+
const CalendarBase = require("./CalendarBase-CSr5E__l.js");
|
|
26
26
|
const HorizontalStack = require("./HorizontalStack-CWdKKY8L.js");
|
|
27
27
|
const utilities_css = require("../utilities/css.js");
|
|
28
28
|
const context = require("./context-DJdNiOsb.js");
|
|
@@ -48,7 +48,7 @@ const Icon = require("./Icon-BRlbo3RF.js");
|
|
|
48
48
|
const Text = require("./Text-DkzMEqky.js");
|
|
49
49
|
const utilities_css = require("../utilities/css.js");
|
|
50
50
|
const UnstyledButton = require("./UnstyledButton-DW8CjaXN.js");
|
|
51
|
-
const CSSTransition = require("./CSSTransition-
|
|
51
|
+
const CSSTransition = require("./CSSTransition-C23znX_H.js");
|
|
52
52
|
const objectWithoutPropertiesLoose = require("./objectWithoutPropertiesLoose-C4Mip8ZU.js");
|
|
53
53
|
function _interopNamespaceDefault(e) {
|
|
54
54
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
@@ -48,7 +48,7 @@ import { I as Icon } from "./Icon-BIpaQJ_I.mjs";
|
|
|
48
48
|
import { T as Text } from "./Text-D6oT5WJQ.mjs";
|
|
49
49
|
import { classNames, variationName } from "../utilities/css.mjs";
|
|
50
50
|
import { U as UnstyledButton } from "./UnstyledButton-DxJLvL-G.mjs";
|
|
51
|
-
import { _ as _inheritsLoose, T as TransitionGroupContext, P as PropTypes, C as CSSTransition } from "./CSSTransition-
|
|
51
|
+
import { _ as _inheritsLoose, T as TransitionGroupContext, P as PropTypes, C as CSSTransition } from "./CSSTransition-DZuEb-M0.mjs";
|
|
52
52
|
import { a as _extends, _ as _objectWithoutPropertiesLoose } from "./objectWithoutPropertiesLoose-COdxq1Ge.mjs";
|
|
53
53
|
function $77b352cf12efcf73$export$84726ef35ca2129a(queue) {
|
|
54
54
|
let subscribe = useCallback((fn) => queue.subscribe(fn), [
|
|
@@ -31,7 +31,7 @@ var __objRest = (source, exclude) => {
|
|
|
31
31
|
};
|
|
32
32
|
import { jsx } from "react/jsx-runtime";
|
|
33
33
|
import React__default, { useState, useRef, useMemo } from "react";
|
|
34
|
-
import { c as $f62d864046160412$export$f4a51ff076cc9a09, d as $11d87f3f76e88657$export$93522d1a439f3617, e as $14e0f24ef4ac5c92$export$a75f2bff57811055, f as $14e0f24ef4ac5c92$export$5c333a116e949cdd, a as $131cf43a05231e1e$export$6d095e787d2b5e1f, g as $14e0f24ef4ac5c92$export$91b62ebf2ba703ee, h as $f62d864046160412$export$eac50920cf2fd59a, i as $f62d864046160412$export$4f5203c0d889109e, j as $f62d864046160412$export$a1d3911297b952d7, k as $11d87f3f76e88657$export$b4a036af3fc0b032, l as $3b62074eb05584b2$export$80ee6245ec4f29ec, $ as $c4acc1de3ab169cf$export$d652b3ea2d672d5b, C as CalendarBase, b as $64244302c3013299$export$dd0bbc9b26defe37 } from "./CalendarBase-
|
|
34
|
+
import { c as $f62d864046160412$export$f4a51ff076cc9a09, d as $11d87f3f76e88657$export$93522d1a439f3617, e as $14e0f24ef4ac5c92$export$a75f2bff57811055, f as $14e0f24ef4ac5c92$export$5c333a116e949cdd, a as $131cf43a05231e1e$export$6d095e787d2b5e1f, g as $14e0f24ef4ac5c92$export$91b62ebf2ba703ee, h as $f62d864046160412$export$eac50920cf2fd59a, i as $f62d864046160412$export$4f5203c0d889109e, j as $f62d864046160412$export$a1d3911297b952d7, k as $11d87f3f76e88657$export$b4a036af3fc0b032, l as $3b62074eb05584b2$export$80ee6245ec4f29ec, $ as $c4acc1de3ab169cf$export$d652b3ea2d672d5b, C as CalendarBase, b as $64244302c3013299$export$dd0bbc9b26defe37 } from "./CalendarBase-BuIkpPIv.mjs";
|
|
35
35
|
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-5UR8ToA1.mjs";
|
|
36
36
|
import { $ as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./useControlledState-BPR3PrW4.mjs";
|
|
37
37
|
import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "./useEvent-CnahkmoD.mjs";
|
|
@@ -32,7 +32,7 @@ var __objRest = (source, exclude) => {
|
|
|
32
32
|
};
|
|
33
33
|
const jsxRuntime = require("react/jsx-runtime");
|
|
34
34
|
const React = require("react");
|
|
35
|
-
const CalendarBase = require("./CalendarBase-
|
|
35
|
+
const CalendarBase = require("./CalendarBase-CSr5E__l.js");
|
|
36
36
|
const context = require("./context-DJdNiOsb.js");
|
|
37
37
|
const useControlledState = require("./useControlledState-CcM4H_K0.js");
|
|
38
38
|
const useEvent = require("./useEvent-D3eKExds.js");
|
package/package.json
CHANGED
package/utilities/test.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { UserEvent } from "@testing-library/user-event";
|
|
2
2
|
import { ReactElement } from "react";
|
|
3
|
-
declare global {
|
|
4
|
-
var jest: object;
|
|
5
|
-
var IS_REACT_ACT_ENVIRONMENT: boolean;
|
|
6
|
-
}
|
|
7
3
|
/**
|
|
8
4
|
* Render a react element for testing. Passes in vitest's timers for user-event.
|
|
9
5
|
*/
|
|
@@ -69,11 +65,14 @@ export declare function render(jsx: ReactElement): {
|
|
|
69
65
|
* user-event with `vi.useFakeTimers()`
|
|
70
66
|
*
|
|
71
67
|
* See https://github.com/testing-library/react-testing-library/issues/1195
|
|
68
|
+
*
|
|
69
|
+
* Note: relies on the test runner's `beforeAll` global, so it must be called
|
|
70
|
+
* from a vitest/jest environment that exposes globals.
|
|
72
71
|
*/
|
|
73
72
|
export declare function installJestCompatibleFakeTimers(): void;
|
|
74
73
|
export declare function mockGetComputedStyle(): () => void;
|
|
75
74
|
export declare function mockIntersectionObserver(): () => void;
|
|
76
|
-
export declare function installScrollToMock(): void;
|
|
75
|
+
export declare function installScrollToMock(): () => void;
|
|
77
76
|
export declare function mockMatchMedia({ getMatches, }: {
|
|
78
77
|
getMatches: (query: string) => boolean;
|
|
79
78
|
}): () => void;
|
package/utilities/test.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../src/utilities/test.ts"],"names":[],"mappings":"AACA,OAAkB,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAIrC
|
|
1
|
+
{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../src/utilities/test.ts"],"names":[],"mappings":"AACA,OAAkB,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAIrC;;GAEG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,YAAY;;;uBAkBvB,CAAC,yJAGkB,CAAC,6BAEZ,CAAC;mBAGpB,MAAE,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAnBhB;AAED;;;;;;;;GAQG;AACH,wBAAgB,+BAA+B,SAc9C;AAED,wBAAgB,oBAAoB,eAMnC;AAED,wBAAgB,wBAAwB,eAUvC;AAED,wBAAgB,mBAAmB,eAMlC;AAED,wBAAgB,cAAc,CAAC,EAC7B,UAAU,GACX,EAAE;IACD,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;CACxC,cAeA;AAED,wBAAgB,mBAAmB,eAKlC;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,iBAEhE;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,iBAE/D;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,iBAEhE;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,SAAS,iBAE5C;AAED,wBAAsB,QAAQ,CAC5B,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,MAAM,iBAGb;AAED,wBAAsB,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,WAAW,iBAEpE;AAED,wBAAgB,2BAA2B,SAE1C;AAED,wBAAgB,0BAA0B,SAEzC"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
+
var __spreadValues = (a, b) => {
|
|
10
|
+
for (var prop in b || (b = {}))
|
|
11
|
+
if (__hasOwnProp.call(b, prop))
|
|
12
|
+
__defNormalProp(a, prop, b[prop]);
|
|
13
|
+
if (__getOwnPropSymbols)
|
|
14
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
+
if (__propIsEnum.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
}
|
|
18
|
+
return a;
|
|
19
|
+
};
|
|
20
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
|
+
var __async = (__this, __arguments, generator) => {
|
|
22
|
+
return new Promise((resolve, reject) => {
|
|
23
|
+
var fulfilled = (value) => {
|
|
24
|
+
try {
|
|
25
|
+
step(generator.next(value));
|
|
26
|
+
} catch (e) {
|
|
27
|
+
reject(e);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
var rejected = (value) => {
|
|
31
|
+
try {
|
|
32
|
+
step(generator.throw(value));
|
|
33
|
+
} catch (e) {
|
|
34
|
+
reject(e);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
38
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
42
|
+
const react = require("@testing-library/react");
|
|
43
|
+
const userEvent = require("@testing-library/user-event");
|
|
44
|
+
const vitest = require("vitest");
|
|
45
|
+
const config = require("../__chunks__/config-ChibgUKd.js");
|
|
46
|
+
function render(jsx) {
|
|
47
|
+
return __spreadValues({
|
|
48
|
+
user: userEvent.setup({
|
|
49
|
+
advanceTimers: vitest.vi.advanceTimersByTime.bind(vitest.vi)
|
|
50
|
+
})
|
|
51
|
+
}, react.render(jsx));
|
|
52
|
+
}
|
|
53
|
+
function installJestCompatibleFakeTimers() {
|
|
54
|
+
beforeAll(() => {
|
|
55
|
+
const globalWithJest = globalThis;
|
|
56
|
+
const _jest = globalWithJest.jest;
|
|
57
|
+
globalWithJest.jest = __spreadProps(__spreadValues({}, globalWithJest.jest), {
|
|
58
|
+
advanceTimersByTime: vitest.vi.advanceTimersByTime.bind(vitest.vi)
|
|
59
|
+
});
|
|
60
|
+
return () => {
|
|
61
|
+
globalWithJest.jest = _jest;
|
|
62
|
+
};
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function mockGetComputedStyle() {
|
|
66
|
+
const originalGetComputedStyle = window.getComputedStyle;
|
|
67
|
+
window.getComputedStyle = (elt) => originalGetComputedStyle(elt);
|
|
68
|
+
return () => {
|
|
69
|
+
window.getComputedStyle = originalGetComputedStyle;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function mockIntersectionObserver() {
|
|
73
|
+
const originalIntersectionObserver = window.IntersectionObserver;
|
|
74
|
+
window.IntersectionObserver = vitest.vi.fn(() => ({
|
|
75
|
+
observe: vitest.vi.fn(),
|
|
76
|
+
unobserve: vitest.vi.fn(),
|
|
77
|
+
disconnect: vitest.vi.fn()
|
|
78
|
+
}));
|
|
79
|
+
return () => {
|
|
80
|
+
window.IntersectionObserver = originalIntersectionObserver;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function installScrollToMock() {
|
|
84
|
+
const originalScrollTo = Element.prototype.scrollTo;
|
|
85
|
+
Element.prototype.scrollTo = () => {
|
|
86
|
+
};
|
|
87
|
+
return () => {
|
|
88
|
+
Element.prototype.scrollTo = originalScrollTo;
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
function mockMatchMedia({ getMatches }) {
|
|
92
|
+
const originalMatchMedia = window.matchMedia;
|
|
93
|
+
window.matchMedia = vitest.vi.fn().mockImplementation((query) => ({
|
|
94
|
+
matches: getMatches(query),
|
|
95
|
+
media: query,
|
|
96
|
+
onchange: null,
|
|
97
|
+
addListener: vitest.vi.fn(),
|
|
98
|
+
removeListener: vitest.vi.fn(),
|
|
99
|
+
addEventListener: vitest.vi.fn(),
|
|
100
|
+
removeEventListener: vitest.vi.fn(),
|
|
101
|
+
dispatchEvent: vitest.vi.fn()
|
|
102
|
+
}));
|
|
103
|
+
return () => {
|
|
104
|
+
window.matchMedia = originalMatchMedia;
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
function silenceConsoleError() {
|
|
108
|
+
const mock = vitest.vi.spyOn(console, "error").mockImplementation(() => vitest.vi.fn());
|
|
109
|
+
return () => {
|
|
110
|
+
mock.mockRestore();
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
function userClick(user, element) {
|
|
114
|
+
return __async(this, null, function* () {
|
|
115
|
+
yield user.click(element);
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
function userKeyboard(user, text) {
|
|
119
|
+
return __async(this, null, function* () {
|
|
120
|
+
yield user.keyboard(text);
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function userHover(user, element) {
|
|
124
|
+
return __async(this, null, function* () {
|
|
125
|
+
yield user.hover(element);
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
function userTab(user) {
|
|
129
|
+
return __async(this, null, function* () {
|
|
130
|
+
yield user.tab();
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
function userType(user, element, text) {
|
|
134
|
+
return __async(this, null, function* () {
|
|
135
|
+
yield user.type(element, text);
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
function selectCheckbox(user, el) {
|
|
139
|
+
return __async(this, null, function* () {
|
|
140
|
+
yield userClick(user, el);
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
function disableReactTransitionGroup() {
|
|
144
|
+
config.reactTransitionGroupConfig.disabled = true;
|
|
145
|
+
}
|
|
146
|
+
function enableReactTransitionGroup() {
|
|
147
|
+
config.reactTransitionGroupConfig.disabled = false;
|
|
148
|
+
}
|
|
149
|
+
exports.disableReactTransitionGroup = disableReactTransitionGroup;
|
|
150
|
+
exports.enableReactTransitionGroup = enableReactTransitionGroup;
|
|
151
|
+
exports.installJestCompatibleFakeTimers = installJestCompatibleFakeTimers;
|
|
152
|
+
exports.installScrollToMock = installScrollToMock;
|
|
153
|
+
exports.mockGetComputedStyle = mockGetComputedStyle;
|
|
154
|
+
exports.mockIntersectionObserver = mockIntersectionObserver;
|
|
155
|
+
exports.mockMatchMedia = mockMatchMedia;
|
|
156
|
+
exports.render = render;
|
|
157
|
+
exports.selectCheckbox = selectCheckbox;
|
|
158
|
+
exports.silenceConsoleError = silenceConsoleError;
|
|
159
|
+
exports.userClick = userClick;
|
|
160
|
+
exports.userHover = userHover;
|
|
161
|
+
exports.userKeyboard = userKeyboard;
|
|
162
|
+
exports.userTab = userTab;
|
|
163
|
+
exports.userType = userType;
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __async = (__this, __arguments, generator) => {
|
|
21
|
+
return new Promise((resolve, reject) => {
|
|
22
|
+
var fulfilled = (value) => {
|
|
23
|
+
try {
|
|
24
|
+
step(generator.next(value));
|
|
25
|
+
} catch (e) {
|
|
26
|
+
reject(e);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var rejected = (value) => {
|
|
30
|
+
try {
|
|
31
|
+
step(generator.throw(value));
|
|
32
|
+
} catch (e) {
|
|
33
|
+
reject(e);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
37
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
import { render as render$1 } from "@testing-library/react";
|
|
41
|
+
import userEvent from "@testing-library/user-event";
|
|
42
|
+
import { vi } from "vitest";
|
|
43
|
+
import { r as reactTransitionGroupConfig } from "../__chunks__/config-DeltQABu.mjs";
|
|
44
|
+
function render(jsx) {
|
|
45
|
+
return __spreadValues({
|
|
46
|
+
user: userEvent.setup({
|
|
47
|
+
advanceTimers: vi.advanceTimersByTime.bind(vi)
|
|
48
|
+
})
|
|
49
|
+
}, render$1(jsx));
|
|
50
|
+
}
|
|
51
|
+
function installJestCompatibleFakeTimers() {
|
|
52
|
+
beforeAll(() => {
|
|
53
|
+
const globalWithJest = globalThis;
|
|
54
|
+
const _jest = globalWithJest.jest;
|
|
55
|
+
globalWithJest.jest = __spreadProps(__spreadValues({}, globalWithJest.jest), {
|
|
56
|
+
advanceTimersByTime: vi.advanceTimersByTime.bind(vi)
|
|
57
|
+
});
|
|
58
|
+
return () => {
|
|
59
|
+
globalWithJest.jest = _jest;
|
|
60
|
+
};
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function mockGetComputedStyle() {
|
|
64
|
+
const originalGetComputedStyle = window.getComputedStyle;
|
|
65
|
+
window.getComputedStyle = (elt) => originalGetComputedStyle(elt);
|
|
66
|
+
return () => {
|
|
67
|
+
window.getComputedStyle = originalGetComputedStyle;
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
function mockIntersectionObserver() {
|
|
71
|
+
const originalIntersectionObserver = window.IntersectionObserver;
|
|
72
|
+
window.IntersectionObserver = vi.fn(() => ({
|
|
73
|
+
observe: vi.fn(),
|
|
74
|
+
unobserve: vi.fn(),
|
|
75
|
+
disconnect: vi.fn()
|
|
76
|
+
}));
|
|
77
|
+
return () => {
|
|
78
|
+
window.IntersectionObserver = originalIntersectionObserver;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function installScrollToMock() {
|
|
82
|
+
const originalScrollTo = Element.prototype.scrollTo;
|
|
83
|
+
Element.prototype.scrollTo = () => {
|
|
84
|
+
};
|
|
85
|
+
return () => {
|
|
86
|
+
Element.prototype.scrollTo = originalScrollTo;
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function mockMatchMedia({ getMatches }) {
|
|
90
|
+
const originalMatchMedia = window.matchMedia;
|
|
91
|
+
window.matchMedia = vi.fn().mockImplementation((query) => ({
|
|
92
|
+
matches: getMatches(query),
|
|
93
|
+
media: query,
|
|
94
|
+
onchange: null,
|
|
95
|
+
addListener: vi.fn(),
|
|
96
|
+
removeListener: vi.fn(),
|
|
97
|
+
addEventListener: vi.fn(),
|
|
98
|
+
removeEventListener: vi.fn(),
|
|
99
|
+
dispatchEvent: vi.fn()
|
|
100
|
+
}));
|
|
101
|
+
return () => {
|
|
102
|
+
window.matchMedia = originalMatchMedia;
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
function silenceConsoleError() {
|
|
106
|
+
const mock = vi.spyOn(console, "error").mockImplementation(() => vi.fn());
|
|
107
|
+
return () => {
|
|
108
|
+
mock.mockRestore();
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
function userClick(user, element) {
|
|
112
|
+
return __async(this, null, function* () {
|
|
113
|
+
yield user.click(element);
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
function userKeyboard(user, text) {
|
|
117
|
+
return __async(this, null, function* () {
|
|
118
|
+
yield user.keyboard(text);
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
function userHover(user, element) {
|
|
122
|
+
return __async(this, null, function* () {
|
|
123
|
+
yield user.hover(element);
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
function userTab(user) {
|
|
127
|
+
return __async(this, null, function* () {
|
|
128
|
+
yield user.tab();
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
function userType(user, element, text) {
|
|
132
|
+
return __async(this, null, function* () {
|
|
133
|
+
yield user.type(element, text);
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
function selectCheckbox(user, el) {
|
|
137
|
+
return __async(this, null, function* () {
|
|
138
|
+
yield userClick(user, el);
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
function disableReactTransitionGroup() {
|
|
142
|
+
reactTransitionGroupConfig.disabled = true;
|
|
143
|
+
}
|
|
144
|
+
function enableReactTransitionGroup() {
|
|
145
|
+
reactTransitionGroupConfig.disabled = false;
|
|
146
|
+
}
|
|
147
|
+
export {
|
|
148
|
+
disableReactTransitionGroup,
|
|
149
|
+
enableReactTransitionGroup,
|
|
150
|
+
installJestCompatibleFakeTimers,
|
|
151
|
+
installScrollToMock,
|
|
152
|
+
mockGetComputedStyle,
|
|
153
|
+
mockIntersectionObserver,
|
|
154
|
+
mockMatchMedia,
|
|
155
|
+
render,
|
|
156
|
+
selectCheckbox,
|
|
157
|
+
silenceConsoleError,
|
|
158
|
+
userClick,
|
|
159
|
+
userHover,
|
|
160
|
+
userKeyboard,
|
|
161
|
+
userTab,
|
|
162
|
+
userType
|
|
163
|
+
};
|