@expcat/tigercat-react 0.3.70 → 0.4.2
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-ZTVATZB6.js → chunk-6OVVMHZJ.js} +137 -70
- package/dist/{chunk-ZGQOYCQT.mjs → chunk-FX2IBA4W.mjs} +1 -1
- package/dist/{chunk-PWZB45Z7.js → chunk-JQK354YN.js} +11 -9
- package/dist/chunk-JWFEJ4XG.js +543 -0
- package/dist/chunk-PEGJ2KHC.js +273 -0
- package/dist/{chunk-3577FW3I.mjs → chunk-PJ7NS7NX.mjs} +139 -72
- package/dist/chunk-PJCY45UP.mjs +536 -0
- package/dist/{chunk-IRH2ZVD3.js → chunk-Q7GUWWG5.js} +2 -2
- package/dist/chunk-RCNTRSUA.mjs +271 -0
- package/dist/chunk-SHT4TU3T.mjs +26 -0
- package/dist/{chunk-OUAZM7NY.mjs → chunk-SMC2RV3V.mjs} +12 -10
- package/dist/{chunk-OESNOOOT.js → chunk-YWTZALG5.js} +8 -4
- package/dist/components/ActivityFeed.js +4 -4
- package/dist/components/ActivityFeed.mjs +2 -2
- package/dist/components/DataTableWithToolbar.js +4 -4
- package/dist/components/DataTableWithToolbar.mjs +2 -2
- package/dist/components/InputNumber.d.mts +24 -0
- package/dist/components/InputNumber.d.ts +24 -0
- package/dist/components/InputNumber.js +10 -0
- package/dist/components/InputNumber.mjs +1 -0
- package/dist/components/Sidebar.js +2 -2
- package/dist/components/Sidebar.mjs +1 -1
- package/dist/components/SubMenu.js +2 -2
- package/dist/components/SubMenu.mjs +1 -1
- package/dist/components/Table.d.mts +5 -1
- package/dist/components/Table.d.ts +5 -1
- package/dist/components/Table.js +2 -2
- package/dist/components/Table.mjs +1 -1
- package/dist/components/TaskBoard.d.mts +13 -0
- package/dist/components/TaskBoard.d.ts +13 -0
- package/dist/components/TaskBoard.js +17 -0
- package/dist/components/TaskBoard.mjs +2 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +50 -40
- package/dist/index.mjs +13 -11
- package/package.json +2 -2
- package/dist/chunk-RITTIFCJ.mjs +0 -22
- package/dist/{chunk-IOM7DWWQ.js → chunk-J3HKED4B.js} +1 -1
- package/dist/{chunk-FTY2W4L2.mjs → chunk-MTL2QUM3.mjs} +1 -1
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { useRef, useState, useCallback, useEffect, useMemo } from 'react';
|
|
2
|
+
import { clampValue, formatPrecision, stepValue, isAtMin, isAtMax, classNames, getInputNumberWrapperClasses, getInputNumberStatusClasses, getInputNumberSizeClasses, getInputNumberFocusRingColor, getInputNumberInputClasses, getInputNumberSideButtonClasses, inputNumberMinusIconPathD, inputNumberPlusIconPathD, inputNumberControlsRightClasses, getInputNumberStepButtonClasses, inputNumberUpIconPathD, inputNumberDownIconPathD } from '@expcat/tigercat-core';
|
|
3
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
// src/components/InputNumber.tsx
|
|
6
|
+
var InputNumber = ({
|
|
7
|
+
value: controlledValue,
|
|
8
|
+
defaultValue,
|
|
9
|
+
size = "md",
|
|
10
|
+
status = "default",
|
|
11
|
+
min = -Infinity,
|
|
12
|
+
max = Infinity,
|
|
13
|
+
step = 1,
|
|
14
|
+
precision,
|
|
15
|
+
disabled = false,
|
|
16
|
+
readonly = false,
|
|
17
|
+
placeholder,
|
|
18
|
+
name,
|
|
19
|
+
id,
|
|
20
|
+
keyboard = true,
|
|
21
|
+
controls = true,
|
|
22
|
+
controlsPosition = "right",
|
|
23
|
+
formatter,
|
|
24
|
+
parser,
|
|
25
|
+
autoFocus = false,
|
|
26
|
+
onChange,
|
|
27
|
+
onFocus,
|
|
28
|
+
onBlur,
|
|
29
|
+
className
|
|
30
|
+
}) => {
|
|
31
|
+
const isControlled = controlledValue !== void 0;
|
|
32
|
+
const inputRef = useRef(null);
|
|
33
|
+
const [focused, setFocused] = useState(false);
|
|
34
|
+
const [internalValue, setInternalValue] = useState(
|
|
35
|
+
defaultValue ?? controlledValue ?? null
|
|
36
|
+
);
|
|
37
|
+
const [displayValue, setDisplayValue] = useState("");
|
|
38
|
+
const currentValue = isControlled ? controlledValue ?? null : internalValue;
|
|
39
|
+
const toDisplayValue = useCallback(
|
|
40
|
+
(val) => {
|
|
41
|
+
if (val === null || val === void 0) return "";
|
|
42
|
+
if (formatter) return formatter(val);
|
|
43
|
+
if (precision !== void 0) return val.toFixed(precision);
|
|
44
|
+
return String(val);
|
|
45
|
+
},
|
|
46
|
+
[formatter, precision]
|
|
47
|
+
);
|
|
48
|
+
const parseValue = useCallback(
|
|
49
|
+
(str) => {
|
|
50
|
+
if (str === "" || str === "-") return null;
|
|
51
|
+
if (parser) return parser(str);
|
|
52
|
+
const num = Number(str);
|
|
53
|
+
return Number.isNaN(num) ? null : num;
|
|
54
|
+
},
|
|
55
|
+
[parser]
|
|
56
|
+
);
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
if (!focused) {
|
|
59
|
+
setDisplayValue(toDisplayValue(currentValue));
|
|
60
|
+
}
|
|
61
|
+
}, [currentValue, focused, toDisplayValue]);
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
if (autoFocus && inputRef.current) {
|
|
64
|
+
inputRef.current.focus();
|
|
65
|
+
}
|
|
66
|
+
}, [autoFocus]);
|
|
67
|
+
const commitValue = useCallback(
|
|
68
|
+
(val) => {
|
|
69
|
+
let finalVal = val;
|
|
70
|
+
if (finalVal !== null) {
|
|
71
|
+
finalVal = clampValue(finalVal, min, max);
|
|
72
|
+
if (precision !== void 0) {
|
|
73
|
+
finalVal = formatPrecision(finalVal, precision);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (!isControlled) {
|
|
77
|
+
setInternalValue(finalVal);
|
|
78
|
+
}
|
|
79
|
+
onChange?.(finalVal);
|
|
80
|
+
setDisplayValue(toDisplayValue(finalVal));
|
|
81
|
+
},
|
|
82
|
+
[min, max, precision, isControlled, onChange, toDisplayValue]
|
|
83
|
+
);
|
|
84
|
+
const handleStep = useCallback(
|
|
85
|
+
(direction) => {
|
|
86
|
+
if (disabled || readonly) return;
|
|
87
|
+
const next = stepValue(currentValue, step, direction, min, max, precision);
|
|
88
|
+
commitValue(next);
|
|
89
|
+
},
|
|
90
|
+
[currentValue, step, min, max, precision, disabled, readonly, commitValue]
|
|
91
|
+
);
|
|
92
|
+
const handleInput = useCallback((e) => {
|
|
93
|
+
setDisplayValue(e.target.value);
|
|
94
|
+
}, []);
|
|
95
|
+
const handleBlur = useCallback(
|
|
96
|
+
(e) => {
|
|
97
|
+
setFocused(false);
|
|
98
|
+
const parsed = parseValue(displayValue);
|
|
99
|
+
commitValue(parsed);
|
|
100
|
+
onBlur?.(e);
|
|
101
|
+
},
|
|
102
|
+
[displayValue, parseValue, commitValue, onBlur]
|
|
103
|
+
);
|
|
104
|
+
const handleFocus = useCallback(
|
|
105
|
+
(e) => {
|
|
106
|
+
setFocused(true);
|
|
107
|
+
if (formatter && currentValue !== null) {
|
|
108
|
+
setDisplayValue(String(currentValue));
|
|
109
|
+
}
|
|
110
|
+
onFocus?.(e);
|
|
111
|
+
},
|
|
112
|
+
[formatter, currentValue, onFocus]
|
|
113
|
+
);
|
|
114
|
+
const handleKeyDown = useCallback(
|
|
115
|
+
(e) => {
|
|
116
|
+
if (!keyboard || disabled || readonly) return;
|
|
117
|
+
if (e.key === "ArrowUp") {
|
|
118
|
+
e.preventDefault();
|
|
119
|
+
handleStep("up");
|
|
120
|
+
} else if (e.key === "ArrowDown") {
|
|
121
|
+
e.preventDefault();
|
|
122
|
+
handleStep("down");
|
|
123
|
+
} else if (e.key === "Enter") {
|
|
124
|
+
const parsed = parseValue(displayValue);
|
|
125
|
+
commitValue(parsed);
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
[keyboard, disabled, readonly, handleStep, parseValue, displayValue, commitValue]
|
|
129
|
+
);
|
|
130
|
+
const atMin = isAtMin(currentValue, min);
|
|
131
|
+
const atMax = isAtMax(currentValue, max);
|
|
132
|
+
const wrapperClasses = useMemo(
|
|
133
|
+
() => classNames(
|
|
134
|
+
getInputNumberWrapperClasses(disabled),
|
|
135
|
+
getInputNumberStatusClasses(status),
|
|
136
|
+
getInputNumberSizeClasses(size),
|
|
137
|
+
focused && `ring-2 ${getInputNumberFocusRingColor(status)}`,
|
|
138
|
+
className
|
|
139
|
+
),
|
|
140
|
+
[disabled, status, size, focused, className]
|
|
141
|
+
);
|
|
142
|
+
const inputClasses = useMemo(
|
|
143
|
+
() => getInputNumberInputClasses(
|
|
144
|
+
size,
|
|
145
|
+
controls && controlsPosition === "right",
|
|
146
|
+
controls && controlsPosition === "both"
|
|
147
|
+
),
|
|
148
|
+
[size, controls, controlsPosition]
|
|
149
|
+
);
|
|
150
|
+
return /* @__PURE__ */ jsxs("div", { className: wrapperClasses, children: [
|
|
151
|
+
controls && controlsPosition === "both" && /* @__PURE__ */ jsx(
|
|
152
|
+
"button",
|
|
153
|
+
{
|
|
154
|
+
type: "button",
|
|
155
|
+
tabIndex: -1,
|
|
156
|
+
"aria-label": "Decrease",
|
|
157
|
+
className: getInputNumberSideButtonClasses("left", disabled || atMin),
|
|
158
|
+
disabled: disabled || atMin,
|
|
159
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
160
|
+
onClick: () => handleStep("down"),
|
|
161
|
+
children: /* @__PURE__ */ jsx(
|
|
162
|
+
"svg",
|
|
163
|
+
{
|
|
164
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
165
|
+
viewBox: "0 0 24 24",
|
|
166
|
+
fill: "none",
|
|
167
|
+
stroke: "currentColor",
|
|
168
|
+
strokeWidth: "2",
|
|
169
|
+
className: "w-4 h-4",
|
|
170
|
+
children: /* @__PURE__ */ jsx("path", { d: inputNumberMinusIconPathD })
|
|
171
|
+
}
|
|
172
|
+
)
|
|
173
|
+
}
|
|
174
|
+
),
|
|
175
|
+
/* @__PURE__ */ jsx(
|
|
176
|
+
"input",
|
|
177
|
+
{
|
|
178
|
+
ref: inputRef,
|
|
179
|
+
type: "text",
|
|
180
|
+
inputMode: "decimal",
|
|
181
|
+
role: "spinbutton",
|
|
182
|
+
"aria-valuemin": min === -Infinity ? void 0 : min,
|
|
183
|
+
"aria-valuemax": max === Infinity ? void 0 : max,
|
|
184
|
+
"aria-valuenow": currentValue ?? void 0,
|
|
185
|
+
className: inputClasses,
|
|
186
|
+
value: displayValue,
|
|
187
|
+
placeholder,
|
|
188
|
+
disabled,
|
|
189
|
+
readOnly: readonly,
|
|
190
|
+
name,
|
|
191
|
+
id,
|
|
192
|
+
onChange: handleInput,
|
|
193
|
+
onBlur: handleBlur,
|
|
194
|
+
onFocus: handleFocus,
|
|
195
|
+
onKeyDown: handleKeyDown
|
|
196
|
+
}
|
|
197
|
+
),
|
|
198
|
+
controls && controlsPosition === "both" && /* @__PURE__ */ jsx(
|
|
199
|
+
"button",
|
|
200
|
+
{
|
|
201
|
+
type: "button",
|
|
202
|
+
tabIndex: -1,
|
|
203
|
+
"aria-label": "Increase",
|
|
204
|
+
className: getInputNumberSideButtonClasses("right", disabled || atMax),
|
|
205
|
+
disabled: disabled || atMax,
|
|
206
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
207
|
+
onClick: () => handleStep("up"),
|
|
208
|
+
children: /* @__PURE__ */ jsx(
|
|
209
|
+
"svg",
|
|
210
|
+
{
|
|
211
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
212
|
+
viewBox: "0 0 24 24",
|
|
213
|
+
fill: "none",
|
|
214
|
+
stroke: "currentColor",
|
|
215
|
+
strokeWidth: "2",
|
|
216
|
+
className: "w-4 h-4",
|
|
217
|
+
children: /* @__PURE__ */ jsx("path", { d: inputNumberPlusIconPathD })
|
|
218
|
+
}
|
|
219
|
+
)
|
|
220
|
+
}
|
|
221
|
+
),
|
|
222
|
+
controls && controlsPosition === "right" && /* @__PURE__ */ jsxs("div", { className: inputNumberControlsRightClasses, children: [
|
|
223
|
+
/* @__PURE__ */ jsx(
|
|
224
|
+
"button",
|
|
225
|
+
{
|
|
226
|
+
type: "button",
|
|
227
|
+
tabIndex: -1,
|
|
228
|
+
"aria-label": "Increase",
|
|
229
|
+
className: getInputNumberStepButtonClasses("up", disabled || atMax),
|
|
230
|
+
disabled: disabled || atMax,
|
|
231
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
232
|
+
onClick: () => handleStep("up"),
|
|
233
|
+
children: /* @__PURE__ */ jsx(
|
|
234
|
+
"svg",
|
|
235
|
+
{
|
|
236
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
237
|
+
viewBox: "0 0 24 24",
|
|
238
|
+
fill: "currentColor",
|
|
239
|
+
className: "w-3 h-3",
|
|
240
|
+
children: /* @__PURE__ */ jsx("path", { d: inputNumberUpIconPathD })
|
|
241
|
+
}
|
|
242
|
+
)
|
|
243
|
+
}
|
|
244
|
+
),
|
|
245
|
+
/* @__PURE__ */ jsx(
|
|
246
|
+
"button",
|
|
247
|
+
{
|
|
248
|
+
type: "button",
|
|
249
|
+
tabIndex: -1,
|
|
250
|
+
"aria-label": "Decrease",
|
|
251
|
+
className: getInputNumberStepButtonClasses("down", disabled || atMin),
|
|
252
|
+
disabled: disabled || atMin,
|
|
253
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
254
|
+
onClick: () => handleStep("down"),
|
|
255
|
+
children: /* @__PURE__ */ jsx(
|
|
256
|
+
"svg",
|
|
257
|
+
{
|
|
258
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
259
|
+
viewBox: "0 0 24 24",
|
|
260
|
+
fill: "currentColor",
|
|
261
|
+
className: "w-3 h-3",
|
|
262
|
+
children: /* @__PURE__ */ jsx("path", { d: inputNumberDownIconPathD })
|
|
263
|
+
}
|
|
264
|
+
)
|
|
265
|
+
}
|
|
266
|
+
)
|
|
267
|
+
] })
|
|
268
|
+
] });
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
export { InputNumber };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { classNames, layoutSidebarClasses, layoutSidebarCollapsedClasses, getSidebarStyle } from '@expcat/tigercat-core';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
// src/components/Sidebar.tsx
|
|
5
|
+
var Sidebar = ({
|
|
6
|
+
className,
|
|
7
|
+
width = "256px",
|
|
8
|
+
collapsedWidth = "64px",
|
|
9
|
+
collapsed = false,
|
|
10
|
+
style,
|
|
11
|
+
children,
|
|
12
|
+
...props
|
|
13
|
+
}) => {
|
|
14
|
+
const sidebarClasses = classNames(
|
|
15
|
+
layoutSidebarClasses,
|
|
16
|
+
collapsed && layoutSidebarCollapsedClasses,
|
|
17
|
+
className
|
|
18
|
+
);
|
|
19
|
+
const sidebarStyle = {
|
|
20
|
+
...style,
|
|
21
|
+
...getSidebarStyle(collapsed, width, collapsedWidth)
|
|
22
|
+
};
|
|
23
|
+
return /* @__PURE__ */ jsx("aside", { className: sidebarClasses, style: sidebarStyle, ...props, children });
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { Sidebar };
|
|
@@ -2,7 +2,7 @@ import { MenuItemGroup } from './chunk-OFBK35TK.mjs';
|
|
|
2
2
|
import { MenuItem } from './chunk-D5KYIQWB.mjs';
|
|
3
3
|
import { useMenuContext } from './chunk-ZIUOENTL.mjs';
|
|
4
4
|
import React, { useState, useEffect, useMemo, useCallback } from 'react';
|
|
5
|
-
import { isKeyOpen, classNames, getSubMenuTitleClasses, submenuContentHorizontalClasses, submenuContentPopupClasses, submenuContentInlineClasses, submenuContentVerticalClasses, focusFirstChildItem, moveFocusInMenu, focusMenuEdge, getMenuItemIndent, menuItemIconClasses, getSubMenuExpandIconClasses } from '@expcat/tigercat-core';
|
|
5
|
+
import { isKeyOpen, classNames, getSubMenuTitleClasses, submenuContentHorizontalClasses, submenuContentHorizontalNestedClasses, submenuContentPopupClasses, submenuContentInlineClasses, submenuContentVerticalClasses, focusFirstChildItem, moveFocusInMenu, focusMenuEdge, getMenuItemIndent, getSubmenuPopupZIndex, menuItemIconClasses, getSubMenuExpandIconClasses } from '@expcat/tigercat-core';
|
|
6
6
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
8
|
var ExpandIcon = ({ expanded }) => /* @__PURE__ */ jsx(
|
|
@@ -33,9 +33,9 @@ var SubMenu = ({
|
|
|
33
33
|
const [isHovered, setIsHovered] = useState(false);
|
|
34
34
|
const [isOpenByKeyboard, setIsOpenByKeyboard] = useState(false);
|
|
35
35
|
const effectiveCollapsed = collapsedOverride ?? (menuContext ? menuContext.collapsed : false);
|
|
36
|
-
const isPopup = !!menuContext && menuContext.mode === "vertical" && effectiveCollapsed;
|
|
36
|
+
const isPopup = !!menuContext && (menuContext.mode === "horizontal" || menuContext.mode === "vertical" && effectiveCollapsed);
|
|
37
37
|
const isOpen = !!menuContext && isKeyOpen(itemKey, menuContext.openKeys);
|
|
38
|
-
const isExpanded =
|
|
38
|
+
const isExpanded = isPopup ? isHovered || isOpenByKeyboard : isOpen;
|
|
39
39
|
const isInlineOrVertical = menuContext?.mode !== "horizontal" && !isPopup;
|
|
40
40
|
const [hasRenderedInline, setHasRenderedInline] = useState(
|
|
41
41
|
() => isInlineOrVertical ? isExpanded : false
|
|
@@ -50,11 +50,13 @@ var SubMenu = ({
|
|
|
50
50
|
}, [menuContext, disabled, className]);
|
|
51
51
|
const contentClasses = useMemo(() => {
|
|
52
52
|
if (!menuContext) return "";
|
|
53
|
-
if (menuContext.mode === "horizontal")
|
|
53
|
+
if (menuContext.mode === "horizontal") {
|
|
54
|
+
return level === 0 ? submenuContentHorizontalClasses : submenuContentHorizontalNestedClasses;
|
|
55
|
+
}
|
|
54
56
|
if (isPopup) return submenuContentPopupClasses;
|
|
55
57
|
if (menuContext.mode === "inline") return submenuContentInlineClasses;
|
|
56
58
|
return submenuContentVerticalClasses;
|
|
57
|
-
}, [menuContext, isPopup]);
|
|
59
|
+
}, [menuContext, isPopup, level]);
|
|
58
60
|
const handleTitleClick = useCallback(() => {
|
|
59
61
|
if (!menuContext || disabled) return;
|
|
60
62
|
if (menuContext.mode === "horizontal") return;
|
|
@@ -179,19 +181,19 @@ var SubMenu = ({
|
|
|
179
181
|
return React.cloneElement(
|
|
180
182
|
child,
|
|
181
183
|
{
|
|
182
|
-
level: nextLevel
|
|
183
|
-
collapsed: isPopup ? false : void 0
|
|
184
|
+
level: nextLevel
|
|
184
185
|
}
|
|
185
186
|
);
|
|
186
187
|
}
|
|
187
188
|
return child;
|
|
188
189
|
});
|
|
189
|
-
|
|
190
|
+
const popupZIndex = isPopup ? getSubmenuPopupZIndex(level) : {};
|
|
191
|
+
if (isPopup) {
|
|
190
192
|
return /* @__PURE__ */ jsx(
|
|
191
193
|
"ul",
|
|
192
194
|
{
|
|
193
195
|
className: contentClasses,
|
|
194
|
-
style: { display: isExpanded ? "block" : "none" },
|
|
196
|
+
style: { display: isExpanded ? "block" : "none", ...popupZIndex },
|
|
195
197
|
role: "menu",
|
|
196
198
|
"aria-hidden": isExpanded ? void 0 : "true",
|
|
197
199
|
children: enhancedChildren
|
|
@@ -216,7 +218,7 @@ var SubMenu = ({
|
|
|
216
218
|
return /* @__PURE__ */ jsxs(
|
|
217
219
|
"li",
|
|
218
220
|
{
|
|
219
|
-
className:
|
|
221
|
+
className: isPopup ? "relative" : "",
|
|
220
222
|
onMouseEnter: handleMouseEnter,
|
|
221
223
|
onMouseLeave: handleMouseLeave,
|
|
222
224
|
role: "none",
|
|
@@ -7,18 +7,22 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
7
7
|
var Sidebar = ({
|
|
8
8
|
className,
|
|
9
9
|
width = "256px",
|
|
10
|
+
collapsedWidth = "64px",
|
|
10
11
|
collapsed = false,
|
|
11
12
|
style,
|
|
12
13
|
children,
|
|
13
14
|
...props
|
|
14
15
|
}) => {
|
|
15
|
-
const sidebarClasses = tigercatCore.classNames(
|
|
16
|
+
const sidebarClasses = tigercatCore.classNames(
|
|
17
|
+
tigercatCore.layoutSidebarClasses,
|
|
18
|
+
collapsed && tigercatCore.layoutSidebarCollapsedClasses,
|
|
19
|
+
className
|
|
20
|
+
);
|
|
16
21
|
const sidebarStyle = {
|
|
17
22
|
...style,
|
|
18
|
-
|
|
19
|
-
minWidth: collapsed ? "0px" : width
|
|
23
|
+
...tigercatCore.getSidebarStyle(collapsed, width, collapsedWidth)
|
|
20
24
|
};
|
|
21
|
-
return /* @__PURE__ */ jsxRuntime.jsx("aside", { className: sidebarClasses, style: sidebarStyle, ...props, children
|
|
25
|
+
return /* @__PURE__ */ jsxRuntime.jsx("aside", { className: sidebarClasses, style: sidebarStyle, ...props, children });
|
|
22
26
|
};
|
|
23
27
|
|
|
24
28
|
exports.Sidebar = Sidebar;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var chunkJ3HKED4B_js = require('../chunk-J3HKED4B.js');
|
|
6
6
|
require('../chunk-PR3PQUKM.js');
|
|
7
|
-
require('../chunk-2GKTVAAB.js');
|
|
8
7
|
require('../chunk-QYYAXM5F.js');
|
|
8
|
+
require('../chunk-2GKTVAAB.js');
|
|
9
9
|
require('../chunk-VCULFIZ5.js');
|
|
10
10
|
require('../chunk-I5TCE5E7.js');
|
|
11
11
|
require('../chunk-SSQOCZ6O.js');
|
|
@@ -15,9 +15,9 @@ require('../chunk-CI2WHAT2.js');
|
|
|
15
15
|
|
|
16
16
|
Object.defineProperty(exports, "ActivityFeed", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkJ3HKED4B_js.ActivityFeed; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "default", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkJ3HKED4B_js.ActivityFeed_default; }
|
|
23
23
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { ActivityFeed, ActivityFeed_default as default } from '../chunk-
|
|
1
|
+
export { ActivityFeed, ActivityFeed_default as default } from '../chunk-MTL2QUM3.mjs';
|
|
2
2
|
import '../chunk-JVTAKNRO.mjs';
|
|
3
|
-
import '../chunk-AVUXDQYO.mjs';
|
|
4
3
|
import '../chunk-XZVQ3PJS.mjs';
|
|
4
|
+
import '../chunk-AVUXDQYO.mjs';
|
|
5
5
|
import '../chunk-TGKNEMD4.mjs';
|
|
6
6
|
import '../chunk-LIV33O73.mjs';
|
|
7
7
|
import '../chunk-3M2IG6IN.mjs';
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('../chunk-
|
|
5
|
+
var chunkQ7GUWWG5_js = require('../chunk-Q7GUWWG5.js');
|
|
6
|
+
require('../chunk-6OVVMHZJ.js');
|
|
7
7
|
require('../chunk-TDRINUMH.js');
|
|
8
8
|
require('../chunk-3GW3UAKB.js');
|
|
9
9
|
require('../chunk-OYCMGKQ7.js');
|
|
@@ -13,9 +13,9 @@ require('../chunk-F24IF2QL.js');
|
|
|
13
13
|
|
|
14
14
|
Object.defineProperty(exports, "DataTableWithToolbar", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunkQ7GUWWG5_js.DataTableWithToolbar; }
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "default", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkQ7GUWWG5_js.DataTableWithToolbar_default; }
|
|
21
21
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { DataTableWithToolbar, DataTableWithToolbar_default as default } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { DataTableWithToolbar, DataTableWithToolbar_default as default } from '../chunk-FX2IBA4W.mjs';
|
|
2
|
+
import '../chunk-PJ7NS7NX.mjs';
|
|
3
3
|
import '../chunk-MDZDPGRK.mjs';
|
|
4
4
|
import '../chunk-NZLOLMT2.mjs';
|
|
5
5
|
import '../chunk-RPTLVIBF.mjs';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InputNumberProps as InputNumberProps$1 } from '@expcat/tigercat-core';
|
|
3
|
+
|
|
4
|
+
interface InputNumberProps extends InputNumberProps$1 {
|
|
5
|
+
/**
|
|
6
|
+
* Change handler (called with committed value)
|
|
7
|
+
*/
|
|
8
|
+
onChange?: (value: number | null) => void;
|
|
9
|
+
/**
|
|
10
|
+
* Focus handler
|
|
11
|
+
*/
|
|
12
|
+
onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Blur handler
|
|
15
|
+
*/
|
|
16
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Additional CSS classes
|
|
19
|
+
*/
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
declare const InputNumber: React.FC<InputNumberProps>;
|
|
23
|
+
|
|
24
|
+
export { InputNumber, type InputNumberProps };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InputNumberProps as InputNumberProps$1 } from '@expcat/tigercat-core';
|
|
3
|
+
|
|
4
|
+
interface InputNumberProps extends InputNumberProps$1 {
|
|
5
|
+
/**
|
|
6
|
+
* Change handler (called with committed value)
|
|
7
|
+
*/
|
|
8
|
+
onChange?: (value: number | null) => void;
|
|
9
|
+
/**
|
|
10
|
+
* Focus handler
|
|
11
|
+
*/
|
|
12
|
+
onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Blur handler
|
|
15
|
+
*/
|
|
16
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Additional CSS classes
|
|
19
|
+
*/
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
declare const InputNumber: React.FC<InputNumberProps>;
|
|
23
|
+
|
|
24
|
+
export { InputNumber, type InputNumberProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InputNumber } from '../chunk-RCNTRSUA.mjs';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkYWTZALG5_js = require('../chunk-YWTZALG5.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "Sidebar", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkYWTZALG5_js.Sidebar; }
|
|
10
10
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Sidebar } from '../chunk-
|
|
1
|
+
export { Sidebar } from '../chunk-SHT4TU3T.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkJQK354YN_js = require('../chunk-JQK354YN.js');
|
|
4
4
|
require('../chunk-GJEWBALW.js');
|
|
5
5
|
require('../chunk-A3PYG3D6.js');
|
|
6
6
|
require('../chunk-IBYIPXIO.js');
|
|
@@ -9,5 +9,5 @@ require('../chunk-IBYIPXIO.js');
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "SubMenu", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkJQK354YN_js.SubMenu; }
|
|
13
13
|
});
|
|
@@ -36,11 +36,15 @@ interface TableProps<T = Record<string, unknown>> extends TableProps$1<T> {
|
|
|
36
36
|
current: number;
|
|
37
37
|
pageSize: number;
|
|
38
38
|
}) => void;
|
|
39
|
+
/**
|
|
40
|
+
* Expanded rows change handler
|
|
41
|
+
*/
|
|
42
|
+
onExpandedRowsChange?: (expandedRowKeys: (string | number)[]) => void;
|
|
39
43
|
/**
|
|
40
44
|
* Additional CSS classes
|
|
41
45
|
*/
|
|
42
46
|
className?: string;
|
|
43
47
|
}
|
|
44
|
-
declare function Table<T extends Record<string, unknown> = Record<string, unknown>>({ columns, columnLockable, dataSource, sort, defaultSort, filters, defaultFilters, size, bordered, striped, hoverable, loading, emptyText, pagination, rowSelection, rowKey, rowClassName, stickyHeader, maxHeight, tableLayout, onChange, onRowClick, onSelectionChange, onSortChange, onFilterChange, onPageChange, className, ...props }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
48
|
+
declare function Table<T extends Record<string, unknown> = Record<string, unknown>>({ columns, columnLockable, dataSource, sort, defaultSort, filters, defaultFilters, size, bordered, striped, hoverable, loading, emptyText, pagination, rowSelection, rowKey, rowClassName, stickyHeader, maxHeight, tableLayout, expandable, onChange, onRowClick, onSelectionChange, onSortChange, onFilterChange, onPageChange, onExpandedRowsChange, className, ...props }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
45
49
|
|
|
46
50
|
export { Table, type TableProps };
|
|
@@ -36,11 +36,15 @@ interface TableProps<T = Record<string, unknown>> extends TableProps$1<T> {
|
|
|
36
36
|
current: number;
|
|
37
37
|
pageSize: number;
|
|
38
38
|
}) => void;
|
|
39
|
+
/**
|
|
40
|
+
* Expanded rows change handler
|
|
41
|
+
*/
|
|
42
|
+
onExpandedRowsChange?: (expandedRowKeys: (string | number)[]) => void;
|
|
39
43
|
/**
|
|
40
44
|
* Additional CSS classes
|
|
41
45
|
*/
|
|
42
46
|
className?: string;
|
|
43
47
|
}
|
|
44
|
-
declare function Table<T extends Record<string, unknown> = Record<string, unknown>>({ columns, columnLockable, dataSource, sort, defaultSort, filters, defaultFilters, size, bordered, striped, hoverable, loading, emptyText, pagination, rowSelection, rowKey, rowClassName, stickyHeader, maxHeight, tableLayout, onChange, onRowClick, onSelectionChange, onSortChange, onFilterChange, onPageChange, className, ...props }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
48
|
+
declare function Table<T extends Record<string, unknown> = Record<string, unknown>>({ columns, columnLockable, dataSource, sort, defaultSort, filters, defaultFilters, size, bordered, striped, hoverable, loading, emptyText, pagination, rowSelection, rowKey, rowClassName, stickyHeader, maxHeight, tableLayout, expandable, onChange, onRowClick, onSelectionChange, onSortChange, onFilterChange, onPageChange, onExpandedRowsChange, className, ...props }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
45
49
|
|
|
46
50
|
export { Table, type TableProps };
|
package/dist/components/Table.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk6OVVMHZJ_js = require('../chunk-6OVVMHZJ.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "Table", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunk6OVVMHZJ_js.Table; }
|
|
10
10
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Table } from '../chunk-
|
|
1
|
+
export { Table } from '../chunk-PJ7NS7NX.mjs';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TaskBoardProps as TaskBoardProps$1, TaskBoardCard, TaskBoardColumn } from '@expcat/tigercat-core';
|
|
3
|
+
|
|
4
|
+
interface TaskBoardProps extends Omit<TaskBoardProps$1, 'style' | 'renderCard' | 'renderColumnHeader' | 'renderColumnFooter' | 'renderEmptyColumn'>, Omit<React.HTMLAttributes<HTMLDivElement>, 'children' | 'style' | 'draggable'> {
|
|
5
|
+
renderCard?: (card: TaskBoardCard, columnId: string | number) => React.ReactNode;
|
|
6
|
+
renderColumnHeader?: (column: TaskBoardColumn) => React.ReactNode;
|
|
7
|
+
renderColumnFooter?: (column: TaskBoardColumn) => React.ReactNode;
|
|
8
|
+
renderEmptyColumn?: (column: TaskBoardColumn) => React.ReactNode;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
declare const TaskBoard: React.FC<TaskBoardProps>;
|
|
12
|
+
|
|
13
|
+
export { TaskBoard, type TaskBoardProps, TaskBoard as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TaskBoardProps as TaskBoardProps$1, TaskBoardCard, TaskBoardColumn } from '@expcat/tigercat-core';
|
|
3
|
+
|
|
4
|
+
interface TaskBoardProps extends Omit<TaskBoardProps$1, 'style' | 'renderCard' | 'renderColumnHeader' | 'renderColumnFooter' | 'renderEmptyColumn'>, Omit<React.HTMLAttributes<HTMLDivElement>, 'children' | 'style' | 'draggable'> {
|
|
5
|
+
renderCard?: (card: TaskBoardCard, columnId: string | number) => React.ReactNode;
|
|
6
|
+
renderColumnHeader?: (column: TaskBoardColumn) => React.ReactNode;
|
|
7
|
+
renderColumnFooter?: (column: TaskBoardColumn) => React.ReactNode;
|
|
8
|
+
renderEmptyColumn?: (column: TaskBoardColumn) => React.ReactNode;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
declare const TaskBoard: React.FC<TaskBoardProps>;
|
|
12
|
+
|
|
13
|
+
export { TaskBoard, type TaskBoardProps, TaskBoard as default };
|