@croquiscom/pds 12.7.0 → 12.8.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @croquiscom/pds
2
2
 
3
+ ## 12.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - e21f07d: Table Body Cell, Max Height, Truncate Text, Huge Contents 추가
8
+
3
9
  ## 12.7.0
4
10
 
5
11
  ### Minor Changes
@@ -18,6 +18,7 @@ export interface DataTableProps<DataType> {
18
18
  * - x: 가로 스크롤을 설정하고 스크롤 영역의 너비를 지정합니다.
19
19
  * - y: 세로 스크롤을 설정하고 스크롤 영역의 높이를 지정합니다.
20
20
  * - x 사용시 table-layout이 fixed 처리됩니다.(기본 auto)
21
+ * - y 기본값은 600px입니다.
21
22
  */
22
23
  scroll?: Scroll;
23
24
  /**
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { DataType } from './storybook-helper';
3
+ import { DataTable } from './DataTable';
4
+ declare const meta: Meta<typeof DataTable<DataType>>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof DataTable<DataType>>;
7
+ export declare const Scroll: Story;
@@ -1,5 +1,5 @@
1
1
  import React, { TdHTMLAttributes } from 'react';
2
- import { ColumnAlign } from '../table/types';
2
+ import { CellSize, ColumnAlign } from '../table/types';
3
3
  interface TableCellProps extends TdHTMLAttributes<HTMLTableCellElement> {
4
4
  id?: string;
5
5
  fixed?: boolean;
@@ -14,6 +14,12 @@ interface TableCellProps extends TdHTMLAttributes<HTMLTableCellElement> {
14
14
  clickable?: boolean;
15
15
  selectable?: boolean;
16
16
  isColumnLast?: boolean;
17
+ /** @default medium */
18
+ size?: CellSize;
19
+ /** @default true */
20
+ isTruncate?: boolean;
21
+ /** @default true */
22
+ isHugeContents?: boolean;
17
23
  }
18
24
  export declare const TableCell: React.ForwardRefExoticComponent<TableCellProps & React.RefAttributes<HTMLTableCellElement>>;
19
25
  export {};
@@ -5,3 +5,6 @@ export default meta;
5
5
  type Story = StoryObj<typeof TableCell>;
6
6
  export declare const Base: Story;
7
7
  export declare const Valign: Story;
8
+ export declare const Size: Story;
9
+ export declare const TruncateText: Story;
10
+ export declare const HugeContents: Story;
@@ -4,3 +4,6 @@ declare const meta: Meta<typeof TableCell>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof TableCell>;
6
6
  export declare const Valign: Story;
7
+ export declare const Size: Story;
8
+ export declare const TruncateText: Story;
9
+ export declare const HugeContents: Story;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { ColumnAlign } from './types';
2
+ import { CellSize, ColumnAlign } from './types';
3
3
  export declare const StyledTableCol: import("@emotion/styled").StyledComponent<{
4
4
  theme?: import("@emotion/react").Theme;
5
5
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>;
@@ -12,3 +12,4 @@ export declare const StyledTableCol: import("@emotion/styled").StyledComponent<{
12
12
  resize?: boolean;
13
13
  align?: ColumnAlign;
14
14
  }, import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, {}>;
15
+ export declare const cell_size_css: Record<CellSize, string>;
@@ -20,6 +20,7 @@ export type CellProps<DataType> = ({ row, value, index, rows, }: {
20
20
  index: number;
21
21
  rows: DataTableRowsType<DataType>;
22
22
  }) => ReactNode;
23
+ export type CellSize = 'small' | 'medium' | 'large';
23
24
  export type DataTableColumnBase = {
24
25
  /**
25
26
  * 테이블 컬럼 텍스트