agnosticui-core 2.0.0-alpha.22 → 2.0.0-alpha.24

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.
@@ -38,6 +38,14 @@ export interface ButtonProps {
38
38
  * - APG-compliant accessibility
39
39
  */
40
40
  export declare class AgButton extends LitElement implements ButtonProps {
41
+ static shadowRootOptions: {
42
+ delegatesFocus: boolean;
43
+ clonable?: boolean;
44
+ customElementRegistry?: CustomElementRegistry;
45
+ mode: ShadowRootMode;
46
+ serializable?: boolean;
47
+ slotAssignment?: SlotAssignmentMode;
48
+ };
41
49
  static styles: CSSResultGroup;
42
50
  /**
43
51
  * Visual variant for styling hooks
@@ -103,14 +111,6 @@ export declare class AgButton extends LitElement implements ButtonProps {
103
111
  private _handleClick;
104
112
  private _handleFocus;
105
113
  private _handleBlur;
106
- /**
107
- * Focus the internal button element
108
- */
109
- focus(): void;
110
- /**
111
- * Blur the internal button element
112
- */
113
- blur(): void;
114
114
  render(): import('lit').TemplateResult<1>;
115
115
  }
116
116
  //# sourceMappingURL=_Button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"_Button.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/core/_Button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,UAAU,EAAa,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAKjE,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,OAAO,CAAC;CAClB;AACD,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,uBAAuB,CAAC,CAAC;AAGrE,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,YAAY,GAAG,EAAE,CAAC;IACzF,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;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lit";
2
- import { n as r } from "../../../property-CemaeiRl.js";
3
- import { o as s } from "../../../if-defined-C8i28hSj.js";
4
- var b = Object.defineProperty, o = (g, a, e, v) => {
5
- for (var n = void 0, i = g.length - 1, u; i >= 0; i--)
6
- (u = g[i]) && (n = u(a, e, n) || n);
7
- return n && b(a, e, n), n;
1
+ import { LitElement as u, css as c, html as h } from "lit";
2
+ import { n as a } from "../../../property-CemaeiRl.js";
3
+ import { o as d } from "../../../if-defined-C8i28hSj.js";
4
+ var b = Object.defineProperty, r = (g, e, o, v) => {
5
+ for (var n = void 0, s = g.length - 1, l; s >= 0; s--)
6
+ (l = g[s]) && (n = l(e, o, n) || n);
7
+ return n && b(e, o, n), n;
8
8
  };
9
- const d = class d extends l {
9
+ const i = class i extends u {
10
10
  constructor() {
11
11
  super(), this.disabled = !1, this.loading = !1, this.toggle = !1, this.pressed = !1, this.bordered = !1, this.ghost = !1, this.link = !1, this.grouped = !1, this.fullWidth = !1, this.type = "button", this.ariaLabel = "", this.variant = "", this.size = "md", this.shape = "";
12
12
  }
13
- _handleClick(a) {
14
- if (this.onClick && this.onClick(a), !this.disabled && !this.loading && !a.defaultPrevented) {
13
+ _handleClick(e) {
14
+ if (this.onClick && this.onClick(e), !this.disabled && !this.loading && !e.defaultPrevented) {
15
15
  if (this.type === "submit") {
16
- const e = this.closest("form");
17
- e && e.requestSubmit();
16
+ const o = this.closest("form");
17
+ o && o.requestSubmit();
18
18
  } else if (this.type === "reset") {
19
- const e = this.closest("form");
20
- e && e.reset();
19
+ const o = this.closest("form");
20
+ o && o.reset();
21
21
  }
22
22
  }
23
- if (this.toggle && !this.disabled && !this.loading && !a.defaultPrevented) {
23
+ if (this.toggle && !this.disabled && !this.loading && !e.defaultPrevented) {
24
24
  this.pressed = !this.pressed;
25
- const e = new CustomEvent("toggle", {
25
+ const o = new CustomEvent("toggle", {
26
26
  detail: { pressed: this.pressed },
27
27
  bubbles: !0,
28
28
  composed: !0
29
29
  });
30
- this.dispatchEvent(e), this.onToggle && this.onToggle(e);
30
+ this.dispatchEvent(o), this.onToggle && this.onToggle(o);
31
31
  }
32
32
  }
33
- _handleFocus(a) {
34
- this.onFocus && this.onFocus(a);
35
- const e = new FocusEvent("focus", {
33
+ _handleFocus(e) {
34
+ this.onFocus && this.onFocus(e);
35
+ const o = new FocusEvent("focus", {
36
36
  bubbles: !0,
37
37
  composed: !0
38
38
  });
39
- this.dispatchEvent(e);
39
+ this.dispatchEvent(o);
40
40
  }
41
- _handleBlur(a) {
42
- this.onBlur && this.onBlur(a);
43
- const e = new FocusEvent("blur", {
41
+ _handleBlur(e) {
42
+ this.onBlur && this.onBlur(e);
43
+ const o = new FocusEvent("blur", {
44
44
  bubbles: !0,
45
45
  composed: !0
46
46
  });
47
- this.dispatchEvent(e);
48
- }
49
- /**
50
- * Focus the internal button element
51
- */
52
- focus() {
53
- const a = this.shadowRoot?.querySelector("button");
54
- a && a.focus();
55
- }
56
- /**
57
- * Blur the internal button element
58
- */
59
- blur() {
60
- const a = this.shadowRoot?.querySelector("button");
61
- a && a.blur();
47
+ this.dispatchEvent(o);
62
48
  }
63
49
  render() {
64
- const a = this.disabled || this.loading;
50
+ const e = this.disabled || this.loading;
65
51
  return h`
66
52
  <button
67
53
  type=${this.type}
68
54
  part="ag-button"
69
- ?disabled=${a}
70
- aria-disabled=${a ? "true" : "false"}
71
- aria-busy=${s(this.loading ? "true" : void 0)}
72
- aria-pressed=${s(this.toggle ? String(this.pressed) : void 0)}
73
- aria-label=${s(this.ariaLabel || void 0)}
55
+ ?disabled=${e}
56
+ aria-disabled=${e ? "true" : "false"}
57
+ aria-busy=${d(this.loading ? "true" : void 0)}
58
+ aria-pressed=${d(this.toggle ? String(this.pressed) : void 0)}
59
+ aria-label=${d(this.ariaLabel || void 0)}
74
60
  @click=${this._handleClick}
75
61
  @focus=${this._handleFocus}
76
62
  @blur=${this._handleBlur}
@@ -80,7 +66,10 @@ const d = class d extends l {
80
66
  `;
81
67
  }
82
68
  };
83
- d.styles = c`
69
+ i.shadowRootOptions = {
70
+ ...u.shadowRootOptions,
71
+ delegatesFocus: !0
72
+ }, i.styles = c`
84
73
  /* MINIMALIST & THEMEABLE - Styling via --ag-* design tokens */
85
74
  :host {
86
75
  /* Inline-flex for perfect centering while maintaining inline behavior */
@@ -467,60 +456,60 @@ d.styles = c`
467
456
  transition: outline var(--ag-motion-medium) ease;
468
457
  }
469
458
  `;
470
- let t = d;
471
- o([
472
- r({ type: String, reflect: !0 })
459
+ let t = i;
460
+ r([
461
+ a({ type: String, reflect: !0 })
473
462
  ], t.prototype, "variant");
474
- o([
475
- r({ type: String, reflect: !0 })
463
+ r([
464
+ a({ type: String, reflect: !0 })
476
465
  ], t.prototype, "size");
477
- o([
478
- r({ type: String, reflect: !0 })
466
+ r([
467
+ a({ type: String, reflect: !0 })
479
468
  ], t.prototype, "shape");
480
- o([
481
- r({ type: Boolean, reflect: !0 })
469
+ r([
470
+ a({ type: Boolean, reflect: !0 })
482
471
  ], t.prototype, "bordered");
483
- o([
484
- r({ type: Boolean, reflect: !0 })
472
+ r([
473
+ a({ type: Boolean, reflect: !0 })
485
474
  ], t.prototype, "ghost");
486
- o([
487
- r({ type: Boolean, reflect: !0 })
475
+ r([
476
+ a({ type: Boolean, reflect: !0 })
488
477
  ], t.prototype, "link");
489
- o([
490
- r({ type: Boolean, reflect: !0 })
478
+ r([
479
+ a({ type: Boolean, reflect: !0 })
491
480
  ], t.prototype, "grouped");
492
- o([
493
- r({ type: Boolean, reflect: !0, attribute: "full-width" })
481
+ r([
482
+ a({ type: Boolean, reflect: !0, attribute: "full-width" })
494
483
  ], t.prototype, "fullWidth");
495
- o([
496
- r({ type: String })
484
+ r([
485
+ a({ type: String })
497
486
  ], t.prototype, "type");
498
- o([
499
- r({ type: Boolean })
487
+ r([
488
+ a({ type: Boolean })
500
489
  ], t.prototype, "disabled");
501
- o([
502
- r({ type: Boolean })
490
+ r([
491
+ a({ type: Boolean })
503
492
  ], t.prototype, "loading");
504
- o([
505
- r({ type: Boolean })
493
+ r([
494
+ a({ type: Boolean })
506
495
  ], t.prototype, "toggle");
507
- o([
508
- r({ type: Boolean })
496
+ r([
497
+ a({ type: Boolean })
509
498
  ], t.prototype, "pressed");
510
- o([
511
- r({ type: String, reflect: !0, attribute: "aria-label" })
499
+ r([
500
+ a({ type: String, reflect: !0, attribute: "aria-label" })
512
501
  ], t.prototype, "ariaLabel");
513
- o([
514
- r({ attribute: !1 })
502
+ r([
503
+ a({ attribute: !1 })
515
504
  ], t.prototype, "onClick");
516
- o([
517
- r({ attribute: !1 })
505
+ r([
506
+ a({ attribute: !1 })
518
507
  ], t.prototype, "onFocus");
519
- o([
520
- r({ attribute: !1 })
508
+ r([
509
+ a({ attribute: !1 })
521
510
  ], t.prototype, "onBlur");
522
- o([
523
- r({ attribute: !1 })
511
+ r([
512
+ a({ attribute: !1 })
524
513
  ], t.prototype, "onToggle");
525
514
  export {
526
515
  t as AgButton
@@ -1,13 +1,26 @@
1
- import { EventName } from '@lit/react';
2
- import { AgnosticDrawer, DrawerProps, DrawerOpenEvent, DrawerCloseEvent, DrawerCancelEvent } from '../core/Drawer';
1
+ import { AgnosticDrawer, DrawerProps } from '../core/Drawer';
3
2
  import * as React from 'react';
4
3
  /**
5
- * React-specific props for Drawer
4
+ * React-specific props for Drawer.
5
+ *
6
+ * Includes onOpenChange for controlled-component support. This is necessary
7
+ * because the underlying Lit web component manages its own open state internally
8
+ * (e.g. it sets this.open = false on Escape or backdrop click). @lit/react's
9
+ * createComponent only bridges DOM events -> React props, so without explicitly
10
+ * calling onOpenChange(false) on close/cancel, React's state never learns the
11
+ * drawer closed. The stale open={true} is then re-applied on the next render,
12
+ * causing previously dismissed drawers to reappear when other drawers are opened.
6
13
  */
7
14
  export interface ReactDrawerProps extends DrawerProps {
8
15
  children?: React.ReactNode;
9
16
  className?: string;
10
17
  id?: string;
18
+ /**
19
+ * Called with the new open state whenever the drawer opens or closes.
20
+ * Wire this to your React state setter (e.g. onOpenChange={setIsOpen}) so
21
+ * React stays in sync when the drawer closes itself internally.
22
+ */
23
+ onOpenChange?: (open: boolean) => void;
11
24
  }
12
25
  /**
13
26
  * Helper component for drawer header slot
@@ -21,11 +34,17 @@ export interface DrawerHeaderProps {
21
34
  export interface DrawerFooterProps {
22
35
  children?: React.ReactNode;
23
36
  }
24
- export declare const ReactDrawer: import('@lit/react').ReactWebComponent<AgnosticDrawer, {
25
- onDrawerOpen: EventName<DrawerOpenEvent>;
26
- onDrawerClose: EventName<DrawerCloseEvent>;
27
- onDrawerCancel: EventName<DrawerCancelEvent>;
28
- }>;
37
+ /**
38
+ * ReactDrawer wraps _ReactDrawerBase to add onOpenChange support.
39
+ *
40
+ * The Lit element fires "drawer-close" when the close button is clicked and
41
+ * "drawer-cancel" when the user presses Escape or clicks the backdrop. Both
42
+ * mean the drawer is now closed. We intercept those two events and call
43
+ * onOpenChange(false) so React state reflects the new closed state immediately,
44
+ * preventing the stale open={true} from being pushed back into the element on
45
+ * the next render.
46
+ */
47
+ export declare const ReactDrawer: React.ForwardRefExoticComponent<ReactDrawerProps & React.RefAttributes<AgnosticDrawer>>;
29
48
  export declare const DrawerHeader: React.FC<DrawerHeaderProps>;
30
49
  export declare const DrawerFooter: React.FC<DrawerFooterProps>;
31
50
  export type { DrawerOpenEvent, DrawerCloseEvent, DrawerCancelEvent } from '../core/Drawer';
@@ -1 +1 @@
1
- {"version":3,"file":"ReactDrawer.d.ts","sourceRoot":"","sources":["../../../../src/components/Drawer/react/ReactDrawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,EACL,cAAc,EACd,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACvB,MAAM,gBAAgB,CAAC;AAExB;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,Q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S,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAeD;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,yFA4BvB,CAAC;AAKF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAEpD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAEpD,CAAC;AAGF,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,20 +1,42 @@
1
- import { j as e } from "../../../jsx-runtime-BzflLqGi.js";
1
+ import { j as a } from "../../../jsx-runtime-BzflLqGi.js";
2
2
  import * as o from "react";
3
- import { o as a } from "../../../create-component-BPMDMe-q.js";
3
+ import { o as m } from "../../../create-component-BPMDMe-q.js";
4
4
  import "../core/Drawer.js";
5
- import { AgnosticDrawer as t } from "../core/_drawer.js";
6
- const w = a({
5
+ import { AgnosticDrawer as i } from "../core/_drawer.js";
6
+ const p = m({
7
7
  tagName: "ag-drawer",
8
- elementClass: t,
8
+ elementClass: i,
9
9
  react: o,
10
10
  events: {
11
11
  onDrawerOpen: "drawer-open",
12
12
  onDrawerClose: "drawer-close",
13
13
  onDrawerCancel: "drawer-cancel"
14
14
  }
15
- }), i = ({ children: r }) => /* @__PURE__ */ e.jsx("div", { slot: "header", children: r }), p = ({ children: r }) => /* @__PURE__ */ e.jsx("div", { slot: "footer", children: r });
15
+ }), f = o.forwardRef(
16
+ ({ onOpenChange: r, onDrawerOpen: t, onDrawerClose: s, onDrawerCancel: n, ...w }, c) => {
17
+ const l = (e) => {
18
+ t?.(e), r?.(!0);
19
+ }, D = (e) => {
20
+ s?.(e), r?.(!1);
21
+ }, d = (e) => {
22
+ n?.(e), r?.(!1);
23
+ };
24
+ return /* @__PURE__ */ a.jsx(
25
+ p,
26
+ {
27
+ ref: c,
28
+ onDrawerOpen: l,
29
+ onDrawerClose: D,
30
+ onDrawerCancel: d,
31
+ ...w
32
+ }
33
+ );
34
+ }
35
+ );
36
+ f.displayName = "ReactDrawer";
37
+ const C = ({ children: r }) => /* @__PURE__ */ a.jsx("div", { slot: "header", children: r }), v = ({ children: r }) => /* @__PURE__ */ a.jsx("div", { slot: "footer", children: r });
16
38
  export {
17
- p as DrawerFooter,
18
- i as DrawerHeader,
19
- w as ReactDrawer
39
+ v as DrawerFooter,
40
+ C as DrawerHeader,
41
+ f as ReactDrawer
20
42
  };
@@ -1 +1 @@
1
- {"version":3,"file":"_EmptyState.d.ts","sourceRoot":"","sources":["../../../../src/components/EmptyState/core/_EmptyState.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,qBAAa,YAAa,SAAQ,UAAW,YAAW,eAAe;IAE7D,KAAK,EAAE,MAAM,CAAC;IAGd,QAAQ,EAAE,MAAM,CAAC;IAGjB,UAAU,EAAE,MAAM,CAAC;IAGnB,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAGzB,QAAQ,EAAE,OAAO,CAAC;IAGlB,OAAO,EAAE,OAAO,CAAC;IAGzB,OAAO,CAAC,YAAY,CAAS;IAG7B,OAAO,CAAC,eAAe,CAAS;;IAYhC,OAAO,CAAC,iBAAiB;IAahB,YAAY;IAoBrB,MAAM,CAAC,MAAM,0BA8FX;IAEF,MAAM;CAuDP"}
1
+ {"version":3,"file":"_EmptyState.d.ts","sourceRoot":"","sources":["../../../../src/components/EmptyState/core/_EmptyState.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,qBAAa,YAAa,SAAQ,UAAW,YAAW,eAAe;IAE7D,KAAK,EAAE,MAAM,CAAC;IAGd,QAAQ,EAAE,MAAM,CAAC;IAGjB,UAAU,EAAE,MAAM,CAAC;IAGnB,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAGzB,QAAQ,EAAE,OAAO,CAAC;IAGlB,OAAO,EAAE,OAAO,CAAC;IAGzB,OAAO,CAAC,YAAY,CAAS;IAG7B,OAAO,CAAC,eAAe,CAAS;;IAYhC,OAAO,CAAC,iBAAiB;IAWhB,YAAY;IAoBrB,MAAM,CAAC,MAAM,0BA8FX;IAEF,MAAM;CAuDP"}
@@ -1,18 +1,19 @@
1
1
  import { hasSlotContent as l } from "../../../utils/slot.js";
2
- import { LitElement as d, css as u, html as r } from "lit";
3
- import { n as s } from "../../../property-CemaeiRl.js";
4
- var b = Object.defineProperty, a = (p, e, o, n) => {
2
+ import { LitElement as u, css as b, html as r } from "lit";
3
+ import { n as a } from "../../../property-CemaeiRl.js";
4
+ import { r as d } from "../../../state-CovhUvdr.js";
5
+ var m = Object.defineProperty, s = (p, e, o, n) => {
5
6
  for (var i = void 0, c = p.length - 1, g; c >= 0; c--)
6
7
  (g = p[c]) && (i = g(e, o, i) || i);
7
- return i && b(e, o, i), i;
8
+ return i && m(e, o, i), i;
8
9
  };
9
- const h = class h extends d {
10
+ const h = class h extends u {
10
11
  constructor() {
11
12
  super(), this._hasIconSlot = !1, this._hasActionsSlot = !1, this.title = "", this.subtitle = "", this.buttonText = "", this.size = "md", this.bordered = !1, this.rounded = !1;
12
13
  }
13
14
  _handleSlotChange(e) {
14
15
  const o = e.target, n = o.name;
15
- n === "icon" ? this._hasIconSlot = l(o) : n === "actions" && (this._hasActionsSlot = l(o)), this.requestUpdate();
16
+ n === "icon" ? this._hasIconSlot = l(o) : n === "actions" && (this._hasActionsSlot = l(o));
16
17
  }
17
18
  firstUpdated() {
18
19
  setTimeout(() => {
@@ -73,7 +74,7 @@ const h = class h extends d {
73
74
  `;
74
75
  }
75
76
  };
76
- h.styles = u`
77
+ h.styles = b`
77
78
  :host {
78
79
  display: block;
79
80
  }
@@ -169,29 +170,29 @@ h.styles = u`
169
170
  }
170
171
  `;
171
172
  let t = h;
172
- a([
173
- s({ type: String })
173
+ s([
174
+ a({ type: String })
174
175
  ], t.prototype, "title");
175
- a([
176
- s({ type: String })
176
+ s([
177
+ a({ type: String })
177
178
  ], t.prototype, "subtitle");
178
- a([
179
- s({ type: String, attribute: "button-text" })
179
+ s([
180
+ a({ type: String, attribute: "button-text" })
180
181
  ], t.prototype, "buttonText");
181
- a([
182
- s({ type: String, reflect: !0 })
182
+ s([
183
+ a({ type: String, reflect: !0 })
183
184
  ], t.prototype, "size");
184
- a([
185
- s({ type: Boolean })
185
+ s([
186
+ a({ type: Boolean })
186
187
  ], t.prototype, "bordered");
187
- a([
188
- s({ type: Boolean })
188
+ s([
189
+ a({ type: Boolean })
189
190
  ], t.prototype, "rounded");
190
- a([
191
- s({ type: Boolean, state: !0 })
191
+ s([
192
+ d()
192
193
  ], t.prototype, "_hasIconSlot");
193
- a([
194
- s({ type: Boolean, state: !0 })
194
+ s([
195
+ d()
195
196
  ], t.prototype, "_hasActionsSlot");
196
197
  export {
197
198
  t as AgEmptyState
@@ -38,6 +38,14 @@ export interface InputProps {
38
38
  }
39
39
  declare const AgInput_base: (new (...args: any[]) => import('../../../shared/face-mixin').FaceMixinInterface) & typeof LitElement;
40
40
  export declare class AgInput extends AgInput_base implements InputProps {
41
+ static shadowRootOptions: {
42
+ delegatesFocus: boolean;
43
+ clonable?: boolean;
44
+ customElementRegistry?: CustomElementRegistry;
45
+ mode: ShadowRootMode;
46
+ serializable?: boolean;
47
+ slotAssignment?: SlotAssignmentMode;
48
+ };
41
49
  static styles: import('lit').CSSResult[];
42
50
  private _ids;
43
51
  private _inputElement?;
@@ -83,14 +91,6 @@ export declare class AgInput extends AgInput_base implements InputProps {
83
91
  * Set the value of the input
84
92
  */
85
93
  setValue(value: string): void;
86
- /**
87
- * Focus the input element
88
- */
89
- focus(): void;
90
- /**
91
- * Blur the input element
92
- */
93
- blur(): void;
94
94
  /**
95
95
  * Select the text in the input
96
96
  */
@@ -1 +1 @@
1
- {"version":3,"file":"_Input.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/core/_Input.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAKrD,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,oCAAoC,CAAC;AAG5C,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,UAAU,GACV,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,KAAK,GACL,KAAK,GACL,MAAM,GACN,gBAAgB,GAChB,OAAO,GACP,MAAM,GACN,MAAM,GACN,UAAU,CAAC;AAEf,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,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I,IAAI,IAAI;IAIZ;;OAEG;IACH,MAAM,IAAI,IAAI;IASd;;;OAGG;IACM,iBAAiB,IAAI,IAAI;IAOlC;;;OAGG;IACM,wBAAwB,CAC/B,KAAK,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,IAAI,EACtC,KAAK,EAAE,SAAS,GAAG,cAAc,GAChC,IAAI;IAOP;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,WAAW;IAOnB;;;;;OAKG;IACH,OAAO,CAAC,aAAa;IAMrB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAazB;;OAEG;IACH,OAAO,CAAC,YAAY;IAapB;;OAEG;IACH,OAAO,CAAC,aAAa;IAarB;;OAEG;IACH,OAAO,CAAC,YAAY;IAepB;;OAEG;IACH,OAAO,CAAC,WAAW;IAenB;;OAEG;IACH,OAAO,CAAC,YAAY;IAMpB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAS3B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IA4DlB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAY/C,YAAY;IAwBrB;;OAEG;IACH,OAAO,CAAC,YAAY;IAgCpB;;OAEG;IACH,OAAO,CAAC,aAAa;IAcrB;;;;;;OAMG;IACH,OAAO,CAAC,YAAY;IAepB,MAAM;CAkFP"}
1
+ {"version":3,"file":"_Input.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/core/_Input.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAKrD,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,oCAAoC,CAAC;AAG5C,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,UAAU,GACV,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,KAAK,GACL,KAAK,GACL,MAAM,GACN,gBAAgB,GAChB,OAAO,GACP,MAAM,GACN,MAAM,GACN,UAAU,CAAC;AAEf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UAAU,KAAK,IAAI,CAAC;IAGpC,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,cAAc,CAAS;;IA4BxC;;OAEG;IACH,IAAI,cAAc,IAAI,gBAAgB,GAAG,mBAAmB,GAAG,SAAS,CAEvE;IAED;;OAEG;IACH,QAAQ,IAAI,MAAM;IAIlB;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAO7B;;OAEG;IACH,MAAM,IAAI,IAAI;IASd;;;OAGG;IACM,iBAAiB,IAAI,IAAI;IAOlC;;;OAGG;IACM,wBAAwB,CAC/B,KAAK,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,IAAI,EACtC,KAAK,EAAE,SAAS,GAAG,cAAc,GAChC,IAAI;IAOP;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,WAAW;IAOnB;;;;;OAKG;IACH,OAAO,CAAC,aAAa;IAMrB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAazB;;OAEG;IACH,OAAO,CAAC,YAAY;IAapB;;OAEG;IACH,OAAO,CAAC,aAAa;IAarB;;OAEG;IACH,OAAO,CAAC,YAAY;IAepB;;OAEG;IACH,OAAO,CAAC,WAAW;IAenB;;OAEG;IACH,OAAO,CAAC,YAAY;IAMpB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAS3B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IA4DlB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAY/C,YAAY;IAwBrB;;OAEG;IACH,OAAO,CAAC,YAAY;IAgCpB;;OAEG;IACH,OAAO,CAAC,aAAa;IAcrB;;;;;;OAMG;IACH,OAAO,CAAC,YAAY;IAepB,MAAM;CAkFP"}
@@ -1,18 +1,18 @@
1
- import { css as b, html as s, nothing as o, LitElement as v } from "lit";
1
+ import { LitElement as c, css as v, html as s, nothing as o } from "lit";
2
2
  import { n as i } from "../../../property-CemaeiRl.js";
3
- import { r as f } from "../../../state-CovhUvdr.js";
3
+ import { r as b } from "../../../state-CovhUvdr.js";
4
4
  import { e as y } from "../../../query-BykXNUlT.js";
5
5
  import { o as l } from "../../../if-defined-C8i28hSj.js";
6
6
  import { hasSlotContent as u } from "../../../utils/slot.js";
7
7
  import { formControlStyles as m } from "../../../shared/form-control-styles.js";
8
- import { createFormControlIds as $, buildAriaDescribedBy as x, isHorizontalLabel as c } from "../../../shared/form-control-utils.js";
8
+ import { createFormControlIds as $, buildAriaDescribedBy as x, isHorizontalLabel as f } from "../../../shared/form-control-utils.js";
9
9
  import { FaceMixin as w, syncInnerInputValidity as k } from "../../../shared/face-mixin.js";
10
- var S = Object.defineProperty, a = (_, t, n, r) => {
11
- for (var d = void 0, h = _.length - 1, g; h >= 0; h--)
12
- (g = _[h]) && (d = g(t, n, d) || d);
10
+ var S = Object.defineProperty, a = (g, t, n, r) => {
11
+ for (var d = void 0, p = g.length - 1, _; p >= 0; p--)
12
+ (_ = g[p]) && (d = _(t, n, d) || d);
13
13
  return d && S(t, n, d), d;
14
14
  };
15
- const p = class p extends w(v) {
15
+ const h = class h extends w(c) {
16
16
  constructor() {
17
17
  super(), this._ids = $("ag-input"), this._hasLeftAddon = !1, this._hasRightAddon = !1, this.label = "", this.labelHidden = !1, this.labelPosition = "top", this.noLabel = !1, this.ariaLabel = "", this.type = "text", this.value = "", this.placeholder = "", this.rows = 4, this.cols = 50, this.size = "default", this.capsule = !1, this.rounded = !1, this.underlined = !1, this.underlinedWithBackground = !1, this.inline = !1, this.required = !1, this.disabled = !1, this.readonly = !1, this.invalid = !1, this.errorMessage = "", this.helpText = "";
18
18
  }
@@ -34,18 +34,6 @@ const p = class p extends w(v) {
34
34
  setValue(t) {
35
35
  this._inputElement && (this._inputElement.value = t, this.value = t);
36
36
  }
37
- /**
38
- * Focus the input element
39
- */
40
- focus() {
41
- this._inputElement?.focus();
42
- }
43
- /**
44
- * Blur the input element
45
- */
46
- blur() {
47
- this._inputElement?.blur();
48
- }
49
37
  /**
50
38
  * Select the text in the input
51
39
  */
@@ -222,7 +210,7 @@ const p = class p extends w(v) {
222
210
  _renderLabel() {
223
211
  if (!this.label || this.noLabel) return o;
224
212
  const t = [];
225
- return c(this.labelPosition) ? (t.push("ag-form-control__label--horizontal"), t.push(`ag-form-control__label--${this.labelPosition}`), t.push("ag-input__label--horizontal"), t.push(`ag-input__label--${this.labelPosition}`)) : this.labelPosition === "bottom" && (t.push(`ag-form-control__label--${this.labelPosition}`), t.push(`ag-input__label--${this.labelPosition}`)), s`
213
+ return f(this.labelPosition) ? (t.push("ag-form-control__label--horizontal"), t.push(`ag-form-control__label--${this.labelPosition}`), t.push("ag-input__label--horizontal"), t.push(`ag-input__label--${this.labelPosition}`)) : this.labelPosition === "bottom" && (t.push(`ag-form-control__label--${this.labelPosition}`), t.push(`ag-input__label--${this.labelPosition}`)), s`
226
214
  <label
227
215
  id="${this._ids.labelId}"
228
216
  for="${this._ids.inputId}"
@@ -272,7 +260,7 @@ const p = class p extends w(v) {
272
260
  `;
273
261
  }
274
262
  render() {
275
- const t = this._hasLeftAddon || this._hasRightAddon, n = c(this.labelPosition), r = ["ag-input"];
263
+ const t = this._hasLeftAddon || this._hasRightAddon, n = f(this.labelPosition), r = ["ag-input"];
276
264
  this.size === "small" && r.push("ag-input--small"), this.size === "large" && r.push("ag-input--large"), this.rounded && r.push("ag-input--rounded"), this.underlined && r.push("ag-input--underlined"), this.underlinedWithBackground && r.push("ag-input--underlined-with-background");
277
265
  const d = t ? s`
278
266
  <div class="ag-input__field" part="ag-input-field-wrapper">
@@ -325,9 +313,12 @@ const p = class p extends w(v) {
325
313
  `;
326
314
  }
327
315
  };
328
- p.styles = [
316
+ h.shadowRootOptions = {
317
+ ...c.shadowRootOptions,
318
+ delegatesFocus: !0
319
+ }, h.styles = [
329
320
  m,
330
- b`
321
+ v`
331
322
  :host {
332
323
  display: block;
333
324
  }
@@ -567,7 +558,7 @@ p.styles = [
567
558
  }
568
559
  `
569
560
  ];
570
- let e = p;
561
+ let e = h;
571
562
  a([
572
563
  y("input, textarea")
573
564
  ], e.prototype, "_inputElement");
@@ -653,10 +644,10 @@ a([
653
644
  i({ attribute: !1 })
654
645
  ], e.prototype, "onBlur");
655
646
  a([
656
- f()
647
+ b()
657
648
  ], e.prototype, "_hasLeftAddon");
658
649
  a([
659
- f()
650
+ b()
660
651
  ], e.prototype, "_hasRightAddon");
661
652
  export {
662
653
  e as AgInput
@@ -36,6 +36,14 @@ declare const Select_base: (new (...args: any[]) => import('../../../shared/face
36
36
  * @fires change - Emitted when selection changes
37
37
  */
38
38
  export declare class Select extends Select_base implements SelectProps {
39
+ static shadowRootOptions: {
40
+ delegatesFocus: boolean;
41
+ clonable?: boolean;
42
+ customElementRegistry?: CustomElementRegistry;
43
+ mode: ShadowRootMode;
44
+ serializable?: boolean;
45
+ slotAssignment?: SlotAssignmentMode;
46
+ };
39
47
  size: SelectSize;
40
48
  multiple: boolean;
41
49
  disabled: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"_Select.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/core/_Select.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,oCAAoC,CAAC;AAI5C,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,OAAO,GAAG,EAAE,CAAC;AAGhD,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC1B;AACD,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,uBAAuB,CAAC,CAAC;AAErE,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IAEt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CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAGtD,OAAO,CAAC,aAAa,CAAqB;IAI1C;;;;OAIG;IACM,iBAAiB,IAAI,IAAI;IASlC;;;;OAIG;IACM,wBAAwB,CAC/B,KAAK,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,IAAI,EACtC,KAAK,EAAE,SAAS,GAAG,cAAc,GAChC,IAAI;IAmBP;;;;;;;;;;OAUG;IACH,OAAO,CAAC,WAAW;IAMnB;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAatB;;OAEG;IACH,OAAO,CAAC,aAAa;IAMZ,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAWxD,SAAS,CAAC,YAAY;IAgBtB,OAAO,CAAC,gBAAgB;IAwBxB,MAAM,CAAC,MAAM,4BA6FX;IAEF,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,WAAW;IAanB,OAAO,CAAC,UAAU;IAalB,OAAO,CAAC,YAAY;IA4BpB,OAAO,CAAC,WAAW;IAwBnB,MAAM;CA0EP;AAOD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,MAAM,CAAC;KACrB;CACF"}
@@ -1,15 +1,15 @@
1
- import { LitElement as u, css as g, html as n } from "lit";
2
- import { n as r } from "../../../property-CemaeiRl.js";
1
+ import { LitElement as p, css as g, html as n } from "lit";
2
+ import { n as o } from "../../../property-CemaeiRl.js";
3
3
  import { e as m } from "../../../query-BykXNUlT.js";
4
- import { isHorizontalLabel as p, createFormControlIds as f, buildAriaDescribedBy as b } from "../../../shared/form-control-utils.js";
4
+ import { isHorizontalLabel as u, createFormControlIds as f, buildAriaDescribedBy as b } from "../../../shared/form-control-utils.js";
5
5
  import { formControlStyles as v } from "../../../shared/form-control-styles.js";
6
6
  import { FaceMixin as y, syncInnerInputValidity as _ } from "../../../shared/face-mixin.js";
7
- var E = Object.defineProperty, i = (h, e, a, o) => {
7
+ var E = Object.defineProperty, i = (h, e, a, r) => {
8
8
  for (var s = void 0, l = h.length - 1, d; l >= 0; l--)
9
9
  (d = h[l]) && (s = d(e, a, s) || s);
10
10
  return s && E(e, a, s), s;
11
11
  };
12
- const c = class c extends y(u) {
12
+ const c = class c extends y(p) {
13
13
  constructor() {
14
14
  super(...arguments), this.size = "", this.multiple = !1, this.disabled = !1, this.label = "", this.labelPosition = "top", this.labelHidden = !1, this.noLabel = !1, this.required = !1, this.invalid = !1, this.errorMessage = "", this.helpText = "";
15
15
  }
@@ -31,12 +31,12 @@ const c = class c extends y(u) {
31
31
  this.updateComplete.then(() => {
32
32
  if (this.selectElement) {
33
33
  if (this.multiple && e instanceof FormData) {
34
- const o = new Set(Array.from(e.values()));
34
+ const r = new Set(Array.from(e.values()));
35
35
  Array.from(this.selectElement.options).forEach((s) => {
36
- s.selected = o.has(s.value);
36
+ s.selected = r.has(s.value);
37
37
  });
38
- } else typeof e == "string" && Array.from(this.selectElement.options).forEach((o) => {
39
- o.selected = o.value === e;
38
+ } else typeof e == "string" && Array.from(this.selectElement.options).forEach((r) => {
39
+ r.selected = r.value === e;
40
40
  });
41
41
  this._syncFormValue(), this._syncValidity(), this._syncStates();
42
42
  }
@@ -91,10 +91,10 @@ const c = class c extends y(u) {
91
91
  if (!this.selectElement) return;
92
92
  const e = this.shadowRoot?.querySelector("slot");
93
93
  if (!e) return;
94
- e.assignedNodes().forEach((o) => {
95
- if (o.nodeType === Node.ELEMENT_NODE) {
96
- const s = o;
97
- (s.tagName === "OPTION" || s.tagName === "OPTGROUP") && this.selectElement.appendChild(o);
94
+ e.assignedNodes().forEach((r) => {
95
+ if (r.nodeType === Node.ELEMENT_NODE) {
96
+ const s = r;
97
+ (s.tagName === "OPTION" || s.tagName === "OPTGROUP") && this.selectElement.appendChild(r);
98
98
  }
99
99
  });
100
100
  }
@@ -115,10 +115,10 @@ const c = class c extends y(u) {
115
115
  }
116
116
  handleChange(e) {
117
117
  const a = e.target;
118
- let o;
119
- this.multiple ? o = Array.from(a.selectedOptions).map((l) => l.value) : o = a.value, this._syncFormValue(), this._syncValidity();
118
+ let r;
119
+ this.multiple ? r = Array.from(a.selectedOptions).map((l) => l.value) : r = a.value, this._syncFormValue(), this._syncValidity();
120
120
  const s = new CustomEvent("change", {
121
- detail: { value: o },
121
+ detail: { value: r },
122
122
  bubbles: !0,
123
123
  composed: !0
124
124
  });
@@ -127,7 +127,7 @@ const c = class c extends y(u) {
127
127
  renderLabel(e) {
128
128
  if (!this.label || this.noLabel) return "";
129
129
  const a = [];
130
- return p(this.labelPosition) ? (a.push("ag-form-control__label--horizontal"), a.push(`ag-form-control__label--${this.labelPosition}`)) : this.labelPosition === "bottom" && a.push(`ag-form-control__label--${this.labelPosition}`), n`
130
+ return u(this.labelPosition) ? (a.push("ag-form-control__label--horizontal"), a.push(`ag-form-control__label--${this.labelPosition}`)) : this.labelPosition === "bottom" && a.push(`ag-form-control__label--${this.labelPosition}`), n`
131
131
  <label
132
132
  for=${e.inputId}
133
133
  class="ag-form-control__label ${this.labelHidden ? "ag-form-control__label--hidden" : ""} ${this.required ? "ag-form-control__label--required" : ""} ${a.join(" ")}"
@@ -142,7 +142,7 @@ const c = class c extends y(u) {
142
142
  errorId: e.errorId,
143
143
  hasHelper: !!this.helpText && !this.invalid,
144
144
  hasError: !!this.invalid && !!this.errorMessage
145
- }), o = p(this.labelPosition), s = n`
145
+ }), r = u(this.labelPosition), s = n`
146
146
  <select
147
147
  id=${e.inputId}
148
148
  class="select"
@@ -166,7 +166,7 @@ const c = class c extends y(u) {
166
166
  </div>` : "", d = this.invalid && this.errorMessage ? n`<div id=${e.errorId} class="ag-form-control__error">
167
167
  ${this.errorMessage}
168
168
  </div>` : "";
169
- return o ? n`
169
+ return r ? n`
170
170
  <div class="ag-form-control--horizontal">
171
171
  ${this.renderLabel(e)}
172
172
  ${s}
@@ -186,7 +186,10 @@ const c = class c extends y(u) {
186
186
  `;
187
187
  }
188
188
  };
189
- c.styles = [
189
+ c.shadowRootOptions = {
190
+ ...p.shadowRootOptions,
191
+ delegatesFocus: !0
192
+ }, c.styles = [
190
193
  v,
191
194
  g`
192
195
  :host {
@@ -282,52 +285,52 @@ c.styles = [
282
285
  ];
283
286
  let t = c;
284
287
  i([
285
- r({ type: String, reflect: !0 })
288
+ o({ type: String, reflect: !0 })
286
289
  ], t.prototype, "size");
287
290
  i([
288
- r({ type: Boolean, reflect: !0 })
291
+ o({ type: Boolean, reflect: !0 })
289
292
  ], t.prototype, "multiple");
290
293
  i([
291
- r({ type: Boolean, reflect: !0 })
294
+ o({ type: Boolean, reflect: !0 })
292
295
  ], t.prototype, "disabled");
293
296
  i([
294
- r({ type: Number, attribute: "multiple-size" })
297
+ o({ type: Number, attribute: "multiple-size" })
295
298
  ], t.prototype, "multipleSize");
296
299
  i([
297
- r({ type: String })
300
+ o({ type: String })
298
301
  ], t.prototype, "label");
299
302
  i([
300
- r({ type: String, attribute: "label-position" })
303
+ o({ type: String, attribute: "label-position" })
301
304
  ], t.prototype, "labelPosition");
302
305
  i([
303
- r({ type: Boolean, attribute: "label-hidden" })
306
+ o({ type: Boolean, attribute: "label-hidden" })
304
307
  ], t.prototype, "labelHidden");
305
308
  i([
306
- r({ type: Boolean, attribute: "no-label" })
309
+ o({ type: Boolean, attribute: "no-label" })
307
310
  ], t.prototype, "noLabel");
308
311
  i([
309
- r({ type: Boolean })
312
+ o({ type: Boolean })
310
313
  ], t.prototype, "required");
311
314
  i([
312
- r({ type: Boolean })
315
+ o({ type: Boolean })
313
316
  ], t.prototype, "invalid");
314
317
  i([
315
- r({ type: String, attribute: "error-message" })
318
+ o({ type: String, attribute: "error-message" })
316
319
  ], t.prototype, "errorMessage");
317
320
  i([
318
- r({ type: String, attribute: "help-text" })
321
+ o({ type: String, attribute: "help-text" })
319
322
  ], t.prototype, "helpText");
320
323
  i([
321
- r({ attribute: !1 })
324
+ o({ attribute: !1 })
322
325
  ], t.prototype, "onClick");
323
326
  i([
324
- r({ attribute: !1 })
327
+ o({ attribute: !1 })
325
328
  ], t.prototype, "onFocus");
326
329
  i([
327
- r({ attribute: !1 })
330
+ o({ attribute: !1 })
328
331
  ], t.prototype, "onBlur");
329
332
  i([
330
- r({ attribute: !1 })
333
+ o({ attribute: !1 })
331
334
  ], t.prototype, "onChange");
332
335
  i([
333
336
  m("select")
@@ -1,7 +1,7 @@
1
1
  function o(t) {
2
2
  if (!t)
3
3
  return !1;
4
- const n = t.assignedNodes({ flatten: !0 }), r = (e) => e.children.length > 0 || e.textContent?.trim() !== "";
4
+ const n = t.assignedNodes(), r = (e) => e.children.length > 0 || e.textContent?.trim() !== "";
5
5
  return n.some((e) => e.nodeType === Node.ELEMENT_NODE ? r(e) : e.nodeType === Node.TEXT_NODE ? e.textContent?.trim() !== "" : !1);
6
6
  }
7
7
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agnosticui-core",
3
- "version": "2.0.0-alpha.22",
3
+ "version": "2.0.0-alpha.24",
4
4
  "author": "AgnosticUI",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -69,6 +69,11 @@ export interface ButtonProps {
69
69
  * - APG-compliant accessibility
70
70
  */
71
71
  export class AgButton extends LitElement implements ButtonProps {
72
+ static shadowRootOptions = {
73
+ ...LitElement.shadowRootOptions,
74
+ delegatesFocus: true,
75
+ };
76
+
72
77
  static styles = css`
73
78
  /* MINIMALIST & THEMEABLE - Styling via --ag-* design tokens */
74
79
  :host {
@@ -635,26 +640,6 @@ export class AgButton extends LitElement implements ButtonProps {
635
640
  this.dispatchEvent(blurEvent);
636
641
  }
637
642
 
638
- /**
639
- * Focus the internal button element
640
- */
641
- focus() {
642
- const button = this.shadowRoot?.querySelector('button');
643
- if (button) {
644
- button.focus();
645
- }
646
- }
647
-
648
- /**
649
- * Blur the internal button element
650
- */
651
- blur() {
652
- const button = this.shadowRoot?.querySelector('button');
653
- if (button) {
654
- button.blur();
655
- }
656
- }
657
-
658
643
  render() {
659
644
  const isDisabled = this.disabled || this.loading;
660
645
 
@@ -9,12 +9,26 @@ import {
9
9
  } from '../core/Drawer';
10
10
 
11
11
  /**
12
- * React-specific props for Drawer
12
+ * React-specific props for Drawer.
13
+ *
14
+ * Includes onOpenChange for controlled-component support. This is necessary
15
+ * because the underlying Lit web component manages its own open state internally
16
+ * (e.g. it sets this.open = false on Escape or backdrop click). @lit/react's
17
+ * createComponent only bridges DOM events -> React props, so without explicitly
18
+ * calling onOpenChange(false) on close/cancel, React's state never learns the
19
+ * drawer closed. The stale open={true} is then re-applied on the next render,
20
+ * causing previously dismissed drawers to reappear when other drawers are opened.
13
21
  */
14
22
  export interface ReactDrawerProps extends DrawerProps {
15
23
  children?: React.ReactNode;
16
24
  className?: string;
17
25
  id?: string;
26
+ /**
27
+ * Called with the new open state whenever the drawer opens or closes.
28
+ * Wire this to your React state setter (e.g. onOpenChange={setIsOpen}) so
29
+ * React stays in sync when the drawer closes itself internally.
30
+ */
31
+ onOpenChange?: (open: boolean) => void;
18
32
  }
19
33
 
20
34
  /**
@@ -31,8 +45,9 @@ export interface DrawerFooterProps {
31
45
  children?: React.ReactNode;
32
46
  }
33
47
 
34
- // Create Drawer component with @lit/react
35
- export const ReactDrawer = createComponent({
48
+ // Raw @lit/react bridge — maps Lit custom events to React prop callbacks.
49
+ // Does NOT handle onOpenChange; that requires the wrapper below.
50
+ const _ReactDrawerBase = createComponent({
36
51
  tagName: 'ag-drawer',
37
52
  elementClass: AgnosticDrawer,
38
53
  react: React,
@@ -43,6 +58,48 @@ export const ReactDrawer = createComponent({
43
58
  },
44
59
  });
45
60
 
61
+ /**
62
+ * ReactDrawer wraps _ReactDrawerBase to add onOpenChange support.
63
+ *
64
+ * The Lit element fires "drawer-close" when the close button is clicked and
65
+ * "drawer-cancel" when the user presses Escape or clicks the backdrop. Both
66
+ * mean the drawer is now closed. We intercept those two events and call
67
+ * onOpenChange(false) so React state reflects the new closed state immediately,
68
+ * preventing the stale open={true} from being pushed back into the element on
69
+ * the next render.
70
+ */
71
+ export const ReactDrawer = React.forwardRef<AgnosticDrawer, ReactDrawerProps>(
72
+ ({ onOpenChange, onDrawerOpen, onDrawerClose, onDrawerCancel, ...props }, ref) => {
73
+ const handleDrawerOpen = (event: DrawerOpenEvent) => {
74
+ onDrawerOpen?.(event);
75
+ onOpenChange?.(true);
76
+ };
77
+
78
+ // Both close and cancel mean the drawer is no longer open — notify React.
79
+ const handleDrawerClose = (event: DrawerCloseEvent) => {
80
+ onDrawerClose?.(event);
81
+ onOpenChange?.(false);
82
+ };
83
+
84
+ const handleDrawerCancel = (event: DrawerCancelEvent) => {
85
+ onDrawerCancel?.(event);
86
+ onOpenChange?.(false);
87
+ };
88
+
89
+ return (
90
+ <_ReactDrawerBase
91
+ ref={ref}
92
+ onDrawerOpen={handleDrawerOpen}
93
+ onDrawerClose={handleDrawerClose}
94
+ onDrawerCancel={handleDrawerCancel}
95
+ {...props}
96
+ />
97
+ );
98
+ }
99
+ );
100
+
101
+ ReactDrawer.displayName = 'ReactDrawer';
102
+
46
103
  // Helper components for slots (simple React components)
47
104
  export const DrawerHeader: React.FC<DrawerHeaderProps> = ({ children }) => {
48
105
  return <div slot="header">{children}</div>;
@@ -1,6 +1,6 @@
1
1
  import { hasSlotContent } from '../../../utils/slot';
2
2
  import { LitElement, html, css } from 'lit';
3
- import { property } from 'lit/decorators.js';
3
+ import { property, state } from 'lit/decorators.js';
4
4
 
5
5
  export type EmptyStateProps = {
6
6
  title?: string;
@@ -30,10 +30,10 @@ export class AgEmptyState extends LitElement implements EmptyStateProps {
30
30
  @property({ type: Boolean })
31
31
  declare rounded: boolean;
32
32
 
33
- @property({ type: Boolean, state: true })
33
+ @state()
34
34
  private _hasIconSlot = false;
35
35
 
36
- @property({ type: Boolean, state: true })
36
+ @state()
37
37
  private _hasActionsSlot = false;
38
38
 
39
39
  constructor() {
@@ -55,8 +55,6 @@ export class AgEmptyState extends LitElement implements EmptyStateProps {
55
55
  } else if (slotName === 'actions') {
56
56
  this._hasActionsSlot = hasSlotContent(slot);
57
57
  }
58
-
59
- this.requestUpdate();
60
58
  }
61
59
 
62
60
  override firstUpdated() {
@@ -70,6 +70,11 @@ export interface InputProps {
70
70
  }
71
71
 
72
72
  export class AgInput extends FaceMixin(LitElement) implements InputProps {
73
+ static shadowRootOptions = {
74
+ ...LitElement.shadowRootOptions,
75
+ delegatesFocus: true,
76
+ };
77
+
73
78
  static styles = [
74
79
  formControlStyles,
75
80
  css`
@@ -462,20 +467,6 @@ export class AgInput extends FaceMixin(LitElement) implements InputProps {
462
467
  }
463
468
  }
464
469
 
465
- /**
466
- * Focus the input element
467
- */
468
- focus(): void {
469
- this._inputElement?.focus();
470
- }
471
-
472
- /**
473
- * Blur the input element
474
- */
475
- blur(): void {
476
- this._inputElement?.blur();
477
- }
478
-
479
470
  /**
480
471
  * Select the text in the input
481
472
  */
@@ -49,6 +49,11 @@ export interface SelectProps {
49
49
  * @fires change - Emitted when selection changes
50
50
  */
51
51
  export class Select extends FaceMixin(LitElement) implements SelectProps {
52
+ static shadowRootOptions = {
53
+ ...LitElement.shadowRootOptions,
54
+ delegatesFocus: true,
55
+ };
56
+
52
57
  @property({ type: String, reflect: true })
53
58
  public size: SelectSize = '';
54
59
 
package/src/utils/slot.ts CHANGED
@@ -13,7 +13,7 @@ export function hasSlotContent(slot: HTMLSlotElement | null): boolean {
13
13
  if (!slot) {
14
14
  return false;
15
15
  }
16
- const assignedNodes = slot.assignedNodes({ flatten: true });
16
+ const assignedNodes = slot.assignedNodes();
17
17
 
18
18
  // Helper to check if an element has meaningful content
19
19
  const hasElementContent = (element: Element): boolean => {