@dmsi/wedgekit-react 0.0.494 → 0.0.495

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 (70) hide show
  1. package/dist/{chunk-BYY2NTJH.js → chunk-2A7H5GVB.js} +2 -2
  2. package/dist/{chunk-IPAKWF2V.js → chunk-5R4C5F63.js} +13 -7
  3. package/dist/chunk-BTKWHCUE.js +137 -0
  4. package/dist/chunk-Y5GD2FJA.js +32 -0
  5. package/dist/{chunk-QBSEKZWX.js → chunk-ZKTHUXKS.js} +1 -1
  6. package/dist/components/CalendarRange.cjs +526 -398
  7. package/dist/components/CalendarRange.css +5 -0
  8. package/dist/components/CalendarRange.js +6 -4
  9. package/dist/components/Caption.cjs +6 -3
  10. package/dist/components/Caption.js +5 -129
  11. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +517 -389
  12. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.css +5 -0
  13. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +6 -4
  14. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +520 -392
  15. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.css +5 -0
  16. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +6 -4
  17. package/dist/components/DataGrid/PinnedColumns.cjs +521 -393
  18. package/dist/components/DataGrid/PinnedColumns.css +5 -0
  19. package/dist/components/DataGrid/PinnedColumns.js +6 -4
  20. package/dist/components/DataGrid/TableBody/LoadingCell.cjs +515 -387
  21. package/dist/components/DataGrid/TableBody/LoadingCell.css +5 -0
  22. package/dist/components/DataGrid/TableBody/LoadingCell.js +6 -4
  23. package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +516 -388
  24. package/dist/components/DataGrid/TableBody/TableBodyRow.css +5 -0
  25. package/dist/components/DataGrid/TableBody/TableBodyRow.js +6 -4
  26. package/dist/components/DataGrid/TableBody/index.cjs +516 -388
  27. package/dist/components/DataGrid/TableBody/index.css +5 -0
  28. package/dist/components/DataGrid/TableBody/index.js +6 -4
  29. package/dist/components/DataGrid/index.cjs +536 -408
  30. package/dist/components/DataGrid/index.css +5 -0
  31. package/dist/components/DataGrid/index.js +6 -4
  32. package/dist/components/DataGrid/utils.cjs +515 -387
  33. package/dist/components/DataGrid/utils.css +5 -0
  34. package/dist/components/DataGrid/utils.js +6 -4
  35. package/dist/components/DataGridCell.cjs +212 -88
  36. package/dist/components/DataGridCell.js +3 -2
  37. package/dist/components/DateInput.cjs +508 -380
  38. package/dist/components/DateInput.css +5 -0
  39. package/dist/components/DateInput.js +6 -4
  40. package/dist/components/DateRangeInput.cjs +514 -386
  41. package/dist/components/DateRangeInput.css +5 -0
  42. package/dist/components/DateRangeInput.js +6 -4
  43. package/dist/components/MenuOption.cjs +147 -23
  44. package/dist/components/MenuOption.js +2 -1
  45. package/dist/components/MobileDataGrid/ColumnList.js +1 -1
  46. package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +526 -398
  47. package/dist/components/MobileDataGrid/ColumnSelector/index.css +5 -0
  48. package/dist/components/MobileDataGrid/ColumnSelector/index.js +6 -4
  49. package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +1 -1
  50. package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +505 -377
  51. package/dist/components/MobileDataGrid/MobileDataGridHeader.css +5 -0
  52. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +6 -4
  53. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +1 -1
  54. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +1 -1
  55. package/dist/components/MobileDataGrid/index.cjs +560 -432
  56. package/dist/components/MobileDataGrid/index.css +5 -0
  57. package/dist/components/MobileDataGrid/index.js +6 -4
  58. package/dist/components/NestedMenu.cjs +170 -46
  59. package/dist/components/NestedMenu.js +2 -1
  60. package/dist/components/SearchResultImage/index.cjs +92 -0
  61. package/dist/components/SearchResultImage/index.js +8 -0
  62. package/dist/components/index.cjs +707 -556
  63. package/dist/components/index.css +5 -0
  64. package/dist/components/index.js +9 -4
  65. package/dist/index.css +5 -0
  66. package/package.json +1 -1
  67. package/src/components/Caption.tsx +3 -0
  68. package/src/components/MenuOption.tsx +16 -6
  69. package/src/components/SearchResultImage/index.tsx +39 -0
  70. package/src/components/index.ts +1 -0
@@ -4091,6 +4091,11 @@
4091
4091
  margin-top: var(--spacing-desktop-container-padding);
4092
4092
  }
4093
4093
  }
4094
+ .desktop\:mt-px {
4095
+ @container root (width >= 48rem) {
4096
+ margin-top: 1px;
4097
+ }
4098
+ }
4094
4099
  .desktop\:mb-desktop-container-padding {
4095
4100
  @container root (width >= 48rem) {
4096
4101
  margin-bottom: var(--spacing-desktop-container-padding);
@@ -1,10 +1,11 @@
1
1
  import {
2
2
  CalendarRange
3
- } from "../chunk-BYY2NTJH.js";
3
+ } from "../chunk-2A7H5GVB.js";
4
4
  import "../chunk-M7INAUAJ.js";
5
5
  import "../chunk-4Q7T4GJ2.js";
6
6
  import "../chunk-3DEYCNUE.js";
7
7
  import "../chunk-DYBJUTGK.js";
8
+ import "../chunk-Y5GD2FJA.js";
8
9
  import "../chunk-TPBEID5X.js";
9
10
  import "../chunk-B53XDCLO.js";
10
11
  import "../chunk-MBZ55T2D.js";
@@ -15,8 +16,8 @@ import "../chunk-BQNPOGD5.js";
15
16
  import "../chunk-QMSPTD6L.js";
16
17
  import "../chunk-XIXQUEYC.js";
17
18
  import "../chunk-5IFPG6TS.js";
18
- import "../chunk-KW6V7O3H.js";
19
19
  import "../chunk-AJ5M6MVX.js";
20
+ import "../chunk-KW6V7O3H.js";
20
21
  import "../chunk-JUFBGNWW.js";
21
22
  import "../chunk-YEZBNQZI.js";
22
23
  import "../chunk-S5ZJ3Q7P.js";
@@ -37,10 +38,10 @@ import "../chunk-6TYWM26K.js";
37
38
  import "../chunk-SBRRNFOP.js";
38
39
  import "../chunk-Y2GK27RX.js";
39
40
  import "../chunk-QVWYTQKL.js";
40
- import "../chunk-QBSEKZWX.js";
41
+ import "../chunk-ZKTHUXKS.js";
41
42
  import "../chunk-TCMOGTPB.js";
42
43
  import "../chunk-DVU5XV7L.js";
43
- import "../chunk-IPAKWF2V.js";
44
+ import "../chunk-5R4C5F63.js";
44
45
  import "../chunk-RQRR4FEF.js";
45
46
  import {
46
47
  InputBase
@@ -48,6 +49,7 @@ import {
48
49
  import "../chunk-AL5QIRY3.js";
49
50
  import "../chunk-WVUIIBRR.js";
50
51
  import "../chunk-75USUR3I.js";
52
+ import "../chunk-BTKWHCUE.js";
51
53
  import "../chunk-WEAVZEE4.js";
52
54
  import "../chunk-OZBB6RFM.js";
53
55
  import "../chunk-URYQ24NF.js";
@@ -63,7 +63,7 @@ __export(MenuOption_exports, {
63
63
  MenuOption: () => MenuOption
64
64
  });
65
65
  module.exports = __toCommonJS(MenuOption_exports);
66
- var import_clsx5 = __toESM(require("clsx"), 1);
66
+ var import_clsx6 = __toESM(require("clsx"), 1);
67
67
  var import_react5 = require("react");
68
68
 
69
69
  // src/classNames.ts
@@ -363,8 +363,130 @@ var LocalStoragePrefixVersion = `dmsi-acc-v1.1`;
363
363
  var import_react4 = require("react");
364
364
  var LocalStoragePrefix = `${LocalStoragePrefixVersion}-tableLayout`;
365
365
 
366
- // src/components/MenuOption.tsx
366
+ // src/components/Caption.tsx
367
+ var import_clsx5 = __toESM(require("clsx"), 1);
367
368
  var import_jsx_runtime4 = require("react/jsx-runtime");
369
+ var Caption = (_a) => {
370
+ var _b = _a, {
371
+ className,
372
+ children,
373
+ as = "span",
374
+ style = "default",
375
+ color,
376
+ align,
377
+ id,
378
+ testid,
379
+ marginTopDesktop
380
+ } = _b, props = __objRest(_b, [
381
+ "className",
382
+ "children",
383
+ "as",
384
+ "style",
385
+ "color",
386
+ "align",
387
+ "id",
388
+ "testid",
389
+ "marginTopDesktop"
390
+ ]);
391
+ const Element = as;
392
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { id, "data-testid": testid, className: "flex gap-1", children: [
393
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
394
+ WhichIcon,
395
+ {
396
+ id,
397
+ testid,
398
+ style,
399
+ size: 16,
400
+ className: "mt-[3px] desktop:mt-0"
401
+ }
402
+ ),
403
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
404
+ Element,
405
+ __spreadProps(__spreadValues({
406
+ id: id ? `${id}-text` : void 0,
407
+ "data-testid": testid ? `${testid}-text` : void 0,
408
+ className: (0, import_clsx5.default)(
409
+ typography.caption.replace("text-text-primary-normal", ""),
410
+ (style === "default" || style === "info") && "text-text-secondary-normal",
411
+ style === "success" && "text-text-success-normal",
412
+ style === "warning" && "text-text-warning-normal",
413
+ style === "error" && "text-text-critical-normal",
414
+ align === "left" && "text-left",
415
+ align === "center" && "text-center",
416
+ align === "right" && "text-right",
417
+ className,
418
+ marginTopDesktop && `desktop:mt-px`
419
+ )
420
+ }, props), {
421
+ style: {
422
+ color: color ? `var(--color-${color})` : void 0
423
+ },
424
+ children
425
+ })
426
+ )
427
+ ] });
428
+ };
429
+ var WhichIcon = ({
430
+ style,
431
+ size,
432
+ className,
433
+ id,
434
+ testid
435
+ }) => {
436
+ if (style === "success") {
437
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-icon-success-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
438
+ Icon,
439
+ {
440
+ id: id ? `${id}-icon` : void 0,
441
+ testid: testid ? `${testid}-icon` : void 0,
442
+ className,
443
+ name: "check_circle",
444
+ size
445
+ }
446
+ ) });
447
+ }
448
+ if (style === "warning") {
449
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-icon-warning-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
450
+ Icon,
451
+ {
452
+ id: id ? `${id}-icon` : void 0,
453
+ testid: testid ? `${testid}-icon` : void 0,
454
+ className,
455
+ name: "warning",
456
+ size
457
+ }
458
+ ) });
459
+ }
460
+ if (style === "error") {
461
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-icon-critical-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
462
+ Icon,
463
+ {
464
+ id: id ? `${id}-icon` : void 0,
465
+ testid: testid ? `${testid}-icon` : void 0,
466
+ className,
467
+ name: "info",
468
+ size
469
+ }
470
+ ) });
471
+ }
472
+ if (style === "info") {
473
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
474
+ Icon,
475
+ {
476
+ id: id ? `${id}-icon` : void 0,
477
+ testid: testid ? `${testid}-icon` : void 0,
478
+ className,
479
+ name: "info",
480
+ size
481
+ }
482
+ ) });
483
+ }
484
+ return null;
485
+ };
486
+ Caption.displayName = "Caption";
487
+
488
+ // src/components/MenuOption.tsx
489
+ var import_jsx_runtime5 = require("react/jsx-runtime");
368
490
  var MenuOption = ({
369
491
  id,
370
492
  testid,
@@ -389,7 +511,8 @@ var MenuOption = ({
389
511
  mobilePositionTo,
390
512
  highlightMatchingText = false,
391
513
  menuValue,
392
- onMouseMove
514
+ onMouseMove,
515
+ small = false
393
516
  }) => {
394
517
  const uniqueId = (0, import_react5.useId)();
395
518
  const internalRef = (0, import_react5.useRef)(null);
@@ -419,47 +542,48 @@ var MenuOption = ({
419
542
  const additionalAttributes = {
420
543
  "data-selected": selected || null
421
544
  };
422
- const svgStyles = (0, import_clsx5.default)(
545
+ const svgStyles = (0, import_clsx6.default)(
423
546
  "[&>svg]:shrink-0 [&>svg]:fill-icon-action-primary-normal"
424
547
  );
425
- const textLabelStyles = (0, import_clsx5.default)("w-full whitespace-nowrap !leading-6");
426
- const normalStyles = variant === "normal" && !disabled && (0, import_clsx5.default)(
548
+ const textLabelStyles = (0, import_clsx6.default)("w-full whitespace-nowrap !leading-6");
549
+ const normalStyles = variant === "normal" && !disabled && (0, import_clsx6.default)(
427
550
  "bg-transparent text-text-primary-normal",
428
551
  "hover:bg-background-action-secondary-hover",
429
552
  "focus:bg-background-action-secondary-hover",
430
553
  "data-selected:bg-background-action-secondary-hover",
431
554
  "active:bg-background-action-secondary-active"
432
555
  );
433
- const normalDisabledStyles = variant === "normal" && disabled && (0, import_clsx5.default)("text-text-primary-disabled");
434
- const actionStyles = variant === "action" && !disabled && (0, import_clsx5.default)(
556
+ const normalDisabledStyles = variant === "normal" && disabled && (0, import_clsx6.default)("text-text-primary-disabled");
557
+ const actionStyles = variant === "action" && !disabled && (0, import_clsx6.default)(
435
558
  "text-action-400 bg-transparent",
436
559
  "hover:bg-background-action-secondary-hover hover:text-text-action-hover",
437
560
  "focus:bg-background-action-secondary-hover focus:text-text-action-hover",
438
561
  "data-selected:bg-background-action-secondary-active data-selected:text-text-action-active",
439
562
  "active:bg-background-action-secondary-active active:text-text-action-active"
440
563
  );
441
- const actionDisabledStyles = variant === "action" && disabled && (0, import_clsx5.default)("text-text-action-disabled");
442
- const disabledStyles = disabled && (0, import_clsx5.default)("bg-transparent cursor-default pointer-events-none");
564
+ const actionDisabledStyles = variant === "action" && disabled && (0, import_clsx6.default)("text-text-action-disabled");
565
+ const disabledStyles = disabled && (0, import_clsx6.default)("bg-transparent cursor-default pointer-events-none");
443
566
  const processChildren = typeof children === "string" && highlightMatchingText ? highlightMatch(children, menuValue) : children;
444
- const renderChildren = typeof children === "object" ? children : variant === "action" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Label, { padded: true, className: textLabelStyles, children: processChildren }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Paragraph, { padded: true, className: textLabelStyles, children: processChildren });
445
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
446
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
567
+ const renderChildren = typeof children === "object" ? children : variant === "action" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Label, { padded: true, className: textLabelStyles, children: processChildren }) : !small ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Paragraph, { padded: true, className: textLabelStyles, children: processChildren }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Caption, { padded: true, className: textLabelStyles, children: processChildren });
568
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
569
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
447
570
  "div",
448
571
  __spreadProps(__spreadValues({
449
572
  id,
450
573
  "data-testid": testid,
451
574
  ref: actualRef,
452
- className: (0, import_clsx5.default)(
453
- "flex items-center cursor-pointer w-full text-left relative outline-none",
575
+ className: (0, import_clsx6.default)(
576
+ "flex cursor-pointer w-full text-left relative outline-none",
454
577
  svgStyles,
455
- componentGap,
578
+ small ? layoutGroupGap : componentGap,
456
579
  componentPadding,
457
580
  baseTransition,
458
581
  normalStyles,
459
582
  normalDisabledStyles,
460
583
  actionStyles,
461
584
  actionDisabledStyles,
462
- disabledStyles
585
+ disabledStyles,
586
+ { "items-center": !small }
463
587
  ),
464
588
  "data-value": value || children,
465
589
  onClick: () => {
@@ -476,13 +600,13 @@ var MenuOption = ({
476
600
  role: "menuitem",
477
601
  "aria-haspopup": subMenu ? "menu" : void 0,
478
602
  children: [
479
- before && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "shrink-0 flex items-center", children: before }),
603
+ before && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: (0, import_clsx6.default)("shrink-0", { "items-center flex": !small }), children: before }),
480
604
  renderChildren,
481
605
  renderAfterProp()
482
606
  ]
483
607
  })
484
608
  ),
485
- subMenu && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
609
+ subMenu && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
486
610
  "div",
487
611
  {
488
612
  onMouseEnter: handleSubMenuEnter,
@@ -506,14 +630,14 @@ var MenuOption = ({
506
630
  return after;
507
631
  }
508
632
  if (subMenu && after !== null) {
509
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: "chevron_right" });
633
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, { name: "chevron_right" });
510
634
  }
511
635
  }
512
636
  function mobileBackMenuOption() {
513
637
  if (!isMobile) {
514
638
  return;
515
639
  }
516
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
640
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
517
641
  MenuOption,
518
642
  {
519
643
  id: id ? `${id}-back` : void 0,
@@ -522,7 +646,7 @@ var MenuOption = ({
522
646
  closeSubMenuLevel == null ? void 0 : closeSubMenuLevel(currentSubMenuLevel != null ? currentSubMenuLevel : 0);
523
647
  },
524
648
  variant: "action",
525
- before: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: "chevron_left" }),
649
+ before: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, { name: "chevron_left" }),
526
650
  children: "Back"
527
651
  }
528
652
  );
@@ -539,7 +663,7 @@ function highlightMatch(text, searchValue) {
539
663
  );
540
664
  const parts = text.split(regex);
541
665
  return parts.map(
542
- (part, index) => regex.test(part) ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "font-bold", children: part }, index) : part
666
+ (part, index) => regex.test(part) ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "font-bold", children: part }, index) : part
543
667
  );
544
668
  }
545
669
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,8 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  MenuOption
4
- } from "../chunk-IPAKWF2V.js";
4
+ } from "../chunk-5R4C5F63.js";
5
5
  import "../chunk-AL5QIRY3.js";
6
+ import "../chunk-BTKWHCUE.js";
6
7
  import "../chunk-URYQ24NF.js";
7
8
  import "../chunk-VXWSAIB5.js";
8
9
  import "../chunk-R3EQIDBX.js";
@@ -3,8 +3,8 @@ import {
3
3
  } from "../../chunk-QMSPTD6L.js";
4
4
  import "../../chunk-XIXQUEYC.js";
5
5
  import "../../chunk-5IFPG6TS.js";
6
- import "../../chunk-KW6V7O3H.js";
7
6
  import "../../chunk-AJ5M6MVX.js";
7
+ import "../../chunk-KW6V7O3H.js";
8
8
  import "../../chunk-WEAVZEE4.js";
9
9
  import "../../chunk-UCJUC5AZ.js";
10
10
  import "../../chunk-ZSETMD4A.js";