@openelement/ui 1.0.0-alpha.14 → 1.0.0-alpha.15
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 +173 -41
- package/README.md +10 -7
- package/package.json +2 -2
- package/src/generated-manifest.json +46 -10
- package/src/open-button.css +119 -108
- package/src/open-button.d.ts +78 -27
- package/src/open-button.js +157 -232
- package/src/open-code-block.css +24 -44
- package/src/open-code-block.d.ts +3 -1
- package/src/open-code-block.js +28 -3
- package/src/open-dialog.css +114 -127
- package/src/open-dialog.d.ts +3 -1
- package/src/open-dialog.js +43 -8
- package/src/open-dropdown.css +20 -26
- package/src/open-dropdown.d.ts +3 -1
- package/src/open-dropdown.js +14 -4
- package/src/open-input.css +58 -80
- package/src/open-input.d.ts +4 -26
- package/src/open-input.js +86 -140
- package/src/open-theme-toggle.css +37 -47
- package/src/open-theme-toggle.d.ts +3 -1
- package/src/open-theme-toggle.js +27 -5
- package/src/theme.css +26 -8
- package/src/control-recipe.css +0 -21
package/src/open-input.css
CHANGED
|
@@ -1,80 +1,58 @@
|
|
|
1
|
-
/* open-input —
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
border-color: var(--color-destructive);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
:host(:state(disabled)) .input {
|
|
63
|
-
opacity: 0.5;
|
|
64
|
-
cursor: not-allowed;
|
|
65
|
-
background: var(--color-muted);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
:host(:state(invalid)) .input {
|
|
69
|
-
border-color: var(--color-destructive);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.error-message {
|
|
73
|
-
font-size: var(--text-xs);
|
|
74
|
-
color: var(--color-destructive);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.error-message[hidden] {
|
|
78
|
-
display: none;
|
|
79
|
-
}
|
|
80
|
-
|
|
1
|
+
/* open-input — the irreducible authored rules (alpha15 S lane).
|
|
2
|
+
*
|
|
3
|
+
* The wrapper layout, the label's typography, the control's box (width,
|
|
4
|
+
* padding, font, radius, transition, outline) and the error message's ink are
|
|
5
|
+
* authored as Tailwind utilities in open-input.tsx: the compiler admits those
|
|
6
|
+
* static tokens and the build's component stylesheet carries the generated
|
|
7
|
+
* rules into this shadow root.
|
|
8
|
+
*
|
|
9
|
+
* What stays here, and why (CUSTOMIZATION.md → "Why the residue is CSS"): each
|
|
10
|
+
* block below has a real utility spelling — `[:host(:state(invalid))_&]:border-destructive`
|
|
11
|
+
* compiles to exactly the rule kept here — and the sheet keeps it because one
|
|
12
|
+
* owned rule reads as the component's state contract, where the utility form
|
|
13
|
+
* embeds an escaped ancestor selector in the class attribute.
|
|
14
|
+
* - the host box;
|
|
15
|
+
* - the control's DERIVED surfaces: the popover/border mixes of its resting
|
|
16
|
+
* border and background, the violet-400 hover border, and the focus ring's
|
|
17
|
+
* doubled box-shadow, each computed from pairs of role variables;
|
|
18
|
+
* - the disabled and invalid treatments, which are scoped to the HOST's form
|
|
19
|
+
* state (`:host(:state(disabled))` / `:host(:state(invalid))`) — the state
|
|
20
|
+
* lives on the host, so the selector is what ties the rule to it.
|
|
21
|
+
* The `hidden` attributes need no rules: nothing here sets `display` on the
|
|
22
|
+
* label or the error message, so the platform's own `[hidden]` behavior holds.
|
|
23
|
+
* One owner per property: nothing here is also authored as a utility.
|
|
24
|
+
*/
|
|
25
|
+
:host {
|
|
26
|
+
display: block;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.control {
|
|
30
|
+
background: color-mix(in srgb, var(--color-popover) 78%, transparent);
|
|
31
|
+
border: calc(var(--spacing) * 0.25) solid
|
|
32
|
+
color-mix(in srgb, var(--color-border) 72%, var(--color-primary));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.control:hover {
|
|
36
|
+
border-color: color-mix(in srgb, var(--color-violet-400) 74%, var(--color-border));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.control:focus {
|
|
40
|
+
border-color: var(--color-primary);
|
|
41
|
+
box-shadow: 0 0 0 1px var(--color-primary);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.control:disabled {
|
|
45
|
+
opacity: 0.5;
|
|
46
|
+
cursor: not-allowed;
|
|
47
|
+
background: var(--color-muted);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:host(:state(disabled)) .control {
|
|
51
|
+
opacity: 0.5;
|
|
52
|
+
cursor: not-allowed;
|
|
53
|
+
background: var(--color-muted);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:host(:state(invalid)) .control {
|
|
57
|
+
border-color: var(--color-destructive);
|
|
58
|
+
}
|
package/src/open-input.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ declare const __partProgram: {
|
|
|
29
29
|
k: string;
|
|
30
30
|
id: string;
|
|
31
31
|
tag: string;
|
|
32
|
-
attrs:
|
|
32
|
+
attrs: never[];
|
|
33
33
|
children: {
|
|
34
34
|
k: string;
|
|
35
35
|
id: string;
|
|
@@ -69,21 +69,6 @@ declare const __partProgram: {
|
|
|
69
69
|
event?: undefined;
|
|
70
70
|
handler?: undefined;
|
|
71
71
|
action?: undefined;
|
|
72
|
-
} | {
|
|
73
|
-
k: string;
|
|
74
|
-
signal: string;
|
|
75
|
-
path: number[];
|
|
76
|
-
index: number;
|
|
77
|
-
location: {
|
|
78
|
-
id: string;
|
|
79
|
-
kind: string;
|
|
80
|
-
path: number[];
|
|
81
|
-
node: string;
|
|
82
|
-
};
|
|
83
|
-
name?: undefined;
|
|
84
|
-
event?: undefined;
|
|
85
|
-
handler?: undefined;
|
|
86
|
-
action?: undefined;
|
|
87
72
|
} | {
|
|
88
73
|
k: string;
|
|
89
74
|
event: string;
|
|
@@ -103,7 +88,7 @@ declare const __partProgram: {
|
|
|
103
88
|
signal?: undefined;
|
|
104
89
|
name?: undefined;
|
|
105
90
|
})[];
|
|
106
|
-
|
|
91
|
+
blocks: never[];
|
|
107
92
|
dependencies: {
|
|
108
93
|
signal: string;
|
|
109
94
|
owner: {
|
|
@@ -380,12 +365,6 @@ declare const __compiledProps: {
|
|
|
380
365
|
reflect: boolean;
|
|
381
366
|
attribute: boolean;
|
|
382
367
|
};
|
|
383
|
-
inputClass: {
|
|
384
|
-
type: ObjectConstructor;
|
|
385
|
-
default: undefined;
|
|
386
|
-
reflect: boolean;
|
|
387
|
-
attribute: boolean;
|
|
388
|
-
};
|
|
389
368
|
idAttr: {
|
|
390
369
|
type: ObjectConstructor;
|
|
391
370
|
default: undefined;
|
|
@@ -425,6 +404,8 @@ export declare class OpenInput extends OpenElement {
|
|
|
425
404
|
static observedAttributes: typeof __observedAttributes;
|
|
426
405
|
static delegatesFocus: boolean;
|
|
427
406
|
static formAssociated: boolean;
|
|
407
|
+
static __oeUtilityClasses: boolean;
|
|
408
|
+
static __oeClassCandidates: readonly string[];
|
|
428
409
|
static __computedFields: {
|
|
429
410
|
noLabel: (__s: {
|
|
430
411
|
label: ReadonlySignal<string>;
|
|
@@ -432,9 +413,6 @@ export declare class OpenInput extends OpenElement {
|
|
|
432
413
|
noError: (__s: {
|
|
433
414
|
error: ReadonlySignal<string>;
|
|
434
415
|
}) => ReadonlySignal<boolean>;
|
|
435
|
-
inputClass: (__s: {
|
|
436
|
-
error: ReadonlySignal<string>;
|
|
437
|
-
}) => ReadonlySignal<string>;
|
|
438
416
|
idAttr: (__s: {
|
|
439
417
|
inputId: ReadonlySignal<string>;
|
|
440
418
|
}) => ReadonlySignal<string | null>;
|