@aircall/ds 0.37.0 → 0.37.3
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 +9 -9
- package/dist/index.js +39 -16
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -95,8 +95,8 @@ declare namespace AccordionContent {
|
|
|
95
95
|
//#region src/components/button.d.ts
|
|
96
96
|
/** `cva` variant definitions for {@link Button} — resolves `variant`, `size`, and `block` into class names. */
|
|
97
97
|
declare const buttonVariants: (props?: ({
|
|
98
|
-
variant?: "link" | "default" | "
|
|
99
|
-
size?: "default" | "icon" | "
|
|
98
|
+
variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
99
|
+
size?: "default" | "icon" | "sm" | "lg" | "icon-sm" | "icon-lg" | null | undefined;
|
|
100
100
|
block?: boolean | null | undefined;
|
|
101
101
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
102
102
|
/**
|
|
@@ -638,7 +638,7 @@ declare namespace AlertDialogCancel {
|
|
|
638
638
|
* default `default`) sets the background, border, and icon colour scheme.
|
|
639
639
|
*/
|
|
640
640
|
declare const alertVariants: (props?: ({
|
|
641
|
-
variant?: "default" | "
|
|
641
|
+
variant?: "default" | "error" | "info" | "success" | "warning" | null | undefined;
|
|
642
642
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
643
643
|
/**
|
|
644
644
|
* Callout that draws attention to an important, contextual message.
|
|
@@ -938,7 +938,7 @@ declare namespace AvatarGroupCount {
|
|
|
938
938
|
* (`default` | `secondary` | `ghost`, default `default`) sets the colour scheme.
|
|
939
939
|
*/
|
|
940
940
|
declare const counterBadgeVariants: (props?: ({
|
|
941
|
-
variant?: "default" | "
|
|
941
|
+
variant?: "default" | "secondary" | "ghost" | null | undefined;
|
|
942
942
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
943
943
|
/**
|
|
944
944
|
* Small pill for surfacing a count or short status, e.g. an unread indicator.
|
|
@@ -1024,7 +1024,7 @@ declare namespace BadgeGroupCount {
|
|
|
1024
1024
|
* edge gets the accent border.
|
|
1025
1025
|
*/
|
|
1026
1026
|
declare const bannerVariants: (props?: ({
|
|
1027
|
-
variant?: "default" | "
|
|
1027
|
+
variant?: "default" | "error" | "info" | "success" | "warning" | null | undefined;
|
|
1028
1028
|
borderDirection?: "bottom" | "top" | null | undefined;
|
|
1029
1029
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
1030
1030
|
/**
|
|
@@ -4766,7 +4766,7 @@ declare namespace ItemSeparator {
|
|
|
4766
4766
|
type Props = ItemSeparatorProps;
|
|
4767
4767
|
}
|
|
4768
4768
|
declare const itemVariants: (props?: ({
|
|
4769
|
-
variant?: "default" | "
|
|
4769
|
+
variant?: "default" | "outline" | "muted" | null | undefined;
|
|
4770
4770
|
size?: "default" | "sm" | "xs" | null | undefined;
|
|
4771
4771
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
4772
4772
|
/**
|
|
@@ -5978,7 +5978,7 @@ declare namespace SidebarMenuItem {
|
|
|
5978
5978
|
}
|
|
5979
5979
|
declare const sidebarMenuButtonVariants: (props?: ({
|
|
5980
5980
|
variant?: "default" | "outline" | null | undefined;
|
|
5981
|
-
size?: "default" | "
|
|
5981
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
5982
5982
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5983
5983
|
/**
|
|
5984
5984
|
* Primary clickable row inside a menu item, with variant/size styles and an
|
|
@@ -6135,7 +6135,7 @@ declare namespace Toaster {
|
|
|
6135
6135
|
//#region src/components/spinner.d.ts
|
|
6136
6136
|
/** Class variants for `Spinner`, controlling its `size` (`default`, `sm`, `lg`, `xl`). */
|
|
6137
6137
|
declare const spinnerVariants: (props?: ({
|
|
6138
|
-
size?: "default" | "
|
|
6138
|
+
size?: "default" | "sm" | "lg" | "xl" | null | undefined;
|
|
6139
6139
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6140
6140
|
/**
|
|
6141
6141
|
* Animated loading indicator. Renders a spinning `<svg>` (Loader icon) with
|
|
@@ -6452,7 +6452,7 @@ declare namespace ThemeProvider {
|
|
|
6452
6452
|
*/
|
|
6453
6453
|
declare const toggleVariants: (props?: ({
|
|
6454
6454
|
variant?: "default" | "outline" | null | undefined;
|
|
6455
|
-
size?: "default" | "
|
|
6455
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
6456
6456
|
pressedColor?: "highContrast" | "lowContrast" | null | undefined;
|
|
6457
6457
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6458
6458
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1762,11 +1762,11 @@ const BadgeGroupCount = React.forwardRef((componentProps, forwardRef) => {
|
|
|
1762
1762
|
BadgeGroupCount.displayName = "BadgeGroupCount";
|
|
1763
1763
|
/** Design-approved mapping from a legacy stored tag hex (lowercased) to a DS `color` + `tone`. */
|
|
1764
1764
|
const LEGACY_TAG_COLOR_MAP = {
|
|
1765
|
-
"#
|
|
1765
|
+
"#003d4c": {
|
|
1766
1766
|
color: "charcoal",
|
|
1767
1767
|
tone: "dark"
|
|
1768
1768
|
},
|
|
1769
|
-
"#
|
|
1769
|
+
"#bb2100": {
|
|
1770
1770
|
color: "red",
|
|
1771
1771
|
tone: "dark"
|
|
1772
1772
|
},
|
|
@@ -1774,7 +1774,7 @@ const LEGACY_TAG_COLOR_MAP = {
|
|
|
1774
1774
|
color: "red",
|
|
1775
1775
|
tone: "medium-dark"
|
|
1776
1776
|
},
|
|
1777
|
-
"#
|
|
1777
|
+
"#0662b5": {
|
|
1778
1778
|
color: "blue",
|
|
1779
1779
|
tone: "dark"
|
|
1780
1780
|
},
|
|
@@ -1782,6 +1782,10 @@ const LEGACY_TAG_COLOR_MAP = {
|
|
|
1782
1782
|
color: "green",
|
|
1783
1783
|
tone: "medium-dark"
|
|
1784
1784
|
},
|
|
1785
|
+
"#29c8ff": {
|
|
1786
|
+
color: "blue",
|
|
1787
|
+
tone: "medium-dark"
|
|
1788
|
+
},
|
|
1785
1789
|
"#b285d1": {
|
|
1786
1790
|
color: "purple",
|
|
1787
1791
|
tone: "medium-light"
|
|
@@ -1790,31 +1794,47 @@ const LEGACY_TAG_COLOR_MAP = {
|
|
|
1790
1794
|
color: "yellow",
|
|
1791
1795
|
tone: "medium-light"
|
|
1792
1796
|
},
|
|
1793
|
-
"#
|
|
1797
|
+
"#ff9d88": {
|
|
1794
1798
|
color: "red",
|
|
1795
1799
|
tone: "light"
|
|
1796
1800
|
},
|
|
1797
|
-
"#
|
|
1801
|
+
"#ff854c": {
|
|
1798
1802
|
color: "red",
|
|
1799
1803
|
tone: "medium-light"
|
|
1800
1804
|
},
|
|
1801
|
-
"#
|
|
1805
|
+
"#acccf3": {
|
|
1802
1806
|
color: "blue",
|
|
1803
1807
|
tone: "light"
|
|
1804
1808
|
},
|
|
1805
|
-
"#
|
|
1809
|
+
"#48a0ff": {
|
|
1806
1810
|
color: "blue",
|
|
1807
1811
|
tone: "medium-light"
|
|
1808
1812
|
},
|
|
1809
|
-
"#
|
|
1813
|
+
"#65d289": {
|
|
1810
1814
|
color: "green",
|
|
1811
1815
|
tone: "medium-light"
|
|
1812
|
-
},
|
|
1813
|
-
"#2ac8ff": {
|
|
1814
|
-
color: "blue",
|
|
1815
|
-
tone: "medium-dark"
|
|
1816
1816
|
}
|
|
1817
1817
|
};
|
|
1818
|
+
/**
|
|
1819
|
+
* Near-miss hexes that earlier DS versions carried instead of the palette
|
|
1820
|
+
* values above, each off by 1-2 RGB units (`#0761b5` for `#0662b5`, and so
|
|
1821
|
+
* on). No picker ever wrote them, but DS docs, stories and the dashboard
|
|
1822
|
+
* migration skill advertised them, so a consumer may have hardcoded one.
|
|
1823
|
+
* Aliased to the value they were meant to be, so those call sites keep their
|
|
1824
|
+
* color instead of dropping to the fallback. Removable once no consumer
|
|
1825
|
+
* passes them.
|
|
1826
|
+
*/
|
|
1827
|
+
const LEGACY_TAG_COLOR_ALIASES = {
|
|
1828
|
+
"#003d4b": "#003d4c",
|
|
1829
|
+
"#bb2001": "#bb2100",
|
|
1830
|
+
"#0761b5": "#0662b5",
|
|
1831
|
+
"#2ac8ff": "#29c8ff",
|
|
1832
|
+
"#fe9d88": "#ff9d88",
|
|
1833
|
+
"#ff844c": "#ff854c",
|
|
1834
|
+
"#abccf2": "#acccf3",
|
|
1835
|
+
"#49a0ff": "#48a0ff",
|
|
1836
|
+
"#66d188": "#65d289"
|
|
1837
|
+
};
|
|
1818
1838
|
/** Charcoal/dark — used when a stored hex is outside the known legacy palette. */
|
|
1819
1839
|
const FALLBACK_TAG_COLOR = {
|
|
1820
1840
|
color: "charcoal",
|
|
@@ -1822,8 +1842,10 @@ const FALLBACK_TAG_COLOR = {
|
|
|
1822
1842
|
};
|
|
1823
1843
|
/** Resolve a legacy hard-coded tag hex to `color` + `tone`; unknown → charcoal/dark. */
|
|
1824
1844
|
function resolveTagColor(hex) {
|
|
1825
|
-
var _LEGACY_TAG_COLOR_MAP;
|
|
1826
|
-
|
|
1845
|
+
var _LEGACY_TAG_COLOR_ALI, _LEGACY_TAG_COLOR_MAP;
|
|
1846
|
+
const key = hex.trim().toLowerCase();
|
|
1847
|
+
const canonical = (_LEGACY_TAG_COLOR_ALI = LEGACY_TAG_COLOR_ALIASES[key]) !== null && _LEGACY_TAG_COLOR_ALI !== void 0 ? _LEGACY_TAG_COLOR_ALI : key;
|
|
1848
|
+
return (_LEGACY_TAG_COLOR_MAP = LEGACY_TAG_COLOR_MAP[canonical]) !== null && _LEGACY_TAG_COLOR_MAP !== void 0 ? _LEGACY_TAG_COLOR_MAP : FALLBACK_TAG_COLOR;
|
|
1827
1849
|
}
|
|
1828
1850
|
//#endregion
|
|
1829
1851
|
//#region src/components/banner.tsx
|
|
@@ -3451,6 +3473,7 @@ ComboboxChips.displayName = "ComboboxChips";
|
|
|
3451
3473
|
*/
|
|
3452
3474
|
const ComboboxChip = React.forwardRef(function ComboboxChip(componentProps, forwardRef) {
|
|
3453
3475
|
const { className, children, showRemove = true, color, tone, legacyColor } = componentProps, props = _objectWithoutProperties(componentProps, _excluded12$3);
|
|
3476
|
+
const t = useDsTranslation("ds");
|
|
3454
3477
|
return /* @__PURE__ */ jsxs(Combobox$1.Chip, _objectSpread2(_objectSpread2({
|
|
3455
3478
|
ref: forwardRef,
|
|
3456
3479
|
render: /* @__PURE__ */ jsx(Chip, {
|
|
@@ -3459,7 +3482,7 @@ const ComboboxChip = React.forwardRef(function ComboboxChip(componentProps, forw
|
|
|
3459
3482
|
legacyColor
|
|
3460
3483
|
}),
|
|
3461
3484
|
className
|
|
3462
|
-
}, props), {}, { children: [children, showRemove && /* @__PURE__ */ jsx(Combobox$1.ChipRemove, { render: /* @__PURE__ */ jsx(ChipRemove, {}) })] }));
|
|
3485
|
+
}, props), {}, { children: [children, showRemove && /* @__PURE__ */ jsx(Combobox$1.ChipRemove, { render: /* @__PURE__ */ jsx(ChipRemove, { "aria-label": t("multiselect.remove") }) })] }));
|
|
3463
3486
|
});
|
|
3464
3487
|
/**
|
|
3465
3488
|
* Text input placed inside `ComboboxChips` for filtering and adding chips, wrapping Base UI's
|
|
@@ -12989,7 +13012,7 @@ const Tabs = React.forwardRef((componentProps, forwardRef) => {
|
|
|
12989
13012
|
ref: forwardRef,
|
|
12990
13013
|
"data-slot": "tabs",
|
|
12991
13014
|
orientation,
|
|
12992
|
-
className: cn("group/tabs flex
|
|
13015
|
+
className: cn("group/tabs flex data-[orientation=horizontal]:flex-col", className)
|
|
12993
13016
|
}, props));
|
|
12994
13017
|
});
|
|
12995
13018
|
Tabs.displayName = "Tabs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aircall/ds",
|
|
3
|
-
"version": "0.37.
|
|
3
|
+
"version": "0.37.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": [
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@aircall/numbers": "*",
|
|
85
85
|
"@aircall/react-icons": "*",
|
|
86
|
-
"@aircall/tsconfig": "1.4.
|
|
86
|
+
"@aircall/tsconfig": "1.4.5",
|
|
87
87
|
"@chromatic-com/storybook": "5.0.2",
|
|
88
88
|
"@faker-js/faker": "10.2.0",
|
|
89
89
|
"@parcel/watcher-linux-x64-glibc": "2.5.1",
|
|
@@ -115,10 +115,10 @@
|
|
|
115
115
|
"storybook-addon-pseudo-states": "10.3.3",
|
|
116
116
|
"tailwindcss": "4.1.18",
|
|
117
117
|
"tsdown": "0.22.14",
|
|
118
|
-
"typescript": "
|
|
118
|
+
"typescript": "6.0.3",
|
|
119
119
|
"vite": "7.3.1",
|
|
120
120
|
"vitest": "4.0.17",
|
|
121
|
-
"@aircall/hooks": "0.6.
|
|
121
|
+
"@aircall/hooks": "0.6.3"
|
|
122
122
|
},
|
|
123
123
|
"keywords": [
|
|
124
124
|
"tanstack-intent"
|