@dmsi/wedgekit-react 0.0.561 → 0.0.562

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 (39) hide show
  1. package/dist/chunk-6MGHIYMP.js +42 -0
  2. package/dist/components/CalendarRange.cjs +58 -49
  3. package/dist/components/CalendarRange.js +3 -2
  4. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +26 -17
  5. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +3 -2
  6. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +36 -27
  7. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +3 -2
  8. package/dist/components/DataGrid/PinnedColumns.cjs +48 -39
  9. package/dist/components/DataGrid/PinnedColumns.js +3 -2
  10. package/dist/components/DataGrid/TableBody/LoadingCell.cjs +27 -18
  11. package/dist/components/DataGrid/TableBody/LoadingCell.js +3 -2
  12. package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +30 -21
  13. package/dist/components/DataGrid/TableBody/TableBodyRow.js +3 -2
  14. package/dist/components/DataGrid/TableBody/index.cjs +43 -34
  15. package/dist/components/DataGrid/TableBody/index.js +3 -2
  16. package/dist/components/DataGrid/index.cjs +123 -114
  17. package/dist/components/DataGrid/index.js +3 -2
  18. package/dist/components/DataGrid/utils.cjs +25 -16
  19. package/dist/components/DataGrid/utils.js +3 -2
  20. package/dist/components/DateInput.cjs +77 -68
  21. package/dist/components/DateInput.js +3 -2
  22. package/dist/components/DateRangeInput.cjs +77 -68
  23. package/dist/components/DateRangeInput.js +3 -2
  24. package/dist/components/EditingContext.cjs +8 -2
  25. package/dist/components/EditingContext.js +7 -32
  26. package/dist/components/MobileDataGrid/ColumnList.js +1 -1
  27. package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +34 -25
  28. package/dist/components/MobileDataGrid/ColumnSelector/index.js +3 -2
  29. package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +1 -1
  30. package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +42 -33
  31. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +3 -2
  32. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +1 -1
  33. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +1 -1
  34. package/dist/components/MobileDataGrid/index.cjs +136 -127
  35. package/dist/components/MobileDataGrid/index.js +3 -2
  36. package/dist/components/index.cjs +46 -31
  37. package/dist/components/index.js +7 -3
  38. package/package.json +1 -1
  39. /package/dist/{chunk-LKFYNRJZ.js → chunk-3JQPFWKR.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MobileDataGrid
3
- } from "../../chunk-LKFYNRJZ.js";
3
+ } from "../../chunk-3JQPFWKR.js";
4
4
  import "../../chunk-CJ7V4X6B.js";
5
5
  import "../../chunk-M7INAUAJ.js";
6
6
  import "../../chunk-7ZCXZDJD.js";
@@ -14,8 +14,8 @@ import "../../chunk-2IKT6IHB.js";
14
14
  import "../../chunk-RZ5EIDX4.js";
15
15
  import "../../chunk-AGHBLWDZ.js";
16
16
  import "../../chunk-5IFPG6TS.js";
17
- import "../../chunk-M4FM3B3R.js";
18
17
  import "../../chunk-AJ5M6MVX.js";
18
+ import "../../chunk-M4FM3B3R.js";
19
19
  import "../../chunk-AT4AWD6B.js";
20
20
  import "../../chunk-EWGHVZL5.js";
21
21
  import "../../chunk-I5BV7UPG.js";
@@ -32,6 +32,7 @@ import "../../chunk-EJOPJIRO.js";
32
32
  import "../../chunk-AG43RS4Q.js";
33
33
  import "../../chunk-QVWYTQKL.js";
34
34
  import "../../chunk-UAMI54FE.js";
35
+ import "../../chunk-6MGHIYMP.js";
35
36
  import "../../chunk-75USUR3I.js";
36
37
  import "../../chunk-BWPNXY7T.js";
37
38
  import "../../chunk-DWKS5ZXG.js";
@@ -91,7 +91,8 @@ __export(components_exports, {
91
91
  SimpleTable: () => SimpleTable,
92
92
  SkeletonParagraph: () => SkeletonParagraph,
93
93
  Subheader: () => Subheader,
94
- Tooltip: () => Tooltip
94
+ Tooltip: () => Tooltip,
95
+ useTableEditingContext: () => useTableEditingContext
95
96
  });
96
97
  module.exports = __toCommonJS(components_exports);
97
98
 
@@ -8127,12 +8128,25 @@ function OrderCheckIcon(props) {
8127
8128
  );
8128
8129
  }
8129
8130
 
8131
+ // src/components/EditingContext.tsx
8132
+ var import_react38 = require("react");
8133
+ var import_jsx_runtime63 = require("react/jsx-runtime");
8134
+ var EditingContext = (0, import_react38.createContext)({
8135
+ data: [],
8136
+ setData: () => {
8137
+ }
8138
+ });
8139
+ var useTableEditingContext = () => {
8140
+ const context = (0, import_react38.useContext)(EditingContext);
8141
+ return context;
8142
+ };
8143
+
8130
8144
  // src/components/AccessCard.tsx
8131
8145
  var import_clsx41 = __toESM(require("clsx"), 1);
8132
8146
 
8133
8147
  // src/components/Radio.tsx
8134
8148
  var import_clsx40 = __toESM(require("clsx"), 1);
8135
- var import_jsx_runtime63 = require("react/jsx-runtime");
8149
+ var import_jsx_runtime64 = require("react/jsx-runtime");
8136
8150
  var Radio = (_a) => {
8137
8151
  var _b = _a, {
8138
8152
  className,
@@ -8167,7 +8181,7 @@ var Radio = (_a) => {
8167
8181
  const readonlyClassName = (0, import_clsx40.default)(
8168
8182
  readOnly && "peer-read-only:bg-background-action-secondary-disabled peer-read-only:border-border-primary-normal peer-checked:border-0"
8169
8183
  );
8170
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
8184
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
8171
8185
  "label",
8172
8186
  {
8173
8187
  htmlFor: radioId,
@@ -8179,8 +8193,8 @@ var Radio = (_a) => {
8179
8193
  className
8180
8194
  ),
8181
8195
  children: [
8182
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "relative", children: [
8183
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
8196
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "relative", children: [
8197
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
8184
8198
  "input",
8185
8199
  __spreadValues({
8186
8200
  id: radioId,
@@ -8192,7 +8206,7 @@ var Radio = (_a) => {
8192
8206
  readOnly
8193
8207
  }, props)
8194
8208
  ),
8195
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
8209
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
8196
8210
  "div",
8197
8211
  {
8198
8212
  className: (0, import_clsx40.default)(
@@ -8203,7 +8217,7 @@ var Radio = (_a) => {
8203
8217
  disabledClassName,
8204
8218
  readonlyClassName
8205
8219
  ),
8206
- children: checked && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
8220
+ children: checked && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
8207
8221
  RadioIcon,
8208
8222
  {
8209
8223
  className: (0, import_clsx40.default)(
@@ -8218,14 +8232,14 @@ var Radio = (_a) => {
8218
8232
  }
8219
8233
  )
8220
8234
  ] }),
8221
- label && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Paragraph, { id: radioId ? `${radioId}-label` : void 0, testid: testid ? `${testid}-label` : void 0, padded: true, color: paragraphColor, children: label })
8235
+ label && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Paragraph, { id: radioId ? `${radioId}-label` : void 0, testid: testid ? `${testid}-label` : void 0, padded: true, color: paragraphColor, children: label })
8222
8236
  ]
8223
8237
  }
8224
8238
  );
8225
8239
  };
8226
8240
  Radio.displayName = "Radio";
8227
8241
  var RadioIcon = ({ className }) => {
8228
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
8242
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
8229
8243
  "svg",
8230
8244
  {
8231
8245
  className,
@@ -8235,7 +8249,7 @@ var RadioIcon = ({ className }) => {
8235
8249
  viewBox: "0 0 24 24",
8236
8250
  fill: "none",
8237
8251
  children: [
8238
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
8252
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
8239
8253
  "rect",
8240
8254
  {
8241
8255
  x: "1",
@@ -8247,7 +8261,7 @@ var RadioIcon = ({ className }) => {
8247
8261
  strokeWidth: "2"
8248
8262
  }
8249
8263
  ),
8250
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("rect", { x: "4", y: "4", width: "16", height: "16", rx: "8", fill: "currentColor" })
8264
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("rect", { x: "4", y: "4", width: "16", height: "16", rx: "8", fill: "currentColor" })
8251
8265
  ]
8252
8266
  }
8253
8267
  );
@@ -8255,7 +8269,7 @@ var RadioIcon = ({ className }) => {
8255
8269
  RadioIcon.displayName = "RadioIcon";
8256
8270
 
8257
8271
  // src/components/AccessCard.tsx
8258
- var import_jsx_runtime64 = require("react/jsx-runtime");
8272
+ var import_jsx_runtime65 = require("react/jsx-runtime");
8259
8273
  function AccessCard(props) {
8260
8274
  const {
8261
8275
  title,
@@ -8268,8 +8282,8 @@ function AccessCard(props) {
8268
8282
  error,
8269
8283
  unavailable
8270
8284
  } = props;
8271
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
8272
- /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
8285
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
8286
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
8273
8287
  "div",
8274
8288
  {
8275
8289
  "data-testid": testid,
@@ -8289,7 +8303,7 @@ function AccessCard(props) {
8289
8303
  onClick == null ? void 0 : onClick();
8290
8304
  },
8291
8305
  children: [
8292
- status === "granted" && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
8306
+ status === "granted" && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
8293
8307
  Radio,
8294
8308
  {
8295
8309
  testid: testid ? `${testid}-radio` : void 0,
@@ -8302,11 +8316,11 @@ function AccessCard(props) {
8302
8316
  }
8303
8317
  }
8304
8318
  ),
8305
- /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex flex-col gap-1 flex-1", children: [
8306
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Subheader, { children: title }),
8307
- description && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Caption, { color: "text-primary-normal", children: description })
8319
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex flex-col gap-1 flex-1", children: [
8320
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Subheader, { children: title }),
8321
+ description && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Caption, { color: "text-primary-normal", children: description })
8308
8322
  ] }),
8309
- !defaultGranted && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
8323
+ !defaultGranted && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
8310
8324
  Icon,
8311
8325
  {
8312
8326
  name: status === "granted" ? "remove" : "add"
@@ -8315,14 +8329,14 @@ function AccessCard(props) {
8315
8329
  ]
8316
8330
  }
8317
8331
  ),
8318
- error && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Caption, { style: "error", children: error })
8332
+ error && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Caption, { style: "error", children: error })
8319
8333
  ] });
8320
8334
  }
8321
8335
 
8322
8336
  // src/components/AccessCardGroup.tsx
8323
8337
  var import_clsx42 = __toESM(require("clsx"), 1);
8324
- var import_react38 = require("react");
8325
- var import_jsx_runtime65 = require("react/jsx-runtime");
8338
+ var import_react39 = require("react");
8339
+ var import_jsx_runtime66 = require("react/jsx-runtime");
8326
8340
  function AccessCardGroup(props) {
8327
8341
  const {
8328
8342
  title,
@@ -8335,9 +8349,9 @@ function AccessCardGroup(props) {
8335
8349
  testid,
8336
8350
  unavailable
8337
8351
  } = props;
8338
- const [expand, setExpand] = (0, import_react38.useState)(expanded);
8339
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { "data-testid": testid, className: "mb-mobile-layout-group-gap desktop:mb-desktop-layout-group-gap compact:mb-desktop-compact-layout-group-gap", children: [
8340
- /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
8352
+ const [expand, setExpand] = (0, import_react39.useState)(expanded);
8353
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { "data-testid": testid, className: "mb-mobile-layout-group-gap desktop:mb-desktop-layout-group-gap compact:mb-desktop-compact-layout-group-gap", children: [
8354
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
8341
8355
  "div",
8342
8356
  {
8343
8357
  className: (0, import_clsx42.default)(
@@ -8354,7 +8368,7 @@ function AccessCardGroup(props) {
8354
8368
  onClick == null ? void 0 : onClick();
8355
8369
  },
8356
8370
  children: [
8357
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
8371
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
8358
8372
  Icon,
8359
8373
  {
8360
8374
  name: "keyboard_arrow_down",
@@ -8364,8 +8378,8 @@ function AccessCardGroup(props) {
8364
8378
  )
8365
8379
  }
8366
8380
  ),
8367
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Subheader, { children: title }) }),
8368
- !hasDefault && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
8381
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Subheader, { children: title }) }),
8382
+ !hasDefault && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
8369
8383
  Icon,
8370
8384
  {
8371
8385
  name: status === "granted" ? "remove" : "add",
@@ -8378,14 +8392,14 @@ function AccessCardGroup(props) {
8378
8392
  ]
8379
8393
  }
8380
8394
  ),
8381
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
8395
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
8382
8396
  "div",
8383
8397
  {
8384
8398
  className: (0, import_clsx42.default)(
8385
8399
  "grid transition-all duration-300 ease-in-out",
8386
8400
  expand ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
8387
8401
  ),
8388
- children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "overflow-hidden -m-[3px] p-[4px]", children })
8402
+ children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "overflow-hidden -m-[3px] p-[4px]", children })
8389
8403
  }
8390
8404
  )
8391
8405
  ] });
@@ -8424,5 +8438,6 @@ function AccessCardGroup(props) {
8424
8438
  SimpleTable,
8425
8439
  SkeletonParagraph,
8426
8440
  Subheader,
8427
- Tooltip
8441
+ Tooltip,
8442
+ useTableEditingContext
8428
8443
  });
@@ -2,7 +2,7 @@ import {
2
2
  DataGrid,
3
3
  DateInput,
4
4
  MobileDataGrid
5
- } from "../chunk-LKFYNRJZ.js";
5
+ } from "../chunk-3JQPFWKR.js";
6
6
  import "../chunk-CJ7V4X6B.js";
7
7
  import "../chunk-M7INAUAJ.js";
8
8
  import "../chunk-7ZCXZDJD.js";
@@ -20,8 +20,8 @@ import "../chunk-2IKT6IHB.js";
20
20
  import "../chunk-RZ5EIDX4.js";
21
21
  import "../chunk-AGHBLWDZ.js";
22
22
  import "../chunk-5IFPG6TS.js";
23
- import "../chunk-M4FM3B3R.js";
24
23
  import "../chunk-AJ5M6MVX.js";
24
+ import "../chunk-M4FM3B3R.js";
25
25
  import "../chunk-AT4AWD6B.js";
26
26
  import "../chunk-EWGHVZL5.js";
27
27
  import {
@@ -52,6 +52,9 @@ import "../chunk-QVWYTQKL.js";
52
52
  import {
53
53
  ListGroup
54
54
  } from "../chunk-UAMI54FE.js";
55
+ import {
56
+ useTableEditingContext
57
+ } from "../chunk-6MGHIYMP.js";
55
58
  import {
56
59
  EmptyCartIcon
57
60
  } from "../chunk-75USUR3I.js";
@@ -156,5 +159,6 @@ export {
156
159
  SimpleTable,
157
160
  SkeletonParagraph,
158
161
  Subheader,
159
- Tooltip
162
+ Tooltip,
163
+ useTableEditingContext
160
164
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dmsi/wedgekit-react",
3
3
  "private": false,
4
- "version": "0.0.561",
4
+ "version": "0.0.562",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "build": "tsup",
File without changes