@helpwave/hightide 0.6.11 → 0.6.12
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/index.d.mts +8 -9
- package/dist/index.d.ts +8 -9
- package/dist/index.js +20 -31
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -31
- package/dist/index.mjs.map +1 -1
- package/dist/style/globals.css +10 -7
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -7408,11 +7408,11 @@ function useCreateForm({
|
|
|
7408
7408
|
const callbacks = useMemo3(() => ({
|
|
7409
7409
|
reset: () => storeRef.current.reset(),
|
|
7410
7410
|
submit: () => storeRef.current.submit(),
|
|
7411
|
-
update: (updater) => {
|
|
7411
|
+
update: (updater, triggerUpdate = false) => {
|
|
7412
7412
|
if (typeof updater === "function") {
|
|
7413
|
-
storeRef.current.setValues(updater(storeRef.current.getAllValues()));
|
|
7413
|
+
storeRef.current.setValues(updater(storeRef.current.getAllValues()), triggerUpdate);
|
|
7414
7414
|
} else {
|
|
7415
|
-
storeRef.current.setValues(updater);
|
|
7415
|
+
storeRef.current.setValues(updater, triggerUpdate);
|
|
7416
7416
|
}
|
|
7417
7417
|
},
|
|
7418
7418
|
validateAll: () => storeRef.current.validateAll()
|
|
@@ -12541,8 +12541,7 @@ var Pagination = ({
|
|
|
12541
12541
|
pageIndex,
|
|
12542
12542
|
pageCount,
|
|
12543
12543
|
onPageIndexChanged,
|
|
12544
|
-
|
|
12545
|
-
style
|
|
12544
|
+
...props
|
|
12546
12545
|
}) => {
|
|
12547
12546
|
const translation = useHightideTranslation();
|
|
12548
12547
|
const [value, setValue] = useState25((pageIndex + 1).toString());
|
|
@@ -12559,7 +12558,7 @@ var Pagination = ({
|
|
|
12559
12558
|
const changePage = (page) => {
|
|
12560
12559
|
onPageIndexChanged(page);
|
|
12561
12560
|
};
|
|
12562
|
-
return /* @__PURE__ */ jsxs25("div", { className: clsx23("flex-row-1", className),
|
|
12561
|
+
return /* @__PURE__ */ jsxs25("div", { ...props, className: clsx23("flex-row-1", props.className), children: [
|
|
12563
12562
|
/* @__PURE__ */ jsx50(Tooltip, { tooltip: translation("first"), children: /* @__PURE__ */ jsx50(
|
|
12564
12563
|
Button,
|
|
12565
12564
|
{
|
|
@@ -15175,7 +15174,7 @@ var TableDisplay = ({
|
|
|
15175
15174
|
import { useEffect as useEffect32 } from "react";
|
|
15176
15175
|
import clsx35 from "clsx";
|
|
15177
15176
|
import { jsx as jsx70, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
15178
|
-
var TablePaginationMenu = () => {
|
|
15177
|
+
var TablePaginationMenu = ({ ...props }) => {
|
|
15179
15178
|
const { table } = useTableDataContext();
|
|
15180
15179
|
useEffect32(() => {
|
|
15181
15180
|
const { pageIndex } = table.getState().pagination;
|
|
@@ -15187,9 +15186,13 @@ var TablePaginationMenu = () => {
|
|
|
15187
15186
|
return /* @__PURE__ */ jsx70(
|
|
15188
15187
|
Pagination,
|
|
15189
15188
|
{
|
|
15189
|
+
...props,
|
|
15190
15190
|
pageIndex: table.getState().pagination.pageIndex,
|
|
15191
15191
|
pageCount: table.getPageCount(),
|
|
15192
|
-
onPageIndexChanged: (page) =>
|
|
15192
|
+
onPageIndexChanged: (page) => {
|
|
15193
|
+
table.setPageIndex(page);
|
|
15194
|
+
props.onPageIndexChanged?.(page);
|
|
15195
|
+
}
|
|
15193
15196
|
}
|
|
15194
15197
|
);
|
|
15195
15198
|
};
|
|
@@ -15211,10 +15214,10 @@ var TablePageSizeSelect = ({
|
|
|
15211
15214
|
);
|
|
15212
15215
|
};
|
|
15213
15216
|
var TablePagination = ({ allowChangingPageSize = true, pageSizeOptions, ...props }) => {
|
|
15214
|
-
return /* @__PURE__ */
|
|
15217
|
+
return /* @__PURE__ */ jsxs41("div", { ...props, className: clsx35("container flex-col-2 sm:flex-row-8 items-center justify-center", props.className), children: [
|
|
15215
15218
|
/* @__PURE__ */ jsx70(TablePaginationMenu, {}),
|
|
15216
|
-
/* @__PURE__ */ jsx70(Visibility, { isVisible: allowChangingPageSize, children: /* @__PURE__ */ jsx70(TablePageSizeSelect, { pageSizeOptions, buttonProps: { className: "
|
|
15217
|
-
] })
|
|
15219
|
+
/* @__PURE__ */ jsx70(Visibility, { isVisible: allowChangingPageSize, children: /* @__PURE__ */ jsx70(TablePageSizeSelect, { pageSizeOptions, buttonProps: { className: "h-10 min-w-24 max-w-24" } }) })
|
|
15220
|
+
] });
|
|
15218
15221
|
};
|
|
15219
15222
|
|
|
15220
15223
|
// src/components/user-interaction/Checkbox.tsx
|
|
@@ -16754,9 +16757,9 @@ import { Binary } from "lucide-react";
|
|
|
16754
16757
|
import { jsx as jsx89, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
16755
16758
|
var NumberProperty = ({
|
|
16756
16759
|
value,
|
|
16757
|
-
onRemove,
|
|
16758
16760
|
onValueChange,
|
|
16759
16761
|
onEditComplete,
|
|
16762
|
+
onValueClear,
|
|
16760
16763
|
readOnly,
|
|
16761
16764
|
suffix,
|
|
16762
16765
|
...baseProps
|
|
@@ -16767,7 +16770,7 @@ var NumberProperty = ({
|
|
|
16767
16770
|
PropertyBase,
|
|
16768
16771
|
{
|
|
16769
16772
|
...baseProps,
|
|
16770
|
-
|
|
16773
|
+
onValueClear,
|
|
16771
16774
|
hasValue,
|
|
16772
16775
|
icon: /* @__PURE__ */ jsx89(Binary, { size: 24 }),
|
|
16773
16776
|
children: ({ invalid }) => /* @__PURE__ */ jsxs55(
|
|
@@ -16789,7 +16792,7 @@ var NumberProperty = ({
|
|
|
16789
16792
|
onValueChange: (value2) => {
|
|
16790
16793
|
const numberValue = parseFloat(value2);
|
|
16791
16794
|
if (isNaN(numberValue)) {
|
|
16792
|
-
|
|
16795
|
+
onValueClear();
|
|
16793
16796
|
} else {
|
|
16794
16797
|
onValueChange?.(numberValue);
|
|
16795
16798
|
}
|
|
@@ -16797,7 +16800,7 @@ var NumberProperty = ({
|
|
|
16797
16800
|
onEditComplete: (value2) => {
|
|
16798
16801
|
const numberValue = parseFloat(value2);
|
|
16799
16802
|
if (isNaN(numberValue)) {
|
|
16800
|
-
|
|
16803
|
+
onValueClear();
|
|
16801
16804
|
} else {
|
|
16802
16805
|
onEditComplete?.(numberValue);
|
|
16803
16806
|
}
|
|
@@ -16868,7 +16871,6 @@ import { jsx as jsx91 } from "react/jsx-runtime";
|
|
|
16868
16871
|
var TextProperty = ({
|
|
16869
16872
|
value,
|
|
16870
16873
|
readOnly,
|
|
16871
|
-
onRemove,
|
|
16872
16874
|
onValueChange,
|
|
16873
16875
|
onEditComplete,
|
|
16874
16876
|
...baseProps
|
|
@@ -16879,7 +16881,6 @@ var TextProperty = ({
|
|
|
16879
16881
|
PropertyBase,
|
|
16880
16882
|
{
|
|
16881
16883
|
...baseProps,
|
|
16882
|
-
onRemove,
|
|
16883
16884
|
hasValue,
|
|
16884
16885
|
icon: /* @__PURE__ */ jsx91(Text, { size: 24 }),
|
|
16885
16886
|
children: ({ invalid }) => /* @__PURE__ */ jsx91(
|
|
@@ -16892,20 +16893,8 @@ var TextProperty = ({
|
|
|
16892
16893
|
value: value ?? "",
|
|
16893
16894
|
readOnly,
|
|
16894
16895
|
placeholder: translation("text"),
|
|
16895
|
-
onValueChange: (value2) =>
|
|
16896
|
-
|
|
16897
|
-
onRemove?.();
|
|
16898
|
-
} else {
|
|
16899
|
-
onValueChange?.(value2);
|
|
16900
|
-
}
|
|
16901
|
-
},
|
|
16902
|
-
onEditComplete: (value2) => {
|
|
16903
|
-
if (!value2) {
|
|
16904
|
-
onRemove?.();
|
|
16905
|
-
} else {
|
|
16906
|
-
onEditComplete?.(value2);
|
|
16907
|
-
}
|
|
16908
|
-
}
|
|
16896
|
+
onValueChange: (value2) => onValueChange?.(value2),
|
|
16897
|
+
onEditComplete: (value2) => onEditComplete?.(value2)
|
|
16909
16898
|
}
|
|
16910
16899
|
)
|
|
16911
16900
|
}
|