@olwiba/ui 0.1.11 → 0.1.12

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/index.d.ts CHANGED
@@ -1064,6 +1064,10 @@ interface FlowBracketProps {
1064
1064
  * Defaults to 8 (near the top of the first child).
1065
1065
  */
1066
1066
  anchorTop?: number;
1067
+ /** Per-side override for the top anchor of the left bracket. Falls back to anchorTop. */
1068
+ anchorTopLeft?: number;
1069
+ /** Per-side override for the top anchor of the right bracket. Falls back to anchorTop. */
1070
+ anchorTopRight?: number;
1067
1071
  /**
1068
1072
  * Vertical anchor for the bottom connection as a percentage of the wrapper height (0–100).
1069
1073
  * Defaults to 92 (near the bottom of the last child).
@@ -1110,7 +1114,7 @@ interface FlowBracketProps {
1110
1114
  * they render at a consistent pixel size regardless of the bracket SVG's aspect
1111
1115
  * ratio (which spans the full section height with preserveAspectRatio="none").
1112
1116
  */
1113
- declare function FlowBracket({ anchorTop, anchorBottom, extent, arrow, color, colorLeft, colorRight, left, right, animate, animateDur, reverseRight, style, className, children, }: FlowBracketProps): react_jsx_runtime.JSX.Element;
1117
+ declare function FlowBracket({ anchorTop, anchorTopLeft, anchorTopRight, anchorBottom, extent, arrow, color, colorLeft, colorRight, left, right, animate, animateDur, reverseRight, style, className, children, }: FlowBracketProps): react_jsx_runtime.JSX.Element;
1114
1118
 
1115
1119
  interface FullPageSpinnerProps {
1116
1120
  message?: string;
package/dist/index.js CHANGED
@@ -498,7 +498,8 @@ function DefaultForm({
498
498
  const hasPrefill = !!(defaultEmail || defaultPassword);
499
499
  const prefillStyle = (active) => active ? { animation: "auth-prefill 1.6s ease-out 0.35s 1 both" } : void 0;
500
500
  return /* @__PURE__ */ jsxs(Card, { className: "w-full", children: [
501
- hasPrefill && /* @__PURE__ */ jsx("style", { children: `@keyframes auth-prefill{0%{box-shadow:0 0 0 0 hsl(var(--primary)/0)}40%{box-shadow:0 0 0 3px hsl(var(--primary)/0.4)}100%{box-shadow:0 0 0 0 hsl(var(--primary)/0)}}` }),
501
+ hasPrefill && // Theme tokens hold full color values (oklch), so opacity must come from color-mix, not hsl(var()/a)
502
+ /* @__PURE__ */ jsx("style", { children: `@keyframes auth-prefill{0%{box-shadow:0 0 0 0 transparent}40%{box-shadow:0 0 0 3px color-mix(in oklab,var(--primary) 45%,transparent),0 0 16px 2px color-mix(in oklab,var(--primary) 35%,transparent)}100%{box-shadow:0 0 0 0 transparent}}` }),
502
503
  /* @__PURE__ */ jsxs(CardHeader, { children: [
503
504
  brand && /* @__PURE__ */ jsx("div", { className: "mb-2", children: brand }),
504
505
  /* @__PURE__ */ jsx(CardTitle, { children: isSignUp ? "Create an account" : "Sign in" }),
@@ -2352,27 +2353,19 @@ function Navbar({
2352
2353
  })
2353
2354
  ] }),
2354
2355
  /* @__PURE__ */ jsxs(Sheet, { open, onOpenChange: setOpen, children: [
2355
- /* @__PURE__ */ jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button$1, { variant: "ghost", size: "icon", className: "justify-self-end md:hidden", children: [
2356
+ /* @__PURE__ */ jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button$1, { variant: "ghost", size: "icon", className: "col-start-3 justify-self-end md:hidden", children: [
2356
2357
  /* @__PURE__ */ jsx(Menu, { className: "size-5" }),
2357
2358
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Open menu" })
2358
2359
  ] }) }),
2359
- /* @__PURE__ */ jsxs(SheetContent, { side: "right", className: "w-72", children: [
2360
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between pb-4", children: [
2361
- /* @__PURE__ */ jsx("span", { onClick: () => setOpen(false), className: "cursor-pointer", children: renderLink({
2362
- href: brandHref,
2363
- children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2 font-semibold", children: [
2364
- brand.logo,
2365
- /* @__PURE__ */ jsx("span", { children: brand.name })
2366
- ] })
2367
- }) }),
2368
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
2369
- controls?.map((control, i) => /* @__PURE__ */ jsx(React29.Fragment, { children: control }, i)),
2370
- /* @__PURE__ */ jsxs(Button$1, { variant: "ghost", size: "icon", onClick: () => setOpen(false), children: [
2371
- /* @__PURE__ */ jsx(X, { className: "size-4" }),
2372
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close menu" })
2373
- ] })
2360
+ /* @__PURE__ */ jsxs(SheetContent, { side: "left", className: "w-72", children: [
2361
+ /* @__PURE__ */ jsx("div", { className: "flex items-center pb-4", children: /* @__PURE__ */ jsx("span", { onClick: () => setOpen(false), className: "cursor-pointer", children: renderLink({
2362
+ href: brandHref,
2363
+ children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2 font-semibold", children: [
2364
+ brand.logo,
2365
+ /* @__PURE__ */ jsx("span", { children: brand.name })
2374
2366
  ] })
2375
- ] }),
2367
+ }) }) }),
2368
+ controls?.length ? /* @__PURE__ */ jsx("div", { className: "mb-4 flex w-full items-center justify-between gap-1", children: controls.map((control, i) => /* @__PURE__ */ jsx(React29.Fragment, { children: control }, i)) }) : null,
2376
2369
  /* @__PURE__ */ jsx(Separator, {}),
2377
2370
  /* @__PURE__ */ jsx("nav", { className: "mt-4 flex flex-col gap-1", children: navLinks.map((link) => /* @__PURE__ */ jsx("span", { onClick: () => setOpen(false), children: renderLink({
2378
2371
  href: link.href,
@@ -3100,6 +3093,8 @@ function FlowConnector({
3100
3093
  }
3101
3094
  function FlowBracket({
3102
3095
  anchorTop = 8,
3096
+ anchorTopLeft,
3097
+ anchorTopRight,
3103
3098
  anchorBottom = 92,
3104
3099
  extent = 22,
3105
3100
  arrow = true,
@@ -3119,30 +3114,32 @@ function FlowBracket({
3119
3114
  const R = 1e3 + extent;
3120
3115
  const cl = colorLeft ?? color;
3121
3116
  const cr = colorRight ?? color;
3122
- const leftD = `M 0,${anchorBottom} L ${L},${anchorBottom} L ${L},${anchorTop} L 0,${anchorTop}`;
3123
- const rightD = reverseRight ? `M 1000,${anchorTop} L ${R},${anchorTop} L ${R},${anchorBottom} L 1000,${anchorBottom}` : `M 1000,${anchorBottom} L ${R},${anchorBottom} L ${R},${anchorTop} L 1000,${anchorTop}`;
3117
+ const aTL = anchorTopLeft ?? anchorTop;
3118
+ const aTR = anchorTopRight ?? anchorTop;
3119
+ const leftD = `M 0,${anchorBottom} L ${L},${anchorBottom} L ${L},${aTL} L 0,${aTL}`;
3120
+ const rightD = reverseRight ? `M 1000,${aTR} L ${R},${aTR} L ${R},${anchorBottom} L 1000,${anchorBottom}` : `M 1000,${anchorBottom} L ${R},${anchorBottom} L ${R},${aTR} L 1000,${aTR}`;
3124
3121
  const ep = `${(extent / 10).toFixed(1)}%`;
3125
3122
  const dotKeyframes = animate ? `
3126
3123
  @keyframes fb-dl{
3127
3124
  0%{top:${anchorBottom}%;left:0;opacity:0}
3128
3125
  6%{opacity:1}
3129
3126
  20%{top:${anchorBottom}%;left:-${ep}}
3130
- 80%{top:${anchorTop}%;left:-${ep};opacity:1}
3131
- 94%{top:${anchorTop}%;left:0;opacity:0}
3132
- 100%{top:${anchorTop}%;left:0;opacity:0}
3127
+ 80%{top:${aTL}%;left:-${ep};opacity:1}
3128
+ 94%{top:${aTL}%;left:0;opacity:0}
3129
+ 100%{top:${aTL}%;left:0;opacity:0}
3133
3130
  }
3134
3131
  @keyframes fb-dr{
3135
3132
  0%{top:${anchorBottom}%;left:100%;opacity:0}
3136
3133
  6%{opacity:1}
3137
3134
  20%{top:${anchorBottom}%;left:calc(100% + ${ep})}
3138
- 80%{top:${anchorTop}%;left:calc(100% + ${ep});opacity:1}
3139
- 94%{top:${anchorTop}%;left:100%;opacity:0}
3140
- 100%{top:${anchorTop}%;left:100%;opacity:0}
3135
+ 80%{top:${aTR}%;left:calc(100% + ${ep});opacity:1}
3136
+ 94%{top:${aTR}%;left:100%;opacity:0}
3137
+ 100%{top:${aTR}%;left:100%;opacity:0}
3141
3138
  }
3142
3139
  @keyframes fb-drr{
3143
- 0%{top:${anchorTop}%;left:100%;opacity:0}
3140
+ 0%{top:${aTR}%;left:100%;opacity:0}
3144
3141
  6%{opacity:1}
3145
- 20%{top:${anchorTop}%;left:calc(100% + ${ep})}
3142
+ 20%{top:${aTR}%;left:calc(100% + ${ep})}
3146
3143
  80%{top:${anchorBottom}%;left:calc(100% + ${ep});opacity:1}
3147
3144
  94%{top:${anchorBottom}%;left:100%;opacity:0}
3148
3145
  100%{top:${anchorBottom}%;left:100%;opacity:0}
@@ -3211,7 +3208,7 @@ function FlowBracket({
3211
3208
  {
3212
3209
  "aria-hidden": true,
3213
3210
  viewBox: "0 0 10 8",
3214
- style: { ...arrowBase, top: `${anchorTop}%`, left: 0 },
3211
+ style: { ...arrowBase, top: `${aTL}%`, left: 0 },
3215
3212
  children: /* @__PURE__ */ jsx("polyline", { points: "1,1 8,4 1,7", style: { stroke: cl }, ...chevronProps })
3216
3213
  }
3217
3214
  ),
@@ -3222,7 +3219,7 @@ function FlowBracket({
3222
3219
  viewBox: "0 0 10 8",
3223
3220
  style: {
3224
3221
  ...arrowBase,
3225
- top: reverseRight ? `${anchorBottom}%` : `${anchorTop}%`,
3222
+ top: reverseRight ? `${anchorBottom}%` : `${aTR}%`,
3226
3223
  left: "100%"
3227
3224
  },
3228
3225
  children: /* @__PURE__ */ jsx("polyline", { points: "9,1 2,4 9,7", style: { stroke: cr }, ...chevronProps })
@@ -3460,7 +3457,7 @@ function BrandColorSwitchMinimal() {
3460
3457
  /* @__PURE__ */ jsx(
3461
3458
  "span",
3462
3459
  {
3463
- className: "absolute -bottom-0.5 -right-0.5 size-1.5 rounded-full ring-1 ring-background",
3460
+ className: `absolute -bottom-0.5 -right-0.5 size-1.5 rounded-full ring-1 ring-background${active === "zinc" ? " dark:ring-white/25" : ""}`,
3464
3461
  style: { background: activeHex }
3465
3462
  }
3466
3463
  )
@@ -3480,7 +3477,7 @@ function BrandColorSwitchMinimal() {
3480
3477
  /* @__PURE__ */ jsx(
3481
3478
  "span",
3482
3479
  {
3483
- className: "flex size-7 items-center justify-center rounded-full ring-offset-background transition-all group-hover:scale-110",
3480
+ className: `flex size-7 items-center justify-center rounded-full ring-offset-background transition-all group-hover:scale-110${color.name === "zinc" ? " border border-transparent dark:border-white/25" : ""}`,
3484
3481
  style: {
3485
3482
  background: PREVIEW_HEX[color.name],
3486
3483
  boxShadow: active === color.name ? `0 0 0 2px var(--background), 0 0 0 4px ${PREVIEW_HEX[color.name]}` : void 0