@nurihaus/web-design-system 3.25.0 → 3.26.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 +6 -4
- package/dist/ai/motion.md +1 -1
- package/dist/components/member-card/member-card.stories.d.ts +2 -2
- package/dist/components.css +53 -4
- package/dist/index.js +36 -25
- package/dist/member-card.js +36 -25
- package/dist/styles.css +45 -4
- package/package.json +1 -1
package/dist/ai/components.md
CHANGED
|
@@ -3556,10 +3556,10 @@ import { MemberCard } from '@nurihaus/web-design-system'; // 루트.
|
|
|
3556
3556
|
- 뒤집기는 `--motion-flip-spring-*` 스프링(`spring.basic`, 약 760ms — 90° 언저리가 서두르지 않아 옆면이 보인다)으로 돌고, 떠오름은 `--motion-flip-lift`(높이)·`--motion-flip-lift-ease` 로 같은 시간 동안 오르내린다. 동작 줄이기면 돌지도 떠오르지도 않고 바로 바뀐다.
|
|
3557
3557
|
- `depth`(기본 `false`): 누른 채 움직이는 손가락을 따라 기울고(마우스는 올려만 놔도 조금), 손가락 반대편 반사광·등급 오로라의 무지갯빛 결·두께가 함께 움직인다. 카드 밑에 번지는 바닥 빛은 없다 — 흰 바탕에서 카드 둘레가 뿌옇게 보여서 뺐다. 놓으면 `--motion-tilt-spring-*` 스프링으로 평평하게 돌아온다. 세로로 미는 손가락은 스크롤이고 가로로 움직일 때 기운다. 기울이다 놓으면 뒤집지 않는다. 쉬는 동안은 평평해서 글자가 선명하다. 한 화면에 한 장으로 떠 있는 카드(마이페이지)에만 쓴다. 동작 줄이기면 기울지 않는다.
|
|
3558
3558
|
- `effectRef`: `effectRef.current.shine()` 을 부르면 보이는 면에 빛이 한 번 지나간다. 저절로 재생하지 않는다. 가입 완료처럼 보여 줄 순간에 쓰는 쪽이 부른다.
|
|
3559
|
-
- `expandable`(기본 `false`): 마이페이지처럼 흰 바탕에 카드 한 장을 놓아 둘 때 쓴다. 카드가 뒤로 눕혀 놓인 물체처럼 쉰다 — 뒤로 젖히고(X 38°) 살짝 돌린(Z -9°) 자세에, 아래로 보이는 두께, 바닥 그림자, 위에서 내려오는 빛. 쉬는 카드는 뒤집지도 기울지도 않는
|
|
3559
|
+
- `expandable`(기본 `false`): 마이페이지처럼 흰 바탕에 카드 한 장을 놓아 둘 때 쓴다. 카드가 뒤로 눕혀 놓인 물체처럼 쉰다 — 뒤로 젖히고(X 38°) 살짝 돌린(Z -9°) 자세에, 아래로 보이는 두께, 바닥 그림자, 위에서 내려오는 빛. 쉬는 카드는 눌러도 뒤집지도 기울지도 않는 버튼이다(누르면 펼친다). 쉬는 카드 아래 오른쪽(루트 상자 안, 카드가 비켜 간 자리)에 둥근 뒤집기 버튼이 있어 펼치지 않고 그 자리에서 눕힌 자세 그대로 뒤집는다 — 바닥에서 들렸다 내려앉으며 옆면 두께·면 위 빛이 보인다. 이 버튼 자리만큼 아래로 24 가 늘어난다. 누르면 어두운 바탕(85%) 위 화면 가운데로 일어서며 커지고, 거기서는 평평한 카드가 `depth`·뒤집기로 움직인다. 펼친 카드 오른쪽 아래에 둥근 뒤집기 버튼이 있어 카드를 누르지 않고도 뒤집는다(카드를 눌러도 뒤집힌다). 펼친 동안 쉬는 카드와 그 뒤집기 버튼은 집어 든 것처럼 자리를 비운다. 바탕·닫기 버튼·Esc·뒤로 가기로 닫으면 제자리로 다시 눕는다. 커지고 눕는 모션은 브라우저의 View Transitions 로 두 카드를 잇고, 지원하지 않거나 동작 줄이기면 바탕은 fade, 상자는 scale 로 들어오고 나간다. 보이는 면은 두 카드가 같이 써서 뒷면으로 뒤집고 닫으면 쉬는 카드도 뒷면이다. `side`·`defaultSide`·`onSideChange` 가 그대로 동작한다. 쉬는 카드는 루트 폭보다 작게 그려지니 둘레에 여백을 둘 필요가 없다. 펼치는 모션이 이름(`view-transition-name`) 하나로 두 카드를 이어서 한 화면에 한 장만 둔다.
|
|
3560
3560
|
- `expandedDetail`: 펼친 카드 아래 가운데에 놓는 내용(설명 한 줄·링크). 어두운 바탕이라 글자는 `--text-on-overlay` 색을 물려받는다.
|
|
3561
3561
|
- `closeLabel`(기본 `'닫기'`): 펼친 창 오른쪽 위 닫기 버튼의 이름. 번역은 쓰는 쪽이 넘긴다.
|
|
3562
|
-
- `flipLabel`(기본 `'뒤집기'`): 펼친 카드 오른쪽 아래 뒤집기 버튼의 이름. 번역은 쓰는 쪽이 넘긴다. 누르면 카드를 누른 것과 같은 `change` 로그를 보낸다.
|
|
3562
|
+
- `flipLabel`(기본 `'뒤집기'`): 쉬는 카드와 펼친 카드 오른쪽 아래 뒤집기 버튼의 이름. 번역은 쓰는 쪽이 넘긴다. 누르면 카드를 누른 것과 같은 `change` 로그를 보낸다.
|
|
3563
3563
|
|
|
3564
3564
|
**쓰지 않는다.** 크리에이터 목록의 한 줄은 ListRow 를 쓴다. 운영 화면의 크리에이터 상세는 Card 와 DescriptionList 를 쓴다.
|
|
3565
3565
|
|
|
@@ -3578,10 +3578,12 @@ import { MemberCard } from '@nurihaus/web-design-system'; // 루트.
|
|
|
3578
3578
|
| `.member-card-channels` | `aria-label` | (있음) |
|
|
3579
3579
|
| `.member-card.rest` | `aria-haspopup` | `dialog` |
|
|
3580
3580
|
| `.member-card.rest` | `aria-expanded` | `false` · `true` |
|
|
3581
|
+
| `.member-card-rest-flip` | `aria-label` | (있음) |
|
|
3581
3582
|
| `.member-card` | 키보드 | Enter·Space → 다른 면으로 뒤집는다 |
|
|
3582
3583
|
| `.member-card.rest` | 키보드 | Enter·Space → 펼친다. 펼친 창에서 Esc → 닫고 쉬는 카드로 포커스가 돌아온다 |
|
|
3584
|
+
| `.member-card-rest-flip` | 키보드 | Enter·Space → 펼치지 않고 쉬는 카드를 다른 면으로 뒤집는다 |
|
|
3583
3585
|
|
|
3584
|
-
펼친 창(`role=dialog`)의 이름은 `name` 이고 화면에는 보이지 않는다. 열리면 포커스가 창에 가고 Tab 은 창 안에 머문다. 창 안의 닫기·뒤집기 버튼은 아이콘만 있고 이름(`aria-label`)이 `closeLabel`·`flipLabel` 이다.
|
|
3586
|
+
펼친 창(`role=dialog`)의 이름은 `name` 이고 화면에는 보이지 않는다. 열리면 포커스가 창에 가고 Tab 은 창 안에 머문다. 창 안의 닫기·뒤집기 버튼과 쉬는 카드 옆 뒤집기 버튼은 아이콘만 있고 이름(`aria-label`)이 `closeLabel`·`flipLabel` 이다. 쉬는 카드 옆 뒤집기 버튼은 쉬는 카드(button) 밖의 형제 button 이라 Tab 으로 쉬는 카드 다음에 온다.
|
|
3585
3587
|
|
|
3586
3588
|
쓰는 쪽이 달 것이 없다.
|
|
3587
3589
|
|
|
@@ -3599,7 +3601,7 @@ import { MemberCard } from '@nurihaus/web-design-system'; // 루트.
|
|
|
3599
3601
|
/>
|
|
3600
3602
|
```
|
|
3601
3603
|
|
|
3602
|
-
**반응형.** 그대로 됨. 폭이 부모를 따르고 높이는 카드 비율(1.586:1)로 정해진다. 한 면이 통째로 누르는 자리다. expandable 의 쉬는 카드는 루트보다 작게 그려 넘치지 않고, 펼친 카드는 화면 폭에서 양옆 20 을 뺀 폭(400 까지)이다. 펼친 창의 닫기·뒤집기 버튼은 --touch-target
|
|
3604
|
+
**반응형.** 그대로 됨. 폭이 부모를 따르고 높이는 카드 비율(1.586:1)로 정해진다. 한 면이 통째로 누르는 자리다. expandable 의 쉬는 카드는 루트보다 작게 그려 넘치지 않고, 펼친 카드는 화면 폭에서 양옆 20 을 뺀 폭(400 까지)이다. 쉬는 카드 옆과 펼친 창의 닫기·뒤집기 버튼은 --touch-target 크기이고, 쉬는 카드 옆 버튼은 루트 상자 오른쪽 아래에 있어 넘치지 않는다.
|
|
3603
3605
|
|
|
3604
3606
|
**모션.** press(`pressEffect`) · flip · attention(opt) · tilt(opt, `depth`) · enter(opt) · exit(opt). 토큰 값과 규칙은 `motion.md`.
|
|
3605
3607
|
|
package/dist/ai/motion.md
CHANGED
|
@@ -562,7 +562,7 @@
|
|
|
562
562
|
- **MotionProvider** 없음. DOM 을 그리지 않는다. 다른 컴포넌트의 motion 층이 이 아래에서 돈다
|
|
563
563
|
- **Callout** enter: 대상에 붙은 말풍선. 꼬리에서 pop 으로 나타난다(ADR 0007) (KAN-9518) · attention: 나타난 뒤 세 번 둥실 움직인다(ADR 0007). 3회 자동 재생은 ADR 0007 의 예외로 카탈로그 attention 에 적었다 (KAN-9525)
|
|
564
564
|
- **Card** press[scale]: 링크·버튼 카드(asChild 로 a[href]·button)는 누르는 표면이다. 보기만 하는 카드는 붙지 않는다 (KAN-9451) · attention(opt): 카드. 방금 생긴 카드를 쓰는 쪽이 ref 메서드로 짚는다 (KAN-9525)
|
|
565
|
-
- **MemberCard** press[scale]: 뒤집을 수 있는 카드는 버튼이다. flippable={false} 면 붙지 않는다 (KAN-10213) · flip: 누르면(expandable 은
|
|
565
|
+
- **MemberCard** press[scale]: 뒤집을 수 있는 카드는 버튼이다. flippable={false} 면 붙지 않는다 (KAN-10213) · flip: 누르면(expandable 은 쉬는 카드·펼친 카드 옆 뒤집기 버튼으로. 쉬는 카드는 눕힌 자세 그대로) Y 축으로 반 바퀴 돌아 다른 면을 보인다. 도는 동안 떠올랐다 내려앉으며 옆면 두께·그림자·빛이 보인다 (KAN-10213) · attention(opt): 보이는 면에 빛이 한 번 지나간다. 쓰는 쪽이 effectRef.current.shine() 으로 부를 때만 (KAN-10213) · tilt(opt): depth 를 주면 누른 채 움직이는 손가락을 따라 기울고, 놓으면 스프링으로 돌아온다 (KAN-10213) · enter(opt): expandable 을 주면 누를 때 카드가 화면 가운데로 일어서며 커진다(View Transitions). 없으면 바탕은 fade, 상자는 scale 로 들어온다 (KAN-10360) · exit(opt): enter 와 같은 대상. 닫으면 제자리로 다시 눕는다 (KAN-10360)
|
|
566
566
|
- **TierLadder** press[dim]: 칸마다 고르는 표면이다. 사다리 안의 칸이라 줄이지 않고 딤만 쓴다 (KAN-10360)
|
|
567
567
|
- **ListGroup** reveal(opt): stagger prop 을 줄 때만 행이 차례로 나타난다 (KAN-9544)
|
|
568
568
|
- **ListRow** press[dim]: onClick·링크가 있는 행은 누르는 표면이다. 폭이 꽉 찬 행이라 scale 대신 배경이 어두워진다 (KAN-9451) · attention(opt): 행. 방금 바뀐 행을 쓰는 쪽이 effectRef 로 shine·blink 를 부른다 (KAN-9544)
|
|
@@ -24,7 +24,7 @@ declare const meta: {
|
|
|
24
24
|
since: string;
|
|
25
25
|
bio: string;
|
|
26
26
|
countries: string[];
|
|
27
|
-
channels: ("
|
|
27
|
+
channels: ("instagram" | "tiktok" | "youtube")[];
|
|
28
28
|
categories: string[];
|
|
29
29
|
};
|
|
30
30
|
};
|
|
@@ -44,7 +44,7 @@ export declare const MotionShine: Story;
|
|
|
44
44
|
/** 누른 채 움직이면(마우스는 올려만 놔도) 기울고 빛·두께가 따라온다. 놓으면 돌아온다 */
|
|
45
45
|
export declare const Depth: Story;
|
|
46
46
|
/**
|
|
47
|
-
* 흰 바탕에 뒤로 눕혀 쉰다. 누르면 가운데로 일어서며 커지고, 거기서 기울이고 뒤집는다(카드를 누르거나 오른쪽 아래
|
|
47
|
+
* 흰 바탕에 뒤로 눕혀 쉰다. 오른쪽 아래 뒤집기 버튼은 펼치지 않고 그 자리에서 뒤집는다. 누르면 가운데로 일어서며 커지고, 거기서 기울이고 뒤집는다(카드를 누르거나 오른쪽 아래
|
|
48
48
|
* 뒤집기 버튼). 바탕·닫기·Esc 로 닫는다
|
|
49
49
|
*/
|
|
50
50
|
export declare const Expandable: Story;
|
package/dist/components.css
CHANGED
|
@@ -3266,10 +3266,18 @@
|
|
|
3266
3266
|
}
|
|
3267
3267
|
|
|
3268
3268
|
.member-card.rest .member-card-tilt {
|
|
3269
|
-
/*
|
|
3269
|
+
/*
|
|
3270
|
+
* 판을 평평하게 두어 빛(::after)이 면과 같은 평면에서 다투지 않는다. 뒤집기 버튼으로 돌 때는 이 판의 원근이
|
|
3271
|
+
* 안쪽 판(.member-card-inner)에 닿아, 눕힌 자세 그대로 카드 면 기준으로 돌고 떠오른다(바닥에서 들린다)
|
|
3272
|
+
*/
|
|
3270
3273
|
transform-style: flat;
|
|
3271
3274
|
transform: rotateX(38deg) rotateZ(-9deg) scale(0.82);
|
|
3272
|
-
|
|
3275
|
+
perspective: 1000px; /* raw-px */
|
|
3276
|
+
}
|
|
3277
|
+
|
|
3278
|
+
/* 아래로 한 겹씩 쌓은 1px 판이 두께, 그 밑 두 겹이 바닥 그림자다. 도는 판에 그려 카드와 함께 돌고 90° 에서 사라진다 */
|
|
3279
|
+
|
|
3280
|
+
.member-card.rest .member-card-inner {
|
|
3273
3281
|
box-shadow:
|
|
3274
3282
|
0 1px 0 color-mix(in srgb, var(--surface-highlight) 20%, var(--member-card-surface)), /* raw-px */
|
|
3275
3283
|
0 2px 0 color-mix(in srgb, var(--surface-highlight) 17%, var(--member-card-surface)), /* raw-px */
|
|
@@ -3299,7 +3307,16 @@
|
|
|
3299
3307
|
}
|
|
3300
3308
|
|
|
3301
3309
|
/*
|
|
3302
|
-
*
|
|
3310
|
+
* 도는 동안은 위 빛이 판 모양 그대로 남아 빈 자리에 비치므로 바로 걷는다(서서히 걷으면 그 사이 빈 판이 보인다).
|
|
3311
|
+
* 면 위 빛(.member-card-sheen)이 대신한다
|
|
3312
|
+
*/
|
|
3313
|
+
|
|
3314
|
+
.member-card.rest[data-flipping] .member-card-tilt::after {
|
|
3315
|
+
opacity: 0;
|
|
3316
|
+
}
|
|
3317
|
+
|
|
3318
|
+
/*
|
|
3319
|
+
* 펼친 동안 쉬는 카드는 집어 든 것처럼 자리를 비운다. 두면 어두운 바탕 뒤로 비쳐, 펼친 카드가 뒤집히며 좁아질 때
|
|
3303
3320
|
* 그 뒤에 눕힌 카드가 하나 더 보인다. 닫히면(data-state='closed') 다시 보여 View Transitions 의 새 장면에 잡힌다
|
|
3304
3321
|
*/
|
|
3305
3322
|
|
|
@@ -3317,7 +3334,8 @@
|
|
|
3317
3334
|
position: fixed;
|
|
3318
3335
|
inset: 0;
|
|
3319
3336
|
z-index: var(--z-overlay);
|
|
3320
|
-
|
|
3337
|
+
/* 뒤 화면이 비쳐 펼친 카드 아래 설명(expandedDetail)과 겹치지 않게 85% 로 덮는다 */
|
|
3338
|
+
background-color: color-mix(in srgb, var(--surface-overlay) 85%, transparent);
|
|
3321
3339
|
}
|
|
3322
3340
|
|
|
3323
3341
|
.base-member-card.member-card-overlay[data-state='open'] {
|
|
@@ -3387,6 +3405,37 @@
|
|
|
3387
3405
|
cursor: var(--cursor-button);
|
|
3388
3406
|
}
|
|
3389
3407
|
|
|
3408
|
+
/* 쉬는 카드와 그 뒤집기 버튼을 함께 놓는 자리. 루트 상자 오른쪽 아래, 눕힌 카드가 비켜 간 빈 곳에 버튼을 둔다 */
|
|
3409
|
+
|
|
3410
|
+
.member-card-rest-frame {
|
|
3411
|
+
position: relative;
|
|
3412
|
+
/* 버튼이 눕힌 카드의 오른쪽 아래 모서리에 걸치지 않게 그 아래로 내려 둘 자리 */
|
|
3413
|
+
padding-bottom: var(--spacing-24);
|
|
3414
|
+
}
|
|
3415
|
+
|
|
3416
|
+
.member-card-rest-flip {
|
|
3417
|
+
position: absolute;
|
|
3418
|
+
right: 0;
|
|
3419
|
+
bottom: 0;
|
|
3420
|
+
display: inline-flex;
|
|
3421
|
+
align-items: center;
|
|
3422
|
+
justify-content: center;
|
|
3423
|
+
width: var(--touch-target);
|
|
3424
|
+
height: var(--touch-target);
|
|
3425
|
+
padding: 0;
|
|
3426
|
+
border: none;
|
|
3427
|
+
border-radius: var(--radius-circle);
|
|
3428
|
+
background: var(--surface-muted);
|
|
3429
|
+
color: var(--text-secondary);
|
|
3430
|
+
cursor: var(--cursor-button);
|
|
3431
|
+
|
|
3432
|
+
/* 펼친 동안은 쉬는 카드와 함께 자리를 비운다. 두면 어두운 바탕 뒤로 비친다 */
|
|
3433
|
+
}
|
|
3434
|
+
|
|
3435
|
+
.member-card.rest[data-state='open'] + .member-card-rest-flip {
|
|
3436
|
+
visibility: hidden;
|
|
3437
|
+
}
|
|
3438
|
+
|
|
3390
3439
|
.member-card-flip {
|
|
3391
3440
|
display: inline-flex;
|
|
3392
3441
|
align-self: flex-end;
|
package/dist/index.js
CHANGED
|
@@ -9328,6 +9328,8 @@ var MemberCardView = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonj
|
|
|
9328
9328
|
setSide = _h[1];
|
|
9329
9329
|
var isBack = currentSide === 'back';
|
|
9330
9330
|
var tilt = useTilt(depth);
|
|
9331
|
+
// 면이 바뀔 때 도는 카드. 쉬는 카드(rest)는 눌러도 뒤집지 않지만 뒤집기 버튼으로 면이 바뀌면 눕힌 채로 돈다
|
|
9332
|
+
var turns = flippable || rest;
|
|
9331
9333
|
// 면이 바뀌면(누름·뒤집기 버튼·쓰는 쪽의 side) 그 렌더에서 바로 뒤집는 중으로 둔다. 두께·떠오름·그림자·빛은 CSS 가
|
|
9332
9334
|
// data-flipping 동안 그리고, 루트의 motion-flip-shadow 가 끝나면 뗀다. 동작 줄이기면 바로 바뀌어 붙이지 않는다
|
|
9333
9335
|
var _j = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useState)(currentSide),
|
|
@@ -9338,7 +9340,7 @@ var MemberCardView = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonj
|
|
|
9338
9340
|
setFlipping = _k[1];
|
|
9339
9341
|
if (shownSide !== currentSide) {
|
|
9340
9342
|
setShownSide(currentSide);
|
|
9341
|
-
setFlipping(
|
|
9343
|
+
setFlipping(turns && !(0,prefers_reduced_motion/* prefersReducedMotion */.O)());
|
|
9342
9344
|
}
|
|
9343
9345
|
var handleAnimationEnd = function handleAnimationEnd(event) {
|
|
9344
9346
|
if (event.target === event.currentTarget && event.animationName === 'motion-flip-shadow') setFlipping(false);
|
|
@@ -9372,7 +9374,7 @@ var MemberCardView = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonj
|
|
|
9372
9374
|
}, tilt.handlers, {
|
|
9373
9375
|
children: (0,jsx_runtime_.jsxs)("span", {
|
|
9374
9376
|
className: 'member-card-inner',
|
|
9375
|
-
children: [(depth ||
|
|
9377
|
+
children: [(depth || turns) && (0,jsx_runtime_.jsx)("span", {
|
|
9376
9378
|
className: 'member-card-edge',
|
|
9377
9379
|
"aria-hidden": true
|
|
9378
9380
|
}), (0,jsx_runtime_.jsx)(MemberCardFront, {
|
|
@@ -9383,7 +9385,7 @@ var MemberCardView = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonj
|
|
|
9383
9385
|
logo: logo,
|
|
9384
9386
|
inactive: isBack,
|
|
9385
9387
|
depth: depth,
|
|
9386
|
-
flippable:
|
|
9388
|
+
flippable: turns
|
|
9387
9389
|
}), (0,jsx_runtime_.jsx)(MemberCardBack, {
|
|
9388
9390
|
tier: tier,
|
|
9389
9391
|
name: name,
|
|
@@ -9394,7 +9396,7 @@ var MemberCardView = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonj
|
|
|
9394
9396
|
maxCategories: maxCategories,
|
|
9395
9397
|
inactive: !isBack,
|
|
9396
9398
|
depth: depth,
|
|
9397
|
-
flippable:
|
|
9399
|
+
flippable: turns
|
|
9398
9400
|
})]
|
|
9399
9401
|
})
|
|
9400
9402
|
}))
|
|
@@ -9407,9 +9409,12 @@ var morph = function morph(update) {
|
|
|
9407
9409
|
update();
|
|
9408
9410
|
return;
|
|
9409
9411
|
}
|
|
9410
|
-
document.startViewTransition(function () {
|
|
9412
|
+
var transition = document.startViewTransition(function () {
|
|
9411
9413
|
return (0,external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_module_react_dom_.flushSync)(update);
|
|
9412
9414
|
});
|
|
9415
|
+
// 화면 크기가 바뀌는 등으로 전환이 끊겨도 바뀐 상태는 그대로다 — 끊긴 줌은 오류가 아니라 처리 안 된 거부로 남지 않게 받아 둔다
|
|
9416
|
+
transition.ready["catch"](function () {});
|
|
9417
|
+
transition.finished["catch"](function () {});
|
|
9413
9418
|
};
|
|
9414
9419
|
/**
|
|
9415
9420
|
* expandable: 쉬는 카드(Dialog 의 Trigger)와 펼친 카드(Dialog 안). 보이는 면은 여기서 들고 두 카드가 같이 본다 —
|
|
@@ -9490,19 +9495,34 @@ var ExpandableMemberCard = /*#__PURE__*/(0,external_root_React_commonjs2_react_c
|
|
|
9490
9495
|
maxCategories: maxCategories,
|
|
9491
9496
|
logo: logo
|
|
9492
9497
|
};
|
|
9498
|
+
var flipButton = function flipButton(className) {
|
|
9499
|
+
return (0,jsx_runtime_.jsx)("button", {
|
|
9500
|
+
type: 'button',
|
|
9501
|
+
className: (0,classNames/* classNames */.x)(className, 'motion-press'),
|
|
9502
|
+
"aria-label": flipLabel,
|
|
9503
|
+
onClick: flip,
|
|
9504
|
+
children: (0,jsx_runtime_.jsx)(icon/* default */.A, {
|
|
9505
|
+
name: 'arrow-clockwise',
|
|
9506
|
+
size: 'm'
|
|
9507
|
+
})
|
|
9508
|
+
});
|
|
9509
|
+
};
|
|
9493
9510
|
return (0,jsx_runtime_.jsxs)(MemberCardDialog, {
|
|
9494
9511
|
open: open,
|
|
9495
9512
|
onOpenChange: changeOpen,
|
|
9496
|
-
children: [(0,jsx_runtime_.
|
|
9497
|
-
|
|
9498
|
-
children: (0,jsx_runtime_.jsx)(
|
|
9499
|
-
|
|
9500
|
-
|
|
9501
|
-
|
|
9502
|
-
|
|
9503
|
-
|
|
9504
|
-
|
|
9505
|
-
|
|
9513
|
+
children: [(0,jsx_runtime_.jsxs)("div", {
|
|
9514
|
+
className: 'member-card-rest-frame',
|
|
9515
|
+
children: [(0,jsx_runtime_.jsx)(MemberCardDialog.Trigger, {
|
|
9516
|
+
asChild: true,
|
|
9517
|
+
children: (0,jsx_runtime_.jsx)(MemberCardView, member_card_assign({
|
|
9518
|
+
ref: ref
|
|
9519
|
+
}, faceProps, restProps, {
|
|
9520
|
+
side: currentSide,
|
|
9521
|
+
flippable: false,
|
|
9522
|
+
depth: false,
|
|
9523
|
+
rest: true
|
|
9524
|
+
}))
|
|
9525
|
+
}), flipButton('member-card-rest-flip')]
|
|
9506
9526
|
}), (0,jsx_runtime_.jsxs)(MemberCardDialog.Content, {
|
|
9507
9527
|
onOpenAutoFocus: focusOnOpen,
|
|
9508
9528
|
children: [(0,jsx_runtime_.jsx)(MemberCardDialog.Title, {
|
|
@@ -9520,16 +9540,7 @@ var ExpandableMemberCard = /*#__PURE__*/(0,external_root_React_commonjs2_react_c
|
|
|
9520
9540
|
depth: true,
|
|
9521
9541
|
track: track,
|
|
9522
9542
|
trackProps: trackProps
|
|
9523
|
-
})), (0,jsx_runtime_.jsx)("
|
|
9524
|
-
type: 'button',
|
|
9525
|
-
className: 'member-card-flip motion-press',
|
|
9526
|
-
"aria-label": flipLabel,
|
|
9527
|
-
onClick: flip,
|
|
9528
|
-
children: (0,jsx_runtime_.jsx)(icon/* default */.A, {
|
|
9529
|
-
name: 'arrow-clockwise',
|
|
9530
|
-
size: 'm'
|
|
9531
|
-
})
|
|
9532
|
-
}), expandedDetail && (0,jsx_runtime_.jsx)("div", {
|
|
9543
|
+
})), flipButton('member-card-flip'), expandedDetail && (0,jsx_runtime_.jsx)("div", {
|
|
9533
9544
|
className: 'member-card-detail',
|
|
9534
9545
|
children: expandedDetail
|
|
9535
9546
|
})]
|
package/dist/member-card.js
CHANGED
|
@@ -461,6 +461,8 @@ var MemberCardView = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonj
|
|
|
461
461
|
setSide = _h[1];
|
|
462
462
|
var isBack = currentSide === 'back';
|
|
463
463
|
var tilt = useTilt(depth);
|
|
464
|
+
// 면이 바뀔 때 도는 카드. 쉬는 카드(rest)는 눌러도 뒤집지 않지만 뒤집기 버튼으로 면이 바뀌면 눕힌 채로 돈다
|
|
465
|
+
var turns = flippable || rest;
|
|
464
466
|
// 면이 바뀌면(누름·뒤집기 버튼·쓰는 쪽의 side) 그 렌더에서 바로 뒤집는 중으로 둔다. 두께·떠오름·그림자·빛은 CSS 가
|
|
465
467
|
// data-flipping 동안 그리고, 루트의 motion-flip-shadow 가 끝나면 뗀다. 동작 줄이기면 바로 바뀌어 붙이지 않는다
|
|
466
468
|
var _j = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useState)(currentSide),
|
|
@@ -471,7 +473,7 @@ var MemberCardView = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonj
|
|
|
471
473
|
setFlipping = _k[1];
|
|
472
474
|
if (shownSide !== currentSide) {
|
|
473
475
|
setShownSide(currentSide);
|
|
474
|
-
setFlipping(
|
|
476
|
+
setFlipping(turns && !(0,prefers_reduced_motion/* prefersReducedMotion */.O)());
|
|
475
477
|
}
|
|
476
478
|
var handleAnimationEnd = function handleAnimationEnd(event) {
|
|
477
479
|
if (event.target === event.currentTarget && event.animationName === 'motion-flip-shadow') setFlipping(false);
|
|
@@ -505,7 +507,7 @@ var MemberCardView = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonj
|
|
|
505
507
|
}, tilt.handlers, {
|
|
506
508
|
children: (0,jsx_runtime_.jsxs)("span", {
|
|
507
509
|
className: 'member-card-inner',
|
|
508
|
-
children: [(depth ||
|
|
510
|
+
children: [(depth || turns) && (0,jsx_runtime_.jsx)("span", {
|
|
509
511
|
className: 'member-card-edge',
|
|
510
512
|
"aria-hidden": true
|
|
511
513
|
}), (0,jsx_runtime_.jsx)(MemberCardFront, {
|
|
@@ -516,7 +518,7 @@ var MemberCardView = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonj
|
|
|
516
518
|
logo: logo,
|
|
517
519
|
inactive: isBack,
|
|
518
520
|
depth: depth,
|
|
519
|
-
flippable:
|
|
521
|
+
flippable: turns
|
|
520
522
|
}), (0,jsx_runtime_.jsx)(MemberCardBack, {
|
|
521
523
|
tier: tier,
|
|
522
524
|
name: name,
|
|
@@ -527,7 +529,7 @@ var MemberCardView = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonj
|
|
|
527
529
|
maxCategories: maxCategories,
|
|
528
530
|
inactive: !isBack,
|
|
529
531
|
depth: depth,
|
|
530
|
-
flippable:
|
|
532
|
+
flippable: turns
|
|
531
533
|
})]
|
|
532
534
|
})
|
|
533
535
|
}))
|
|
@@ -540,9 +542,12 @@ var morph = function morph(update) {
|
|
|
540
542
|
update();
|
|
541
543
|
return;
|
|
542
544
|
}
|
|
543
|
-
document.startViewTransition(function () {
|
|
545
|
+
var transition = document.startViewTransition(function () {
|
|
544
546
|
return (0,external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_module_react_dom_.flushSync)(update);
|
|
545
547
|
});
|
|
548
|
+
// 화면 크기가 바뀌는 등으로 전환이 끊겨도 바뀐 상태는 그대로다 — 끊긴 줌은 오류가 아니라 처리 안 된 거부로 남지 않게 받아 둔다
|
|
549
|
+
transition.ready["catch"](function () {});
|
|
550
|
+
transition.finished["catch"](function () {});
|
|
546
551
|
};
|
|
547
552
|
/**
|
|
548
553
|
* expandable: 쉬는 카드(Dialog 의 Trigger)와 펼친 카드(Dialog 안). 보이는 면은 여기서 들고 두 카드가 같이 본다 —
|
|
@@ -623,19 +628,34 @@ var ExpandableMemberCard = /*#__PURE__*/(0,external_root_React_commonjs2_react_c
|
|
|
623
628
|
maxCategories: maxCategories,
|
|
624
629
|
logo: logo
|
|
625
630
|
};
|
|
631
|
+
var flipButton = function flipButton(className) {
|
|
632
|
+
return (0,jsx_runtime_.jsx)("button", {
|
|
633
|
+
type: 'button',
|
|
634
|
+
className: (0,classNames/* classNames */.x)(className, 'motion-press'),
|
|
635
|
+
"aria-label": flipLabel,
|
|
636
|
+
onClick: flip,
|
|
637
|
+
children: (0,jsx_runtime_.jsx)(icon/* default */.A, {
|
|
638
|
+
name: 'arrow-clockwise',
|
|
639
|
+
size: 'm'
|
|
640
|
+
})
|
|
641
|
+
});
|
|
642
|
+
};
|
|
626
643
|
return (0,jsx_runtime_.jsxs)(MemberCardDialog, {
|
|
627
644
|
open: open,
|
|
628
645
|
onOpenChange: changeOpen,
|
|
629
|
-
children: [(0,jsx_runtime_.
|
|
630
|
-
|
|
631
|
-
children: (0,jsx_runtime_.jsx)(
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
646
|
+
children: [(0,jsx_runtime_.jsxs)("div", {
|
|
647
|
+
className: 'member-card-rest-frame',
|
|
648
|
+
children: [(0,jsx_runtime_.jsx)(MemberCardDialog.Trigger, {
|
|
649
|
+
asChild: true,
|
|
650
|
+
children: (0,jsx_runtime_.jsx)(MemberCardView, member_card_assign({
|
|
651
|
+
ref: ref
|
|
652
|
+
}, faceProps, restProps, {
|
|
653
|
+
side: currentSide,
|
|
654
|
+
flippable: false,
|
|
655
|
+
depth: false,
|
|
656
|
+
rest: true
|
|
657
|
+
}))
|
|
658
|
+
}), flipButton('member-card-rest-flip')]
|
|
639
659
|
}), (0,jsx_runtime_.jsxs)(MemberCardDialog.Content, {
|
|
640
660
|
onOpenAutoFocus: focusOnOpen,
|
|
641
661
|
children: [(0,jsx_runtime_.jsx)(MemberCardDialog.Title, {
|
|
@@ -653,16 +673,7 @@ var ExpandableMemberCard = /*#__PURE__*/(0,external_root_React_commonjs2_react_c
|
|
|
653
673
|
depth: true,
|
|
654
674
|
track: track,
|
|
655
675
|
trackProps: trackProps
|
|
656
|
-
})), (0,jsx_runtime_.jsx)("
|
|
657
|
-
type: 'button',
|
|
658
|
-
className: 'member-card-flip motion-press',
|
|
659
|
-
"aria-label": flipLabel,
|
|
660
|
-
onClick: flip,
|
|
661
|
-
children: (0,jsx_runtime_.jsx)(icon/* default */.A, {
|
|
662
|
-
name: 'arrow-clockwise',
|
|
663
|
-
size: 'm'
|
|
664
|
-
})
|
|
665
|
-
}), expandedDetail && (0,jsx_runtime_.jsx)("div", {
|
|
676
|
+
})), flipButton('member-card-flip'), expandedDetail && (0,jsx_runtime_.jsx)("div", {
|
|
666
677
|
className: 'member-card-detail',
|
|
667
678
|
children: expandedDetail
|
|
668
679
|
})]
|
package/dist/styles.css
CHANGED
|
@@ -3915,10 +3915,16 @@ p {
|
|
|
3915
3915
|
perspective: 900px; /* raw-px */
|
|
3916
3916
|
}
|
|
3917
3917
|
.member-card.rest .member-card-tilt {
|
|
3918
|
-
/*
|
|
3918
|
+
/*
|
|
3919
|
+
* 판을 평평하게 두어 빛(::after)이 면과 같은 평면에서 다투지 않는다. 뒤집기 버튼으로 돌 때는 이 판의 원근이
|
|
3920
|
+
* 안쪽 판(.member-card-inner)에 닿아, 눕힌 자세 그대로 카드 면 기준으로 돌고 떠오른다(바닥에서 들린다)
|
|
3921
|
+
*/
|
|
3919
3922
|
transform-style: flat;
|
|
3920
3923
|
transform: rotateX(38deg) rotateZ(-9deg) scale(0.82);
|
|
3921
|
-
|
|
3924
|
+
perspective: 1000px; /* raw-px */
|
|
3925
|
+
}
|
|
3926
|
+
/* 아래로 한 겹씩 쌓은 1px 판이 두께, 그 밑 두 겹이 바닥 그림자다. 도는 판에 그려 카드와 함께 돌고 90° 에서 사라진다 */
|
|
3927
|
+
.member-card.rest .member-card-inner {
|
|
3922
3928
|
box-shadow:
|
|
3923
3929
|
0 1px 0 color-mix(in srgb, var(--surface-highlight) 20%, var(--member-card-surface)), /* raw-px */
|
|
3924
3930
|
0 2px 0 color-mix(in srgb, var(--surface-highlight) 17%, var(--member-card-surface)), /* raw-px */
|
|
@@ -3945,7 +3951,14 @@ p {
|
|
|
3945
3951
|
pointer-events: none;
|
|
3946
3952
|
}
|
|
3947
3953
|
/*
|
|
3948
|
-
*
|
|
3954
|
+
* 도는 동안은 위 빛이 판 모양 그대로 남아 빈 자리에 비치므로 바로 걷는다(서서히 걷으면 그 사이 빈 판이 보인다).
|
|
3955
|
+
* 면 위 빛(.member-card-sheen)이 대신한다
|
|
3956
|
+
*/
|
|
3957
|
+
.member-card.rest[data-flipping] .member-card-tilt::after {
|
|
3958
|
+
opacity: 0;
|
|
3959
|
+
}
|
|
3960
|
+
/*
|
|
3961
|
+
* 펼친 동안 쉬는 카드는 집어 든 것처럼 자리를 비운다. 두면 어두운 바탕 뒤로 비쳐, 펼친 카드가 뒤집히며 좁아질 때
|
|
3949
3962
|
* 그 뒤에 눕힌 카드가 하나 더 보인다. 닫히면(data-state='closed') 다시 보여 View Transitions 의 새 장면에 잡힌다
|
|
3950
3963
|
*/
|
|
3951
3964
|
.member-card.rest[data-state='open'] {
|
|
@@ -3959,7 +3972,8 @@ p {
|
|
|
3959
3972
|
position: fixed;
|
|
3960
3973
|
inset: 0;
|
|
3961
3974
|
z-index: var(--z-overlay);
|
|
3962
|
-
|
|
3975
|
+
/* 뒤 화면이 비쳐 펼친 카드 아래 설명(expandedDetail)과 겹치지 않게 85% 로 덮는다 */
|
|
3976
|
+
background-color: color-mix(in srgb, var(--surface-overlay) 85%, transparent);
|
|
3963
3977
|
}
|
|
3964
3978
|
.base-member-card.member-card-overlay[data-state='open'] {
|
|
3965
3979
|
animation: motion-enter-fade var(--motion-enter-duration) var(--motion-enter-ease);
|
|
@@ -4016,6 +4030,33 @@ p {
|
|
|
4016
4030
|
color: var(--text-on-overlay);
|
|
4017
4031
|
cursor: var(--cursor-button);
|
|
4018
4032
|
}
|
|
4033
|
+
/* 쉬는 카드와 그 뒤집기 버튼을 함께 놓는 자리. 루트 상자 오른쪽 아래, 눕힌 카드가 비켜 간 빈 곳에 버튼을 둔다 */
|
|
4034
|
+
.member-card-rest-frame {
|
|
4035
|
+
position: relative;
|
|
4036
|
+
/* 버튼이 눕힌 카드의 오른쪽 아래 모서리에 걸치지 않게 그 아래로 내려 둘 자리 */
|
|
4037
|
+
padding-bottom: var(--spacing-24);
|
|
4038
|
+
}
|
|
4039
|
+
.member-card-rest-flip {
|
|
4040
|
+
position: absolute;
|
|
4041
|
+
right: 0;
|
|
4042
|
+
bottom: 0;
|
|
4043
|
+
display: inline-flex;
|
|
4044
|
+
align-items: center;
|
|
4045
|
+
justify-content: center;
|
|
4046
|
+
width: var(--touch-target);
|
|
4047
|
+
height: var(--touch-target);
|
|
4048
|
+
padding: 0;
|
|
4049
|
+
border: none;
|
|
4050
|
+
border-radius: var(--radius-circle);
|
|
4051
|
+
background: var(--surface-muted);
|
|
4052
|
+
color: var(--text-secondary);
|
|
4053
|
+
cursor: var(--cursor-button);
|
|
4054
|
+
|
|
4055
|
+
/* 펼친 동안은 쉬는 카드와 함께 자리를 비운다. 두면 어두운 바탕 뒤로 비친다 */
|
|
4056
|
+
}
|
|
4057
|
+
.member-card.rest[data-state='open'] + .member-card-rest-flip {
|
|
4058
|
+
visibility: hidden;
|
|
4059
|
+
}
|
|
4019
4060
|
.member-card-flip {
|
|
4020
4061
|
display: inline-flex;
|
|
4021
4062
|
align-self: flex-end;
|