Skip to content

Commit

Permalink
label allows element (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
Enalmada authored Dec 7, 2023
1 parent f5396fb commit 1494bc9
Show file tree
Hide file tree
Showing 38 changed files with 463 additions and 452 deletions.
5 changes: 5 additions & 0 deletions .changeset/gold-actors-mate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@enalmada/nextui-admin': patch
---

column label allows string or node
2 changes: 1 addition & 1 deletion .lintstagedrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ const buildEslintCommand = (filenames) =>

export default {
[eslintPattern]: [buildEslintCommand, tsc],
'./package.json': ['npm pkg fix', 'fixpack'],
'./package.json': ['fixpack'],
};
Binary file modified bun.lockb
Binary file not shown.
36 changes: 36 additions & 0 deletions dist/hooks/useBodyLock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { useEffect, useState } from 'react';
import { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect';
export const useLockedBody = (initialLocked = false) => {
const [locked, setLocked] = useState(initialLocked);
// Do the side effect before render
useIsomorphicLayoutEffect(() => {
if (!locked) {
return;
}
// Save initial body style
const originalOverflow = document.body.style.overflow;
const originalPaddingRight = document.body.style.paddingRight;
// Lock body scroll
document.body.style.overflow = 'hidden';
// Get the scrollBar width
const root = document.getElementById('___gatsby'); // or root
const scrollBarWidth = root ? root.offsetWidth - root.scrollWidth : 0;
// Avoid width reflow
if (scrollBarWidth) {
document.body.style.paddingRight = `${scrollBarWidth}px`;
}
return () => {
document.body.style.overflow = originalOverflow;
if (scrollBarWidth) {
document.body.style.paddingRight = originalPaddingRight;
}
};
}, [locked]);
// Update state if initialValue changes
useEffect(() => {
if (locked !== initialLocked) {
setLocked(initialLocked);
}
}, [initialLocked]);
return [locked, setLocked];
};
2 changes: 2 additions & 0 deletions dist/hooks/useIsomorphicLayoutEffect.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { useEffect, useLayoutEffect } from 'react';
export const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;
5 changes: 5 additions & 0 deletions dist/icons/accounts/dots-icon.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import React from 'react';
export const DotsIcon = () => {
return (React.createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
React.createElement("path", { className: "fill-default-400", fillRule: "evenodd", clipRule: "evenodd", d: "M12 8C13.1 8 14 7.1 14 6C14 4.9 13.1 4 12 4C10.9 4 10 4.9 10 6C10 7.1 10.9 8 12 8ZM12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10ZM12 16C10.9 16 10 16.9 10 18C10 19.1 10.9 20 12 20C13.1 20 14 19.1 14 18C14 16.9 13.1 16 12 16Z", fill: "#969696" })));
};
5 changes: 5 additions & 0 deletions dist/icons/accounts/export-icon.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions dist/icons/accounts/info-icon.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import React from 'react';
export const InfoIcon = () => {
return (React.createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
React.createElement("path", { className: "fill-default-400", d: "M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 17C11.45 17 11 16.55 11 16V12C11 11.45 11.45 11 12 11C12.55 11 13 11.45 13 12V16C13 16.55 12.55 17 12 17ZM13 9H11V7H13V9Z", fill: "#969696" })));
};
5 changes: 5 additions & 0 deletions dist/icons/accounts/trash-icon.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions dist/icons/breadcrumb/house-icon.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions dist/icons/breadcrumb/users-icon.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions dist/icons/sidebar/chevron-up-icon.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import React from 'react';
export const ChevronUpIcon = ({ ...props }) => {
return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", ...props },
React.createElement("path", { className: "fill-default-400", d: "m6.293 13.293 1.414 1.414L12 10.414l4.293 4.293 1.414-1.414L12 7.586z" })));
};
5 changes: 5 additions & 0 deletions dist/icons/sidebar/settings-icon.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions dist/icons/table/delete-icon.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions dist/icons/table/edit-icon.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions dist/icons/table/eye-icon.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1494bc9

Please sign in to comment.