beez-ui 3.0.0 → 4.0.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 +32 -0
- package/README.md +45 -47
- package/dist/components/account-menu.js +1 -1
- package/dist/components/alert.js +3 -7
- package/dist/components/animated-collapse.js +51 -38
- package/dist/components/animated-list-item.js +33 -34
- package/dist/components/animated-theme-toggler.d.ts +5 -1
- package/dist/components/animated-theme-toggler.js +75 -120
- package/dist/components/badge.js +7 -11
- package/dist/components/card.js +13 -16
- package/dist/components/dialog-surface.js +8 -21
- package/dist/components/filter-query-bar.js +7 -11
- package/dist/components/input-group.js +5 -9
- package/dist/components/input.js +8 -12
- package/dist/components/label.js +4 -8
- package/dist/components/link.d.ts +1 -0
- package/dist/components/link.js +2 -16
- package/dist/components/presence-swap.d.ts +1 -1
- package/dist/components/presence-swap.js +44 -32
- package/dist/components/primitives/avatar.js +8 -10
- package/dist/components/primitives/dropdown-menu.d.ts +2 -2
- package/dist/components/primitives/dropdown-menu.js +8 -5
- package/dist/components/primitives/select.d.ts +2 -1
- package/dist/components/primitives/select.js +104 -83
- package/dist/components/reaction-button.d.ts +5 -6
- package/dist/components/reaction-button.js +139 -75
- package/dist/components/rich-link-editor.js +1 -1
- package/dist/components/separator.js +5 -9
- package/dist/components/sheet.js +8 -11
- package/dist/components/sidebar.d.ts +6 -6
- package/dist/components/sidebar.js +221 -184
- package/dist/components/svgs/whatsappIcon.js +10 -14
- package/dist/components/table.js +4 -8
- package/dist/components/textarea.js +7 -11
- package/dist/components/themed-toaster.js +28 -62
- package/dist/constants/avatar.d.ts +6 -1
- package/dist/constants/avatar.js +6 -0
- package/dist/constants/dropdown-menu.d.ts +6 -1
- package/dist/constants/dropdown-menu.js +33 -1
- package/dist/constants/popover.js +2 -8
- package/dist/constants/select.d.ts +3 -1
- package/dist/constants/select.js +30 -1
- package/dist/motion/arc-tokens.d.ts +6 -0
- package/dist/motion/arc-tokens.js +6 -0
- package/dist/motion/glide-indicator.d.ts +6 -21
- package/dist/motion/glide-indicator.js +8 -17
- package/dist/motion/motion-slot.d.ts +6 -3
- package/dist/motion/motion-slot.js +100 -411
- package/dist/motion/presence.d.ts +8 -0
- package/dist/motion/presence.js +11 -1
- package/dist/motion/surface-keyframes.d.ts +2 -2
- package/dist/motion/surface-keyframes.js +40 -141
- package/dist/motion/tokens.d.ts +10 -114
- package/dist/motion/tokens.js +11 -116
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/motion/shared-layout-bg.d.ts +0 -16
- package/dist/motion/shared-layout-bg.js +0 -181
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { c as _c } from "react/compiler-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { useSyncExternalStore } from "react";
|
|
4
4
|
import { Monitor, Moon, Sun, SunMoon } from "lucide-react";
|
|
5
|
-
import { animate, frame } from "motion/react";
|
|
6
5
|
import { MotionSlot } from "../motion/motion-slot.js";
|
|
7
|
-
import { MOTION_EASE } from "../motion/tokens.js";
|
|
8
6
|
import { useTheme } from "next-themes";
|
|
9
7
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuTrigger } from "./primitives/dropdown-menu.js";
|
|
10
|
-
import { MILLISECONDS_PER_SECOND, REDUCED_MOTION_QUERY } from "../constants/motion.js";
|
|
11
8
|
import { cn } from "../lib/utils.js";
|
|
12
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
10
|
const THEME_OPTIONS = [
|
|
@@ -28,16 +25,21 @@ const THEME_OPTIONS = [
|
|
|
28
25
|
}
|
|
29
26
|
];
|
|
30
27
|
export const AnimatedThemeToggler = (t0) => {
|
|
31
|
-
const $ = _c(
|
|
28
|
+
const $ = _c(30);
|
|
32
29
|
let className;
|
|
33
30
|
let controlledOnThemeChange;
|
|
34
31
|
let controlledResolvedTheme;
|
|
35
32
|
let controlledTheme;
|
|
36
33
|
let disabled;
|
|
37
34
|
let props;
|
|
38
|
-
let t1;
|
|
39
35
|
if ($[0] !== t0) {
|
|
40
|
-
|
|
36
|
+
const { className: t1, duration: _duration, disabled: t2, theme: t3, resolvedTheme: t4, onThemeChange: t5, ...t6 } = t0;
|
|
37
|
+
className = t1;
|
|
38
|
+
disabled = t2;
|
|
39
|
+
controlledTheme = t3;
|
|
40
|
+
controlledResolvedTheme = t4;
|
|
41
|
+
controlledOnThemeChange = t5;
|
|
42
|
+
props = t6;
|
|
41
43
|
$[0] = t0;
|
|
42
44
|
$[1] = className;
|
|
43
45
|
$[2] = controlledOnThemeChange;
|
|
@@ -45,7 +47,6 @@ export const AnimatedThemeToggler = (t0) => {
|
|
|
45
47
|
$[4] = controlledTheme;
|
|
46
48
|
$[5] = disabled;
|
|
47
49
|
$[6] = props;
|
|
48
|
-
$[7] = t1;
|
|
49
50
|
} else {
|
|
50
51
|
className = $[1];
|
|
51
52
|
controlledOnThemeChange = $[2];
|
|
@@ -53,174 +54,128 @@ export const AnimatedThemeToggler = (t0) => {
|
|
|
53
54
|
controlledTheme = $[4];
|
|
54
55
|
disabled = $[5];
|
|
55
56
|
props = $[6];
|
|
56
|
-
t1 = $[7];
|
|
57
57
|
}
|
|
58
|
-
const duration = t1 === undefined ? 400 : t1;
|
|
59
58
|
const providerTheme = useTheme();
|
|
60
59
|
const theme = controlledTheme ?? providerTheme.theme;
|
|
61
60
|
const resolvedTheme = controlledResolvedTheme ?? providerTheme.resolvedTheme;
|
|
62
61
|
const onThemeChange = controlledOnThemeChange ?? providerTheme.setTheme;
|
|
63
|
-
const buttonRef = useRef(null);
|
|
64
|
-
const animationRef = useRef(null);
|
|
65
|
-
let t2;
|
|
66
|
-
let t3;
|
|
67
|
-
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
68
|
-
t2 = () => () => {
|
|
69
|
-
animationRef.current?.cancel();
|
|
70
|
-
animationRef.current = null;
|
|
71
|
-
};
|
|
72
|
-
t3 = [];
|
|
73
|
-
$[8] = t2;
|
|
74
|
-
$[9] = t3;
|
|
75
|
-
} else {
|
|
76
|
-
t2 = $[8];
|
|
77
|
-
t3 = $[9];
|
|
78
|
-
}
|
|
79
|
-
useEffect(t2, t3);
|
|
80
62
|
const isHydrated = useSyncExternalStore(_temp2, _temp3, _temp4);
|
|
81
63
|
const isThemeReady = isHydrated && (resolvedTheme === "light" || resolvedTheme === "dark");
|
|
82
64
|
const isDark = resolvedTheme === "dark";
|
|
83
65
|
const selectedTheme = theme === "light" || theme === "dark" || theme === "system" ? theme : "system";
|
|
84
66
|
const isDisabled = !isThemeReady || disabled;
|
|
85
|
-
let
|
|
86
|
-
if ($[
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
if (!button || typeof document === "undefined" || isDisabled) {
|
|
67
|
+
let t1;
|
|
68
|
+
if ($[7] !== isDisabled || $[8] !== onThemeChange) {
|
|
69
|
+
t1 = (nextTheme) => {
|
|
70
|
+
if (isDisabled) {
|
|
90
71
|
return;
|
|
91
72
|
}
|
|
92
73
|
onThemeChange(nextTheme);
|
|
93
|
-
animationRef.current?.cancel();
|
|
94
|
-
if (window.matchMedia?.(REDUCED_MOTION_QUERY).matches || !Number.isFinite(duration) || duration <= 0) {
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
const original = {
|
|
98
|
-
transform: button.style.transform,
|
|
99
|
-
opacity: button.style.opacity
|
|
100
|
-
};
|
|
101
|
-
const animation = animate(button, {
|
|
102
|
-
transform: ["rotate(-8deg)", "rotate(0deg)"],
|
|
103
|
-
opacity: [.65, 1]
|
|
104
|
-
}, {
|
|
105
|
-
duration: duration / MILLISECONDS_PER_SECOND,
|
|
106
|
-
ease: [...MOTION_EASE]
|
|
107
|
-
});
|
|
108
|
-
animationRef.current = animation;
|
|
109
|
-
animation.then(() => frame.postRender(() => {
|
|
110
|
-
if (animationRef.current !== animation) {
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
button.style.transform = original.transform;
|
|
114
|
-
button.style.opacity = original.opacity;
|
|
115
|
-
animationRef.current = null;
|
|
116
|
-
}));
|
|
117
74
|
};
|
|
118
|
-
$[
|
|
119
|
-
$[
|
|
120
|
-
$[
|
|
121
|
-
$[13] = t4;
|
|
75
|
+
$[7] = isDisabled;
|
|
76
|
+
$[8] = onThemeChange;
|
|
77
|
+
$[9] = t1;
|
|
122
78
|
} else {
|
|
123
|
-
|
|
79
|
+
t1 = $[9];
|
|
124
80
|
}
|
|
125
|
-
const selectTheme =
|
|
126
|
-
let
|
|
127
|
-
if ($[
|
|
128
|
-
|
|
129
|
-
$[
|
|
130
|
-
$[
|
|
81
|
+
const selectTheme = t1;
|
|
82
|
+
let t2;
|
|
83
|
+
if ($[10] !== className) {
|
|
84
|
+
t2 = cn(className);
|
|
85
|
+
$[10] = className;
|
|
86
|
+
$[11] = t2;
|
|
131
87
|
} else {
|
|
132
|
-
|
|
88
|
+
t2 = $[11];
|
|
133
89
|
}
|
|
134
|
-
let
|
|
135
|
-
if ($[
|
|
136
|
-
|
|
90
|
+
let t3;
|
|
91
|
+
if ($[12] !== isDark || $[13] !== isThemeReady) {
|
|
92
|
+
t3 = !isThemeReady ? /* @__PURE__ */ _jsx(SunMoon, { "aria-hidden": "true" }) : /* @__PURE__ */ _jsx(MotionSlot, {
|
|
137
93
|
kind: "icon-swap",
|
|
138
94
|
children: isDark ? /* @__PURE__ */ _jsx(Moon, { "aria-hidden": "true" }) : /* @__PURE__ */ _jsx(Sun, { "aria-hidden": "true" })
|
|
139
95
|
}, isDark ? "dark" : "light");
|
|
140
|
-
$[
|
|
141
|
-
$[
|
|
142
|
-
$[
|
|
96
|
+
$[12] = isDark;
|
|
97
|
+
$[13] = isThemeReady;
|
|
98
|
+
$[14] = t3;
|
|
143
99
|
} else {
|
|
144
|
-
|
|
100
|
+
t3 = $[14];
|
|
145
101
|
}
|
|
146
|
-
let
|
|
147
|
-
if ($[
|
|
148
|
-
|
|
102
|
+
let t4;
|
|
103
|
+
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
104
|
+
t4 = /* @__PURE__ */ _jsx("span", {
|
|
149
105
|
className: "sr-only",
|
|
150
106
|
children: "Alternar tema"
|
|
151
107
|
});
|
|
152
|
-
$[
|
|
108
|
+
$[15] = t4;
|
|
153
109
|
} else {
|
|
154
|
-
|
|
110
|
+
t4 = $[15];
|
|
155
111
|
}
|
|
156
|
-
let
|
|
157
|
-
if ($[
|
|
158
|
-
|
|
112
|
+
let t5;
|
|
113
|
+
if ($[16] !== isDisabled || $[17] !== props || $[18] !== t2 || $[19] !== t3) {
|
|
114
|
+
t5 = /* @__PURE__ */ _jsx(DropdownMenuTrigger, {
|
|
159
115
|
asChild: true,
|
|
160
116
|
children: /* @__PURE__ */ _jsxs("button", {
|
|
161
117
|
type: "button",
|
|
162
|
-
ref: buttonRef,
|
|
163
118
|
disabled: isDisabled,
|
|
164
|
-
className:
|
|
119
|
+
className: t2,
|
|
165
120
|
...props,
|
|
166
|
-
children: [
|
|
121
|
+
children: [t3, t4]
|
|
167
122
|
})
|
|
168
123
|
});
|
|
169
|
-
$[
|
|
170
|
-
$[
|
|
171
|
-
$[
|
|
172
|
-
$[
|
|
173
|
-
$[
|
|
124
|
+
$[16] = isDisabled;
|
|
125
|
+
$[17] = props;
|
|
126
|
+
$[18] = t2;
|
|
127
|
+
$[19] = t3;
|
|
128
|
+
$[20] = t5;
|
|
174
129
|
} else {
|
|
175
|
-
|
|
130
|
+
t5 = $[20];
|
|
176
131
|
}
|
|
177
|
-
let
|
|
178
|
-
if ($[
|
|
179
|
-
|
|
132
|
+
let t6;
|
|
133
|
+
if ($[21] !== selectTheme) {
|
|
134
|
+
t6 = (nextTheme_0) => {
|
|
180
135
|
selectTheme(nextTheme_0);
|
|
181
136
|
};
|
|
182
|
-
$[
|
|
183
|
-
$[
|
|
137
|
+
$[21] = selectTheme;
|
|
138
|
+
$[22] = t6;
|
|
184
139
|
} else {
|
|
185
|
-
|
|
140
|
+
t6 = $[22];
|
|
186
141
|
}
|
|
187
|
-
let
|
|
188
|
-
if ($[
|
|
189
|
-
|
|
190
|
-
$[
|
|
142
|
+
let t7;
|
|
143
|
+
if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
|
|
144
|
+
t7 = THEME_OPTIONS.map(_temp5);
|
|
145
|
+
$[23] = t7;
|
|
191
146
|
} else {
|
|
192
|
-
|
|
147
|
+
t7 = $[23];
|
|
193
148
|
}
|
|
194
|
-
let
|
|
195
|
-
if ($[
|
|
196
|
-
|
|
149
|
+
let t8;
|
|
150
|
+
if ($[24] !== selectedTheme || $[25] !== t6) {
|
|
151
|
+
t8 = /* @__PURE__ */ _jsx(DropdownMenuContent, {
|
|
197
152
|
"data-beez-theme-menu": true,
|
|
198
153
|
align: "end",
|
|
199
154
|
className: "w-44 rounded-xl p-2",
|
|
200
155
|
side: "bottom",
|
|
201
156
|
sideOffset: 8,
|
|
202
157
|
children: /* @__PURE__ */ _jsx(DropdownMenuRadioGroup, {
|
|
203
|
-
onValueChange:
|
|
158
|
+
onValueChange: t6,
|
|
204
159
|
value: selectedTheme,
|
|
205
|
-
children:
|
|
160
|
+
children: t7
|
|
206
161
|
})
|
|
207
162
|
});
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
210
|
-
$[
|
|
163
|
+
$[24] = selectedTheme;
|
|
164
|
+
$[25] = t6;
|
|
165
|
+
$[26] = t8;
|
|
211
166
|
} else {
|
|
212
|
-
|
|
167
|
+
t8 = $[26];
|
|
213
168
|
}
|
|
214
|
-
let
|
|
215
|
-
if ($[
|
|
216
|
-
|
|
217
|
-
$[
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
169
|
+
let t9;
|
|
170
|
+
if ($[27] !== t5 || $[28] !== t8) {
|
|
171
|
+
t9 = /* @__PURE__ */ _jsxs(DropdownMenu, { children: [t5, t8] });
|
|
172
|
+
$[27] = t5;
|
|
173
|
+
$[28] = t8;
|
|
174
|
+
$[29] = t9;
|
|
220
175
|
} else {
|
|
221
|
-
|
|
176
|
+
t9 = $[29];
|
|
222
177
|
}
|
|
223
|
-
return
|
|
178
|
+
return t9;
|
|
224
179
|
};
|
|
225
180
|
function _temp() {}
|
|
226
181
|
function _temp2() {
|
package/dist/components/badge.js
CHANGED
|
@@ -13,7 +13,6 @@ import { usePrefersReducedMotion } from "../hooks/use-prefers-reduced-motion.js"
|
|
|
13
13
|
import { cn } from "../lib/utils.js";
|
|
14
14
|
import { ARC_BLUR, ARC_DURATION, ARC_EASE } from "../motion/arc-tokens.js";
|
|
15
15
|
import { ARC_ICON_ENTER, ARC_ICON_EXIT, ARC_ICON_TRANSITION, ARC_REDUCED_EXIT, ARC_REDUCED_TRANSITION, ARC_SWAP_EXIT_TRANSITION, ARC_SWAP_REST } from "../motion/arc-swap.js";
|
|
16
|
-
import { MotionSlot } from "../motion/motion-slot.js";
|
|
17
16
|
import { useMorphWidth } from "../motion/use-morph-width.js";
|
|
18
17
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
19
18
|
/**
|
|
@@ -276,16 +275,13 @@ function Badge(t0) {
|
|
|
276
275
|
}
|
|
277
276
|
let t5;
|
|
278
277
|
if ($[16] !== content || $[17] !== props || $[18] !== size || $[19] !== t4 || $[20] !== tone) {
|
|
279
|
-
t5 = /* @__PURE__ */ _jsx(
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
...props,
|
|
287
|
-
children: content
|
|
288
|
-
})
|
|
278
|
+
t5 = /* @__PURE__ */ _jsx("span", {
|
|
279
|
+
"data-slot": "badge",
|
|
280
|
+
"data-tone": tone,
|
|
281
|
+
"data-size": size,
|
|
282
|
+
className: t4,
|
|
283
|
+
...props,
|
|
284
|
+
children: content
|
|
289
285
|
});
|
|
290
286
|
$[16] = content;
|
|
291
287
|
$[17] = props;
|
package/dist/components/card.js
CHANGED
|
@@ -15,7 +15,6 @@ import { CARD_CLOSE_HIDDEN_SCALE, CARD_CLOSE_LABEL, CARD_CLOSE_PRESS_SCALE, CARD
|
|
|
15
15
|
import { usePrefersReducedMotion } from "../hooks/use-prefers-reduced-motion.js";
|
|
16
16
|
import { cn } from "../lib/utils.js";
|
|
17
17
|
import { ARC_BLUR, ARC_DURATION, ARC_EASE, ARC_SPRING_SMOOTH, ARC_SPRING_SNAPPY } from "../motion/arc-tokens.js";
|
|
18
|
-
import { MotionSlot } from "../motion/motion-slot.js";
|
|
19
18
|
import { useAttachedElement } from "../motion/use-attached-element.js";
|
|
20
19
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
20
|
/** One critically damped spring carries the surface both ways, so it never overshoots and can reverse mid-flight. */
|
|
@@ -78,9 +77,10 @@ const MOTION_HEADING = {
|
|
|
78
77
|
};
|
|
79
78
|
/** Splits a status into words and the spaces between them, so each word can rise on its own. */
|
|
80
79
|
const STATUS_WORD_SEPARATOR = /(\s+)/;
|
|
81
|
-
/** Card surface. The outline is a 1px ring in the border token, so
|
|
82
|
-
* keeps the rounded clip on media while the card
|
|
83
|
-
|
|
80
|
+
/** Card surface. The outline is a 1px ring in the border token, so Arc's hover shadow (`--shadow-raised`, arriving
|
|
81
|
+
* with the 2px lift and the strong border) stacks on it, and isolation keeps the rounded clip on media while the card
|
|
82
|
+
* lifts (Safari drops it otherwise). */
|
|
83
|
+
const cardClassName = "group/card relative isolate flex min-w-0 flex-col overflow-hidden rounded-(--radius-panel) bg-surface text-sm text-foreground ring-1 ring-border has-[[data-slot=card-trigger]:focus-visible]:ring-border-strong transition-[box-shadow] duration-(--duration-standard) ease-(--ease-standard) motion-safe:transition-[translate,box-shadow] motion-safe:duration-(--duration-spring) motion-safe:ease-(--ease-spring) hover-fine:has-[a,button]:ring-border-strong hover-fine:has-[a,button]:shadow-(--shadow-raised) hover-fine:has-[a,button]:motion-safe:-translate-y-0.5";
|
|
84
84
|
const titleClassName = "m-0 w-fit max-w-full font-sans text-lg leading-[1.3] font-medium tracking-(--tracking-body) text-balance";
|
|
85
85
|
const descriptionClassName = "m-0 mt-(--space-2) max-w-[34ch] text-sm leading-(--leading-body) text-pretty text-text-secondary";
|
|
86
86
|
/**
|
|
@@ -646,18 +646,15 @@ function Card(t0) {
|
|
|
646
646
|
}
|
|
647
647
|
let t30;
|
|
648
648
|
if ($[90] !== attachCard || $[91] !== t18 || $[92] !== t19 || $[93] !== t21 || $[94] !== t22 || $[95] !== t24 || $[96] !== t29) {
|
|
649
|
-
t30 = /* @__PURE__ */
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
transition: t23,
|
|
659
|
-
children: [t24, t29]
|
|
660
|
-
})
|
|
649
|
+
t30 = /* @__PURE__ */ _jsxs(motion.article, {
|
|
650
|
+
...t18,
|
|
651
|
+
ref: attachCard,
|
|
652
|
+
"data-slot": "card",
|
|
653
|
+
className: t19,
|
|
654
|
+
style: t21,
|
|
655
|
+
...t22,
|
|
656
|
+
transition: t23,
|
|
657
|
+
children: [t24, t29]
|
|
661
658
|
});
|
|
662
659
|
$[90] = attachCard;
|
|
663
660
|
$[91] = t18;
|
|
@@ -13,7 +13,6 @@ import { DIALOG_DEFAULT_COPY, DIALOG_TEXT_SWAP_OFFSET_EM } from "../constants/di
|
|
|
13
13
|
import { usePrefersReducedMotion } from "../hooks/use-prefers-reduced-motion.js";
|
|
14
14
|
import { cn } from "../lib/utils.js";
|
|
15
15
|
import { ARC_BLUR, ARC_DURATION, ARC_EASE } from "../motion/arc-tokens.js";
|
|
16
|
-
import { MotionSlot } from "../motion/motion-slot.js";
|
|
17
16
|
import { ControlButton } from "./control-button.js";
|
|
18
17
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
18
|
/** Arc's overlay: a near-black scrim at 46% with a 7px backdrop blur where the engine supports it. */
|
|
@@ -50,7 +49,7 @@ const contentCloseButtonClassName = "absolute top-[calc(var(--space-6)+(var(--te
|
|
|
50
49
|
* @returns The close control.
|
|
51
50
|
*/
|
|
52
51
|
export function DialogSurfaceCloseButton(t0) {
|
|
53
|
-
const $ = _c(
|
|
52
|
+
const $ = _c(12);
|
|
54
53
|
const { kind, placement, label: t1, buttonRef } = t0;
|
|
55
54
|
const label = t1 === undefined ? DIALOG_DEFAULT_COPY.closeLabel : t1;
|
|
56
55
|
const Close = kind === "alert" ? AlertDialogPrimitive.Cancel : DialogPrimitive.Close;
|
|
@@ -99,31 +98,19 @@ export function DialogSurfaceCloseButton(t0) {
|
|
|
99
98
|
}
|
|
100
99
|
const button = t6;
|
|
101
100
|
let t7;
|
|
102
|
-
if ($[9] !==
|
|
103
|
-
t7 =
|
|
104
|
-
|
|
101
|
+
if ($[9] !== Close || $[10] !== button) {
|
|
102
|
+
t7 = /* @__PURE__ */ _jsx(Close, {
|
|
103
|
+
"data-slot": "dialog-close",
|
|
104
|
+
asChild: true,
|
|
105
105
|
children: button
|
|
106
106
|
});
|
|
107
|
-
$[9] =
|
|
108
|
-
$[10] =
|
|
107
|
+
$[9] = Close;
|
|
108
|
+
$[10] = button;
|
|
109
109
|
$[11] = t7;
|
|
110
110
|
} else {
|
|
111
111
|
t7 = $[11];
|
|
112
112
|
}
|
|
113
|
-
|
|
114
|
-
if ($[12] !== Close || $[13] !== t7) {
|
|
115
|
-
t8 = /* @__PURE__ */ _jsx(Close, {
|
|
116
|
-
"data-slot": "dialog-close",
|
|
117
|
-
asChild: true,
|
|
118
|
-
children: t7
|
|
119
|
-
});
|
|
120
|
-
$[12] = Close;
|
|
121
|
-
$[13] = t7;
|
|
122
|
-
$[14] = t8;
|
|
123
|
-
} else {
|
|
124
|
-
t8 = $[14];
|
|
125
|
-
}
|
|
126
|
-
return t8;
|
|
113
|
+
return t7;
|
|
127
114
|
}
|
|
128
115
|
/**
|
|
129
116
|
* One version of the copy. While it lifts out it turns inert and hidden from assistive technology, so the dialog's
|
|
@@ -5,7 +5,6 @@ import { Calendar, Check, CircleDot, CircleMinus, CircleSlash, Folder, Hash, Lis
|
|
|
5
5
|
import { ControlButton } from "./control-button.js";
|
|
6
6
|
import { Input } from "./input.js";
|
|
7
7
|
import { Popover, PopoverAnchor, PopoverContent } from "./primitives/popover.js";
|
|
8
|
-
import { GlideSlot } from "../motion/glide-slot.js";
|
|
9
8
|
import { cn } from "../lib/utils.js";
|
|
10
9
|
import { getActiveFilterToken, getValueHighlightRanges, normalizeFilterSlug, parseFilterQuery, PRESENCE_HAS_META_KEY, PRESENCE_NO_META_KEY, UNASSIGNED_FOLDER_FILTER_VALUE } from "./filter-query-grammar.js";
|
|
11
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -811,16 +810,13 @@ export function FilterQueryBar(t0) {
|
|
|
811
810
|
onCloseAutoFocus: _temp,
|
|
812
811
|
onInteractOutside: t34,
|
|
813
812
|
onOpenAutoFocus: _temp2,
|
|
814
|
-
children: /* @__PURE__ */ _jsx(
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
role: "listbox",
|
|
822
|
-
children: t36
|
|
823
|
-
})
|
|
813
|
+
children: /* @__PURE__ */ _jsx("ul", {
|
|
814
|
+
"aria-label": t35,
|
|
815
|
+
className: "grid gap-0.5",
|
|
816
|
+
"data-slot": "filter-query-bar-suggestions",
|
|
817
|
+
id: listboxId,
|
|
818
|
+
role: "listbox",
|
|
819
|
+
children: t36
|
|
824
820
|
})
|
|
825
821
|
});
|
|
826
822
|
$[83] = listboxId;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { c as _c } from "react/compiler-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
|
-
import { MotionSlot } from "../motion/motion-slot.js";
|
|
6
5
|
import { cn } from "../lib/utils.js";
|
|
7
6
|
import { ControlButton } from "./control-button.js";
|
|
8
7
|
import { Input } from "./input.js";
|
|
@@ -31,14 +30,11 @@ function InputGroup(t0) {
|
|
|
31
30
|
}
|
|
32
31
|
let t2;
|
|
33
32
|
if ($[5] !== props || $[6] !== t1) {
|
|
34
|
-
t2 = /* @__PURE__ */ _jsx(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
className: t1,
|
|
40
|
-
...props
|
|
41
|
-
})
|
|
33
|
+
t2 = /* @__PURE__ */ _jsx("div", {
|
|
34
|
+
"data-slot": "input-group",
|
|
35
|
+
role: "group",
|
|
36
|
+
className: t1,
|
|
37
|
+
...props
|
|
42
38
|
});
|
|
43
39
|
$[5] = props;
|
|
44
40
|
$[6] = t1;
|
package/dist/components/input.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { c as _c } from "react/compiler-runtime";
|
|
3
3
|
import { Input as InputPrimitive } from "@base-ui/react/input";
|
|
4
|
-
import { MotionSlot } from "../motion/motion-slot.js";
|
|
5
4
|
import { cn } from "../lib/utils.js";
|
|
6
5
|
import { Field, usesFieldCopy, useFieldAria } from "./field.js";
|
|
7
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -75,17 +74,14 @@ function Input(inputProps) {
|
|
|
75
74
|
const t4 = aria["aria-invalid"];
|
|
76
75
|
let t5;
|
|
77
76
|
if ($[15] !== props || $[16] !== t1 || $[17] !== t2 || $[18] !== t3 || $[19] !== t4 || $[20] !== type) {
|
|
78
|
-
t5 = /* @__PURE__ */ _jsx(
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
"aria-describedby": t3,
|
|
87
|
-
"aria-invalid": t4
|
|
88
|
-
})
|
|
77
|
+
t5 = /* @__PURE__ */ _jsx(InputPrimitive, {
|
|
78
|
+
type,
|
|
79
|
+
"data-slot": "input",
|
|
80
|
+
className: t1,
|
|
81
|
+
...props,
|
|
82
|
+
id: t2,
|
|
83
|
+
"aria-describedby": t3,
|
|
84
|
+
"aria-invalid": t4
|
|
89
85
|
});
|
|
90
86
|
$[15] = props;
|
|
91
87
|
$[16] = t1;
|
package/dist/components/label.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { c as _c } from "react/compiler-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Label as LabelPrimitive } from "radix-ui";
|
|
5
|
-
import { MotionSlot } from "../motion/motion-slot.js";
|
|
6
5
|
import { cn } from "../lib/utils.js";
|
|
7
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
7
|
function Label(t0) {
|
|
@@ -28,13 +27,10 @@ function Label(t0) {
|
|
|
28
27
|
}
|
|
29
28
|
let t2;
|
|
30
29
|
if ($[5] !== props || $[6] !== t1) {
|
|
31
|
-
t2 = /* @__PURE__ */ _jsx(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
className: t1,
|
|
36
|
-
...props
|
|
37
|
-
})
|
|
30
|
+
t2 = /* @__PURE__ */ _jsx(LabelPrimitive.Root, {
|
|
31
|
+
"data-slot": "label",
|
|
32
|
+
className: t1,
|
|
33
|
+
...props
|
|
38
34
|
});
|
|
39
35
|
$[5] = props;
|
|
40
36
|
$[6] = t1;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Selects the configured routing adapter while keeping a native anchor fallback. */
|
|
1
2
|
import type { ComponentType } from "react";
|
|
2
3
|
import { type BeezLinkProps } from "../providers/beez-ui-provider.js";
|
|
3
4
|
/** Shares native link props and explicit per-link navigation overrides. */
|
package/dist/components/link.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { c as _c } from "react/compiler-runtime";
|
|
3
|
-
/** Selects the configured routing adapter while keeping a native anchor fallback. */
|
|
4
|
-
import { MotionSlot } from "../motion/motion-slot.js";
|
|
5
3
|
import { useBeezUIComponents } from "../providers/beez-ui-provider.js";
|
|
6
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
5
|
/** Uses the provider's adapter and excludes framework hints from native DOM attributes. */
|
|
8
6
|
export function Link(t0) {
|
|
9
|
-
const $ = _c(
|
|
7
|
+
const $ = _c(8);
|
|
10
8
|
let component;
|
|
11
9
|
let prefetch;
|
|
12
10
|
let props;
|
|
@@ -41,17 +39,5 @@ export function Link(t0) {
|
|
|
41
39
|
t1 = $[7];
|
|
42
40
|
}
|
|
43
41
|
const link = t1;
|
|
44
|
-
|
|
45
|
-
if ($[8] !== link || $[9] !== props) {
|
|
46
|
-
t2 = "data-slot" in props ? link : /* @__PURE__ */ _jsx(MotionSlot, {
|
|
47
|
-
kind: "link",
|
|
48
|
-
children: link
|
|
49
|
-
});
|
|
50
|
-
$[8] = link;
|
|
51
|
-
$[9] = props;
|
|
52
|
-
$[10] = t2;
|
|
53
|
-
} else {
|
|
54
|
-
t2 = $[10];
|
|
55
|
-
}
|
|
56
|
-
return t2;
|
|
42
|
+
return link;
|
|
57
43
|
}
|
|
@@ -14,7 +14,7 @@ export interface PresenceSwapProps {
|
|
|
14
14
|
mode?: "wait" | "popLayout";
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* Swaps keyed content with a short
|
|
17
|
+
* Swaps keyed content with Arc's swap (a short rise out of a blur); the first render is not animated.
|
|
18
18
|
* @param props - Key identifying the current state and its content.
|
|
19
19
|
* @returns The animated content.
|
|
20
20
|
*/
|