@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/page.md ADDED
@@ -0,0 +1,319 @@
1
+ ---
2
+ title: Page
3
+ description: ' Use `s-page` as the main container for placing content in your app. Page comes with preset layouts and automatically adds spacing between elements.'
4
+ api_name: app-home
5
+ source_url:
6
+ html: 'https://shopify.dev/docs/api/app-home/polaris-web-components/structure/page'
7
+ md: >-
8
+ https://shopify.dev/docs/api/app-home/polaris-web-components/structure/page.md
9
+ ---
10
+
11
+ # Page
12
+
13
+ Use `s-page` as the main container for placing content in your app. Page comes with preset layouts and automatically adds spacing between elements.
14
+
15
+ ## Properties
16
+
17
+ Use as the outer wrapper of a page
18
+
19
+ * heading
20
+
21
+ string
22
+
23
+ The main page heading
24
+
25
+ * inlineSize
26
+
27
+ "small" | "base" | "large"
28
+
29
+ Default: 'base'
30
+
31
+ The inline size of the page
32
+
33
+ * `base` corresponds to a set default inline size
34
+ * `large` full width with whitespace
35
+
36
+ ## Slots
37
+
38
+ * aside
39
+
40
+ HTMLElement
41
+
42
+ The content to display in the aside section of the page.
43
+
44
+ This slot is only rendered when `inlineSize` is "base".
45
+
46
+ * breadcrumb-actions
47
+
48
+ HTMLElement
49
+
50
+ Navigations back actions for the page.
51
+
52
+ Only accepts `Link` components.
53
+
54
+ * children
55
+
56
+ HTMLElement
57
+
58
+ The content of the Page.
59
+
60
+ * primary-action
61
+
62
+ HTMLElement
63
+
64
+ The primary action for the page.
65
+
66
+ Only accepts a single `Button` component with a `variant` of `primary`.
67
+
68
+ * secondary-actions
69
+
70
+ HTMLElement
71
+
72
+ Secondary actions for the page.
73
+
74
+ Only accepts `ButtonGroup` and `Button` components with a `variant` of `secondary` or `auto`.
75
+
76
+ Examples
77
+
78
+ ### Examples
79
+
80
+ * ####
81
+
82
+ ##### jsx
83
+
84
+ ```jsx
85
+ <s-page heading="Products">
86
+ <s-section>
87
+ <s-text>Hello World</s-text>
88
+ </s-section>
89
+ </s-page>
90
+ ```
91
+
92
+ ##### html
93
+
94
+ ```html
95
+ <s-page heading="Products">
96
+ <s-section>
97
+ <s-text>Hello World</s-text>
98
+ </s-section>
99
+ </s-page>
100
+ ```
101
+
102
+ * #### Page with heading
103
+
104
+ ##### Description
105
+
106
+ Shows a page with a clear heading and descriptive text, illustrating how to use the page component with a title.
107
+
108
+ ##### jsx
109
+
110
+ ```jsx
111
+ <s-page heading="Product catalog" inlineSize="base">
112
+ <s-section>
113
+ <s-text>Manage your product catalog and inventory.</s-text>
114
+ </s-section>
115
+ </s-page>
116
+ ```
117
+
118
+ ##### html
119
+
120
+ ```html
121
+ <s-page heading="Product catalog" inline-size="base">
122
+ <s-section>
123
+ <s-text>Manage your product catalog and inventory.</s-text>
124
+ </s-section>
125
+ </s-page>
126
+ ```
127
+
128
+ * #### Small inline size for focused content
129
+
130
+ ##### Description
131
+
132
+ Illustrates a page with a small inline size, ideal for focused, compact content like settings or forms with minimal information.
133
+
134
+ ##### jsx
135
+
136
+ ```jsx
137
+ <s-page heading="Store settings" inlineSize="small">
138
+ <s-section>
139
+ <s-stack gap="base">
140
+ <s-text>Configure your basic store preferences.</s-text>
141
+ <s-text-field label="Store name" />
142
+ <s-button variant="primary">Save</s-button>
143
+ </s-stack>
144
+ </s-section>
145
+ </s-page>
146
+ ```
147
+
148
+ ##### html
149
+
150
+ ```html
151
+ <s-page heading="Store settings" inline-size="small">
152
+ <s-section>
153
+ <s-stack gap="base">
154
+ <s-text>Configure your basic store preferences.</s-text>
155
+ <s-text-field label="Store name"></s-text-field>
156
+ <s-button variant="primary">Save</s-button>
157
+ </s-stack>
158
+ </s-section>
159
+ </s-page>
160
+ ```
161
+
162
+ * #### Large inline size for wide content
163
+
164
+ ##### Description
165
+
166
+ Demonstrates a page with a large inline size, perfect for displaying broader content like analytics or dashboards with multiple information sections.
167
+
168
+ ##### jsx
169
+
170
+ ```jsx
171
+ <s-page heading="Store analytics" inlineSize="large">
172
+ <s-section>
173
+ <s-stack gap="base">
174
+ <s-text>Monitor your store performance across all channels.</s-text>
175
+ <s-grid>
176
+ <s-grid-item>
177
+ <s-box
178
+ padding="base"
179
+ background="base"
180
+ borderWidth="base"
181
+ borderColor="base"
182
+ borderRadius="base"
183
+ >
184
+ <s-heading>Sales</s-heading>
185
+ <s-text type="strong">$12,456</s-text>
186
+ </s-box>
187
+ </s-grid-item>
188
+ <s-grid-item>
189
+ <s-box
190
+ padding="base"
191
+ background="base"
192
+ borderWidth="base"
193
+ borderColor="base"
194
+ borderRadius="base"
195
+ >
196
+ <s-heading>Orders</s-heading>
197
+ <s-text type="strong">145</s-text>
198
+ </s-box>
199
+ </s-grid-item>
200
+ </s-grid>
201
+ </s-stack>
202
+ </s-section>
203
+ </s-page>
204
+ ```
205
+
206
+ ##### html
207
+
208
+ ```html
209
+ <s-page heading="Store analytics" inline-size="large">
210
+ <s-section>
211
+ <s-stack gap="base">
212
+ <s-text>Monitor your store performance across all channels.</s-text>
213
+ <s-grid>
214
+ <s-grid-item>
215
+ <s-box
216
+ padding="base"
217
+ background="base"
218
+ borderWidth="base"
219
+ borderColor="base"
220
+ borderRadius="base"
221
+ >
222
+ <s-heading>Sales</s-heading>
223
+ <s-text type="strong">$12,456</s-text>
224
+ </s-box>
225
+ </s-grid-item>
226
+ <s-grid-item>
227
+ <s-box
228
+ padding="base"
229
+ background="base"
230
+ borderWidth="base"
231
+ borderColor="base"
232
+ borderRadius="base"
233
+ >
234
+ <s-heading>Orders</s-heading>
235
+ <s-text type="strong">145</s-text>
236
+ </s-box>
237
+ </s-grid-item>
238
+ </s-grid>
239
+ </s-stack>
240
+ </s-section>
241
+ </s-page>
242
+ ```
243
+
244
+ * #### Page with breadcrumbs and title
245
+
246
+ ##### Description
247
+
248
+ Shows a page with breadcrumb navigation and a descriptive heading, helping users understand their location in the navigation hierarchy.
249
+
250
+ ##### jsx
251
+
252
+ ```jsx
253
+ <s-page heading="Edit Product" inlineSize="base">
254
+ <s-link slot="breadcrumb-actions" href="/products">Products</s-link>
255
+ <s-link slot="breadcrumb-actions" href="/products/123">Acme Widget</s-link>
256
+ <s-section>
257
+ <s-text>Update your product information and settings.</s-text>
258
+ </s-section>
259
+ </s-page>
260
+ ```
261
+
262
+ ##### html
263
+
264
+ ```html
265
+ <s-page heading="Edit Product" inline-size="base">
266
+ <s-link slot="breadcrumb-actions" href="/products">Products</s-link>
267
+ <s-link slot="breadcrumb-actions" href="/products/123">Acme Widget</s-link>
268
+ <s-section>
269
+ <s-text>Update your product information and settings.</s-text>
270
+ </s-section>
271
+ </s-page>
272
+ ```
273
+
274
+ * #### Page with primary and secondary actions
275
+
276
+ ##### Description
277
+
278
+ Demonstrates a page with a primary action button and secondary action buttons, showing how to provide main and related actions alongside the page heading.
279
+
280
+ ##### jsx
281
+
282
+ ```jsx
283
+ <s-page heading="Products" inlineSize="base">
284
+ <s-button slot="secondary-actions">Preview</s-button>
285
+ <s-button slot="secondary-actions">Duplicate</s-button>
286
+ <s-button slot="primary-action" variant="primary">Save</s-button>
287
+ <s-section>
288
+ <s-text>Manage your products and organize your catalog.</s-text>
289
+ </s-section>
290
+ </s-page>
291
+ ```
292
+
293
+ ##### html
294
+
295
+ ```html
296
+ <s-page heading="Products" inline-size="base">
297
+ <s-button slot="secondary-actions">Preview</s-button>
298
+ <s-button slot="secondary-actions">Duplicate</s-button>
299
+ <s-button slot="primary-action" variant="primary">Save</s-button>
300
+ <s-section>
301
+ <s-text>Manage your products and organize your catalog.</s-text>
302
+ </s-section>
303
+ </s-page>
304
+ ```
305
+
306
+ ## Best practices
307
+
308
+ * Always provide a title that describes the current page
309
+ * Include breadcrumbs when the page is part of a flow
310
+ * Include page actions in the header only if they are relevant to the entire page
311
+ * Include no more than one primary action and 3 secondary actions per page
312
+ * Don't include any actions at the bottom of the page
313
+
314
+ ## Content guidelines
315
+
316
+ * Use sentence case and avoid unnecessary words
317
+ * Don't include punctuation like periods or exclamation marks
318
+ * Page titles should clearly communicate the page purpose
319
+ * Page actions should use a verb or verb + noun phrase (e.g., "Create store", "Edit product")
@@ -0,0 +1,333 @@
1
+ ---
2
+ title: Paragraph
3
+ description: >-
4
+ Displays a block of text and can contain inline elements such as buttons,
5
+ links, or emphasized text. Use to present standalone blocks of content as
6
+ opposed to inline text.
7
+ api_name: app-home
8
+ source_url:
9
+ html: >-
10
+ https://shopify.dev/docs/api/app-home/polaris-web-components/titles-and-text/paragraph
11
+ md: >-
12
+ https://shopify.dev/docs/api/app-home/polaris-web-components/titles-and-text/paragraph.md
13
+ ---
14
+
15
+ # Paragraph
16
+
17
+ Displays a block of text and can contain inline elements such as buttons, links, or emphasized text. Use to present standalone blocks of content as opposed to inline text.
18
+
19
+ ## Properties
20
+
21
+ * accessibilityVisibility
22
+
23
+ "visible" | "hidden" | "exclusive"
24
+
25
+ Default: 'visible'
26
+
27
+ Changes the visibility of the element.
28
+
29
+ * `visible`: the element is visible to all users.
30
+ * `hidden`: the element is removed from the accessibility tree but remains visible.
31
+ * `exclusive`: the element is visually hidden but remains in the accessibility tree.
32
+
33
+ * color
34
+
35
+ "base" | "subdued"
36
+
37
+ Default: 'base'
38
+
39
+ Modify the color to be more or less intense.
40
+
41
+ * dir
42
+
43
+ "" | "auto" | "ltr" | "rtl"
44
+
45
+ Default: ''
46
+
47
+ Indicates the directionality of the element’s text.
48
+
49
+ * `ltr`: languages written from left to right (e.g. English)
50
+ * `rtl`: languages written from right to left (e.g. Arabic)
51
+ * `auto`: the user agent determines the direction based on the content
52
+ * `''`: direction is inherited from parent elements (equivalent to not setting the attribute)
53
+
54
+ * fontVariantNumeric
55
+
56
+ "auto" | "normal" | "tabular-nums"
57
+
58
+ Default: 'auto' - inherit from the parent element
59
+
60
+ Set the numeric properties of the font.
61
+
62
+ * lineClamp
63
+
64
+ number
65
+
66
+ Default: Infinity - no truncation is applied
67
+
68
+ Truncates the text content to the specified number of lines.
69
+
70
+ * tone
71
+
72
+ "info" | "success" | "warning" | "critical" | "auto" | "neutral" | "caution"
73
+
74
+ Default: 'auto'
75
+
76
+ Sets the tone of the component, based on the intention of the information being conveyed.
77
+
78
+ ## Slots
79
+
80
+ * children
81
+
82
+ HTMLElement
83
+
84
+ The content of the Paragraph.
85
+
86
+ Examples
87
+
88
+ ### Examples
89
+
90
+ * #### Code
91
+
92
+ ##### jsx
93
+
94
+ ```jsx
95
+ <s-paragraph>
96
+ Shopify POS is the easiest way to sell your products in person. Available for
97
+ iPad, iPhone, and Android.
98
+ </s-paragraph>
99
+ ```
100
+
101
+ ##### html
102
+
103
+ ```html
104
+ <s-paragraph>
105
+ Shopify POS is the easiest way to sell your products in person. Available for
106
+ iPad, iPhone, and Android.
107
+ </s-paragraph>
108
+ ```
109
+
110
+ * #### Basic Usage
111
+
112
+ ##### Description
113
+
114
+ Demonstrates a simple paragraph with default styling, showing how to use the paragraph component for standard text content.
115
+
116
+ ##### jsx
117
+
118
+ ```jsx
119
+ <s-paragraph>
120
+ Track inventory across all your retail locations in real-time.
121
+ </s-paragraph>
122
+ ```
123
+
124
+ ##### html
125
+
126
+ ```html
127
+ <s-paragraph>
128
+ Track inventory across all your retail locations in real-time.
129
+ </s-paragraph>
130
+ ```
131
+
132
+ * #### With Tone and Color
133
+
134
+ ##### Description
135
+
136
+ Illustrates how to apply different tones and color variations to convey different types of information, such as informational and success messages.
137
+
138
+ ##### jsx
139
+
140
+ ```jsx
141
+ <s-section>
142
+ <s-paragraph tone="info" color="base">
143
+ Your order will be processed within 2-3 business days.
144
+ </s-paragraph>
145
+
146
+ <s-paragraph tone="success" color="subdued">
147
+ Payment successfully processed.
148
+ </s-paragraph>
149
+ </s-section>
150
+ ```
151
+
152
+ ##### html
153
+
154
+ ```html
155
+ <s-section>
156
+ <s-paragraph tone="info" color="base">
157
+ Your order will be processed within 2-3 business days.
158
+ </s-paragraph>
159
+
160
+ <s-paragraph tone="success" color="subdued">
161
+ Payment successfully processed.
162
+ </s-paragraph>
163
+ </s-section>
164
+ ```
165
+
166
+ * #### Line Clamping
167
+
168
+ ##### Description
169
+
170
+ Shows how to limit the number of lines displayed using the lineClamp prop, which truncates long text with an ellipsis after the specified number of lines.
171
+
172
+ ##### jsx
173
+
174
+ ```jsx
175
+ <s-box inlineSize="300px">
176
+ <s-paragraph lineClamp={1}>
177
+ Premium organic cotton t-shirt featuring sustainable manufacturing
178
+ processes, ethically sourced materials, and carbon-neutral shipping.
179
+ Available in multiple colors and sizes with customization options for your
180
+ brand.
181
+ </s-paragraph>
182
+ </s-box>
183
+ ```
184
+
185
+ ##### html
186
+
187
+ ```html
188
+ <s-box inlineSize="300px">
189
+ <s-paragraph lineClamp="1">
190
+ Premium organic cotton t-shirt featuring sustainable manufacturing
191
+ processes, ethically sourced materials, and carbon-neutral shipping.
192
+ Available in multiple colors and sizes with customization options for your
193
+ brand.
194
+ </s-paragraph>
195
+ </s-box>
196
+ ```
197
+
198
+ * #### Tabular Numbers
199
+
200
+ ##### Description
201
+
202
+ Demonstrates the use of tabular numbers with fontVariantNumeric, ensuring consistent alignment and readability for numerical data.
203
+
204
+ ##### jsx
205
+
206
+ ```jsx
207
+ <s-paragraph fontVariantNumeric="tabular-nums">
208
+ Orders: 1,234 Revenue: $45,678.90 Customers: 890
209
+ </s-paragraph>
210
+ ```
211
+
212
+ ##### html
213
+
214
+ ```html
215
+ <s-paragraph fontVariantNumeric="tabular-nums">
216
+ Orders: 1,234 Revenue: $45,678.90 Customers: 890
217
+ </s-paragraph>
218
+ ```
219
+
220
+ * #### RTL Support
221
+
222
+ ##### Description
223
+
224
+ Illustrates right-to-left (RTL) text rendering, showing how the paragraph component supports internationalization and different text directions.
225
+
226
+ ##### jsx
227
+
228
+ ```jsx
229
+ <s-paragraph dir="rtl">
230
+ محتوى النص باللغة العربية
231
+ </s-paragraph>
232
+ ```
233
+
234
+ ##### html
235
+
236
+ ```html
237
+ <s-paragraph dir="rtl">
238
+ محتوى النص باللغة العربية
239
+ </s-paragraph>
240
+ ```
241
+
242
+ * #### Screen Reader Text
243
+
244
+ ##### Description
245
+
246
+ Shows how to use the accessibilityVisibility prop to create text that is exclusively available to screen readers, improving accessibility for assistive technologies.
247
+
248
+ ##### jsx
249
+
250
+ ```jsx
251
+ <s-paragraph accessibilityVisibility="exclusive">
252
+ Table sorted by date, newest first.
253
+ </s-paragraph>
254
+ ```
255
+
256
+ ##### html
257
+
258
+ ```html
259
+ <s-paragraph accessibilityVisibility="exclusive">
260
+ Table sorted by date, newest first.
261
+ </s-paragraph>
262
+ ```
263
+
264
+ * #### Admin UI Patterns
265
+
266
+ ##### Description
267
+
268
+ Showcases various tone and color combinations for different administrative messages, illustrating how paragraph can communicate different types of information in a user interface.
269
+
270
+ ##### jsx
271
+
272
+ ```jsx
273
+ <s-section>
274
+ <s-paragraph tone="success" color="base">
275
+ Payment successfully processed and order confirmed.
276
+ </s-paragraph>
277
+
278
+ <s-paragraph tone="warning" color="base">
279
+ Inventory levels are running low for this product.
280
+ </s-paragraph>
281
+
282
+ <s-paragraph tone="critical" color="base">
283
+ This order requires immediate attention due to shipping delays.
284
+ </s-paragraph>
285
+
286
+ <s-paragraph tone="info" color="base">
287
+ Customer requested gift wrapping for this order.
288
+ </s-paragraph>
289
+
290
+ <s-paragraph tone="caution" color="base">
291
+ Review shipping address before processing.
292
+ </s-paragraph>
293
+ </s-section>
294
+ ```
295
+
296
+ ##### html
297
+
298
+ ```html
299
+ <s-section>
300
+ <s-paragraph tone="success" color="base">
301
+ Payment successfully processed and order confirmed.
302
+ </s-paragraph>
303
+
304
+ <s-paragraph tone="warning" color="base">
305
+ Inventory levels are running low for this product.
306
+ </s-paragraph>
307
+
308
+ <s-paragraph tone="critical" color="base">
309
+ This order requires immediate attention due to shipping delays.
310
+ </s-paragraph>
311
+
312
+ <s-paragraph tone="info" color="base">
313
+ Customer requested gift wrapping for this order.
314
+ </s-paragraph>
315
+
316
+ <s-paragraph tone="caution" color="base">
317
+ Review shipping address before processing.
318
+ </s-paragraph>
319
+ </s-section>
320
+ ```
321
+
322
+ ## Useful for
323
+
324
+ * Displaying text content in a paragraph format.
325
+ * Grouping elements with the same style. For instance, icons inside a paragraph will automatically adopt the paragraph's tone.
326
+
327
+ ## Best practices
328
+
329
+ * Use short paragraphs to make your content scannable.
330
+ * Use plain and clear terms.
331
+ * Don't use jargon or technical language.
332
+ * Don't use different terms to describe the same thing.
333
+ * Don't duplicate content.