@jsekulowicz/ds-components 0.22.0 → 0.23.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.
@@ -6458,7 +6458,7 @@
6458
6458
  {
6459
6459
  "kind": "variable",
6460
6460
  "name": "selectCommonStyles",
6461
- "default": "css` :host { --ds-select-size: var(--ds-size-md); display: inline-flex; flex-direction: column; gap: var(--ds-space-1); width: 100%; } :host([size='sm']) { --ds-select-size: var(--ds-size-sm); } :host([size='lg']) { --ds-select-size: var(--ds-size-lg); } :host([size='sm']) .trigger { font-size: var(--ds-font-size-xs); } :host([size='lg']) .trigger { font-size: var(--ds-font-size-md); } .control-wrap { position: relative; width: 100%; } .trigger { display: flex; align-items: center; gap: var(--ds-space-2); width: 100%; height: var(--ds-select-size); padding: 0 var(--ds-space-3); background: var(--ds-color-bg); border: 1px solid var(--ds-color-border-strong); border-radius: var(--ds-radius-sm); transition: border-color var(--ds-duration-fast) var(--ds-easing-standard), box-shadow var(--ds-duration-fast) var(--ds-easing-standard); } .trigger:hover { border-color: var(--ds-color-fg-subtle); } :host([invalid]) .trigger { border-color: var(--ds-color-danger); background: var(--ds-color-danger-subtle); } :host([invalid]) .trigger:is(:focus-visible, :focus-within) { box-shadow: 0 0 0 3px rgba(178, 26, 10, 0.3); } :host([disabled]) .trigger { opacity: 0.5; background: var(--ds-color-bg-subtle); cursor: not-allowed; pointer-events: none; } .trigger-multiple { height: auto; min-height: var(--ds-select-size); padding: 6px var(--ds-space-3); flex-wrap: wrap; align-items: center; gap: var(--ds-space-2); overflow: visible; } .tiles { display: flex; flex-wrap: wrap; gap: var(--ds-space-1); min-width: 0; } .tile { display: inline-flex; align-items: center; gap: var(--ds-space-1); height: 24px; padding: 0 var(--ds-space-1) 0 var(--ds-space-2); background: var(--ds-color-bg-subtle); border: 1px solid var(--ds-color-border); border-radius: var(--ds-radius-xs); color: var(--ds-color-fg); font-size: var(--ds-font-size-xs); white-space: nowrap; } .tile-focused { border-color: var(--ds-color-accent); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ds-color-accent) 35%, transparent); } .tile-overflow { padding: 0 var(--ds-space-2); background: var(--ds-color-accent-subtle); border-color: var(--ds-color-accent); color: var(--ds-color-accent); font-weight: var(--ds-font-weight-medium); } .tile-label { max-width: 120px; overflow: hidden; text-overflow: ellipsis; } .tile-remove, .clear-btn { display: inline-flex; align-items: center; justify-content: center; padding: 0; border: none; background: none; color: var(--ds-color-fg-muted); cursor: pointer; border-radius: var(--ds-radius-xs); flex-shrink: 0; } .tile-remove { width: 14px; height: 14px; } .tile-remove:hover { color: var(--ds-color-fg); background: var(--ds-color-border); } .tile-remove svg { width: 10px; height: 10px; } .leading { display: inline-flex; align-items: center; color: var(--ds-color-fg-muted); flex-shrink: 0; } .leading[hidden] { display: none; } .clear-btn { width: 1.2rem; height: 1.2rem; } .clear-btn:hover { color: var(--ds-color-fg); } .clear-btn:focus-visible { box-shadow: var(--ds-shadow-focus); } .clear-btn svg { width: 1rem; height: 1rem; } .caret { width: 1.2rem; height: 1.2rem; color: var(--ds-color-fg-muted); pointer-events: none; flex-shrink: 0; transition: transform var(--ds-duration-fast) var(--ds-easing-standard); } .listbox { /* Default in-flow positioning is the fallback for browsers that don't support the Popover API. When the API is available the listbox is shown via showPopover() and JS sets inline position/top/left/min-width see DsSelect.#positionListbox. That escapes any overflow:hidden / overflow:auto ancestor (dialogs, scroll containers) by placing the listbox in the browser's top layer. */ position: absolute; inset: calc(100% + var(--ds-space-1)) 0 auto; z-index: 100; max-height: 240px; overflow-y: auto; background: var(--ds-color-bg); border: 1px solid var(--ds-color-border-strong); border-radius: var(--ds-radius-sm); box-shadow: var(--ds-shadow-md); /* Thin, subtle scrollbar with a transparent track (matching the shell's main content) instead of the wide, bright default that painted over the listbox's rounded corners. No scrollbar-gutter: the dropdown shouldn't reserve a permanent track when it doesn't overflow. */ scrollbar-color: var(--ds-color-fg-subtle) transparent; scrollbar-width: thin; } /* Reset the UA defaults that the popover spec applies to shown popovers (inset:0, margin:auto, padding:0.25em). The inline coords from #positionListbox are viewport-relative (from getBoundingClientRect), so the shown listbox must stay position:fixed the base .listbox rule above sets position:absolute as the no-popover fallback, which would otherwise win over the UA stylesheet's fixed and anchor the menu to the document instead of the viewport (menu jumps off-screen once scrolled). */ .listbox[popover]:popover-open { position: fixed; inset: unset; margin: 0; padding: 0; } `"
6461
+ "default": "css` :host { --ds-select-size: var(--ds-size-md); display: inline-flex; flex-direction: column; gap: var(--ds-space-1); width: 100%; } :host([size='sm']) { --ds-select-size: var(--ds-size-sm); } :host([size='lg']) { --ds-select-size: var(--ds-size-lg); } :host([size='sm']) .trigger { font-size: var(--ds-font-size-xs); } :host([size='lg']) .trigger { font-size: var(--ds-font-size-md); } .control-wrap { position: relative; width: 100%; } .trigger { /* The popover listbox positions itself against this via CSS anchor positioning (scoped to this shadow root, so instances don't clash). */ anchor-name: --ds-select-trigger; display: flex; align-items: center; gap: var(--ds-space-2); width: 100%; height: var(--ds-select-size); padding: 0 var(--ds-space-3); background: var(--ds-color-bg); border: 1px solid var(--ds-color-border-strong); border-radius: var(--ds-radius-sm); transition: border-color var(--ds-duration-fast) var(--ds-easing-standard), box-shadow var(--ds-duration-fast) var(--ds-easing-standard); } .trigger:hover { border-color: var(--ds-color-fg-subtle); } :host([invalid]) .trigger { border-color: var(--ds-color-danger); background: var(--ds-color-danger-subtle); } :host([invalid]) .trigger:is(:focus-visible, :focus-within) { box-shadow: 0 0 0 3px rgba(178, 26, 10, 0.3); } :host([disabled]) .trigger { opacity: 0.5; background: var(--ds-color-bg-subtle); cursor: not-allowed; pointer-events: none; } .trigger-multiple { height: auto; min-height: var(--ds-select-size); padding: 6px var(--ds-space-3); flex-wrap: wrap; align-items: center; gap: var(--ds-space-2); overflow: visible; } .tiles { display: flex; flex-wrap: wrap; gap: var(--ds-space-1); min-width: 0; } .tile { display: inline-flex; align-items: center; gap: var(--ds-space-1); height: 24px; padding: 0 var(--ds-space-1) 0 var(--ds-space-2); background: var(--ds-color-bg-subtle); border: 1px solid var(--ds-color-border); border-radius: var(--ds-radius-xs); color: var(--ds-color-fg); font-size: var(--ds-font-size-xs); white-space: nowrap; } .tile-focused { border-color: var(--ds-color-accent); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ds-color-accent) 35%, transparent); } .tile-overflow { padding: 0 var(--ds-space-2); background: var(--ds-color-accent-subtle); border-color: var(--ds-color-accent); color: var(--ds-color-accent); font-weight: var(--ds-font-weight-medium); } .tile-label { max-width: 120px; overflow: hidden; text-overflow: ellipsis; } .tile-remove, .clear-btn { display: inline-flex; align-items: center; justify-content: center; padding: 0; border: none; background: none; color: var(--ds-color-fg-muted); cursor: pointer; border-radius: var(--ds-radius-xs); flex-shrink: 0; } .tile-remove { width: 14px; height: 14px; } .tile-remove:hover { color: var(--ds-color-fg); background: var(--ds-color-border); } .tile-remove svg { width: 10px; height: 10px; } .leading { display: inline-flex; align-items: center; color: var(--ds-color-fg-muted); flex-shrink: 0; } .leading[hidden] { display: none; } .clear-btn { width: 1.2rem; height: 1.2rem; } .clear-btn:hover { color: var(--ds-color-fg); } .clear-btn:focus-visible { box-shadow: var(--ds-shadow-focus); } .clear-btn svg { width: 1rem; height: 1rem; } .caret { width: 1.2rem; height: 1.2rem; color: var(--ds-color-fg-muted); pointer-events: none; flex-shrink: 0; transition: transform var(--ds-duration-fast) var(--ds-easing-standard); } .listbox { /* In-flow fallback for browsers without the Popover API. When the API is available the listbox is shown via showPopover() (top layer, so it escapes any overflow:hidden / scroll ancestor) and positioned with CSS anchor positioning see .listbox[popover]:popover-open below. */ position: absolute; inset: calc(100% + var(--ds-space-1)) 0 auto; z-index: 100; max-height: 240px; overflow-y: auto; background: var(--ds-color-bg); border: 1px solid var(--ds-color-border-strong); border-radius: var(--ds-radius-sm); box-shadow: var(--ds-shadow-md); /* Thin, subtle scrollbar with a transparent track (matching the shell's main content) instead of the wide, bright default that painted over the listbox's rounded corners. No scrollbar-gutter: the dropdown shouldn't reserve a permanent track when it doesn't overflow. */ scrollbar-color: var(--ds-color-fg-subtle) transparent; scrollbar-width: thin; } /* Shown in the top layer: position it under the trigger with CSS anchor positioning matching the trigger's width (so long options wrap rather than widening the menu) and flipping above when there's no room below. The browser keeps it glued to the trigger on scroll, so no JS. */ .listbox[popover]:popover-open { position: fixed; position-anchor: --ds-select-trigger; inset: auto; top: calc(anchor(bottom) + var(--ds-space-1)); left: anchor(left); width: anchor-size(width); margin: 0; padding: 0; position-try-fallbacks: flip-block; } `"
6462
6462
  }
6463
6463
  ],
6464
6464
  "exports": [
@@ -6922,14 +6922,6 @@
6922
6922
  },
6923
6923
  "privacy": "private"
6924
6924
  },
6925
- {
6926
- "kind": "field",
6927
- "name": "_triggerEl",
6928
- "type": {
6929
- "text": "HTMLElement | undefined"
6930
- },
6931
- "privacy": "private"
6932
- },
6933
6925
  {
6934
6926
  "kind": "field",
6935
6927
  "name": "_tilesEl",
@@ -6938,20 +6930,6 @@
6938
6930
  },
6939
6931
  "privacy": "private"
6940
6932
  },
6941
- {
6942
- "kind": "field",
6943
- "name": "#reposition",
6944
- "privacy": "private"
6945
- },
6946
- {
6947
- "kind": "field",
6948
- "name": "#listenersInstalled",
6949
- "privacy": "private",
6950
- "type": {
6951
- "text": "boolean"
6952
- },
6953
- "default": "false"
6954
- },
6955
6933
  {
6956
6934
  "kind": "field",
6957
6935
  "name": "#dropdown",
@@ -7020,36 +6998,6 @@
7020
6998
  }
7021
6999
  }
7022
7000
  },
7023
- {
7024
- "kind": "method",
7025
- "name": "#positionListbox",
7026
- "privacy": "private",
7027
- "return": {
7028
- "type": {
7029
- "text": "void"
7030
- }
7031
- }
7032
- },
7033
- {
7034
- "kind": "method",
7035
- "name": "#installPopoverListeners",
7036
- "privacy": "private",
7037
- "return": {
7038
- "type": {
7039
- "text": "void"
7040
- }
7041
- }
7042
- },
7043
- {
7044
- "kind": "method",
7045
- "name": "#teardownPopoverListeners",
7046
- "privacy": "private",
7047
- "return": {
7048
- "type": {
7049
- "text": "void"
7050
- }
7051
- }
7052
- },
7053
7001
  {
7054
7002
  "kind": "field",
7055
7003
  "name": "#selectOption",
@@ -9789,7 +9737,7 @@
9789
9737
  {
9790
9738
  "kind": "variable",
9791
9739
  "name": "tooltipStyles",
9792
- "default": "css` :host { display: inline-flex; position: relative; } :host([full-width]) { display: flex; width: 100%; } .anchor { position: relative; display: inline-flex; } :host([full-width]) .anchor { display: flex; width: 100%; } .tooltip { /* Override UA popover defaults so JS-set top/left/transform stay authoritative. */ position: fixed; inset: auto; margin: 0; border: none; width: max-content; height: auto; overflow: visible; z-index: var(--ds-z-index-tooltip, 999); background: var(--ds-color-fg); color: var(--ds-color-bg); font-family: var(--ds-font-body); font-size: var(--ds-font-size-xs); line-height: 1.4; padding: var(--ds-space-1) var(--ds-space-3); border-radius: var(--ds-radius-xs); max-width: 16rem; pointer-events: none; } `"
9740
+ "default": "css` :host { display: inline-flex; position: relative; } :host([full-width]) { display: flex; width: 100%; } .anchor { position: relative; display: inline-flex; /* The popover bubble positions itself against this via CSS anchor positioning (scoped to this shadow root, so instances don't clash). */ anchor-name: --ds-tooltip-anchor; } :host([full-width]) .anchor { display: flex; width: 100%; } .tooltip { /* Shown in the Popover API top layer (escapes ancestor overflow) and positioned entirely in CSS via anchor positioning — the browser keeps it glued to the trigger on scroll, no JS. Default placement: above, centered; flips to the opposite side when there's no room, and slides to the available side near a left/right edge. */ position: fixed; position-anchor: --ds-tooltip-anchor; position-area: top; position-try-fallbacks: flip-block, --ds-tooltip-top-start, --ds-tooltip-top-end; margin: var(--ds-space-1); inset: auto; border: none; width: max-content; height: auto; overflow: visible; z-index: var(--ds-z-index-tooltip, 999); background: var(--ds-color-fg); color: var(--ds-color-bg); font-family: var(--ds-font-body); font-size: var(--ds-font-size-xs); line-height: 1.4; padding: var(--ds-space-1) var(--ds-space-3); border-radius: var(--ds-radius-xs); max-width: 16rem; pointer-events: none; } :host([placement='bottom']) .tooltip { position-area: bottom; position-try-fallbacks: flip-block, --ds-tooltip-bottom-start, --ds-tooltip-bottom-end; } :host([placement='left']) .tooltip { position-area: left; position-try-fallbacks: flip-inline; } :host([placement='right']) .tooltip { position-area: right; position-try-fallbacks: flip-inline; } /* Near a left/right edge, keep the side placement but slide the bubble toward the available side instead of overflowing. */ @position-try --ds-tooltip-top-start { position-area: top span-right; } @position-try --ds-tooltip-top-end { position-area: top span-left; } @position-try --ds-tooltip-bottom-start { position-area: bottom span-right; } @position-try --ds-tooltip-bottom-end { position-area: bottom span-left; } `"
9793
9741
  }
9794
9742
  ],
9795
9743
  "exports": [
@@ -9817,7 +9765,7 @@
9817
9765
  "name": "anchor"
9818
9766
  },
9819
9767
  {
9820
- "description": "The tooltip bubble. Rendered in the Popover API top layer so it escapes ancestor overflow; positioned via JS using getBoundingClientRect of the trigger.",
9768
+ "description": "The tooltip bubble. Rendered in the Popover API top layer so it escapes ancestor overflow; positioned with CSS anchor positioning relative to the trigger.",
9821
9769
  "name": "tooltip"
9822
9770
  }
9823
9771
  ],
@@ -9960,11 +9908,6 @@
9960
9908
  "kind": "field",
9961
9909
  "name": "#hide",
9962
9910
  "privacy": "private"
9963
- },
9964
- {
9965
- "kind": "field",
9966
- "name": "#updatePosition",
9967
- "privacy": "private"
9968
9911
  }
9969
9912
  ],
9970
9913
  "attributes": [
@@ -1 +1 @@
1
- {"version":3,"file":"select.common-styles.d.ts","sourceRoot":"","sources":["../../../src/atoms/select/select.common-styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,yBA0L9B,CAAC"}
1
+ {"version":3,"file":"select.common-styles.d.ts","sourceRoot":"","sources":["../../../src/atoms/select/select.common-styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,yBA4L9B,CAAC"}
@@ -24,6 +24,9 @@ export const selectCommonStyles = css `
24
24
  width: 100%;
25
25
  }
26
26
  .trigger {
27
+ /* The popover listbox positions itself against this via CSS anchor
28
+ positioning (scoped to this shadow root, so instances don't clash). */
29
+ anchor-name: --ds-select-trigger;
27
30
  display: flex;
28
31
  align-items: center;
29
32
  gap: var(--ds-space-2);
@@ -148,13 +151,10 @@ export const selectCommonStyles = css `
148
151
  transition: transform var(--ds-duration-fast) var(--ds-easing-standard);
149
152
  }
150
153
  .listbox {
151
- /* Default in-flow positioning is the fallback for browsers that
152
- don't support the Popover API. When the API is available the
153
- listbox is shown via showPopover() and JS sets inline
154
- position/top/left/min-width — see DsSelect.#positionListbox.
155
- That escapes any overflow:hidden / overflow:auto ancestor
156
- (dialogs, scroll containers) by placing the listbox in the
157
- browser's top layer. */
154
+ /* In-flow fallback for browsers without the Popover API. When the API is
155
+ available the listbox is shown via showPopover() (top layer, so it
156
+ escapes any overflow:hidden / scroll ancestor) and positioned with CSS
157
+ anchor positioning — see .listbox[popover]:popover-open below. */
158
158
  position: absolute;
159
159
  inset: calc(100% + var(--ds-space-1)) 0 auto;
160
160
  z-index: 100;
@@ -172,18 +172,20 @@ export const selectCommonStyles = css `
172
172
  scrollbar-width: thin;
173
173
  }
174
174
 
175
- /* Reset the UA defaults that the popover spec applies to shown
176
- popovers (inset:0, margin:auto, padding:0.25em). The inline coords
177
- from #positionListbox are viewport-relative (from getBoundingClientRect),
178
- so the shown listbox must stay position:fixed the base .listbox rule
179
- above sets position:absolute as the no-popover fallback, which would
180
- otherwise win over the UA stylesheet's fixed and anchor the menu to the
181
- document instead of the viewport (menu jumps off-screen once scrolled). */
175
+ /* Shown in the top layer: position it under the trigger with CSS anchor
176
+ positioning — matching the trigger's width (so long options wrap rather
177
+ than widening the menu) and flipping above when there's no room below.
178
+ The browser keeps it glued to the trigger on scroll, so no JS. */
182
179
  .listbox[popover]:popover-open {
183
180
  position: fixed;
184
- inset: unset;
181
+ position-anchor: --ds-select-trigger;
182
+ inset: auto;
183
+ top: calc(anchor(bottom) + var(--ds-space-1));
184
+ left: anchor(left);
185
+ width: anchor-size(width);
185
186
  margin: 0;
186
187
  padding: 0;
188
+ position-try-fallbacks: flip-block;
187
189
  }
188
190
  `;
189
191
  //# sourceMappingURL=select.common-styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"select.common-styles.js","sourceRoot":"","sources":["../../../src/atoms/select/select.common-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0LpC,CAAC"}
1
+ {"version":3,"file":"select.common-styles.js","sourceRoot":"","sources":["../../../src/atoms/select/select.common-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4LpC,CAAC"}
@@ -37,7 +37,6 @@ export declare class DsSelect extends DsSelect_base {
37
37
  values: string[];
38
38
  maxLines?: number;
39
39
  private _listboxEl?;
40
- private _triggerEl?;
41
40
  private _tilesEl?;
42
41
  get _open(): boolean;
43
42
  get _focusedIndex(): number;
@@ -1 +1 @@
1
- {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/atoms/select/select.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAG1F,OA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AAC,CAAc;IAkBhD,IAAI,KAAK,IAAI,OAAO,CAAgC;IACpD,IAAI,aAAa,IAAI,MAAM,CAAwC;IACnE,IAAI,aAAa,CAAC,KAAK,EAAE,MAAM,EAA0C;IACzE,IAAI,iBAAiB,IAAI,MAAM,CAA4C;IAC3E,IAAI,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAA8C;IACjF,IAAI,UAAU,IAAI,MAAM,CAAqC;IAC7D,IAAI,UAAU,CAAC,KAAK,EAAE,MAAM,EAAuC;IACnE,IAAI,WAAW,IAAI,OAAO,CAAsC;IAChE,IAAI,cAAc,IAAI,MAAM,CAAyC;IACrE,IAAI,oBAAoB,IAAI,OAAO,CAA+C;IAClF,IAAI,oBAAoB,CAAC,KAAK,EAAE,OAAO,EAAiD;IAE/E,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAatC,oBAAoB,IAAI,IAAI;IAiB5B,iBAAiB,IAAI,IAAI;IA6FzB,MAAM,IAAI,cAAc;CAyElC"}
@@ -38,8 +38,6 @@ export class DsSelect extends FormControlMixin(DsElement) {
38
38
  this.multiple = false;
39
39
  this.clearable = false;
40
40
  this.values = [];
41
- this.#reposition = () => this.#positionListbox();
42
- this.#listenersInstalled = false;
43
41
  this.#dropdown = new DropdownController(this, {
44
42
  getOptions: () => this.options,
45
43
  getCurrentValue: () => (typeof this.value === 'string' ? this.value : ''),
@@ -143,8 +141,6 @@ export class DsSelect extends FormControlMixin(DsElement) {
143
141
  ...LitElement.shadowRootOptions,
144
142
  delegatesFocus: true,
145
143
  }; }
146
- #reposition;
147
- #listenersInstalled;
148
144
  #dropdown;
149
145
  /* test-facing forwarders to controller state */
150
146
  get _open() { return this.#dropdown.open; }
@@ -171,74 +167,22 @@ export class DsSelect extends FormControlMixin(DsElement) {
171
167
  this.#syncListboxPopover();
172
168
  }
173
169
  disconnectedCallback() {
174
- this.#teardownPopoverListeners();
175
170
  super.disconnectedCallback();
176
171
  this.#dropdown.close();
177
172
  }
178
- // The listbox uses `popover="manual"` so the browser hoists it to the
179
- // top layer when shown, escaping any `overflow: hidden` / `overflow:
180
- // auto` ancestor (dialogs, scroll containers). Top-layer elements
181
- // don't get cross-browser anchor positioning yet, so we set
182
- // `position: fixed` from the trigger's bounding rect and re-position
183
- // on scroll/resize while open.
173
+ // The listbox uses `popover="manual"` so the browser hoists it to the top
174
+ // layer when shown, escaping any `overflow: hidden` / `overflow: auto`
175
+ // ancestor (dialogs, scroll containers). It's positioned entirely in CSS
176
+ // via anchor positioning (see select.common-styles), which keeps it glued
177
+ // to the trigger on scroll without any JS.
184
178
  #syncListboxPopover() {
185
179
  const listbox = this._listboxEl;
186
- if (!listbox || !this.#dropdown.open) {
187
- this.#teardownPopoverListeners();
180
+ if (!listbox || !this.#dropdown.open)
188
181
  return;
189
- }
190
182
  if (typeof listbox.showPopover !== 'function')
191
183
  return;
192
184
  if (!listbox.matches(':popover-open'))
193
185
  listbox.showPopover();
194
- this.#positionListbox();
195
- this.#installPopoverListeners();
196
- }
197
- #positionListbox() {
198
- const trigger = this._triggerEl;
199
- const listbox = this._listboxEl;
200
- if (!trigger || !listbox)
201
- return;
202
- const rect = trigger.getBoundingClientRect();
203
- const gap = 4;
204
- const margin = 8;
205
- const vw = window.innerWidth;
206
- // Match the trigger's width (capped to the viewport) rather than growing
207
- // to the widest option — so a long option wraps onto multiple lines (see
208
- // select-option styles) and the menu never extends past the trigger or
209
- // off the side of a narrow viewport.
210
- const width = Math.min(rect.width, Math.max(0, vw - margin * 2));
211
- listbox.style.width = `${width}px`;
212
- const viewport = window.innerHeight;
213
- const naturalHeight = Math.min(listbox.scrollHeight, 240);
214
- const openUp = viewport - rect.bottom - gap < naturalHeight && rect.top > viewport - rect.bottom;
215
- // Clamp the left edge so the right side stays on-screen even when the
216
- // trigger sits near the viewport edge.
217
- listbox.style.left = `${Math.min(Math.max(margin, rect.left), Math.max(margin, vw - margin - width))}px`;
218
- if (openUp) {
219
- listbox.style.top = '';
220
- listbox.style.bottom = `${viewport - rect.top + gap}px`;
221
- }
222
- else {
223
- listbox.style.bottom = '';
224
- listbox.style.top = `${rect.bottom + gap}px`;
225
- }
226
- }
227
- #installPopoverListeners() {
228
- if (this.#listenersInstalled)
229
- return;
230
- // Capture mode so scroll on any ancestor (dialog body, page-shell
231
- // main, etc.) keeps the menu glued to the trigger, not just window.
232
- window.addEventListener('scroll', this.#reposition, { capture: true, passive: true });
233
- window.addEventListener('resize', this.#reposition);
234
- this.#listenersInstalled = true;
235
- }
236
- #teardownPopoverListeners() {
237
- if (!this.#listenersInstalled)
238
- return;
239
- window.removeEventListener('scroll', this.#reposition, { capture: true });
240
- window.removeEventListener('resize', this.#reposition);
241
- this.#listenersInstalled = false;
242
186
  }
243
187
  connectedCallback() {
244
188
  super.connectedCallback();
@@ -353,9 +297,6 @@ __decorate([
353
297
  __decorate([
354
298
  query('.listbox')
355
299
  ], DsSelect.prototype, "_listboxEl", void 0);
356
- __decorate([
357
- query('#trigger')
358
- ], DsSelect.prototype, "_triggerEl", void 0);
359
300
  __decorate([
360
301
  query('.tiles')
361
302
  ], DsSelect.prototype, "_tilesEl", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"select.js","sourceRoot":"","sources":["../../../src/atoms/select/select.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAA4C,MAAM,KAAK,CAAC;AAC1F,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC9F,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EACh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;sCAAyB;AACzC;IAAX,QAAQ,EAAE;6CAAkB;AACjB;IAAX,QAAQ,EAAE;uCAAY;AACX;IAAX,QAAQ,EAAE;6CAAkB;AACjB;IAAX,QAAQ,EAAE;uCAAY;AACqB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAiB;AAChB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAAkB;AACjB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CAAmB;AACnC;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;wCAAuB;AACrB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAAmB;AAEnB;IAA1B,KAAK,CAAC,UAAU,CAAC;4CAAkC;AAC3B;IAAxB,KAAK,CAAC,QAAQ,CAAC;0CAAgC"}
@@ -7,7 +7,7 @@ export type TooltipPlacement = 'top' | 'right' | 'bottom' | 'left';
7
7
  * @slot default - The trigger element that the tooltip is anchored to.
8
8
  * @slot tip - The tooltip content (can be any HTML).
9
9
  * @csspart anchor - The wrapper around the trigger element.
10
- * @csspart tooltip - The tooltip bubble. Rendered in the Popover API top layer so it escapes ancestor overflow; positioned via JS using getBoundingClientRect of the trigger.
10
+ * @csspart tooltip - The tooltip bubble. Rendered in the Popover API top layer so it escapes ancestor overflow; positioned with CSS anchor positioning relative to the trigger.
11
11
  */
12
12
  export declare class DsTooltip extends DsElement {
13
13
  #private;
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../src/atoms/tooltip/tooltip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAErE,OAAO,EAAE,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import { html } from 'lit';
8
8
  import { property, state } from 'lit/decorators.js';
9
9
  import { DsElement } from '@jsekulowicz/ds-core';
10
10
  import { tooltipStyles } from './tooltip.styles.js';
11
- const GAP = 6;
12
11
  function isPopoverElement(el) {
13
12
  return !!el && typeof el.showPopover === 'function';
14
13
  }
@@ -18,7 +17,7 @@ function isPopoverElement(el) {
18
17
  * @slot default - The trigger element that the tooltip is anchored to.
19
18
  * @slot tip - The tooltip content (can be any HTML).
20
19
  * @csspart anchor - The wrapper around the trigger element.
21
- * @csspart tooltip - The tooltip bubble. Rendered in the Popover API top layer so it escapes ancestor overflow; positioned via JS using getBoundingClientRect of the trigger.
20
+ * @csspart tooltip - The tooltip bubble. Rendered in the Popover API top layer so it escapes ancestor overflow; positioned with CSS anchor positioning relative to the trigger.
22
21
  */
23
22
  export class DsTooltip extends DsElement {
24
23
  constructor() {
@@ -76,7 +75,6 @@ export class DsTooltip extends DsElement {
76
75
  // ignore — possibly unsupported
77
76
  }
78
77
  }
79
- this.#updatePosition();
80
78
  };
81
79
  this.#hide = () => {
82
80
  const tooltip = this.#tooltipEl();
@@ -90,42 +88,6 @@ export class DsTooltip extends DsElement {
90
88
  // ignore
91
89
  }
92
90
  };
93
- this.#updatePosition = () => {
94
- const tooltip = this.#tooltipEl();
95
- if (!tooltip) {
96
- return;
97
- }
98
- const anchorRect = this.shadowRoot?.querySelector('.anchor')?.getBoundingClientRect();
99
- const rect = anchorRect ?? this.getBoundingClientRect();
100
- let top = 0;
101
- let left = 0;
102
- let transform = '';
103
- switch (this.placement) {
104
- case 'top':
105
- top = rect.top - GAP;
106
- left = rect.left + rect.width / 2;
107
- transform = 'translate(-50%, -100%)';
108
- break;
109
- case 'right':
110
- top = rect.top + rect.height / 2;
111
- left = rect.right + GAP;
112
- transform = 'translateY(-50%)';
113
- break;
114
- case 'bottom':
115
- top = rect.bottom + GAP;
116
- left = rect.left + rect.width / 2;
117
- transform = 'translateX(-50%)';
118
- break;
119
- case 'left':
120
- top = rect.top + rect.height / 2;
121
- left = rect.left - GAP;
122
- transform = 'translate(-100%, -50%)';
123
- break;
124
- }
125
- tooltip.style.top = `${top}px`;
126
- tooltip.style.left = `${left}px`;
127
- tooltip.style.transform = transform;
128
- };
129
91
  }
130
92
  static { this.styles = [...DsElement.styles, tooltipStyles]; }
131
93
  disconnectedCallback() {
@@ -155,7 +117,6 @@ export class DsTooltip extends DsElement {
155
117
  }
156
118
  #show;
157
119
  #hide;
158
- #updatePosition;
159
120
  render() {
160
121
  return html `
161
122
  <div
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../../src/atoms/tooltip/tooltip.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAA4C,MAAM,KAAK,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAIpD,MAAM,GAAG,GAAG,CAAC,CAAC;AAOd,SAAS,gBAAgB,CAAC,EAAkB;IAC1C,OAAO,CAAC,CAAC,EAAE,IAAI,OAAQ,EAA8B,CAAC,WAAW,KAAK,UAAU,CAAC;AACnF,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,OAAO,SAAU,SAAQ,SAAS;IAAxC;;QAG+B,cAAS,GAAqB,KAAK,CAAC;QACrB,SAAI,GAAG,KAAK,CAAC;QACH,cAAS,GAAG,KAAK,CAAC;QAC5C,UAAK,GAAG,CAAC,CAAC;QAC+B,cAAS,GAAG,KAAK,CAAC;QAEtE,aAAQ,GAAG,KAAK,CAAC;QACjB,aAAQ,GAAG,KAAK,CAAC;QAsBlC,qBAAgB,GAAG,GAAS,EAAE;YAC5B,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;gBACnC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,C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IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;4CAAmB;AAEtE;IAAhB,KAAK,EAAE;2CAA0B;AACjB;IAAhB,KAAK,EAAE;2CAA0B"}
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.styles.d.ts","sourceRoot":"","sources":["../../../src/atoms/tooltip/tooltip.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,yBAqCzB,CAAC"}
1
+ {"version":3,"file":"tooltip.styles.d.ts","sourceRoot":"","sources":["../../../src/atoms/tooltip/tooltip.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,yBA0EzB,CAAC"}
@@ -11,16 +11,26 @@ export const tooltipStyles = css `
11
11
  .anchor {
12
12
  position: relative;
13
13
  display: inline-flex;
14
+ /* The popover bubble positions itself against this via CSS anchor
15
+ positioning (scoped to this shadow root, so instances don't clash). */
16
+ anchor-name: --ds-tooltip-anchor;
14
17
  }
15
18
  :host([full-width]) .anchor {
16
19
  display: flex;
17
20
  width: 100%;
18
21
  }
19
22
  .tooltip {
20
- /* Override UA popover defaults so JS-set top/left/transform stay authoritative. */
23
+ /* Shown in the Popover API top layer (escapes ancestor overflow) and
24
+ positioned entirely in CSS via anchor positioning — the browser keeps
25
+ it glued to the trigger on scroll, no JS. Default placement: above,
26
+ centered; flips to the opposite side when there's no room, and slides
27
+ to the available side near a left/right edge. */
21
28
  position: fixed;
29
+ position-anchor: --ds-tooltip-anchor;
30
+ position-area: top;
31
+ position-try-fallbacks: flip-block, --ds-tooltip-top-start, --ds-tooltip-top-end;
32
+ margin: var(--ds-space-1);
22
33
  inset: auto;
23
- margin: 0;
24
34
  border: none;
25
35
  width: max-content;
26
36
  height: auto;
@@ -36,5 +46,32 @@ export const tooltipStyles = css `
36
46
  max-width: 16rem;
37
47
  pointer-events: none;
38
48
  }
49
+ :host([placement='bottom']) .tooltip {
50
+ position-area: bottom;
51
+ position-try-fallbacks: flip-block, --ds-tooltip-bottom-start, --ds-tooltip-bottom-end;
52
+ }
53
+ :host([placement='left']) .tooltip {
54
+ position-area: left;
55
+ position-try-fallbacks: flip-inline;
56
+ }
57
+ :host([placement='right']) .tooltip {
58
+ position-area: right;
59
+ position-try-fallbacks: flip-inline;
60
+ }
61
+
62
+ /* Near a left/right edge, keep the side placement but slide the bubble
63
+ toward the available side instead of overflowing. */
64
+ @position-try --ds-tooltip-top-start {
65
+ position-area: top span-right;
66
+ }
67
+ @position-try --ds-tooltip-top-end {
68
+ position-area: top span-left;
69
+ }
70
+ @position-try --ds-tooltip-bottom-start {
71
+ position-area: bottom span-right;
72
+ }
73
+ @position-try --ds-tooltip-bottom-end {
74
+ position-area: bottom span-left;
75
+ }
39
76
  `;
40
77
  //# sourceMappingURL=tooltip.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.styles.js","sourceRoot":"","sources":["../../../src/atoms/tooltip/tooltip.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqC/B,CAAC"}
1
+ {"version":3,"file":"tooltip.styles.js","sourceRoot":"","sources":["../../../src/atoms/tooltip/tooltip.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0E/B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsekulowicz/ds-components",
3
- "version": "0.22.0",
3
+ "version": "0.23.0",
4
4
  "description": "Lit web components for the Design System Library (atoms, molecules, organisms, templates, pages).",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {