@ceed/ads 1.41.2 → 1.41.3-next.2

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.
@@ -37,8 +37,8 @@ export type AutocompleteProps<T extends AutocompleteOption | string = string, Mu
37
37
  };
38
38
  }) => void;
39
39
  } & Omit<JoyAutocompleteProps<AutocompleteOption, Multiple, boolean, boolean>, 'onChange' | 'value' | 'options' | 'defaultValue'>;
40
- declare function Autocomplete<T extends AutocompleteOption | string, Multiple extends boolean | undefined = false>(props: AutocompleteProps<T, Multiple>): React.JSX.Element;
41
- declare namespace Autocomplete {
42
- var displayName: string;
43
- }
40
+ export declare function AutocompleteInner<T extends AutocompleteOption | string, Multiple extends boolean | undefined = false>(props: AutocompleteProps<T, Multiple>, ref: React.Ref<HTMLInputElement>): React.JSX.Element;
41
+ declare const Autocomplete: <T extends string | AutocompleteOption = string, Multiple extends boolean | undefined = false>(props: AutocompleteProps<T, Multiple> & {
42
+ ref?: React.Ref<HTMLInputElement>;
43
+ }) => React.ReactElement;
44
44
  export { Autocomplete };
@@ -1,3 +1,4 @@
1
1
  import { Autocomplete } from './Autocomplete';
2
- export * from './Autocomplete';
2
+ export { Autocomplete } from './Autocomplete';
3
+ export type { AutocompleteOption, AutocompleteValue, AutocompleteProps } from './Autocomplete';
3
4
  export default Autocomplete;
@@ -18,7 +18,7 @@ export declare const HeadCell: <T extends ObjectLike, GetId>(props: ColumnDef<T,
18
18
  currentSort?: Sort | undefined;
19
19
  }) => void) | undefined;
20
20
  sortOrder: Sort[];
21
- onAutoFit?: ((field: keyof T) => void) | undefined;
21
+ onAutoFit?: ((columnId: string) => void) | undefined;
22
22
  }) => React.JSX.Element;
23
23
  export declare const BodyCell: <T extends Record<string, any>, ID>(props: {
24
24
  tableId: string;
@@ -1,10 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import type { ObjectLike, ColumnDef, DataTableProps, Sort, InferredIdType } from './types';
3
- export declare function useColumnWidths<T>(columnsByField: {
4
- [K in keyof T]: {
5
- headerRef: React.RefObject<HTMLTableCellElement>;
6
- };
7
- }): Record<string, number>;
3
+ export declare function useColumnWidths(columnsById: Record<string, {
4
+ field: PropertyKey;
5
+ headerRef: React.RefObject<HTMLTableCellElement>;
6
+ }>): Record<string, number>;
8
7
  export declare function useDataTableRenderer<T extends Record<PropertyKey, unknown>, GetId extends ((row: T) => any) | undefined = undefined>({ rows: _rows, columns: columnsProp, pinnedColumns, rowCount: totalRowsProp, initialState, pagination, paginationMode, paginationModel, onPaginationModelChange, sortModel: controlledSortModel, sortOrder: _sortOrder, selectionModel, onSortModelChange, onSelectionModelChange, editMode, getId: _getId, isTotalSelected: _isTotalSelected, isRowSelectable, columnGroupingModel, columnVisibilityModel, onColumnVisibilityModelChange, checkboxSelection, }: DataTableProps<T, GetId>): {
9
8
  rowCount: number;
10
9
  selectableRowCount: number;
@@ -23,7 +22,7 @@ export declare function useDataTableRenderer<T extends Record<PropertyKey, unkno
23
22
  currentSort?: Sort | undefined;
24
23
  }) => void) | undefined;
25
24
  sortOrder: Sort[];
26
- onAutoFit?: ((field: keyof T_1) => void) | undefined;
25
+ onAutoFit?: ((columnId: string) => void) | undefined;
27
26
  }) => import("react").JSX.Element;
28
27
  BodyRow: <T_2 extends Record<string, any>, ID>(props: {
29
28
  tableId: string;
@@ -39,7 +38,7 @@ export declare function useDataTableRenderer<T extends Record<PropertyKey, unkno
39
38
  multiple: boolean;
40
39
  currentSort?: Sort | undefined;
41
40
  }) => void;
42
- handleAutoFit: (field: keyof T) => void;
41
+ handleAutoFit: (columnId: string) => void;
43
42
  isAllSelected: boolean;
44
43
  isTotalSelected: boolean;
45
44
  isSelectedRow: (model: InferredIdType<T, GetId>) => boolean;
@@ -73,6 +73,13 @@ export type FlattenedColumn<T extends Record<PropertyKey, any>, ID> = ColumnDef<
73
73
  export type BaseColumnDef<T extends Record<PropertyKey, V>, V, ID> = {
74
74
  [K in keyof T]: {
75
75
  field: K;
76
+ /**
77
+ * DataTable이 내부에서 자동으로 붙이는 컬럼 식별자(`__hds_column_0`, `__hds_column_1`, …).
78
+ * 같은 `field`가 여러 번 쓰일 수 있고 `field#1` 같은 이름이 실제 `field`일 수도 있어, field 문자열과
79
+ * 무관한 순번 기반 값을 쓴다. 표시 중인 컬럼의 순번이라 컬럼을 숨기면 뒤 컬럼의 값이 바뀐다.
80
+ * 소비자가 지정하거나 외부에서 의존할 값이 아니다.
81
+ */
82
+ columnId?: string;
76
83
  headerName?: string;
77
84
  headerRef?: React.RefObject<HTMLTableCellElement>;
78
85
  tableColRef?: React.RefObject<HTMLTableColElement>;
@@ -20,3 +20,8 @@ export declare function computeAutoFitWidth(params: {
20
20
  field: string;
21
21
  dataInPage: Record<string, unknown>[];
22
22
  }): number | null;
23
+ /**
24
+ * 헤더 셀의 DOM id. `<td headers>`가 이 값을 가리키므로 두 곳이 같은 규칙을 써야 한다.
25
+ * 같은 `field`가 여러 번 쓰일 수 있어 `headerName`이 아니라 컬럼 식별자로 만든다.
26
+ */
27
+ export declare function getHeaderCellId(tableId: string, columnId: string): string;
@@ -1,4 +1,4 @@
1
- import React, { AriaAttributes, ComponentProps, ElementType, ReactNode } from 'react';
1
+ import React, { AriaAttributes, ComponentProps, ComponentRef, ElementType, ReactNode } from 'react';
2
2
  import { MenuButtonProps as JoyMenuButtonProps } from '@mui/joy';
3
3
  export interface IconMenuButtonProps<T extends ElementType = 'button', P extends ElementType = 'li'> {
4
4
  size?: JoyMenuButtonProps<T, P>['size'];
@@ -16,8 +16,9 @@ export interface IconMenuButtonProps<T extends ElementType = 'button', P extends
16
16
  }[];
17
17
  placement?: 'bottom-start' | 'bottom' | 'bottom-end';
18
18
  }
19
- declare function IconMenuButton<T extends ElementType, P extends ElementType>(props: IconMenuButtonProps<T, P>): React.JSX.Element;
20
- declare namespace IconMenuButton {
21
- var displayName: string;
22
- }
19
+ type IconMenuButtonRef<T extends ElementType> = React.Ref<ComponentRef<T>>;
20
+ export declare function IconMenuButtonInner<T extends ElementType, P extends ElementType>(props: IconMenuButtonProps<T, P>, ref: IconMenuButtonRef<T>): React.JSX.Element;
21
+ declare const IconMenuButton: <T extends React.ElementType = "button", P extends React.ElementType = "li">(props: IconMenuButtonProps<T, P> & {
22
+ ref?: IconMenuButtonRef<T>;
23
+ }) => React.ReactElement;
23
24
  export { IconMenuButton };
@@ -1,3 +1,4 @@
1
1
  import { IconMenuButton } from './IconMenuButton';
2
- export * from './IconMenuButton';
2
+ export { IconMenuButton } from './IconMenuButton';
3
+ export type { IconMenuButtonProps } from './IconMenuButton';
3
4
  export default IconMenuButton;
@@ -36,8 +36,5 @@ export type ModalFrameProps = {
36
36
  titleStartDecorator?: React.ReactNode;
37
37
  onClose?: () => void;
38
38
  } & React.ComponentProps<typeof ModalDialog>;
39
- declare function ModalFrame(props: ModalFrameProps): React.JSX.Element;
40
- declare namespace ModalFrame {
41
- var displayName: string;
42
- }
39
+ declare const ModalFrame: React.ForwardRefExoticComponent<Omit<ModalFrameProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
43
40
  export { ModalFrame };
@@ -46,8 +46,7 @@ export interface SelectProps<OptionValue extends OptionType, Multiple extends bo
46
46
  }, newValue: InferOptionValue<OptionValue>) => void;
47
47
  multiple?: Multiple;
48
48
  }
49
- declare function Select<OptionValue extends OptionType, Multiple extends boolean = false>(props: SelectProps<OptionValue, Multiple>): React.JSX.Element;
50
- declare namespace Select {
51
- var displayName: string;
52
- }
49
+ declare const Select: <OptionValue extends OptionType, Multiple extends boolean = false>(props: SelectProps<OptionValue, Multiple> & {
50
+ ref?: React.Ref<HTMLButtonElement>;
51
+ }) => React.ReactElement;
53
52
  export { Select };
@@ -7,8 +7,5 @@ export type TextareaProps = {
7
7
  error?: boolean;
8
8
  helperText?: React.ReactNode;
9
9
  } & JoyTextareaProps & MotionProps;
10
- declare const Textarea: {
11
- (props: TextareaProps): React.JSX.Element;
12
- displayName: string;
13
- };
10
+ declare const Textarea: React.ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;
14
11
  export { Textarea };
@@ -1,3 +1,4 @@
1
1
  import { Textarea } from './Textarea';
2
- export * from './Textarea';
2
+ export { Textarea } from './Textarea';
3
+ export type { TextareaProps, JoyTextareaProps } from './Textarea';
3
4
  export default Textarea;
@@ -2424,6 +2424,10 @@ interface DataTableApi {
2424
2424
  ### Feature Combination Constraints
2425
2425
 
2426
2426
  - `pinnedColumns` and `columnGroupingModel` cannot be used simultaneously.
2427
+ - Two columns may share the same `field`. DataTable derives an internal per-column id so each duplicate keeps its own header/`<col>` element, measured width, and header `id`. The first column with a given `field` uses the `field` itself; each later duplicate gets a `__2`, `__3`, … suffix, skipping any name that is already a real `field`. The id is deliberately field-derived rather than positional: a positional id renumbers when a column is hidden, which would move a resized column's inline `<col>` width onto its neighbour. `sortModel` and `columnVisibilityModel` still match by `field`, so they apply to every column sharing it.
2428
+ - The header cell `id` (`<th id>`, referenced by each `<td headers>`) is built from that internal column id. It is stable across visibility changes, but it is an implementation detail — do not target it from external selectors, CSS, or `aria-labelledby`. The same applies to `data-hds-column-id` on the header cell, which carries the raw internal id.
2429
+ - `data-field` on the header cell still holds the column's `field`, so selectors like `th[data-field="dessert"]` keep working. It is not unique when two columns share a `field`.
2430
+ - Do not pin a duplicated `field`. `pinnedColumns` matches by `field` and cannot address one of the duplicates, so every column sharing it resolves to the same offset and they render stacked on top of each other.
2427
2431
  - `editMode` must be `true` for editing-related UI to be active.
2428
2432
  - When `paginationMode="server"`, `rowCount` must be specified.
2429
2433
 
@@ -653,7 +653,7 @@ When `displayFormat` contains `MMM` or `MMMM`, the input becomes **read-only** a
653
653
  // → "4월 09, 2026"
654
654
  ```
655
655
 
656
- > **Note**: DatePicker also accepts all Input props (e.g., `size`, `variant`, `color`, `startDecorator`, `placeholder`, `sx`).
656
+ > **Note**: DatePicker also accepts all Input props (e.g., `size`, `variant`, `color`, `startDecorator`, `placeholder`, `sx`). `sx` and `className` are applied to the root element, so layout styles like `width` work as expected when DatePicker is a direct flex child.
657
657
 
658
658
  ## Accessibility
659
659
 
@@ -763,7 +763,7 @@ When `displayFormat` contains `MMM` or `MMMM`, the input becomes **read-only** a
763
763
  // → "Apr 01, 2026 - Apr 09, 2026"
764
764
  ```
765
765
 
766
- > **Note**: DateRangePicker also accepts all Input props (e.g., `size`, `variant`, `color`, `sx`).
766
+ > **Note**: DateRangePicker also accepts all Input props (e.g., `size`, `variant`, `color`, `sx`). `sx` and `className` are applied to the root element, so layout styles like `width` work as expected when DateRangePicker is a direct flex child.
767
767
 
768
768
  ## Accessibility
769
769