dawn-ui-react 1.0.0-alpha → 1.0.0-alpha.10

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.
Files changed (77) hide show
  1. package/dist/{Input-Br91lfPH.js → Input--h5J-IHe.js} +4 -4
  2. package/dist/{clamp-C6OCmUfq.js → clamp-XXDcNhZ7.js} +50 -50
  3. package/dist/{cn-CXogf8HW.js → cn-DWnOBdrm.js} +349 -307
  4. package/dist/components/badge/badge.d.ts +1 -1
  5. package/dist/components/badge/badge.types.d.ts +1 -0
  6. package/dist/components/code-block/code-block-actions.d.ts +2 -0
  7. package/dist/components/code-block/code-block-copy.d.ts +2 -0
  8. package/dist/components/code-block/code-block-download.d.ts +2 -0
  9. package/dist/components/code-block/code-block-header-group.d.ts +2 -0
  10. package/dist/components/code-block/code-block-header.d.ts +3 -0
  11. package/dist/components/code-block/code-block-name.d.ts +2 -0
  12. package/dist/components/code-block/code-block-select.d.ts +2 -0
  13. package/dist/components/code-block/code-block-tabs.d.ts +2 -0
  14. package/dist/components/code-block/code-block-window.d.ts +3 -0
  15. package/dist/components/code-block/code-block.d.ts +3 -0
  16. package/dist/components/code-block/code-block.types.d.ts +26 -0
  17. package/dist/components/code-block/index.d.ts +2 -0
  18. package/dist/components/dialog/index.d.ts +1 -1
  19. package/dist/components/drawer/drawer-close.d.ts +2 -0
  20. package/dist/components/drawer/drawer-content.d.ts +2 -0
  21. package/dist/components/drawer/drawer-description.d.ts +2 -0
  22. package/dist/components/drawer/drawer-header.d.ts +2 -0
  23. package/dist/components/drawer/drawer-popup.d.ts +2 -0
  24. package/dist/components/drawer/drawer-provider.d.ts +2 -0
  25. package/dist/components/drawer/drawer-title.d.ts +2 -0
  26. package/dist/components/drawer/drawer-trigger.d.ts +2 -0
  27. package/dist/components/drawer/drawer.d.ts +2 -0
  28. package/dist/components/drawer/drawer.types.d.ts +10 -0
  29. package/dist/components/drawer/index.d.ts +10 -0
  30. package/dist/components/index.d.ts +2 -0
  31. package/dist/components/input-otp/index.d.ts +2 -1
  32. package/dist/components/input-otp/input-otp-separator.d.ts +2 -0
  33. package/dist/components/input-otp/input-otp-slot.d.ts +1 -1
  34. package/dist/components/input-otp/input-otp.types.d.ts +4 -3
  35. package/dist/components/layer-tree/index.d.ts +5 -1
  36. package/dist/components/layer-tree/layer-tree-body.d.ts +1 -1
  37. package/dist/components/layer-tree/layer-tree-footer.d.ts +2 -0
  38. package/dist/components/layer-tree/layer-tree-node-toggle.d.ts +1 -1
  39. package/dist/components/layer-tree/layer-tree-node.d.ts +1 -1
  40. package/dist/components/layer-tree/layer-tree-row.d.ts +1 -1
  41. package/dist/components/layer-tree/layer-tree-search.d.ts +1 -1
  42. package/dist/components/layer-tree/layer-tree-sort.d.ts +2 -0
  43. package/dist/components/layer-tree/layer-tree-utils.d.ts +83 -0
  44. package/dist/components/layer-tree/layer-tree.d.ts +9 -4
  45. package/dist/components/layer-tree/layer-tree.types.d.ts +16 -5
  46. package/dist/components/popover/index.d.ts +2 -1
  47. package/dist/components/popover/popover-button.d.ts +2 -0
  48. package/dist/components/popover/popover.types.d.ts +2 -0
  49. package/dist/components/profile/index.d.ts +5 -1
  50. package/dist/components/profile/profile-action.d.ts +2 -0
  51. package/dist/components/profile/profile-content.d.ts +2 -0
  52. package/dist/components/profile/profile-name.d.ts +2 -0
  53. package/dist/components/profile/profile-subname.d.ts +2 -0
  54. package/dist/components/profile/profile.d.ts +1 -1
  55. package/dist/components/profile/profile.types.d.ts +6 -14
  56. package/dist/components/separator/separator.d.ts +1 -1
  57. package/dist/components/separator/separator.types.d.ts +3 -1
  58. package/dist/components/tabs/tabs.types.d.ts +1 -1
  59. package/dist/dawn-ui-react.js +20673 -10612
  60. package/dist/dawn-ui-react.umd.cjs +71 -24
  61. package/dist/{field-input-group-Dcwadst3.js → field-input-group-8FpzC5q3.js} +3 -3
  62. package/dist/{field-input-group-input-CLQz2SPo.js → field-input-group-input-DZCaKPkV.js} +3 -3
  63. package/dist/{form-context-CzC_p5DL.js → form-context-D2zlNF0l.js} +529 -509
  64. package/dist/{input-group-D3zocoNy.js → input-group-Ddhxk-gp.js} +2 -2
  65. package/dist/{input-group-input-CHby62R-.js → input-group-input-iCeN23U6.js} +2 -2
  66. package/dist/input.types-oyKEbsbD.js +21 -0
  67. package/dist/styles.css +149 -118
  68. package/dist/{useLabelableId-VWw8rfpn.js → useLabelableId-C8TWIYiH.js} +51 -51
  69. package/package.json +40 -40
  70. package/dist/field-description-BDRJXMS8.js +0 -12
  71. package/dist/field-errors-BDUanNiE.js +0 -19
  72. package/dist/field-input-0WxX-93A.js +0 -58
  73. package/dist/field-label-DwF_1o76.js +0 -16
  74. package/dist/field-select-BmvhGVSz.js +0 -2149
  75. package/dist/field-slider-oL8pDrCe.js +0 -2167
  76. package/dist/input.types-Dl_61f0y.js +0 -21
  77. package/dist/rolldown-runtime-CAFD8bLK.js +0 -11
@@ -1,2 +1,2 @@
1
1
  import { BadgeProps } from './badge.types';
2
- export declare const Badge: ({ className, tone, variant, children, ref, ...props }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const Badge: ({ className, size, tone, variant, children, ref, ...props }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import { ComponentProps } from 'react';
3
3
  export declare const badgeVariants: (props?: ({
4
+ size?: "small" | "large" | "medium" | "iconLarge" | "iconMedium" | "iconSmall" | null | undefined;
4
5
  tone?: "brand" | "accent" | "neutral" | "error" | "info" | "success" | "warning" | null | undefined;
5
6
  variant?: "fill" | "outline" | "soft" | null | undefined;
6
7
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -0,0 +1,2 @@
1
+ import { CodeBlockActionsProps } from './code-block.types';
2
+ export declare const CodeBlockActions: ({ className, children, ref, ...props }: CodeBlockActionsProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { CodeBlockCopyProps } from './code-block.types';
2
+ export declare const CodeBlockCopy: ({ className, children, ref, ...props }: CodeBlockCopyProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { CodeBlockDownloadProps } from './code-block.types';
2
+ export declare const CodeBlockDownload: ({ className, children, ref, ...props }: CodeBlockDownloadProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { CodeBlockHeaderGroupProps } from './code-block.types';
2
+ export declare const CodeBlockHeaderGroup: ({ className, children, ref, ...props }: CodeBlockHeaderGroupProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ type CodeBlockHeaderProps = React.ComponentProps<'div'>;
2
+ export declare const CodeBlockHeader: ({ className, children, ref, ...props }: CodeBlockHeaderProps) => import("react/jsx-runtime").JSX.Element;
3
+ export {};
@@ -0,0 +1,2 @@
1
+ import { CodeBlockNameProps } from './code-block.types';
2
+ export declare const CodeBlockName: ({ className, children, ref, ...props }: CodeBlockNameProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { CodeBlockSelectProps } from './code-block.types';
2
+ export declare const CodeBlockSelect: ({ className, children, ref, ...props }: CodeBlockSelectProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { CodeBlockTabsProps } from './code-block.types';
2
+ export declare const CodeBlockTabs: ({ className, children, ref, ...props }: CodeBlockTabsProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ type CodeBlockWindowProps = React.ComponentProps<'div'>;
2
+ export declare const CodeBlockWindow: ({ className, children, ref, ...props }: CodeBlockWindowProps) => import("react/jsx-runtime").JSX.Element;
3
+ export {};
@@ -0,0 +1,3 @@
1
+ import { CodeBlockProps, CodeBlockProviderState } from './code-block.types';
2
+ export declare const CodeBlock: ({ items, defaultValue, className, children, ref, ...props }: CodeBlockProps) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const useCodeBlock: () => CodeBlockProviderState;
@@ -0,0 +1,26 @@
1
+ import { SelectTrigger } from '../select';
2
+ import { Tabs } from '../tabs';
3
+ export type CodeBlockProps = Omit<React.ComponentProps<'div'>, 'defaultValue'> & {
4
+ defaultValue: CodeBlockValue;
5
+ items: CodeBlockValue[];
6
+ };
7
+ export type CodeBlockProviderState = {
8
+ currentValue: CodeBlockValue;
9
+ setCurrentValue: React.Dispatch<React.SetStateAction<CodeBlockValue>>;
10
+ items: CodeBlockValue[];
11
+ };
12
+ export type CodeBlockValue = {
13
+ id: string;
14
+ label: string;
15
+ name: string;
16
+ content: string;
17
+ icon?: React.ReactNode;
18
+ };
19
+ export type CodeBlockTabsProps = React.ComponentProps<typeof Tabs>;
20
+ export type CodeBlockCopyProps = React.ComponentProps<'button'>;
21
+ export type CodeBlockNameProps = React.ComponentProps<'div'>;
22
+ export type CodeBlockSelectProps = React.ComponentProps<typeof SelectTrigger>;
23
+ export type CodeBlockHeaderGroupProps = React.ComponentProps<'div'>;
24
+ export type CodeBlockTitleProps = React.ComponentProps<'div'>;
25
+ export type CodeBlockDownloadProps = React.ComponentProps<'button'>;
26
+ export type CodeBlockActionsProps = React.ComponentProps<'div'>;
@@ -0,0 +1,2 @@
1
+ export type { CodeBlockProps } from './code-block.types';
2
+ export { CodeBlock } from './code-block';
@@ -1,5 +1,5 @@
1
1
  export { Dialog } from './dialog';
2
- export type { DialogCloseProps, DialogDescriptionProps, DialogFooterProps, DialogHeaderProps, DialogPopupProps, DialogProps, DialogTitleProps, DialogTriggerProps, } from './dialog.types';
2
+ export type { DialogCloseProps, DialogDescriptionProps, DialogFooterProps, DialogHeaderProps, DialogPopupProps, DialogProps, DialogTitleProps, DialogTriggerProps, DialogContentProps, } from './dialog.types';
3
3
  export { DialogClose } from './dialog-close';
4
4
  export { DialogContent } from './dialog-content';
5
5
  export { DialogDescription } from './dialog-description';
@@ -0,0 +1,2 @@
1
+ import { DrawerCloseProps } from './drawer.types';
2
+ export declare const DrawerClose: ({ className, children, ref, ...props }: DrawerCloseProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { DrawerContentProps } from './drawer.types';
2
+ export declare const DrawerContent: ({ className, children, ref, ...props }: DrawerContentProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { DrawerDescriptionProps } from './drawer.types';
2
+ export declare const DrawerDescription: ({ className, children, ref, ...props }: DrawerDescriptionProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { DrawerHeaderProps } from './drawer.types';
2
+ export declare const DrawerHeader: ({ className, children, ref, ...props }: DrawerHeaderProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { DrawerPopupProps } from './drawer.types';
2
+ export declare const DrawerPopup: ({ className, children, ref, ...props }: DrawerPopupProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { DrawerProviderProps } from './drawer.types';
2
+ export declare const DrawerProvider: ({ children, ...props }: DrawerProviderProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { DrawerTitleProps } from './drawer.types';
2
+ export declare const DrawerTitle: ({ className, children, ref, ...props }: DrawerTitleProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { DrawerTriggerProps } from './drawer.types';
2
+ export declare const DrawerTrigger: ({ className, children, ref, ...props }: DrawerTriggerProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { DrawerProps } from './drawer.types';
2
+ export declare const Drawer: ({ children, ...props }: DrawerProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { Drawer as BaseDrawer } from '@base-ui/react';
2
+ export type DrawerProps = BaseDrawer.Root.Props;
3
+ export type DrawerProviderProps = BaseDrawer.Provider.Props;
4
+ export type DrawerTriggerProps = BaseDrawer.Trigger.Props;
5
+ export type DrawerPopupProps = BaseDrawer.Popup.Props;
6
+ export type DrawerContentProps = BaseDrawer.Content.Props;
7
+ export type DrawerTitleProps = BaseDrawer.Title.Props;
8
+ export type DrawerDescriptionProps = BaseDrawer.Description.Props;
9
+ export type DrawerCloseProps = BaseDrawer.Close.Props;
10
+ export type DrawerHeaderProps = React.ComponentProps<'div'>;
@@ -0,0 +1,10 @@
1
+ export type { DrawerProps, DrawerCloseProps, DrawerContentProps, DrawerDescriptionProps, DrawerProviderProps, DrawerTriggerProps, DrawerPopupProps, DrawerTitleProps, DrawerHeaderProps, } from './drawer.types';
2
+ export { Drawer } from './drawer';
3
+ export { DrawerClose } from './drawer-close';
4
+ export { DrawerContent } from './drawer-content';
5
+ export { DrawerDescription } from './drawer-description';
6
+ export { DrawerProvider } from './drawer-provider';
7
+ export { DrawerTrigger } from './drawer-trigger';
8
+ export { DrawerPopup } from './drawer-popup';
9
+ export { DrawerTitle } from './drawer-title';
10
+ export { DrawerHeader } from './drawer-header';
@@ -10,8 +10,10 @@ export * from './button-group';
10
10
  export * from './checkbox';
11
11
  export * from './checkbox-group';
12
12
  export * from './collapsible';
13
+ export * from './code-block';
13
14
  export * from './combobox';
14
15
  export * from './dialog';
16
+ export * from './drawer';
15
17
  export * from './field';
16
18
  export * from './form';
17
19
  export * from './input';
@@ -1,3 +1,4 @@
1
1
  export { InputOTP } from './input-otp';
2
- export type { InputOTPProps, InputOTPSlotProps } from './input-otp.types';
2
+ export type { InputOTPProps, InputOTPSlotProps, InputOtpSeparatorProps } from './input-otp.types';
3
3
  export { InputOTPSlot } from './input-otp-slot';
4
+ export { InputOtpSeparator } from './input-otp-separator';
@@ -0,0 +1,2 @@
1
+ import { InputOtpSeparatorProps } from './input-otp.types';
2
+ export declare const InputOtpSeparator: ({ className, ref, ...props }: InputOtpSeparatorProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { InputOTPSlotProps } from './input-otp.types';
2
- export declare const InputOTPSlot: ({ isActive, ...props }: InputOTPSlotProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const InputOTPSlot: ({ className, ...props }: InputOTPSlotProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,4 @@
1
- import { OTPInput, SlotProps } from 'input-otp';
2
- export type InputOTPProps = React.ComponentProps<typeof OTPInput>;
3
- export type InputOTPSlotProps = SlotProps;
1
+ import { OTPFieldPreview as OTPField } from '@base-ui/react/otp-field';
2
+ export type InputOTPProps = React.ComponentProps<typeof OTPField.Root>;
3
+ export type InputOTPSlotProps = React.ComponentProps<typeof OTPField.Input>;
4
+ export type InputOtpSeparatorProps = React.ComponentProps<typeof OTPField.Separator>;
@@ -1,4 +1,6 @@
1
- export type { LayerTreeProps, LayerTreeBodyProps, LayerTreeExpandAllProps, LayerTreeNodeProps, LayerTreeNodeToggleProps, LayerTreeRowProps, LayerTreeSearchProps, } from './layer-tree.types';
1
+ export type { LayerTreeBodyProps, LayerTreeExpandAllProps, LayerTreeNodeProps, LayerTreeNodeToggleProps, LayerTreeProps, LayerTreeRowProps, LayerTreeSearchProps, LayerTreeDataSet, LayerTreeNodeActionProps, LayerTreeFooterProps, LayerTreeSortProps, } from './layer-tree.types';
2
+ export type { LayerTreeNodeData } from './layer-tree-utils';
3
+ export { findLayerTreeNode, insertLayerTreeNode, moveLayerTreeNode, moveLayerTreeNodeToRoot, removeLayerTreeNode, } from './layer-tree-utils';
2
4
  export { LayerTree } from './layer-tree';
3
5
  export { LayerTreeBody } from './layer-tree-body';
4
6
  export { LayerTreeExpandAll } from './layer-tree-expand-all';
@@ -6,3 +8,5 @@ export { LayerTreeNode } from './layer-tree-node';
6
8
  export { LayerTreeNodeToggle } from './layer-tree-node-toggle';
7
9
  export { LayerTreeRow } from './layer-tree-row';
8
10
  export { LayerTreeSearch } from './layer-tree-search';
11
+ export { LayerTreeFooter } from './layer-tree-footer';
12
+ export { LayerTreeSort } from './layer-tree-sort';
@@ -1,2 +1,2 @@
1
1
  import { LayerTreeBodyProps } from './layer-tree.types';
2
- export declare const LayerTreeBody: ({ className, children, ref, ...props }: LayerTreeBodyProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const LayerTreeBody: <TData>({ className, children, ...props }: LayerTreeBodyProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { LayerTreeFooterProps } from './layer-tree.types';
2
+ export declare const LayerTreeFooter: ({ className, children, ref, ...props }: LayerTreeFooterProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { LayerTreeNodeToggleProps } from './layer-tree.types';
2
- export declare const LayerTreeNodeToggle: <TData>({ value, columnId, rows, onToggle, children, className, ref, ...props }: LayerTreeNodeToggleProps<TData>) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const LayerTreeNodeToggle: <TData>({ value, columnId, rows, children, className, ref, ...props }: LayerTreeNodeToggleProps<TData>) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { LayerTreeNodeProps } from './layer-tree.types';
2
- export declare const LayerTreeNode: <TData>({ className, children, ref, row, icon: Icon, ...props }: LayerTreeNodeProps<TData>) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const LayerTreeNode: <TData>({ className, children, row, icon: Icon, dndDisabled, ...props }: LayerTreeNodeProps<TData>) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { LayerTreeRowProps } from './layer-tree.types';
2
- export declare const LayerTreeRow: ({ row, className, children, ref, ...props }: LayerTreeRowProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const LayerTreeRow: <TData>({ row, className, children, ref, ...props }: LayerTreeRowProps<TData>) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { LayerTreeSearchProps } from './layer-tree.types';
2
- export declare const LayerTreeSearch: ({ className, children, ref, ...props }: LayerTreeSearchProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const LayerTreeSearch: ({ placeholder, className, children, ref, ...props }: LayerTreeSearchProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { LayerTreeSortProps } from './layer-tree.types';
2
+ export declare const LayerTreeSort: <TData>({ className, children, ref, ...props }: LayerTreeSortProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Base constraint for tree node data types used by layer tree utilities.
3
+ */
4
+ export type LayerTreeNodeData = {
5
+ id: string;
6
+ children?: LayerTreeNodeData[];
7
+ };
8
+ /**
9
+ * Recursively searches for a node by ID in a nested tree structure.
10
+ *
11
+ * @param nodes - The array of nodes to search through
12
+ * @param nodeId - The ID of the node to find
13
+ * @returns The matching node or `null` if not found
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * const node = findLayerTreeNode(layers, 'layer-001')
18
+ * if (node) console.log(node.name)
19
+ * ```
20
+ */
21
+ export declare const findLayerTreeNode: <TData extends LayerTreeNodeData>(nodes: TData[], nodeId: string) => TData | null;
22
+ /**
23
+ * Removes a node from a nested tree structure by ID.
24
+ *
25
+ * @param nodes - The array of nodes to remove from
26
+ * @param nodeId - The ID of the node to remove
27
+ * @returns An object containing the updated tree and the removed node (if found)
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * const { nextNodes, removedNode } = removeLayerTreeNode(layers, 'layer-001')
32
+ * if (removedNode) setLayers(nextNodes)
33
+ * ```
34
+ */
35
+ export declare const removeLayerTreeNode: <TData extends LayerTreeNodeData>(nodes: TData[], nodeId: string) => {
36
+ nextNodes: TData[];
37
+ removedNode: TData | null;
38
+ };
39
+ /**
40
+ * Inserts a node as a child of the specified folder node.
41
+ *
42
+ * @param nodes - The array of nodes to search through
43
+ * @param folderId - The ID of the folder to insert into
44
+ * @param nodeToInsert - The node to insert
45
+ * @returns A new tree with the node inserted
46
+ *
47
+ * @example
48
+ * ```ts
49
+ * const newTree = insertLayerTreeNode(layers, 'folder-001', newLayer)
50
+ * setLayers(newTree)
51
+ * ```
52
+ */
53
+ export declare const insertLayerTreeNode: <TData extends LayerTreeNodeData>(nodes: TData[], folderId: string, nodeToInsert: TData) => TData[];
54
+ /**
55
+ * Moves a node from its current position into a target folder.
56
+ * Prevents circular references by checking if target is a descendant of source.
57
+ *
58
+ * @param nodes - The array of nodes
59
+ * @param sourceId - The ID of the node to move
60
+ * @param targetId - The ID of the folder to move into
61
+ * @returns A new tree with the node moved, or the original tree if the move is invalid
62
+ *
63
+ * @example
64
+ * ```ts
65
+ * const newTree = moveLayerTreeNode(layers, 'layer-001', 'folder-002')
66
+ * setLayers(newTree)
67
+ * ```
68
+ */
69
+ export declare const moveLayerTreeNode: <TData extends LayerTreeNodeData>(nodes: TData[], sourceId: string, targetId: string) => TData[];
70
+ /**
71
+ * Moves a node to the root level of the tree.
72
+ *
73
+ * @param nodes - The array of nodes
74
+ * @param sourceId - The ID of the node to move
75
+ * @returns A new tree with the node at root level
76
+ *
77
+ * @example
78
+ * ```ts
79
+ * const newTree = moveLayerTreeNodeToRoot(layers, 'layer-001')
80
+ * setLayers(newTree)
81
+ * ```
82
+ */
83
+ export declare const moveLayerTreeNodeToRoot: <TData extends LayerTreeNodeData>(nodes: TData[], sourceId: string) => TData[];
@@ -1,5 +1,10 @@
1
- import { LayerTreeProps } from './layer-tree.types';
2
- type LayerTreeContextType = LayerTreeProps;
3
- export declare const LayerTree: ({ table, className, children, ref, ...props }: LayerTreeProps) => import("react/jsx-runtime").JSX.Element;
4
- export declare const useLayerTree: () => LayerTreeContextType;
1
+ import { default as React } from 'react';
2
+ import { LayerTreeDataSet, LayerTreeProps } from './layer-tree.types';
3
+ type LayerTreeContextType<TData> = LayerTreeProps<TData> & {
4
+ dataSet: LayerTreeDataSet<TData>;
5
+ setDataSet: React.Dispatch<React.SetStateAction<LayerTreeDataSet<TData>>>;
6
+ draggingNodeId: string | null;
7
+ };
8
+ export declare const LayerTree: <TData>({ table, dataSet, setDataSet, className, children, ref, ...props }: LayerTreeProps<TData>) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const useLayerTree: <TData>() => LayerTreeContextType<TData>;
5
10
  export {};
@@ -1,24 +1,35 @@
1
+ import { InputGroup } from '../input-group';
1
2
  import { Button } from '../button';
2
3
  import { Row, Table as TanstackTable } from '@tanstack/react-table';
3
- export type LayerTreeProps<TData = any> = React.ComponentProps<'div'> & {
4
+ export type LayerTreeDataSet<TData> = {
5
+ data: TData[];
6
+ };
7
+ export type LayerTreeProps<TData> = React.ComponentProps<'div'> & {
4
8
  table: TanstackTable<TData>;
9
+ dataSet?: LayerTreeDataSet<TData>;
10
+ setDataSet?: React.Dispatch<React.SetStateAction<LayerTreeDataSet<TData>>>;
5
11
  };
6
12
  export type LayerTreeBodyProps = React.ComponentProps<'div'>;
7
- export type LayerTreeRowProps<TData = any> = React.ComponentProps<'div'> & {
13
+ export type LayerTreeRowProps<TData> = React.ComponentProps<'div'> & {
8
14
  row: Row<TData>;
9
15
  };
10
- export type LayerTreeNodeToggleProps<TData = any> = Omit<React.ComponentProps<typeof Button>, 'value' | 'children'> & {
16
+ export type LayerTreeNodeToggleProps<TData> = Omit<React.ComponentProps<typeof Button>, 'value' | 'children'> & {
11
17
  value: boolean;
12
18
  columnId: {
13
19
  [K in keyof TData]: TData[K] extends boolean ? K : never;
14
20
  }[keyof TData];
15
21
  rows: Row<TData>[];
16
- onToggle: () => void;
17
22
  children: (value: boolean) => React.ReactNode;
18
23
  };
19
24
  export type LayerTreeNodeProps<TData> = React.ComponentProps<'button'> & {
20
25
  row: Row<TData>;
21
26
  icon?: React.ElementType;
27
+ dndDisabled?: boolean;
28
+ };
29
+ export type LayerTreeSearchProps = React.ComponentProps<typeof InputGroup> & {
30
+ placeholder?: string;
22
31
  };
23
- export type LayerTreeSearchProps = React.ComponentProps<'input'>;
24
32
  export type LayerTreeExpandAllProps = React.ComponentProps<'button'>;
33
+ export type LayerTreeNodeActionProps = React.ComponentProps<'button'>;
34
+ export type LayerTreeFooterProps = React.ComponentProps<'div'>;
35
+ export type LayerTreeSortProps = React.ComponentProps<'button'>;
@@ -1,9 +1,10 @@
1
1
  export { Popover } from './popover';
2
- export type { PopoverContentProps, PopoverDescriptionProps, PopoverHeaderProps, PopoverPanelProps, PopoverProps, PopoverTitleProps, PopoverTriggerProps, } from './popover.types';
2
+ export type { PopoverContentProps, PopoverDescriptionProps, PopoverHeaderProps, PopoverPanelProps, PopoverProps, PopoverTitleProps, PopoverTriggerProps, PopoverButtonProps, } from './popover.types';
3
3
  export { PopoverDescription } from './popover-description';
4
4
  export { PopoverPanel } from './popover-panel';
5
5
  export { PopoverTitle } from './popover-title';
6
6
  export { PopoverTrigger } from './popover-trigger';
7
7
  export { PopoverHeader } from './popover-header';
8
8
  export { PopoverContent } from './popover-content';
9
+ export { PopoverButton } from './popover-button';
9
10
  export { popoverHandle } from './popover.types';
@@ -0,0 +1,2 @@
1
+ import { PopoverButtonProps } from './popover.types';
2
+ export declare const PopoverButton: ({ variant, tone, className, children, ref, ...props }: PopoverButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import { Popover as BasePopover } from '@base-ui/react/popover';
2
+ import { Button } from '..';
2
3
  export type PopoverProps = React.ComponentProps<typeof BasePopover.Root>;
3
4
  export type PopoverTriggerProps = React.ComponentProps<typeof BasePopover.Trigger>;
4
5
  export type PopoverPanelProps = React.ComponentProps<typeof BasePopover.Positioner>;
@@ -6,4 +7,5 @@ export type PopoverTitleProps = React.ComponentProps<typeof BasePopover.Title>;
6
7
  export type PopoverDescriptionProps = React.ComponentProps<typeof BasePopover.Description>;
7
8
  export type PopoverHeaderProps = React.ComponentProps<'div'>;
8
9
  export type PopoverContentProps = React.ComponentProps<'div'>;
10
+ export type PopoverButtonProps = React.ComponentProps<typeof Button>;
9
11
  export declare const popoverHandle: BasePopover.Handle<import('react').ComponentType<{}>>;
@@ -1,2 +1,6 @@
1
1
  export { Profile } from './profile';
2
- export type { ProfileProps } from './profile.types';
2
+ export { ProfileName } from './profile-name';
3
+ export { ProfileSubname } from './profile-subname';
4
+ export { ProfileAction } from './profile-action';
5
+ export { ProfileContent } from './profile-content';
6
+ export type { ProfileProps, ProfileNameProps, ProfileSubnameProps, ProfileActionProps, ProfileContentProps, } from './profile.types';
@@ -0,0 +1,2 @@
1
+ import { ProfileActionProps } from './profile.types';
2
+ export declare const ProfileAction: ({ className, children, ref, ...props }: ProfileActionProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { ProfileContentProps } from './profile.types';
2
+ export declare const ProfileContent: ({ compact, className, children, ref, ...props }: ProfileContentProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { ProfileNameProps } from './profile.types';
2
+ export declare const ProfileName: ({ className, children, ref, ...props }: ProfileNameProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { ProfileSubnameProps } from './profile.types';
2
+ export declare const ProfileSubname: ({ className, children, ref, ...props }: ProfileSubnameProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { ProfileProps } from './profile.types';
2
- export declare const Profile: ({ className, imageUrl, fallbackText, profileName, profileEmail, compact, hideEmail, avatarAlt, avatarSize, showBadge, badgeTone, badgePosition, badgeContent, children, ref, ...props }: ProfileProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const Profile: ({ className, children, ref, ...props }: ProfileProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,16 +1,8 @@
1
- import { AvatarBadgeProps, AvatarProps } from '../avatar';
2
- import { ComponentProps, ReactNode } from 'react';
3
- export type ProfileProps = ComponentProps<'div'> & {
4
- imageUrl?: string;
5
- fallbackText?: string;
6
- profileName: string;
7
- profileEmail?: string;
1
+ import { ComponentProps } from 'react';
2
+ export type ProfileProps = ComponentProps<'div'>;
3
+ export type ProfileContentProps = React.ComponentProps<'div'> & {
8
4
  compact?: boolean;
9
- hideEmail?: boolean;
10
- avatarAlt?: string;
11
- avatarSize?: AvatarProps['size'];
12
- showBadge?: boolean;
13
- badgeTone?: AvatarBadgeProps['tone'];
14
- badgePosition?: AvatarBadgeProps['position'];
15
- badgeContent?: ReactNode;
16
5
  };
6
+ export type ProfileActionProps = React.ComponentProps<'div'>;
7
+ export type ProfileNameProps = React.ComponentProps<'span'>;
8
+ export type ProfileSubnameProps = React.ComponentProps<'span'>;
@@ -1,2 +1,2 @@
1
1
  import { SeparatorProps } from './separator.types';
2
- export declare const Separator: ({ orientation, weight, style, variant, className, ref, ...props }: SeparatorProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const Separator: ({ orientation, weight, style, variant, children, className, labelClassName, ref, ...props }: SeparatorProps) => import("react/jsx-runtime").JSX.Element;
@@ -6,4 +6,6 @@ export declare const separatorVariants: (props?: ({
6
6
  variant?: "strong" | "default" | null | undefined;
7
7
  weight?: "medium" | "thin" | "thick" | "thinnest" | null | undefined;
8
8
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
9
- export type SeparatorProps = Omit<React.ComponentProps<typeof BaseSeparator>, 'style'> & VariantProps<typeof separatorVariants>;
9
+ export type SeparatorProps = Omit<React.ComponentProps<typeof BaseSeparator>, 'style'> & VariantProps<typeof separatorVariants> & {
10
+ labelClassName?: string;
11
+ };
@@ -6,7 +6,7 @@ export type TabsTabProps = ComponentProps<typeof BaseTabs.Tab>;
6
6
  export type TabsIndicatorProps = ComponentProps<typeof BaseTabs.Indicator>;
7
7
  export type TabsListProps = ComponentProps<typeof BaseTabs.List>;
8
8
  export declare const tabsVariants: (props?: ({
9
- variant?: "default" | "underline" | null | undefined;
9
+ variant?: "ghost" | "default" | "underline" | null | undefined;
10
10
  fill?: boolean | null | undefined;
11
11
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
12
12
  export type TabsProps = React.ComponentProps<typeof BaseTabs.Root> & VariantProps<typeof tabsVariants>;