huspy-icons 0.1.4 → 0.1.7
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/fonts/HuspyIcons.css +22 -7
- package/dist/fonts/HuspyIcons.eot +0 -0
- package/dist/fonts/HuspyIcons.json +8 -3
- package/dist/fonts/HuspyIcons.ts +20 -5
- package/dist/fonts/HuspyIcons.ttf +0 -0
- package/dist/fonts/HuspyIcons.woff +0 -0
- package/dist/fonts/HuspyIcons.woff2 +0 -0
- package/dist/native/index.d.ts +1 -1
- package/dist/native/index.js +14 -4
- package/dist/native/index.js.map +1 -1
- package/dist/react/index.d.mts +13 -3
- package/dist/react/index.d.ts +13 -3
- package/dist/react/index.js +349 -59
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +347 -57
- package/dist/react/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/native/Icon.tsx +11 -9
- package/src/native/glyphMap.ts +9 -4
- package/src/react/ArrowLeft.tsx +7 -1
- package/src/react/Cancel.tsx +32 -0
- package/src/react/Check.tsx +26 -0
- package/src/react/EyeHidden.tsx +38 -0
- package/src/react/EyeVisible.tsx +32 -0
- package/src/react/Icon.tsx +19 -4
- package/src/react/IconSlot.tsx +8 -2
- package/src/react/Search.tsx +32 -0
- package/src/react/User.tsx +32 -0
- package/src/react/index.ts +6 -1
- package/src/react/index.tsx +6 -1
- package/src/react/ArrowUpRight.tsx +0 -26
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
@font-face {
|
|
2
2
|
font-family: "HuspyIcons";
|
|
3
|
-
src: url(".//HuspyIcons.ttf?
|
|
4
|
-
url(".//HuspyIcons.woff?
|
|
5
|
-
url(".//HuspyIcons.woff2?
|
|
6
|
-
url(".//HuspyIcons.eot?
|
|
3
|
+
src: url(".//HuspyIcons.ttf?d1b413dd5ca9bd51e6ff81a64788c5c7") format("truetype"),
|
|
4
|
+
url(".//HuspyIcons.woff?d1b413dd5ca9bd51e6ff81a64788c5c7") format("woff"),
|
|
5
|
+
url(".//HuspyIcons.woff2?d1b413dd5ca9bd51e6ff81a64788c5c7") format("woff2"),
|
|
6
|
+
url(".//HuspyIcons.eot?d1b413dd5ca9bd51e6ff81a64788c5c7#iefix") format("embedded-opentype");
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
.icon:before {
|
|
@@ -17,12 +17,27 @@ url(".//HuspyIcons.eot?25d92884ac0b766c69d414744c2ffbc2#iefix") format("embedded
|
|
|
17
17
|
-moz-osx-font-smoothing: grayscale;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
.icon.huspy-icon-
|
|
20
|
+
.icon.huspy-icon-user:before {
|
|
21
21
|
content: "\f101";
|
|
22
22
|
}
|
|
23
|
-
.icon.huspy-icon-
|
|
23
|
+
.icon.huspy-icon-search:before {
|
|
24
24
|
content: "\f102";
|
|
25
25
|
}
|
|
26
|
-
.icon.huspy-icon-
|
|
26
|
+
.icon.huspy-icon-icon-slot:before {
|
|
27
27
|
content: "\f103";
|
|
28
28
|
}
|
|
29
|
+
.icon.huspy-icon-eye-visible:before {
|
|
30
|
+
content: "\f104";
|
|
31
|
+
}
|
|
32
|
+
.icon.huspy-icon-eye-hidden:before {
|
|
33
|
+
content: "\f105";
|
|
34
|
+
}
|
|
35
|
+
.icon.huspy-icon-check:before {
|
|
36
|
+
content: "\f106";
|
|
37
|
+
}
|
|
38
|
+
.icon.huspy-icon-cancel:before {
|
|
39
|
+
content: "\f107";
|
|
40
|
+
}
|
|
41
|
+
.icon.huspy-icon-arrow-left:before {
|
|
42
|
+
content: "\f108";
|
|
43
|
+
}
|
|
Binary file
|
package/dist/fonts/HuspyIcons.ts
CHANGED
|
@@ -1,16 +1,31 @@
|
|
|
1
1
|
export type HuspyIconsId =
|
|
2
|
+
| "user"
|
|
3
|
+
| "search"
|
|
2
4
|
| "icon-slot"
|
|
3
|
-
| "
|
|
5
|
+
| "eye-visible"
|
|
6
|
+
| "eye-hidden"
|
|
7
|
+
| "check"
|
|
8
|
+
| "cancel"
|
|
4
9
|
| "arrow-left";
|
|
5
10
|
|
|
6
11
|
export enum HuspyIcons {
|
|
12
|
+
User = "user",
|
|
13
|
+
Search = "search",
|
|
7
14
|
IconSlot = "icon-slot",
|
|
8
|
-
|
|
15
|
+
EyeVisible = "eye-visible",
|
|
16
|
+
EyeHidden = "eye-hidden",
|
|
17
|
+
Check = "check",
|
|
18
|
+
Cancel = "cancel",
|
|
9
19
|
ArrowLeft = "arrow-left",
|
|
10
20
|
}
|
|
11
21
|
|
|
12
22
|
export const HUSPY_ICONS_CODEPOINTS: { [key in HuspyIcons]: string } = {
|
|
13
|
-
[HuspyIcons.
|
|
14
|
-
[HuspyIcons.
|
|
15
|
-
[HuspyIcons.
|
|
23
|
+
[HuspyIcons.User]: "61697",
|
|
24
|
+
[HuspyIcons.Search]: "61698",
|
|
25
|
+
[HuspyIcons.IconSlot]: "61699",
|
|
26
|
+
[HuspyIcons.EyeVisible]: "61700",
|
|
27
|
+
[HuspyIcons.EyeHidden]: "61701",
|
|
28
|
+
[HuspyIcons.Check]: "61702",
|
|
29
|
+
[HuspyIcons.Cancel]: "61703",
|
|
30
|
+
[HuspyIcons.ArrowLeft]: "61704",
|
|
16
31
|
};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/native/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { TextProps } from 'react-native';
|
|
|
4
4
|
/**
|
|
5
5
|
* Available icon names in the HuspyIcons font
|
|
6
6
|
*/
|
|
7
|
-
type IconName = 'icon-slot' | '
|
|
7
|
+
type IconName = 'user' | 'search' | 'icon-slot' | 'eye-visible' | 'eye-hidden' | 'check' | 'cancel' | 'arrow-left';
|
|
8
8
|
/**
|
|
9
9
|
* Mapping of icon names to unicode codepoints
|
|
10
10
|
* Used by the Icon component to render the correct glyph
|
package/dist/native/index.js
CHANGED
|
@@ -42,9 +42,14 @@ var import_react_native = require("react-native");
|
|
|
42
42
|
|
|
43
43
|
// src/native/glyphMap.ts
|
|
44
44
|
var glyphMap = {
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
45
|
+
"user": 61697,
|
|
46
|
+
"search": 61698,
|
|
47
|
+
"icon-slot": 61699,
|
|
48
|
+
"eye-visible": 61700,
|
|
49
|
+
"eye-hidden": 61701,
|
|
50
|
+
"check": 61702,
|
|
51
|
+
"cancel": 61703,
|
|
52
|
+
"arrow-left": 61704
|
|
48
53
|
};
|
|
49
54
|
var fontFamily = "HuspyIcons";
|
|
50
55
|
|
|
@@ -69,7 +74,12 @@ var Icon = ({ name, size = 16, color = "#000", style, ...props }) => {
|
|
|
69
74
|
color,
|
|
70
75
|
// Ensure icon doesn't inherit text styles
|
|
71
76
|
fontWeight: "normal",
|
|
72
|
-
fontStyle: "normal"
|
|
77
|
+
fontStyle: "normal",
|
|
78
|
+
// Prevent text selection and ensure proper rendering
|
|
79
|
+
includeFontPadding: false,
|
|
80
|
+
// Android: removes extra padding
|
|
81
|
+
textAlignVertical: "center"
|
|
82
|
+
// Android: centers the glyph vertically
|
|
73
83
|
},
|
|
74
84
|
style
|
|
75
85
|
],
|
package/dist/native/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/native/index.ts","../../src/native/Icon.tsx","../../src/native/glyphMap.ts"],"sourcesContent":["/**\n * Huspy Icons - React Native (Font-based)\n * \n * This package provides icon components for React Native using a custom font.\n * \n * @example\n * ```tsx\n * import { Icon } from 'huspy-icons/native';\n * \n * function MyComponent() {\n * return <Icon name=\"arrow-left\" size={24} color=\"#000\" />;\n * }\n * ```\n */\n\nexport { default as Icon } from './Icon';\nexport type { IconProps, IconName } from './Icon';\nexport { glyphMap, fontFamily } from './glyphMap';\n\n","import * as React from 'react';\nimport { Text, TextProps
|
|
1
|
+
{"version":3,"sources":["../../src/native/index.ts","../../src/native/Icon.tsx","../../src/native/glyphMap.ts"],"sourcesContent":["/**\n * Huspy Icons - React Native (Font-based)\n * \n * This package provides icon components for React Native using a custom font.\n * \n * @example\n * ```tsx\n * import { Icon } from 'huspy-icons/native';\n * \n * function MyComponent() {\n * return <Icon name=\"arrow-left\" size={24} color=\"#000\" />;\n * }\n * ```\n */\n\nexport { default as Icon } from './Icon';\nexport type { IconProps, IconName } from './Icon';\nexport { glyphMap, fontFamily } from './glyphMap';\n\n","import * as React from 'react';\nimport { Text, TextProps } from 'react-native';\nimport { glyphMap, fontFamily, IconName } from './glyphMap';\n\n/**\n * Props for the Icon component (React Native)\n */\nexport interface IconProps extends Omit<TextProps, 'children'> {\n /**\n * Name of the icon to display\n */\n name: IconName;\n\n /**\n * Size of the icon (default: 16)\n */\n size?: number;\n\n /**\n * Color of the icon (default: inherits from parent or 'black')\n */\n color?: string;\n}\n\n/**\n * Icon component for React Native\n *\n * Renders icons using a custom font (HuspyIcons)\n *\n * @example\n * ```tsx\n * <Icon name=\"arrow-left\" size={24} color=\"#000\" />\n * ```\n */\nconst Icon = ({ name, size = 16, color = '#000', style, ...props }: IconProps) => {\n const codepoint = glyphMap[name];\n\n if (!codepoint) {\n if (__DEV__) {\n console.warn(`Icon \"${name}\" not found in HuspyIcons font`);\n }\n return null;\n }\n\n // Convert codepoint to character\n const glyph = String.fromCharCode(codepoint);\n\n return (\n <Text\n {...props}\n style={[\n {\n fontFamily: fontFamily,\n fontSize: size,\n color: color,\n // Ensure icon doesn't inherit text styles\n fontWeight: 'normal',\n fontStyle: 'normal',\n // Prevent text selection and ensure proper rendering\n includeFontPadding: false, // Android: removes extra padding\n textAlignVertical: 'center', // Android: centers the glyph vertically\n },\n style,\n ]}\n // Accessibility\n accessible\n accessibilityLabel={props.accessibilityLabel || name}\n accessibilityRole=\"image\"\n >\n {glyph}\n </Text>\n );\n};\n\nexport default Icon;\nexport type { IconName };\n","// Auto-generated by generate-font.js - do not edit manually\n// Source: icons-src/*.svg → dist/fonts/HuspyIcons.*\n\n/**\n * Available icon names in the HuspyIcons font\n */\nexport type IconName = 'user' | 'search' | 'icon-slot' | 'eye-visible' | 'eye-hidden' | 'check' | 'cancel' | 'arrow-left';\n\n/**\n * Mapping of icon names to unicode codepoints\n * Used by the Icon component to render the correct glyph\n */\nexport const glyphMap: Record<IconName, number> = {\n \"user\": 61697,\n \"search\": 61698,\n \"icon-slot\": 61699,\n \"eye-visible\": 61700,\n \"eye-hidden\": 61701,\n \"check\": 61702,\n \"cancel\": 61703,\n \"arrow-left\": 61704\n};\n\n/**\n * Font family name for React Native\n */\nexport const fontFamily = 'HuspyIcons';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,0BAAgC;;;ACWzB,IAAM,WAAqC;AAAA,EAChD,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,aAAa;AAAA,EACb,eAAe;AAAA,EACf,cAAc;AAAA,EACd,SAAS;AAAA,EACT,UAAU;AAAA,EACV,cAAc;AAChB;AAKO,IAAM,aAAa;;;ADQ1B,IAAM,OAAO,CAAC,EAAE,MAAM,OAAO,IAAI,QAAQ,QAAQ,OAAO,GAAG,MAAM,MAAiB;AAChF,QAAM,YAAY,SAAS,IAAI;AAE/B,MAAI,CAAC,WAAW;AACd,QAAI,SAAS;AACX,cAAQ,KAAK,SAAS,IAAI,gCAAgC;AAAA,IAC5D;AACA,WAAO;AAAA,EACT;AAGA,QAAM,QAAQ,OAAO,aAAa,SAAS;AAE3C,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,OAAO;AAAA,QACL;AAAA,UACE;AAAA,UACA,UAAU;AAAA,UACV;AAAA;AAAA,UAEA,YAAY;AAAA,UACZ,WAAW;AAAA;AAAA,UAEX,oBAAoB;AAAA;AAAA,UACpB,mBAAmB;AAAA;AAAA,QACrB;AAAA,QACA;AAAA,MACF;AAAA,MAEA,YAAU;AAAA,MACV,oBAAoB,MAAM,sBAAsB;AAAA,MAChD,mBAAkB;AAAA;AAAA,IAEjB;AAAA,EACH;AAEJ;AAEA,IAAO,eAAQ;","names":[]}
|
package/dist/react/index.d.mts
CHANGED
|
@@ -30,10 +30,20 @@ declare function resolveSize(size?: IconSize): number;
|
|
|
30
30
|
|
|
31
31
|
declare const SvgArrowLeft: ({ size, ...props }: ReactIconProps) => React$1.JSX.Element;
|
|
32
32
|
|
|
33
|
-
declare const
|
|
33
|
+
declare const SvgCancel: ({ size, ...props }: ReactIconProps) => React$1.JSX.Element;
|
|
34
|
+
|
|
35
|
+
declare const SvgCheck: ({ size, ...props }: ReactIconProps) => React$1.JSX.Element;
|
|
36
|
+
|
|
37
|
+
declare const SvgEyeHidden: ({ size, ...props }: ReactIconProps) => React$1.JSX.Element;
|
|
38
|
+
|
|
39
|
+
declare const SvgEyeVisible: ({ size, ...props }: ReactIconProps) => React$1.JSX.Element;
|
|
34
40
|
|
|
35
41
|
declare const SvgIconSlot: ({ size, ...props }: ReactIconProps) => React$1.JSX.Element;
|
|
36
42
|
|
|
43
|
+
declare const SvgSearch: ({ size, ...props }: ReactIconProps) => React$1.JSX.Element;
|
|
44
|
+
|
|
45
|
+
declare const SvgUser: ({ size, ...props }: ReactIconProps) => React$1.JSX.Element;
|
|
46
|
+
|
|
37
47
|
/**
|
|
38
48
|
* Icon imports - using dynamic imports for tree-shaking
|
|
39
49
|
* Auto-generated - do not edit manually
|
|
@@ -41,7 +51,7 @@ declare const SvgIconSlot: ({ size, ...props }: ReactIconProps) => React$1.JSX.E
|
|
|
41
51
|
/**
|
|
42
52
|
* Available icon names
|
|
43
53
|
*/
|
|
44
|
-
type IconName = 'arrow-left' | '
|
|
54
|
+
type IconName = 'arrow-left' | 'cancel' | 'check' | 'eye-hidden' | 'eye-visible' | 'icon-slot' | 'search' | 'user';
|
|
45
55
|
/**
|
|
46
56
|
* Props for the unified Icon component
|
|
47
57
|
*/
|
|
@@ -56,4 +66,4 @@ interface IconProps extends Omit<ReactIconProps, 'size'> {
|
|
|
56
66
|
*/
|
|
57
67
|
declare const Icon: ({ name, size, color, ...props }: IconProps) => React$1.JSX.Element | null;
|
|
58
68
|
|
|
59
|
-
export { SvgArrowLeft as ArrowLeft,
|
|
69
|
+
export { SvgArrowLeft as ArrowLeft, SvgCancel as Cancel, SvgCheck as Check, SvgEyeHidden as EyeHidden, SvgEyeVisible as EyeVisible, ICON_SIZES, Icon, type IconName, type IconProps, type IconSize, type IconSizeToken, SvgIconSlot as IconSlot, type ReactIconProps, SvgSearch as Search, SvgUser as User, resolveSize };
|
package/dist/react/index.d.ts
CHANGED
|
@@ -30,10 +30,20 @@ declare function resolveSize(size?: IconSize): number;
|
|
|
30
30
|
|
|
31
31
|
declare const SvgArrowLeft: ({ size, ...props }: ReactIconProps) => React$1.JSX.Element;
|
|
32
32
|
|
|
33
|
-
declare const
|
|
33
|
+
declare const SvgCancel: ({ size, ...props }: ReactIconProps) => React$1.JSX.Element;
|
|
34
|
+
|
|
35
|
+
declare const SvgCheck: ({ size, ...props }: ReactIconProps) => React$1.JSX.Element;
|
|
36
|
+
|
|
37
|
+
declare const SvgEyeHidden: ({ size, ...props }: ReactIconProps) => React$1.JSX.Element;
|
|
38
|
+
|
|
39
|
+
declare const SvgEyeVisible: ({ size, ...props }: ReactIconProps) => React$1.JSX.Element;
|
|
34
40
|
|
|
35
41
|
declare const SvgIconSlot: ({ size, ...props }: ReactIconProps) => React$1.JSX.Element;
|
|
36
42
|
|
|
43
|
+
declare const SvgSearch: ({ size, ...props }: ReactIconProps) => React$1.JSX.Element;
|
|
44
|
+
|
|
45
|
+
declare const SvgUser: ({ size, ...props }: ReactIconProps) => React$1.JSX.Element;
|
|
46
|
+
|
|
37
47
|
/**
|
|
38
48
|
* Icon imports - using dynamic imports for tree-shaking
|
|
39
49
|
* Auto-generated - do not edit manually
|
|
@@ -41,7 +51,7 @@ declare const SvgIconSlot: ({ size, ...props }: ReactIconProps) => React$1.JSX.E
|
|
|
41
51
|
/**
|
|
42
52
|
* Available icon names
|
|
43
53
|
*/
|
|
44
|
-
type IconName = 'arrow-left' | '
|
|
54
|
+
type IconName = 'arrow-left' | 'cancel' | 'check' | 'eye-hidden' | 'eye-visible' | 'icon-slot' | 'search' | 'user';
|
|
45
55
|
/**
|
|
46
56
|
* Props for the unified Icon component
|
|
47
57
|
*/
|
|
@@ -56,4 +66,4 @@ interface IconProps extends Omit<ReactIconProps, 'size'> {
|
|
|
56
66
|
*/
|
|
57
67
|
declare const Icon: ({ name, size, color, ...props }: IconProps) => React$1.JSX.Element | null;
|
|
58
68
|
|
|
59
|
-
export { SvgArrowLeft as ArrowLeft,
|
|
69
|
+
export { SvgArrowLeft as ArrowLeft, SvgCancel as Cancel, SvgCheck as Check, SvgEyeHidden as EyeHidden, SvgEyeVisible as EyeVisible, ICON_SIZES, Icon, type IconName, type IconProps, type IconSize, type IconSizeToken, SvgIconSlot as IconSlot, type ReactIconProps, SvgSearch as Search, SvgUser as User, resolveSize };
|