@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
@@ -0,0 +1,393 @@
1
+ ---
2
+ title: NumberField
3
+ description: >-
4
+ Collect numerical values from users with optimized keyboard settings and
5
+ built-in validation.
6
+ api_name: app-home
7
+ source_url:
8
+ html: >-
9
+ https://shopify.dev/docs/api/app-home/polaris-web-components/forms/numberfield
10
+ md: >-
11
+ https://shopify.dev/docs/api/app-home/polaris-web-components/forms/numberfield.md
12
+ ---
13
+
14
+ # Number​Field
15
+
16
+ Collect numerical values from users with optimized keyboard settings and built-in validation.
17
+
18
+ ## Properties
19
+
20
+ * autocomplete
21
+
22
+ "on" | "off" | NumberAutocompleteField | \`section-${string} one-time-code\` | \`section-${string} cc-number\` | \`section-${string} cc-csc\` | "shipping one-time-code" | "shipping cc-number" | "shipping cc-csc" | "billing one-time-code" | "billing cc-number" | "billing cc-csc" | \`section-${string} shipping one-time-code\` | \`section-${string} shipping cc-number\` | \`section-${string} shipping cc-csc\` | \`section-${string} billing one-time-code\` | \`section-${string} billing cc-number\` | \`section-${string} billing cc-csc\`
23
+
24
+ Default: 'on' for everything else
25
+
26
+ A hint as to the intended content of the field.
27
+
28
+ When set to `on` (the default), this property indicates that the field should support autofill, but you do not have any more semantic information on the intended contents.
29
+
30
+ When set to `off`, you are indicating that this field contains sensitive information, or contents that are never saved, like one-time codes.
31
+
32
+ Alternatively, you can provide value which describes the specific data you would like to be entered into this field during autofill.
33
+
34
+ * defaultValue
35
+
36
+ string
37
+
38
+ The default value for the field.
39
+
40
+ * details
41
+
42
+ string
43
+
44
+ Additional text to provide context or guidance for the field. This text is displayed along with the field and its label to offer more information or instructions to the user.
45
+
46
+ This will also be exposed to screen reader users.
47
+
48
+ * disabled
49
+
50
+ boolean
51
+
52
+ Default: false
53
+
54
+ Disables the field, disallowing any interaction.
55
+
56
+ * error
57
+
58
+ string
59
+
60
+ Indicate an error to the user. The field will be given a specific stylistic treatment to communicate problems that have to be resolved immediately.
61
+
62
+ * id
63
+
64
+ string
65
+
66
+ A unique identifier for the element.
67
+
68
+ * inputMode
69
+
70
+ "decimal" | "numeric"
71
+
72
+ Default: 'decimal'
73
+
74
+ Sets the virtual keyboard.
75
+
76
+ * label
77
+
78
+ string
79
+
80
+ Content to use as the field label.
81
+
82
+ * labelAccessibilityVisibility
83
+
84
+ "visible" | "exclusive"
85
+
86
+ Default: 'visible'
87
+
88
+ Changes the visibility of the component's label.
89
+
90
+ * `visible`: the label is visible to all users.
91
+ * `exclusive`: the label is visually hidden but remains in the accessibility tree.
92
+
93
+ * max
94
+
95
+ number
96
+
97
+ Default: Infinity
98
+
99
+ The highest decimal or integer to be accepted for the field. When used with `step` the value will round down to the max number.
100
+
101
+ Note: a user will still be able to use the keyboard to input a number higher than the max. It is up to the developer to add appropriate validation.
102
+
103
+ * min
104
+
105
+ number
106
+
107
+ Default: -Infinity
108
+
109
+ The lowest decimal or integer to be accepted for the field. When used with `step` the value will round up to the min number.
110
+
111
+ Note: a user will still be able to use the keyboard to input a number lower than the min. It is up to the developer to add appropriate validation.
112
+
113
+ * name
114
+
115
+ string
116
+
117
+ An identifier for the field that is unique within the nearest containing form.
118
+
119
+ * placeholder
120
+
121
+ string
122
+
123
+ A short hint that describes the expected value of the field.
124
+
125
+ * prefix
126
+
127
+ string
128
+
129
+ Default: ''
130
+
131
+ A value to be displayed immediately before the editable portion of the field.
132
+
133
+ This is useful for displaying an implied part of the value, such as "https://" or "+353".
134
+
135
+ This cannot be edited by the user, and it isn't included in the value of the field.
136
+
137
+ It may not be displayed until the user has interacted with the input. For example, an inline label may take the place of the prefix until the user focuses the input.
138
+
139
+ * readOnly
140
+
141
+ boolean
142
+
143
+ Default: false
144
+
145
+ The field cannot be edited by the user. It is focusable will be announced by screen readers.
146
+
147
+ * required
148
+
149
+ boolean
150
+
151
+ Default: false
152
+
153
+ Whether the field needs a value. This requirement adds semantic value to the field, but it will not cause an error to appear automatically. If you want to present an error when this field is empty, you can do so with the `error` property.
154
+
155
+ * step
156
+
157
+ number
158
+
159
+ Default: 1
160
+
161
+ The amount the value can increase or decrease by. This can be an integer or decimal. If a `max` or `min` is specified with `step` when increasing/decreasing the value via the buttons, the final value will always round to the `max` or `min` rather than the closest valid amount.
162
+
163
+ * suffix
164
+
165
+ string
166
+
167
+ Default: ''
168
+
169
+ A value to be displayed immediately after the editable portion of the field.
170
+
171
+ This is useful for displaying an implied part of the value, such as "@shopify.com", or "%".
172
+
173
+ This cannot be edited by the user, and it isn't included in the value of the field.
174
+
175
+ It may not be displayed until the user has interacted with the input. For example, an inline label may take the place of the suffix until the user focuses the input.
176
+
177
+ * value
178
+
179
+ string
180
+
181
+ The current value for the field. If omitted, the field will be empty.
182
+
183
+ ### NumberAutocompleteField
184
+
185
+ ```ts
186
+ 'one-time-code' | 'cc-number' | 'cc-csc'
187
+ ```
188
+
189
+ ## Events
190
+
191
+ Learn more about [registering events](https://shopify.dev/docs/api/app-home/using-polaris-components#event-handling).
192
+
193
+ * blur
194
+
195
+ CallbackEventListener<'input'>
196
+
197
+ * change
198
+
199
+ CallbackEventListener<'input'>
200
+
201
+ * focus
202
+
203
+ CallbackEventListener<'input'>
204
+
205
+ * input
206
+
207
+ CallbackEventListener<'input'>
208
+
209
+ ### CallbackEventListener
210
+
211
+ ```ts
212
+ (EventListener & {
213
+ (event: CallbackEvent<T>): void;
214
+ }) | null
215
+ ```
216
+
217
+ ### CallbackEvent
218
+
219
+ ```ts
220
+ Event & {
221
+ currentTarget: HTMLElementTagNameMap[T];
222
+ }
223
+ ```
224
+
225
+ Examples
226
+
227
+ ### Examples
228
+
229
+ * #### Code
230
+
231
+ ##### jsx
232
+
233
+ ```jsx
234
+ <s-number-field
235
+ label="Quantity"
236
+ details="Number of items in stock"
237
+ placeholder="0"
238
+ step={5}
239
+ min={0}
240
+ max={100}
241
+ />
242
+ ```
243
+
244
+ ##### html
245
+
246
+ ```html
247
+ <s-number-field
248
+ label="Quantity"
249
+ details="Number of items in stock"
250
+ placeholder="0"
251
+ step="5"
252
+ min="0"
253
+ max="100"
254
+ ></s-number-field>
255
+ ```
256
+
257
+ * #### Basic usage
258
+
259
+ ##### Description
260
+
261
+ Demonstrates a simple number field for entering order quantity with a predefined range and step value.
262
+
263
+ ##### jsx
264
+
265
+ ```jsx
266
+ <s-number-field
267
+ label="Order quantity"
268
+ value="5"
269
+ min={1}
270
+ max={999}
271
+ step={1}
272
+ />
273
+ ```
274
+
275
+ ##### html
276
+
277
+ ```html
278
+ <s-number-field
279
+ label="Order quantity"
280
+ value="5"
281
+ min="1"
282
+ max="999"
283
+ step="1"
284
+ ></s-number-field>
285
+ ```
286
+
287
+ * #### With prefix and suffix
288
+
289
+ ##### Description
290
+
291
+ Illustrates a number field for entering product prices with currency prefix and suffix, using decimal input mode.
292
+
293
+ ##### jsx
294
+
295
+ ```jsx
296
+ <s-number-field
297
+ label="Product price"
298
+ value="29.99"
299
+ prefix="$"
300
+ suffix="CAD"
301
+ inputMode="decimal"
302
+ step={0.01}
303
+ min={0}
304
+ />
305
+ ```
306
+
307
+ ##### html
308
+
309
+ ```html
310
+ <s-number-field
311
+ label="Product price"
312
+ value="29.99"
313
+ prefix="$"
314
+ suffix="CAD"
315
+ inputMode="decimal"
316
+ step="0.01"
317
+ min="0"
318
+ ></s-number-field>
319
+ ```
320
+
321
+ * #### Multiple examples
322
+
323
+ ##### Description
324
+
325
+ Showcases multiple number fields for different use cases: inventory tracking, percentage discount, and shipping weight, demonstrating various input modes and configurations.
326
+
327
+ ##### jsx
328
+
329
+ ```jsx
330
+ <s-stack gap="base">
331
+ <s-number-field
332
+ label="Inventory count"
333
+ value="150"
334
+ min={0}
335
+ step={1}
336
+ inputMode="numeric"
337
+ details="Current stock available for sale"
338
+ />
339
+
340
+ <s-number-field
341
+ label="Discount percentage"
342
+ value="15"
343
+ suffix="%"
344
+ min={0}
345
+ max={100}
346
+ step={0.1}
347
+ inputMode="decimal"
348
+ />
349
+
350
+ <s-number-field
351
+ label="Shipping weight"
352
+ value="2.5"
353
+ suffix="kg"
354
+ min={0.1}
355
+ step={0.1}
356
+ inputMode="decimal"
357
+ />
358
+ </s-stack>
359
+ ```
360
+
361
+ ##### html
362
+
363
+ ```html
364
+ <s-stack gap="base">
365
+ <s-number-field
366
+ label="Inventory count"
367
+ value="150"
368
+ min="0"
369
+ step="1"
370
+ inputMode="numeric"
371
+ details="Current stock available for sale"
372
+ ></s-number-field>
373
+
374
+ <s-number-field
375
+ label="Discount percentage"
376
+ value="15"
377
+ suffix="%"
378
+ min="0"
379
+ max="100"
380
+ step="0.1"
381
+ inputMode="decimal"
382
+ ></s-number-field>
383
+
384
+ <s-number-field
385
+ label="Shipping weight"
386
+ value="2.5"
387
+ suffix="kg"
388
+ min="0.1"
389
+ step="0.1"
390
+ inputMode="decimal"
391
+ ></s-number-field>
392
+ </s-stack>
393
+ ```
@@ -0,0 +1,224 @@
1
+ ---
2
+ title: OrderedList
3
+ description: >-
4
+ Displays a numbered list of related items in a specific sequence. Use to
5
+ present step-by-step instructions, ranked items, or procedures where order
6
+ matters.
7
+ api_name: app-home
8
+ source_url:
9
+ html: >-
10
+ https://shopify.dev/docs/api/app-home/polaris-web-components/structure/orderedlist
11
+ md: >-
12
+ https://shopify.dev/docs/api/app-home/polaris-web-components/structure/orderedlist.md
13
+ ---
14
+
15
+ # Ordered​List
16
+
17
+ Displays a numbered list of related items in a specific sequence. Use to present step-by-step instructions, ranked items, or procedures where order matters.
18
+
19
+ ## Slots
20
+
21
+ * children
22
+
23
+ HTMLElement
24
+
25
+ The items of the OrderedList.
26
+
27
+ Only ListItems are accepted.
28
+
29
+ ## ListItem
30
+
31
+ Represents a single item within an unordered or ordered list. Use only as a child of `s-unordered-list` or `s-ordered-list` components.
32
+
33
+ ## Slots
34
+
35
+ * children
36
+
37
+ HTMLElement
38
+
39
+ The content of the ListItem.
40
+
41
+ Examples
42
+
43
+ ### Examples
44
+
45
+ * #### Code
46
+
47
+ ##### jsx
48
+
49
+ ```jsx
50
+ <s-ordered-list>
51
+ <s-list-item>Red shirt</s-list-item>
52
+ <s-list-item>Green shirt</s-list-item>
53
+ <s-list-item>Blue shirt</s-list-item>
54
+ </s-ordered-list>
55
+ ```
56
+
57
+ ##### html
58
+
59
+ ```html
60
+ <s-ordered-list>
61
+ <s-list-item>Red shirt</s-list-item>
62
+ <s-list-item>Green shirt</s-list-item>
63
+ <s-list-item>Blue shirt</s-list-item>
64
+ </s-ordered-list>
65
+ ```
66
+
67
+ * #### Basic usage
68
+
69
+ ##### Description
70
+
71
+ Demonstrates a simple ordered list with three sequential steps.
72
+
73
+ ##### jsx
74
+
75
+ ```jsx
76
+ <s-ordered-list>
77
+ <s-list-item>Add products to your catalog</s-list-item>
78
+ <s-list-item>Set up payment methods</s-list-item>
79
+ <s-list-item>Configure shipping zones</s-list-item>
80
+ </s-ordered-list>
81
+ ```
82
+
83
+ ##### html
84
+
85
+ ```html
86
+ <s-ordered-list>
87
+ <s-list-item>Add products to your catalog</s-list-item>
88
+ <s-list-item>Set up payment methods</s-list-item>
89
+ <s-list-item>Configure shipping zones</s-list-item>
90
+ </s-ordered-list>
91
+ ```
92
+
93
+ * #### Order processing steps
94
+
95
+ ##### Description
96
+
97
+ Shows an ordered list with multiple steps in a workflow process.
98
+
99
+ ##### jsx
100
+
101
+ ```jsx
102
+ <s-ordered-list>
103
+ <s-list-item>Review order details and customer information</s-list-item>
104
+ <s-list-item>Verify payment and billing address</s-list-item>
105
+ <s-list-item>Check inventory availability for all items</s-list-item>
106
+ <s-list-item>Generate fulfillment labels and packing slip</s-list-item>
107
+ <s-list-item>Package items and update tracking information</s-list-item>
108
+ <s-list-item>Send shipment confirmation to customer</s-list-item>
109
+ </s-ordered-list>
110
+ ```
111
+
112
+ ##### html
113
+
114
+ ```html
115
+ <s-ordered-list>
116
+ <s-list-item>Review order details and customer information</s-list-item>
117
+ <s-list-item>Verify payment and billing address</s-list-item>
118
+ <s-list-item>Check inventory availability for all items</s-list-item>
119
+ <s-list-item>Generate fulfillment labels and packing slip</s-list-item>
120
+ <s-list-item>Package items and update tracking information</s-list-item>
121
+ <s-list-item>Send shipment confirmation to customer</s-list-item>
122
+ </s-ordered-list>
123
+ ```
124
+
125
+ * #### Product setup instructions
126
+
127
+ ##### Description
128
+
129
+ Illustrates a nested ordered list with sub-steps within main steps.
130
+
131
+ ##### jsx
132
+
133
+ ```jsx
134
+ <s-ordered-list>
135
+ <s-list-item>
136
+ Create product listing with title and description
137
+ <s-ordered-list>
138
+ <s-list-item>Add high-quality product images</s-list-item>
139
+ <s-list-item>Set SEO title and meta description</s-list-item>
140
+ </s-ordered-list>
141
+ </s-list-item>
142
+ <s-list-item>Configure pricing and inventory tracking</s-list-item>
143
+ <s-list-item>Set up product variants (size, color, material)</s-list-item>
144
+ <s-list-item>Enable inventory tracking and set stock levels</s-list-item>
145
+ <s-list-item>Review and publish product to storefront</s-list-item>
146
+ </s-ordered-list>
147
+ ```
148
+
149
+ ##### html
150
+
151
+ ```html
152
+ <s-ordered-list>
153
+ <s-list-item>
154
+ Create product listing with title and description
155
+ <s-ordered-list>
156
+ <s-list-item>Add high-quality product images</s-list-item>
157
+ <s-list-item>Set SEO title and meta description</s-list-item>
158
+ </s-ordered-list>
159
+ </s-list-item>
160
+ <s-list-item>Configure pricing and inventory tracking</s-list-item>
161
+ <s-list-item>Set up product variants (size, color, material)</s-list-item>
162
+ <s-list-item>Enable inventory tracking and set stock levels</s-list-item>
163
+ <s-list-item>Review and publish product to storefront</s-list-item>
164
+ </s-ordered-list>
165
+ ```
166
+
167
+ * #### Fulfillment process
168
+
169
+ ##### Description
170
+
171
+ Displays a complex nested list with multiple levels of sub-steps.
172
+
173
+ ##### jsx
174
+
175
+ ```jsx
176
+ <s-ordered-list>
177
+ <s-list-item>
178
+ Process payment
179
+ <s-ordered-list>
180
+ <s-list-item>Verify card details</s-list-item>
181
+ <s-list-item>Apply discount codes</s-list-item>
182
+ <s-list-item>Calculate taxes</s-list-item>
183
+ </s-ordered-list>
184
+ </s-list-item>
185
+ <s-list-item>
186
+ Prepare shipment
187
+ <s-ordered-list>
188
+ <s-list-item>Print shipping label</s-list-item>
189
+ <s-list-item>Pack items securely</s-list-item>
190
+ </s-ordered-list>
191
+ </s-list-item>
192
+ <s-list-item>Update customer with tracking info</s-list-item>
193
+ </s-ordered-list>
194
+ ```
195
+
196
+ ##### html
197
+
198
+ ```html
199
+ <s-ordered-list>
200
+ <s-list-item>
201
+ Process payment
202
+ <s-ordered-list>
203
+ <s-list-item>Verify card details</s-list-item>
204
+ <s-list-item>Apply discount codes</s-list-item>
205
+ <s-list-item>Calculate taxes</s-list-item>
206
+ </s-ordered-list>
207
+ </s-list-item>
208
+ <s-list-item>
209
+ Prepare shipment
210
+ <s-ordered-list>
211
+ <s-list-item>Print shipping label</s-list-item>
212
+ <s-list-item>Pack items securely</s-list-item>
213
+ </s-ordered-list>
214
+ </s-list-item>
215
+ <s-list-item>Update customer with tracking info</s-list-item>
216
+ </s-ordered-list>
217
+ ```
218
+
219
+ ## Best practices
220
+
221
+ * Use to break up related content and improve scannability
222
+ * Phrase items consistently (start each with a noun or verb)
223
+ * Start each item with a capital letter
224
+ * Don't use commas or semicolons at the end of lines