@oliasoft-open-source/react-ui-library 5.17.1 → 5.18.0
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.js +25 -25
- package/package.json +6 -5
package/dist/index.js
CHANGED
|
@@ -965,30 +965,30 @@ const Trigger$1 = React.forwardRef(({ active: e, isDisabled: t, badgeTitle: n, b
|
|
|
965
965
|
var isMenuEmpty = (e) => {
|
|
966
966
|
let { sections: t } = e;
|
|
967
967
|
return !isValidElement(t) && (!Array.isArray(t) || t.every((e) => isEmpty(e)));
|
|
968
|
-
}, useContextMenu = ({ sections: e, width: t, placement: n, possiblePlacements: r, closeOnOptionClick: i, closeParent: a, tree: o, path: s,
|
|
969
|
-
let { hasMousePosition:
|
|
970
|
-
isOpen:
|
|
971
|
-
trigger:
|
|
968
|
+
}, useContextMenu = ({ sections: e, width: t, placement: n, possiblePlacements: r, closeOnOptionClick: i, closeParent: a, tree: o, path: s, overflowContainer: c, maxHeight: l, testId: u }) => {
|
|
969
|
+
let { hasMousePosition: d, resetMousePosition: f, handleMouseEvent: p, trigger: m } = useMousePositionAsTrigger(), h = f, g = d, { layerProps: _, renderLayer: v } = useLayer({
|
|
970
|
+
isOpen: g,
|
|
971
|
+
trigger: m,
|
|
972
972
|
...placementOptions$1(n),
|
|
973
973
|
possiblePlacements: r,
|
|
974
974
|
ResizeObserver: ResizeObserver$1,
|
|
975
|
-
onOutsideClick:
|
|
976
|
-
overflowContainer:
|
|
975
|
+
onOutsideClick: h,
|
|
976
|
+
overflowContainer: c
|
|
977
977
|
});
|
|
978
|
-
return [
|
|
979
|
-
...
|
|
978
|
+
return [g && v(/* @__PURE__ */ jsx("div", {
|
|
979
|
+
..._,
|
|
980
980
|
children: /* @__PURE__ */ jsx(Layer$2, {
|
|
981
981
|
isNested: !1,
|
|
982
982
|
width: t,
|
|
983
983
|
sections: e,
|
|
984
984
|
closeOnOptionClick: i,
|
|
985
|
-
close: a ||
|
|
985
|
+
close: a || h,
|
|
986
986
|
tree: o,
|
|
987
987
|
path: s,
|
|
988
|
-
maxHeight:
|
|
989
|
-
testId:
|
|
988
|
+
maxHeight: l,
|
|
989
|
+
testId: u && `${u}-layer`
|
|
990
990
|
})
|
|
991
|
-
})),
|
|
991
|
+
})), p];
|
|
992
992
|
}, ContextMenu = ({ menu: e, width: t, disabled: n = !1, closeOnOptionClick: r = !0, closeParent: i, tree: a, path: o, groupOrder: c, testId: l }) => {
|
|
993
993
|
let u = useContext(DisabledContext), { label: d, trigger: f, fullHeightTrigger: p, colored: m, small: h, component: g, placement: _, possiblePlacements: v = ["bottom-start", "top-start"] } = e, [y, b] = useContextMenu({
|
|
994
994
|
sections: e.sections,
|
|
@@ -1373,7 +1373,7 @@ const ColorInput = ({ columns: e = 9, disabled: t, options: n = [], small: r, va
|
|
|
1373
1373
|
a == null || a(e.value), l(!1);
|
|
1374
1374
|
}
|
|
1375
1375
|
}, e.value)
|
|
1376
|
-
}))
|
|
1376
|
+
}, e.value))
|
|
1377
1377
|
}),
|
|
1378
1378
|
children: /* @__PURE__ */ jsx(Button, {
|
|
1379
1379
|
disabled: t,
|
|
@@ -3137,24 +3137,24 @@ const InputGroupAddon = ({ children: e, groupOrder: t, small: n = !1 }) => {
|
|
|
3137
3137
|
})
|
|
3138
3138
|
]
|
|
3139
3139
|
});
|
|
3140
|
-
}, Footer = ({
|
|
3141
|
-
let
|
|
3142
|
-
if (
|
|
3143
|
-
var
|
|
3144
|
-
let { rowCount: n, rowsPerPage: r } =
|
|
3145
|
-
return n > Number(r == null || (
|
|
3140
|
+
}, Footer = ({ pagination: e, actions: t, content: n, testId: r }) => {
|
|
3141
|
+
let i = t && t.length, a = n != null, o = () => {
|
|
3142
|
+
if (e) {
|
|
3143
|
+
var t;
|
|
3144
|
+
let { rowCount: n, rowsPerPage: r } = e;
|
|
3145
|
+
return n > Number(r == null || (t = r.options) == null || (t = t[0]) == null ? void 0 : t.value);
|
|
3146
3146
|
}
|
|
3147
3147
|
return !1;
|
|
3148
3148
|
};
|
|
3149
|
-
return
|
|
3149
|
+
return i || a || o() ? /* @__PURE__ */ jsxs("div", {
|
|
3150
3150
|
className: footer_module_default.footer,
|
|
3151
|
-
"data-testid": `${
|
|
3152
|
-
children: [
|
|
3151
|
+
"data-testid": `${r == null ? "pagination" : r}-footer`,
|
|
3152
|
+
children: [a ? /* @__PURE__ */ jsx("div", {
|
|
3153
3153
|
className: footer_module_default.section,
|
|
3154
|
-
children: /* @__PURE__ */ jsx("div", { children:
|
|
3155
|
-
}) : null,
|
|
3154
|
+
children: /* @__PURE__ */ jsx("div", { children: n })
|
|
3155
|
+
}) : null, i || o() ? /* @__PURE__ */ jsxs("div", {
|
|
3156
3156
|
className: footer_module_default.section,
|
|
3157
|
-
children: [
|
|
3157
|
+
children: [e && o() ? /* @__PURE__ */ jsx(Pagination, { pagination: e }) : /* @__PURE__ */ jsx("div", {}), i && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Actions, { actions: t }) })]
|
|
3158
3158
|
}) : null]
|
|
3159
3159
|
}) : null;
|
|
3160
3160
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oliasoft-open-source/react-ui-library",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.18.0",
|
|
4
4
|
"description": "Reusable UI components for React projects",
|
|
5
5
|
"homepage": "https://oliasoft-open-source.gitlab.io/react-ui-library",
|
|
6
6
|
"bugs": {
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
"@storybook/addon-docs": "^10.2.8",
|
|
82
82
|
"@storybook/addon-links": "^10.2.8",
|
|
83
83
|
"@storybook/addon-themes": "^10.2.8",
|
|
84
|
+
"@storybook/addon-vitest": "^10.2.8",
|
|
84
85
|
"@storybook/react-vite": "^10.2.8",
|
|
85
|
-
"@storybook/test-runner": "0.24.2",
|
|
86
86
|
"@testing-library/dom": "^10.4.1",
|
|
87
87
|
"@testing-library/react": "^16.3.1",
|
|
88
88
|
"@testing-library/user-event": "^14.6.1",
|
|
@@ -122,7 +122,8 @@
|
|
|
122
122
|
"vite-preset-react": "^2.3.0",
|
|
123
123
|
"vite-tsconfig-paths": "^5.1.4",
|
|
124
124
|
"vitest": "^3.0.7",
|
|
125
|
-
"wait-on": "^9.0.3"
|
|
125
|
+
"wait-on": "^9.0.3",
|
|
126
|
+
"@vitest/browser": "3.2.4"
|
|
126
127
|
},
|
|
127
128
|
"peerDependencies": {
|
|
128
129
|
"@dnd-kit/core": "^6.3.1",
|
|
@@ -149,8 +150,8 @@
|
|
|
149
150
|
"prettier:fix": "prettier --write \"**/*.{js,jsx,json,css,less,ts,tsx}\"",
|
|
150
151
|
"preview:storybook": "pnpm exec http-server ./public/storybook -o -p 9003 -c-1",
|
|
151
152
|
"test": "pnpm run prettier:check && pnpm run lint:check && pnpm run test:unit",
|
|
153
|
+
"test:storybook": "vitest run --config vitest.storybook.config.ts",
|
|
152
154
|
"test:unit": "vitest run",
|
|
153
|
-
"test:unit:coverage": "vitest run --coverage"
|
|
154
|
-
"test:storybook": "test-storybook --testTimeout=60000"
|
|
155
|
+
"test:unit:coverage": "vitest run --coverage"
|
|
155
156
|
}
|
|
156
157
|
}
|