@aircall/ds 0.39.0 → 0.40.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
@@ -97,7 +97,7 @@ declare namespace AccordionContent {
97
97
  /** `cva` variant definitions for {@link Button} — resolves `variant`, `size`, and `block` into class names. */
98
98
  declare const buttonVariants: (props?: ({
99
99
  variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
100
- size?: "default" | "icon" | "sm" | "lg" | "icon-sm" | "icon-lg" | null | undefined;
100
+ size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
101
101
  block?: boolean | null | undefined;
102
102
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
103
103
  /**
@@ -4658,7 +4658,7 @@ declare namespace NumericInputDecrement {
4658
4658
  * )} />
4659
4659
  * ```
4660
4660
  */
4661
- declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
4661
+ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
4662
4662
  value?: string;
4663
4663
  onChange?: (newValue: string) => unknown;
4664
4664
  maxLength: number;
@@ -4673,7 +4673,7 @@ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHT
4673
4673
  children?: never;
4674
4674
  } & React.RefAttributes<HTMLInputElement> & {
4675
4675
  containerClassName?: string;
4676
- }, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
4676
+ }, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
4677
4677
  value?: string;
4678
4678
  onChange?: (newValue: string) => unknown;
4679
4679
  maxLength: number;
@@ -6105,6 +6105,10 @@ declare namespace Slider {
6105
6105
  * next-themes and applying DS icons and variant styles (info / success / error / warning).
6106
6106
  * Mount once near the app root; trigger toasts via the exported `toast` function.
6107
6107
  *
6108
+ * Portals itself into `document.body` - see the note on the implementation below. That means
6109
+ * it can be mounted anywhere in the tree without its toasts being clipped or painted behind
6110
+ * a modal, so "near the app root" is a tidiness preference rather than a correctness one.
6111
+ *
6108
6112
  * @example
6109
6113
  * ```tsx
6110
6114
  * <Toaster position="bottom-right" />
@@ -6112,7 +6116,7 @@ declare namespace Slider {
6112
6116
  * toast.success('Saved');
6113
6117
  * ```
6114
6118
  */
6115
- declare const Toaster: (componentProps: Toaster.Props) => React.JSX.Element;
6119
+ declare const Toaster: (componentProps: Toaster.Props) => React.ReactPortal | null;
6116
6120
  declare namespace Toaster {
6117
6121
  type Props = ToasterProps;
6118
6122
  }
package/dist/index.js CHANGED
@@ -57,6 +57,7 @@ import { flip, offset, shift, useFloatingToolbar, useFloatingToolbarState } from
57
57
  import { ListStyleType } from "@platejs/list";
58
58
  import { Toggle as Toggle$1 } from "@base-ui/react/toggle";
59
59
  import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
60
+ import { createPortal } from "react-dom";
60
61
  import { Toaster as Toaster$1, toast } from "sonner";
61
62
  import { Switch as Switch$1 } from "@base-ui/react/switch";
62
63
  import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
@@ -12822,6 +12823,10 @@ Slider.displayName = "Slider";
12822
12823
  * next-themes and applying DS icons and variant styles (info / success / error / warning).
12823
12824
  * Mount once near the app root; trigger toasts via the exported `toast` function.
12824
12825
  *
12826
+ * Portals itself into `document.body` - see the note on the implementation below. That means
12827
+ * it can be mounted anywhere in the tree without its toasts being clipped or painted behind
12828
+ * a modal, so "near the app root" is a tidiness preference rather than a correctness one.
12829
+ *
12825
12830
  * @example
12826
12831
  * ```tsx
12827
12832
  * <Toaster position="bottom-right" />
@@ -12832,7 +12837,9 @@ Slider.displayName = "Slider";
12832
12837
  const Toaster = (componentProps) => {
12833
12838
  const props = _extends({}, (_objectDestructuringEmpty(componentProps), componentProps));
12834
12839
  const { theme = "system" } = useTheme$1();
12835
- return /* @__PURE__ */ jsx(Toaster$1, _objectSpread2({
12840
+ const portalContainer = typeof document === "undefined" ? null : document.body;
12841
+ if (!portalContainer) return null;
12842
+ return createPortal(/* @__PURE__ */ jsx(Toaster$1, _objectSpread2({
12836
12843
  theme,
12837
12844
  className: "toaster group !font-sans",
12838
12845
  icons: {
@@ -12857,7 +12864,7 @@ const Toaster = (componentProps) => {
12857
12864
  "--normal-text": "var(--popover-foreground)",
12858
12865
  "--normal-border": "var(--border)"
12859
12866
  }
12860
- }, props));
12867
+ }, props)), portalContainer);
12861
12868
  };
12862
12869
  //#endregion
12863
12870
  //#region src/components/stepper.tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aircall/ds",
3
- "version": "0.39.0",
3
+ "version": "0.40.0",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "sideEffects": [
@@ -99,18 +99,18 @@
99
99
  "@tanstack/intent": "0.1.1",
100
100
  "@turbo/gen": "2.4.2",
101
101
  "@types/node": "24",
102
- "@types/react": "19",
103
- "@types/react-dom": "19",
102
+ "@types/react": "19.2.18",
103
+ "@types/react-dom": "19.2.5",
104
104
  "@vitest/browser-playwright": "4.0.17",
105
105
  "@vitest/coverage-v8": "4.0.17",
106
106
  "chromatic": "18.5.0",
107
107
  "date-fns": "4.1.0",
108
108
  "i18next": "23.11.5",
109
109
  "playwright": "1.57.0",
110
- "react": "19.2.3",
110
+ "react": "19.2.8",
111
111
  "react-compiler-runtime": "1.0.0",
112
112
  "react-day-picker": "9.14.0",
113
- "react-dom": "19.2.3",
113
+ "react-dom": "19.2.8",
114
114
  "storybook": "10.3.3",
115
115
  "storybook-addon-pseudo-states": "10.3.3",
116
116
  "tailwindcss": "4.1.18",