@starasia/admin 8.2.5 → 8.2.6

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.
@@ -1,4 +1,4 @@
1
1
  import { default as React } from 'react';
2
2
  import { DataGridProps } from './types';
3
3
 
4
- export declare const DataGrid: <T>({ columns, data, getRowKey, size, variant, withColumnBorder, withRowBorder, emptyState, className, style }: DataGridProps<T>) => React.JSX.Element;
4
+ export declare const DataGrid: <T>({ columns, data, getRowKey, size, emptyState }: DataGridProps<T>) => React.JSX.Element;
@@ -1,13 +1,13 @@
1
- import { CSSProperties, ReactNode } from 'react';
1
+ import { ReactNode } from 'react';
2
2
 
3
3
  export type DataGridAlign = 'left' | 'center' | 'right';
4
4
  export interface DataGridColumn<T> {
5
- /** key pada row untuk ambil nilai; abaikan kalau pakai `cell` */
5
+ /** key pada row untuk ambil nilai otomatis; abaikan kalau pakai `render` */
6
6
  accessor?: keyof T | (string & {});
7
7
  /** judul kolom di header */
8
- header: ReactNode;
8
+ title: ReactNode;
9
9
  /** custom render isi cell; menang atas `accessor` */
10
- cell?: (row: T, rowIndex: number, data: T[]) => ReactNode;
10
+ render?: (row: T, rowIndex: number, data: T[]) => ReactNode;
11
11
  /** perataan header + cell (default 'left') */
12
12
  align?: DataGridAlign;
13
13
  /** lebar kolom, mis. '200px' | 160 */
@@ -24,14 +24,6 @@ export interface DataGridProps<T> {
24
24
  getRowKey?: (row: T, index: number) => string | number;
25
25
  /** padding scale, diteruskan ke primitif Table (default 'md') */
26
26
  size?: 'sm' | 'md' | 'lg' | 'xl';
27
- /** style preset, diteruskan ke primitif Table */
28
- variant?: 'simple' | 'unstyled' | 'shaded';
29
- /** divider vertikal antar kolom */
30
- withColumnBorder?: boolean;
31
- /** divider horizontal antar baris */
32
- withRowBorder?: boolean;
33
27
  /** ditampilkan saat `data` kosong */
34
28
  emptyState?: ReactNode;
35
- className?: string;
36
- style?: CSSProperties;
37
29
  }
@@ -11,8 +11,10 @@ interface CheckboxPillProps {
11
11
  label: string;
12
12
  value: string;
13
13
  }[]) => void;
14
- /** Removes the whole pill (the popover's "Remove Filter" action). */
15
- onRemove: () => void;
14
+ /** Wipes the field's value without removing the pill. */
15
+ onClear: () => void;
16
+ /** Removes the whole pill. Omit for locked fields. */
17
+ onRemove?: () => void;
16
18
  }
17
19
  /**
18
20
  * `checkbox-multiple` pill — fixed (non-API) multi-select rendered with `Menu`
@@ -6,8 +6,8 @@ interface DatePillProps {
6
6
  value: Date | DateCompactValue | undefined;
7
7
  onChange: (v: unknown) => void;
8
8
  onClear: () => void;
9
- /** Removes the whole pill (the popover's "Remove Filter" action). */
10
- onRemove: () => void;
9
+ /** Removes the whole pill. Omit for locked fields. */
10
+ onRemove?: () => void;
11
11
  }
12
12
  export declare const DatePill: React.FC<DatePillProps>;
13
13
  export {};
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface PillKebabMenuProps {
4
+ /** Wipes the field's value (removes the key from the URL blob). */
5
+ onClear: () => void;
6
+ /** Removes the whole pill from the active filters list. Omit for locked
7
+ * filters — "Remove filter" item is hidden when undefined. */
8
+ onRemove?: () => void;
9
+ }
10
+ /**
11
+ * Shared kebab (…) menu used in the title of every filter pill popover.
12
+ * Exposes "Clear value" always, and "Remove filter" when the field is
13
+ * removable (i.e. not locked).
14
+ */
15
+ export declare const PillKebabMenu: React.FC<PillKebabMenuProps>;
16
+ export {};
@@ -11,8 +11,10 @@ interface SelectPillProps {
11
11
  label: string;
12
12
  value: string;
13
13
  }[]) => void;
14
- /** Removes the whole pill (the popover's "Remove Filter" action). */
15
- onRemove: () => void;
14
+ /** Wipes the field's value without removing the pill. */
15
+ onClear: () => void;
16
+ /** Removes the whole pill. Omit for locked fields. */
17
+ onRemove?: () => void;
16
18
  }
17
19
  /**
18
20
  * Select pill — `dropdown` (single), `dropdown-multiple`, `radio`, `person`.