@openelement/ui 1.0.0-alpha.1 → 1.0.0-alpha.11
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/CUSTOMIZATION.md +272 -0
- package/README.md +59 -54
- package/package.json +19 -33
- package/src/component-recipes.js +39 -100
- package/src/control-recipe.css +21 -0
- package/src/generated-manifest.json +13 -160
- package/src/index.d.ts +10 -42
- package/src/index.js +10 -46
- package/src/instance-state.d.ts +16 -0
- package/src/instance-state.js +30 -24
- package/src/manifest.d.ts +5 -9
- package/src/manifest.js +6 -11
- package/src/open-button.css +120 -0
- package/src/open-button.d.ts +296 -898
- package/src/open-button.js +1130 -1436
- package/src/open-code-block.css +46 -0
- package/src/open-code-block.d.ts +158 -168
- package/src/open-code-block.js +224 -468
- package/src/open-dialog.css +137 -0
- package/src/open-dialog.d.ts +241 -424
- package/src/open-dialog.js +626 -903
- package/src/open-dropdown.css +28 -0
- package/src/open-dropdown.d.ts +195 -252
- package/src/open-dropdown.js +352 -494
- package/src/open-input.css +80 -0
- package/src/open-input.d.ts +404 -1420
- package/src/open-input.js +1789 -2170
- package/src/open-theme-toggle.css +53 -0
- package/src/open-theme-toggle.d.ts +171 -287
- package/src/open-theme-toggle.js +512 -801
- package/src/overlay-recipe.css +9 -0
- package/src/register.d.ts +4 -1
- package/src/register.js +19 -58
- package/src/surface-recipe.css +10 -0
- package/src/theme.css +206 -0
- package/THIRD_PARTY_NOTICES.md +0 -45
- package/src/open-badge.d.ts +0 -185
- package/src/open-badge.js +0 -296
- package/src/open-callout.d.ts +0 -402
- package/src/open-callout.js +0 -603
- package/src/open-card.d.ts +0 -168
- package/src/open-card.js +0 -310
- package/src/open-props-tokens.d.ts +0 -9
- package/src/open-props-tokens.js +0 -459
- package/src/open-tabs.d.ts +0 -218
- package/src/open-tabs.js +0 -401
- package/src/semantic-tokens.css +0 -413
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/* open-dialog — authored component styles, ported verbatim from the pre-#1558
|
|
2
|
+
* recipe() sheet (the alpha.9 design system). The #1558 migration had
|
|
3
|
+
* replaced this with a placeholder shell under the false note that the
|
|
4
|
+
* component "carried no authored styles"; it did — this is that sheet. */
|
|
5
|
+
:host {
|
|
6
|
+
display: inline-block;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
::slotted([slot='trigger']) {
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
dialog {
|
|
14
|
+
border: calc(var(--spacing) * 0.25) solid color-mix(in srgb, color-mix(in srgb, var(--color-foreground) 25%, var(--color-border)) 62%, var(--color-primary));
|
|
15
|
+
border-radius: var(--radius-xl);
|
|
16
|
+
background: color-mix(in srgb, var(--color-popover) 92%, transparent);
|
|
17
|
+
color: var(--color-foreground);
|
|
18
|
+
padding: calc(var(--spacing) * 6);
|
|
19
|
+
max-width: min(90vw, 480px);
|
|
20
|
+
box-shadow: inset 0 1px 0 color-mix(in srgb, var(--color-white) 8%, transparent), var(--shadow-2xl);
|
|
21
|
+
font-family: var(--font-sans);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
dialog::backdrop {
|
|
25
|
+
/* Closed base: transparent. The [open] rule carries the zinc-950 scrim
|
|
26
|
+
and starts from transparent, so the scrim fades in on entry and back
|
|
27
|
+
out on exit instead of snapping. */
|
|
28
|
+
background: transparent;
|
|
29
|
+
backdrop-filter: blur(8px);
|
|
30
|
+
/* Exit visibility: with allow-discrete the top-layer membership and the
|
|
31
|
+
display flip wait for the transition, so the scrim fades out instead
|
|
32
|
+
of snapping (the allow-discrete recipe, cf. upstream #591 — open
|
|
33
|
+
upstream, does not gate this landing). */
|
|
34
|
+
transition:
|
|
35
|
+
background-color 0.2s ease-out,
|
|
36
|
+
overlay 0.2s ease-out allow-discrete,
|
|
37
|
+
display 0.2s ease-out allow-discrete;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
dialog[open]::backdrop {
|
|
41
|
+
background: color-mix(in srgb, var(--color-zinc-950) 68%, transparent);
|
|
42
|
+
@starting-style {
|
|
43
|
+
background: transparent;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Entry AND exit: the closed state is the base rule (opacity 0, lifted);
|
|
48
|
+
opening transitions to the [open] values from the @starting-style
|
|
49
|
+
starting point, closing transitions back to the base — the display and
|
|
50
|
+
overlay legs carry allow-discrete so the dialog stays rendered and in
|
|
51
|
+
the top layer until the exit transition finishes. */
|
|
52
|
+
dialog {
|
|
53
|
+
opacity: 0;
|
|
54
|
+
transform: translateY(-8px);
|
|
55
|
+
transition:
|
|
56
|
+
opacity 0.2s ease-out,
|
|
57
|
+
transform 0.2s ease-out,
|
|
58
|
+
overlay 0.2s ease-out allow-discrete,
|
|
59
|
+
display 0.2s ease-out allow-discrete;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
dialog[open] {
|
|
63
|
+
opacity: 1;
|
|
64
|
+
transform: translateY(0);
|
|
65
|
+
@starting-style {
|
|
66
|
+
opacity: 0;
|
|
67
|
+
transform: translateY(-8px);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* Forced colors: the system owns the palette, so half-opacity frames and
|
|
72
|
+
moving text would fight the forced rendering — the dialog appears and
|
|
73
|
+
dismisses immediately instead (the display leg loses its deferral with
|
|
74
|
+
the transition, which is the graceful degradation). Reduced motion
|
|
75
|
+
collapses the same way. */
|
|
76
|
+
@media (forced-colors: active) {
|
|
77
|
+
dialog,
|
|
78
|
+
dialog::backdrop {
|
|
79
|
+
transition: none;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@media (prefers-reduced-motion: reduce) {
|
|
84
|
+
dialog,
|
|
85
|
+
dialog::backdrop {
|
|
86
|
+
transition-duration: 0s;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.dialog-header {
|
|
91
|
+
display: flex;
|
|
92
|
+
justify-content: space-between;
|
|
93
|
+
align-items: center;
|
|
94
|
+
margin-bottom: calc(var(--spacing) * 4);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.dialog-title {
|
|
98
|
+
font-size: var(--text-xl);
|
|
99
|
+
font-weight: var(--font-weight-semibold);
|
|
100
|
+
color: var(--color-foreground);
|
|
101
|
+
margin: 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.dialog-close {
|
|
105
|
+
background: none;
|
|
106
|
+
border: none;
|
|
107
|
+
cursor: pointer;
|
|
108
|
+
color: var(--color-muted-foreground);
|
|
109
|
+
font-size: var(--text-xl);
|
|
110
|
+
line-height: var(--leading-tight);
|
|
111
|
+
padding: calc(var(--spacing) * 1);
|
|
112
|
+
border-radius: var(--radius-md);
|
|
113
|
+
transition: color 0.15s ease;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.dialog-close:hover {
|
|
117
|
+
color: var(--color-foreground);
|
|
118
|
+
background: color-mix(in srgb, var(--color-primary) 14%, transparent);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.dialog-body {
|
|
122
|
+
font-size: var(--text-base);
|
|
123
|
+
color: var(--color-muted-foreground);
|
|
124
|
+
line-height: var(--leading-normal);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.dialog-footer {
|
|
128
|
+
margin-top: calc(var(--spacing) * 5);
|
|
129
|
+
display: flex;
|
|
130
|
+
justify-content: flex-end;
|
|
131
|
+
gap: calc(var(--spacing) * 2);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
:host(:state(open)) dialog {
|
|
135
|
+
display: block;
|
|
136
|
+
}
|
|
137
|
+
|