beez-ui 2.7.1 → 3.0.1
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 +78 -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 +268 -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 +29 -1
- package/dist/constants/avatar.js +25 -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
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
/** Tuning shared by the Arc surfaces of `Dialog` and `
|
|
1
|
+
/** Tuning and default copy shared by the Arc surfaces of `Dialog` and its `alert` mode. */
|
|
2
2
|
/** Vertical offsets, in em, of a changed title or description rising in and lifting out while the dialog is open. */
|
|
3
3
|
export declare const DIALOG_TEXT_SWAP_OFFSET_EM: {
|
|
4
4
|
readonly enter: 0.3;
|
|
5
5
|
readonly exit: -0.3;
|
|
6
6
|
};
|
|
7
|
+
/** Default Spanish copy of Dialog; the close button name can be overridden with `closeLabel`. */
|
|
8
|
+
export declare const DIALOG_DEFAULT_COPY: {
|
|
9
|
+
/** Accessible name of the built-in close button (Arc's "Close dialog"). */
|
|
10
|
+
readonly closeLabel: "Cerrar diálogo";
|
|
11
|
+
};
|
package/dist/constants/dialog.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
/** Tuning shared by the Arc surfaces of `Dialog` and `
|
|
1
|
+
/** Tuning and default copy shared by the Arc surfaces of `Dialog` and its `alert` mode. */
|
|
2
2
|
/** Vertical offsets, in em, of a changed title or description rising in and lifting out while the dialog is open. */
|
|
3
3
|
export const DIALOG_TEXT_SWAP_OFFSET_EM = {
|
|
4
4
|
enter: .3,
|
|
5
5
|
exit: -.3
|
|
6
6
|
};
|
|
7
|
+
/** Default Spanish copy of Dialog; the close button name can be overridden with `closeLabel`. */
|
|
8
|
+
export const DIALOG_DEFAULT_COPY = {
|
|
9
|
+
/** Accessible name of the built-in close button (Arc's "Close dialog"). */
|
|
10
|
+
closeLabel: "Cerrar diálogo" };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/** Placement defaults of
|
|
1
|
+
/** Placement defaults of the dropdown menu content, taken from Arc's Dropdown menu. */
|
|
2
2
|
/** Gap, in pixels, between the trigger and the menu. */
|
|
3
3
|
export declare const DROPDOWN_MENU_SIDE_OFFSET_PX = 6;
|
|
4
|
-
/** Minimum distance, in pixels, a menu
|
|
4
|
+
/** Minimum distance, in pixels, a menu keeps from the viewport edges. */
|
|
5
5
|
export declare const DROPDOWN_MENU_COLLISION_PADDING_PX = 12;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/** Placement defaults of
|
|
1
|
+
/** Placement defaults of the dropdown menu content, taken from Arc's Dropdown menu. */
|
|
2
2
|
/** Gap, in pixels, between the trigger and the menu. */
|
|
3
3
|
export const DROPDOWN_MENU_SIDE_OFFSET_PX = 6;
|
|
4
|
-
/** Minimum distance, in pixels, a menu
|
|
4
|
+
/** Minimum distance, in pixels, a menu keeps from the viewport edges. */
|
|
5
5
|
export const DROPDOWN_MENU_COLLISION_PADDING_PX = 12;
|
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
/** Default Spanish copy
|
|
1
|
+
/** Default Spanish copy and window of Arc's Pagination. */
|
|
2
|
+
/** Default Spanish copy of Pagination; the landmark and arrow copy can be overridden through props. */
|
|
2
3
|
export declare const PAGINATION_DEFAULT_COPY: {
|
|
4
|
+
/** Accessible name of the navigation landmark (Arc's "Pagination"). */
|
|
3
5
|
readonly navigationLabel: "Paginación";
|
|
6
|
+
/** Visible label of the previous arrow. */
|
|
4
7
|
readonly previousText: "Anterior";
|
|
8
|
+
/** Visible label of the next arrow. */
|
|
5
9
|
readonly nextText: "Siguiente";
|
|
10
|
+
/** Accessible name of the previous arrow while it keeps its default label (Arc's "Previous page"). */
|
|
6
11
|
readonly previousLabel: "Ir a la página anterior";
|
|
12
|
+
/** Accessible name of the next arrow while it keeps its default label (Arc's "Next page"). */
|
|
7
13
|
readonly nextLabel: "Ir a la página siguiente";
|
|
8
|
-
|
|
14
|
+
/** Word before the number in the accessible name of each page (Arc's "Page 3"). */
|
|
15
|
+
readonly pageLabelPrefix: "Página";
|
|
9
16
|
};
|
|
17
|
+
/** Pages shown at once: Arc's five page window, so the control keeps one width on any screen. */
|
|
18
|
+
export declare const PAGINATION_WINDOW_SIZE = 5;
|
|
19
|
+
/** First page number: pages are 1-based. */
|
|
20
|
+
export declare const PAGINATION_FIRST_PAGE = 1;
|
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
/** Default Spanish copy
|
|
1
|
+
/** Default Spanish copy and window of Arc's Pagination. */
|
|
2
|
+
/** Default Spanish copy of Pagination; the landmark and arrow copy can be overridden through props. */
|
|
2
3
|
export const PAGINATION_DEFAULT_COPY = {
|
|
4
|
+
/** Accessible name of the navigation landmark (Arc's "Pagination"). */
|
|
3
5
|
navigationLabel: "Paginación",
|
|
6
|
+
/** Visible label of the previous arrow. */
|
|
4
7
|
previousText: "Anterior",
|
|
8
|
+
/** Visible label of the next arrow. */
|
|
5
9
|
nextText: "Siguiente",
|
|
10
|
+
/** Accessible name of the previous arrow while it keeps its default label (Arc's "Previous page"). */
|
|
6
11
|
previousLabel: "Ir a la página anterior",
|
|
12
|
+
/** Accessible name of the next arrow while it keeps its default label (Arc's "Next page"). */
|
|
7
13
|
nextLabel: "Ir a la página siguiente",
|
|
8
|
-
|
|
14
|
+
/** Word before the number in the accessible name of each page (Arc's "Page 3"). */
|
|
15
|
+
pageLabelPrefix: "Página"
|
|
9
16
|
};
|
|
17
|
+
/** Pages shown at once: Arc's five page window, so the control keeps one width on any screen. */
|
|
18
|
+
export const PAGINATION_WINDOW_SIZE = 5;
|
|
19
|
+
/** First page number: pages are 1-based. */
|
|
20
|
+
export const PAGINATION_FIRST_PAGE = 1;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
/** Placement defaults
|
|
2
|
-
/** Minimum distance, in pixels,
|
|
1
|
+
/** Placement defaults and copy of Arc's Select. */
|
|
2
|
+
/** Minimum distance, in pixels, the option list keeps from the viewport edges. */
|
|
3
3
|
export declare const SELECT_COLLISION_PADDING_PX = 12;
|
|
4
|
+
/** Default Spanish placeholder, shown while no option is chosen. Arc's English default is "Select an option". */
|
|
5
|
+
export declare const SELECT_DEFAULT_PLACEHOLDER = "Seleccion\u00E1 una opci\u00F3n";
|
package/dist/constants/select.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
/** Placement defaults
|
|
2
|
-
/** Minimum distance, in pixels,
|
|
1
|
+
/** Placement defaults and copy of Arc's Select. */
|
|
2
|
+
/** Minimum distance, in pixels, the option list keeps from the viewport edges. */
|
|
3
3
|
export const SELECT_COLLISION_PADDING_PX = 12;
|
|
4
|
+
/** Default Spanish placeholder, shown while no option is chosen. Arc's English default is "Select an option". */
|
|
5
|
+
export const SELECT_DEFAULT_PLACEHOLDER = "Seleccioná una opción";
|
|
@@ -1,25 +1,14 @@
|
|
|
1
1
|
/** Tuning of Arc's Switch thumb, adapted from Arc (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md). */
|
|
2
|
-
/** Sizes the switch accepts; `default` is Arc's 42 by 24 track and `sm` a compact one for dense rows. */
|
|
3
|
-
export type SwitchSize = "default" | "sm";
|
|
4
2
|
/**
|
|
5
|
-
* Thumb geometry
|
|
6
|
-
* minus the thumb. Keep in sync with the track and thumb sizes in `switch.tsx`.
|
|
3
|
+
* Thumb geometry on Arc's 42 by 24 track, in pixels: its resting width and how far it travels, which is the track's
|
|
4
|
+
* inner width minus the thumb. Keep in sync with the track and thumb sizes in `switch.tsx`.
|
|
7
5
|
*/
|
|
8
6
|
export declare const SWITCH_THUMB_GEOMETRY_PX: {
|
|
9
|
-
readonly
|
|
10
|
-
|
|
11
|
-
readonly travel: 18;
|
|
12
|
-
};
|
|
13
|
-
readonly sm: {
|
|
14
|
-
readonly size: 14;
|
|
15
|
-
readonly travel: 14;
|
|
16
|
-
};
|
|
7
|
+
readonly size: 18;
|
|
8
|
+
readonly travel: 18;
|
|
17
9
|
};
|
|
18
10
|
/** How far, in pixels, the thumb widens toward the other side while it is held down. */
|
|
19
|
-
export declare const SWITCH_PRESS_STRETCH_PX
|
|
20
|
-
readonly default: 5;
|
|
21
|
-
readonly sm: 4;
|
|
22
|
-
};
|
|
11
|
+
export declare const SWITCH_PRESS_STRETCH_PX = 5;
|
|
23
12
|
/** Critically damped glide: the thumb lands on its end without overshooting the state it reports. */
|
|
24
13
|
export declare const SWITCH_THUMB_GLIDE_SPRING: {
|
|
25
14
|
readonly type: "spring";
|
package/dist/constants/switch.js
CHANGED
|
@@ -1,22 +1,14 @@
|
|
|
1
|
+
/** Tuning of Arc's Switch thumb, adapted from Arc (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md). */
|
|
1
2
|
/**
|
|
2
|
-
* Thumb geometry
|
|
3
|
-
* minus the thumb. Keep in sync with the track and thumb sizes in `switch.tsx`.
|
|
3
|
+
* Thumb geometry on Arc's 42 by 24 track, in pixels: its resting width and how far it travels, which is the track's
|
|
4
|
+
* inner width minus the thumb. Keep in sync with the track and thumb sizes in `switch.tsx`.
|
|
4
5
|
*/
|
|
5
6
|
export const SWITCH_THUMB_GEOMETRY_PX = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
travel: 18
|
|
9
|
-
},
|
|
10
|
-
sm: {
|
|
11
|
-
size: 14,
|
|
12
|
-
travel: 14
|
|
13
|
-
}
|
|
7
|
+
size: 18,
|
|
8
|
+
travel: 18
|
|
14
9
|
};
|
|
15
10
|
/** How far, in pixels, the thumb widens toward the other side while it is held down. */
|
|
16
|
-
export const SWITCH_PRESS_STRETCH_PX =
|
|
17
|
-
default: 5,
|
|
18
|
-
sm: 4
|
|
19
|
-
};
|
|
11
|
+
export const SWITCH_PRESS_STRETCH_PX = 5;
|
|
20
12
|
/** Critically damped glide: the thumb lands on its end without overshooting the state it reports. */
|
|
21
13
|
export const SWITCH_THUMB_GLIDE_SPRING = {
|
|
22
14
|
type: "spring",
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Arc's `useToday`: the viewer's local date at midnight. It is `undefined` while rendering on the server and during
|
|
3
|
+
* hydration, so markup never depends on the server clock, and it moves to the next day when the viewer's midnight
|
|
4
|
+
* passes. The same `Date` instance is returned until the day changes.
|
|
5
|
+
* @returns Today at 00:00 in the viewer's time zone, or `undefined` before hydration.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useToday(): Date | undefined;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { c as _c } from "react/compiler-runtime";
|
|
3
|
+
/** The viewer's local date, kept out of server and hydration renders and refreshed at midnight. */
|
|
4
|
+
import { useEffect, useState } from "react";
|
|
5
|
+
import { useIsHydrated } from "./use-is-hydrated.js";
|
|
6
|
+
/**
|
|
7
|
+
* Midnight that starts the viewer's current local day.
|
|
8
|
+
* @returns Today at 00:00 in the viewer's time zone.
|
|
9
|
+
*/
|
|
10
|
+
function startOfLocalToday() {
|
|
11
|
+
const now = new Date();
|
|
12
|
+
return new Date(now.getFullYear(), now.getMonth(), now.getDate());
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Milliseconds until the next local midnight, measured from now.
|
|
16
|
+
* @param today - Start of the current local day.
|
|
17
|
+
* @returns The delay before the day changes.
|
|
18
|
+
*/
|
|
19
|
+
function getDelayUntilNextDay(today) {
|
|
20
|
+
const nextDay = new Date(today.getFullYear(), today.getMonth(), today.getDate() + 1);
|
|
21
|
+
return Math.max(0, nextDay.getTime() - Date.now());
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Arc's `useToday`: the viewer's local date at midnight. It is `undefined` while rendering on the server and during
|
|
25
|
+
* hydration, so markup never depends on the server clock, and it moves to the next day when the viewer's midnight
|
|
26
|
+
* passes. The same `Date` instance is returned until the day changes.
|
|
27
|
+
* @returns Today at 00:00 in the viewer's time zone, or `undefined` before hydration.
|
|
28
|
+
*/
|
|
29
|
+
export function useToday() {
|
|
30
|
+
const $ = _c(3);
|
|
31
|
+
const isHydrated = useIsHydrated();
|
|
32
|
+
const [today, setToday] = useState(startOfLocalToday);
|
|
33
|
+
let t0;
|
|
34
|
+
let t1;
|
|
35
|
+
if ($[0] !== today) {
|
|
36
|
+
t0 = () => {
|
|
37
|
+
const timeout = window.setTimeout(() => setToday(startOfLocalToday()), getDelayUntilNextDay(today));
|
|
38
|
+
return () => window.clearTimeout(timeout);
|
|
39
|
+
};
|
|
40
|
+
t1 = [today];
|
|
41
|
+
$[0] = today;
|
|
42
|
+
$[1] = t0;
|
|
43
|
+
$[2] = t1;
|
|
44
|
+
} else {
|
|
45
|
+
t0 = $[1];
|
|
46
|
+
t1 = $[2];
|
|
47
|
+
}
|
|
48
|
+
useEffect(t0, t1);
|
|
49
|
+
return isHydrated ? today : undefined;
|
|
50
|
+
}
|
package/dist/hooks.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export { useIsMobile } from "./hooks/use-mobile.js";
|
|
6
6
|
export { useIsHydrated } from "./hooks/use-is-hydrated.js";
|
|
7
|
+
export { useToday } from "./hooks/use-today.js";
|
|
7
8
|
export { usePrefersReducedMotion } from "./hooks/use-prefers-reduced-motion.js";
|
|
8
9
|
export { useViewerTimeZone } from "./hooks/use-viewer-time-zone.js";
|
|
9
10
|
export { useHorizontalSwipe, type HorizontalSwipeHandlers } from "./hooks/use-horizontal-swipe.js";
|
package/dist/hooks.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export { useIsMobile } from "./hooks/use-mobile.js";
|
|
6
6
|
export { useIsHydrated } from "./hooks/use-is-hydrated.js";
|
|
7
|
+
export { useToday } from "./hooks/use-today.js";
|
|
7
8
|
export { usePrefersReducedMotion } from "./hooks/use-prefers-reduced-motion.js";
|
|
8
9
|
export { useViewerTimeZone } from "./hooks/use-viewer-time-zone.js";
|
|
9
10
|
export { useHorizontalSwipe } from "./hooks/use-horizontal-swipe.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ export { Link, type LinkProps } from "./components/link.js";
|
|
|
4
4
|
export { BeezUIProvider, type BeezUIProviderProps } from "./providers/native-provider.js";
|
|
5
5
|
export type { BeezUIComponents, BeezImageProps, BeezLinkProps } from "./providers/beez-ui-provider.js";
|
|
6
6
|
export * from "./components/action-button.js";
|
|
7
|
-
export * from "./components/alert-dialog.js";
|
|
8
7
|
export * from "./components/avatar.js";
|
|
9
8
|
export * from "./components/badge.js";
|
|
10
9
|
export * from "./components/button.js";
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,6 @@ export { useTheme } from "next-themes";
|
|
|
3
3
|
export { Link } from "./components/link.js";
|
|
4
4
|
export { BeezUIProvider } from "./providers/native-provider.js";
|
|
5
5
|
export * from "./components/action-button.js";
|
|
6
|
-
export * from "./components/alert-dialog.js";
|
|
7
6
|
export * from "./components/avatar.js";
|
|
8
7
|
export * from "./components/badge.js";
|
|
9
8
|
export * from "./components/button.js";
|
|
@@ -28,7 +28,7 @@ export declare const GLIDE_PRESETS: {
|
|
|
28
28
|
containerSelector: string;
|
|
29
29
|
attributes: string[];
|
|
30
30
|
isActive: (item: Element) => boolean;
|
|
31
|
-
surface: (
|
|
31
|
+
surface: () => "background";
|
|
32
32
|
spring: {
|
|
33
33
|
readonly type: "spring";
|
|
34
34
|
readonly visualDuration: 0.42;
|
|
@@ -12,7 +12,7 @@ export const GLIDE_PRESETS = {
|
|
|
12
12
|
containerSelector: "[role=\"tablist\"]",
|
|
13
13
|
attributes: ["data-state"],
|
|
14
14
|
isActive: (item) => item.getAttribute("data-state") === "active",
|
|
15
|
-
surface: (
|
|
15
|
+
surface: () => "background",
|
|
16
16
|
// Arc glides the tab highlight and the current page mark with its morph spring.
|
|
17
17
|
spring: ARC_SPRING_MORPH
|
|
18
18
|
},
|
|
@@ -6,7 +6,6 @@ declare const OPEN_CONTEXTS: {
|
|
|
6
6
|
"alert-dialog": import("react").Context<boolean>;
|
|
7
7
|
sheet: import("react").Context<boolean>;
|
|
8
8
|
"dropdown-menu": import("react").Context<boolean>;
|
|
9
|
-
"dropdown-sub": import("react").Context<boolean>;
|
|
10
9
|
popover: import("react").Context<boolean>;
|
|
11
10
|
"hover-card": import("react").Context<boolean>;
|
|
12
11
|
tooltip: import("react").Context<boolean>;
|
package/dist/motion/presence.js
CHANGED
|
@@ -10,7 +10,6 @@ const OPEN_CONTEXTS = {
|
|
|
10
10
|
"alert-dialog": createContext(true),
|
|
11
11
|
sheet: createContext(true),
|
|
12
12
|
"dropdown-menu": createContext(true),
|
|
13
|
-
"dropdown-sub": createContext(true),
|
|
14
13
|
popover: createContext(true),
|
|
15
14
|
"hover-card": createContext(true),
|
|
16
15
|
tooltip: createContext(true)
|