@nurihaus/web-design-system 3.19.0 → 3.21.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/dist/ai/components.md +75 -1
- package/dist/ai/motion.md +114 -89
- package/dist/ai/tokens.md +15 -0
- package/dist/bottom-nav.js +29 -4
- package/dist/chunk-8982.js +10 -1
- package/dist/components/bottom-nav/bottom-nav-type.d.ts +2 -0
- package/dist/components/bottom-nav/bottom-nav.stories.d.ts +2 -0
- package/dist/components/nudge/base-nudge.d.ts +4 -0
- package/dist/components/nudge/nudge-props.d.ts +4 -0
- package/dist/components/nudge/nudge-type.d.ts +36 -0
- package/dist/components/nudge/nudge.d.ts +5 -0
- package/dist/components/nudge/nudge.stories.d.ts +308 -0
- package/dist/components.css +271 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +336 -5
- package/dist/nudge.js +471 -0
- package/dist/styles.css +250 -0
- package/dist/tokens/generated/motion.d.ts +9 -0
- package/dist/tokens/generated/semantic-app.d.ts +2 -0
- package/dist/tokens.css +18 -0
- package/dist/tokens.js +12 -1
- package/package.json +5 -1
package/dist/ai/components.md
CHANGED
|
@@ -143,6 +143,7 @@ disabled 인 CTAButton · Checkbox · Radio · Switch 를 누르면 흔들려서
|
|
|
143
143
|
- [Border](#border)
|
|
144
144
|
- [TableRow](#tablerow)
|
|
145
145
|
- [Notice](#notice)
|
|
146
|
+
- [Nudge](#nudge)
|
|
146
147
|
- [EmptyState](#emptystate)
|
|
147
148
|
- [ResultScreen](#resultscreen)
|
|
148
149
|
- [Tag](#tag)
|
|
@@ -2740,6 +2741,8 @@ import { BottomNav } from '@nurihaus/web-design-system'; // 루트.
|
|
|
2740
2741
|
|
|
2741
2742
|
링크는 기본으로 `<a>` 다. 라우터의 링크로 바꾸려면 `linkComponent` 에 넘긴다. 받는 props 는 `href`·`className`·`children`·`aria-current`·`onClick` 이고, 그대로 링크에 전달하면 된다. `onClick` 을 빠뜨리면 `track` 로그가 나가지 않는다.
|
|
2742
2743
|
|
|
2744
|
+
`image` 에 사진 주소를 주면 아이콘 자리에 아이콘과 같은 크기(24px)의 원형 사진을 그린다(내 정보 탭의 프로필 사진 등). 옅은 테두리 링이 있고 지금 탭이면 진한 링이 된다. 주소가 없거나 사진을 못 불러오면 `icon` 을 그린다. 사진의 `alt` 는 빈 값이다 — 탭 이름은 `label` 이 읽는다.
|
|
2745
|
+
|
|
2743
2746
|
배지는 `badge` 로 단다. `count` 가 없으면 점, 있으면 숫자(99 넘으면 99+)다. `label` 은 화면 낭독기가 읽는 말이다.
|
|
2744
2747
|
|
|
2745
2748
|
- `pressEffect`: 탭을 누르는 동안 살짝 작아진다. 기본 `true`, `false` 면 끈다.
|
|
@@ -2788,7 +2791,7 @@ import Link from 'next/link';
|
|
|
2788
2791
|
{ id: 'home', label: '홈', icon: 'house', href: '/', badge: { label: '새 소식' } },
|
|
2789
2792
|
{ id: 'campaigns', label: '캠페인', icon: 'megaphone-simple', href: '/campaigns' },
|
|
2790
2793
|
{ id: 'community', label: '커뮤니티', icon: 'chats-circle', href: '/community' },
|
|
2791
|
-
{ id: 'me', label: '내 정보', icon: 'user-circle', href: '/me', badge: { count: 3, label: '알림 3개' } },
|
|
2794
|
+
{ id: 'me', label: '내 정보', icon: 'user-circle', image: '/me/photo.jpg', href: '/me', badge: { count: 3, label: '알림 3개' } },
|
|
2792
2795
|
]}
|
|
2793
2796
|
/>
|
|
2794
2797
|
```
|
|
@@ -4314,6 +4317,77 @@ import { Notice } from '@nurihaus/web-design-system'; // 루트. 첫
|
|
|
4314
4317
|
|
|
4315
4318
|
이 밖에 React·HTML 기본 속성 264개를 받는다.
|
|
4316
4319
|
|
|
4320
|
+
## Nudge
|
|
4321
|
+
|
|
4322
|
+
```ts
|
|
4323
|
+
import { Nudge } from '@nurihaus/web-design-system/nudge'; // 이 컴포넌트만 싣는다 (권장)
|
|
4324
|
+
import { Nudge } from '@nurihaus/web-design-system'; // 루트. 첫 로드 JS 가 커진다
|
|
4325
|
+
```
|
|
4326
|
+
|
|
4327
|
+
**언제 쓴다.** 화면 맨 위 한 줄(76px) 자리에서 할 일·정보 등록·알림 같은 짧은 알림을 차례로 돌려 보여 줄 때 쓴다. `items` 의 항목마다 44px 색 타일(`tile`: Icon·두 글자 이내 글·꽉 차는 `img`) · 제목 · 한 줄 설명 · 둥근 버튼(`action`: `{ label, href?, onClick? }`, `href` 가 있으면 링크)이 붙는다. `tone`(`danger`·`warning`·`brand`·`neutral` 기본)이 버튼 색과 기본 타일 색을 정하고, 타일 색만 다르게 하려면 `tileTone`(`success` 가 더 있다), 타일 모서리 숫자는 `tileBadge` 다. `interval`(ms, 기본 3000)마다 다음 항목으로 넘어가고 끝에서 처음으로 돈다. 손가락을 대고 있거나 마우스·포커스가 올라가면 멈춘다. 옆으로 밀거나 ←·→ 로 이전·다음 항목으로 넘긴다(닫기가 아니다). 움직임 줄이기 설정이면 넘기지 않고 첫 항목만 보인다. `onDismiss` 를 주면 항목 모서리에 × 가 붙고 누르면 항목 `id` 로 불린다. 쓰는 쪽이 그 항목을 `items` 에서 빼면 다음 항목이 그 자리에 오고, 마지막이면 영역이 0 으로 접힌 뒤 아무것도 그리지 않는다. 닫은 뒤 되돌리기 토스트(`useToast`)와 언제 다시 보일지는 쓰는 쪽이 정한다(되돌리면 항목을 다시 넣는다). `track` 을 주면 버튼은 `click`, × 는 `close` 를 항목 `id` 로 보낸다. `className`·`style` 은 루트(`section`)에 붙는다.
|
|
4328
|
+
|
|
4329
|
+
**쓰지 않는다.** 화면의 한 요소를 가리키는 첫 사용 안내는 Highlight(코치마크)를 쓴다. 카드·시트 안에 머무는 안내는 Notice, 행동 결과를 잠깐 알리는 것은 Toast 를 쓴다. 한 바퀴는 다섯 개 이하로 두고 같은 종류는 하나로 묶는다("알림 5개").
|
|
4330
|
+
|
|
4331
|
+
### 접근성
|
|
4332
|
+
|
|
4333
|
+
기본으로 단다.
|
|
4334
|
+
|
|
4335
|
+
| 요소 | 속성 | 값 |
|
|
4336
|
+
| --- | --- | --- |
|
|
4337
|
+
| `.nudge` | `data-state` | `open` · `closed` |
|
|
4338
|
+
| `.nudge-viewport` | `aria-live` | `off` · `polite` |
|
|
4339
|
+
| `.nudge-viewport` | 키보드 | ← · → → 이전·다음 항목. 포커스는 바뀐 항목의 버튼으로 간다 |
|
|
4340
|
+
| `role=group` | `aria-label` | (있음) |
|
|
4341
|
+
| `.nudge-tile` | `aria-hidden` | `true` |
|
|
4342
|
+
| `.nudge-dismiss` | `aria-label` | (있음) |
|
|
4343
|
+
|
|
4344
|
+
쓰는 쪽이 단다.
|
|
4345
|
+
|
|
4346
|
+
| 무엇 | 어디에 | 왜 |
|
|
4347
|
+
| --- | --- | --- |
|
|
4348
|
+
| `aria-label` | Nudge | 영역(`region`)의 이름. 없으면 이름 없는 `section` 이다 |
|
|
4349
|
+
|
|
4350
|
+
```tsx
|
|
4351
|
+
<Nudge
|
|
4352
|
+
aria-label="지금 확인할 것"
|
|
4353
|
+
items={[
|
|
4354
|
+
{
|
|
4355
|
+
id: 'revision',
|
|
4356
|
+
tone: 'danger',
|
|
4357
|
+
tile: <Icon name="warning" weight="fill" size="m" />,
|
|
4358
|
+
title: '영상 수정 요청이 왔어요',
|
|
4359
|
+
description: 'D-3 · 수정 기회 1번 남음',
|
|
4360
|
+
action: { label: '다시 제출', href: '/tasks/revision' },
|
|
4361
|
+
},
|
|
4362
|
+
{
|
|
4363
|
+
id: 'bank',
|
|
4364
|
+
tone: 'brand',
|
|
4365
|
+
tile: <Icon name="credit-card" weight="fill" size="m" />,
|
|
4366
|
+
title: '정산 받을 계좌가 없어요',
|
|
4367
|
+
action: { label: '등록', onClick: () => {} },
|
|
4368
|
+
},
|
|
4369
|
+
]}
|
|
4370
|
+
onDismiss={() => {}}
|
|
4371
|
+
/>
|
|
4372
|
+
```
|
|
4373
|
+
|
|
4374
|
+
**반응형.** 터치 타깃만 키움. 모서리 ×(22px)와 둥근 버튼(34px)의 누르는 자리를 44px 로 넓힌다. 폭은 부모를 따르고 글은 말줄임.
|
|
4375
|
+
|
|
4376
|
+
**모션.** cycle · press. 토큰 값과 규칙은 `motion.md`.
|
|
4377
|
+
|
|
4378
|
+
### props
|
|
4379
|
+
|
|
4380
|
+
| prop | 타입 | 필수 | 기본값 |
|
|
4381
|
+
| --- | --- | --- | --- |
|
|
4382
|
+
| `track` | `string` | | |
|
|
4383
|
+
| `trackProps` | `Record<string, string \| number \| boolean>` | | |
|
|
4384
|
+
| `items` | `NudgeItem[]` | 예 | |
|
|
4385
|
+
| `onDismiss` | `((id: string) => void)` | | |
|
|
4386
|
+
| `interval` | `number` | | `3000` |
|
|
4387
|
+
| `dismissLabel` | `string` | | `'닫기'` |
|
|
4388
|
+
|
|
4389
|
+
이 밖에 React·HTML 기본 속성 265개를 받는다.
|
|
4390
|
+
|
|
4317
4391
|
## EmptyState
|
|
4318
4392
|
|
|
4319
4393
|
```ts
|
package/dist/ai/motion.md
CHANGED
|
@@ -358,6 +358,28 @@
|
|
|
358
358
|
| `latch-offset` | `--motion-result-latch-offset` | `-6px` | `"-6px"` | -6px |
|
|
359
359
|
| `latch-angle` | `--motion-result-latch-angle` | `-28deg` | `"-28deg"` | -28deg |
|
|
360
360
|
|
|
361
|
+
### cycle
|
|
362
|
+
|
|
363
|
+
| 항목 | 내용 |
|
|
364
|
+
| --- | --- |
|
|
365
|
+
| 뜻 | 한 자리에서 항목이 차례로 바뀜 |
|
|
366
|
+
| 트리거 | 자동 넘김·옆으로 밀기·키보드로 다음 항목이 올 때(교체), 항목을 닫을 때(퇴장) |
|
|
367
|
+
| 붙는 곳 | 한 줄 높이 자리에서 여러 항목을 돌려 보여 주는 영역(Nudge). 나가는 항목은 투명해지며 위로 offset 만큼 오르고 흐려진다, 들어오는 항목은 scale-from 에서 커지며 또렷해진다. 닫으면 exit-duration 동안 같은 모양으로 나가고 영역 높이가 다음 항목 높이(마지막이면 0)로 접힌다 |
|
|
368
|
+
| 붙이지 않는 곳 | 화면 전환·목록 펼침(enter·unfold 를 쓴다), 사용자가 직접 넘기는 캐러셀 |
|
|
369
|
+
| 구현층 | `css` |
|
|
370
|
+
| prop | 없음 |
|
|
371
|
+
| reduced-motion | 바뀔 때 움직임 없이 바로 바뀐다. 자동 넘김은 컴포넌트가 끄고 첫 항목만 보인다 |
|
|
372
|
+
| 작업 | KAN-10360 |
|
|
373
|
+
|
|
374
|
+
| 키 | CSS 변수 | CSS 값 | JS `motionTokens['cycle']` | 풀린 값 |
|
|
375
|
+
| --- | --- | --- | --- | --- |
|
|
376
|
+
| `duration` | `--motion-cycle-duration` | `400ms` | `0.4` | 400ms |
|
|
377
|
+
| `ease` | `--motion-cycle-ease` | `var(--ease-decelerate)` | `[0.2,0.8,0.2,1]` | cubic-bezier(0.2, 0.8, 0.2, 1) |
|
|
378
|
+
| `exit-duration` | `--motion-cycle-exit-duration` | `300ms` | `0.3` | 300ms |
|
|
379
|
+
| `offset` | `--motion-cycle-offset` | `-6px` | `"-6px"` | -6px |
|
|
380
|
+
| `scale-from` | `--motion-cycle-scale-from` | `0.94` | `0.94` | 0.94 |
|
|
381
|
+
| `blur` | `--motion-cycle-blur` | `4px` | `"4px"` | 4px |
|
|
382
|
+
|
|
361
383
|
## 원시값
|
|
362
384
|
|
|
363
385
|
### duration
|
|
@@ -380,6 +402,7 @@
|
|
|
380
402
|
| `back` | `--ease-back` | `cubic-bezier(0.34, 1.56, 0.64, 1)` |
|
|
381
403
|
| `symmetric` | `--ease-symmetric` | `cubic-bezier(0.5, 0, 0.5, 1)` |
|
|
382
404
|
| `linear` | `--ease-linear` | `linear` |
|
|
405
|
+
| `decelerate` | `--ease-decelerate` | `cubic-bezier(0.2, 0.8, 0.2, 1)` |
|
|
383
406
|
|
|
384
407
|
### spring
|
|
385
408
|
|
|
@@ -400,95 +423,96 @@
|
|
|
400
423
|
|
|
401
424
|
컴포넌트마다 어느 토큰이 붙는지 정한 표다. `✓` 는 규칙에 걸려 붙고, `opt` 는 prop 을 줄 때만 붙는다. 컴포넌트에 실제로 붙이는 일은 표의 작업 키가 한다.
|
|
402
425
|
|
|
403
|
-
| 컴포넌트 | press | confirm | reject | enter | exit | appear | reveal | progress | indicate | flip | tilt | expand | unfold | dismiss-on-scroll | attention | busy | result |
|
|
404
|
-
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
|
405
|
-
| Asset | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
406
|
-
| Avatar | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
407
|
-
| CTAButton | ✓ scale | – | ✓ | – | – | opt | – | – | – | – | – | – | – | – | – | ✓ | – |
|
|
408
|
-
| OptionBadge | – | – | – | – | – | – | – | – | – | – | – | – | – | – | opt | – | – |
|
|
409
|
-
| IconTextBadge | – | – | – | – | – | – | – | – | – | – | – | – | – | – | opt | – | – |
|
|
410
|
-
| IconTextOptionBadge | – | – | – | – | – | – | – | – | – | – | – | – | – | – | opt | – | – |
|
|
411
|
-
| DataTable | ✓ dim | – | – | – | – | – | – | – | – | – | – | – | – | – | opt | – | – |
|
|
412
|
-
| TextField | opt scale | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
413
|
-
| Radio | ✓ scale | ✓ | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
414
|
-
| Checkbox | ✓ scale | ✓ | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
415
|
-
| Switch | ✓ scale | ✓ | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
416
|
-
| TextArea | opt scale | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
417
|
-
| Toast | – | – | – | ✓ | ✓ | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
418
|
-
| ToastProvider | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
419
|
-
| Pagination | ✓ scale | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
420
|
-
| Modal | – | – | opt | ✓ | ✓ | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
421
|
-
| Drawer | – | – | opt | ✓ | ✓ | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
422
|
-
| Skeleton | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | ✓ | – |
|
|
423
|
-
| SkeletonGroup | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | ✓ | – |
|
|
424
|
-
| Breadcrumb | ✓ scale | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
425
|
-
| DropDown | ✓ dim | – | – | – | – | – | – | – | – | – | – | ✓ | ✓ | – | – | – | – |
|
|
426
|
-
| CollapsibleMenu | ✓ dim | – | – | – | – | – | – | – | – | – | – | ✓ | ✓ | – | – | – | – |
|
|
427
|
-
| Text | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
428
|
-
| Tooltip | – | – | – | ✓ | ✓ | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
429
|
-
| TooltipProvider | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
430
|
-
| Tabs | ✓ dim | – | – | ✓ | – | – | – | – | ✓ | – | – | – | – | – | – | – | – |
|
|
431
|
-
| ModalWithDoubleButton | – | – | – | ✓ | ✓ | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
432
|
-
| Spinner | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | ✓ | – |
|
|
433
|
-
| InlineLoading | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | ✓ | – |
|
|
434
|
-
| OverlayLoading | – | – | – | ✓ | – | – | – | – | – | – | – | – | – | – | – | ✓ | – |
|
|
435
|
-
| ProgressBar | – | – | – | – | – | – | – | ✓ | – | – | – | – | – | – | – | ✓ | – |
|
|
436
|
-
| LoadingDots | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | ✓ | – |
|
|
437
|
-
| Icon | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
438
|
-
| BottomNav | ✓ scale | – | – | – | – | opt | – | – | – | – | – | – | – | opt | – | – | – |
|
|
439
|
-
| StepProgress | – | – | – | – | – | – | opt | ✓ | – | – | – | – | – | – | – | – | – |
|
|
440
|
-
| ChipGroup | ✓ scale | ✓ | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
441
|
-
| SegmentedControl | ✓ dim | – | – | – | – | – | – | – | ✓ | – | – | – | – | – | – | – | – |
|
|
442
|
-
| Slider | ✓ scale | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
443
|
-
| Rating | ✓ scale | ✓ | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
444
|
-
| NumericSpinner | ✓ scale | – | ✓ | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
445
|
-
| LogProvider | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
446
|
-
| MotionProvider | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
447
|
-
| Callout | – | – | – | ✓ | – | – | – | – | – | – | – | – | – | – | ✓ | – | – |
|
|
448
|
-
| Card | ✓ scale | – | – | – | – | – | – | – | – | – | – | – | – | – | opt | – | – |
|
|
449
|
-
| MemberCard | ✓ scale | – | – | – | – | – | – | – | – | ✓ | opt | – | – | – | opt | – | – |
|
|
450
|
-
| TierLadder | ✓ dim | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
451
|
-
| ListGroup | – | – | – | – | – | – | opt | – | – | – | – | – | – | – | – | – | – |
|
|
452
|
-
| ListRow | ✓ dim | – | – | – | – | – | – | – | – | – | – | – | – | – | opt | – | – |
|
|
453
|
-
| ListHeader | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
454
|
-
| Stat | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
455
|
-
| PlatformBadge | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
456
|
-
| SectionHeader | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
457
|
-
| ListFooter | ✓ dim | – | – | – | – | – | – | – | – | – | – | – | – | – | – | ✓ | – |
|
|
458
|
-
| TableRow | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
459
|
-
| Border | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
460
|
-
| BoardRow | ✓ dim | – | – | – | – | – | – | – | – | – | – | ✓ | – | – | – | – | – |
|
|
461
|
-
| GridList | ✓ scale | – | – | – | – | – | opt | – | – | – | – | – | – | – | – | – | – |
|
|
462
|
-
| DescriptionList | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
463
|
-
| Notice | – | – | – | opt | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
464
|
-
|
|
|
465
|
-
|
|
|
466
|
-
|
|
|
467
|
-
|
|
|
468
|
-
|
|
|
469
|
-
|
|
|
470
|
-
|
|
|
471
|
-
|
|
|
472
|
-
|
|
|
473
|
-
|
|
|
474
|
-
|
|
|
475
|
-
|
|
|
476
|
-
|
|
|
477
|
-
|
|
|
478
|
-
|
|
|
479
|
-
|
|
|
480
|
-
|
|
|
481
|
-
|
|
|
482
|
-
|
|
|
483
|
-
|
|
|
484
|
-
|
|
|
485
|
-
|
|
|
486
|
-
|
|
|
487
|
-
|
|
|
488
|
-
|
|
|
489
|
-
|
|
|
490
|
-
|
|
|
491
|
-
|
|
|
426
|
+
| 컴포넌트 | press | confirm | reject | enter | exit | appear | reveal | progress | indicate | flip | tilt | expand | unfold | dismiss-on-scroll | attention | busy | result | cycle |
|
|
427
|
+
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
|
428
|
+
| Asset | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
429
|
+
| Avatar | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
430
|
+
| CTAButton | ✓ scale | – | ✓ | – | – | opt | – | – | – | – | – | – | – | – | – | ✓ | – | – |
|
|
431
|
+
| OptionBadge | – | – | – | – | – | – | – | – | – | – | – | – | – | – | opt | – | – | – |
|
|
432
|
+
| IconTextBadge | – | – | – | – | – | – | – | – | – | – | – | – | – | – | opt | – | – | – |
|
|
433
|
+
| IconTextOptionBadge | – | – | – | – | – | – | – | – | – | – | – | – | – | – | opt | – | – | – |
|
|
434
|
+
| DataTable | ✓ dim | – | – | – | – | – | – | – | – | – | – | – | – | – | opt | – | – | – |
|
|
435
|
+
| TextField | opt scale | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
436
|
+
| Radio | ✓ scale | ✓ | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
437
|
+
| Checkbox | ✓ scale | ✓ | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
438
|
+
| Switch | ✓ scale | ✓ | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
439
|
+
| TextArea | opt scale | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
440
|
+
| Toast | – | – | – | ✓ | ✓ | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
441
|
+
| ToastProvider | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
442
|
+
| Pagination | ✓ scale | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
443
|
+
| Modal | – | – | opt | ✓ | ✓ | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
444
|
+
| Drawer | – | – | opt | ✓ | ✓ | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
445
|
+
| Skeleton | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | ✓ | – | – |
|
|
446
|
+
| SkeletonGroup | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | ✓ | – | – |
|
|
447
|
+
| Breadcrumb | ✓ scale | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
448
|
+
| DropDown | ✓ dim | – | – | – | – | – | – | – | – | – | – | ✓ | ✓ | – | – | – | – | – |
|
|
449
|
+
| CollapsibleMenu | ✓ dim | – | – | – | – | – | – | – | – | – | – | ✓ | ✓ | – | – | – | – | – |
|
|
450
|
+
| Text | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
451
|
+
| Tooltip | – | – | – | ✓ | ✓ | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
452
|
+
| TooltipProvider | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
453
|
+
| Tabs | ✓ dim | – | – | ✓ | – | – | – | – | ✓ | – | – | – | – | – | – | – | – | – |
|
|
454
|
+
| ModalWithDoubleButton | – | – | – | ✓ | ✓ | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
455
|
+
| Spinner | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | ✓ | – | – |
|
|
456
|
+
| InlineLoading | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | ✓ | – | – |
|
|
457
|
+
| OverlayLoading | – | – | – | ✓ | – | – | – | – | – | – | – | – | – | – | – | ✓ | – | – |
|
|
458
|
+
| ProgressBar | – | – | – | – | – | – | – | ✓ | – | – | – | – | – | – | – | ✓ | – | – |
|
|
459
|
+
| LoadingDots | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | ✓ | – | – |
|
|
460
|
+
| Icon | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
461
|
+
| BottomNav | ✓ scale | – | – | – | – | opt | – | – | – | – | – | – | – | opt | – | – | – | – |
|
|
462
|
+
| StepProgress | – | – | – | – | – | – | opt | ✓ | – | – | – | – | – | – | – | – | – | – |
|
|
463
|
+
| ChipGroup | ✓ scale | ✓ | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
464
|
+
| SegmentedControl | ✓ dim | – | – | – | – | – | – | – | ✓ | – | – | – | – | – | – | – | – | – |
|
|
465
|
+
| Slider | ✓ scale | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
466
|
+
| Rating | ✓ scale | ✓ | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
467
|
+
| NumericSpinner | ✓ scale | – | ✓ | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
468
|
+
| LogProvider | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
469
|
+
| MotionProvider | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
470
|
+
| Callout | – | – | – | ✓ | – | – | – | – | – | – | – | – | – | – | ✓ | – | – | – |
|
|
471
|
+
| Card | ✓ scale | – | – | – | – | – | – | – | – | – | – | – | – | – | opt | – | – | – |
|
|
472
|
+
| MemberCard | ✓ scale | – | – | – | – | – | – | – | – | ✓ | opt | – | – | – | opt | – | – | – |
|
|
473
|
+
| TierLadder | ✓ dim | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
474
|
+
| ListGroup | – | – | – | – | – | – | opt | – | – | – | – | – | – | – | – | – | – | – |
|
|
475
|
+
| ListRow | ✓ dim | – | – | – | – | – | – | – | – | – | – | – | – | – | opt | – | – | – |
|
|
476
|
+
| ListHeader | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
477
|
+
| Stat | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
478
|
+
| PlatformBadge | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
479
|
+
| SectionHeader | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
480
|
+
| ListFooter | ✓ dim | – | – | – | – | – | – | – | – | – | – | – | – | – | – | ✓ | – | – |
|
|
481
|
+
| TableRow | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
482
|
+
| Border | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
483
|
+
| BoardRow | ✓ dim | – | – | – | – | – | – | – | – | – | – | ✓ | – | – | – | – | – | – |
|
|
484
|
+
| GridList | ✓ scale | – | – | – | – | – | opt | – | – | – | – | – | – | – | – | – | – | – |
|
|
485
|
+
| DescriptionList | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
486
|
+
| Notice | – | – | – | opt | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
487
|
+
| Nudge | ✓ scale | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | ✓ |
|
|
488
|
+
| EmptyState | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
489
|
+
| ResultScreen | – | – | – | – | – | ✓ | – | – | – | – | – | – | – | – | – | – | ✓ | – |
|
|
490
|
+
| Tag | ✓ scale | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
491
|
+
| MessageThread | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
492
|
+
| Message | – | – | – | opt | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
493
|
+
| MessageEvent | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
494
|
+
| MessageComposer | ✓ scale | – | ✓ | – | – | – | – | – | – | – | – | – | – | – | – | ✓ | – | – |
|
|
495
|
+
| BottomBar | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
496
|
+
| BottomCTA | – | – | – | – | – | opt | – | – | – | – | – | – | – | opt | – | – | – | – |
|
|
497
|
+
| Top | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
498
|
+
| MediaThumbnail | ✓ scale | – | – | – | – | – | – | – | – | – | – | – | – | – | – | ✓ | – | – |
|
|
499
|
+
| MediaViewer | – | – | – | ✓ | ✓ | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
500
|
+
| IconButton | ✓ scale | – | – | – | – | – | – | – | – | – | – | – | – | – | – | ✓ | – | – |
|
|
501
|
+
| TextButton | ✓ dim | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
502
|
+
| OverlayProvider | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
503
|
+
| Paragraph | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
504
|
+
| Post | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
505
|
+
| BottomInfo | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
506
|
+
| BarChart | – | – | – | – | – | – | opt | ✓ | – | – | – | – | – | – | – | – | – | – |
|
|
507
|
+
| Agreement | ✓ dim | ✓ | – | – | – | – | – | – | – | – | – | ✓ | – | – | – | – | – | – |
|
|
508
|
+
| SearchField | opt scale | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
509
|
+
| SplitTextField | opt scale | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
510
|
+
| NumberKeypad | ✓ scale | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
511
|
+
| AlphabetKeypad | ✓ scale | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
512
|
+
| FullSecureKeypad | ✓ scale | – | – | – | – | – | opt | – | – | – | – | – | – | – | – | – | – | – |
|
|
513
|
+
| BottomSheet | ✓ scale | – | opt | ✓ | ✓ | – | – | – | ✓ | – | – | – | – | – | – | – | – | – |
|
|
514
|
+
| Menu | ✓ dim | – | – | – | ✓ | – | – | – | – | – | – | – | ✓ | – | – | – | – | – |
|
|
515
|
+
| Highlight | – | – | – | ✓ | ✓ | opt | – | – | – | – | – | – | – | – | – | – | – | – |
|
|
492
516
|
|
|
493
517
|
### 판단 근거
|
|
494
518
|
|
|
@@ -551,6 +575,7 @@
|
|
|
551
575
|
- **GridList** press[scale]: 격자 칸은 테두리가 닫힌 독립 물체라 눌리는 동안 살짝 작아진다(--motion-press-scale) (KAN-9556) · reveal(opt): stagger prop 을 줄 때만 칸이 차례로 나타난다 (KAN-9556)
|
|
552
576
|
- **DescriptionList** 없음. 이름–값 글자만 그린다. 누르는 표면이 아니다
|
|
553
577
|
- **Notice** enter(opt): 조건부로 나타나는 인라인 안내. motion prop 을 줄 때만 fade 로 들어온다. 나갈 때 모션은 presence 가 필요해 두지 않는다 (KAN-9451)
|
|
578
|
+
- **Nudge** cycle: 한 줄 자리에서 항목이 interval 마다 바뀐다. 나가는 항목은 위로 오르며 흐려지고 들어오는 항목은 커지며 또렷해진다. 닫으면 exit-duration 으로 나가고 비면 높이가 0 으로 접힌다 (KAN-10360) · press[scale]: 항목의 둥근 버튼은 onClick 표면이다 (KAN-10360)
|
|
554
579
|
- **EmptyState** 없음. 누를 곳이 없는 표시용 화면이다. 버튼은 쓰는 쪽이 넘긴 CTAButton 이 press 를 받는다
|
|
555
580
|
- **ResultScreen** result: 결과 화면 첫 렌더에 그림 타일 → 그림 안 표시 → 제목 → 설명 차례로 나타난다. farewell 의 눈은 간격마다 깜빡이고 failure 타일은 한 번 흔들린다 (KAN-10249) · appear: 주 버튼 바(BottomCTA appear slide)가 result action-delay 뒤 마지막에 나타난다 (KAN-10249)
|
|
556
581
|
- **Tag** press[scale]: 지우기 버튼(X)은 onClick 표면이다 (KAN-9451)
|
package/dist/ai/tokens.md
CHANGED
|
@@ -149,6 +149,8 @@
|
|
|
149
149
|
| `--surface-danger-subtle` | `var(--color-accent-red-50)` | — | `var(--color-accent-red-900)` |
|
|
150
150
|
| `--surface-success-subtle` | `var(--color-accent-green-50)` | — | `var(--color-accent-green-900)` |
|
|
151
151
|
| `--surface-warning-subtle` | `var(--color-accent-orange-50)` | — | `var(--color-accent-orange-900)` |
|
|
152
|
+
| `--surface-warning` | `var(--color-accent-orange-700)` | — | — |
|
|
153
|
+
| `--surface-success` | `var(--color-accent-green-800)` | — | — |
|
|
152
154
|
| `--surface-member-card` | `var(--color-black)` | — | — |
|
|
153
155
|
| `--surface-aurora-grey` | `var(--color-grey-scale-400)` | — | — |
|
|
154
156
|
| `--surface-aurora-grey-light` | `var(--color-grey-scale-300)` | — | — |
|
|
@@ -525,6 +527,12 @@
|
|
|
525
527
|
| `--sheet-max-height` | `92dvh` | 아래 시트(BottomSheet·Drawer bottom 의 fit-content·fit-screen): 손잡이 크기와 가장 큰 높이. 위 8% 는 시트 뒤 화면이 보이게 남긴다 |
|
|
526
528
|
| `--menu-min-width` | `180px` | 행동 메뉴(Menu) 목록의 가장 좁은 폭 |
|
|
527
529
|
| `--highlight-message-max-width` | `280px` | 코치마크(Highlight) 메시지 상자의 가장 넓은 폭 |
|
|
530
|
+
| `--nudge-height` | `76px` | 돌아가는 알림 줄(Nudge): 한 줄 높이, 44 타일, 둥근 버튼, 모서리에 걸친 작은 × |
|
|
531
|
+
| `--nudge-tile-size` | `var(--control-height-m)` | 돌아가는 알림 줄(Nudge): 한 줄 높이, 44 타일, 둥근 버튼, 모서리에 걸친 작은 × |
|
|
532
|
+
| `--nudge-action-height` | `34px` | 돌아가는 알림 줄(Nudge): 한 줄 높이, 44 타일, 둥근 버튼, 모서리에 걸친 작은 × |
|
|
533
|
+
| `--nudge-dismiss-size` | `22px` | 돌아가는 알림 줄(Nudge): 한 줄 높이, 44 타일, 둥근 버튼, 모서리에 걸친 작은 × |
|
|
534
|
+
| `--nudge-dismiss-ring` | `2px` | 돌아가는 알림 줄(Nudge): 한 줄 높이, 44 타일, 둥근 버튼, 모서리에 걸친 작은 × |
|
|
535
|
+
| `--nudge-badge-size` | `18px` | 돌아가는 알림 줄(Nudge): 한 줄 높이, 44 타일, 둥근 버튼, 모서리에 걸친 작은 × |
|
|
528
536
|
| `--layout-max-width` | `480px` | 한 기둥 화면(모바일 화면을 넓은 화면 가운데에 세운 것)의 가장 넓은 폭. 하단 탭 바도 이 폭 안에 선다 (ADR 0019) |
|
|
529
537
|
| `--bottom-nav-height` | `62px` | 한 기둥 화면(모바일 화면을 넓은 화면 가운데에 세운 것)의 가장 넓은 폭. 하단 탭 바도 이 폭 안에 선다 (ADR 0019) |
|
|
530
538
|
| `--bottom-nav-padding` | `5px` | 한 기둥 화면(모바일 화면을 넓은 화면 가운데에 세운 것)의 가장 넓은 폭. 하단 탭 바도 이 폭 안에 선다 (ADR 0019) |
|
|
@@ -655,6 +663,7 @@
|
|
|
655
663
|
| `--ease-back` | `cubic-bezier(0.34, 1.56, 0.64, 1)` |
|
|
656
664
|
| `--ease-symmetric` | `cubic-bezier(0.5, 0, 0.5, 1)` |
|
|
657
665
|
| `--ease-linear` | `linear` |
|
|
666
|
+
| `--ease-decelerate` | `cubic-bezier(0.2, 0.8, 0.2, 1)` |
|
|
658
667
|
| `--ease-spring-rapid` | `linear(0, 0.0273, 0.0945, 0.184, 0.2834, 0.384, 0.4804, 0.5691, 0.6483, 0.7174, 0.7764, 0.8259, 0.8667, 0.8999, 0.9264, 0.9473, 0.9634, 0.9757, 0.9849, 0.9916, 0.9964, 0.9996, 1.0017, 1.003, 1.0037, 1.0039, 1.0039, 1.0037, 1.0033, 1.003, 1.0026, 1.0022, 1.0018, 1.0015, 1.0012, 1.001, 1.0007, 1.0006, 1.0004, 1.0003, 1)` |
|
|
659
668
|
| `--duration-spring-rapid` | `318ms` |
|
|
660
669
|
| `--ease-spring-quick` | `linear(0, 0.024, 0.0825, 0.1604, 0.247, 0.3352, 0.4205, 0.5002, 0.5728, 0.6377, 0.6948, 0.7445, 0.7872, 0.8237, 0.8546, 0.8806, 0.9023, 0.9204, 0.9354, 0.9477, 0.9578, 0.9661, 0.9728, 0.9783, 0.9827, 0.9863, 0.9891, 0.9914, 0.9933, 0.9947, 0.9959, 0.9968, 0.9975, 0.9981, 0.9985, 0.9989, 0.9991, 0.9993, 0.9995, 0.9996, 1)` |
|
|
@@ -746,3 +755,9 @@
|
|
|
746
755
|
| `--motion-result-pop-scale` | `0.4` |
|
|
747
756
|
| `--motion-result-latch-offset` | `-6px` |
|
|
748
757
|
| `--motion-result-latch-angle` | `-28deg` |
|
|
758
|
+
| `--motion-cycle-duration` | `400ms` |
|
|
759
|
+
| `--motion-cycle-ease` | `var(--ease-decelerate)` |
|
|
760
|
+
| `--motion-cycle-exit-duration` | `300ms` |
|
|
761
|
+
| `--motion-cycle-offset` | `-6px` |
|
|
762
|
+
| `--motion-cycle-scale-from` | `0.94` |
|
|
763
|
+
| `--motion-cycle-blur` | `4px` |
|
package/dist/bottom-nav.js
CHANGED
|
@@ -28,7 +28,7 @@ var classNames = __nuri_require__(3274);
|
|
|
28
28
|
// EXTERNAL MODULE: ./helpers/utils/getMergedProps.ts
|
|
29
29
|
var getMergedProps = __nuri_require__(7335);
|
|
30
30
|
// EXTERNAL MODULE: ./components/icon/icon.tsx
|
|
31
|
-
var
|
|
31
|
+
var icon_icon = __nuri_require__(3547);
|
|
32
32
|
// EXTERNAL MODULE: external {"root":"RadixUI","commonjs2":"radix-ui","commonjs":"radix-ui","amd":"radix-ui","module":"radix-ui"}
|
|
33
33
|
var external_root_RadixUI_commonjs2_radix_ui_commonjs_radix_ui_amd_radix_ui_module_radix_ui_ = __nuri_require__(0);
|
|
34
34
|
;// ./components/bottom-nav/base-bottom-nav.tsx
|
|
@@ -119,6 +119,30 @@ var Anchor = function Anchor(props) {
|
|
|
119
119
|
return (0,jsx_runtime_.jsx)("a", bottom_nav_assign({}, props));
|
|
120
120
|
};
|
|
121
121
|
Anchor.displayName = 'BottomNavAnchor';
|
|
122
|
+
// 사진이 있으면 사진, 없거나 못 불러오면 아이콘. 실패한 주소를 기억해 주소가 바뀌면 다시 시도한다
|
|
123
|
+
var ItemGlyph = function ItemGlyph(_a) {
|
|
124
|
+
var icon = _a.icon,
|
|
125
|
+
image = _a.image,
|
|
126
|
+
isActive = _a.isActive;
|
|
127
|
+
var _b = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useState)(),
|
|
128
|
+
failedImage = _b[0],
|
|
129
|
+
setFailedImage = _b[1];
|
|
130
|
+
if (image && image !== failedImage) {
|
|
131
|
+
// 이름은 탭 라벨이 읽는다
|
|
132
|
+
return (0,jsx_runtime_.jsx)("img", {
|
|
133
|
+
className: 'bottom-nav-image',
|
|
134
|
+
src: image,
|
|
135
|
+
alt: '',
|
|
136
|
+
onError: function onError() {
|
|
137
|
+
return setFailedImage(image);
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
return (0,jsx_runtime_.jsx)(icon_icon/* default */.A, {
|
|
142
|
+
name: icon,
|
|
143
|
+
weight: isActive ? 'fill' : 'regular'
|
|
144
|
+
});
|
|
145
|
+
};
|
|
122
146
|
var BottomNav = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
123
147
|
var _a = (0,getMergedProps/* getMergedProps */.p)(props, bottomNavProps),
|
|
124
148
|
className = _a.className,
|
|
@@ -171,9 +195,10 @@ var BottomNav = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_rea
|
|
|
171
195
|
children: item.label
|
|
172
196
|
}), (0,jsx_runtime_.jsxs)("span", {
|
|
173
197
|
className: 'bottom-nav-icon',
|
|
174
|
-
children: [(0,jsx_runtime_.jsx)(
|
|
175
|
-
|
|
176
|
-
|
|
198
|
+
children: [(0,jsx_runtime_.jsx)(ItemGlyph, {
|
|
199
|
+
icon: item.icon,
|
|
200
|
+
image: item.image,
|
|
201
|
+
isActive: isActive
|
|
177
202
|
}), item.badge && (0,jsx_runtime_.jsx)(base_bottom_nav.Badge, {
|
|
178
203
|
className: 'bottom-nav-badge',
|
|
179
204
|
count: item.badge.count,
|
package/dist/chunk-8982.js
CHANGED
|
@@ -26,7 +26,8 @@ var motionPresets = {
|
|
|
26
26
|
"in-out": [0.4, 0, 0.1, 1],
|
|
27
27
|
"back": [0.34, 1.56, 0.64, 1],
|
|
28
28
|
"symmetric": [0.5, 0, 0.5, 1],
|
|
29
|
-
"linear": "linear"
|
|
29
|
+
"linear": "linear",
|
|
30
|
+
"decelerate": [0.2, 0.8, 0.2, 1]
|
|
30
31
|
},
|
|
31
32
|
"spring": {
|
|
32
33
|
"rapid": {
|
|
@@ -217,6 +218,14 @@ var motionTokens = {
|
|
|
217
218
|
"pop-scale": 0.4,
|
|
218
219
|
"latch-offset": "-6px",
|
|
219
220
|
"latch-angle": "-28deg"
|
|
221
|
+
},
|
|
222
|
+
"cycle": {
|
|
223
|
+
"duration": 0.4,
|
|
224
|
+
"ease": [0.2, 0.8, 0.2, 1],
|
|
225
|
+
"exit-duration": 0.3,
|
|
226
|
+
"offset": "-6px",
|
|
227
|
+
"scale-from": 0.94,
|
|
228
|
+
"blur": "4px"
|
|
220
229
|
}
|
|
221
230
|
};
|
|
222
231
|
|
|
@@ -60,6 +60,8 @@ export default meta;
|
|
|
60
60
|
type Story = StoryObj<typeof meta>;
|
|
61
61
|
/** 화면 아래에 떠 있는 하단 내비게이션이다. 현재 탭 표시와 홈·내 정보 탭에 붙은 배지를 본다. 넓은 화면에서는 480px 기둥 안 가운데에 선다. */
|
|
62
62
|
export declare const Default: Story;
|
|
63
|
+
/** 내 정보 탭에 프로필 사진을 넣었다. 지금 탭이면 진한 링, 아니면 옅은 링이다. 주소를 못 불러오면 아이콘으로 돌아간다 */
|
|
64
|
+
export declare const WithImage: Story;
|
|
63
65
|
/** 탭을 누르고 있으면 살짝 작아진다. 탭을 바꾸면 글자색과 아이콘 채움만 바뀐다 */
|
|
64
66
|
export declare const MotionPress: Story;
|
|
65
67
|
/** pressEffect 를 끈 하단 내비게이션이다. 탭을 눌러 눌림 효과가 없는지 Default 와 비교한다. */
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const BaseNudge: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
2
|
+
ref?: ((instance: HTMLElement | 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<HTMLElement> | null | undefined;
|
|
3
|
+
}, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
4
|
+
export default BaseNudge;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** 항목의 급한 정도. 버튼 색과(tileTone 이 없으면) 타일 색을 정한다 */
|
|
2
|
+
export declare const tone: readonly ["danger", "warning", "brand", "neutral"];
|
|
3
|
+
/** 타일 바탕색. tone 에 없는 success(입금·완료) 가 더 있다 */
|
|
4
|
+
export declare const tileTone: readonly ["danger", "warning", "brand", "success", "neutral"];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
+
import { TrackProps } from '../logging/logging-type';
|
|
3
|
+
import { tileTone, tone } from './nudge-props';
|
|
4
|
+
export type BaseNudgeProps = ComponentPropsWithRef<'section'>;
|
|
5
|
+
export interface NudgeAction {
|
|
6
|
+
label: string;
|
|
7
|
+
/** href 를 주면 링크(`a`), 없으면 버튼이다 */
|
|
8
|
+
href?: string;
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export interface NudgeItem {
|
|
12
|
+
/** 넘기기·닫기·로그 value 가 쓰는 개발자 id */
|
|
13
|
+
id: string;
|
|
14
|
+
/** 급한 정도. 버튼 색과 기본 타일 색. 기본 neutral(회색 버튼) */
|
|
15
|
+
tone?: (typeof tone)[number];
|
|
16
|
+
/** 44px 색 타일 안. Icon, 두 글자 이내 글, 또는 꽉 차는 img */
|
|
17
|
+
tile: ReactNode;
|
|
18
|
+
/** 타일 바탕색. 주지 않으면 tone 을 따른다 */
|
|
19
|
+
tileTone?: (typeof tileTone)[number];
|
|
20
|
+
/** 타일 오른쪽 위 작은 숫자(안 읽은 수) */
|
|
21
|
+
tileBadge?: ReactNode;
|
|
22
|
+
title: ReactNode;
|
|
23
|
+
/** 제목 아래 한 줄 */
|
|
24
|
+
description?: ReactNode;
|
|
25
|
+
action: NudgeAction;
|
|
26
|
+
}
|
|
27
|
+
export interface NudgeProps extends Omit<ComponentPropsWithRef<'section'>, 'children'>, TrackProps {
|
|
28
|
+
/** 돌려 보여 줄 항목. 순서대로 돈다. 비면 영역이 접히고 아무것도 그리지 않는다 */
|
|
29
|
+
items: NudgeItem[];
|
|
30
|
+
/** 주면 항목마다 모서리에 × 가 붙는다. 항목을 빼는 것과 되돌리기 토스트는 쓰는 쪽이 한다 */
|
|
31
|
+
onDismiss?: (id: string) => void;
|
|
32
|
+
/** 한 항목을 보여 주는 시간(ms). 기본 3000 */
|
|
33
|
+
interval?: number;
|
|
34
|
+
/** × 의 접근성 이름. 기본 '닫기' */
|
|
35
|
+
dismissLabel?: string;
|
|
36
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { NudgeProps } from './nudge-type';
|
|
2
|
+
/** 한 줄 높이 자리에서 항목을 차례로 돌려 보여 준다. 손을 대거나 포커스·호버 중에는 멈춘다 */
|
|
3
|
+
declare const Nudge: import("react").ForwardRefExoticComponent<Omit<NudgeProps, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
4
|
+
export default Nudge;
|
|
5
|
+
export type { NudgeAction, NudgeItem, NudgeProps } from './nudge-type';
|