@dmsi/wedgekit-react 0.0.369 → 0.0.371

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.
Files changed (205) hide show
  1. package/dist/{chunk-RLLQRVM7.js → chunk-2H35FETR.js} +18 -10
  2. package/dist/chunk-2IKT6IHB.js +190 -0
  3. package/dist/chunk-4UNWXB4A.js +89 -0
  4. package/dist/chunk-5IFPG6TS.js +17 -0
  5. package/dist/{chunk-6GAYJCFE.js → chunk-6DPFKSCT.js} +1 -1
  6. package/dist/{chunk-ZFOANBWG.js → chunk-AG43RS4Q.js} +2 -1
  7. package/dist/chunk-AJ5M6MVX.js +7 -0
  8. package/dist/chunk-AT4AWD6B.js +44 -0
  9. package/dist/chunk-BQNPOGD5.js +105 -0
  10. package/dist/chunk-CQFPNZTN.js +172 -0
  11. package/dist/chunk-EJSPFQCY.js +29 -0
  12. package/dist/chunk-ER6RCOH3.js +97 -0
  13. package/dist/{chunk-4VER5OEU.js → chunk-FBE2HGEF.js} +35 -11
  14. package/dist/chunk-HPQWEZJL.js +45 -0
  15. package/dist/{chunk-URCLLHO5.js → chunk-IBX6DVHU.js} +376 -102
  16. package/dist/{chunk-I3WFZOFY.js → chunk-J5V2JRIK.js} +1 -1
  17. package/dist/chunk-JGJUVJKD.js +283 -0
  18. package/dist/chunk-KEMCFN4U.js +78 -0
  19. package/dist/chunk-M6TSTDNZ.js +22 -0
  20. package/dist/chunk-M7INAUAJ.js +140 -0
  21. package/dist/chunk-MBZ55T2D.js +51 -0
  22. package/dist/chunk-N6PNLLNS.js +77 -0
  23. package/dist/{chunk-ZA5E7ZYM.js → chunk-NXGUDYRR.js} +1 -1
  24. package/dist/chunk-P36QKH26.js +143 -0
  25. package/dist/chunk-PTRZHGHA.js +89 -0
  26. package/dist/chunk-QVWYTQKL.js +29 -0
  27. package/dist/{chunk-6CPGOW6J.js → chunk-T36HX6QY.js} +6 -4
  28. package/dist/chunk-U6PUOGG4.js +114 -0
  29. package/dist/{chunk-NQXZBWDZ.js → chunk-V6U7LU6M.js} +15 -6
  30. package/dist/chunk-VJVY6NPF.js +32 -0
  31. package/dist/chunk-VVXPGI2P.js +61 -0
  32. package/dist/{chunk-ARQBSR3I.js → chunk-YCKRVNJ3.js} +4 -4
  33. package/dist/chunk-YYHQLQDQ.js +68 -0
  34. package/dist/components/Accordion.cjs +47 -14
  35. package/dist/components/Accordion.js +2 -2
  36. package/dist/components/CalendarRange.cjs +700 -46
  37. package/dist/components/CalendarRange.css +186 -3
  38. package/dist/components/CalendarRange.js +43 -11
  39. package/dist/components/CompactImagesPreview.cjs +485 -0
  40. package/dist/components/CompactImagesPreview.js +13 -0
  41. package/dist/components/ContentTabs.cjs +3 -2
  42. package/dist/components/ContentTabs.js +3 -2
  43. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +4687 -0
  44. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.css +5051 -0
  45. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +62 -0
  46. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +4687 -0
  47. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.css +5051 -0
  48. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +62 -0
  49. package/dist/components/DataGrid/PinnedColumns.cjs +4687 -0
  50. package/dist/components/DataGrid/PinnedColumns.css +5051 -0
  51. package/dist/components/DataGrid/PinnedColumns.js +62 -0
  52. package/dist/components/DataGrid/TableBody/LoadingCell.cjs +4689 -0
  53. package/dist/components/DataGrid/TableBody/LoadingCell.css +5051 -0
  54. package/dist/components/DataGrid/TableBody/LoadingCell.js +62 -0
  55. package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +4689 -0
  56. package/dist/components/DataGrid/TableBody/TableBodyRow.css +5051 -0
  57. package/dist/components/DataGrid/TableBody/TableBodyRow.js +62 -0
  58. package/dist/components/DataGrid/TableBody/index.cjs +4689 -0
  59. package/dist/components/DataGrid/TableBody/index.css +5051 -0
  60. package/dist/components/DataGrid/TableBody/index.js +62 -0
  61. package/dist/components/DataGrid/index.cjs +4692 -0
  62. package/dist/components/DataGrid/index.css +5051 -0
  63. package/dist/components/DataGrid/index.js +65 -0
  64. package/dist/components/DataGrid/utils.cjs +4687 -0
  65. package/dist/components/DataGrid/utils.css +5051 -0
  66. package/dist/components/DataGrid/utils.js +62 -0
  67. package/dist/components/DataGridCell.js +6 -6
  68. package/dist/components/DateInput.cjs +721 -67
  69. package/dist/components/DateInput.css +186 -3
  70. package/dist/components/DateInput.js +45 -13
  71. package/dist/components/DateRangeInput.cjs +721 -67
  72. package/dist/components/DateRangeInput.css +186 -3
  73. package/dist/components/DateRangeInput.js +45 -13
  74. package/dist/components/FilterGroup.js +3 -3
  75. package/dist/components/Grid.cjs +3 -1
  76. package/dist/components/Grid.js +3 -92
  77. package/dist/components/ImagePlaceholder.cjs +65 -0
  78. package/dist/components/ImagePlaceholder.js +7 -0
  79. package/dist/components/Input.js +2 -2
  80. package/dist/components/MenuOption.js +2 -2
  81. package/dist/components/MobileDataGrid/ColumnList.cjs +845 -0
  82. package/dist/components/MobileDataGrid/ColumnList.js +17 -0
  83. package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +4797 -0
  84. package/dist/components/MobileDataGrid/ColumnSelector/index.css +5051 -0
  85. package/dist/components/MobileDataGrid/ColumnSelector/index.js +62 -0
  86. package/dist/components/MobileDataGrid/GridContextProvider/GridContext.cjs +31 -0
  87. package/dist/components/MobileDataGrid/GridContextProvider/GridContext.js +7 -0
  88. package/dist/components/MobileDataGrid/GridContextProvider/index.cjs +177 -0
  89. package/dist/components/MobileDataGrid/GridContextProvider/index.js +8 -0
  90. package/dist/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.cjs +269 -0
  91. package/dist/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.js +9 -0
  92. package/dist/components/MobileDataGrid/MobileDataGridCard/index.cjs +790 -0
  93. package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +16 -0
  94. package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +5059 -0
  95. package/dist/components/MobileDataGrid/MobileDataGridHeader.css +5051 -0
  96. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +62 -0
  97. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.cjs +509 -0
  98. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +13 -0
  99. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.cjs +1261 -0
  100. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +27 -0
  101. package/dist/components/MobileDataGrid/index.cjs +5521 -0
  102. package/dist/components/MobileDataGrid/index.css +5051 -0
  103. package/dist/components/MobileDataGrid/index.js +62 -0
  104. package/dist/components/Modal.cjs +24 -13
  105. package/dist/components/Modal.js +3 -3
  106. package/dist/components/ModalHeader.cjs +6 -4
  107. package/dist/components/ModalHeader.js +1 -1
  108. package/dist/components/ModalScrim.cjs +2 -1
  109. package/dist/components/ModalScrim.js +1 -1
  110. package/dist/components/NestedMenu.js +4 -4
  111. package/dist/components/Notification.cjs +15 -6
  112. package/dist/components/Notification.js +1 -1
  113. package/dist/components/PDFViewer/DownloadIcon.cjs +394 -0
  114. package/dist/components/PDFViewer/DownloadIcon.js +10 -0
  115. package/dist/components/PDFViewer/PDFElement.cjs +515 -0
  116. package/dist/components/PDFViewer/PDFElement.js +11 -0
  117. package/dist/components/{MobileDataGrid.cjs → PDFViewer/PDFNavigation.cjs} +318 -402
  118. package/dist/components/PDFViewer/PDFNavigation.js +13 -0
  119. package/dist/components/PDFViewer/PDFPage.cjs +56 -0
  120. package/dist/components/PDFViewer/PDFPage.js +7 -0
  121. package/dist/components/{PDFViewer.cjs → PDFViewer/index.cjs} +290 -202
  122. package/dist/components/PDFViewer/index.js +29 -0
  123. package/dist/components/Password.js +2 -2
  124. package/dist/components/ProductImagePreview/CarouselPagination.cjs +75 -0
  125. package/dist/components/ProductImagePreview/CarouselPagination.js +7 -0
  126. package/dist/components/ProductImagePreview/MobileImageCarousel.cjs +214 -0
  127. package/dist/components/ProductImagePreview/MobileImageCarousel.js +7 -0
  128. package/dist/components/ProductImagePreview/ProductPrimaryImage.cjs +255 -0
  129. package/dist/components/ProductImagePreview/ProductPrimaryImage.js +9 -0
  130. package/dist/components/ProductImagePreview/Thumbnail.cjs +105 -0
  131. package/dist/components/ProductImagePreview/Thumbnail.js +8 -0
  132. package/dist/components/ProductImagePreview/ZoomWindow.cjs +198 -0
  133. package/dist/components/ProductImagePreview/ZoomWindow.js +8 -0
  134. package/dist/components/ProductImagePreview/index.cjs +1369 -0
  135. package/dist/components/ProductImagePreview/index.js +22 -0
  136. package/dist/components/Search.js +3 -3
  137. package/dist/components/Select.js +3 -3
  138. package/dist/components/SideMenuGroup.cjs +15 -6
  139. package/dist/components/SideMenuGroup.js +1 -1
  140. package/dist/components/SideMenuItem.cjs +15 -6
  141. package/dist/components/SideMenuItem.js +1 -1
  142. package/dist/components/SkeletonParagraph.cjs +33 -0
  143. package/dist/components/SkeletonParagraph.js +10 -0
  144. package/dist/components/Stack.cjs +15 -6
  145. package/dist/components/Stack.js +1 -1
  146. package/dist/components/Stepper.cjs +61 -53
  147. package/dist/components/Stepper.js +63 -55
  148. package/dist/components/Surface.js +3 -39
  149. package/dist/components/Swatch.cjs +15 -6
  150. package/dist/components/Swatch.js +4 -4
  151. package/dist/components/Time.cjs +15 -6
  152. package/dist/components/Time.js +5 -5
  153. package/dist/components/Upload.cjs +15 -6
  154. package/dist/components/Upload.js +1 -1
  155. package/dist/components/index.cjs +2559 -14
  156. package/dist/components/index.css +186 -3
  157. package/dist/components/index.js +57 -14
  158. package/dist/index.css +186 -3
  159. package/package.json +1 -1
  160. package/src/components/Accordion.tsx +23 -4
  161. package/src/components/CompactImagesPreview.tsx +99 -0
  162. package/src/components/ContentTabs.tsx +3 -1
  163. package/src/components/DataGrid/types.ts +5 -0
  164. package/src/components/Grid.tsx +2 -0
  165. package/src/components/ImagePlaceholder.tsx +22 -0
  166. package/src/components/MobileDataGrid/ColumnList.tsx +66 -0
  167. package/src/components/MobileDataGrid/ColumnSelector/index.tsx +97 -0
  168. package/src/components/MobileDataGrid/GridContextProvider/GridContext.tsx +25 -0
  169. package/src/components/MobileDataGrid/GridContextProvider/index.tsx +132 -0
  170. package/src/components/MobileDataGrid/GridContextProvider/useGridContext.ts +10 -0
  171. package/src/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.tsx +20 -0
  172. package/src/components/MobileDataGrid/MobileDataGridCard/index.tsx +129 -0
  173. package/src/components/MobileDataGrid/MobileDataGridHeader.tsx +80 -0
  174. package/src/components/MobileDataGrid/RowDetailModalProvider/ModalContent.tsx +42 -0
  175. package/src/components/MobileDataGrid/RowDetailModalProvider/index.tsx +68 -0
  176. package/src/components/MobileDataGrid/dataGridReducer.ts +55 -0
  177. package/src/components/MobileDataGrid/index.tsx +92 -0
  178. package/src/components/MobileDataGrid/types.ts +4 -0
  179. package/src/components/Modal.tsx +31 -12
  180. package/src/components/ModalButtons.tsx +1 -1
  181. package/src/components/ModalHeader.tsx +5 -2
  182. package/src/components/ModalScrim.tsx +3 -2
  183. package/src/components/PDFViewer/DownloadIcon.tsx +22 -0
  184. package/src/components/PDFViewer/PDFElement.tsx +90 -0
  185. package/src/components/PDFViewer/PDFNavigation.tsx +68 -0
  186. package/src/components/PDFViewer/PDFPage.tsx +34 -0
  187. package/src/components/PDFViewer/index.tsx +128 -0
  188. package/src/components/ProductImagePreview/CarouselPagination.tsx +54 -0
  189. package/src/components/ProductImagePreview/MobileImageCarousel.tsx +226 -0
  190. package/src/components/ProductImagePreview/ProductPrimaryImage.tsx +218 -0
  191. package/src/components/ProductImagePreview/Thumbnail.tsx +49 -0
  192. package/src/components/ProductImagePreview/ZoomWindow.tsx +136 -0
  193. package/src/components/ProductImagePreview/index.tsx +182 -0
  194. package/src/components/ProductImagePreview/useProductImagePreview.ts +211 -0
  195. package/src/components/SkeletonParagraph.tsx +5 -0
  196. package/src/components/Stack.tsx +29 -6
  197. package/src/components/Stepper.tsx +5 -1
  198. package/src/components/index.ts +4 -0
  199. package/src/types.ts +2 -1
  200. package/dist/components/MobileDataGrid.js +0 -150
  201. package/dist/components/PDFViewer.js +0 -250
  202. package/src/components/MobileDataGrid.tsx +0 -163
  203. package/src/components/PDFViewer.tsx +0 -264
  204. package/dist/{chunk-OXSBIBGT.js → chunk-CKQNJNU3.js} +3 -3
  205. package/dist/{chunk-RJUN52HJ.js → chunk-ZL5X7KP6.js} +3 -3
@@ -0,0 +1,62 @@
1
+ import {
2
+ ColumnSelector
3
+ } from "../../../chunk-IBX6DVHU.js";
4
+ import "../../../chunk-M7INAUAJ.js";
5
+ import "../../../chunk-KEMCFN4U.js";
6
+ import "../../../chunk-VVXPGI2P.js";
7
+ import "../../../chunk-JGJUVJKD.js";
8
+ import "../../../chunk-HPQWEZJL.js";
9
+ import "../../../chunk-BQNPOGD5.js";
10
+ import "../../../chunk-U6PUOGG4.js";
11
+ import "../../../chunk-EJSPFQCY.js";
12
+ import "../../../chunk-4UNWXB4A.js";
13
+ import "../../../chunk-N6PNLLNS.js";
14
+ import "../../../chunk-VJVY6NPF.js";
15
+ import "../../../chunk-MBZ55T2D.js";
16
+ import "../../../chunk-2IKT6IHB.js";
17
+ import "../../../chunk-CQFPNZTN.js";
18
+ import "../../../chunk-YYHQLQDQ.js";
19
+ import "../../../chunk-P36QKH26.js";
20
+ import "../../../chunk-5IFPG6TS.js";
21
+ import "../../../chunk-AJ5M6MVX.js";
22
+ import "../../../chunk-M6TSTDNZ.js";
23
+ import "../../../chunk-QQ5G773N.js";
24
+ import "../../../chunk-AT4AWD6B.js";
25
+ import "../../../chunk-EWGHVZL5.js";
26
+ import "../../../chunk-J5V2JRIK.js";
27
+ import "../../../chunk-2H35FETR.js";
28
+ import "../../../chunk-4RJKB7LC.js";
29
+ import "../../../chunk-XM7IQHBU.js";
30
+ import "../../../chunk-FRHPFACM.js";
31
+ import "../../../chunk-T36HX6QY.js";
32
+ import "../../../chunk-AG43RS4Q.js";
33
+ import "../../../chunk-SBRRNFOP.js";
34
+ import "../../../chunk-ER6RCOH3.js";
35
+ import "../../../chunk-EU73QPW7.js";
36
+ import "../../../chunk-QVWYTQKL.js";
37
+ import "../../../chunk-NO5BIKWS.js";
38
+ import "../../../chunk-PTRZHGHA.js";
39
+ import "../../../chunk-YCKRVNJ3.js";
40
+ import "../../../chunk-W32JB47H.js";
41
+ import "../../../chunk-WPEDVM56.js";
42
+ import "../../../chunk-CKQNJNU3.js";
43
+ import "../../../chunk-WVUIIBRR.js";
44
+ import "../../../chunk-6DPFKSCT.js";
45
+ import "../../../chunk-ZL5X7KP6.js";
46
+ import "../../../chunk-7CS736EF.js";
47
+ import "../../../chunk-JUJBS4ZV.js";
48
+ import "../../../chunk-VXWSAIB5.js";
49
+ import "../../../chunk-TYTD4FLW.js";
50
+ import "../../../chunk-5UH6QUFB.js";
51
+ import "../../../chunk-FA7IFW66.js";
52
+ import "../../../chunk-FBE2HGEF.js";
53
+ import "../../../chunk-4LXG6QNT.js";
54
+ import "../../../chunk-V6U7LU6M.js";
55
+ import "../../../chunk-OGIFIPKH.js";
56
+ import "../../../chunk-NKUETCDA.js";
57
+ import "../../../chunk-WWAPK5PH.js";
58
+ import "../../../chunk-6CTCHYIS.js";
59
+ import "../../../chunk-ORMEWXMH.js";
60
+ export {
61
+ ColumnSelector
62
+ };
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/components/MobileDataGrid/GridContextProvider/GridContext.tsx
21
+ var GridContext_exports = {};
22
+ __export(GridContext_exports, {
23
+ GridContext: () => GridContext
24
+ });
25
+ module.exports = __toCommonJS(GridContext_exports);
26
+ var import_react = require("react");
27
+ var GridContext = (0, import_react.createContext)(null);
28
+ // Annotate the CommonJS export names for ESM import in node:
29
+ 0 && (module.exports = {
30
+ GridContext
31
+ });
@@ -0,0 +1,7 @@
1
+ import {
2
+ GridContext
3
+ } from "../../../chunk-AJ5M6MVX.js";
4
+ import "../../../chunk-ORMEWXMH.js";
5
+ export {
6
+ GridContext
7
+ };
@@ -0,0 +1,177 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __defProps = Object.defineProperties;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
+ var __spreadValues = (a, b) => {
12
+ for (var prop in b || (b = {}))
13
+ if (__hasOwnProp.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ if (__getOwnPropSymbols)
16
+ for (var prop of __getOwnPropSymbols(b)) {
17
+ if (__propIsEnum.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ }
20
+ return a;
21
+ };
22
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
23
+ var __export = (target, all) => {
24
+ for (var name in all)
25
+ __defProp(target, name, { get: all[name], enumerable: true });
26
+ };
27
+ var __copyProps = (to, from, except, desc) => {
28
+ if (from && typeof from === "object" || typeof from === "function") {
29
+ for (let key of __getOwnPropNames(from))
30
+ if (!__hasOwnProp.call(to, key) && key !== except)
31
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
32
+ }
33
+ return to;
34
+ };
35
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
36
+
37
+ // src/components/MobileDataGrid/GridContextProvider/index.tsx
38
+ var GridContextProvider_exports = {};
39
+ __export(GridContextProvider_exports, {
40
+ GridContextProvider: () => GridContextProvider
41
+ });
42
+ module.exports = __toCommonJS(GridContextProvider_exports);
43
+ var import_react2 = require("react");
44
+
45
+ // src/components/MobileDataGrid/dataGridReducer.ts
46
+ function dataGridReducer(state, action) {
47
+ var _a, _b, _c;
48
+ const { type, payload } = action;
49
+ let itemIndex = null;
50
+ if (action.type === "INSERT" && action.pos === "INDEX")
51
+ itemIndex = action.index;
52
+ if (action.type === "UPDATE")
53
+ itemIndex = (_a = action.index) != null ? _a : state.filter(({ id }) => !!id).findIndex(({ id }) => id === action.id);
54
+ switch (type) {
55
+ case "SET":
56
+ return [...payload];
57
+ case "UPDATE":
58
+ if (typeof itemIndex !== "number" || itemIndex < 0)
59
+ throw new Error("action.(id | index) must be provided.");
60
+ return [
61
+ ...state.slice(0, itemIndex),
62
+ __spreadProps(__spreadValues(__spreadValues({}, state[itemIndex]), payload), {
63
+ meta: __spreadValues(__spreadValues({}, (_b = state[itemIndex].meta) != null ? _b : {}), (_c = payload.meta) != null ? _c : {})
64
+ }),
65
+ ...state.slice(itemIndex + 1)
66
+ ];
67
+ default:
68
+ throw new Error("Action type not implemented.");
69
+ }
70
+ }
71
+
72
+ // src/components/MobileDataGrid/GridContextProvider/GridContext.tsx
73
+ var import_react = require("react");
74
+ var GridContext = (0, import_react.createContext)(null);
75
+
76
+ // src/components/MobileDataGrid/GridContextProvider/index.tsx
77
+ var import_jsx_runtime = require("react/jsx-runtime");
78
+ function GridContextProvider(props) {
79
+ const {
80
+ initialColumns,
81
+ id,
82
+ testid,
83
+ children,
84
+ data,
85
+ numberOfColumnsToShow,
86
+ primaryKey,
87
+ getId,
88
+ onRowSelect
89
+ } = props;
90
+ const [columns, dispatch] = (0, import_react2.useReducer)(dataGridReducer, initialColumns);
91
+ const [selectedRowIds, setSelectedRowIds] = (0, import_react2.useState)([]);
92
+ const [currentRow, setCurrentRow] = (0, import_react2.useState)(null);
93
+ const resetColumnVisibility = (0, import_react2.useCallback)(() => {
94
+ const newColumns = columns.map((column) => {
95
+ var _a;
96
+ const initialColumn = initialColumns.find((c) => c.id === column.id);
97
+ return __spreadProps(__spreadValues({}, column), {
98
+ meta: __spreadProps(__spreadValues({}, column.meta), {
99
+ visible: (_a = initialColumn == null ? void 0 : initialColumn.meta) == null ? void 0 : _a.visible
100
+ })
101
+ });
102
+ });
103
+ dispatch({ type: "SET", payload: newColumns });
104
+ }, [columns, initialColumns]);
105
+ const handleRowSelect = (0, import_react2.useCallback)(
106
+ (item) => {
107
+ var _a;
108
+ const rowId = (_a = getId(item)) != null ? _a : "";
109
+ if (!rowId) return;
110
+ const nextSelected = selectedRowIds.includes(rowId) ? selectedRowIds.filter((id2) => id2 !== rowId) : [...selectedRowIds, rowId];
111
+ setSelectedRowIds(nextSelected);
112
+ if (onRowSelect) onRowSelect(item, nextSelected);
113
+ },
114
+ [getId, onRowSelect, selectedRowIds]
115
+ );
116
+ const handleRowSelectAll = (0, import_react2.useCallback)(() => {
117
+ setSelectedRowIds((prev) => {
118
+ if (prev.length === data.length) {
119
+ return [];
120
+ }
121
+ return data.map(getId).filter((id2) => id2 !== void 0);
122
+ });
123
+ }, [data, getId]);
124
+ const openRowDetail = (0, import_react2.useCallback)((row) => {
125
+ setCurrentRow(row);
126
+ }, []);
127
+ const closeRowDetail = (0, import_react2.useCallback)(() => {
128
+ setCurrentRow(null);
129
+ }, []);
130
+ const visibleColumns = (0, import_react2.useMemo)(() => {
131
+ const effectiveLimit = typeof numberOfColumnsToShow === "number" ? Math.max(numberOfColumnsToShow - 1, 0) : void 0;
132
+ if (primaryKey) {
133
+ const pkColumn = columns.find((col) => col.id === String(primaryKey));
134
+ const otherColumns = columns.filter(
135
+ (col) => col.id !== String(primaryKey)
136
+ );
137
+ const orderedColumns = pkColumn ? [pkColumn, ...otherColumns] : [...otherColumns];
138
+ return orderedColumns.filter((x) => {
139
+ var _a;
140
+ return ((_a = x.meta) == null ? void 0 : _a.visible) !== false;
141
+ }).slice(0, effectiveLimit);
142
+ }
143
+ return columns.filter((x) => {
144
+ var _a;
145
+ return ((_a = x.meta) == null ? void 0 : _a.visible) !== false;
146
+ }).slice(0, effectiveLimit);
147
+ }, [columns, numberOfColumnsToShow, primaryKey]);
148
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
149
+ GridContext.Provider,
150
+ {
151
+ value: {
152
+ columns,
153
+ testid,
154
+ id,
155
+ data,
156
+ selectedRowIds,
157
+ visibleColumns,
158
+ numberOfColumnsToShow,
159
+ primaryKey,
160
+ dispatch,
161
+ getId,
162
+ resetColumnVisibility,
163
+ handleRowSelect,
164
+ handleRowSelectAll,
165
+ isRowDetailOpen: !!currentRow,
166
+ currentRow,
167
+ openRowDetail,
168
+ closeRowDetail
169
+ },
170
+ children
171
+ }
172
+ );
173
+ }
174
+ // Annotate the CommonJS export names for ESM import in node:
175
+ 0 && (module.exports = {
176
+ GridContextProvider
177
+ });
@@ -0,0 +1,8 @@
1
+ import {
2
+ GridContextProvider
3
+ } from "../../../chunk-M7INAUAJ.js";
4
+ import "../../../chunk-AJ5M6MVX.js";
5
+ import "../../../chunk-ORMEWXMH.js";
6
+ export {
7
+ GridContextProvider
8
+ };
@@ -0,0 +1,269 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __defProps = Object.defineProperties;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __getProtoOf = Object.getPrototypeOf;
10
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
11
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
+ var __spreadValues = (a, b) => {
14
+ for (var prop in b || (b = {}))
15
+ if (__hasOwnProp.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ if (__getOwnPropSymbols)
18
+ for (var prop of __getOwnPropSymbols(b)) {
19
+ if (__propIsEnum.call(b, prop))
20
+ __defNormalProp(a, prop, b[prop]);
21
+ }
22
+ return a;
23
+ };
24
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
+ var __objRest = (source, exclude) => {
26
+ var target = {};
27
+ for (var prop in source)
28
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
29
+ target[prop] = source[prop];
30
+ if (source != null && __getOwnPropSymbols)
31
+ for (var prop of __getOwnPropSymbols(source)) {
32
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
33
+ target[prop] = source[prop];
34
+ }
35
+ return target;
36
+ };
37
+ var __export = (target, all) => {
38
+ for (var name in all)
39
+ __defProp(target, name, { get: all[name], enumerable: true });
40
+ };
41
+ var __copyProps = (to, from, except, desc) => {
42
+ if (from && typeof from === "object" || typeof from === "function") {
43
+ for (let key of __getOwnPropNames(from))
44
+ if (!__hasOwnProp.call(to, key) && key !== except)
45
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
46
+ }
47
+ return to;
48
+ };
49
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
50
+ // If the importer is in node compatibility mode or this is not an ESM
51
+ // file that has been converted to a CommonJS file using a Babel-
52
+ // compatible transform (i.e. "__esModule" has not been set), then set
53
+ // "default" to the CommonJS "module.exports" for node compatibility.
54
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
55
+ mod
56
+ ));
57
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
58
+
59
+ // src/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.tsx
60
+ var MobileDataGridColumn_exports = {};
61
+ __export(MobileDataGridColumn_exports, {
62
+ MobileDataGridColumn: () => MobileDataGridColumn
63
+ });
64
+ module.exports = __toCommonJS(MobileDataGridColumn_exports);
65
+
66
+ // src/components/Paragraph.tsx
67
+ var import_clsx2 = __toESM(require("clsx"), 1);
68
+
69
+ // src/classNames.ts
70
+ var import_clsx = __toESM(require("clsx"), 1);
71
+ var typography = {
72
+ display1: (0, import_clsx.default)(
73
+ "font-sans font-semibold",
74
+ "text-display-1-mobile desktop:text-display-1-desktop compact:text-display-1-desktop-compact",
75
+ "leading-display-1-mobile desktop:leading-display-1-desktop"
76
+ ),
77
+ display2: (0, import_clsx.default)(
78
+ "font-sans font-bold",
79
+ "text-display-2-mobile desktop:text-display-2-desktop compact:text-display-2-desktop-compact",
80
+ "leading-display-2-mobile desktop:leading-display-2-desktop"
81
+ ),
82
+ heading1: (0, import_clsx.default)(
83
+ "font-sans font-semibold",
84
+ "text-heading-1-mobile desktop:text-heading-1-desktop compact:text-heading-1-desktop-compact",
85
+ "leading-heading-1-mobile desktop:leading-heading-1-desktop"
86
+ ),
87
+ heading2: (0, import_clsx.default)(
88
+ "font-sans font-normal",
89
+ "text-heading-2-mobile desktop:text-heading-2-desktop compact:text-heading-2-desktop-compact",
90
+ "leading-heading-2-mobile desktop:leading-heading-2-desktop"
91
+ ),
92
+ heading3: (0, import_clsx.default)(
93
+ "font-sans font-semibold",
94
+ "text-heading-3-mobile desktop:text-heading-3-desktop compact:text-heading-3-desktop-compact",
95
+ "leading-heading-3-mobile desktop:leading-heading-3-desktop"
96
+ ),
97
+ subheader: (0, import_clsx.default)(
98
+ "font-sans font-semibold",
99
+ "text-subheader-mobile desktop:text-subheader-desktop compact:text-subheader-desktop-compact",
100
+ "leading-subheader-mobile desktop:leading-subheader-desktop"
101
+ ),
102
+ link: (0, import_clsx.default)(
103
+ "font-sans font-normal",
104
+ "text-link-mobile desktop:text-link-desktop compact:text-link-desktop-compact",
105
+ "leading-link-mobile desktop:leading-link-desktop"
106
+ ),
107
+ buttonLabel: (0, import_clsx.default)(
108
+ "font-sans font-semibold",
109
+ "text-label-mobile desktop:text-label-desktop compact:text-label-desktop-compact",
110
+ "leading-label-mobile desktop:leading-label-desktop"
111
+ ),
112
+ label: (0, import_clsx.default)(
113
+ "font-sans font-semibold",
114
+ "text-label-mobile desktop:text-label-desktop compact:text-label-desktop-compact",
115
+ "leading-label-mobile desktop:leading-label-desktop"
116
+ ),
117
+ paragraph: (0, import_clsx.default)(
118
+ "font-sans font-normal",
119
+ "text-paragraph-mobile desktop:text-paragraph-desktop compact:text-paragraph-desktop-compact",
120
+ "leading-paragraph-mobile desktop:leading-paragraph-desktop"
121
+ ),
122
+ caption: (0, import_clsx.default)(
123
+ "font-sans font-normal",
124
+ "text-caption-mobile desktop:text-caption-desktop compact:text-caption-desktop-compact",
125
+ "leading-caption-mobile desktop:leading-caption-desktop"
126
+ ),
127
+ breadcrumb: (0, import_clsx.default)(
128
+ "font-sans font-normal",
129
+ "text-paragraph-mobile desktop:text-paragraph-desktop compact:text-paragraph-desktop-compact",
130
+ "leading-mobile-breadcrumb desktop:leading-desktop-breadcrumb"
131
+ )
132
+ };
133
+ var baseTransition = (0, import_clsx.default)(
134
+ "transition-colors duration-100 ease-in-out"
135
+ );
136
+ var componentGap = (0, import_clsx.default)(
137
+ "gap-mobile-component-gap desktop:gap-desktop-component-gap compact:gap-desktop-compact-component-gap"
138
+ );
139
+ var paddingUsingComponentGap = (0, import_clsx.default)(
140
+ "p-mobile-component-gap desktop:p-desktop-component-gap compact:p-desktop-compact-component-gap"
141
+ );
142
+ var paddingXUsingLayoutGroupGap = (0, import_clsx.default)(
143
+ "px-mobile-layout-group-gap desktop:px-desktop-layout-group-gap compact:px-desktop-compact-layout-group-gap"
144
+ );
145
+ var paddingYUsingLayoutGroupGap = (0, import_clsx.default)(
146
+ "py-mobile-layout-group-gap desktop:py-desktop-layout-group-gap compact:py-desktop-compact-layout-group-gap"
147
+ );
148
+ var componentPadding = (0, import_clsx.default)(
149
+ "p-mobile-component-padding desktop:p-desktop-component-padding compact:p-desktop-compact-component-padding"
150
+ );
151
+ var componentPaddingBottom = (0, import_clsx.default)(
152
+ "pb-mobile-component-padding desktop:pb-desktop-component-padding compact:pb-desktop-compact-component-padding"
153
+ );
154
+ var componentPaddingX = (0, import_clsx.default)(
155
+ "px-mobile-component-padding desktop:px-desktop-component-padding compact:px-desktop-compact-component-padding"
156
+ );
157
+ var componentPaddingY = (0, import_clsx.default)(
158
+ "py-mobile-component-padding desktop:py-desktop-component-padding compact:py-desktop-compact-component-padding"
159
+ );
160
+ var componentPaddingXUsingComponentGap = (0, import_clsx.default)(
161
+ "px-mobile-component-gap desktop:px-desktop-component-gap compact:px-desktop-compact-component-gap"
162
+ );
163
+ var componentPaddingYUsingComponentGap = (0, import_clsx.default)(
164
+ "py-mobile-component-gap desktop:py-desktop-component-gap compact:py-desktop-compact-component-gap"
165
+ );
166
+ var componentPaddingMinusBorder = (0, import_clsx.default)(
167
+ "p-[calc(var(--spacing-mobile-component-padding)_-_1px)] desktop:p-[calc(var(--spacing-desktop-component-padding)_-_1px)] compact:p-[calc(var(--spacing-desktop-compact-component-padding)_-_1px)]"
168
+ );
169
+ var componentPaddingMinus2pxBorder = (0, import_clsx.default)(
170
+ "p-[calc(var(--spacing-mobile-component-padding)_-_2px)] desktop:p-[calc(var(--spacing-desktop-component-padding)_-_2px)] compact:p-[calc(var(--spacing-desktop-compact-component-padding)_-_2px)]"
171
+ );
172
+ var layoutPaddding = (0, import_clsx.default)(
173
+ "p-mobile-layout-padding desktop:p-desktop-layout-padding compact:p-desktop-compact-layout-padding"
174
+ );
175
+ var layoutPaddingBottom = (0, import_clsx.default)(
176
+ "pb-mobile-layout-padding desktop:pb-desktop-layout-padding compact:pb-desktop-compact-layout-padding"
177
+ );
178
+ var layoutPaddingY = (0, import_clsx.default)(
179
+ "py-mobile-layout-padding desktop:py-desktop-layout-padding compact:py-desktop-compact-layout-padding"
180
+ );
181
+ var containerPaddingX = (0, import_clsx.default)(
182
+ "px-mobile-container-padding desktop:px-desktop-container-padding compact:px-desktop-compact-container-padding"
183
+ );
184
+ var containerPaddingY = (0, import_clsx.default)(
185
+ "py-mobile-container-padding desktop:py-desktop-container-padding compact:py-desktop-compact-container-padding"
186
+ );
187
+ var layoutGroupGapPaddingY = (0, import_clsx.default)(
188
+ "py-mobile-layout-group-gap desktop:py-desktop-layout-group-gap compact:py-desktop-compact-layout-group-gap"
189
+ );
190
+ var layoutGroupGap = (0, import_clsx.default)(
191
+ "gap-mobile-layout-group-gap desktop:gap-desktop-layout-group-gap compact:gap-desktop-compact-layout-group-gap"
192
+ );
193
+ var layoutGap = (0, import_clsx.default)(
194
+ "gap-mobile-layout-gap desktop:gap-desktop-layout-gap compact:gap-desktop-compact-layout-gap"
195
+ );
196
+ var gapUsingContainerPadding = (0, import_clsx.default)(
197
+ "gap-mobile-container-padding desktop:gap-desktop-container-padding compact:gap-desktop-compact-container-padding"
198
+ );
199
+
200
+ // src/components/Paragraph.tsx
201
+ var import_jsx_runtime = require("react/jsx-runtime");
202
+ var Paragraph = (_a) => {
203
+ var _b = _a, {
204
+ className,
205
+ color,
206
+ padded,
207
+ align = "left",
208
+ tall,
209
+ addOverflow,
210
+ children,
211
+ as = "p",
212
+ id,
213
+ testid
214
+ } = _b, props = __objRest(_b, [
215
+ "className",
216
+ "color",
217
+ "padded",
218
+ "align",
219
+ "tall",
220
+ "addOverflow",
221
+ "children",
222
+ "as",
223
+ "id",
224
+ "testid"
225
+ ]);
226
+ const Element = as;
227
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
228
+ Element,
229
+ __spreadProps(__spreadValues({
230
+ id,
231
+ "data-testid": testid
232
+ }, props), {
233
+ className: (0, import_clsx2.default)(
234
+ typography.paragraph,
235
+ className,
236
+ padded && componentPaddingXUsingComponentGap,
237
+ align === "left" && "text-left",
238
+ align === "center" && "text-center",
239
+ align === "right" && "text-right",
240
+ tall && "!leading-6",
241
+ addOverflow && "whitespace-nowrap text-ellipsis overflow-hidden"
242
+ ),
243
+ style: __spreadProps(__spreadValues({}, props.style), {
244
+ color: color ? `var(--color-${color})` : void 0
245
+ }),
246
+ children
247
+ })
248
+ );
249
+ };
250
+ Paragraph.displayName = "Paragraph";
251
+
252
+ // src/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.tsx
253
+ var import_jsx_runtime2 = require("react/jsx-runtime");
254
+ function MobileDataGridColumn(props) {
255
+ var _a;
256
+ const { column, data } = props;
257
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "mb-2 grid grid-cols-2 gap-2 px-3 flex-1", children: [
258
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Paragraph, { color: "text-secondary-normal", className: "text-left", children: [
259
+ (_a = column.header) == null ? void 0 : _a.toString(),
260
+ ":"
261
+ ] }),
262
+ " ",
263
+ column.id && data[column.id] ? data[column.id] : null
264
+ ] });
265
+ }
266
+ // Annotate the CommonJS export names for ESM import in node:
267
+ 0 && (module.exports = {
268
+ MobileDataGridColumn
269
+ });
@@ -0,0 +1,9 @@
1
+ import {
2
+ MobileDataGridColumn
3
+ } from "../../../chunk-M6TSTDNZ.js";
4
+ import "../../../chunk-OGIFIPKH.js";
5
+ import "../../../chunk-6CTCHYIS.js";
6
+ import "../../../chunk-ORMEWXMH.js";
7
+ export {
8
+ MobileDataGridColumn
9
+ };