@vmscloud/moz-ui-components-core 0.1.42 → 0.1.43
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/radio/index.d.ts +2 -0
- package/dist/components/radio/radio.core.d.ts +27 -0
- package/dist/index.cjs +609 -594
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2399 -2321
- package/dist/index.js.map +1 -1
- package/dist/styles/default/index.css +20 -4
- package/dist/styles/default/radio.css +20 -4
- package/package.json +1 -1
|
@@ -5,5 +5,7 @@ export { createRadio } from './radio.core';
|
|
|
5
5
|
export type { RadioProps, RadioEmits } from './radio.core';
|
|
6
6
|
/**
|
|
7
7
|
* modelValue(v-model)만으로 동작 (원본에 change 이벤트 없음). update:modelValue 직접 emit.
|
|
8
|
+
* `disabledExpr`·`size` 는 segment 접근성 보강(ITSM-2026-002578)에서 추가 — 여기 없으면 브리지가
|
|
9
|
+
* rest 로 흘려 DOM attribute 가 된다.
|
|
8
10
|
*/
|
|
9
11
|
export declare const RADIO_SPEC: MozSpec<RadioProps, RadioEmits, void>;
|
|
@@ -9,6 +9,29 @@
|
|
|
9
9
|
* 선택 시 modelValue = String(item[valueExpr]) (handler 에 disabled guard 없음 — native :disabled 로만 차단).
|
|
10
10
|
* - emit 은 update:modelValue 뿐 (원본에 defineEmits 없음; v-model 전용). tooltipExpr 는 dead prop.
|
|
11
11
|
* - getBoxedOffsetStyle 는 i!==0 boxed 에 marginInlineStart/BlockStart '-1px' 상수 (원본 test 의 inset/누적 기대는 stale).
|
|
12
|
+
*
|
|
13
|
+
* ## segment 모드의 radiogroup 시맨틱 (ITSM-2026-002578)
|
|
14
|
+
*
|
|
15
|
+
* 종전 segment 는 `div.segment-button` 에 click 하나뿐이라 키보드로 진입조차 안 되는 마우스 전용
|
|
16
|
+
* UI 였다(single/group 은 native `<input type="radio">` 라 브라우저가 처리한다). 지금은:
|
|
17
|
+
* - 컨트롤 루트(`.moz-radio-buttons`, rest 가 붙는 노드)가 `role="radiogroup"` — 소비자의
|
|
18
|
+
* `aria-label`/`aria-labelledby` 가 그대로 그룹명이 되고, 둘 다 없으면 `label` prop 이 이름이다.
|
|
19
|
+
* single/group 루트에는 role 을 붙이지 않는다(native radio 의 암묵 시맨틱과 중복).
|
|
20
|
+
* - 세그먼트는 `<button type="button" role="radio" aria-checked>` — native disabled(포커스 제외·클릭
|
|
21
|
+
* 차단)와 Enter/Space→click 을 브라우저에 맡긴다.
|
|
22
|
+
* - 로빙 tabindex: 선택 항목만 `0`. 선택 항목이 항목별 disabled 로 잠겨 있으면 첫 활성 항목이
|
|
23
|
+
* `0` 을 넘겨받는다 — 그렇지 않으면 그룹 전체의 tab stop 이 0개가 되어 키보드로 진입할 수 없다.
|
|
24
|
+
* - 키보드(Tab 코어와 같은 automatic activation): ←/→(↑/↓) 순환 이동 = 선택, Home/End 는
|
|
25
|
+
* 처음/끝 **활성** 항목, 비활성 항목은 건너뛴다. emit 값은 종전과 같은 RAW `item[valueExpr]`.
|
|
26
|
+
* controlled 소비처는 선택이 몇 틱 뒤에 반영되므로 `aria-checked` 가 된 프레임에 포커스를 정착시킨다.
|
|
27
|
+
* - 컨테이너 click 은 바깥으로 전파하지 않는다(항목 행 안에서 행 클릭과 분리).
|
|
28
|
+
* - 새 prop: `disabledExpr`(기본 'disabled') — 항목별 비활성 키, 컨테이너 `disabled` 와 OR.
|
|
29
|
+
* group 모드에서도 같은 항목이 native disabled 가 된다. `size`('md' 32px 기본 / 'sm' 24px) —
|
|
30
|
+
* segment 컨테이너 높이 tier(높이 토큰이 없어 클래스로 푼다).
|
|
31
|
+
*
|
|
32
|
+
* 레거시 트랙 `src/ui/radio/Radio.vue` 는 코드를 공유하지 않는 별도 패키지라 손대지 않는다.
|
|
33
|
+
* "1:1 포팅" 과 `-vue` 의 `Radio.parity.test.ts` 는 **레거시 동작을 보존한다** 는 회귀 계약이지
|
|
34
|
+
* 레거시를 같이 고쳐야 한다는 뜻이 아니다 — 위 보강은 순수 추가라 parity 테스트를 무수정 통과한다.
|
|
12
35
|
*/
|
|
13
36
|
export interface RadioProps {
|
|
14
37
|
label?: string;
|
|
@@ -18,11 +41,15 @@ export interface RadioProps {
|
|
|
18
41
|
displayExpr?: string;
|
|
19
42
|
valueExpr?: string;
|
|
20
43
|
tooltipExpr?: string;
|
|
44
|
+
/** itemsSource 항목의 비활성 키(기본 'disabled'). 컨테이너 `disabled` 와 OR 로 합쳐진다. */
|
|
45
|
+
disabledExpr?: string;
|
|
21
46
|
itemsSource?: Record<string, unknown>[];
|
|
22
47
|
value?: string | number;
|
|
23
48
|
name?: string;
|
|
24
49
|
direction?: 'horizontal' | 'vertical';
|
|
25
50
|
variant?: 'borderless' | 'boxed' | 'segment';
|
|
51
|
+
/** segment 컨테이너 높이 tier — md 32px(기본) / sm 24px. 다른 variant 에서는 무시된다. */
|
|
52
|
+
size?: 'md' | 'sm';
|
|
26
53
|
labelPosition?: 'top' | 'left';
|
|
27
54
|
modelValue?: unknown;
|
|
28
55
|
class?: unknown;
|