@ceed/ads 1.41.3-next.5 → 1.41.3
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/components/Autocomplete/Autocomplete.d.ts +4 -4
- package/dist/components/Autocomplete/index.d.ts +1 -2
- package/dist/components/DataTable/components.d.ts +1 -1
- package/dist/components/DataTable/hooks.d.ts +7 -6
- package/dist/components/DataTable/types.d.ts +0 -7
- package/dist/components/DataTable/utils.d.ts +0 -5
- package/dist/components/IconMenuButton/IconMenuButton.d.ts +8 -9
- package/dist/components/IconMenuButton/index.d.ts +1 -2
- package/dist/components/Modal/Modal.d.ts +4 -1
- package/dist/components/Select/Select.d.ts +4 -3
- package/dist/components/Textarea/Textarea.d.ts +4 -1
- package/dist/components/Textarea/index.d.ts +1 -2
- package/dist/components/data-display/DataTable.md +0 -4
- package/dist/components/navigation/IconMenuButton.md +12 -12
- package/dist/index.browser.js +6 -6
- package/dist/index.browser.js.map +4 -4
- package/dist/index.cjs +709 -808
- package/dist/index.js +171 -270
- package/framer/index.js +1 -1
- package/package.json +1 -1
- package/dist/libs/slot-props.d.ts +0 -22
|
@@ -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
|
-
|
|
41
|
-
declare
|
|
42
|
-
|
|
43
|
-
}
|
|
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
|
+
}
|
|
44
44
|
export { 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?: ((
|
|
21
|
+
onAutoFit?: ((field: keyof T) => 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,9 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { ObjectLike, ColumnDef, DataTableProps, Sort, InferredIdType } from './types';
|
|
3
|
-
export declare function useColumnWidths(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
3
|
+
export declare function useColumnWidths<T>(columnsByField: {
|
|
4
|
+
[K in keyof T]: {
|
|
5
|
+
headerRef: React.RefObject<HTMLTableCellElement>;
|
|
6
|
+
};
|
|
7
|
+
}): Record<string, number>;
|
|
7
8
|
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>): {
|
|
8
9
|
rowCount: number;
|
|
9
10
|
selectableRowCount: number;
|
|
@@ -22,7 +23,7 @@ export declare function useDataTableRenderer<T extends Record<PropertyKey, unkno
|
|
|
22
23
|
currentSort?: Sort | undefined;
|
|
23
24
|
}) => void) | undefined;
|
|
24
25
|
sortOrder: Sort[];
|
|
25
|
-
onAutoFit?: ((
|
|
26
|
+
onAutoFit?: ((field: keyof T_1) => void) | undefined;
|
|
26
27
|
}) => import("react").JSX.Element;
|
|
27
28
|
BodyRow: <T_2 extends Record<string, any>, ID>(props: {
|
|
28
29
|
tableId: string;
|
|
@@ -38,7 +39,7 @@ export declare function useDataTableRenderer<T extends Record<PropertyKey, unkno
|
|
|
38
39
|
multiple: boolean;
|
|
39
40
|
currentSort?: Sort | undefined;
|
|
40
41
|
}) => void;
|
|
41
|
-
handleAutoFit: (
|
|
42
|
+
handleAutoFit: (field: keyof T) => void;
|
|
42
43
|
isAllSelected: boolean;
|
|
43
44
|
isTotalSelected: boolean;
|
|
44
45
|
isSelectedRow: (model: InferredIdType<T, GetId>) => boolean;
|
|
@@ -73,13 +73,6 @@ 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이 내부에서 자동으로 붙이는 컬럼 식별자. `field`를 그대로 쓰고, 같은 `field`가 여러 번
|
|
78
|
-
* 정의된 경우에만 두 번째부터 `__2`, `__3` 접미사를 붙인다(이미 쓰인 이름은 건너뛴다).
|
|
79
|
-
* 숨긴 컬럼까지 포함한 전체 컬럼 기준으로 매기므로 컬럼을 숨겨도 값이 바뀌지 않는다.
|
|
80
|
-
* <col> key와 헤더 ref 매칭에만 쓰는 내부값이다. 소비자가 지정해도 무시되고, 외부에서 의존할 값이 아니다.
|
|
81
|
-
*/
|
|
82
|
-
columnId?: string;
|
|
83
76
|
headerName?: string;
|
|
84
77
|
headerRef?: React.RefObject<HTMLTableCellElement>;
|
|
85
78
|
tableColRef?: React.RefObject<HTMLTableColElement>;
|
|
@@ -20,8 +20,3 @@ 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,10 +1,10 @@
|
|
|
1
|
-
import React, { AriaAttributes, ComponentProps,
|
|
2
|
-
import { MenuButtonProps as JoyMenuButtonProps
|
|
1
|
+
import React, { AriaAttributes, ComponentProps, ElementType, ReactNode } from 'react';
|
|
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'];
|
|
5
5
|
icon: ReactNode;
|
|
6
6
|
buttonComponent?: T;
|
|
7
|
-
buttonComponentProps?: ComponentProps<T> & AriaAttributes
|
|
7
|
+
buttonComponentProps?: ComponentProps<T> & AriaAttributes;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
loading?: boolean;
|
|
10
10
|
color?: JoyMenuButtonProps<T, P>['color'];
|
|
@@ -12,13 +12,12 @@ export interface IconMenuButtonProps<T extends ElementType = 'button', P extends
|
|
|
12
12
|
items?: {
|
|
13
13
|
text: string;
|
|
14
14
|
component?: P;
|
|
15
|
-
componentProps?: ComponentProps<P
|
|
15
|
+
componentProps?: ComponentProps<P>;
|
|
16
16
|
}[];
|
|
17
17
|
placement?: 'bottom-start' | 'bottom' | 'bottom-end';
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}) => React.ReactElement;
|
|
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
|
+
}
|
|
24
23
|
export { IconMenuButton };
|
|
@@ -36,5 +36,8 @@ export type ModalFrameProps = {
|
|
|
36
36
|
titleStartDecorator?: React.ReactNode;
|
|
37
37
|
onClose?: () => void;
|
|
38
38
|
} & React.ComponentProps<typeof ModalDialog>;
|
|
39
|
-
declare
|
|
39
|
+
declare function ModalFrame(props: ModalFrameProps): React.JSX.Element;
|
|
40
|
+
declare namespace ModalFrame {
|
|
41
|
+
var displayName: string;
|
|
42
|
+
}
|
|
40
43
|
export { ModalFrame };
|
|
@@ -46,7 +46,8 @@ export interface SelectProps<OptionValue extends OptionType, Multiple extends bo
|
|
|
46
46
|
}, newValue: InferOptionValue<OptionValue>) => void;
|
|
47
47
|
multiple?: Multiple;
|
|
48
48
|
}
|
|
49
|
-
declare
|
|
50
|
-
|
|
51
|
-
|
|
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
|
+
}
|
|
52
53
|
export { Select };
|
|
@@ -7,5 +7,8 @@ export type TextareaProps = {
|
|
|
7
7
|
error?: boolean;
|
|
8
8
|
helperText?: React.ReactNode;
|
|
9
9
|
} & JoyTextareaProps & MotionProps;
|
|
10
|
-
declare const Textarea:
|
|
10
|
+
declare const Textarea: {
|
|
11
|
+
(props: TextareaProps): React.JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
11
14
|
export { Textarea };
|
|
@@ -2424,10 +2424,6 @@ 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.
|
|
2431
2427
|
- `editMode` must be `true` for editing-related UI to be active.
|
|
2432
2428
|
- When `paginationMode="server"`, `rowCount` must be specified.
|
|
2433
2429
|
|
|
@@ -229,18 +229,18 @@ function EditorToolbar({ onAction }) {
|
|
|
229
229
|
|
|
230
230
|
### Key Props
|
|
231
231
|
|
|
232
|
-
| Prop | Type | Default | Description
|
|
233
|
-
| ---------------------- | ---------------------------------------------------------------------- | ----------- |
|
|
234
|
-
| `icon` | `ReactNode` | (required) | Icon element to render in the trigger button
|
|
235
|
-
| `items` | `{ text: string; component?: ElementType; componentProps?: object }[]` | - | Menu items
|
|
236
|
-
| `size` | `'sm' \| 'md' \| 'lg'` | `'sm'` | Button size
|
|
237
|
-
| `color` | `'primary' \| 'neutral' \| 'danger' \| 'success' \| 'warning'` | `'neutral'` | Button color
|
|
238
|
-
| `variant` | `'solid' \| 'soft' \| 'outlined' \| 'plain'` | `'plain'` | Button visual style
|
|
239
|
-
| `disabled` | `boolean` | `false` | Disables the button
|
|
240
|
-
| `loading` | `boolean` | `false` | Shows loading indicator
|
|
241
|
-
| `placement` | `Placement` | `'bottom'` | Menu position
|
|
242
|
-
| `buttonComponent` | `ElementType` | - | Custom trigger element
|
|
243
|
-
| `buttonComponentProps` | `object` | - | Props passed to
|
|
232
|
+
| Prop | Type | Default | Description |
|
|
233
|
+
| ---------------------- | ---------------------------------------------------------------------- | ----------- | -------------------------------------------- |
|
|
234
|
+
| `icon` | `ReactNode` | (required) | Icon element to render in the trigger button |
|
|
235
|
+
| `items` | `{ text: string; component?: ElementType; componentProps?: object }[]` | - | Menu items |
|
|
236
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'sm'` | Button size |
|
|
237
|
+
| `color` | `'primary' \| 'neutral' \| 'danger' \| 'success' \| 'warning'` | `'neutral'` | Button color |
|
|
238
|
+
| `variant` | `'solid' \| 'soft' \| 'outlined' \| 'plain'` | `'plain'` | Button visual style |
|
|
239
|
+
| `disabled` | `boolean` | `false` | Disables the button |
|
|
240
|
+
| `loading` | `boolean` | `false` | Shows loading indicator |
|
|
241
|
+
| `placement` | `Placement` | `'bottom'` | Menu position |
|
|
242
|
+
| `buttonComponent` | `ElementType` | - | Custom trigger element |
|
|
243
|
+
| `buttonComponentProps` | `object` | - | Props passed to custom trigger |
|
|
244
244
|
|
|
245
245
|
## Best Practices
|
|
246
246
|
|