mozaic-mcp-server 1.0.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.
- package/INSTALLATION.md +232 -0
- package/README.md +262 -0
- package/SKILLS.md +411 -0
- package/bin/install-skills.js +171 -0
- package/data/mozaic.db +0 -0
- package/data/mozaic.db-shm +0 -0
- package/data/mozaic.db-wal +0 -0
- package/dist/__tests__/sanity-check.test.d.ts +2 -0
- package/dist/__tests__/sanity-check.test.d.ts.map +1 -0
- package/dist/__tests__/sanity-check.test.js +167 -0
- package/dist/__tests__/sanity-check.test.js.map +1 -0
- package/dist/__tests__/tools.integration.test.d.ts +2 -0
- package/dist/__tests__/tools.integration.test.d.ts.map +1 -0
- package/dist/__tests__/tools.integration.test.js +220 -0
- package/dist/__tests__/tools.integration.test.js.map +1 -0
- package/dist/db/queries.d.ts +144 -0
- package/dist/db/queries.d.ts.map +1 -0
- package/dist/db/queries.js +536 -0
- package/dist/db/queries.js.map +1 -0
- package/dist/db/schema.d.ts +4 -0
- package/dist/db/schema.d.ts.map +1 -0
- package/dist/db/schema.js +253 -0
- package/dist/db/schema.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +416 -0
- package/dist/index.js.map +1 -0
- package/dist/parsers/__tests__/docs-parser.test.d.ts +2 -0
- package/dist/parsers/__tests__/docs-parser.test.d.ts.map +1 -0
- package/dist/parsers/__tests__/docs-parser.test.js +251 -0
- package/dist/parsers/__tests__/docs-parser.test.js.map +1 -0
- package/dist/parsers/__tests__/icons-parser.test.d.ts +2 -0
- package/dist/parsers/__tests__/icons-parser.test.d.ts.map +1 -0
- package/dist/parsers/__tests__/icons-parser.test.js +169 -0
- package/dist/parsers/__tests__/icons-parser.test.js.map +1 -0
- package/dist/parsers/__tests__/react-parser.test.d.ts +2 -0
- package/dist/parsers/__tests__/react-parser.test.d.ts.map +1 -0
- package/dist/parsers/__tests__/react-parser.test.js +274 -0
- package/dist/parsers/__tests__/react-parser.test.js.map +1 -0
- package/dist/parsers/__tests__/scss-parser.test.d.ts +2 -0
- package/dist/parsers/__tests__/scss-parser.test.d.ts.map +1 -0
- package/dist/parsers/__tests__/scss-parser.test.js +364 -0
- package/dist/parsers/__tests__/scss-parser.test.js.map +1 -0
- package/dist/parsers/__tests__/tokens-parser.test.d.ts +2 -0
- package/dist/parsers/__tests__/tokens-parser.test.d.ts.map +1 -0
- package/dist/parsers/__tests__/tokens-parser.test.js +172 -0
- package/dist/parsers/__tests__/tokens-parser.test.js.map +1 -0
- package/dist/parsers/__tests__/vue-parser.test.d.ts +2 -0
- package/dist/parsers/__tests__/vue-parser.test.d.ts.map +1 -0
- package/dist/parsers/__tests__/vue-parser.test.js +207 -0
- package/dist/parsers/__tests__/vue-parser.test.js.map +1 -0
- package/dist/parsers/docs-parser.d.ts +4 -0
- package/dist/parsers/docs-parser.d.ts.map +1 -0
- package/dist/parsers/docs-parser.js +237 -0
- package/dist/parsers/docs-parser.js.map +1 -0
- package/dist/parsers/icons-parser.d.ts +33 -0
- package/dist/parsers/icons-parser.d.ts.map +1 -0
- package/dist/parsers/icons-parser.js +125 -0
- package/dist/parsers/icons-parser.js.map +1 -0
- package/dist/parsers/react-parser.d.ts +3 -0
- package/dist/parsers/react-parser.d.ts.map +1 -0
- package/dist/parsers/react-parser.js +406 -0
- package/dist/parsers/react-parser.js.map +1 -0
- package/dist/parsers/scss-parser.d.ts +9 -0
- package/dist/parsers/scss-parser.d.ts.map +1 -0
- package/dist/parsers/scss-parser.js +351 -0
- package/dist/parsers/scss-parser.js.map +1 -0
- package/dist/parsers/tokens/border-parser.d.ts +3 -0
- package/dist/parsers/tokens/border-parser.d.ts.map +1 -0
- package/dist/parsers/tokens/border-parser.js +83 -0
- package/dist/parsers/tokens/border-parser.js.map +1 -0
- package/dist/parsers/tokens/color-parser.d.ts +3 -0
- package/dist/parsers/tokens/color-parser.d.ts.map +1 -0
- package/dist/parsers/tokens/color-parser.js +88 -0
- package/dist/parsers/tokens/color-parser.js.map +1 -0
- package/dist/parsers/tokens/grid-parser.d.ts +3 -0
- package/dist/parsers/tokens/grid-parser.d.ts.map +1 -0
- package/dist/parsers/tokens/grid-parser.js +97 -0
- package/dist/parsers/tokens/grid-parser.js.map +1 -0
- package/dist/parsers/tokens/index.d.ts +9 -0
- package/dist/parsers/tokens/index.d.ts.map +1 -0
- package/dist/parsers/tokens/index.js +10 -0
- package/dist/parsers/tokens/index.js.map +1 -0
- package/dist/parsers/tokens/screen-parser.d.ts +3 -0
- package/dist/parsers/tokens/screen-parser.d.ts.map +1 -0
- package/dist/parsers/tokens/screen-parser.js +54 -0
- package/dist/parsers/tokens/screen-parser.js.map +1 -0
- package/dist/parsers/tokens/shadow-parser.d.ts +3 -0
- package/dist/parsers/tokens/shadow-parser.d.ts.map +1 -0
- package/dist/parsers/tokens/shadow-parser.js +62 -0
- package/dist/parsers/tokens/shadow-parser.js.map +1 -0
- package/dist/parsers/tokens/spacing-parser.d.ts +4 -0
- package/dist/parsers/tokens/spacing-parser.d.ts.map +1 -0
- package/dist/parsers/tokens/spacing-parser.js +85 -0
- package/dist/parsers/tokens/spacing-parser.js.map +1 -0
- package/dist/parsers/tokens/types.d.ts +33 -0
- package/dist/parsers/tokens/types.d.ts.map +1 -0
- package/dist/parsers/tokens/types.js +42 -0
- package/dist/parsers/tokens/types.js.map +1 -0
- package/dist/parsers/tokens/typography-parser.d.ts +3 -0
- package/dist/parsers/tokens/typography-parser.d.ts.map +1 -0
- package/dist/parsers/tokens/typography-parser.js +76 -0
- package/dist/parsers/tokens/typography-parser.js.map +1 -0
- package/dist/parsers/tokens-parser.d.ts +18 -0
- package/dist/parsers/tokens-parser.d.ts.map +1 -0
- package/dist/parsers/tokens-parser.js +57 -0
- package/dist/parsers/tokens-parser.js.map +1 -0
- package/dist/parsers/vue-parser.d.ts +3 -0
- package/dist/parsers/vue-parser.d.ts.map +1 -0
- package/dist/parsers/vue-parser.js +343 -0
- package/dist/parsers/vue-parser.js.map +1 -0
- package/dist/tools/generate-react-component.d.ts +35 -0
- package/dist/tools/generate-react-component.d.ts.map +1 -0
- package/dist/tools/generate-react-component.js +81 -0
- package/dist/tools/generate-react-component.js.map +1 -0
- package/dist/tools/generate-vue-component.d.ts +35 -0
- package/dist/tools/generate-vue-component.d.ts.map +1 -0
- package/dist/tools/generate-vue-component.js +81 -0
- package/dist/tools/generate-vue-component.js.map +1 -0
- package/dist/tools/get-component-info.d.ts +52 -0
- package/dist/tools/get-component-info.d.ts.map +1 -0
- package/dist/tools/get-component-info.js +94 -0
- package/dist/tools/get-component-info.js.map +1 -0
- package/dist/tools/get-css-utility.d.ts +41 -0
- package/dist/tools/get-css-utility.d.ts.map +1 -0
- package/dist/tools/get-css-utility.js +57 -0
- package/dist/tools/get-css-utility.js.map +1 -0
- package/dist/tools/get-design-tokens.d.ts +44 -0
- package/dist/tools/get-design-tokens.d.ts.map +1 -0
- package/dist/tools/get-design-tokens.js +124 -0
- package/dist/tools/get-design-tokens.js.map +1 -0
- package/dist/tools/get-icon.d.ts +32 -0
- package/dist/tools/get-icon.d.ts.map +1 -0
- package/dist/tools/get-icon.js +108 -0
- package/dist/tools/get-icon.js.map +1 -0
- package/dist/tools/get-install-info.d.ts +39 -0
- package/dist/tools/get-install-info.d.ts.map +1 -0
- package/dist/tools/get-install-info.js +160 -0
- package/dist/tools/get-install-info.js.map +1 -0
- package/dist/tools/list-components.d.ts +32 -0
- package/dist/tools/list-components.d.ts.map +1 -0
- package/dist/tools/list-components.js +62 -0
- package/dist/tools/list-components.js.map +1 -0
- package/dist/tools/list-css-utilities.d.ts +27 -0
- package/dist/tools/list-css-utilities.d.ts.map +1 -0
- package/dist/tools/list-css-utilities.js +48 -0
- package/dist/tools/list-css-utilities.js.map +1 -0
- package/dist/tools/search-documentation.d.ts +37 -0
- package/dist/tools/search-documentation.d.ts.map +1 -0
- package/dist/tools/search-documentation.js +120 -0
- package/dist/tools/search-documentation.js.map +1 -0
- package/dist/tools/search-icons.d.ts +41 -0
- package/dist/tools/search-icons.d.ts.map +1 -0
- package/dist/tools/search-icons.js +134 -0
- package/dist/tools/search-icons.js.map +1 -0
- package/package.json +98 -0
- package/skills/mozaic-css-utilities/skill.md +633 -0
- package/skills/mozaic-design-tokens/skill.md +621 -0
- package/skills/mozaic-icons/skill.md +624 -0
- package/skills/mozaic-react-builder/skill.md +652 -0
- package/skills/mozaic-vue-builder/skill.md +491 -0
|
@@ -0,0 +1,624 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mozaic-icons
|
|
3
|
+
description: Mozaic icon search and integration for Vue & React. Search icons by name or type, view multiple sizes (16, 24, 32, 48, 64), and generate framework-specific code with proper imports.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Mozaic Icons
|
|
8
|
+
|
|
9
|
+
An expert assistant for discovering and integrating Mozaic Design System icons. Search through the icon library, preview different sizes, and generate ready-to-use code for Vue or React applications.
|
|
10
|
+
|
|
11
|
+
## What This Skill Does
|
|
12
|
+
|
|
13
|
+
1. **Search Icons**: Find icons by keyword or description
|
|
14
|
+
2. **Browse by Type**: Explore icons by category (navigation, media, social, payment, etc.)
|
|
15
|
+
3. **Filter by Size**: View available sizes (16px, 24px, 32px, 48px, 64px)
|
|
16
|
+
4. **Preview Icons**: See icon names, types, and available sizes
|
|
17
|
+
5. **Generate Code**: Create framework-specific code (Vue or React) with proper imports
|
|
18
|
+
6. **Get SVG**: Access raw SVG markup for custom usage
|
|
19
|
+
|
|
20
|
+
## MCP Tools Used
|
|
21
|
+
|
|
22
|
+
This skill uses the Mozaic MCP server tools:
|
|
23
|
+
- `mcp__mozaic__search_icons` - Search icons by name, type, or size
|
|
24
|
+
- `mcp__mozaic__get_icon` - Get specific icon with SVG and framework code
|
|
25
|
+
|
|
26
|
+
## When to Use This Skill
|
|
27
|
+
|
|
28
|
+
Use this skill when you:
|
|
29
|
+
- Need to find an icon for your UI
|
|
30
|
+
- Want to browse available icons by category
|
|
31
|
+
- Need icons in specific sizes
|
|
32
|
+
- Want to integrate icons in Vue or React
|
|
33
|
+
- Need SVG code for custom usage
|
|
34
|
+
- Are building navigation, actions, media controls, or social features
|
|
35
|
+
|
|
36
|
+
## Icon Categories
|
|
37
|
+
|
|
38
|
+
### Navigation Icons
|
|
39
|
+
- Arrows (up, down, left, right, diagonal)
|
|
40
|
+
- Chevrons (directions, expand/collapse)
|
|
41
|
+
- Menu (hamburger, dots, kebab)
|
|
42
|
+
- Close/Exit icons
|
|
43
|
+
- Back/Forward navigation
|
|
44
|
+
|
|
45
|
+
### Media Icons
|
|
46
|
+
- Play, Pause, Stop
|
|
47
|
+
- Volume controls
|
|
48
|
+
- Skip/Rewind/Fast-forward
|
|
49
|
+
- Record, Live, Broadcast
|
|
50
|
+
- Fullscreen, Picture-in-Picture
|
|
51
|
+
|
|
52
|
+
### Action Icons
|
|
53
|
+
- Edit, Delete, Save
|
|
54
|
+
- Add, Remove, Plus, Minus
|
|
55
|
+
- Search, Filter, Sort
|
|
56
|
+
- Settings, Preferences
|
|
57
|
+
- Download, Upload, Share
|
|
58
|
+
|
|
59
|
+
### Social Icons
|
|
60
|
+
- Facebook, Twitter, Instagram
|
|
61
|
+
- LinkedIn, YouTube, TikTok
|
|
62
|
+
- Pinterest, Snapchat
|
|
63
|
+
- WhatsApp, Telegram
|
|
64
|
+
|
|
65
|
+
### Commerce Icons
|
|
66
|
+
- Shopping cart, Bag
|
|
67
|
+
- Credit card, Payment
|
|
68
|
+
- Wishlist, Favorite
|
|
69
|
+
- Shipping, Delivery
|
|
70
|
+
- Tag, Price, Discount
|
|
71
|
+
|
|
72
|
+
### Interface Icons
|
|
73
|
+
- User, Profile, Account
|
|
74
|
+
- Notification, Bell, Alert
|
|
75
|
+
- Calendar, Clock, Time
|
|
76
|
+
- Location, Map, Pin
|
|
77
|
+
- Lock, Unlock, Security
|
|
78
|
+
|
|
79
|
+
### Communication Icons
|
|
80
|
+
- Email, Message, Chat
|
|
81
|
+
- Phone, Call, Video call
|
|
82
|
+
- Comment, Reply, Send
|
|
83
|
+
- Microphone, Camera
|
|
84
|
+
|
|
85
|
+
### File Icons
|
|
86
|
+
- Document, File, Folder
|
|
87
|
+
- Image, Photo, Gallery
|
|
88
|
+
- Video, Audio
|
|
89
|
+
- PDF, ZIP, Code
|
|
90
|
+
|
|
91
|
+
## Available Sizes
|
|
92
|
+
|
|
93
|
+
Mozaic icons come in multiple sizes:
|
|
94
|
+
- **16px**: Small icons for tight spaces (inline text, compact UI)
|
|
95
|
+
- **24px**: Standard size for most UI elements
|
|
96
|
+
- **32px**: Medium size for emphasis
|
|
97
|
+
- **48px**: Large icons for features, empty states
|
|
98
|
+
- **64px**: Extra large for hero sections, illustrations
|
|
99
|
+
|
|
100
|
+
## Interactive Workflow
|
|
101
|
+
|
|
102
|
+
### Step 1: Describe What You Need
|
|
103
|
+
|
|
104
|
+
When you activate this skill, I'll ask:
|
|
105
|
+
|
|
106
|
+
**"What icon are you looking for?"**
|
|
107
|
+
|
|
108
|
+
You can describe:
|
|
109
|
+
- Keyword (e.g., "arrow", "cart", "user")
|
|
110
|
+
- Action (e.g., "edit button", "delete action")
|
|
111
|
+
- Category (e.g., "social media icons", "navigation arrows")
|
|
112
|
+
- Specific icon name (e.g., "ArrowUp24")
|
|
113
|
+
|
|
114
|
+
### Step 2: Search and Filter
|
|
115
|
+
|
|
116
|
+
I'll use `mcp__mozaic__search_icons` with optional filters:
|
|
117
|
+
|
|
118
|
+
**Filters**:
|
|
119
|
+
- By name/keyword
|
|
120
|
+
- By type (navigation, media, social, etc.)
|
|
121
|
+
- By size (16, 24, 32, 48, 64)
|
|
122
|
+
|
|
123
|
+
### Step 3: Show Results
|
|
124
|
+
|
|
125
|
+
Display matching icons with:
|
|
126
|
+
- Icon name
|
|
127
|
+
- Type/category
|
|
128
|
+
- Available sizes
|
|
129
|
+
- Brief description
|
|
130
|
+
|
|
131
|
+
**Example Results**:
|
|
132
|
+
```
|
|
133
|
+
Found 8 arrow icons:
|
|
134
|
+
|
|
135
|
+
1. ArrowUp (Navigation)
|
|
136
|
+
Sizes: 16, 24, 32
|
|
137
|
+
Upward pointing arrow
|
|
138
|
+
|
|
139
|
+
2. ArrowDown (Navigation)
|
|
140
|
+
Sizes: 16, 24, 32
|
|
141
|
+
Downward pointing arrow
|
|
142
|
+
|
|
143
|
+
3. ArrowLeft (Navigation)
|
|
144
|
+
Sizes: 16, 24, 32
|
|
145
|
+
Left pointing arrow
|
|
146
|
+
|
|
147
|
+
4. ArrowRight (Navigation)
|
|
148
|
+
Sizes: 16, 24, 32
|
|
149
|
+
Right pointing arrow
|
|
150
|
+
|
|
151
|
+
5. ArrowArrowBottom (Navigation)
|
|
152
|
+
Sizes: 16, 24
|
|
153
|
+
Download/move down action
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Step 4: Select Icon and Framework
|
|
157
|
+
|
|
158
|
+
You choose:
|
|
159
|
+
- Which icon (by number or name)
|
|
160
|
+
- Which size (16, 24, 32, 48, 64)
|
|
161
|
+
- Which framework (Vue, React, or SVG only)
|
|
162
|
+
|
|
163
|
+
### Step 5: Generate Code
|
|
164
|
+
|
|
165
|
+
I'll use `mcp__mozaic__get_icon` to provide:
|
|
166
|
+
- Import statements
|
|
167
|
+
- Component usage
|
|
168
|
+
- Props and customization
|
|
169
|
+
- Accessibility attributes
|
|
170
|
+
|
|
171
|
+
## Usage Examples
|
|
172
|
+
|
|
173
|
+
### Vue 3 Usage
|
|
174
|
+
|
|
175
|
+
```vue
|
|
176
|
+
<script setup>
|
|
177
|
+
import { IconArrowRight24 } from '@mozaic-ds/icons/vue';
|
|
178
|
+
</script>
|
|
179
|
+
|
|
180
|
+
<template>
|
|
181
|
+
<button>
|
|
182
|
+
Next
|
|
183
|
+
<IconArrowRight24 />
|
|
184
|
+
</button>
|
|
185
|
+
</template>
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
**With Props**:
|
|
189
|
+
```vue
|
|
190
|
+
<template>
|
|
191
|
+
<IconUser24
|
|
192
|
+
:size="32"
|
|
193
|
+
color="currentColor"
|
|
194
|
+
aria-label="User profile"
|
|
195
|
+
/>
|
|
196
|
+
</template>
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### React/TSX Usage
|
|
200
|
+
|
|
201
|
+
```tsx
|
|
202
|
+
import { IconArrowRight24 } from '@mozaic-ds/icons/react';
|
|
203
|
+
|
|
204
|
+
function NextButton() {
|
|
205
|
+
return (
|
|
206
|
+
<button>
|
|
207
|
+
Next
|
|
208
|
+
<IconArrowRight24 />
|
|
209
|
+
</button>
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
**With Props**:
|
|
215
|
+
```tsx
|
|
216
|
+
<IconUser24
|
|
217
|
+
size={32}
|
|
218
|
+
color="currentColor"
|
|
219
|
+
aria-label="User profile"
|
|
220
|
+
/>
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Raw SVG Usage
|
|
224
|
+
|
|
225
|
+
```html
|
|
226
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor">
|
|
227
|
+
<path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"/>
|
|
228
|
+
</svg>
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
## Common Use Cases
|
|
232
|
+
|
|
233
|
+
### Use Case 1: Button with Icon
|
|
234
|
+
|
|
235
|
+
**User**: "I need a delete button icon"
|
|
236
|
+
|
|
237
|
+
**Workflow**:
|
|
238
|
+
1. Search for "delete" or "trash"
|
|
239
|
+
2. Show Delete, Trash, Remove icons
|
|
240
|
+
3. User selects size and framework
|
|
241
|
+
4. Generate button code
|
|
242
|
+
|
|
243
|
+
**Vue Example**:
|
|
244
|
+
```vue
|
|
245
|
+
<template>
|
|
246
|
+
<button class="btn btn--danger">
|
|
247
|
+
<IconDelete24 />
|
|
248
|
+
Delete
|
|
249
|
+
</button>
|
|
250
|
+
</template>
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
**React Example**:
|
|
254
|
+
```tsx
|
|
255
|
+
<button className="btn btn--danger">
|
|
256
|
+
<IconDelete24 />
|
|
257
|
+
Delete
|
|
258
|
+
</button>
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### Use Case 2: Navigation Icons
|
|
262
|
+
|
|
263
|
+
**User**: "Need icons for navigation menu"
|
|
264
|
+
|
|
265
|
+
**Workflow**:
|
|
266
|
+
1. Browse navigation category
|
|
267
|
+
2. Show Menu, Close, Arrow icons
|
|
268
|
+
3. Generate menu toggle code
|
|
269
|
+
|
|
270
|
+
**Vue Example**:
|
|
271
|
+
```vue
|
|
272
|
+
<script setup>
|
|
273
|
+
import { ref } from 'vue';
|
|
274
|
+
import { IconMenu24, IconClose24 } from '@mozaic-ds/icons/vue';
|
|
275
|
+
|
|
276
|
+
const isOpen = ref(false);
|
|
277
|
+
</script>
|
|
278
|
+
|
|
279
|
+
<template>
|
|
280
|
+
<button @click="isOpen = !isOpen">
|
|
281
|
+
<IconMenu24 v-if="!isOpen" />
|
|
282
|
+
<IconClose24 v-else />
|
|
283
|
+
</button>
|
|
284
|
+
</template>
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
### Use Case 3: Social Media Icons
|
|
288
|
+
|
|
289
|
+
**User**: "Add social media links"
|
|
290
|
+
|
|
291
|
+
**Workflow**:
|
|
292
|
+
1. Search for social icons
|
|
293
|
+
2. Show Facebook, Twitter, Instagram, LinkedIn
|
|
294
|
+
3. Generate social links
|
|
295
|
+
|
|
296
|
+
**React Example**:
|
|
297
|
+
```tsx
|
|
298
|
+
import {
|
|
299
|
+
IconFacebook24,
|
|
300
|
+
IconTwitter24,
|
|
301
|
+
IconInstagram24,
|
|
302
|
+
IconLinkedIn24
|
|
303
|
+
} from '@mozaic-ds/icons/react';
|
|
304
|
+
|
|
305
|
+
function SocialLinks() {
|
|
306
|
+
return (
|
|
307
|
+
<div className="social-links">
|
|
308
|
+
<a href="https://facebook.com" aria-label="Facebook">
|
|
309
|
+
<IconFacebook24 />
|
|
310
|
+
</a>
|
|
311
|
+
<a href="https://twitter.com" aria-label="Twitter">
|
|
312
|
+
<IconTwitter24 />
|
|
313
|
+
</a>
|
|
314
|
+
<a href="https://instagram.com" aria-label="Instagram">
|
|
315
|
+
<IconInstagram24 />
|
|
316
|
+
</a>
|
|
317
|
+
<a href="https://linkedin.com" aria-label="LinkedIn">
|
|
318
|
+
<IconLinkedIn24 />
|
|
319
|
+
</a>
|
|
320
|
+
</div>
|
|
321
|
+
);
|
|
322
|
+
}
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
### Use Case 4: Form Input Icons
|
|
326
|
+
|
|
327
|
+
**User**: "Icons for search and password inputs"
|
|
328
|
+
|
|
329
|
+
**Workflow**:
|
|
330
|
+
1. Search for "search" and "eye"
|
|
331
|
+
2. Show Search, Eye, EyeOff icons
|
|
332
|
+
3. Generate input with icon
|
|
333
|
+
|
|
334
|
+
**Vue Example**:
|
|
335
|
+
```vue
|
|
336
|
+
<template>
|
|
337
|
+
<div class="input-group">
|
|
338
|
+
<IconSearch24 class="input-icon" />
|
|
339
|
+
<input type="text" placeholder="Search..." />
|
|
340
|
+
</div>
|
|
341
|
+
|
|
342
|
+
<div class="input-group">
|
|
343
|
+
<input :type="showPassword ? 'text' : 'password'" />
|
|
344
|
+
<button @click="showPassword = !showPassword" class="input-icon-btn">
|
|
345
|
+
<IconEye24 v-if="!showPassword" />
|
|
346
|
+
<IconEyeOff24 v-else />
|
|
347
|
+
</button>
|
|
348
|
+
</div>
|
|
349
|
+
</template>
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
### Use Case 5: Status Indicators
|
|
353
|
+
|
|
354
|
+
**User**: "Need success, error, warning icons"
|
|
355
|
+
|
|
356
|
+
**Workflow**:
|
|
357
|
+
1. Search for "check", "error", "warning"
|
|
358
|
+
2. Show CheckCircle, ErrorCircle, Warning icons
|
|
359
|
+
3. Generate status messages
|
|
360
|
+
|
|
361
|
+
**React Example**:
|
|
362
|
+
```tsx
|
|
363
|
+
import {
|
|
364
|
+
IconCheckCircle24,
|
|
365
|
+
IconErrorCircle24,
|
|
366
|
+
IconWarning24
|
|
367
|
+
} from '@mozaic-ds/icons/react';
|
|
368
|
+
|
|
369
|
+
function StatusMessage({ type, message }: { type: string; message: string }) {
|
|
370
|
+
const icons = {
|
|
371
|
+
success: <IconCheckCircle24 color="green" />,
|
|
372
|
+
error: <IconErrorCircle24 color="red" />,
|
|
373
|
+
warning: <IconWarning24 color="orange" />
|
|
374
|
+
};
|
|
375
|
+
|
|
376
|
+
return (
|
|
377
|
+
<div className={`alert alert--${type}`}>
|
|
378
|
+
{icons[type]}
|
|
379
|
+
<span>{message}</span>
|
|
380
|
+
</div>
|
|
381
|
+
);
|
|
382
|
+
}
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
### Use Case 6: Icon-Only Button
|
|
386
|
+
|
|
387
|
+
**User**: "Settings button with just an icon"
|
|
388
|
+
|
|
389
|
+
**Workflow**:
|
|
390
|
+
1. Search for "settings" or "gear"
|
|
391
|
+
2. Select size
|
|
392
|
+
3. Generate accessible icon button
|
|
393
|
+
|
|
394
|
+
**Vue Example**:
|
|
395
|
+
```vue
|
|
396
|
+
<template>
|
|
397
|
+
<button
|
|
398
|
+
class="btn-icon"
|
|
399
|
+
aria-label="Settings"
|
|
400
|
+
title="Settings"
|
|
401
|
+
>
|
|
402
|
+
<IconSettings24 />
|
|
403
|
+
</button>
|
|
404
|
+
</template>
|
|
405
|
+
|
|
406
|
+
<style scoped>
|
|
407
|
+
.btn-icon {
|
|
408
|
+
padding: 0.5rem;
|
|
409
|
+
background: transparent;
|
|
410
|
+
border: none;
|
|
411
|
+
cursor: pointer;
|
|
412
|
+
}
|
|
413
|
+
</style>
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
## Icon Naming Convention
|
|
417
|
+
|
|
418
|
+
Mozaic icons follow this pattern:
|
|
419
|
+
```
|
|
420
|
+
Icon[Name][Size]
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
Examples:
|
|
424
|
+
- `IconArrowUp24` - Arrow up icon, 24px
|
|
425
|
+
- `IconUser32` - User icon, 32px
|
|
426
|
+
- `IconCart16` - Shopping cart, 16px
|
|
427
|
+
|
|
428
|
+
## Accessibility Best Practices
|
|
429
|
+
|
|
430
|
+
### 1. Always Provide Labels
|
|
431
|
+
|
|
432
|
+
```tsx
|
|
433
|
+
// Good: Has aria-label
|
|
434
|
+
<button aria-label="Close modal">
|
|
435
|
+
<IconClose24 />
|
|
436
|
+
</button>
|
|
437
|
+
|
|
438
|
+
// Avoid: No label for screen readers
|
|
439
|
+
<button>
|
|
440
|
+
<IconClose24 />
|
|
441
|
+
</button>
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
### 2. Decorative vs. Meaningful
|
|
445
|
+
|
|
446
|
+
```tsx
|
|
447
|
+
// Decorative (icon next to text)
|
|
448
|
+
<button>
|
|
449
|
+
<IconSave24 aria-hidden="true" />
|
|
450
|
+
Save
|
|
451
|
+
</button>
|
|
452
|
+
|
|
453
|
+
// Meaningful (icon-only)
|
|
454
|
+
<button aria-label="Save">
|
|
455
|
+
<IconSave24 />
|
|
456
|
+
</button>
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
### 3. Use Titles for Tooltips
|
|
460
|
+
|
|
461
|
+
```tsx
|
|
462
|
+
<button title="Delete item" aria-label="Delete">
|
|
463
|
+
<IconDelete24 />
|
|
464
|
+
</button>
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
## Customization
|
|
468
|
+
|
|
469
|
+
### Color
|
|
470
|
+
|
|
471
|
+
```vue
|
|
472
|
+
<!-- Use currentColor to inherit text color -->
|
|
473
|
+
<IconUser24 color="currentColor" />
|
|
474
|
+
|
|
475
|
+
<!-- Or specify a color -->
|
|
476
|
+
<IconUser24 color="#007DBC" />
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
### Size Override
|
|
480
|
+
|
|
481
|
+
```tsx
|
|
482
|
+
// Use different size than default
|
|
483
|
+
<IconArrowRight24 size={32} />
|
|
484
|
+
|
|
485
|
+
// Or use CSS
|
|
486
|
+
<IconArrowRight24 style={{ width: '2rem', height: '2rem' }} />
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
### Animation
|
|
490
|
+
|
|
491
|
+
```vue
|
|
492
|
+
<template>
|
|
493
|
+
<IconLoading24 class="spin" />
|
|
494
|
+
</template>
|
|
495
|
+
|
|
496
|
+
<style scoped>
|
|
497
|
+
.spin {
|
|
498
|
+
animation: spin 1s linear infinite;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
@keyframes spin {
|
|
502
|
+
from { transform: rotate(0deg); }
|
|
503
|
+
to { transform: rotate(360deg); }
|
|
504
|
+
}
|
|
505
|
+
</style>
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
## Installation
|
|
509
|
+
|
|
510
|
+
```bash
|
|
511
|
+
# Install Mozaic icons
|
|
512
|
+
pnpm add @mozaic-ds/icons
|
|
513
|
+
|
|
514
|
+
# For Vue
|
|
515
|
+
import { IconName24 } from '@mozaic-ds/icons/vue';
|
|
516
|
+
|
|
517
|
+
# For React
|
|
518
|
+
import { IconName24 } from '@mozaic-ds/icons/react';
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
## Search Tips
|
|
522
|
+
|
|
523
|
+
### Search by Action
|
|
524
|
+
- "add" → Plus, Add, Create icons
|
|
525
|
+
- "edit" → Edit, Pencil, Modify icons
|
|
526
|
+
- "delete" → Trash, Delete, Remove icons
|
|
527
|
+
|
|
528
|
+
### Search by Object
|
|
529
|
+
- "user" → User, Profile, Account icons
|
|
530
|
+
- "cart" → Cart, Bag, Shopping icons
|
|
531
|
+
- "message" → Message, Chat, Email icons
|
|
532
|
+
|
|
533
|
+
### Search by Direction
|
|
534
|
+
- "up" → ArrowUp, ChevronUp, etc.
|
|
535
|
+
- "down" → ArrowDown, ChevronDown, etc.
|
|
536
|
+
|
|
537
|
+
### Search by Category
|
|
538
|
+
- "social" → Social media icons
|
|
539
|
+
- "payment" → Payment method icons
|
|
540
|
+
- "navigation" → Navigation icons
|
|
541
|
+
|
|
542
|
+
## Commands
|
|
543
|
+
|
|
544
|
+
When this skill is active:
|
|
545
|
+
|
|
546
|
+
- **"Find [keyword] icon"**: Search for icons
|
|
547
|
+
- **"Show [category] icons"**: Browse by category
|
|
548
|
+
- **"I need a [size]px icon"**: Filter by size
|
|
549
|
+
- **"Generate [framework] code"**: Get framework-specific code
|
|
550
|
+
- **"Show me all [type] icons"**: Browse icon type
|
|
551
|
+
|
|
552
|
+
## Integration with Other Skills
|
|
553
|
+
|
|
554
|
+
This skill works well with:
|
|
555
|
+
- **mozaic-vue-builder**: Add icons to Vue components
|
|
556
|
+
- **mozaic-react-builder**: Add icons to React components
|
|
557
|
+
- **mozaic-design-tokens**: Use token colors for icons
|
|
558
|
+
|
|
559
|
+
## Example Session
|
|
560
|
+
|
|
561
|
+
**User**: "I need a shopping cart icon for a button"
|
|
562
|
+
|
|
563
|
+
**Skill**:
|
|
564
|
+
I'll help you find a shopping cart icon!
|
|
565
|
+
|
|
566
|
+
[Uses `mcp__mozaic__search_icons` with query="cart"]
|
|
567
|
+
|
|
568
|
+
Found 3 shopping cart icons:
|
|
569
|
+
|
|
570
|
+
1. **Cart** (Commerce)
|
|
571
|
+
Sizes: 16, 24, 32
|
|
572
|
+
Standard shopping cart
|
|
573
|
+
|
|
574
|
+
2. **CartAdd** (Commerce)
|
|
575
|
+
Sizes: 24, 32
|
|
576
|
+
Shopping cart with plus sign
|
|
577
|
+
|
|
578
|
+
3. **CartRemove** (Commerce)
|
|
579
|
+
Sizes: 24, 32
|
|
580
|
+
Shopping cart with minus sign
|
|
581
|
+
|
|
582
|
+
Which one do you need? (1-3)
|
|
583
|
+
|
|
584
|
+
**User**: "1 - Cart at 24px"
|
|
585
|
+
|
|
586
|
+
**Skill**:
|
|
587
|
+
Perfect! Which framework?
|
|
588
|
+
- A) Vue 3
|
|
589
|
+
- B) React
|
|
590
|
+
- C) SVG only
|
|
591
|
+
|
|
592
|
+
**User**: "B - React"
|
|
593
|
+
|
|
594
|
+
**Skill**:
|
|
595
|
+
[Uses `mcp__mozaic__get_icon` for Cart24 in React format]
|
|
596
|
+
|
|
597
|
+
Here's your shopping cart button with icon:
|
|
598
|
+
|
|
599
|
+
```tsx
|
|
600
|
+
import { IconCart24 } from '@mozaic-ds/icons/react';
|
|
601
|
+
|
|
602
|
+
function AddToCartButton() {
|
|
603
|
+
return (
|
|
604
|
+
<button className="btn btn--primary">
|
|
605
|
+
<IconCart24 />
|
|
606
|
+
Add to Cart
|
|
607
|
+
</button>
|
|
608
|
+
);
|
|
609
|
+
}
|
|
610
|
+
```
|
|
611
|
+
|
|
612
|
+
Installation:
|
|
613
|
+
```bash
|
|
614
|
+
pnpm add @mozaic-ds/icons
|
|
615
|
+
```
|
|
616
|
+
|
|
617
|
+
Would you like me to:
|
|
618
|
+
- Show other sizes?
|
|
619
|
+
- Generate a different style?
|
|
620
|
+
- Add animation?
|
|
621
|
+
|
|
622
|
+
---
|
|
623
|
+
|
|
624
|
+
**Let's enhance your UI with beautiful Mozaic icons!**
|