@webority/ui-elements 0.163.0 → 0.165.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/LICENSE +1 -1
- package/README.md +4 -4
- package/THIRD-PARTY-NOTICES.txt +1 -1
- package/dist/WuiCodeBlock-7O514Hqe.js +1 -0
- package/dist/{WuiCommandPalette-Dpz0DXKJ.js → WuiCommandPalette-rVScJ2Hy.js} +2 -2
- package/dist/WuiCommentThread-Bkb78uhy.js +1 -0
- package/dist/WuiContextMenu-Fc9WCgM8.js +1 -0
- package/dist/{WuiDataTable-C1Rrxmh_.js → WuiDataTable-Bb5hxTfn.js} +1 -1
- package/dist/WuiDatePicker-D7tOu4kV.js +31 -0
- package/dist/WuiDateRange-D0pzZeUU.js +25 -0
- package/dist/WuiDrawer-BKNcc0WX.js +1 -0
- package/dist/WuiDropdown-CeiMaiwi.js +1 -0
- package/dist/WuiEntryGrid-DCVSZuPc.js +1 -0
- package/dist/WuiHoverCard-AAXID-P3.js +1 -0
- package/dist/WuiInlineEdit-DwnXChDc.js +1 -0
- package/dist/WuiLightbox-hw48EjHj.js +1 -0
- package/dist/WuiMarkdown-B7nfQ6tW.js +4 -0
- package/dist/WuiMentionInput-BCXdub58.js +1 -0
- package/dist/WuiModal-Bz2Xg161.js +1 -0
- package/dist/WuiNavigationMenu-Dybw-nMb.js +1 -0
- package/dist/WuiNotificationCenter-BRomMzI2.js +1 -0
- package/dist/WuiOverflow-CV5y5zkM.js +1 -0
- package/dist/WuiPhone-BKxBok5L.js +16 -0
- package/dist/WuiPopover-y_Vxm64z.js +1 -0
- package/dist/WuiRelativeTime-CmlKD-97.js +1 -0
- package/dist/WuiSavedViews-CdjavvPC.js +1 -0
- package/dist/WuiSelect-CKfM5kWG.js +9 -0
- package/dist/WuiShortcuts-Wiv_zufK.js +1 -0
- package/dist/WuiSlider-Cz5-zWC7.js +51 -0
- package/dist/WuiTimePicker-DAS2sxSH.js +9 -0
- package/dist/WuiTour-CAVM3O8-.js +1 -0
- package/dist/{WuiTree-COd5leOB.js → WuiTree-BPT9EZuw.js} +1 -1
- package/dist/{WuiTruncate-C2WV1-NN.js → WuiTruncate-BB4i8wHE.js} +1 -1
- package/dist/WuiWhatsNew-BdsS6MzB.js +1 -0
- package/dist/anchorOverlay-B8fu8hjz.js +1 -0
- package/dist/chips-DjccCG3b.js +2 -0
- package/dist/digitGrouping-CCPI3HK3.js +1 -0
- package/dist/drawerDiscard-C1We4r_2.js +1 -0
- package/dist/elements/code-block.js +1 -1
- package/dist/elements/command-palette.js +1 -1
- package/dist/elements/comment-thread.js +1 -1
- package/dist/elements/context-menu.js +1 -1
- package/dist/elements/data-table.js +1 -1
- package/dist/elements/date-range.js +1 -1
- package/dist/elements/datepicker.js +1 -1
- package/dist/elements/drawer.js +1 -1
- package/dist/elements/dropdown.js +1 -0
- package/dist/elements/entry-grid.js +1 -0
- package/dist/elements/filter-popover.js +1 -1
- package/dist/elements/hover-card.js +1 -1
- package/dist/elements/inline-edit.js +1 -1
- package/dist/elements/lightbox.js +1 -1
- package/dist/elements/markdown.js +1 -1
- package/dist/elements/mention-input.js +1 -1
- package/dist/elements/modal.js +1 -0
- package/dist/elements/navigation-menu.js +1 -1
- package/dist/elements/notification-center.js +1 -1
- package/dist/elements/overflow.js +1 -1
- package/dist/elements/phone.js +1 -1
- package/dist/elements/popover.js +1 -0
- package/dist/elements/relative-time.js +1 -1
- package/dist/elements/saved-views.js +1 -1
- package/dist/elements/select.js +1 -1
- package/dist/elements/shortcuts.js +1 -1
- package/dist/elements/slider.js +1 -1
- package/dist/elements/timepicker.js +1 -1
- package/dist/elements/tour.js +1 -1
- package/dist/elements/tree.js +1 -1
- package/dist/elements/truncate.js +1 -1
- package/dist/elements/whats-new.js +1 -1
- package/dist/fileViewerImage-CVHV1fBb.js +3 -0
- package/dist/fileViewerMedia-DGnbWDXP.js +1 -0
- package/dist/{fileViewerPdf-CAbiTCHl.js → fileViewerPdf-BxoLE4hd.js} +2 -2
- package/dist/fileViewerUi-2ZoK9uX0.js +1 -0
- package/dist/filterPopover-B29bt1s2.js +1 -0
- package/dist/helpers.js +1 -1
- package/dist/inlineEditText-CDptpqmI.js +1 -0
- package/dist/isDrawn-BbF4phmB.js +1 -0
- package/dist/{listboxKeyNav-DkLHwzJE.js → listboxKeyNav-CF7tMDGG.js} +1 -1
- package/dist/loader-C7Ov09Bx.js +1 -0
- package/dist/menuKeyNav-CstMzU08.js +1 -0
- package/dist/nativeOverlay-BsVSWs1q.js +1 -0
- package/dist/{search-C0IYOzso.js → search-Du-vK_9z.js} +1 -1
- package/dist/server.js +1 -1
- package/dist/{themeTransition-CwE2VwQa.js → themeTransition-Dt7Br1QT.js} +1 -1
- package/dist/ui-elements/carousel.global.js +1 -1
- package/dist/ui-elements/code-block.global.js +1 -1
- package/dist/ui-elements/command-palette.global.js +2 -2
- package/dist/ui-elements/comment-thread.global.js +1 -1
- package/dist/ui-elements/consent-banner.global.js +1 -1
- package/dist/ui-elements/context-menu.global.js +1 -1
- package/dist/ui-elements/date-range.global.js +10 -10
- package/dist/ui-elements/drawer.global.js +1 -1
- package/dist/ui-elements/dropdown.global.js +1 -0
- package/dist/ui-elements/entry-grid.global.js +1 -0
- package/dist/ui-elements/glyphs.global.js +1 -1
- package/dist/ui-elements/image-crop.global.js +1 -1
- package/dist/ui-elements/inline-edit.global.js +1 -1
- package/dist/ui-elements/kanban.global.js +1 -1
- package/dist/ui-elements/lead-popup.global.js +1 -1
- package/dist/ui-elements/lightbox.global.js +1 -1
- package/dist/ui-elements/markdown.global.js +3 -3
- package/dist/ui-elements/org-tree.global.js +1 -1
- package/dist/ui-elements/phone.global.js +6 -6
- package/dist/ui-elements/popover.global.js +1 -0
- package/dist/ui-elements/saved-views.global.js +1 -1
- package/dist/ui-elements/select-chips.global.js +2 -2
- package/dist/ui-elements/select-recents.global.js +1 -1
- package/dist/ui-elements/select-search.global.js +1 -1
- package/dist/ui-elements/slider.global.js +3 -3
- package/dist/ui-elements/sortable.global.js +1 -1
- package/dist/ui-elements/status-icon.global.js +1 -1
- package/dist/ui-elements/timepicker.global.js +4 -4
- package/dist/ui-elements/tour.global.js +1 -1
- package/dist/ui-elements/tree.global.js +1 -1
- package/dist/ui-elements/wizard.global.js +1 -1
- package/dist/ui-elements.global.js +20 -20
- package/dist/ui-elements.js +1 -1
- package/dist/ui-file-viewer.global.js +10 -10
- package/dist/ui-file-viewer.js +1 -1
- package/dist/ui-tour.global.js +1 -1
- package/package.json +22 -13
- package/types/WuiCommandPalette.d.ts +2 -2
- package/types/WuiCommentThread.d.ts +1 -2
- package/types/WuiContextMenu.d.ts +56 -5
- package/types/WuiDatePicker.d.ts +3 -7
- package/types/WuiDateRange.d.ts +4 -9
- package/types/WuiDrawer.d.ts +9 -12
- package/types/WuiDropdown.d.ts +68 -0
- package/types/WuiEntryGrid.d.ts +26 -0
- package/types/WuiHoverCard.d.ts +15 -1
- package/types/WuiInlineEdit.d.ts +2 -0
- package/types/WuiLightbox.d.ts +1 -2
- package/types/WuiMentionInput.d.ts +0 -4
- package/types/WuiModal.d.ts +50 -0
- package/types/WuiNavigationMenu.d.ts +8 -3
- package/types/WuiNotificationCenter.d.ts +10 -2
- package/types/WuiPhone.d.ts +3 -5
- package/types/WuiPopover.d.ts +68 -0
- package/types/WuiRelativeTime.d.ts +5 -6
- package/types/WuiSelect.d.ts +8 -6
- package/types/WuiShortcuts.d.ts +6 -1
- package/types/WuiSlider.d.ts +6 -3
- package/types/WuiTimePicker.d.ts +3 -5
- package/types/WuiTour.d.ts +1 -0
- package/types/WuiTruncate.d.ts +2 -2
- package/types/WuiWhatsNew.d.ts +3 -3
- package/types/anchorOverlay.d.ts +24 -8
- package/types/codeHighlight.d.ts +1 -1
- package/types/digitGrouping.d.ts +11 -0
- package/types/elements/dropdown.d.ts +2 -0
- package/types/elements/entry-grid.d.ts +2 -0
- package/types/elements/modal.d.ts +2 -0
- package/types/elements/popover.d.ts +2 -0
- package/types/fileViewerImage.d.ts +2 -0
- package/types/fileViewerMedia.d.ts +2 -0
- package/types/fileViewerPdf.d.ts +2 -0
- package/types/fileViewerUi.d.ts +1 -2
- package/types/filterPopover.d.ts +7 -8
- package/types/global/core.d.ts +1 -3
- package/types/global/shared.d.ts +10 -0
- package/types/globals.d.ts +28 -79
- package/types/helpers.d.ts +5 -0
- package/types/iconGlyphs.g.d.ts +1 -1
- package/types/index.d.ts +5 -3
- package/types/inlineEditText.d.ts +3 -1
- package/types/isDrawn.d.ts +1 -0
- package/types/listboxKeyNav.d.ts +3 -3
- package/types/menuKeyNav.d.ts +8 -0
- package/types/nativeOverlay.d.ts +51 -0
- package/types/razor-js/modules/fieldChecks.d.ts +1 -0
- package/types/razor-js/modules/overlays.d.ts +1 -4
- package/types/razor-js/modules/serverBridge.d.ts +15 -13
- package/types/razor-js/modules/serverRules.d.ts +9 -0
- package/types/razor-js/modules/shared.d.ts +0 -7
- package/types/razor-js/modules/tables.d.ts +1 -0
- package/types/razor-js/modules/validation.d.ts +7 -0
- package/types/server/remoteModal.d.ts +0 -1
- package/types/statusIcons.d.ts +1 -1
- package/types/tooltips.d.ts +18 -0
- package/dist/WuiCodeBlock-cLLbSBK4.js +0 -1
- package/dist/WuiCommentThread-CclWHz4C.js +0 -1
- package/dist/WuiContextMenu-B2MrH_LK.js +0 -1
- package/dist/WuiDatePicker-DLEsnzqG.js +0 -31
- package/dist/WuiDateRange-9Xqs5nvv.js +0 -25
- package/dist/WuiDrawer-B3YFmxl2.js +0 -1
- package/dist/WuiHoverCard-CE3dHKaM.js +0 -1
- package/dist/WuiInlineEdit-pG9Z5tUQ.js +0 -1
- package/dist/WuiLightbox-C2A14vHx.js +0 -1
- package/dist/WuiMarkdown-BXY0QKaO.js +0 -4
- package/dist/WuiMentionInput-B_K8AXM5.js +0 -1
- package/dist/WuiNavigationMenu-CZ3XhFam.js +0 -1
- package/dist/WuiNotificationCenter-ClkCTUnp.js +0 -1
- package/dist/WuiOverflow-B0wA6aDe.js +0 -1
- package/dist/WuiPhone-icMSUnua.js +0 -16
- package/dist/WuiRelativeTime-DyeUQOQ8.js +0 -1
- package/dist/WuiResizable-KvfLtbCw.js +0 -1
- package/dist/WuiRollingNumber-sfgNzaP0.js +0 -1
- package/dist/WuiSavedViews-Br9YKOVU.js +0 -1
- package/dist/WuiSelect-B199VL24.js +0 -9
- package/dist/WuiShortcuts-D3rWkaOm.js +0 -1
- package/dist/WuiSlider-D33Y3_t9.js +0 -51
- package/dist/WuiTimePicker-wo9BlOFs.js +0 -9
- package/dist/WuiTour-D3Sx7JCM.js +0 -1
- package/dist/WuiWhatsNew-dLGyA4g1.js +0 -1
- package/dist/anchorOverlay-CXnWfezA.js +0 -1
- package/dist/chips-0jT9fpA9.js +0 -2
- package/dist/drawerDiscard-C-STs39f.js +0 -1
- package/dist/elements/resizable.js +0 -1
- package/dist/elements/rolling-number.js +0 -1
- package/dist/fileViewerImage-Bt1jeArm.js +0 -3
- package/dist/fileViewerMedia-Bp1uHJvC.js +0 -1
- package/dist/fileViewerUi-ResPjO1o.js +0 -1
- package/dist/filterPopover-CaHWe9V0.js +0 -1
- package/dist/inlineEditText-CsLCQbcg.js +0 -1
- package/dist/loader-DRYPWxQL.js +0 -1
- package/dist/ui-elements/resizable.global.js +0 -1
- package/types/WuiResizable.d.ts +0 -79
- package/types/WuiRollingNumber.d.ts +0 -27
- package/types/elements/resizable.d.ts +0 -2
- package/types/elements/rolling-number.d.ts +0 -2
- package/types/overlayRelease.d.ts +0 -12
- package/types/razor-js/modules/popovers.d.ts +0 -1
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* <wui-dropdown>: the behaviour of AppDropdown, AppSplitButton's menu, AppColumnMenu, the chart card menu, the account and
|
|
3
|
+
* workspace switchers, the shell's user and notification menus, and their Razor tags. Both surfaces render:
|
|
4
|
+
*
|
|
5
|
+
* <wui-dropdown class="dropdown" [align="start|end"] [open]>
|
|
6
|
+
* <button type="button" data-wui-dropdown-trigger aria-expanded="false" class="…">…</button>
|
|
7
|
+
* <div data-wui-dropdown-menu popover="auto" class="dropdown-menu [dropdown-menu-end] […]">
|
|
8
|
+
* rows as today: .dropdown-item, .dropdown-divider, .dropdown-header, .wui-dropdown-search
|
|
9
|
+
* a wrapper [data-wui-keep-open] around rows that toggle state keeps the menu open on their pick
|
|
10
|
+
* </div>
|
|
11
|
+
* </wui-dropdown>
|
|
12
|
+
*
|
|
13
|
+
* ARIA on the trigger and rows stays as each surface renders it today. The menu is placed by anchorOverlay
|
|
14
|
+
* (alignEnd when align="end"), closes when a scroll moves the trigger by more than 2px or the window resizes, and
|
|
15
|
+
* closes on a pick of a row that is not aria-disabled and not inside a [data-wui-keep-open] element of the menu
|
|
16
|
+
* (a column picker or a notification list, whose rows toggle while the menu stays open). Arrow keys inside the menu come from bindMenuKeys; the trigger's arrows open it or move focus into it (_key).
|
|
17
|
+
* Event: `wui-dropdown-toggle`, bubbling and cancelable, detail { open: boolean, source: "trigger" | "select" | "dismiss" | "scroll" | "resize" }.
|
|
18
|
+
* Unless a listener prevents it, the element applies the request. A controlled wrapper prevents it and sets `open`
|
|
19
|
+
* itself; the element then only reports. A browser dismissal is never prevented: the browser has already closed the panel.
|
|
20
|
+
*/
|
|
21
|
+
import { ElementBase } from "./elementBase.ts";
|
|
22
|
+
type ToggleSource = "trigger" | "select" | "dismiss" | "scroll" | "resize";
|
|
23
|
+
export declare class WuiDropdown extends ElementBase {
|
|
24
|
+
_unbindKeys: (() => void) | null;
|
|
25
|
+
_rect: DOMRect | null;
|
|
26
|
+
_pendingFocus: boolean;
|
|
27
|
+
_pressOpen: boolean | null;
|
|
28
|
+
_settling: boolean;
|
|
29
|
+
_settleTimer: ReturnType<typeof setTimeout> | null;
|
|
30
|
+
_endSettle: () => void;
|
|
31
|
+
_onSettleScroll: () => void;
|
|
32
|
+
_onClick: (e: MouseEvent) => void;
|
|
33
|
+
_onPointerDown: (e: PointerEvent) => void;
|
|
34
|
+
_onKeyDown: (e: KeyboardEvent) => void;
|
|
35
|
+
_onScroll: () => void;
|
|
36
|
+
_onResize: () => void;
|
|
37
|
+
_onClosed: () => void;
|
|
38
|
+
static get observedAttributes(): string[];
|
|
39
|
+
constructor();
|
|
40
|
+
connectedCallback(): void;
|
|
41
|
+
disconnectedCallback(): void;
|
|
42
|
+
attributeChangedCallback(name: string): void;
|
|
43
|
+
get isOpen(): boolean;
|
|
44
|
+
show(): void;
|
|
45
|
+
hide(): void;
|
|
46
|
+
_request(next: boolean, source: ToggleSource): boolean;
|
|
47
|
+
_apply(next: boolean): void;
|
|
48
|
+
_dismissed(): void;
|
|
49
|
+
_sync(): void;
|
|
50
|
+
_open(trigger: HTMLElement, menu: HTMLElement): void;
|
|
51
|
+
_close(trigger: HTMLElement, menu: HTMLElement): void;
|
|
52
|
+
_stop(): void;
|
|
53
|
+
_startSettling(): void;
|
|
54
|
+
_armQuiet(): void;
|
|
55
|
+
_stopSettling(): void;
|
|
56
|
+
_scrolled(): void;
|
|
57
|
+
_click(e: MouseEvent): void;
|
|
58
|
+
_key(e: KeyboardEvent): void;
|
|
59
|
+
_trigger(): HTMLElement | null;
|
|
60
|
+
_anchor(trigger: HTMLElement): HTMLElement;
|
|
61
|
+
_menu(): HTMLElement | null;
|
|
62
|
+
_rows(menu: HTMLElement): HTMLElement[];
|
|
63
|
+
_markup(): {
|
|
64
|
+
trigger: HTMLElement;
|
|
65
|
+
menu: HTMLElement;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ElementBase } from "./elementBase.ts";
|
|
2
|
+
export interface WuiEntryGridCommitDetail {
|
|
3
|
+
rowKey: string;
|
|
4
|
+
move: "next" | "stay";
|
|
5
|
+
}
|
|
6
|
+
export interface WuiEntryGridRowDetail {
|
|
7
|
+
rowKey: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class WuiEntryGrid extends ElementBase {
|
|
10
|
+
private _onKeyDown;
|
|
11
|
+
private _onFocusIn;
|
|
12
|
+
private _onClick;
|
|
13
|
+
private _ready;
|
|
14
|
+
constructor();
|
|
15
|
+
static get observedAttributes(): string[];
|
|
16
|
+
connectedCallback(): void;
|
|
17
|
+
disconnectedCallback(): void;
|
|
18
|
+
attributeChangedCallback(_name: string, oldValue: string | null, newValue: string | null): void;
|
|
19
|
+
_within(node: Element | null): node is Element;
|
|
20
|
+
_rows(): HTMLElement[];
|
|
21
|
+
_rowOf(target: EventTarget | null): HTMLElement | null;
|
|
22
|
+
_emit(name: string, detail: object): void;
|
|
23
|
+
_focusActiveRow(): void;
|
|
24
|
+
_keyDown(e: KeyboardEvent): void;
|
|
25
|
+
_focusIn(e: FocusEvent): void;
|
|
26
|
+
}
|
package/types/WuiHoverCard.d.ts
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* <wui-hover-card>: a preview card that opens beside a name or record link. React AppHoverCard and
|
|
3
|
+
* Razor <app-hover-card> render a `.wui-hover-card-trigger` (the author's link or text) and a
|
|
4
|
+
* `.wui-hover-card-panel` (the preview) inside it; this element opens the panel as a manual popover
|
|
5
|
+
* and places it with openAnchoredPopover, so it escapes a clipping ancestor and flips above near the
|
|
6
|
+
* bottom edge.
|
|
7
|
+
*
|
|
8
|
+
* It opens after `open-delay` ms (default 300) of mouse hover or on focus in the trigger, and closes
|
|
9
|
+
* `close-delay` ms (default 150) after the pointer or focus leaves both the trigger and the card,
|
|
10
|
+
* which lets the pointer cross the gap and read or click inside the card. Escape closes it. Touch
|
|
11
|
+
* never opens it: the card is a convenience over the link, not the only way to the information.
|
|
12
|
+
* Opening and closing dispatch `wui:hover-card:open` and `wui:hover-card:close`; a page that
|
|
13
|
+
* fetches the preview listens for the first.
|
|
14
|
+
*/
|
|
1
15
|
import { ElementBase } from "./elementBase.ts";
|
|
2
16
|
export declare class WuiHoverCard extends ElementBase {
|
|
3
17
|
_doc: Document | null;
|
|
@@ -24,6 +38,6 @@ export declare class WuiHoverCard extends ElementBase {
|
|
|
24
38
|
_syncOpen(): void;
|
|
25
39
|
_schedule(open: boolean): void;
|
|
26
40
|
_setOpen(open: boolean): void;
|
|
27
|
-
|
|
41
|
+
_closed(): void;
|
|
28
42
|
_describe(panel: HTMLElement): void;
|
|
29
43
|
}
|
package/types/WuiInlineEdit.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type DigitGrouping } from "./digitGrouping.ts";
|
|
1
2
|
import { ElementBase } from "./elementBase.ts";
|
|
2
3
|
import { type InlineEditFailedDetail, type InlineEditSavedDetail, type InlineEditType } from "./inlineEditText.ts";
|
|
3
4
|
import { type HttpKind } from "./server/wuiHttp.ts";
|
|
@@ -61,5 +62,6 @@ export declare class WuiInlineEdit extends ElementBase {
|
|
|
61
62
|
_control(): InlineEditControl | null;
|
|
62
63
|
_value(): string;
|
|
63
64
|
_type(): InlineEditType;
|
|
65
|
+
_grouping(): DigitGrouping;
|
|
64
66
|
}
|
|
65
67
|
export {};
|
package/types/WuiLightbox.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export declare class WuiLightbox extends ElementBase {
|
|
|
36
36
|
private _gesture;
|
|
37
37
|
private _lastTap;
|
|
38
38
|
private _returnTo;
|
|
39
|
-
private
|
|
39
|
+
private _release;
|
|
40
40
|
private _onClick;
|
|
41
41
|
static get observedAttributes(): string[];
|
|
42
42
|
constructor();
|
|
@@ -71,7 +71,6 @@ export declare class WuiLightbox extends ElementBase {
|
|
|
71
71
|
_clampedPan(pan: Point): Point;
|
|
72
72
|
_applyTransform(): void;
|
|
73
73
|
_onKeyDown(e: KeyboardEvent): void;
|
|
74
|
-
_trapTab(e: KeyboardEvent): void;
|
|
75
74
|
_onWheel(e: WheelEvent): void;
|
|
76
75
|
_onPointerDown(e: PointerEvent): void;
|
|
77
76
|
_onPointerMove(e: PointerEvent): void;
|
|
@@ -53,9 +53,6 @@ export declare class WuiMentionInput extends ElementBase {
|
|
|
53
53
|
private _lastSearch;
|
|
54
54
|
private _abort;
|
|
55
55
|
private _onMenuDown;
|
|
56
|
-
private _reposition;
|
|
57
|
-
_reanchor?: (() => void) | null;
|
|
58
|
-
_reanchorScroll?: ((e: Event) => void) | null;
|
|
59
56
|
static get observedAttributes(): string[];
|
|
60
57
|
constructor();
|
|
61
58
|
connectedCallback(): void;
|
|
@@ -96,7 +93,6 @@ export declare class WuiMentionInput extends ElementBase {
|
|
|
96
93
|
_isOpen(): boolean;
|
|
97
94
|
_renderMenu(): void;
|
|
98
95
|
_syncState(): void;
|
|
99
|
-
_position(): void;
|
|
100
96
|
_close(): void;
|
|
101
97
|
_setActive(i: number, { reveal }?: {
|
|
102
98
|
reveal?: boolean;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* <wui-modal>: the behaviour of AppModal, AppConfirmDialog, the command palette, the image-crop dialog and Razor
|
|
3
|
+
* <app-modal>, <app-modal-form>, <app-confirm-dialog>, <app-command-palette>. Both surfaces render:
|
|
4
|
+
*
|
|
5
|
+
* <wui-modal id="…" [open] [static] [no-escape] [confirm-discard="…"] data-wui="AppModal">
|
|
6
|
+
* <dialog class="modal wui-modal-shell [wui-modal-fullscreen]" aria-label="…" data-wui-style="--wui-modal-max-width:440px">
|
|
7
|
+
* <div class="modal-dialog [modal-dialog-centered] wui-rb-dialog">
|
|
8
|
+
* <div class="modal-content wui-modal [tone-danger]">
|
|
9
|
+
* .wui-modal-header, .wui-modal-body, .wui-modal-footer, unchanged
|
|
10
|
+
* </div>
|
|
11
|
+
* </div>
|
|
12
|
+
* </dialog>
|
|
13
|
+
* </wui-modal>
|
|
14
|
+
*
|
|
15
|
+
* The host is display: contents. `open` is the state. `static`: a press outside the card does not ask to close.
|
|
16
|
+
* `no-escape`: Escape does not ask to close. A control inside marked data-wui-dismiss asks to close.
|
|
17
|
+
* Events, all bubbling: `wui-modal-open` (opening starts; detail.trigger is the opener or null), `wui-modal-opened`
|
|
18
|
+
* (entry motion ended), `wui-modal-close` (cancelable; detail.reason is an OverlayCloseReason; unless prevented the
|
|
19
|
+
* element removes `open`), `wui-modal-closed` (the dialog has closed). A controlled wrapper prevents `wui-modal-close`
|
|
20
|
+
* and sets `open` itself. While `confirm-discard` is set and a form inside is dirty, server/drawerDiscard.ts, which reads
|
|
21
|
+
* the attribute from the DOM, asks before the modal closes.
|
|
22
|
+
*/
|
|
23
|
+
import { ElementBase } from "./elementBase.ts";
|
|
24
|
+
import { type OverlayCloseReason } from "./nativeOverlay.ts";
|
|
25
|
+
export declare class WuiModal extends ElementBase {
|
|
26
|
+
_doc: Document | null;
|
|
27
|
+
_release: (() => void) | null;
|
|
28
|
+
_opener: HTMLElement | null;
|
|
29
|
+
_returnTo: HTMLElement | null;
|
|
30
|
+
_session: number;
|
|
31
|
+
_closing: boolean;
|
|
32
|
+
_reopen: boolean;
|
|
33
|
+
static get observedAttributes(): string[];
|
|
34
|
+
constructor();
|
|
35
|
+
connectedCallback(): void;
|
|
36
|
+
disconnectedCallback(): void;
|
|
37
|
+
attributeChangedCallback(name: string): void;
|
|
38
|
+
get isOpen(): boolean;
|
|
39
|
+
/** Opens it; `opener` is reported as detail.trigger. */
|
|
40
|
+
show(opener?: HTMLElement): void;
|
|
41
|
+
/** Closes it without asking. */
|
|
42
|
+
hide(): void;
|
|
43
|
+
_open(): void;
|
|
44
|
+
_close(): void;
|
|
45
|
+
_settle(session: number, dialog: HTMLDialogElement): void;
|
|
46
|
+
_announceOpened(): void;
|
|
47
|
+
_requestClose(reason: OverlayCloseReason): void;
|
|
48
|
+
_releaseDialog(): void;
|
|
49
|
+
_dialog(): HTMLDialogElement;
|
|
50
|
+
}
|
|
@@ -3,8 +3,11 @@ export declare class WuiNavigationMenu extends ElementBase {
|
|
|
3
3
|
_onClick: (e: MouseEvent) => void;
|
|
4
4
|
_onKeyDown: (e: KeyboardEvent) => void;
|
|
5
5
|
_onFocusOut: (e: FocusEvent) => void;
|
|
6
|
-
_onPointerDown: (
|
|
7
|
-
|
|
6
|
+
_onPointerDown: () => void;
|
|
7
|
+
_pressedOpen: HTMLElement | null;
|
|
8
|
+
_media: MediaQueryList | null;
|
|
9
|
+
_onModeChange: () => void;
|
|
10
|
+
_onOutsidePress: (e: PointerEvent) => void;
|
|
8
11
|
constructor();
|
|
9
12
|
connectedCallback(): void;
|
|
10
13
|
disconnectedCallback(): void;
|
|
@@ -17,11 +20,13 @@ export declare class WuiNavigationMenu extends ElementBase {
|
|
|
17
20
|
close(restoreFocus?: boolean): void;
|
|
18
21
|
_items(): HTMLElement[];
|
|
19
22
|
_openItem(): HTMLElement | null;
|
|
23
|
+
_isOpen(panel: HTMLElement): boolean;
|
|
20
24
|
_isTrigger(el: Element | null | undefined): boolean;
|
|
21
25
|
_entries(): HTMLElement[];
|
|
22
26
|
_links(item: Element): HTMLElement[];
|
|
23
27
|
_set(item: HTMLElement, open: boolean): void;
|
|
24
|
-
|
|
28
|
+
_settle(item: HTMLElement): void;
|
|
29
|
+
_emit(trigger: HTMLElement, open: boolean): void;
|
|
25
30
|
_handleClick(e: MouseEvent): void;
|
|
26
31
|
_handleKeyDown(e: KeyboardEvent): void;
|
|
27
32
|
_linkKey(e: KeyboardEvent, link: HTMLElement): void;
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import { ElementBase } from "./elementBase.ts";
|
|
2
2
|
export declare class WuiNotificationCenter extends ElementBase {
|
|
3
|
-
_doc: Document | null;
|
|
4
3
|
_unread: number;
|
|
5
4
|
_busy: boolean;
|
|
6
5
|
_onClick: (e: MouseEvent) => void;
|
|
7
6
|
_onKeyDown: (e: KeyboardEvent) => void;
|
|
8
|
-
_onOutside: (e: MouseEvent) => void;
|
|
9
7
|
_onFocusOut: (e: FocusEvent) => void;
|
|
8
|
+
_onToggle: (e: Event) => void;
|
|
9
|
+
_sheet: boolean;
|
|
10
|
+
_awaitChildren: MutationObserver | null;
|
|
10
11
|
constructor();
|
|
12
|
+
static get observedAttributes(): string[];
|
|
11
13
|
connectedCallback(): void;
|
|
12
14
|
disconnectedCallback(): void;
|
|
15
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
16
|
+
_finishAwaitedOpen(): void;
|
|
17
|
+
_disarmAwait(): void;
|
|
18
|
+
_showPanel(): void;
|
|
19
|
+
_hidePanel(): void;
|
|
20
|
+
_closedByBrowser(): void;
|
|
13
21
|
get isOpen(): boolean;
|
|
14
22
|
open(): void;
|
|
15
23
|
close({ restoreFocus }?: {
|
package/types/WuiPhone.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ElementBase } from "./elementBase.ts";
|
|
2
2
|
export declare class WuiPhone extends ElementBase {
|
|
3
3
|
static formAssociated: boolean;
|
|
4
|
+
/** Resolves once the phone number metadata has settled (loaded, or failed and left the raw digits) and every connected field has repainted its number with it. Calling it starts the metadata load if no field has. */
|
|
5
|
+
static whenFormatted(): Promise<void>;
|
|
4
6
|
static get observedAttributes(): string[];
|
|
5
7
|
_internals: ElementInternals | null;
|
|
6
8
|
_defaultCountry: string;
|
|
@@ -13,11 +15,9 @@ export declare class WuiPhone extends ElementBase {
|
|
|
13
15
|
_rendered: boolean | undefined;
|
|
14
16
|
_listboxId: string;
|
|
15
17
|
_suppressCountryRender: boolean;
|
|
16
|
-
_bindGlobal: (() => void) | undefined;
|
|
17
|
-
_teardownGlobals: (() => void) | undefined;
|
|
18
|
-
_onDocClick: ((e: MouseEvent) => void) | null;
|
|
19
18
|
constructor();
|
|
20
19
|
connectedCallback(): void;
|
|
20
|
+
disconnectedCallback(): void;
|
|
21
21
|
attributeChangedCallback(name: string, _old: string | null, val: string | null): void;
|
|
22
22
|
formResetCallback(): void;
|
|
23
23
|
get _locked(): string | null;
|
|
@@ -32,6 +32,4 @@ export declare class WuiPhone extends ElementBase {
|
|
|
32
32
|
_itemEls(): HTMLElement[];
|
|
33
33
|
_visibleItems(): HTMLElement[];
|
|
34
34
|
_wire(): void;
|
|
35
|
-
_teardown(): void;
|
|
36
|
-
disconnectedCallback(): void;
|
|
37
35
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* <wui-popover>: the behaviour of AppPopover, AppInfoTip and Razor <app-popover>, <app-info-tip>. Both surfaces render:
|
|
3
|
+
*
|
|
4
|
+
* <wui-popover [open] trigger="click" placement="bottom" [open-delay="80"] [close-delay="220"] [role-dialog] [auto-focus] [labelled-by="id"]>
|
|
5
|
+
* the caller's trigger element, marked data-wui-popover-trigger
|
|
6
|
+
* <div data-wui-popover-panel popover class="popover bs-popover-auto […]" role="tooltip">
|
|
7
|
+
* <div class="popover-arrow"></div><div class="popover-header" id="…">…</div><div class="popover-body">…</div>
|
|
8
|
+
* </div>
|
|
9
|
+
* </wui-popover>
|
|
10
|
+
*
|
|
11
|
+
* The host is display: contents. `trigger` is a space list of click, hover, focus. A click panel is popover="auto"; a
|
|
12
|
+
* hover or focus panel is popover="manual" and stays open while the pointer or focus is inside it. `role-dialog` sets
|
|
13
|
+
* role="dialog" and the name; `auto-focus` moves focus to the panel's first control on open.
|
|
14
|
+
* Event: `wui-popover-toggle`, bubbling and cancellable, detail { open: boolean }. A cancelled request keeps the panel as
|
|
15
|
+
* it is, so a controlled wrapper cancels it and sets `open` itself. `open` is the state the element reflects.
|
|
16
|
+
*/
|
|
17
|
+
import type { OverlaySide } from "./anchorOverlay.ts";
|
|
18
|
+
import { ElementBase } from "./elementBase.ts";
|
|
19
|
+
declare const KINDS: readonly ["click", "hover", "focus"];
|
|
20
|
+
type Kind = (typeof KINDS)[number];
|
|
21
|
+
export declare class WuiPopover extends ElementBase {
|
|
22
|
+
_open: boolean;
|
|
23
|
+
_timer: ReturnType<typeof setTimeout> | null;
|
|
24
|
+
_pressOpen: boolean | null;
|
|
25
|
+
_refocusing: boolean;
|
|
26
|
+
_awaitChildren: MutationObserver | null;
|
|
27
|
+
_onPress: (e: PointerEvent) => void;
|
|
28
|
+
_onClick: (e: MouseEvent) => void;
|
|
29
|
+
_onOver: (e: PointerEvent) => void;
|
|
30
|
+
_onOut: (e: PointerEvent) => void;
|
|
31
|
+
_onFocusIn: (e: FocusEvent) => void;
|
|
32
|
+
_onFocusOut: (e: FocusEvent) => void;
|
|
33
|
+
_onKeyDown: (e: KeyboardEvent) => void;
|
|
34
|
+
static get observedAttributes(): string[];
|
|
35
|
+
constructor();
|
|
36
|
+
get isOpen(): boolean;
|
|
37
|
+
show(): void;
|
|
38
|
+
hide(): void;
|
|
39
|
+
connectedCallback(): void;
|
|
40
|
+
attributeChangedCallback(name: string): void;
|
|
41
|
+
disconnectedCallback(): void;
|
|
42
|
+
get _panel(): HTMLElement | null;
|
|
43
|
+
get _trigger(): HTMLElement | null;
|
|
44
|
+
_stampTrigger(): void;
|
|
45
|
+
_zone(node: EventTarget | null): "panel" | "trigger" | null;
|
|
46
|
+
_kinds(): Kind[];
|
|
47
|
+
_side(): OverlaySide | "auto";
|
|
48
|
+
_delay(attribute: string, fallback: number): number;
|
|
49
|
+
_clear(): void;
|
|
50
|
+
_schedule(open: boolean): void;
|
|
51
|
+
_requestOpen(next: boolean): void;
|
|
52
|
+
_notify(open: boolean, cancelable: boolean): boolean;
|
|
53
|
+
_mode(): "auto" | "manual";
|
|
54
|
+
_ready(): {
|
|
55
|
+
panel: HTMLElement;
|
|
56
|
+
trigger: HTMLElement;
|
|
57
|
+
side: OverlaySide | "auto";
|
|
58
|
+
mode: "auto" | "manual";
|
|
59
|
+
};
|
|
60
|
+
_applyOpen(next: boolean): void;
|
|
61
|
+
_openOrAwaitChildren(): void;
|
|
62
|
+
_finishAwaitedOpen(): void;
|
|
63
|
+
_disarmAwait(): void;
|
|
64
|
+
_onNativeClose(): void;
|
|
65
|
+
_refocus(): void;
|
|
66
|
+
_name(panel: HTMLElement): void;
|
|
67
|
+
}
|
|
68
|
+
export {};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* <wui-relative-time>: keeps the text of its `<time datetime>` child current ("5 minutes ago")
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* `datetime`, a re-render) is re-read at once.
|
|
2
|
+
* <wui-relative-time>: keeps the text of its `<time datetime>` child current ("5 minutes ago") and
|
|
3
|
+
* writes the exact IST time to `data-wui-tooltip` on itself. It swaps both in on connect and every
|
|
4
|
+
* 30 seconds after, for all instances on one timer that stops with the last one. A hidden tab skips
|
|
5
|
+
* the tick and catches up when it is shown again. A change to the child (a new `datetime`, a
|
|
6
|
+
* re-render) is re-read at once.
|
|
8
7
|
*/
|
|
9
8
|
import { ElementBase } from "./elementBase.ts";
|
|
10
9
|
export declare const RELATIVE_TICK_MS = 30000;
|
package/types/WuiSelect.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type AnchorOptions } from "./anchorOverlay.ts";
|
|
1
2
|
import { ElementBase } from "./elementBase.ts";
|
|
2
3
|
import type { ListboxKeyNav } from "./listboxKeyNav.ts";
|
|
3
4
|
import type { SelectOption } from "./select/option.ts";
|
|
@@ -27,15 +28,12 @@ export declare class WuiSelect extends ElementBase {
|
|
|
27
28
|
_defaultValue: string | string[] | undefined;
|
|
28
29
|
_warnedMode: string | null;
|
|
29
30
|
_warnedDensity: string | null | undefined;
|
|
30
|
-
_reposition: () => void;
|
|
31
31
|
_hoverTimer: ReturnType<typeof setTimeout> | null;
|
|
32
32
|
_hoverOpened: boolean;
|
|
33
33
|
_onHoverOver: (e: PointerEvent) => void;
|
|
34
34
|
_onHoverOut: (e: PointerEvent) => void;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
_reanchor?: (() => void) | null;
|
|
38
|
-
_reanchorScroll?: ((e: Event) => void) | null;
|
|
35
|
+
_panelShown: boolean;
|
|
36
|
+
_pressOpen: boolean | null;
|
|
39
37
|
static get observedAttributes(): string[];
|
|
40
38
|
constructor();
|
|
41
39
|
connectedCallback(): void;
|
|
@@ -96,7 +94,10 @@ export declare class WuiSelect extends ElementBase {
|
|
|
96
94
|
}): void;
|
|
97
95
|
_actionRows(): ActionRow[];
|
|
98
96
|
_recents(): Recents;
|
|
99
|
-
|
|
97
|
+
_menuPlacement(control: HTMLElement, menu: HTMLElement): AnchorOptions;
|
|
98
|
+
_anchorMenu(): void;
|
|
99
|
+
_showMenu(control: HTMLElement, menu: HTMLElement): void;
|
|
100
|
+
_onPanelClosed(): void;
|
|
100
101
|
_open({ focus }?: {
|
|
101
102
|
focus?: boolean;
|
|
102
103
|
}): void;
|
|
@@ -109,6 +110,7 @@ export declare class WuiSelect extends ElementBase {
|
|
|
109
110
|
_onKeyDown(e: KeyboardEvent): void;
|
|
110
111
|
_wire(): void;
|
|
111
112
|
_teardown(): void;
|
|
113
|
+
_dropMenu(): void;
|
|
112
114
|
_activePartsList(): SelectPart[];
|
|
113
115
|
_ensureParts(): void;
|
|
114
116
|
_mountParts(carry?: Carry): void;
|
package/types/WuiShortcuts.d.ts
CHANGED
|
@@ -4,6 +4,11 @@ export declare class WuiShortcuts extends ElementBase {
|
|
|
4
4
|
_onKeyDown: (e: KeyboardEvent) => void;
|
|
5
5
|
_onClick: (e: MouseEvent) => void;
|
|
6
6
|
_onDocClick: (e: MouseEvent) => void;
|
|
7
|
+
_onPointerDown: (e: PointerEvent) => void;
|
|
8
|
+
_onPressEnd: (e: PointerEvent) => void;
|
|
9
|
+
_pressedOpen: boolean;
|
|
10
|
+
_pinned: boolean;
|
|
11
|
+
_mirroring: boolean;
|
|
7
12
|
static get observedAttributes(): string[];
|
|
8
13
|
constructor();
|
|
9
14
|
connectedCallback(): void;
|
|
@@ -19,9 +24,9 @@ export declare class WuiShortcuts extends ElementBase {
|
|
|
19
24
|
setOpen(open: boolean, { focus }?: {
|
|
20
25
|
focus?: boolean;
|
|
21
26
|
}): void;
|
|
27
|
+
_mirror(open: boolean): void;
|
|
22
28
|
_sheet(): HTMLElement | null;
|
|
23
29
|
_syncTrigger(): void;
|
|
24
|
-
_place(): void;
|
|
25
30
|
_scope(): HTMLElement | null;
|
|
26
31
|
_items(): HTMLElement[];
|
|
27
32
|
_click(e: MouseEvent): void;
|
package/types/WuiSlider.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { type DigitGrouping } from "./digitGrouping.ts";
|
|
1
2
|
import { ElementBase } from "./elementBase.ts";
|
|
2
3
|
/**
|
|
3
|
-
* <wui-slider
|
|
4
|
+
* <wui-slider>: single-thumb and dual-thumb (range) slider control.
|
|
4
5
|
*
|
|
5
6
|
* Single-thumb mode: attributes `value` (current value), `min`/`max`/`step`, `name` (for form submission).
|
|
6
7
|
* Dual-thumb (range) mode: attributes `start`/`end` (range bounds), `start-name`/`end-name` for form submission.
|
|
@@ -24,9 +25,10 @@ import { ElementBase } from "./elementBase.ts";
|
|
|
24
25
|
* @property disabled Disables interaction
|
|
25
26
|
* @property readonly Shows the value without letting it change; the value still posts
|
|
26
27
|
* @property loading Locks interaction while the value is being fetched
|
|
27
|
-
* @property size Control size
|
|
28
|
+
* @property size Control size: 'sm' or 'lg'
|
|
28
29
|
* @property showValue Shows a label with current value
|
|
29
30
|
* @property unit Suffix for the value label (e.g. '%')
|
|
31
|
+
* @property grouping Digit grouping of the value label: 'none' (default) or 'indian' (1,50,000)
|
|
30
32
|
*/
|
|
31
33
|
export declare class WuiSlider extends ElementBase {
|
|
32
34
|
static formAssociated: boolean;
|
|
@@ -68,7 +70,7 @@ export declare class WuiSlider extends ElementBase {
|
|
|
68
70
|
_step(): number;
|
|
69
71
|
_clamp(val: number): number;
|
|
70
72
|
/**
|
|
71
|
-
* Snap a value to the nearest step increment, counted FROM min
|
|
73
|
+
* Snap a value to the nearest step increment, counted FROM min; a step grid anchored at 0
|
|
72
74
|
* lands on values the control can never legally hold (min=5 step=10 would snap 6 to 10).
|
|
73
75
|
*/
|
|
74
76
|
_snapToStep(val: number): number;
|
|
@@ -86,6 +88,7 @@ export declare class WuiSlider extends ElementBase {
|
|
|
86
88
|
* Format a value with optional unit suffix.
|
|
87
89
|
*/
|
|
88
90
|
_formatValue(val: number): string;
|
|
91
|
+
_grouping(): DigitGrouping;
|
|
89
92
|
/**
|
|
90
93
|
* Place the fill and the thumbs for the current value(s).
|
|
91
94
|
*
|
package/types/WuiTimePicker.d.ts
CHANGED
|
@@ -23,10 +23,8 @@ export declare class WuiTimePicker extends ElementBase {
|
|
|
23
23
|
focus?: boolean;
|
|
24
24
|
}) => void;
|
|
25
25
|
_close: (opts?: CloseOptions) => void;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
_onDocKey?: ((e: KeyboardEvent) => void) | null;
|
|
29
|
-
_onHostKey?: ((e: KeyboardEvent) => void) | null;
|
|
26
|
+
_revertOnClose: boolean;
|
|
27
|
+
_refocusOnClose: boolean;
|
|
30
28
|
static get observedAttributes(): string[];
|
|
31
29
|
constructor();
|
|
32
30
|
connectedCallback(): void;
|
|
@@ -59,10 +57,10 @@ export declare class WuiTimePicker extends ElementBase {
|
|
|
59
57
|
scroll?: boolean;
|
|
60
58
|
}): void;
|
|
61
59
|
_pick(key: string | undefined, v: string | undefined): void;
|
|
62
|
-
_position(): void;
|
|
63
60
|
_onColumnKey(e: KeyboardEvent): void;
|
|
64
61
|
_wire(): void;
|
|
65
62
|
_teardown(): void;
|
|
63
|
+
_endOpenColumns(): void;
|
|
66
64
|
disconnectedCallback(): void;
|
|
67
65
|
}
|
|
68
66
|
export {};
|
package/types/WuiTour.d.ts
CHANGED
|
@@ -103,6 +103,7 @@ export declare class WuiTour extends ElementBase {
|
|
|
103
103
|
_beforeStep(step: TourStep, index: number): Promise<void>;
|
|
104
104
|
_build(): void;
|
|
105
105
|
_active(): Element | null;
|
|
106
|
+
_raise(): void;
|
|
106
107
|
_show(located: LocatedStep): void;
|
|
107
108
|
_place(): void;
|
|
108
109
|
_follow(): void;
|
package/types/WuiTruncate.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* <wui-truncate>: shows the full text of a clipped `.wui-truncate-text` child. React AppTruncate and
|
|
3
3
|
* Razor <app-truncate> render the element around the clipped span; when the text really is cut
|
|
4
|
-
* (by width or by line count) the element sets `data-wui-
|
|
5
|
-
*
|
|
4
|
+
* (by width or by line count) the element sets `data-wui-tooltip` to the whole text, which the shared
|
|
5
|
+
* tooltip runtime shows on hover and keyboard focus, and makes itself focusable so a keyboard user
|
|
6
6
|
* can reach it. Text that fits gets neither. It re-measures when the box resizes or the text
|
|
7
7
|
* changes, and on hover.
|
|
8
8
|
*/
|
package/types/WuiWhatsNew.d.ts
CHANGED
|
@@ -5,8 +5,7 @@ export declare class WuiWhatsNew extends ElementBase {
|
|
|
5
5
|
_stored: string;
|
|
6
6
|
_observer: MutationObserver | null;
|
|
7
7
|
_onTriggerClick: () => void;
|
|
8
|
-
|
|
9
|
-
_onPointerDown: (e: PointerEvent) => void;
|
|
8
|
+
_closeFocus: boolean | null;
|
|
10
9
|
static get observedAttributes(): string[];
|
|
11
10
|
constructor();
|
|
12
11
|
get isOpen(): boolean;
|
|
@@ -18,7 +17,8 @@ export declare class WuiWhatsNew extends ElementBase {
|
|
|
18
17
|
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
19
18
|
open(): void;
|
|
20
19
|
close(returnFocus: boolean): void;
|
|
21
|
-
|
|
20
|
+
_closed(): void;
|
|
21
|
+
_settle(returnFocus: boolean): void;
|
|
22
22
|
_entries(): {
|
|
23
23
|
entry: HTMLElement;
|
|
24
24
|
date: string;
|
package/types/anchorOverlay.d.ts
CHANGED
|
@@ -5,12 +5,31 @@ export interface ReanchorHost {
|
|
|
5
5
|
export type ReanchoredElement = {
|
|
6
6
|
_reanchor: () => void;
|
|
7
7
|
};
|
|
8
|
+
export type OverlaySide = "top" | "bottom" | "start" | "end";
|
|
9
|
+
export interface AnchorOptions {
|
|
10
|
+
matchWidth?: boolean;
|
|
11
|
+
clampHeight?: boolean;
|
|
12
|
+
alignEnd?: boolean;
|
|
13
|
+
below?: boolean;
|
|
14
|
+
beside?: boolean;
|
|
15
|
+
/** The side of the trigger the panel sits on. "auto" takes the side with most room. A side that does not fit flips to its opposite. Unset keeps today's below-with-flip. start is left and end is right, as today. */
|
|
16
|
+
side?: OverlaySide | "auto";
|
|
17
|
+
/** Along the trigger's edge. Default "start". "center" is for tooltips and popovers. */
|
|
18
|
+
align?: "start" | "center" | "end";
|
|
19
|
+
/** When the panel aligned as asked would run past the viewport's inline end (or start), align it to the trigger's other edge instead, if that fits. Off by default. */
|
|
20
|
+
flipAlign?: boolean;
|
|
21
|
+
/** Gap between trigger and panel in px. Default 4. */
|
|
22
|
+
gap?: number;
|
|
23
|
+
/** The arrow inside the panel. It is placed at the trigger's centre, and the side chosen is written to panel.dataset.side. */
|
|
24
|
+
arrow?: HTMLElement | null;
|
|
25
|
+
}
|
|
8
26
|
/**
|
|
9
27
|
* Anchor `panel` to `trigger`, flipping above it when there is not enough room below.
|
|
10
28
|
*
|
|
11
29
|
* @param trigger the control the panel belongs to
|
|
12
30
|
* @param panel the floating panel, already visible so it can be measured
|
|
13
|
-
* @param opts `matchWidth`, `clampHeight`, `alignEnd`, `below` and `beside`, each optional and false by default
|
|
31
|
+
* @param opts `matchWidth`, `clampHeight`, `alignEnd`, `below` and `beside`, each optional and false by default;
|
|
32
|
+
* `side`, `align`, `gap` and `arrow` (see AnchorOptions).
|
|
14
33
|
* `below` never flips above, for a panel pinned open by an attribute: whether it flips depends on
|
|
15
34
|
* the viewport at upgrade time, so the same markup would open differently on each page.
|
|
16
35
|
* `matchWidth` ties the panel to the trigger's width: right for a menu that reads as part of
|
|
@@ -37,14 +56,11 @@ export type ReanchoredElement = {
|
|
|
37
56
|
* `beside` places the panel to the right of the trigger, top-aligned with it, and flips it to the
|
|
38
57
|
* left when the right side would overflow. It keeps the panel inside the viewport vertically and
|
|
39
58
|
* sets `data-side` to "end" or "start" for the side it chose. For a submenu opened from its row.
|
|
59
|
+
*
|
|
60
|
+
* `flipAlign` moves an aligned panel to the trigger's other edge when its own edge would run past the
|
|
61
|
+
* viewport, if the other edge fits. Off by default, so a caller that wants today's clamp is unchanged.
|
|
40
62
|
*/
|
|
41
|
-
export declare function anchorOverlay(trigger: Pick<HTMLElement, "getBoundingClientRect"
|
|
42
|
-
matchWidth?: boolean;
|
|
43
|
-
clampHeight?: boolean;
|
|
44
|
-
alignEnd?: boolean;
|
|
45
|
-
below?: boolean;
|
|
46
|
-
beside?: boolean;
|
|
47
|
-
}): void;
|
|
63
|
+
export declare function anchorOverlay(trigger: Pick<HTMLElement, "getBoundingClientRect">, panel: HTMLElement, opts?: AnchorOptions): void;
|
|
48
64
|
/**
|
|
49
65
|
* Keep an open panel anchored while the page moves under it.
|
|
50
66
|
*
|
package/types/codeHighlight.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The languages the block highlights; "text" shows the source as written. */
|
|
2
|
-
export declare const CODE_LANGUAGES: readonly ["text", "json", "js", "cs", "sql", "bash", "http", "html", "css"];
|
|
2
|
+
export declare const CODE_LANGUAGES: readonly ["text", "json", "js", "cs", "sql", "bash", "http", "html", "razor", "css"];
|
|
3
3
|
/** The name the block's header shows when it has no label. */
|
|
4
4
|
export declare const CODE_LANGUAGE_NAMES: Readonly<Record<(typeof CODE_LANGUAGES)[number], string>>;
|
|
5
5
|
/** Source longer than this is not tokenized. */
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** How a number value at rest is grouped: "indian" reads 15,00,000. */
|
|
2
|
+
export declare const DIGIT_GROUPINGS: readonly ["none", "indian"];
|
|
3
|
+
export type DigitGrouping = (typeof DIGIT_GROUPINGS)[number];
|
|
4
|
+
export declare const isDigitGrouping: (value: unknown) => value is DigitGrouping;
|
|
5
|
+
/** The message for a grouping that is not in DIGIT_GROUPINGS. */
|
|
6
|
+
export declare const groupingMessage: (grouping: unknown) => string;
|
|
7
|
+
/**
|
|
8
|
+
* Groups the integer digits of a plain number 3 then 2s from the right (1500000 reads 15,00,000),
|
|
9
|
+
* keeping the sign and the typed fraction exact. Text that is not a plain number is returned as it is.
|
|
10
|
+
*/
|
|
11
|
+
export declare function groupIndianDigits(text: string): string;
|