@bigtablet/design-system 3.14.0 → 3.14.2

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/index.css CHANGED
@@ -2875,15 +2875,15 @@ body:has(.bottom_nav) {
2875
2875
  }
2876
2876
  .prose h1 {
2877
2877
  font-size: 24px;
2878
- font-weight: 400;
2878
+ font-weight: 700;
2879
2879
  line-height: 32px;
2880
- letter-spacing: 0px;
2880
+ letter-spacing: -0.01em;
2881
2881
  padding-bottom: 8px;
2882
2882
  border-bottom: 1px solid var(--bt-color-border-default);
2883
2883
  }
2884
2884
  .prose h2 {
2885
2885
  font-size: 20px;
2886
- font-weight: 400;
2886
+ font-weight: 700;
2887
2887
  line-height: 28px;
2888
2888
  letter-spacing: 0px;
2889
2889
  }
@@ -3034,20 +3034,29 @@ body:has(.bottom_nav) {
3034
3034
  }
3035
3035
  .prose_size_lg h1 {
3036
3036
  font-size: 28px;
3037
+ font-weight: 700;
3037
3038
  line-height: 36px;
3039
+ letter-spacing: -0.01em;
3038
3040
  }
3039
3041
  .prose_size_lg h2 {
3040
3042
  font-size: 24px;
3043
+ font-weight: 700;
3041
3044
  line-height: 32px;
3045
+ letter-spacing: -0.01em;
3042
3046
  }
3043
3047
  .prose_size_lg h3 {
3044
3048
  font-size: 20px;
3049
+ font-weight: 700;
3045
3050
  line-height: 28px;
3051
+ letter-spacing: 0px;
3046
3052
  }
3047
3053
  .prose_size_lg h4,
3048
3054
  .prose_size_lg h5,
3049
3055
  .prose_size_lg h6 {
3050
3056
  font-size: 18px;
3057
+ font-weight: 700;
3058
+ line-height: 24px;
3059
+ letter-spacing: 0px;
3051
3060
  line-height: 28px;
3052
3061
  }
3053
3062
  .prose_size_lg li {
package/dist/index.js CHANGED
@@ -121,6 +121,15 @@ function unlockBodyScroll() {
121
121
  body.dataset[COUNTER] = String(remaining);
122
122
  }
123
123
  }
124
+
125
+ // src/utils/spring-motion.ts
126
+ function springEnterFrom(reduced, transform) {
127
+ if (reduced) return {};
128
+ return { from: transform === void 0 ? { opacity: 0 } : { opacity: 0, transform } };
129
+ }
130
+ var OVERLAY_PANEL_CLOSED_TRANSFORM = "scale(0.96) translateY(-4px)";
131
+ var OVERLAY_PANEL_OPEN_TRANSFORM = "scale(1) translateY(0px)";
132
+ var OVERLAY_SPRING_CONFIG = { tension: 280, friction: 28, clamp: true };
124
133
  var useSafeLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
125
134
 
126
135
  // src/utils/use-anchored-position.ts
@@ -368,7 +377,10 @@ function useSpringPresence({
368
377
  }) {
369
378
  const reduced = useReducedMotion();
370
379
  return useSpring({
371
- from: { opacity: 0, transform: from },
380
+ // reduced-motion 에서는 `from` 생략한다 - 주면 첫 프레임에 from 이 DOM 에 커밋된 뒤
381
+ // immediate 가 목표값으로 점프해 모션 대신 한 프레임 깜빡임이 남는다. Toast 는 항상
382
+ // visible=true 로 마운트하므로 이 경로를 무조건 탄다. 자세한 근거는 springEnterFrom JSDoc.
383
+ ...springEnterFrom(reduced, from),
372
384
  to: {
373
385
  opacity: visible ? 1 : 0,
374
386
  transform: visible ? "translateY(0px)" : from
@@ -2815,18 +2827,22 @@ var AlertModal = ({
2815
2827
  if (isOpen && !shouldRender) setShouldRender(true);
2816
2828
  const reduced = useReducedMotion();
2817
2829
  const overlayStyle = useSpring({
2818
- opacity: isOpen ? 1 : 0,
2830
+ ...springEnterFrom(reduced),
2831
+ to: { opacity: isOpen ? 1 : 0 },
2819
2832
  immediate: reduced,
2820
- config: { tension: 280, friction: 28, clamp: !isOpen },
2833
+ config: OVERLAY_SPRING_CONFIG,
2821
2834
  onRest: (result) => {
2822
2835
  if (!isOpen && result.finished) setShouldRender(false);
2823
2836
  }
2824
2837
  });
2825
2838
  const panelStyle = useSpring({
2826
- opacity: isOpen ? 1 : 0,
2827
- transform: isOpen ? "scale(1) translateY(0px)" : "scale(0.96) translateY(-4px)",
2839
+ ...springEnterFrom(reduced, OVERLAY_PANEL_CLOSED_TRANSFORM),
2840
+ to: {
2841
+ opacity: isOpen ? 1 : 0,
2842
+ transform: isOpen ? OVERLAY_PANEL_OPEN_TRANSFORM : OVERLAY_PANEL_CLOSED_TRANSFORM
2843
+ },
2828
2844
  immediate: reduced,
2829
- config: { tension: 280, friction: 28, clamp: !isOpen }
2845
+ config: OVERLAY_SPRING_CONFIG
2830
2846
  });
2831
2847
  React16.useEffect(() => {
2832
2848
  if (!shouldRender) return;
@@ -2838,7 +2854,6 @@ var AlertModal = ({
2838
2854
  const cancelVariant = "outline";
2839
2855
  const modalClassName = cn("alert_modal", `alert_variant_${variant}`);
2840
2856
  return createPortal(
2841
- // biome-ignore lint/a11y/noStaticElementInteractions: modal overlay pattern
2842
2857
  /* @__PURE__ */ jsx(
2843
2858
  animated.div,
2844
2859
  {
@@ -4921,9 +4936,10 @@ var Modal = ({
4921
4936
  if (open && !shouldRender) setShouldRender(true);
4922
4937
  const reduced = useReducedMotion();
4923
4938
  const overlayStyle = useSpring({
4924
- opacity: open ? 1 : 0,
4939
+ ...springEnterFrom(reduced),
4940
+ to: { opacity: open ? 1 : 0 },
4925
4941
  immediate: reduced,
4926
- config: { tension: 280, friction: 28, clamp: !open },
4942
+ config: OVERLAY_SPRING_CONFIG,
4927
4943
  onRest: (result) => {
4928
4944
  if (open || !result.finished) return;
4929
4945
  setShouldRender(false);
@@ -4931,10 +4947,13 @@ var Modal = ({
4931
4947
  }
4932
4948
  });
4933
4949
  const panelStyle = useSpring({
4934
- opacity: open ? 1 : 0,
4935
- transform: open ? "scale(1) translateY(0px)" : "scale(0.96) translateY(-4px)",
4950
+ ...springEnterFrom(reduced, OVERLAY_PANEL_CLOSED_TRANSFORM),
4951
+ to: {
4952
+ opacity: open ? 1 : 0,
4953
+ transform: open ? OVERLAY_PANEL_OPEN_TRANSFORM : OVERLAY_PANEL_CLOSED_TRANSFORM
4954
+ },
4936
4955
  immediate: reduced,
4937
- config: { tension: 280, friction: 28, clamp: !open }
4956
+ config: OVERLAY_SPRING_CONFIG
4938
4957
  });
4939
4958
  React16.useEffect(() => {
4940
4959
  if (!open) return;
@@ -4983,6 +5002,9 @@ var Modal = ({
4983
5002
  // 늘어나는 정도의 비용이다.
4984
5003
  // 다만 초기 포커스 대상에서는 제외한다 - 안쪽에 첫 입력이 있는데 빈 wrapper 에
4985
5004
  // 포커스가 놓이면 열자마자 어디에 있는지 알 수 없다.
5005
+ // 스크롤 가능한 영역은 키보드로도 스크롤할 수 있어야 한다 (WCAG 2.1.1) - 포커스
5006
+ // 가능해야 화살표 키가 먹는다.
5007
+ // biome-ignore lint/a11y/noNoninteractiveTabindex: scrollable region needs keyboard scroll
4986
5008
  /* @__PURE__ */ jsx("div", { className: "modal_body", tabIndex: 0, "data-focus-trap-skip-autofocus": "", children: content.children }),
4987
5009
  content.footer && /* @__PURE__ */ jsx("div", { className: cn("modal_footer", `modal_footer_${footerAlign}`), children: content.footer })
4988
5010
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigtablet/design-system",
3
- "version": "3.14.0",
3
+ "version": "3.14.2",
4
4
  "description": "Bigtablet Design System UI Components",
5
5
  "type": "module",
6
6
  "types": "dist/index.d.ts",
@@ -46,7 +46,10 @@
46
46
  "test:watch": "vitest --project unit",
47
47
  "test:coverage": "vitest run --project unit --coverage",
48
48
  "test:storybook": "vitest run --project storybook",
49
- "lint:css": "stylelint 'src/ui/**/*.scss' 'src/styles/**/*.scss'",
49
+ "lint:css": "stylelint 'src/ui/**/*.scss' 'src/styles/**/*.scss' 'src/vanilla/**/*.scss'",
50
+ "check:css-vars": "scripts/check-css-vars.sh",
51
+ "check:prose": "scripts/check-prose-headings.sh",
52
+ "check:defaults": "python3 scripts/check-prop-defaults.py",
50
53
  "size": "size-limit",
51
54
  "prepare": "husky"
52
55
  },