@seeqdev/qomponents 0.0.82 → 0.0.84
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/TextField/TextField.types.d.ts +6 -1
- package/dist/ToolbarButton/ToolbarButton.types.d.ts +10 -0
- package/dist/index.esm.js +28 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +28 -5
- package/dist/index.js.map +1 -1
- package/dist/styles.css +3 -3
- package/dist/utils/svg.d.ts +15 -0
- package/dist/utils/svg.js +20 -0
- package/dist/utils/svg.js.map +1 -0
- package/package.json +1 -1
package/dist/styles.css
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const SVG_PATH = "svgpath:";
|
|
2
|
+
/**
|
|
3
|
+
* Determines if an icon is SVG
|
|
4
|
+
*
|
|
5
|
+
* @param icon - an icon string that will either be an icon class or an SVG path definition (e.g. "fa fa-wrench" or
|
|
6
|
+
* "svgpath:M 17.0181 0 ...")
|
|
7
|
+
*/
|
|
8
|
+
export declare function isSvgIcon(icon: string): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Retrieves the SVG path from an SVG icon
|
|
11
|
+
*
|
|
12
|
+
* @param icon - an SVG icon string including path definition (e.g. "svgpath:M 17.0181 0 ...")
|
|
13
|
+
* @returns the SVG icon path or an empty string if the supplied icon is not SVG
|
|
14
|
+
*/
|
|
15
|
+
export declare function getSvgIconPath(icon: string): string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export const SVG_PATH = 'svgpath:';
|
|
2
|
+
/**
|
|
3
|
+
* Determines if an icon is SVG
|
|
4
|
+
*
|
|
5
|
+
* @param icon - an icon string that will either be an icon class or an SVG path definition (e.g. "fa fa-wrench" or
|
|
6
|
+
* "svgpath:M 17.0181 0 ...")
|
|
7
|
+
*/
|
|
8
|
+
export function isSvgIcon(icon) {
|
|
9
|
+
return icon.startsWith(SVG_PATH);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Retrieves the SVG path from an SVG icon
|
|
13
|
+
*
|
|
14
|
+
* @param icon - an SVG icon string including path definition (e.g. "svgpath:M 17.0181 0 ...")
|
|
15
|
+
* @returns the SVG icon path or an empty string if the supplied icon is not SVG
|
|
16
|
+
*/
|
|
17
|
+
export function getSvgIconPath(icon) {
|
|
18
|
+
return isSvgIcon(icon) ? icon.substring(SVG_PATH.length) : '';
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=svg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svg.js","sourceRoot":"","sources":["../../src/utils/svg.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC;AAEnC;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AACnC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAChE,CAAC"}
|