dash-ui-kit 1.0.3 → 1.0.5
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/react/components/accordion/index.d.ts +6 -0
- package/dist/react/components/icons/index.d.ts +1 -0
- package/dist/react/components/index.d.ts +1 -1
- package/dist/react/index.cjs.js +68 -14
- package/dist/react/index.cjs.js.map +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.esm.js +68 -15
- package/dist/react/index.esm.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -12,6 +12,12 @@ export interface AccordionProps {
|
|
|
12
12
|
onOpenChange?: (open: boolean) => void;
|
|
13
13
|
/** Additional CSS classes */
|
|
14
14
|
className?: string;
|
|
15
|
+
/** Optional element to display on the right side of the trigger */
|
|
16
|
+
rightElement?: React.ReactNode;
|
|
17
|
+
/** Whether to show separator between title and content when open */
|
|
18
|
+
showSeparator?: boolean;
|
|
19
|
+
/** Whether to show border around the accordion */
|
|
20
|
+
border?: boolean;
|
|
15
21
|
}
|
|
16
22
|
/**
|
|
17
23
|
* Accordion component based on Radix UI with smooth animations.
|
|
@@ -35,3 +35,4 @@ export declare const ChainSmallIcon: React.FC<IconProps>;
|
|
|
35
35
|
export declare const SettingsIcon: React.FC<IconProps>;
|
|
36
36
|
export declare const ShieldSmallIcon: React.FC<IconProps>;
|
|
37
37
|
export declare const QuestionMessageIcon: React.FC<IconProps>;
|
|
38
|
+
export declare const CheckmarkIcon: React.FC<IconProps>;
|
|
@@ -23,4 +23,4 @@ export { DashLogo, type DashLogoProps } from './dashLogo';
|
|
|
23
23
|
export { Dialog, type DialogProps } from './dialog';
|
|
24
24
|
export { Tabs, type TabsProps, type TabItem } from './tabs';
|
|
25
25
|
export type { TimeDeltaFormat } from '../utils/datetime';
|
|
26
|
-
export { ArrowIcon, CopyIcon, SuccessIcon, ErrorIcon, QueuedIcon, PooledIcon, BroadcastedIcon, CalendarIcon, EyeOpenIcon, EyeClosedIcon, CheckIcon, KeyIcon, ProtectedMessageIcon, SmartphoneIcon, CrossIcon, WalletIcon, PlusIcon, FilterIcon, EditIcon, DeleteIcon, ChevronIcon, BurgerMenuIcon, KebabMenuIcon, CircleProcessIcon, CreditsIcon, WebIcon, ChainSmallIcon, SettingsIcon, ShieldSmallIcon, QuestionMessageIcon } from './icons';
|
|
26
|
+
export { ArrowIcon, CopyIcon, SuccessIcon, ErrorIcon, QueuedIcon, PooledIcon, BroadcastedIcon, CalendarIcon, EyeOpenIcon, EyeClosedIcon, CheckIcon, KeyIcon, ProtectedMessageIcon, SmartphoneIcon, CrossIcon, WalletIcon, PlusIcon, FilterIcon, EditIcon, DeleteIcon, ChevronIcon, BurgerMenuIcon, KebabMenuIcon, CircleProcessIcon, CreditsIcon, WebIcon, ChainSmallIcon, SettingsIcon, ShieldSmallIcon, QuestionMessageIcon, CheckmarkIcon } from './icons';
|
package/dist/react/index.cjs.js
CHANGED
|
@@ -1781,6 +1781,25 @@ const QuestionMessageIcon = ({
|
|
|
1781
1781
|
fill: 'currentColor'
|
|
1782
1782
|
})
|
|
1783
1783
|
});
|
|
1784
|
+
const CheckmarkIcon = ({
|
|
1785
|
+
color = '#1CC400',
|
|
1786
|
+
size = 27,
|
|
1787
|
+
className = '',
|
|
1788
|
+
onClick
|
|
1789
|
+
}) => jsxRuntime.jsx("svg", {
|
|
1790
|
+
width: size,
|
|
1791
|
+
height: size * 21 / 27,
|
|
1792
|
+
viewBox: '0 0 27 21',
|
|
1793
|
+
fill: 'none',
|
|
1794
|
+
xmlns: 'http://www.w3.org/2000/svg',
|
|
1795
|
+
className: className,
|
|
1796
|
+
onClick: onClick,
|
|
1797
|
+
color: color,
|
|
1798
|
+
children: jsxRuntime.jsx("path", {
|
|
1799
|
+
d: 'M25.235 0.341283C25.5909 -0.0640896 26.2219 -0.115686 26.6442 0.225963C27.0664 0.567654 27.1201 1.17343 26.7643 1.57886L10.0094 20.6667L0.253533 10.1585C-0.11396 9.76268 -0.0776687 9.15652 0.334587 8.8037C0.746855 8.45088 1.37822 8.48572 1.74572 8.88152L9.96642 17.7358L25.235 0.341283Z',
|
|
1800
|
+
fill: 'currentColor'
|
|
1801
|
+
})
|
|
1802
|
+
});
|
|
1784
1803
|
|
|
1785
1804
|
const accordionRootStyles = classVarianceAuthority.cva(`
|
|
1786
1805
|
w-full
|
|
@@ -1789,12 +1808,17 @@ const accordionRootStyles = classVarianceAuthority.cva(`
|
|
|
1789
1808
|
`, {
|
|
1790
1809
|
variants: {
|
|
1791
1810
|
theme: {
|
|
1792
|
-
light: '
|
|
1811
|
+
light: 'bg-dash-primary-dark-blue/[0.05]',
|
|
1793
1812
|
dark: 'bg-gray-800/20'
|
|
1813
|
+
},
|
|
1814
|
+
border: {
|
|
1815
|
+
true: 'ring-1 ring-dash-primary-dark-blue/10',
|
|
1816
|
+
false: ''
|
|
1794
1817
|
}
|
|
1795
1818
|
},
|
|
1796
1819
|
defaultVariants: {
|
|
1797
|
-
theme: 'light'
|
|
1820
|
+
theme: 'light',
|
|
1821
|
+
border: false
|
|
1798
1822
|
}
|
|
1799
1823
|
});
|
|
1800
1824
|
const accordionItemStyles = classVarianceAuthority.cva(`
|
|
@@ -1803,14 +1827,13 @@ const accordionItemStyles = classVarianceAuthority.cva(`
|
|
|
1803
1827
|
`);
|
|
1804
1828
|
const accordionTriggerStyles = classVarianceAuthority.cva(`
|
|
1805
1829
|
w-full
|
|
1806
|
-
|
|
1807
|
-
py-6
|
|
1830
|
+
p-[0.875rem]
|
|
1808
1831
|
flex
|
|
1809
1832
|
items-center
|
|
1810
1833
|
justify-between
|
|
1811
|
-
font-
|
|
1834
|
+
font-dash-main
|
|
1812
1835
|
font-medium
|
|
1813
|
-
text-
|
|
1836
|
+
text-[0.875rem]
|
|
1814
1837
|
leading-[1.366]
|
|
1815
1838
|
text-dash-primary-dark-blue
|
|
1816
1839
|
bg-transparent
|
|
@@ -1839,10 +1862,27 @@ const accordionContentStyles = classVarianceAuthority.cva(`
|
|
|
1839
1862
|
data-[state=closed]:h-0
|
|
1840
1863
|
`);
|
|
1841
1864
|
const accordionContentInnerStyles = classVarianceAuthority.cva(`
|
|
1842
|
-
|
|
1843
|
-
pb-6
|
|
1865
|
+
p-[0.875rem]
|
|
1844
1866
|
space-y-[0.625rem]
|
|
1845
1867
|
`);
|
|
1868
|
+
const separatorStyles = classVarianceAuthority.cva(`
|
|
1869
|
+
mx-[0.875rem]
|
|
1870
|
+
h-px
|
|
1871
|
+
bg-dash-primary-dark-blue/10
|
|
1872
|
+
transition-opacity
|
|
1873
|
+
duration-300
|
|
1874
|
+
ease-in-out
|
|
1875
|
+
`, {
|
|
1876
|
+
variants: {
|
|
1877
|
+
theme: {
|
|
1878
|
+
light: 'bg-dash-primary-dark-blue/10',
|
|
1879
|
+
dark: 'bg-white/10'
|
|
1880
|
+
}
|
|
1881
|
+
},
|
|
1882
|
+
defaultVariants: {
|
|
1883
|
+
theme: 'light'
|
|
1884
|
+
}
|
|
1885
|
+
});
|
|
1846
1886
|
const chevronStyles = classVarianceAuthority.cva(`
|
|
1847
1887
|
w-4
|
|
1848
1888
|
h-4
|
|
@@ -1862,14 +1902,18 @@ const Accordion = ({
|
|
|
1862
1902
|
defaultOpen = false,
|
|
1863
1903
|
open,
|
|
1864
1904
|
onOpenChange,
|
|
1865
|
-
className = ''
|
|
1905
|
+
className = '',
|
|
1906
|
+
rightElement,
|
|
1907
|
+
showSeparator = false,
|
|
1908
|
+
border = false
|
|
1866
1909
|
}) => {
|
|
1867
1910
|
const {
|
|
1868
1911
|
theme
|
|
1869
1912
|
} = useTheme();
|
|
1870
1913
|
const isControlled = open !== undefined;
|
|
1871
1914
|
const rootClasses = accordionRootStyles({
|
|
1872
|
-
theme
|
|
1915
|
+
theme,
|
|
1916
|
+
border
|
|
1873
1917
|
}) + (className ? ` ${className}` : '');
|
|
1874
1918
|
return jsxRuntime.jsx(Root2$3, {
|
|
1875
1919
|
type: 'single',
|
|
@@ -1884,17 +1928,26 @@ const Accordion = ({
|
|
|
1884
1928
|
},
|
|
1885
1929
|
children: jsxRuntime.jsxs(Item$2, {
|
|
1886
1930
|
value: 'item-1',
|
|
1887
|
-
className: `AccordionItem ${accordionItemStyles()}`,
|
|
1931
|
+
className: `AccordionItem ${accordionItemStyles()} group`,
|
|
1888
1932
|
children: [jsxRuntime.jsxs(Trigger2, {
|
|
1889
1933
|
className: `${accordionTriggerStyles({
|
|
1890
1934
|
theme
|
|
1891
|
-
})}
|
|
1935
|
+
})}`,
|
|
1892
1936
|
children: [jsxRuntime.jsx("div", {
|
|
1893
1937
|
className: 'w-full text-left',
|
|
1894
1938
|
children: title
|
|
1895
|
-
}), jsxRuntime.
|
|
1896
|
-
className:
|
|
1939
|
+
}), jsxRuntime.jsxs("div", {
|
|
1940
|
+
className: 'flex items-center gap-3',
|
|
1941
|
+
children: [rightElement && jsxRuntime.jsx("div", {
|
|
1942
|
+
children: rightElement
|
|
1943
|
+
}), jsxRuntime.jsx(ChevronIcon, {
|
|
1944
|
+
className: chevronStyles()
|
|
1945
|
+
})]
|
|
1897
1946
|
})]
|
|
1947
|
+
}), showSeparator && jsxRuntime.jsx("div", {
|
|
1948
|
+
className: `${separatorStyles({
|
|
1949
|
+
theme
|
|
1950
|
+
})} group-data-[state=closed]:opacity-0 group-data-[state=open]:opacity-100`
|
|
1898
1951
|
}), jsxRuntime.jsx(Content2$1, {
|
|
1899
1952
|
forceMount: true,
|
|
1900
1953
|
className: accordionContentStyles(),
|
|
@@ -11126,6 +11179,7 @@ exports.Button = Button;
|
|
|
11126
11179
|
exports.CalendarIcon = CalendarIcon;
|
|
11127
11180
|
exports.ChainSmallIcon = ChainSmallIcon;
|
|
11128
11181
|
exports.CheckIcon = CheckIcon;
|
|
11182
|
+
exports.CheckmarkIcon = CheckmarkIcon;
|
|
11129
11183
|
exports.ChevronIcon = ChevronIcon;
|
|
11130
11184
|
exports.CircleProcessIcon = CircleProcessIcon;
|
|
11131
11185
|
exports.CopyButton = CopyButton;
|