@pontive/pontkit-core 1.27.0 → 1.29.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/components/renderers/auth/scope-list/_scope-list.d.ts +1 -1
- package/dist/components/renderers/auth/scope-list/scope-list.types.d.ts +1 -1
- package/dist/components/widgets/pont-consent/consent-api.d.ts +1 -1
- package/dist/components/widgets/pont-consent/pont-consent.d.ts +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/pont2/core/controllers/action.d.ts +79 -0
- package/dist/pont2/core/controllers/copy.d.ts +34 -0
- package/dist/pont2/core/icons.d.ts +24 -16
- package/dist/pont2/core/index.d.ts +2 -0
- package/dist/pont2/core/names.d.ts +1 -1
- package/dist/pont2/globals.css +19 -7
- package/dist/pont2/index.mjs +3349 -1494
- package/dist/pont2/index.mjs.map +1 -1
- package/dist/pont2/kit/alert/alert.d.ts +2 -1
- package/dist/pont2/kit/auth-button/auth-button.d.ts +185 -0
- package/dist/pont2/kit/auth-button/providers.d.ts +15 -0
- package/dist/pont2/kit/auth-field/auth-field.d.ts +267 -0
- package/dist/pont2/kit/auth-field/password-field.d.ts +124 -0
- package/dist/pont2/kit/block/block.d.ts +66 -0
- package/dist/pont2/kit/block/branding.d.ts +36 -0
- package/dist/pont2/kit/container/container.d.ts +40 -0
- package/dist/pont2/kit/countdown/countdown.d.ts +64 -0
- package/dist/pont2/kit/divider/divider.d.ts +30 -0
- package/dist/pont2/kit/edit-identifier/edit-identifier.d.ts +47 -0
- package/dist/pont2/kit/flow-widget/flow-widget.d.ts +151 -0
- package/dist/pont2/kit/gap/gap.d.ts +36 -0
- package/dist/pont2/kit/header/header.d.ts +37 -0
- package/dist/pont2/kit/index.d.ts +23 -0
- package/dist/pont2/kit/input-otp/input-otp.d.ts +7 -0
- package/dist/pont2/kit/layout/flow-error.d.ts +21 -0
- package/dist/pont2/kit/layout/layout.d.ts +120 -0
- package/dist/pont2/kit/link/link.d.ts +64 -0
- package/dist/pont2/kit/logo/logo.d.ts +57 -0
- package/dist/pont2/kit/otp-field/otp-field.d.ts +93 -0
- package/dist/pont2/kit/otp-field/otp-resend.d.ts +63 -0
- package/dist/pont2/kit/provider-field/provider-field.d.ts +87 -0
- package/dist/pont2/kit/qr-code/qr-code.d.ts +87 -0
- package/dist/pont2/kit/recovery-codes/recovery-codes.d.ts +65 -0
- package/dist/pont2/kit/scope-list/scope-list.d.ts +69 -0
- package/dist/pont2/kit/scope-list/scope-value.d.ts +16 -0
- package/dist/pont2/kit/secret/secret.d.ts +67 -0
- package/dist/pont2/kit/story-helpers.d.ts +9 -0
- package/dist/pont2/kit/typography/typography.d.ts +74 -0
- package/dist/pont2/kit/watermark/pontive-logo.d.ts +8 -0
- package/dist/pont2/kit/watermark/watermark.d.ts +44 -0
- package/dist/pont2/primitives/card/card.d.ts +3 -1
- package/dist/pont2/primitives/dropdown-menu/dropdown-menu.d.ts +5 -0
- package/dist/pont2/primitives/popover/popover.d.ts +2 -0
- package/dist/pont2/primitives/tooltip/tooltip.d.ts +2 -0
- package/dist/pont2/styles.css +3042 -935
- package/dist/pont2/theme/apply.d.ts +29 -0
- package/dist/pont2/theme/compile.d.ts +23 -0
- package/dist/pont2/theme/index.d.ts +23 -0
- package/dist/pont2/theme/manifest.d.ts +2 -0
- package/dist/pont2/theme/scopes.d.ts +13 -0
- package/dist/pont2/theme/shadcn.d.ts +7 -0
- package/dist/pont2/theme/tokens.json.d.ts +7009 -0
- package/dist/pont2/theme/types.d.ts +92 -0
- package/dist/pont2/theme/validate.d.ts +11 -0
- package/dist/pont2/theme/value.d.ts +10 -0
- package/dist/pont2/theme/vocabulary.d.ts +32 -0
- package/dist/pont2/theme.mjs +337 -0
- package/dist/pont2/theme.mjs.map +1 -0
- package/dist/pont2/tokens.json +7006 -0
- package/dist/pont2/with-legacy.css +1 -1
- package/package.json +8 -2
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helpers for Storybook play functions (not part of the library build: nothing
|
|
3
|
+
* in src/index.ts imports this file).
|
|
4
|
+
*/
|
|
5
|
+
/** Replaces the clipboard for the duration of a play function. */
|
|
6
|
+
export declare function stubClipboard(): {
|
|
7
|
+
writes: string[];
|
|
8
|
+
restore: () => void;
|
|
9
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { PropertyDeclarations, TemplateResult } from 'lit';
|
|
2
|
+
import { ShellElement } from '../../core/host-element';
|
|
3
|
+
export type TitleLevel = "1" | "2" | "3" | "4";
|
|
4
|
+
export type TextAlign = "auto" | "start" | "center" | "end";
|
|
5
|
+
/**
|
|
6
|
+
* Title and subtitle: a heading and its supporting line.
|
|
7
|
+
*
|
|
8
|
+
* shadcn has no typography *components* (its typography page is classes), and
|
|
9
|
+
* its login blocks write `<h1 class="text-2xl font-bold">Welcome back</h1>
|
|
10
|
+
* <p class="text-muted-foreground text-balance">Login to your Acme Inc
|
|
11
|
+
* account</p>`. pont2 keeps the **native** `<h1>`–`<h4>` / `<p>` (document
|
|
12
|
+
* outline, heading navigation, reader modes), so these are Tier 3 shells:
|
|
13
|
+
* the host has no box (`display: contents`), the native element is styled.
|
|
14
|
+
*
|
|
15
|
+
* The text comes from `content` (the legacy attribute, and what render
|
|
16
|
+
* specs emit); a composite owns its children.
|
|
17
|
+
*/
|
|
18
|
+
declare abstract class TextShell extends ShellElement {
|
|
19
|
+
static composite: boolean;
|
|
20
|
+
static properties: PropertyDeclarations;
|
|
21
|
+
content: string;
|
|
22
|
+
align: TextAlign;
|
|
23
|
+
constructor();
|
|
24
|
+
get control(): HTMLElement | null;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* # `<pont2-title>`
|
|
28
|
+
*
|
|
29
|
+
* ```html
|
|
30
|
+
* <pont2-title level="1" content="Welcome back"></pont2-title>
|
|
31
|
+
* → <pont2-title data-pont2-shell><h1 data-pont2-title data-level="1" data-align="auto">Welcome back</h1></pont2-title>
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* Sizes follow shadcn's auth blocks: level 1 is the block heading (`text-2xl
|
|
35
|
+
* font-bold`), 2–4 step down (`text-xl`/`text-lg`/`text-base`, semibold).
|
|
36
|
+
*
|
|
37
|
+
* @tag pont2-title
|
|
38
|
+
* @attr level - 1 (default) | 2 | 3 | 4: the native heading level
|
|
39
|
+
* @attr content - the heading text
|
|
40
|
+
* @attr align - auto (default: inherit) | start | center | end
|
|
41
|
+
* @cssprop --pont2-title-fg, --pont2-title-font-weight - colour and weight (default foreground, semibold)
|
|
42
|
+
* @cssprop --pont2-title-h1-font-size … --pont2-title-h4-font-size - size per level (default text-2xl, -xl, -lg, -base)
|
|
43
|
+
* @cssprop --pont2-title-h1-font-weight - level 1 weight (default the title weight, else bold)
|
|
44
|
+
*/
|
|
45
|
+
export declare class Title extends TextShell {
|
|
46
|
+
static properties: PropertyDeclarations;
|
|
47
|
+
level: TitleLevel;
|
|
48
|
+
constructor();
|
|
49
|
+
render(): TemplateResult;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* # `<pont2-subtitle>`
|
|
53
|
+
*
|
|
54
|
+
* ```html
|
|
55
|
+
* <pont2-subtitle content="Login to your Acme Inc account"></pont2-subtitle>
|
|
56
|
+
* → <pont2-subtitle data-pont2-shell><p data-pont2-subtitle data-align="auto">…</p></pont2-subtitle>
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* shadcn's block description: `text-muted-foreground text-balance` (text-sm).
|
|
60
|
+
*
|
|
61
|
+
* @tag pont2-subtitle
|
|
62
|
+
* @attr content, align - as Title
|
|
63
|
+
* @cssprop --pont2-subtitle-fg, --pont2-subtitle-font-size - colour and size (default muted-foreground, text-sm)
|
|
64
|
+
*/
|
|
65
|
+
export declare class Subtitle extends TextShell {
|
|
66
|
+
render(): TemplateResult;
|
|
67
|
+
}
|
|
68
|
+
declare global {
|
|
69
|
+
interface HTMLElementTagNameMap {
|
|
70
|
+
"pont2-title": Title;
|
|
71
|
+
"pont2-subtitle": Subtitle;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Pontive logo (mark + wordmark), the same geometry as the legacy
|
|
3
|
+
* watermark. Pontive's own asset, so it is inlined (no image request) and the
|
|
4
|
+
* mark and wordmark can be coloured separately in CSS.
|
|
5
|
+
*/
|
|
6
|
+
export declare const PONTIVE_MARK: import('lit-html').TemplateResult<2>;
|
|
7
|
+
export declare const PONTIVE_WORDMARK: import('lit-html').TemplateResult<2>;
|
|
8
|
+
export declare const pontiveLogo: () => import('lit-html').TemplateResult<1>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { PropertyDeclarations, TemplateResult } from 'lit';
|
|
2
|
+
import { HostElement } from '../../core/host-element';
|
|
3
|
+
export type WatermarkVariant = "brand" | "theme" | "muted";
|
|
4
|
+
export type WatermarkLogoAlign = "start" | "end";
|
|
5
|
+
/** The watermark's content (label + logo), shared with the block's footer. */
|
|
6
|
+
export declare function watermarkContent(label: string, logoAlign: WatermarkLogoAlign): TemplateResult;
|
|
7
|
+
/**
|
|
8
|
+
* # `<pont2-watermark>`: "Powered by [Pontive]"
|
|
9
|
+
*
|
|
10
|
+
* ```html
|
|
11
|
+
* <pont2-watermark variant="muted"></pont2-watermark>
|
|
12
|
+
* → <pont2-watermark data-pont2-watermark data-slot="watermark" data-variant="muted">
|
|
13
|
+
* <span data-slot="watermark-label">Powered by</span><svg data-slot="watermark-logo" role="img" aria-label="Pontive">…</svg>
|
|
14
|
+
* </pont2-watermark>
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* Host-as-root (the legacy element wrapped a `<span>` in its tag). The block
|
|
18
|
+
* renders the same content as a *part* in its footer (`Watermark.part()` +
|
|
19
|
+
* `watermarkContent()`), so the screen shell needs no nested element.
|
|
20
|
+
*
|
|
21
|
+
* @tag pont2-watermark
|
|
22
|
+
* @attr variant - brand (default: the mark in Pontive indigo) | theme (currentColor) | muted (muted text)
|
|
23
|
+
* @attr logo-align - start | end (default)
|
|
24
|
+
* @attr label - default "Powered by"
|
|
25
|
+
* @cssprop --pont2-watermark-brand-icon-color - the mark in the brand variant (default #6366f1)
|
|
26
|
+
* @cssprop --pont2-watermark-muted-fg - text and mark in the muted variant (default muted-foreground)
|
|
27
|
+
*/
|
|
28
|
+
export declare class Watermark extends HostElement {
|
|
29
|
+
static identity: string;
|
|
30
|
+
static slotName: string;
|
|
31
|
+
static composite: boolean;
|
|
32
|
+
static properties: PropertyDeclarations;
|
|
33
|
+
variant: WatermarkVariant;
|
|
34
|
+
logoAlign: WatermarkLogoAlign;
|
|
35
|
+
label: string;
|
|
36
|
+
constructor();
|
|
37
|
+
protected willUpdate(): void;
|
|
38
|
+
render(): TemplateResult;
|
|
39
|
+
}
|
|
40
|
+
declare global {
|
|
41
|
+
interface HTMLElementTagNameMap {
|
|
42
|
+
"pont2-watermark": Watermark;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -10,7 +10,9 @@ export type CardSize = "default" | "sm";
|
|
|
10
10
|
*
|
|
11
11
|
* @tag pont2-prim-card
|
|
12
12
|
* @attr size - default | sm
|
|
13
|
-
* @cssprop --pont2-card-spacing - padding/gap unit (1.5rem
|
|
13
|
+
* @cssprop --pont2-card-spacing - padding/gap unit (default 1.5rem)
|
|
14
|
+
* @cssprop --pont2-card-sm-spacing - the same for size="sm" (default 1rem)
|
|
15
|
+
* @cssprop --pont2-card-bg, --pont2-card-fg, --pont2-card-border-color, --pont2-card-radius, --pont2-card-shadow - see docs/11-tokens.md
|
|
14
16
|
*/
|
|
15
17
|
export declare class Card extends HostElement {
|
|
16
18
|
static identity: string;
|
|
@@ -74,6 +74,11 @@ export declare class DropdownMenuTrigger extends PopupTrigger {
|
|
|
74
74
|
* @tag pont2-prim-dropdown-menu-content
|
|
75
75
|
* @attr side - bottom (default) … @attr align - start (default) …
|
|
76
76
|
* @attr side-offset - 4 @attr align-offset - 0
|
|
77
|
+
* @cssprop --pont2-dropdown-menu-bg, --pont2-dropdown-menu-fg, --pont2-dropdown-menu-border-color, --pont2-dropdown-menu-radius, --pont2-dropdown-menu-shadow - see docs/11-tokens.md
|
|
78
|
+
* @cssprop --pont2-dropdown-menu-min-width, --pont2-dropdown-menu-padding-x, --pont2-dropdown-menu-padding-y - sizes (defaults 8rem, 0.25rem, 0.25rem)
|
|
79
|
+
* @cssprop --pont2-dropdown-menu-sub-content-shadow - submenu shadow (default: the menu shadow token, else shadow-lg)
|
|
80
|
+
* @cssprop --pont2-dropdown-menu-item-radius, --pont2-dropdown-menu-item-bg-focus, --pont2-dropdown-menu-item-fg-focus - items, inherited from the content
|
|
81
|
+
* @cssprop --pont2-dropdown-menu-item-destructive-fg, --pont2-dropdown-menu-item-destructive-bg-focus - variant="destructive" items
|
|
77
82
|
*/
|
|
78
83
|
export declare class DropdownMenuContent extends PopupContent {
|
|
79
84
|
static identity: string;
|
|
@@ -47,6 +47,8 @@ export declare class PopoverTrigger extends PopupTrigger {
|
|
|
47
47
|
* @attr align - center (default) | start | end
|
|
48
48
|
* @attr side-offset - default 4
|
|
49
49
|
* @attr align-offset - default 0
|
|
50
|
+
* @cssprop --pont2-popover-bg, --pont2-popover-fg, --pont2-popover-border-color, --pont2-popover-radius, --pont2-popover-shadow - see docs/11-tokens.md
|
|
51
|
+
* @cssprop --pont2-popover-width, --pont2-popover-padding-x, --pont2-popover-padding-y, --pont2-popover-gap - sizes (defaults 18rem, 1rem, 1rem, 1rem)
|
|
50
52
|
*/
|
|
51
53
|
export declare class PopoverContent extends PopupContent {
|
|
52
54
|
static identity: string;
|
|
@@ -53,6 +53,8 @@ export declare class TooltipTrigger extends PopupTrigger {
|
|
|
53
53
|
* The tooltip popup (`role=tooltip`), `side="top"` by default.
|
|
54
54
|
*
|
|
55
55
|
* @tag pont2-prim-tooltip-content
|
|
56
|
+
* @cssprop --pont2-tooltip-bg, --pont2-tooltip-fg, --pont2-tooltip-radius - see docs/11-tokens.md (the arrow shares the background)
|
|
57
|
+
* @cssprop --pont2-tooltip-max-width, --pont2-tooltip-padding-x, --pont2-tooltip-padding-y - sizes (defaults 20rem, 0.75rem, 0.375rem)
|
|
56
58
|
*/
|
|
57
59
|
export declare class TooltipContent extends PopupContent {
|
|
58
60
|
static identity: string;
|