@weing-dev/ui-kit-primitive 0.5.1 → 0.5.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.
@@ -53,6 +53,7 @@
53
53
  | 스크롤 위치로 현재 섹션 추적 | `ScrollSpy.useScrollSpy` | `/navigation` |
54
54
  | 모달(딤드) | `Modal` (앱에선 `useModal` 경유) | `/feedback` |
55
55
  | 팝업(트리거 옆 레이어) | `Popup` + `usePopup` | `/feedback` |
56
+ | 위치계산 팝오버(flip/shift·portal) | `FloatingAnchor` | `/feedback` |
56
57
  | 바텀/사이드 시트 | `Sheet` | `/feedback` |
57
58
  | 상태/카테고리 라벨 | `Label` | `/display` |
58
59
  | 필터/태그 칩 | `Chips` | `/display` |
@@ -62,6 +63,8 @@
62
63
  | 구분선 | `Divider` | `/display` |
63
64
  | 지연 로딩 이미지 | `LazyImage` | `/display` |
64
65
  | QR / 바코드 | `QRCode` / `BarCode` | `/display` |
66
+ | 칸반 / 드래그 보드 | `KanbanBoard` | `/display` |
67
+ | 하루 시간대 타임라인 | `Timeline` | `/display` |
65
68
  | 데이터 표 | `Table` (+ `@tanstack/react-table`) | `/table` |
66
69
  | 막대/선/원/도넛 차트 | `BarChart` `LineChart` `PieChart` `DoughnutChart` | `/chart` |
67
70
  | 날짜 선택(월/주) | `Calendar` | `/calendar` |
@@ -107,7 +110,15 @@ import "@weing-dev/ui-kit-primitive/video-player/style.css";
107
110
 
108
111
  #### Button — `Root / Text / Icon`
109
112
  - `variant: "contained" | "outlined" | "soft" | "text"`, `colorType: "primary" | "inherit" | "red"`, `shapeType: "square" | "round"`, `size: "small" | "medium" | "large"`
110
- - `isLoading`, `loadingText`, `disabled`, `isFitted`, `radius`(기본 8), `rounded`, `circle`, 표준 `button` 속성
113
+ - `isLoading`, `loadingText`, `disabled`, `isFitted`, `radius`(기본 8), `rounded`, `circle`, `textColor`, 표준 `button` 속성
114
+ - **앱 전용 색/형태는 `!important` 없이 override** — `Root`가 CSS변수를 노출하고 `style`은 후순위 머지된다. bg=`--default-color`, 보더=`--border-color`, 텍스트·아이콘=`--btn-text-color`(또는 `textColor` prop), radius=`radius` prop 또는 `--radius`. `Button.Text`/`Button.Icon`은 `--btn-text-color`를 상속하므로 자손 `& *{color}` 강제 불필요.
115
+ ```tsx
116
+ // soft 임의 톤 / 다크 솔리드 — 토큰 밖 색도 한 줄로
117
+ <Button.Root variant="soft" radius={30}
118
+ style={{ "--default-color": "#D6E8E9", "--btn-text-color": "#13949C" }}>
119
+ <Button.Text>조회</Button.Text>
120
+ </Button.Root>
121
+ ```
111
122
  ```tsx
112
123
  <Button.Root variant="contained" colorType="primary" size="medium" onClick={onClick}>
113
124
  <Button.Text>확인</Button.Text>
@@ -141,7 +152,7 @@ import "@weing-dev/ui-kit-primitive/video-player/style.css";
141
152
 
142
153
  #### Dropdown — `Root / Trigger / Menu / Item`
143
154
  - Root: `value: string | string[]`(배열=다중), `onChange`, `searchable`, `error`, `accentType: "in" | "out" | "all"`
144
- - Trigger: `variant: "outlined" | "contained" | "text"`, `size`, `leftIcon`, `rightIcon`
155
+ - Trigger: `variant: "outlined" | "contained" | "text"`, `size`, `leftIcon`, `rightIcon`, `accentColor`(도메인 강조 보더 — inactive/selected/focused 보더를 이 색으로 통일, error/disabled는 우선 유지)
145
156
  - Menu: `variant: "shadow" | "line"`
146
157
  ```tsx
147
158
  <Dropdown.Root value={value} onChange={setValue} placeholder="선택">
@@ -297,7 +308,8 @@ const { columns } = Cascader.useCascader({ options });
297
308
  ```
298
309
 
299
310
  #### Pagination — `Root / PageList / PageItem / Prev / Next`
300
- - Root: `total`(필수), `pageCount`(필수, 노출 버튼 수), `onClick({offset, limit})`(필수), `colorType: "primary" | "standard"`, `variant: "text" | "soft"`, `size: "medium" | "small"`, `limit`(기본 15), `offset`
311
+ - Root: `total`(필수), `pageCount`(필수, 노출 버튼 수), `onClick({offset, limit})`(필수), `colorType: "primary" | "standard"`, `variant: "text" | "soft"`, `size: "medium" | "small"`, `limit`(기본 15), `offset`, `style`
312
+ - **형태 override** — `Root` `style`로 CSS변수를 주면 하위 버튼에 상속된다: `--pagination-gap`(번호 간격), `--pagination-item-size`(버튼 치수), `--pagination-radius`(번호 radius). `Prev`/`Next`는 `data-nav="prev|next"`로 식별(소비처에서 `[data-nav]`로 nav만 타깃). 예: `<Pagination.Root style={{ "--pagination-gap":"2px", "--pagination-item-size":"36px" }}>`
301
313
  ```tsx
302
314
  <Pagination.Root total={120} pageCount={5} limit={15} offset={offset}
303
315
  colorType="primary" variant="soft" size="medium"
@@ -374,6 +386,16 @@ const popup = Popup.usePopup();
374
386
  </Sheet.Root>
375
387
  ```
376
388
 
389
+ #### FloatingAnchor — `Root / Trigger / Content`
390
+ - 트리거 기준으로 Content를 **자동 위치계산**해 portal로 띄움. Popup과 달리 `flip`(반대편 전환)·`shift`(뷰포트 안으로 보정)·`placement` 12종 내장. 스크롤/리사이즈 추적.
391
+ - Root: `placement`, `offset`, `flip`, `shift`, `open`/`defaultOpen`/`onOpenChange`(제어/비제어), `closeOnOutsideClick`, `closeOnEscape`. Trigger children은 **render-prop**.
392
+ ```tsx
393
+ <FloatingAnchor.Root placement="bottom-start" flip shift>
394
+ <FloatingAnchor.Trigger>{(p) => <button {...p}>열기</button>}</FloatingAnchor.Trigger>
395
+ <FloatingAnchor.Content>레이어 내용</FloatingAnchor.Content>
396
+ </FloatingAnchor.Root>
397
+ ```
398
+
377
399
  ### 4.4 Display (`/display`)
378
400
 
379
401
  #### Label — 단일
@@ -423,6 +445,26 @@ const popup = Popup.usePopup();
423
445
  <BarCode value="1234567" type="EAN8" /> // type: "EAN13"(12자리) | "EAN8"(7자리), ref.copy()/download()
424
446
  ```
425
447
 
448
+ #### KanbanBoard — 단일(제네릭 `<T>`)
449
+ - 컬럼 기반 드래그&드롭 보드(`@dnd-kit`). `setItemColumn`+`onItemsChange`를 **둘 다** 주면 DnD 활성, 없으면 정적 렌더. 카드/헤더는 render-prop으로 호출부가 결정.
450
+ - `columns`, `items`, `getItemId`, `getColumnId`, `renderCard(item, isSelected)`, `renderColumnHeader?`, `selectedId`/`onSelect`, `emptyText`
451
+ ```tsx
452
+ <KanbanBoard
453
+ columns={cols} items={deals}
454
+ getItemId={(d) => d.id} getColumnId={(d) => d.stage}
455
+ renderCard={(d) => <DealCard deal={d} />}
456
+ setItemColumn={(d, stage) => ({ ...d, stage })}
457
+ onItemsChange={setDeals}
458
+ />
459
+ ```
460
+
461
+ #### Timeline — 단일
462
+ - 하루(시간대) 세로 타임라인. 겹치는 이벤트는 자동 가로 컬럼 분할, 자정 넘는 이벤트는 두 조각으로 분리.
463
+ - `events: { id?, startHour:"HH:mm", endHour?, label, color? }[]`, `date`, `startHour`(기본 0)/`endHour`(기본 24). `color`는 토큰(`"blue"|"pink"|"green"|"orange"`) 또는 `{background,border}`
464
+ ```tsx
465
+ <Timeline date="2026-06-26" events={[{ startHour: "09:00", endHour: "10:30", label: "회의", color: "blue" }]} />
466
+ ```
467
+
426
468
  ### 4.5 Data / Heavy
427
469
 
428
470
  #### Table — `Root / Header / HeaderCell / Body / Row / Cell` (+ `useRowResize`) · `/table`
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@weing-dev/ui-kit-primitive",
3
3
  "private": false,
4
- "version": "0.5.1",
4
+ "version": "0.5.2",
5
5
  "type": "module",
6
6
  "sideEffects": [
7
7
  "**/*.css"