@wipco/sdui 0.1.0 → 0.2.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/{chunk-AR2JYE75.js → chunk-QJHD6HVQ.js} +837 -152
- package/dist/index.d.ts +85 -26
- package/dist/index.js +19 -56
- package/dist/meta.d.ts +2 -2
- package/dist/meta.js +121 -19
- package/dist/rich.js +2 -2
- package/dist/styles.css +88 -13
- package/package.json +1 -1
package/dist/styles.css
CHANGED
|
@@ -270,7 +270,27 @@
|
|
|
270
270
|
.wp-btn--lg { height: 40px; padding: 0 16px; font-size: 14px; }
|
|
271
271
|
.wp-btn--xl { height: 48px; padding: 0 20px; font-size: 15px; }
|
|
272
272
|
.wp-btn--block { width: 100%; }
|
|
273
|
-
|
|
273
|
+
/*
|
|
274
|
+
* loading 스피너는 **CSS가 그린다**. 컴포넌트는 엘리먼트를 넣지 않는다(components.tsx 주석 참고) —
|
|
275
|
+
* 그리는 주체가 둘이면 원이 두 개 돈다. 라벨은 투명하게 눕히고 그 위에 원을 얹는다.
|
|
276
|
+
*/
|
|
277
|
+
.wp-btn--loading { pointer-events: none; color: transparent !important; position: relative; }
|
|
278
|
+
.wp-btn--loading::after {
|
|
279
|
+
content: ''; position: absolute; width: 14px; height: 14px; border-radius: 50%;
|
|
280
|
+
border: 1.5px solid currentColor; border-top-color: transparent;
|
|
281
|
+
animation: wp-spin 0.7s linear infinite; color: var(--wp-action-primary-fg);
|
|
282
|
+
}
|
|
283
|
+
.wp-btn--primary.wp-btn--loading::after, .wp-btn--danger.wp-btn--loading::after {
|
|
284
|
+
border-color: rgba(255, 255, 255, 0.85); border-top-color: transparent;
|
|
285
|
+
}
|
|
286
|
+
.wp-btn--secondary.wp-btn--loading::after, .wp-btn--ghost.wp-btn--loading::after {
|
|
287
|
+
border-color: var(--wp-slate-500); border-top-color: transparent;
|
|
288
|
+
}
|
|
289
|
+
/* as="a"/"span"은 disabled 속성이 없다 — 비활성 표기는 aria-disabled로도 걸린다. */
|
|
290
|
+
.wp-btn[aria-disabled='true']:not(.wp-btn--loading) {
|
|
291
|
+
cursor: not-allowed; background: var(--wp-action-disabled-bg);
|
|
292
|
+
border-color: transparent; color: var(--wp-action-disabled-fg);
|
|
293
|
+
}
|
|
274
294
|
|
|
275
295
|
.wp-iconbtn {
|
|
276
296
|
display: inline-flex; align-items: center; justify-content: center;
|
|
@@ -283,8 +303,18 @@
|
|
|
283
303
|
.wp-iconbtn:focus-visible { outline: 2px solid var(--wp-border-focus); outline-offset: 1px; }
|
|
284
304
|
.wp-iconbtn--sm { width: 28px; height: 28px; }
|
|
285
305
|
.wp-iconbtn--xs { width: 24px; height: 24px; }
|
|
306
|
+
.wp-iconbtn--lg { width: 40px; height: 40px; }
|
|
286
307
|
.wp-iconbtn--danger { color: var(--wp-text-danger); }
|
|
287
308
|
.wp-iconbtn--danger:hover { background: var(--wp-red-50); }
|
|
309
|
+
/* solid — 주 동작이 아이콘 하나뿐인 자리(뷰어 툴바의 닫기 등). */
|
|
310
|
+
.wp-iconbtn--solid { background: var(--wp-action-primary-bg); color: var(--wp-action-primary-fg); }
|
|
311
|
+
.wp-iconbtn--solid:hover:not(:disabled) { background: var(--wp-action-primary-bg-hover); color: var(--wp-white); }
|
|
312
|
+
/* onchrome — 네이비 사이드바/탑바 위. 밝은 글자에 반투명 호버. */
|
|
313
|
+
.wp-iconbtn--onchrome { color: var(--wp-chrome-fg-muted); }
|
|
314
|
+
.wp-iconbtn--onchrome:hover:not(:disabled) { background: var(--wp-chrome-item-hover); color: var(--wp-chrome-fg); }
|
|
315
|
+
.wp-iconbtn:disabled { cursor: not-allowed; color: var(--wp-text-disabled); background: transparent; }
|
|
316
|
+
/* pressed(토글 켜짐) — 선택 틴트. 클래스가 아니라 aria로 거는 이유는 상태가 곧 접근성 값이라서다. */
|
|
317
|
+
.wp-iconbtn[aria-pressed='true'] { background: var(--wp-surface-selected); color: var(--wp-text-brand); }
|
|
288
318
|
/* outlined — 툴바에서 배경이 같은 표면 위에 놓일 때 눌리는 자리임을 하드라인으로 보인다. */
|
|
289
319
|
.wp-iconbtn--outlined {
|
|
290
320
|
border: 1px solid var(--wp-action-secondary-border);
|
|
@@ -295,6 +325,24 @@
|
|
|
295
325
|
.wp-iconbtn--outlined:hover { background: var(--wp-action-secondary-bg-hover); border-color: var(--wp-border-strong); }
|
|
296
326
|
.wp-iconbtn--outlined:active { background: var(--wp-action-secondary-bg-active); }
|
|
297
327
|
|
|
328
|
+
/* 세그먼티드 — 배타 뷰 전환(목록/카드, 2D/3D). 항목 2~4개까지, 그 이상은 Select다. */
|
|
329
|
+
.wp-seg {
|
|
330
|
+
display: inline-flex; padding: 2px; gap: 2px;
|
|
331
|
+
background: var(--wp-surface-sunken); border: 1px solid var(--wp-border-subtle);
|
|
332
|
+
border-radius: var(--wp-radius-md);
|
|
333
|
+
}
|
|
334
|
+
.wp-seg__item {
|
|
335
|
+
display: inline-flex; align-items: center; justify-content: center; gap: 5px;
|
|
336
|
+
height: 24px; padding: 0 10px; border: 0; background: transparent;
|
|
337
|
+
border-radius: var(--wp-radius-sm);
|
|
338
|
+
font-family: inherit; font-size: 12px; font-weight: 600; white-space: nowrap;
|
|
339
|
+
color: var(--wp-text-muted); cursor: pointer; transition: background 0.12s, color 0.12s;
|
|
340
|
+
}
|
|
341
|
+
.wp-seg__item:hover { color: var(--wp-text-strong); }
|
|
342
|
+
.wp-seg__item[aria-selected='true'] { background: var(--wp-surface-card); color: var(--wp-text-strong); box-shadow: var(--wp-shadow-sm); }
|
|
343
|
+
.wp-seg__item:focus-visible { outline: 2px solid var(--wp-border-focus); outline-offset: 1px; }
|
|
344
|
+
.wp-seg--lg .wp-seg__item { height: 30px; padding: 0 14px; font-size: 13px; }
|
|
345
|
+
|
|
298
346
|
/* ---------- 입력 ---------- */
|
|
299
347
|
.wp-input, .wp-textarea, .wp-select {
|
|
300
348
|
font-family: inherit; font-size: 13px; color: var(--wp-text-default);
|
|
@@ -354,6 +402,8 @@
|
|
|
354
402
|
display: inline-flex; align-items: center; justify-content: center; transition: background 0.12s, border-color 0.12s;
|
|
355
403
|
}
|
|
356
404
|
.wp-check input:checked + .wp-check__box { background: var(--wp-action-primary-bg); border-color: var(--wp-action-primary-bg); color: var(--wp-white); }
|
|
405
|
+
/* 부분 선택 — 체크와 같은 채움에 글리프만 빼기(컴포넌트가 minus로 바꿔 넣는다). */
|
|
406
|
+
.wp-check input:indeterminate + .wp-check__box { background: var(--wp-navy-600); border-color: var(--wp-navy-600); color: var(--wp-white); }
|
|
357
407
|
.wp-check input:focus-visible + .wp-check__box { outline: 2px solid var(--wp-border-focus); outline-offset: 1px; }
|
|
358
408
|
.wp-check__text { display: flex; flex-direction: column; gap: 2px; }
|
|
359
409
|
.wp-check__desc { font-size: 12px; color: var(--wp-text-muted); }
|
|
@@ -494,6 +544,11 @@
|
|
|
494
544
|
.wp-tab:hover { color: var(--wp-text-default); }
|
|
495
545
|
.wp-tab[aria-selected='true'] { color: var(--wp-text-brand); border-bottom-color: var(--wp-accent); }
|
|
496
546
|
.wp-tabs--lg .wp-tab { height: 42px; font-size: 14px; }
|
|
547
|
+
/* onchrome — 네이비 탑바 위. 밝은 글자에 빨간 인디케이터. */
|
|
548
|
+
.wp-tabs--onchrome { border-bottom-color: var(--wp-chrome-border); }
|
|
549
|
+
.wp-tabs--onchrome .wp-tab { color: var(--wp-chrome-fg-muted); }
|
|
550
|
+
.wp-tabs--onchrome .wp-tab:hover { color: var(--wp-chrome-fg); }
|
|
551
|
+
.wp-tabs--onchrome .wp-tab[aria-selected='true'] { color: var(--wp-white); border-bottom-color: var(--wp-accent); }
|
|
497
552
|
.wp-tab__count {
|
|
498
553
|
font-size: 11px; font-weight: 700; padding: 1px 6px;
|
|
499
554
|
background: var(--wp-slate-100); border-radius: var(--wp-radius-full); color: var(--wp-text-muted);
|
|
@@ -510,6 +565,15 @@
|
|
|
510
565
|
.wp-table td { padding: 10px 12px; border-bottom: 1px solid var(--wp-border-subtle); vertical-align: middle; }
|
|
511
566
|
.wp-table--dense td { padding: 6px 12px; }
|
|
512
567
|
.wp-table--hover tbody tr:hover { background: var(--wp-surface-hover); }
|
|
568
|
+
.wp-table tbody tr[aria-selected='true'] { background: var(--wp-surface-selected); }
|
|
569
|
+
/* 정렬 헤더 — th의 타이포를 그대로 물려받아 버튼처럼 보이지 않게 한다. */
|
|
570
|
+
.wp-table__sort {
|
|
571
|
+
display: inline-flex; align-items: center; gap: 3px;
|
|
572
|
+
border: none; background: none; padding: 0; cursor: pointer;
|
|
573
|
+
color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit;
|
|
574
|
+
}
|
|
575
|
+
.wp-table__sort:hover { color: var(--wp-text-default); }
|
|
576
|
+
.wp-table--sticky thead th { position: sticky; top: 0; z-index: 1; }
|
|
513
577
|
.wp-table__num { text-align: right; font-variant-numeric: tabular-nums; }
|
|
514
578
|
.wp-table__mono { font-family: var(--wp-font-mono); font-size: 12px; }
|
|
515
579
|
.wp-table__strong { font-weight: 600; color: var(--wp-text-strong); }
|
|
@@ -548,21 +612,32 @@
|
|
|
548
612
|
}
|
|
549
613
|
.wp-spinner--sm { width: 12px; height: 12px; border-width: 2px; }
|
|
550
614
|
.wp-spinner--lg { width: 24px; height: 24px; border-width: 3px; }
|
|
615
|
+
/* inverse — 네이비/뷰어 표면 위에서는 밝은 쪽으로 뒤집는다. */
|
|
616
|
+
.wp-spinner--inverse { border-color: rgba(255, 255, 255, 0.28); border-top-color: var(--wp-white); }
|
|
551
617
|
@keyframes wp-spin { to { transform: rotate(360deg); } }
|
|
552
618
|
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
.wp-
|
|
558
|
-
.wp-
|
|
559
|
-
.wp-
|
|
560
|
-
.wp-
|
|
561
|
-
.wp-
|
|
562
|
-
.wp-
|
|
563
|
-
.wp-
|
|
619
|
+
/*
|
|
620
|
+
* 진척/용량 막대. 클래스 어휘는 .wp-meter*다 — .wp-progress*가 아니다.
|
|
621
|
+
* 디자인 시스템 쪽 이름이 meter이고, ProgressBar가 그 마크업을 그대로 낸다.
|
|
622
|
+
*/
|
|
623
|
+
.wp-meter { width: 100%; height: 6px; background: var(--wp-slate-200); border-radius: var(--wp-radius-full); overflow: hidden; }
|
|
624
|
+
.wp-meter--sm { height: 4px; }
|
|
625
|
+
.wp-meter--lg { height: 8px; }
|
|
626
|
+
.wp-meter__fill { height: 100%; background: var(--wp-navy-600); border-radius: var(--wp-radius-full); transition: width 0.25s; }
|
|
627
|
+
.wp-meter__fill--success { background: var(--wp-green-600); }
|
|
628
|
+
.wp-meter__fill--warning { background: var(--wp-gold-600); }
|
|
629
|
+
.wp-meter__fill--danger { background: var(--wp-red-600); }
|
|
564
630
|
/* info — 브랜드 네이비와 헷갈리지 않게 시그널 블루 쪽을 쓴다. */
|
|
565
|
-
.wp-
|
|
631
|
+
.wp-meter__fill--info { background: var(--wp-blue-500); }
|
|
632
|
+
/* striped — 진행 중인 작업에만. 정지된 값에 쓰면 움직이는 것처럼 읽힌다. */
|
|
633
|
+
.wp-meter__fill--striped {
|
|
634
|
+
background-image: linear-gradient(115deg, rgba(255, 255, 255, 0.22) 25%, transparent 25% 50%,
|
|
635
|
+
rgba(255, 255, 255, 0.22) 50% 75%, transparent 75%);
|
|
636
|
+
background-size: 10px 10px;
|
|
637
|
+
}
|
|
638
|
+
/* 라벨 없이 showValue만 켠 모양 — 값이 막대 오른쪽 옆에 붙는다. */
|
|
639
|
+
.wp-meter-row { display: flex; align-items: center; gap: 10px; }
|
|
640
|
+
.wp-meter-row__val { font-size: 12px; color: var(--wp-text-muted); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
|
|
566
641
|
|
|
567
642
|
/* ---------- 페이지네이션 ---------- */
|
|
568
643
|
.wp-pager { display: flex; align-items: center; gap: 4px; width: 100%; }
|