@cdx-ui/icons 0.0.1-beta.106 → 0.0.1-beta.108

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/README.md CHANGED
@@ -227,10 +227,40 @@ Generated files (gitignored, like `src/icons/`):
227
227
  - `src/tab-icons/assets/{name}[-fill][@2x|@3x].png` — template PNGs (black + alpha; the tab bar tints them at runtime)
228
228
  - `src/tab-icons/generated/{name}.ts` — web descriptor (SVG component only, no asset imports)
229
229
  - `src/tab-icons/generated/{name}.native.ts` — native descriptor with static `require()` asset imports
230
- - `src/tab-icons/generated/index.ts` — barrel exporting `{Name}TabIcon` descriptors
230
+ - `src/tab-icons/generated/registry.ts` — `TAB_ICON_NAMES` tuple, `TabIconName` type, and `TAB_ICON_COMPONENTS` map
231
+ - `src/tab-icons/generated/index.ts` — barrel exporting descriptors + registry
231
232
 
232
233
  To add an icon to the curated set, add its base name to `tab-icons.config.json` and rebuild — unknown names fail the build. Consumer-facing usage is documented in [docs/icons.md § Bottom Tab Icons](../../docs/icons.md#bottom-tab-icons).
233
234
 
235
+ ### Tab icon registry
236
+
237
+ The generation script also emits a **registry module** that provides programmatic access to the curated tab icon set. All three exports are available from the `@cdx-ui/icons/tab-icons` subpath:
238
+
239
+ | Export | Type | Description |
240
+ | -------------------- | --------------------------------- | ---------------------------------------------------------------- |
241
+ | `TAB_ICON_NAMES` | `readonly string[]` (const tuple) | Sorted array of all snake_case icon names from the config |
242
+ | `TabIconName` | union type | String literal union derived from the tuple (e.g. `'home' \| 'settings' \| …`) |
243
+ | `TAB_ICON_COMPONENTS`| `Record<TabIconName, ForgeIcon>` | Maps each name to its SVG icon component |
244
+
245
+ ```tsx
246
+ import {
247
+ TAB_ICON_NAMES,
248
+ TAB_ICON_COMPONENTS,
249
+ type TabIconName,
250
+ } from '@cdx-ui/icons/tab-icons';
251
+
252
+ // Iterate available names
253
+ TAB_ICON_NAMES.forEach(name => console.log(name));
254
+
255
+ // Look up a component by name
256
+ const Icon = TAB_ICON_COMPONENTS['home'];
257
+
258
+ // Type-safe name parameter
259
+ function getTabIcon(name: TabIconName) {
260
+ return TAB_ICON_COMPONENTS[name];
261
+ }
262
+ ```
263
+
234
264
  ### Building
235
265
 
236
266
  ```sh
@@ -195,6 +195,18 @@ Object.defineProperty(exports, "SwapHorizTabIcon", {
195
195
  return _swap_horiz.default;
196
196
  }
197
197
  });
198
+ Object.defineProperty(exports, "TAB_ICON_COMPONENTS", {
199
+ enumerable: true,
200
+ get: function () {
201
+ return _registry.TAB_ICON_COMPONENTS;
202
+ }
203
+ });
204
+ Object.defineProperty(exports, "TAB_ICON_NAMES", {
205
+ enumerable: true,
206
+ get: function () {
207
+ return _registry.TAB_ICON_NAMES;
208
+ }
209
+ });
198
210
  Object.defineProperty(exports, "TrendingUpTabIcon", {
199
211
  enumerable: true,
200
212
  get: function () {
@@ -234,4 +246,5 @@ var _star = _interopRequireDefault(require("./star"));
234
246
  var _support_agent = _interopRequireDefault(require("./support_agent"));
235
247
  var _swap_horiz = _interopRequireDefault(require("./swap_horiz"));
236
248
  var _trending_up = _interopRequireDefault(require("./trending_up"));
249
+ var _registry = require("./registry");
237
250
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.TAB_ICON_NAMES = exports.TAB_ICON_COMPONENTS = void 0;
7
+ var _account_balance = _interopRequireDefault(require("../../icons/account_balance"));
8
+ var _account_balance_wallet = _interopRequireDefault(require("../../icons/account_balance_wallet"));
9
+ var _account_circle = _interopRequireDefault(require("../../icons/account_circle"));
10
+ var _attach_money = _interopRequireDefault(require("../../icons/attach_money"));
11
+ var _chat = _interopRequireDefault(require("../../icons/chat"));
12
+ var _compare_arrows = _interopRequireDefault(require("../../icons/compare_arrows"));
13
+ var _credit_card = _interopRequireDefault(require("../../icons/credit_card"));
14
+ var _dashboard = _interopRequireDefault(require("../../icons/dashboard"));
15
+ var _grid_view = _interopRequireDefault(require("../../icons/grid_view"));
16
+ var _help = _interopRequireDefault(require("../../icons/help"));
17
+ var _history = _interopRequireDefault(require("../../icons/history"));
18
+ var _home = _interopRequireDefault(require("../../icons/home"));
19
+ var _location_on = _interopRequireDefault(require("../../icons/location_on"));
20
+ var _mail = _interopRequireDefault(require("../../icons/mail"));
21
+ var _menu = _interopRequireDefault(require("../../icons/menu"));
22
+ var _mobile_camera = _interopRequireDefault(require("../../icons/mobile_camera"));
23
+ var _more_horiz = _interopRequireDefault(require("../../icons/more_horiz"));
24
+ var _notifications = _interopRequireDefault(require("../../icons/notifications"));
25
+ var _payments = _interopRequireDefault(require("../../icons/payments"));
26
+ var _person = _interopRequireDefault(require("../../icons/person"));
27
+ var _photo_camera = _interopRequireDefault(require("../../icons/photo_camera"));
28
+ var _pie_chart = _interopRequireDefault(require("../../icons/pie_chart"));
29
+ var _qr_code_scanner = _interopRequireDefault(require("../../icons/qr_code_scanner"));
30
+ var _receipt_long = _interopRequireDefault(require("../../icons/receipt_long"));
31
+ var _savings = _interopRequireDefault(require("../../icons/savings"));
32
+ var _search = _interopRequireDefault(require("../../icons/search"));
33
+ var _security = _interopRequireDefault(require("../../icons/security"));
34
+ var _send = _interopRequireDefault(require("../../icons/send"));
35
+ var _settings = _interopRequireDefault(require("../../icons/settings"));
36
+ var _star = _interopRequireDefault(require("../../icons/star"));
37
+ var _support_agent = _interopRequireDefault(require("../../icons/support_agent"));
38
+ var _swap_horiz = _interopRequireDefault(require("../../icons/swap_horiz"));
39
+ var _trending_up = _interopRequireDefault(require("../../icons/trending_up"));
40
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
41
+ const TAB_ICON_NAMES = exports.TAB_ICON_NAMES = ['account_balance', 'account_balance_wallet', 'account_circle', 'attach_money', 'chat', 'compare_arrows', 'credit_card', 'dashboard', 'grid_view', 'help', 'history', 'home', 'location_on', 'mail', 'menu', 'mobile_camera', 'more_horiz', 'notifications', 'payments', 'person', 'photo_camera', 'pie_chart', 'qr_code_scanner', 'receipt_long', 'savings', 'search', 'security', 'send', 'settings', 'star', 'support_agent', 'swap_horiz', 'trending_up'];
42
+ const TAB_ICON_COMPONENTS = exports.TAB_ICON_COMPONENTS = {
43
+ account_balance: _account_balance.default,
44
+ account_balance_wallet: _account_balance_wallet.default,
45
+ account_circle: _account_circle.default,
46
+ attach_money: _attach_money.default,
47
+ chat: _chat.default,
48
+ compare_arrows: _compare_arrows.default,
49
+ credit_card: _credit_card.default,
50
+ dashboard: _dashboard.default,
51
+ grid_view: _grid_view.default,
52
+ help: _help.default,
53
+ history: _history.default,
54
+ home: _home.default,
55
+ location_on: _location_on.default,
56
+ mail: _mail.default,
57
+ menu: _menu.default,
58
+ mobile_camera: _mobile_camera.default,
59
+ more_horiz: _more_horiz.default,
60
+ notifications: _notifications.default,
61
+ payments: _payments.default,
62
+ person: _person.default,
63
+ photo_camera: _photo_camera.default,
64
+ pie_chart: _pie_chart.default,
65
+ qr_code_scanner: _qr_code_scanner.default,
66
+ receipt_long: _receipt_long.default,
67
+ savings: _savings.default,
68
+ search: _search.default,
69
+ security: _security.default,
70
+ send: _send.default,
71
+ settings: _settings.default,
72
+ star: _star.default,
73
+ support_agent: _support_agent.default,
74
+ swap_horiz: _swap_horiz.default,
75
+ trending_up: _trending_up.default
76
+ };
@@ -32,4 +32,5 @@ export { default as SettingsTabIcon } from './settings';
32
32
  export { default as StarTabIcon } from './star';
33
33
  export { default as SupportAgentTabIcon } from './support_agent';
34
34
  export { default as SwapHorizTabIcon } from './swap_horiz';
35
- export { default as TrendingUpTabIcon } from './trending_up';
35
+ export { default as TrendingUpTabIcon } from './trending_up';
36
+ export { TAB_ICON_NAMES, TAB_ICON_COMPONENTS } from './registry';
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+
3
+ import AccountBalance from '../../icons/account_balance';
4
+ import AccountBalanceWallet from '../../icons/account_balance_wallet';
5
+ import AccountCircle from '../../icons/account_circle';
6
+ import AttachMoney from '../../icons/attach_money';
7
+ import Chat from '../../icons/chat';
8
+ import CompareArrows from '../../icons/compare_arrows';
9
+ import CreditCard from '../../icons/credit_card';
10
+ import Dashboard from '../../icons/dashboard';
11
+ import GridView from '../../icons/grid_view';
12
+ import Help from '../../icons/help';
13
+ import History from '../../icons/history';
14
+ import Home from '../../icons/home';
15
+ import LocationOn from '../../icons/location_on';
16
+ import Mail from '../../icons/mail';
17
+ import Menu from '../../icons/menu';
18
+ import MobileCamera from '../../icons/mobile_camera';
19
+ import MoreHoriz from '../../icons/more_horiz';
20
+ import Notifications from '../../icons/notifications';
21
+ import Payments from '../../icons/payments';
22
+ import Person from '../../icons/person';
23
+ import PhotoCamera from '../../icons/photo_camera';
24
+ import PieChart from '../../icons/pie_chart';
25
+ import QrCodeScanner from '../../icons/qr_code_scanner';
26
+ import ReceiptLong from '../../icons/receipt_long';
27
+ import Savings from '../../icons/savings';
28
+ import Search from '../../icons/search';
29
+ import Security from '../../icons/security';
30
+ import Send from '../../icons/send';
31
+ import Settings from '../../icons/settings';
32
+ import Star from '../../icons/star';
33
+ import SupportAgent from '../../icons/support_agent';
34
+ import SwapHoriz from '../../icons/swap_horiz';
35
+ import TrendingUp from '../../icons/trending_up';
36
+ export const TAB_ICON_NAMES = ['account_balance', 'account_balance_wallet', 'account_circle', 'attach_money', 'chat', 'compare_arrows', 'credit_card', 'dashboard', 'grid_view', 'help', 'history', 'home', 'location_on', 'mail', 'menu', 'mobile_camera', 'more_horiz', 'notifications', 'payments', 'person', 'photo_camera', 'pie_chart', 'qr_code_scanner', 'receipt_long', 'savings', 'search', 'security', 'send', 'settings', 'star', 'support_agent', 'swap_horiz', 'trending_up'];
37
+ export const TAB_ICON_COMPONENTS = {
38
+ account_balance: AccountBalance,
39
+ account_balance_wallet: AccountBalanceWallet,
40
+ account_circle: AccountCircle,
41
+ attach_money: AttachMoney,
42
+ chat: Chat,
43
+ compare_arrows: CompareArrows,
44
+ credit_card: CreditCard,
45
+ dashboard: Dashboard,
46
+ grid_view: GridView,
47
+ help: Help,
48
+ history: History,
49
+ home: Home,
50
+ location_on: LocationOn,
51
+ mail: Mail,
52
+ menu: Menu,
53
+ mobile_camera: MobileCamera,
54
+ more_horiz: MoreHoriz,
55
+ notifications: Notifications,
56
+ payments: Payments,
57
+ person: Person,
58
+ photo_camera: PhotoCamera,
59
+ pie_chart: PieChart,
60
+ qr_code_scanner: QrCodeScanner,
61
+ receipt_long: ReceiptLong,
62
+ savings: Savings,
63
+ search: Search,
64
+ security: Security,
65
+ send: Send,
66
+ settings: Settings,
67
+ star: Star,
68
+ support_agent: SupportAgent,
69
+ swap_horiz: SwapHoriz,
70
+ trending_up: TrendingUp
71
+ };
@@ -31,4 +31,6 @@ export { default as StarTabIcon } from './star';
31
31
  export { default as SupportAgentTabIcon } from './support_agent';
32
32
  export { default as SwapHorizTabIcon } from './swap_horiz';
33
33
  export { default as TrendingUpTabIcon } from './trending_up';
34
+ export { TAB_ICON_NAMES, TAB_ICON_COMPONENTS } from './registry';
35
+ export type { TabIconName } from './registry';
34
36
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,5 @@
1
+ import type { ForgeIcon } from '../../types';
2
+ export declare const TAB_ICON_NAMES: readonly ["account_balance", "account_balance_wallet", "account_circle", "attach_money", "chat", "compare_arrows", "credit_card", "dashboard", "grid_view", "help", "history", "home", "location_on", "mail", "menu", "mobile_camera", "more_horiz", "notifications", "payments", "person", "photo_camera", "pie_chart", "qr_code_scanner", "receipt_long", "savings", "search", "security", "send", "settings", "star", "support_agent", "swap_horiz", "trending_up"];
3
+ export type TabIconName = (typeof TAB_ICON_NAMES)[number];
4
+ export declare const TAB_ICON_COMPONENTS: Record<TabIconName, ForgeIcon>;
5
+ //# sourceMappingURL=registry.d.ts.map
@@ -1,3 +1,4 @@
1
1
  export * from './generated';
2
2
  export type { ForgeTabIcon, ForgeTabIconNativeSources } from './types';
3
+ export type { TabIconName } from './generated/registry';
3
4
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdx-ui/icons",
3
- "version": "0.0.1-beta.106",
3
+ "version": "0.0.1-beta.108",
4
4
  "main": "lib/commonjs/index.js",
5
5
  "module": "lib/module/index.js",
6
6
  "react-native": "lib/module/index.js",