@ihabdevteam/core 0.13.0 → 0.13.1

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.
@@ -3889,7 +3889,7 @@ export declare interface ProgressBarProps {
3889
3889
  }
3890
3890
 
3891
3891
  /** @public */
3892
- export declare function ProgressIndicator({ max, index, inactiveBg, inactiveColor, transparent, variant, announce }: ProgressIndicatorProps): JSX.Element | null;
3892
+ export declare function ProgressIndicator({ max, index, inactiveBg, inactiveColor, transparent, variant, announce, ariaLabel }: ProgressIndicatorProps): JSX.Element | null;
3893
3893
 
3894
3894
  /** @public */
3895
3895
  export declare interface ProgressIndicatorProps {
@@ -3923,6 +3923,14 @@ export declare interface ProgressIndicatorProps {
3923
3923
  * 자리(검사 안내)에서는 켜는 편이 낫다.
3924
3924
  */
3925
3925
  announce?: boolean;
3926
+ /**
3927
+ * 이름표를 직접 준다. 안 주면 i18n 의 `progress.steps` 로 짓는다.
3928
+ *
3929
+ * i18n 을 쓰지 않는 앱에서는 그 값이 한글 기본값으로 떨어진다 —
3930
+ * 화면은 영문인데 이름표만 한글이 되는 자리가 실제로 있었다
3931
+ * (sound-localization-system 의 병원용 빌드).
3932
+ */
3933
+ ariaLabel?: string;
3926
3934
  }
3927
3935
 
3928
3936
  /** key → 실제 배경 컴포넌트. PromoBanner 등 사용처가 이걸로 렌더한다. 각 컴포넌트는 자신의
@@ -31,6 +31,14 @@ export interface ProgressIndicatorProps {
31
31
  * 자리(검사 안내)에서는 켜는 편이 낫다.
32
32
  */
33
33
  announce?: boolean;
34
+ /**
35
+ * 이름표를 직접 준다. 안 주면 i18n 의 `progress.steps` 로 짓는다.
36
+ *
37
+ * i18n 을 쓰지 않는 앱에서는 그 값이 한글 기본값으로 떨어진다 —
38
+ * 화면은 영문인데 이름표만 한글이 되는 자리가 실제로 있었다
39
+ * (sound-localization-system 의 병원용 빌드).
40
+ */
41
+ ariaLabel?: string;
34
42
  }
35
43
  /** @public */
36
- export default function ProgressIndicator({ max, index, inactiveBg, inactiveColor, transparent, variant, announce }: ProgressIndicatorProps): import("react").JSX.Element | null;
44
+ export default function ProgressIndicator({ max, index, inactiveBg, inactiveColor, transparent, variant, announce, ariaLabel }: ProgressIndicatorProps): import("react").JSX.Element | null;
@@ -14,7 +14,7 @@ import './ProgressIndicator.css';
14
14
  */
15
15
  const TRANSPARENT_INACTIVE_BG = 'rgba(255, 255, 255, 0.16)';
16
16
  /** @public */
17
- export default function ProgressIndicator({ max, index, inactiveBg, inactiveColor, transparent, variant = 'numbered', announce = false }) {
17
+ export default function ProgressIndicator({ max, index, inactiveBg, inactiveColor, transparent, variant = 'numbered', announce = false, ariaLabel }) {
18
18
  const { t } = useTranslation();
19
19
  const isMobile = useMediaQuery('(max-width: 767px)');
20
20
  if (!Number.isInteger(max) || max <= 0)
@@ -23,7 +23,7 @@ export default function ProgressIndicator({ max, index, inactiveBg, inactiveColo
23
23
  /* 목록에 이름이 없어 낭독기가 "목록, 4개, 1, 2, 3, 4" 로만 읽었다 — 무엇의 목록인지,
24
24
  지금 어디인지 알 수 없다. 훈련 팝업에는 숫자 묶음이 여럿이라 더 헷갈린다.
25
25
  칸마다 붙은 aria-current 는 목록을 훑어야 닿으므로, **머리에서 바로 자리를 말한다.** */
26
- const groupLabel = t('progress.steps', {
26
+ const groupLabel = ariaLabel ?? t('progress.steps', {
27
27
  current: idx + 1, total: max, defaultValue: '진행 단계 {{current}} / {{total}}',
28
28
  });
29
29
  const rootStyle = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ihabdevteam/core",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "private": false,
5
5
  "main": "dist/ihabdevteam-core.cjs.js",
6
6
  "module": "dist/ihabdevteam-core.esm.js",