@theroutingcompany/components 0.0.152 → 0.0.153-alpha.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.
@@ -14061,9 +14061,9 @@ const Z9 = L.span`
14061
14061
  menuItemVariant: i = "tertiary",
14062
14062
  placement: a = "end",
14063
14063
  closeOnClickOutside: u = !0,
14064
- defaultAction: l,
14065
- onDefaultAction: s,
14066
- closeOnEscape: c = !0,
14064
+ closeOnEscape: l = !0,
14065
+ defaultAction: s,
14066
+ onDefaultAction: c,
14067
14067
  optionIcon: d,
14068
14068
  ...p
14069
14069
  }, h) => {
@@ -14082,7 +14082,7 @@ const Z9 = L.span`
14082
14082
  g
14083
14083
  );
14084
14084
  sa(() => {
14085
- c && v.isOpen && v.close();
14085
+ l && v.isOpen && v.close();
14086
14086
  });
14087
14087
  const P = () => {
14088
14088
  switch (a) {
@@ -14096,22 +14096,22 @@ const Z9 = L.span`
14096
14096
  return "bottom start";
14097
14097
  }
14098
14098
  };
14099
- return l && s ? /* @__PURE__ */ ee(Ze, { children: [
14099
+ return s && c ? /* @__PURE__ */ ee(Ze, { children: [
14100
14100
  /* @__PURE__ */ ee(J9, { ref: b, $ml: p.ml, children: [
14101
14101
  /* @__PURE__ */ m(
14102
14102
  Q9,
14103
14103
  {
14104
- ref: g,
14105
14104
  type: "button",
14106
14105
  variant: n,
14107
14106
  size: o,
14108
- onClick: s,
14109
- children: l
14107
+ onClick: c,
14108
+ children: s
14110
14109
  }
14111
14110
  ),
14112
14111
  /* @__PURE__ */ m(
14113
14112
  eR,
14114
14113
  {
14114
+ ref: g,
14115
14115
  type: "button",
14116
14116
  variant: n,
14117
14117
  size: o,
@@ -14122,7 +14122,7 @@ const Z9 = L.span`
14122
14122
  }
14123
14123
  )
14124
14124
  ] }),
14125
- v.isOpen && /* @__PURE__ */ m(
14125
+ v.isOpen ? /* @__PURE__ */ m(
14126
14126
  hn,
14127
14127
  {
14128
14128
  state: v,
@@ -14147,7 +14147,7 @@ const Z9 = L.span`
14147
14147
  w
14148
14148
  )) })
14149
14149
  }
14150
- )
14150
+ ) : null
14151
14151
  ] }) : /* @__PURE__ */ ee(Ze, { children: [
14152
14152
  /* @__PURE__ */ m(
14153
14153
  qr,
@@ -14167,7 +14167,7 @@ const Z9 = L.span`
14167
14167
  ] })
14168
14168
  }
14169
14169
  ),
14170
- v.isOpen && /* @__PURE__ */ m(
14170
+ v.isOpen ? /* @__PURE__ */ m(
14171
14171
  hn,
14172
14172
  {
14173
14173
  state: v,
@@ -14192,7 +14192,7 @@ const Z9 = L.span`
14192
14192
  w
14193
14193
  )) })
14194
14194
  }
14195
- )
14195
+ ) : null
14196
14196
  ] });
14197
14197
  }
14198
14198
  );
@@ -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
  },