@protonradio/proton-ui 0.7.0-beta.2 → 0.7.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/index.d.ts CHANGED
@@ -389,7 +389,7 @@ declare type Palette = {
389
389
  *
390
390
  * @interface PopoverProps
391
391
  */
392
- export declare function Popover({ children, state, arrow, offset, isEntering, ...props }: PopoverProps): JSX_2.Element;
392
+ export declare function Popover({ children, state, arrow, offset, ...props }: PopoverProps): JSX_2.Element;
393
393
 
394
394
  declare interface PopoverProps extends Omit<AriaPopoverProps, "popoverRef"> {
395
395
  /**
@@ -408,10 +408,6 @@ declare interface PopoverProps extends Omit<AriaPopoverProps, "popoverRef"> {
408
408
  * Whether to show an arrow on the popover.
409
409
  */
410
410
  arrow?: boolean;
411
- /**
412
- * Whether the popover is entering.
413
- */
414
- isEntering?: boolean;
415
411
  }
416
412
 
417
413
  export declare interface ProtonColumnProps<T> extends ColumnProps<T> {
package/dist/index.es.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import B, { useRef as M, useCallback as X, useState as j, useContext as Y, useEffect as L, createContext as ee, useMemo as H, useLayoutEffect as Kc, createElement as mi, isValidElement as Mc, forwardRef as pt, cloneElement as Ic } from "react";
2
2
  import Cn, { flushSync as Fc, createPortal as bi } from "react-dom";
3
- import { c as U, i as Nr, h as gi } from "./utils-D9D3Fg9O.mjs";
3
+ import { c as U, i as Nr, h as gi } from "./utils-CZQIdhYj.mjs";
4
4
  import { THEMES as Ee, BREAKPOINTS as $i } from "./constants.es.js";
5
5
  import { transparentize as st } from "color2k";
6
6
  import { G as be, S as tn, W as nn, D as rn, B as Rc } from "./colors-Dwh4VIMR.mjs";
@@ -9712,50 +9712,48 @@ function il({
9712
9712
  state: e,
9713
9713
  arrow: n = !0,
9714
9714
  offset: r,
9715
- isEntering: l,
9716
- ...i
9715
+ ...l
9717
9716
  }) {
9718
- const o = M(null), { popoverRef: a = o } = i, { className: u, style: s, palette: c, theme: d } = We();
9719
- let { popoverProps: f, underlayProps: p, arrowProps: h, placement: $ } = Wf(
9717
+ const i = M(null), { popoverRef: o = i } = l, { className: a, style: u, palette: s, theme: c } = We();
9718
+ let { popoverProps: d, underlayProps: f, arrowProps: p, placement: h } = Wf(
9720
9719
  {
9721
- ...i,
9720
+ ...l,
9722
9721
  offset: r,
9723
- popoverRef: a
9722
+ popoverRef: o
9724
9723
  },
9725
9724
  e
9726
9725
  );
9727
- const g = {
9726
+ const $ = {
9728
9727
  "--dialog-background": (() => {
9729
- switch (d) {
9728
+ switch (c) {
9730
9729
  case Ee.CUSTOM_DARK:
9731
- return c.PRIMARY.PRIMARY_MEDIUM;
9730
+ return s.PRIMARY.PRIMARY_MEDIUM;
9732
9731
  case Ee.DARK:
9733
- return c.PRIMARY.PRIMARY_DARK;
9732
+ return s.PRIMARY.PRIMARY_DARK;
9734
9733
  default:
9735
9734
  return be.WHITE;
9736
9735
  }
9737
9736
  })(),
9738
- ...s
9737
+ ...u
9739
9738
  };
9740
9739
  return /* @__PURE__ */ b.jsxs(Yf, { children: [
9741
- /* @__PURE__ */ b.jsx("div", { ...p, style: { position: "fixed", inset: 0 } }),
9740
+ /* @__PURE__ */ b.jsx("div", { ...f, style: { position: "fixed", inset: 0 } }),
9742
9741
  /* @__PURE__ */ b.jsxs(
9743
9742
  "div",
9744
9743
  {
9745
- ...f,
9746
- ref: a,
9747
- className: U("proton-Popover", u),
9748
- style: { ...g, ...f.style },
9749
- "data-testid": i["data-testid"] || void 0,
9750
- "data-entering": l ? "" : void 0,
9744
+ ...d,
9745
+ ref: o,
9746
+ className: U("proton-Popover", a),
9747
+ style: { ...$, ...d.style },
9748
+ "data-testid": l["data-testid"] || void 0,
9751
9749
  children: [
9752
9750
  /* @__PURE__ */ b.jsx(Vf, { onDismiss: e.close }),
9753
9751
  n && /* @__PURE__ */ b.jsxs(
9754
9752
  "svg",
9755
9753
  {
9756
- ...h,
9754
+ ...p,
9757
9755
  className: "arrow",
9758
- "data-placement": $,
9756
+ "data-placement": h,
9759
9757
  viewBox: "0 0 12 12",
9760
9758
  children: [
9761
9759
  /* @__PURE__ */ b.jsx("title", { children: "arrow" }),
@@ -11177,13 +11175,11 @@ function Eh({
11177
11175
  f.isOpen && /* @__PURE__ */ b.jsx("div", { className: "proton-Select__popover", children: /* @__PURE__ */ b.jsx(
11178
11176
  il,
11179
11177
  {
11180
- arrow: !1,
11181
11178
  state: f,
11182
11179
  triggerRef: p,
11183
11180
  popoverRef: h,
11184
11181
  placement: "bottom start",
11185
11182
  "data-testid": "select-popover",
11186
- isEntering: f.isOpen,
11187
11183
  children: /* @__PURE__ */ b.jsx(_r, { ...S, state: f })
11188
11184
  }
11189
11185
  ) })