@openelement/ui 1.0.0-alpha.6 → 1.0.0-alpha.7
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 -2
- package/src/component-recipes.js +60 -60
- package/src/generated-manifest.json +1 -1
- package/src/index.d.ts +15 -43
- package/src/index.js +15 -50
- package/src/instance-state.d.ts +16 -2
- package/src/instance-state.js +30 -24
- package/src/manifest.d.ts +5 -9
- package/src/manifest.js +6 -11
- package/src/open-badge.d.ts +113 -159
- package/src/open-badge.js +200 -239
- package/src/open-button.d.ts +296 -898
- package/src/open-button.js +1150 -1322
- package/src/open-callout.d.ts +225 -366
- package/src/open-callout.js +488 -569
- package/src/open-card.d.ts +114 -144
- package/src/open-card.js +197 -251
- package/src/open-code-block.d.ts +165 -168
- package/src/open-code-block.js +315 -366
- package/src/open-dialog.d.ts +241 -424
- package/src/open-dialog.js +643 -823
- package/src/open-dropdown.d.ts +195 -252
- package/src/open-dropdown.js +368 -471
- package/src/open-input.d.ts +404 -1420
- package/src/open-input.js +1809 -2095
- package/src/open-props-tokens.d.ts +5 -5
- package/src/open-props-tokens.js +12 -7
- package/src/open-tabs.d.ts +163 -191
- package/src/open-tabs.js +306 -361
- package/src/open-theme-toggle.d.ts +171 -287
- package/src/open-theme-toggle.js +530 -754
- package/src/register.d.ts +4 -1
- package/src/register.js +27 -58
package/src/register.d.ts
CHANGED
|
@@ -1 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/register.d.ts
|
|
2
|
+
/** Explicitly register every first-party UI element. Safe to call repeatedly. */
|
|
3
|
+
export declare function registerOpenUi(registry?: CustomElementRegistry | undefined): void;
|
|
4
|
+
//#endregion
|
package/src/register.js
CHANGED
|
@@ -1,61 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
// program owns the tag), so the registration table lives here, beside the
|
|
13
|
-
// class imports. Keep aligned with manifest.declarations order.
|
|
1
|
+
import { OpenButton } from "./open-button.js";
|
|
2
|
+
import { OpenCard } from "./open-card.js";
|
|
3
|
+
import { OpenInput } from "./open-input.js";
|
|
4
|
+
import { OpenCodeBlock } from "./open-code-block.js";
|
|
5
|
+
import { OpenBadge } from "./open-badge.js";
|
|
6
|
+
import { OpenThemeToggle } from "./open-theme-toggle.js";
|
|
7
|
+
import { OpenDialog } from "./open-dialog.js";
|
|
8
|
+
import { OpenCallout } from "./open-callout.js";
|
|
9
|
+
import { OpenDropdown } from "./open-dropdown.js";
|
|
10
|
+
import { OpenTabs } from "./open-tabs.js";
|
|
11
|
+
//#region src/register.ts
|
|
14
12
|
const COMPONENTS = [
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
OpenButton
|
|
26
|
-
],
|
|
27
|
-
[
|
|
28
|
-
'open-input',
|
|
29
|
-
OpenInput
|
|
30
|
-
],
|
|
31
|
-
[
|
|
32
|
-
'open-theme-toggle',
|
|
33
|
-
OpenThemeToggle
|
|
34
|
-
],
|
|
35
|
-
[
|
|
36
|
-
'open-code-block',
|
|
37
|
-
OpenCodeBlock
|
|
38
|
-
],
|
|
39
|
-
[
|
|
40
|
-
'open-badge',
|
|
41
|
-
OpenBadge
|
|
42
|
-
],
|
|
43
|
-
[
|
|
44
|
-
'open-dialog',
|
|
45
|
-
OpenDialog
|
|
46
|
-
],
|
|
47
|
-
[
|
|
48
|
-
'open-dropdown',
|
|
49
|
-
OpenDropdown
|
|
50
|
-
],
|
|
51
|
-
[
|
|
52
|
-
'open-tabs',
|
|
53
|
-
OpenTabs
|
|
54
|
-
]
|
|
13
|
+
["open-card", OpenCard],
|
|
14
|
+
["open-callout", OpenCallout],
|
|
15
|
+
["open-button", OpenButton],
|
|
16
|
+
["open-input", OpenInput],
|
|
17
|
+
["open-theme-toggle", OpenThemeToggle],
|
|
18
|
+
["open-code-block", OpenCodeBlock],
|
|
19
|
+
["open-badge", OpenBadge],
|
|
20
|
+
["open-dialog", OpenDialog],
|
|
21
|
+
["open-dropdown", OpenDropdown],
|
|
22
|
+
["open-tabs", OpenTabs]
|
|
55
23
|
];
|
|
56
|
-
/** Explicitly register every first-party UI element. Safe to call repeatedly. */
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
24
|
+
/** Explicitly register every first-party UI element. Safe to call repeatedly. */
|
|
25
|
+
function registerOpenUi(registry = globalThis.customElements) {
|
|
26
|
+
if (!registry) return;
|
|
27
|
+
for (const [tagName, constructor] of COMPONENTS) if (!registry.get(tagName)) registry.define(tagName, constructor);
|
|
61
28
|
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { registerOpenUi };
|