@digital-ai/dot-components 3.13.3 → 3.14.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/index.esm.js
CHANGED
|
@@ -2738,7 +2738,8 @@ const DotLink = ({
|
|
|
2738
2738
|
tabIndex = 0,
|
|
2739
2739
|
target,
|
|
2740
2740
|
tooltip,
|
|
2741
|
-
underline = 'always'
|
|
2741
|
+
underline = 'always',
|
|
2742
|
+
variant = 'body1'
|
|
2742
2743
|
}) => {
|
|
2743
2744
|
const rootClasses = useStylesWithRootClass(rootClassName$1c, className);
|
|
2744
2745
|
useEffect(() => {
|
|
@@ -2777,6 +2778,7 @@ const DotLink = ({
|
|
|
2777
2778
|
tabIndex: tabIndex,
|
|
2778
2779
|
target: target,
|
|
2779
2780
|
underline: underline,
|
|
2781
|
+
variant: variant,
|
|
2780
2782
|
children: children
|
|
2781
2783
|
})
|
|
2782
2784
|
});
|
|
@@ -2840,13 +2842,23 @@ const StyledList = styled(List)`
|
|
|
2840
2842
|
`;
|
|
2841
2843
|
|
|
2842
2844
|
const getChevronIcon = (nestedListType, isOpened) => {
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2845
|
+
switch (nestedListType) {
|
|
2846
|
+
case 'drawer':
|
|
2847
|
+
{
|
|
2848
|
+
return 'chevron-right';
|
|
2849
|
+
}
|
|
2850
|
+
case 'expandable':
|
|
2851
|
+
{
|
|
2852
|
+
if (isOpened) {
|
|
2853
|
+
return 'chevron-up';
|
|
2854
|
+
}
|
|
2855
|
+
return 'chevron-down';
|
|
2856
|
+
}
|
|
2857
|
+
case 'menu':
|
|
2858
|
+
{
|
|
2859
|
+
return 'arrow-right';
|
|
2860
|
+
}
|
|
2848
2861
|
}
|
|
2849
|
-
return 'chevron-down';
|
|
2850
2862
|
};
|
|
2851
2863
|
// Used in DotSidebar, DotList, DotListItem to determine
|
|
2852
2864
|
// if the sidebar should be open or closed based on what target the user clicks
|
|
@@ -3860,7 +3872,8 @@ const styledListItemElement = elementType => {
|
|
|
3860
3872
|
}
|
|
3861
3873
|
|
|
3862
3874
|
&.${flyoutListItemClassName} {
|
|
3863
|
-
padding:
|
|
3875
|
+
padding: ${theme.spacing(1)};
|
|
3876
|
+
text-decoration: none;
|
|
3864
3877
|
}
|
|
3865
3878
|
|
|
3866
3879
|
&:hover {
|
|
@@ -3888,7 +3901,7 @@ const styledListItemElement = elementType => {
|
|
|
3888
3901
|
}
|
|
3889
3902
|
|
|
3890
3903
|
.${flyoutItemLinkClassName} .MuiIcon-root {
|
|
3891
|
-
margin-right: ${theme.spacing(
|
|
3904
|
+
margin-right: ${theme.spacing(1)};
|
|
3892
3905
|
}
|
|
3893
3906
|
|
|
3894
3907
|
.dot-icon i:before {
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { KeyboardEvent, MouseEvent, PointerEvent, ReactNode } from 'react';
|
|
2
2
|
import { CommonProps } from '../CommonProps';
|
|
3
|
+
import { TypographyVariant } from '../typography/Typography';
|
|
3
4
|
export type LinkColor = 'initial' | 'inherit' | 'primary' | 'secondary' | 'textPrimary' | 'textSecondary' | 'error';
|
|
4
5
|
export type LinkUnderline = 'always' | 'hover' | 'none';
|
|
5
6
|
export type LinkTarget = '_blank' | '_self';
|
|
@@ -26,5 +27,7 @@ export interface LinkProps extends CommonProps {
|
|
|
26
27
|
tooltip?: string;
|
|
27
28
|
/** underline the link */
|
|
28
29
|
underline?: LinkUnderline;
|
|
30
|
+
/** Applies the theme typography styles. */
|
|
31
|
+
variant?: TypographyVariant;
|
|
29
32
|
}
|
|
30
|
-
export declare const DotLink: ({ ariaLabel, ariaRole, children, className, color, "data-pendoid": dataPendoId, "data-testid": dataTestId, href, onClick, onMouseEnter, onPointerDown, rel, tabIndex, target, tooltip, underline, }: LinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare const DotLink: ({ ariaLabel, ariaRole, children, className, color, "data-pendoid": dataPendoId, "data-testid": dataTestId, href, onClick, onMouseEnter, onPointerDown, rel, tabIndex, target, tooltip, underline, variant, }: LinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { NestedListType } from './models';
|
|
2
|
-
export declare const getChevronIcon: (nestedListType: NestedListType, isOpened: boolean) => "chevron-right" | "chevron-up" | "chevron-down";
|
|
2
|
+
export declare const getChevronIcon: (nestedListType: NestedListType, isOpened: boolean) => "chevron-right" | "chevron-up" | "chevron-down" | "arrow-right";
|
|
3
3
|
export declare const shouldToggleOpen: (classNames: string) => boolean;
|