@nurihaus/web-design-system 3.9.1 → 3.9.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.
package/README.md CHANGED
@@ -26,7 +26,7 @@ import '@nurihaus/web-design-system/tokens.css';
26
26
  import '@nurihaus/web-design-system/styles.css';
27
27
  ```
28
28
 
29
- 글꼴 파일은 앱이 불러온다. 디자인 시스템은 글꼴을 내려받지 않는다. `styles.css` 의 `.nuri-theme` 는 앱이 Pretendard 를 불러왔으면 Pretendard 를 먼저 쓰고, 없으면 시스템 글꼴로 넘어간다. 스택은 `font-family` 이름 `Pretendard` 로 찾는다. 앱이 다른 이름으로 불러오면(예: 이름을 해시로 바꾸는 도구) `.nuri-theme` 의 `font-family` 를 앱에서 덮어쓴다.
29
+ 글꼴 파일은 앱이 불러온다. 디자인 시스템은 글꼴을 내려받지 않는다. `styles.css` 의 `.nuri-theme` 는 앱이 Pretendard 를 불러왔으면 Pretendard 를 먼저 쓰고, 없으면 시스템 글꼴로 넘어간다. 스택은 `font-family` 이름 `Pretendard` → `Pretendard Variable` → `PretendardVariable` 순으로 찾는다(가변 글꼴·동적 서브셋 CSS 가 쓰는 이름까지). 앱이 또 다른 이름으로 불러오면(예: 이름을 해시로 바꾸는 도구) `.nuri-theme` 의 `font-family` 를 앱에서 덮어쓴다. 토큰 `--font-family-primary` 는 Figma 의 글꼴 이름이고 컴포넌트는 쓰지 않는다.
30
30
 
31
31
  `.nuri-theme` 글꼴 스택도 필요 없으면 나눠서 가져온다. 컴포넌트 글자는 앱의 글꼴을 물려받는다.
32
32
 
@@ -370,7 +370,9 @@ import { DataTable } from '@nurihaus/web-design-system/data-table'; // 이 컴
370
370
  import { DataTable } from '@nurihaus/web-design-system'; // 루트. 첫 로드 JS 가 커진다
371
371
  ```
372
372
 
373
- **언제 쓴다.** 여러 레코드를 열 단위로 나열하는 목록 화면에 쓴다. 이름과 달리 `rows`는 헤더 열 정의(`id`, 헤더 내용)이고 `columns`는 데이터 행 배열이며, 각 데이터 행은 `rows`의 모든 `id`를 키로 가진다. 열 너비는 셀 내용의 너비를 따르므로 같은 열의 헤더와 셀 내용에 같은 너비를 준다.
373
+ **언제 쓴다.** 여러 레코드를 열 단위로 나열하는 목록 화면에 쓴다. 이름과 달리 `rows`는 헤더 열 정의(`id`, 헤더 내용)이고 `columns`는 데이터 행 배열이며, 각 데이터 행은 `rows`의 모든 `id`를 키로 가진다. 열 너비는 `rows` 항목의 `width`로 준다. 없으면 셀 내용의 너비를 따른다.
374
+
375
+ `variant="padded"`를 주면 헤더 칸과 본문 셀이 여백·글자 크기·색을 기본으로 갖고, `fixedRowsIndex`로 고정한 마지막 열 오른쪽에 경계선이 행 높이만큼 그어진다. 기본 `plain`은 셀 내용이 모양을 정한다. `padded`에서 여백만 끄려면 `className`으로 `--data-table-cell-padding: 0`을 준다.
374
376
 
375
377
  `track`을 주면 `onClickRow`가 있는 `rows` 항목(헤더 칸)을 누를 때 `click`과 그 `id`를 `value`에 담아 사용 로그로 보낸다. `onClickRow`가 없는 칸과 본문 셀은 보내지 않는다.
376
378
 
@@ -378,14 +380,15 @@ import { DataTable } from '@nurihaus/web-design-system'; // 루트.
378
380
 
379
381
  ```tsx
380
382
  <DataTable
383
+ variant="padded"
381
384
  rows={[
382
- { id: 'name', value: <div style={{ width: '160px' }}>이름</div> },
383
- { id: 'status', value: <div style={{ width: '120px' }}>상태</div> },
385
+ { id: 'name', value: '이름', width: 160 },
386
+ { id: 'status', value: '상태', width: 120 },
384
387
  ] as const}
385
388
  columns={[
386
389
  {
387
- name: { value: <div style={{ width: '160px' }}>홍길동</div> },
388
- status: { value: <div style={{ width: '120px' }}>대기</div>, onClickCell: () => {} },
390
+ name: { value: '홍길동' },
391
+ status: { value: '대기', onClickCell: () => {} },
389
392
  },
390
393
  ]}
391
394
  fixedRowsIndex={1}
@@ -400,6 +403,7 @@ import { DataTable } from '@nurihaus/web-design-system'; // 루트.
400
403
  | --- | --- | --- | --- |
401
404
  | `rows` | `T` | 예 | |
402
405
  | `columns` | `ColumnsType<T>` | 예 | |
406
+ | `variant` | `'plain' \| 'padded'` | | `'plain'` |
403
407
  | `fixedRowsIndex` | `number` | | `0` |
404
408
  | `headerHeight` | `number` | | `85` |
405
409
  | `rowHeight` | `number` | | `60` |
@@ -937,7 +941,11 @@ import { CollapsibleMenu } from '@nurihaus/web-design-system'; //
937
941
 
938
942
  `track`을 주면 링크·버튼 항목을 고를 때 `navigate`와 그 항목의 `key`를 `value`에 담아 사용 로그로 보낸다. 그룹을 펼치고 접는 것은 보내지 않는다.
939
943
 
940
- **쓰지 않는다.** 같은 화면 안에서 패널을 바꾸는 용도는 Tabs를 쓴다. 본문 콘텐츠를 접고 펼치는 아코디언 용도로는 쓰지 않는다(`<nav>`로 렌더된다). 값을 고르는 폼 입력은 DropDown을 쓴다.
944
+ 그룹은 기본으로 스스로 열고 닫는다(`defaultOpen`). 다른 메뉴에서 그룹 안 경로로 이동했을 때 그 그룹을 열어야 하면 `open`·`onOpenChange` 로 밖에서 제어한다. 접힌 사이드바에서 그룹을 눌렀을 때 먼저 사이드바를 펼치는 식의 처리는 `onTriggerClick` 에서 한다. `e.preventDefault()` 하면 그 클릭은 열고 닫지 않는다. 열고 닫을 때 높이가 움직이고, `prefers-reduced-motion` 이면 바로 바뀐다.
945
+
946
+ "섹션 제목 + 항목들" 묶음이 여러 개면 `sections` 로 넘긴다. 항목은 `ul`/`li` 로 그려 스크린리더가 목록으로 읽는다. 루트는 `<nav aria-label="Collapsible menu">` 다. 이름은 `aria-label` 로 바꾸고, 앱이 이미 `<nav>` 로 감쌌거나 한 화면에 여러 개 두면 `as="div"` 로 `nav` 를 뺀다.
947
+
948
+ **쓰지 않는다.** 같은 화면 안에서 패널을 바꾸는 용도는 Tabs를 쓴다. 본문 콘텐츠를 접고 펼치는 아코디언 용도로는 쓰지 않는다. 값을 고르는 폼 입력은 DropDown을 쓴다.
941
949
 
942
950
  Next.js 에서는 `next/link` 의 `Link` 를 그대로 넘긴다.
943
951
 
@@ -967,6 +975,35 @@ import Link from 'next/link';
967
975
  />
968
976
  ```
969
977
 
978
+ 섹션과 제어되는 그룹. 섹션만 쓰면 `items` 는 `[]`:
979
+
980
+ ```tsx
981
+ <CollapsibleMenu
982
+ as="div"
983
+ items={[]}
984
+ activeKey="quest.list"
985
+ sections={[
986
+ {
987
+ key: 'ops',
988
+ title: '운영',
989
+ items: [
990
+ {
991
+ key: 'quest',
992
+ item: <span>퀘스트</span>,
993
+ open: true,
994
+ onOpenChange: () => {},
995
+ onTriggerClick: (e) => {
996
+ if (e.altKey) e.preventDefault();
997
+ },
998
+ children: [{ key: 'quest.list', item: <span>목록</span>, href: '/quests' }],
999
+ },
1000
+ ],
1001
+ },
1002
+ { key: 'me', title: '내 정보', items: [{ key: 'profile', item: <span>프로필</span> }] },
1003
+ ]}
1004
+ />
1005
+ ```
1006
+
970
1007
  **모션.** press · expand. 토큰 값과 규칙은 `motion.md`.
971
1008
 
972
1009
  ### props
@@ -975,12 +1012,15 @@ import Link from 'next/link';
975
1012
  | --- | --- | --- | --- |
976
1013
  | `size` | `'s' \| 'm'` | | `'s'` |
977
1014
  | `items` | `CollapsibleMenuItem[]` | 예 | |
1015
+ | `sections` | `CollapsibleMenuSection[]` | | |
978
1016
  | `activeKey` | `string` | | |
979
1017
  | `onActiveKeyChange` | `((key: string) => void)` | | |
980
1018
  | `indent` | `number` | | `12` |
981
1019
  | `chevron` | `ReactNode` | | |
982
1020
  | `width` | `string \| number` | | `'240px'` |
983
1021
  | `linkComponent` | `ComponentType<CollapsibleMenuLinkProps>` | | |
1022
+ | `as` | `'div' \| 'nav'` | | `'nav'` |
1023
+ | `aria-label` | `string` | | |
984
1024
  | `className` | `string` | | |
985
1025
  | `style` | `CSSProperties` | | |
986
1026
  | `track` | `string` | | |
package/dist/ai/motion.md CHANGED
@@ -412,7 +412,7 @@
412
412
  - **Skeleton** `skeleton-style.css:68 prefers-reduced-motion 에서 animation none` → busy
413
413
  - **Breadcrumb** `breadcrumb-style.css:75 transition color var(--motion-fast) var(--motion-ease)` → press
414
414
  - **DropDown** `drop-down-style.css:91 transition transform var(--motion-fast) var(--motion-ease) (화살표)` → expand
415
- - **CollapsibleMenu** `collapsible-menu-style.css:86 transition transform var(--motion-fast) var(--motion-ease) (화살표)` → expand
415
+ - **CollapsibleMenu** `collapsible-menu-style.css:120 transition transform var(--motion-fast) var(--motion-ease) (화살표)` → expand
416
416
  - **Tabs** `tabs-style.css:48 transition color var(--motion-base) var(--motion-ease)` → press
417
417
  - **Tabs** `tabs-style.css:92 transition left·width var(--motion-base) var(--motion-ease)` → progress
418
418
  - **Spinner** `spinner-style.css:28 animation motion-busy-ring var(--spinner-duration) var(--spinner-ease)` → busy
@@ -63,13 +63,15 @@ var CollapsibleMenuTrigger = /*#__PURE__*/(0,external_root_React_commonjs2_react
63
63
  className = props.className,
64
64
  asChild = props.asChild,
65
65
  disabled = props.disabled,
66
- style = props.style;
66
+ style = props.style,
67
+ onClick = props.onClick;
67
68
  return (0,jsx_runtime_.jsx)(external_root_RadixUI_commonjs2_radix_ui_commonjs_radix_ui_amd_radix_ui_module_radix_ui_.Collapsible.Trigger, {
68
69
  ref: ref,
69
70
  className: (0,classNames/* classNames */.x)('nuri-theme base-collapsible-menu trigger', className),
70
71
  asChild: asChild,
71
72
  disabled: disabled,
72
73
  style: style,
74
+ onClick: onClick,
73
75
  children: children
74
76
  });
75
77
  });
@@ -129,11 +131,16 @@ var CollapsibleMenu = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
129
131
  className = _a.className,
130
132
  style = _a.style,
131
133
  items = _a.items,
134
+ sections = _a.sections,
132
135
  activeKey = _a.activeKey,
133
136
  onActiveKeyChange = _a.onActiveKeyChange,
134
137
  _b = _a.indent,
135
138
  indent = _b === void 0 ? 12 : _b,
136
139
  linkComponent = _a.linkComponent,
140
+ _c = _a.as,
141
+ Root = _c === void 0 ? 'nav' : _c,
142
+ _d = _a["aria-label"],
143
+ ariaLabel = _d === void 0 ? 'Collapsible menu' : _d,
137
144
  track = _a.track,
138
145
  trackProps = _a.trackProps;
139
146
  var emit = (0,useTrack/* useTrack */.n)('CollapsibleMenu', {
@@ -154,72 +161,94 @@ var CollapsibleMenu = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
154
161
  onActiveKeyChange === null || onActiveKeyChange === void 0 ? void 0 : onActiveKeyChange(item.key);
155
162
  (_a = item.onSelect) === null || _a === void 0 ? void 0 : _a.call(item);
156
163
  };
157
- var _renderItems = function renderItems(targetItems, depth) {
164
+ var renderItem = function renderItem(item, depth) {
165
+ var _a;
158
166
  var indentStyle = {
159
167
  paddingLeft: "".concat(depth * indent, "px")
160
168
  };
161
- return targetItems.map(function (item) {
162
- var _a;
163
- var hasChildren = !!((_a = item.children) === null || _a === void 0 ? void 0 : _a.length);
164
- var isActive = activeKey === item.key;
165
- if (hasChildren) {
166
- var triggerClassName = (0,classNames/* classNames */.x)('collapsible-menu-trigger', 'collapsible-menu-row', _hasActiveDescendant(item) && 'is-active');
167
- return (0,jsx_runtime_.jsxs)(base_collapsible_menu, {
168
- defaultOpen: item.defaultOpen,
169
+ var hasChildren = !!((_a = item.children) === null || _a === void 0 ? void 0 : _a.length);
170
+ var isActive = activeKey === item.key;
171
+ if (hasChildren) {
172
+ var triggerClassName = (0,classNames/* classNames */.x)('collapsible-menu-trigger', 'collapsible-menu-row', _hasActiveDescendant(item) && 'is-active');
173
+ return (0,jsx_runtime_.jsxs)(base_collapsible_menu, {
174
+ defaultOpen: item.defaultOpen,
175
+ open: item.open,
176
+ onOpenChange: item.onOpenChange,
177
+ disabled: item.disabled,
178
+ children: [(0,jsx_runtime_.jsx)(base_collapsible_menu.Trigger, {
179
+ className: triggerClassName,
169
180
  disabled: item.disabled,
170
- children: [(0,jsx_runtime_.jsx)(base_collapsible_menu.Trigger, {
171
- className: triggerClassName,
172
- disabled: item.disabled,
173
- children: (0,jsx_runtime_.jsx)("span", {
174
- className: 'collapsible-menu-left',
175
- style: indentStyle,
176
- children: item.item
177
- })
178
- }), (0,jsx_runtime_.jsx)(base_collapsible_menu.Content, {
179
- className: 'collapsible-menu-content',
180
- children: item.children ? _renderItems(item.children, depth + 1) : null
181
- })]
182
- }, item.key);
183
- }
184
- var itemClassName = (0,classNames/* classNames */.x)('collapsible-menu-item', 'collapsible-menu-row', isActive && 'is-active');
185
- var left = (0,jsx_runtime_.jsx)("span", {
186
- className: 'collapsible-menu-left',
187
- style: indentStyle,
188
- children: item.item
181
+ onClick: item.onTriggerClick,
182
+ children: (0,jsx_runtime_.jsx)("span", {
183
+ className: 'collapsible-menu-left',
184
+ style: indentStyle,
185
+ children: item.item
186
+ })
187
+ }), (0,jsx_runtime_.jsx)(base_collapsible_menu.Content, {
188
+ className: 'collapsible-menu-content',
189
+ children: item.children ? renderList(item.children, depth + 1) : null
190
+ })]
189
191
  });
190
- if (item.href) {
191
- return (0,jsx_runtime_.jsx)(Link, {
192
- className: itemClassName,
193
- href: item.href,
194
- "aria-current": isActive ? 'page' : undefined,
195
- "aria-disabled": item.disabled ? 'true' : undefined,
196
- onClick: function onClick(e) {
197
- if (item.disabled) {
198
- e.preventDefault();
199
- return;
200
- }
201
- selectItem(item);
202
- },
203
- children: left
204
- }, item.key);
205
- }
206
- return (0,jsx_runtime_.jsx)("button", {
207
- type: 'button',
192
+ }
193
+ var itemClassName = (0,classNames/* classNames */.x)('collapsible-menu-item', 'collapsible-menu-row', isActive && 'is-active');
194
+ var left = (0,jsx_runtime_.jsx)("span", {
195
+ className: 'collapsible-menu-left',
196
+ style: indentStyle,
197
+ children: item.item
198
+ });
199
+ if (item.href) {
200
+ return (0,jsx_runtime_.jsx)(Link, {
208
201
  className: itemClassName,
209
- disabled: item.disabled,
210
- onClick: function onClick() {
211
- return selectItem(item);
202
+ href: item.href,
203
+ "aria-current": isActive ? 'page' : undefined,
204
+ "aria-disabled": item.disabled ? 'true' : undefined,
205
+ onClick: function onClick(e) {
206
+ if (item.disabled) {
207
+ e.preventDefault();
208
+ return;
209
+ }
210
+ selectItem(item);
212
211
  },
213
212
  children: left
214
- }, item.key);
213
+ });
214
+ }
215
+ return (0,jsx_runtime_.jsx)("button", {
216
+ type: 'button',
217
+ className: itemClassName,
218
+ disabled: item.disabled,
219
+ onClick: function onClick() {
220
+ return selectItem(item);
221
+ },
222
+ children: left
215
223
  });
216
224
  };
217
- return (0,jsx_runtime_.jsx)("nav", {
225
+ // reset.css 가 list-style 을 지우면 Safari 가 목록 의미를 버리므로 role 을 직접 단다.
226
+ var renderList = function renderList(targetItems, depth) {
227
+ return (0,jsx_runtime_.jsx)("ul", {
228
+ className: 'collapsible-menu-list',
229
+ role: 'list',
230
+ children: targetItems.map(function (item) {
231
+ return (0,jsx_runtime_.jsx)("li", {
232
+ children: renderItem(item, depth)
233
+ }, item.key);
234
+ })
235
+ });
236
+ };
237
+ var renderSection = function renderSection(section) {
238
+ return (0,jsx_runtime_.jsxs)("div", {
239
+ className: 'collapsible-menu-section',
240
+ children: [section.title ? (0,jsx_runtime_.jsx)("div", {
241
+ className: 'collapsible-menu-section-title',
242
+ children: section.title
243
+ }) : null, renderList(section.items, 0)]
244
+ }, section.key);
245
+ };
246
+ return (0,jsx_runtime_.jsxs)(Root, {
218
247
  ref: ref,
219
248
  className: rootClassName,
220
249
  style: style,
221
- "aria-label": 'Collapsible menu',
222
- children: _renderItems(items, 0)
250
+ "aria-label": Root === 'nav' ? ariaLabel : undefined,
251
+ children: [items.length ? renderList(items, 0) : null, sections === null || sections === void 0 ? void 0 : sections.map(renderSection)]
223
252
  });
224
253
  });
225
254
  CollapsibleMenu.displayName = 'CollapsibleMenu';
@@ -5,15 +5,9 @@ declare const meta: {
5
5
  ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
6
6
  }, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
7
7
  decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-webpack5").ReactRenderer, {
8
- title?: string | undefined | undefined;
9
- children?: import("react").ReactNode;
10
8
  className?: string | undefined | undefined;
11
9
  style?: import("react").CSSProperties | undefined;
12
- key?: import("react").Key | null | undefined;
13
- color?: string | undefined | undefined;
14
- content?: string | undefined | undefined;
15
- translate?: "yes" | "no" | undefined | undefined;
16
- slot?: string | undefined | undefined;
10
+ children?: import("react").ReactNode;
17
11
  defaultChecked?: boolean | undefined | undefined;
18
12
  defaultValue?: string | number | readonly string[] | undefined;
19
13
  suppressContentEditableWarning?: boolean | undefined | undefined;
@@ -30,11 +24,15 @@ declare const meta: {
30
24
  id?: string | undefined | undefined;
31
25
  lang?: string | undefined | undefined;
32
26
  nonce?: string | undefined | undefined;
27
+ slot?: string | undefined | undefined;
33
28
  spellCheck?: (boolean | "true" | "false") | undefined;
34
29
  tabIndex?: number | undefined | undefined;
30
+ title?: string | undefined | undefined;
31
+ translate?: "yes" | "no" | undefined | undefined;
35
32
  radioGroup?: string | undefined | undefined;
36
33
  role?: import("react").AriaRole | undefined;
37
34
  about?: string | undefined | undefined;
35
+ content?: string | undefined | undefined;
38
36
  datatype?: string | undefined | undefined;
39
37
  inlist?: any;
40
38
  prefix?: string | undefined | undefined;
@@ -46,6 +44,7 @@ declare const meta: {
46
44
  vocab?: string | undefined | undefined;
47
45
  autoCorrect?: string | undefined | undefined;
48
46
  autoSave?: string | undefined | undefined;
47
+ color?: string | undefined | undefined;
49
48
  itemProp?: string | undefined | undefined;
50
49
  itemScope?: boolean | undefined | undefined;
51
50
  itemType?: string | undefined | undefined;
@@ -272,6 +271,7 @@ declare const meta: {
272
271
  onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
273
272
  onTransitionEnd?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
274
273
  onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
274
+ key?: import("react").Key | null | undefined;
275
275
  ref?: import("react").LegacyRef<HTMLDivElement> | undefined;
276
276
  }>) => import("react/jsx-runtime").JSX.Element)[];
277
277
  };
@@ -10,6 +10,8 @@ export interface CollapsibleMenuRootProps {
10
10
  }
11
11
  export interface CollapsibleMenuTriggerProps extends AsChildProps, StyleProps {
12
12
  disabled?: boolean;
13
+ /** `e.preventDefault()` 하면 열고 닫지 않는다. */
14
+ onClick?: (e: MouseEvent<HTMLButtonElement>) => void;
13
15
  }
14
16
  export interface CollapsibleMenuContentProps extends AsChildProps, StyleProps {
15
17
  }
@@ -20,7 +22,20 @@ export interface CollapsibleMenuItem {
20
22
  href?: string;
21
23
  onSelect?: () => void;
22
24
  children?: CollapsibleMenuItem[];
25
+ /** 그룹(children 있음) 전용. 처음 열림 여부. */
23
26
  defaultOpen?: boolean;
27
+ /** 그룹 전용. 주면 열림을 밖에서 제어한다. */
28
+ open?: boolean;
29
+ /** 그룹 전용. 트리거로 열고 닫을 때 불린다. */
30
+ onOpenChange?: (open: boolean) => void;
31
+ /** 그룹 전용. 트리거 클릭. `e.preventDefault()` 하면 열고 닫지 않는다. */
32
+ onTriggerClick?: (e: MouseEvent<HTMLButtonElement>) => void;
33
+ }
34
+ /** 섹션 제목 하나와 그 아래 항목 목록. */
35
+ export interface CollapsibleMenuSection {
36
+ key: string;
37
+ title?: ReactNode;
38
+ items: CollapsibleMenuItem[];
24
39
  }
25
40
  /** `href` 가 있는 항목을 그릴 때 `linkComponent` 가 받는 props. next/link 의 Link 를 그대로 넘길 수 있다. */
26
41
  export interface CollapsibleMenuLinkProps {
@@ -33,11 +48,18 @@ export interface CollapsibleMenuLinkProps {
33
48
  }
34
49
  export interface CollapsibleMenuProps extends StyleProps, TrackProps {
35
50
  size?: (typeof sizes)[number];
51
+ /** 섹션 없는 항목. `sections` 와 함께 주면 `sections` 앞에 그린다. 섹션만 쓰면 `[]`. */
36
52
  items: CollapsibleMenuItem[];
53
+ /** 제목이 있는 섹션 여러 개. */
54
+ sections?: CollapsibleMenuSection[];
37
55
  activeKey?: string;
38
56
  onActiveKeyChange?: (key: string) => void;
39
57
  indent?: number;
40
58
  chevron?: ReactNode;
41
59
  width?: number | string;
42
60
  linkComponent?: ComponentType<CollapsibleMenuLinkProps>;
61
+ /** 루트 요소. 앱이 이미 `<nav>` 로 감쌌으면 `'div'`. 기본 `'nav'`. */
62
+ as?: 'nav' | 'div';
63
+ /** 루트가 `nav` 일 때 접근성 이름. 기본 `'Collapsible menu'`. */
64
+ 'aria-label'?: string;
43
65
  }
@@ -1,4 +1,4 @@
1
1
  import { CollapsibleMenuProps } from './collapsible-menu-type';
2
2
  declare const CollapsibleMenu: import("react").ForwardRefExoticComponent<CollapsibleMenuProps & import("react").RefAttributes<HTMLElement>>;
3
3
  export default CollapsibleMenu;
4
- export type { CollapsibleMenuProps, CollapsibleMenuItem, CollapsibleMenuLinkProps, } from './collapsible-menu-type';
4
+ export type { CollapsibleMenuProps, CollapsibleMenuItem, CollapsibleMenuSection, CollapsibleMenuLinkProps, } from './collapsible-menu-type';
@@ -23,3 +23,5 @@ export declare const Sizes: Story;
23
23
  /** 자식이 있는 항목에 disabled 를 주면 그룹(Radix Collapsible root)이 접히지도 펼쳐지지도 않는다. */
24
24
  export declare const Disabled: Story;
25
25
  export declare const CustomLink: Story;
26
+ /** 섹션 제목 + 목록 묶음. 그룹은 `open`·`onOpenChange` 로 밖에서 열고, 접힌 사이드바 흉내로 Alt+클릭은 열지 않는다. */
27
+ export declare const Sections: Story;
@@ -17,15 +17,8 @@ declare const meta: {
17
17
  description: string;
18
18
  };
19
19
  decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-webpack5").ReactRenderer, {
20
- title: import("react").ReactNode;
21
- description?: import("react").ReactNode;
22
20
  className?: string | undefined | undefined;
23
21
  style?: import("react").CSSProperties | undefined;
24
- key?: import("react").Key | null | undefined;
25
- color?: string | undefined | undefined;
26
- content?: string | undefined | undefined;
27
- translate?: "yes" | "no" | undefined | undefined;
28
- slot?: string | undefined | undefined;
29
22
  defaultChecked?: boolean | undefined | undefined;
30
23
  defaultValue?: string | number | readonly string[] | undefined;
31
24
  suppressContentEditableWarning?: boolean | undefined | undefined;
@@ -42,11 +35,15 @@ declare const meta: {
42
35
  id?: string | undefined | undefined;
43
36
  lang?: string | undefined | undefined;
44
37
  nonce?: string | undefined | undefined;
38
+ slot?: string | undefined | undefined;
45
39
  spellCheck?: (boolean | "true" | "false") | undefined;
46
40
  tabIndex?: number | undefined | undefined;
41
+ title: import("react").ReactNode;
42
+ translate?: "yes" | "no" | undefined | undefined;
47
43
  radioGroup?: string | undefined | undefined;
48
44
  role?: import("react").AriaRole | undefined;
49
45
  about?: string | undefined | undefined;
46
+ content?: string | undefined | undefined;
50
47
  datatype?: string | undefined | undefined;
51
48
  inlist?: any;
52
49
  prefix?: string | undefined | undefined;
@@ -58,6 +55,7 @@ declare const meta: {
58
55
  vocab?: string | undefined | undefined;
59
56
  autoCorrect?: string | undefined | undefined;
60
57
  autoSave?: string | undefined | undefined;
58
+ color?: string | undefined | undefined;
61
59
  itemProp?: string | undefined | undefined;
62
60
  itemScope?: boolean | undefined | undefined;
63
61
  itemType?: string | undefined | undefined;
@@ -284,9 +282,11 @@ declare const meta: {
284
282
  onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
285
283
  onTransitionEnd?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
286
284
  onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
287
- action?: import("react").ReactNode;
288
- icon: import("../..").IconName;
285
+ key?: import("react").Key | null | undefined;
289
286
  variant?: (typeof variant)[number] | undefined;
287
+ icon: import("../..").IconName;
288
+ description?: import("react").ReactNode;
289
+ action?: import("react").ReactNode;
290
290
  ref?: import("react").LegacyRef<HTMLDivElement> | undefined;
291
291
  }>) => import("react/jsx-runtime").JSX.Element)[];
292
292
  };
@@ -7,7 +7,7 @@ declare const meta: {
7
7
  control: {
8
8
  type: "select";
9
9
  };
10
- options: ("x" | "link" | "circle" | "image" | "copy" | "play" | "house" | "megaphone-simple" | "chats-circle" | "user-circle" | "bell" | "caret-left" | "magnifying-glass" | "dots-three" | "gear-six" | "chat-circle" | "paper-plane-tilt" | "plus" | "camera" | "video-camera" | "upload-simple" | "calendar-blank" | "clock" | "map-pin" | "truck" | "ticket" | "qr-code" | "sparkle" | "gift" | "wallet" | "bank" | "credit-card" | "check-circle" | "check" | "warning" | "info" | "question" | "lock" | "pencil-simple" | "trash" | "share-network" | "eye" | "sliders-horizontal" | "heart" | "star" | "globe" | "sign-out" | "caret-right" | "arrow-right" | "instagram-logo" | "tiktok-logo" | "youtube-logo")[];
10
+ options: ("link" | "circle" | "image" | "x" | "copy" | "house" | "megaphone-simple" | "chats-circle" | "user-circle" | "bell" | "caret-left" | "magnifying-glass" | "dots-three" | "gear-six" | "chat-circle" | "paper-plane-tilt" | "plus" | "camera" | "video-camera" | "play" | "upload-simple" | "calendar-blank" | "clock" | "map-pin" | "truck" | "ticket" | "qr-code" | "sparkle" | "gift" | "wallet" | "bank" | "credit-card" | "check-circle" | "check" | "warning" | "info" | "question" | "lock" | "pencil-simple" | "trash" | "share-network" | "eye" | "sliders-horizontal" | "heart" | "star" | "globe" | "sign-out" | "caret-right" | "arrow-right" | "instagram-logo" | "tiktok-logo" | "youtube-logo")[];
11
11
  };
12
12
  weight: {
13
13
  control: {
@@ -6,19 +6,10 @@ declare const meta: {
6
6
  label: string;
7
7
  };
8
8
  decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-webpack5").ReactRenderer, {
9
- title?: string | undefined | undefined;
10
- description?: import("react").ReactNode;
11
- children?: import("react").ReactNode;
9
+ asChild?: boolean | undefined;
12
10
  className?: string | undefined | undefined;
13
11
  style?: import("react").CSSProperties | undefined;
14
- track?: string | undefined;
15
- trackProps?: Record<string, string | number | boolean> | undefined;
16
- key?: import("react").Key | null | undefined;
17
- color?: string | undefined | undefined;
18
- content?: string | undefined | undefined;
19
- translate?: "yes" | "no" | undefined | undefined;
20
- label: import("react").ReactNode;
21
- slot?: string | undefined | undefined;
12
+ children?: import("react").ReactNode;
22
13
  defaultChecked?: boolean | undefined | undefined;
23
14
  defaultValue?: string | number | readonly string[] | undefined;
24
15
  suppressContentEditableWarning?: boolean | undefined | undefined;
@@ -35,11 +26,15 @@ declare const meta: {
35
26
  id?: string | undefined | undefined;
36
27
  lang?: string | undefined | undefined;
37
28
  nonce?: string | undefined | undefined;
29
+ slot?: string | undefined | undefined;
38
30
  spellCheck?: (boolean | "true" | "false") | undefined;
39
31
  tabIndex?: number | undefined | undefined;
32
+ title?: string | undefined | undefined;
33
+ translate?: "yes" | "no" | undefined | undefined;
40
34
  radioGroup?: string | undefined | undefined;
41
35
  role?: import("react").AriaRole | undefined;
42
36
  about?: string | undefined | undefined;
37
+ content?: string | undefined | undefined;
43
38
  datatype?: string | undefined | undefined;
44
39
  inlist?: any;
45
40
  prefix?: string | undefined | undefined;
@@ -51,6 +46,7 @@ declare const meta: {
51
46
  vocab?: string | undefined | undefined;
52
47
  autoCorrect?: string | undefined | undefined;
53
48
  autoSave?: string | undefined | undefined;
49
+ color?: string | undefined | undefined;
54
50
  itemProp?: string | undefined | undefined;
55
51
  itemScope?: boolean | undefined | undefined;
56
52
  itemType?: string | undefined | undefined;
@@ -277,7 +273,11 @@ declare const meta: {
277
273
  onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
278
274
  onTransitionEnd?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
279
275
  onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
280
- asChild?: boolean | undefined;
276
+ label: import("react").ReactNode;
277
+ track?: string | undefined;
278
+ key?: import("react").Key | null | undefined;
279
+ trackProps?: Record<string, string | number | boolean> | undefined;
280
+ description?: import("react").ReactNode;
281
281
  chevron?: boolean | undefined;
282
282
  leading?: import("react").ReactNode;
283
283
  trailing?: import("react").ReactNode;
@@ -22,20 +22,9 @@ declare const meta: {
22
22
  time: string;
23
23
  };
24
24
  decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-webpack5").ReactRenderer, {
25
- title?: string | undefined | undefined;
26
- children?: import("react").ReactNode;
27
- side?: (typeof side)[number] | undefined;
28
25
  className?: string | undefined | undefined;
29
26
  style?: import("react").CSSProperties | undefined;
30
- key?: import("react").Key | null | undefined;
31
- color?: string | undefined | undefined;
32
- content?: string | undefined | undefined;
33
- translate?: "yes" | "no" | undefined | undefined;
34
- motion?: (typeof motion)[number] | undefined;
35
- slot?: string | undefined | undefined;
36
- time?: import("react").ReactNode;
37
- name?: import("react").ReactNode;
38
- value?: string | number | readonly string[] | undefined;
27
+ children?: import("react").ReactNode;
39
28
  defaultChecked?: boolean | undefined | undefined;
40
29
  defaultValue?: string | number | readonly string[] | undefined;
41
30
  suppressContentEditableWarning?: boolean | undefined | undefined;
@@ -52,11 +41,15 @@ declare const meta: {
52
41
  id?: string | undefined | undefined;
53
42
  lang?: string | undefined | undefined;
54
43
  nonce?: string | undefined | undefined;
44
+ slot?: string | undefined | undefined;
55
45
  spellCheck?: (boolean | "true" | "false") | undefined;
56
46
  tabIndex?: number | undefined | undefined;
47
+ title?: string | undefined | undefined;
48
+ translate?: "yes" | "no" | undefined | undefined;
57
49
  radioGroup?: string | undefined | undefined;
58
50
  role?: import("react").AriaRole | undefined;
59
51
  about?: string | undefined | undefined;
52
+ content?: string | undefined | undefined;
60
53
  datatype?: string | undefined | undefined;
61
54
  inlist?: any;
62
55
  prefix?: string | undefined | undefined;
@@ -68,6 +61,7 @@ declare const meta: {
68
61
  vocab?: string | undefined | undefined;
69
62
  autoCorrect?: string | undefined | undefined;
70
63
  autoSave?: string | undefined | undefined;
64
+ color?: string | undefined | undefined;
71
65
  itemProp?: string | undefined | undefined;
72
66
  itemScope?: boolean | undefined | undefined;
73
67
  itemType?: string | undefined | undefined;
@@ -294,7 +288,13 @@ declare const meta: {
294
288
  onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLLIElement> | undefined;
295
289
  onTransitionEnd?: import("react").TransitionEventHandler<HTMLLIElement> | undefined;
296
290
  onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLLIElement> | undefined;
291
+ time?: import("react").ReactNode;
292
+ key?: import("react").Key | null | undefined;
293
+ name?: import("react").ReactNode;
294
+ value?: string | number | readonly string[] | undefined;
295
+ motion?: (typeof motion)[number] | undefined;
297
296
  media?: import("react").ReactNode;
297
+ side?: (typeof side)[number] | undefined;
298
298
  dateTime?: string | undefined;
299
299
  ref?: import("react").LegacyRef<HTMLLIElement> | undefined;
300
300
  }>) => import("react/jsx-runtime").JSX.Element)[];