@aircall/ds 0.37.1 → 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 +5 -5
- package/dist/index.js +37 -15
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -96,7 +96,7 @@ declare namespace AccordionContent {
|
|
|
96
96
|
/** `cva` variant definitions for {@link Button} — resolves `variant`, `size`, and `block` into class names. */
|
|
97
97
|
declare const buttonVariants: (props?: ({
|
|
98
98
|
variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
99
|
-
size?: "default" | "
|
|
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.
|
|
@@ -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
|
/**
|
|
@@ -4673,7 +4673,7 @@ declare namespace NumericInputDecrement {
|
|
|
4673
4673
|
* )} />
|
|
4674
4674
|
* ```
|
|
4675
4675
|
*/
|
|
4676
|
-
declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
4676
|
+
declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
4677
4677
|
value?: string;
|
|
4678
4678
|
onChange?: (newValue: string) => unknown;
|
|
4679
4679
|
maxLength: number;
|
|
@@ -4688,7 +4688,7 @@ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHT
|
|
|
4688
4688
|
children?: never;
|
|
4689
4689
|
} & React.RefAttributes<HTMLInputElement> & {
|
|
4690
4690
|
containerClassName?: string;
|
|
4691
|
-
}, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
4691
|
+
}, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
4692
4692
|
value?: string;
|
|
4693
4693
|
onChange?: (newValue: string) => unknown;
|
|
4694
4694
|
maxLength: number;
|
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
|
|
@@ -12990,7 +13012,7 @@ const Tabs = React.forwardRef((componentProps, forwardRef) => {
|
|
|
12990
13012
|
ref: forwardRef,
|
|
12991
13013
|
"data-slot": "tabs",
|
|
12992
13014
|
orientation,
|
|
12993
|
-
className: cn("group/tabs flex
|
|
13015
|
+
className: cn("group/tabs flex data-[orientation=horizontal]:flex-col", className)
|
|
12994
13016
|
}, props));
|
|
12995
13017
|
});
|
|
12996
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"
|