@bigbinary/neeto-atoms 1.0.23 → 1.0.25
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/{DataTable-CfcHsQuw.js → DataTable-Dre7vc3w.js} +42 -33
- package/dist/DataTable-Dre7vc3w.js.map +1 -0
- package/dist/{Dialog-B2dcw0Zz.js → Dialog-BURSzxaP.js} +2 -2
- package/dist/Dialog-BURSzxaP.js.map +1 -0
- package/dist/cjs/{DataTable-BOeCq0s4.js → DataTable-Cw0ly-hT.js} +42 -33
- package/dist/cjs/DataTable-Cw0ly-hT.js.map +1 -0
- package/dist/cjs/{Dialog-dYYmRaZU.js → Dialog-CtI_yWsJ.js} +2 -2
- package/dist/cjs/Dialog-CtI_yWsJ.js.map +1 -0
- package/dist/cjs/components/DataTable.js +1 -1
- package/dist/cjs/components/Dialog.js +1 -1
- package/dist/cjs/components/index.js +2 -2
- package/dist/cjs/formik/BlockNavigation.js +1 -1
- package/dist/cjs/formik/index.js +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/primitives/Dialog.js +2 -2
- package/dist/cjs/primitives/Dialog.js.map +1 -1
- package/dist/cjs/primitives/Sheet.js +2 -2
- package/dist/cjs/primitives/Sheet.js.map +1 -1
- package/dist/components/DataTable.js +1 -1
- package/dist/components/Dialog.js +1 -1
- package/dist/components/index.js +2 -2
- package/dist/formik/BlockNavigation.js +1 -1
- package/dist/formik/index.js +1 -1
- package/dist/index.js +2 -2
- package/dist/primitives/Dialog.d.ts +2 -2
- package/dist/primitives/Dialog.js +2 -2
- package/dist/primitives/Dialog.js.map +1 -1
- package/dist/primitives/Sheet.d.ts +2 -2
- package/dist/primitives/Sheet.js +2 -2
- package/dist/primitives/Sheet.js.map +1 -1
- package/package.json +1 -1
- package/dist/DataTable-CfcHsQuw.js.map +0 -1
- package/dist/Dialog-B2dcw0Zz.js.map +0 -1
- package/dist/cjs/DataTable-BOeCq0s4.js.map +0 -1
- package/dist/cjs/Dialog-dYYmRaZU.js.map +0 -1
|
@@ -14,7 +14,7 @@ const DialogHeader = forwardRef(({ children, className, description, dataTestid,
|
|
|
14
14
|
DialogHeader.displayName = "Dialog.Header";
|
|
15
15
|
const DialogBody = forwardRef(({ children, className, dataTestid, ...otherProps }, ref) => (jsx("div", { ref: ref, "data-slot": "dialog-body", "data-testid": dataTestid ?? "dialog-body", className: cn("text-sm text-foreground", className), ...otherProps, children: children })));
|
|
16
16
|
DialogBody.displayName = "Dialog.Body";
|
|
17
|
-
const DialogFooter = forwardRef(({ children, className, dataTestid, ...otherProps }, ref) => (jsx(DialogFooter$1, { ref: ref, className: cn(
|
|
17
|
+
const DialogFooter = forwardRef(({ children, className, dataTestid, ...otherProps }, ref) => (jsx(DialogFooter$1, { ref: ref, className: cn(className), "data-testid": dataTestid ?? "dialog-footer", ...otherProps, children: children })));
|
|
18
18
|
DialogFooter.displayName = "Dialog.Footer";
|
|
19
19
|
const DialogTitle = forwardRef(({ children, className, ...otherProps }, ref) => (jsx(DialogTitle$1, { ref: ref, className: cn("text-2xl font-semibold", className), ...otherProps, children: children })));
|
|
20
20
|
DialogTitle.displayName = "Dialog.Title";
|
|
@@ -58,4 +58,4 @@ Dialog.Footer = DialogFooter;
|
|
|
58
58
|
Dialog.Title = DialogTitle;
|
|
59
59
|
|
|
60
60
|
export { Dialog as D };
|
|
61
|
-
//# sourceMappingURL=Dialog-
|
|
61
|
+
//# sourceMappingURL=Dialog-BURSzxaP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog-BURSzxaP.js","sources":["../src/components/Dialog/constants.ts","../src/components/Dialog/Dialog.tsx"],"sourcesContent":["import type { DialogSize } from \"./Dialog\";\n\nexport const SIZE_CLASS_MAP: Record<DialogSize, string> = {\n small: \"sm:max-w-sm\",\n medium: \"sm:max-w-md\",\n large: \"sm:max-w-lg\",\n fullScreen: \"h-screen w-screen max-w-none rounded-none sm:max-w-none\",\n};\n","import React, { forwardRef, type ReactNode, type RefObject } from \"react\";\n\nimport { cn } from \"src/shadcn/lib/utils\";\nimport {\n Dialog as PrimitiveDialog,\n DialogContent as PrimitiveDialogContent,\n DialogDescription,\n DialogFooter as PrimitiveDialogFooter,\n DialogHeader as PrimitiveDialogHeader,\n DialogTitle as PrimitiveDialogTitle,\n} from \"src/primitives/Dialog\";\n\nimport { SIZE_CLASS_MAP } from \"./constants\";\n\nexport type DialogSize = \"small\" | \"medium\" | \"large\" | \"fullScreen\";\n\n/** Radix Dialog.Content props we forward via ...otherProps. */\ntype DialogContentProps = React.ComponentProps<typeof PrimitiveDialogContent>;\n\nexport interface DialogProps extends Omit<\n DialogContentProps,\n | \"children\"\n | \"className\"\n | \"showCloseButton\"\n | \"onEscapeKeyDown\"\n | \"onInteractOutside\"\n> {\n /** Size of the dialog. */\n size?: DialogSize;\n /** Whether the dialog is open. */\n isOpen?: boolean;\n /** Callback invoked when the dialog is closed. */\n onClose?: () => void;\n /** Content rendered inside the dialog. */\n children?: ReactNode;\n /** Additional CSS class names applied to the dialog content. */\n className?: string;\n /** Close on pressing the Esc key. */\n closeOnEsc?: boolean;\n /** Show the close button. */\n closeButton?: boolean;\n /** Additional CSS class names applied to the backdrop/overlay. */\n backdropClassName?: string;\n /** Close on clicking outside the dialog. */\n closeOnOutsideClick?: boolean;\n /** Ref of the element to receive focus when the dialog opens. */\n initialFocusRef?: RefObject<HTMLElement | null>;\n /** Ref of the element to receive focus when the dialog closes. */\n finalFocusRef?: RefObject<HTMLElement | null>;\n /** Whether to block body scroll when the dialog is mounted. Maps to Radix `modal` prop. */\n blockScrollOnMount?: boolean;\n /** Force children to re-render even when the dialog is closed. */\n forceRender?: boolean;\n /** Radix Dialog `modal` prop — takes precedence over blockScrollOnMount. */\n modal?: boolean;\n /** Radix Dialog `defaultOpen` prop. */\n defaultOpen?: boolean;\n}\n\ninterface DialogSubcomponentProps extends React.ComponentProps<\"div\"> {\n children?: ReactNode;\n className?: string;\n /** Custom data-testid attribute. */\n dataTestid?: string;\n}\n\nconst DialogHeader = forwardRef<\n HTMLDivElement,\n DialogSubcomponentProps & { description?: string }\n>(({ children, className, description, dataTestid, ...otherProps }, ref) => (\n <PrimitiveDialogHeader\n ref={ref}\n className={cn(className)}\n data-testid={dataTestid ?? \"dialog-header\"}\n {...otherProps}\n >\n {children}\n {description && <DialogDescription>{description}</DialogDescription>}\n </PrimitiveDialogHeader>\n));\nDialogHeader.displayName = \"Dialog.Header\";\n\nconst DialogBody = forwardRef<HTMLDivElement, DialogSubcomponentProps>(\n ({ children, className, dataTestid, ...otherProps }, ref) => (\n <div\n ref={ref}\n data-slot=\"dialog-body\"\n data-testid={dataTestid ?? \"dialog-body\"}\n className={cn(\"text-sm text-foreground\", className)}\n {...otherProps}\n >\n {children}\n </div>\n )\n);\nDialogBody.displayName = \"Dialog.Body\";\n\nconst DialogFooter = forwardRef<HTMLDivElement, DialogSubcomponentProps>(\n ({ children, className, dataTestid, ...otherProps }, ref) => (\n <PrimitiveDialogFooter\n ref={ref}\n className={cn(className)}\n data-testid={dataTestid ?? \"dialog-footer\"}\n {...otherProps}\n >\n {children}\n </PrimitiveDialogFooter>\n )\n);\nDialogFooter.displayName = \"Dialog.Footer\";\n\nconst DialogTitle = forwardRef<\n HTMLHeadingElement,\n React.ComponentProps<typeof PrimitiveDialogTitle>\n>(({ children, className, ...otherProps }, ref) => (\n <PrimitiveDialogTitle\n ref={ref}\n className={cn(\"text-2xl font-semibold\", className)}\n {...otherProps}\n >\n {children}\n </PrimitiveDialogTitle>\n));\nDialogTitle.displayName = \"Dialog.Title\";\n\nconst Dialog = forwardRef<HTMLDivElement, DialogProps>(\n (\n {\n size = \"medium\",\n isOpen = false,\n onClose = () => {},\n children,\n className,\n closeOnEsc = true,\n closeButton = true,\n backdropClassName,\n closeOnOutsideClick = true,\n initialFocusRef,\n finalFocusRef,\n blockScrollOnMount = true,\n forceRender = false,\n modal: modalProp,\n defaultOpen,\n // Radix content handlers — intercept and merge\n onOpenAutoFocus: onOpenAutoFocusProp,\n onCloseAutoFocus: onCloseAutoFocusProp,\n ...otherContentProps\n },\n ref\n ) => {\n const handleOpenChange = (open: boolean) => {\n if (!open) onClose();\n };\n\n const handleInteractOutside = (e: Event) => {\n if (!closeOnOutsideClick) e.preventDefault();\n };\n\n const handleEscapeKeyDown = (e: KeyboardEvent) => {\n if (!closeOnEsc) e.preventDefault();\n };\n\n const handleOpenAutoFocus = (e: Event) => {\n if (initialFocusRef?.current) {\n e.preventDefault();\n initialFocusRef.current.focus();\n }\n onOpenAutoFocusProp?.(e);\n };\n\n const handleCloseAutoFocus = (e: Event) => {\n if (finalFocusRef?.current) {\n e.preventDefault();\n finalFocusRef.current.focus();\n }\n onCloseAutoFocusProp?.(e);\n };\n\n // `modal` prop takes precedence; fall back to blockScrollOnMount\n const resolvedModal = modalProp ?? blockScrollOnMount;\n\n return (\n <PrimitiveDialog\n open={isOpen}\n onOpenChange={handleOpenChange}\n modal={resolvedModal}\n defaultOpen={defaultOpen}\n >\n <PrimitiveDialogContent\n ref={ref}\n aria-modal\n showCloseButton={closeButton}\n forceMount={forceRender || undefined}\n overlayClassName={backdropClassName}\n onInteractOutside={handleInteractOutside}\n onEscapeKeyDown={handleEscapeKeyDown}\n onOpenAutoFocus={handleOpenAutoFocus}\n onCloseAutoFocus={handleCloseAutoFocus}\n className={cn(SIZE_CLASS_MAP[size], className)}\n data-testid=\"dialog-wrapper\"\n {...otherContentProps}\n >\n {children}\n </PrimitiveDialogContent>\n </PrimitiveDialog>\n );\n }\n) as React.ForwardRefExoticComponent<\n DialogProps & React.RefAttributes<HTMLDivElement>\n> & {\n Header: typeof DialogHeader;\n Body: typeof DialogBody;\n Footer: typeof DialogFooter;\n Title: typeof DialogTitle;\n};\n\nDialog.displayName = \"Dialog\";\nDialog.Header = DialogHeader;\nDialog.Body = DialogBody;\nDialog.Footer = DialogFooter;\nDialog.Title = DialogTitle;\n\nexport { Dialog };\n"],"names":["_jsxs","PrimitiveDialogHeader","_j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,MAAM,GAAG,YAAY;AAC5B,MAAM,CAAC,IAAI,GAAG,UAAU;AACxB,MAAM,CAAC,MAAM,GAAG,YAAY;AAC5B,MAAM,CAAC,KAAK,GAAG,WAAW;;;;"}
|
|
@@ -3375,7 +3375,6 @@ const useTableSelection = ({ enableRowSelection, selectedRowKeys, onRowSelect, d
|
|
|
3375
3375
|
ariaLabel: "Select row",
|
|
3376
3376
|
}),
|
|
3377
3377
|
size: 40,
|
|
3378
|
-
maxSize: 40,
|
|
3379
3378
|
enableSorting: false,
|
|
3380
3379
|
enableResizing: false,
|
|
3381
3380
|
};
|
|
@@ -3714,43 +3713,53 @@ const DataTable = ({ columns, data, getRowId: getRowIdProp, sorting: sortingProp
|
|
|
3714
3713
|
onSortingChange([{ id: columnId, desc }]);
|
|
3715
3714
|
}
|
|
3716
3715
|
};
|
|
3717
|
-
return (jsxRuntime.jsxs("div", { className: utils.cn("relative flex min-h-0 w-full flex-col", className), children: [loading && jsxRuntime.jsx(LoadingOverlay, {}), bulkSelectAllRowsProps &&
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
:
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3716
|
+
return (jsxRuntime.jsxs("div", { className: utils.cn("relative flex min-h-0 w-full flex-col", className), children: [loading && jsxRuntime.jsx(LoadingOverlay, {}), bulkSelectAllRowsProps &&
|
|
3717
|
+
(data.length !== totalCount || isBulkAllSelected) && (jsxRuntime.jsx(BulkSelectCallout, { bulkSelectAllRowsProps: bulkSelectAllRowsProps, isAllPageRowsSelected: table.getIsAllPageRowsSelected(), isBulkAllSelected: isBulkAllSelected })), jsxRuntime.jsx("div", { className: utils.cn("min-h-0 flex-1 overflow-auto", bordered && "rounded-lg border"), children: jsxRuntime.jsxs(primitives_Table.Table, { children: [jsxRuntime.jsx(primitives_Table.TableHeader, { className: "sticky top-0 z-20 bg-muted", children: table.getHeaderGroups().map(headerGroup => {
|
|
3718
|
+
const dataHeaders = headerGroup.headers.filter(h => h.column.id !== "_selection");
|
|
3719
|
+
const totalDataSize = dataHeaders.reduce((sum, h) => sum + h.getSize(), 0);
|
|
3720
|
+
return (jsxRuntime.jsx(primitives_Table.TableRow, { className: "hover:bg-muted", children: headerGroup.headers.map((header, headerIndex) => {
|
|
3721
|
+
const isPinned = header.column.getIsPinned();
|
|
3722
|
+
const isSelectionCol = header.column.id === "_selection";
|
|
3723
|
+
const columnIndexInData = dataHeaders.findIndex(h => h.id === header.id);
|
|
3724
|
+
return (jsxRuntime.jsxs(primitives_Table.TableHead, { className: utils.cn("group/head relative", header.column.getCanSort() &&
|
|
3725
|
+
"cursor-pointer select-none", isPinned && "sticky z-10 bg-muted"), style: {
|
|
3726
|
+
width: selectionColumn && isSelectionCol
|
|
3727
|
+
? 0
|
|
3728
|
+
: selectionColumn
|
|
3729
|
+
? `${(header.getSize() / totalDataSize) * 100}%`
|
|
3730
|
+
: header.getSize(),
|
|
3731
|
+
minWidth: enableColumnResize
|
|
3732
|
+
? header.getSize()
|
|
3733
|
+
: undefined,
|
|
3734
|
+
...(isPinned === "left"
|
|
3735
|
+
? {
|
|
3736
|
+
left: header.column.getStart("left"),
|
|
3737
|
+
}
|
|
3738
|
+
: {}),
|
|
3739
|
+
...(isPinned === "right"
|
|
3740
|
+
? {
|
|
3741
|
+
right: header.column.getAfter("right"),
|
|
3742
|
+
}
|
|
3743
|
+
: {}),
|
|
3744
|
+
}, onClick: header.column.getCanSort()
|
|
3745
|
+
? header.column.getToggleSortingHandler()
|
|
3746
|
+
: undefined, children: [header.isPlaceholder ? null : (jsxRuntime.jsxs("div", { className: "flex items-center", children: [jsxRuntime.jsx("div", { className: "flex-1 truncate", children: flexRender(header.column.columnDef.header, header.getContext()) }), jsxRuntime.jsx(SortIndicator, { column: header.column }), showHeaderMenu && !isSelectionCol && (jsxRuntime.jsx(HeaderCellMenu, { column: header.column, columnIndex: columnIndexInData, enableAddColumn: enableAddColumn, enableColumnFreeze: enableColumnFreeze, isColumnPinned: isColumnPinned(header.column.id), canMoveLeft: headerIndex > (selectionColumn ? 1 : 0), canMoveRight: headerIndex < headerGroup.headers.length - 1, onSort: handleSort, onHideColumn: onColumnHideProp ? hideColumn : undefined, onTogglePin: toggleColumnPin, onAddColumn: onColumnAdd, onDeleteColumn: onColumnDelete, onMoveColumn: onColumnUpdate
|
|
3747
|
+
? (colId, dir) => moveColumn(colId, dir)
|
|
3748
|
+
: undefined, onMoreActionClick: onMoreActionClick }))] })), enableColumnResize && jsxRuntime.jsx(ResizeHandle, { header: header })] }, header.id));
|
|
3749
|
+
}) }, headerGroup.id));
|
|
3750
|
+
}) }), jsxRuntime.jsx(primitives_Table.TableBody, { className: loading ? "opacity-50" : undefined, children: table.getRowModel().rows.length > 0 ? (table.getRowModel().rows.map(row => (jsxRuntime.jsx(primitives_Table.TableRow, { "data-state": row.getIsSelected() ? "selected" : undefined, className: utils.cn("group", allowRowClick && onRowClick && "cursor-pointer"), onClick: allowRowClick && onRowClick
|
|
3745
3751
|
? event => onRowClick(event, row.original, row.index)
|
|
3746
3752
|
: undefined, children: row.getVisibleCells().map(cell => {
|
|
3747
3753
|
const isPinned = cell.column.getIsPinned();
|
|
3748
|
-
|
|
3749
|
-
|
|
3754
|
+
const isSelCell = cell.column.id === "_selection";
|
|
3755
|
+
return (jsxRuntime.jsx(primitives_Table.TableCell, { className: utils.cn(isPinned &&
|
|
3756
|
+
"sticky z-10 bg-background group-data-[state=selected]:bg-muted"), style: {
|
|
3757
|
+
width: selectionColumn && isSelCell
|
|
3758
|
+
? 0
|
|
3759
|
+
: cell.column.getSize(),
|
|
3750
3760
|
minWidth: enableColumnResize
|
|
3751
3761
|
? cell.column.getSize()
|
|
3752
3762
|
: undefined,
|
|
3753
|
-
maxWidth: cell.column.columnDef.maxSize,
|
|
3754
3763
|
...(isPinned === "left"
|
|
3755
3764
|
? {
|
|
3756
3765
|
left: cell.column.getStart("left"),
|
|
@@ -3772,4 +3781,4 @@ exports.useColumnVisibility = useColumnVisibility;
|
|
|
3772
3781
|
exports.useTablePagination = useTablePagination;
|
|
3773
3782
|
exports.useTableSelection = useTableSelection;
|
|
3774
3783
|
exports.useTableSort = useTableSort;
|
|
3775
|
-
//# sourceMappingURL=DataTable-
|
|
3784
|
+
//# sourceMappingURL=DataTable-Cw0ly-hT.js.map
|