@dmsi/wedgekit-react 0.0.493 → 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.
- package/dist/{chunk-BYY2NTJH.js → chunk-2A7H5GVB.js} +2 -2
- package/dist/{chunk-IPAKWF2V.js → chunk-5R4C5F63.js} +13 -7
- package/dist/chunk-BTKWHCUE.js +137 -0
- package/dist/chunk-Y5GD2FJA.js +32 -0
- package/dist/{chunk-QBSEKZWX.js → chunk-ZKTHUXKS.js} +1 -1
- package/dist/components/CalendarRange.cjs +526 -398
- package/dist/components/CalendarRange.css +5 -0
- package/dist/components/CalendarRange.js +6 -4
- package/dist/components/Caption.cjs +6 -3
- package/dist/components/Caption.js +5 -129
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +517 -389
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.css +5 -0
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +6 -4
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +520 -392
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.css +5 -0
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +6 -4
- package/dist/components/DataGrid/PinnedColumns.cjs +521 -393
- package/dist/components/DataGrid/PinnedColumns.css +5 -0
- package/dist/components/DataGrid/PinnedColumns.js +6 -4
- package/dist/components/DataGrid/TableBody/LoadingCell.cjs +515 -387
- package/dist/components/DataGrid/TableBody/LoadingCell.css +5 -0
- package/dist/components/DataGrid/TableBody/LoadingCell.js +6 -4
- package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +516 -388
- package/dist/components/DataGrid/TableBody/TableBodyRow.css +5 -0
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +6 -4
- package/dist/components/DataGrid/TableBody/index.cjs +516 -388
- package/dist/components/DataGrid/TableBody/index.css +5 -0
- package/dist/components/DataGrid/TableBody/index.js +6 -4
- package/dist/components/DataGrid/index.cjs +536 -408
- package/dist/components/DataGrid/index.css +5 -0
- package/dist/components/DataGrid/index.js +6 -4
- package/dist/components/DataGrid/utils.cjs +515 -387
- package/dist/components/DataGrid/utils.css +5 -0
- package/dist/components/DataGrid/utils.js +6 -4
- package/dist/components/DataGridCell.cjs +212 -88
- package/dist/components/DataGridCell.js +3 -2
- package/dist/components/DateInput.cjs +508 -380
- package/dist/components/DateInput.css +5 -0
- package/dist/components/DateInput.js +6 -4
- package/dist/components/DateRangeInput.cjs +514 -386
- package/dist/components/DateRangeInput.css +5 -0
- package/dist/components/DateRangeInput.js +6 -4
- package/dist/components/MenuOption.cjs +147 -23
- package/dist/components/MenuOption.js +2 -1
- package/dist/components/MobileDataGrid/ColumnList.js +1 -1
- package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +526 -398
- package/dist/components/MobileDataGrid/ColumnSelector/index.css +5 -0
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +6 -4
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +1 -1
- package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +505 -377
- package/dist/components/MobileDataGrid/MobileDataGridHeader.css +5 -0
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +6 -4
- package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +1 -1
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +1 -1
- package/dist/components/MobileDataGrid/index.cjs +560 -432
- package/dist/components/MobileDataGrid/index.css +5 -0
- package/dist/components/MobileDataGrid/index.js +6 -4
- package/dist/components/NestedMenu.cjs +170 -46
- package/dist/components/NestedMenu.js +2 -1
- package/dist/components/SearchResultImage/index.cjs +92 -0
- package/dist/components/SearchResultImage/index.js +8 -0
- package/dist/components/index.cjs +707 -556
- package/dist/components/index.css +5 -0
- package/dist/components/index.js +9 -4
- package/dist/index.css +5 -0
- package/package.json +1 -1
- package/src/components/Caption.tsx +3 -0
- package/src/components/MenuOption.tsx +16 -6
- package/src/components/SearchResultImage/index.tsx +39 -0
- package/src/components/index.ts +1 -0
|
@@ -24,13 +24,13 @@ import {
|
|
|
24
24
|
DataGridCell,
|
|
25
25
|
DragAlongCell,
|
|
26
26
|
DraggableCellHeader
|
|
27
|
-
} from "./chunk-
|
|
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-
|
|
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
|
|
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
|
|
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
|
+
};
|
|
@@ -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
|
+
};
|