@t3q-ui/design-system 1.63.2 → 1.64.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ <!-- release: v1.64.0 -->
4
+ # 1.64.0 (2026-11-22)
5
+
6
+
7
+ ### Bug Fixes
8
+
9
+ * **Tooltip:** :bug: Drawer·Dialog 가 닫히며 포커스를 돌려줄 때 Tooltip 이 다시 떠서 남던 것 (3ec89e5)
10
+
11
+
12
+ ### Features
13
+
14
+ * **ChatPage:** :sparkles: 상단 바 제거 — 로고·접기는 기록 바 맨 위, 모델 선택·행동은 대화 영역 맨 위, 접으면 레일 (abac374)
15
+
3
16
  <!-- release: v1.63.2 -->
4
17
  ## 1.63.2 (2026-11-18)
5
18
 
@@ -1393,9 +1393,62 @@ function Badge({ className, variant, rounded, appearance, size, children, ...pro
1393
1393
  }
1394
1394
  );
1395
1395
  }
1396
+ var restoring = false;
1397
+ function isRestoringFocus() {
1398
+ return restoring;
1399
+ }
1400
+ function useRestoreFocusToOpener({
1401
+ onOpenAutoFocus,
1402
+ onCloseAutoFocus
1403
+ }) {
1404
+ const openerRef = React10.useRef(null);
1405
+ const handleOpenAutoFocus = React10.useCallback(
1406
+ (event) => {
1407
+ openerRef.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
1408
+ onOpenAutoFocus?.(event);
1409
+ },
1410
+ [onOpenAutoFocus]
1411
+ );
1412
+ const handleCloseAutoFocus = React10.useCallback(
1413
+ (event) => {
1414
+ onCloseAutoFocus?.(event);
1415
+ if (event.defaultPrevented) return;
1416
+ const opener = openerRef.current;
1417
+ if (!opener || opener === document.body || !opener.isConnected) return;
1418
+ event.preventDefault();
1419
+ restoring = true;
1420
+ try {
1421
+ opener.focus({ preventScroll: true });
1422
+ } finally {
1423
+ restoring = false;
1424
+ }
1425
+ },
1426
+ [onCloseAutoFocus]
1427
+ );
1428
+ return { onOpenAutoFocus: handleOpenAutoFocus, onCloseAutoFocus: handleCloseAutoFocus };
1429
+ }
1396
1430
  var TooltipProvider = TooltipPrimitive__namespace.Provider;
1431
+ function isKeyboardFocus(el) {
1432
+ try {
1433
+ return el.matches(":focus-visible");
1434
+ } catch {
1435
+ return true;
1436
+ }
1437
+ }
1397
1438
  var Tooltip = TooltipPrimitive__namespace.Root;
1398
- var TooltipTrigger = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Trigger, { type: "button", ref, className: chunkOQOBPYZT_cjs.cn(className), ...props }));
1439
+ var TooltipTrigger = React10__namespace.forwardRef(({ className, onFocus, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1440
+ TooltipPrimitive__namespace.Trigger,
1441
+ {
1442
+ type: "button",
1443
+ ref,
1444
+ className: chunkOQOBPYZT_cjs.cn(className),
1445
+ ...props,
1446
+ onFocus: (e) => {
1447
+ onFocus?.(e);
1448
+ if (isRestoringFocus() && !isKeyboardFocus(e.target)) e.preventDefault();
1449
+ }
1450
+ }
1451
+ ));
1399
1452
  TooltipTrigger.displayName = TooltipPrimitive__namespace.Trigger.displayName;
1400
1453
  var TooltipContent = React10__namespace.forwardRef(({ className, sideOffset = 4, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
1401
1454
  TooltipPrimitive__namespace.Content,
@@ -3609,31 +3662,6 @@ function ChatMessage({
3609
3662
  }
3610
3663
  );
3611
3664
  }
3612
- function useRestoreFocusToOpener({
3613
- onOpenAutoFocus,
3614
- onCloseAutoFocus
3615
- }) {
3616
- const openerRef = React10.useRef(null);
3617
- const handleOpenAutoFocus = React10.useCallback(
3618
- (event) => {
3619
- openerRef.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
3620
- onOpenAutoFocus?.(event);
3621
- },
3622
- [onOpenAutoFocus]
3623
- );
3624
- const handleCloseAutoFocus = React10.useCallback(
3625
- (event) => {
3626
- onCloseAutoFocus?.(event);
3627
- if (event.defaultPrevented) return;
3628
- const opener = openerRef.current;
3629
- if (!opener || opener === document.body || !opener.isConnected) return;
3630
- event.preventDefault();
3631
- opener.focus({ preventScroll: true });
3632
- },
3633
- [onCloseAutoFocus]
3634
- );
3635
- return { onOpenAutoFocus: handleOpenAutoFocus, onCloseAutoFocus: handleCloseAutoFocus };
3636
- }
3637
3665
  var Dialog = DialogPrimitive__namespace.Root;
3638
3666
  var DialogTrigger = DialogPrimitive__namespace.Trigger;
3639
3667
  var DialogPortal = DialogPrimitive__namespace.Portal;
@@ -5797,5 +5825,5 @@ exports.withNumberColumnWidth = withNumberColumnWidth;
5797
5825
  exports.withSortIconOffset = withSortIconOffset;
5798
5826
  exports.withTypeClasses = withTypeClasses;
5799
5827
  exports.withWidthFloor = withWidthFloor;
5800
- //# sourceMappingURL=chunk-LIXLOSPF.cjs.map
5801
- //# sourceMappingURL=chunk-LIXLOSPF.cjs.map
5828
+ //# sourceMappingURL=chunk-LLVWCDR5.cjs.map
5829
+ //# sourceMappingURL=chunk-LLVWCDR5.cjs.map