@ncds/ui-admin 1.8.23-alpha.1 → 1.8.24

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.
@@ -16,4 +16,4 @@ type BadgeProps = {
16
16
  };
17
17
  declare const Badge: ({ label, type, color, className, leadingIcon, trailingIcon, size, }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
18
18
  export { Badge };
19
- export type { BadgeColor, BadgeProps, BadgeSize, BadgeType };
19
+ export type { BadgeType, BadgeColor, BadgeSize, BadgeProps };
@@ -7,7 +7,7 @@ import { sideSlotRender } from './utils';
7
7
  */
8
8
  const BADGE_ICON_SIZE = 12;
9
9
  /** new-badge 박스 안에 들어가는 'N' 아이콘 크기. 박스는 sm 16px / md 20px 이며 아이콘은 그보다 작다(패딩 포함). */
10
- const NEW_BADGE_ICON_SIZE = { sm: 12, md: 14 };
10
+ const NEW_BADGE_ICON_SIZE = { sm: 12, md: 16 };
11
11
  const Badge = ({ label, type = 'pill-outline', color = 'neutral', className, leadingIcon, trailingIcon, size = 'xs', }) => {
12
12
  // new-badge: 신규 콘텐츠 'N' 마크 전용 타입. label·color·leadingIcon·trailingIcon은 무시되고
13
13
  // 색은 --pink-600 으로 고정된다. (디자이너 명세: Icon/FeaturedIcon/Badge로 대체 불가한 전용 표시)
@@ -4,10 +4,8 @@ interface BreadcrumbItemProps {
4
4
  }
5
5
  interface BreadcrumbProps {
6
6
  items: BreadcrumbItemProps[];
7
- /** 첫 항목을 홈 아이콘으로 렌더링할지 여부. false 이면 label 텍스트로 렌더링한다. */
8
- showHomeIcon?: boolean;
9
7
  className?: string;
10
8
  }
11
- declare const BreadCrumb: ({ items, showHomeIcon, className }: BreadcrumbProps) => import("react/jsx-runtime").JSX.Element | null;
9
+ declare const BreadCrumb: ({ items, className }: BreadcrumbProps) => import("react/jsx-runtime").JSX.Element | null;
12
10
  export { BreadCrumb };
13
11
  export type { BreadcrumbItemProps, BreadcrumbProps };
@@ -1,23 +1,19 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Home01 } from '@ncds/ui-admin-icon';
3
3
  import classNames from 'classnames';
4
- const BreadcrumbItem = ({ href, ariaLabel, children }) => {
4
+ const BreadcrumbItem = ({ href, children }) => {
5
5
  const ElementType = href ? 'a' : 'span';
6
- return (_jsx(ElementType, { href: href,
7
- // <span> 은 generic role 이라 aria-label 이 무시될 수 있다. 링크는 이미 이름을 지원하므로 그대로 둔다
8
- role: !href && ariaLabel ? 'img' : undefined, "aria-label": ariaLabel, className: "ncua-breadcrumb__item", children: children }));
6
+ return (_jsx(ElementType, { href: href, className: "ncua-breadcrumb__item", children: children }));
9
7
  };
10
- const BreadCrumb = ({ items, showHomeIcon = true, className }) => {
8
+ const BreadCrumb = ({ items, className }) => {
11
9
  if (!items || items.length === 0)
12
10
  return null;
13
11
  const renderItem = (item, index) => {
14
12
  const isLast = index === items.length - 1;
15
- // 아이콘 여부는 한 곳에서만 판정한다 — 콘텐츠·모디파이어·aria-label 이 모두 이 값을 따른다
16
- const isHome = showHomeIcon && index === 0;
13
+ const content = index === 0 ? _jsx(Home01, { width: 16, height: 16, color: "gray500" }) : item.label;
17
14
  return (_jsx("li", { className: classNames('ncua-breadcrumb__list-item', {
18
- 'ncua-breadcrumb__list-item--home': isHome,
19
15
  'ncua-breadcrumb__list-item--active': isLast,
20
- }), children: _jsx(BreadcrumbItem, { href: isLast ? undefined : item.href, ariaLabel: isHome ? item.label : undefined, children: isHome ? _jsx(Home01, { width: 16, height: 16, color: "gray500" }) : item.label }) }, index));
16
+ }), children: _jsx(BreadcrumbItem, { href: isLast ? undefined : item.href, children: content }) }, index));
21
17
  };
22
18
  return (_jsx("nav", { "aria-label": "breadcrumb", className: classNames('ncua-breadcrumb', className), children: _jsx("ol", { className: "ncua-breadcrumb__list", children: items.map(renderItem) }) }));
23
19
  };