@alfadocs/ui-kit-debug 1.29.0 → 1.30.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.
@@ -1,33 +1,33 @@
1
1
  import { u as A } from "../_chunks/use-prefers-reduced-motion-BMwIQRjB.js";
2
2
  import { u as D } from "../_chunks/use-media-query-CcAx5SMM.js";
3
- import { u as F, a as g } from "../_chunks/use-signing-session-CyOZWinp.js";
4
- import { u as _ } from "../_chunks/use-count-up-BLLetaZ8.js";
5
- import { u as P } from "../_chunks/use-locale-BkCIHujH.js";
6
- import { A as k, T as K, a as V, r as H, t as M, u as Y } from "../_chunks/use-theme-CAuo6EYT.js";
3
+ import { Z as w, u as _, a as F, b as I } from "../_chunks/use-zoom-drilldown-qCX34w9I.js";
4
+ import { u as R } from "../_chunks/use-count-up-BLLetaZ8.js";
5
+ import { u as k } from "../_chunks/use-locale-BkCIHujH.js";
6
+ import { A as M, T as V, a as H, r as N, t as Y, u as Z } from "../_chunks/use-theme-CAuo6EYT.js";
7
7
  import { u as B } from "../_chunks/use-controllable-state-BiY4xTzM.js";
8
8
  import { u as U } from "../_chunks/use-copy-to-clipboard-Cyfc_dlv.js";
9
- import { u as z } from "../_chunks/use-debounced-callback-BisrB-Fq.js";
9
+ import { u as j } from "../_chunks/use-debounced-callback-BisrB-Fq.js";
10
10
  import { useState as E, useRef as b, useEffect as x } from "react";
11
- import { u as W, a as J } from "../_chunks/use-direction-Dp8h70PP.js";
12
- import { u as X } from "../_chunks/use-persistent-state-nZwZAnE9.js";
13
- import { u as $ } from "../_chunks/use-isomorphic-layout-effect-BGfaCOP1.js";
14
- import { u as te } from "../_chunks/use-overflow-collapse-BIOzKbni.js";
15
- import { c as oe, u as ue } from "../_chunks/use-priority-overflow-c9SjxZkZ.js";
16
- import { u as se } from "../_chunks/use-web-otp-D_utzp6S.js";
17
- import { u as ie } from "../_chunks/use-visual-viewport-pin-ChurOsHM.js";
18
- import { u as fe } from "../_chunks/use-edge-resize-ZnGG7gyO.js";
19
- import { u as me } from "../_chunks/use-countdown-Yd6ts0_a.js";
20
- function y(e, o) {
11
+ import { u as Q, a as J } from "../_chunks/use-direction-Dp8h70PP.js";
12
+ import { u as $ } from "../_chunks/use-persistent-state-nZwZAnE9.js";
13
+ import { u as te } from "../_chunks/use-isomorphic-layout-effect-BGfaCOP1.js";
14
+ import { u as oe } from "../_chunks/use-overflow-collapse-BIOzKbni.js";
15
+ import { c as se, u as ne } from "../_chunks/use-priority-overflow-c9SjxZkZ.js";
16
+ import { u as ie } from "../_chunks/use-web-otp-D_utzp6S.js";
17
+ import { u as le } from "../_chunks/use-visual-viewport-pin-ChurOsHM.js";
18
+ import { u as me } from "../_chunks/use-edge-resize-ZnGG7gyO.js";
19
+ import { u as pe } from "../_chunks/use-countdown-Yd6ts0_a.js";
20
+ function C(e, o) {
21
21
  const [t, i] = E(e), u = b(null);
22
22
  return x(() => {
23
23
  if (o <= 0) {
24
24
  u.current !== null && (clearTimeout(u.current), u.current = null), i(e);
25
25
  return;
26
26
  }
27
- const s = setTimeout(() => {
27
+ const n = setTimeout(() => {
28
28
  i(e), u.current = null;
29
29
  }, o);
30
- return u.current = s, () => clearTimeout(s);
30
+ return u.current = n, () => clearTimeout(n);
31
31
  }, [e, o]), t;
32
32
  }
33
33
  const T = [
@@ -54,31 +54,31 @@ function p(e) {
54
54
  return !0;
55
55
  });
56
56
  }
57
- function C(e, o = {}) {
58
- const { enabled: t = !0, autoFocus: i = !0, restoreFocus: u = !0 } = o, s = b(null);
57
+ function y(e, o = {}) {
58
+ const { enabled: t = !0, autoFocus: i = !0, restoreFocus: u = !0 } = o, n = b(null);
59
59
  x(() => {
60
60
  if (!t) return;
61
61
  const a = e.current;
62
62
  if (!a) return;
63
- if (s.current = typeof document < "u" && document.activeElement instanceof HTMLElement ? document.activeElement : null, i) {
64
- const n = p(a)[0] ?? (a.tabIndex >= -1 ? a : null);
65
- n == null || n.focus();
63
+ if (n.current = typeof document < "u" && document.activeElement instanceof HTMLElement ? document.activeElement : null, i) {
64
+ const s = p(a)[0] ?? (a.tabIndex >= -1 ? a : null);
65
+ s == null || s.focus();
66
66
  }
67
- function l(r) {
67
+ function f(r) {
68
68
  if (r.key !== "Tab") return;
69
- const n = e.current;
70
- if (!n) return;
71
- const c = p(n);
69
+ const s = e.current;
70
+ if (!s) return;
71
+ const c = p(s);
72
72
  if (c.length === 0) {
73
73
  r.preventDefault();
74
74
  return;
75
75
  }
76
- const m = c[0], d = c[c.length - 1], f = document.activeElement;
77
- r.shiftKey ? (f === m || !n.contains(f)) && (r.preventDefault(), d.focus()) : (f === d || !n.contains(f)) && (r.preventDefault(), m.focus());
76
+ const m = c[0], d = c[c.length - 1], l = document.activeElement;
77
+ r.shiftKey ? (l === m || !s.contains(l)) && (r.preventDefault(), d.focus()) : (l === d || !s.contains(l)) && (r.preventDefault(), m.focus());
78
78
  }
79
- return a.addEventListener("keydown", l), () => {
80
- if (a.removeEventListener("keydown", l), u && s.current) {
81
- const r = s.current;
79
+ return a.addEventListener("keydown", f), () => {
80
+ if (a.removeEventListener("keydown", f), u && n.current) {
81
+ const r = n.current;
82
82
  requestAnimationFrame(() => {
83
83
  r.isConnected && r.focus();
84
84
  });
@@ -87,33 +87,35 @@ function C(e, o = {}) {
87
87
  }, [t, i, u, e]);
88
88
  }
89
89
  export {
90
- k as ACCESSIBILITY_STORAGE_KEY,
91
- K as THEME_CLASS,
92
- V as THEME_STORAGE_KEY,
93
- oe as computePriorityLayout,
94
- H as resolveTheme,
95
- M as themeClassList,
90
+ M as ACCESSIBILITY_STORAGE_KEY,
91
+ V as THEME_CLASS,
92
+ H as THEME_STORAGE_KEY,
93
+ w as ZOOM_DRILLDOWN_TRANSITION_CLASS,
94
+ se as computePriorityLayout,
95
+ N as resolveTheme,
96
+ Y as themeClassList,
96
97
  B as useControllableState,
97
98
  U as useCopyToClipboard,
98
- _ as useCountUp,
99
- me as useCountdown,
100
- z as useDebouncedCallback,
101
- y as useDebouncedValue,
102
- W as useDirection,
99
+ R as useCountUp,
100
+ pe as useCountdown,
101
+ j as useDebouncedCallback,
102
+ C as useDebouncedValue,
103
+ Q as useDirection,
103
104
  J as useDocumentDirection,
104
- fe as useEdgeResize,
105
- C as useFocusTrap,
106
- $ as useIsomorphicLayoutEffect,
107
- P as useLocale,
105
+ me as useEdgeResize,
106
+ y as useFocusTrap,
107
+ te as useIsomorphicLayoutEffect,
108
+ k as useLocale,
108
109
  D as useMediaQuery,
109
- te as useOverflowCollapse,
110
- X as usePersistentState,
110
+ oe as useOverflowCollapse,
111
+ $ as usePersistentState,
111
112
  A as usePrefersReducedMotion,
112
- ue as usePriorityOverflow,
113
- F as useScrollToFirstError,
114
- g as useSigningSession,
115
- Y as useTheme,
116
- ie as useVisualViewportPin,
117
- se as useWebOtp
113
+ ne as usePriorityOverflow,
114
+ _ as useScrollToFirstError,
115
+ F as useSigningSession,
116
+ Z as useTheme,
117
+ le as useVisualViewportPin,
118
+ ie as useWebOtp,
119
+ I as useZoomDrilldown
118
120
  };
119
121
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,23 @@
1
+ /**
2
+ * The `view-transition-class` the shipped CSS targets. Add it as a class name
3
+ * to the source element and the detail, next to their shared
4
+ * `view-transition-name`. The kit sheet maps the class to the property.
5
+ */
6
+ export declare const ZOOM_DRILLDOWN_TRANSITION_CLASS: "ds-zoom-drilldown";
7
+ export interface UseZoomDrilldownOptions {
8
+ /** Resolver for the scroll container whose scrollTop should be preserved
9
+ * across the transition. Defaults to the nearest `<main>` element in
10
+ * the document (or the Radix ScrollArea viewport around it). The window
11
+ * scroll position is always tracked alongside. */
12
+ getScrollContainer?: () => HTMLElement | null;
13
+ }
14
+ export interface UseZoomDrilldownReturn<Id extends string> {
15
+ /** The open drill-down target, or `null` while the source view shows. */
16
+ readonly selected: Id | null;
17
+ /** Zoom into `id`: saves the scroll position and enters at the top. */
18
+ readonly open: (id: Id) => void;
19
+ /** Zoom back out and restore the saved scroll position. */
20
+ readonly close: () => void;
21
+ }
22
+ export declare function useZoomDrilldown<Id extends string>(options?: UseZoomDrilldownOptions): UseZoomDrilldownReturn<Id>;
23
+ //# sourceMappingURL=use-zoom-drilldown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-zoom-drilldown.d.ts","sourceRoot":"","sources":["../../src/hooks/use-zoom-drilldown.ts"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,EAAG,mBAA4B,CAAC;AAE5E,MAAM,WAAW,uBAAuB;IACtC;;;uDAGmD;IACnD,kBAAkB,CAAC,EAAE,MAAM,WAAW,GAAG,IAAI,CAAC;CAC/C;AAED,MAAM,WAAW,sBAAsB,CAAC,EAAE,SAAS,MAAM;IACvD,yEAAyE;IACzE,QAAQ,CAAC,QAAQ,EAAE,EAAE,GAAG,IAAI,CAAC;IAC7B,uEAAuE;IACvE,QAAQ,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,KAAK,IAAI,CAAC;IAChC,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC;CAC5B;AA2BD,wBAAgB,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAChD,OAAO,GAAE,uBAA4B,GACpC,sBAAsB,CAAC,EAAE,CAAC,CAsG5B"}
@@ -202,7 +202,7 @@
202
202
 
203
203
  /* ───────────────────────────────────────────────────────────────────────
204
204
  SECTION B — non-token declarations. ORIGINAL LAYER PRESERVED.
205
- 129 declarations across 125 rules.
205
+ 130 declarations across 126 rules.
206
206
 
207
207
  Kit-authored arbitrary-value utilities (`ds:w-[20rem]`) and the
208
208
  vendored AG Grid rules. These set real properties on real elements,
@@ -469,6 +469,9 @@
469
469
  .ds\:auto-rows-\[19rem\] {
470
470
  grid-auto-rows:304px;
471
471
  }
472
+ .ds\:auto-rows-\[22rem\] {
473
+ grid-auto-rows:352px;
474
+ }
472
475
  .ds\:auto-rows-\[minmax\(12rem\,auto\)\] {
473
476
  grid-auto-rows:minmax(192px,auto);
474
477
  }