vintage-frames 0.13.0 → 0.14.0

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.
Files changed (44) hide show
  1. package/custom-elements.json +8 -8
  2. package/dist/components/vf-checkbox.d.ts +6 -5
  3. package/dist/components/vf-checkbox.js +41 -37
  4. package/dist/components/vf-container.d.ts +11 -13
  5. package/dist/components/vf-container.js +24 -12
  6. package/dist/components/vf-fieldset.js +30 -22
  7. package/dist/components/vf-icon.js +55 -55
  8. package/dist/components/vf-list.js +30 -29
  9. package/dist/components/vf-menu.js +24 -22
  10. package/dist/components/vf-number-field.js +32 -30
  11. package/dist/components/vf-progress-bar.js +28 -29
  12. package/dist/components/vf-radio.js +3 -4
  13. package/dist/components/vf-scroll-area.js +27 -26
  14. package/dist/components/vf-select.js +108 -90
  15. package/dist/components/vf-separator.d.ts +5 -5
  16. package/dist/components/vf-separator.js +36 -10
  17. package/dist/components/vf-swatch.js +47 -45
  18. package/dist/components/vf-text-area.js +37 -35
  19. package/dist/components/vf-text-field.js +20 -18
  20. package/dist/components/vf-window.js +92 -72
  21. package/dist/index.d.ts +10 -1
  22. package/dist/index.js +60 -59
  23. package/dist/styles/base.d.ts +3 -1
  24. package/dist/styles/recipes/field.d.ts +10 -6
  25. package/dist/styles/recipes/field.js +8 -7
  26. package/dist/styles/recipes/focus.d.ts +7 -3
  27. package/dist/styles/recipes/rule.d.ts +11 -8
  28. package/dist/styles/recipes/rule.js +31 -13
  29. package/dist/styles/recipes/scroll-rail.d.ts +7 -6
  30. package/dist/styles/recipes/scroll-rail.js +18 -18
  31. package/dist/styles/recipes/shadow.d.ts +10 -6
  32. package/dist/styles/recipes/shadow.js +4 -2
  33. package/dist/styles/recipes/stroke.d.ts +85 -0
  34. package/dist/styles/recipes/stroke.js +53 -0
  35. package/dist/styles/recipes/surface.d.ts +8 -4
  36. package/dist/styles/recipes/surface.js +23 -17
  37. package/dist/styles/recipes/title-bar.d.ts +7 -0
  38. package/dist/styles/recipes/title-bar.js +25 -22
  39. package/dist/styles/recipes/toggle.js +3 -3
  40. package/dist/zoom.d.ts +9 -9
  41. package/docs/SPEC.md +23 -22
  42. package/editor/vscode.html-custom-data.json +4 -4
  43. package/editor/web-types.json +7 -7
  44. package/package.json +1 -1
@@ -5,12 +5,13 @@ import { VfPositioned as a } from "../position.js";
5
5
  import { vfBase as o } from "../styles/recipes/host.js";
6
6
  import { tileImage as s, tileRects as c, tileSpan as l, vfTileMaskSize as u } from "../styles/recipes/tile.js";
7
7
  import { RepeatTileController as d, patternOverride as f, tileGrid as p, vfRepeatTileSize as m, vfTileGrid as h } from "../tile-grid.js";
8
- import { GridSnapController as g } from "../grid-snap.js";
9
- import { TrackWidthController as _ } from "../track-width.js";
10
- import { LitElement as v, css as y, html as b, unsafeCSS as x } from "lit";
11
- import { property as S, query as C } from "lit/decorators.js";
8
+ import { vfStrokeDecls as g } from "../styles/recipes/stroke.js";
9
+ import { GridSnapController as _ } from "../grid-snap.js";
10
+ import { TrackWidthController as v } from "../track-width.js";
11
+ import { LitElement as y, css as b, html as x, unsafeCSS as S } from "lit";
12
+ import { property as C, query as w } from "lit/decorators.js";
12
13
  //#region src/components/vf-progress-bar.ts
13
- var w = 12, T = [
14
+ var T = 12, E = [
14
15
  [
15
16
  0,
16
17
  0,
@@ -113,16 +114,16 @@ var w = 12, T = [
113
114
  1,
114
115
  1
115
116
  ]
116
- ], E = {
117
- width: w,
118
- height: w,
119
- rects: T
120
- }, D = s(w, w, c(T)), O = l(w), k = class extends a(v) {
117
+ ], D = {
118
+ width: T,
119
+ height: T,
120
+ rects: E
121
+ }, O = s(T, T, c(E)), k = l(T), A = class extends a(y) {
121
122
  static {
122
123
  this.styles = [
123
124
  o,
124
125
  h,
125
- y`
126
+ b`
126
127
  :host {
127
128
  display: block;
128
129
  height: calc(var(--vf-scale, 1) * 14px);
@@ -131,22 +132,20 @@ var w = 12, T = [
131
132
  position: relative;
132
133
  height: 100%;
133
134
  background: var(--vf-progress-track, #ffffff);
134
- border: calc(var(--vf-scale, 1) * 1px) solid var(--vf-black, #000);
135
135
  border-radius: 0;
136
136
  overflow: hidden;
137
+ ${g()}
137
138
  }
138
139
  .fill {
139
140
  height: 100%;
140
141
  background: var(--vf-progress-fill, #000000);
141
- /* The classic 1px black leading edge. */
142
- border-right: calc(var(--vf-scale, 1) * 1px) solid var(--vf-black, #000);
143
142
  }
144
- .fill.empty {
145
- border-right: none;
143
+ /* The classic 1px black leading edge, on a fill with any width. */
144
+ .fill:not(.empty):not(.stripes) {
145
+ ${g({ edges: ["right"] })}
146
146
  }
147
147
  .fill.stripes {
148
148
  width: 100%;
149
- border-right: none;
150
149
  /* Chunky 45° barber stripes: a 12×12 system-px cell whose two black
151
150
  \ bands are a staircase of axis-aligned 1px rects (genuine pixel
152
151
  art — a *diagonal* edge would blur where these stay pixel-exact)
@@ -157,7 +156,7 @@ var w = 12, T = [
157
156
  strip's containing block and its clip. */
158
157
  position: relative;
159
158
  background-color: var(--vf-white, #fff);
160
- --_vf-tile-image: var(--vf-progress-stripes, ${x(D)});
159
+ --_vf-tile-image: var(--vf-progress-stripes, ${S(O)});
161
160
  }
162
161
  /* The animated strip: the fill's width plus one 12px cell, resting
163
162
  that cell to the left (fully covering the fill), and each cycle
@@ -201,8 +200,8 @@ var w = 12, T = [
201
200
  }
202
201
  .fill.stripes {
203
202
  background-color: var(--vf-progress-fill, CanvasText);
204
- mask-image: var(--vf-progress-stripes, ${x(D)});
205
- ${u(w)}
203
+ mask-image: var(--vf-progress-stripes, ${S(O)});
204
+ ${u(T)}
206
205
  animation: vf-barber-mask 0.4s steps(4, end) infinite;
207
206
  }
208
207
  .fill.stripes .vf-tile-strip {
@@ -229,9 +228,9 @@ var w = 12, T = [
229
228
  #e;
230
229
  #t;
231
230
  constructor() {
232
- super(), this.scale = new t(this), this.gridSnap = new g(this), this.value = 0, this.max = 100, this.indeterminate = !1, this.label = "", this.trackSize = new _(this, () => this.track), this._pattern = "", this.#e = new d(this, {
231
+ super(), this.scale = new t(this), this.gridSnap = new _(this), this.value = 0, this.max = 100, this.indeterminate = !1, this.label = "", this.trackSize = new v(this, () => this.track), this._pattern = "", this.#e = new d(this, {
233
232
  getBox: () => this.renderRoot?.querySelector(".vf-tile-strip"),
234
- getArt: () => this.indeterminate && !this._pattern ? E : null,
233
+ getArt: () => this.indeterminate && !this._pattern ? D : null,
235
234
  property: "--_vf-barber-tile"
236
235
  }), this.#t = this.attachInternals(), this.#t.role = "progressbar", this.#t.ariaValueMin = "0";
237
236
  }
@@ -251,14 +250,14 @@ var w = 12, T = [
251
250
  if (this.indeterminate) {
252
251
  let e = null;
253
252
  if (this._pattern) {
254
- let t = r(this.trackSize.width, this), n = Math.max(1, Math.ceil((t + w) / O));
253
+ let t = r(this.trackSize.width, this), n = Math.max(1, Math.ceil((t + T) / k));
255
254
  e = p({
256
255
  cols: n,
257
256
  rows: 1,
258
- tile: O
257
+ tile: k
259
258
  });
260
259
  }
261
- return b`
260
+ return x`
262
261
  <div class="track vf-snap" part="track">
263
262
  <div class="fill stripes vf-tile-grid" part="fill">
264
263
  <div class="vf-tile-strip">${e}</div>
@@ -267,7 +266,7 @@ var w = 12, T = [
267
266
  `;
268
267
  }
269
268
  let e = this.clampedValue / this.effectiveMax, t = r(this.trackSize.width, this), i = t > 0 ? `${n(Math.round(e * t), this)}px` : `${e * 100}%`;
270
- return b`
269
+ return x`
271
270
  <div class="track vf-snap" part="track">
272
271
  <div
273
272
  class="fill ${e <= 0 ? "empty" : ""}"
@@ -278,9 +277,9 @@ var w = 12, T = [
278
277
  `;
279
278
  }
280
279
  };
281
- i([S({ type: Number })], k.prototype, "value", void 0), i([S({ type: Number })], k.prototype, "max", void 0), i([S({
280
+ i([C({ type: Number })], A.prototype, "value", void 0), i([C({ type: Number })], A.prototype, "max", void 0), i([C({
282
281
  type: Boolean,
283
282
  reflect: !0
284
- })], k.prototype, "indeterminate", void 0), i([S()], k.prototype, "label", void 0), i([C(".track")], k.prototype, "track", void 0), k = i([e("vf-progress-bar")], k);
283
+ })], A.prototype, "indeterminate", void 0), i([C()], A.prototype, "label", void 0), i([w(".track")], A.prototype, "track", void 0), A = i([e("vf-progress-bar")], A);
285
284
  //#endregion
286
- export { k as VfProgressBar };
285
+ export { A as VfProgressBar };
@@ -21,10 +21,9 @@ var y = class extends r(f(p)) {
21
21
  m`
22
22
  /* Keyboard focus underlines the circle itself — not the label, and not a
23
23
  ring around either (see vfFocusUnderline). One blank row below the
24
- well, which is where vf-checkbox puts its own: −2 rather than that
25
- control's −3 only because this well is unbordered, so the two rules
26
- land on the same row of a mixed list. The 12px sprite sits half a
27
- pixel proud of the 13px well, so the gap reads as one row or two
24
+ well, which ends on the same row as vf-checkbox's box, so the two
25
+ rules land on the same row of a mixed list. The 12px sprite sits half
26
+ a pixel proud of the 13px well, so the gap reads as one row or two
28
27
  depending on which way that rounds — the well is the anchor, not the
29
28
  sprite. */
30
29
  :host(:focus-visible) .circle::after {
@@ -3,19 +3,20 @@ import { ScaleController as t } from "../scale.js";
3
3
  import n from "../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
4
4
  import { VfPositioned as r, placementIn as i } from "../position.js";
5
5
  import { vfBase as a } from "../styles/recipes/host.js";
6
- import { vfFocusRing as o } from "../styles/recipes/focus.js";
7
- import { vfScrollRail as s } from "../styles/recipes/scroll-rail.js";
8
- import { GridSnapController as c } from "../grid-snap.js";
9
- import { ScrollStateController as l } from "../scroll-state.js";
10
- import { ScrollRailController as u, renderScrollRail as d } from "../scroll-rail.js";
11
- import { LitElement as f, css as p, html as m, nothing as h } from "lit";
12
- import { property as g, query as _, state as v } from "lit/decorators.js";
6
+ import { vfStrokeDecls as o } from "../styles/recipes/stroke.js";
7
+ import { vfFocusRing as s } from "../styles/recipes/focus.js";
8
+ import { vfScrollRail as c } from "../styles/recipes/scroll-rail.js";
9
+ import { GridSnapController as l } from "../grid-snap.js";
10
+ import { ScrollStateController as u } from "../scroll-state.js";
11
+ import { ScrollRailController as d, renderScrollRail as f } from "../scroll-rail.js";
12
+ import { LitElement as p, css as m, html as h, nothing as g } from "lit";
13
+ import { property as _, query as v, state as y } from "lit/decorators.js";
13
14
  //#region src/components/vf-scroll-area.ts
14
- var y = class extends r(f) {
15
+ var b = class extends r(p) {
15
16
  constructor() {
16
- super(), this.scale = new t(this), this.gridSnap = new c(this), this.axis = "vertical", this.corner = !1, this.label = "", this.scrollState = new l(this, () => this.viewport, () => this.content, (e) => {
17
+ super(), this.scale = new t(this), this.gridSnap = new l(this), this.axis = "vertical", this.corner = !1, this.label = "", this.scrollState = new u(this, () => this.viewport, () => this.content, (e) => {
17
18
  this._scrollable = e.x || e.y;
18
- }), this.rail = new u(this, {
19
+ }), this.rail = new d(this, {
19
20
  getScroll: () => this.viewport,
20
21
  getContent: () => this.content
21
22
  }), this._scrollable = !1, this.#e = () => {
@@ -38,13 +39,13 @@ var y = class extends r(f) {
38
39
  static {
39
40
  this.styles = [
40
41
  a,
41
- s,
42
- p`
42
+ c,
43
+ m`
43
44
  :host {
44
45
  display: block;
45
46
  }
46
- /* The snapped wrapper: a real 1px frame (the rails' outer line is this
47
- border), a grid that reserves each rail as its own edge column/row —
47
+ /* The snapped wrapper: the 1px frame (the rails' outer line is this
48
+ stroke), a grid that reserves each rail as its own edge column/row —
48
49
  the rails size themselves to the 15px inside the frame — and the
49
50
  scroller and rails riding the grid-snap offset as one. */
50
51
  .box {
@@ -53,8 +54,8 @@ var y = class extends r(f) {
53
54
  display: grid;
54
55
  grid-template-columns: 1fr;
55
56
  grid-template-rows: 1fr;
56
- border: calc(var(--vf-scale, 1) * 1px) solid var(--vf-black, #000);
57
57
  background: var(--vf-white, #fff);
58
+ ${o()}
58
59
  }
59
60
  :host(:not([axis])) .box,
60
61
  :host([axis='vertical']) .box,
@@ -134,36 +135,36 @@ var y = class extends r(f) {
134
135
  /* Focusable so keyboard users can scroll; inset ring to stay in-box. */
135
136
  .viewport:focus-visible {
136
137
  --vf-focus-offset: -2px;
137
- ${o}
138
+ ${s}
138
139
  }
139
140
  `
140
141
  ];
141
142
  }
142
143
  render() {
143
144
  let e = this.axis !== "horizontal", t = this.axis === "horizontal" || this.axis === "both", n = e && t || this.corner;
144
- return m`
145
+ return h`
145
146
  <div class="box vf-snap">
146
147
  <div
147
148
  class="viewport vf-scroll"
148
149
  part="viewport"
149
- tabindex=${this._scrollable ? "0" : h}
150
- role=${this.label ? "region" : this._scrollable ? "group" : h}
151
- aria-label=${this.label || h}
150
+ tabindex=${this._scrollable ? "0" : g}
151
+ role=${this.label ? "region" : this._scrollable ? "group" : g}
152
+ aria-label=${this.label || g}
152
153
  >
153
154
  <div class="content">
154
155
  <slot @slotchange=${this._onSlotChange}></slot>
155
156
  </div>
156
157
  </div>
157
- ${e ? d(this.rail, "vertical") : h}
158
- ${t ? d(this.rail, "horizontal") : h}
159
- ${n ? m`<div class="vf-rail-corner" aria-hidden="true"></div>` : h}
158
+ ${e ? f(this.rail, "vertical") : g}
159
+ ${t ? f(this.rail, "horizontal") : g}
160
+ ${n ? h`<div class="vf-rail-corner" aria-hidden="true"></div>` : g}
160
161
  </div>
161
162
  `;
162
163
  }
163
164
  };
164
- n([g({ reflect: !0 })], y.prototype, "axis", void 0), n([g({
165
+ n([_({ reflect: !0 })], b.prototype, "axis", void 0), n([_({
165
166
  type: Boolean,
166
167
  reflect: !0
167
- })], y.prototype, "corner", void 0), n([g()], y.prototype, "label", void 0), n([_(".viewport")], y.prototype, "viewport", void 0), n([_(".content")], y.prototype, "content", void 0), n([v()], y.prototype, "_scrollable", void 0), y = n([e("vf-scroll-area")], y);
168
+ })], b.prototype, "corner", void 0), n([_()], b.prototype, "label", void 0), n([v(".viewport")], b.prototype, "viewport", void 0), n([v(".content")], b.prototype, "content", void 0), n([y()], b.prototype, "_scrollable", void 0), b = n([e("vf-scroll-area")], b);
168
169
  //#endregion
169
- export { y as VfScrollArea };
170
+ export { b as VfScrollArea };
@@ -6,28 +6,29 @@ import { VfPositioned as o } from "../position.js";
6
6
  import { vfBodyDecls as s } from "../styles/recipes/body-face.js";
7
7
  import { vfDisplay as c } from "../styles/recipes/display-face.js";
8
8
  import { vfBase as l } from "../styles/recipes/host.js";
9
- import { vfPanel as u } from "../styles/recipes/surface.js";
10
- import { vfFocusUnderline as d } from "../styles/recipes/focus.js";
11
- import { GridSnapController as f } from "../grid-snap.js";
12
- import { DocumentListenersController as p } from "../document-listeners.js";
13
- import { runSelectionBlink as m } from "../motion.js";
14
- import { CARET_DOWN as h, CARET_DOWN_SMALL as g, CARET_UP as _, CARET_UP_SMALL as v, glyphSvg as y } from "../glyphs.js";
15
- import { VfShadowRoleControl as b } from "../form-control.js";
16
- import { FocusRuleController as x } from "../focus-modality.js";
17
- import { VfOption as S } from "./vf-option.js";
18
- import { clampScroll as C, ensureVisibleScroll as w, firstPickableRow as T, lastPickableRow as E, layoutClampedPopup as D } from "../popup-overflow.js";
19
- import { TypeAheadBuffer as O } from "../type-ahead.js";
20
- import { css as k, html as A, nothing as j } from "lit";
21
- import { property as M, query as N, queryAssignedElements as P, state as F } from "lit/decorators.js";
22
- import { classMap as I } from "lit/directives/class-map.js";
9
+ import { vfStrokeDecls as u, vfStrokeInset as d } from "../styles/recipes/stroke.js";
10
+ import { vfPanel as f } from "../styles/recipes/surface.js";
11
+ import { vfFocusUnderline as p } from "../styles/recipes/focus.js";
12
+ import { GridSnapController as m } from "../grid-snap.js";
13
+ import { DocumentListenersController as h } from "../document-listeners.js";
14
+ import { runSelectionBlink as g } from "../motion.js";
15
+ import { CARET_DOWN as _, CARET_DOWN_SMALL as v, CARET_UP as y, CARET_UP_SMALL as b, glyphSvg as x } from "../glyphs.js";
16
+ import { VfShadowRoleControl as S } from "../form-control.js";
17
+ import { FocusRuleController as C } from "../focus-modality.js";
18
+ import { VfOption as w } from "./vf-option.js";
19
+ import { clampScroll as T, ensureVisibleScroll as E, firstPickableRow as D, lastPickableRow as O, layoutClampedPopup as k } from "../popup-overflow.js";
20
+ import { TypeAheadBuffer as A } from "../type-ahead.js";
21
+ import { css as j, html as M, nothing as N } from "lit";
22
+ import { property as P, query as F, queryAssignedElements as I, state as L } from "lit/decorators.js";
23
+ import { classMap as R } from "lit/directives/class-map.js";
23
24
  //#region src/components/vf-select.ts
24
- var L = class extends o(b) {
25
+ var z = class extends o(S) {
25
26
  static {
26
27
  this.styles = [
27
28
  l,
28
29
  c,
29
- u,
30
- k`
30
+ f,
31
+ j`
31
32
  :host {
32
33
  /* A popup menu is sized to its widest option — never stretched to fill
33
34
  its container. fit-content holds that intrinsic width even inside a
@@ -65,22 +66,28 @@ var L = class extends o(b) {
65
66
  /* 18px, not the 22px fields: the reference pill measures 156×18 plus
66
67
  its 1px hard shadow (the 157×19 ink box on the sheet). */
67
68
  height: calc(var(--vf-scale, 1) * var(--vf-popup-height, 18px));
68
- /* Left inset = the checkmark gutter (--vf-select-gutter), so the selected
69
- label sits at the SAME x it will occupy in the open list (where the ✓
70
- fills that gutter). The right inset stays the small 8px. */
71
- padding: 0 calc(var(--vf-scale, 1) * 8px) 0
72
- calc(var(--vf-scale, 1) * var(--vf-select-gutter, 16px));
73
69
  background: var(--vf-white, #fff);
74
- border: calc(var(--vf-scale, 1) * 1px) solid var(--vf-black, #000);
75
70
  border-radius: 0;
76
- /* At depth 0 the shadow is the border box itself, which paints nothing. */
77
- box-shadow: calc(var(--vf-scale, 1) * var(--_shadow-depth))
78
- calc(var(--vf-scale, 1) * var(--_shadow-depth)) 0 0 var(--vf-black, #000);
79
71
  /* The press-drag gesture owns pointer moves while the button is held;
80
72
  suppress the browser's own touch panning/scrolling so a touch drag
81
73
  tracks the list instead of scrolling the page. */
82
74
  touch-action: none;
83
75
  cursor: var(--vf-cursor, default);
76
+ /* The 1px frame is a stroke, the hard shadow after it in the list —
77
+ at depth 0 the shadow is the border box itself, which paints
78
+ nothing. Left inset = the checkmark gutter (--vf-select-gutter), so
79
+ the selected label sits at the SAME x it will occupy in the open
80
+ list (where the ✓ fills that gutter). The right inset stays the
81
+ small 8px. */
82
+ ${u({
83
+ padding: [
84
+ 0,
85
+ 8,
86
+ 0,
87
+ "var(--vf-select-gutter, 16px)"
88
+ ],
89
+ shadows: "calc(var(--vf-scale, 1) * var(--_shadow-depth)) calc(var(--vf-scale, 1) * var(--_shadow-depth)) 0 0 var(--vf-black, #000)"
90
+ })}
84
91
  }
85
92
  /* Keyboard focus is the kit's dashed rule under the pill, not a ring
86
93
  around it (see vfFocusUnderline). It goes BELOW the whole box rather
@@ -88,11 +95,12 @@ var L = class extends o(b) {
88
95
  has one line and the label already shares it with the ▼.
89
96
 
90
97
  The offset counts every row of ink below the pseudo-element's padding
91
- box before the blank row and the rule itself — the 1px border, then
92
- the hard shadow (1px, or none under no-shadow): −(1 + 1 + depth + 1).
93
- The ±1px sides widen it from
94
- that same padding box to the border box, which is the shape the pill
95
- reads as (the shadow is a depth cue, not part of the silhouette).
98
+ box, which runs under the pill's stroke, before the blank row and the
99
+ rule itself — the hard shadow (1px, or none under no-shadow):
100
+ −(depth + 1 + 1). The rule spans that same box, which is the shape
101
+ the pill reads as (the shadow is a depth cue, not part of the
102
+ silhouette). Under forced colors the stroke is a border and the
103
+ padding box sits inside it, so the insets grow by it there.
96
104
 
97
105
  Gated on a class, not :focus-visible — the same problem the editable
98
106
  fields have, arrived at from the other direction. The pill suppresses
@@ -107,10 +115,10 @@ var L = class extends o(b) {
107
115
  outline: none;
108
116
  }
109
117
  .control.vf-focus-rule::after {
110
- --vf-focus-underline-offset: calc(-3px - var(--_shadow-depth));
111
- ${d}
112
- left: calc(var(--vf-scale, 1) * -1px);
113
- right: calc(var(--vf-scale, 1) * -1px);
118
+ ${p}
119
+ bottom: ${d("(-3px - var(--_shadow-depth))")};
120
+ left: ${d(-1)};
121
+ right: ${d(-1)};
114
122
  }
115
123
  /* The label is a 1×1 grid: the visible value and an invisible stack of
116
124
  every option's text share the one cell, so the cell — and thus the
@@ -194,16 +202,10 @@ var L = class extends o(b) {
194
202
  position: fixed;
195
203
  z-index: 10000;
196
204
  margin: 0;
197
- padding: 0;
198
205
  /* Match the closed pill's 1px hard shadow — the shared .vf-panel recipe
199
206
  defaults to the 2px menu shadow, which would overhang the pill's shadow
200
207
  by 1px on the right and bottom. */
201
208
  --vf-shadow-offset: 1px;
202
- /* A CLIP, never a scroll surface: positionPanel gives the panel a whole
203
- number of row slots and the rows are rolled by transform inside it.
204
- System 7 put no scrollbar on a menu, and an un-quantized native scroll
205
- would break the row lattice the pill overlay is built on. */
206
- overflow: hidden;
207
209
  /* The screen-edge reserve, resolved here and read back by
208
210
  positionPanel: the clamp is JS geometry, so the tokens can't be spent
209
211
  in a declaration, but their defaults and the cascade still belong in
@@ -216,6 +218,18 @@ var L = class extends o(b) {
216
218
  .panel.open {
217
219
  display: block;
218
220
  }
221
+ /* A CLIP, never a scroll surface: positionPanel gives the panel a whole
222
+ number of row slots and the rows are rolled by transform inside it.
223
+ System 7 put no scrollbar on a menu, and an un-quantized native scroll
224
+ would break the row lattice the pill overlay is built on. An element
225
+ inside the panel rather than the panel itself, whose frame is a
226
+ stroke: the panel would clip at its outer edge and let rolled rows
227
+ paint over the frame. The arrow slots place against it. */
228
+ .clip {
229
+ position: relative;
230
+ height: 100%;
231
+ overflow: hidden;
232
+ }
219
233
  /* The rolling strip — a box for the options to ride, whose translateY
220
234
  positionPanel and the arrow timer write. Transform rather than
221
235
  scrollTop: both keep
@@ -290,7 +304,7 @@ var L = class extends o(b) {
290
304
  return this.rowScroll < this.optionItems.length - this.visibleSlots;
291
305
  }
292
306
  constructor() {
293
- super(), this.value = "", this.name = "", this.size = "regular", this.noShadow = !1, this.label = "", this.open = !1, this.cachedOptions = [], this.scale = new r(this), this.gridSnap = new f(this), this.focusRule = new x(this), this.panelListeners = new p(this, () => [
307
+ super(), this.value = "", this.name = "", this.size = "regular", this.noShadow = !1, this.label = "", this.open = !1, this.cachedOptions = [], this.scale = new r(this), this.gridSnap = new m(this), this.focusRule = new C(this), this.panelListeners = new h(this, () => [
294
308
  [
295
309
  document,
296
310
  "pointerdown",
@@ -308,7 +322,7 @@ var L = class extends o(b) {
308
322
  "resize",
309
323
  this.handleWindowResize
310
324
  ]
311
- ]), this.pressListeners = new p(this, () => [
325
+ ]), this.pressListeners = new h(this, () => [
312
326
  [
313
327
  document,
314
328
  "pointermove",
@@ -327,7 +341,7 @@ var L = class extends o(b) {
327
341
  this.handlePressCancel,
328
342
  !0
329
343
  ]
330
- ]), this.activeIndex = -1, this.rowScroll = 0, this.visibleSlots = 0, this.rowHeight = 0, this.arrowScroll = null, this.pressStartArrow = null, this.pressing = !1, this.pressOpenedPanel = !1, this.pressMoved = !1, this.pressStartOption = null, this.pressDownTime = 0, this.pressDownX = 0, this.pressDownY = 0, this.swallowClick = !1, this.blinking = !1, this.typeAhead = new O(), this.handleSlotChange = () => {
344
+ ]), this.activeIndex = -1, this.rowScroll = 0, this.visibleSlots = 0, this.rowHeight = 0, this.arrowScroll = null, this.pressStartArrow = null, this.pressing = !1, this.pressOpenedPanel = !1, this.pressMoved = !1, this.pressStartOption = null, this.pressDownTime = 0, this.pressDownX = 0, this.pressDownY = 0, this.swallowClick = !1, this.blinking = !1, this.typeAhead = new A(), this.handleSlotChange = () => {
331
345
  if (this.cachedOptions = this.assignedOptions ?? [], this.applySize(), this.value === "") {
332
346
  let e = this.optionItems.find((e) => !e.disabled);
333
347
  e && (this.value = this.optionValue(e));
@@ -485,7 +499,7 @@ var L = class extends o(b) {
485
499
  positionPanel(e) {
486
500
  let t = this.controlEl, n = this.panelEl;
487
501
  if (!t || !n) return;
488
- let r = t.getBoundingClientRect(), a = getComputedStyle(n), o = parseFloat(a.borderTopWidth) || 0, s = this.optionItems[0]?.getBoundingClientRect()?.height || r.height - 2 * o, c = (e) => i(parseFloat(a.getPropertyValue(e)) || 0, this), l = D({
502
+ let r = t.getBoundingClientRect(), a = getComputedStyle(n), o = (parseFloat(a.borderTopWidth) || 0) + (parseFloat(a.paddingTop) || 0), s = this.optionItems[0]?.getBoundingClientRect()?.height || r.height - 2 * o, c = (e) => i(parseFloat(a.getPropertyValue(e)) || 0, this), l = k({
489
503
  idealTop: r.top - e * s,
490
504
  rowHeight: s,
491
505
  border: o,
@@ -503,11 +517,11 @@ var L = class extends o(b) {
503
517
  this.rowsEl && (this.rowsEl.style.transform = e ? `translateY(${-e}px)` : ""), this.upArrowEl?.classList.toggle("shown", this.showUpArrow), this.downArrowEl?.classList.toggle("shown", this.showDownArrow);
504
518
  }
505
519
  revealRow(e) {
506
- let t = w(e, this.rowScroll, this.optionItems.length, this.visibleSlots);
520
+ let t = E(e, this.rowScroll, this.optionItems.length, this.visibleSlots);
507
521
  t !== this.rowScroll && (this.rowScroll = t, this.applyScroll());
508
522
  }
509
523
  stepArrowScroll(e) {
510
- let t = C(this.rowScroll + e, this.rowScroll, this.optionItems.length, this.visibleSlots);
524
+ let t = T(this.rowScroll + e, this.rowScroll, this.optionItems.length, this.visibleSlots);
511
525
  return t !== this.rowScroll && (this.rowScroll = t, this.applyScroll(), !0);
512
526
  }
513
527
  startArrowScroll(e) {
@@ -583,7 +597,7 @@ var L = class extends o(b) {
583
597
  if (e.disabled || this.blinking) return;
584
598
  let t = this.optionItems.indexOf(e);
585
599
  this.setActive(t, !1), this.blinking = !0;
586
- let n = m((t) => {
600
+ let n = g((t) => {
587
601
  e.active = t;
588
602
  }, () => {
589
603
  this.commit(e);
@@ -599,7 +613,7 @@ var L = class extends o(b) {
599
613
  this.value = r, e(this, "vf-change", { value: r }), t(this, "input"), t(this, "change");
600
614
  }
601
615
  optionFromEvent(e) {
602
- return e.composedPath().find((e) => e instanceof S);
616
+ return e.composedPath().find((e) => e instanceof w);
603
617
  }
604
618
  endPress() {
605
619
  this.pressing && (this.pressing = !1, this.pressStartOption = null, this.pressStartArrow = null, this.pressListeners.detach());
@@ -609,7 +623,7 @@ var L = class extends o(b) {
609
623
  if (!this.open || !n) return null;
610
624
  let r = n.getBoundingClientRect();
611
625
  if (e < r.left || e >= r.right || t < r.top || t >= r.bottom) return null;
612
- let i = T(this.rowScroll), a = E(this.rowScroll, this.optionItems.length, this.visibleSlots);
626
+ let i = D(this.rowScroll), a = O(this.rowScroll, this.optionItems.length, this.visibleSlots);
613
627
  for (let n = i; n <= a; n += 1) {
614
628
  let r = this.optionItems[n];
615
629
  if (!r) continue;
@@ -632,10 +646,10 @@ var L = class extends o(b) {
632
646
  this.selectOption(e);
633
647
  }
634
648
  render() {
635
- let e = this.optionItems.find((e) => this.optionValue(e) === this.value), t = e ? (e.textContent ?? "").trim() : "", n = this.isDisabled, r = this.size === "small", i = r ? g : h, a = r ? v : _;
636
- return A`
649
+ let e = this.optionItems.find((e) => this.optionValue(e) === this.value), t = e ? (e.textContent ?? "").trim() : "", n = this.isDisabled, r = this.size === "small", i = r ? v : _, a = r ? b : y;
650
+ return M`
637
651
  <div
638
- class=${I({
652
+ class=${R({
639
653
  control: !0,
640
654
  "vf-snap": !0,
641
655
  "vf-focus-rule": this.focusRule.marked && !this.open,
@@ -647,20 +661,20 @@ var L = class extends o(b) {
647
661
  aria-expanded=${this.open ? "true" : "false"}
648
662
  aria-disabled=${n ? "true" : "false"}
649
663
  aria-controls="listbox"
650
- aria-label=${this.label || this.hostLabel || j}
664
+ aria-label=${this.label || this.hostLabel || N}
651
665
  aria-describedby=${this.describedBy}
652
- aria-required=${this.required ? "true" : j}
653
- aria-invalid=${this.validity.valid ? j : "true"}
666
+ aria-required=${this.required ? "true" : N}
667
+ aria-invalid=${this.validity.valid ? N : "true"}
654
668
  tabindex=${n ? "-1" : "0"}
655
669
  >
656
670
  <span class="label" part="label">
657
671
  <span class="value">${t}</span>
658
672
  <span class="sizer" aria-hidden="true">
659
- ${this.optionItems.map((e) => A`<span>${(e.textContent ?? "").trim()}</span>`)}
673
+ ${this.optionItems.map((e) => M`<span>${(e.textContent ?? "").trim()}</span>`)}
660
674
  </span>
661
675
  </span>
662
676
  <span class="arrow" part="arrow" aria-hidden="true"
663
- >${y(i, "caret")}</span
677
+ >${x(i, "caret")}</span
664
678
  >
665
679
  </div>
666
680
  <div
@@ -668,47 +682,51 @@ var L = class extends o(b) {
668
682
  class="panel vf-panel ${this.open ? "open" : ""}"
669
683
  part="panel"
670
684
  role="listbox"
671
- aria-label=${this.label || this.hostLabel || j}
685
+ aria-label=${this.label || this.hostLabel || N}
672
686
  aria-hidden=${this.open ? "false" : "true"}
673
687
  >
674
- <!-- role="presentation" so the strip that carries the roll doesn't
675
- stand between the listbox and the options it owns. -->
676
- <div class="rows" role="presentation">
677
- <slot @slotchange=${this.handleSlotChange}></slot>
678
- </div>
679
- <!-- Pointer affordances only, hence aria-hidden: the clipped options
680
- stay in the accessibility tree un-hidden (clipping is presentation,
681
- and a native <select> exposes its whole list too), and keyboard and
682
- AT users reach every row with the arrows, Home/End and type-ahead. -->
683
- <div
684
- class="arrow-slot up"
685
- part="scroll-arrow"
686
- aria-hidden="true"
687
- @pointerenter=${this.handleArrowEnter}
688
- @pointermove=${this.handleArrowEnter}
689
- @pointerleave=${this.handleArrowLeave}
690
- >
691
- ${y(a, "caret")}
692
- </div>
693
- <div
694
- class="arrow-slot down"
695
- part="scroll-arrow"
696
- aria-hidden="true"
697
- @pointerenter=${this.handleArrowEnter}
698
- @pointermove=${this.handleArrowEnter}
699
- @pointerleave=${this.handleArrowLeave}
700
- >
701
- ${y(i, "caret")}
688
+ <!-- role="presentation" on the clip and the strip that carries the
689
+ roll, so neither stands between the listbox and the options it
690
+ owns. -->
691
+ <div class="clip" role="presentation">
692
+ <div class="rows" role="presentation">
693
+ <slot @slotchange=${this.handleSlotChange}></slot>
694
+ </div>
695
+ <!-- Pointer affordances only, hence aria-hidden: the clipped options
696
+ stay in the accessibility tree un-hidden (clipping is
697
+ presentation, and a native <select> exposes its whole list too),
698
+ and keyboard and AT users reach every row with the arrows,
699
+ Home/End and type-ahead. -->
700
+ <div
701
+ class="arrow-slot up"
702
+ part="scroll-arrow"
703
+ aria-hidden="true"
704
+ @pointerenter=${this.handleArrowEnter}
705
+ @pointermove=${this.handleArrowEnter}
706
+ @pointerleave=${this.handleArrowLeave}
707
+ >
708
+ ${x(a, "caret")}
709
+ </div>
710
+ <div
711
+ class="arrow-slot down"
712
+ part="scroll-arrow"
713
+ aria-hidden="true"
714
+ @pointerenter=${this.handleArrowEnter}
715
+ @pointermove=${this.handleArrowEnter}
716
+ @pointerleave=${this.handleArrowLeave}
717
+ >
718
+ ${x(i, "caret")}
719
+ </div>
702
720
  </div>
703
721
  </div>
704
722
  ${this.renderDescription()}
705
723
  `;
706
724
  }
707
725
  };
708
- a([M()], L.prototype, "value", void 0), a([M({ reflect: !0 })], L.prototype, "name", void 0), a([M({ reflect: !0 })], L.prototype, "size", void 0), a([M({
726
+ a([P()], z.prototype, "value", void 0), a([P({ reflect: !0 })], z.prototype, "name", void 0), a([P({ reflect: !0 })], z.prototype, "size", void 0), a([P({
709
727
  type: Boolean,
710
728
  reflect: !0,
711
729
  attribute: "no-shadow"
712
- })], L.prototype, "noShadow", void 0), a([M()], L.prototype, "label", void 0), a([F()], L.prototype, "open", void 0), a([N(".control")], L.prototype, "controlEl", void 0), a([N(".panel")], L.prototype, "panelEl", void 0), a([N(".rows")], L.prototype, "rowsEl", void 0), a([N(".arrow-slot.up")], L.prototype, "upArrowEl", void 0), a([N(".arrow-slot.down")], L.prototype, "downArrowEl", void 0), a([P({ selector: "vf-option" })], L.prototype, "assignedOptions", void 0), a([F()], L.prototype, "cachedOptions", void 0), L = a([n("vf-select")], L);
730
+ })], z.prototype, "noShadow", void 0), a([P()], z.prototype, "label", void 0), a([L()], z.prototype, "open", void 0), a([F(".control")], z.prototype, "controlEl", void 0), a([F(".panel")], z.prototype, "panelEl", void 0), a([F(".rows")], z.prototype, "rowsEl", void 0), a([F(".arrow-slot.up")], z.prototype, "upArrowEl", void 0), a([F(".arrow-slot.down")], z.prototype, "downArrowEl", void 0), a([I({ selector: "vf-option" })], z.prototype, "assignedOptions", void 0), a([L()], z.prototype, "cachedOptions", void 0), z = a([n("vf-select")], z);
713
731
  //#endregion
714
- export { L as VfSelect };
732
+ export { z as VfSelect };
@@ -10,13 +10,13 @@ declare const VfSeparator_base: (new (...args: any[]) => import("../position.js"
10
10
  *
11
11
  * Containers may restyle it via custom properties:
12
12
  * - `--vf-separator-color` — line color (default `var(--vf-black, #000)`).
13
- * - `--vf-separator-style` — line style, e.g. `dotted` (default `solid`).
14
- * `vf-menu` sets these so slotted separators render as the classic dimmed
15
- * dotted menu rule (see Menus.png).
13
+ * - `--vf-separator-style` — `solid` (the default) or `dotted`, one system px
14
+ * on and one off. `vf-menu` sets these so slotted separators render as the
15
+ * classic dimmed dotted menu rule (see Menus.png).
16
16
  * @cssprop --vf-separator-color - `vf-separator` rule color — `vf-menu` sets it
17
17
  * to `--vf-disabled` for the dimmed menu rule
18
- * @cssprop [--vf-separator-style=solid] - `vf-separator` rule style — `vf-menu`
19
- * sets `dotted` (see `Menus.png`)
18
+ * @cssprop [--vf-separator-style=solid] - `vf-separator` rule style: `solid`
19
+ * or `dotted` — `vf-menu` sets `dotted` (see `Menus.png`)
20
20
  */
21
21
  export declare class VfSeparator extends VfSeparator_base {
22
22
  #private;