@ssa-ui-kit/core 2.26.0 → 2.26.1
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/components/CollapsibleNavBar/CollapsibleNavBar.d.ts +1 -1
- package/dist/components/CollapsibleNavBar/CollapsibleNavBarContext.d.ts +2 -2
- package/dist/components/CollapsibleNavBar/components/TriggerIcon.d.ts +3 -1
- package/dist/components/CollapsibleNavBar/types.d.ts +1 -0
- package/dist/components/NavBar/types.d.ts +1 -0
- package/dist/index.js +25 -8
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -2,4 +2,4 @@ import { CollapsibleNavBarExtendedProps } from './types';
|
|
|
2
2
|
/**
|
|
3
3
|
* UI Component that shows the collapsible navigation bar
|
|
4
4
|
*/
|
|
5
|
-
export declare const CollapsibleNavBar: ({ items, renderLogo, theme, subMenuMaxWidth, className, useMatchPattern, onChange, }: CollapsibleNavBarExtendedProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const CollapsibleNavBar: ({ items, renderLogo, theme, subMenuMaxWidth, showIconTooltip, className, useMatchPattern, onChange, }: CollapsibleNavBarExtendedProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CollapsibleNavBarExtendedProps } from './types';
|
|
2
|
-
type ContextType = Pick<CollapsibleNavBarExtendedProps, 'theme' | 'subMenuMaxWidth'>;
|
|
2
|
+
type ContextType = Pick<CollapsibleNavBarExtendedProps, 'theme' | 'subMenuMaxWidth' | 'showIconTooltip'>;
|
|
3
3
|
export declare const CollapsibleNavBarContext: import("react").Context<ContextType>;
|
|
4
|
-
export declare const CollapsibleNavBarProvider: ({ children, theme, subMenuMaxWidth, }: {
|
|
4
|
+
export declare const CollapsibleNavBarProvider: ({ children, theme, subMenuMaxWidth, showIconTooltip, }: {
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
} & ContextType) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
7
|
export declare const useCollapsibleNavBarContext: () => ContextType;
|
|
@@ -3,5 +3,7 @@ export declare const TriggerIcon: ({ iconName, iconSize, className, CustomIcon,
|
|
|
3
3
|
iconName: keyof MapIconsType;
|
|
4
4
|
iconSize?: number;
|
|
5
5
|
className?: string;
|
|
6
|
-
CustomIcon?: (props: Omit<SVGProps, "fill">
|
|
6
|
+
CustomIcon?: (props: Omit<SVGProps, "fill"> & {
|
|
7
|
+
showIconTooltip?: boolean;
|
|
8
|
+
}) => JSX.Element;
|
|
7
9
|
}) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -16,6 +16,7 @@ export interface CollapsibleNavBarExtendedProps<T extends NavBarExtendedSubItem
|
|
|
16
16
|
theme?: 'default' | 'light';
|
|
17
17
|
className?: string;
|
|
18
18
|
subMenuMaxWidth?: CSSProperties['maxWidth'];
|
|
19
|
+
showIconTooltip?: boolean;
|
|
19
20
|
useMatchPattern?: (prefix: string) => string | PathPattern<string>;
|
|
20
21
|
onChange?: (isChecked: boolean) => void;
|
|
21
22
|
}
|
package/dist/index.js
CHANGED
|
@@ -11289,6 +11289,7 @@ const CollapsibleNavToggle = ({
|
|
|
11289
11289
|
children: (0,jsx_runtime_namespaceObject.jsx)(CollapsibleNavToggleWrapper, {
|
|
11290
11290
|
children: (0,jsx_runtime_namespaceObject.jsxs)("label", {
|
|
11291
11291
|
htmlFor: id,
|
|
11292
|
+
"data-testid": "collapsible-nav-toggle-label",
|
|
11292
11293
|
css: CollapsibleNavToggle_ref,
|
|
11293
11294
|
children: [(0,jsx_runtime_namespaceObject.jsx)("span", {}), (0,jsx_runtime_namespaceObject.jsx)("span", {}), (0,jsx_runtime_namespaceObject.jsx)("span", {})]
|
|
11294
11295
|
})
|
|
@@ -11314,11 +11315,13 @@ const CollapsibleNavBarContext = /*#__PURE__*/(0,external_react_namespaceObject.
|
|
|
11314
11315
|
const CollapsibleNavBarProvider = ({
|
|
11315
11316
|
children,
|
|
11316
11317
|
theme,
|
|
11317
|
-
subMenuMaxWidth
|
|
11318
|
+
subMenuMaxWidth,
|
|
11319
|
+
showIconTooltip
|
|
11318
11320
|
}) => (0,jsx_runtime_namespaceObject.jsx)(CollapsibleNavBarContext.Provider, {
|
|
11319
11321
|
value: {
|
|
11320
11322
|
theme,
|
|
11321
|
-
subMenuMaxWidth
|
|
11323
|
+
subMenuMaxWidth,
|
|
11324
|
+
showIconTooltip
|
|
11322
11325
|
},
|
|
11323
11326
|
children: children
|
|
11324
11327
|
});
|
|
@@ -11342,17 +11345,20 @@ const NavContentToggle = ({
|
|
|
11342
11345
|
}) => {
|
|
11343
11346
|
const globalTheme = (0,react_namespaceObject.useTheme)();
|
|
11344
11347
|
const {
|
|
11345
|
-
theme
|
|
11348
|
+
theme,
|
|
11349
|
+
showIconTooltip
|
|
11346
11350
|
} = useCollapsibleNavBarContext();
|
|
11347
11351
|
return (0,jsx_runtime_namespaceObject.jsx)("div", {
|
|
11348
11352
|
css: ContentToggle(theme, isChecked),
|
|
11349
11353
|
children: (0,jsx_runtime_namespaceObject.jsx)("label", {
|
|
11350
11354
|
htmlFor: id,
|
|
11355
|
+
"data-testid": "collapsible-nav-content-toggle-label",
|
|
11351
11356
|
css: CollapsibleNavContentToggle_ref,
|
|
11352
11357
|
children: (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
|
|
11353
11358
|
name: isChecked ? 'carrot-left' : 'carrot-right',
|
|
11354
11359
|
color: theme === 'default' ? '#000' : globalTheme.colors.greyDarker,
|
|
11355
|
-
size: 14
|
|
11360
|
+
size: 14,
|
|
11361
|
+
tooltip: showIconTooltip ? undefined : ''
|
|
11356
11362
|
})
|
|
11357
11363
|
})
|
|
11358
11364
|
});
|
|
@@ -11863,6 +11869,7 @@ function TriggerIcon_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried t
|
|
|
11863
11869
|
|
|
11864
11870
|
|
|
11865
11871
|
|
|
11872
|
+
|
|
11866
11873
|
var TriggerIcon_ref = true ? {
|
|
11867
11874
|
name: "1fojab0",
|
|
11868
11875
|
styles: "width:auto;min-width:25px;justify-content:center;overflow:visible;position:relative;height:26px"
|
|
@@ -11874,18 +11881,23 @@ const TriggerIcon = ({
|
|
|
11874
11881
|
CustomIcon
|
|
11875
11882
|
}) => {
|
|
11876
11883
|
const theme = (0,react_namespaceObject.useTheme)();
|
|
11884
|
+
const {
|
|
11885
|
+
showIconTooltip
|
|
11886
|
+
} = useCollapsibleNavBarContext();
|
|
11877
11887
|
return (0,jsx_runtime_namespaceObject.jsx)(Wrapper_Wrapper, {
|
|
11878
11888
|
css: TriggerIcon_ref,
|
|
11879
11889
|
className: "trigger-icon",
|
|
11880
11890
|
children: CustomIcon ? (0,jsx_runtime_namespaceObject.jsx)(CustomIcon, {
|
|
11881
11891
|
size: iconSize,
|
|
11882
11892
|
className: className,
|
|
11883
|
-
color: theme.colors.grey
|
|
11893
|
+
color: theme.colors.grey,
|
|
11894
|
+
showIconTooltip: showIconTooltip
|
|
11884
11895
|
}) : (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
|
|
11885
11896
|
name: iconName,
|
|
11886
11897
|
color: theme.colors.grey,
|
|
11887
11898
|
size: iconSize,
|
|
11888
|
-
className: className
|
|
11899
|
+
className: className,
|
|
11900
|
+
tooltip: showIconTooltip ? undefined : ''
|
|
11889
11901
|
})
|
|
11890
11902
|
});
|
|
11891
11903
|
};
|
|
@@ -11912,7 +11924,8 @@ const ItemAccordionTitle = ({
|
|
|
11912
11924
|
useMatchPattern
|
|
11913
11925
|
}) => {
|
|
11914
11926
|
const {
|
|
11915
|
-
theme
|
|
11927
|
+
theme,
|
|
11928
|
+
showIconTooltip
|
|
11916
11929
|
} = useCollapsibleNavBarContext();
|
|
11917
11930
|
const linkRef = (0,external_react_namespaceObject.useRef)(null);
|
|
11918
11931
|
const classNamesList = Array.from(linkRef.current?.classList || []);
|
|
@@ -11972,7 +11985,9 @@ const ItemAccordionTitle = ({
|
|
|
11972
11985
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11973
11986
|
,
|
|
11974
11987
|
ref: linkRef,
|
|
11975
|
-
children: [item.CustomIcon ? (0,jsx_runtime_namespaceObject.jsx)(item.CustomIcon, {
|
|
11988
|
+
children: [item.CustomIcon ? (0,jsx_runtime_namespaceObject.jsx)(item.CustomIcon, {
|
|
11989
|
+
showIconTooltip: showIconTooltip
|
|
11990
|
+
}) : (0,jsx_runtime_namespaceObject.jsx)(Icon, {}), (0,jsx_runtime_namespaceObject.jsx)(AccordionTitle, {
|
|
11976
11991
|
...data,
|
|
11977
11992
|
css: styles_AccordionTitle(theme)
|
|
11978
11993
|
})]
|
|
@@ -12184,6 +12199,7 @@ const CollapsibleNavBar = ({
|
|
|
12184
12199
|
renderLogo,
|
|
12185
12200
|
theme = 'default',
|
|
12186
12201
|
subMenuMaxWidth,
|
|
12202
|
+
showIconTooltip = false,
|
|
12187
12203
|
className,
|
|
12188
12204
|
useMatchPattern,
|
|
12189
12205
|
onChange
|
|
@@ -12208,6 +12224,7 @@ const CollapsibleNavBar = ({
|
|
|
12208
12224
|
return (0,jsx_runtime_namespaceObject.jsx)(CollapsibleNavBarProvider, {
|
|
12209
12225
|
theme: theme,
|
|
12210
12226
|
subMenuMaxWidth: subMenuMaxWidth,
|
|
12227
|
+
showIconTooltip: showIconTooltip,
|
|
12211
12228
|
children: (0,jsx_runtime_namespaceObject.jsxs)(CollapsibleNavBarBase, {
|
|
12212
12229
|
className: className + (isChecked ? ' opened' : ''),
|
|
12213
12230
|
"data-theme": theme,
|