@wix/headless-stores 0.0.51 → 0.0.53

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 (149) hide show
  1. package/cjs/dist/astro/actions/custom-checkout.d.ts +1 -1
  2. package/cjs/dist/astro/actions/custom-checkout.js +2 -2
  3. package/cjs/dist/astro/actions/index.d.ts +1 -1
  4. package/cjs/dist/astro/actions/index.js +1 -1
  5. package/cjs/dist/enums/index.d.ts +2 -2
  6. package/cjs/dist/enums/index.js +2 -2
  7. package/cjs/dist/react/Category.d.ts +168 -67
  8. package/cjs/dist/react/Category.js +166 -50
  9. package/cjs/dist/react/CategoryList.d.ts +56 -138
  10. package/cjs/dist/react/CategoryList.js +44 -129
  11. package/cjs/dist/react/Choice.d.ts +193 -0
  12. package/cjs/dist/react/Choice.js +259 -0
  13. package/cjs/dist/react/Option.d.ts +224 -0
  14. package/cjs/dist/react/Option.js +388 -0
  15. package/cjs/dist/react/Product.d.ts +339 -96
  16. package/cjs/dist/react/Product.js +507 -94
  17. package/cjs/dist/react/{BuyNow.js → core/BuyNow.js} +2 -2
  18. package/cjs/dist/react/core/Category.d.ts +98 -0
  19. package/cjs/dist/react/core/Category.js +81 -0
  20. package/cjs/dist/react/core/CategoryList.d.ts +185 -0
  21. package/cjs/dist/react/core/CategoryList.js +174 -0
  22. package/{dist/react → cjs/dist/react/core}/PayNow.js +2 -2
  23. package/cjs/dist/react/core/Product.d.ts +148 -0
  24. package/cjs/dist/react/core/Product.js +126 -0
  25. package/cjs/dist/react/{ProductList.d.ts → core/ProductList.d.ts} +3 -3
  26. package/cjs/dist/react/{ProductList.js → core/ProductList.js} +10 -10
  27. package/{dist/react → cjs/dist/react/core}/ProductListFilters.d.ts +3 -3
  28. package/{dist/react → cjs/dist/react/core}/ProductListFilters.js +7 -7
  29. package/cjs/dist/react/{ProductListPagination.js → core/ProductListPagination.js} +8 -8
  30. package/{dist/react → cjs/dist/react/core}/ProductListSort.d.ts +1 -1
  31. package/cjs/dist/react/{ProductListSort.js → core/ProductListSort.js} +3 -3
  32. package/{dist/react → cjs/dist/react/core}/ProductModifiers.d.ts +1 -1
  33. package/{dist/react → cjs/dist/react/core}/ProductModifiers.js +13 -13
  34. package/{dist/react → cjs/dist/react/core}/ProductVariantSelector.d.ts +2 -2
  35. package/{dist/react → cjs/dist/react/core}/ProductVariantSelector.js +7 -10
  36. package/{dist/react → cjs/dist/react/core}/SelectedVariant.d.ts +2 -2
  37. package/{dist/react → cjs/dist/react/core}/SelectedVariant.js +43 -15
  38. package/cjs/dist/react/index.d.ts +15 -10
  39. package/cjs/dist/react/index.js +15 -10
  40. package/cjs/dist/react/types.d.ts +8 -0
  41. package/cjs/dist/react/types.js +9 -0
  42. package/cjs/dist/server-actions/custom-checkout-action.js +14 -10
  43. package/cjs/dist/server-actions/index.d.ts +1 -1
  44. package/cjs/dist/server-actions/index.js +1 -1
  45. package/cjs/dist/services/buy-now-service.d.ts +1 -1
  46. package/cjs/dist/services/buy-now-service.js +6 -6
  47. package/cjs/dist/services/categories-list-service.d.ts +4 -4
  48. package/cjs/dist/services/categories-list-service.js +10 -10
  49. package/cjs/dist/services/category-service.d.ts +18 -22
  50. package/cjs/dist/services/category-service.js +12 -10
  51. package/cjs/dist/services/index.d.ts +7 -7
  52. package/cjs/dist/services/index.js +7 -7
  53. package/cjs/dist/services/pay-now-service.d.ts +1 -1
  54. package/cjs/dist/services/pay-now-service.js +4 -4
  55. package/cjs/dist/services/product-modifiers-service.d.ts +3 -3
  56. package/cjs/dist/services/product-modifiers-service.js +7 -7
  57. package/cjs/dist/services/product-service.d.ts +4 -4
  58. package/cjs/dist/services/product-service.js +18 -18
  59. package/cjs/dist/services/products-list-search-service.d.ts +5 -5
  60. package/cjs/dist/services/products-list-search-service.js +117 -117
  61. package/cjs/dist/services/products-list-service.d.ts +4 -4
  62. package/cjs/dist/services/products-list-service.js +12 -12
  63. package/cjs/dist/services/selected-variant-service.d.ts +6 -2
  64. package/cjs/dist/services/selected-variant-service.js +92 -87
  65. package/cjs/dist/utils/index.d.ts +1 -0
  66. package/cjs/dist/utils/index.js +5 -4
  67. package/cjs/dist/utils/renderAsChild.d.ts +96 -0
  68. package/cjs/dist/utils/renderAsChild.js +66 -0
  69. package/cjs/dist/utils/renderChildren.d.ts +41 -0
  70. package/cjs/dist/utils/renderChildren.js +44 -0
  71. package/cjs/dist/utils/url-params.js +3 -3
  72. package/dist/astro/actions/custom-checkout.d.ts +1 -1
  73. package/dist/astro/actions/custom-checkout.js +2 -2
  74. package/dist/astro/actions/index.d.ts +1 -1
  75. package/dist/astro/actions/index.js +1 -1
  76. package/dist/enums/index.d.ts +2 -2
  77. package/dist/enums/index.js +2 -2
  78. package/dist/react/Category.d.ts +168 -67
  79. package/dist/react/Category.js +166 -50
  80. package/dist/react/CategoryList.d.ts +56 -138
  81. package/dist/react/CategoryList.js +44 -129
  82. package/dist/react/Choice.d.ts +193 -0
  83. package/dist/react/Choice.js +259 -0
  84. package/dist/react/Option.d.ts +224 -0
  85. package/dist/react/Option.js +388 -0
  86. package/dist/react/Product.d.ts +339 -96
  87. package/dist/react/Product.js +507 -94
  88. package/dist/react/{BuyNow.js → core/BuyNow.js} +2 -2
  89. package/dist/react/core/Category.d.ts +98 -0
  90. package/dist/react/core/Category.js +81 -0
  91. package/dist/react/core/CategoryList.d.ts +185 -0
  92. package/dist/react/core/CategoryList.js +174 -0
  93. package/{cjs/dist/react → dist/react/core}/PayNow.js +2 -2
  94. package/dist/react/core/Product.d.ts +148 -0
  95. package/dist/react/core/Product.js +126 -0
  96. package/dist/react/{ProductList.d.ts → core/ProductList.d.ts} +3 -3
  97. package/dist/react/{ProductList.js → core/ProductList.js} +10 -10
  98. package/{cjs/dist/react → dist/react/core}/ProductListFilters.d.ts +3 -3
  99. package/{cjs/dist/react → dist/react/core}/ProductListFilters.js +7 -7
  100. package/dist/react/{ProductListPagination.js → core/ProductListPagination.js} +8 -8
  101. package/{cjs/dist/react → dist/react/core}/ProductListSort.d.ts +1 -1
  102. package/dist/react/{ProductListSort.js → core/ProductListSort.js} +3 -3
  103. package/{cjs/dist/react → dist/react/core}/ProductModifiers.d.ts +1 -1
  104. package/{cjs/dist/react → dist/react/core}/ProductModifiers.js +13 -13
  105. package/{cjs/dist/react → dist/react/core}/ProductVariantSelector.d.ts +2 -2
  106. package/{cjs/dist/react → dist/react/core}/ProductVariantSelector.js +7 -10
  107. package/{cjs/dist/react → dist/react/core}/SelectedVariant.d.ts +2 -2
  108. package/{cjs/dist/react → dist/react/core}/SelectedVariant.js +43 -15
  109. package/dist/react/index.d.ts +15 -10
  110. package/dist/react/index.js +15 -10
  111. package/dist/react/types.d.ts +8 -0
  112. package/dist/react/types.js +9 -0
  113. package/dist/server-actions/custom-checkout-action.js +14 -10
  114. package/dist/server-actions/index.d.ts +1 -1
  115. package/dist/server-actions/index.js +1 -1
  116. package/dist/services/buy-now-service.d.ts +1 -1
  117. package/dist/services/buy-now-service.js +6 -6
  118. package/dist/services/categories-list-service.d.ts +4 -4
  119. package/dist/services/categories-list-service.js +10 -10
  120. package/dist/services/category-service.d.ts +18 -22
  121. package/dist/services/category-service.js +12 -10
  122. package/dist/services/index.d.ts +7 -7
  123. package/dist/services/index.js +7 -7
  124. package/dist/services/pay-now-service.d.ts +1 -1
  125. package/dist/services/pay-now-service.js +4 -4
  126. package/dist/services/product-modifiers-service.d.ts +3 -3
  127. package/dist/services/product-modifiers-service.js +7 -7
  128. package/dist/services/product-service.d.ts +4 -4
  129. package/dist/services/product-service.js +18 -18
  130. package/dist/services/products-list-search-service.d.ts +5 -5
  131. package/dist/services/products-list-search-service.js +117 -117
  132. package/dist/services/products-list-service.d.ts +4 -4
  133. package/dist/services/products-list-service.js +12 -12
  134. package/dist/services/selected-variant-service.d.ts +6 -2
  135. package/dist/services/selected-variant-service.js +92 -87
  136. package/dist/utils/index.d.ts +1 -0
  137. package/dist/utils/index.js +5 -4
  138. package/dist/utils/renderAsChild.d.ts +96 -0
  139. package/dist/utils/renderAsChild.js +66 -0
  140. package/dist/utils/renderChildren.d.ts +41 -0
  141. package/dist/utils/renderChildren.js +44 -0
  142. package/dist/utils/url-params.js +3 -3
  143. package/package.json +7 -3
  144. /package/cjs/dist/react/{BuyNow.d.ts → core/BuyNow.d.ts} +0 -0
  145. /package/cjs/dist/react/{PayNow.d.ts → core/PayNow.d.ts} +0 -0
  146. /package/cjs/dist/react/{ProductListPagination.d.ts → core/ProductListPagination.d.ts} +0 -0
  147. /package/dist/react/{BuyNow.d.ts → core/BuyNow.d.ts} +0 -0
  148. /package/dist/react/{PayNow.d.ts → core/PayNow.d.ts} +0 -0
  149. /package/dist/react/{ProductListPagination.d.ts → core/ProductListPagination.d.ts} +0 -0
@@ -1,12 +1,41 @@
1
- import { ProductServiceConfig } from "../services/product-service.js";
2
- import type { V3Product, ProductMedia } from "@wix/auto_sdk_stores_products-v-3";
3
- export interface RootProps {
1
+ import type { V3Product } from '@wix/auto_sdk_stores_products-v-3';
2
+ import React from 'react';
3
+ import { type AsChildProps } from '../utils/index.js';
4
+ import { AsContent } from './types.js';
5
+ /**
6
+ * Context for sharing variant options state between components
7
+ */
8
+ interface VariantsContextValue {
9
+ hasOptions: boolean;
10
+ options: any[];
11
+ }
12
+ /**
13
+ * Hook to access variants context
14
+ */
15
+ export declare function useVariantsContext(): VariantsContextValue;
16
+ /**
17
+ * Context for sharing modifier options state between components
18
+ */
19
+ interface ModifiersContextValue {
20
+ hasModifiers: boolean;
21
+ modifiers: any[];
22
+ }
23
+ /**
24
+ * Hook to access modifiers context
25
+ */
26
+ export declare function useModifiersContext(): ModifiersContextValue;
27
+ /**
28
+ * Props for the Product root component following the documented API
29
+ */
30
+ export interface ProductRootProps {
4
31
  children: React.ReactNode;
5
- productServiceConfig: ProductServiceConfig;
32
+ product: V3Product;
33
+ selectedVariant?: any;
6
34
  }
7
35
  /**
8
- * Root component that provides the Product service context to its children.
9
- * This component sets up the necessary services for rendering and managing a single product's data.
36
+ * Root component that provides all necessary service contexts for a complete product experience.
37
+ * This composite component combines Product, ProductVariantSelector, ProductModifiers, and SelectedVariant
38
+ * functionality following the documented API patterns with proper data attributes.
10
39
  *
11
40
  * @order 1
12
41
  * @component
@@ -14,135 +43,349 @@ export interface RootProps {
14
43
  * ```tsx
15
44
  * import { Product } from '@wix/stores/components';
16
45
  *
17
- * function ProductPage() {
46
+ * function ProductPage({ product }) {
18
47
  * return (
19
- * <Product.Root productServiceConfig={{ product: myProduct }}>
20
- * <div>
21
- * <Product.Name>
22
- * {({ name }) => (
23
- * <h1
24
- * className="text-4xl font-bold text-content-primary mb-4"
25
- * data-testid="product-name"
26
- * >
27
- * {name}
28
- * </h1>
29
- * )}
30
- * </Product.Name>
31
- * </div>
48
+ * <Product.Root product={product}>
49
+ * <Product.Name className="text-4xl font-bold" />
32
50
  * </Product.Root>
33
51
  * );
34
52
  * }
35
53
  * ```
36
54
  */
37
- export declare function Root(props: RootProps): React.ReactNode;
55
+ export declare function Root(props: ProductRootProps): React.ReactNode;
38
56
  /**
39
- * Props for ProductName headless component
57
+ * Props for Product Name component
40
58
  */
41
- export interface ProductNameProps {
42
- /** Render prop function that receives product name data */
43
- children: (props: ProductNameRenderProps) => React.ReactNode;
59
+ export interface NameProps extends AsChildProps<{
60
+ name: string;
61
+ }> {
44
62
  }
45
63
  /**
46
- * Render props for ProductName component
64
+ * Displays the product name with customizable rendering following the documented API.
65
+ *
66
+ * @component
67
+ * @example
68
+ * ```tsx
69
+ * // Default usage
70
+ * <Product.Name className="text-4xl font-bold" />
71
+ *
72
+ * // asChild with primitive
73
+ * <Product.Name asChild>
74
+ * <h1 className="text-4xl font-bold" />
75
+ * </Product.Name>
76
+ *
77
+ * // asChild with react component
78
+ * <Product.Name asChild>
79
+ * {React.forwardRef(({name, ...props}, ref) => (
80
+ * <h1 ref={ref} {...props} className="text-4xl font-bold">
81
+ * {name}
82
+ * </h1>
83
+ * ))}
84
+ * </Product.Name>
85
+ * ```
47
86
  */
48
- export interface ProductNameRenderProps {
49
- /** Product name */
50
- name: string;
87
+ export declare const Name: React.ForwardRefExoticComponent<NameProps & React.RefAttributes<HTMLElement>>;
88
+ /**
89
+ * Props for Product Description component
90
+ */
91
+ export interface DescriptionProps extends AsChildProps<{
92
+ description: string;
93
+ }> {
94
+ /** Format of the description content */
95
+ as?: `${AsContent}`;
51
96
  }
52
97
  /**
53
- * Headless component for product name display
98
+ * Displays the product description with customizable rendering and format options following the documented API.
54
99
  *
55
100
  * @component
56
101
  * @example
57
102
  * ```tsx
58
- * import { Product } from '@wix/stores/components';
103
+ * // Default usage (plain text)
104
+ * <Product.Description className="text-content-secondary" />
59
105
  *
60
- * function ProductHeader() {
61
- * return (
62
- * <Product.Name>
63
- * {({ name }) => (
64
- * <h1>{name}</h1>
65
- * )}
66
- * </Product.Name>
67
- * );
68
- * }
106
+ * // HTML content
107
+ * <Product.Description as="html" className="prose" />
108
+ *
109
+ * // asChild with custom rendering
110
+ * <Product.Description as="html" asChild>
111
+ * {({ description }) => (
112
+ * <div
113
+ * className="text-content-secondary"
114
+ * dangerouslySetInnerHTML={{ __html: description }}
115
+ * />
116
+ * )}
117
+ * </Product.Description>
69
118
  * ```
70
119
  */
71
- export declare function Name(props: ProductNameProps): import("react").ReactNode;
120
+ export declare const Description: React.ForwardRefExoticComponent<DescriptionProps & React.RefAttributes<HTMLElement>>;
72
121
  /**
73
- * Props for ProductDescription headless component
122
+ * Props for Product Price component
74
123
  */
75
- export interface ProductDescriptionProps {
76
- /** Render prop function that receives product description data */
77
- children: (props: ProductDescriptionRenderProps) => React.ReactNode;
124
+ export interface PriceProps extends AsChildProps<{
125
+ price: string;
126
+ formattedPrice: string;
127
+ }> {
78
128
  }
79
129
  /**
80
- * Render props for ProductDescription component
130
+ * Displays the current product price with customizable rendering following the documented API.
131
+ *
132
+ * @component
133
+ * @example
134
+ * ```tsx
135
+ * // Default usage
136
+ * <Product.Price className="text-3xl font-bold text-content-primary data-[discounted]:text-brand-primary" />
137
+ *
138
+ * // asChild with primitive
139
+ * <Product.Price asChild>
140
+ * <span className="text-3xl font-bold text-content-primary" />
141
+ * </Product.Price>
142
+ *
143
+ * // asChild with react component
144
+ * <Product.Price asChild>
145
+ * {React.forwardRef(({price, formattedPrice, ...props}, ref) => (
146
+ * <span ref={ref} {...props} className="text-3xl font-bold text-content-primary">
147
+ * {formattedPrice}
148
+ * </span>
149
+ * ))}
150
+ * </Product.Price>
151
+ * ```
81
152
  */
82
- export interface ProductDescriptionRenderProps {
83
- /** Product description using the RICOS (Rich Content Object) format. See https://dev.wix.com/docs/ricos/api-reference/ricos-document */
84
- description: NonNullable<V3Product["description"]>;
85
- /** Product description with plain html */
86
- plainDescription: NonNullable<V3Product["plainDescription"]>;
87
- }
153
+ export declare const Price: React.ForwardRefExoticComponent<PriceProps & React.RefAttributes<HTMLElement>>;
88
154
  /**
89
- * Render props for ProductDescription component
155
+ * Props for Product CompareAtPrice component
90
156
  */
91
- export interface ProductDescriptionRenderProps {
92
- /** Product description using the RICOS (Rich Content Object) format. See https://dev.wix.com/docs/ricos/api-reference/ricos-document */
93
- description: NonNullable<V3Product["description"]>;
94
- /** Product description with plain html */
95
- plainDescription: NonNullable<V3Product["plainDescription"]>;
157
+ export interface CompareAtPriceProps extends AsChildProps<{
158
+ price: string;
159
+ formattedPrice: string;
160
+ }> {
96
161
  }
97
162
  /**
98
- * Headless component for product description display
163
+ * Displays the compare-at (original) price when on sale with customizable rendering following the documented API.
99
164
  *
100
165
  * @component
101
166
  * @example
102
167
  * ```tsx
103
- * import { Product } from '@wix/stores/components';
168
+ * // Default usage (only shows when on sale)
169
+ * <Product.CompareAtPrice className="text-lg text-content-faded line-through hidden data-[discounted]:inline" />
104
170
  *
105
- * function ProductDescription() {
106
- * return (
107
- * <Product.Description>
108
- * {({ plainDescription, description }) => (
109
- * <div>
110
- * {plainDescription && (
111
- * <div
112
- * dangerouslySetInnerHTML={{
113
- * __html: plainDescription,
114
- * }}
115
- * />
116
- * )}
117
- * {description && (
118
- * <div>Rich content description available</div>
119
- * )}
120
- * </div>
121
- * )}
122
- * </Product.Description>
123
- * );
124
- * }
171
+ * // asChild with primitive
172
+ * <Product.CompareAtPrice asChild>
173
+ * <span className="text-lg text-content-faded line-through" />
174
+ * </Product.CompareAtPrice>
175
+ *
176
+ * // asChild with react component
177
+ * <Product.CompareAtPrice asChild>
178
+ * {React.forwardRef(({formattedPrice, ...props}, ref) => (
179
+ * <span
180
+ * ref={ref}
181
+ * {...props}
182
+ * className="hidden data-[discounted]:inline text-lg text-content-faded line-through"
183
+ * >
184
+ * Was: {formattedPrice}
185
+ * </span>
186
+ * ))}
187
+ * </Product.CompareAtPrice>
125
188
  * ```
126
189
  */
127
- export declare function Description(props: ProductDescriptionProps): import("react").ReactNode;
128
- export interface ProductMediaProps {
129
- children: (props: ProductMediaRenderProps) => React.ReactNode;
190
+ export declare const CompareAtPrice: React.ForwardRefExoticComponent<CompareAtPriceProps & React.RefAttributes<HTMLElement>>;
191
+ /**
192
+ * Props for Product Variants container
193
+ */
194
+ export interface VariantsProps extends AsChildProps<{
195
+ hasOptions: boolean;
196
+ }> {
130
197
  }
131
- export interface ProductMediaRenderProps {
132
- media: ProductMedia[];
198
+ /**
199
+ * Container for product variant selection system.
200
+ * Does not render when there are no variants.
201
+ *
202
+ * @component
203
+ * @example
204
+ * ```tsx
205
+ * // Default usage
206
+ * <Product.Variants>
207
+ * <Product.VariantOptions>
208
+ * <Product.VariantOptionRepeater>
209
+ * <Option.Name className="text-lg font-medium mb-3" />
210
+ * <Option.Choices>
211
+ * <Option.ChoiceRepeater>
212
+ * <Choice.Text className="px-4 py-2 border rounded-lg" />
213
+ * <Choice.Color className="w-10 h-10 rounded-full border-4" />
214
+ * </Option.ChoiceRepeater>
215
+ * </Option.Choices>
216
+ * </Product.VariantOptionRepeater>
217
+ * </Product.VariantOptions>
218
+ * </Product.Variants>
219
+ *
220
+ * // asChild with primitive
221
+ * <Product.Variants asChild>
222
+ * <section className="variant-section">
223
+ * <Product.VariantOptions>
224
+ * // variant options
225
+ * </Product.VariantOptions>
226
+ * </section>
227
+ * </Product.Variants>
228
+ *
229
+ * // asChild with react component
230
+ * <Product.Variants asChild>
231
+ * {React.forwardRef(({hasOptions, ...props}, ref) => (
232
+ * <section ref={ref} {...props} className="variant-section">
233
+ * {hasOptions && <h3>Choose Options</h3>}
234
+ * {props.children}
235
+ * </section>
236
+ * ))}
237
+ * </Product.Variants>
238
+ * ```
239
+ */
240
+ export declare const Variants: React.ForwardRefExoticComponent<VariantsProps & React.RefAttributes<HTMLElement>>;
241
+ /**
242
+ * Props for Product VariantOptions component
243
+ */
244
+ export interface VariantOptionsProps {
245
+ children: React.ReactNode;
246
+ emptyState?: React.ReactNode;
133
247
  }
134
- export declare function Media(props: ProductMediaProps): import("react").ReactNode;
135
- export interface ProductProps {
136
- children: (props: ProductRenderProps) => React.ReactNode;
248
+ /**
249
+ * Component that provides access to variant options.
250
+ *
251
+ * @component
252
+ * @example
253
+ * ```tsx
254
+ * // Default usage
255
+ * <Product.VariantOptions emptyState={<div>No options available</div>}>
256
+ * <Product.VariantOptionRepeater>
257
+ * <Option.Name />
258
+ * <Option.Choices>
259
+ * <Option.ChoiceRepeater>
260
+ * <Choice.Text />
261
+ * </Option.ChoiceRepeater>
262
+ * </Option.Choices>
263
+ * </Product.VariantOptionRepeater>
264
+ * </Product.VariantOptions>
265
+ *
266
+ * // Simple container usage
267
+ * <Product.VariantOptions emptyState={<div>No options</div>}>
268
+ * <div className="options-container">
269
+ * <Product.VariantOptionRepeater>
270
+ * // option content
271
+ * </Product.VariantOptionRepeater>
272
+ * </div>
273
+ * </Product.VariantOptions>
274
+ * ```
275
+ */
276
+ export declare const VariantOptions: React.ForwardRefExoticComponent<VariantOptionsProps & React.RefAttributes<HTMLElement>>;
277
+ /**
278
+ * Props for Product VariantOptionRepeater component
279
+ */
280
+ export interface VariantOptionRepeaterProps {
281
+ children: React.ReactNode;
137
282
  }
138
- export interface ProductRenderProps {
139
- product: V3Product;
283
+ /**
284
+ * Repeater component that renders children for each variant option.
285
+ *
286
+ * @component
287
+ */
288
+ export declare const VariantOptionRepeater: React.ForwardRefExoticComponent<VariantOptionRepeaterProps & React.RefAttributes<HTMLElement>>;
289
+ /**
290
+ * Props for Product Modifiers container
291
+ */
292
+ export interface ModifiersProps extends AsChildProps<{
293
+ hasModifiers: boolean;
294
+ }> {
140
295
  }
141
- export declare function Content(props: ProductProps): import("react").ReactNode;
142
- export interface LoadingProps {
143
- children: (props: LoadingRenderProps) => React.ReactNode;
296
+ /**
297
+ * Container for product modifier system.
298
+ * Does not render when there are no modifiers.
299
+ *
300
+ * @component
301
+ * @example
302
+ * ```tsx
303
+ * // Default usage
304
+ * <Product.Modifiers>
305
+ * <Product.ModifierOptions>
306
+ * <Product.ModifierOptionRepeater>
307
+ * <Option.Name className="text-lg font-medium mb-3" />
308
+ * <Option.Choices>
309
+ * <Option.ChoiceRepeater>
310
+ * <Choice.Text className="px-4 py-2 border rounded-lg" />
311
+ * <Choice.Color className="w-10 h-10 rounded-full border-4" />
312
+ * <Choice.FreeText className="w-full p-3 border rounded-lg resize-none" />
313
+ * </Option.ChoiceRepeater>
314
+ * </Option.Choices>
315
+ * </Product.ModifierOptionRepeater>
316
+ * </Product.ModifierOptions>
317
+ * </Product.Modifiers>
318
+ *
319
+ * // asChild with primitive
320
+ * <Product.Modifiers asChild>
321
+ * <section className="modifier-section">
322
+ * <Product.ModifierOptions>
323
+ * // modifier options
324
+ * </Product.ModifierOptions>
325
+ * </section>
326
+ * </Product.Modifiers>
327
+ *
328
+ * // asChild with react component
329
+ * <Product.Modifiers asChild>
330
+ * {React.forwardRef(({hasModifiers, ...props}, ref) => (
331
+ * <section ref={ref} {...props} className="modifier-section">
332
+ * {hasModifiers && <h3>Customize Your Product</h3>}
333
+ * {props.children}
334
+ * </section>
335
+ * ))}
336
+ * </Product.Modifiers>
337
+ * ```
338
+ */
339
+ export declare const Modifiers: React.ForwardRefExoticComponent<ModifiersProps & React.RefAttributes<HTMLElement>>;
340
+ /**
341
+ * Props for Product ModifierOptions component
342
+ */
343
+ export interface ModifierOptionsProps {
344
+ children: React.ReactNode;
345
+ emptyState?: React.ReactNode;
144
346
  }
145
- export interface LoadingRenderProps {
146
- isLoading: boolean;
347
+ /**
348
+ * Component that provides access to modifier options.
349
+ *
350
+ * @component
351
+ * @example
352
+ * ```tsx
353
+ * // Default usage
354
+ * <Product.ModifierOptions emptyState={<div>No options available</div>}>
355
+ * <Product.ModifierOptionRepeater>
356
+ * <Option.Name />
357
+ * <Option.Choices>
358
+ * <Option.ChoiceRepeater>
359
+ * <Choice.Text />
360
+ * <Choice.Color />
361
+ * <Choice.FreeText />
362
+ * </Option.ChoiceRepeater>
363
+ * </Option.Choices>
364
+ * </Product.ModifierOptionRepeater>
365
+ * </Product.ModifierOptions>
366
+ *
367
+ * // Simple container usage
368
+ * <Product.ModifierOptions emptyState={<div>No options</div>}>
369
+ * <div className="options-container">
370
+ * <Product.ModifierOptionRepeater>
371
+ * // option content
372
+ * </Product.ModifierOptionRepeater>
373
+ * </div>
374
+ * </Product.ModifierOptions>
375
+ * ```
376
+ */
377
+ export declare const ModifierOptions: React.ForwardRefExoticComponent<ModifierOptionsProps & React.RefAttributes<HTMLElement>>;
378
+ /**
379
+ * Props for Product ModifierOptionRepeater component
380
+ */
381
+ export interface ModifierOptionRepeaterProps {
382
+ children: React.ReactNode;
383
+ allowedTypes?: ('color' | 'text' | 'free-text')[];
147
384
  }
148
- export declare function Loading(props: LoadingProps): import("react").ReactNode;
385
+ /**
386
+ * Repeater component that renders children for each modifier option.
387
+ *
388
+ * @component
389
+ */
390
+ export declare const ModifierOptionRepeater: React.ForwardRefExoticComponent<ModifierOptionRepeaterProps & React.RefAttributes<HTMLElement>>;
391
+ export {};