@rolster/react-components 19.7.11 → 19.7.13
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/cjs/index.cjs +15 -4
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/es/index.mjs +15 -5
- package/dist/es/index.mjs.map +1 -1
- package/dist/esm/components/atoms/SwapHover/SwapHover.d.ts +8 -0
- package/dist/esm/components/atoms/SwapHover/SwapHover.js +7 -0
- package/dist/esm/components/atoms/SwapHover/SwapHover.js.map +1 -0
- package/dist/esm/components/molecules/Pagination/Pagination.d.ts +3 -1
- package/dist/esm/components/molecules/Pagination/Pagination.js +9 -4
- package/dist/esm/components/molecules/Pagination/Pagination.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/package.json +6 -6
package/dist/cjs/index.cjs
CHANGED
|
@@ -1257,6 +1257,11 @@ function RlsSkeletonTextComponent({ active, children, rlsTheme }) {
|
|
|
1257
1257
|
}
|
|
1258
1258
|
const RlsSkeletonText = require$$0.memo(RlsSkeletonTextComponent);
|
|
1259
1259
|
|
|
1260
|
+
function RlsSwapHoverComponent({ children, content, identifier, rlsTheme }) {
|
|
1261
|
+
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: "rls-swap-hover", "rls-theme": rlsTheme, children: [jsxRuntimeExports.jsx("div", { className: "rls-swap-hover__primary", children: children }), jsxRuntimeExports.jsx("div", { className: "rls-swap-hover__secondary", children: content })] }));
|
|
1262
|
+
}
|
|
1263
|
+
const RlsHoverSwap = require$$0.memo(RlsSwapHoverComponent);
|
|
1264
|
+
|
|
1260
1265
|
function RlsSwitchComponent({ checked, capsule, disabled, identifier, onClick, rlsTheme }) {
|
|
1261
1266
|
const className = renderClassStatus('rls-switch', {
|
|
1262
1267
|
checked,
|
|
@@ -1865,12 +1870,17 @@ function PageButton({ page, onSelect }) {
|
|
|
1865
1870
|
}, [page, onSelect]);
|
|
1866
1871
|
return (jsxRuntimeExports.jsx("button", { type: "button", className: className, onClick: onClick, children: page.label }));
|
|
1867
1872
|
}
|
|
1868
|
-
function RlsPaginationComponent({ suggestions, count, filter, onPagination }) {
|
|
1873
|
+
function RlsPaginationComponent({ suggestions, count, filter, onPagination, position }) {
|
|
1869
1874
|
const [template, setTemplate] = require$$0.useState();
|
|
1870
1875
|
const controller = require$$0.useRef(undefined);
|
|
1871
1876
|
const refreshTemplate = require$$0.useCallback((template, suggestions) => {
|
|
1872
|
-
const { firstPage, lastPage } = template;
|
|
1873
|
-
onPagination?.({
|
|
1877
|
+
const { currentPage, firstPage, lastPage } = template;
|
|
1878
|
+
onPagination?.({
|
|
1879
|
+
currentPage: currentPage.value,
|
|
1880
|
+
firstPage,
|
|
1881
|
+
lastPage,
|
|
1882
|
+
suggestions
|
|
1883
|
+
});
|
|
1874
1884
|
setTemplate(template);
|
|
1875
1885
|
}, [onPagination]);
|
|
1876
1886
|
const refreshPagination = require$$0.useCallback((pagination) => {
|
|
@@ -1882,7 +1892,7 @@ function RlsPaginationComponent({ suggestions, count, filter, onPagination }) {
|
|
|
1882
1892
|
const pagination = new components.PaginationController({
|
|
1883
1893
|
suggestions,
|
|
1884
1894
|
count,
|
|
1885
|
-
position: template?.currentPage.value
|
|
1895
|
+
position: template?.currentPage.value ?? position
|
|
1886
1896
|
});
|
|
1887
1897
|
controller.current = pagination;
|
|
1888
1898
|
refreshTemplate(pagination.template, pagination.page.collection);
|
|
@@ -4878,6 +4888,7 @@ exports.RlsFieldSelect = RlsFieldSelect;
|
|
|
4878
4888
|
exports.RlsFieldSelectTemplate = RlsFieldSelectTemplate;
|
|
4879
4889
|
exports.RlsFieldText = RlsFieldText;
|
|
4880
4890
|
exports.RlsFormNavigation = RlsFormNavigation;
|
|
4891
|
+
exports.RlsHoverSwap = RlsHoverSwap;
|
|
4881
4892
|
exports.RlsIcon = RlsIcon;
|
|
4882
4893
|
exports.RlsImage = RlsImage;
|
|
4883
4894
|
exports.RlsImageChooser = RlsImageChooser;
|