@nation-a/ui 0.16.5 → 0.16.6

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/README.md CHANGED
@@ -8,6 +8,7 @@ Nation-A 디자인 시스템의 UI 컴포넌트 라이브러리입니다. 모던
8
8
  - **접근성 중심**: Ark UI를 활용한 접근성 준수 컴포넌트
9
9
  - **테마 지원**: 다크모드와 라이트모드를 포함한 테마 지원
10
10
  - **Storybook 문서화**: 모든 컴포넌트에 대한 사용 예시와 문서
11
+ - **테스트**: 컴포넌트 테스트를 통한 품질 보장
11
12
 
12
13
  ## 설치
13
14
 
@@ -42,6 +43,33 @@ pnpm panda
42
43
  pnpm build
43
44
  ```
44
45
 
46
+ ## 테스트
47
+
48
+ ```bash
49
+ # 모든 테스트 실행
50
+ pnpm test
51
+
52
+ # 감시 모드로 테스트 실행
53
+ pnpm test:watch
54
+
55
+ # 테스트 커버리지 확인
56
+ pnpm test:coverage
57
+
58
+ # 새 컴포넌트를 위한 테스트 파일 생성
59
+ pnpm generate-tests
60
+ ```
61
+
62
+ ### 테스트 환경
63
+
64
+ 테스트 환경은 다음 도구를 사용합니다:
65
+
66
+ - Vitest - 테스트 실행기
67
+ - React Testing Library - React 컴포넌트 테스트
68
+ - Happy DOM - DOM 시뮬레이션
69
+ - Jest DOM - DOM 매처 확장
70
+
71
+ 자세한 내용은 `src/test/README.md`를 참조하세요.
72
+
45
73
  ## 의존성
46
74
 
47
75
  - React 18.x
package/dist/index.cjs CHANGED
@@ -298,7 +298,7 @@ function normalizeHTMLProps(props) {
298
298
  return Object.fromEntries(Object.entries(props).map(([key, value]) => [convert(key), value]));
299
299
  }
300
300
  normalizeHTMLProps.keys = htmlProps;
301
- const conditionsStr = "_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_collapsed,_off,_on,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,2xl,2xlOnly,2xlDown,smToMd,smToLg,smToXl,smTo2xl,mdToLg,mdToXl,mdTo2xl,lgToXl,lgTo2xl,xlTo2xl,base";
301
+ const conditionsStr = "_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_collapsed,_off,_on,xs,xsOnly,xsDown,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,2xl,2xlOnly,2xlDown,xsToSm,xsToMd,xsToLg,xsToXl,xsTo2xl,smToMd,smToLg,smToXl,smTo2xl,mdToLg,mdToXl,mdTo2xl,lgToXl,lgTo2xl,xlTo2xl,base";
302
302
  const conditions$1 = new Set(conditionsStr.split(","));
303
303
  const conditionRegex = /^@|&|&$/;
304
304
  function isCondition(value) {
@@ -344,7 +344,7 @@ const context = {
344
344
  conditions: {
345
345
  shift: sortConditions,
346
346
  finalize: finalizeConditions,
347
- breakpoints: { keys: ["base", "sm", "md", "lg", "xl", "2xl"] }
347
+ breakpoints: { keys: ["base", "xs", "sm", "md", "lg", "xl", "2xl"] }
348
348
  },
349
349
  utility: {
350
350
  transform: (prop, value) => {
@@ -802,7 +802,7 @@ const Spinner = React.forwardRef(({ className, size: size2, color: color2, ...pr
802
802
  setLottieComponent(() => mod.default);
803
803
  });
804
804
  }, []);
805
- return /* @__PURE__ */ jsxRuntime.jsx(Box2, { ref, ...props, className: cx(spinnerRecipe({ size: size2 }), css$1({ color: color2 }), className), children: LottieComponent && /* @__PURE__ */ jsxRuntime.jsx(
805
+ return /* @__PURE__ */ jsxRuntime.jsx(Box2, { ref, id: "spinner", ...props, className: cx(spinnerRecipe({ size: size2 }), css$1({ color: color2 }), className), children: LottieComponent && /* @__PURE__ */ jsxRuntime.jsx(
806
806
  LottieComponent,
807
807
  {
808
808
  options: {
@@ -9952,7 +9952,18 @@ const TabsRoot = React.forwardRef((props, ref) => {
9952
9952
  return /* @__PURE__ */ jsxRuntime.jsx(TabsProvider, { value: tabs, children: /* @__PURE__ */ jsxRuntime.jsx(RenderStrategyPropsProvider, { value: renderStrategyProps, children: /* @__PURE__ */ jsxRuntime.jsx(ark.div, { ...mergedProps, ref }) }) });
9953
9953
  });
9954
9954
  TabsRoot.displayName = "TabsRoot";
9955
- const Button = ({ loading, disabled, loadingText, children, color: color2, variant, size: size2, radius, ...rest }) => {
9955
+ const Button = ({
9956
+ loading,
9957
+ disabled,
9958
+ loadingText,
9959
+ children,
9960
+ color: color2,
9961
+ variant,
9962
+ size: size2,
9963
+ radius,
9964
+ onClick,
9965
+ ...rest
9966
+ }) => {
9956
9967
  const StyledButton = styled(ark.button, buttonRecipe);
9957
9968
  return /* @__PURE__ */ jsxRuntime.jsx(
9958
9969
  StyledButton,
@@ -9963,6 +9974,7 @@ const Button = ({ loading, disabled, loadingText, children, color: color2, varia
9963
9974
  size: size2,
9964
9975
  radius,
9965
9976
  css: { pointerEvents: loading ? "none" : "auto" },
9977
+ onClick: disabled || loading ? void 0 : onClick,
9966
9978
  ...rest,
9967
9979
  children: loading ? loadingText || /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
9968
9980
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -21590,6 +21602,7 @@ const conditions = {
21590
21602
  }
21591
21603
  };
21592
21604
  const breakpoints = {
21605
+ xs: "480px",
21593
21606
  sm: "640px",
21594
21607
  md: "768px",
21595
21608
  lg: "1024px",