firebird-icon-lib 1.0.10 → 1.1.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.
Files changed (146) hide show
  1. package/README.md +18 -15
  2. package/dist/Icon.d.ts +56 -1
  3. package/dist/Icon.d.ts.map +1 -1
  4. package/dist/firebird-icon-lib.js.js +74 -33
  5. package/dist/fonts/Untitled.otf +0 -0
  6. package/dist/fonts/Untitled.ttf +0 -0
  7. package/dist/fonts/Untitled.woff +0 -0
  8. package/dist/fonts/Untitled.woff2 +0 -0
  9. package/dist/index.d.ts +0 -1
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/style.css +547 -15
  12. package/package.json +1 -2
  13. package/dist/iconFontMap.d.ts +0 -28
  14. package/dist/iconFontMap.d.ts.map +0 -1
  15. package/dist/iconOrder.d.ts +0 -2
  16. package/dist/iconOrder.d.ts.map +0 -1
  17. package/dist/icons/Language.svg +0 -7
  18. package/dist/icons/add_circle.svg +0 -3
  19. package/dist/icons/add_contact.svg +0 -3
  20. package/dist/icons/analytics.svg +0 -4
  21. package/dist/icons/analyze.svg +0 -4
  22. package/dist/icons/approved_badge.svg +0 -4
  23. package/dist/icons/arrow_down.svg +0 -3
  24. package/dist/icons/arrow_left-1.svg +0 -3
  25. package/dist/icons/arrow_left.svg +0 -3
  26. package/dist/icons/arrow_left_circle.svg +0 -4
  27. package/dist/icons/arrow_move_up_right.svg +0 -4
  28. package/dist/icons/arrow_right-1.svg +0 -3
  29. package/dist/icons/arrow_right.svg +0 -3
  30. package/dist/icons/arrow_turn_backward.svg +0 -4
  31. package/dist/icons/arrow_turn_forward.svg +0 -4
  32. package/dist/icons/arrow_up.svg +0 -3
  33. package/dist/icons/bank.svg +0 -5
  34. package/dist/icons/button.svg +0 -4
  35. package/dist/icons/calendar.svg +0 -4
  36. package/dist/icons/call.svg +0 -4
  37. package/dist/icons/campaign.svg +0 -4
  38. package/dist/icons/campaign_fill.svg +0 -4
  39. package/dist/icons/cancel_circle.svg +0 -3
  40. package/dist/icons/cash.svg +0 -5
  41. package/dist/icons/cash_fill.svg +0 -4
  42. package/dist/icons/chart.svg +0 -3
  43. package/dist/icons/chart_fill.svg +0 -4
  44. package/dist/icons/check_circle.svg +0 -4
  45. package/dist/icons/clock.svg +0 -4
  46. package/dist/icons/clock_close.svg +0 -5
  47. package/dist/icons/close.svg +0 -3
  48. package/dist/icons/closeeye.svg +0 -4
  49. package/dist/icons/cloud.svg +0 -3
  50. package/dist/icons/computer.svg +0 -3
  51. package/dist/icons/configuration.svg +0 -5
  52. package/dist/icons/create.svg +0 -3
  53. package/dist/icons/create_flowchart.svg +0 -6
  54. package/dist/icons/credit.svg +0 -5
  55. package/dist/icons/cursor_rectangle_selection.svg +0 -4
  56. package/dist/icons/delivered.svg +0 -3
  57. package/dist/icons/dialer.svg +0 -5
  58. package/dist/icons/dialer_filled.svg +0 -4
  59. package/dist/icons/divider.svg +0 -5
  60. package/dist/icons/dnd_list.svg +0 -4
  61. package/dist/icons/document.svg +0 -3
  62. package/dist/icons/download.svg +0 -3
  63. package/dist/icons/download_circle.svg +0 -4
  64. package/dist/icons/drawer.svg +0 -3
  65. package/dist/icons/drawer_fill.svg +0 -4
  66. package/dist/icons/edit.svg +0 -4
  67. package/dist/icons/edit2.svg +0 -3
  68. package/dist/icons/editor.svg +0 -5
  69. package/dist/icons/eye.svg +0 -4
  70. package/dist/icons/file_import.svg +0 -4
  71. package/dist/icons/file_view.svg +0 -5
  72. package/dist/icons/filter.svg +0 -3
  73. package/dist/icons/filter2.svg +0 -4
  74. package/dist/icons/filter_pending_fill.svg +0 -4
  75. package/dist/icons/floppy_disk.svg +0 -5
  76. package/dist/icons/flowchart.svg +0 -4
  77. package/dist/icons/flowchart2.svg +0 -6
  78. package/dist/icons/folder_details.svg +0 -4
  79. package/dist/icons/group.svg +0 -3
  80. package/dist/icons/group_add.svg +0 -6
  81. package/dist/icons/group_fill.svg +0 -5
  82. package/dist/icons/id.svg +0 -4
  83. package/dist/icons/id_fill.svg +0 -3
  84. package/dist/icons/image.svg +0 -4
  85. package/dist/icons/info_checkmark_badge.svg +0 -5
  86. package/dist/icons/information.svg +0 -5
  87. package/dist/icons/key.svg +0 -3
  88. package/dist/icons/line_graph_fill.svg +0 -3
  89. package/dist/icons/list.svg +0 -4
  90. package/dist/icons/list_fill.svg +0 -3
  91. package/dist/icons/logins.svg +0 -3
  92. package/dist/icons/logout.svg +0 -3
  93. package/dist/icons/mail.svg +0 -4
  94. package/dist/icons/megaphone.svg +0 -4
  95. package/dist/icons/menu-collapse.svg +0 -3
  96. package/dist/icons/menu.svg +0 -3
  97. package/dist/icons/microscope.svg +0 -5
  98. package/dist/icons/moon.svg +0 -3
  99. package/dist/icons/notification-off.svg +0 -4
  100. package/dist/icons/notification.svg +0 -3
  101. package/dist/icons/phone.svg +0 -4
  102. package/dist/icons/phonebook.svg +0 -4
  103. package/dist/icons/preference_filter_horizontal.svg +0 -3
  104. package/dist/icons/property_search.svg +0 -5
  105. package/dist/icons/quality_check.svg +0 -5
  106. package/dist/icons/refresh.svg +0 -3
  107. package/dist/icons/reject_badge.svg +0 -4
  108. package/dist/icons/reports.svg +0 -4
  109. package/dist/icons/reports2.svg +0 -5
  110. package/dist/icons/reset.svg +0 -3
  111. package/dist/icons/search.svg +0 -3
  112. package/dist/icons/send.svg +0 -3
  113. package/dist/icons/server.svg +0 -4
  114. package/dist/icons/settings.svg +0 -4
  115. package/dist/icons/settings2.svg +0 -4
  116. package/dist/icons/smile.svg +0 -5
  117. package/dist/icons/sms.svg +0 -4
  118. package/dist/icons/sms_add.svg +0 -5
  119. package/dist/icons/social.svg +0 -4
  120. package/dist/icons/spacer_spacing.svg +0 -3
  121. package/dist/icons/spam_fill.svg +0 -3
  122. package/dist/icons/spam_management.svg +0 -5
  123. package/dist/icons/split.svg +0 -3
  124. package/dist/icons/sun.svg +0 -3
  125. package/dist/icons/switch.svg +0 -5
  126. package/dist/icons/switch_fill.svg +0 -9
  127. package/dist/icons/tag.svg +0 -5
  128. package/dist/icons/tag2.svg +0 -6
  129. package/dist/icons/template.svg +0 -4
  130. package/dist/icons/template_fill.svg +0 -3
  131. package/dist/icons/text.svg +0 -4
  132. package/dist/icons/tick_circle_fill.svg +0 -3
  133. package/dist/icons/time_clock_reset_redo.svg +0 -4
  134. package/dist/icons/tps_management.svg +0 -4
  135. package/dist/icons/upload.svg +0 -3
  136. package/dist/icons/user.svg +0 -4
  137. package/dist/icons/user_circle.svg +0 -5
  138. package/dist/icons/user_circle_fill.svg +0 -4
  139. package/dist/icons/user_fill.svg +0 -4
  140. package/dist/icons/user_frame.svg +0 -5
  141. package/dist/icons/user_info.svg +0 -6
  142. package/dist/icons/user_setting.svg +0 -4
  143. package/dist/icons/user_setting_fill.svg +0 -3
  144. package/dist/icons/web.svg +0 -5
  145. package/dist/icons/whatsapp.svg +0 -5
  146. package/dist/icons/wrapper.svg +0 -3
package/README.md CHANGED
@@ -181,15 +181,15 @@ Use TypeScript autocomplete to see all available icon names, or check the `IconN
181
181
 
182
182
  ### Icon Component Props
183
183
 
184
- | Prop | Type | Default | Description |
185
- | --------------- | --------------------- | --------------- | -------------------------------------------------------- |
186
- | `name` | `IconName` | **required** | The name of the icon to display |
187
- | `size` | `number` | `12` | Font size of the icon (in pixels) |
188
- | `color` | `string` | - | Color of the icon (uses `currentColor` by default) |
189
- | `className` | `string` | `'_demo_glyph'` | CSS class for the wrapper div. Use `''` for inline icons |
190
- | `iconClassName` | `string` | `'icon'` | CSS class for the icon span element |
191
- | `showLabel` | `boolean` | `false` | Show the icon name as a label |
192
- | `style` | `React.CSSProperties` | - | Inline styles to apply |
184
+ | Prop | Type | Default | Description |
185
+ | --------------- | --------------------- | --------------- | ------------------------------------------------------------------------------------------------------ |
186
+ | `name` | `IconName` | **required** | The name of the icon to display. Must be a valid icon name from the icon map. |
187
+ | `size` | `number` | `12` | Font size of the icon in pixels. |
188
+ | `color` | `string` | - | Color of the icon. Uses `currentColor` by default if not specified. |
189
+ | `className` | `string \| undefined` | `'_demo_glyph'` | CSS class for the wrapper div. Use `''` (empty string) to render only the icon span without a wrapper. |
190
+ | `iconClassName` | `string` | `'icon'` | CSS class for the icon span element. This is added alongside the `icon-{name}` class. |
191
+ | `showLabel` | `boolean` | `false` | Whether to display the icon name as a label below the icon. |
192
+ | `style` | `React.CSSProperties` | - | Inline styles to apply to the wrapper element (or icon span if `className` is empty string). |
193
193
 
194
194
  ### TypeScript Types
195
195
 
@@ -218,19 +218,22 @@ const html = generateIconFontHTML('spam_management');
218
218
 
219
219
  ## HTML/CSS Usage
220
220
 
221
- You can also use icons directly in HTML. **Make sure to include the CSS file first:**
221
+ You can also use icons directly in HTML without React. **Make sure to include the CSS file first:**
222
222
 
223
223
  ```html
224
224
  <!-- Required: Import the CSS file -->
225
225
  <link rel="stylesheet" href="node_modules/firebird-icon-lib/dist/style.css" />
226
226
 
227
- <!-- Then use icons in your HTML -->
228
- <div class="_demo_glyph">
229
- <span class="icon">&#xf000;</span> icon-spam_management
230
- </div>
227
+ <!-- Then use icons in your HTML with the icon-{name} class format -->
228
+ <span class="icon-cash"></span>
229
+ <span class="icon-search"></span>
230
+ <span class="icon-spam_management"></span>
231
+
232
+ <!-- Or with the wrapper div for demo purposes -->
233
+ <div class="_demo_glyph"><span class="icon-cash"></span> icon-cash</div>
231
234
  ```
232
235
 
233
- The CSS file is required as it contains the `@font-face` declaration and icon styles needed for the fonts to work.
236
+ The CSS file is required as it contains the `@font-face` declaration and icon styles (using `:before` pseudo-elements) needed for the fonts to work. Each icon uses the class format `icon-{iconName}` where `{iconName}` matches the icon name from the icon map.
234
237
 
235
238
  ## Development
236
239
 
package/dist/Icon.d.ts CHANGED
@@ -1,22 +1,77 @@
1
1
  import React from 'react';
2
2
  import type { IconName } from './iconMap';
3
+ /**
4
+ * Props for the Icon component
5
+ *
6
+ * @interface IconProps
7
+ */
3
8
  export interface IconProps {
9
+ /** The name of the icon to display. Must be a valid icon name from the icon map. */
4
10
  name: IconName;
11
+ /**
12
+ * CSS class name for the wrapper div element.
13
+ * - If `undefined`: defaults to `'_demo_glyph'`
14
+ * - If `''` (empty string): renders only the icon span without a wrapper div
15
+ * - If a string value: uses that as the wrapper class name
16
+ */
5
17
  className?: string;
18
+ /**
19
+ * CSS class name for the icon span element.
20
+ * @default 'icon'
21
+ */
6
22
  iconClassName?: string;
23
+ /**
24
+ * Whether to display the icon name as a label below the icon.
25
+ * @default false
26
+ */
7
27
  showLabel?: boolean;
28
+ /**
29
+ * Inline styles to apply to the wrapper element (or icon span if className is empty).
30
+ */
8
31
  style?: React.CSSProperties;
32
+ /**
33
+ * Color of the icon. Uses `currentColor` by default if not specified.
34
+ */
9
35
  color?: string;
36
+ /**
37
+ * Font size of the icon in pixels.
38
+ * @default 12
39
+ */
10
40
  size?: number;
11
41
  }
12
42
  /**
13
- * Icon component - Renders icons using icon font (span-based)
43
+ * Icon component that renders icons using icon font (CSS-based icon font).
14
44
  *
45
+ * This component uses CSS classes and the `:before` pseudo-element to display icons
46
+ * from the icon font. The icon font must be loaded via the `style.css` file.
47
+ *
48
+ * @component
15
49
  * @example
16
50
  * ```tsx
51
+ * // Basic usage
17
52
  * <Icon name="spam_management" />
53
+ *
54
+ * // With custom size and color
55
+ * <Icon name="search" size={24} color="#ff0000" />
56
+ *
57
+ * // Inline icon (no wrapper div)
58
+ * <Icon name="search" size={20} className="" />
59
+ *
60
+ * // With label
18
61
  * <Icon name="add" showLabel={true} />
62
+ *
63
+ * // With custom styling
64
+ * <Icon
65
+ * name="settings"
66
+ * size={32}
67
+ * color="#646cff"
68
+ * className="my-icon-wrapper"
69
+ * style={{ margin: '10px' }}
70
+ * />
19
71
  * ```
72
+ *
73
+ * @param {IconProps} props - The component props
74
+ * @returns {JSX.Element | null} The rendered icon component or null if icon not found
20
75
  */
21
76
  export declare const Icon: React.FC<IconProps>;
22
77
  export default Icon;
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../src/Icon.tsx"],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