@dmsi/wedgekit-react 0.0.494 → 0.0.496

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 (75) 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-ETAEB3TA.js → chunk-L3BXRDLP.js} +8 -2
  5. package/dist/chunk-Y5GD2FJA.js +32 -0
  6. package/dist/{chunk-QBSEKZWX.js → chunk-ZKTHUXKS.js} +1 -1
  7. package/dist/components/CalendarRange.cjs +526 -398
  8. package/dist/components/CalendarRange.css +26 -3
  9. package/dist/components/CalendarRange.js +7 -5
  10. package/dist/components/Caption.cjs +6 -3
  11. package/dist/components/Caption.js +5 -129
  12. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +517 -389
  13. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.css +26 -3
  14. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +7 -5
  15. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +520 -392
  16. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.css +26 -3
  17. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +7 -5
  18. package/dist/components/DataGrid/PinnedColumns.cjs +521 -393
  19. package/dist/components/DataGrid/PinnedColumns.css +26 -3
  20. package/dist/components/DataGrid/PinnedColumns.js +7 -5
  21. package/dist/components/DataGrid/TableBody/LoadingCell.cjs +515 -387
  22. package/dist/components/DataGrid/TableBody/LoadingCell.css +26 -3
  23. package/dist/components/DataGrid/TableBody/LoadingCell.js +7 -5
  24. package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +516 -388
  25. package/dist/components/DataGrid/TableBody/TableBodyRow.css +26 -3
  26. package/dist/components/DataGrid/TableBody/TableBodyRow.js +7 -5
  27. package/dist/components/DataGrid/TableBody/index.cjs +516 -388
  28. package/dist/components/DataGrid/TableBody/index.css +26 -3
  29. package/dist/components/DataGrid/TableBody/index.js +7 -5
  30. package/dist/components/DataGrid/index.cjs +536 -408
  31. package/dist/components/DataGrid/index.css +26 -3
  32. package/dist/components/DataGrid/index.js +7 -5
  33. package/dist/components/DataGrid/utils.cjs +515 -387
  34. package/dist/components/DataGrid/utils.css +26 -3
  35. package/dist/components/DataGrid/utils.js +7 -5
  36. package/dist/components/DataGridCell.cjs +212 -88
  37. package/dist/components/DataGridCell.js +3 -2
  38. package/dist/components/DateInput.cjs +508 -380
  39. package/dist/components/DateInput.css +26 -3
  40. package/dist/components/DateInput.js +7 -5
  41. package/dist/components/DateRangeInput.cjs +514 -386
  42. package/dist/components/DateRangeInput.css +26 -3
  43. package/dist/components/DateRangeInput.js +7 -5
  44. package/dist/components/MenuOption.cjs +147 -23
  45. package/dist/components/MenuOption.js +2 -1
  46. package/dist/components/MobileDataGrid/ColumnList.js +1 -1
  47. package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +526 -398
  48. package/dist/components/MobileDataGrid/ColumnSelector/index.css +26 -3
  49. package/dist/components/MobileDataGrid/ColumnSelector/index.js +7 -5
  50. package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +1 -1
  51. package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +505 -377
  52. package/dist/components/MobileDataGrid/MobileDataGridHeader.css +26 -3
  53. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +7 -5
  54. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +1 -1
  55. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +1 -1
  56. package/dist/components/MobileDataGrid/index.cjs +560 -432
  57. package/dist/components/MobileDataGrid/index.css +26 -3
  58. package/dist/components/MobileDataGrid/index.js +7 -5
  59. package/dist/components/NestedMenu.cjs +170 -46
  60. package/dist/components/NestedMenu.js +2 -1
  61. package/dist/components/SearchResultImage/index.cjs +92 -0
  62. package/dist/components/SearchResultImage/index.js +8 -0
  63. package/dist/components/SkeletonParagraph.cjs +8 -2
  64. package/dist/components/SkeletonParagraph.js +1 -1
  65. package/dist/components/index.cjs +715 -558
  66. package/dist/components/index.css +26 -3
  67. package/dist/components/index.js +10 -5
  68. package/dist/index.css +26 -3
  69. package/package.json +1 -1
  70. package/src/components/Caption.tsx +3 -0
  71. package/src/components/MenuOption.tsx +16 -6
  72. package/src/components/SearchResultImage/index.tsx +39 -0
  73. package/src/components/SkeletonParagraph.tsx +9 -1
  74. package/src/components/index.ts +1 -0
  75. package/src/index.css +4 -3
@@ -24,13 +24,13 @@ import {
24
24
  DataGridCell,
25
25
  DragAlongCell,
26
26
  DraggableCellHeader
27
- } from "./chunk-QBSEKZWX.js";
27
+ } from "./chunk-ZKTHUXKS.js";
28
28
  import {
29
29
  Menu
30
30
  } from "./chunk-TCMOGTPB.js";
31
31
  import {
32
32
  MenuOption
33
- } from "./chunk-IPAKWF2V.js";
33
+ } from "./chunk-5R4C5F63.js";
34
34
  import {
35
35
  Search
36
36
  } from "./chunk-RQRR4FEF.js";
@@ -1,6 +1,9 @@
1
1
  import {
2
2
  Label
3
3
  } from "./chunk-AL5QIRY3.js";
4
+ import {
5
+ Caption
6
+ } from "./chunk-BTKWHCUE.js";
4
7
  import {
5
8
  useMatchesMobile
6
9
  } from "./chunk-URYQ24NF.js";
@@ -13,7 +16,8 @@ import {
13
16
  import {
14
17
  baseTransition,
15
18
  componentGap,
16
- componentPadding
19
+ componentPadding,
20
+ layoutGroupGap
17
21
  } from "./chunk-IXR65MOU.js";
18
22
  import {
19
23
  __spreadProps,
@@ -48,7 +52,8 @@ var MenuOption = ({
48
52
  mobilePositionTo,
49
53
  highlightMatchingText = false,
50
54
  menuValue,
51
- onMouseMove
55
+ onMouseMove,
56
+ small = false
52
57
  }) => {
53
58
  const uniqueId = useId();
54
59
  const internalRef = useRef(null);
@@ -100,7 +105,7 @@ var MenuOption = ({
100
105
  const actionDisabledStyles = variant === "action" && disabled && clsx("text-text-action-disabled");
101
106
  const disabledStyles = disabled && clsx("bg-transparent cursor-default pointer-events-none");
102
107
  const processChildren = typeof children === "string" && highlightMatchingText ? highlightMatch(children, menuValue) : children;
103
- const renderChildren = typeof children === "object" ? children : variant === "action" ? /* @__PURE__ */ jsx(Label, { padded: true, className: textLabelStyles, children: processChildren }) : /* @__PURE__ */ jsx(Paragraph, { padded: true, className: textLabelStyles, children: processChildren });
108
+ const renderChildren = typeof children === "object" ? children : variant === "action" ? /* @__PURE__ */ jsx(Label, { padded: true, className: textLabelStyles, children: processChildren }) : !small ? /* @__PURE__ */ jsx(Paragraph, { padded: true, className: textLabelStyles, children: processChildren }) : /* @__PURE__ */ jsx(Caption, { padded: true, className: textLabelStyles, children: processChildren });
104
109
  return /* @__PURE__ */ jsxs(Fragment, { children: [
105
110
  /* @__PURE__ */ jsxs(
106
111
  "div",
@@ -109,16 +114,17 @@ var MenuOption = ({
109
114
  "data-testid": testid,
110
115
  ref: actualRef,
111
116
  className: clsx(
112
- "flex items-center cursor-pointer w-full text-left relative outline-none",
117
+ "flex cursor-pointer w-full text-left relative outline-none",
113
118
  svgStyles,
114
- componentGap,
119
+ small ? layoutGroupGap : componentGap,
115
120
  componentPadding,
116
121
  baseTransition,
117
122
  normalStyles,
118
123
  normalDisabledStyles,
119
124
  actionStyles,
120
125
  actionDisabledStyles,
121
- disabledStyles
126
+ disabledStyles,
127
+ { "items-center": !small }
122
128
  ),
123
129
  "data-value": value || children,
124
130
  onClick: () => {
@@ -135,7 +141,7 @@ var MenuOption = ({
135
141
  role: "menuitem",
136
142
  "aria-haspopup": subMenu ? "menu" : void 0,
137
143
  children: [
138
- before && /* @__PURE__ */ jsx("div", { className: "shrink-0 flex items-center", children: before }),
144
+ before && /* @__PURE__ */ jsx("div", { className: clsx("shrink-0", { "items-center flex": !small }), children: before }),
139
145
  renderChildren,
140
146
  renderAfterProp()
141
147
  ]
@@ -0,0 +1,137 @@
1
+ import {
2
+ Icon
3
+ } from "./chunk-NKUETCDA.js";
4
+ import {
5
+ typography
6
+ } from "./chunk-IXR65MOU.js";
7
+ import {
8
+ __objRest,
9
+ __spreadProps,
10
+ __spreadValues
11
+ } from "./chunk-ORMEWXMH.js";
12
+
13
+ // src/components/Caption.tsx
14
+ import clsx from "clsx";
15
+ import { jsx, jsxs } from "react/jsx-runtime";
16
+ var Caption = (_a) => {
17
+ var _b = _a, {
18
+ className,
19
+ children,
20
+ as = "span",
21
+ style = "default",
22
+ color,
23
+ align,
24
+ id,
25
+ testid,
26
+ marginTopDesktop
27
+ } = _b, props = __objRest(_b, [
28
+ "className",
29
+ "children",
30
+ "as",
31
+ "style",
32
+ "color",
33
+ "align",
34
+ "id",
35
+ "testid",
36
+ "marginTopDesktop"
37
+ ]);
38
+ const Element = as;
39
+ return /* @__PURE__ */ jsxs("div", { id, "data-testid": testid, className: "flex gap-1", children: [
40
+ /* @__PURE__ */ jsx(
41
+ WhichIcon,
42
+ {
43
+ id,
44
+ testid,
45
+ style,
46
+ size: 16,
47
+ className: "mt-[3px] desktop:mt-0"
48
+ }
49
+ ),
50
+ /* @__PURE__ */ jsx(
51
+ Element,
52
+ __spreadProps(__spreadValues({
53
+ id: id ? `${id}-text` : void 0,
54
+ "data-testid": testid ? `${testid}-text` : void 0,
55
+ className: clsx(
56
+ typography.caption.replace("text-text-primary-normal", ""),
57
+ (style === "default" || style === "info") && "text-text-secondary-normal",
58
+ style === "success" && "text-text-success-normal",
59
+ style === "warning" && "text-text-warning-normal",
60
+ style === "error" && "text-text-critical-normal",
61
+ align === "left" && "text-left",
62
+ align === "center" && "text-center",
63
+ align === "right" && "text-right",
64
+ className,
65
+ marginTopDesktop && `desktop:mt-px`
66
+ )
67
+ }, props), {
68
+ style: {
69
+ color: color ? `var(--color-${color})` : void 0
70
+ },
71
+ children
72
+ })
73
+ )
74
+ ] });
75
+ };
76
+ var WhichIcon = ({
77
+ style,
78
+ size,
79
+ className,
80
+ id,
81
+ testid
82
+ }) => {
83
+ if (style === "success") {
84
+ return /* @__PURE__ */ jsx("span", { className: "text-icon-success-normal contents", children: /* @__PURE__ */ jsx(
85
+ Icon,
86
+ {
87
+ id: id ? `${id}-icon` : void 0,
88
+ testid: testid ? `${testid}-icon` : void 0,
89
+ className,
90
+ name: "check_circle",
91
+ size
92
+ }
93
+ ) });
94
+ }
95
+ if (style === "warning") {
96
+ return /* @__PURE__ */ jsx("span", { className: "text-icon-warning-normal contents", children: /* @__PURE__ */ jsx(
97
+ Icon,
98
+ {
99
+ id: id ? `${id}-icon` : void 0,
100
+ testid: testid ? `${testid}-icon` : void 0,
101
+ className,
102
+ name: "warning",
103
+ size
104
+ }
105
+ ) });
106
+ }
107
+ if (style === "error") {
108
+ return /* @__PURE__ */ jsx("span", { className: "text-icon-critical-normal contents", children: /* @__PURE__ */ jsx(
109
+ Icon,
110
+ {
111
+ id: id ? `${id}-icon` : void 0,
112
+ testid: testid ? `${testid}-icon` : void 0,
113
+ className,
114
+ name: "info",
115
+ size
116
+ }
117
+ ) });
118
+ }
119
+ if (style === "info") {
120
+ return /* @__PURE__ */ jsx("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ jsx(
121
+ Icon,
122
+ {
123
+ id: id ? `${id}-icon` : void 0,
124
+ testid: testid ? `${testid}-icon` : void 0,
125
+ className,
126
+ name: "info",
127
+ size
128
+ }
129
+ ) });
130
+ }
131
+ return null;
132
+ };
133
+ Caption.displayName = "Caption";
134
+
135
+ export {
136
+ Caption
137
+ };
@@ -2,14 +2,20 @@
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  function SkeletonParagraph({
4
4
  className = "",
5
- heightClassName = "h-6"
5
+ heightClassName = "h-6",
6
+ size = "large"
6
7
  }) {
8
+ const sizeClassMap = {
9
+ small: "min-w-10 w-1/4",
10
+ medium: "min-w-20 w-1/2",
11
+ large: "min-w-32 w-full"
12
+ };
7
13
  return /* @__PURE__ */ jsx(
8
14
  "div",
9
15
  {
10
16
  "aria-label": "Loading content",
11
17
  role: "status",
12
- className: `skeleton-paragraph ${heightClassName} w-full min-w-32 rounded-xs ${className}`
18
+ className: `skeleton-paragraph ${heightClassName} ${sizeClassMap[size]} rounded-xs ${className}`
13
19
  }
14
20
  );
15
21
  }
@@ -0,0 +1,32 @@
1
+ import {
2
+ ImagePlaceholder
3
+ } from "./chunk-QVWYTQKL.js";
4
+
5
+ // src/components/SearchResultImage/index.tsx
6
+ import { useState } from "react";
7
+ import { Fragment, jsx } from "react/jsx-runtime";
8
+ function SearchResultImage({
9
+ width = 20,
10
+ height = 20,
11
+ src,
12
+ alt
13
+ }) {
14
+ const [imageError, setImageError] = useState(false);
15
+ const showPlaceholder = imageError || !src;
16
+ return /* @__PURE__ */ jsx(Fragment, { children: showPlaceholder ? /* @__PURE__ */ jsx(ImagePlaceholder, { width, height }) : /* @__PURE__ */ jsx(
17
+ "img",
18
+ {
19
+ src,
20
+ alt,
21
+ width,
22
+ height,
23
+ draggable: false,
24
+ loading: "lazy",
25
+ onError: () => setImageError(true)
26
+ }
27
+ ) });
28
+ }
29
+
30
+ export {
31
+ SearchResultImage
32
+ };
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-DVU5XV7L.js";
7
7
  import {
8
8
  MenuOption
9
- } from "./chunk-IPAKWF2V.js";
9
+ } from "./chunk-5R4C5F63.js";
10
10
  import {
11
11
  Search
12
12
  } from "./chunk-RQRR4FEF.js";