@nectary/components 5.33.0 → 5.35.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.
@@ -0,0 +1,80 @@
1
+ import type { NectaryComponentReactByType, NectaryComponentVanillaByType, TRect, NectaryComponentReact, NectaryComponentVanilla } from '../types';
2
+ export type TSinchFloatingPanelAction = {
3
+ name: string;
4
+ icon: string;
5
+ label?: string;
6
+ };
7
+ export type TSinchFloatingPanelProps = {
8
+ /** Whether the panel is visible */
9
+ open?: boolean;
10
+ /** Number of items currently selected */
11
+ 'no-of-items-selected'?: string;
12
+ /** Value substituted for `{count}` in `select-all-label` (e.g. total item count or noun). */
13
+ 'cta-label'?: string;
14
+ /** Suffix after the count when exactly one item is selected. Default: `item selected`. */
15
+ 'items-selected-singular-label'?: string;
16
+ /** Suffix after the count when zero or many items are selected. Default: `items selected`. */
17
+ 'items-selected-plural-label'?: string;
18
+ /** Suffix shown at extra-compact density, regardless of count. Default: `selected`. */
19
+ 'items-selected-compact-label'?: string;
20
+ /** CTA text at default density. `{count}` is replaced with `cta-label` (or removed when empty). Default: `Select all {count} items`. */
21
+ 'select-all-label'?: string;
22
+ /** CTA text at compact / extra-compact density. Default: `Select all`. */
23
+ 'select-all-short-label'?: string;
24
+ /** CTA text when `all-selected` is true. Default: `Clear all`. */
25
+ 'clear-all-label'?: string;
26
+ /** JSON array of action buttons: [{name, icon}] — min 1, max 5 */
27
+ actions?: string;
28
+ /** When true, CTA label switches to the `clear-all-label` text. */
29
+ 'all-selected'?: boolean;
30
+ readonly panelRect?: TRect;
31
+ readonly closeButtonRect?: TRect;
32
+ readonly ctaButtonRect?: TRect;
33
+ };
34
+ export type TSinchFloatingPanelEvents = {
35
+ '-close'?: (e: CustomEvent<void>) => void;
36
+ '-select-all'?: (e: CustomEvent<void>) => void;
37
+ /** Fires for every action click; `detail` is the action name. */
38
+ '-action'?: (e: CustomEvent<string>) => void;
39
+ /**
40
+ * Per-action convenience events fire as `-${action.name}` for any configured
41
+ * action (custom or built-in). The defaults below are listed for autocomplete;
42
+ * custom actions can be typed via module augmentation.
43
+ */
44
+ '-delete'?: (e: CustomEvent<void>) => void;
45
+ '-clone'?: (e: CustomEvent<void>) => void;
46
+ '-export'?: (e: CustomEvent<void>) => void;
47
+ };
48
+ export type TSinchFloatingPanelStyle = {
49
+ '--sinch-comp-floating-panel-color-background'?: string;
50
+ '--sinch-comp-floating-panel-color-text'?: string;
51
+ '--sinch-comp-floating-panel-overflow-menu-min-width'?: string;
52
+ '--sinch-comp-floating-panel-overflow-menu-max-width'?: string;
53
+ };
54
+ export type TSinchFloatingPanel = {
55
+ props: TSinchFloatingPanelProps;
56
+ events: TSinchFloatingPanelEvents;
57
+ style: TSinchFloatingPanelStyle;
58
+ };
59
+ export type TSinchFloatingPanelElement = NectaryComponentVanillaByType<TSinchFloatingPanel>;
60
+ export type TSinchFloatingPanelReact = NectaryComponentReactByType<TSinchFloatingPanel>;
61
+ declare global {
62
+ interface NectaryComponentMap {
63
+ 'sinch-floating-panel': TSinchFloatingPanel;
64
+ }
65
+ interface HTMLElementTagNameMap {
66
+ 'sinch-floating-panel': NectaryComponentVanilla<'sinch-floating-panel'>;
67
+ }
68
+ namespace JSX {
69
+ interface IntrinsicElements {
70
+ 'sinch-floating-panel': NectaryComponentReact<'sinch-floating-panel'>;
71
+ }
72
+ }
73
+ }
74
+ declare module 'react' {
75
+ namespace JSX {
76
+ interface IntrinsicElements extends globalThis.JSX.IntrinsicElements {
77
+ 'sinch-floating-panel': NectaryComponentReact<'sinch-floating-panel'>;
78
+ }
79
+ }
80
+ }
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,11 @@
1
+ import { NectaryElement } from '../utils';
2
+ import '../button';
3
+ export * from './types';
4
+ export declare class FloatingPanelButton extends NectaryElement {
5
+ #private;
6
+ constructor();
7
+ static get observedAttributes(): string[];
8
+ attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
9
+ set text(value: string | null);
10
+ get text(): string | null;
11
+ }
@@ -0,0 +1,43 @@
1
+ import { isAttrEqual, updateAttribute, getAttribute } from "../utils/dom.js";
2
+ import { defineCustomElement, NectaryElement } from "../utils/element.js";
3
+ import "../button/index.js";
4
+ const templateHTML = '<style>:host{display:flex;flex-shrink:0;height:100%;min-height:40px;color:var(--sinch-comp-floating-panel-color-text,var(--sinch-sys-color-primary-foreground))}sinch-button{height:100%;padding:0;white-space:nowrap;--sinch-button-shape-radius-base:0;--sinch-comp-button-color-subtle-secondary-default-border-initial:var(--sinch-sys-color-basic-transparent);--sinch-comp-button-color-subtle-secondary-disabled-border-initial:var(--sinch-sys-color-basic-transparent);--sinch-comp-button-spacing-padding-m:16px;--sinch-comp-button-color-subtle-secondary-default-text-initial:var(--sinch-comp-floating-panel-color-button-text-initial, var(--sinch-sys-color-primary-foreground));--sinch-comp-button-color-subtle-secondary-default-background-initial:var(--sinch-comp-floating-panel-color-button-background-initial, transparent);--sinch-comp-button-color-subtle-secondary-default-background-hover:var(--sinch-comp-floating-panel-color-button-background-hover);--sinch-comp-button-color-subtle-secondary-default-background-active:var(--sinch-comp-floating-panel-color-button-background-active);--sinch-comp-button-shadow-subtle-hover:none;--sinch-comp-button-shadow-subtle-active:none}sinch-button:focus-visible{--sinch-comp-button-color-subtle-secondary-default-background-initial:var(--sinch-comp-floating-panel-color-button-background-hover);--sinch-comp-button-shadow-subtle-focus:none}</style><sinch-button id="button" type="subtle-secondary"></sinch-button>';
5
+ const template = document.createElement("template");
6
+ template.innerHTML = templateHTML;
7
+ class FloatingPanelButton extends NectaryElement {
8
+ #$button;
9
+ constructor() {
10
+ super();
11
+ const shadowRoot = this.attachShadow();
12
+ shadowRoot.appendChild(template.content.cloneNode(true));
13
+ this.#$button = shadowRoot.querySelector("#button");
14
+ }
15
+ static get observedAttributes() {
16
+ return ["text", "aria-label"];
17
+ }
18
+ attributeChangedCallback(name, oldVal, newVal) {
19
+ if (isAttrEqual(oldVal, newVal)) {
20
+ return;
21
+ }
22
+ if (name === "text") {
23
+ this.#$button.setAttribute("text", newVal ?? "");
24
+ }
25
+ if (name === "aria-label") {
26
+ if (newVal !== null) {
27
+ this.#$button.setAttribute("aria-label", newVal);
28
+ } else {
29
+ this.#$button.removeAttribute("aria-label");
30
+ }
31
+ }
32
+ }
33
+ set text(value) {
34
+ updateAttribute(this, "text", value);
35
+ }
36
+ get text() {
37
+ return getAttribute(this, "text");
38
+ }
39
+ }
40
+ defineCustomElement("sinch-floating-panel-button", FloatingPanelButton);
41
+ export {
42
+ FloatingPanelButton
43
+ };
@@ -0,0 +1,35 @@
1
+ import type { NectaryComponentReact, NectaryComponentReactByType, NectaryComponentVanilla, NectaryComponentVanillaByType } from '../types';
2
+ export type TSinchFloatingPanelButtonProps = {
3
+ /** The button label text */
4
+ text?: string;
5
+ 'aria-label'?: string;
6
+ };
7
+ export type TSinchFloatingPanelButtonEvents = Record<string, never>;
8
+ export type TSinchFloatingPanelButtonStyle = Record<string, never>;
9
+ export type TSinchFloatingPanelButton = {
10
+ props: TSinchFloatingPanelButtonProps;
11
+ events: TSinchFloatingPanelButtonEvents;
12
+ style: TSinchFloatingPanelButtonStyle;
13
+ };
14
+ export type TSinchFloatingPanelButtonElement = NectaryComponentVanillaByType<TSinchFloatingPanelButton>;
15
+ export type TSinchFloatingPanelButtonReact = NectaryComponentReactByType<TSinchFloatingPanelButton>;
16
+ declare global {
17
+ interface NectaryComponentMap {
18
+ 'sinch-floating-panel-button': TSinchFloatingPanelButton;
19
+ }
20
+ interface HTMLElementTagNameMap {
21
+ 'sinch-floating-panel-button': NectaryComponentVanilla<'sinch-floating-panel-button'>;
22
+ }
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'sinch-floating-panel-button': NectaryComponentReact<'sinch-floating-panel-button'>;
26
+ }
27
+ }
28
+ }
29
+ declare module 'react' {
30
+ namespace JSX {
31
+ interface IntrinsicElements extends globalThis.JSX.IntrinsicElements {
32
+ 'sinch-floating-panel-button': NectaryComponentReact<'sinch-floating-panel-button'>;
33
+ }
34
+ }
35
+ }
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,12 @@
1
+ import { NectaryElement } from '../utils';
2
+ import '../button';
3
+ import '../icon';
4
+ export * from './types';
5
+ export declare class FloatingPanelIconButton extends NectaryElement {
6
+ #private;
7
+ constructor();
8
+ static get observedAttributes(): string[];
9
+ attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
10
+ set icon(value: string | null);
11
+ get icon(): string | null;
12
+ }
@@ -0,0 +1,50 @@
1
+ import { isAttrEqual, updateAttribute, getAttribute } from "../utils/dom.js";
2
+ import { defineCustomElement, NectaryElement } from "../utils/element.js";
3
+ import "../button/index.js";
4
+ import "../icon/index.js";
5
+ const templateHTML = '<style>:host{display:flex;align-items:center;justify-content:center;width:40px;height:40px;flex-shrink:0;box-sizing:border-box;cursor:pointer}sinch-button{display:flex;align-items:center;justify-content:center;width:100%;height:100%;--sinch-button-shape-radius-base:0;--sinch-comp-button-color-subtle-secondary-default-border-initial:var(--sinch-sys-color-basic-transparent);--sinch-comp-button-color-subtle-secondary-disabled-border-initial:var(--sinch-sys-color-basic-transparent);--sinch-comp-button-color-subtle-secondary-default-background-initial:transparent;--sinch-comp-button-color-subtle-secondary-default-icon-initial:var(--sinch-comp-floating-panel-color-text, var(--sinch-sys-color-primary-foreground));--sinch-comp-button-color-subtle-secondary-default-text-initial:var(--sinch-comp-floating-panel-color-text, var(--sinch-sys-color-primary-foreground));--sinch-comp-button-color-subtle-secondary-default-background-hover:var(--sinch-comp-floating-panel-color-button-background-hover);--sinch-comp-button-color-subtle-secondary-default-background-active:var(--sinch-comp-floating-panel-color-button-background-active);--sinch-comp-button-shadow-subtle-hover:none;--sinch-comp-button-shadow-subtle-active:none}sinch-button:focus-visible{--sinch-comp-button-color-subtle-secondary-default-background-initial:var(--sinch-comp-floating-panel-color-button-background-hover);--sinch-comp-button-shadow-subtle-focus:none}:host(.edge-start:active) sinch-button,:host(.edge-start:focus) sinch-button,:host(.edge-start:hover) sinch-button{--sinch-button-shape-radius-top-left:var(--sinch-comp-floating-panel-shape-radius);--sinch-button-shape-radius-bottom-left:var(--sinch-comp-floating-panel-shape-radius)}:host(.edge-end:active) sinch-button,:host(.edge-end:focus) sinch-button,:host(.edge-end:hover) sinch-button{--sinch-button-shape-radius-top-right:var(--sinch-comp-floating-panel-shape-radius);--sinch-button-shape-radius-bottom-right:var(--sinch-comp-floating-panel-shape-radius)}sinch-icon{--sinch-global-color-icon:var(--sinch-comp-floating-panel-color-text, var(--sinch-sys-color-primary-foreground));--sinch-global-size-icon:var(--sinch-comp-floating-panel-size-button-icon)}</style><sinch-button id="button" type="subtle-secondary"><sinch-icon id="icon" icons-version="2" slot="icon"></sinch-icon></sinch-button>';
6
+ const template = document.createElement("template");
7
+ template.innerHTML = templateHTML;
8
+ class FloatingPanelIconButton extends NectaryElement {
9
+ #$icon;
10
+ #$button;
11
+ constructor() {
12
+ super();
13
+ const shadowRoot = this.attachShadow();
14
+ shadowRoot.appendChild(template.content.cloneNode(true));
15
+ this.#$icon = shadowRoot.querySelector("#icon");
16
+ this.#$button = shadowRoot.querySelector("#button");
17
+ }
18
+ static get observedAttributes() {
19
+ return ["icon", "aria-label"];
20
+ }
21
+ attributeChangedCallback(name, oldVal, newVal) {
22
+ if (isAttrEqual(oldVal, newVal)) {
23
+ return;
24
+ }
25
+ if (name === "icon") {
26
+ if (newVal !== null) {
27
+ this.#$icon.setAttribute("name", newVal);
28
+ } else {
29
+ this.#$icon.removeAttribute("name");
30
+ }
31
+ }
32
+ if (name === "aria-label") {
33
+ if (newVal !== null) {
34
+ this.#$button.setAttribute("aria-label", newVal);
35
+ } else {
36
+ this.#$button.removeAttribute("aria-label");
37
+ }
38
+ }
39
+ }
40
+ set icon(value) {
41
+ updateAttribute(this, "icon", value);
42
+ }
43
+ get icon() {
44
+ return getAttribute(this, "icon");
45
+ }
46
+ }
47
+ defineCustomElement("sinch-floating-panel-icon-button", FloatingPanelIconButton);
48
+ export {
49
+ FloatingPanelIconButton
50
+ };
@@ -0,0 +1,35 @@
1
+ import type { NectaryComponentReact, NectaryComponentReactByType, NectaryComponentVanilla, NectaryComponentVanillaByType } from '../types';
2
+ export type TSinchFloatingPanelIconButtonProps = {
3
+ /** The icon name */
4
+ icon?: string;
5
+ 'aria-label'?: string;
6
+ };
7
+ export type TSinchFloatingPanelIconButtonEvents = Record<string, never>;
8
+ export type TSinchFloatingPanelIconButtonStyle = Record<string, never>;
9
+ export type TSinchFloatingPanelIconButton = {
10
+ props: TSinchFloatingPanelIconButtonProps;
11
+ events: TSinchFloatingPanelIconButtonEvents;
12
+ style: TSinchFloatingPanelIconButtonStyle;
13
+ };
14
+ export type TSinchFloatingPanelIconButtonElement = NectaryComponentVanillaByType<TSinchFloatingPanelIconButton>;
15
+ export type TSinchFloatingPanelIconButtonReact = NectaryComponentReactByType<TSinchFloatingPanelIconButton>;
16
+ declare global {
17
+ interface NectaryComponentMap {
18
+ 'sinch-floating-panel-icon-button': TSinchFloatingPanelIconButton;
19
+ }
20
+ interface HTMLElementTagNameMap {
21
+ 'sinch-floating-panel-icon-button': NectaryComponentVanilla<'sinch-floating-panel-icon-button'>;
22
+ }
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'sinch-floating-panel-icon-button': NectaryComponentReact<'sinch-floating-panel-icon-button'>;
26
+ }
27
+ }
28
+ }
29
+ declare module 'react' {
30
+ namespace JSX {
31
+ interface IntrinsicElements extends globalThis.JSX.IntrinsicElements {
32
+ 'sinch-floating-panel-icon-button': NectaryComponentReact<'sinch-floating-panel-icon-button'>;
33
+ }
34
+ }
35
+ }
package/icon/index.js CHANGED
@@ -14,13 +14,39 @@ class Icon extends NectaryElement {
14
14
  static get observedAttributes() {
15
15
  return ["name", "icons-version"];
16
16
  }
17
+ /* Font class is now set before the text content. Covered by new regression tests.
18
+
19
+ Before:
20
+ 1. textContent = "fa-clone" → Safari renders the text using the default font
21
+ (Material Icons)
22
+ 2. _matchNameToFont() → switches font-family to Sinch Icons Zero To D via
23
+ class
24
+
25
+ After:
26
+ 1. _matchNameToFont() → sets the correct font-family class first
27
+ 2. textContent = "fa-clone" → Safari renders the text using the correct font
28
+ from the start
29
+
30
+ Reasoning:
31
+ * Safari caches the ligature layout from the first paint. When
32
+ the text was set in Material Icons (which doesn't have these ligatures),
33
+ Safari calculated glyph positions for individual characters. When the font
34
+ then switched to Sinch Icons, Safari reused some of that cached layout
35
+ instead of fully recalculating — shifting certain glyphs to the right.
36
+ * _matchNameToFont() reads this.name via getAttribute(this,
37
+ 'name'), which reads the HTML attribute — not textContent. The attribute is
38
+ already set when the callback fires (that's what triggers the callback), so
39
+ the method gets the correct name regardless of when textContent is set.
40
+ */
17
41
  attributeChangedCallback(name, _, newVal) {
18
42
  switch (name) {
19
43
  case "name": {
20
- this.#$icon.textContent = newVal;
21
- updateAttribute(this.#$icon, "aria-label", newVal);
22
- if (getAttribute(this, "icons-version", "1") !== "1") {
23
- this._matchNameToFont();
44
+ {
45
+ this.#$icon.textContent = newVal;
46
+ updateAttribute(this.#$icon, "aria-label", newVal);
47
+ if (getAttribute(this, "icons-version", "1") !== "1") {
48
+ this._matchNameToFont();
49
+ }
24
50
  }
25
51
  break;
26
52
  }
package/input/index.js CHANGED
@@ -173,18 +173,24 @@ class Input extends NectaryElement {
173
173
  "value",
174
174
  "placeholder",
175
175
  "mask",
176
+ // eslint-disable-next-line @nectary/observed-attribute-accessor -- baseline backlog: missing set max
176
177
  "max",
178
+ // eslint-disable-next-line @nectary/observed-attribute-accessor -- baseline backlog: missing set min
177
179
  "min",
178
180
  "invalid",
179
181
  "disabled",
180
182
  "size",
183
+ // eslint-disable-next-line @nectary/observed-attribute-accessor -- baseline backlog: missing set step
181
184
  "step",
182
185
  "autocomplete",
186
+ // eslint-disable-next-line @nectary/observed-attribute-accessor -- baseline backlog: missing set readonly
183
187
  "readonly",
184
188
  "autofocus",
185
189
  "data-size",
186
190
  "aria-label",
191
+ // eslint-disable-next-line @nectary/observed-attribute-accessor -- baseline backlog: missing set maxlength
187
192
  "maxlength",
193
+ // eslint-disable-next-line @nectary/observed-attribute-accessor -- baseline backlog: missing set required
188
194
  "required"
189
195
  ];
190
196
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nectary/components",
3
- "version": "5.33.0",
3
+ "version": "5.35.0",
4
4
  "files": [
5
5
  "**/*/*.css",
6
6
  "**/*/*.json",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.22.15",
27
- "@nectary/assets": "3.6.9"
27
+ "@nectary/assets": "3.6.10"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@babel/cli": "^7.22.15",
@@ -40,6 +40,6 @@
40
40
  "vite": "^7.0.6"
41
41
  },
42
42
  "peerDependencies": {
43
- "@nectary/theme-base": "1.15.1"
43
+ "@nectary/theme-base": "1.16.0"
44
44
  }
45
45
  }
package/pop/index.js CHANGED
@@ -8,7 +8,7 @@ import { getReactEventHandler } from "../utils/get-react-event-handler.js";
8
8
  import { isTargetEqual } from "../utils/event-target.js";
9
9
  import { getPlacementContext, toLocalRect } from "../utils/placement.js";
10
10
  import { orientationValues, disableOverscroll, enableOverscroll, getAnchorPosition, clampPosition } from "./utils.js";
11
- const templateHTML = '<style>:host{display:contents;position:relative}dialog{position:fixed;left:0;top:0;transform:translate(var(--sinch-pop-offset-x),var(--sinch-pop-offset-y));margin:0;outline:0;padding:0;border:none;box-sizing:border-box;max-width:unset;max-height:unset;z-index:1;background:0 0;overflow:visible}dialog:not([open]){display:none}dialog::backdrop{background-color:transparent}#content{position:relative;z-index:1}#target-open{display:flex;flex-direction:column;position:absolute;left:0;top:0}#focus{display:none;position:absolute;width:0;height:0}</style><slot id="target" name="target" aria-haspopup="dialog" aria-expanded="false"></slot><div id="focus"></div><dialog id="dialog"><div id="target-open"><slot name="target-open"></slot></div><div id="content"><slot name="content"></slot></div></dialog>';
11
+ const templateHTML = '<style>:host{display:contents;position:relative}dialog{position:fixed;left:0;top:0;transform:translate(var(--sinch-pop-offset-x),var(--sinch-pop-offset-y));margin:0;outline:0;padding:0;border:none;box-sizing:border-box;max-width:unset;max-height:unset;z-index:var(--sinch-comp-pop-z-index,1);background:0 0;overflow:visible}dialog:not([open]){display:none}dialog::backdrop{background-color:transparent}#content{position:relative;z-index:var(--sinch-comp-pop-z-index,1)}#target-open{display:flex;flex-direction:column;position:absolute;left:0;top:0}#focus{display:none;position:absolute;width:0;height:0}</style><slot id="target" name="target" aria-haspopup="dialog" aria-expanded="false"></slot><div id="focus"></div><dialog id="dialog"><div id="target-open"><slot name="target-open"></slot></div><div id="content"><slot name="content"></slot></div></dialog>';
12
12
  const template = document.createElement("template");
13
13
  template.innerHTML = templateHTML;
14
14
  class Pop extends NectaryElement {
@@ -113,8 +113,11 @@ class SelectMenu extends NectaryElement {
113
113
  "rows",
114
114
  "multiple",
115
115
  "searchable",
116
+ // eslint-disable-next-line @nectary/observed-attribute-accessor -- baseline backlog: missing set searchValue
116
117
  "search-value",
118
+ // eslint-disable-next-line @nectary/observed-attribute-accessor -- baseline backlog: missing set searchPlaceholder
117
119
  "search-placeholder",
120
+ // eslint-disable-next-line @nectary/observed-attribute-accessor -- baseline backlog: missing set searchAutocomplete
118
121
  "search-autocomplete"
119
122
  ];
120
123
  }
@@ -33,7 +33,12 @@ class SheetTitle extends NectaryElement {
33
33
  this.#controller = null;
34
34
  }
35
35
  static get observedAttributes() {
36
- return ["title", "description", "close-aria-label"];
36
+ return [
37
+ "title",
38
+ "description",
39
+ // eslint-disable-next-line @nectary/observed-attribute-accessor -- baseline backlog: close-aria-label missing set/get pair
40
+ "close-aria-label"
41
+ ];
37
42
  }
38
43
  attributeChangedCallback(name, oldVal, newVal) {
39
44
  if (isAttrEqual(oldVal, newVal)) {
package/skeleton/index.js CHANGED
@@ -59,7 +59,10 @@ class Skeleton extends NectaryElement {
59
59
  this.#observer = null;
60
60
  }
61
61
  static get observedAttributes() {
62
- return ["card"];
62
+ return [
63
+ // eslint-disable-next-line @nectary/observed-attribute-accessor -- baseline backlog: card missing set/get pair
64
+ "card"
65
+ ];
63
66
  }
64
67
  attributeChangedCallback(name, _oldVal, newVal) {
65
68
  if (name === "card") {
package/standalone.d.ts CHANGED
@@ -27,6 +27,9 @@ import './file-drop/index.js';
27
27
  import './file-picker/index.js';
28
28
  import './file-status/index.js';
29
29
  import './flag/index.js';
30
+ import './floating-panel/index.js';
31
+ import './floating-panel-button/index.js';
32
+ import './floating-panel-icon-button/index.js';
30
33
  import './grid-item/index.js';
31
34
  import './grid/index.js';
32
35
  import './help-tooltip/index.js';
package/standalone.js CHANGED
@@ -28,6 +28,9 @@ import "./file-drop/index.js";
28
28
  import "./file-picker/index.js";
29
29
  import "./file-status/index.js";
30
30
  import "./flag/index.js";
31
+ import "./floating-panel/index.js";
32
+ import "./floating-panel-button/index.js";
33
+ import "./floating-panel-icon-button/index.js";
31
34
  import "./grid-item/index.js";
32
35
  import "./grid/index.js";
33
36
  import "./help-tooltip/index.js";
package/standalone.ts CHANGED
@@ -35,6 +35,9 @@ import './file-drop/index.js'
35
35
  import './file-picker/index.js'
36
36
  import './file-status/index.js'
37
37
  import './flag/index.js'
38
+ import './floating-panel/index.js'
39
+ import './floating-panel-button/index.js'
40
+ import './floating-panel-icon-button/index.js'
38
41
  import './grid-item/index.js'
39
42
  import './grid/index.js'
40
43
  import './help-tooltip/index.js'
package/title/index.js CHANGED
@@ -16,7 +16,12 @@ class Title extends NectaryElement {
16
16
  this.setAttribute("role", "heading");
17
17
  }
18
18
  static get observedAttributes() {
19
- return ["text", "level", "ellipsis"];
19
+ return [
20
+ "text",
21
+ // eslint-disable-next-line @nectary/observed-attribute-accessor -- baseline backlog: level missing set/get pair
22
+ "level",
23
+ "ellipsis"
24
+ ];
20
25
  }
21
26
  attributeChangedCallback(name, oldVal, newVal) {
22
27
  switch (name) {
package/tooltip/index.js CHANGED
@@ -111,14 +111,18 @@ class Tooltip extends NectaryElement {
111
111
  }
112
112
  static get observedAttributes() {
113
113
  return [
114
+ // eslint-disable-next-line @nectary/observed-attribute-accessor -- baseline backlog: missing set isOpened
114
115
  "is-opened",
115
116
  "text",
116
117
  "orientation",
118
+ // eslint-disable-next-line @nectary/observed-attribute-accessor -- baseline backlog: missing set textAlign
117
119
  "text-align",
118
120
  "type",
119
121
  "aria-label",
120
122
  "aria-description",
123
+ // eslint-disable-next-line @nectary/observed-attribute-accessor -- baseline backlog: getter exists but missing set showOutsideViewport
121
124
  "show-outside-viewport",
125
+ // eslint-disable-next-line @nectary/observed-attribute-accessor -- baseline backlog: missing set allowScroll
122
126
  "allow-scroll"
123
127
  ];
124
128
  }
@@ -623,19 +627,19 @@ class Tooltip extends NectaryElement {
623
627
  let offsetX = 0;
624
628
  let offsetY = 0;
625
629
  if (orientation.startsWith("top")) {
626
- if (bottomEdge > targetRect.y + OVERLAP_TOLERANCE) {
630
+ if (bottomEdge > targetRect.y + OVERLAP_TOLERANCE && topEdge < targetBottom) {
627
631
  offsetY = targetRect.y - bottomEdge;
628
632
  }
629
633
  } else if (orientation.startsWith("bottom")) {
630
- if (topEdge < targetBottom - OVERLAP_TOLERANCE) {
634
+ if (topEdge < targetBottom - OVERLAP_TOLERANCE && bottomEdge > targetRect.y) {
631
635
  offsetY = targetBottom - topEdge;
632
636
  }
633
637
  } else if (orientation === "left") {
634
- if (rightEdge > targetRect.x + OVERLAP_TOLERANCE) {
638
+ if (rightEdge > targetRect.x + OVERLAP_TOLERANCE && leftEdge < targetRight) {
635
639
  offsetX = targetRect.x - rightEdge;
636
640
  }
637
641
  } else if (orientation === "right") {
638
- if (leftEdge < targetRight - OVERLAP_TOLERANCE) {
642
+ if (leftEdge < targetRight - OVERLAP_TOLERANCE && rightEdge > targetRect.x) {
639
643
  offsetX = targetRight - leftEdge;
640
644
  }
641
645
  }
@@ -1,3 +1,3 @@
1
- export declare const BASE_COMPONENT_NAMES_LIST: readonly ["accordion-item", "accordion", "action-menu-option", "action-menu", "alert", "avatar", "badge", "button-group-item", "button-group", "button", "card-container", "card-v2-title", "card-v2", "checkbox", "chip", "code-tag", "color-menu-option", "color-menu", "color-swatch", "date-picker", "dialog", "emoji-picker", "emoji", "field", "field-v2", "file-drop", "file-picker", "file-status", "flag", "grid-item", "grid", "help-tooltip", "icon", "inline-alert", "input", "link", "list-item", "list", "pagination", "persistent-overlay", "pop", "popover", "progress-stepper-item", "progress-stepper", "progress", "radio-option", "radio", "rich-text", "rich-textarea", "rich-textarea-chip", "segment-collapse", "segmented-control-option", "segmented-control", "segmented-icon-control-option", "segmented-icon-control", "select-button", "select-menu-option", "select-menu", "sheet", "sheet-title", "skeleton-item", "skeleton", "spinner", "stop-events", "table-body", "table-cell", "table-head-cell", "table-head", "table-row", "table", "tabs-icon-option", "tabs-option", "tabs", "tag", "text", "textarea", "time-picker", "title", "toast-manager", "toast", "toggle", "tooltip"];
2
- export declare const BASE_COMPONENT_NAMES: Set<"pop" | "button" | "dialog" | "input" | "link" | "progress" | "table" | "textarea" | "title" | "accordion-item" | "accordion" | "action-menu-option" | "action-menu" | "alert" | "avatar" | "badge" | "button-group-item" | "button-group" | "card-container" | "card-v2-title" | "card-v2" | "checkbox" | "chip" | "code-tag" | "color-menu-option" | "color-menu" | "color-swatch" | "date-picker" | "emoji-picker" | "emoji" | "field" | "field-v2" | "file-drop" | "file-picker" | "file-status" | "flag" | "grid-item" | "grid" | "help-tooltip" | "icon" | "inline-alert" | "list-item" | "list" | "pagination" | "persistent-overlay" | "popover" | "progress-stepper-item" | "progress-stepper" | "radio-option" | "radio" | "rich-text" | "rich-textarea" | "rich-textarea-chip" | "segment-collapse" | "segmented-control-option" | "segmented-control" | "segmented-icon-control-option" | "segmented-icon-control" | "select-button" | "select-menu-option" | "select-menu" | "sheet" | "sheet-title" | "skeleton-item" | "skeleton" | "spinner" | "stop-events" | "table-body" | "table-cell" | "table-head-cell" | "table-head" | "table-row" | "tabs-icon-option" | "tabs-option" | "tabs" | "tag" | "text" | "time-picker" | "toast-manager" | "toast" | "toggle" | "tooltip">;
1
+ export declare const BASE_COMPONENT_NAMES_LIST: readonly ["accordion-item", "accordion", "action-menu-option", "action-menu", "alert", "avatar", "badge", "button-group-item", "button-group", "button", "card-container", "card-v2-title", "card-v2", "checkbox", "chip", "code-tag", "color-menu-option", "color-menu", "color-swatch", "date-picker", "dialog", "emoji-picker", "emoji", "field", "field-v2", "file-drop", "file-picker", "file-status", "flag", "floating-panel", "floating-panel-button", "floating-panel-icon-button", "grid-item", "grid", "help-tooltip", "icon", "inline-alert", "input", "link", "list-item", "list", "pagination", "persistent-overlay", "pop", "popover", "progress-stepper-item", "progress-stepper", "progress", "radio-option", "radio", "rich-text", "rich-textarea", "rich-textarea-chip", "segment-collapse", "segmented-control-option", "segmented-control", "segmented-icon-control-option", "segmented-icon-control", "select-button", "select-menu-option", "select-menu", "sheet", "sheet-title", "skeleton-item", "skeleton", "spinner", "stop-events", "table-body", "table-cell", "table-head-cell", "table-head", "table-row", "table", "tabs-icon-option", "tabs-option", "tabs", "tag", "text", "textarea", "time-picker", "title", "toast-manager", "toast", "toggle", "tooltip"];
2
+ export declare const BASE_COMPONENT_NAMES: Set<"pop" | "button" | "dialog" | "input" | "link" | "progress" | "table" | "textarea" | "title" | "accordion-item" | "accordion" | "action-menu-option" | "action-menu" | "alert" | "avatar" | "badge" | "button-group-item" | "button-group" | "card-container" | "card-v2-title" | "card-v2" | "checkbox" | "chip" | "code-tag" | "color-menu-option" | "color-menu" | "color-swatch" | "date-picker" | "emoji-picker" | "emoji" | "field" | "field-v2" | "file-drop" | "file-picker" | "file-status" | "flag" | "floating-panel" | "floating-panel-button" | "floating-panel-icon-button" | "grid-item" | "grid" | "help-tooltip" | "icon" | "inline-alert" | "list-item" | "list" | "pagination" | "persistent-overlay" | "popover" | "progress-stepper-item" | "progress-stepper" | "radio-option" | "radio" | "rich-text" | "rich-textarea" | "rich-textarea-chip" | "segment-collapse" | "segmented-control-option" | "segmented-control" | "segmented-icon-control-option" | "segmented-icon-control" | "select-button" | "select-menu-option" | "select-menu" | "sheet" | "sheet-title" | "skeleton-item" | "skeleton" | "spinner" | "stop-events" | "table-body" | "table-cell" | "table-head-cell" | "table-head" | "table-row" | "tabs-icon-option" | "tabs-option" | "tabs" | "tag" | "text" | "time-picker" | "toast-manager" | "toast" | "toggle" | "tooltip">;
3
3
  export type ComponentName = `sinch-${typeof BASE_COMPONENT_NAMES_LIST[number]}`;
@@ -28,6 +28,9 @@ const BASE_COMPONENT_NAMES_LIST = [
28
28
  "file-picker",
29
29
  "file-status",
30
30
  "flag",
31
+ "floating-panel",
32
+ "floating-panel-button",
33
+ "floating-panel-icon-button",
31
34
  "grid-item",
32
35
  "grid",
33
36
  "help-tooltip",
@@ -37,6 +37,9 @@ declare const BASE_COMPONENT_NAMES_LIST: readonly [
37
37
  "file-picker",
38
38
  "file-status",
39
39
  "flag",
40
+ "floating-panel",
41
+ "floating-panel-button",
42
+ "floating-panel-icon-button",
40
43
  "grid-item",
41
44
  "grid",
42
45
  "help-tooltip",