@vokril/ui-solid 0.5.0 → 0.7.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 +48 -0
- package/README.md +1 -1
- package/dist/{AttributeGrid-BUyv-hUX.js → AttributeGrid-CX_GJHgz.js} +2 -2
- package/dist/{AttributeGrid-Tk8KJx8e.cjs → AttributeGrid-X7fHuuIb.cjs} +1 -1
- package/dist/CommandPalette-C8JJMY79.cjs +2 -0
- package/dist/CommandPalette-Ds3xf2z7.js +3921 -0
- package/dist/{DateRangePicker-jnZfDhQA.js → DateRangePicker-BSb6F_gs.js} +3 -3
- package/dist/{DateRangePicker-CHrwr34H.cjs → DateRangePicker-DUrJJjO7.cjs} +1 -1
- package/dist/{GuidedTour-DHgMaTVv.js → GuidedTour-C0Q_EEvI.js} +3 -3
- package/dist/{GuidedTour-B-67TJlO.cjs → GuidedTour-CkGOxh2p.cjs} +1 -1
- package/dist/{IconPicker-C_gAGvo0.cjs → IconPicker-D2dZK0n3.cjs} +1 -1
- package/dist/{IconPicker-BxofGXCS.js → IconPicker-Fd2IE2Dm.js} +2 -2
- package/dist/Input-BEnk4FCF.cjs +1 -0
- package/dist/Input-PZ5wRvPx.js +227 -0
- package/dist/{Modal-BmtEt5Yo.js → Modal-CsiV55WW.js} +1 -1
- package/dist/{Modal-BSSY6C3D.cjs → Modal-DpDHzCWT.cjs} +1 -1
- package/dist/{Popover-Cg8LZCYo.js → Popover-C3dFuObM.js} +49 -45
- package/dist/Popover-Dbi7L860.cjs +1 -0
- package/dist/{SearchableSelect-ByCRBEZI.js → SearchableSelect-C6KL7e42.js} +2 -2
- package/dist/{SearchableSelect-9pgcO5JS.cjs → SearchableSelect-zT8XNpmt.cjs} +1 -1
- package/dist/{StatusBarNotificationBell-Czirj1Df.js → StatusBarNotificationBell-BMmjdBvj.js} +5 -5
- package/dist/{StatusBarNotificationBell-DpTaPcoW.cjs → StatusBarNotificationBell-C8nQZh4i.cjs} +1 -1
- package/dist/{Stepper-CrTxBpDL.js → Stepper-B26aF0bA.js} +1 -1
- package/dist/{Stepper-C3dnwwiV.cjs → Stepper-Bl8P6HJx.cjs} +1 -1
- package/dist/Textarea-BUxibzkR.js +42 -0
- package/dist/Textarea-BunKEY68.cjs +1 -0
- package/dist/{ToggleButton-CFvMUndy.cjs → ToggleButton-DuKoI5PE.cjs} +1 -1
- package/dist/{ToggleButton-DBWFnm_R.js → ToggleButton-DwvUV2en.js} +6 -6
- package/dist/base.css +0 -1
- package/dist/{createResizableSidebar-uf_OJsjO.js → createResizableSidebar-B22SKv9b.js} +1 -1
- package/dist/{createResizableSidebar-DVATOkMf.cjs → createResizableSidebar-C3I0HSwo.cjs} +1 -1
- package/dist/desktop/index.cjs +1 -1
- package/dist/desktop/index.js +2 -2
- package/dist/{dialogFocusRestore-DKxaV82N.js → dialogFocusRestore-B4ggeVAM.js} +1 -1
- package/dist/{dialogFocusRestore-BAF8QM6v.cjs → dialogFocusRestore-BcMPrbig.cjs} +1 -1
- package/dist/format-Dih0q9gm.cjs +1 -0
- package/dist/{format-Dd946oS-.js → format-UGlMj0HW.js} +91 -88
- package/dist/forms/formFieldContext.d.cts +15 -0
- package/dist/forms/formFieldContext.d.ts +15 -0
- package/dist/forms/index.cjs +1 -1
- package/dist/forms/index.js +41 -40
- package/dist/grid/index.cjs +1 -1
- package/dist/grid/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +394 -384
- package/dist/layout/index.cjs +1 -1
- package/dist/layout/index.js +2 -2
- package/dist/navigation/index.cjs +1 -1
- package/dist/navigation/index.js +1 -1
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.js +2 -2
- package/dist/overlay/DropdownMenu.d.cts +15 -1
- package/dist/overlay/DropdownMenu.d.ts +15 -1
- package/dist/overlay/index.cjs +1 -1
- package/dist/overlay/index.d.cts +1 -0
- package/dist/overlay/index.d.ts +1 -0
- package/dist/overlay/index.js +131 -122
- package/dist/overlay/menu/MenuParts.d.cts +121 -0
- package/dist/overlay/menu/MenuParts.d.ts +121 -0
- package/dist/overlay/menu/index.d.cts +2 -0
- package/dist/overlay/menu/index.d.ts +2 -0
- package/dist/overlay/menu/menuSurfaceClasses.d.cts +28 -0
- package/dist/overlay/menu/menuSurfaceClasses.d.ts +28 -0
- package/dist/overlay/overlayStack.d.cts +6 -0
- package/dist/overlay/overlayStack.d.ts +6 -0
- package/dist/overlay/popover/PopoverPanel.d.cts +103 -0
- package/dist/overlay/popover/PopoverPanel.d.ts +103 -0
- package/dist/overlay/popover/index.d.cts +2 -0
- package/dist/overlay/popover/index.d.ts +2 -0
- package/dist/overlay/popover/popoverFocusNavigation.d.cts +6 -2
- package/dist/overlay/popover/popoverFocusNavigation.d.ts +6 -2
- package/dist/overlay-stack/index.cjs +1 -1
- package/dist/overlay-stack/index.js +1 -1
- package/dist/overlayStack-DvGdPMdq.js +203 -0
- package/dist/overlayStack-DvKYN7SD.cjs +1 -0
- package/dist/server/{AttributeGrid-D6b2qQS9.js → AttributeGrid-BkWsx39p.js} +2 -2
- package/dist/server/{AttributeGrid-CSidAjfz.cjs → AttributeGrid-PHZKkiBG.cjs} +1 -1
- package/dist/server/CommandPalette-Bfm1R0KC.js +3181 -0
- package/dist/server/CommandPalette-DIgBGmAh.cjs +1 -0
- package/dist/server/{DateRangePicker-BK2Ul2uy.js → DateRangePicker-BOsd_ZH2.js} +3 -3
- package/dist/server/{DateRangePicker-s-I_rNUK.cjs → DateRangePicker-CIKghxMx.cjs} +1 -1
- package/dist/server/{GuidedTour-zesfTSmE.cjs → GuidedTour-B4IK-M3E.cjs} +1 -1
- package/dist/server/{GuidedTour-BvDY-xaZ.js → GuidedTour-BVaym9s9.js} +4 -4
- package/dist/server/{IconPicker-Bw8tZjCl.cjs → IconPicker-Bat7VYeo.cjs} +1 -1
- package/dist/server/{IconPicker-BCUZcq-i.js → IconPicker-Dw4tbosO.js} +2 -2
- package/dist/server/Input-CjvD8w18.cjs +1 -0
- package/dist/server/Input-DaEN2JJd.js +127 -0
- package/dist/server/{Modal-CM54uXRu.js → Modal-Jf89av-C.js} +2 -2
- package/dist/server/{Modal-R86Fb2mX.cjs → Modal-W2cb3Xrx.cjs} +1 -1
- package/dist/server/{Popover-CTnX42Jq.js → Popover-BRU2E-ek.js} +17 -13
- package/dist/server/Popover-C2VwtQyu.cjs +1 -0
- package/dist/server/{SearchableSelect-Cog_rb31.js → SearchableSelect-0dP7bp0a.js} +2 -2
- package/dist/server/{SearchableSelect-fofn1Bjg.cjs → SearchableSelect-nMecJAYS.cjs} +1 -1
- package/dist/server/{StatusBarNotificationBell-Mh81s2kG.js → StatusBarNotificationBell-DLrvONW3.js} +5 -5
- package/dist/server/{StatusBarNotificationBell-COaYD8sz.cjs → StatusBarNotificationBell-DufUCZwN.cjs} +1 -1
- package/dist/server/{Stepper-BdOBuNco.js → Stepper-CJIoTXSv.js} +1 -1
- package/dist/server/{Stepper-DqwKOszc.cjs → Stepper-RFkjF_fm.cjs} +1 -1
- package/dist/server/Textarea-BQf2lL59.cjs +1 -0
- package/dist/server/Textarea-BTH48NET.js +37 -0
- package/dist/server/{ToggleButton-B0YuAGY4.js → ToggleButton-BAhucFQT.js} +6 -6
- package/dist/server/{ToggleButton-CbX1kbpI.cjs → ToggleButton-D9IXRIdl.cjs} +1 -1
- package/dist/server/{createResizableSidebar-D28fY_SX.cjs → createResizableSidebar-BymQA2Fs.cjs} +1 -1
- package/dist/server/{createResizableSidebar-BfTFOM7v.js → createResizableSidebar-IcXBM-BE.js} +1 -1
- package/dist/server/desktop/index.cjs +1 -1
- package/dist/server/desktop/index.js +2 -2
- package/dist/server/{dialogFocusRestore-DKxaV82N.js → dialogFocusRestore-B4ggeVAM.js} +1 -1
- package/dist/server/{dialogFocusRestore-BAF8QM6v.cjs → dialogFocusRestore-BcMPrbig.cjs} +1 -1
- package/dist/server/format-CW_FVfq2.js +385 -0
- package/dist/server/format-x-8syaS2.cjs +1 -0
- package/dist/server/forms/index.cjs +1 -1
- package/dist/server/forms/index.js +41 -40
- package/dist/server/grid/index.cjs +1 -1
- package/dist/server/grid/index.js +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +722 -712
- package/dist/server/layout/index.cjs +1 -1
- package/dist/server/layout/index.js +2 -2
- package/dist/server/navigation/index.cjs +1 -1
- package/dist/server/navigation/index.js +1 -1
- package/dist/server/notifications/index.cjs +1 -1
- package/dist/server/notifications/index.js +2 -2
- package/dist/server/overlay/index.cjs +1 -1
- package/dist/server/overlay/index.js +130 -121
- package/dist/server/overlay-stack/index.cjs +1 -1
- package/dist/server/overlay-stack/index.js +1 -1
- package/dist/server/overlayStack-DvGdPMdq.js +203 -0
- package/dist/server/overlayStack-DvKYN7SD.cjs +1 -0
- package/dist/server/{useFloatingDropdown-HD3G-ECb.js → useFloatingDropdown-BN4J092P.js} +1 -1
- package/dist/server/{useFloatingDropdown-vYQiMh6N.cjs → useFloatingDropdown-D9OvEFAp.cjs} +1 -1
- package/dist/solid/forms/Checkbox.jsx +5 -2
- package/dist/solid/forms/Input.jsx +5 -2
- package/dist/solid/forms/Textarea.jsx +5 -2
- package/dist/solid/forms/formFieldContext.js +7 -0
- package/dist/solid/overlay/DropdownMenu.jsx +48 -26
- package/dist/solid/overlay/DropdownMenu.module.css.js +1 -7
- package/dist/solid/overlay/index.js +1 -0
- package/dist/solid/overlay/menu/MenuParts.jsx +140 -0
- package/dist/solid/overlay/menu/MenuParts.module.css.js +34 -0
- package/dist/solid/overlay/menu/index.js +2 -0
- package/dist/solid/overlay/menu/menuSurfaceClasses.js +16 -0
- package/dist/solid/overlay/overlayStack.js +10 -3
- package/dist/solid/overlay/popover/Popover.jsx +1 -1
- package/dist/solid/overlay/popover/PopoverPanel.jsx +95 -0
- package/dist/solid/overlay/popover/PopoverPanel.module.css.js +22 -0
- package/dist/solid/overlay/popover/index.js +1 -0
- package/dist/solid/overlay/popover/popoverFocusNavigation.js +7 -1
- package/dist/solid/styles/menuSurface.module.css.js +17 -0
- package/dist/style.css +2 -2
- package/dist/theme.css +1 -1
- package/dist/tokens/tokens.css +1 -1
- package/dist/ui.css +1 -1
- package/dist/{useFloatingDropdown-CaQNfmfZ.js → useFloatingDropdown-CfPEYRut.js} +1 -1
- package/dist/{useFloatingDropdown-BKckfuUv.cjs → useFloatingDropdown-DcU7ozDg.cjs} +1 -1
- package/package.json +1 -1
- package/dist/CommandPalette-CIAqAbBE.cjs +0 -2
- package/dist/CommandPalette-l_vmlEnR.js +0 -3371
- package/dist/Input-BqiQPUxA.js +0 -215
- package/dist/Input-BrxV_Xcb.cjs +0 -1
- package/dist/Popover-B8ozGuDX.cjs +0 -1
- package/dist/Textarea-CXFZz3Oe.js +0 -36
- package/dist/Textarea-vl5fZzJa.cjs +0 -1
- package/dist/format-aHRZi12I.cjs +0 -1
- package/dist/overlayStack-BZR1emYS.cjs +0 -1
- package/dist/overlayStack-ND6EQZlX.js +0 -196
- package/dist/server/CommandPalette-9dL9DSG8.js +0 -2704
- package/dist/server/CommandPalette-Q296oZjU.cjs +0 -1
- package/dist/server/Input-Cxwc5CK4.js +0 -115
- package/dist/server/Input-k-IAQ5Wp.cjs +0 -1
- package/dist/server/Popover-BkZ9n6TA.cjs +0 -1
- package/dist/server/Textarea-DAoq3wWf.cjs +0 -1
- package/dist/server/Textarea-D_1mHXTj.js +0 -31
- package/dist/server/format-BWHKiXRe.cjs +0 -1
- package/dist/server/format-BubrMUMq.js +0 -382
- package/dist/server/overlayStack-BZR1emYS.cjs +0 -1
- package/dist/server/overlayStack-ND6EQZlX.js +0 -196
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { type JSX } from 'solid-js';
|
|
2
|
+
export interface MenuListProps {
|
|
3
|
+
children: JSX.Element;
|
|
4
|
+
/** `menu` inside a menu Popover, `listbox` for a list of options; omit inside a dialog panel. */
|
|
5
|
+
role?: 'menu' | 'listbox' | 'group' | undefined;
|
|
6
|
+
ariaLabel?: string | undefined;
|
|
7
|
+
class?: string | undefined;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The scrolling column of a menu or a menu-like panel. Put it inside a `Popover`, which draws
|
|
11
|
+
* the surface; the list itself paints nothing.
|
|
12
|
+
*/
|
|
13
|
+
export declare function MenuList(props: MenuListProps): JSX.Element;
|
|
14
|
+
export interface MenuSectionProps {
|
|
15
|
+
/** The heading, shown in small capitals above the section's rows. */
|
|
16
|
+
label: JSX.Element;
|
|
17
|
+
/** Content on the right of the heading: a "Show all" link, a clear or refresh button. */
|
|
18
|
+
aside?: JSX.Element | undefined;
|
|
19
|
+
children?: JSX.Element | undefined;
|
|
20
|
+
class?: string | undefined;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A titled group of rows. The rows are announced as a group named by the heading, so a screen
|
|
24
|
+
* reader says "Open tabs, group" before the first row.
|
|
25
|
+
*/
|
|
26
|
+
export declare function MenuSection(props: MenuSectionProps): JSX.Element;
|
|
27
|
+
export type MenuItemRole = 'menuitem' | 'menuitemcheckbox' | 'menuitemradio' | 'option' | 'button';
|
|
28
|
+
export interface MenuItemProps {
|
|
29
|
+
label: JSX.Element;
|
|
30
|
+
/** Second, muted line under the label: a host, a date, a status. */
|
|
31
|
+
description?: JSX.Element | undefined;
|
|
32
|
+
/** Leading icon. */
|
|
33
|
+
icon?: JSX.Element | undefined;
|
|
34
|
+
/** Keep the icon column on a row without an icon, so labels line up with rows that have one. */
|
|
35
|
+
reserveIcon?: boolean | undefined;
|
|
36
|
+
/** Shown right after the label (a "Tunnel" or "in use" chip). */
|
|
37
|
+
badge?: JSX.Element | undefined;
|
|
38
|
+
/** Muted text on the right: a shortcut, "Default", a duration. */
|
|
39
|
+
meta?: JSX.Element | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Controls on the right of the row (close, delete, pause). They stay inside the row's hover
|
|
42
|
+
* tint but are their own click targets: a click on them does not select the row. Meant for
|
|
43
|
+
* `menuitem` rows in a menu, where they sit inside the row, and `button` rows in a dialog
|
|
44
|
+
* panel, where they sit next to the row's button (a button presents its children as plain
|
|
45
|
+
* content). A listbox or a checkable menu row cannot own other controls.
|
|
46
|
+
*/
|
|
47
|
+
trailing?: JSX.Element | undefined;
|
|
48
|
+
/** A checkable row: shows the check column and announces the state. */
|
|
49
|
+
checked?: boolean | undefined;
|
|
50
|
+
/** Keep the check column on a row that is not checkable, so labels line up. */
|
|
51
|
+
reserveCheck?: boolean | undefined;
|
|
52
|
+
/** The current value or the open item. */
|
|
53
|
+
selected?: boolean | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* A toggle row in a dialog panel ("Show favorites only"): with the `button` role it is
|
|
56
|
+
* announced as pressed or not, and a pressed row carries the selected tint.
|
|
57
|
+
*/
|
|
58
|
+
pressed?: boolean | undefined;
|
|
59
|
+
/** The keyboard cursor of a list that keeps focus elsewhere (`aria-activedescendant`). */
|
|
60
|
+
active?: boolean | undefined;
|
|
61
|
+
danger?: boolean | undefined;
|
|
62
|
+
disabled?: boolean | undefined;
|
|
63
|
+
/** Why the row is disabled; read to screen readers and shown as a tooltip. */
|
|
64
|
+
hint?: string | undefined;
|
|
65
|
+
/** Tooltip for the label, e.g. the full text of a truncated name. */
|
|
66
|
+
title?: string | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Defaults to `menuitemcheckbox` when `checked` is set, `menuitem` otherwise. Use `option`
|
|
69
|
+
* inside a listbox and `button` inside a dialog panel.
|
|
70
|
+
*/
|
|
71
|
+
role?: MenuItemRole | undefined;
|
|
72
|
+
id?: string | undefined;
|
|
73
|
+
/** Gets the click, e.g. to open a menu at its position. */
|
|
74
|
+
onSelect?: ((event: MouseEvent) => void) | undefined;
|
|
75
|
+
onContextMenu?: ((event: MouseEvent) => void) | undefined;
|
|
76
|
+
ref?: ((el: HTMLElement) => void) | undefined;
|
|
77
|
+
class?: string | undefined;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* One row of a menu or a menu-like panel: optional check and icon columns, a label with an
|
|
81
|
+
* optional badge and description line, muted meta text and trailing controls on the right.
|
|
82
|
+
*/
|
|
83
|
+
export declare function MenuItem(props: MenuItemProps): JSX.Element;
|
|
84
|
+
/** A divider between groups of rows. */
|
|
85
|
+
export declare function MenuSeparator(props: {
|
|
86
|
+
class?: string | undefined;
|
|
87
|
+
}): JSX.Element;
|
|
88
|
+
/** The row shown when a list has nothing to show, or while it loads. */
|
|
89
|
+
export declare function MenuEmpty(props: {
|
|
90
|
+
children: JSX.Element;
|
|
91
|
+
class?: string | undefined;
|
|
92
|
+
}): JSX.Element;
|
|
93
|
+
/** A filter field above a list; pass the input (and any count or action next to it). */
|
|
94
|
+
export declare function MenuSearch(props: {
|
|
95
|
+
children: JSX.Element;
|
|
96
|
+
class?: string | undefined;
|
|
97
|
+
}): JSX.Element;
|
|
98
|
+
export interface MenuDisclosureProps {
|
|
99
|
+
label: JSX.Element;
|
|
100
|
+
icon?: JSX.Element | undefined;
|
|
101
|
+
/** Keep the icon column on a row without an icon, so labels line up with rows that have one. */
|
|
102
|
+
reserveIcon?: boolean | undefined;
|
|
103
|
+
description?: JSX.Element | undefined;
|
|
104
|
+
/** Controlled open state; pass with `onToggle`. Omit for self-managed. */
|
|
105
|
+
open?: boolean | undefined;
|
|
106
|
+
onToggle?: ((open: boolean) => void) | undefined;
|
|
107
|
+
/** Initial state when uncontrolled (default closed). */
|
|
108
|
+
defaultOpen?: boolean | undefined;
|
|
109
|
+
disabled?: boolean | undefined;
|
|
110
|
+
/** The rows or form controls revealed under the row. */
|
|
111
|
+
children: JSX.Element;
|
|
112
|
+
class?: string | undefined;
|
|
113
|
+
bodyClass?: string | undefined;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* A row that opens its content in place, under itself, instead of in a side submenu: the panel
|
|
117
|
+
* grows downward and the content can hold form controls (a checkbox, a number field) that a
|
|
118
|
+
* submenu cannot. Use it in a panel with the `dialog` role; a `menu` may only contain menu
|
|
119
|
+
* items, and a side submenu belongs to the context menu.
|
|
120
|
+
*/
|
|
121
|
+
export declare function MenuDisclosure(props: MenuDisclosureProps): JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The class names of the shared floating-surface vocabulary, for a host whose row does not fit
|
|
3
|
+
* {@link MenuItem} (a draggable row, a row with its own grid). A host stylesheet cannot
|
|
4
|
+
* `composes` from the package, so it puts these classes on its own elements next to its own
|
|
5
|
+
* class; the vocabulary sits in a lower cascade layer, so the host class wins where both set a
|
|
6
|
+
* property.
|
|
7
|
+
*/
|
|
8
|
+
export interface MenuSurfaceClasses {
|
|
9
|
+
/** The floating panel: border, background, radius, shadow and menu font size. */
|
|
10
|
+
readonly surface: string;
|
|
11
|
+
/** The padded column of rows inside a surface. */
|
|
12
|
+
readonly viewport: string;
|
|
13
|
+
readonly item: string;
|
|
14
|
+
/** The keyboard cursor of a list that keeps focus elsewhere. */
|
|
15
|
+
readonly itemActive: string;
|
|
16
|
+
/** The current value. */
|
|
17
|
+
readonly itemSelected: string;
|
|
18
|
+
/** A disabled look on a row that stays focusable. */
|
|
19
|
+
readonly itemDisabled: string;
|
|
20
|
+
readonly label: string;
|
|
21
|
+
readonly itemIcon: string;
|
|
22
|
+
readonly check: string;
|
|
23
|
+
readonly shortcut: string;
|
|
24
|
+
readonly chevron: string;
|
|
25
|
+
readonly separator: string;
|
|
26
|
+
readonly empty: string;
|
|
27
|
+
}
|
|
28
|
+
export declare const menuSurfaceClasses: MenuSurfaceClasses;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The class names of the shared floating-surface vocabulary, for a host whose row does not fit
|
|
3
|
+
* {@link MenuItem} (a draggable row, a row with its own grid). A host stylesheet cannot
|
|
4
|
+
* `composes` from the package, so it puts these classes on its own elements next to its own
|
|
5
|
+
* class; the vocabulary sits in a lower cascade layer, so the host class wins where both set a
|
|
6
|
+
* property.
|
|
7
|
+
*/
|
|
8
|
+
export interface MenuSurfaceClasses {
|
|
9
|
+
/** The floating panel: border, background, radius, shadow and menu font size. */
|
|
10
|
+
readonly surface: string;
|
|
11
|
+
/** The padded column of rows inside a surface. */
|
|
12
|
+
readonly viewport: string;
|
|
13
|
+
readonly item: string;
|
|
14
|
+
/** The keyboard cursor of a list that keeps focus elsewhere. */
|
|
15
|
+
readonly itemActive: string;
|
|
16
|
+
/** The current value. */
|
|
17
|
+
readonly itemSelected: string;
|
|
18
|
+
/** A disabled look on a row that stays focusable. */
|
|
19
|
+
readonly itemDisabled: string;
|
|
20
|
+
readonly label: string;
|
|
21
|
+
readonly itemIcon: string;
|
|
22
|
+
readonly check: string;
|
|
23
|
+
readonly shortcut: string;
|
|
24
|
+
readonly chevron: string;
|
|
25
|
+
readonly separator: string;
|
|
26
|
+
readonly empty: string;
|
|
27
|
+
}
|
|
28
|
+
export declare const menuSurfaceClasses: MenuSurfaceClasses;
|
|
@@ -31,6 +31,12 @@ export interface OverlayLayer {
|
|
|
31
31
|
* not take the event and does not stop propagation either — the event should reach its owner.
|
|
32
32
|
*/
|
|
33
33
|
readonly isTopmost: () => boolean;
|
|
34
|
+
/**
|
|
35
|
+
* {@link isTopmost} for a pointer press: tooltips do not count. A tooltip is in the order so
|
|
36
|
+
* that Escape closes it first, but it never takes a click, so a click outside belongs to the
|
|
37
|
+
* layer under it.
|
|
38
|
+
*/
|
|
39
|
+
readonly isTopmostForPointer: () => boolean;
|
|
34
40
|
}
|
|
35
41
|
export interface OverlayPlacement {
|
|
36
42
|
readonly type: OverlayType;
|
|
@@ -31,6 +31,12 @@ export interface OverlayLayer {
|
|
|
31
31
|
* not take the event and does not stop propagation either — the event should reach its owner.
|
|
32
32
|
*/
|
|
33
33
|
readonly isTopmost: () => boolean;
|
|
34
|
+
/**
|
|
35
|
+
* {@link isTopmost} for a pointer press: tooltips do not count. A tooltip is in the order so
|
|
36
|
+
* that Escape closes it first, but it never takes a click, so a click outside belongs to the
|
|
37
|
+
* layer under it.
|
|
38
|
+
*/
|
|
39
|
+
readonly isTopmostForPointer: () => boolean;
|
|
34
40
|
}
|
|
35
41
|
export interface OverlayPlacement {
|
|
36
42
|
readonly type: OverlayType;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { type JSX } from 'solid-js';
|
|
2
|
+
import { type PanelRootProps } from '../Panel.cjs';
|
|
3
|
+
export type PopoverPanelRootProps = Omit<PanelRootProps, 'as'>;
|
|
4
|
+
/**
|
|
5
|
+
* The column of a form panel inside a `Popover` (site details, a bookmark editor, an account
|
|
6
|
+
* card): header, scrolling body and footer. It gives the panel the one shared width,
|
|
7
|
+
* `--popover-panel-width`, so every form panel opens at the same size. The `Popover` keeps
|
|
8
|
+
* drawing the surface; leave its `scrollable` off, `PopoverPanel.Body` scrolls on its own and
|
|
9
|
+
* the header and footer stay in place.
|
|
10
|
+
*/
|
|
11
|
+
declare function PopoverPanelRoot(props: PopoverPanelRootProps): JSX.Element;
|
|
12
|
+
export interface PopoverPanelHeaderProps {
|
|
13
|
+
/** The panel's title, a heading. Pre-translated by the caller. */
|
|
14
|
+
title: JSX.Element;
|
|
15
|
+
/** Shows a close button at the end of the header. */
|
|
16
|
+
onClose?: (() => void) | undefined;
|
|
17
|
+
/** The close button's accessible name. Default: the translated "Close". */
|
|
18
|
+
closeLabel?: string | undefined;
|
|
19
|
+
/** Controls before the close button: a refresh button, a status. */
|
|
20
|
+
actions?: JSX.Element | undefined;
|
|
21
|
+
class?: string | undefined;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The title row: a heading on the left, actions and a close button on the right. The title is an
|
|
25
|
+
* `h3`, the dialog title level used across the package; section headings under it are `h4`.
|
|
26
|
+
*/
|
|
27
|
+
declare function PopoverPanelHeader(props: PopoverPanelHeaderProps): JSX.Element;
|
|
28
|
+
export interface PopoverPanelBodyProps {
|
|
29
|
+
children: JSX.Element;
|
|
30
|
+
/** Class on the scrolling column that holds the content. */
|
|
31
|
+
class?: string | undefined;
|
|
32
|
+
}
|
|
33
|
+
/** The panel's content: a column that scrolls when the popover reaches the window's height. */
|
|
34
|
+
declare function PopoverPanelBody(props: PopoverPanelBodyProps): JSX.Element;
|
|
35
|
+
export interface PopoverPanelSectionProps {
|
|
36
|
+
/** The section's heading, shown in small capitals like a menu section. */
|
|
37
|
+
title: JSX.Element;
|
|
38
|
+
/** Content on the right of the heading: a reset or a "Show all" button. */
|
|
39
|
+
aside?: JSX.Element | undefined;
|
|
40
|
+
children: JSX.Element;
|
|
41
|
+
class?: string | undefined;
|
|
42
|
+
}
|
|
43
|
+
/** A titled group of fields. The `section` element is named by its heading. */
|
|
44
|
+
declare function PopoverPanelSection(props: PopoverPanelSectionProps): JSX.Element;
|
|
45
|
+
export interface PopoverPanelFieldProps {
|
|
46
|
+
/** The setting's name, on the left. */
|
|
47
|
+
label: JSX.Element;
|
|
48
|
+
/** A muted line under the label. */
|
|
49
|
+
description?: JSX.Element | undefined;
|
|
50
|
+
/** The control on the right: a `Toggle`, a `SearchableSelect`, a `NumberInput`, a value. */
|
|
51
|
+
children: JSX.Element;
|
|
52
|
+
class?: string | undefined;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* A setting row: label on the left, control on the right. The package's controls take their
|
|
56
|
+
* accessible name from the label and their description from the muted line, as inside a
|
|
57
|
+
* `FormField`, so the control needs no `ariaLabel` of its own. The label is not a `<label>`
|
|
58
|
+
* element (a `Toggle` or `Checkbox` already is one), so native inputs are pointed at it.
|
|
59
|
+
*/
|
|
60
|
+
declare function PopoverPanelField(props: PopoverPanelFieldProps): JSX.Element;
|
|
61
|
+
export interface PopoverPanelSeparatorProps {
|
|
62
|
+
class?: string | undefined;
|
|
63
|
+
}
|
|
64
|
+
/** A rule between two parts of the panel, the same line a menu draws between its groups. */
|
|
65
|
+
declare function PopoverPanelSeparator(props: PopoverPanelSeparatorProps): JSX.Element;
|
|
66
|
+
export interface PopoverPanelFooterProps {
|
|
67
|
+
children: JSX.Element;
|
|
68
|
+
/** `end` (default) for dialog buttons, `between` for a secondary action on the left, `stretch` for stacked full-width actions. */
|
|
69
|
+
align?: 'end' | 'between' | 'stretch' | undefined;
|
|
70
|
+
class?: string | undefined;
|
|
71
|
+
}
|
|
72
|
+
/** The actions under the body, divided from it by a rule. Stays in place while the body scrolls. */
|
|
73
|
+
declare function PopoverPanelFooter(props: PopoverPanelFooterProps): JSX.Element;
|
|
74
|
+
/**
|
|
75
|
+
* Form panel parts for a `Popover`, built on `Panel`:
|
|
76
|
+
* `PopoverPanel.Root / .Header / .Body / .Section / .Field / .Separator / .Footer`.
|
|
77
|
+
*
|
|
78
|
+
* ```tsx
|
|
79
|
+
* <Popover open={open} anchor={() => anchor} onClose={close} ariaLabel="Site information">
|
|
80
|
+
* <PopoverPanel.Root>
|
|
81
|
+
* <PopoverPanel.Header title="example.com" onClose={close} />
|
|
82
|
+
* <PopoverPanel.Body>
|
|
83
|
+
* <PopoverPanel.Section title="Permissions">
|
|
84
|
+
* <PopoverPanel.Field label="Camera"><SearchableSelect … /></PopoverPanel.Field>
|
|
85
|
+
* </PopoverPanel.Section>
|
|
86
|
+
* </PopoverPanel.Body>
|
|
87
|
+
* <PopoverPanel.Footer><Button>Settings</Button></PopoverPanel.Footer>
|
|
88
|
+
* </PopoverPanel.Root>
|
|
89
|
+
* </Popover>
|
|
90
|
+
* ```
|
|
91
|
+
*
|
|
92
|
+
* A panel with form controls keeps the Popover's default `dialog` role; menus use the menu parts.
|
|
93
|
+
*/
|
|
94
|
+
export declare const PopoverPanel: {
|
|
95
|
+
Root: typeof PopoverPanelRoot;
|
|
96
|
+
Header: typeof PopoverPanelHeader;
|
|
97
|
+
Body: typeof PopoverPanelBody;
|
|
98
|
+
Section: typeof PopoverPanelSection;
|
|
99
|
+
Field: typeof PopoverPanelField;
|
|
100
|
+
Separator: typeof PopoverPanelSeparator;
|
|
101
|
+
Footer: typeof PopoverPanelFooter;
|
|
102
|
+
};
|
|
103
|
+
export {};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { type JSX } from 'solid-js';
|
|
2
|
+
import { type PanelRootProps } from '../Panel.js';
|
|
3
|
+
export type PopoverPanelRootProps = Omit<PanelRootProps, 'as'>;
|
|
4
|
+
/**
|
|
5
|
+
* The column of a form panel inside a `Popover` (site details, a bookmark editor, an account
|
|
6
|
+
* card): header, scrolling body and footer. It gives the panel the one shared width,
|
|
7
|
+
* `--popover-panel-width`, so every form panel opens at the same size. The `Popover` keeps
|
|
8
|
+
* drawing the surface; leave its `scrollable` off, `PopoverPanel.Body` scrolls on its own and
|
|
9
|
+
* the header and footer stay in place.
|
|
10
|
+
*/
|
|
11
|
+
declare function PopoverPanelRoot(props: PopoverPanelRootProps): JSX.Element;
|
|
12
|
+
export interface PopoverPanelHeaderProps {
|
|
13
|
+
/** The panel's title, a heading. Pre-translated by the caller. */
|
|
14
|
+
title: JSX.Element;
|
|
15
|
+
/** Shows a close button at the end of the header. */
|
|
16
|
+
onClose?: (() => void) | undefined;
|
|
17
|
+
/** The close button's accessible name. Default: the translated "Close". */
|
|
18
|
+
closeLabel?: string | undefined;
|
|
19
|
+
/** Controls before the close button: a refresh button, a status. */
|
|
20
|
+
actions?: JSX.Element | undefined;
|
|
21
|
+
class?: string | undefined;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The title row: a heading on the left, actions and a close button on the right. The title is an
|
|
25
|
+
* `h3`, the dialog title level used across the package; section headings under it are `h4`.
|
|
26
|
+
*/
|
|
27
|
+
declare function PopoverPanelHeader(props: PopoverPanelHeaderProps): JSX.Element;
|
|
28
|
+
export interface PopoverPanelBodyProps {
|
|
29
|
+
children: JSX.Element;
|
|
30
|
+
/** Class on the scrolling column that holds the content. */
|
|
31
|
+
class?: string | undefined;
|
|
32
|
+
}
|
|
33
|
+
/** The panel's content: a column that scrolls when the popover reaches the window's height. */
|
|
34
|
+
declare function PopoverPanelBody(props: PopoverPanelBodyProps): JSX.Element;
|
|
35
|
+
export interface PopoverPanelSectionProps {
|
|
36
|
+
/** The section's heading, shown in small capitals like a menu section. */
|
|
37
|
+
title: JSX.Element;
|
|
38
|
+
/** Content on the right of the heading: a reset or a "Show all" button. */
|
|
39
|
+
aside?: JSX.Element | undefined;
|
|
40
|
+
children: JSX.Element;
|
|
41
|
+
class?: string | undefined;
|
|
42
|
+
}
|
|
43
|
+
/** A titled group of fields. The `section` element is named by its heading. */
|
|
44
|
+
declare function PopoverPanelSection(props: PopoverPanelSectionProps): JSX.Element;
|
|
45
|
+
export interface PopoverPanelFieldProps {
|
|
46
|
+
/** The setting's name, on the left. */
|
|
47
|
+
label: JSX.Element;
|
|
48
|
+
/** A muted line under the label. */
|
|
49
|
+
description?: JSX.Element | undefined;
|
|
50
|
+
/** The control on the right: a `Toggle`, a `SearchableSelect`, a `NumberInput`, a value. */
|
|
51
|
+
children: JSX.Element;
|
|
52
|
+
class?: string | undefined;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* A setting row: label on the left, control on the right. The package's controls take their
|
|
56
|
+
* accessible name from the label and their description from the muted line, as inside a
|
|
57
|
+
* `FormField`, so the control needs no `ariaLabel` of its own. The label is not a `<label>`
|
|
58
|
+
* element (a `Toggle` or `Checkbox` already is one), so native inputs are pointed at it.
|
|
59
|
+
*/
|
|
60
|
+
declare function PopoverPanelField(props: PopoverPanelFieldProps): JSX.Element;
|
|
61
|
+
export interface PopoverPanelSeparatorProps {
|
|
62
|
+
class?: string | undefined;
|
|
63
|
+
}
|
|
64
|
+
/** A rule between two parts of the panel, the same line a menu draws between its groups. */
|
|
65
|
+
declare function PopoverPanelSeparator(props: PopoverPanelSeparatorProps): JSX.Element;
|
|
66
|
+
export interface PopoverPanelFooterProps {
|
|
67
|
+
children: JSX.Element;
|
|
68
|
+
/** `end` (default) for dialog buttons, `between` for a secondary action on the left, `stretch` for stacked full-width actions. */
|
|
69
|
+
align?: 'end' | 'between' | 'stretch' | undefined;
|
|
70
|
+
class?: string | undefined;
|
|
71
|
+
}
|
|
72
|
+
/** The actions under the body, divided from it by a rule. Stays in place while the body scrolls. */
|
|
73
|
+
declare function PopoverPanelFooter(props: PopoverPanelFooterProps): JSX.Element;
|
|
74
|
+
/**
|
|
75
|
+
* Form panel parts for a `Popover`, built on `Panel`:
|
|
76
|
+
* `PopoverPanel.Root / .Header / .Body / .Section / .Field / .Separator / .Footer`.
|
|
77
|
+
*
|
|
78
|
+
* ```tsx
|
|
79
|
+
* <Popover open={open} anchor={() => anchor} onClose={close} ariaLabel="Site information">
|
|
80
|
+
* <PopoverPanel.Root>
|
|
81
|
+
* <PopoverPanel.Header title="example.com" onClose={close} />
|
|
82
|
+
* <PopoverPanel.Body>
|
|
83
|
+
* <PopoverPanel.Section title="Permissions">
|
|
84
|
+
* <PopoverPanel.Field label="Camera"><SearchableSelect … /></PopoverPanel.Field>
|
|
85
|
+
* </PopoverPanel.Section>
|
|
86
|
+
* </PopoverPanel.Body>
|
|
87
|
+
* <PopoverPanel.Footer><Button>Settings</Button></PopoverPanel.Footer>
|
|
88
|
+
* </PopoverPanel.Root>
|
|
89
|
+
* </Popover>
|
|
90
|
+
* ```
|
|
91
|
+
*
|
|
92
|
+
* A panel with form controls keeps the Popover's default `dialog` role; menus use the menu parts.
|
|
93
|
+
*/
|
|
94
|
+
export declare const PopoverPanel: {
|
|
95
|
+
Root: typeof PopoverPanelRoot;
|
|
96
|
+
Header: typeof PopoverPanelHeader;
|
|
97
|
+
Body: typeof PopoverPanelBody;
|
|
98
|
+
Section: typeof PopoverPanelSection;
|
|
99
|
+
Field: typeof PopoverPanelField;
|
|
100
|
+
Separator: typeof PopoverPanelSeparator;
|
|
101
|
+
Footer: typeof PopoverPanelFooter;
|
|
102
|
+
};
|
|
103
|
+
export {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { Popover } from './Popover.cjs';
|
|
2
2
|
export type { PopoverProps, PopoverPlacement } from './Popover.cjs';
|
|
3
|
+
export { PopoverPanel } from './PopoverPanel.cjs';
|
|
4
|
+
export type { PopoverPanelRootProps, PopoverPanelHeaderProps, PopoverPanelBodyProps, PopoverPanelSectionProps, PopoverPanelFieldProps, PopoverPanelSeparatorProps, PopoverPanelFooterProps, } from './PopoverPanel.cjs';
|
|
3
5
|
export * from './popoverPosition.cjs';
|
|
4
6
|
export * from './popoverFocusNavigation.cjs';
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { Popover } from './Popover.js';
|
|
2
2
|
export type { PopoverProps, PopoverPlacement } from './Popover.js';
|
|
3
|
+
export { PopoverPanel } from './PopoverPanel.js';
|
|
4
|
+
export type { PopoverPanelRootProps, PopoverPanelHeaderProps, PopoverPanelBodyProps, PopoverPanelSectionProps, PopoverPanelFieldProps, PopoverPanelSeparatorProps, PopoverPanelFooterProps, } from './PopoverPanel.js';
|
|
3
5
|
export * from './popoverPosition.js';
|
|
4
6
|
export * from './popoverFocusNavigation.js';
|
|
@@ -15,8 +15,12 @@
|
|
|
15
15
|
*
|
|
16
16
|
* Every function is total and side-effect-free; inputs are never mutated.
|
|
17
17
|
*/
|
|
18
|
-
/**
|
|
19
|
-
|
|
18
|
+
/**
|
|
19
|
+
* CSS selector for all focusable children of a `role="menu"` panel: plain, checkbox and radio
|
|
20
|
+
* menu items, skipping disabled ones (native `disabled` on a button row, `aria-disabled` on a
|
|
21
|
+
* div row that hosts its own controls).
|
|
22
|
+
*/
|
|
23
|
+
export declare const MENU_ITEM_SELECTOR: string;
|
|
20
24
|
/** CSS selector for all focusable children of a `role="listbox"` panel. */
|
|
21
25
|
export declare const LISTBOX_OPTION_SELECTOR = "[role=\"option\"]:not([aria-disabled=\"true\"])";
|
|
22
26
|
/** Keys this module resolves to a focus movement; every other key is a no-op. */
|
|
@@ -15,8 +15,12 @@
|
|
|
15
15
|
*
|
|
16
16
|
* Every function is total and side-effect-free; inputs are never mutated.
|
|
17
17
|
*/
|
|
18
|
-
/**
|
|
19
|
-
|
|
18
|
+
/**
|
|
19
|
+
* CSS selector for all focusable children of a `role="menu"` panel: plain, checkbox and radio
|
|
20
|
+
* menu items, skipping disabled ones (native `disabled` on a button row, `aria-disabled` on a
|
|
21
|
+
* div row that hosts its own controls).
|
|
22
|
+
*/
|
|
23
|
+
export declare const MENU_ITEM_SELECTOR: string;
|
|
20
24
|
/** CSS selector for all focusable children of a `role="listbox"` panel. */
|
|
21
25
|
export declare const LISTBOX_OPTION_SELECTOR = "[role=\"option\"]:not([aria-disabled=\"true\"])";
|
|
22
26
|
/** Keys this module resolves to a focus movement; every other key is a no-op. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../overlayStack-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../overlayStack-DvKYN7SD.cjs");exports.getOverlayDiagnostics=e.getOverlayDiagnostics;exports.hasOpenLayerIn=e.hasOpenLayerIn;exports.isAnyOverlayOpen=e.isAnyOverlayOpen;exports.isModalOccluded=e.isModalOccluded;exports.isOverlayOverlapping=e.isOverlayOverlapping;exports.notifyOverlayChanged=e.notifyOverlayChanged;exports.notifyOverlayMotionEnd=e.notifyOverlayMotionEnd;exports.notifyOverlayMotionStart=e.notifyOverlayMotionStart;exports.onOverlayMotion=e.onOverlayMotion;exports.overlayDepth=e.overlayDepth;exports.readOverlayMutationRevision=e.readOverlayMutationRevision;exports.registerOverlayClose=e.registerOverlayClose;exports.registerOverlayCondition=e.registerOverlayCondition;exports.registerOverlayOpen=e.registerOverlayOpen;exports.useOverlayRegistration=e.useOverlayRegistration;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as s, h as r, i, a as n, b as o, n as t, c as y, d as l, o as O, e as v, r as g, f as d, j as p, k as f, u as M } from "../overlayStack-
|
|
1
|
+
import { g as s, h as r, i, a as n, b as o, n as t, c as y, d as l, o as O, e as v, r as g, f as d, j as p, k as f, u as M } from "../overlayStack-DvGdPMdq.js";
|
|
2
2
|
export {
|
|
3
3
|
s as getOverlayDiagnostics,
|
|
4
4
|
r as hasOpenLayerIn,
|