@bfrs/agentic-components 0.6.0 → 0.6.1
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.
- package/dist/custom-elements.js +41 -23
- package/dist/custom-elements.js.map +1 -1
- package/package.json +1 -1
package/dist/custom-elements.js
CHANGED
|
@@ -13549,7 +13549,7 @@ var _k = "MenuArrow", o2 = i.forwardRef(
|
|
|
13549
13549
|
}
|
|
13550
13550
|
);
|
|
13551
13551
|
o2.displayName = _k;
|
|
13552
|
-
var zk = "MenuSub", [
|
|
13552
|
+
var zk = "MenuSub", [U9, i2] = Mn(zk), go = "MenuSubTrigger", l2 = i.forwardRef(
|
|
13553
13553
|
(t, n) => {
|
|
13554
13554
|
const s = Vn(go, t.__scopeMenu), a = Lo(go, t.__scopeMenu), c = i2(go, t.__scopeMenu), f = cu(go, t.__scopeMenu), u = i.useRef(null), { pointerGraceTimerRef: p, onPointerGraceIntentChange: m } = f, x = { __scopeMenu: t.__scopeMenu }, g = i.useCallback(() => {
|
|
13555
13555
|
u.current && window.clearTimeout(u.current), u.current = null;
|
|
@@ -15235,7 +15235,7 @@ ug.displayName = fg;
|
|
|
15235
15235
|
function Vu(t) {
|
|
15236
15236
|
return t ? "open" : "closed";
|
|
15237
15237
|
}
|
|
15238
|
-
var bg = "DialogTitleWarning", [
|
|
15238
|
+
var bg = "DialogTitleWarning", [G9, pg] = S3(bg, {
|
|
15239
15239
|
contentName: Cn,
|
|
15240
15240
|
titleName: Mu,
|
|
15241
15241
|
docsSlug: "dialog"
|
|
@@ -21216,7 +21216,14 @@ function Mv({ toasts: t, onDismiss: n, placement: s = "bottom-center", className
|
|
|
21216
21216
|
return typeof document > "u" ? c : va.createPortal(c, document.body);
|
|
21217
21217
|
}
|
|
21218
21218
|
const Vv = /^[a-z][a-z0-9._-]*-[a-z0-9._-]+$/, Pv = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
21219
|
-
function z9({
|
|
21219
|
+
function z9({ element: t }) {
|
|
21220
|
+
const n = i.useRef(null);
|
|
21221
|
+
return i.useLayoutEffect(() => {
|
|
21222
|
+
const s = n.current;
|
|
21223
|
+
s && t && t.parentNode !== s && s.appendChild(t);
|
|
21224
|
+
}, [t]), /* @__PURE__ */ l.jsx("span", { ref: n, style: { display: "contents" } });
|
|
21225
|
+
}
|
|
21226
|
+
function L9({ tagName: t, properties: n, attributes: s, text: a, events: c, onEvent: f }) {
|
|
21220
21227
|
const u = i.useRef(null), p = i.useRef(null), m = i.useRef([]), x = i.useRef([]);
|
|
21221
21228
|
return i.useEffect(() => {
|
|
21222
21229
|
const g = u.current;
|
|
@@ -21272,7 +21279,7 @@ function z9({ tagName: t, properties: n, attributes: s, text: a, events: c, onEv
|
|
|
21272
21279
|
};
|
|
21273
21280
|
}, [c, f, t]), /* @__PURE__ */ l.jsx("span", { ref: u, className: "bfrs-inline-flex bfrs-min-w-0", onClick: (g) => g.stopPropagation() });
|
|
21274
21281
|
}
|
|
21275
|
-
const
|
|
21282
|
+
const I9 = {
|
|
21276
21283
|
add: wo,
|
|
21277
21284
|
check: tr,
|
|
21278
21285
|
close: Bt,
|
|
@@ -21289,7 +21296,7 @@ const L9 = {
|
|
|
21289
21296
|
}, ct = (t, n = 14) => {
|
|
21290
21297
|
if (!t)
|
|
21291
21298
|
return;
|
|
21292
|
-
const s =
|
|
21299
|
+
const s = I9[t];
|
|
21293
21300
|
return s ? /* @__PURE__ */ l.jsx(s, { size: n, weight: "bold" }) : void 0;
|
|
21294
21301
|
}, Rv = (t, n, s = {}) => /* @__PURE__ */ l.jsx(
|
|
21295
21302
|
Xe,
|
|
@@ -21301,12 +21308,12 @@ const L9 = {
|
|
|
21301
21308
|
variant: s.variant ?? "secondary",
|
|
21302
21309
|
children: t
|
|
21303
21310
|
}
|
|
21304
|
-
),
|
|
21311
|
+
), F9 = "bfrs", ee = ["class", "class-name", "color-scheme", "html", "label", "props"], nc = (t, n = !1) => t === null ? n : t === "" || t === "true" || t === "1", ac = (t) => {
|
|
21305
21312
|
if (t === null || t.trim() === "")
|
|
21306
21313
|
return;
|
|
21307
21314
|
const n = Number(t);
|
|
21308
21315
|
return Number.isFinite(n) ? n : void 0;
|
|
21309
|
-
},
|
|
21316
|
+
}, O9 = (t, n) => {
|
|
21310
21317
|
if (!(!t && !n))
|
|
21311
21318
|
return {
|
|
21312
21319
|
width: t,
|
|
@@ -21366,7 +21373,7 @@ const L9 = {
|
|
|
21366
21373
|
return;
|
|
21367
21374
|
const n = jo(t, void 0);
|
|
21368
21375
|
return bl(n) ?? t;
|
|
21369
|
-
}, Ym = (t) => t == null ? void 0 : t.toISOString().slice(0, 10),
|
|
21376
|
+
}, Ym = (t) => t == null ? void 0 : t.toISOString().slice(0, 10), H9 = (t, n, s) => s === void 0 ? i.createElement(t, n) : i.createElement(t, n, s);
|
|
21370
21377
|
class ue extends HTMLElement {
|
|
21371
21378
|
constructor() {
|
|
21372
21379
|
super(...arguments);
|
|
@@ -21399,13 +21406,14 @@ class ue extends HTMLElement {
|
|
|
21399
21406
|
return "inline-block";
|
|
21400
21407
|
}
|
|
21401
21408
|
update() {
|
|
21409
|
+
var a;
|
|
21402
21410
|
if (!this.isConnected)
|
|
21403
21411
|
return;
|
|
21404
21412
|
if (!this.hasCapturedInitialContent) {
|
|
21405
21413
|
this.scheduleInitialUpdate();
|
|
21406
21414
|
return;
|
|
21407
21415
|
}
|
|
21408
|
-
if (this.ensureMountNode(), !this.mountNode)
|
|
21416
|
+
if (this.mountNode && this.mountNode.parentNode !== this && (this.initialText = ((a = this.textContent) == null ? void 0 : a.trim()) ?? "", this.initialHtml = this.innerHTML.trim()), this.ensureMountNode(), !this.mountNode)
|
|
21409
21417
|
return;
|
|
21410
21418
|
this.root ?? (this.root = A6.createRoot(this.mountNode));
|
|
21411
21419
|
const s = this.colorSchemeAttribute();
|
|
@@ -21432,11 +21440,16 @@ class ue extends HTMLElement {
|
|
|
21432
21440
|
hasSlot(s) {
|
|
21433
21441
|
return s ? Array.from(this.querySelectorAll("[slot]")).some((a) => a.getAttribute("slot") === s) : Array.from(this.childNodes).some((a) => {
|
|
21434
21442
|
var c;
|
|
21435
|
-
return a.nodeType === globalThis.Node.TEXT_NODE ? !!((c = a.textContent) != null && c.trim()) : a instanceof globalThis.Element && !a.hasAttribute("slot");
|
|
21443
|
+
return a === this.mountNode ? !1 : a.nodeType === globalThis.Node.TEXT_NODE ? !!((c = a.textContent) != null && c.trim()) : a instanceof globalThis.Element && !a.hasAttribute("slot");
|
|
21436
21444
|
});
|
|
21437
21445
|
}
|
|
21438
21446
|
slotNode(s, a) {
|
|
21439
|
-
|
|
21447
|
+
if (!this.hasSlot(s))
|
|
21448
|
+
return a;
|
|
21449
|
+
if (!s)
|
|
21450
|
+
return /* @__PURE__ */ l.jsx("slot", {});
|
|
21451
|
+
const c = this.querySelector(`[slot="${s}"]`);
|
|
21452
|
+
return c ? i.createElement(z9, { element: c }) : a;
|
|
21440
21453
|
}
|
|
21441
21454
|
defaultContentNode(s = "") {
|
|
21442
21455
|
return this.hasSlot() ? this.slotNode() : this.htmlContent(s);
|
|
@@ -21495,7 +21508,12 @@ class ue extends HTMLElement {
|
|
|
21495
21508
|
}
|
|
21496
21509
|
ensureMountNode() {
|
|
21497
21510
|
var s;
|
|
21498
|
-
((s = this.mountNode) == null ? void 0 : s.parentNode) !== this
|
|
21511
|
+
if (((s = this.mountNode) == null ? void 0 : s.parentNode) !== this) {
|
|
21512
|
+
S2(), this.mountNode = document.createElement("span"), this.mountNode.className = "bfrs", this.mountNode.setAttribute("data-bfrs-mount", ""), this.mountNode.setAttribute("data-bfrs-color-scheme", this.colorSchemeAttribute()), this.mountNode.style.cssText = "display: contents;";
|
|
21513
|
+
for (const a of Array.from(this.childNodes))
|
|
21514
|
+
a instanceof globalThis.Element && a.hasAttribute("slot") || a.remove();
|
|
21515
|
+
this.prepend(this.mountNode);
|
|
21516
|
+
}
|
|
21499
21517
|
}
|
|
21500
21518
|
scheduleInitialUpdate() {
|
|
21501
21519
|
this.initialRenderQueued || (this.initialRenderQueued = !0, globalThis.queueMicrotask(() => {
|
|
@@ -21517,7 +21535,7 @@ class sr extends ue {
|
|
|
21517
21535
|
return this.defaultContentNode();
|
|
21518
21536
|
}
|
|
21519
21537
|
renderElement() {
|
|
21520
|
-
return
|
|
21538
|
+
return H9(this.component(), { ...this.mergedProps(), ...this.attributeProps() }, this.contentNode());
|
|
21521
21539
|
}
|
|
21522
21540
|
}
|
|
21523
21541
|
class Tv extends ue {
|
|
@@ -21863,7 +21881,7 @@ class Bv extends ue {
|
|
|
21863
21881
|
...this.mergedProps(),
|
|
21864
21882
|
animated: this.booleanAttribute("animated", !0),
|
|
21865
21883
|
className: this.classNameAttribute(),
|
|
21866
|
-
style:
|
|
21884
|
+
style: O9(this.textAttribute("width"), this.textAttribute("height")),
|
|
21867
21885
|
variant: this.textAttribute("variant", "block")
|
|
21868
21886
|
}
|
|
21869
21887
|
);
|
|
@@ -21874,7 +21892,7 @@ const xa = (t) => /* @__PURE__ */ l.jsx("span", { style: { display: "contents" }
|
|
|
21874
21892
|
preset: typeof t.preset == "string" ? t.preset : void 0,
|
|
21875
21893
|
from: da(t.from),
|
|
21876
21894
|
to: da(t.to)
|
|
21877
|
-
} : {},
|
|
21895
|
+
} : {}, Z9 = (t) => ({
|
|
21878
21896
|
preset: t.preset,
|
|
21879
21897
|
from: Ym(t.from),
|
|
21880
21898
|
to: Ym(t.to)
|
|
@@ -23725,7 +23743,7 @@ class Gy extends ue {
|
|
|
23725
23743
|
w[k] = tt(c, y);
|
|
23726
23744
|
a.rowProperty && !Pv.has(a.rowProperty) && (v[a.rowProperty] = c);
|
|
23727
23745
|
const N = this.cellConfigValue(c, p, a.text, a.textKey), C = Vv.test(g) ? /* @__PURE__ */ l.jsx(
|
|
23728
|
-
|
|
23746
|
+
L9,
|
|
23729
23747
|
{
|
|
23730
23748
|
tagName: g,
|
|
23731
23749
|
properties: v,
|
|
@@ -24358,7 +24376,7 @@ class d8 extends Rn {
|
|
|
24358
24376
|
maxRangeDays: this.numberValue("max-range-days", "maxRangeDays"),
|
|
24359
24377
|
minDate: da(this.textAttribute("min-date")) ?? this.propValue("minDate"),
|
|
24360
24378
|
months: this.numberValue("months", "months") ?? 2,
|
|
24361
|
-
onChange: (f) => this.emit("date-range-change",
|
|
24379
|
+
onChange: (f) => this.emit("date-range-change", Z9(f)),
|
|
24362
24380
|
onOpenChange: this.handleOpenChange,
|
|
24363
24381
|
open: this.open,
|
|
24364
24382
|
placeholder: this.slotNode("placeholder", this.textAttribute("placeholder", "Select date range")),
|
|
@@ -24889,7 +24907,7 @@ class S8 extends ue {
|
|
|
24889
24907
|
}
|
|
24890
24908
|
}
|
|
24891
24909
|
G(S8, "tagName", "side-nav");
|
|
24892
|
-
const
|
|
24910
|
+
const $9 = [
|
|
24893
24911
|
Wv,
|
|
24894
24912
|
Uv,
|
|
24895
24913
|
Gv,
|
|
@@ -24996,16 +25014,16 @@ const Z9 = [
|
|
|
24996
25014
|
E8,
|
|
24997
25015
|
S8
|
|
24998
25016
|
];
|
|
24999
|
-
function
|
|
25017
|
+
function B9(t = {}) {
|
|
25000
25018
|
if (typeof globalThis.customElements > "u")
|
|
25001
25019
|
return;
|
|
25002
|
-
const n = t.prefix ??
|
|
25003
|
-
|
|
25020
|
+
const n = t.prefix ?? F9;
|
|
25021
|
+
$9.forEach((s) => {
|
|
25004
25022
|
const a = `${n}-${s.tagName}`;
|
|
25005
25023
|
globalThis.customElements.get(a) || globalThis.customElements.define(a, s);
|
|
25006
25024
|
});
|
|
25007
25025
|
}
|
|
25008
|
-
|
|
25026
|
+
B9();
|
|
25009
25027
|
export {
|
|
25010
25028
|
x8 as BfrsAccordionElement,
|
|
25011
25029
|
Ry as BfrsActionMenuElement,
|
|
@@ -25112,6 +25130,6 @@ export {
|
|
|
25112
25130
|
Dy as BfrsTooltipElement,
|
|
25113
25131
|
e8 as BfrsTrElement,
|
|
25114
25132
|
E8 as BfrsWorkspaceHeaderElement,
|
|
25115
|
-
|
|
25133
|
+
B9 as defineBfrsAgenticElements
|
|
25116
25134
|
};
|
|
25117
25135
|
//# sourceMappingURL=custom-elements.js.map
|