@dmsi/wedgekit-react 0.0.475 → 0.0.476
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/{chunk-IG2YUDHI.js → chunk-24K4HHV5.js} +4 -4
- package/dist/{chunk-OEMLNGE2.js → chunk-4Q7T4GJ2.js} +2 -2
- package/dist/chunk-4UH72JT2.js +104 -0
- package/dist/{chunk-GTPSPGSJ.js → chunk-HSJ34DOK.js} +13 -13
- package/dist/{chunk-KJNK7KEV.js → chunk-QMSPTD6L.js} +1 -1
- package/dist/components/Accordion.js +2 -2
- package/dist/components/Alert.cjs +787 -0
- package/dist/components/Alert.js +13 -0
- package/dist/components/CalendarRange.cjs +51 -46
- package/dist/components/CalendarRange.css +3 -0
- package/dist/components/CalendarRange.js +19 -18
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +9 -4
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.css +3 -0
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +19 -18
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +18 -13
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.css +3 -0
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +19 -18
- package/dist/components/DataGrid/PinnedColumns.cjs +34 -29
- package/dist/components/DataGrid/PinnedColumns.css +3 -0
- package/dist/components/DataGrid/PinnedColumns.js +19 -18
- package/dist/components/DataGrid/TableBody/LoadingCell.cjs +10 -5
- package/dist/components/DataGrid/TableBody/LoadingCell.css +3 -0
- package/dist/components/DataGrid/TableBody/LoadingCell.js +19 -18
- package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +16 -11
- package/dist/components/DataGrid/TableBody/TableBodyRow.css +3 -0
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +19 -18
- package/dist/components/DataGrid/TableBody/index.cjs +31 -26
- package/dist/components/DataGrid/TableBody/index.css +3 -0
- package/dist/components/DataGrid/TableBody/index.js +19 -18
- package/dist/components/DataGrid/index.cjs +120 -115
- package/dist/components/DataGrid/index.css +3 -0
- package/dist/components/DataGrid/index.js +19 -18
- package/dist/components/DataGrid/utils.cjs +10 -5
- package/dist/components/DataGrid/utils.css +3 -0
- package/dist/components/DataGrid/utils.js +19 -18
- package/dist/components/DataGridCell.js +2 -2
- package/dist/components/DateInput.cjs +70 -65
- package/dist/components/DateInput.css +3 -0
- package/dist/components/DateInput.js +19 -18
- package/dist/components/DateRangeInput.cjs +70 -65
- package/dist/components/DateRangeInput.css +3 -0
- package/dist/components/DateRangeInput.js +19 -18
- package/dist/components/FilterGroup.js +6 -6
- package/dist/components/MobileDataGrid/ColumnList.js +3 -3
- package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +17 -12
- package/dist/components/MobileDataGrid/ColumnSelector/index.css +3 -0
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +19 -18
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +2 -2
- package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +25 -20
- package/dist/components/MobileDataGrid/MobileDataGridHeader.css +3 -0
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +19 -18
- package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +2 -2
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +6 -6
- package/dist/components/MobileDataGrid/index.cjs +89 -84
- package/dist/components/MobileDataGrid/index.css +3 -0
- package/dist/components/MobileDataGrid/index.js +19 -18
- package/dist/components/Modal.js +3 -3
- package/dist/components/Notification.js +3 -3
- package/dist/components/PDFViewer/PDFNavigation.js +2 -2
- package/dist/components/PDFViewer/index.js +6 -6
- package/dist/components/SideMenuItem.js +3 -3
- package/dist/components/Swatch.js +3 -3
- package/dist/components/Upload.js +3 -3
- package/dist/components/index.cjs +82 -0
- package/dist/components/index.css +3 -0
- package/dist/components/index.js +32 -28
- package/dist/index.css +3 -0
- package/package.json +1 -1
- package/src/components/Alert.tsx +81 -0
- package/src/components/index.ts +1 -0
- package/dist/{chunk-IT4VFU6T.js → chunk-3DEYCNUE.js} +3 -3
- package/dist/{chunk-GTBGPBH6.js → chunk-B53XDCLO.js} +3 -3
- package/dist/{chunk-ZQSD74IJ.js → chunk-IY7SXEVY.js} +3 -3
- package/dist/{chunk-BFFNSUNS.js → chunk-QBSEKZWX.js} +3 -3
- package/dist/{chunk-NIWXVOBW.js → chunk-X67L3NZI.js} +3 -3
- package/dist/{chunk-TVXBP5CW.js → chunk-XIXQUEYC.js} +3 -3
|
@@ -2,64 +2,65 @@
|
|
|
2
2
|
import {
|
|
3
3
|
DataGrid,
|
|
4
4
|
DataGrid_default
|
|
5
|
-
} from "../../chunk-
|
|
6
|
-
import "../../chunk-OEMLNGE2.js";
|
|
7
|
-
import "../../chunk-IT4VFU6T.js";
|
|
5
|
+
} from "../../chunk-HSJ34DOK.js";
|
|
8
6
|
import "../../chunk-M7INAUAJ.js";
|
|
9
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-4Q7T4GJ2.js";
|
|
8
|
+
import "../../chunk-3DEYCNUE.js";
|
|
10
9
|
import "../../chunk-DYBJUTGK.js";
|
|
10
|
+
import "../../chunk-24K4HHV5.js";
|
|
11
|
+
import "../../chunk-B53XDCLO.js";
|
|
11
12
|
import "../../chunk-MBZ55T2D.js";
|
|
12
13
|
import "../../chunk-2IKT6IHB.js";
|
|
13
14
|
import "../../chunk-YCDDBSVU.js";
|
|
14
15
|
import "../../chunk-3X3Y4TMS.js";
|
|
15
16
|
import "../../chunk-BQNPOGD5.js";
|
|
16
|
-
import "../../chunk-
|
|
17
|
-
import "../../chunk-
|
|
17
|
+
import "../../chunk-QMSPTD6L.js";
|
|
18
|
+
import "../../chunk-XIXQUEYC.js";
|
|
18
19
|
import "../../chunk-5IFPG6TS.js";
|
|
19
20
|
import "../../chunk-KW6V7O3H.js";
|
|
20
21
|
import "../../chunk-AJ5M6MVX.js";
|
|
21
22
|
import "../../chunk-JUFBGNWW.js";
|
|
22
23
|
import "../../chunk-YNKN6RKF.js";
|
|
23
24
|
import "../../chunk-VJVY6NPF.js";
|
|
24
|
-
import "../../chunk-GTBGPBH6.js";
|
|
25
25
|
import "../../chunk-AT4AWD6B.js";
|
|
26
26
|
import "../../chunk-EWGHVZL5.js";
|
|
27
27
|
import "../../chunk-7GHD74J3.js";
|
|
28
28
|
import "../../chunk-7BVUTFZ5.js";
|
|
29
29
|
import "../../chunk-ETAEB3TA.js";
|
|
30
|
-
import "../../chunk-HVNHTM3P.js";
|
|
31
30
|
import "../../chunk-GRGDX7JC.js";
|
|
32
|
-
import "../../chunk-
|
|
31
|
+
import "../../chunk-HVNHTM3P.js";
|
|
32
|
+
import "../../chunk-X67L3NZI.js";
|
|
33
33
|
import "../../chunk-4RJKB7LC.js";
|
|
34
|
+
import "../../chunk-FG7GNGE3.js";
|
|
34
35
|
import "../../chunk-G7KIKHER.js";
|
|
35
36
|
import "../../chunk-AG43RS4Q.js";
|
|
36
37
|
import "../../chunk-ZQJMNPCF.js";
|
|
37
|
-
import "../../chunk-FG7GNGE3.js";
|
|
38
38
|
import "../../chunk-6TYWM26K.js";
|
|
39
39
|
import "../../chunk-SBRRNFOP.js";
|
|
40
40
|
import "../../chunk-Y2GK27RX.js";
|
|
41
|
-
import "../../chunk-H2KC5XUY.js";
|
|
42
41
|
import "../../chunk-QVWYTQKL.js";
|
|
43
|
-
import "../../chunk-
|
|
44
|
-
import "../../chunk-WEAVZEE4.js";
|
|
45
|
-
import "../../chunk-OZBB6RFM.js";
|
|
46
|
-
import "../../chunk-BFFNSUNS.js";
|
|
42
|
+
import "../../chunk-QBSEKZWX.js";
|
|
47
43
|
import "../../chunk-TCMOGTPB.js";
|
|
48
44
|
import "../../chunk-DVU5XV7L.js";
|
|
49
45
|
import "../../chunk-IPAKWF2V.js";
|
|
50
|
-
import "../../chunk-WVUIIBRR.js";
|
|
51
46
|
import "../../chunk-RQRR4FEF.js";
|
|
52
47
|
import "../../chunk-44TH3VC7.js";
|
|
53
48
|
import "../../chunk-AL5QIRY3.js";
|
|
49
|
+
import "../../chunk-WVUIIBRR.js";
|
|
50
|
+
import "../../chunk-75USUR3I.js";
|
|
51
|
+
import "../../chunk-WEAVZEE4.js";
|
|
52
|
+
import "../../chunk-OZBB6RFM.js";
|
|
54
53
|
import "../../chunk-URYQ24NF.js";
|
|
55
54
|
import "../../chunk-VXWSAIB5.js";
|
|
56
55
|
import "../../chunk-R3EQIDBX.js";
|
|
57
56
|
import "../../chunk-5UH6QUFB.js";
|
|
58
57
|
import "../../chunk-UCJUC5AZ.js";
|
|
59
|
-
import "../../chunk-
|
|
58
|
+
import "../../chunk-IY7SXEVY.js";
|
|
60
59
|
import "../../chunk-KBJZUVLM.js";
|
|
61
|
-
import "../../chunk-
|
|
60
|
+
import "../../chunk-4UH72JT2.js";
|
|
61
|
+
import "../../chunk-H2KC5XUY.js";
|
|
62
62
|
import "../../chunk-ZSETMD4A.js";
|
|
63
|
+
import "../../chunk-DORD2EBO.js";
|
|
63
64
|
import "../../chunk-NKUETCDA.js";
|
|
64
65
|
import "../../chunk-LPY6PMAY.js";
|
|
65
66
|
import "../../chunk-IXR65MOU.js";
|
|
@@ -62,7 +62,7 @@ __export(utils_exports, {
|
|
|
62
62
|
getSortIcon: () => getSortIcon
|
|
63
63
|
});
|
|
64
64
|
module.exports = __toCommonJS(utils_exports);
|
|
65
|
-
var
|
|
65
|
+
var import_clsx38 = __toESM(require("clsx"), 1);
|
|
66
66
|
|
|
67
67
|
// src/components/DataGridCell.tsx
|
|
68
68
|
var import_sortable = require("@dnd-kit/sortable");
|
|
@@ -4869,17 +4869,22 @@ var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
|
4869
4869
|
// src/components/EmptyCartIcon.tsx
|
|
4870
4870
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
4871
4871
|
|
|
4872
|
-
// src/components/
|
|
4872
|
+
// src/components/Alert.tsx
|
|
4873
|
+
var import_clsx37 = __toESM(require("clsx"), 1);
|
|
4874
|
+
var import_react37 = require("react");
|
|
4873
4875
|
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
4876
|
+
|
|
4877
|
+
// src/components/DataGrid/utils.tsx
|
|
4878
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
4874
4879
|
function getSortIcon(sort, nextSort = false) {
|
|
4875
|
-
const iconClassName = (0,
|
|
4880
|
+
const iconClassName = (0, import_clsx38.default)(
|
|
4876
4881
|
"text-icon-on-action-primary-normal",
|
|
4877
4882
|
nextSort && "hidden group-hover:block"
|
|
4878
4883
|
);
|
|
4879
4884
|
if (sort === "asc")
|
|
4880
|
-
return /* @__PURE__ */ (0,
|
|
4885
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { size: 16, className: iconClassName, name: "arrow_upward" });
|
|
4881
4886
|
if (sort === "desc")
|
|
4882
|
-
return /* @__PURE__ */ (0,
|
|
4887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { size: 16, className: iconClassName, name: "arrow_downward" });
|
|
4883
4888
|
return null;
|
|
4884
4889
|
}
|
|
4885
4890
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1,63 +1,64 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getSortIcon
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-OEMLNGE2.js";
|
|
5
|
-
import "../../chunk-IT4VFU6T.js";
|
|
3
|
+
} from "../../chunk-HSJ34DOK.js";
|
|
6
4
|
import "../../chunk-M7INAUAJ.js";
|
|
7
|
-
import "../../chunk-
|
|
5
|
+
import "../../chunk-4Q7T4GJ2.js";
|
|
6
|
+
import "../../chunk-3DEYCNUE.js";
|
|
8
7
|
import "../../chunk-DYBJUTGK.js";
|
|
8
|
+
import "../../chunk-24K4HHV5.js";
|
|
9
|
+
import "../../chunk-B53XDCLO.js";
|
|
9
10
|
import "../../chunk-MBZ55T2D.js";
|
|
10
11
|
import "../../chunk-2IKT6IHB.js";
|
|
11
12
|
import "../../chunk-YCDDBSVU.js";
|
|
12
13
|
import "../../chunk-3X3Y4TMS.js";
|
|
13
14
|
import "../../chunk-BQNPOGD5.js";
|
|
14
|
-
import "../../chunk-
|
|
15
|
-
import "../../chunk-
|
|
15
|
+
import "../../chunk-QMSPTD6L.js";
|
|
16
|
+
import "../../chunk-XIXQUEYC.js";
|
|
16
17
|
import "../../chunk-5IFPG6TS.js";
|
|
17
18
|
import "../../chunk-KW6V7O3H.js";
|
|
18
19
|
import "../../chunk-AJ5M6MVX.js";
|
|
19
20
|
import "../../chunk-JUFBGNWW.js";
|
|
20
21
|
import "../../chunk-YNKN6RKF.js";
|
|
21
22
|
import "../../chunk-VJVY6NPF.js";
|
|
22
|
-
import "../../chunk-GTBGPBH6.js";
|
|
23
23
|
import "../../chunk-AT4AWD6B.js";
|
|
24
24
|
import "../../chunk-EWGHVZL5.js";
|
|
25
25
|
import "../../chunk-7GHD74J3.js";
|
|
26
26
|
import "../../chunk-7BVUTFZ5.js";
|
|
27
27
|
import "../../chunk-ETAEB3TA.js";
|
|
28
|
-
import "../../chunk-HVNHTM3P.js";
|
|
29
28
|
import "../../chunk-GRGDX7JC.js";
|
|
30
|
-
import "../../chunk-
|
|
29
|
+
import "../../chunk-HVNHTM3P.js";
|
|
30
|
+
import "../../chunk-X67L3NZI.js";
|
|
31
31
|
import "../../chunk-4RJKB7LC.js";
|
|
32
|
+
import "../../chunk-FG7GNGE3.js";
|
|
32
33
|
import "../../chunk-G7KIKHER.js";
|
|
33
34
|
import "../../chunk-AG43RS4Q.js";
|
|
34
35
|
import "../../chunk-ZQJMNPCF.js";
|
|
35
|
-
import "../../chunk-FG7GNGE3.js";
|
|
36
36
|
import "../../chunk-6TYWM26K.js";
|
|
37
37
|
import "../../chunk-SBRRNFOP.js";
|
|
38
38
|
import "../../chunk-Y2GK27RX.js";
|
|
39
|
-
import "../../chunk-H2KC5XUY.js";
|
|
40
39
|
import "../../chunk-QVWYTQKL.js";
|
|
41
|
-
import "../../chunk-
|
|
42
|
-
import "../../chunk-WEAVZEE4.js";
|
|
43
|
-
import "../../chunk-OZBB6RFM.js";
|
|
44
|
-
import "../../chunk-BFFNSUNS.js";
|
|
40
|
+
import "../../chunk-QBSEKZWX.js";
|
|
45
41
|
import "../../chunk-TCMOGTPB.js";
|
|
46
42
|
import "../../chunk-DVU5XV7L.js";
|
|
47
43
|
import "../../chunk-IPAKWF2V.js";
|
|
48
|
-
import "../../chunk-WVUIIBRR.js";
|
|
49
44
|
import "../../chunk-RQRR4FEF.js";
|
|
50
45
|
import "../../chunk-44TH3VC7.js";
|
|
51
46
|
import "../../chunk-AL5QIRY3.js";
|
|
47
|
+
import "../../chunk-WVUIIBRR.js";
|
|
48
|
+
import "../../chunk-75USUR3I.js";
|
|
49
|
+
import "../../chunk-WEAVZEE4.js";
|
|
50
|
+
import "../../chunk-OZBB6RFM.js";
|
|
52
51
|
import "../../chunk-URYQ24NF.js";
|
|
53
52
|
import "../../chunk-VXWSAIB5.js";
|
|
54
53
|
import "../../chunk-R3EQIDBX.js";
|
|
55
54
|
import "../../chunk-5UH6QUFB.js";
|
|
56
55
|
import "../../chunk-UCJUC5AZ.js";
|
|
57
|
-
import "../../chunk-
|
|
56
|
+
import "../../chunk-IY7SXEVY.js";
|
|
58
57
|
import "../../chunk-KBJZUVLM.js";
|
|
59
|
-
import "../../chunk-
|
|
58
|
+
import "../../chunk-4UH72JT2.js";
|
|
59
|
+
import "../../chunk-H2KC5XUY.js";
|
|
60
60
|
import "../../chunk-ZSETMD4A.js";
|
|
61
|
+
import "../../chunk-DORD2EBO.js";
|
|
61
62
|
import "../../chunk-NKUETCDA.js";
|
|
62
63
|
import "../../chunk-LPY6PMAY.js";
|
|
63
64
|
import "../../chunk-IXR65MOU.js";
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
DataGridCell,
|
|
5
5
|
DragAlongCell,
|
|
6
6
|
DraggableCellHeader
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-QBSEKZWX.js";
|
|
8
8
|
import "../chunk-TCMOGTPB.js";
|
|
9
9
|
import "../chunk-DVU5XV7L.js";
|
|
10
10
|
import "../chunk-IPAKWF2V.js";
|
|
11
|
-
import "../chunk-WVUIIBRR.js";
|
|
12
11
|
import "../chunk-RQRR4FEF.js";
|
|
13
12
|
import "../chunk-44TH3VC7.js";
|
|
14
13
|
import "../chunk-AL5QIRY3.js";
|
|
14
|
+
import "../chunk-WVUIIBRR.js";
|
|
15
15
|
import "../chunk-URYQ24NF.js";
|
|
16
16
|
import "../chunk-VXWSAIB5.js";
|
|
17
17
|
import "../chunk-R3EQIDBX.js";
|
|
@@ -62,7 +62,7 @@ __export(DateInput_exports, {
|
|
|
62
62
|
DateInput: () => DateInput
|
|
63
63
|
});
|
|
64
64
|
module.exports = __toCommonJS(DateInput_exports);
|
|
65
|
-
var
|
|
65
|
+
var import_react39 = require("react");
|
|
66
66
|
var import_react_dom4 = require("react-dom");
|
|
67
67
|
|
|
68
68
|
// src/components/Input.tsx
|
|
@@ -728,8 +728,8 @@ Currency.displayName = "Currency";
|
|
|
728
728
|
Percentage.displayName = "Percentage";
|
|
729
729
|
|
|
730
730
|
// src/components/CalendarRange.tsx
|
|
731
|
-
var
|
|
732
|
-
var
|
|
731
|
+
var import_clsx39 = __toESM(require("clsx"), 1);
|
|
732
|
+
var import_react38 = __toESM(require("react"), 1);
|
|
733
733
|
var import_polyfill = require("@js-temporal/polyfill");
|
|
734
734
|
|
|
735
735
|
// src/components/DataGridCell.tsx
|
|
@@ -4962,8 +4962,13 @@ var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
|
4962
4962
|
// src/components/EmptyCartIcon.tsx
|
|
4963
4963
|
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
4964
4964
|
|
|
4965
|
-
// src/components/
|
|
4965
|
+
// src/components/Alert.tsx
|
|
4966
|
+
var import_clsx38 = __toESM(require("clsx"), 1);
|
|
4967
|
+
var import_react37 = require("react");
|
|
4966
4968
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
4969
|
+
|
|
4970
|
+
// src/components/CalendarRange.tsx
|
|
4971
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4967
4972
|
function DateCell(_a) {
|
|
4968
4973
|
var _b = _a, {
|
|
4969
4974
|
date,
|
|
@@ -4998,12 +5003,12 @@ function DateCell(_a) {
|
|
|
4998
5003
|
"id",
|
|
4999
5004
|
"testid"
|
|
5000
5005
|
]);
|
|
5001
|
-
return /* @__PURE__ */ (0,
|
|
5006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
5002
5007
|
"span",
|
|
5003
5008
|
__spreadProps(__spreadValues({}, props), {
|
|
5004
5009
|
id,
|
|
5005
5010
|
"data-testid": testid,
|
|
5006
|
-
className: (0,
|
|
5011
|
+
className: (0, import_clsx39.default)(
|
|
5007
5012
|
"flex items-center justify-center aspect-square select-none transition-colors border duration-100 font-medium",
|
|
5008
5013
|
typography.caption,
|
|
5009
5014
|
cellPadding,
|
|
@@ -5073,20 +5078,20 @@ function CalendarRange({
|
|
|
5073
5078
|
const fromDate = parseDate(from);
|
|
5074
5079
|
const toDate = parseDate(to);
|
|
5075
5080
|
const today = import_polyfill.Temporal.Now.plainDateISO();
|
|
5076
|
-
const [baseMonth, setBaseMonth] = (0,
|
|
5081
|
+
const [baseMonth, setBaseMonth] = (0, import_react38.useState)(
|
|
5077
5082
|
fromDate != null ? fromDate : today.with({ day: 1 })
|
|
5078
5083
|
);
|
|
5079
|
-
const [selecting, setSelecting] = (0,
|
|
5080
|
-
const [pendingFrom, setPendingFrom] = (0,
|
|
5081
|
-
const [hoveredDate, setHoveredDate] = (0,
|
|
5082
|
-
(0,
|
|
5084
|
+
const [selecting, setSelecting] = (0, import_react38.useState)("from");
|
|
5085
|
+
const [pendingFrom, setPendingFrom] = (0, import_react38.useState)(void 0);
|
|
5086
|
+
const [hoveredDate, setHoveredDate] = (0, import_react38.useState)(void 0);
|
|
5087
|
+
(0, import_react38.useEffect)(() => {
|
|
5083
5088
|
if (fromDate) {
|
|
5084
5089
|
setBaseMonth(fromDate.with({ day: 1 }));
|
|
5085
5090
|
} else if (toDate) {
|
|
5086
5091
|
setBaseMonth(toDate.with({ day: 1 }));
|
|
5087
5092
|
}
|
|
5088
5093
|
}, [from, to]);
|
|
5089
|
-
(0,
|
|
5094
|
+
(0, import_react38.useEffect)(() => {
|
|
5090
5095
|
if (fromDate && toDate) {
|
|
5091
5096
|
setSelecting("from");
|
|
5092
5097
|
setPendingFrom(void 0);
|
|
@@ -5152,12 +5157,12 @@ function CalendarRange({
|
|
|
5152
5157
|
}
|
|
5153
5158
|
return false;
|
|
5154
5159
|
}
|
|
5155
|
-
return /* @__PURE__ */ (0,
|
|
5160
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
5156
5161
|
"div",
|
|
5157
5162
|
{
|
|
5158
5163
|
id,
|
|
5159
5164
|
"data-testid": testid,
|
|
5160
|
-
className: (0,
|
|
5165
|
+
className: (0, import_clsx39.default)(
|
|
5161
5166
|
"relative bg-background-grouped-primary-normal rounded-base w-fit",
|
|
5162
5167
|
layoutPaddding,
|
|
5163
5168
|
layoutGap,
|
|
@@ -5165,15 +5170,15 @@ function CalendarRange({
|
|
|
5165
5170
|
// baseTransition,
|
|
5166
5171
|
"overflow-hidden"
|
|
5167
5172
|
),
|
|
5168
|
-
children: /* @__PURE__ */ (0,
|
|
5173
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
5169
5174
|
"div",
|
|
5170
5175
|
{
|
|
5171
|
-
className: (0,
|
|
5176
|
+
className: (0, import_clsx39.default)(
|
|
5172
5177
|
"flex flex-row items-start justify-start bg-background-primary-normal overflow-clip",
|
|
5173
5178
|
layoutGap
|
|
5174
5179
|
),
|
|
5175
5180
|
children: (mode === "double" ? [0, 1] : [0]).map((offset, idx) => {
|
|
5176
|
-
return /* @__PURE__ */ (0,
|
|
5181
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
5177
5182
|
CalendarPane,
|
|
5178
5183
|
{
|
|
5179
5184
|
getMonthData,
|
|
@@ -5231,45 +5236,45 @@ function CalendarPane({
|
|
|
5231
5236
|
const years = Array.from({ length: 100 }).map(
|
|
5232
5237
|
(_, i) => baseMonth.year - 50 + i
|
|
5233
5238
|
);
|
|
5234
|
-
const [monthMenuOpen, setMonthMenuOpen] = (0,
|
|
5235
|
-
const [yearMenuOpen, setYearMenuOpen] = (0,
|
|
5236
|
-
const monthMenuRef = (0,
|
|
5237
|
-
const yearMenuRef = (0,
|
|
5239
|
+
const [monthMenuOpen, setMonthMenuOpen] = (0, import_react38.useState)(false);
|
|
5240
|
+
const [yearMenuOpen, setYearMenuOpen] = (0, import_react38.useState)(false);
|
|
5241
|
+
const monthMenuRef = (0, import_react38.useRef)(null);
|
|
5242
|
+
const yearMenuRef = (0, import_react38.useRef)(null);
|
|
5238
5243
|
const month = getMonthData(offset);
|
|
5239
5244
|
const totalCells = 42;
|
|
5240
5245
|
const emptyCells = month.firstDayOffset;
|
|
5241
|
-
return /* @__PURE__ */ (0,
|
|
5242
|
-
/* @__PURE__ */ (0,
|
|
5246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_react38.default.Fragment, { children: [
|
|
5247
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
5243
5248
|
"div",
|
|
5244
5249
|
{
|
|
5245
|
-
className: (0,
|
|
5250
|
+
className: (0, import_clsx39.default)("flex flex-col"),
|
|
5246
5251
|
children: [
|
|
5247
|
-
/* @__PURE__ */ (0,
|
|
5252
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
5248
5253
|
"div",
|
|
5249
5254
|
{
|
|
5250
|
-
className: (0,
|
|
5255
|
+
className: (0, import_clsx39.default)(
|
|
5251
5256
|
"flex flex-row items-center justify-between",
|
|
5252
5257
|
typography.label,
|
|
5253
5258
|
"text-text-action-primary-normal"
|
|
5254
5259
|
),
|
|
5255
5260
|
children: [
|
|
5256
|
-
idx === 0 ? /* @__PURE__ */ (0,
|
|
5261
|
+
idx === 0 ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
5257
5262
|
"button",
|
|
5258
5263
|
{
|
|
5259
5264
|
id: id ? `${id}-prev-month-button` : void 0,
|
|
5260
5265
|
"data-testid": testid ? `${testid}-prev-month-button` : void 0,
|
|
5261
5266
|
type: "button",
|
|
5262
|
-
className: (0,
|
|
5267
|
+
className: (0, import_clsx39.default)(
|
|
5263
5268
|
"flex items-center justify-center rounded-base hover:bg-action-100 active:bg-action-300 text-icon-action-primary-normal",
|
|
5264
5269
|
componentPadding
|
|
5265
5270
|
),
|
|
5266
5271
|
"aria-label": "Previous month",
|
|
5267
5272
|
onClick: () => setBaseMonth(baseMonth.subtract({ months: 1 })),
|
|
5268
|
-
children: /* @__PURE__ */ (0,
|
|
5273
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Icon, { name: "chevron_left", size: 24 })
|
|
5269
5274
|
}
|
|
5270
|
-
) : /* @__PURE__ */ (0,
|
|
5271
|
-
/* @__PURE__ */ (0,
|
|
5272
|
-
/* @__PURE__ */ (0,
|
|
5275
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: (0, import_clsx39.default)(componentPadding, "mr-1") }),
|
|
5276
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex gap-desktop-compact-component-padding", children: [
|
|
5277
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
5273
5278
|
"button",
|
|
5274
5279
|
{
|
|
5275
5280
|
ref: (el) => {
|
|
@@ -5284,13 +5289,13 @@ function CalendarPane({
|
|
|
5284
5289
|
children: month.name
|
|
5285
5290
|
}
|
|
5286
5291
|
),
|
|
5287
|
-
/* @__PURE__ */ (0,
|
|
5292
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
5288
5293
|
Menu,
|
|
5289
5294
|
{
|
|
5290
5295
|
show: monthMenuOpen,
|
|
5291
5296
|
positionTo: monthMenuRef,
|
|
5292
5297
|
setShow: () => setMonthMenuOpen(false),
|
|
5293
|
-
children: months.map((x) => [x, getMonthDataWith(x + 1)]).map(([x, m]) => /* @__PURE__ */ (0,
|
|
5298
|
+
children: months.map((x) => [x, getMonthDataWith(x + 1)]).map(([x, m]) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
5294
5299
|
MenuOption,
|
|
5295
5300
|
{
|
|
5296
5301
|
selected: baseMonth.month === x + 1,
|
|
@@ -5304,7 +5309,7 @@ function CalendarPane({
|
|
|
5304
5309
|
))
|
|
5305
5310
|
}
|
|
5306
5311
|
),
|
|
5307
|
-
/* @__PURE__ */ (0,
|
|
5312
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
5308
5313
|
"button",
|
|
5309
5314
|
{
|
|
5310
5315
|
ref: (el) => {
|
|
@@ -5319,13 +5324,13 @@ function CalendarPane({
|
|
|
5319
5324
|
children: month.year
|
|
5320
5325
|
}
|
|
5321
5326
|
),
|
|
5322
|
-
/* @__PURE__ */ (0,
|
|
5327
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
5323
5328
|
Menu,
|
|
5324
5329
|
{
|
|
5325
5330
|
show: yearMenuOpen,
|
|
5326
5331
|
positionTo: yearMenuRef,
|
|
5327
5332
|
setShow: () => setYearMenuOpen(false),
|
|
5328
|
-
children: years.map((y) => /* @__PURE__ */ (0,
|
|
5333
|
+
children: years.map((y) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
5329
5334
|
MenuOption,
|
|
5330
5335
|
{
|
|
5331
5336
|
selected: baseMonth.year === y,
|
|
@@ -5340,28 +5345,28 @@ function CalendarPane({
|
|
|
5340
5345
|
}
|
|
5341
5346
|
)
|
|
5342
5347
|
] }),
|
|
5343
|
-
(mode === "double" ? idx === 1 : true) ? /* @__PURE__ */ (0,
|
|
5348
|
+
(mode === "double" ? idx === 1 : true) ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
5344
5349
|
"button",
|
|
5345
5350
|
{
|
|
5346
5351
|
id: id ? `${id}-next-month-button` : void 0,
|
|
5347
5352
|
"data-testid": testid ? `${testid}-next-month-button` : void 0,
|
|
5348
5353
|
type: "button",
|
|
5349
|
-
className: (0,
|
|
5354
|
+
className: (0, import_clsx39.default)(
|
|
5350
5355
|
"flex items-center justify-center rounded-base hover:bg-action-100 active:bg-action-300 text-icon-action-primary-normal",
|
|
5351
5356
|
componentPadding
|
|
5352
5357
|
),
|
|
5353
5358
|
"aria-label": "Next month",
|
|
5354
5359
|
onClick: () => setBaseMonth(baseMonth.add({ months: 1 })),
|
|
5355
|
-
children: /* @__PURE__ */ (0,
|
|
5360
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Icon, { name: "chevron_right", size: 24 })
|
|
5356
5361
|
}
|
|
5357
|
-
) : /* @__PURE__ */ (0,
|
|
5362
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: (0, import_clsx39.default)(componentPadding, "ml-1") })
|
|
5358
5363
|
]
|
|
5359
5364
|
}
|
|
5360
5365
|
),
|
|
5361
|
-
/* @__PURE__ */ (0,
|
|
5366
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: (0, import_clsx39.default)("grid grid-cols-7"), children: weekDays.map((d) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
5362
5367
|
"span",
|
|
5363
5368
|
{
|
|
5364
|
-
className: (0,
|
|
5369
|
+
className: (0, import_clsx39.default)(
|
|
5365
5370
|
typography.caption,
|
|
5366
5371
|
"text-text-secondary-normal text-center",
|
|
5367
5372
|
"w-10"
|
|
@@ -5370,7 +5375,7 @@ function CalendarPane({
|
|
|
5370
5375
|
},
|
|
5371
5376
|
d
|
|
5372
5377
|
)) }),
|
|
5373
|
-
/* @__PURE__ */ (0,
|
|
5378
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: (0, import_clsx39.default)("grid grid-cols-7"), children: Array.from({ length: totalCells }).map((_, i) => {
|
|
5374
5379
|
const day = i - emptyCells + 1;
|
|
5375
5380
|
const date = month.date.with({ day: 1 }).add({
|
|
5376
5381
|
days: i - emptyCells
|
|
@@ -5384,7 +5389,7 @@ function CalendarPane({
|
|
|
5384
5389
|
const hoverDateIsAfterPendingFrom = hoveredDate && pendingFrom && import_polyfill.Temporal.PlainDate.compare(hoveredDate, pendingFrom) >= 0;
|
|
5385
5390
|
const isRangeStart = mode === "single" && disableRange ? false : !pendingFrom && isInMonth && fromDate && date.equals(fromDate) || hoverDateIsAfterPendingFrom && date.equals(pendingFrom);
|
|
5386
5391
|
const isRangeEnd = mode === "single" && disableRange ? false : !pendingFrom && isInMonth && toDate && date.equals(toDate) || hoverDateIsBeforePendingFrom && date.equals(pendingFrom);
|
|
5387
|
-
return /* @__PURE__ */ (0,
|
|
5392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
5388
5393
|
DateCell,
|
|
5389
5394
|
{
|
|
5390
5395
|
id: id ? `${id}-date-${date.toString()}` : void 0,
|
|
@@ -5409,10 +5414,10 @@ function CalendarPane({
|
|
|
5409
5414
|
]
|
|
5410
5415
|
}
|
|
5411
5416
|
),
|
|
5412
|
-
mode === "double" && idx === 0 && /* @__PURE__ */ (0,
|
|
5417
|
+
mode === "double" && idx === 0 && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
5413
5418
|
"div",
|
|
5414
5419
|
{
|
|
5415
|
-
className: (0,
|
|
5420
|
+
className: (0, import_clsx39.default)(
|
|
5416
5421
|
"self-stretch bg-border-primary-normal rounded-base",
|
|
5417
5422
|
// 1px width, full height, matches Figma divider
|
|
5418
5423
|
"w-px"
|
|
@@ -5423,7 +5428,7 @@ function CalendarPane({
|
|
|
5423
5428
|
}
|
|
5424
5429
|
|
|
5425
5430
|
// src/components/DateInput.tsx
|
|
5426
|
-
var
|
|
5431
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
5427
5432
|
var DateInput = (_a) => {
|
|
5428
5433
|
var _b = _a, {
|
|
5429
5434
|
id,
|
|
@@ -5444,24 +5449,24 @@ var DateInput = (_a) => {
|
|
|
5444
5449
|
"readOnly",
|
|
5445
5450
|
"label"
|
|
5446
5451
|
]);
|
|
5447
|
-
const [visible, setVisible] = (0,
|
|
5448
|
-
const [inputValue, setInputValue] = (0,
|
|
5449
|
-
const [isTyping, setIsTyping] = (0,
|
|
5450
|
-
const popoverRef = (0,
|
|
5451
|
-
const triggerRef = (0,
|
|
5452
|
-
const rootRef = (0,
|
|
5453
|
-
const [calendarPosition, setCalendarPosition] = (0,
|
|
5452
|
+
const [visible, setVisible] = (0, import_react39.useState)(false);
|
|
5453
|
+
const [inputValue, setInputValue] = (0, import_react39.useState)("");
|
|
5454
|
+
const [isTyping, setIsTyping] = (0, import_react39.useState)(false);
|
|
5455
|
+
const popoverRef = (0, import_react39.useRef)(null);
|
|
5456
|
+
const triggerRef = (0, import_react39.useRef)(null);
|
|
5457
|
+
const rootRef = (0, import_react39.useRef)(null);
|
|
5458
|
+
const [calendarPosition, setCalendarPosition] = (0, import_react39.useState)({
|
|
5454
5459
|
top: 0,
|
|
5455
5460
|
left: 0,
|
|
5456
5461
|
width: 0
|
|
5457
5462
|
});
|
|
5458
5463
|
const [from, to] = [value, ""];
|
|
5459
|
-
(0,
|
|
5464
|
+
(0, import_react39.useEffect)(() => {
|
|
5460
5465
|
if (!isTyping) {
|
|
5461
5466
|
setInputValue(formatDisplayValue(from));
|
|
5462
5467
|
}
|
|
5463
5468
|
}, [from, isTyping]);
|
|
5464
|
-
(0,
|
|
5469
|
+
(0, import_react39.useLayoutEffect)(() => {
|
|
5465
5470
|
if (visible) {
|
|
5466
5471
|
updatePosition();
|
|
5467
5472
|
}
|
|
@@ -5476,7 +5481,7 @@ var DateInput = (_a) => {
|
|
|
5476
5481
|
});
|
|
5477
5482
|
}
|
|
5478
5483
|
};
|
|
5479
|
-
(0,
|
|
5484
|
+
(0, import_react39.useEffect)(() => {
|
|
5480
5485
|
updatePosition();
|
|
5481
5486
|
const resizeObserver = new ResizeObserver(updatePosition);
|
|
5482
5487
|
if (triggerRef.current) {
|
|
@@ -5488,7 +5493,7 @@ var DateInput = (_a) => {
|
|
|
5488
5493
|
window.removeEventListener("scroll", updatePosition);
|
|
5489
5494
|
};
|
|
5490
5495
|
}, []);
|
|
5491
|
-
(0,
|
|
5496
|
+
(0, import_react39.useEffect)(() => {
|
|
5492
5497
|
const handleKeyDown2 = (event) => {
|
|
5493
5498
|
var _a2;
|
|
5494
5499
|
if (event.key === "Escape" && popoverRef.current) {
|
|
@@ -5501,7 +5506,7 @@ var DateInput = (_a) => {
|
|
|
5501
5506
|
document.removeEventListener("keydown", handleKeyDown2);
|
|
5502
5507
|
};
|
|
5503
5508
|
});
|
|
5504
|
-
(0,
|
|
5509
|
+
(0, import_react39.useEffect)(() => {
|
|
5505
5510
|
const handleClickOutside = (event) => {
|
|
5506
5511
|
if (popoverRef.current && !popoverRef.current.contains(event.target) && triggerRef.current && !triggerRef.current.contains(event.target)) {
|
|
5507
5512
|
setVisible(false);
|
|
@@ -5582,8 +5587,8 @@ var DateInput = (_a) => {
|
|
|
5582
5587
|
}
|
|
5583
5588
|
}
|
|
5584
5589
|
};
|
|
5585
|
-
return /* @__PURE__ */ (0,
|
|
5586
|
-
/* @__PURE__ */ (0,
|
|
5590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "relative", children: [
|
|
5591
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
5587
5592
|
InputBase,
|
|
5588
5593
|
__spreadProps(__spreadValues({
|
|
5589
5594
|
id,
|
|
@@ -5597,7 +5602,7 @@ var DateInput = (_a) => {
|
|
|
5597
5602
|
placeholder,
|
|
5598
5603
|
disabled,
|
|
5599
5604
|
readOnly,
|
|
5600
|
-
after: /* @__PURE__ */ (0,
|
|
5605
|
+
after: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Icon, { name: "calendar_month" }),
|
|
5601
5606
|
onFocus: handleFocus,
|
|
5602
5607
|
onClick: handleClick,
|
|
5603
5608
|
onChange: handleInputChange,
|
|
@@ -5608,7 +5613,7 @@ var DateInput = (_a) => {
|
|
|
5608
5613
|
})
|
|
5609
5614
|
),
|
|
5610
5615
|
visible && !readOnly && (0, import_react_dom4.createPortal)(
|
|
5611
|
-
/* @__PURE__ */ (0,
|
|
5616
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
5612
5617
|
"div",
|
|
5613
5618
|
{
|
|
5614
5619
|
ref: (el) => {
|
|
@@ -5620,7 +5625,7 @@ var DateInput = (_a) => {
|
|
|
5620
5625
|
left: `${calendarPosition.left}px`,
|
|
5621
5626
|
minWidth: `${calendarPosition.width}px`
|
|
5622
5627
|
},
|
|
5623
|
-
children: /* @__PURE__ */ (0,
|
|
5628
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
5624
5629
|
CalendarRange,
|
|
5625
5630
|
{
|
|
5626
5631
|
id: id ? `${id}-calendar` : void 0,
|