@abraracs/better-shopify-wc-mcp 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.
Files changed (51) hide show
  1. package/README.md +110 -0
  2. package/dist/index.d.ts +10 -0
  3. package/dist/index.js +325 -0
  4. package/docs/avatar.md +481 -0
  5. package/docs/badge.md +266 -0
  6. package/docs/banner.md +350 -0
  7. package/docs/box.md +618 -0
  8. package/docs/button.md +604 -0
  9. package/docs/buttongroup.md +251 -0
  10. package/docs/checkbox.md +346 -0
  11. package/docs/chip.md +261 -0
  12. package/docs/choicelist.md +416 -0
  13. package/docs/clickable.md +703 -0
  14. package/docs/clickablechip.md +377 -0
  15. package/docs/colorfield.md +416 -0
  16. package/docs/colorpicker.md +152 -0
  17. package/docs/datefield.md +706 -0
  18. package/docs/datepicker.md +443 -0
  19. package/docs/divider.md +263 -0
  20. package/docs/dropzone.md +331 -0
  21. package/docs/emailfield.md +377 -0
  22. package/docs/grid.md +1246 -0
  23. package/docs/heading.md +201 -0
  24. package/docs/icon.md +295 -0
  25. package/docs/image.md +517 -0
  26. package/docs/link.md +456 -0
  27. package/docs/menu.md +331 -0
  28. package/docs/modal.md +640 -0
  29. package/docs/moneyfield.md +385 -0
  30. package/docs/numberfield.md +393 -0
  31. package/docs/orderedlist.md +224 -0
  32. package/docs/page.md +319 -0
  33. package/docs/paragraph.md +333 -0
  34. package/docs/passwordfield.md +381 -0
  35. package/docs/popover.md +419 -0
  36. package/docs/querycontainer.md +121 -0
  37. package/docs/searchfield.md +319 -0
  38. package/docs/section.md +267 -0
  39. package/docs/select.md +449 -0
  40. package/docs/spinner.md +121 -0
  41. package/docs/stack.md +748 -0
  42. package/docs/switch.md +365 -0
  43. package/docs/table.md +805 -0
  44. package/docs/text.md +339 -0
  45. package/docs/textarea.md +328 -0
  46. package/docs/textfield.md +425 -0
  47. package/docs/thumbnail.md +245 -0
  48. package/docs/tooltip.md +130 -0
  49. package/docs/unorderedlist.md +135 -0
  50. package/docs/urlfield.md +314 -0
  51. package/package.json +43 -0
package/docs/menu.md ADDED
@@ -0,0 +1,331 @@
1
+ ---
2
+ title: Menu
3
+ description: Use Menu to display a list of actions that can be performed on a resource.
4
+ api_name: app-home
5
+ source_url:
6
+ html: 'https://shopify.dev/docs/api/app-home/polaris-web-components/actions/menu'
7
+ md: 'https://shopify.dev/docs/api/app-home/polaris-web-components/actions/menu.md'
8
+ ---
9
+
10
+ # Menu
11
+
12
+ Use Menu to display a list of actions that can be performed on a resource.
13
+
14
+ ## Properties
15
+
16
+ * accessibilityLabel
17
+
18
+ string
19
+
20
+ A label that describes the purpose or contents of the element. When set, it will be announced using assistive technologies and provide additional context.
21
+
22
+ ## Slots
23
+
24
+ * children
25
+
26
+ HTMLElement
27
+
28
+ The Menu items.
29
+
30
+ Only accepts `Button` and `Section` components.
31
+
32
+ Examples
33
+
34
+ ### Examples
35
+
36
+ * #### Code
37
+
38
+ ##### jsx
39
+
40
+ ```jsx
41
+ <>
42
+ <s-button commandFor="customer-menu">Edit customer</s-button>
43
+
44
+ <s-menu id="customer-menu" accessibilityLabel="Customer actions">
45
+ <s-button icon="merge">Merge customer</s-button>
46
+ <s-button icon="incoming">Request customer data</s-button>
47
+ <s-button icon="delete" tone="critical">
48
+ Delete customer
49
+ </s-button>
50
+ </s-menu>
51
+ </>
52
+ ```
53
+
54
+ ##### html
55
+
56
+ ```html
57
+ <s-button commandFor="customer-menu">Edit customer</s-button>
58
+
59
+ <s-menu id="customer-menu" accessibilityLabel="Customer actions">
60
+ <s-button icon="merge">Merge customer</s-button>
61
+ <s-button icon="incoming">Request customer data</s-button>
62
+ <s-button icon="delete" tone="critical">Delete customer</s-button>
63
+ </s-menu>
64
+ ```
65
+
66
+ * #### Basic Menu
67
+
68
+ ##### Description
69
+
70
+ Demonstrates a simple menu with basic action buttons and shows how to link it to a trigger button.
71
+
72
+ ##### jsx
73
+
74
+ ```jsx
75
+ <>
76
+ <s-button commandFor="product-menu">Product actions</s-button>
77
+
78
+ <s-menu id="product-menu" accessibilityLabel="Product actions">
79
+ <s-button icon="edit">Edit product</s-button>
80
+ <s-button icon="duplicate">Duplicate product</s-button>
81
+ <s-button icon="archive">Archive product</s-button>
82
+ </s-menu>
83
+ </>
84
+ ```
85
+
86
+ ##### html
87
+
88
+ ```html
89
+ <s-button commandFor="product-menu">Product actions</s-button>
90
+
91
+ <s-menu id="product-menu" accessibilityLabel="Product actions">
92
+ <s-button icon="edit">Edit product</s-button>
93
+ <s-button icon="duplicate">Duplicate product</s-button>
94
+ <s-button icon="archive">Archive product</s-button>
95
+ </s-menu>
96
+ ```
97
+
98
+ * #### Menu with Icons
99
+
100
+ ##### Description
101
+
102
+ Illustrates a menu with icons for each action, providing visual context for different menu items and showing how to use the caret-down icon on the trigger button.
103
+
104
+ ##### jsx
105
+
106
+ ```jsx
107
+ <>
108
+ <s-button icon="caret-down" commandFor="actions-menu">
109
+ More actions
110
+ </s-button>
111
+
112
+ <s-menu id="actions-menu" accessibilityLabel="Product actions menu">
113
+ <s-button icon="edit">Edit product</s-button>
114
+ <s-button icon="duplicate">Duplicate product</s-button>
115
+ <s-button icon="archive">Archive product</s-button>
116
+ <s-button icon="delete" tone="critical">
117
+ Delete product
118
+ </s-button>
119
+ </s-menu>
120
+ </>
121
+ ```
122
+
123
+ ##### html
124
+
125
+ ```html
126
+ <s-button icon="caret-down" commandFor="actions-menu">More actions</s-button>
127
+
128
+ <s-menu id="actions-menu" accessibilityLabel="Product actions menu">
129
+ <s-button icon="edit">Edit product</s-button>
130
+ <s-button icon="duplicate">Duplicate product</s-button>
131
+ <s-button icon="archive">Archive product</s-button>
132
+ <s-button icon="delete" tone="critical">Delete product</s-button>
133
+ </s-menu>
134
+ ```
135
+
136
+ * #### Menu with Sections
137
+
138
+ ##### Description
139
+
140
+ Shows how to organize menu items into logical sections with headings, helping to group related actions and improve menu readability.
141
+
142
+ ##### jsx
143
+
144
+ ```jsx
145
+ <>
146
+ <s-button commandFor="organized-menu">Bulk actions</s-button>
147
+
148
+ <s-menu id="organized-menu" accessibilityLabel="Organized menu">
149
+ <s-section heading="Product actions">
150
+ <s-button icon="edit">Edit selected</s-button>
151
+ <s-button icon="duplicate">Duplicate selected</s-button>
152
+ <s-button icon="archive">Archive selected</s-button>
153
+ </s-section>
154
+ <s-section heading="Export options">
155
+ <s-button icon="export">Export as CSV</s-button>
156
+ <s-button icon="print">Print barcodes</s-button>
157
+ </s-section>
158
+ </s-menu>
159
+ </>
160
+ ```
161
+
162
+ ##### html
163
+
164
+ ```html
165
+ <s-button commandFor="organized-menu">Bulk actions</s-button>
166
+
167
+ <s-menu id="organized-menu" accessibilityLabel="Organized menu">
168
+ <s-section heading="Product actions">
169
+ <s-button icon="edit">Edit selected</s-button>
170
+ <s-button icon="duplicate">Duplicate selected</s-button>
171
+ <s-button icon="archive">Archive selected</s-button>
172
+ </s-section>
173
+ <s-section heading="Export options">
174
+ <s-button icon="export">Export as CSV</s-button>
175
+ <s-button icon="print">Print barcodes</s-button>
176
+ </s-section>
177
+ </s-menu>
178
+ ```
179
+
180
+ * #### Menu with Links and Disabled Items
181
+
182
+ ##### Description
183
+
184
+ Demonstrates a menu with a mix of link-based buttons, standard buttons, and a disabled button, showcasing the menu's flexibility in handling different interaction states.
185
+
186
+ ##### jsx
187
+
188
+ ```jsx
189
+ <>
190
+ <s-button commandFor="mixed-menu">Options</s-button>
191
+
192
+ <s-menu id="mixed-menu" accessibilityLabel="Mixed menu options">
193
+ <s-button href="javascript:void(0)" target="_blank">
194
+ View product page
195
+ </s-button>
196
+ <s-button disabled>Unavailable action</s-button>
197
+ <s-button download="sales-report.csv" href="/reports/sales-report.csv">
198
+ Download report
199
+ </s-button>
200
+ </s-menu>
201
+ </>
202
+ ```
203
+
204
+ ##### html
205
+
206
+ ```html
207
+ <s-button commandFor="mixed-menu">Options</s-button>
208
+
209
+ <s-menu id="mixed-menu" accessibilityLabel="Mixed menu options">
210
+ <s-button href="javascript:void(0)" target="_blank">
211
+ View product page
212
+ </s-button>
213
+ <s-button disabled>Unavailable action</s-button>
214
+ <s-button download href="javascript:void(0)">Download report</s-button>
215
+ </s-menu>
216
+ ```
217
+
218
+ * #### Actions menu with sections
219
+
220
+ ##### Description
221
+
222
+ Presents a comprehensive menu showing how to create sections with different action groups and include a critical action at the menu's root level.
223
+
224
+ ##### jsx
225
+
226
+ ```jsx
227
+ <>
228
+ <s-button commandFor="customer-menu">Edit customer</s-button>
229
+
230
+ <s-menu id="customer-menu" accessibilityLabel="Customer actions">
231
+ <s-section heading="Customer management">
232
+ <s-button icon="edit">Edit customer</s-button>
233
+ <s-button icon="email">Send email</s-button>
234
+ <s-button icon="order">View orders</s-button>
235
+ </s-section>
236
+ <s-section heading="Account actions">
237
+ <s-button icon="reset">Reset password</s-button>
238
+ <s-button icon="lock">Disable account</s-button>
239
+ </s-section>
240
+ <s-button tone="critical" icon="delete">
241
+ Delete customer
242
+ </s-button>
243
+ </s-menu>
244
+ </>
245
+ ```
246
+
247
+ ##### html
248
+
249
+ ```html
250
+ <s-button commandFor="customer-menu">Edit customer</s-button>
251
+
252
+ <s-menu id="customer-menu" accessibilityLabel="Customer actions">
253
+ <s-section heading="Customer management">
254
+ <s-button icon="edit">Edit customer</s-button>
255
+ <s-button icon="email">Send email</s-button>
256
+ <s-button icon="order">View orders</s-button>
257
+ </s-section>
258
+ <s-section heading="Account actions">
259
+ <s-button icon="reset">Reset password</s-button>
260
+ <s-button icon="lock">Disable account</s-button>
261
+ </s-section>
262
+ <s-button tone="critical" icon="delete">Delete customer</s-button>
263
+ </s-menu>
264
+ ```
265
+
266
+ * #### Menu with nested sections
267
+
268
+ ##### Description
269
+
270
+ Illustrates a complex menu with nested sections, demonstrating how to organize multiple related actions with icons.
271
+
272
+ ##### jsx
273
+
274
+ ```jsx
275
+ <>
276
+ <s-button icon="settings" commandFor="admin-settings">
277
+ Settings
278
+ </s-button>
279
+
280
+ <s-menu id="admin-settings" accessibilityLabel="Settings menu">
281
+ <s-section heading="Account">
282
+ <s-button icon="profile">Profile settings</s-button>
283
+ <s-button icon="lock">Security</s-button>
284
+ <s-button>Billing information</s-button>
285
+ </s-section>
286
+ <s-section heading="Store">
287
+ <s-button icon="store">Store settings</s-button>
288
+ <s-button>Payment providers</s-button>
289
+ <s-button icon="delivery">Shipping rates</s-button>
290
+ </s-section>
291
+ <s-button href="javascript:void(0)" icon="person-exit">Sign out</s-button>
292
+ </s-menu>
293
+ </>
294
+ ```
295
+
296
+ ##### html
297
+
298
+ ```html
299
+ <s-button icon="settings" commandFor="admin-settings">Settings</s-button>
300
+
301
+ <s-menu id="admin-settings" accessibilityLabel="Settings menu">
302
+ <s-section heading="Account">
303
+ <s-button icon="profile">Profile settings</s-button>
304
+ <s-button icon="lock">Security</s-button>
305
+ <s-button>Billing information</s-button>
306
+ </s-section>
307
+ <s-section heading="Store">
308
+ <s-button icon="store">Store settings</s-button>
309
+ <s-button>Payment providers</s-button>
310
+ <s-button icon="delivery">Shipping rates</s-button>
311
+ </s-section>
312
+ <s-button href="javascript:void(0)" icon="person-exit">Sign out</s-button>
313
+ </s-menu>
314
+ ```
315
+
316
+ ## Useful for
317
+
318
+ * Presenting a set of actions or selectable options to merchants
319
+ * Creating dropdown menus with related actions
320
+ * Organizing actions into logical groupings using sections
321
+
322
+ ## Best practices
323
+
324
+ * Use for secondary or less important actions since they're hidden until merchants open them
325
+ * Contain actions that are related to each other
326
+
327
+ ## Content guidelines
328
+
329
+ * Each item should be clear and predictable
330
+ * Lead with a strong verb using the {verb}+{noun} format (e.g., "Buy shipping label", "Edit HTML")
331
+ * Avoid unnecessary words and articles like "the", "an", or "a"