@vmscloud/moz-ui-components-core 0.1.65 → 0.1.66
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/components/badge/badge.core.d.ts +2 -2
- package/dist/components/bread-crumb/icons.d.ts +2 -0
- package/dist/components/button/button.core.d.ts +17 -1
- package/dist/components/button/index.d.ts +2 -2
- package/dist/components/calendar/calendar.core.d.ts +2 -1
- package/dist/components/calendar/icons.d.ts +1 -1
- package/dist/components/checkbox/checkbox.core.d.ts +1 -1
- package/dist/components/checkbox/icons.d.ts +4 -1
- package/dist/components/chip/chip.core.d.ts +2 -2
- package/dist/components/input/input.core.d.ts +25 -1
- package/dist/components/multi-select/multiselect.core.d.ts +5 -1
- package/dist/components/notification/notification-item.core.d.ts +1 -1
- package/dist/components/number-input/numberinput.core.d.ts +3 -1
- package/dist/components/password-input/passwordinput.core.d.ts +14 -8
- package/dist/components/popup/popup.core.d.ts +5 -0
- package/dist/components/select/index.d.ts +1 -1
- package/dist/components/select/select.core.d.ts +13 -1
- package/dist/components/tab/icons.d.ts +2 -0
- package/dist/components/table-select/index.d.ts +1 -1
- package/dist/components/table-select/tableselect.core.d.ts +7 -11
- package/dist/components/time-picker/timepicker.core.d.ts +2 -1
- package/dist/components/toast/icons.d.ts +1 -0
- package/dist/components/tree-select/tree-utils.d.ts +2 -1
- package/dist/components/tree-select/treeselect.core.d.ts +5 -1
- package/dist/index.cjs +1047 -1119
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4049 -4136
- package/dist/index.js.map +1 -1
- package/dist/locale/types.d.ts +3 -0
- package/dist/styles/default/avatar.css +72 -12
- package/dist/styles/default/badge.css +96 -21
- package/dist/styles/default/breadcrumb.css +85 -16
- package/dist/styles/default/button.css +249 -30
- package/dist/styles/default/calendar.css +130 -26
- package/dist/styles/default/callout.css +75 -15
- package/dist/styles/default/checkbox.css +87 -24
- package/dist/styles/default/chip.css +117 -13
- package/dist/styles/default/contextmenu.css +117 -20
- package/dist/styles/default/controller.css +72 -12
- package/dist/styles/default/dateinput.css +112 -21
- package/dist/styles/default/emptystate.css +60 -12
- package/dist/styles/default/index.css +1457 -667
- package/dist/styles/default/input.css +155 -28
- package/dist/styles/default/label.css +96 -12
- package/dist/styles/default/multiselect.css +191 -15
- package/dist/styles/default/notification.css +99 -30
- package/dist/styles/default/numberinput.css +195 -27
- package/dist/styles/default/passwordinput.css +6 -198
- package/dist/styles/default/popover.css +73 -13
- package/dist/styles/default/popup.css +78 -14
- package/dist/styles/default/radio.css +182 -26
- package/dist/styles/default/scrollarea.css +73 -13
- package/dist/styles/default/select.css +347 -29
- package/dist/styles/default/slider.css +76 -16
- package/dist/styles/default/splitpane.css +54 -11
- package/dist/styles/default/tab.css +89 -12
- package/dist/styles/default/tableselect.css +95 -33
- package/dist/styles/default/taginput.css +77 -12
- package/dist/styles/default/textarea.css +98 -22
- package/dist/styles/default/timepicker.css +131 -33
- package/dist/styles/default/toast.css +101 -12
- package/dist/styles/default/toggle.css +86 -23
- package/dist/styles/default/tooltip.css +78 -18
- package/dist/styles/default/treeselect.css +98 -31
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* 8종은 여기로 무손실 매핑된다(default/secondary→neutral, error→danger, primary→accent).
|
|
10
10
|
* - `appearance` 는 soft(연한 배경·tone 글자·tone 테두리) | outline(투명 배경) | solid(tone 배경·
|
|
11
11
|
* 반전 글자). solid 의 글자색은 `--moz-color-on-status`(warning 만 `--moz-color-on-warning`).
|
|
12
|
-
* - `size` 는 높이 20/24
|
|
12
|
+
* - `size` 는 기본 스타일 높이 16/20/24 tier(Figma 225:5959). 어휘 밖 값은 전부 기본값으로 정규화한다 — 잘못된 문자열이
|
|
13
13
|
* `data-*` 로 새어 나가 CSS 가 아무것도 못 그리는 상태를 막는다.
|
|
14
14
|
* - 텍스트는 default slot 이 우선이고, slot 이 없을 때 `text` prop 을 그린다(lit 코어 단독·
|
|
15
15
|
* 문자열만 넘기는 소비처용).
|
|
@@ -28,7 +28,7 @@ export interface BadgeProps {
|
|
|
28
28
|
tone?: BadgeTone;
|
|
29
29
|
/** 채움 방식. 어휘 밖·미지정은 `soft` */
|
|
30
30
|
appearance?: BadgeAppearance;
|
|
31
|
-
/** 높이 tier (sm
|
|
31
|
+
/** 기본 스타일 높이 tier (sm 16 / md 20 / lg 24). 어휘 밖·미지정은 `md` */
|
|
32
32
|
size?: BadgeSize;
|
|
33
33
|
/** 텍스트 앞의 6px 상태 점 */
|
|
34
34
|
dot?: boolean;
|
|
@@ -3,6 +3,8 @@ import { TemplateResult } from 'lit-html';
|
|
|
3
3
|
/** BreadCrumb 아이콘 (IconArrowRight/IconFavorite/IconFavoriteFilled.vue 1:1 포팅) */
|
|
4
4
|
/** 구분자 화살표 — 원본은 color prop 이 있으나 템플릿에서 미사용(fill 하드코딩 #8998b5). */
|
|
5
5
|
export declare function iconArrowRight(cls?: string): TemplateResult;
|
|
6
|
+
/** Basic separator — 1876:11300 asset 981f0.svg; itemSource and items-mode default share it. */
|
|
7
|
+
export declare function iconBasicArrowRight(cls?: string): TemplateResult;
|
|
6
8
|
/** 즐겨찾기(빈) — stroke=color, 기본 #8998b5 */
|
|
7
9
|
export declare function iconFavorite(color?: string, cls?: string): TemplateResult;
|
|
8
10
|
/** 즐겨찾기(채움) — fill+stroke=color, 기본 #4568e0 */
|
|
@@ -4,12 +4,16 @@ import { TemplateResult } from 'lit-html';
|
|
|
4
4
|
* Button 코어 — Button.vue 의 mount-함수 팩토리 1:1 포팅.
|
|
5
5
|
*
|
|
6
6
|
* 보존해야 하는 기벽(1:1):
|
|
7
|
-
* -
|
|
7
|
+
* - contained-large/small 은 승인된 L/S 클래스를 사용하고, 나머지 미지원 type 은 default 로 폴백.
|
|
8
|
+
* 두 type 은 `type="contained" size="large|small"` 의 호환 별칭으로 남는다(resolveButtonSize).
|
|
8
9
|
* - action==='Search' 클릭 시 self-managed internalLoading (true→loading 없으면 즉시 false).
|
|
9
10
|
* - width 가 :style(rem) 과 raw(var) 양쪽에 먹임.
|
|
10
11
|
* - $attrs 패스스루(native click 버블 포함).
|
|
11
12
|
*/
|
|
12
13
|
export type ButtonType = 'contained' | 'contained-large' | 'contained-small' | 'outline' | 'outline-small' | 'outline-icon' | 'ghost' | 'ghost-small' | 'ghost-xsmall' | 'contained-icon' | 'contained-icon-large' | 'contained-icon-small' | 'icon' | 'icon-active' | 'icon-accent' | 'text' | 'no-interaction' | 'default';
|
|
14
|
+
/** Button 크기 어휘. 문서상 기본값은 medium 이지만 코드 defaults 에는 넣지 않는다(resolveButtonSize 참고). */
|
|
15
|
+
export type ButtonSize = 'large' | 'medium' | 'small';
|
|
16
|
+
export declare const BUTTON_SIZES: readonly ["large", "medium", "small"];
|
|
13
17
|
export type ButtonAction = 'Add' | 'Remove' | 'Edit' | 'Save' | 'Search' | 'Run' | 'Copy';
|
|
14
18
|
export interface ButtonProps {
|
|
15
19
|
action?: ButtonAction;
|
|
@@ -26,6 +30,12 @@ export interface ButtonProps {
|
|
|
26
30
|
*/
|
|
27
31
|
nativeType?: 'button' | 'submit' | 'reset';
|
|
28
32
|
width?: string | number;
|
|
33
|
+
/**
|
|
34
|
+
* 크기. 기본·`contained` 는 L/M/S, `text` 는 medium·small, `outline` 은 medium 만 적용한다.
|
|
35
|
+
* 아이콘 계열과 대체 렌더 type 은 무시한다. `contained-large/small` 별칭보다 우선한다.
|
|
36
|
+
* 지정하지 않으면 type 별 기존 외형을 유지한다(`text` 는 13px 유지).
|
|
37
|
+
*/
|
|
38
|
+
size?: ButtonSize;
|
|
29
39
|
loading?: boolean;
|
|
30
40
|
disabled?: boolean;
|
|
31
41
|
/** 패스스루 (Vue $attrs / React className·style·rest) */
|
|
@@ -39,6 +49,12 @@ export interface ButtonEmits {
|
|
|
39
49
|
export interface ButtonApi {
|
|
40
50
|
setLoading(v: boolean): void;
|
|
41
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* type × size → 적용 크기. undefined 는 "크기 미적용"(data-size 없음, type 별 기존 외형).
|
|
54
|
+
* 우선순위: 직접 size → 별칭(contained-large/small) → type 별 기존 외형.
|
|
55
|
+
* ⚠️ defaults 에 size 를 넣으면 미지정과 medium 을 구분할 수 없어 별칭·text 외형이 바뀐다.
|
|
56
|
+
*/
|
|
57
|
+
export declare function resolveButtonSize(type: ButtonType | undefined, size: unknown): ButtonSize | undefined;
|
|
42
58
|
export interface ButtonTemplateOptions {
|
|
43
59
|
/** 클릭 핸들러 (disabled/loading 시 자동 차단 — Button.vue handleClick guard 1:1) */
|
|
44
60
|
onClick?: (e: MouseEvent) => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MozSpec } from '../../runtime/types';
|
|
2
2
|
import { ButtonProps, ButtonEmits, ButtonApi } from './button.core';
|
|
3
3
|
|
|
4
|
-
export { createButton, buttonTemplate } from './button.core';
|
|
5
|
-
export type { ButtonProps, ButtonEmits, ButtonApi, ButtonType, ButtonAction, ButtonTemplateOptions } from './button.core';
|
|
4
|
+
export { createButton, buttonTemplate, BUTTON_SIZES } from './button.core';
|
|
5
|
+
export type { ButtonProps, ButtonEmits, ButtonApi, ButtonType, ButtonSize, ButtonAction, ButtonTemplateOptions } from './button.core';
|
|
6
6
|
export { circleLoader } from './circleLoader';
|
|
7
7
|
export type { CircleLoaderProps } from './circleLoader';
|
|
8
8
|
/**
|
|
@@ -5,7 +5,8 @@ import { Dayjs } from '../../shared';
|
|
|
5
5
|
* 3 뷰(달력/연도/월) + 월 네비 + min/max disable + v-model. dayjs(raw, 플러그인 확장) 사용.
|
|
6
6
|
* 보존: modelValue 변경 시 inputValue 리셋(watch), weeksInMonth 계산 시 setMaxHeight emit(원본 side-effect),
|
|
7
7
|
* defineModel set 은 effectively dayjs(day) 를 emit. 'changed' emit 은 원본에서도 dead(선언만).
|
|
8
|
-
*
|
|
8
|
+
* 연도 보기는 Figma Calendar Year 1736:5542 의 3×4(12년) 페이지. 선택 연도가 든 페이지로 열리고,
|
|
9
|
+
* 연도 보기에서는 이전/다음 버튼이 12년 단위로 페이지를 넘긴다(선택·min/max·emit 계약은 그대로).
|
|
9
10
|
*/
|
|
10
11
|
export interface CalendarProps {
|
|
11
12
|
rowHeight?: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TemplateResult } from 'lit-html';
|
|
2
2
|
|
|
3
|
-
/** Calendar 아이콘 (IconArrowDown/
|
|
3
|
+
/** Calendar 아이콘 (IconArrowDown/CalendarTodayDot.vue 1:1 포팅, nav Left/Right 는 Figma 저장 SVG). */
|
|
4
4
|
export declare function iconArrowDown(color?: string): TemplateResult;
|
|
5
5
|
export declare function iconArrowLeft(color?: string): TemplateResult;
|
|
6
6
|
export declare function iconArrowRight(color?: string): TemplateResult;
|
|
@@ -8,7 +8,7 @@ import { TemplateResult } from 'lit-html';
|
|
|
8
8
|
* (ctx.controlled('checked'); 원본의 vnode.props introspection 대체). controlled 는 model 을
|
|
9
9
|
* 바꾸지 않고 change 만 emit + native checkbox 를 강제 리셋.
|
|
10
10
|
* - uncontrolled 는 update:modelValue + change 둘 다 emit.
|
|
11
|
-
* - indeterminate 는
|
|
11
|
+
* - indeterminate 는 아이콘과 native input.indeterminate 를 함께 동기화한다.
|
|
12
12
|
* - readonly 는 native change 를 되돌림, disabled/readonly 시 토글 차단.
|
|
13
13
|
* - 키보드 Enter/Space 토글 + focus 링(isFocused).
|
|
14
14
|
* - $attrs 는 (inheritAttrs:false) 루트가 아니라 input 으로 패스스루. 단 class/style 은
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { TemplateResult } from 'lit-html';
|
|
2
2
|
|
|
3
|
-
/**
|
|
3
|
+
/** Enabled geometry: Figma 1717:17549 / 1717:17530 / 1718:17621.
|
|
4
|
+
* Evidence: design-adoption/components/checkbox-marker-evidence.md.
|
|
5
|
+
* Color arguments, disabled precedence and theme tokens remain compatible.
|
|
6
|
+
*/
|
|
4
7
|
/** 미체크 — 테두리 사각형. data-icon=unchecked, 클래스 check-icon(hover 재색칠 대상) */
|
|
5
8
|
export declare function iconCheckBox(color?: string, disabled?: boolean, cls?: string): TemplateResult;
|
|
6
9
|
/** 체크 — 체크 표시. data-icon=checked, 클래스 checked-icon */
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* 색 어휘는 Badge/Radio segment 와 같다 — `tone` 6종 → `data-tone`, `appearance`(비선택 룩)
|
|
15
15
|
* outline|soft → `data-appearance`, 선택은 `.is-selected`. 어휘 밖 값은 기본값으로 정규화한다.
|
|
16
|
-
*
|
|
16
|
+
* 기본 스타일에서 비제거형 `md` 높이는 28px, `sm` 및 제거 가능 칩은 24px이다.
|
|
17
17
|
*/
|
|
18
18
|
export declare const CHIP_TONES: readonly ["accent", "neutral", "info", "success", "warning", "danger"];
|
|
19
19
|
export type ChipTone = (typeof CHIP_TONES)[number];
|
|
@@ -26,7 +26,7 @@ export interface ChipProps {
|
|
|
26
26
|
tone?: ChipTone;
|
|
27
27
|
/** 비선택 상태의 룩. 어휘 밖·미지정은 `outline` */
|
|
28
28
|
appearance?: ChipAppearance;
|
|
29
|
-
/**
|
|
29
|
+
/** 크기 tier. 기본 스타일의 비제거형 높이는 sm 24px / md 28px, 제거형은 24px. 어휘 밖·미지정은 `md` */
|
|
30
30
|
size?: ChipSize;
|
|
31
31
|
/** 토글 칩의 선택 상태(제어형). removable 이면 무시 */
|
|
32
32
|
selected?: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Rule } from '../../validator/types';
|
|
2
|
+
import { CoreCtx, CoreSetupResult } from '../../runtime/types';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Input 코어 — Input.vue 1:1 포팅.
|
|
@@ -7,11 +8,23 @@ import { Rule } from '../../validator/types';
|
|
|
7
8
|
* - v-model(modelValue) + validator(change/blur 는 로컬, save 는 부모 Validator.validate 로).
|
|
8
9
|
* - required 시 auto save-rule (메시지: requiredMessage ?? locale.Common.requiredMessage.replace('{label}', label||name||'')).
|
|
9
10
|
* - checkRules: rules 없음/disabled/isReadOnly → true. 에러 시 validatorMessages[target] 세팅.
|
|
10
|
-
* - invalidMessage = save || blur || change.
|
|
11
|
+
* - invalidMessage = save || blur || change. Figma Input 241:4446 Error focused(1674:12226/12228)대로
|
|
12
|
+
* focus 중에도 메시지/아이콘을 보인다(원본은 focus 중 숨김). 검증 시점은 원본 그대로 —
|
|
13
|
+
* focus 자체는 검증하거나 메시지/진행 중 save 를 초기화하지 않는다.
|
|
11
14
|
* - v2(useInvalidV2): 아이콘+툴팁 (invalidTooltip slot; fallback 은 native title — 원본 v-tooltip 은 host 전역 디렉티브라 헤드리스에선 title 로 대체).
|
|
12
15
|
* - enter/mounted emit. $attrs 는 input 으로 패스스루. caret 보존 위해 .value=live().
|
|
16
|
+
*
|
|
17
|
+
* password 모드(type="password"): Input 과 PasswordInput 의 단일 구현.
|
|
18
|
+
* - 표시/숨김 토글 버튼을 자동 제공(별도 prop 없음). 토글은 내부 native input 의 type 만
|
|
19
|
+
* password↔text 로 바꾸고 공개 type prop 은 password 그대로다.
|
|
20
|
+
* - disabled 가 되거나 type 이 password 가 아니게 되면 다시 마스킹한다.
|
|
21
|
+
* - 토글 버튼: locale PasswordInput.showPassword/hidePassword aria-label + aria-pressed.
|
|
22
|
+
* - 나머지(isReadOnly·rules·useInvalidV2·invalidTooltip·emit)는 Input 계약 그대로.
|
|
23
|
+
* - PasswordInput 은 이 구현의 호환 래퍼(setupInput 의 legacyPassword 옵션)다.
|
|
13
24
|
*/
|
|
14
25
|
export interface InputProps {
|
|
26
|
+
/** Native input id; omitted values receive a stable instance id for the label. */
|
|
27
|
+
id?: string;
|
|
15
28
|
label?: string;
|
|
16
29
|
value?: string;
|
|
17
30
|
name?: string;
|
|
@@ -35,4 +48,15 @@ export interface InputEmits {
|
|
|
35
48
|
mounted: [HTMLInputElement | null];
|
|
36
49
|
'update:modelValue': [string];
|
|
37
50
|
}
|
|
51
|
+
export declare const INPUT_DEFAULTS: Partial<InputProps>;
|
|
52
|
+
/** @internal PasswordInput 호환 래퍼 전용 옵션. */
|
|
53
|
+
export interface InputSetupOptions {
|
|
54
|
+
/**
|
|
55
|
+
* PasswordInput 래퍼: 공개 type 을 password 로 고정하고, 기존 기본 autocomplete
|
|
56
|
+
* (new-password, 사용자 값 우선)와 레거시 class 훅(moz-password-input-container 등)을 유지한다.
|
|
57
|
+
*/
|
|
58
|
+
legacyPassword?: boolean;
|
|
59
|
+
}
|
|
60
|
+
/** @internal Input 과 PasswordInput 이 공유하는 단일 setup. */
|
|
61
|
+
export declare function setupInput(ctx: CoreCtx<InputProps, InputEmits>, options?: InputSetupOptions): CoreSetupResult<void>;
|
|
38
62
|
export declare const createInput: import('../..').CoreFactory<InputProps, InputEmits, void>;
|
|
@@ -11,7 +11,7 @@ import { Rule, RuleEventTarget } from '../../validator/types';
|
|
|
11
11
|
* - selectAllWhenEmpty(닫을 때 빈 선택이면 전체), autoSelectNewItems(itemsSource 변경 시 신규 자동선택).
|
|
12
12
|
* - headerFormat 표시(ALL / {count} / join). Validator(change/blur 로컬, save 부모).
|
|
13
13
|
* - ITEM_HEIGHT 는 attr[dropdown-item-height] 또는 CSS var(--size-input-dropdown-item-height),
|
|
14
|
-
* 둘 다 없으면 24
|
|
14
|
+
* 둘 다 없으면 inline 24 / portal 28 폴백.
|
|
15
15
|
* - 기벽: watch(showList) 의 선택-스크롤 분기는 `!model.value`(빈 배열도 truthy) 조건이라 항상 죽음.
|
|
16
16
|
*/
|
|
17
17
|
export type DisplayFormatter = (item: Record<string, unknown>) => string;
|
|
@@ -55,6 +55,10 @@ export interface MultiSelectEmits {
|
|
|
55
55
|
'update:modelValue': [string[]];
|
|
56
56
|
}
|
|
57
57
|
export interface MultiSelectApi {
|
|
58
|
+
/** Set popup visibility after mount. Disabled opens are ignored; opening does not move focus. */
|
|
59
|
+
setOpen(open: boolean): void;
|
|
60
|
+
/** Popup state (false after destroy or in inline mode). */
|
|
61
|
+
isOpen(): boolean;
|
|
58
62
|
validate(eventTarget?: RuleEventTarget): Promise<boolean>;
|
|
59
63
|
}
|
|
60
64
|
export declare const createMultiSelect: import('../..').CoreFactory<MultiSelectProps, MultiSelectEmits, MultiSelectApi>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* 목록 컨테이너·헤더·읽음 처리·빈 상태는 소비 앱 몫이다 — 빈 상태는 `EmptyState`(`composed`)를 쓴다.
|
|
6
6
|
*
|
|
7
7
|
* 구조: `onSelect` 가 있으면 루트가 `<button type="button">`(키보드는 네이티브 버튼이 담당), 없으면
|
|
8
|
-
* `<div>`. 안에 `.moz-notification-item-header`(제목 + 안 읽음 점 + `meta` slot),
|
|
8
|
+
* `<div>`. 안에 `.moz-notification-item-header`(제목 + 안 읽음 점 + `meta` slot), 본문·`<time>`을 묶은 `.moz-notification-item-content`.
|
|
9
9
|
* 안 읽음은 `data-unread` 와 점으로 보이고, 점 옆 숨김 텍스트(로케일 `Notification.unread`)로 읽힌다.
|
|
10
10
|
*
|
|
11
11
|
* `meta` slot 은 제목 줄 오른쪽 보조 정보(작성자 아바타·티켓 번호 등)다. 버튼 루트 안에 그려지므로
|
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
*
|
|
4
4
|
* 보존: +/- 버튼(min/max guard, step), keydown Backspace/Delete 가드(min 에서 비우기 차단),
|
|
5
5
|
* blur 빈값 복원(min 또는 0), onChanged clamp, shortMode(up/down 리스트 버튼).
|
|
6
|
-
* emit: update:modelValue(모델 변경) + change + enter + mounted.
|
|
6
|
+
* emit: update:modelValue(모델 변경) + change + enter + mounted. 기본 모드는 독립 Quantity Picker 스타일을 사용한다.
|
|
7
7
|
*/
|
|
8
8
|
export interface NumberInputProps {
|
|
9
|
+
/** Native input id; omitted values receive a stable instance id for the label. */
|
|
10
|
+
id?: string;
|
|
9
11
|
label?: string;
|
|
10
12
|
name?: string;
|
|
11
13
|
width?: string | number;
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import { Rule } from '../../validator/types';
|
|
2
|
+
import { InputEmits } from '../input/input.core';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
|
-
* PasswordInput 코어 —
|
|
5
|
-
*
|
|
5
|
+
* PasswordInput 코어 — Input password 모드(`Input type="password"`)의 호환 래퍼.
|
|
6
|
+
*
|
|
7
|
+
* 구현은 Input 하나다(`setupInput`). 래퍼가 유지하는 기존 동작:
|
|
8
|
+
* - 공개 type 은 password 고정(전달된 type 은 무시), 표시/숨김 토글 자동 제공.
|
|
9
|
+
* - 기본 autocomplete="new-password"(사용자가 준 autocomplete 가 이긴다).
|
|
10
|
+
* - 레거시 class 훅: 루트 `moz-password-input-container`(+ disabled), label `moz-input-label`,
|
|
11
|
+
* 필드 묶음 `moz-password-input-wrapper`, 토글 `icon-container password-icon`.
|
|
12
|
+
* - disabled 가 되면 다시 마스킹.
|
|
13
|
+
* 디자인·검증(isReadOnly 포함)은 Input 계약을 그대로 따른다.
|
|
6
14
|
*/
|
|
7
15
|
export interface PasswordInputProps {
|
|
16
|
+
/** Native input id; omitted values receive a stable instance id for the label. */
|
|
17
|
+
id?: string;
|
|
8
18
|
label?: string;
|
|
9
19
|
value?: string;
|
|
10
20
|
name?: string;
|
|
@@ -21,9 +31,5 @@ export interface PasswordInputProps {
|
|
|
21
31
|
style?: unknown;
|
|
22
32
|
[attr: string]: unknown;
|
|
23
33
|
}
|
|
24
|
-
export
|
|
25
|
-
|
|
26
|
-
mounted: [HTMLInputElement | null];
|
|
27
|
-
'update:modelValue': [string];
|
|
28
|
-
}
|
|
29
|
-
export declare const createPasswordInput: import('../..').CoreFactory<PasswordInputProps, PasswordInputEmits, void>;
|
|
34
|
+
export type PasswordInputEmits = InputEmits;
|
|
35
|
+
export declare const createPasswordInput: import('../..').CoreFactory<PasswordInputProps, InputEmits, void>;
|
|
@@ -66,6 +66,11 @@ export interface PopupProps {
|
|
|
66
66
|
loading?: boolean;
|
|
67
67
|
contentsPadding?: string | number;
|
|
68
68
|
class?: unknown;
|
|
69
|
+
/**
|
|
70
|
+
* true면 닫혀도 콘텐츠를 유지하고 `display:none`만 적용, false(기본)면 닫힐 때 slot 콘텐츠가 언마운트됨
|
|
71
|
+
* (원본 Popup.vue 의 `v-show` / `v-if` 선택). 유지 모드에서는 slot 자식 인스턴스·상태가 다시 열어도 그대로이고,
|
|
72
|
+
* 닫힌 동안 바뀐 props 도 그대로 반영된다. 기본 모드에서는 다시 열 때 새 인스턴스가 현재 props 로 마운트된다.
|
|
73
|
+
*/
|
|
69
74
|
useVShow?: boolean;
|
|
70
75
|
top?: number | null;
|
|
71
76
|
left?: number | null;
|
|
@@ -2,7 +2,7 @@ import { MozSpec } from '../../runtime/types';
|
|
|
2
2
|
import { SelectProps, SelectEmits, SelectApi } from './select.core';
|
|
3
3
|
|
|
4
4
|
export { createSelect } from './select.core';
|
|
5
|
-
export type { SelectProps, SelectEmits, SelectApi, DisplayFormatter } from './select.core';
|
|
5
|
+
export type { SelectProps, SelectEmits, SelectApi, DisplayFormatter, SelectDisplayColumn } from './select.core';
|
|
6
6
|
/**
|
|
7
7
|
* Select — 단일 선택 드롭다운(가상 스크롤 + 필터 + 검증). 스타일은 select.css + label.css 를 import.
|
|
8
8
|
* modelValue 는 v-model(controlled)/uncontrolled 이중 모드. useObjBinding=true 면 model 이 item 객체.
|
|
@@ -14,6 +14,11 @@ import { Rule, RuleEventTarget } from '../../validator/types';
|
|
|
14
14
|
* - 키보드 접근성(icon Tab→list, list Tab wrap, row Tab scroll, Esc 닫기) 이식.
|
|
15
15
|
*/
|
|
16
16
|
export type DisplayFormatter = (item: Record<string, unknown>) => string;
|
|
17
|
+
export interface SelectDisplayColumn {
|
|
18
|
+
key: string;
|
|
19
|
+
header?: string;
|
|
20
|
+
width?: number | string;
|
|
21
|
+
}
|
|
17
22
|
export interface SelectProps {
|
|
18
23
|
itemsSource: readonly Record<string, unknown>[] | Record<string, unknown>[];
|
|
19
24
|
label?: string | null;
|
|
@@ -22,7 +27,8 @@ export interface SelectProps {
|
|
|
22
27
|
readonly?: boolean;
|
|
23
28
|
disabled?: boolean;
|
|
24
29
|
keyProp?: string;
|
|
25
|
-
displayProp?: string | DisplayFormatter;
|
|
30
|
+
displayProp?: string | DisplayFormatter | SelectDisplayColumn[];
|
|
31
|
+
separator?: string;
|
|
26
32
|
rules?: Rule[];
|
|
27
33
|
useObjBinding?: boolean;
|
|
28
34
|
useFilter?: boolean;
|
|
@@ -43,6 +49,12 @@ export interface SelectEmits {
|
|
|
43
49
|
'update:modelValue': [value: unknown];
|
|
44
50
|
}
|
|
45
51
|
export interface SelectApi {
|
|
52
|
+
/** Set popup visibility after mount. Disabled opens are ignored; opening does not move focus. */
|
|
53
|
+
setOpen(open: boolean): void;
|
|
54
|
+
/** Popup state (false after destroy). */
|
|
55
|
+
isOpen(): boolean;
|
|
46
56
|
validate(eventTarget?: RuleEventTarget): Promise<boolean>;
|
|
47
57
|
}
|
|
58
|
+
/** Internal factory configuration for the legacy facade; not a public prop. */
|
|
59
|
+
export declare const createSelectCore: (legacyTable?: boolean) => import('../..').CoreFactory<SelectProps, SelectEmits, SelectApi>;
|
|
48
60
|
export declare const createSelect: import('../..').CoreFactory<SelectProps, SelectEmits, SelectApi>;
|
|
@@ -2,3 +2,5 @@ import { TemplateResult } from 'lit-html';
|
|
|
2
2
|
|
|
3
3
|
/** Tab 닫기 아이콘 (IconClose.vue 1:1 포팅). */
|
|
4
4
|
export declare function iconClose(color?: string): TemplateResult;
|
|
5
|
+
/** Closable 1767:3744 / 78be7.svg; separate from vertical/custom-header glyph. */
|
|
6
|
+
export declare function iconCloseHorizontal(color?: string): TemplateResult;
|
|
@@ -5,6 +5,6 @@ export { createTableSelect } from './tableselect.core';
|
|
|
5
5
|
export type { TableSelectProps, TableSelectEmits, TableSelectApi } from './tableselect.core';
|
|
6
6
|
/**
|
|
7
7
|
* TableSelect — 다중 컬럼 표 형태의 단일 선택 드롭다운(가상 스크롤 + 필터 + 검증 + 화살표 네비).
|
|
8
|
-
* 스타일: tableselect.css + label.css.
|
|
8
|
+
* 스타일: tableselect.css + label.css. useObjKeyProp=true binds the original item; keyProp identifies it.
|
|
9
9
|
*/
|
|
10
10
|
export declare const TABLESELECT_SPEC: MozSpec<TableSelectProps, TableSelectEmits, TableSelectApi>;
|
|
@@ -1,15 +1,7 @@
|
|
|
1
|
+
import { CoreFactory } from '../../runtime/types';
|
|
1
2
|
import { Rule, RuleEventTarget } from '../../validator/types';
|
|
2
3
|
|
|
3
|
-
/**
|
|
4
|
-
* TableSelect 코어 — TableSelect.vue 1:1 포팅 (오버레이 티어, 가상 스크롤 + 다중 컬럼).
|
|
5
|
-
*
|
|
6
|
-
* 보존 포인트(1:1):
|
|
7
|
-
* - Select 변형: 여러 컬럼(displayProps/columnWidths/columnHeaders) 표 레이아웃. 단일 v-model.
|
|
8
|
-
* - useObjKeyProp=false → model 은 keyProp 값 / true → model 은 displayProps 부분집합 객체({...item}).
|
|
9
|
-
* - 드롭다운은 body 포털 + Overlay(useDropdownPosition 1:1, useMinWidth, listWidth). 화살표↑↓/Enter 네비.
|
|
10
|
-
* - virtual-core(32px), useFilter 검색(모든 displayProps, debounce)+하이라이트, Validator(change/blur/save).
|
|
11
|
-
* - **close 기벽 2회**: useDropdownPosition onClose + watch(showList) 둘 다 emit('close') (Select 와 동일).
|
|
12
|
-
*/
|
|
4
|
+
/** Compatibility facade: the Select Core owns all rendering and behavior. */
|
|
13
5
|
export interface TableSelectProps {
|
|
14
6
|
itemsSource: readonly Record<string, unknown>[] | Record<string, unknown>[];
|
|
15
7
|
label?: string | null;
|
|
@@ -40,6 +32,10 @@ export interface TableSelectEmits {
|
|
|
40
32
|
'update:modelValue': [unknown];
|
|
41
33
|
}
|
|
42
34
|
export interface TableSelectApi {
|
|
35
|
+
/** Set popup visibility after mount. Disabled opens are ignored; opening does not move focus. */
|
|
36
|
+
setOpen(open: boolean): void;
|
|
37
|
+
/** Popup state (false after destroy). */
|
|
38
|
+
isOpen(): boolean;
|
|
43
39
|
validate(eventTarget?: RuleEventTarget): Promise<boolean>;
|
|
44
40
|
}
|
|
45
|
-
export declare const createTableSelect:
|
|
41
|
+
export declare const createTableSelect: CoreFactory<TableSelectProps, TableSelectEmits, TableSelectApi>;
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
* - 열릴 때 시/분 목록을 선택값 중앙으로 스크롤. modelValue 기본 '09:00'.
|
|
9
9
|
*/
|
|
10
10
|
export interface TimePickerProps {
|
|
11
|
-
|
|
11
|
+
/** 숫자는 px 로 보고 rem 으로 변환한다(다른 Core 입력과 동일). */
|
|
12
|
+
width?: string | number;
|
|
12
13
|
modelValue?: string;
|
|
13
14
|
label?: string;
|
|
14
15
|
disabled?: boolean;
|
|
@@ -3,6 +3,7 @@ import { TemplateResult } from 'lit-html';
|
|
|
3
3
|
/**
|
|
4
4
|
* Toast 아이콘 (IconToastSuccess/Error/Info/Warning.vue 1:1 포팅).
|
|
5
5
|
* Toast 는 항상 color="#FFF" 로 사용. (Error/Warning 은 luminance mask 포함 — 원본 그대로, 중복 id 도 유지.)
|
|
6
|
+
* 표시 크기는 Figma Toast 1378:6202 metadata icon24(높이52). 원본 path 는 viewBox 30 그대로 축소한다.
|
|
6
7
|
*/
|
|
7
8
|
export declare function iconToastSuccess(color?: string): TemplateResult;
|
|
8
9
|
export declare function iconToastError(color?: string): TemplateResult;
|
|
@@ -43,8 +43,9 @@ export interface CategoryList {
|
|
|
43
43
|
categoryLv2Set: Set<string>;
|
|
44
44
|
}
|
|
45
45
|
export declare const DEFAULT_TREE_PROPS: TreeProps;
|
|
46
|
+
export declare function isTreeItemDisabled(item: object): boolean;
|
|
46
47
|
/** useTreeItem 1:1 — itemsSource 를 TreeItemSource 로 매핑 */
|
|
47
|
-
export declare function processTreeItems(items: Record<string, unknown>[], props: TreeProps): TreeItemSource[];
|
|
48
|
+
export declare function processTreeItems(items: Record<string, unknown>[], props: TreeProps, disabledKey?: string): TreeItemSource[];
|
|
48
49
|
/** buildFlatHierarchyFromCategory 1:1 */
|
|
49
50
|
export declare function buildFlatHierarchyFromCategory(data: TreeItemSource[]): FlatHierarchyItem[];
|
|
50
51
|
export declare function convertToFlatSets(items: FlatHierarchyItem[]): Set<string>;
|
|
@@ -11,7 +11,7 @@ import { TreeProps } from './tree-utils';
|
|
|
11
11
|
* - 확장/축소(onToggleExpanded+toggleChildrenHidden 재귀 / toggleAll 전체), indeterminate(자식 선택수 기준).
|
|
12
12
|
* - 필터(부모 stack 유지), showOnlySelected(선택+조상), select-all(onAddSearch/onSelectOnlyRes).
|
|
13
13
|
* - 위치(calcPosition+shouldOpenOppositeDirection, MultiSelect 동형), closeOnScroll/closeMenuAtBodyClick/Esc, Validator.
|
|
14
|
-
* - 기벽: 단일 선택은 change emit 안 함(update:modelValue 만). ITEM_HEIGHT CSS var→
|
|
14
|
+
* - 기벽: 단일 선택은 change emit 안 함(update:modelValue 만). ITEM_HEIGHT CSS var→28(Figma row28).
|
|
15
15
|
*/
|
|
16
16
|
export type TreeModel = string | string[];
|
|
17
17
|
export interface TreeSelectProps {
|
|
@@ -40,6 +40,10 @@ export interface TreeSelectEmits {
|
|
|
40
40
|
'update:modelValue': [TreeModel];
|
|
41
41
|
}
|
|
42
42
|
export interface TreeSelectApi {
|
|
43
|
+
/** Set popup visibility after mount. Disabled opens are ignored; opening does not move focus. */
|
|
44
|
+
setOpen(open: boolean): void;
|
|
45
|
+
/** Popup state (false after destroy). */
|
|
46
|
+
isOpen(): boolean;
|
|
43
47
|
validate(eventTarget?: RuleEventTarget): Promise<boolean>;
|
|
44
48
|
}
|
|
45
49
|
export declare const createTreeSelect: import('../..').CoreFactory<TreeSelectProps, TreeSelectEmits, TreeSelectApi>;
|