@soyfri/template 1.0.5 → 1.0.6

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.
@@ -1,10 +1,10 @@
1
1
  import { EventHandlerUtil, DataUtil, getBreakpoint, getAttributeValueByBreakpoint, stringSnakeToCamel, getObjectPropertyValueByKey, getViewPort, isVisibleElement, throttle, } from '../_utils/index';
2
2
  import { MenuComponent, defaultMenuOptions } from './MenuComponent';
3
3
  const defaultSearchOptions = {
4
- minLength: 2,
5
- keypress: true,
6
- enter: true,
7
- layout: 'menu',
4
+ minLength: 2, // Miniam text lenght to query search
5
+ keypress: true, // Enable search on keypress
6
+ enter: true, // Enable search on enter key press
7
+ layout: 'menu', // Use 'menu' or 'inline' layout options to display search results
8
8
  showOnFocus: true, // Always show menu on input focus
9
9
  };
10
10
  const defaultSearchQueires = {
@@ -18,7 +18,7 @@ declare class FeedbackComponent {
18
18
  private hidePopup;
19
19
  show: () => this | undefined;
20
20
  hide: () => this | undefined;
21
- isShown: () => any;
21
+ isShown: () => () => /*elided*/ any;
22
22
  getElement: () => HTMLElement;
23
23
  on: (name: string, handler: Function) => void;
24
24
  one: (name: string, handler: Function) => void;
@@ -4,8 +4,8 @@ declare class ThemeMode {
4
4
  element: HTMLElement | null;
5
5
  private getParamName;
6
6
  getMode: () => Mode;
7
- setMode: (mode: Mode, menuMode: Mode | '') => void;
8
- getMenuMode: () => Mode | '';
7
+ setMode: (mode: Mode, menuMode: Mode | "") => void;
8
+ getMenuMode: () => Mode | "";
9
9
  getSystemMode: () => Mode;
10
10
  private initMode;
11
11
  private getActiveMenuItem;
@@ -1,4 +1,7 @@
1
1
  import React from 'react';
2
+ import SVG from 'react-inlinesvg';
3
+ import { toAbsoluteUrl } from '../AssetHelpers';
2
4
  export const KTSVG = ({ className = '', path, svgClassName = 'mh-50px' }) => {
3
- return (React.createElement(React.Fragment, null));
5
+ return (React.createElement("span", { className: `svg-icon ${className}` },
6
+ React.createElement(SVG, { src: toAbsoluteUrl(path), className: svgClassName })));
4
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soyfri/template",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Metronic template components and utilities for Fri projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -64,7 +64,7 @@
64
64
  "@types/react": "^18.0.0",
65
65
  "@types/react-copy-to-clipboard": "5.0.2",
66
66
  "@types/react-dom": "^18.0.0",
67
- "typescript": "^4.9.0",
67
+ "typescript": "5.8.2",
68
68
  "@types/qs": "6.9.7",
69
69
  "@types/react-flatpickr": "^3.8.8"
70
70
  },