@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,377 @@
1
+ ---
2
+ title: ClickableChip
3
+ description: >-
4
+ Interactive button used to categorize or highlight content attributes. They
5
+ are often displayed near the content they classify, enhancing discoverability
6
+ by allowing users to identify items with similar properties.
7
+ api_name: app-home
8
+ source_url:
9
+ html: >-
10
+ https://shopify.dev/docs/api/app-home/polaris-web-components/actions/clickablechip
11
+ md: >-
12
+ https://shopify.dev/docs/api/app-home/polaris-web-components/actions/clickablechip.md
13
+ ---
14
+
15
+ # Clickable​Chip
16
+
17
+ Interactive button used to categorize or highlight content attributes. They are often displayed near the content they classify, enhancing discoverability by allowing users to identify items with similar properties.
18
+
19
+ ## Properties
20
+
21
+ * accessibilityLabel
22
+
23
+ string
24
+
25
+ A label that describes the purpose or contents of the Chip. It will be read to users using assistive technologies such as screen readers.
26
+
27
+ * color
28
+
29
+ ColorKeyword
30
+
31
+ Default: 'base'
32
+
33
+ Modify the color to be more or less intense.
34
+
35
+ * command
36
+
37
+ '--auto' | '--show' | '--hide' | '--toggle'
38
+
39
+ Default: '--auto'
40
+
41
+ Sets the action the [command](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#command) should take when this clickable is activated.
42
+
43
+ See the documentation of particular components for the actions they support.
44
+
45
+ * `--auto`: a default action for the target component.
46
+ * `--show`: shows the target component.
47
+ * `--hide`: hides the target component.
48
+ * `--toggle`: toggles the target component.
49
+
50
+ * commandFor
51
+
52
+ string
53
+
54
+ Sets the element the [commandFor](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#commandfor) should act on when this clickable is activated.
55
+
56
+ * disabled
57
+
58
+ boolean
59
+
60
+ Default: false
61
+
62
+ Disables the chip, disallowing any interaction.
63
+
64
+ * hidden
65
+
66
+ boolean
67
+
68
+ Default: false
69
+
70
+ Determines whether the chip is hidden.
71
+
72
+ If this property is being set on each framework render (as in 'controlled' usage), and the chip is `removable`, ensure you update app state for this property when the `remove` event fires.
73
+
74
+ If the chip is not `removable`, it can still be hidden by setting this property.
75
+
76
+ * href
77
+
78
+ string
79
+
80
+ The URL to link to.
81
+
82
+ * If set, it will navigate to the location specified by `href` after executing the `click` event.
83
+ * If a `commandFor` is set, the `command` will be executed instead of the navigation.
84
+
85
+ * interestFor
86
+
87
+ string
88
+
89
+ Sets the element the [interestFor](https://open-ui.org/components/interest-invokers.explainer/#the-pitch-in-code) should act on when this clickable is activated.
90
+
91
+ * removable
92
+
93
+ boolean
94
+
95
+ Default: false
96
+
97
+ Whether the chip is removable.
98
+
99
+ ### ColorKeyword
100
+
101
+ ```ts
102
+ 'subdued' | 'base' | 'strong'
103
+ ```
104
+
105
+ ## Events
106
+
107
+ Learn more about [registering events](https://shopify.dev/docs/api/app-home/using-polaris-components#event-handling).
108
+
109
+ * afterhide
110
+
111
+ CallbackEventListener\<typeof tagName> | null
112
+
113
+ * click
114
+
115
+ CallbackEventListener\<typeof tagName> | null
116
+
117
+ * remove
118
+
119
+ CallbackEventListener\<typeof tagName> | null
120
+
121
+ ### CallbackEventListener
122
+
123
+ ```ts
124
+ (EventListener & {
125
+ (event: CallbackEvent<T>): void;
126
+ }) | null
127
+ ```
128
+
129
+ ### CallbackEvent
130
+
131
+ ```ts
132
+ Event & {
133
+ currentTarget: HTMLElementTagNameMap[T];
134
+ }
135
+ ```
136
+
137
+ ## Slots
138
+
139
+ * children
140
+
141
+ HTMLElement
142
+
143
+ The content of the clickable chip.
144
+
145
+ * graphic
146
+
147
+ HTMLElement
148
+
149
+ The graphic to display in the clickable chip.
150
+
151
+ Only accepts `Icon` components.
152
+
153
+ Examples
154
+
155
+ ### Examples
156
+
157
+ * #### Code
158
+
159
+ ##### jsx
160
+
161
+ ```jsx
162
+ <s-clickable-chip>Clickable chip</s-clickable-chip>
163
+ ```
164
+
165
+ ##### html
166
+
167
+ ```html
168
+ <s-clickable-chip>Clickable chip</s-clickable-chip>
169
+ ```
170
+
171
+ * #### Basic Usage
172
+
173
+ ##### Description
174
+
175
+ Demonstrates a simple clickable chip with a base color and interactive functionality.
176
+
177
+ ##### jsx
178
+
179
+ ```jsx
180
+ <s-stack direction="inline" gap="base">
181
+ <s-clickable-chip color="base" accessibilityLabel="Filter by active products">
182
+ Active
183
+ </s-clickable-chip>
184
+ <s-clickable-chip
185
+ color="subdued"
186
+ accessibilityLabel="Filter by draft products"
187
+ >
188
+ Draft
189
+ </s-clickable-chip>
190
+ <s-clickable-chip
191
+ color="strong"
192
+ accessibilityLabel="Filter by archived products"
193
+ >
194
+ Archived
195
+ </s-clickable-chip>
196
+ </s-stack>
197
+ ```
198
+
199
+ ##### html
200
+
201
+ ```html
202
+ <s-stack direction="inline" gap="base">
203
+ <s-clickable-chip color="base" accessibilityLabel="Filter by active products">
204
+ Active
205
+ </s-clickable-chip>
206
+ <s-clickable-chip
207
+ color="subdued"
208
+ accessibilityLabel="Filter by draft products"
209
+ >
210
+ Draft
211
+ </s-clickable-chip>
212
+ <s-clickable-chip
213
+ color="strong"
214
+ accessibilityLabel="Filter by archived products"
215
+ >
216
+ Archived
217
+ </s-clickable-chip>
218
+ </s-stack>
219
+ ```
220
+
221
+ * #### With Icon and Remove Button
222
+
223
+ ##### Description
224
+
225
+ Showcases a strong-colored clickable chip with a check circle icon and a removable state.
226
+
227
+ ##### jsx
228
+
229
+ ```jsx
230
+ <s-clickable-chip
231
+ color="strong"
232
+ accessibilityLabel="Remove status filter"
233
+ removable
234
+ >
235
+ <s-icon slot="graphic" type="check-circle" />
236
+ In progress
237
+ </s-clickable-chip>
238
+ ```
239
+
240
+ ##### html
241
+
242
+ ```html
243
+ <s-clickable-chip
244
+ color="strong"
245
+ accessibilityLabel="Remove status filter"
246
+ removable
247
+ >
248
+ <s-icon slot="graphic" type="check-circle"></s-icon>
249
+ In progress
250
+ </s-clickable-chip>
251
+ ```
252
+
253
+ * #### As a Link
254
+
255
+ ##### Description
256
+
257
+ Demonstrates a subdued clickable chip configured as a link with a product icon.
258
+
259
+ ##### jsx
260
+
261
+ ```jsx
262
+ <s-clickable-chip
263
+ color="subdued"
264
+ href="javascript:void(0)"
265
+ accessibilityLabel="View T-shirt product"
266
+ >
267
+ <s-icon slot="graphic" type="product" />
268
+ T-shirt
269
+ </s-clickable-chip>
270
+ ```
271
+
272
+ ##### html
273
+
274
+ ```html
275
+ <s-clickable-chip
276
+ color="subdued"
277
+ href="javascript:void(0)"
278
+ accessibilityLabel="View T-shirt product"
279
+ >
280
+ <s-icon slot="graphic" type="product"></s-icon>
281
+ T-shirt
282
+ </s-clickable-chip>
283
+ ```
284
+
285
+ * #### Disabled State
286
+
287
+ ##### Description
288
+
289
+ Illustrates a clickable chip in a disabled state, preventing interaction while displaying an inactive status.
290
+
291
+ ##### jsx
292
+
293
+ ```jsx
294
+ <s-clickable-chip
295
+ color="base"
296
+ disabled
297
+ accessibilityLabel="Status filter (disabled)"
298
+ >
299
+ Inactive
300
+ </s-clickable-chip>
301
+ ```
302
+
303
+ ##### html
304
+
305
+ ```html
306
+ <s-clickable-chip
307
+ color="base"
308
+ disabled
309
+ accessibilityLabel="Status filter (disabled)"
310
+ >
311
+ Inactive
312
+ </s-clickable-chip>
313
+ ```
314
+
315
+ * #### Multiple Chips with Proper Spacing
316
+
317
+ ##### Description
318
+
319
+ Demonstrates how multiple clickable chips with different colors, icons, and states can be arranged using an inline stack for consistent layout and spacing.
320
+
321
+ ##### jsx
322
+
323
+ ```jsx
324
+ <s-stack direction="inline" gap="base">
325
+ <s-clickable-chip accessibilityLabel="Filter by status">
326
+ Active
327
+ </s-clickable-chip>
328
+ <s-clickable-chip
329
+ color="strong"
330
+ accessibilityLabel="Remove status filter"
331
+ removable
332
+ >
333
+ <s-icon slot="graphic" type="check-circle" />
334
+ In progress
335
+ </s-clickable-chip>
336
+ <s-clickable-chip color="subdued" accessibilityLabel="Filter by category">
337
+ <s-icon slot="graphic" type="filter" />
338
+ Category
339
+ </s-clickable-chip>
340
+ </s-stack>
341
+ ```
342
+
343
+ ##### html
344
+
345
+ ```html
346
+ <s-stack direction="inline" gap="base">
347
+ <s-clickable-chip accessibilityLabel="Filter by status">
348
+ Active
349
+ </s-clickable-chip>
350
+ <s-clickable-chip
351
+ color="strong"
352
+ accessibilityLabel="Remove status filter"
353
+ removable
354
+ >
355
+ <s-icon slot="graphic" type="check-circle"></s-icon>
356
+ In progress
357
+ </s-clickable-chip>
358
+ <s-clickable-chip color="subdued" accessibilityLabel="Filter by category">
359
+ <s-icon slot="graphic" type="filter"></s-icon>
360
+ Category
361
+ </s-clickable-chip>
362
+ </s-stack>
363
+ ```
364
+
365
+ ## Useful for
366
+
367
+ * Creating interactive filters or tags that can be clicked or removed
368
+ * Navigating to related content when configured as a link
369
+ * Allowing merchants to dismiss or remove applied filters or selections
370
+
371
+ ## Best practices
372
+
373
+ * Use for interactive chips that merchants can click or dismiss
374
+ * Use Chip component instead for static, non-interactive indicators
375
+ * Keep labels short to avoid truncation
376
+ * Use color variants to indicate importance (subdued, base, strong)
377
+ * Add icons to provide visual context