@factorialco/f0-react 12.2.0 → 12.3.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.
- package/dist/component-status.js +2 -2
- package/dist/experimental.d.ts +6 -0
- package/dist/experimental.js +11 -6
- package/package.json +1 -1
package/dist/component-status.js
CHANGED
|
@@ -4,7 +4,7 @@ import { useCallback as i, useEffect as a, useRef as o, useState as s } from "re
|
|
|
4
4
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
5
5
|
//#region \0virtual:f0-component-status-data
|
|
6
6
|
var u = {
|
|
7
|
-
generatedAt: "2026-10-
|
|
7
|
+
generatedAt: "2026-10-30T15:59:26.589Z",
|
|
8
8
|
stats: {
|
|
9
9
|
total: 312,
|
|
10
10
|
byStatus: {
|
|
@@ -3393,7 +3393,7 @@ var u = {
|
|
|
3393
3393
|
hasWhenToUse: !0,
|
|
3394
3394
|
hasWhenNotToUse: !0,
|
|
3395
3395
|
hasDoDonts: !0,
|
|
3396
|
-
exampleCount:
|
|
3396
|
+
exampleCount: 8
|
|
3397
3397
|
},
|
|
3398
3398
|
a11yTier: "enforced",
|
|
3399
3399
|
storyFile: "blocks/Navigation/Sidebar/F0PrimarySidebar/__stories__/F0PrimarySidebar.stories.tsx"
|
package/dist/experimental.d.ts
CHANGED
|
@@ -3480,6 +3480,12 @@ type F0PrimarySidebarAction = {
|
|
|
3480
3480
|
label: string;
|
|
3481
3481
|
icon: IconType;
|
|
3482
3482
|
onClick: () => void;
|
|
3483
|
+
/**
|
|
3484
|
+
* The button opens the page that is on screen, such as the settings. It is
|
|
3485
|
+
* marked like the active tab. Set `activeTab` to an id no tab has, so no tab
|
|
3486
|
+
* is marked as well.
|
|
3487
|
+
*/
|
|
3488
|
+
active?: boolean;
|
|
3483
3489
|
/** Show the unread marker over the icon. */
|
|
3484
3490
|
hasUpdates?: boolean;
|
|
3485
3491
|
/** A count shown instead of the plain marker. */
|
package/dist/experimental.js
CHANGED
|
@@ -12683,16 +12683,20 @@ var xT = (e) => e ? `f0-sidebar-tab:${e}` : null, ST = (e) => {
|
|
|
12683
12683
|
}
|
|
12684
12684
|
};
|
|
12685
12685
|
function CT(e, t, n, r) {
|
|
12686
|
-
let i = xT(e), a = Y(!1), o = t.some((e) => e.href !== void 0);
|
|
12686
|
+
let i = xT(e), a = Y(!1), o = t.some((e) => e.href !== void 0), s = t.some((e) => e.id === n);
|
|
12687
12687
|
q(function() {
|
|
12688
|
-
if (!i || a.current || (a.current = !0, o)) return;
|
|
12688
|
+
if (!i || a.current || (a.current = !0, o || !s)) return;
|
|
12689
12689
|
let e = ST(i);
|
|
12690
12690
|
e && e !== n && t.some((t) => t.id === e) && r(e);
|
|
12691
12691
|
}, [i]), q(function() {
|
|
12692
|
-
if (i) try {
|
|
12692
|
+
if (i && s) try {
|
|
12693
12693
|
localStorage.setItem(i, n);
|
|
12694
12694
|
} catch {}
|
|
12695
|
-
}, [
|
|
12695
|
+
}, [
|
|
12696
|
+
i,
|
|
12697
|
+
n,
|
|
12698
|
+
s
|
|
12699
|
+
]);
|
|
12696
12700
|
}
|
|
12697
12701
|
//#endregion
|
|
12698
12702
|
//#region src/blocks/Navigation/Sidebar/F0PrimarySidebar/hooks/usePresentItems.ts
|
|
@@ -12990,7 +12994,7 @@ var RT = 350, zT = (e = !0) => {
|
|
|
12990
12994
|
glyph: /* @__PURE__ */ Q(H, {
|
|
12991
12995
|
icon: e.icon,
|
|
12992
12996
|
size: "lg",
|
|
12993
|
-
color: "default"
|
|
12997
|
+
color: e.active ? "bold" : "default"
|
|
12994
12998
|
})
|
|
12995
12999
|
}), /* @__PURE__ */ Q(UT, {
|
|
12996
13000
|
badge: e.badge,
|
|
@@ -13000,8 +13004,9 @@ var RT = 350, zT = (e = !0) => {
|
|
|
13000
13004
|
}), s = /* @__PURE__ */ Q("button", {
|
|
13001
13005
|
type: "button",
|
|
13002
13006
|
"aria-label": r,
|
|
13007
|
+
"aria-current": e.active ? "page" : void 0,
|
|
13003
13008
|
onClick: e.options ? void 0 : e.onClick,
|
|
13004
|
-
className: G("flex size-9 cursor-pointer items-center justify-center rounded-lg
|
|
13009
|
+
className: G("flex size-9 cursor-pointer items-center justify-center rounded-lg data-[state=open]:bg-f1-background-secondary", e.active ? "bg-f1-background-secondary" : "group-hover:bg-f1-background-secondary", e.options ? Zw : Xw, !e.options && "static after:absolute after:inset-0 after:z-10 after:content-['']", ir()),
|
|
13005
13010
|
...e.options ? a : {},
|
|
13006
13011
|
children: e.options ? /* @__PURE__ */ Q(Yw, {
|
|
13007
13012
|
itemId: e.id,
|