@pontive/pontkit-core 1.39.0 → 1.40.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/catalog.json +1 -1
- package/custom-elements.json +1 -1
- package/dist/index.js +1410 -1263
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14296 -12214
- package/dist/index.mjs.map +1 -1
- package/dist/pont2/core/context-root.d.ts +1 -0
- package/dist/pont2/core/events.d.ts +1 -1
- package/dist/pont2/core/icons.d.ts +6 -0
- package/dist/pont2/core/index.d.ts +1 -0
- package/dist/pont2/core/messages.d.ts +21 -0
- package/dist/pont2/core/popup/index.d.ts +1 -0
- package/dist/pont2/core/popup/modal.d.ts +56 -0
- package/dist/pont2/core/popup/popup-content.d.ts +7 -0
- package/dist/pont2/core/popup/story-helpers.d.ts +6 -0
- package/dist/pont2/custom-elements.json +42864 -18238
- package/dist/pont2/index.d.ts +7 -0
- package/dist/pont2/index.mjs +4434 -2359
- package/dist/pont2/index.mjs.map +1 -1
- package/dist/pont2/kit/badge-selector/badge-selector.d.ts +65 -0
- package/dist/pont2/kit/consent/consent.d.ts +3 -2
- package/dist/pont2/kit/data-table/data-table.d.ts +120 -0
- package/dist/pont2/kit/data-table/rows.d.ts +25 -0
- package/dist/pont2/kit/flow-widget/flow-widget.d.ts +21 -8
- package/dist/pont2/kit/index.d.ts +7 -0
- package/dist/pont2/kit/layout/layout.d.ts +7 -0
- package/dist/pont2/kit/multi-email-input/emails.d.ts +19 -0
- package/dist/pont2/kit/multi-email-input/multi-email-input.d.ts +78 -0
- package/dist/pont2/kit/multi-select-filter/multi-select-filter.d.ts +53 -0
- package/dist/pont2/kit/pagination/pagination.d.ts +61 -0
- package/dist/pont2/kit/pagination/range.d.ts +17 -0
- package/dist/pont2/kit/provider/coexistence.d.ts +19 -0
- package/dist/pont2/kit/provider/contexts.d.ts +46 -0
- package/dist/pont2/kit/provider/provider.d.ts +185 -0
- package/dist/pont2/kit/provider/redirect.d.ts +122 -0
- package/dist/pont2/kit/provider/runtime-config.d.ts +24 -0
- package/dist/pont2/kit/provider/sdk.d.ts +86 -0
- package/dist/pont2/kit/provider/signed-in.d.ts +81 -0
- package/dist/pont2/kit/provider/widget-messages.d.ts +35 -0
- package/dist/pont2/primitives/alert-dialog/alert-dialog.d.ts +132 -0
- package/dist/pont2/primitives/combobox/combobox.d.ts +82 -14
- package/dist/pont2/primitives/dialog/dialog.d.ts +195 -0
- package/dist/pont2/primitives/drawer/drawer.d.ts +112 -0
- package/dist/pont2/primitives/hover-card/hover-card.d.ts +83 -0
- package/dist/pont2/primitives/pagination/pagination.d.ts +120 -0
- package/dist/pont2/primitives/sheet/sheet.d.ts +92 -0
- package/dist/pont2/primitives/sonner/sonner.d.ts +86 -0
- package/dist/pont2/primitives/sonner/toast-store.d.ts +81 -0
- package/dist/pont2/styles.css +1322 -75
- package/dist/pont2/theme/tokens.json.d.ts +700 -1
- package/dist/pont2/theme-golden.json +45 -45
- package/dist/pont2/theme.mjs +119 -119
- package/dist/pont2/tokens.json +700 -1
- package/dist/styles.css +1323 -76
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function attachContextRoot(root?: Element | undefined): void;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export declare function fireNative(target: EventTarget, type: "input" | "change"): void;
|
|
18
18
|
export declare function fire<T>(target: EventTarget, type: `pont2-${string}`, detail: T, cancelable?: boolean): boolean;
|
|
19
|
-
export type OpenChangeReason = "trigger-press" | "trigger-hover" | "trigger-focus" | "outside-press" | "escape-key" | "item-press" | "list-navigation" | "input-change" | "focus-out" | "imperative";
|
|
19
|
+
export type OpenChangeReason = "trigger-press" | "trigger-hover" | "trigger-focus" | "outside-press" | "escape-key" | "item-press" | "list-navigation" | "input-change" | "focus-out" | "close-press" | "imperative";
|
|
20
20
|
export interface OpenChangeDetail {
|
|
21
21
|
open: boolean;
|
|
22
22
|
reason: OpenChangeReason;
|
|
@@ -9,8 +9,14 @@ export declare const icons: {
|
|
|
9
9
|
chevronRight: (a?: AttrMap) => TemplateResult<1>;
|
|
10
10
|
chevronLeft: (a?: AttrMap) => TemplateResult<1>;
|
|
11
11
|
chevronsUpDown: (a?: AttrMap) => TemplateResult<1>;
|
|
12
|
+
ellipsis: (a?: AttrMap) => TemplateResult<1>;
|
|
13
|
+
arrowUp: (a?: AttrMap) => TemplateResult<1>;
|
|
14
|
+
arrowDown: (a?: AttrMap) => TemplateResult<1>;
|
|
15
|
+
arrowUpDown: (a?: AttrMap) => TemplateResult<1>;
|
|
16
|
+
listFilter: (a?: AttrMap) => TemplateResult<1>;
|
|
12
17
|
search: (a?: AttrMap) => TemplateResult<1>;
|
|
13
18
|
circle: (a?: AttrMap) => TemplateResult<1>;
|
|
19
|
+
octagonX: (a?: AttrMap) => TemplateResult<1>;
|
|
14
20
|
loaderCircle: (a?: AttrMap) => TemplateResult<1>;
|
|
15
21
|
circleAlert: (a?: AttrMap) => TemplateResult<1>;
|
|
16
22
|
circleX: (a?: AttrMap) => TemplateResult<1>;
|
|
@@ -39,6 +39,27 @@ export declare const KIT_MESSAGES_EN: {
|
|
|
39
39
|
readonly show_password: "Show password";
|
|
40
40
|
readonly hide_password: "Hide password";
|
|
41
41
|
readonly loading: "Loading";
|
|
42
|
+
readonly action_close: "Close";
|
|
43
|
+
readonly action_remove: "Remove";
|
|
44
|
+
readonly notifications: "Notifications";
|
|
45
|
+
readonly pagination: "Pagination";
|
|
46
|
+
readonly pagination_previous: "Previous";
|
|
47
|
+
readonly pagination_next: "Next";
|
|
48
|
+
readonly pagination_previous_page: "Go to previous page";
|
|
49
|
+
readonly pagination_next_page: "Go to next page";
|
|
50
|
+
readonly pagination_more: "More pages";
|
|
51
|
+
readonly no_results: "No results.";
|
|
52
|
+
readonly actions_menu: "Actions";
|
|
53
|
+
readonly sort_ascending: "Sort ascending";
|
|
54
|
+
readonly sort_descending: "Sort descending";
|
|
55
|
+
readonly filter: "Filter";
|
|
56
|
+
readonly clear_filters: "Clear filters";
|
|
57
|
+
readonly invalid_emails: "Not valid email addresses:";
|
|
58
|
+
readonly email_limit_reached: "No more addresses can be added.";
|
|
59
|
+
readonly invite_emails_placeholder: "Type or paste email addresses";
|
|
60
|
+
readonly invite_emails_required: "Enter at least one email address.";
|
|
61
|
+
readonly search_roles: "Search roles";
|
|
62
|
+
readonly no_options: "Nothing found.";
|
|
42
63
|
};
|
|
43
64
|
export type KitMessageCode = keyof typeof KIT_MESSAGES_EN;
|
|
44
65
|
/**
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* # Modal machinery: what Base UI's `modal` dialogs do beyond a popup
|
|
3
|
+
*
|
|
4
|
+
* Dialog, AlertDialog, Sheet and Drawer are popups (`PopupContent`: the top
|
|
5
|
+
* layer through the Popover API, the shared Escape / outside-press stack) that
|
|
6
|
+
* are also **modal**. Base UI gives a modal popup four extra behaviours, and
|
|
7
|
+
* each is one function here, so every modal surface shares them:
|
|
8
|
+
*
|
|
9
|
+
* | Base UI behaviour | Here |
|
|
10
|
+
* |------------------------------|-------------------------|
|
|
11
|
+
* | the page behind is inert | `inertOthers(keep)` |
|
|
12
|
+
* | the page does not scroll | `lockScroll()` |
|
|
13
|
+
* | Tab cycles inside the popup | `trapFocus(container)` |
|
|
14
|
+
* | initial / final focus | `tabbables()`, `initialFocusOf()` |
|
|
15
|
+
*
|
|
16
|
+
* Each returns its undo, so a root opens with `release = [a(), b(), c()]` and
|
|
17
|
+
* closes with `release.forEach(f => f())`. All of them nest: a dialog opened
|
|
18
|
+
* from a dialog keeps the outer one inert behind it, and closing the inner
|
|
19
|
+
* one restores exactly what it changed.
|
|
20
|
+
*
|
|
21
|
+
* Why not a native `<dialog>`: the host is the component's root
|
|
22
|
+
* (host-as-root), so the popup is the custom element itself, and a custom
|
|
23
|
+
* element cannot be a `<dialog>`. `showModal()` would also make every other
|
|
24
|
+
* top-layer element (a toast, a popup opened from inside) inert, which Base
|
|
25
|
+
* UI does not.
|
|
26
|
+
*/
|
|
27
|
+
/** Elements inside `root`, in tab order position, that Tab can reach (tabindex ≥ 0, visible, not inert). */
|
|
28
|
+
export declare function tabbables(root: Element): HTMLElement[];
|
|
29
|
+
/**
|
|
30
|
+
* Where focus goes when a modal opens (Base UI `initialFocus` default): an
|
|
31
|
+
* element marked `autofocus`, else the first tabbable element, else the popup.
|
|
32
|
+
*/
|
|
33
|
+
export declare function initialFocusOf(popup: HTMLElement): HTMLElement;
|
|
34
|
+
/**
|
|
35
|
+
* Makes everything outside `keep` inert: every sibling of `keep` and of each
|
|
36
|
+
* of its ancestors up to `<body>` (what `aria-hidden`'s `hideOthers` does,
|
|
37
|
+
* with `inert` so it also blocks focus and pointer input). The popup stays
|
|
38
|
+
* where the author wrote it, so its ancestors cannot be made inert
|
|
39
|
+
* themselves; their other children are. Elements the author already made
|
|
40
|
+
* inert are left alone and stay inert afterwards.
|
|
41
|
+
*/
|
|
42
|
+
export declare function inertOthers(keep: Element[]): () => void;
|
|
43
|
+
/**
|
|
44
|
+
* Stops the page scrolling while a modal is open (Base UI's scroll lock).
|
|
45
|
+
* The scrollbar's width is kept as padding, so the page does not shift
|
|
46
|
+
* sideways. Reference-counted: nested modals unlock once, when the last one
|
|
47
|
+
* closes.
|
|
48
|
+
*/
|
|
49
|
+
export declare function lockScroll(): () => void;
|
|
50
|
+
/**
|
|
51
|
+
* Tab and Shift+Tab cycle through the tabbable elements of the top-most
|
|
52
|
+
* trapping container (Base UI's `FloatingFocusManager` with `modal`). Focus
|
|
53
|
+
* that lands outside it (a programmatic `focus()` on an exempt element is
|
|
54
|
+
* the only way, since the rest of the page is inert) is brought back.
|
|
55
|
+
*/
|
|
56
|
+
export declare function trapFocus(container: HTMLElement): () => void;
|
|
@@ -53,6 +53,13 @@ export declare abstract class PopupContent extends HostElement {
|
|
|
53
53
|
connectedCallback(): void;
|
|
54
54
|
disconnectedCallback(): void;
|
|
55
55
|
get isOpen(): boolean;
|
|
56
|
+
/** A modal popup (Dialog, Sheet …): an outside press reaches it and nothing below it. */
|
|
57
|
+
get isModal(): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Whether the popup is anchored to an element. Modal surfaces (Dialog,
|
|
60
|
+
* Sheet, Drawer) and the toaster lay themselves out in CSS and return false.
|
|
61
|
+
*/
|
|
62
|
+
protected get anchored(): boolean;
|
|
56
63
|
/** Select overrides this to lay the selected item over the trigger. */
|
|
57
64
|
protected alignItem(): HTMLElement | null;
|
|
58
65
|
/** True if the event path is inside this popup or one of its inside elements. */
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Resolves once `popup` is open and its enter animation has finished. */
|
|
2
|
+
export declare function opened(popup: HTMLElement): Promise<void>;
|
|
3
|
+
/** Resolves once `popup` has left the top layer (its exit animation done). */
|
|
4
|
+
export declare function closed(popup: HTMLElement): Promise<void>;
|
|
5
|
+
/** Resolves once every running animation in the document has finished (none may be infinite). */
|
|
6
|
+
export declare function settle(): Promise<void>;
|