@aircall/ds 0.38.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
@@ -1,4 +1,4 @@
1
- import { a as OnChangeFn, i as DataTableLoadingState, n as ColumnPinningState, o as SortingState, r as DataTable, s as VisibilityState, t as ColumnDef } from "./data-table-DdK-5YI9.js";
1
+ import { a as OnChangeFn, i as DataTableLoadingState, n as ColumnPinningState, o as SortingState, r as DataTable, s as VisibilityState, t as ColumnDef } from "./data-table-AHgs5bxe.js";
2
2
  import * as React from "react";
3
3
  import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
4
4
  import { ClassValue } from "clsx";
@@ -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
  /**
@@ -639,7 +639,7 @@ declare namespace AlertDialogCancel {
639
639
  * default `default`) sets the background, border, and icon colour scheme.
640
640
  */
641
641
  declare const alertVariants: (props?: ({
642
- variant?: "default" | "error" | "info" | "success" | "warning" | null | undefined;
642
+ variant?: "default" | "info" | "success" | "warning" | "error" | null | undefined;
643
643
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
644
644
  /**
645
645
  * Callout that draws attention to an important, contextual message.
@@ -1025,7 +1025,7 @@ declare namespace BadgeGroupCount {
1025
1025
  * edge gets the accent border.
1026
1026
  */
1027
1027
  declare const bannerVariants: (props?: ({
1028
- variant?: "default" | "error" | "info" | "success" | "warning" | null | undefined;
1028
+ variant?: "default" | "info" | "success" | "warning" | "error" | null | undefined;
1029
1029
  borderDirection?: "bottom" | "top" | null | undefined;
1030
1030
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
1031
1031
  /**
@@ -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
@@ -1,4 +1,4 @@
1
- import { C as Button, D as _objectWithoutProperties, E as _objectSpread2, O as cn, S as registerI18nNamespace, T as linkStyle, _ as ActionBarHeight, a as TableFooter, b as detectInitialLanguage, c as TableRow, d as Checkbox, f as Spinner, g as ActionBarContext, h as ActionBarButton, i as TableCell, l as useFetchMoreSentinel, m as ActionBar, n as Table, o as TableHead, p as spinnerVariants, r as TableBody, s as TableHeader, t as DataTable, u as Skeleton, v as useDsTranslation, w as buttonVariants, x as dsI18n, y as SUPPORTED_LANGUAGES } from "./data-table-fPncHG6B.js";
1
+ import { C as Button, D as _objectWithoutProperties, E as _objectSpread2, O as cn, S as registerI18nNamespace, T as linkStyle, _ as ActionBarHeight, a as TableFooter, b as detectInitialLanguage, c as TableRow, d as Checkbox, f as Spinner, g as ActionBarContext, h as ActionBarButton, i as TableCell, l as useFetchMoreSentinel, m as ActionBar, n as Table, o as TableHead, p as spinnerVariants, r as TableBody, s as TableHeader, t as DataTable, u as Skeleton, v as useDsTranslation, w as buttonVariants, x as dsI18n, y as SUPPORTED_LANGUAGES } from "./data-table-DD7m3puW.js";
2
2
  import * as React from "react";
3
3
  import { createContext, useContext, useSyncExternalStore } from "react";
4
4
  import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
@@ -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";
@@ -2283,6 +2284,7 @@ SelectTrigger.displayName = "SelectTrigger";
2283
2284
  const SelectContent = React.forwardRef((componentProps, forwardRef) => {
2284
2285
  const { className, children, side = "bottom", sideOffset = 4, align = "start", alignOffset = 0, alignItemWithTrigger = false } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$24);
2285
2286
  return /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsx(Select$1.Positioner, {
2287
+ positionMethod: "fixed",
2286
2288
  side,
2287
2289
  sideOffset,
2288
2290
  align,
@@ -3371,6 +3373,7 @@ const ComboboxContent = React.forwardRef((componentProps, forwardRef) => {
3371
3373
  align,
3372
3374
  alignOffset,
3373
3375
  anchor,
3376
+ positionMethod: "fixed",
3374
3377
  "data-slot": "combobox-positioner",
3375
3378
  className: "isolate z-popup",
3376
3379
  children: /* @__PURE__ */ jsx(Combobox$1.Popup, _objectSpread2({
@@ -3490,7 +3493,7 @@ const ComboboxChips = React.forwardRef((componentProps, forwardRef) => {
3490
3493
  return /* @__PURE__ */ jsxs(Combobox$1.Chips, _objectSpread2(_objectSpread2({
3491
3494
  ref: forwardRef,
3492
3495
  "data-slot": "combobox-chips",
3493
- className: cn("flex min-h-10 flex-wrap items-center gap-1 rounded-md border border-input bg-background bg-clip-padding py-2 pl-3 pr-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40", className)
3496
+ className: cn("relative flex min-h-10 flex-wrap items-center gap-1 rounded-md border border-input bg-background bg-clip-padding py-2 pl-3 pr-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40", className)
3494
3497
  }, props), {}, { children: [children, showTrigger && /* @__PURE__ */ jsx(ComboboxTrigger, {
3495
3498
  "data-slot": "combobox-chips-trigger",
3496
3499
  "aria-label": t("combobox.showOptions"),
@@ -4838,6 +4841,7 @@ PopoverClose.displayName = "PopoverClose";
4838
4841
  const PopoverContent = React.forwardRef((componentProps, forwardRef) => {
4839
4842
  const { className, align = "center", alignOffset = 0, side = "bottom", sideOffset = 4, anchor } = componentProps, props = _objectWithoutProperties(componentProps, _excluded$36);
4840
4843
  return /* @__PURE__ */ jsx(Popover$1.Portal, { children: /* @__PURE__ */ jsx(Popover$1.Positioner, {
4844
+ positionMethod: "fixed",
4841
4845
  align,
4842
4846
  alignOffset,
4843
4847
  side,
@@ -7888,6 +7892,7 @@ const DropdownMenuContent = React.forwardRef((componentProps, forwardRef) => {
7888
7892
  return /* @__PURE__ */ jsx(Menu.Portal, {
7889
7893
  container,
7890
7894
  children: /* @__PURE__ */ jsx(Menu.Positioner, {
7895
+ positionMethod: "fixed",
7891
7896
  "data-slot": "dropdown-menu-positioner",
7892
7897
  className: "isolate z-popup outline-none",
7893
7898
  align,
@@ -8836,6 +8841,7 @@ HoverCardTrigger.displayName = "HoverCardTrigger";
8836
8841
  const HoverCardContent = React.forwardRef((componentProps, forwardRef) => {
8837
8842
  const { className, side = "bottom", sideOffset = 8, align = "center", alignOffset = 0 } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$16);
8838
8843
  return /* @__PURE__ */ jsx(PreviewCard.Portal, { children: /* @__PURE__ */ jsx(PreviewCard.Positioner, {
8844
+ positionMethod: "fixed",
8839
8845
  side,
8840
8846
  sideOffset,
8841
8847
  align,
@@ -9435,6 +9441,7 @@ function InlineEditSelectValue(componentProps) {
9435
9441
  const InlineEditSelectContent = React.forwardRef((componentProps, forwardRef) => {
9436
9442
  const { className, children, side = "bottom", sideOffset = 12, align = "start", alignOffset = 0, alignItemWithTrigger = false } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$14);
9437
9443
  return /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsx(Select$1.Positioner, {
9444
+ positionMethod: "fixed",
9438
9445
  side,
9439
9446
  sideOffset,
9440
9447
  align,
@@ -12121,6 +12128,7 @@ const TooltipContent = React.forwardRef((componentProps, forwardRef) => {
12121
12128
  return /* @__PURE__ */ jsx(Tooltip$1.Portal, {
12122
12129
  container,
12123
12130
  children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, {
12131
+ positionMethod: "fixed",
12124
12132
  align,
12125
12133
  alignOffset,
12126
12134
  side,
@@ -12815,6 +12823,10 @@ Slider.displayName = "Slider";
12815
12823
  * next-themes and applying DS icons and variant styles (info / success / error / warning).
12816
12824
  * Mount once near the app root; trigger toasts via the exported `toast` function.
12817
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
+ *
12818
12830
  * @example
12819
12831
  * ```tsx
12820
12832
  * <Toaster position="bottom-right" />
@@ -12825,7 +12837,9 @@ Slider.displayName = "Slider";
12825
12837
  const Toaster = (componentProps) => {
12826
12838
  const props = _extends({}, (_objectDestructuringEmpty(componentProps), componentProps));
12827
12839
  const { theme = "system" } = useTheme$1();
12828
- 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({
12829
12843
  theme,
12830
12844
  className: "toaster group !font-sans",
12831
12845
  icons: {
@@ -12850,7 +12864,7 @@ const Toaster = (componentProps) => {
12850
12864
  "--normal-text": "var(--popover-foreground)",
12851
12865
  "--normal-border": "var(--border)"
12852
12866
  }
12853
- }, props));
12867
+ }, props)), portalContainer);
12854
12868
  };
12855
12869
  //#endregion
12856
12870
  //#region src/components/stepper.tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aircall/ds",
3
- "version": "0.38.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",