@openelement/ui 0.43.2 → 0.44.0-beta.1
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/package.json +2 -16
- package/src/component-recipes.js +30 -6
- package/src/generated-manifest.json +15 -10
- package/src/index.js +1 -1
- package/src/instance-state.js +28 -0
- package/src/manifest.js +1 -1
- package/src/open-badge.js +473 -74
- package/src/open-button.js +708 -257
- package/src/open-callout.js +496 -87
- package/src/open-card.js +483 -80
- package/src/open-code-block.js +628 -226
- package/src/open-dialog.js +640 -230
- package/src/open-dropdown.js +499 -91
- package/src/open-input.js +781 -251
- package/src/open-props-tokens.js +1 -1
- package/src/open-tabs.js +553 -119
- package/src/open-theme-toggle.js +638 -245
- package/src/register.js +33 -30
- package/src/component-recipes.d.ts +0 -5
- package/src/index.d.ts +0 -42
- package/src/manifest.d.ts +0 -7
- package/src/open-badge.d.ts +0 -16
- package/src/open-button.d.ts +0 -38
- package/src/open-callout.d.ts +0 -25
- package/src/open-card.d.ts +0 -32
- package/src/open-code-block.d.ts +0 -48
- package/src/open-dialog.d.ts +0 -51
- package/src/open-dropdown.d.ts +0 -24
- package/src/open-input.d.ts +0 -56
- package/src/open-props-tokens.d.ts +0 -6
- package/src/open-tabs.d.ts +0 -29
- package/src/open-theme-toggle.d.ts +0 -38
- package/src/register.d.ts +0 -1
package/src/register.js
CHANGED
|
@@ -1,53 +1,56 @@
|
|
|
1
|
-
import { OpenBadge
|
|
2
|
-
import { OpenButton
|
|
3
|
-
import { OpenCallout
|
|
4
|
-
import { OpenCard
|
|
5
|
-
import { OpenCodeBlock
|
|
6
|
-
import { OpenDialog
|
|
7
|
-
import { OpenDropdown
|
|
8
|
-
import { OpenInput
|
|
9
|
-
import { OpenTabs
|
|
10
|
-
import { OpenThemeToggle
|
|
1
|
+
import { OpenBadge } from './open-badge.js';
|
|
2
|
+
import { OpenButton } from './open-button.js';
|
|
3
|
+
import { OpenCallout } from './open-callout.js';
|
|
4
|
+
import { OpenCard } from './open-card.js';
|
|
5
|
+
import { OpenCodeBlock } from './open-code-block.js';
|
|
6
|
+
import { OpenDialog } from './open-dialog.js';
|
|
7
|
+
import { OpenDropdown } from './open-dropdown.js';
|
|
8
|
+
import { OpenInput } from './open-input.js';
|
|
9
|
+
import { OpenTabs } from './open-tabs.js';
|
|
10
|
+
import { OpenThemeToggle } from './open-theme-toggle.js';
|
|
11
|
+
// v0.44: compiled modules carry no runtime tagName export (the compiled
|
|
12
|
+
// program owns the tag), so the registration table lives here, beside the
|
|
13
|
+
// class imports. Keep aligned with manifest.declarations order.
|
|
11
14
|
const COMPONENTS = [
|
|
12
15
|
[
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
'open-card',
|
|
17
|
+
OpenCard
|
|
18
|
+
],
|
|
19
|
+
[
|
|
20
|
+
'open-callout',
|
|
21
|
+
OpenCallout
|
|
15
22
|
],
|
|
16
23
|
[
|
|
17
|
-
button,
|
|
24
|
+
'open-button',
|
|
18
25
|
OpenButton
|
|
19
26
|
],
|
|
20
27
|
[
|
|
21
|
-
|
|
22
|
-
|
|
28
|
+
'open-input',
|
|
29
|
+
OpenInput
|
|
23
30
|
],
|
|
24
31
|
[
|
|
25
|
-
|
|
26
|
-
|
|
32
|
+
'open-theme-toggle',
|
|
33
|
+
OpenThemeToggle
|
|
27
34
|
],
|
|
28
35
|
[
|
|
29
|
-
|
|
36
|
+
'open-code-block',
|
|
30
37
|
OpenCodeBlock
|
|
31
38
|
],
|
|
32
39
|
[
|
|
33
|
-
|
|
34
|
-
|
|
40
|
+
'open-badge',
|
|
41
|
+
OpenBadge
|
|
35
42
|
],
|
|
36
43
|
[
|
|
37
|
-
|
|
38
|
-
|
|
44
|
+
'open-dialog',
|
|
45
|
+
OpenDialog
|
|
39
46
|
],
|
|
40
47
|
[
|
|
41
|
-
|
|
42
|
-
|
|
48
|
+
'open-dropdown',
|
|
49
|
+
OpenDropdown
|
|
43
50
|
],
|
|
44
51
|
[
|
|
45
|
-
tabs,
|
|
52
|
+
'open-tabs',
|
|
46
53
|
OpenTabs
|
|
47
|
-
],
|
|
48
|
-
[
|
|
49
|
-
themeToggle,
|
|
50
|
-
OpenThemeToggle
|
|
51
54
|
]
|
|
52
55
|
];
|
|
53
56
|
/** Explicitly register every first-party UI element. Safe to call repeatedly. */ export function registerOpenUi(registry = globalThis.customElements) {
|
|
@@ -56,4 +59,4 @@ const COMPONENTS = [
|
|
|
56
59
|
if (!registry.get(tagName)) registry.define(tagName, constructor);
|
|
57
60
|
}
|
|
58
61
|
}
|
|
59
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
62
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZpbGU6Ly8vaG9tZS9ydW5uZXIvd29yay9vcGVuZWxlbWVudC9vcGVuZWxlbWVudC9wYWNrYWdlcy91aS9zcmMvcmVnaXN0ZXIudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgT3BlbkJhZGdlIH0gZnJvbSAnLi9vcGVuLWJhZGdlLmpzJztcbmltcG9ydCB7IE9wZW5CdXR0b24gfSBmcm9tICcuL29wZW4tYnV0dG9uLmpzJztcbmltcG9ydCB7IE9wZW5DYWxsb3V0IH0gZnJvbSAnLi9vcGVuLWNhbGxvdXQuanMnO1xuaW1wb3J0IHsgT3BlbkNhcmQgfSBmcm9tICcuL29wZW4tY2FyZC5qcyc7XG5pbXBvcnQgeyBPcGVuQ29kZUJsb2NrIH0gZnJvbSAnLi9vcGVuLWNvZGUtYmxvY2suanMnO1xuaW1wb3J0IHsgT3BlbkRpYWxvZyB9IGZyb20gJy4vb3Blbi1kaWFsb2cuanMnO1xuaW1wb3J0IHsgT3BlbkRyb3Bkb3duIH0gZnJvbSAnLi9vcGVuLWRyb3Bkb3duLmpzJztcbmltcG9ydCB7IE9wZW5JbnB1dCB9IGZyb20gJy4vb3Blbi1pbnB1dC5qcyc7XG5pbXBvcnQgeyBPcGVuVGF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2xDO0lBQUM7SUFBYztHQUFVO0VBQ3pCO0lBQUM7SUFBZTtHQUFXO0VBQzNCO0lBQUM7SUFBaUI7R0FBYTtFQUMvQjtJQUFDO0lBQWE7R0FBUztDQUN4QjtBQUVELCtFQUErRSxHQUMvRSxPQUFPLFNBQVMsZUFDZCxXQUE4QyxXQUFXLGNBQWM7RUFFdkUsSUFBSSxDQUFDLFVBQVU7RUFDZixLQUFLLE1BQU0sQ0FBQyxTQUFTLFlBQVksSUFBSSxXQUFZO0lBQy9DLElBQUksQ0FBQyxTQUFTLEdBQUcsQ0FBQyxVQUFVLFNBQVMsTUFBTSxDQUFDLFNBQVM7RUFDdkQ7QUFDRiJ9
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/** Shared helpers and visual recipes for the public UI primitives. */ import { OpenElement, type StyleSheetLike } from '@openelement/element';
|
|
2
|
-
/** Shared render() return type for the UI primitives. */ export type RenderResult = ReturnType<typeof OpenElement.prototype.render>;
|
|
3
|
-
export declare const controlRecipe: StyleSheetLike;
|
|
4
|
-
export declare const surfaceRecipe: StyleSheetLike;
|
|
5
|
-
export declare const overlayRecipe: StyleSheetLike;
|
package/src/index.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @openelement/ui - openElement UI Component Library
|
|
3
|
-
*
|
|
4
|
-
* Swiss International Style: minimal, typography-driven, violet brand accent.
|
|
5
|
-
* Zero Lit dependency - built on openElement (native HTMLElement).
|
|
6
|
-
*
|
|
7
|
-
* Components:
|
|
8
|
-
* - open-button: Button with variants (default, primary, ghost, accent)
|
|
9
|
-
* - open-card: Card container with optional header/footer
|
|
10
|
-
* - open-input: Input field with label and error states
|
|
11
|
-
* - open-code-block: Code block with copy button
|
|
12
|
-
* - open-badge: Open Props status badge
|
|
13
|
-
* - open-theme-toggle: Theme toggle Island (Dark/Light)
|
|
14
|
-
* - open-dialog: Dialog component using native <dialog>
|
|
15
|
-
* - open-callout: Callout/notice box (info/warning/danger/tip)
|
|
16
|
-
* - open-dropdown: Dropdown toggle with trigger slot and content slot
|
|
17
|
-
* - open-tabs: Tab interface with tab and panel slots
|
|
18
|
-
*
|
|
19
|
-
* Usage:
|
|
20
|
-
* ```ts
|
|
21
|
-
* // Import all components
|
|
22
|
-
* import { registerOpenUi } from '@openelement/ui';
|
|
23
|
-
* registerOpenUi();
|
|
24
|
-
*
|
|
25
|
-
* // Or import specific components
|
|
26
|
-
* import { OpenButton } from '@openelement/ui/open-button';
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
29
|
-
* @module @openelement/ui
|
|
30
|
-
*/ export { openPropsRootSheet, openPropsTokenSheet } from "./open-props-tokens.js";
|
|
31
|
-
export { OpenButton } from "./open-button.js";
|
|
32
|
-
export { OpenCard } from "./open-card.js";
|
|
33
|
-
export { OpenInput } from "./open-input.js";
|
|
34
|
-
export { OpenCodeBlock } from "./open-code-block.js";
|
|
35
|
-
export { OpenBadge } from "./open-badge.js";
|
|
36
|
-
export { OpenThemeToggle } from "./open-theme-toggle.js";
|
|
37
|
-
export { OpenDialog } from "./open-dialog.js";
|
|
38
|
-
export { OpenCallout } from "./open-callout.js";
|
|
39
|
-
export { OpenDropdown } from "./open-dropdown.js";
|
|
40
|
-
export { OpenTabs } from "./open-tabs.js";
|
|
41
|
-
export { manifest } from "./manifest.js";
|
|
42
|
-
export { registerOpenUi } from "./register.js";
|
package/src/manifest.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @openelement/ui - Generated Package Manifest
|
|
3
|
-
*
|
|
4
|
-
* Imports the build-time generated manifest JSON. The generator lives in
|
|
5
|
-
* tools/generate-ui-manifest.ts and is run via `deno task generate:ui-manifest`.
|
|
6
|
-
*/ import type { OpenElementPackageManifest } from '@openelement/element';
|
|
7
|
-
export declare const manifest: OpenElementPackageManifest;
|
package/src/open-badge.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/** @jsxImportSource @openelement/element */ /**
|
|
2
|
-
* @openelement/ui - open-badge
|
|
3
|
-
*
|
|
4
|
-
* Compact status badge backed by Open Props semantic tokens.
|
|
5
|
-
*/ import { OpenElement } from '@openelement/element';
|
|
6
|
-
import type { StyleSheetLike } from '@openelement/element';
|
|
7
|
-
import { type RenderResult } from "./component-recipes.js";
|
|
8
|
-
export declare const tagName: 'open-badge';
|
|
9
|
-
declare const sheet: StyleSheetLike;
|
|
10
|
-
export declare class OpenBadge extends OpenElement {
|
|
11
|
-
static override styles: [];
|
|
12
|
-
static override observedAttributes: [string, string];
|
|
13
|
-
override render(): RenderResult;
|
|
14
|
-
override attributeChangedCallback(_name: string, old: string | null, val: string | null): void;
|
|
15
|
-
private _getStr: any;
|
|
16
|
-
}
|
package/src/open-button.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/** @jsxImportSource @openelement/element */ /**
|
|
2
|
-
* @openelement/ui - open-button
|
|
3
|
-
*
|
|
4
|
-
* Minimal button component following Swiss International Style.
|
|
5
|
-
* Violet brand accents with subtle hover states.
|
|
6
|
-
*
|
|
7
|
-
* v0.24.1: Migrated from html`` template to JSX (ADR-0057).
|
|
8
|
-
*
|
|
9
|
-
* Variants: default (outlined), primary (filled), ghost (no border), accent (gradient)
|
|
10
|
-
* Sizes: sm, md (default), lg
|
|
11
|
-
*
|
|
12
|
-
* @csspart control -The button or anchor element
|
|
13
|
-
*
|
|
14
|
-
* Usage:
|
|
15
|
-
* ```html
|
|
16
|
-
* <open-button>Click me</open-button>
|
|
17
|
-
* <open-button variant="primary">Submit</open-button>
|
|
18
|
-
* <open-button size="sm" disabled>Small</open-button>
|
|
19
|
-
* ```
|
|
20
|
-
*/ import { OpenElement } from '@openelement/element';
|
|
21
|
-
import type { StyleSheetLike } from '@openelement/element';
|
|
22
|
-
import { controlRecipe, type RenderResult } from "./component-recipes.js";
|
|
23
|
-
export declare const tagName: 'open-button';
|
|
24
|
-
declare const sheet: StyleSheetLike;
|
|
25
|
-
export declare class OpenButton extends OpenElement {
|
|
26
|
-
static override styles: [];
|
|
27
|
-
static delegatesFocus: boolean;
|
|
28
|
-
static formAssociated: boolean;
|
|
29
|
-
static override observedAttributes: [string, string, string, string, string, string];
|
|
30
|
-
override render(): RenderResult;
|
|
31
|
-
override attributeChangedCallback(name: string, old: string | null, val: string | null): void;
|
|
32
|
-
private _syncDOM: any;
|
|
33
|
-
private _reRender: any;
|
|
34
|
-
private _updateState: any;
|
|
35
|
-
private _handleClick: any;
|
|
36
|
-
private _submitForm: any;
|
|
37
|
-
private _resetForm: any;
|
|
38
|
-
}
|
package/src/open-callout.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/** @jsxImportSource @openelement/element */ /**
|
|
2
|
-
* @openelement/ui - open-callout
|
|
3
|
-
*
|
|
4
|
-
* Callout/notice box for inline documentation alerts.
|
|
5
|
-
* Supports 4 types: info, warning, danger, tip.
|
|
6
|
-
* Colors use semantic tokens and respond to theme changes; the light-theme
|
|
7
|
-
* warn/danger/tip backgrounds use tuned rgba tints on top of them.
|
|
8
|
-
*
|
|
9
|
-
* Usage:
|
|
10
|
-
* ```html
|
|
11
|
-
* <open-callout type="info" label="Note">
|
|
12
|
-
* This is an informational callout.
|
|
13
|
-
* </open-callout>
|
|
14
|
-
* ```
|
|
15
|
-
*/ import { OpenElement } from '@openelement/element';
|
|
16
|
-
import type { StyleSheetLike } from '@openelement/element';
|
|
17
|
-
import { type RenderResult } from "./component-recipes.js";
|
|
18
|
-
export declare const tagName: 'open-callout';
|
|
19
|
-
declare const sheet: StyleSheetLike;
|
|
20
|
-
export declare class OpenCallout extends OpenElement {
|
|
21
|
-
static override styles: [];
|
|
22
|
-
static override observedAttributes: [string, string];
|
|
23
|
-
override render(): RenderResult;
|
|
24
|
-
override attributeChangedCallback(_name: string, old: string | null, val: string | null): void;
|
|
25
|
-
}
|
package/src/open-card.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/** @jsxImportSource @openelement/element */ /**
|
|
2
|
-
* @openelement/ui - open-card
|
|
3
|
-
*
|
|
4
|
-
* Minimal card container with optional header and footer.
|
|
5
|
-
* Swiss International Style: borders are whispers, not shouts.
|
|
6
|
-
*
|
|
7
|
-
* v0.24.1: Migrated from html`` template to JSX (ADR-0057).
|
|
8
|
-
*
|
|
9
|
-
* @csspart container - The article wrapper
|
|
10
|
-
* @csspart body - The card body content area
|
|
11
|
-
*
|
|
12
|
-
* Usage:
|
|
13
|
-
* ```html
|
|
14
|
-
* <open-card>
|
|
15
|
-
* <h3 slot="header">Card Title</h3>
|
|
16
|
-
* <p>Card content goes here.</p>
|
|
17
|
-
* </open-card>
|
|
18
|
-
*
|
|
19
|
-
* <open-card variant="elevated">
|
|
20
|
-
* <p>Elevated card with shadow.</p>
|
|
21
|
-
* </open-card>
|
|
22
|
-
* ```
|
|
23
|
-
*/ import { OpenElement } from '@openelement/element';
|
|
24
|
-
import type { StyleSheetLike } from '@openelement/element';
|
|
25
|
-
import { type RenderResult, surfaceRecipe } from "./component-recipes.js";
|
|
26
|
-
export declare const tagName: 'open-card';
|
|
27
|
-
declare const sheet: StyleSheetLike;
|
|
28
|
-
export declare class OpenCard extends OpenElement {
|
|
29
|
-
static override styles: [];
|
|
30
|
-
static override observedAttributes: [string];
|
|
31
|
-
override render(): RenderResult;
|
|
32
|
-
}
|
package/src/open-code-block.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/** @jsxImportSource @openelement/element */ /**
|
|
2
|
-
* @openelement/ui - open-code-block
|
|
3
|
-
*
|
|
4
|
-
* Code block with copy button AND syntax highlighting via Prism.
|
|
5
|
-
*
|
|
6
|
-
* Highlighting contract: the component does NOT bundle a tokenizer. It
|
|
7
|
-
* tokenizes the slotted <pre><code> only when the host page has loaded a
|
|
8
|
-
* global `Prism` (core + the matching language grammar, e.g. from a CDN
|
|
9
|
-
* <script>). Without Prism the block degrades to plain text with the copy
|
|
10
|
-
* button — that is expected, not a bug. See README.md for the script recipe.
|
|
11
|
-
*
|
|
12
|
-
* v0.20.0: Migrated to openElement (Ocean component).
|
|
13
|
-
* - Self-contained Prism highlighting injected into shadow root
|
|
14
|
-
* - Copy button uses ElementInternals :state(copied) for CSS feedback
|
|
15
|
-
* - DSD renders <slot> for SSR (no JS content fallback)
|
|
16
|
-
* v0.24.1: Migrated from html`` template to JSX (ADR-0057).
|
|
17
|
-
*
|
|
18
|
-
* @csspart copy - The copy button
|
|
19
|
-
*
|
|
20
|
-
* Usage:
|
|
21
|
-
* ```html
|
|
22
|
-
* <open-code-block>
|
|
23
|
-
* <pre><code>const x = 1;</code></pre>
|
|
24
|
-
* </open-code-block>
|
|
25
|
-
* ```
|
|
26
|
-
*/ import { OpenElement } from '@openelement/element';
|
|
27
|
-
import type { StyleSheetLike } from '@openelement/element';
|
|
28
|
-
import { type RenderResult } from "./component-recipes.js";
|
|
29
|
-
export declare const tagName: 'open-code-block';
|
|
30
|
-
declare const sheet: StyleSheetLike;
|
|
31
|
-
export declare class OpenCodeBlock extends OpenElement {
|
|
32
|
-
static override styles: [];
|
|
33
|
-
private _copyState: any;
|
|
34
|
-
private _highlightedInShadow: any;
|
|
35
|
-
private _highlightRetries: any;
|
|
36
|
-
private static MAX_HIGHLIGHT_RETRIES: any;
|
|
37
|
-
private static COPY_FEEDBACK_MS: any;
|
|
38
|
-
override render(): RenderResult;
|
|
39
|
-
override onDsdHydrated(): void;
|
|
40
|
-
override onCsrRendered(): void;
|
|
41
|
-
private _prismGlobal: any;
|
|
42
|
-
private _tryHighlight: any;
|
|
43
|
-
private _scheduleRetry: any;
|
|
44
|
-
private _injectHighlighted: any;
|
|
45
|
-
private _getCodeText: any;
|
|
46
|
-
private _copy: any;
|
|
47
|
-
private _updateCopyButtonDOM: any;
|
|
48
|
-
}
|
package/src/open-dialog.d.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/** @jsxImportSource @openelement/element */ /**
|
|
2
|
-
* @openelement/ui - open-dialog
|
|
3
|
-
*
|
|
4
|
-
* Dialog component using native <dialog> element + popover API.
|
|
5
|
-
* Per WHATWG HTML Living Standard sections 4.11.4 (dialog) and 6.9.2 (popover).
|
|
6
|
-
*
|
|
7
|
-
* v0.24.1: Migrated from html`` template to JSX (ADR-0057).
|
|
8
|
-
*
|
|
9
|
-
* @csspart overlay - The dialog backdrop/element
|
|
10
|
-
* @csspart header -The header bar
|
|
11
|
-
* @csspart close -The close button
|
|
12
|
-
* @csspart body -The content area (<slot>)
|
|
13
|
-
* @csspart footer -The optional footer slot
|
|
14
|
-
*
|
|
15
|
-
* Usage:
|
|
16
|
-
* ```html
|
|
17
|
-
* <open-dialog label="Dialog title">
|
|
18
|
-
* <button slot="trigger">Open Dialog</button>
|
|
19
|
-
* <div>Dialog content here</div>
|
|
20
|
-
* </open-dialog>
|
|
21
|
-
* ```
|
|
22
|
-
*
|
|
23
|
-
* Attributes:
|
|
24
|
-
* - `open` - Presence opens the dialog (reflected into :state(open))
|
|
25
|
-
* - `label` - Title text and aria-label of the dialog
|
|
26
|
-
* - `mode` - `modal` (default, showModal()) or `non-modal` (show()); read at open time
|
|
27
|
-
*/ import { OpenElement } from '@openelement/element';
|
|
28
|
-
import type { StyleSheetLike } from '@openelement/element';
|
|
29
|
-
import { overlayRecipe, type RenderResult } from "./component-recipes.js";
|
|
30
|
-
export declare const tagName: 'open-dialog';
|
|
31
|
-
declare const sheet: StyleSheetLike;
|
|
32
|
-
export declare class OpenDialog extends OpenElement {
|
|
33
|
-
static override styles: [];
|
|
34
|
-
static delegatesFocus: boolean;
|
|
35
|
-
static override observedAttributes: [string];
|
|
36
|
-
/** True once showModal() has run for the current open session (#1030). */ private _modalActive: any;
|
|
37
|
-
override render(): RenderResult;
|
|
38
|
-
override attributeChangedCallback(name: string, old: string | null, val: string | null): void;
|
|
39
|
-
protected override onCsrRendered(): void;
|
|
40
|
-
protected override onDsdHydrated(): void;
|
|
41
|
-
private _syncOpenState: any;
|
|
42
|
-
private _updateStates: any;
|
|
43
|
-
show(): void;
|
|
44
|
-
close(): void;
|
|
45
|
-
toggle(): void;
|
|
46
|
-
private _syncDialogElement: any;
|
|
47
|
-
private _handleNativeClose: any;
|
|
48
|
-
private _handleClose: any;
|
|
49
|
-
private _handleCancel: any;
|
|
50
|
-
private _handleTrigger: any;
|
|
51
|
-
}
|
package/src/open-dropdown.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/** @jsxImportSource @openelement/element */ /**
|
|
2
|
-
* @openelement/ui - open-dropdown
|
|
3
|
-
* Popover-API dropdown with CSS Anchor Positioning placement.
|
|
4
|
-
* The content is a native popover (top layer, built-in light dismiss and
|
|
5
|
-
* focus return); placement anchors to the host, no hand-rolled fallback.
|
|
6
|
-
*
|
|
7
|
-
* @slot trigger - Control used to toggle the dropdown
|
|
8
|
-
* @slot - Dropdown content
|
|
9
|
-
* @csspart trigger - Trigger wrapper
|
|
10
|
-
* @csspart content - Popover content
|
|
11
|
-
*/ import { OpenElement, type StyleSheetLike } from '@openelement/element';
|
|
12
|
-
import { overlayRecipe, type RenderResult } from "./component-recipes.js";
|
|
13
|
-
export declare const tagName: 'open-dropdown';
|
|
14
|
-
declare const sheet: StyleSheetLike;
|
|
15
|
-
export declare class OpenDropdown extends OpenElement {
|
|
16
|
-
static override styles: [];
|
|
17
|
-
private _anchorName: any;
|
|
18
|
-
override connectedCallback(): void;
|
|
19
|
-
private _syncAnchorName: any;
|
|
20
|
-
private _openAtTriggerPointerDown: any;
|
|
21
|
-
private _onTriggerPointerDown: any;
|
|
22
|
-
private _toggle: any;
|
|
23
|
-
override render(): RenderResult;
|
|
24
|
-
}
|
package/src/open-input.d.ts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/** @jsxImportSource @openelement/element */ /**
|
|
2
|
-
* @openelement/ui - open-input
|
|
3
|
-
*
|
|
4
|
-
* Minimal input field following Swiss International Style.
|
|
5
|
-
* Clean borders, subtle focus states.
|
|
6
|
-
*
|
|
7
|
-
* v0.24.1: Migrated from html`` template to JSX (ADR-0057).
|
|
8
|
-
*
|
|
9
|
-
* Features:
|
|
10
|
-
* - Form-associated: participates in native <form> submission via
|
|
11
|
-
* ElementInternals (setFormValue), including the initial `value`
|
|
12
|
-
* attribute synced on connect
|
|
13
|
-
* - Native constraint validation: required + empty value maps to
|
|
14
|
-
* valueMissing via internals.setValidity
|
|
15
|
-
* - Supports label, placeholder, error, disabled, required
|
|
16
|
-
* - Dispatches 'open-input' custom event on value change
|
|
17
|
-
*
|
|
18
|
-
* @csspart wrapper -The outer input-wrapper div
|
|
19
|
-
* @csspart label -The label element
|
|
20
|
-
* @csspart control -The input element
|
|
21
|
-
* @csspart error -The error message small element
|
|
22
|
-
*
|
|
23
|
-
* Usage:
|
|
24
|
-
* ```html
|
|
25
|
-
* <open-input placeholder="Enter text"></open-input>
|
|
26
|
-
* <open-input type="email" label="Email"></open-input>
|
|
27
|
-
* <form onsubmit="console.info(new FormData(this))">
|
|
28
|
-
* <open-input name="username" label="Username"></open-input>
|
|
29
|
-
* <button type="submit">Submit</button>
|
|
30
|
-
* </form>
|
|
31
|
-
* ```
|
|
32
|
-
*/ import { OpenElement } from '@openelement/element';
|
|
33
|
-
import type { StyleSheetLike } from '@openelement/element';
|
|
34
|
-
import { controlRecipe, type RenderResult } from "./component-recipes.js";
|
|
35
|
-
export declare const tagName: 'open-input';
|
|
36
|
-
declare const sheet: StyleSheetLike;
|
|
37
|
-
export declare class OpenInput extends OpenElement {
|
|
38
|
-
static override styles: [];
|
|
39
|
-
static formAssociated: boolean;
|
|
40
|
-
static delegatesFocus: boolean;
|
|
41
|
-
static override observedAttributes: [string, string, string, string, string, string, string, string];
|
|
42
|
-
private _uid: any;
|
|
43
|
-
override connectedCallback(): void;
|
|
44
|
-
override render(): RenderResult;
|
|
45
|
-
override attributeChangedCallback(name: string, old: string | null, val: string | null): void;
|
|
46
|
-
private _syncDOM: any;
|
|
47
|
-
private _updateStates: any;
|
|
48
|
-
private _syncFormValue: any;
|
|
49
|
-
private _syncValidity: any;
|
|
50
|
-
private _handleInput: any;
|
|
51
|
-
private _handleChange: any;
|
|
52
|
-
private _handleFocus: any;
|
|
53
|
-
private _handleBlur: any;
|
|
54
|
-
formResetCallback(): void;
|
|
55
|
-
formDisabledCallback(disabled: boolean): void;
|
|
56
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @generated from open-props-tokens.css by tools/generate-ui-token-module.ts.
|
|
3
|
-
* Do not edit this file directly.
|
|
4
|
-
*/ import { type StyleSheetLike } from '@openelement/element';
|
|
5
|
-
export declare const openPropsTokenSheet: StyleSheetLike;
|
|
6
|
-
export declare const openPropsRootSheet: StyleSheetLike;
|
package/src/open-tabs.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/** @jsxImportSource @openelement/element */ /**
|
|
2
|
-
* @openelement/ui - open-tabs
|
|
3
|
-
*
|
|
4
|
-
* WAI-ARIA tabs pattern. The slotted [slot="tab"] and [slot="panel"] elements
|
|
5
|
-
* stay live in the light DOM — the component decorates them with role/aria
|
|
6
|
-
* wiring instead of copying textContent into the shadow root, so child markup
|
|
7
|
-
* structure and event listeners are preserved.
|
|
8
|
-
*
|
|
9
|
-
* Keyboard: ArrowLeft/ArrowRight move between tabs (wrapping), Home/End jump
|
|
10
|
-
* to the first/last tab. Focus follows selection.
|
|
11
|
-
*
|
|
12
|
-
* @slot tab - Tab label element (one per panel)
|
|
13
|
-
* @slot panel - Panel shown while its tab is active
|
|
14
|
-
*/ import { OpenElement, type StyleSheetLike } from '@openelement/element';
|
|
15
|
-
import { type RenderResult } from "./component-recipes.js";
|
|
16
|
-
export declare const tagName: 'open-tabs';
|
|
17
|
-
declare const sheet: StyleSheetLike;
|
|
18
|
-
export declare class OpenTabs extends OpenElement {
|
|
19
|
-
static override styles: [];
|
|
20
|
-
private _active: any;
|
|
21
|
-
private _wiredTabs: any;
|
|
22
|
-
private _uid: any;
|
|
23
|
-
private _tabs: any;
|
|
24
|
-
private _count: any;
|
|
25
|
-
private _select: any;
|
|
26
|
-
private _onKeydown: any;
|
|
27
|
-
private _decorate: any;
|
|
28
|
-
override render(): RenderResult;
|
|
29
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/** @jsxImportSource @openelement/element */ /**
|
|
2
|
-
* @openelement/ui - open-theme-toggle
|
|
3
|
-
*
|
|
4
|
-
* Theme toggle Reactive DSD component for Dark/Light mode switching.
|
|
5
|
-
* Swiss International Style: minimal, violet brand accent.
|
|
6
|
-
*
|
|
7
|
-
* v0.24.1: Migrated from html`` template to JSX (ADR-0057).
|
|
8
|
-
*
|
|
9
|
-
* @csspart toggle -The button element
|
|
10
|
-
* @csspart icon-sun -The sun SVG icon
|
|
11
|
-
* @csspart icon-moon -The moon SVG icon
|
|
12
|
-
*
|
|
13
|
-
* Usage:
|
|
14
|
-
* ```html
|
|
15
|
-
* <open-theme-toggle theme="light"></open-theme-toggle>
|
|
16
|
-
* ```
|
|
17
|
-
*/ import { OpenElement } from '@openelement/element';
|
|
18
|
-
import type { StyleSheetLike } from '@openelement/element';
|
|
19
|
-
import { type RenderResult } from "./component-recipes.js";
|
|
20
|
-
export declare const tagName: 'open-theme-toggle';
|
|
21
|
-
declare const sheet: StyleSheetLike;
|
|
22
|
-
export declare class OpenThemeToggle extends OpenElement {
|
|
23
|
-
static override styles: [];
|
|
24
|
-
static delegatesFocus: boolean;
|
|
25
|
-
static override observedAttributes: [string];
|
|
26
|
-
private _theme: any;
|
|
27
|
-
private _initDone: any;
|
|
28
|
-
private _lastPropagatedTheme: any;
|
|
29
|
-
override connectedCallback(): void;
|
|
30
|
-
private _initTheme: any;
|
|
31
|
-
private _applyTheme: any;
|
|
32
|
-
private _persistTheme: any;
|
|
33
|
-
protected override onDsdHydrated(): void;
|
|
34
|
-
override render(): RenderResult;
|
|
35
|
-
private _handleToggle: any;
|
|
36
|
-
private _dispatchThemeChange: any;
|
|
37
|
-
override attributeChangedCallback(name: string, old: string | null, val: string | null): void;
|
|
38
|
-
}
|
package/src/register.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/** Explicitly register every first-party UI element. Safe to call repeatedly. */ export declare function registerOpenUi(registry?: CustomElementRegistry | undefined): void;
|