beez-ui 2.7.1 → 3.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 +72 -0
- package/README.md +43 -13
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/dist/components/account-menu.d.ts +4 -3
- package/dist/components/account-menu.js +63 -54
- package/dist/components/alert.d.ts +15 -15
- package/dist/components/alert.js +289 -270
- package/dist/components/animated-theme-toggler.js +1 -1
- package/dist/components/avatar.d.ts +56 -31
- package/dist/components/avatar.js +394 -277
- package/dist/components/badge.d.ts +8 -28
- package/dist/components/badge.js +55 -108
- package/dist/components/calendar.d.ts +36 -26
- package/dist/components/calendar.js +132 -1227
- package/dist/components/card.d.ts +36 -25
- package/dist/components/card.js +895 -72
- package/dist/components/carousel.d.ts +63 -47
- package/dist/components/carousel.js +496 -777
- package/dist/components/data-table.d.ts +5 -4
- package/dist/components/data-table.js +7 -6
- package/dist/components/dialog-surface.d.ts +23 -1
- package/dist/components/dialog-surface.js +99 -3
- package/dist/components/dialog.d.ts +80 -45
- package/dist/components/dialog.js +258 -503
- package/dist/components/dropdown-menu.d.ts +56 -73
- package/dist/components/dropdown-menu.js +79 -714
- package/dist/components/field.d.ts +3 -1
- package/dist/components/field.js +49 -39
- package/dist/components/filter-presets-bar.js +2 -2
- package/dist/components/filter-query-bar.js +1 -1
- package/dist/components/hover-card.d.ts +42 -41
- package/dist/components/hover-card.js +57 -483
- package/dist/components/pagination.d.ts +53 -31
- package/dist/components/pagination.js +176 -412
- package/dist/components/popover.d.ts +11 -23
- package/dist/components/popover.js +19 -304
- package/dist/components/{alert-dialog.d.ts → primitives/alert-dialog.d.ts} +17 -5
- package/dist/components/{alert-dialog.js → primitives/alert-dialog.js} +102 -54
- package/dist/components/primitives/avatar.d.ts +46 -0
- package/dist/components/primitives/avatar.js +267 -0
- package/dist/components/primitives/calendar.d.ts +37 -0
- package/dist/components/primitives/calendar.js +1250 -0
- package/dist/components/primitives/carousel.d.ts +106 -0
- package/dist/components/primitives/carousel.js +928 -0
- package/dist/components/primitives/dialog.d.ts +62 -0
- package/dist/components/primitives/dialog.js +490 -0
- package/dist/components/primitives/dropdown-menu-items.d.ts +59 -0
- package/dist/components/primitives/dropdown-menu-items.js +265 -0
- package/dist/components/primitives/dropdown-menu.d.ts +64 -0
- package/dist/components/primitives/dropdown-menu.js +557 -0
- package/dist/components/primitives/hover-card.d.ts +50 -0
- package/dist/components/primitives/hover-card.js +507 -0
- package/dist/components/primitives/pagination.d.ts +65 -0
- package/dist/components/primitives/pagination.js +373 -0
- package/dist/components/primitives/popover.d.ts +22 -0
- package/dist/components/primitives/popover.js +213 -0
- package/dist/components/primitives/select.d.ts +36 -0
- package/dist/components/primitives/select.js +407 -0
- package/dist/components/primitives/tooltip.d.ts +30 -0
- package/dist/components/primitives/tooltip.js +277 -0
- package/dist/components/radio-group.d.ts +30 -17
- package/dist/components/radio-group.js +266 -315
- package/dist/components/rich-link-editor.js +1 -1
- package/dist/components/select.d.ts +51 -42
- package/dist/components/select.js +163 -495
- package/dist/components/skeleton.d.ts +16 -15
- package/dist/components/skeleton.js +99 -205
- package/dist/components/split-button.js +1 -1
- package/dist/components/switch.d.ts +3 -6
- package/dist/components/switch.js +163 -170
- package/dist/components/tabs.d.ts +3 -11
- package/dist/components/tabs.js +61 -75
- package/dist/components/themed-toaster.d.ts +1 -1
- package/dist/components/themed-toaster.js +1 -1
- package/dist/components/toaster.d.ts +1 -1
- package/dist/components/toaster.js +1 -1
- package/dist/components/tooltip.d.ts +36 -31
- package/dist/components/tooltip.js +44 -284
- package/dist/constants/alert.d.ts +5 -1
- package/dist/constants/alert.js +5 -1
- package/dist/constants/avatar.d.ts +24 -1
- package/dist/constants/avatar.js +19 -0
- package/dist/constants/calendar.d.ts +12 -0
- package/dist/constants/calendar.js +12 -0
- package/dist/constants/card.d.ts +23 -0
- package/dist/constants/card.js +20 -0
- package/dist/constants/carousel.d.ts +31 -13
- package/dist/constants/carousel.js +32 -11
- package/dist/constants/dialog.d.ts +6 -1
- package/dist/constants/dialog.js +5 -1
- package/dist/constants/dropdown-menu.d.ts +2 -2
- package/dist/constants/dropdown-menu.js +2 -2
- package/dist/constants/pagination.d.ts +13 -2
- package/dist/constants/pagination.js +13 -2
- package/dist/constants/select.d.ts +4 -2
- package/dist/constants/select.js +4 -2
- package/dist/constants/switch.d.ts +5 -16
- package/dist/constants/switch.js +6 -14
- package/dist/hooks/use-today.d.ts +7 -0
- package/dist/hooks/use-today.js +50 -0
- package/dist/hooks.d.ts +1 -0
- package/dist/hooks.js +1 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/motion/glide-indicator.d.ts +1 -1
- package/dist/motion/glide-indicator.js +1 -1
- package/dist/motion/presence.d.ts +0 -1
- package/dist/motion/presence.js +0 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -6
|
@@ -21,8 +21,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
21
21
|
*/
|
|
22
22
|
const switchClassName = "peer group/switch relative inline-flex shrink-0 cursor-pointer items-center gap-(--space-3) rounded-(--radius-pill) border-0 bg-transparent p-0 font-sans text-sm text-foreground [-webkit-tap-highlight-color:transparent] after:absolute after:-inset-x-2 after:-inset-y-2.5 disabled:cursor-not-allowed disabled:opacity-50 data-[labelled]:min-h-(--control-height-md) data-[labelled]:rounded-(--radius-control) data-[labelled]:after:hidden hover-fine:data-[state=unchecked]:not-disabled:[&_[data-slot=switch-track]]:bg-(--control-track-hover)";
|
|
23
23
|
/** Fixed box: the thumb moves inside it with transforms, so nothing around the switch shifts. */
|
|
24
|
-
const trackClassName = "relative isolate box-border flex flex-none items-center rounded-(--radius-pill) bg-(--control-track) transition-[background-color] duration-(--duration-fast) ease-(--ease-standard) before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] before:bg-(--control-on) before:opacity-0 before:transition-opacity before:duration-(--duration-standard) before:ease-(--ease-standard) group-data-[state=checked]/switch:before:opacity-100 group-aria-invalid/switch:shadow-[0_0_0_1px_var(--danger)]
|
|
25
|
-
const thumbClassName = "pointer-events-none block flex-none rounded-(--radius-pill) bg-(--control-thumb) shadow-(--control-thumb-shadow) will-change-transform transition-[background-color] duration-(--duration-standard) ease-(--ease-standard) group-data-[state=checked]/switch:bg-(--control-thumb-on)
|
|
24
|
+
const trackClassName = "relative isolate box-border flex flex-none items-center rounded-(--radius-pill) bg-(--control-track) transition-[background-color] duration-(--duration-fast) ease-(--ease-standard) before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] before:bg-(--control-on) before:opacity-0 before:transition-opacity before:duration-(--duration-standard) before:ease-(--ease-standard) group-data-[state=checked]/switch:before:opacity-100 group-aria-invalid/switch:shadow-[0_0_0_1px_var(--danger)] h-6 w-[42px] p-[3px] motion-reduce:transition-none motion-reduce:before:transition-none";
|
|
25
|
+
const thumbClassName = "pointer-events-none block flex-none rounded-(--radius-pill) bg-(--control-thumb) shadow-(--control-thumb-shadow) will-change-transform transition-[background-color] duration-(--duration-standard) ease-(--ease-standard) group-data-[state=checked]/switch:bg-(--control-thumb-on) h-[18px] motion-reduce:transition-none";
|
|
26
26
|
/**
|
|
27
27
|
* Springs a thumb value to its target from where it was last painted, carrying its velocity. Motion samples a stopped
|
|
28
28
|
* animation at the current time, ahead of the last painted frame, and renders that sample right after the commit, so
|
|
@@ -44,11 +44,11 @@ function glideFromPainted(value, paintedValue, target, transition) {
|
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
46
|
* A binary setting that applies at once, controlled or uncontrolled like Radix's switch.
|
|
47
|
-
* @param switchProps - Every Radix switch prop, including `ref`, plus
|
|
47
|
+
* @param switchProps - Every Radix switch prop, including `ref`, plus Arc's `label`.
|
|
48
48
|
* @returns The switch button, with its label inside when one is passed.
|
|
49
49
|
*/
|
|
50
50
|
function Switch(t0) {
|
|
51
|
-
const $ = _c(
|
|
51
|
+
const $ = _c(83);
|
|
52
52
|
let ariaLabel;
|
|
53
53
|
let checked;
|
|
54
54
|
let className;
|
|
@@ -64,9 +64,8 @@ function Switch(t0) {
|
|
|
64
64
|
let onPointerLeave;
|
|
65
65
|
let onPointerUp;
|
|
66
66
|
let props;
|
|
67
|
-
let t1;
|
|
68
67
|
if ($[0] !== t0) {
|
|
69
|
-
({className,
|
|
68
|
+
({className, label, checked, defaultChecked, onCheckedChange, onPointerDown, onPointerUp, onPointerLeave, onPointerCancel, onKeyDown, onKeyUp, onBlur, disabled, "aria-label": ariaLabel, ...props} = t0);
|
|
70
69
|
$[0] = t0;
|
|
71
70
|
$[1] = ariaLabel;
|
|
72
71
|
$[2] = checked;
|
|
@@ -83,7 +82,6 @@ function Switch(t0) {
|
|
|
83
82
|
$[13] = onPointerLeave;
|
|
84
83
|
$[14] = onPointerUp;
|
|
85
84
|
$[15] = props;
|
|
86
|
-
$[16] = t1;
|
|
87
85
|
} else {
|
|
88
86
|
ariaLabel = $[1];
|
|
89
87
|
checked = $[2];
|
|
@@ -100,40 +98,37 @@ function Switch(t0) {
|
|
|
100
98
|
onPointerLeave = $[13];
|
|
101
99
|
onPointerUp = $[14];
|
|
102
100
|
props = $[15];
|
|
103
|
-
t1 = $[16];
|
|
104
101
|
}
|
|
105
|
-
const size = t1 === undefined ? "default" : t1;
|
|
106
102
|
const reduceMotion = usePrefersReducedMotion();
|
|
107
103
|
const [uncontrolledChecked, setUncontrolledChecked] = useState(defaultChecked ?? false);
|
|
108
104
|
const [isPressed, setIsPressed] = useState(false);
|
|
109
105
|
const isChecked = checked ?? uncontrolledChecked;
|
|
110
|
-
const
|
|
111
|
-
const
|
|
112
|
-
const
|
|
113
|
-
const targetWidth = geometry.size + stretch;
|
|
106
|
+
const stretch = isPressed && !reduceMotion && !disabled ? SWITCH_PRESS_STRETCH_PX : 0;
|
|
107
|
+
const targetX = isChecked ? SWITCH_THUMB_GEOMETRY_PX.travel - stretch : 0;
|
|
108
|
+
const targetWidth = SWITCH_THUMB_GEOMETRY_PX.size + stretch;
|
|
114
109
|
const x = useMotionValue(targetX);
|
|
115
110
|
const width = useMotionValue(targetWidth);
|
|
116
111
|
const scaleX = useMotionValue(1);
|
|
117
|
-
let
|
|
118
|
-
if ($[
|
|
119
|
-
|
|
112
|
+
let t1;
|
|
113
|
+
if ($[16] !== targetWidth || $[17] !== targetX) {
|
|
114
|
+
t1 = {
|
|
120
115
|
x: targetX,
|
|
121
116
|
width: targetWidth,
|
|
122
117
|
scaleX: 1
|
|
123
118
|
};
|
|
124
|
-
$[
|
|
125
|
-
$[
|
|
126
|
-
$[
|
|
119
|
+
$[16] = targetWidth;
|
|
120
|
+
$[17] = targetX;
|
|
121
|
+
$[18] = t1;
|
|
127
122
|
} else {
|
|
128
|
-
|
|
123
|
+
t1 = $[18];
|
|
129
124
|
}
|
|
130
|
-
const painted = useRef(
|
|
125
|
+
const painted = useRef(t1);
|
|
131
126
|
const shownChecked = useRef(isChecked);
|
|
132
127
|
const releasedAt = useRef(-Infinity);
|
|
128
|
+
let t2;
|
|
133
129
|
let t3;
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
t3 = () => {
|
|
130
|
+
if ($[19] !== scaleX || $[20] !== width || $[21] !== x) {
|
|
131
|
+
t2 = () => {
|
|
137
132
|
const trackPainted = (key) => (value) => {
|
|
138
133
|
if (frameData.isProcessing) {
|
|
139
134
|
painted.current[key] = value;
|
|
@@ -146,25 +141,25 @@ function Switch(t0) {
|
|
|
146
141
|
];
|
|
147
142
|
return () => unsubscribes.forEach(_temp);
|
|
148
143
|
};
|
|
149
|
-
|
|
144
|
+
t3 = [
|
|
150
145
|
x,
|
|
151
146
|
width,
|
|
152
147
|
scaleX
|
|
153
148
|
];
|
|
154
|
-
$[
|
|
155
|
-
$[
|
|
156
|
-
$[
|
|
149
|
+
$[19] = scaleX;
|
|
150
|
+
$[20] = width;
|
|
151
|
+
$[21] = x;
|
|
152
|
+
$[22] = t2;
|
|
157
153
|
$[23] = t3;
|
|
158
|
-
$[24] = t4;
|
|
159
154
|
} else {
|
|
155
|
+
t2 = $[22];
|
|
160
156
|
t3 = $[23];
|
|
161
|
-
t4 = $[24];
|
|
162
157
|
}
|
|
163
|
-
useEffect(
|
|
158
|
+
useEffect(t2, t3);
|
|
159
|
+
let t4;
|
|
164
160
|
let t5;
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
t5 = () => {
|
|
161
|
+
if ($[24] !== reduceMotion || $[25] !== targetWidth || $[26] !== targetX || $[27] !== width || $[28] !== x) {
|
|
162
|
+
t4 = () => {
|
|
168
163
|
if (reduceMotion) {
|
|
169
164
|
x.jump(targetX);
|
|
170
165
|
width.jump(targetWidth);
|
|
@@ -182,29 +177,29 @@ function Switch(t0) {
|
|
|
182
177
|
widthControls?.stop();
|
|
183
178
|
};
|
|
184
179
|
};
|
|
185
|
-
|
|
180
|
+
t5 = [
|
|
186
181
|
targetX,
|
|
187
182
|
targetWidth,
|
|
188
183
|
reduceMotion,
|
|
189
184
|
x,
|
|
190
185
|
width
|
|
191
186
|
];
|
|
192
|
-
$[
|
|
193
|
-
$[
|
|
194
|
-
$[
|
|
195
|
-
$[
|
|
196
|
-
$[
|
|
187
|
+
$[24] = reduceMotion;
|
|
188
|
+
$[25] = targetWidth;
|
|
189
|
+
$[26] = targetX;
|
|
190
|
+
$[27] = width;
|
|
191
|
+
$[28] = x;
|
|
192
|
+
$[29] = t4;
|
|
197
193
|
$[30] = t5;
|
|
198
|
-
$[31] = t6;
|
|
199
194
|
} else {
|
|
195
|
+
t4 = $[29];
|
|
200
196
|
t5 = $[30];
|
|
201
|
-
t6 = $[31];
|
|
202
197
|
}
|
|
203
|
-
useEffect(
|
|
198
|
+
useEffect(t4, t5);
|
|
199
|
+
let t6;
|
|
204
200
|
let t7;
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
t7 = () => {
|
|
201
|
+
if ($[31] !== isChecked || $[32] !== reduceMotion || $[33] !== scaleX) {
|
|
202
|
+
t6 = () => {
|
|
208
203
|
if (shownChecked.current === isChecked) {
|
|
209
204
|
return;
|
|
210
205
|
}
|
|
@@ -227,146 +222,146 @@ function Switch(t0) {
|
|
|
227
222
|
});
|
|
228
223
|
return () => controls.stop();
|
|
229
224
|
};
|
|
230
|
-
|
|
225
|
+
t7 = [
|
|
231
226
|
isChecked,
|
|
232
227
|
reduceMotion,
|
|
233
228
|
scaleX
|
|
234
229
|
];
|
|
235
|
-
$[
|
|
236
|
-
$[
|
|
237
|
-
$[
|
|
230
|
+
$[31] = isChecked;
|
|
231
|
+
$[32] = reduceMotion;
|
|
232
|
+
$[33] = scaleX;
|
|
233
|
+
$[34] = t6;
|
|
238
234
|
$[35] = t7;
|
|
239
|
-
$[36] = t8;
|
|
240
235
|
} else {
|
|
236
|
+
t6 = $[34];
|
|
241
237
|
t7 = $[35];
|
|
242
|
-
t8 = $[36];
|
|
243
238
|
}
|
|
244
|
-
useEffect(
|
|
245
|
-
let
|
|
246
|
-
if ($[
|
|
247
|
-
|
|
239
|
+
useEffect(t6, t7);
|
|
240
|
+
let t8;
|
|
241
|
+
if ($[36] !== disabled || $[37] !== isPressed) {
|
|
242
|
+
t8 = () => {
|
|
248
243
|
if (isPressed && !disabled) {
|
|
249
244
|
releasedAt.current = performance.now();
|
|
250
245
|
}
|
|
251
246
|
setIsPressed(false);
|
|
252
247
|
};
|
|
253
|
-
$[
|
|
254
|
-
$[
|
|
255
|
-
$[
|
|
248
|
+
$[36] = disabled;
|
|
249
|
+
$[37] = isPressed;
|
|
250
|
+
$[38] = t8;
|
|
256
251
|
} else {
|
|
257
|
-
|
|
252
|
+
t8 = $[38];
|
|
258
253
|
}
|
|
259
|
-
const release =
|
|
260
|
-
const
|
|
261
|
-
let
|
|
262
|
-
if ($[
|
|
263
|
-
|
|
264
|
-
$[
|
|
265
|
-
$[
|
|
254
|
+
const release = t8;
|
|
255
|
+
const t9 = label ? "" : undefined;
|
|
256
|
+
let t10;
|
|
257
|
+
if ($[39] !== className) {
|
|
258
|
+
t10 = cn(switchClassName, className);
|
|
259
|
+
$[39] = className;
|
|
260
|
+
$[40] = t10;
|
|
266
261
|
} else {
|
|
267
|
-
|
|
262
|
+
t10 = $[40];
|
|
268
263
|
}
|
|
269
|
-
const
|
|
270
|
-
let
|
|
271
|
-
if ($[
|
|
272
|
-
|
|
264
|
+
const t11 = ariaLabel ?? label;
|
|
265
|
+
let t12;
|
|
266
|
+
if ($[41] !== checked || $[42] !== onCheckedChange) {
|
|
267
|
+
t12 = (nextChecked) => {
|
|
273
268
|
if (checked === undefined) {
|
|
274
269
|
setUncontrolledChecked(nextChecked);
|
|
275
270
|
}
|
|
276
271
|
onCheckedChange?.(nextChecked);
|
|
277
272
|
};
|
|
278
|
-
$[
|
|
279
|
-
$[
|
|
280
|
-
$[
|
|
273
|
+
$[41] = checked;
|
|
274
|
+
$[42] = onCheckedChange;
|
|
275
|
+
$[43] = t12;
|
|
281
276
|
} else {
|
|
282
|
-
|
|
277
|
+
t12 = $[43];
|
|
283
278
|
}
|
|
284
|
-
let
|
|
285
|
-
if ($[
|
|
286
|
-
|
|
279
|
+
let t13;
|
|
280
|
+
if ($[44] !== onPointerDown) {
|
|
281
|
+
t13 = (event) => {
|
|
287
282
|
onPointerDown?.(event);
|
|
288
283
|
if (event.button === SWITCH_PRIMARY_POINTER_BUTTON) {
|
|
289
284
|
setIsPressed(true);
|
|
290
285
|
}
|
|
291
286
|
};
|
|
292
|
-
$[
|
|
293
|
-
$[
|
|
287
|
+
$[44] = onPointerDown;
|
|
288
|
+
$[45] = t13;
|
|
294
289
|
} else {
|
|
295
|
-
|
|
290
|
+
t13 = $[45];
|
|
296
291
|
}
|
|
297
|
-
let
|
|
298
|
-
if ($[
|
|
299
|
-
|
|
292
|
+
let t14;
|
|
293
|
+
if ($[46] !== onPointerUp || $[47] !== release) {
|
|
294
|
+
t14 = (event_0) => {
|
|
300
295
|
onPointerUp?.(event_0);
|
|
301
296
|
release();
|
|
302
297
|
};
|
|
303
|
-
$[
|
|
304
|
-
$[
|
|
305
|
-
$[
|
|
298
|
+
$[46] = onPointerUp;
|
|
299
|
+
$[47] = release;
|
|
300
|
+
$[48] = t14;
|
|
306
301
|
} else {
|
|
307
|
-
|
|
302
|
+
t14 = $[48];
|
|
308
303
|
}
|
|
309
|
-
let
|
|
310
|
-
if ($[
|
|
311
|
-
|
|
304
|
+
let t15;
|
|
305
|
+
if ($[49] !== onPointerLeave) {
|
|
306
|
+
t15 = (event_1) => {
|
|
312
307
|
onPointerLeave?.(event_1);
|
|
313
308
|
setIsPressed(false);
|
|
314
309
|
};
|
|
315
|
-
$[
|
|
316
|
-
$[
|
|
310
|
+
$[49] = onPointerLeave;
|
|
311
|
+
$[50] = t15;
|
|
317
312
|
} else {
|
|
318
|
-
|
|
313
|
+
t15 = $[50];
|
|
319
314
|
}
|
|
320
|
-
let
|
|
321
|
-
if ($[
|
|
322
|
-
|
|
315
|
+
let t16;
|
|
316
|
+
if ($[51] !== onPointerCancel) {
|
|
317
|
+
t16 = (event_2) => {
|
|
323
318
|
onPointerCancel?.(event_2);
|
|
324
319
|
setIsPressed(false);
|
|
325
320
|
};
|
|
326
|
-
$[
|
|
327
|
-
$[
|
|
321
|
+
$[51] = onPointerCancel;
|
|
322
|
+
$[52] = t16;
|
|
328
323
|
} else {
|
|
329
|
-
|
|
324
|
+
t16 = $[52];
|
|
330
325
|
}
|
|
331
|
-
let
|
|
332
|
-
if ($[
|
|
333
|
-
|
|
326
|
+
let t17;
|
|
327
|
+
if ($[53] !== onKeyDown) {
|
|
328
|
+
t17 = (event_3) => {
|
|
334
329
|
onKeyDown?.(event_3);
|
|
335
330
|
if (event_3.key === SWITCH_TOGGLE_KEY) {
|
|
336
331
|
setIsPressed(true);
|
|
337
332
|
}
|
|
338
333
|
};
|
|
339
|
-
$[
|
|
340
|
-
$[
|
|
334
|
+
$[53] = onKeyDown;
|
|
335
|
+
$[54] = t17;
|
|
341
336
|
} else {
|
|
342
|
-
|
|
337
|
+
t17 = $[54];
|
|
343
338
|
}
|
|
344
|
-
let
|
|
345
|
-
if ($[
|
|
346
|
-
|
|
339
|
+
let t18;
|
|
340
|
+
if ($[55] !== onKeyUp || $[56] !== release) {
|
|
341
|
+
t18 = (event_4) => {
|
|
347
342
|
onKeyUp?.(event_4);
|
|
348
343
|
release();
|
|
349
344
|
};
|
|
350
|
-
$[
|
|
351
|
-
$[
|
|
352
|
-
$[
|
|
345
|
+
$[55] = onKeyUp;
|
|
346
|
+
$[56] = release;
|
|
347
|
+
$[57] = t18;
|
|
353
348
|
} else {
|
|
354
|
-
|
|
349
|
+
t18 = $[57];
|
|
355
350
|
}
|
|
356
|
-
let
|
|
357
|
-
if ($[
|
|
358
|
-
|
|
351
|
+
let t19;
|
|
352
|
+
if ($[58] !== onBlur) {
|
|
353
|
+
t19 = (event_5) => {
|
|
359
354
|
onBlur?.(event_5);
|
|
360
355
|
setIsPressed(false);
|
|
361
356
|
};
|
|
362
|
-
$[
|
|
363
|
-
$[
|
|
357
|
+
$[58] = onBlur;
|
|
358
|
+
$[59] = t19;
|
|
364
359
|
} else {
|
|
365
|
-
|
|
360
|
+
t19 = $[59];
|
|
366
361
|
}
|
|
367
|
-
let
|
|
368
|
-
if ($[
|
|
369
|
-
|
|
362
|
+
let t20;
|
|
363
|
+
if ($[60] !== scaleX || $[61] !== width || $[62] !== x) {
|
|
364
|
+
t20 = /* @__PURE__ */ _jsx("span", {
|
|
370
365
|
"data-slot": "switch-track",
|
|
371
366
|
className: trackClassName,
|
|
372
367
|
children: /* @__PURE__ */ _jsx(SwitchPrimitive.Thumb, {
|
|
@@ -382,68 +377,66 @@ function Switch(t0) {
|
|
|
382
377
|
})
|
|
383
378
|
})
|
|
384
379
|
});
|
|
385
|
-
$[
|
|
386
|
-
$[
|
|
387
|
-
$[
|
|
388
|
-
$[
|
|
380
|
+
$[60] = scaleX;
|
|
381
|
+
$[61] = width;
|
|
382
|
+
$[62] = x;
|
|
383
|
+
$[63] = t20;
|
|
389
384
|
} else {
|
|
390
|
-
|
|
385
|
+
t20 = $[63];
|
|
391
386
|
}
|
|
392
|
-
let
|
|
393
|
-
if ($[
|
|
394
|
-
|
|
387
|
+
let t21;
|
|
388
|
+
if ($[64] !== label) {
|
|
389
|
+
t21 = label ? /* @__PURE__ */ _jsx("span", {
|
|
395
390
|
"data-slot": "switch-label",
|
|
396
391
|
className: "leading-(--leading-body)",
|
|
397
392
|
children: label
|
|
398
393
|
}) : null;
|
|
399
|
-
$[
|
|
400
|
-
$[
|
|
394
|
+
$[64] = label;
|
|
395
|
+
$[65] = t21;
|
|
401
396
|
} else {
|
|
402
|
-
|
|
397
|
+
t21 = $[65];
|
|
403
398
|
}
|
|
404
|
-
let
|
|
405
|
-
if ($[
|
|
406
|
-
|
|
399
|
+
let t22;
|
|
400
|
+
if ($[66] !== disabled || $[67] !== isChecked || $[68] !== props || $[69] !== t10 || $[70] !== t11 || $[71] !== t12 || $[72] !== t13 || $[73] !== t14 || $[74] !== t15 || $[75] !== t16 || $[76] !== t17 || $[77] !== t18 || $[78] !== t19 || $[79] !== t20 || $[80] !== t21 || $[81] !== t9) {
|
|
401
|
+
t22 = /* @__PURE__ */ _jsxs(SwitchPrimitive.Root, {
|
|
407
402
|
"data-slot": "switch",
|
|
408
|
-
"data-
|
|
409
|
-
|
|
410
|
-
className: t11,
|
|
403
|
+
"data-labelled": t9,
|
|
404
|
+
className: t10,
|
|
411
405
|
...props,
|
|
412
406
|
disabled,
|
|
413
407
|
checked: isChecked,
|
|
414
|
-
"aria-label":
|
|
415
|
-
onCheckedChange:
|
|
416
|
-
onPointerDown:
|
|
417
|
-
onPointerUp:
|
|
418
|
-
onPointerLeave:
|
|
419
|
-
onPointerCancel:
|
|
420
|
-
onKeyDown:
|
|
421
|
-
onKeyUp:
|
|
422
|
-
onBlur:
|
|
423
|
-
children: [
|
|
408
|
+
"aria-label": t11,
|
|
409
|
+
onCheckedChange: t12,
|
|
410
|
+
onPointerDown: t13,
|
|
411
|
+
onPointerUp: t14,
|
|
412
|
+
onPointerLeave: t15,
|
|
413
|
+
onPointerCancel: t16,
|
|
414
|
+
onKeyDown: t17,
|
|
415
|
+
onKeyUp: t18,
|
|
416
|
+
onBlur: t19,
|
|
417
|
+
children: [t20, t21]
|
|
424
418
|
});
|
|
425
|
-
$[
|
|
426
|
-
$[
|
|
427
|
-
$[
|
|
428
|
-
$[
|
|
429
|
-
$[
|
|
430
|
-
$[
|
|
431
|
-
$[
|
|
432
|
-
$[
|
|
433
|
-
$[
|
|
434
|
-
$[
|
|
435
|
-
$[
|
|
436
|
-
$[
|
|
437
|
-
$[
|
|
438
|
-
$[
|
|
439
|
-
$[
|
|
440
|
-
$[
|
|
441
|
-
$[
|
|
442
|
-
$[84] = t23;
|
|
419
|
+
$[66] = disabled;
|
|
420
|
+
$[67] = isChecked;
|
|
421
|
+
$[68] = props;
|
|
422
|
+
$[69] = t10;
|
|
423
|
+
$[70] = t11;
|
|
424
|
+
$[71] = t12;
|
|
425
|
+
$[72] = t13;
|
|
426
|
+
$[73] = t14;
|
|
427
|
+
$[74] = t15;
|
|
428
|
+
$[75] = t16;
|
|
429
|
+
$[76] = t17;
|
|
430
|
+
$[77] = t18;
|
|
431
|
+
$[78] = t19;
|
|
432
|
+
$[79] = t20;
|
|
433
|
+
$[80] = t21;
|
|
434
|
+
$[81] = t9;
|
|
435
|
+
$[82] = t22;
|
|
443
436
|
} else {
|
|
444
|
-
|
|
437
|
+
t22 = $[82];
|
|
445
438
|
}
|
|
446
|
-
return
|
|
439
|
+
return t22;
|
|
447
440
|
}
|
|
448
441
|
function _temp(unsubscribe) {
|
|
449
442
|
return unsubscribe();
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* panel. Radix keeps the roles, keyboard navigation and controlled or uncontrolled value.
|
|
6
6
|
*/
|
|
7
7
|
import { type ComponentProps } from "react";
|
|
8
|
-
import { type VariantProps } from "class-variance-authority";
|
|
9
8
|
import { Tabs as TabsPrimitive } from "radix-ui";
|
|
10
9
|
/**
|
|
11
10
|
* Groups a tab list with its panels. Accepts Radix's `value`/`defaultValue`/`onValueChange` contract unchanged.
|
|
@@ -13,20 +12,13 @@ import { Tabs as TabsPrimitive } from "radix-ui";
|
|
|
13
12
|
* @returns The tabs root.
|
|
14
13
|
*/
|
|
15
14
|
declare function Tabs({ className, orientation, value, defaultValue, onValueChange, ref, ...props }: ComponentProps<typeof TabsPrimitive.Root>): import("react").JSX.Element;
|
|
16
|
-
/**
|
|
17
|
-
* Arc's segmented list (`default`): a muted track whose active trigger is a raised surface. `line` keeps the
|
|
18
|
-
* underline variant on the same tokens. Horizontal lists scroll sideways without a visible scrollbar.
|
|
19
|
-
*/
|
|
20
|
-
declare const tabsListVariants: (props?: ({
|
|
21
|
-
variant?: "default" | "line" | null | undefined;
|
|
22
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
23
15
|
/**
|
|
24
16
|
* Holds the triggers. The active highlight glides to the newly selected trigger and the list scrolls to keep the
|
|
25
17
|
* active or focused trigger visible.
|
|
26
|
-
* @param props - Radix list props,
|
|
18
|
+
* @param props - Radix list props, including `aria-label`, `loop` and `ref`.
|
|
27
19
|
* @returns The tab list.
|
|
28
20
|
*/
|
|
29
|
-
declare function TabsList({ className,
|
|
21
|
+
declare function TabsList({ className, ref, onFocusCapture, ...props }: ComponentProps<typeof TabsPrimitive.List>): import("react").JSX.Element;
|
|
30
22
|
/**
|
|
31
23
|
* Selects a panel. Arc's trigger: muted label, accent label once active, hover only on fine pointers and the
|
|
32
24
|
* shared keyboard focus outline.
|
|
@@ -41,4 +33,4 @@ declare function TabsTrigger({ className, value, ...props }: ComponentProps<type
|
|
|
41
33
|
* @returns The tab panel, or nothing while another tab is active.
|
|
42
34
|
*/
|
|
43
35
|
declare function TabsContent({ className, value, forceMount, asChild, children, ...props }: ComponentProps<typeof TabsPrimitive.Content>): import("react").JSX.Element;
|
|
44
|
-
export { Tabs, TabsList, TabsTrigger, TabsContent
|
|
36
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent };
|