@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.
@@ -1,80 +1,58 @@
1
- /* open-input — 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: block;
7
- }
8
-
9
- .input-wrapper {
10
- display: flex;
11
- flex-direction: column;
12
- gap: calc(var(--spacing) * 2);
13
- }
14
-
15
- label {
16
- font-size: var(--text-sm);
17
- font-weight: var(--font-weight-medium);
18
- color: var(--color-muted-foreground);
19
- letter-spacing: var(--tracking-normal);
20
- }
21
-
22
- label[hidden] {
23
- display: none;
24
- }
25
-
26
- .input {
27
- width: 100%;
28
- padding: calc(var(--spacing) * 2) calc(var(--spacing) * 3);
29
- font-family: var(--font-sans);
30
- font-size: var(--text-base);
31
- color: var(--color-foreground);
32
- background: color-mix(in srgb, var(--color-popover) 78%, transparent);
33
- border: calc(var(--spacing) * 0.25) solid color-mix(in srgb, var(--color-border) 72%, var(--color-primary));
34
- border-radius: var(--radius-md);
35
- transition: border-color 0.2s ease, box-shadow 0.2s ease;
36
- outline: none;
37
- }
38
-
39
- .input::placeholder {
40
- color: var(--color-muted-foreground);
41
- }
42
-
43
- .input:hover {
44
- border-color: color-mix(in srgb, var(--color-violet-400) 74%, var(--color-border));
45
- }
46
-
47
- .input:focus {
48
- border-color: var(--color-primary);
49
- box-shadow: 0 0 0 1px var(--color-primary);
50
- }
51
-
52
- .input:disabled {
53
- opacity: 0.5;
54
- cursor: not-allowed;
55
- background: var(--color-muted);
56
- }
57
-
58
- .input--error {
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
+ }
@@ -29,7 +29,7 @@ declare const __partProgram: {
29
29
  k: string;
30
30
  id: string;
31
31
  tag: string;
32
- attrs: string[][];
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
- regions: never[];
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>;