@pontive/pontkit-core 1.26.0 → 1.28.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.
Files changed (93) hide show
  1. package/catalog.json +1 -1
  2. package/custom-elements.json +1 -1
  3. package/dist/pont2/core/attrs.d.ts +22 -0
  4. package/dist/pont2/core/controllers/action.d.ts +79 -0
  5. package/dist/pont2/core/controllers/copy.d.ts +34 -0
  6. package/dist/pont2/core/controllers/roving-focus.d.ts +38 -0
  7. package/dist/pont2/core/events.d.ts +28 -0
  8. package/dist/pont2/core/form-control.d.ts +70 -0
  9. package/dist/pont2/core/host-element.d.ts +129 -0
  10. package/dist/pont2/core/icons.d.ts +28 -0
  11. package/dist/pont2/core/ids.d.ts +6 -0
  12. package/dist/pont2/core/index.d.ts +10 -0
  13. package/dist/pont2/core/names.d.ts +78 -0
  14. package/dist/pont2/core/popup/anchored.d.ts +48 -0
  15. package/dist/pont2/core/popup/index.d.ts +5 -0
  16. package/dist/pont2/core/popup/list.d.ts +38 -0
  17. package/dist/pont2/core/popup/popup-content.d.ts +68 -0
  18. package/dist/pont2/core/popup/popup-root.d.ts +94 -0
  19. package/dist/pont2/core/popup/position.d.ts +73 -0
  20. package/dist/pont2/globals.css +109 -0
  21. package/dist/pont2/index.d.ts +44 -0
  22. package/dist/pont2/index.mjs +5660 -0
  23. package/dist/pont2/index.mjs.map +1 -0
  24. package/dist/pont2/kit/alert/alert.d.ts +62 -0
  25. package/dist/pont2/kit/aliases.d.ts +33 -0
  26. package/dist/pont2/kit/auth-button/auth-button.d.ts +185 -0
  27. package/dist/pont2/kit/auth-button/providers.d.ts +15 -0
  28. package/dist/pont2/kit/auth-field/auth-field.d.ts +267 -0
  29. package/dist/pont2/kit/auth-field/password-field.d.ts +124 -0
  30. package/dist/pont2/kit/avatar/avatar.d.ts +52 -0
  31. package/dist/pont2/kit/block/block.d.ts +64 -0
  32. package/dist/pont2/kit/block/branding.d.ts +36 -0
  33. package/dist/pont2/kit/container/container.d.ts +40 -0
  34. package/dist/pont2/kit/countdown/countdown.d.ts +64 -0
  35. package/dist/pont2/kit/divider/divider.d.ts +30 -0
  36. package/dist/pont2/kit/edit-identifier/edit-identifier.d.ts +47 -0
  37. package/dist/pont2/kit/flow-widget/flow-widget.d.ts +151 -0
  38. package/dist/pont2/kit/gap/gap.d.ts +36 -0
  39. package/dist/pont2/kit/header/header.d.ts +37 -0
  40. package/dist/pont2/kit/index.d.ts +26 -0
  41. package/dist/pont2/kit/input-otp/input-otp.d.ts +59 -0
  42. package/dist/pont2/kit/layout/flow-error.d.ts +21 -0
  43. package/dist/pont2/kit/layout/layout.d.ts +120 -0
  44. package/dist/pont2/kit/link/link.d.ts +62 -0
  45. package/dist/pont2/kit/logo/logo.d.ts +57 -0
  46. package/dist/pont2/kit/otp-field/otp-field.d.ts +93 -0
  47. package/dist/pont2/kit/otp-field/otp-resend.d.ts +61 -0
  48. package/dist/pont2/kit/provider-field/provider-field.d.ts +87 -0
  49. package/dist/pont2/kit/qr-code/qr-code.d.ts +86 -0
  50. package/dist/pont2/kit/recovery-codes/recovery-codes.d.ts +64 -0
  51. package/dist/pont2/kit/scope-list/scope-list.d.ts +69 -0
  52. package/dist/pont2/kit/scope-list/scope-value.d.ts +16 -0
  53. package/dist/pont2/kit/secret/secret.d.ts +67 -0
  54. package/dist/pont2/kit/story-helpers.d.ts +9 -0
  55. package/dist/pont2/kit/typography/typography.d.ts +70 -0
  56. package/dist/pont2/kit/watermark/pontive-logo.d.ts +8 -0
  57. package/dist/pont2/kit/watermark/watermark.d.ts +42 -0
  58. package/dist/pont2/primitives/alert/alert.d.ts +49 -0
  59. package/dist/pont2/primitives/avatar/avatar.d.ts +89 -0
  60. package/dist/pont2/primitives/badge/badge.d.ts +30 -0
  61. package/dist/pont2/primitives/button/button.d.ts +113 -0
  62. package/dist/pont2/primitives/button-group/button-group.d.ts +55 -0
  63. package/dist/pont2/primitives/card/card.d.ts +63 -0
  64. package/dist/pont2/primitives/checkbox/checkbox.d.ts +54 -0
  65. package/dist/pont2/primitives/combobox/combobox.d.ts +213 -0
  66. package/dist/pont2/primitives/dropdown-menu/dropdown-menu.d.ts +267 -0
  67. package/dist/pont2/primitives/empty/empty.d.ts +60 -0
  68. package/dist/pont2/primitives/field/field.d.ts +146 -0
  69. package/dist/pont2/primitives/input/input.d.ts +47 -0
  70. package/dist/pont2/primitives/input-group/input-group.d.ts +97 -0
  71. package/dist/pont2/primitives/input-otp/input-otp.d.ts +121 -0
  72. package/dist/pont2/primitives/input-otp/otp.d.ts +22 -0
  73. package/dist/pont2/primitives/item/item.d.ts +100 -0
  74. package/dist/pont2/primitives/kbd/kbd.d.ts +29 -0
  75. package/dist/pont2/primitives/label/label.d.ts +37 -0
  76. package/dist/pont2/primitives/native-select/native-select.d.ts +59 -0
  77. package/dist/pont2/primitives/popover/popover.d.ts +85 -0
  78. package/dist/pont2/primitives/progress/progress.d.ts +80 -0
  79. package/dist/pont2/primitives/radio-group/radio-group.d.ts +93 -0
  80. package/dist/pont2/primitives/select/select.d.ts +184 -0
  81. package/dist/pont2/primitives/separator/separator.d.ts +34 -0
  82. package/dist/pont2/primitives/skeleton/skeleton.d.ts +18 -0
  83. package/dist/pont2/primitives/slider/slider-math.d.ts +42 -0
  84. package/dist/pont2/primitives/slider/slider.d.ts +85 -0
  85. package/dist/pont2/primitives/spinner/spinner.d.ts +29 -0
  86. package/dist/pont2/primitives/switch/switch.d.ts +55 -0
  87. package/dist/pont2/primitives/table/table.d.ts +55 -0
  88. package/dist/pont2/primitives/tabs/tabs.d.ts +126 -0
  89. package/dist/pont2/primitives/textarea/textarea.d.ts +41 -0
  90. package/dist/pont2/primitives/tooltip/tooltip.d.ts +69 -0
  91. package/dist/pont2/styles.css +4839 -0
  92. package/dist/pont2/with-legacy.css +10 -0
  93. package/package.json +16 -4
@@ -0,0 +1,121 @@
1
+ import { PropertyDeclarations, PropertyValues } from 'lit';
2
+ import { HostElement } from '../../core/host-element';
3
+ import { OtpSlotState } from './otp';
4
+ export { REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS } from './otp';
5
+ export interface OtpCompleteDetail {
6
+ value: string;
7
+ }
8
+ /**
9
+ * # InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator
10
+ *
11
+ * shadcn wraps the `input-otp` library: a container `div` holding the author's
12
+ * groups/slots plus ONE real `<input>` stretched transparently over them; the
13
+ * slots only *draw* the characters and a fake caret.
14
+ * ```
15
+ * shadcn: div.cn-input-otp > [InputOTPGroup > InputOTPSlot ×n, InputOTPSeparator] + div > input[data-slot=input-otp]
16
+ * pont2: pont2-prim-input-otp > [pont2-prim-input-otp-group > pont2-prim-input-otp-slot ×n, pont2-prim-input-otp-separator] + div > input[data-slot=input-otp]
17
+ * ```
18
+ * Same shape, same reason: the single native `<input autocomplete="one-time-code">`
19
+ * is what SMS autofill (iOS/Android), password managers, paste and form
20
+ * submission need. It is a Tier 3 core inside a Tier 1 container; the slots
21
+ * are Tier 1 hosts the container pushes state into.
22
+ *
23
+ * The input is rendered by the host (after the author's children, where
24
+ * input-otp puts it), so the author never writes it; `name`, `required`,
25
+ * `disabled`, `autocomplete`, `inputmode`, `pattern` and the ARIA naming
26
+ * attributes are forwarded to it.
27
+ *
28
+ * @tag pont2-prim-input-otp
29
+ * @attr maxlength - Number of characters (default 6).
30
+ * @attr pattern - Per-character regex source (default `^\d+$`, digits). `pattern=""` accepts anything.
31
+ * @attr value - Default value; `.value` is live.
32
+ * @attr name, required, disabled, autocomplete (one-time-code), inputmode, input-id
33
+ * @fires input, change - Native events from the inner input (bubble through the host).
34
+ * @fires pont2-complete - `{ value }` when every slot is filled (input-otp `onComplete`).
35
+ */
36
+ export declare class InputOTP extends HostElement {
37
+ static identity: string;
38
+ static properties: PropertyDeclarations;
39
+ maxLength: number;
40
+ pattern: string | null;
41
+ defaultValue: string | null;
42
+ name: string | null;
43
+ required: boolean;
44
+ disabled: boolean;
45
+ autocomplete: string;
46
+ /** Forwarded to the input as `inputmode` (named so it does not shadow HTMLElement.inputMode). */
47
+ keyboardMode: string | null;
48
+ inputId: string | null;
49
+ protected current: string;
50
+ protected forwarded: Record<string, string | null>;
51
+ private dirty;
52
+ private focused;
53
+ private observer?;
54
+ constructor();
55
+ /** The native input (the real form control). */
56
+ get input(): HTMLInputElement | null;
57
+ get value(): string;
58
+ set value(v: string);
59
+ focus(options?: FocusOptions): void;
60
+ connectedCallback(): void;
61
+ disconnectedCallback(): void;
62
+ private readForwarded;
63
+ private get slots();
64
+ /** Push per-slot state into the slot elements. */
65
+ private syncSlots;
66
+ private setFromInput;
67
+ private onInput;
68
+ private onPaste;
69
+ private placeCaret;
70
+ private onFocus;
71
+ private onBlur;
72
+ private onSelectionChange;
73
+ protected willUpdate(changed: PropertyValues): void;
74
+ protected updated(): void;
75
+ render(): import('lit-html').TemplateResult<1>;
76
+ }
77
+ /**
78
+ * @tag pont2-prim-input-otp-group
79
+ */
80
+ export declare class InputOTPGroup extends HostElement {
81
+ static identity: string;
82
+ static slotName: string;
83
+ }
84
+ /**
85
+ * Draws one character (and the fake caret). Purely visual: the native input
86
+ * is what assistive technology and autofill interact with.
87
+ *
88
+ * @tag pont2-prim-input-otp-slot
89
+ * @attr index - Character position; defaults to the slot's order in the InputOTP.
90
+ */
91
+ export declare class InputOTPSlot extends HostElement {
92
+ static identity: string;
93
+ static slotName: string;
94
+ static properties: PropertyDeclarations;
95
+ protected state: OtpSlotState;
96
+ constructor();
97
+ connectedCallback(): void;
98
+ /** @internal Called by the InputOTP. */
99
+ sync(state: OtpSlotState, invalid: boolean): void;
100
+ render(): import('lit-html').TemplateResult<1>;
101
+ }
102
+ /**
103
+ * @tag pont2-prim-input-otp-separator
104
+ */
105
+ export declare class InputOTPSeparator extends HostElement {
106
+ static identity: string;
107
+ static slotName: string;
108
+ static role: string;
109
+ render(): import('lit-html').TemplateResult<1>;
110
+ }
111
+ declare global {
112
+ interface HTMLElementTagNameMap {
113
+ "pont2-prim-input-otp": InputOTP;
114
+ "pont2-prim-input-otp-group": InputOTPGroup;
115
+ "pont2-prim-input-otp-slot": InputOTPSlot;
116
+ "pont2-prim-input-otp-separator": InputOTPSeparator;
117
+ }
118
+ interface HTMLElementEventMap {
119
+ "pont2-complete": CustomEvent<OtpCompleteDetail>;
120
+ }
121
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Pure InputOTP helpers (no DOM), unit-tested in node.
3
+ *
4
+ * `pattern` is a whole-string regular expression source, like the input-otp
5
+ * library's `REGEXP_ONLY_DIGITS` (`^\d+$`); each character is tested on its
6
+ * own, so pasted "123-456" or "12 34 56" is cleaned to "123456".
7
+ */
8
+ export declare const REGEXP_ONLY_DIGITS = "^\\d+$";
9
+ export declare const REGEXP_ONLY_CHARS = "^[a-zA-Z]+$";
10
+ export declare const REGEXP_ONLY_DIGITS_AND_CHARS = "^[a-zA-Z0-9]+$";
11
+ export declare function sanitizeOtp(raw: string, maxLength: number, pattern?: string | null): string;
12
+ export interface OtpSlotState {
13
+ char: string | null;
14
+ isActive: boolean;
15
+ hasFakeCaret: boolean;
16
+ }
17
+ /**
18
+ * Per-slot state, as input-otp computes it: while focused, the slot(s) under
19
+ * the selection are active; a collapsed selection on an empty slot shows the
20
+ * fake caret. A full value with the caret at the end activates the last slot.
21
+ */
22
+ export declare function otpSlots(value: string, maxLength: number, focused: boolean, selStart: number | null, selEnd: number | null): OtpSlotState[];
@@ -0,0 +1,100 @@
1
+ import { PropertyDeclarations } from 'lit';
2
+ import { HostElement } from '../../core/host-element';
3
+ import { Separator } from '../separator/separator';
4
+ export type ItemVariant = "default" | "outline" | "muted";
5
+ export type ItemSize = "default" | "sm" | "xs";
6
+ export type ItemMediaVariant = "default" | "icon" | "image";
7
+ /**
8
+ * # Item family: Tier 1 (structural)
9
+ *
10
+ * shadcn: `ItemGroup` (`div role="list"`), `Item` (Base UI `useRender`, a div
11
+ * by default, or the author's `<a>` through `render`), `ItemMedia`,
12
+ * `ItemContent`, `ItemTitle`, `ItemDescription` (a `p`), `ItemActions`,
13
+ * `ItemHeader`, `ItemFooter`, and `ItemSeparator` (a `Separator`).
14
+ *
15
+ * pont2: every part is host-as-root. A link item is the recipe on a real
16
+ * anchor: `<a data-pont2-item data-variant="outline" href="…">`.
17
+ * `ItemSeparator extends Separator`, so it *is* a separator (one node, role
18
+ * separator) that keeps the separator look and adds `data-slot="item-separator"`.
19
+ */
20
+ /** @tag pont2-prim-item-group */
21
+ export declare class ItemGroup extends HostElement {
22
+ static identity: string;
23
+ static slotName: string;
24
+ static role: string;
25
+ }
26
+ /** @tag pont2-prim-item-separator */
27
+ export declare class ItemSeparator extends Separator {
28
+ static identity: string;
29
+ static slotName: string;
30
+ }
31
+ /**
32
+ * @tag pont2-prim-item
33
+ * @attr variant - default | outline | muted
34
+ * @attr size - default | sm | xs
35
+ */
36
+ export declare class Item extends HostElement {
37
+ static identity: string;
38
+ static slotName: string;
39
+ static properties: PropertyDeclarations;
40
+ variant: ItemVariant;
41
+ size: ItemSize;
42
+ constructor();
43
+ protected willUpdate(): void;
44
+ }
45
+ /**
46
+ * @tag pont2-prim-item-media
47
+ * @attr variant - default | icon | image
48
+ */
49
+ export declare class ItemMedia extends HostElement {
50
+ static identity: string;
51
+ static slotName: string;
52
+ static properties: PropertyDeclarations;
53
+ variant: ItemMediaVariant;
54
+ constructor();
55
+ protected willUpdate(): void;
56
+ }
57
+ /** @tag pont2-prim-item-content */
58
+ export declare class ItemContent extends HostElement {
59
+ static identity: string;
60
+ static slotName: string;
61
+ }
62
+ /** @tag pont2-prim-item-title */
63
+ export declare class ItemTitle extends HostElement {
64
+ static identity: string;
65
+ static slotName: string;
66
+ }
67
+ /** @tag pont2-prim-item-description */
68
+ export declare class ItemDescription extends HostElement {
69
+ static identity: string;
70
+ static slotName: string;
71
+ }
72
+ /** @tag pont2-prim-item-actions */
73
+ export declare class ItemActions extends HostElement {
74
+ static identity: string;
75
+ static slotName: string;
76
+ }
77
+ /** @tag pont2-prim-item-header */
78
+ export declare class ItemHeader extends HostElement {
79
+ static identity: string;
80
+ static slotName: string;
81
+ }
82
+ /** @tag pont2-prim-item-footer */
83
+ export declare class ItemFooter extends HostElement {
84
+ static identity: string;
85
+ static slotName: string;
86
+ }
87
+ declare global {
88
+ interface HTMLElementTagNameMap {
89
+ "pont2-prim-item-group": ItemGroup;
90
+ "pont2-prim-item-separator": ItemSeparator;
91
+ "pont2-prim-item": Item;
92
+ "pont2-prim-item-media": ItemMedia;
93
+ "pont2-prim-item-content": ItemContent;
94
+ "pont2-prim-item-title": ItemTitle;
95
+ "pont2-prim-item-description": ItemDescription;
96
+ "pont2-prim-item-actions": ItemActions;
97
+ "pont2-prim-item-header": ItemHeader;
98
+ "pont2-prim-item-footer": ItemFooter;
99
+ }
100
+ }
@@ -0,0 +1,29 @@
1
+ import { HostElement } from '../../core/host-element';
2
+ /**
3
+ * # Kbd, KbdGroup: Tier 1 (structural)
4
+ *
5
+ * shadcn: `<Kbd>` → `<kbd data-slot="kbd">`; `<KbdGroup>` → `<kbd data-slot="kbd-group">`.
6
+ *
7
+ * pont2: the host is the key cap. `<kbd>` has no implicit ARIA role, so a
8
+ * custom element loses no semantics here. (If you need the literal element,
9
+ * use the recipe: `<kbd data-pont2-kbd>⌘</kbd>`.)
10
+ *
11
+ * @tag pont2-prim-kbd
12
+ */
13
+ export declare class Kbd extends HostElement {
14
+ static identity: string;
15
+ static slotName: string;
16
+ }
17
+ /**
18
+ * @tag pont2-prim-kbd-group
19
+ */
20
+ export declare class KbdGroup extends HostElement {
21
+ static identity: string;
22
+ static slotName: string;
23
+ }
24
+ declare global {
25
+ interface HTMLElementTagNameMap {
26
+ "pont2-prim-kbd": Kbd;
27
+ "pont2-prim-kbd-group": KbdGroup;
28
+ }
29
+ }
@@ -0,0 +1,37 @@
1
+ import { AttrMap } from '../../core/attrs';
2
+ import { NativeEnhancer } from '../../core/host-element';
3
+ /**
4
+ * # Label: Tier 3 (native-bound)
5
+ *
6
+ * shadcn: `<Label>` → a native `<label data-slot="label">`.
7
+ *
8
+ * It must be a real `<label>`: `for=` association, click-to-focus, and
9
+ * labelling form-associated custom elements (Checkbox, Switch …) only work
10
+ * on the native element. So:
11
+ *
12
+ * - recipe: `<label data-pont2-label for="email">Email</label>`
13
+ * - part: `label({ for: "email" }, "Email")`
14
+ * - enhancer: `<pont2-prim-label><label for="email">Email</label></pont2-prim-label>`
15
+ */
16
+ export interface LabelOptions {
17
+ for?: string;
18
+ id?: string;
19
+ slot?: string;
20
+ /** Extra identities, e.g. FieldLabel passes `["field-label"]`. */
21
+ identities?: string[];
22
+ attrs?: AttrMap;
23
+ }
24
+ export declare function applyLabel(el: HTMLLabelElement, slot?: string): void;
25
+ export declare function label(o: LabelOptions, content: unknown): import('lit-html').TemplateResult<1>;
26
+ /**
27
+ * @tag pont2-prim-label
28
+ */
29
+ export declare class Pont2Label extends NativeEnhancer<HTMLLabelElement> {
30
+ static nativeSelector: string;
31
+ protected apply(control: HTMLLabelElement): void;
32
+ }
33
+ declare global {
34
+ interface HTMLElementTagNameMap {
35
+ "pont2-prim-label": Pont2Label;
36
+ }
37
+ }
@@ -0,0 +1,59 @@
1
+ import { PropertyDeclarations } from 'lit';
2
+ import { AttrMap } from '../../core/attrs';
3
+ import { HostElement } from '../../core/host-element';
4
+ export type NativeSelectSize = "default" | "sm";
5
+ /**
6
+ * # NativeSelect: Tier 1 wrapper + native `<select>`
7
+ *
8
+ * shadcn: `<NativeSelect size>` renders
9
+ * `div[data-slot=native-select-wrapper][data-size] > select[data-slot=native-select][data-size] + svg[data-slot=native-select-icon]`;
10
+ * `NativeSelectOption` / `NativeSelectOptGroup` are `<option>` / `<optgroup>`.
11
+ *
12
+ * pont2: `<pont2-prim-native-select>` **is** the wrapper div; you write the native
13
+ * `<select>` (and its options) inside, and the host applies the recipe to it.
14
+ * The chevron is drawn by the wrapper's `::after`, so the DOM is
15
+ * `pont2-prim-native-select > select`: one node fewer than shadcn, and the select
16
+ * stays a real form control (submission, autofill, mobile pickers).
17
+ *
18
+ * ```html
19
+ * <pont2-prim-native-select>
20
+ * <select name="country"><option>Norway</option><option>Japan</option></select>
21
+ * </pont2-prim-native-select>
22
+ * ```
23
+ *
24
+ * @tag pont2-prim-native-select
25
+ * @attr size - default | sm
26
+ * @cssprop --pont2-native-select-icon - mask image for the chevron
27
+ */
28
+ export declare class NativeSelect extends HostElement {
29
+ static identity: string;
30
+ static slotName: string;
31
+ static properties: PropertyDeclarations;
32
+ size: NativeSelectSize;
33
+ private observer?;
34
+ constructor();
35
+ /** The native `<select>`. */
36
+ get control(): HTMLSelectElement | null;
37
+ connectedCallback(): void;
38
+ disconnectedCallback(): void;
39
+ focus(options?: FocusOptions): void;
40
+ protected willUpdate(): void;
41
+ }
42
+ export declare function applyNativeSelect(el: HTMLSelectElement, size?: NativeSelectSize): void;
43
+ export interface NativeSelectOptions {
44
+ size?: NativeSelectSize;
45
+ id?: string;
46
+ name?: string;
47
+ disabled?: boolean;
48
+ required?: boolean;
49
+ invalid?: boolean;
50
+ attrs?: AttrMap;
51
+ onChange?: (e: Event) => void;
52
+ }
53
+ /** Part: the wrapper div and the select in one template (options are the content). */
54
+ export declare function nativeSelect(o: NativeSelectOptions, options: unknown): import('lit-html').TemplateResult<1>;
55
+ declare global {
56
+ interface HTMLElementTagNameMap {
57
+ "pont2-prim-native-select": NativeSelect;
58
+ }
59
+ }
@@ -0,0 +1,85 @@
1
+ import { HostElement } from '../../core/host-element';
2
+ import { PopupContent } from '../../core/popup/popup-content';
3
+ import { PopupRoot, PopupTrigger } from '../../core/popup/popup-root';
4
+ /**
5
+ * # Popover
6
+ *
7
+ * shadcn: `<Popover>` (Base UI `Popover.Root`, renders nothing) >
8
+ * `<PopoverTrigger>` (a `<button>`) + `<PopoverContent>` (Portal > Positioner >
9
+ * `<div data-slot="popover-content">`), with `PopoverHeader/Title/Description`.
10
+ *
11
+ * pont2:
12
+ * ```html
13
+ * <pont2-prim-popover> coordinator, display: contents
14
+ * <pont2-prim-popover-trigger><button data-pont2-button data-variant="outline">Open</button></pont2-prim-popover-trigger>
15
+ * <pont2-prim-popover-content> the popup itself: [popover], role=dialog
16
+ * <pont2-prim-popover-header>
17
+ * <pont2-prim-popover-title>Dimensions</pont2-prim-popover-title>
18
+ * <pont2-prim-popover-description>Set the dimensions for the layer.</pont2-prim-popover-description>
19
+ * </pont2-prim-popover-header>
20
+ * …
21
+ * </pont2-prim-popover-content>
22
+ * </pont2-prim-popover>
23
+ * ```
24
+ *
25
+ * @tag pont2-prim-popover
26
+ * @attr open - Open state (initially: Base UI `defaultOpen`; property: controlled `open`).
27
+ * @fires pont2-open-change - cancelable, `{ open, reason }`.
28
+ */
29
+ export declare class Popover extends PopupRoot {
30
+ static identity: string;
31
+ get triggerElement(): HTMLButtonElement | null;
32
+ get contentElement(): PopoverContent | null;
33
+ protected get popupKind(): "dialog";
34
+ protected afterOpen(): void;
35
+ }
36
+ /** @tag pont2-prim-popover-trigger */
37
+ export declare class PopoverTrigger extends PopupTrigger {
38
+ static rootTag: string;
39
+ static controlSlot: string;
40
+ }
41
+ /**
42
+ * The popup. Non-modal, like Base UI's default: closes on Escape, on a press
43
+ * outside, and when focus leaves both the popup and its trigger.
44
+ *
45
+ * @tag pont2-prim-popover-content
46
+ * @attr side - bottom (default) | top | left | right | inline-start | inline-end
47
+ * @attr align - center (default) | start | end
48
+ * @attr side-offset - default 4
49
+ * @attr align-offset - default 0
50
+ */
51
+ export declare class PopoverContent extends PopupContent {
52
+ static identity: string;
53
+ static slotName: string;
54
+ static role: string;
55
+ constructor();
56
+ show(): void;
57
+ private onFocusOut;
58
+ }
59
+ /** @tag pont2-prim-popover-header */
60
+ export declare class PopoverHeader extends HostElement {
61
+ static identity: string;
62
+ static slotName: string;
63
+ }
64
+ /** Base UI `Popover.Title` renders an `<h2>`; pont2 keeps the heading semantics through internals. @tag pont2-prim-popover-title */
65
+ export declare class PopoverTitle extends HostElement {
66
+ static identity: string;
67
+ static slotName: string;
68
+ static role: string;
69
+ connectedCallback(): void;
70
+ }
71
+ /** Base UI `Popover.Description` renders a `<p>`. @tag pont2-prim-popover-description */
72
+ export declare class PopoverDescription extends HostElement {
73
+ static identity: string;
74
+ static slotName: string;
75
+ }
76
+ declare global {
77
+ interface HTMLElementTagNameMap {
78
+ "pont2-prim-popover": Popover;
79
+ "pont2-prim-popover-trigger": PopoverTrigger;
80
+ "pont2-prim-popover-content": PopoverContent;
81
+ "pont2-prim-popover-header": PopoverHeader;
82
+ "pont2-prim-popover-title": PopoverTitle;
83
+ "pont2-prim-popover-description": PopoverDescription;
84
+ }
85
+ }
@@ -0,0 +1,80 @@
1
+ import { nothing, PropertyDeclarations, PropertyValues } from 'lit';
2
+ import { HostElement } from '../../core/host-element';
3
+ export type ProgressStatus = "progressing" | "complete" | "indeterminate";
4
+ /**
5
+ * # Progress, ProgressLabel, ProgressValue: Tier 1/2 (status widget)
6
+ *
7
+ * shadcn: `<Progress value>` → Base UI `<Progress.Root>` (div[role=progressbar])
8
+ * holding the author's children, then `<Progress.Track>` > `<Progress.Indicator>`
9
+ * which shadcn always appends. `<ProgressLabel>` / `<ProgressValue>` are optional
10
+ * children (span).
11
+ *
12
+ * pont2:
13
+ * ```
14
+ * pont2-prim-progress[role=progressbar] ← root; aria-value* via ElementInternals
15
+ * pont2-prim-progress-label? pont2-prim-progress-value? ← author-written, never moved
16
+ * div[data-slot=progress-track] > div[data-slot=progress-indicator] ← rendered last, as shadcn does
17
+ * ```
18
+ * Status attributes are Base UI's: `data-progressing` | `data-complete` |
19
+ * `data-indeterminate`, on every part. No `value` attribute = indeterminate.
20
+ *
21
+ * @tag pont2-prim-progress
22
+ * @attr value - Current value; omit for indeterminate.
23
+ * @attr min, max - Range (default 0–100).
24
+ */
25
+ export declare class Progress extends HostElement {
26
+ static identity: string;
27
+ static slotName: string;
28
+ static role: string;
29
+ static properties: PropertyDeclarations;
30
+ value: number | null;
31
+ min: number;
32
+ max: number;
33
+ constructor();
34
+ get status(): ProgressStatus;
35
+ /** 0..1, or null when indeterminate. */
36
+ get fraction(): number | null;
37
+ /** The value as Base UI formats it by default: a locale percentage. */
38
+ get formattedValue(): string;
39
+ protected willUpdate(changed: PropertyValues): void;
40
+ protected updated(): void;
41
+ private own;
42
+ render(): import('lit-html').TemplateResult<1>;
43
+ }
44
+ /** Shared status sync for the optional parts. */
45
+ declare abstract class ProgressPart extends HostElement {
46
+ connectedCallback(): void;
47
+ /** @internal Called by the root. */
48
+ sync(status: ProgressStatus, _formatted: string): void;
49
+ }
50
+ /**
51
+ * Labels the progress bar (the root's accessible name points at it).
52
+ * @tag pont2-prim-progress-label
53
+ */
54
+ export declare class ProgressLabel extends ProgressPart {
55
+ static identity: string;
56
+ static slotName: string;
57
+ }
58
+ /**
59
+ * Shows the formatted value ("45%") unless you write your own text inside it.
60
+ * @tag pont2-prim-progress-value
61
+ */
62
+ export declare class ProgressValue extends ProgressPart {
63
+ static identity: string;
64
+ static slotName: string;
65
+ static properties: PropertyDeclarations;
66
+ protected formatted: string;
67
+ private authored;
68
+ constructor();
69
+ connectedCallback(): void;
70
+ sync(status: ProgressStatus, formatted: string): void;
71
+ render(): string | typeof nothing;
72
+ }
73
+ declare global {
74
+ interface HTMLElementTagNameMap {
75
+ "pont2-prim-progress": Progress;
76
+ "pont2-prim-progress-label": ProgressLabel;
77
+ "pont2-prim-progress-value": ProgressValue;
78
+ }
79
+ }
80
+ export {};
@@ -0,0 +1,93 @@
1
+ import { nothing, PropertyDeclarations, PropertyValues } from 'lit';
2
+ import { Orientation } from '../../core/controllers/roving-focus';
3
+ import { FormControlElement, ValidityResult } from '../../core/form-control';
4
+ import { HostElement } from '../../core/host-element';
5
+ /**
6
+ * # RadioGroup, RadioGroupItem: Tier 2 (widgets)
7
+ *
8
+ * shadcn: `<RadioGroup>` → Base UI `<RadioGroup>` (`<div role="radiogroup">`
9
+ * plus a hidden input) and `<RadioGroupItem value>` → Base UI `<Radio.Root>`
10
+ * (`<span role="radio">`) > `<Radio.Indicator>` > `<span>` (the dot).
11
+ *
12
+ * pont2:
13
+ * ```
14
+ * pont2-prim-radio-group[role=radiogroup] ← form-associated: submits name=value
15
+ * pont2-prim-radio-group-item[role=radio] ← author-written, never moved
16
+ * span[data-slot=radio-group-indicator] ← rendered while checked
17
+ * span[data-pont2-radio-group-indicator-icon]
18
+ * ```
19
+ *
20
+ * The group owns the value, the form value, validity and the roving tab stop.
21
+ * Items are independent stateful widgets nested inside it, which is the one
22
+ * kind of nesting the architecture keeps (04-composition.md); they find their
23
+ * group with `closest()` and report presses to it. Items are also
24
+ * form-associated (submitting nothing) purely so that they are *labelable*:
25
+ * shadcn's `<RadioGroupItem id="r1"/><Label htmlFor="r1">` works unchanged.
26
+ *
27
+ * Keyboard (Base UI / APG): Tab enters at the checked item (or the first),
28
+ * arrows move focus **and select** (wrapping), Space selects the focused item.
29
+ */
30
+ export declare class RadioGroup extends FormControlElement {
31
+ static identity: string;
32
+ static slotName: string;
33
+ static role: string;
34
+ static properties: PropertyDeclarations;
35
+ /** The selected item's value; `""` when nothing is selected. */
36
+ value: string;
37
+ /** Arrow-key axis. Base UI accepts both axes by default. */
38
+ orientation: Orientation | undefined;
39
+ private roving;
40
+ private observer?;
41
+ constructor();
42
+ /** The items that belong to this group (not to a nested group). */
43
+ get items(): RadioGroupItem[];
44
+ protected get hostFocusable(): boolean;
45
+ protected get validationAnchor(): HTMLElement | undefined;
46
+ connectedCallback(): void;
47
+ disconnectedCallback(): void;
48
+ /** Called by an item when it is pressed. */
49
+ selectItem(item: RadioGroupItem): void;
50
+ /** Called by items when they connect, so a late-upgrading item is synced. */
51
+ itemsChanged(): void;
52
+ protected formValue(): string | null;
53
+ protected resetToDefault(): void;
54
+ protected restoreState(state: string | File | FormData | null): void;
55
+ protected validate(): ValidityResult | null;
56
+ protected willUpdate(changed: PropertyValues): void;
57
+ protected updated(changed: PropertyValues): void;
58
+ }
59
+ /**
60
+ * @tag pont2-prim-radio-group-item
61
+ * @attr value - The value the group takes when this item is selected.
62
+ * @attr disabled
63
+ */
64
+ export declare class RadioGroupItem extends HostElement {
65
+ static formAssociated: boolean;
66
+ static identity: string;
67
+ static slotName: string;
68
+ static role: string;
69
+ static properties: PropertyDeclarations;
70
+ value: string;
71
+ disabled: boolean;
72
+ checked: boolean;
73
+ groupDisabled: boolean;
74
+ groupReadOnly: boolean;
75
+ groupRequired: boolean;
76
+ protected formDisabled: boolean;
77
+ constructor();
78
+ get group(): RadioGroup | null;
79
+ get isDisabled(): boolean;
80
+ get labels(): NodeList;
81
+ formDisabledCallback(disabled: boolean): void;
82
+ connectedCallback(): void;
83
+ private onClick;
84
+ private onKeyDown;
85
+ protected willUpdate(): void;
86
+ render(): import('lit-html').TemplateResult<1> | typeof nothing;
87
+ }
88
+ declare global {
89
+ interface HTMLElementTagNameMap {
90
+ "pont2-prim-radio-group": RadioGroup;
91
+ "pont2-prim-radio-group-item": RadioGroupItem;
92
+ }
93
+ }