@designbasekorea/ui-wc 0.8.1 → 0.8.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/CHANGELOG.md +19 -0
- package/README.md +18 -0
- package/dist/esm/components/animation-background/controls.js +1 -1
- package/dist/esm/components/animation-background/layers.js +1 -1
- package/dist/esm/components/db-activity-heatmap.d.ts +38 -0
- package/dist/esm/components/db-activity-heatmap.js +1 -0
- package/dist/esm/components/db-animation-background.d.ts +2 -0
- package/dist/esm/components/db-animation-background.js +1 -1
- package/dist/esm/components/db-app-badge.d.ts +2 -0
- package/dist/esm/components/db-app-badge.js +1 -1
- package/dist/esm/components/db-audio-player.d.ts +4 -0
- package/dist/esm/components/db-audio-player.js +1 -1
- package/dist/esm/components/db-avatar.js +1 -1
- package/dist/esm/components/db-backdrop.d.ts +4 -0
- package/dist/esm/components/db-backdrop.js +1 -1
- package/dist/esm/components/db-badge.d.ts +2 -2
- package/dist/esm/components/db-badge.js +1 -1
- package/dist/esm/components/db-bottom-navigation.js +1 -1
- package/dist/esm/components/db-bottom-sheet.d.ts +5 -0
- package/dist/esm/components/db-bottom-sheet.js +1 -1
- package/dist/esm/components/db-button.d.ts +13 -0
- package/dist/esm/components/db-button.js +1 -1
- package/dist/esm/components/db-calendar.js +1 -1
- package/dist/esm/components/db-card.js +1 -1
- package/dist/esm/components/db-carousel.js +1 -1
- package/dist/esm/components/db-chat-composer.d.ts +14 -0
- package/dist/esm/components/db-chat-composer.js +1 -1
- package/dist/esm/components/db-chat-message.d.ts +15 -2
- package/dist/esm/components/db-chat-message.js +1 -1
- package/dist/esm/components/db-chat-orb.d.ts +6 -8
- package/dist/esm/components/db-chat-orb.js +1 -1
- package/dist/esm/components/db-chat-room.d.ts +12 -1
- package/dist/esm/components/db-chat-room.js +1 -1
- package/dist/esm/components/db-chat-welcome.js +1 -1
- package/dist/esm/components/db-chat-widget.d.ts +43 -10
- package/dist/esm/components/db-chat-widget.js +1 -1
- package/dist/esm/components/db-checkbox.d.ts +11 -0
- package/dist/esm/components/db-checkbox.js +1 -1
- package/dist/esm/components/db-chip.js +1 -1
- package/dist/esm/components/db-color-picker.js +1 -1
- package/dist/esm/components/db-confirm.d.ts +5 -0
- package/dist/esm/components/db-confirm.js +1 -1
- package/dist/esm/components/db-container.js +1 -1
- package/dist/esm/components/db-cookie-banner.js +1 -1
- package/dist/esm/components/db-date-picker.d.ts +3 -0
- package/dist/esm/components/db-date-picker.js +1 -1
- package/dist/esm/components/db-divider.js +1 -1
- package/dist/esm/components/db-download-progress.d.ts +3 -4
- package/dist/esm/components/db-download-progress.js +1 -1
- package/dist/esm/components/db-drawer.d.ts +5 -1
- package/dist/esm/components/db-drawer.js +1 -1
- package/dist/esm/components/db-dropdown.js +1 -1
- package/dist/esm/components/db-dropzone.js +1 -1
- package/dist/esm/components/db-email-verify.d.ts +2 -2
- package/dist/esm/components/db-email-verify.js +1 -1
- package/dist/esm/components/db-file-uploader.js +1 -1
- package/dist/esm/components/db-floating-action-button.d.ts +1 -0
- package/dist/esm/components/db-floating-action-button.js +1 -1
- package/dist/esm/components/db-footer.js +1 -1
- package/dist/esm/components/db-gantt.js +1 -1
- package/dist/esm/components/db-indicator.js +1 -1
- package/dist/esm/components/db-input.d.ts +7 -0
- package/dist/esm/components/db-input.js +1 -1
- package/dist/esm/components/db-kanban.js +1 -1
- package/dist/esm/components/db-lightbox.d.ts +4 -0
- package/dist/esm/components/db-lightbox.js +1 -1
- package/dist/esm/components/db-list.js +1 -1
- package/dist/esm/components/db-masonry.js +1 -1
- package/dist/esm/components/db-menu-item.js +1 -1
- package/dist/esm/components/db-modal.d.ts +10 -0
- package/dist/esm/components/db-modal.js +1 -1
- package/dist/esm/components/db-navbar.d.ts +4 -2
- package/dist/esm/components/db-navbar.js +1 -1
- package/dist/esm/components/db-onboarding-modal.d.ts +3 -0
- package/dist/esm/components/db-onboarding-modal.js +1 -1
- package/dist/esm/components/db-otp-input.d.ts +3 -2
- package/dist/esm/components/db-otp-input.js +1 -1
- package/dist/esm/components/db-page-header.js +1 -1
- package/dist/esm/components/db-phone-verify.d.ts +2 -2
- package/dist/esm/components/db-phone-verify.js +1 -1
- package/dist/esm/components/db-popover.js +1 -1
- package/dist/esm/components/db-progress-step.js +1 -1
- package/dist/esm/components/db-progress.js +1 -1
- package/dist/esm/components/db-progressbar.js +1 -1
- package/dist/esm/components/db-radio.d.ts +1 -0
- package/dist/esm/components/db-radio.js +1 -1
- package/dist/esm/components/db-range-slider.d.ts +9 -4
- package/dist/esm/components/db-range-slider.js +1 -1
- package/dist/esm/components/db-rating.js +1 -1
- package/dist/esm/components/db-resizable-panels.d.ts +14 -0
- package/dist/esm/components/db-resizable-panels.js +1 -1
- package/dist/esm/components/db-search-bar.js +1 -1
- package/dist/esm/components/db-section-cta.js +1 -1
- package/dist/esm/components/db-section-feature.js +1 -1
- package/dist/esm/components/db-section-pricing.js +1 -1
- package/dist/esm/components/db-section.js +1 -1
- package/dist/esm/components/db-segment-control.js +1 -1
- package/dist/esm/components/db-select.d.ts +8 -0
- package/dist/esm/components/db-select.js +1 -1
- package/dist/esm/components/db-sidebar.d.ts +41 -6
- package/dist/esm/components/db-sidebar.js +1 -1
- package/dist/esm/components/db-skeleton.js +1 -1
- package/dist/esm/components/db-spinner.d.ts +4 -0
- package/dist/esm/components/db-spinner.js +1 -1
- package/dist/esm/components/db-split-view.js +1 -1
- package/dist/esm/components/db-stat.js +1 -1
- package/dist/esm/components/db-stepper.js +1 -1
- package/dist/esm/components/db-table.js +1 -1
- package/dist/esm/components/db-tabs.js +1 -1
- package/dist/esm/components/db-testimonial.js +1 -1
- package/dist/esm/components/db-textarea.js +1 -1
- package/dist/esm/components/db-time-picker.d.ts +5 -2
- package/dist/esm/components/db-time-picker.js +1 -1
- package/dist/esm/components/db-timeline.js +1 -1
- package/dist/esm/components/db-toast.d.ts +8 -1
- package/dist/esm/components/db-toast.js +1 -1
- package/dist/esm/components/db-toggle.d.ts +2 -0
- package/dist/esm/components/db-toggle.js +1 -1
- package/dist/esm/components/db-tooltip.js +1 -1
- package/dist/esm/components/db-top-banner.js +1 -1
- package/dist/esm/components/db-tutorial.d.ts +1 -0
- package/dist/esm/components/db-tutorial.js +1 -1
- package/dist/esm/components/db-two-factor.d.ts +2 -2
- package/dist/esm/components/db-two-factor.js +1 -1
- package/dist/esm/components/db-video-player.d.ts +3 -0
- package/dist/esm/components/db-video-player.js +1 -1
- package/dist/esm/components/section-block-header-utils.js +1 -1
- package/dist/esm/core/a11y.d.ts +40 -0
- package/dist/esm/core/a11y.js +1 -0
- package/dist/esm/core/base-element.d.ts +41 -0
- package/dist/esm/core/base-element.js +1 -0
- package/dist/esm/core/dom.d.ts +35 -0
- package/dist/esm/core/dom.js +1 -0
- package/dist/esm/core/focus-trap.d.ts +41 -0
- package/dist/esm/core/focus-trap.js +1 -0
- package/dist/esm/core/i18n.d.ts +82 -0
- package/dist/esm/core/i18n.js +1 -0
- package/dist/esm/core/scroll-lock.d.ts +19 -0
- package/dist/esm/core/scroll-lock.js +1 -0
- package/dist/esm/core/uid.d.ts +23 -0
- package/dist/esm/core/uid.js +1 -0
- package/dist/esm/helpers/toast.d.ts +10 -10
- package/dist/esm/helpers/toast.js +1 -1
- package/dist/esm/index.d.ts +12 -3
- package/dist/esm/index.js +1 -1
- package/dist/esm/node_modules/@designbasekorea/ui-contracts/dist/components.js +1 -0
- package/dist/esm/node_modules/@designbasekorea/ui-contracts/dist/primitives.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +583 -59
- package/dist/index.esm.js +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.d.ts +433 -55
- package/dist/react/index.esm.js +1 -1
- package/package.json +12 -3
- /package/dist/chunks/{lottie-26a5e98f.js → lottie-3f885725.js} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,275 @@
|
|
|
1
|
+
import { BadgeVariant, BadgeType, TIME_PICKER_FORMATS, DOWNLOAD_PROGRESS_STATUSES, DOWNLOAD_PROGRESS_POSITIONS, OTP_INPUT_SIZES, PHONE_VERIFY_SIZES, EMAIL_VERIFY_SIZES, TWO_FACTOR_SIZES, CHAT_ORB_SIZES, CHAT_ORB_VARIANTS, CHAT_ORB_STATES, CHAT_ORB_THEMES, CHAT_MESSAGE_ROLES, CHAT_WIDGET_VIEWS, CHAT_WIDGET_POSITIONS, ToastVariant, ToastPosition } from '@designbasekorea/ui-contracts';
|
|
2
|
+
export { ToastPosition as DbToastPosition, ToastVariant as DbToastVariant } from '@designbasekorea/ui-contracts';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 엘리먼트 id 생성.
|
|
6
|
+
*
|
|
7
|
+
* 각 컴포넌트가 `Math.random().toString(36)` 을 따로 굴리면 충돌 가능성이 있고,
|
|
8
|
+
* 무엇보다 SSR/스냅샷에서 diff 노이즈가 된다. 생성은 여기서만 한다.
|
|
9
|
+
*
|
|
10
|
+
* 규격: DX-UID
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* `prefix` 로 시작하는 문서 내 고유 id 를 만든다.
|
|
14
|
+
*
|
|
15
|
+
* `crypto.randomUUID` 가 있으면 그 앞 8자리를 쓰고, 없으면 증가 카운터로 폴백한다.
|
|
16
|
+
* 어느 쪽이든 한 문서 안에서는 절대 겹치지 않는다.
|
|
17
|
+
*/
|
|
18
|
+
declare function dbUid(prefix?: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* 엘리먼트에 id 가 없으면 만들어 붙이고, 그 id 를 돌려준다.
|
|
21
|
+
*
|
|
22
|
+
* `aria-labelledby` / `aria-controls` 배선에 쓴다 — 소비자가 직접 지정한 id 는 존중한다.
|
|
23
|
+
*/
|
|
24
|
+
declare function ensureId(el: Element, prefix?: string): string;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 정리(cleanup) 관리.
|
|
28
|
+
*
|
|
29
|
+
* `connectedCallback` 에서 등록한 리스너·타이머·observer 를 `disconnectedCallback`
|
|
30
|
+
* 에서 빠짐없이 해제하기 위한 도구. 등록과 해제를 한 줄로 묶어두면
|
|
31
|
+
* "add 는 했는데 remove 를 빠뜨리는" 실수가 구조적으로 불가능해진다.
|
|
32
|
+
*
|
|
33
|
+
* 규격: PERF-CLEANUP
|
|
34
|
+
*/
|
|
35
|
+
type Cleanup = () => void;
|
|
36
|
+
/** 해제 함수를 모아뒀다가 한 번에 실행하는 가방 */
|
|
37
|
+
declare class CleanupBag {
|
|
38
|
+
private items;
|
|
39
|
+
/** 해제 함수를 직접 등록 */
|
|
40
|
+
add(fn: Cleanup): void;
|
|
41
|
+
/** 리스너를 달고 해제 함수를 자동 등록 */
|
|
42
|
+
listen<T extends EventTarget>(target: T, type: string, handler: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
43
|
+
/** setTimeout — 해제 시 자동 clear */
|
|
44
|
+
timeout(fn: () => void, ms: number): number;
|
|
45
|
+
/** setInterval — 해제 시 자동 clear */
|
|
46
|
+
interval(fn: () => void, ms: number): number;
|
|
47
|
+
/** MutationObserver / ResizeObserver / IntersectionObserver 등록 */
|
|
48
|
+
observe<T extends {
|
|
49
|
+
disconnect(): void;
|
|
50
|
+
}>(observer: T): T;
|
|
51
|
+
/** 등록된 모든 해제 함수를 실행하고 비운다. 여러 번 호출해도 안전하다. */
|
|
52
|
+
run(): void;
|
|
53
|
+
}
|
|
54
|
+
/** 스크롤/리사이즈처럼 고빈도로 발생하는 핸들러를 프레임당 1회로 병합한다. (PERF-RAF) */
|
|
55
|
+
declare function rafThrottle<A extends unknown[]>(fn: (...args: A) => void): ((...args: A) => void) & {
|
|
56
|
+
cancel(): void;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* 포커스 트랩.
|
|
61
|
+
*
|
|
62
|
+
* 모달·드로어·바텀시트 같은 오버레이가 열려 있는 동안 Tab 이 오버레이 밖으로
|
|
63
|
+
* 새어나가지 않게 하고, 닫을 때 **열기 직전에 포커스를 갖고 있던 요소로 되돌린다**.
|
|
64
|
+
* 포커스 복원이 없으면 키보드 사용자는 모달을 닫는 순간 문서 맨 앞으로 튕긴다.
|
|
65
|
+
*
|
|
66
|
+
* 규격: A11Y-TRAP, A11Y-AUTOFOCUS
|
|
67
|
+
*/
|
|
68
|
+
/** 컨테이너 안에서 Tab 순서대로 포커스 가능한 요소들 */
|
|
69
|
+
declare function getTabbables(container: HTMLElement): HTMLElement[];
|
|
70
|
+
interface FocusTrapOptions {
|
|
71
|
+
/**
|
|
72
|
+
* 활성화 시 포커스를 받을 요소.
|
|
73
|
+
* 지정하지 않으면 `[autofocus]` → 첫 포커서블 → 컨테이너 순으로 결정한다.
|
|
74
|
+
*/
|
|
75
|
+
initialFocus?: HTMLElement | (() => HTMLElement | null) | null;
|
|
76
|
+
/** 해제 시 포커스를 돌려줄 요소. 기본값은 활성화 직전의 `document.activeElement` */
|
|
77
|
+
returnFocus?: HTMLElement | null;
|
|
78
|
+
/** 포커스 복원을 끄고 싶을 때 (기본 true) */
|
|
79
|
+
restoreFocus?: boolean;
|
|
80
|
+
}
|
|
81
|
+
interface FocusTrap {
|
|
82
|
+
activate(): void;
|
|
83
|
+
deactivate(): void;
|
|
84
|
+
/** 컨테이너 내용이 바뀌었을 때 포커서블 목록을 다시 계산할 필요는 없다 — 매번 조회하므로 no-op 호환용 */
|
|
85
|
+
readonly active: boolean;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* `container` 안에 포커스를 가두는 트랩을 만든다.
|
|
89
|
+
*
|
|
90
|
+
* ```ts
|
|
91
|
+
* this.trap = createFocusTrap(panel);
|
|
92
|
+
* this.trap.activate(); // 열 때
|
|
93
|
+
* this.trap.deactivate(); // 닫을 때 — 포커스가 트리거로 돌아간다
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
declare function createFocusTrap(container: HTMLElement, options?: FocusTrapOptions): FocusTrap;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* 문서 스크롤 잠금.
|
|
100
|
+
*
|
|
101
|
+
* 각 오버레이가 `document.body.style.overflow` 를 직접 만지면, 모달 위에 드로어를
|
|
102
|
+
* 띄웠다가 드로어만 닫는 순간 스크롤락이 통째로 풀린다. 잠금은 참조 카운트로만 관리한다.
|
|
103
|
+
*
|
|
104
|
+
* 규격: PERF-GLOBAL-STATE
|
|
105
|
+
*/
|
|
106
|
+
/**
|
|
107
|
+
* 문서 스크롤을 잠근다. 중첩 호출은 카운트되며, 같은 횟수만큼 `unlockScroll()`
|
|
108
|
+
* 해야 실제로 풀린다.
|
|
109
|
+
*/
|
|
110
|
+
declare function lockScroll(): void;
|
|
111
|
+
/** `lockScroll()` 을 되돌린다. 카운트가 0 이 될 때만 실제로 해제된다. */
|
|
112
|
+
declare function unlockScroll(): void;
|
|
113
|
+
/** 현재 잠금 카운트 — 테스트/디버깅용 */
|
|
114
|
+
declare function scrollLockDepth(): number;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* 접근성 런타임 유틸.
|
|
118
|
+
*
|
|
119
|
+
* 규격: A11Y-LIVE, A11Y-NAME
|
|
120
|
+
*/
|
|
121
|
+
type Politeness = 'polite' | 'assertive';
|
|
122
|
+
/**
|
|
123
|
+
* 스크린리더에 메시지를 알린다.
|
|
124
|
+
*
|
|
125
|
+
* @param message 읽어줄 문장
|
|
126
|
+
* @param politeness `polite` 는 현재 읽는 것을 끝낸 뒤, `assertive` 는 즉시 끼어든다.
|
|
127
|
+
* 오류·경고에만 assertive 를 쓴다.
|
|
128
|
+
*/
|
|
129
|
+
declare function announce(message: string, politeness?: Politeness): void;
|
|
130
|
+
/** 피드백 톤에 맞는 politeness. danger/warning 만 즉시 끼어든다. */
|
|
131
|
+
declare function politenessForTone(tone: string): Politeness;
|
|
132
|
+
/**
|
|
133
|
+
* 접근 가능한 이름을 붙인다.
|
|
134
|
+
*
|
|
135
|
+
* 보이는 텍스트가 이미 있으면 `aria-label` 로 덮어쓰지 않는다 — 스크린리더 사용자와
|
|
136
|
+
* 음성 제어 사용자가 서로 다른 이름을 보게 되는 문제를 막는다.
|
|
137
|
+
*/
|
|
138
|
+
declare function setAccessibleName(el: HTMLElement, name: string): void;
|
|
139
|
+
/** 시각적으로만 감춘 텍스트 노드를 만든다 (스크린리더는 읽음) */
|
|
140
|
+
declare function createSrOnly(text: string): HTMLSpanElement;
|
|
141
|
+
/**
|
|
142
|
+
* 네이티브가 아닌 요소(`role="button"` 을 얹은 div 등)에 Enter/Space 활성화를 붙인다.
|
|
143
|
+
*
|
|
144
|
+
* 네이티브 `<button>` 은 브라우저가 이걸 해 주지만, 커스텀 엘리먼트 호스트에
|
|
145
|
+
* role 만 얹은 경우에는 직접 배선해야 마우스와 키보드가 같아진다.
|
|
146
|
+
*
|
|
147
|
+
* 규격: A11Y-KEYBOARD
|
|
148
|
+
*
|
|
149
|
+
* @returns 등록을 해제하는 함수
|
|
150
|
+
*/
|
|
151
|
+
declare function activateOnKey(el: HTMLElement, options?: {
|
|
152
|
+
isDisabled?: () => boolean;
|
|
153
|
+
}): () => void;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* 사용자 노출 문자열.
|
|
157
|
+
*
|
|
158
|
+
* 컴포넌트 소스에 `'모달 닫기'` 같은 한국어를 박아두면 한국어 외 서비스에서는
|
|
159
|
+
* 스크린리더가 엉뚱한 언어를 읽는다. 문자열은 전부 여기를 통과시키고,
|
|
160
|
+
* 소비자가 `dbSetLocale()` 로 덮어쓸 수 있게 한다.
|
|
161
|
+
*
|
|
162
|
+
* 기본값은 현재 소스에 박혀 있던 한국어 그대로다 — 동작 변화 없이 교체 지점만 생긴다.
|
|
163
|
+
*
|
|
164
|
+
* 규격: DX-I18N
|
|
165
|
+
*/
|
|
166
|
+
/** 컴포넌트가 쓰는 문자열 키 → 기본(한국어) 값 */
|
|
167
|
+
declare const DEFAULT_STRINGS: {
|
|
168
|
+
readonly close: "닫기";
|
|
169
|
+
readonly 'modal.close': "모달 닫기";
|
|
170
|
+
readonly 'drawer.close': "드로어 닫기";
|
|
171
|
+
readonly 'dialog.close': "대화상자 닫기";
|
|
172
|
+
readonly 'toast.close': "알림 닫기";
|
|
173
|
+
readonly clear: "지우기";
|
|
174
|
+
readonly clearAll: "모든 값 지우기";
|
|
175
|
+
readonly loading: "로딩 중";
|
|
176
|
+
readonly required: "필수";
|
|
177
|
+
readonly optional: "선택";
|
|
178
|
+
readonly error: "오류";
|
|
179
|
+
readonly success: "성공";
|
|
180
|
+
readonly warning: "경고";
|
|
181
|
+
readonly info: "안내";
|
|
182
|
+
readonly previous: "이전";
|
|
183
|
+
readonly next: "다음";
|
|
184
|
+
readonly 'select.placeholder': "선택하세요";
|
|
185
|
+
readonly 'select.noResults': "결과 없음";
|
|
186
|
+
readonly 'tabs.label': "탭 목록";
|
|
187
|
+
readonly 'pagination.label': "페이지 번호";
|
|
188
|
+
readonly 'search.label': "검색";
|
|
189
|
+
readonly 'media.play': "재생";
|
|
190
|
+
readonly 'media.pause': "일시정지";
|
|
191
|
+
readonly 'media.mute': "음소거";
|
|
192
|
+
readonly 'media.unmute': "음소거 해제";
|
|
193
|
+
readonly 'media.settings': "설정";
|
|
194
|
+
readonly 'media.shuffle': "셔플";
|
|
195
|
+
readonly 'media.repeat': "반복";
|
|
196
|
+
readonly 'media.previous': "이전 트랙";
|
|
197
|
+
readonly 'media.next': "다음 트랙";
|
|
198
|
+
readonly 'media.fullscreen': "전체화면";
|
|
199
|
+
readonly 'carousel.previous': "이전 슬라이드";
|
|
200
|
+
readonly 'carousel.next': "다음 슬라이드";
|
|
201
|
+
readonly 'breadcrumbs.expand': "생략된 경로 펼치기";
|
|
202
|
+
readonly 'input.showPassword': "비밀번호 보기";
|
|
203
|
+
readonly 'input.hidePassword': "비밀번호 숨기기";
|
|
204
|
+
readonly 'input.clearSearch': "검색어 지우기";
|
|
205
|
+
readonly 'verify.done': "인증 완료";
|
|
206
|
+
readonly 'verify.phoneDone': "휴대폰 번호 인증이 완료되었습니다.";
|
|
207
|
+
};
|
|
208
|
+
type DbStringKey = keyof typeof DEFAULT_STRINGS;
|
|
209
|
+
type DbStrings = Partial<Record<DbStringKey, string>> & Record<string, string>;
|
|
210
|
+
/**
|
|
211
|
+
* 문자열을 전역으로 덮어쓴다. 앱 부트스트랩에서 한 번 호출한다.
|
|
212
|
+
*
|
|
213
|
+
* ```ts
|
|
214
|
+
* dbSetLocale({ 'modal.close': 'Close dialog', close: 'Close' });
|
|
215
|
+
* ```
|
|
216
|
+
*/
|
|
217
|
+
declare function dbSetLocale(strings: DbStrings): void;
|
|
218
|
+
/** 현재 적용된 오버라이드를 모두 지운다 (테스트용) */
|
|
219
|
+
declare function dbResetLocale(): void;
|
|
220
|
+
/**
|
|
221
|
+
* 문자열을 조회한다.
|
|
222
|
+
*
|
|
223
|
+
* @param key 문자열 키
|
|
224
|
+
* @param fallback 키가 사전에 없을 때 쓸 값
|
|
225
|
+
*/
|
|
226
|
+
declare function t(key: DbStringKey | string, fallback?: string): string;
|
|
227
|
+
/**
|
|
228
|
+
* 엘리먼트에서 라벨을 읽는다 — 소비자가 준 속성이 항상 우선한다.
|
|
229
|
+
*
|
|
230
|
+
* 컴포넌트는 `label-close` 같은 속성으로 개별 오버라이드를 받고,
|
|
231
|
+
* 없으면 전역 로케일로 폴백한다.
|
|
232
|
+
*/
|
|
233
|
+
declare function labelFrom(el: Element, attribute: string, key: DbStringKey | string): string;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* 선택적 베이스 클래스.
|
|
237
|
+
*
|
|
238
|
+
* 기존 130개 컴포넌트는 전부 `extends HTMLElement` 이며 그대로 동작한다.
|
|
239
|
+
* 새 컴포넌트나 개선 대상만 이 클래스를 상속하면 정리(cleanup)와 이벤트 발행이
|
|
240
|
+
* 규격에 맞게 강제된다. **상속은 강제가 아니다.**
|
|
241
|
+
*
|
|
242
|
+
* 규격: PERF-CLEANUP, STD-EVENT
|
|
243
|
+
*/
|
|
244
|
+
|
|
245
|
+
declare abstract class DbElement extends HTMLElement {
|
|
246
|
+
/**
|
|
247
|
+
* `connectedCallback` 에서 등록한 것들을 담아두는 가방.
|
|
248
|
+
* `disconnectedCallback` 에서 자동으로 비워진다.
|
|
249
|
+
*/
|
|
250
|
+
protected readonly cleanups: CleanupBag;
|
|
251
|
+
/**
|
|
252
|
+
* 하위 클래스는 `disconnectedCallback` 을 오버라이드할 때 반드시
|
|
253
|
+
* `super.disconnectedCallback()` 을 호출해야 한다.
|
|
254
|
+
*/
|
|
255
|
+
disconnectedCallback(): void;
|
|
256
|
+
/**
|
|
257
|
+
* 규격에 맞는 커스텀 이벤트를 발행한다 — `db-` 접두사 + bubbles + composed.
|
|
258
|
+
*
|
|
259
|
+
* @returns `preventDefault()` 되지 않았으면 true
|
|
260
|
+
*/
|
|
261
|
+
protected dbEmit<T>(name: string, detail?: T, options?: {
|
|
262
|
+
cancelable?: boolean;
|
|
263
|
+
}): boolean;
|
|
264
|
+
/**
|
|
265
|
+
* 커스텀 엘리먼트가 정의되기 **전에** 프레임워크가 프로퍼티로 값을 넣어둔 경우,
|
|
266
|
+
* 그 값은 인스턴스 자체 프로퍼티로 남아 접근자를 가린다. 정의 후 회수한다.
|
|
267
|
+
*
|
|
268
|
+
* 규격: STD-UPGRADE
|
|
269
|
+
*/
|
|
270
|
+
protected upgradeProperties(names: string[]): void;
|
|
271
|
+
}
|
|
272
|
+
|
|
1
273
|
/**
|
|
2
274
|
* Light DOM custom element for the canonical web Button.
|
|
3
275
|
*
|
|
@@ -6,10 +278,15 @@
|
|
|
6
278
|
*/
|
|
7
279
|
declare class DbButton extends HTMLElement {
|
|
8
280
|
static get observedAttributes(): string[];
|
|
281
|
+
/**
|
|
282
|
+
* 계약에 없는 값이 attribute 로 들어오면 기본값으로 되돌린다 — throw 하지 않는다.
|
|
283
|
+
* 커스텀 엘리먼트의 attribute 는 임의 문자열을 받으므로 타입으로 막을 수 없다. (STD-COERCE)
|
|
284
|
+
*/
|
|
9
285
|
get variant(): string;
|
|
10
286
|
set variant(value: string);
|
|
11
287
|
get size(): string;
|
|
12
288
|
set size(value: string);
|
|
289
|
+
/** 빈 값은 "사이즈에 따라 자동" 을 뜻하므로 계약값에 포함되지 않아도 유효하다 */
|
|
13
290
|
get radius(): string;
|
|
14
291
|
set radius(value: string);
|
|
15
292
|
get accentStyle(): string;
|
|
@@ -42,6 +319,14 @@ declare class DbButton extends HTMLElement {
|
|
|
42
319
|
private getDefaultRadiusClass;
|
|
43
320
|
private syncRadius;
|
|
44
321
|
private syncAccentStyle;
|
|
322
|
+
/**
|
|
323
|
+
* outline 스타일의 회전하는 테두리 글로우.
|
|
324
|
+
*
|
|
325
|
+
* conic-gradient 의 각도를 직접 애니메이션하려면 `@property` 가 필요해 기준선이 올라간다.
|
|
326
|
+
* 대신 넘치는 정사각형을 `overflow: hidden` 컨테이너 안에서 회전시키고,
|
|
327
|
+
* 컨테이너의 `::after` 가 안쪽을 덮어 1.5px 테두리만 남기는 방식을 쓴다.
|
|
328
|
+
*/
|
|
329
|
+
private syncAccentRing;
|
|
45
330
|
private syncAccentField;
|
|
46
331
|
private syncModifier;
|
|
47
332
|
private syncBooleanModifier;
|
|
@@ -55,6 +340,8 @@ declare global {
|
|
|
55
340
|
}
|
|
56
341
|
|
|
57
342
|
declare class DbInput extends HTMLElement {
|
|
343
|
+
/** 현재 렌더된 DOM 구조의 형태 키 — 바뀔 때만 재구축한다 (PERF-RECONCILE) */
|
|
344
|
+
private shapeKey;
|
|
58
345
|
static get observedAttributes(): string[];
|
|
59
346
|
private input?;
|
|
60
347
|
private passwordVisible;
|
|
@@ -84,6 +371,11 @@ declare class DbInput extends HTMLElement {
|
|
|
84
371
|
private resolveIconName;
|
|
85
372
|
private resolveStartIcon;
|
|
86
373
|
private getCurrentValue;
|
|
374
|
+
/**
|
|
375
|
+
* DOM 골격을 만든다. 구조가 실제로 달라질 때만 호출되며,
|
|
376
|
+
* 그 외에는 render() 가 기존 노드의 속성만 갱신한다.
|
|
377
|
+
*/
|
|
378
|
+
private buildStructure;
|
|
87
379
|
private render;
|
|
88
380
|
private mountIcons;
|
|
89
381
|
private shouldShowPasswordValidation;
|
|
@@ -111,6 +403,8 @@ declare class DbCheckbox extends HTMLElement {
|
|
|
111
403
|
private visual?;
|
|
112
404
|
private labelEl?;
|
|
113
405
|
private built;
|
|
406
|
+
private userInteracted;
|
|
407
|
+
private readonly cleanups;
|
|
114
408
|
get checked(): boolean;
|
|
115
409
|
set checked(value: boolean);
|
|
116
410
|
get indeterminate(): boolean;
|
|
@@ -121,13 +415,22 @@ declare class DbCheckbox extends HTMLElement {
|
|
|
121
415
|
set readOnly(value: boolean);
|
|
122
416
|
get required(): boolean;
|
|
123
417
|
set required(value: boolean);
|
|
418
|
+
/** 계약에 없는 값은 기본값으로 되돌린다 — throw 하지 않는다 (STD-COERCE) */
|
|
124
419
|
get size(): string;
|
|
125
420
|
set size(value: string);
|
|
126
421
|
connectedCallback(): void;
|
|
422
|
+
disconnectedCallback(): void;
|
|
423
|
+
/** form.reset() 이후 네이티브 input 의 실제 상태를 호스트 attribute 로 되돌린다 */
|
|
424
|
+
private syncAfterReset;
|
|
127
425
|
attributeChangedCallback(name: string): void;
|
|
128
426
|
private get hasLabel();
|
|
129
427
|
private build;
|
|
130
428
|
private handleChange;
|
|
429
|
+
/**
|
|
430
|
+
* 네이티브 검증 상태를 보조기술에 노출한다.
|
|
431
|
+
* 값 자체는 네이티브 input 이 폼에 싣고, 여기서는 표현만 맞춘다.
|
|
432
|
+
*/
|
|
433
|
+
private syncValidity;
|
|
131
434
|
private syncState;
|
|
132
435
|
private syncVisual;
|
|
133
436
|
private syncClasses;
|
|
@@ -145,6 +448,8 @@ declare class DbToggle extends HTMLElement {
|
|
|
145
448
|
private root?;
|
|
146
449
|
private labelEl?;
|
|
147
450
|
private built;
|
|
451
|
+
/** default-checked 는 초기값일 뿐 — 한 번 조작하면 checked/selected 만 본다 */
|
|
452
|
+
private userInteracted;
|
|
148
453
|
get checked(): boolean;
|
|
149
454
|
set checked(value: boolean);
|
|
150
455
|
get name(): string;
|
|
@@ -178,8 +483,8 @@ declare class DbBadge extends HTMLElement {
|
|
|
178
483
|
set variant(value: string);
|
|
179
484
|
get size(): string;
|
|
180
485
|
set size(value: string);
|
|
181
|
-
get
|
|
182
|
-
set
|
|
486
|
+
get type(): string;
|
|
487
|
+
set type(value: string);
|
|
183
488
|
get count(): number | undefined;
|
|
184
489
|
set count(value: number | undefined);
|
|
185
490
|
get maxCount(): number;
|
|
@@ -230,6 +535,10 @@ declare global {
|
|
|
230
535
|
}
|
|
231
536
|
|
|
232
537
|
declare class DbSpinner extends HTMLElement {
|
|
538
|
+
/** 현재 그려진 스피너 타입 — 바뀔 때만 그래픽을 다시 만든다 */
|
|
539
|
+
private renderedType?;
|
|
540
|
+
private graphicEl?;
|
|
541
|
+
private labelEl?;
|
|
233
542
|
static get observedAttributes(): string[];
|
|
234
543
|
get type(): string;
|
|
235
544
|
set type(value: string);
|
|
@@ -359,6 +668,7 @@ declare class DbModal extends HTMLElement {
|
|
|
359
668
|
private segmentEl?;
|
|
360
669
|
private contentEl?;
|
|
361
670
|
private titleId;
|
|
671
|
+
private focusTrap?;
|
|
362
672
|
private isMounted;
|
|
363
673
|
private internalTabId;
|
|
364
674
|
private internalSegment;
|
|
@@ -398,7 +708,16 @@ declare class DbModal extends HTMLElement {
|
|
|
398
708
|
private exitTimerId;
|
|
399
709
|
private syncVisibility;
|
|
400
710
|
private syncOpenState;
|
|
711
|
+
/** 열릴 때 포커스를 패널 안으로 가둔다. 닫으면 직전 포커스 요소로 복원된다. */
|
|
712
|
+
private activateFocusTrap;
|
|
401
713
|
private teardown;
|
|
714
|
+
/** 소비자가 `role="alertdialog"` 를 지정하지 않으면 dialog */
|
|
715
|
+
private dialogRole;
|
|
716
|
+
/**
|
|
717
|
+
* 본문 설명을 대화상자에 연결한다.
|
|
718
|
+
* `describedby` 로 id 를 직접 주거나, 없으면 본문 컨테이너를 자동으로 가리킨다.
|
|
719
|
+
*/
|
|
720
|
+
private syncDescribedBy;
|
|
402
721
|
private close;
|
|
403
722
|
private handleDocumentKeyDown;
|
|
404
723
|
}
|
|
@@ -678,6 +997,14 @@ declare class DbSelect extends HTMLElement {
|
|
|
678
997
|
private getFilteredOptions;
|
|
679
998
|
private selectOption;
|
|
680
999
|
private dispatchChange;
|
|
1000
|
+
/**
|
|
1001
|
+
* combobox 트리거에 접근 가능한 이름을 붙인다.
|
|
1002
|
+
*
|
|
1003
|
+
* 트리거는 `<div role="combobox">` 라서 `<label for>` 로는 연결되지 않는다.
|
|
1004
|
+
* 라벨이 있으면 `aria-labelledby`, 없으면 소비자가 준 `aria-label`,
|
|
1005
|
+
* 그것도 없으면 placeholder 를 이름으로 쓴다. (A11Y-NAME)
|
|
1006
|
+
*/
|
|
1007
|
+
private syncAccessibleName;
|
|
681
1008
|
private syncState;
|
|
682
1009
|
private syncOpenState;
|
|
683
1010
|
private syncTrigger;
|
|
@@ -730,6 +1057,7 @@ declare class DbRadio extends HTMLElement {
|
|
|
730
1057
|
private dot?;
|
|
731
1058
|
private labelEl?;
|
|
732
1059
|
private built;
|
|
1060
|
+
private userInteracted;
|
|
733
1061
|
get checked(): boolean;
|
|
734
1062
|
set checked(value: boolean);
|
|
735
1063
|
get disabled(): boolean;
|
|
@@ -956,6 +1284,8 @@ declare global {
|
|
|
956
1284
|
declare class DbBackdrop extends HTMLElement {
|
|
957
1285
|
static get observedAttributes(): string[];
|
|
958
1286
|
private portal?;
|
|
1287
|
+
/** 참조 카운트 스크롤락을 이 인스턴스가 잡고 있는지 (PERF-GLOBAL-STATE) */
|
|
1288
|
+
private scrollLocked;
|
|
959
1289
|
private keyHandler;
|
|
960
1290
|
get open(): boolean;
|
|
961
1291
|
set open(value: boolean);
|
|
@@ -969,6 +1299,8 @@ declare class DbBackdrop extends HTMLElement {
|
|
|
969
1299
|
private detachListeners;
|
|
970
1300
|
private handlePortalClick;
|
|
971
1301
|
private render;
|
|
1302
|
+
/** 잠근 적이 있을 때만 푼다 — 참조 카운트가 음수로 새지 않도록 */
|
|
1303
|
+
private releaseScrollLock;
|
|
972
1304
|
}
|
|
973
1305
|
declare global {
|
|
974
1306
|
interface HTMLElementTagNameMap {
|
|
@@ -1042,15 +1374,19 @@ declare class DbDrawer extends HTMLElement {
|
|
|
1042
1374
|
private root?;
|
|
1043
1375
|
private overlay?;
|
|
1044
1376
|
private container?;
|
|
1377
|
+
private focusTrap?;
|
|
1045
1378
|
private contentEl?;
|
|
1046
1379
|
private isMounted;
|
|
1047
1380
|
private isActive;
|
|
1048
1381
|
private enterFrame?;
|
|
1049
1382
|
private exitTimer?;
|
|
1050
|
-
|
|
1383
|
+
/** 참조 카운트 스크롤락을 이 인스턴스가 잡고 있는지 (PERF-GLOBAL-STATE) */
|
|
1384
|
+
private scrollLocked;
|
|
1051
1385
|
private keyHandler;
|
|
1052
1386
|
connectedCallback(): void;
|
|
1053
1387
|
disconnectedCallback(): void;
|
|
1388
|
+
/** 잠근 적이 있을 때만 푼다 — 카운트가 음수로 새지 않도록 */
|
|
1389
|
+
private releaseScrollLock;
|
|
1054
1390
|
attributeChangedCallback(name: string): void;
|
|
1055
1391
|
private isOpenRequested;
|
|
1056
1392
|
private clearTimers;
|
|
@@ -1074,14 +1410,21 @@ declare class DbToast extends HTMLElement {
|
|
|
1074
1410
|
private progressInterval;
|
|
1075
1411
|
private closeTimerId;
|
|
1076
1412
|
private closed;
|
|
1413
|
+
private readonly cleanups;
|
|
1414
|
+
/** 일시정지 시점까지 소비한 시간 (ms) */
|
|
1415
|
+
private elapsedBeforePause;
|
|
1416
|
+
private runStartedAt;
|
|
1417
|
+
private paused;
|
|
1077
1418
|
connectedCallback(): void;
|
|
1078
1419
|
disconnectedCallback(): void;
|
|
1420
|
+
private pauseTimers;
|
|
1421
|
+
private resumeTimers;
|
|
1079
1422
|
attributeChangedCallback(name: string): void;
|
|
1080
1423
|
private clearTimers;
|
|
1081
1424
|
private startTimers;
|
|
1082
1425
|
/** 토스트를 닫고(애니메이션 포함) auto-remove 설정 시 DOM에서 제거합니다. */
|
|
1083
1426
|
close(): void;
|
|
1084
|
-
private
|
|
1427
|
+
private iconForVariant;
|
|
1085
1428
|
private render;
|
|
1086
1429
|
}
|
|
1087
1430
|
declare global {
|
|
@@ -1094,8 +1437,13 @@ declare class DbConfirm extends HTMLElement {
|
|
|
1094
1437
|
static get observedAttributes(): string[];
|
|
1095
1438
|
private root;
|
|
1096
1439
|
private keyHandler;
|
|
1440
|
+
private focusTrap?;
|
|
1441
|
+
/** 참조 카운트 스크롤락을 이 인스턴스가 잡고 있는지 (PERF-GLOBAL-STATE) */
|
|
1442
|
+
private scrollLocked;
|
|
1097
1443
|
connectedCallback(): void;
|
|
1098
1444
|
disconnectedCallback(): void;
|
|
1445
|
+
/** 트랩 해제(=포커스 복원)와 스크롤락 반환을 한 곳에서 처리한다 */
|
|
1446
|
+
private teardownOverlay;
|
|
1099
1447
|
attributeChangedCallback(): void;
|
|
1100
1448
|
private isOpen;
|
|
1101
1449
|
private attachEscape;
|
|
@@ -1394,6 +1742,42 @@ declare global {
|
|
|
1394
1742
|
}
|
|
1395
1743
|
}
|
|
1396
1744
|
|
|
1745
|
+
type DbActivityHeatmapItem = {
|
|
1746
|
+
date: string;
|
|
1747
|
+
value: number;
|
|
1748
|
+
};
|
|
1749
|
+
type DbActivityHeatmapCellDetail = {
|
|
1750
|
+
date: string;
|
|
1751
|
+
value: number;
|
|
1752
|
+
level: number;
|
|
1753
|
+
};
|
|
1754
|
+
declare class DbActivityHeatmap extends HTMLElement {
|
|
1755
|
+
static get observedAttributes(): string[];
|
|
1756
|
+
connectedCallback(): void;
|
|
1757
|
+
disconnectedCallback(): void;
|
|
1758
|
+
attributeChangedCallback(): void;
|
|
1759
|
+
private handleClick;
|
|
1760
|
+
private parseData;
|
|
1761
|
+
private parseEndDate;
|
|
1762
|
+
private parseISODate;
|
|
1763
|
+
private formatISODate;
|
|
1764
|
+
private addDays;
|
|
1765
|
+
private startOfWeek;
|
|
1766
|
+
private isAfter;
|
|
1767
|
+
private buildWeeks;
|
|
1768
|
+
private resolveLevel;
|
|
1769
|
+
private formatMonthLabel;
|
|
1770
|
+
private formatTooltip;
|
|
1771
|
+
private getDayLabels;
|
|
1772
|
+
private getMonthLabels;
|
|
1773
|
+
private render;
|
|
1774
|
+
}
|
|
1775
|
+
declare global {
|
|
1776
|
+
interface HTMLElementTagNameMap {
|
|
1777
|
+
'db-activity-heatmap': DbActivityHeatmap;
|
|
1778
|
+
}
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1397
1781
|
declare class DbImage extends HTMLElement {
|
|
1398
1782
|
private imageState;
|
|
1399
1783
|
private currentSrc;
|
|
@@ -1485,6 +1869,10 @@ interface DbLightboxImage {
|
|
|
1485
1869
|
}
|
|
1486
1870
|
declare class DbLightbox extends HTMLElement {
|
|
1487
1871
|
private portalEl;
|
|
1872
|
+
private focusTrap?;
|
|
1873
|
+
/** 참조 카운트 스크롤락을 이 인스턴스가 잡고 있는지 (PERF-GLOBAL-STATE) */
|
|
1874
|
+
private scrollLocked;
|
|
1875
|
+
private readonly titleId;
|
|
1488
1876
|
private imageEl;
|
|
1489
1877
|
private loadingEl;
|
|
1490
1878
|
private errorEl;
|
|
@@ -1592,8 +1980,8 @@ interface DbNavbarUserProfile {
|
|
|
1592
1980
|
email?: string;
|
|
1593
1981
|
avatar?: string;
|
|
1594
1982
|
badge?: number;
|
|
1595
|
-
badgeVariant?:
|
|
1596
|
-
|
|
1983
|
+
badgeVariant?: BadgeVariant;
|
|
1984
|
+
badgeType?: BadgeType;
|
|
1597
1985
|
badgeText?: string;
|
|
1598
1986
|
}
|
|
1599
1987
|
declare class DbNavbar extends HTMLElement {
|
|
@@ -1726,7 +2114,7 @@ interface DbSidebarItem {
|
|
|
1726
2114
|
selected?: boolean;
|
|
1727
2115
|
/** 프로필 메뉴에서 이 항목 앞에 구분선을 표시합니다. */
|
|
1728
2116
|
dividerBefore?: boolean;
|
|
1729
|
-
/** 클릭 시 이동할 사이드바 패널 id (예: settings) */
|
|
2117
|
+
/** 클릭 시 이동할 사이드바 패널 id (예: authentication, settings) */
|
|
1730
2118
|
openPanel?: string;
|
|
1731
2119
|
children?: DbSidebarItem[];
|
|
1732
2120
|
}
|
|
@@ -1737,6 +2125,20 @@ interface DbSidebarSection {
|
|
|
1737
2125
|
gap?: 'none' | 's' | 'm' | 'l';
|
|
1738
2126
|
items: DbSidebarItem[];
|
|
1739
2127
|
}
|
|
2128
|
+
type DbSidebarPanelMode = 'auto' | 'adjacent' | 'replace';
|
|
2129
|
+
interface DbSidebarPanel {
|
|
2130
|
+
id: string;
|
|
2131
|
+
title: string;
|
|
2132
|
+
description?: string;
|
|
2133
|
+
ariaLabel?: string;
|
|
2134
|
+
backLabel?: string;
|
|
2135
|
+
/**
|
|
2136
|
+
* @deprecated 레이아웃 폭은 전역 `panel-width`만 사용합니다.
|
|
2137
|
+
* 패널마다 다른 폭을 주면 adjacent에서 폭이 흔들립니다.
|
|
2138
|
+
*/
|
|
2139
|
+
width?: number | string;
|
|
2140
|
+
sections: DbSidebarSection[];
|
|
2141
|
+
}
|
|
1740
2142
|
interface DbSidebarUserProfile {
|
|
1741
2143
|
name: string;
|
|
1742
2144
|
email?: string;
|
|
@@ -1778,6 +2180,9 @@ declare class DbSidebar extends HTMLElement {
|
|
|
1778
2180
|
private flyoutCloseTimer;
|
|
1779
2181
|
private userFlyoutCloseTimer;
|
|
1780
2182
|
private outsideHandler;
|
|
2183
|
+
private panelMediaQuery;
|
|
2184
|
+
private panelMediaHandler;
|
|
2185
|
+
private resolvedPanelMode;
|
|
1781
2186
|
/**
|
|
1782
2187
|
* db-sidebar는 Light DOM으로 렌더링하므로 이름 있는 자식 요소를 직접 보존하고
|
|
1783
2188
|
* 해당 내비게이션 영역으로 이동해 슬롯처럼 투영합니다.
|
|
@@ -1788,7 +2193,9 @@ declare class DbSidebar extends HTMLElement {
|
|
|
1788
2193
|
static get observedAttributes(): string[];
|
|
1789
2194
|
connectedCallback(): void;
|
|
1790
2195
|
disconnectedCallback(): void;
|
|
1791
|
-
attributeChangedCallback(name: string): void;
|
|
2196
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
2197
|
+
private bindPanelMediaQuery;
|
|
2198
|
+
private unbindPanelMediaQuery;
|
|
1792
2199
|
private seedExpanded;
|
|
1793
2200
|
get items(): DbSidebarItem[];
|
|
1794
2201
|
set items(value: DbSidebarItem[] | string);
|
|
@@ -1826,12 +2233,27 @@ declare class DbSidebar extends HTMLElement {
|
|
|
1826
2233
|
set backLabel(value: string);
|
|
1827
2234
|
get backHref(): string;
|
|
1828
2235
|
set backHref(value: string);
|
|
2236
|
+
get panels(): DbSidebarPanel[];
|
|
2237
|
+
set panels(value: DbSidebarPanel[] | string);
|
|
2238
|
+
/**
|
|
2239
|
+
* @deprecated panels를 사용하세요. 기존 settings-sections는 settings 패널로 자동 변환됩니다.
|
|
2240
|
+
*/
|
|
1829
2241
|
get settingsSections(): DbSidebarSection[];
|
|
1830
2242
|
set settingsSections(value: DbSidebarSection[] | string);
|
|
1831
2243
|
get activePanel(): string;
|
|
1832
2244
|
set activePanel(value: string);
|
|
2245
|
+
get panelMode(): DbSidebarPanelMode;
|
|
2246
|
+
set panelMode(value: DbSidebarPanelMode);
|
|
2247
|
+
get panelWidth(): string;
|
|
2248
|
+
set panelWidth(value: string | number);
|
|
2249
|
+
get panelBreakpoint(): number;
|
|
2250
|
+
set panelBreakpoint(value: number);
|
|
2251
|
+
private normalizeCssLength;
|
|
1833
2252
|
private parseSettingsSections;
|
|
1834
|
-
private
|
|
2253
|
+
private parsePanels;
|
|
2254
|
+
private hasPanels;
|
|
2255
|
+
private findPanel;
|
|
2256
|
+
private getActivePanelConfig;
|
|
1835
2257
|
private parseSections;
|
|
1836
2258
|
private parseUserMenuItems;
|
|
1837
2259
|
private parseUserProfile;
|
|
@@ -1852,7 +2274,6 @@ declare class DbSidebar extends HTMLElement {
|
|
|
1852
2274
|
private setUserFlyout;
|
|
1853
2275
|
private scheduleUserFlyoutClose;
|
|
1854
2276
|
private syncHostClasses;
|
|
1855
|
-
private syncActivePanelTrack;
|
|
1856
2277
|
private navigateToPanel;
|
|
1857
2278
|
private dispatchItemClick;
|
|
1858
2279
|
private dispatchUserMenuItemClick;
|
|
@@ -1873,8 +2294,10 @@ declare class DbSidebar extends HTMLElement {
|
|
|
1873
2294
|
private createUserDropdown;
|
|
1874
2295
|
private createUpdateBanner;
|
|
1875
2296
|
private createPromoBanner;
|
|
1876
|
-
private
|
|
2297
|
+
private createMainHeader;
|
|
2298
|
+
private createPanelHeader;
|
|
1877
2299
|
private createNavWrapper;
|
|
2300
|
+
private createFooter;
|
|
1878
2301
|
private render;
|
|
1879
2302
|
}
|
|
1880
2303
|
declare global {
|
|
@@ -1965,10 +2388,6 @@ declare global {
|
|
|
1965
2388
|
}
|
|
1966
2389
|
}
|
|
1967
2390
|
|
|
1968
|
-
/**
|
|
1969
|
-
* RangeSlider Web Component
|
|
1970
|
-
* packages/ui RangeSlider.tsx와 DOM·동작·스타일 1:1 동기화
|
|
1971
|
-
*/
|
|
1972
2391
|
declare class DbRangeSlider extends HTMLElement {
|
|
1973
2392
|
static get observedAttributes(): string[];
|
|
1974
2393
|
private built;
|
|
@@ -2024,6 +2443,10 @@ declare class DbRangeSlider extends HTMLElement {
|
|
|
2024
2443
|
private getTrackPercent;
|
|
2025
2444
|
private handleThumbPointerDown;
|
|
2026
2445
|
private handleTrackClick;
|
|
2446
|
+
/**
|
|
2447
|
+
* 포인터 이동을 프레임당 1회로 병합한다. preventDefault 를 쓰지 않으므로 안전하다. (PERF-RAF)
|
|
2448
|
+
* 메서드가 아니라 필드로 선언해야 rafThrottle 로 감쌀 수 있다.
|
|
2449
|
+
*/
|
|
2027
2450
|
private handlePointerMove;
|
|
2028
2451
|
private handlePointerUp;
|
|
2029
2452
|
private setThumbActive;
|
|
@@ -2034,6 +2457,11 @@ declare class DbRangeSlider extends HTMLElement {
|
|
|
2034
2457
|
private dispatchValueChange;
|
|
2035
2458
|
private dispatchRangeChange;
|
|
2036
2459
|
}
|
|
2460
|
+
declare global {
|
|
2461
|
+
interface HTMLElementTagNameMap {
|
|
2462
|
+
'db-range-slider': DbRangeSlider;
|
|
2463
|
+
}
|
|
2464
|
+
}
|
|
2037
2465
|
|
|
2038
2466
|
/**
|
|
2039
2467
|
* SegmentControl Web Component
|
|
@@ -2355,6 +2783,7 @@ declare global {
|
|
|
2355
2783
|
}
|
|
2356
2784
|
|
|
2357
2785
|
declare class DbFloatingActionButton extends HTMLElement {
|
|
2786
|
+
private detachKeyActivation?;
|
|
2358
2787
|
static get observedAttributes(): string[];
|
|
2359
2788
|
get size(): string;
|
|
2360
2789
|
set size(value: string);
|
|
@@ -2385,6 +2814,9 @@ declare class DbBottomSheet extends HTMLElement {
|
|
|
2385
2814
|
private grabBar?;
|
|
2386
2815
|
private contentEl?;
|
|
2387
2816
|
private sheetHeightPercent;
|
|
2817
|
+
private focusTrap?;
|
|
2818
|
+
/** 참조 카운트 스크롤락을 이 인스턴스가 잡고 있는지 (PERF-GLOBAL-STATE) */
|
|
2819
|
+
private scrollLocked;
|
|
2388
2820
|
private isDragging;
|
|
2389
2821
|
private isVisible;
|
|
2390
2822
|
private isMounted;
|
|
@@ -2398,6 +2830,8 @@ declare class DbBottomSheet extends HTMLElement {
|
|
|
2398
2830
|
private shouldMountPortal;
|
|
2399
2831
|
connectedCallback(): void;
|
|
2400
2832
|
disconnectedCallback(): void;
|
|
2833
|
+
/** 트랩 해제(=포커스 복원)와 스크롤락 반환 */
|
|
2834
|
+
private teardownOverlay;
|
|
2401
2835
|
attributeChangedCallback(name: string): void;
|
|
2402
2836
|
private isOpenRequested;
|
|
2403
2837
|
private clearTimers;
|
|
@@ -2484,6 +2918,9 @@ type OnboardingStep = {
|
|
|
2484
2918
|
declare class DbOnboardingModal extends HTMLElement {
|
|
2485
2919
|
static get observedAttributes(): string[];
|
|
2486
2920
|
private root?;
|
|
2921
|
+
private focusTrap?;
|
|
2922
|
+
/** 참조 카운트 스크롤락을 이 인스턴스가 잡고 있는지 (PERF-GLOBAL-STATE) */
|
|
2923
|
+
private scrollLocked;
|
|
2487
2924
|
private internalStep;
|
|
2488
2925
|
private keyHandler;
|
|
2489
2926
|
private isMounted;
|
|
@@ -2610,6 +3047,9 @@ declare class DbDatePicker extends HTMLElement {
|
|
|
2610
3047
|
private boundDocumentMouseDown;
|
|
2611
3048
|
connectedCallback(): void;
|
|
2612
3049
|
disconnectedCallback(): void;
|
|
3050
|
+
/** 열린 달력은 Escape 로 닫히고 포커스는 트리거로 돌아간다 (A11Y-ESCAPE) */
|
|
3051
|
+
private handleDocumentKeyDown;
|
|
3052
|
+
private boundDocumentKeyDown;
|
|
2613
3053
|
attributeChangedCallback(name: string): void;
|
|
2614
3054
|
get value(): string;
|
|
2615
3055
|
set value(value: string);
|
|
@@ -2669,8 +3109,7 @@ declare global {
|
|
|
2669
3109
|
}
|
|
2670
3110
|
}
|
|
2671
3111
|
|
|
2672
|
-
|
|
2673
|
-
type TimeFormat = (typeof FORMATS)[number];
|
|
3112
|
+
type TimeFormat = (typeof TIME_PICKER_FORMATS)[number];
|
|
2674
3113
|
declare class DbTimePicker extends HTMLElement {
|
|
2675
3114
|
static get observedAttributes(): string[];
|
|
2676
3115
|
private built;
|
|
@@ -2691,6 +3130,9 @@ declare class DbTimePicker extends HTMLElement {
|
|
|
2691
3130
|
private boundDocumentMouseDown;
|
|
2692
3131
|
connectedCallback(): void;
|
|
2693
3132
|
disconnectedCallback(): void;
|
|
3133
|
+
/** 열린 드롭다운은 Escape 로 닫히고 포커스는 트리거로 돌아간다 (A11Y-ESCAPE) */
|
|
3134
|
+
private handleDocumentKeyDown;
|
|
3135
|
+
private boundDocumentKeyDown;
|
|
2694
3136
|
attributeChangedCallback(name: string): void;
|
|
2695
3137
|
get value(): string;
|
|
2696
3138
|
set value(value: string);
|
|
@@ -3317,8 +3759,17 @@ declare class DbResizablePanels extends HTMLElement {
|
|
|
3317
3759
|
private startSize;
|
|
3318
3760
|
private startPos;
|
|
3319
3761
|
private currentSize;
|
|
3762
|
+
/** 포인터 이동을 프레임당 1회로 병합하기 위한 핸들 (PERF-RAF) */
|
|
3763
|
+
private rafId;
|
|
3764
|
+
private pendingPoint;
|
|
3320
3765
|
static get observedAttributes(): string[];
|
|
3321
3766
|
connectedCallback(): void;
|
|
3767
|
+
/**
|
|
3768
|
+
* 드래그 중에 엘리먼트가 DOM 에서 제거되면 mouseup/touchend 가 오지 않아
|
|
3769
|
+
* document 리스너가 영원히 남는다. 여기서 확실히 걷어낸다. (PERF-CLEANUP)
|
|
3770
|
+
*/
|
|
3771
|
+
disconnectedCallback(): void;
|
|
3772
|
+
private detachDragListeners;
|
|
3322
3773
|
attributeChangedCallback(): void;
|
|
3323
3774
|
private getBool;
|
|
3324
3775
|
private getNumber;
|
|
@@ -3332,6 +3783,11 @@ declare class DbResizablePanels extends HTMLElement {
|
|
|
3332
3783
|
private onTouchStart;
|
|
3333
3784
|
private startResize;
|
|
3334
3785
|
private onMouseMove;
|
|
3786
|
+
/**
|
|
3787
|
+
* pointer 이동마다 레이아웃을 다시 계산하면 프레임을 넘겨 버린다.
|
|
3788
|
+
* 마지막 좌표만 남겨 두고 다음 프레임에 한 번만 반영한다.
|
|
3789
|
+
*/
|
|
3790
|
+
private scheduleResize;
|
|
3335
3791
|
private onTouchMove;
|
|
3336
3792
|
private applyResize;
|
|
3337
3793
|
private onMouseUp;
|
|
@@ -3384,6 +3840,9 @@ declare class DbVideoPlayer extends HTMLElement {
|
|
|
3384
3840
|
private getPlaylist;
|
|
3385
3841
|
private getCurrentSrc;
|
|
3386
3842
|
private formatTime;
|
|
3843
|
+
/**
|
|
3844
|
+
* 아이콘만 있는 컨트롤 버튼. `label` 이 유일한 접근 가능한 이름이다. (A11Y-NAME)
|
|
3845
|
+
*/
|
|
3387
3846
|
private iconButton;
|
|
3388
3847
|
private skipButton;
|
|
3389
3848
|
private syncFromAttributes;
|
|
@@ -3487,6 +3946,10 @@ declare class DbAudioPlayer extends HTMLElement {
|
|
|
3487
3946
|
private toggleShuffle;
|
|
3488
3947
|
private handlePlaybackRateChange;
|
|
3489
3948
|
private handleKeyDown;
|
|
3949
|
+
/**
|
|
3950
|
+
* 아이콘만 있는 컨트롤 버튼. `label` 은 선택이 아니라 필수다 —
|
|
3951
|
+
* 아이콘은 aria-hidden 이므로 이것이 유일한 접근 가능한 이름이 된다. (A11Y-NAME)
|
|
3952
|
+
*/
|
|
3490
3953
|
private iconButton;
|
|
3491
3954
|
private build;
|
|
3492
3955
|
private get leftControls();
|
|
@@ -3703,6 +4166,7 @@ declare global {
|
|
|
3703
4166
|
}
|
|
3704
4167
|
|
|
3705
4168
|
declare class DbAppBadge extends HTMLElement {
|
|
4169
|
+
private detachKeyActivation?;
|
|
3706
4170
|
static get observedAttributes(): string[];
|
|
3707
4171
|
private built;
|
|
3708
4172
|
private labelEl?;
|
|
@@ -3713,6 +4177,7 @@ declare class DbAppBadge extends HTMLElement {
|
|
|
3713
4177
|
private getStore;
|
|
3714
4178
|
private getIconSize;
|
|
3715
4179
|
private build;
|
|
4180
|
+
disconnectedCallback(): void;
|
|
3716
4181
|
private updateUI;
|
|
3717
4182
|
}
|
|
3718
4183
|
declare global {
|
|
@@ -4167,6 +4632,7 @@ type TutorialStep = {
|
|
|
4167
4632
|
declare class DbTutorial extends HTMLElement {
|
|
4168
4633
|
static get observedAttributes(): string[];
|
|
4169
4634
|
private root?;
|
|
4635
|
+
private focusTrap?;
|
|
4170
4636
|
private overlayEl?;
|
|
4171
4637
|
private popoverEl?;
|
|
4172
4638
|
private closeButtonEl?;
|
|
@@ -4223,6 +4689,8 @@ declare class DbAnimationBackground extends HTMLElement {
|
|
|
4223
4689
|
private syncingControls;
|
|
4224
4690
|
static get observedAttributes(): string[];
|
|
4225
4691
|
connectedCallback(): void;
|
|
4692
|
+
/** 열린 설정 패널은 Escape 로 닫힌다 (A11Y-ESCAPE) */
|
|
4693
|
+
private handleDocumentKeyDown;
|
|
4226
4694
|
disconnectedCallback(): void;
|
|
4227
4695
|
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
4228
4696
|
private getBool;
|
|
@@ -4391,10 +4859,8 @@ declare global {
|
|
|
4391
4859
|
}
|
|
4392
4860
|
}
|
|
4393
4861
|
|
|
4394
|
-
|
|
4395
|
-
type
|
|
4396
|
-
declare const POSITIONS$1: readonly ["bottom-right", "bottom-left", "bottom-center", "top-right", "top-left", "top-center"];
|
|
4397
|
-
type DownloadPosition = (typeof POSITIONS$1)[number];
|
|
4862
|
+
type DownloadStatus = (typeof DOWNLOAD_PROGRESS_STATUSES)[number];
|
|
4863
|
+
type DownloadPosition = (typeof DOWNLOAD_PROGRESS_POSITIONS)[number];
|
|
4398
4864
|
/**
|
|
4399
4865
|
* 우측 하단(기본)에 떠 있는 다운로드 진행률 위젯.
|
|
4400
4866
|
*
|
|
@@ -4481,8 +4947,7 @@ declare global {
|
|
|
4481
4947
|
*
|
|
4482
4948
|
* 분할 자릿수 OTP/PIN 입력. 붙여넣기·화살표·백스페이스를 지원합니다.
|
|
4483
4949
|
*/
|
|
4484
|
-
|
|
4485
|
-
type OtpSize = (typeof SIZES$4)[number];
|
|
4950
|
+
type OtpSize = (typeof OTP_INPUT_SIZES)[number];
|
|
4486
4951
|
declare class DbOtpInput extends HTMLElement {
|
|
4487
4952
|
static formAssociated: boolean;
|
|
4488
4953
|
static get observedAttributes(): string[];
|
|
@@ -4534,8 +4999,7 @@ declare global {
|
|
|
4534
4999
|
* 한국형 휴대폰 본인인증: 통신사 → 번호 → 인증번호 발송 → OTP + 타이머/재전송.
|
|
4535
5000
|
*/
|
|
4536
5001
|
|
|
4537
|
-
|
|
4538
|
-
type Size$2 = (typeof SIZES$3)[number];
|
|
5002
|
+
type Size$2 = (typeof PHONE_VERIFY_SIZES)[number];
|
|
4539
5003
|
declare class DbPhoneVerify extends HTMLElement {
|
|
4540
5004
|
static get observedAttributes(): string[];
|
|
4541
5005
|
private built;
|
|
@@ -4591,8 +5055,7 @@ declare global {
|
|
|
4591
5055
|
* 이메일 인증: code(OTP) 모드 / confirm(메일함 확인) 모드.
|
|
4592
5056
|
*/
|
|
4593
5057
|
|
|
4594
|
-
|
|
4595
|
-
type Size$1 = (typeof SIZES$2)[number];
|
|
5058
|
+
type Size$1 = (typeof EMAIL_VERIFY_SIZES)[number];
|
|
4596
5059
|
declare class DbEmailVerify extends HTMLElement {
|
|
4597
5060
|
static get observedAttributes(): string[];
|
|
4598
5061
|
private built;
|
|
@@ -4650,6 +5113,7 @@ declare global {
|
|
|
4650
5113
|
* 2단계 인증(2FA): 인증앱 / SMS / 이메일 방식 + OTP.
|
|
4651
5114
|
*/
|
|
4652
5115
|
|
|
5116
|
+
type Size = (typeof TWO_FACTOR_SIZES)[number];
|
|
4653
5117
|
declare const METHODS: readonly [{
|
|
4654
5118
|
readonly value: "app";
|
|
4655
5119
|
readonly label: "인증 앱";
|
|
@@ -4660,8 +5124,6 @@ declare const METHODS: readonly [{
|
|
|
4660
5124
|
readonly value: "email";
|
|
4661
5125
|
readonly label: "이메일";
|
|
4662
5126
|
}];
|
|
4663
|
-
declare const SIZES$1: readonly ["s", "m", "l"];
|
|
4664
|
-
type Size = (typeof SIZES$1)[number];
|
|
4665
5127
|
type Method = (typeof METHODS)[number]['value'];
|
|
4666
5128
|
declare class DbTwoFactor extends HTMLElement {
|
|
4667
5129
|
static get observedAttributes(): string[];
|
|
@@ -4709,14 +5171,10 @@ declare global {
|
|
|
4709
5171
|
}
|
|
4710
5172
|
}
|
|
4711
5173
|
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
type OrbSize = (typeof SIZES)[number];
|
|
4717
|
-
type OrbVariant = (typeof VARIANTS)[number];
|
|
4718
|
-
type OrbState = (typeof STATES)[number];
|
|
4719
|
-
type OrbTheme = (typeof THEMES)[number];
|
|
5174
|
+
type OrbSize = (typeof CHAT_ORB_SIZES)[number];
|
|
5175
|
+
type OrbVariant = (typeof CHAT_ORB_VARIANTS)[number];
|
|
5176
|
+
type OrbState = (typeof CHAT_ORB_STATES)[number];
|
|
5177
|
+
type OrbTheme = (typeof CHAT_ORB_THEMES)[number];
|
|
4720
5178
|
/**
|
|
4721
5179
|
* AI 어시스턴트를 상징하는 캔버스 기반 애니메이션 오브(구체).
|
|
4722
5180
|
* 광택 있는 3D 구체 위에 유체처럼 흐르는 내부 광원 + 프레넬 림 라이트 + 스페큘러 하이라이트로
|
|
@@ -4909,6 +5367,8 @@ declare class DbChatComposer extends HTMLElement {
|
|
|
4909
5367
|
private fileInput;
|
|
4910
5368
|
private micBtn;
|
|
4911
5369
|
private sendBtn;
|
|
5370
|
+
private dropOverlay;
|
|
5371
|
+
private dragDepth;
|
|
4912
5372
|
get value(): string;
|
|
4913
5373
|
set value(v: string);
|
|
4914
5374
|
get streaming(): boolean;
|
|
@@ -4941,12 +5401,24 @@ declare class DbChatComposer extends HTMLElement {
|
|
|
4941
5401
|
private handleOutsideClick;
|
|
4942
5402
|
private chooseAttachOption;
|
|
4943
5403
|
private handleFilePicked;
|
|
5404
|
+
private hasDragFiles;
|
|
5405
|
+
private handleDragEnter;
|
|
5406
|
+
private handleDragOver;
|
|
5407
|
+
private handleDragLeave;
|
|
5408
|
+
private handleDrop;
|
|
5409
|
+
private showDropOverlay;
|
|
4944
5410
|
private addFile;
|
|
5411
|
+
/** 동일 파일을 두 번 끌어놓거나 다시 선택해도 첨부 목록에는 한 번만 표시한다. */
|
|
5412
|
+
private hasAttachment;
|
|
4945
5413
|
private attachmentMeta;
|
|
4946
5414
|
private handleInput;
|
|
4947
5415
|
private handleKeyDown;
|
|
4948
5416
|
private handleSendClick;
|
|
4949
5417
|
private submit;
|
|
5418
|
+
/** 여러 파일을 첨부합니다. */
|
|
5419
|
+
addFiles(files: File[], type?: string): void;
|
|
5420
|
+
/** 현재 입력·첨부를 전송합니다. */
|
|
5421
|
+
send(): void;
|
|
4950
5422
|
/** 입력 필드를 비웁니다. */
|
|
4951
5423
|
clear(): void;
|
|
4952
5424
|
/** 첨부를 하나 제거합니다. */
|
|
@@ -5005,8 +5477,14 @@ declare global {
|
|
|
5005
5477
|
}
|
|
5006
5478
|
}
|
|
5007
5479
|
|
|
5008
|
-
|
|
5009
|
-
|
|
5480
|
+
type Role = (typeof CHAT_MESSAGE_ROLES)[number];
|
|
5481
|
+
interface DbChatMessageAttachment {
|
|
5482
|
+
name: string;
|
|
5483
|
+
kind?: 'image' | 'video' | 'file';
|
|
5484
|
+
/** 미리보기/다운로드 URL (blob: 또는 https:) */
|
|
5485
|
+
url?: string;
|
|
5486
|
+
mime?: string;
|
|
5487
|
+
}
|
|
5010
5488
|
/**
|
|
5011
5489
|
* 채팅 메시지 한 줄. 본문은 라이트 DOM 자식으로 전달하며 컴포넌트가 감쌉니다.
|
|
5012
5490
|
* 아바타는 `db-avatar` 를 재사용합니다.
|
|
@@ -5020,17 +5498,22 @@ declare class DbChatMessage extends HTMLElement {
|
|
|
5020
5498
|
static get observedAttributes(): string[];
|
|
5021
5499
|
private built;
|
|
5022
5500
|
private contentEl;
|
|
5501
|
+
private mediaEl;
|
|
5023
5502
|
private avatarWrap;
|
|
5024
5503
|
private headerEl;
|
|
5025
5504
|
private nameEl;
|
|
5026
5505
|
private timeEl;
|
|
5027
5506
|
private actionsEl;
|
|
5507
|
+
private _attachments;
|
|
5028
5508
|
get role(): Role;
|
|
5029
5509
|
set role(v: Role);
|
|
5510
|
+
get attachments(): DbChatMessageAttachment[];
|
|
5511
|
+
set attachments(list: DbChatMessageAttachment[]);
|
|
5030
5512
|
connectedCallback(): void;
|
|
5031
5513
|
attributeChangedCallback(name: string): void;
|
|
5032
5514
|
private build;
|
|
5033
5515
|
private sync;
|
|
5516
|
+
private renderAttachments;
|
|
5034
5517
|
private renderAvatar;
|
|
5035
5518
|
private renderActions;
|
|
5036
5519
|
private handleAction;
|
|
@@ -5060,10 +5543,10 @@ declare global {
|
|
|
5060
5543
|
}
|
|
5061
5544
|
}
|
|
5062
5545
|
|
|
5063
|
-
|
|
5064
|
-
type
|
|
5065
|
-
|
|
5066
|
-
type
|
|
5546
|
+
type ChatView = (typeof CHAT_WIDGET_VIEWS)[number];
|
|
5547
|
+
type ChatPosition = (typeof CHAT_WIDGET_POSITIONS)[number];
|
|
5548
|
+
/** 홈 메뉴 선택 시 위젯 내부 이동. `none`이면 이벤트만 발행(호스트가 처리) */
|
|
5549
|
+
type DbChatWidgetMenuAction = 'conversation' | 'help' | 'none';
|
|
5067
5550
|
interface DbChatWidgetMessage {
|
|
5068
5551
|
id?: string;
|
|
5069
5552
|
/** `assistant`(상담원/봇) 또는 `user` */
|
|
@@ -5075,6 +5558,13 @@ interface DbChatWidgetMessage {
|
|
|
5075
5558
|
avatarInitials?: string;
|
|
5076
5559
|
/** 말풍선 액션 (예: 'copy,like,dislike') — db-chat-message 로 전달 */
|
|
5077
5560
|
actions?: string;
|
|
5561
|
+
/** 첨부 파일/이미지 */
|
|
5562
|
+
attachments?: Array<{
|
|
5563
|
+
name: string;
|
|
5564
|
+
kind?: 'image' | 'video' | 'file';
|
|
5565
|
+
url?: string;
|
|
5566
|
+
mime?: string;
|
|
5567
|
+
}>;
|
|
5078
5568
|
}
|
|
5079
5569
|
interface DbChatWidgetConversation {
|
|
5080
5570
|
id?: string;
|
|
@@ -5086,6 +5576,15 @@ interface DbChatWidgetConversation {
|
|
|
5086
5576
|
unread?: number;
|
|
5087
5577
|
online?: boolean;
|
|
5088
5578
|
}
|
|
5579
|
+
/** 홈 바로가기 메뉴 — 필요한 항목만 `menuItems`로 전달 (없으면 숨김) */
|
|
5580
|
+
interface DbChatWidgetMenuItem extends DbChatSuggestion {
|
|
5581
|
+
action?: DbChatWidgetMenuAction;
|
|
5582
|
+
}
|
|
5583
|
+
/** 도움말 문서 — 클릭 시 상세(`article`) 화면으로 이동 */
|
|
5584
|
+
interface DbChatWidgetArticle extends DbChatSuggestion {
|
|
5585
|
+
/** 상세 본문. 없으면 description을 본문으로 사용 */
|
|
5586
|
+
body?: string;
|
|
5587
|
+
}
|
|
5089
5588
|
/**
|
|
5090
5589
|
* FAB 로 열고 닫는 우측 하단 채팅 상담 위젯(껍데기).
|
|
5091
5590
|
*
|
|
@@ -5099,11 +5598,12 @@ interface DbChatWidgetConversation {
|
|
|
5099
5598
|
* @fires db-toggle - FAB 토글 (detail: { open })
|
|
5100
5599
|
* @fires db-view-change - 화면 전환 (detail: { view })
|
|
5101
5600
|
* @fires db-send - 메시지 전송 (detail: { text })
|
|
5102
|
-
* @fires db-menu-select - 홈 메뉴 선택 (detail: { id, value })
|
|
5601
|
+
* @fires db-menu-select - 홈 메뉴 선택 (detail: { id, value, action })
|
|
5103
5602
|
* @fires db-quick-reply - 빠른 답변 선택 (detail: { id, value })
|
|
5104
5603
|
* @fires db-article-select - 도움말 문서 선택 (detail: { id, title })
|
|
5105
5604
|
* @fires db-conversation-select - 대화 목록 선택 (detail: { id })
|
|
5106
5605
|
* @fires db-message-action - 말풍선 액션 (detail: { action, text })
|
|
5606
|
+
* @fires db-start-chat - 대화 시작 CTA (홈·메시지 empty)
|
|
5107
5607
|
*
|
|
5108
5608
|
* @example
|
|
5109
5609
|
* const chat = document.createElement('db-chat-widget');
|
|
@@ -5122,6 +5622,8 @@ declare class DbChatWidget extends HTMLElement {
|
|
|
5122
5622
|
static get observedAttributes(): string[];
|
|
5123
5623
|
private built;
|
|
5124
5624
|
private typing;
|
|
5625
|
+
private helpQuery;
|
|
5626
|
+
private _activeArticle;
|
|
5125
5627
|
private _messages;
|
|
5126
5628
|
private _conversations;
|
|
5127
5629
|
private _menuItems;
|
|
@@ -5148,16 +5650,24 @@ declare class DbChatWidget extends HTMLElement {
|
|
|
5148
5650
|
get messages(): DbChatWidgetMessage[];
|
|
5149
5651
|
set conversations(v: DbChatWidgetConversation[]);
|
|
5150
5652
|
get conversations(): DbChatWidgetConversation[];
|
|
5151
|
-
set menuItems(v:
|
|
5152
|
-
get menuItems():
|
|
5653
|
+
set menuItems(v: DbChatWidgetMenuItem[]);
|
|
5654
|
+
get menuItems(): DbChatWidgetMenuItem[];
|
|
5153
5655
|
set quickReplies(v: DbChatSuggestion[]);
|
|
5154
5656
|
get quickReplies(): DbChatSuggestion[];
|
|
5155
|
-
set articles(v:
|
|
5156
|
-
get articles():
|
|
5657
|
+
set articles(v: DbChatWidgetArticle[]);
|
|
5658
|
+
get articles(): DbChatWidgetArticle[];
|
|
5157
5659
|
connectedCallback(): void;
|
|
5660
|
+
disconnectedCallback(): void;
|
|
5661
|
+
/** 열린 위젯 패널은 Escape 로 닫히고 포커스는 런처로 돌아간다 (A11Y-ESCAPE) */
|
|
5662
|
+
private handleDocumentKeyDown;
|
|
5158
5663
|
attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
|
|
5159
5664
|
private hydrateFromAttributes;
|
|
5160
5665
|
private build;
|
|
5666
|
+
private panelDragDepth;
|
|
5667
|
+
private handlePanelDragEnter;
|
|
5668
|
+
private handlePanelDragOver;
|
|
5669
|
+
private handlePanelDragLeave;
|
|
5670
|
+
private handlePanelDrop;
|
|
5161
5671
|
private sync;
|
|
5162
5672
|
private syncOpenState;
|
|
5163
5673
|
private renderBadge;
|
|
@@ -5168,9 +5678,14 @@ declare class DbChatWidget extends HTMLElement {
|
|
|
5168
5678
|
private renderMessages;
|
|
5169
5679
|
private renderConversation;
|
|
5170
5680
|
private renderHelp;
|
|
5681
|
+
private renderHelpResults;
|
|
5682
|
+
private renderArticle;
|
|
5683
|
+
private openArticle;
|
|
5684
|
+
private startConversation;
|
|
5171
5685
|
private buildMessage;
|
|
5172
5686
|
private buildTyping;
|
|
5173
5687
|
private buildEmpty;
|
|
5688
|
+
private buildStartChatButton;
|
|
5174
5689
|
private renderFooter;
|
|
5175
5690
|
private renderNav;
|
|
5176
5691
|
private scrollThreadToEnd;
|
|
@@ -5439,6 +5954,7 @@ interface DbChatRoomMessage {
|
|
|
5439
5954
|
name?: string;
|
|
5440
5955
|
avatarSrc?: string;
|
|
5441
5956
|
avatarInitials?: string;
|
|
5957
|
+
attachments?: DbChatMessageAttachment[];
|
|
5442
5958
|
}
|
|
5443
5959
|
/**
|
|
5444
5960
|
* 사람 간 1:1/그룹 대화 화면. 상단 헤더(상대 정보) + 메시지 스레드 + 하단 컴포저.
|
|
@@ -5458,15 +5974,18 @@ declare class DbChatRoom extends HTMLElement {
|
|
|
5458
5974
|
static get observedAttributes(): string[];
|
|
5459
5975
|
private built;
|
|
5460
5976
|
private typing;
|
|
5977
|
+
private dragDepth;
|
|
5461
5978
|
private _messages;
|
|
5462
5979
|
private headerEl;
|
|
5463
5980
|
private scrollEl;
|
|
5464
5981
|
private threadEl;
|
|
5465
5982
|
private dockEl;
|
|
5983
|
+
private dropOverlay;
|
|
5466
5984
|
private composer;
|
|
5467
5985
|
set messages(v: DbChatRoomMessage[]);
|
|
5468
5986
|
get messages(): DbChatRoomMessage[];
|
|
5469
5987
|
connectedCallback(): void;
|
|
5988
|
+
disconnectedCallback(): void;
|
|
5470
5989
|
attributeChangedCallback(): void;
|
|
5471
5990
|
private build;
|
|
5472
5991
|
private sync;
|
|
@@ -5475,6 +5994,13 @@ declare class DbChatRoom extends HTMLElement {
|
|
|
5475
5994
|
private buildMessage;
|
|
5476
5995
|
private buildTyping;
|
|
5477
5996
|
private scrollToEnd;
|
|
5997
|
+
private nowLabel;
|
|
5998
|
+
private hasDragFiles;
|
|
5999
|
+
private handleDragEnter;
|
|
6000
|
+
private handleDragOver;
|
|
6001
|
+
private handleDragLeave;
|
|
6002
|
+
private handleDrop;
|
|
6003
|
+
private showDropOverlay;
|
|
5478
6004
|
/** 메시지 추가. 추가된 id 반환 */
|
|
5479
6005
|
addMessage(msg: DbChatRoomMessage): string;
|
|
5480
6006
|
/** 전체 메시지 교체 */
|
|
@@ -5498,24 +6024,22 @@ declare global {
|
|
|
5498
6024
|
* @example
|
|
5499
6025
|
* import { toast } from '@designbasekorea/ui-wc';
|
|
5500
6026
|
* toast.success('저장되었습니다');
|
|
5501
|
-
* toast.
|
|
5502
|
-
* const t = toast({ title: '업로드 중…',
|
|
6027
|
+
* toast.danger('오류가 발생했어요', { description: '잠시 후 다시 시도해 주세요' });
|
|
6028
|
+
* const t = toast({ title: '업로드 중…', variant: 'info', duration: 0 });
|
|
5503
6029
|
* t.close();
|
|
5504
6030
|
*/
|
|
5505
6031
|
|
|
5506
|
-
type DbToastStatus = 'info' | 'success' | 'warning' | 'error';
|
|
5507
|
-
type DbToastPosition = 'top-right' | 'top-center' | 'top-left' | 'bottom-right' | 'bottom-center' | 'bottom-left';
|
|
5508
6032
|
interface DbToastOptions {
|
|
5509
6033
|
/** 제목 (필수) */
|
|
5510
6034
|
title: string;
|
|
5511
6035
|
/** 보조 설명 */
|
|
5512
6036
|
description?: string;
|
|
5513
6037
|
/** 상태 색상/아이콘. 기본 'info' */
|
|
5514
|
-
|
|
6038
|
+
variant?: ToastVariant;
|
|
5515
6039
|
/** 자동 닫힘 시간(ms). 0 이하이면 자동으로 닫히지 않음. 기본 5000 */
|
|
5516
6040
|
duration?: number;
|
|
5517
6041
|
/** 표시 위치. 기본 'top-right' */
|
|
5518
|
-
position?:
|
|
6042
|
+
position?: ToastPosition;
|
|
5519
6043
|
/** 닫기 버튼 표시. 기본 true */
|
|
5520
6044
|
showClose?: boolean;
|
|
5521
6045
|
/** 진행 바 표시. 기본 false */
|
|
@@ -5529,16 +6053,16 @@ interface DbToastHandle {
|
|
|
5529
6053
|
/** 토스트를 수동으로 닫습니다(애니메이션 포함). */
|
|
5530
6054
|
close: () => void;
|
|
5531
6055
|
}
|
|
5532
|
-
type DbToastShortcut = (title: string, options?: Omit<DbToastOptions, 'title' | '
|
|
6056
|
+
type DbToastShortcut = (title: string, options?: Omit<DbToastOptions, 'title' | 'variant'>) => DbToastHandle;
|
|
5533
6057
|
interface DbToastApi {
|
|
5534
6058
|
(options: DbToastOptions): DbToastHandle;
|
|
5535
6059
|
show: (options: DbToastOptions) => DbToastHandle;
|
|
5536
6060
|
success: DbToastShortcut;
|
|
5537
|
-
|
|
6061
|
+
danger: DbToastShortcut;
|
|
5538
6062
|
warning: DbToastShortcut;
|
|
5539
6063
|
info: DbToastShortcut;
|
|
5540
6064
|
/** 열려 있는 토스트를 모두 닫습니다. position 지정 시 해당 위치만. */
|
|
5541
|
-
dismissAll: (position?:
|
|
6065
|
+
dismissAll: (position?: ToastPosition) => void;
|
|
5542
6066
|
}
|
|
5543
6067
|
/** 토스트를 띄웁니다. `toast(options)` 와 동일합니다. */
|
|
5544
6068
|
declare function showToast(options: DbToastOptions): DbToastHandle;
|
|
@@ -5572,5 +6096,5 @@ interface DbConfirmOptions {
|
|
|
5572
6096
|
/** 확인 대화상자를 띄우고, 확인 시 true / 취소(ESC·배경 포함) 시 false 로 resolve 합니다. */
|
|
5573
6097
|
declare function confirm(options: DbConfirmOptions): Promise<boolean>;
|
|
5574
6098
|
|
|
5575
|
-
export { DbAccordion, DbAdBanner, DbAiChat, DbAiChatList, DbAlert, DbAnimationBackground, DbAnimationText, DbAppBadge, DbAudioPlayer, DbAvatar, DbBackdrop, DbBadge, DbBanner, DbBottomNavigation, DbBottomSheet, DbBreadcrumbs, DbButton, DbCalendar, DbCard, DbCarousel, DbChatComposer, DbChatList, DbChatMessage, DbChatOrb, DbChatRoom, DbChatSuggestions, DbChatTyping, DbChatWelcome, DbChatWidget, DbCheckbox, DbChip, DbCodeBlock, DbColorPicker, DbColorSwatch, DbConfirm, DbContainer, DbContextMenu, DbCookieBanner, DbCountdown, DbCursorFollower, DbDatePicker, DbDivider, DbDownloadProgress, DbDrawer, DbDropdown, DbDropzone, DbEmailVerify, DbEmptyState, DbFileUploader, DbFloatingActionButton, DbFooter, DbForm, DbGantt, DbGradient, DbGrid, DbGridBackground, DbGridItem, DbImage, DbImageList, DbImagePlaceholder, DbIndicator, DbInput, DbKanban, DbLabel, DbLightbox, DbList, DbLogo, DbLottie, DbMarkdownEditor, DbMarquee, DbMasonry, DbMenuItem, DbModal, DbNavbar, DbOnboardingModal, DbOtpInput, DbPageHeader, DbPagination, DbPhoneVerify, DbPopover, DbProgress, DbProgressStep, DbProgressbar, DbRadio, DbRandomGradient, DbRangeSlider, DbRating, DbReorder, DbResizablePanels, DbScrollArea, DbSearchBar, DbSection, DbSectionAppDownload, DbSectionContact, DbSectionCta, DbSectionFaq, DbSectionFeature, DbSectionFeatureGrid, DbSectionHero, DbSectionLogoCloud, DbSectionPricing, DbSectionStats, DbSectionTestimonials, DbSegmentControl, DbSelect, DbShare, DbSidebar, DbSignature, DbSkeleton, DbSpinner, DbSplitView, DbStack, DbStat, DbStepper, DbTable, DbTabs, DbTestimonial, DbTextarea, DbTimePicker, DbTimeline, DbToast, DbToggle, DbToolbar, DbTooltip, DbTopBanner, DbTutorial, DbTwoFactor, DbVideoPlayer, DbYouTubePlayer, confirm, confirm as dbConfirm, toast as dbToast, showToast, toast };
|
|
5576
|
-
export type { CalendarEventData, CalendarEventType, DbAiChatItem, DbAlertAction, DbArtifactOptions, DbBannerAction, DbBottomNavigationItem, DbChatArtifactRef, DbChatAttachOption, DbChatListItem, DbChatMessageData, DbChatRoomMessage, DbChatSuggestion, DbChatTool, DbChatWidgetConversation, DbChatWidgetMessage, DbColorSwatchCustomType, DbColorSwatchItem, DbColorSwatchShape, DbColorSwatchSize, DbConfirmOptions, DbConfirmVariant, DbFooterCompanyInfo, DbFooterFamilySite, DbFooterLink, DbFooterLinkColumn, DbFooterSocialLink, DbFormFieldData, DbGanttAssignee, DbGanttGroup, DbGanttItem, DbGanttItemStatus, DbGanttRow, DbImageListItem, DbKanbanAssignee, DbKanbanCard, DbKanbanColumn, DbKanbanPriority, DbKanbanTag, DbLightboxImage, DbNavbarItem, DbNavbarUserProfile, DbPageHeaderTabItem, DbSharePlatform, DbShareVariant, DbSidebarItem, DbSidebarProject, DbSidebarPromoBanner, DbSidebarSection, DbSidebarUserProfile, DbSignaturePoint, DbSignatureVariant, DbStatChange, DbTimelineItem, DbToastApi, DbToastHandle, DbToastOptions,
|
|
6099
|
+
export { CleanupBag, DbAccordion, DbActivityHeatmap, DbAdBanner, DbAiChat, DbAiChatList, DbAlert, DbAnimationBackground, DbAnimationText, DbAppBadge, DbAudioPlayer, DbAvatar, DbBackdrop, DbBadge, DbBanner, DbBottomNavigation, DbBottomSheet, DbBreadcrumbs, DbButton, DbCalendar, DbCard, DbCarousel, DbChatComposer, DbChatList, DbChatMessage, DbChatOrb, DbChatRoom, DbChatSuggestions, DbChatTyping, DbChatWelcome, DbChatWidget, DbCheckbox, DbChip, DbCodeBlock, DbColorPicker, DbColorSwatch, DbConfirm, DbContainer, DbContextMenu, DbCookieBanner, DbCountdown, DbCursorFollower, DbDatePicker, DbDivider, DbDownloadProgress, DbDrawer, DbDropdown, DbDropzone, DbElement, DbEmailVerify, DbEmptyState, DbFileUploader, DbFloatingActionButton, DbFooter, DbForm, DbGantt, DbGradient, DbGrid, DbGridBackground, DbGridItem, DbImage, DbImageList, DbImagePlaceholder, DbIndicator, DbInput, DbKanban, DbLabel, DbLightbox, DbList, DbLogo, DbLottie, DbMarkdownEditor, DbMarquee, DbMasonry, DbMenuItem, DbModal, DbNavbar, DbOnboardingModal, DbOtpInput, DbPageHeader, DbPagination, DbPhoneVerify, DbPopover, DbProgress, DbProgressStep, DbProgressbar, DbRadio, DbRandomGradient, DbRangeSlider, DbRating, DbReorder, DbResizablePanels, DbScrollArea, DbSearchBar, DbSection, DbSectionAppDownload, DbSectionContact, DbSectionCta, DbSectionFaq, DbSectionFeature, DbSectionFeatureGrid, DbSectionHero, DbSectionLogoCloud, DbSectionPricing, DbSectionStats, DbSectionTestimonials, DbSegmentControl, DbSelect, DbShare, DbSidebar, DbSignature, DbSkeleton, DbSpinner, DbSplitView, DbStack, DbStat, DbStepper, DbTable, DbTabs, DbTestimonial, DbTextarea, DbTimePicker, DbTimeline, DbToast, DbToggle, DbToolbar, DbTooltip, DbTopBanner, DbTutorial, DbTwoFactor, DbVideoPlayer, DbYouTubePlayer, activateOnKey, announce, confirm, createFocusTrap, createSrOnly, confirm as dbConfirm, dbResetLocale, dbSetLocale, toast as dbToast, dbUid, ensureId, getTabbables, labelFrom, lockScroll, politenessForTone, rafThrottle, scrollLockDepth, setAccessibleName, showToast, t, toast, unlockScroll };
|
|
6100
|
+
export type { CalendarEventData, CalendarEventType, Cleanup, DbActivityHeatmapCellDetail, DbActivityHeatmapItem, DbAiChatItem, DbAlertAction, DbArtifactOptions, DbBannerAction, DbBottomNavigationItem, DbChatArtifactRef, DbChatAttachOption, DbChatListItem, DbChatMessageAttachment, DbChatMessageData, DbChatRoomMessage, DbChatSuggestion, DbChatTool, DbChatWidgetArticle, DbChatWidgetConversation, DbChatWidgetMenuAction, DbChatWidgetMenuItem, DbChatWidgetMessage, DbColorSwatchCustomType, DbColorSwatchItem, DbColorSwatchShape, DbColorSwatchSize, DbConfirmOptions, DbConfirmVariant, DbFooterCompanyInfo, DbFooterFamilySite, DbFooterLink, DbFooterLinkColumn, DbFooterSocialLink, DbFormFieldData, DbGanttAssignee, DbGanttGroup, DbGanttItem, DbGanttItemStatus, DbGanttRow, DbImageListItem, DbKanbanAssignee, DbKanbanCard, DbKanbanColumn, DbKanbanPriority, DbKanbanTag, DbLightboxImage, DbNavbarItem, DbNavbarUserProfile, DbPageHeaderTabItem, DbSharePlatform, DbShareVariant, DbSidebarItem, DbSidebarProject, DbSidebarPromoBanner, DbSidebarSection, DbSidebarUserProfile, DbSignaturePoint, DbSignatureVariant, DbStatChange, DbStringKey, DbStrings, DbTimelineItem, DbToastApi, DbToastHandle, DbToastOptions, FocusTrap, FocusTrapOptions };
|