@cashdoc/cashdoc-cms-design-system 2.5.2 → 2.6.1

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.
@@ -6,10 +6,23 @@ export type DropdownOption = {
6
6
  value: string;
7
7
  label: string;
8
8
  disabled?: boolean;
9
+ /** 트리거에 표시할 짧은 이름. 생략 시 `label` 사용. */
10
+ displayLabel?: string;
9
11
  children?: DropdownOption[];
10
12
  };
13
+ /** 선택 불가능한 그룹 헤더. hover 시 서브메뉴로 하위 옵션을 펼칩니다. */
14
+ export type DropdownGroupOption = {
15
+ label: string;
16
+ group: DropdownOption[];
17
+ disabled?: boolean;
18
+ };
19
+ /**
20
+ * `options` prop에 전달할 수 있는 아이템 타입.
21
+ * 일반 옵션과 그룹 옵션을 혼합하여 사용할 수 있습니다.
22
+ */
23
+ export type DropdownItem = DropdownOption | DropdownGroupOption;
11
24
  type DropdownPropsBase = {
12
- options: DropdownOption[];
25
+ options: DropdownItem[];
13
26
  value?: string;
14
27
  placeholder?: string;
15
28
  /**
@@ -154,7 +167,7 @@ export type DropdownProps = DropdownPropsSingle | DropdownPropsMultiple;
154
167
  * ![](https://raw.githubusercontent.com/AlmSmartDoctor/ccds-screenshots/main/screenshots/Forms/Dropdown/For%20Jsdoc.png?raw=true)
155
168
  */
156
169
  declare const DropdownInternal: import('react').ForwardRefExoticComponent<{
157
- options: DropdownOption[];
170
+ options: DropdownItem[];
158
171
  value?: string;
159
172
  placeholder?: string;
160
173
  /**
@@ -92,7 +92,7 @@ export declare const Select: import('react').ForwardRefExoticComponent<{
92
92
  error?: string;
93
93
  required?: boolean;
94
94
  } & Omit<{
95
- options: import('./Dropdown').DropdownOption[];
95
+ options: import('./Dropdown').DropdownItem[];
96
96
  value?: string;
97
97
  placeholder?: string;
98
98
  onValueChange?: (value: string) => void;
@@ -1,5 +1,5 @@
1
1
  export { Dropdown } from './Dropdown';
2
- export type { DropdownOption, DropdownProps } from './Dropdown';
2
+ export type { DropdownOption, DropdownGroupOption, DropdownItem, DropdownProps, } from './Dropdown';
3
3
  export { dropdownTriggerVariants } from './variants';
4
4
  export { Select, type SelectProps } from './Select';
5
5
  export { Combobox, type ComboboxProps } from './Combobox';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cashdoc/cashdoc-cms-design-system",
3
- "version": "2.5.2",
3
+ "version": "2.6.1",
4
4
  "description": "Cashdoc CMS Design System",
5
5
  "type": "module",
6
6
  "main": "dist/index.umd.js",