@theroutingcompany/components 0.0.152 → 0.0.153-alpha.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.
@@ -15456,7 +15456,8 @@ const Ed = {
15456
15456
  color: ${f.color_deprecated_fill_inverse_hover};
15457
15457
  }
15458
15458
 
15459
- &[data-state~='pressed'] {
15459
+ &[data-state~='pressed'],
15460
+ &[data-active='true'] {
15460
15461
  background: ${f.color_deprecated_fill_primary_pressed};
15461
15462
  }
15462
15463
 
@@ -15534,25 +15535,29 @@ const Ed = {
15534
15535
  autoFocus: c,
15535
15536
  children: d,
15536
15537
  style: p = {},
15537
- ...h
15538
- } = e, v = Xr(), g = u ?? v, { buttonProps: b, isPressed: y } = Qn(
15538
+ as: h,
15539
+ active: v,
15540
+ ...g
15541
+ } = e, b = Xr(), y = u ?? b, { buttonProps: D, isPressed: E } = Qn(
15539
15542
  {
15540
15543
  onPress: s ?? l,
15541
- isDisabled: g,
15544
+ isDisabled: y,
15542
15545
  autoFocus: c
15543
15546
  },
15544
15547
  r
15545
- ), { isFocusVisible: D, focusProps: E } = ga({ autoFocus: c }), x = Xb({ isFocusVisible: D, isPressed: y }), P = xR[i], w = R1[a], S = Ed[o], k = Re(E, h, b, {
15546
- "data-state": x
15548
+ ), { isFocusVisible: x, focusProps: P } = ga({ autoFocus: c }), w = Xb({ isFocusVisible: x, isPressed: E }), S = xR[i], k = R1[a], R = Ed[o], T = Re(P, g, D, {
15549
+ "data-state": w,
15550
+ "data-active": v ? "true" : "false"
15547
15551
  });
15548
15552
  return /* @__PURE__ */ m(
15549
- P,
15553
+ S,
15550
15554
  {
15551
15555
  ref: r,
15552
- ...k,
15556
+ ...T,
15557
+ as: h,
15553
15558
  style: {
15554
- "--icon-button-size": S,
15555
- "--icon-button-border-radius": w,
15559
+ "--icon-button-size": R,
15560
+ "--icon-button-border-radius": k,
15556
15561
  ...p
15557
15562
  },
15558
15563
  children: /* @__PURE__ */ m(dl, { label: n, children: d })
@@ -18616,7 +18621,7 @@ const II = mt`
18616
18621
  line-height: ${f.line_height_deprecated_133};
18617
18622
  font-family: ${f.font_family_pingo};
18618
18623
  max-width: ${f.sizing_1000};
18619
- z-index: 30;
18624
+ z-index: 2100;
18620
18625
  animation-duration: 400ms;
18621
18626
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
18622
18627
 
@@ -30328,25 +30333,35 @@ const f0 = H.createContext({
30328
30333
  position: relative;
30329
30334
  width: inherit;
30330
30335
  `, ci = Me((e, t) => {
30331
- const [r, n] = re(!1), [o, i] = re(null), a = yn(t);
30336
+ const [r, n] = re(!1), [o, i] = re(null), a = yn(t), u = e.isOpen !== void 0, l = u ? e.isOpen ?? !1 : r, s = ne(
30337
+ (c) => {
30338
+ var d;
30339
+ if (u) {
30340
+ const p = typeof c == "function" ? c(e.isOpen ?? !1) : c;
30341
+ (d = e.onOpenChange) == null || d.call(e, p);
30342
+ } else
30343
+ n(c);
30344
+ },
30345
+ [u, e]
30346
+ );
30332
30347
  return ue(() => {
30333
- const u = document.getElementById(d0);
30334
- function l(s) {
30335
- const c = s.target;
30336
- a.current && !a.current.contains(c) && !(u != null && u.contains(c)) && n(!1);
30348
+ const c = document.getElementById(d0);
30349
+ function d(p) {
30350
+ const h = p.target;
30351
+ a.current && !a.current.contains(h) && !(c != null && c.contains(h)) && s(!1);
30337
30352
  }
30338
- return document.addEventListener("mousedown", l), () => {
30339
- document.removeEventListener("mousedown", l);
30353
+ return document.addEventListener("mousedown", d), () => {
30354
+ document.removeEventListener("mousedown", d);
30340
30355
  };
30341
- }, [a]), /* @__PURE__ */ m(
30356
+ }, [a, s]), /* @__PURE__ */ m(
30342
30357
  f0.Provider,
30343
30358
  {
30344
30359
  value: {
30345
30360
  menuRef: a,
30346
30361
  triggerRef: o,
30347
30362
  setTriggerRef: i,
30348
- open: r,
30349
- setOpen: n,
30363
+ open: l,
30364
+ setOpen: s,
30350
30365
  direction: e.direction ?? "Down"
30351
30366
  /* Down */
30352
30367
  },