@plexui/ui 0.30.0 → 0.32.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/dist/es/components/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/es/components/ButtonGroup/ButtonGroup.js.map +1 -1
- package/dist/es/components/ButtonGroup/index.js.map +1 -1
- package/dist/es/components/ContextMenu/shared.js +3 -2
- package/dist/es/components/ContextMenu/shared.js.map +1 -1
- package/dist/es/components/Dialog/Dialog.js +42 -29
- package/dist/es/components/Dialog/Dialog.js.map +1 -1
- package/dist/es/components/Dialog/dialogSteps.js +85 -0
- package/dist/es/components/Dialog/dialogSteps.js.map +1 -0
- package/dist/es/components/Dialog/dialogViewport.js +74 -0
- package/dist/es/components/Dialog/dialogViewport.js.map +1 -0
- package/dist/es/components/Dialog/index.js +1 -1
- package/dist/es/components/Dialog/index.js.map +1 -1
- package/dist/es/components/Dialog/sheetDrag.js +2 -1
- package/dist/es/components/Dialog/sheetDrag.js.map +1 -1
- package/dist/es/components/IndexBar/IndexBar.js +164 -0
- package/dist/es/components/IndexBar/IndexBar.js.map +1 -0
- package/dist/es/components/IndexBar/index.js +2 -0
- package/dist/es/components/IndexBar/index.js.map +1 -0
- package/dist/es/components/MarkdownEditor/MarkdownEditor.js +142 -1
- package/dist/es/components/MarkdownEditor/MarkdownEditor.js.map +1 -1
- package/dist/es/components/Menu/Menu.js +57 -35
- package/dist/es/components/Menu/Menu.js.map +1 -1
- package/dist/es/components/Page/Page.js +1 -1
- package/dist/es/components/Page/Page.js.map +1 -1
- package/dist/es/components/PhoneLayout/PhoneLayout.js +41 -0
- package/dist/es/components/PhoneLayout/PhoneLayout.js.map +1 -0
- package/dist/es/components/PhoneLayout/index.js +2 -0
- package/dist/es/components/PhoneLayout/index.js.map +1 -0
- package/dist/es/components/Slider/Slider.js +33 -3
- package/dist/es/components/Slider/Slider.js.map +1 -1
- package/dist/es/components/SwipeActions/SwipeActions.js +321 -0
- package/dist/es/components/SwipeActions/SwipeActions.js.map +1 -0
- package/dist/es/components/SwipeActions/index.js +2 -0
- package/dist/es/components/SwipeActions/index.js.map +1 -0
- package/dist/es/components/TabBar/TabBar.js +4 -4
- package/dist/es/components/TabBar/TabBar.js.map +1 -1
- package/dist/es/components/TabBar/index.js.map +1 -1
- package/dist/es/components/Tabs/Tabs.js +1 -1
- package/dist/es/components/Tabs/Tabs.js.map +1 -1
- package/dist/es/components/TagInput/TagInput.js +5 -65
- package/dist/es/components/TagInput/TagInput.js.map +1 -1
- package/dist/es/components/Textarea/Textarea.js +1 -1
- package/dist/es/components/Textarea/Textarea.js.map +1 -1
- package/dist/es/components/Tip/Tip.js +106 -0
- package/dist/es/components/Tip/Tip.js.map +1 -0
- package/dist/es/components/Tip/index.js +2 -0
- package/dist/es/components/Tip/index.js.map +1 -0
- package/dist/es/components/Toast/ToastRenderer.js +22 -9
- package/dist/es/components/Toast/ToastRenderer.js.map +1 -1
- package/dist/es/components/Toast/Toaster.js +17 -6
- package/dist/es/components/Toast/Toaster.js.map +1 -1
- package/dist/es/components/Toast/toastLifecycle.js +113 -1
- package/dist/es/components/Toast/toastLifecycle.js.map +1 -1
- package/dist/es/components/Toolbar/Toolbar.js +1 -1
- package/dist/es/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/es/hooks/useEscCloseStack.js +10 -3
- package/dist/es/hooks/useEscCloseStack.js.map +1 -1
- package/dist/es/hooks/usePhoneSubmenu.js +6 -3
- package/dist/es/hooks/usePhoneSubmenu.js.map +1 -1
- package/dist/es/lib/floatingBoundary.js +3 -1
- package/dist/es/lib/floatingBoundary.js.map +1 -1
- package/dist/es/lib/helpers.js +21 -0
- package/dist/es/lib/helpers.js.map +1 -1
- package/dist/es/lib/menuInitialFocus.js +5 -3
- package/dist/es/lib/menuInitialFocus.js.map +1 -1
- package/dist/es/lib/menuSubmenuPlacement.js +129 -5
- package/dist/es/lib/menuSubmenuPlacement.js.map +1 -1
- package/dist/es/lib/menuTriggerCover.js +10 -4
- package/dist/es/lib/menuTriggerCover.js.map +1 -1
- package/dist/es/lib/phoneLayout.js +16 -0
- package/dist/es/lib/phoneLayout.js.map +1 -0
- package/dist/es/lib/toastRegion.js +6 -0
- package/dist/es/lib/toastRegion.js.map +1 -0
- package/dist/types/components/ButtonGroup/ButtonGroup.d.ts +8 -1
- package/dist/types/components/ButtonGroup/index.d.ts +1 -1
- package/dist/types/components/ContextMenu/shared.d.ts +3 -2
- package/dist/types/components/Dialog/Dialog.d.ts +48 -3
- package/dist/types/components/Dialog/dialogSteps.d.ts +10 -0
- package/dist/types/components/Dialog/dialogViewport.d.ts +1 -0
- package/dist/types/components/Dialog/index.d.ts +1 -1
- package/dist/types/components/IndexBar/IndexBar.d.ts +35 -0
- package/dist/types/components/IndexBar/index.d.ts +1 -0
- package/dist/types/components/Menu/Menu.d.ts +6 -2
- package/dist/types/components/Page/Page.d.ts +1 -1
- package/dist/types/components/PhoneLayout/PhoneLayout.d.ts +18 -0
- package/dist/types/components/PhoneLayout/index.d.ts +1 -0
- package/dist/types/components/SwipeActions/SwipeActions.d.ts +46 -0
- package/dist/types/components/SwipeActions/index.d.ts +1 -0
- package/dist/types/components/TabBar/TabBar.d.ts +18 -4
- package/dist/types/components/TabBar/index.d.ts +1 -1
- package/dist/types/components/Tip/Tip.d.ts +57 -0
- package/dist/types/components/Tip/index.d.ts +1 -0
- package/dist/types/components/Toast/toastLifecycle.d.ts +34 -0
- package/dist/types/components/Toolbar/Toolbar.d.ts +5 -3
- package/dist/types/hooks/useEscCloseStack.d.ts +5 -1
- package/dist/types/hooks/usePhoneSubmenu.d.ts +2 -1
- package/dist/types/lib/helpers.d.ts +6 -0
- package/dist/types/lib/menuSubmenuPlacement.d.ts +9 -2
- package/dist/types/lib/phoneLayout.d.ts +11 -0
- package/dist/types/lib/toastRegion.d.ts +5 -0
- package/package.json +2 -2
|
@@ -6,6 +6,14 @@ export type TabBarSearch = {
|
|
|
6
6
|
/** Accessible name of the search tab. @default "Search" */
|
|
7
7
|
label?: string;
|
|
8
8
|
};
|
|
9
|
+
export type TabBarProminent = {
|
|
10
|
+
/** The value of the prominent tab. */
|
|
11
|
+
value: string;
|
|
12
|
+
/** Accessible name of the prominent tab: its circle shows the symbol only. */
|
|
13
|
+
label: string;
|
|
14
|
+
/** The symbol, a PlexUI icon. */
|
|
15
|
+
icon: ReactNode;
|
|
16
|
+
};
|
|
9
17
|
export type TabBarProps = {
|
|
10
18
|
/** The controlled value of the selected tab. Use with `onValueChange`. */
|
|
11
19
|
value?: string;
|
|
@@ -15,6 +23,12 @@ export type TabBarProps = {
|
|
|
15
23
|
onValueChange?: (value: string) => void;
|
|
16
24
|
/** A search tab in a glass circle of its own at the trailing end, as the iOS 26 separate search tab. */
|
|
17
25
|
search?: TabBarSearch;
|
|
26
|
+
/**
|
|
27
|
+
* The one destination the app lifts out of the capsule, a cart or a library, in a glass circle of its own at
|
|
28
|
+
* the trailing end, as the iOS 27 prominent tab role. It takes the circle of the search tab: with both, search
|
|
29
|
+
* is the last tab of the capsule, as iOS gives search that place only when no other tab is prominent.
|
|
30
|
+
*/
|
|
31
|
+
prominent?: TabBarProminent;
|
|
18
32
|
/**
|
|
19
33
|
* `onScrollDown` minimizes the bar to the selected tab while the content of the `Page` scrolls down and
|
|
20
34
|
* expands it when the content scrolls back up; a tap on the minimized tab expands it too. @default "never"
|
|
@@ -39,10 +53,10 @@ export type TabBarProps = {
|
|
|
39
53
|
/**
|
|
40
54
|
* The tab bar of a phone screen after the iOS 26 kit Tab Bar - iPhone (507:24689): two to five tabs, each a
|
|
41
55
|
* symbol over a label, in a floating glass capsule at the bottom, the selected tab on a pill, and an optional
|
|
42
|
-
* search tab in a circle of its own. It minimizes to the selected tab while the content scrolls
|
|
43
|
-
* layout navigates with a Sidebar or Tabs, so the bar never renders from 768px up.
|
|
56
|
+
* search or prominent tab in a circle of its own. It minimizes to the selected tab while the content scrolls
|
|
57
|
+
* down. A desktop layout navigates with a Sidebar or Tabs, so the bar never renders from 768px up.
|
|
44
58
|
*/
|
|
45
|
-
declare function TabBarRoot({ value: valueProp, defaultValue, onValueChange, search, minimizeBehavior, minimized: minimizedProp, defaultMinimized, onMinimizedChange, background, "aria-label": ariaLabel, children, className, ref, }: TabBarProps): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
declare function TabBarRoot({ value: valueProp, defaultValue, onValueChange, search, prominent, minimizeBehavior, minimized: minimizedProp, defaultMinimized, onMinimizedChange, background, "aria-label": ariaLabel, children, className, ref, }: TabBarProps): import("react/jsx-runtime").JSX.Element;
|
|
46
60
|
declare namespace TabBarRoot {
|
|
47
61
|
var displayName: string;
|
|
48
62
|
}
|
|
@@ -61,7 +75,7 @@ export type TabBarItemProps = {
|
|
|
61
75
|
onClick?: (event: MouseEvent<HTMLElement>) => void;
|
|
62
76
|
/** CSS classes applied to the tab */
|
|
63
77
|
className?: string;
|
|
64
|
-
/** @internal The search tab
|
|
78
|
+
/** @internal The search and the prominent tab show their symbol only. */
|
|
65
79
|
hideLabel?: boolean;
|
|
66
80
|
};
|
|
67
81
|
declare function TabBarItem({ value, label, icon, href, disabled, onClick, className, hideLabel }: TabBarItemProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { TabBar, type TabBarItemProps, type TabBarProps, type TabBarSearch } from "./TabBar.js";
|
|
1
|
+
export { TabBar, type TabBarItemProps, type TabBarProminent, type TabBarProps, type TabBarSearch } from "./TabBar.js";
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type ReactElement, type ReactNode, type Ref } from "react";
|
|
2
|
+
/** The edge of an inline tip that points at what it explains. */
|
|
3
|
+
export type TipArrowEdge = "top" | "bottom" | "left" | "right";
|
|
4
|
+
/** How a tip's actions show on a phone. */
|
|
5
|
+
export type TipMobileActions = "rows" | "buttons";
|
|
6
|
+
type TipContentProps = {
|
|
7
|
+
/** The tip's title: what the feature is. */
|
|
8
|
+
title: ReactNode;
|
|
9
|
+
/** One or two sentences on how to use it. */
|
|
10
|
+
description?: ReactNode;
|
|
11
|
+
/** A symbol or image that leads the message, as a TipKit tip's image. */
|
|
12
|
+
icon?: ReactNode;
|
|
13
|
+
/** Buttons for the tip's actions, side by side below the message. */
|
|
14
|
+
actions?: ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* How the actions show at 767px and below: rows of text under a separator, as iOS tips show them, or the buttons
|
|
17
|
+
* as given, each a full-width capsule under the message, as an iOS card that asks for a permission.
|
|
18
|
+
* @default "rows"
|
|
19
|
+
*/
|
|
20
|
+
mobileActions?: TipMobileActions;
|
|
21
|
+
};
|
|
22
|
+
export type TipProps = TipContentProps & {
|
|
23
|
+
/** Shows the Close button; called when it is clicked. */
|
|
24
|
+
onClose?: () => void;
|
|
25
|
+
/** Draws an arrow at this edge, pointing at what the tip explains (TipKit's annotation). */
|
|
26
|
+
arrowEdge?: TipArrowEdge;
|
|
27
|
+
/** Class applied to the tip */
|
|
28
|
+
className?: string;
|
|
29
|
+
/** Ref applied to the tip */
|
|
30
|
+
ref?: Ref<HTMLDivElement>;
|
|
31
|
+
};
|
|
32
|
+
/** A tip inside the page, after TipKit: a title, a description, an optional symbol, actions and Close. */
|
|
33
|
+
export declare const Tip: {
|
|
34
|
+
({ ref, ...props }: TipProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
Popover: ({ open: controlledOpen, defaultOpen, onOpenChange, children, side, align, sideOffset, closeButton, className, ...content }: TipPopoverProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
};
|
|
37
|
+
export type TipPopoverProps = TipContentProps & {
|
|
38
|
+
/** Shows the tip (controlled). */
|
|
39
|
+
open?: boolean;
|
|
40
|
+
/** Shows the tip at first (uncontrolled). @default false */
|
|
41
|
+
defaultOpen?: boolean;
|
|
42
|
+
/** Called when the tip opens or closes: Close, Escape or a press outside closes it. */
|
|
43
|
+
onOpenChange?: (open: boolean) => void;
|
|
44
|
+
/** The control the tip explains. It stays usable while the tip shows. */
|
|
45
|
+
children: ReactElement;
|
|
46
|
+
/** The side of the control the tip shows on. Turned when it does not fit. @default bottom */
|
|
47
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
48
|
+
/** The alignment against the control. @default center */
|
|
49
|
+
align?: "start" | "center" | "end";
|
|
50
|
+
/** The distance from the control to the arrow's point, in pixels. @default 4 */
|
|
51
|
+
sideOffset?: number;
|
|
52
|
+
/** Shows the Close button. @default true */
|
|
53
|
+
closeButton?: boolean;
|
|
54
|
+
/** Class applied to the popover around the tip and its arrow */
|
|
55
|
+
className?: string;
|
|
56
|
+
};
|
|
57
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Tip, type TipArrowEdge, type TipMobileActions, type TipPopoverProps, type TipProps } from "./Tip.js";
|
|
@@ -54,6 +54,14 @@ export declare class ToastLifecycle<T extends ToastData> {
|
|
|
54
54
|
private lists;
|
|
55
55
|
private suppressed;
|
|
56
56
|
private lastPointerType;
|
|
57
|
+
private region;
|
|
58
|
+
private announcers;
|
|
59
|
+
private announced;
|
|
60
|
+
/** Alerts read by the assertive announcer: shown behind the stack, their own role could not speak */
|
|
61
|
+
private assertive;
|
|
62
|
+
private announceTimers;
|
|
63
|
+
private pending;
|
|
64
|
+
private flushTimer?;
|
|
57
65
|
constructor(dismissStore: (id: ToastId) => unknown, notify: (reason: "dismiss" | "auto", toast: T) => void);
|
|
58
66
|
subscribe: (listener: () => void) => () => void;
|
|
59
67
|
snapshot: () => number;
|
|
@@ -62,6 +70,17 @@ export declare class ToastLifecycle<T extends ToastData> {
|
|
|
62
70
|
get paused(): boolean;
|
|
63
71
|
connect(doc: Document): void;
|
|
64
72
|
private visibility;
|
|
73
|
+
private isolate;
|
|
74
|
+
setRegion(node: HTMLElement | null): void;
|
|
75
|
+
setAnnouncer(kind: "polite" | "assertive", node: HTMLElement | null): void;
|
|
76
|
+
/** An error that waits to be closed interrupts as an alert; every other toast is read politely. */
|
|
77
|
+
alert(entry: ToastEntry<T>): boolean;
|
|
78
|
+
/** Whether a toast's content carries role="alert": an alert, unless it came in behind the stack and the assertive announcer read it. */
|
|
79
|
+
alertRole(entry: ToastEntry<T>, custom: boolean): boolean;
|
|
80
|
+
private visible;
|
|
81
|
+
/** Reads a toast's words once, and again only when they change (a promise that settles, a custom toast's own state). */
|
|
82
|
+
speak(id: ToastId, node: HTMLElement, custom: boolean): void;
|
|
83
|
+
private flush;
|
|
65
84
|
disconnect(): void;
|
|
66
85
|
sync(toasts: T[], config: ToastConfig): void;
|
|
67
86
|
private pause;
|
|
@@ -84,6 +103,21 @@ export declare class ToastLifecycle<T extends ToastData> {
|
|
|
84
103
|
pointerMove(id: ToastId, event: PointerEvent): void;
|
|
85
104
|
pointerEnd(id: ToastId, event: PointerEvent, cancelled?: boolean): void;
|
|
86
105
|
}
|
|
106
|
+
/** The words a toast says: its title and description, or a custom toast's text. */
|
|
107
|
+
export declare const toastText: (node: HTMLElement) => string;
|
|
108
|
+
/** Hides the polite announcer from sight, not from a screen reader. */
|
|
109
|
+
export declare const announcerStyle: {
|
|
110
|
+
readonly position: "absolute";
|
|
111
|
+
readonly width: "1px";
|
|
112
|
+
readonly height: "1px";
|
|
113
|
+
readonly margin: "-1px";
|
|
114
|
+
readonly padding: "0";
|
|
115
|
+
readonly overflow: "hidden";
|
|
116
|
+
readonly clip: "rect(0 0 0 0)";
|
|
117
|
+
readonly clipPath: "inset(50%)";
|
|
118
|
+
readonly whiteSpace: "nowrap";
|
|
119
|
+
readonly border: "0";
|
|
120
|
+
};
|
|
87
121
|
export type Offset = number | string | Partial<Record<"top" | "right" | "bottom" | "left", number | string>>;
|
|
88
122
|
export declare const offsetStyles: (offset: Offset | undefined, mobileOffset: Offset | undefined) => Record<string, string>;
|
|
89
123
|
export declare const documentDirection: (doc: Document | undefined) => "ltr" | "rtl";
|
|
@@ -5,9 +5,11 @@ export type ToolbarTitleStyle = "inline" | "large" | "compact-large" | "compact-
|
|
|
5
5
|
export type ToolbarTitleAlign = "center" | "start";
|
|
6
6
|
/**
|
|
7
7
|
* How a bar meets the content scrolled under it, after the scroll edge effect of iOS 26:
|
|
8
|
-
* - `"soft"
|
|
8
|
+
* - `"soft"` (the default of a bottom bar): at the top, the canvas color covers the content under the bar's controls and fades out past them, over a
|
|
9
|
+
* light blur; at the bottom of a page the content stays clear under and around the controls, as on native iOS 26,
|
|
10
|
+
* and a Sheet's bottom bar fades its content into the panel
|
|
9
11
|
* - `"hard"`: an opaque bar of the canvas color with a line once content is under it
|
|
10
|
-
* - `"glass"
|
|
12
|
+
* - `"glass"` (the default of a top bar): a translucent, blurred bar with a hairline, shown once content is under it
|
|
11
13
|
* - `"solid"`: an opaque bar of the canvas color without a line
|
|
12
14
|
*/
|
|
13
15
|
export type BarBackground = "soft" | "hard" | "glass" | "solid";
|
|
@@ -35,7 +37,7 @@ export type ToolbarProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
35
37
|
titleStyle?: ToolbarTitleStyle;
|
|
36
38
|
/** Alignment of an inline title. Compact and large titles always start at the leading edge. @default "center" */
|
|
37
39
|
titleAlign?: ToolbarTitleAlign;
|
|
38
|
-
/** How the bar meets the content scrolled under it on a phone. @default "soft" */
|
|
40
|
+
/** How the bar meets the content scrolled under it on a phone. @default "glass" at the top, "soft" at the bottom */
|
|
39
41
|
background?: ToolbarBackground;
|
|
40
42
|
ref?: Ref<HTMLDivElement>;
|
|
41
43
|
};
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Escape closes the most recently registered listener first, so nested overlays close one at a time. The callback
|
|
3
|
+
* gets the key event, already prevented.
|
|
4
|
+
*/
|
|
5
|
+
export declare const useEscCloseStack: (listening: boolean, cb: (event: KeyboardEvent) => void) => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { type RefObject } from "react";
|
|
2
2
|
import { type MenuFloatingBoundary, type PhoneSubmenuState } from "../lib/menuSubmenuPlacement.js";
|
|
3
|
-
|
|
3
|
+
/** `onParentPress` collapses the submenu when a press lands on the parent it stands over. */
|
|
4
|
+
export declare function usePhoneSubmenu(active: boolean, trigger: RefObject<HTMLElement | null>, content: HTMLElement | null, boundary: MenuFloatingBoundary, onParentPress?: () => void): PhoneSubmenuState;
|
|
@@ -26,6 +26,12 @@ export declare const toFilterProperty: ({ blur }?: {
|
|
|
26
26
|
export declare const dataAttributes: (props: Record<string, unknown>) => {
|
|
27
27
|
[k: string]: unknown;
|
|
28
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* A copy of a key event that a handler can cancel. An event that reaches the Escape stack is already prevented, so
|
|
31
|
+
* its own `defaultPrevented` cannot tell whether an owner's handler asked to keep the overlay open. The copy keeps
|
|
32
|
+
* the key, the modifiers and the target.
|
|
33
|
+
*/
|
|
34
|
+
export declare const cancelableKeyCopy: (event: KeyboardEvent) => KeyboardEvent;
|
|
29
35
|
export declare const preventDefaultHandler: (evt: Event) => void;
|
|
30
36
|
/**
|
|
31
37
|
* For an overlay's close auto focus: focus that moved on to something else
|
|
@@ -50,8 +50,15 @@ export declare function readMenuBoundaryRect(document: Document, boundary: MenuF
|
|
|
50
50
|
export declare function readMenuTriggerLabel(trigger: HTMLElement): string;
|
|
51
51
|
export declare function focusPhoneSubmenuEntry(content: HTMLElement): void;
|
|
52
52
|
export declare function samePhoneSubmenuState(a: PhoneSubmenuState, b: PhoneSubmenuState): boolean;
|
|
53
|
-
/**
|
|
54
|
-
|
|
53
|
+
/**
|
|
54
|
+
* Own only these Phone attributes/variables. Primitive focus and dismissal stay intact.
|
|
55
|
+
*
|
|
56
|
+
* While a phone submenu stands over its parent the parent is behind it, as in iOS 26 (owner, plan 176): a press on it
|
|
57
|
+
* collapses the submenu (`onParentPress`) and chooses none of its rows, which take no presses (Menu.module.css), and
|
|
58
|
+
* it is hidden from a screen reader. Focus left in it by the press that opened the submenu moves into the submenu, as
|
|
59
|
+
* VoiceOver's moves into an iOS submenu, and a focus that returns to it (the submenu collapsing) shows it again.
|
|
60
|
+
*/
|
|
61
|
+
export declare function observePhoneSubmenu(trigger: HTMLElement, content: HTMLElement, boundary: MenuFloatingBoundary, update: (state: PhoneSubmenuState) => void, onParentPress?: () => void): {
|
|
55
62
|
refresh: () => void;
|
|
56
63
|
dispose: () => void;
|
|
57
64
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The phone layout outside a narrow window (plan 176). The style sheets apply their phone rules (767px and below)
|
|
3
|
+
* inside an element marked `data-plex-layout="phone"` too, at any window width: PhoneLayout marks one, and so does a
|
|
4
|
+
* Dialog with `layout="phone"`. Scripts that change what they do on a phone ask the same question here.
|
|
5
|
+
*/
|
|
6
|
+
export declare const PHONE_LAYOUT_SCOPE = "[data-plex-layout=\"phone\"]";
|
|
7
|
+
export declare const PHONE_MEDIA = "(max-width: 767px)";
|
|
8
|
+
/** The window is 767px wide or narrower. */
|
|
9
|
+
export declare const isPhoneWindow: (view: Window | null | undefined) => boolean;
|
|
10
|
+
/** The element is laid out as on a phone: inside a phone layout, or in a window 767px wide or narrower. */
|
|
11
|
+
export declare const isPhoneLayout: (element: Element) => boolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The toast region is a layer of its own above any overlay: a press, focus or Escape inside a toast belongs to the
|
|
3
|
+
* toast, never to a Dialog, Popover or Menu under it. Every toast list carries `data-sonner-toaster`.
|
|
4
|
+
*/
|
|
5
|
+
export declare const inToastRegion: (target: EventTarget | null | undefined) => boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plexui/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.0",
|
|
4
4
|
"description": "Modern design system for building high-quality applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"@maskito/core": "^5.2.2",
|
|
100
100
|
"@maskito/kit": "^5.2.2",
|
|
101
101
|
"@maskito/react": "^5.2.2",
|
|
102
|
-
"@plexui/styles": "^0.1.
|
|
102
|
+
"@plexui/styles": "^0.1.36",
|
|
103
103
|
"@radix-ui/react-dismissable-layer": "1.2.1",
|
|
104
104
|
"@radix-ui/react-focus-guards": "1.2.0",
|
|
105
105
|
"@radix-ui/react-focus-scope": "1.3.1",
|