loon-bulma-react 2026.0.6 → 2026.0.7

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.
@@ -0,0 +1,58 @@
1
+ import React from 'react';
2
+ /**
3
+ * Props voor de DragDropList component
4
+ * @template T - Het type van de items in de lijst
5
+ */
6
+ type DragDropListProps<T> = {
7
+ /** De array van items die getoond en herschikt kunnen worden */
8
+ items: T[];
9
+ /** Callback functie die wordt aangeroepen wanneer de volgorde van items verandert */
10
+ onReorder: (items: T[]) => void;
11
+ /** Functie die bepaalt hoe elk item gerenderd wordt */
12
+ renderItem: (item: T, index: number) => React.ReactNode;
13
+ /** Functie of property naam die de unieke key voor elk item bepaalt */
14
+ keyExtractor: ((item: T, index: number) => string | number) | keyof T;
15
+ /** Optionele CSS class voor de lijst container */
16
+ className?: string;
17
+ /** Optionele CSS class voor elk list item */
18
+ itemClassName?: string;
19
+ /** Children moeten DragDropList.Handle en/of DragDropList.Buttons zijn om de layout te bepalen */
20
+ children?: React.ReactNode;
21
+ };
22
+ /**
23
+ * Een drag-and-drop lijst component waarmee items verticaal herschikt kunnen worden.
24
+ *
25
+ * @template T - Het type van de items in de lijst
26
+ *
27
+ * @example
28
+ * ```tsx
29
+ * const [items, setItems] = useState([
30
+ * { id: 1, name: 'Item 1' },
31
+ * { id: 2, name: 'Item 2' },
32
+ * ]);
33
+ *
34
+ * <DragDropList
35
+ * items={items}
36
+ * onReorder={setItems}
37
+ * keyExtractor="id"
38
+ * className='container-class'
39
+ * itemClassName='item-class'
40
+ * renderItem={(item) => <div>{item.name}</div>}
41
+ * >
42
+ * <DragDropList.Handle>
43
+ * <Icon icon={faGripVertical} />
44
+ * </DragDropList.Handle>
45
+ * <DragDropList.Buttons />
46
+ * </DragDropList>
47
+ * ```
48
+ */
49
+ export declare function DragDropList<T>({ items, onReorder, renderItem, keyExtractor, className, itemClassName, children }: DragDropListProps<T>): import("react/jsx-runtime").JSX.Element;
50
+ export declare namespace DragDropList {
51
+ var Handle: ({ children }: {
52
+ children?: React.ReactNode;
53
+ }) => import("react/jsx-runtime").JSX.Element;
54
+ var Buttons: ({ children }: {
55
+ children?: React.ReactNode;
56
+ }) => import("react/jsx-runtime").JSX.Element;
57
+ }
58
+ export {};
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  type DropDownProps = {
3
3
  children?: React.ReactNode;
4
- trigger: string | React.ReactNode | ((open: boolean, disabled?: boolean | undefined) => string | React.ReactNode);
4
+ trigger?: string | React.ReactNode | ((open: boolean, disabled?: boolean | undefined) => string | React.ReactNode);
5
5
  disabled?: boolean | undefined;
6
6
  startOpen?: boolean | undefined;
7
7
  onHover?: boolean | undefined;
@@ -14,6 +14,9 @@ type DropDownProps = {
14
14
  };
15
15
  declare const Dropdown: {
16
16
  ({ onHover, id, children: childrenProp, trigger: triggerProp, disabled, alignment, dropUp, startOpen, className: classNameProp, keepOpenAfterClick, usePortal, }: DropDownProps): import("react/jsx-runtime").JSX.Element;
17
+ Trigger({ children }: {
18
+ children: React.ReactNode;
19
+ }): import("react/jsx-runtime").JSX.Element;
17
20
  Divider(): import("react/jsx-runtime").JSX.Element;
18
21
  Item({ children, onClick, onItemClick, ...props }: {
19
22
  children: React.ReactNode;
package/dist/index.d.ts CHANGED
@@ -22,6 +22,7 @@ export { CodeBlock } from './components/CodeBlock/CodeBlock';
22
22
  export type { CodeBlockProps, CodeLanguage } from './components/CodeBlock/CodeBlock';
23
23
  export { DataTable } from './components/DataTable/DataTable';
24
24
  export type { DataTableColumn, DataTableProps } from './components/DataTable/DataTable';
25
+ export { DragDropList } from './components/DragDrop/DragDropList';
25
26
  export { Dropdown } from './components/Dropdown/Dropdown';
26
27
  export { HelpTxt } from './components/Help/Help';
27
28
  export type { HelpTxtProps } from './components/Help/Help';