@mobielnl/elements 0.0.3 → 0.1.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.
- package/README.md +124 -112
- package/dist/elements.css +1 -1
- package/dist/elements.js +12 -8
- package/dist/elements.umd.cjs +290 -58
- package/dist/index-BWzAES_a.js +32482 -0
- package/dist/{index-CreNKZHw.js → index-C9TtaG8T.js} +1 -1
- package/dist/index.d.ts +561 -46
- package/package.json +9 -2
- package/dist/index-DD6DvdOQ.js +0 -18054
package/dist/index.d.ts
CHANGED
|
@@ -1,243 +1,758 @@
|
|
|
1
1
|
import { JSX } from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import * as z_2 from 'zod';
|
|
3
5
|
|
|
6
|
+
export declare function ActiveFilterChips({ activeFilters, filterOptions, onFilterRemove, classNames, }: ActiveFilterChipsProps): JSX.Element | null;
|
|
7
|
+
|
|
8
|
+
declare type ActiveFilterChipsClassNames = {
|
|
9
|
+
container?: string;
|
|
10
|
+
filterChip?: FilterChipClassNames;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
declare type ActiveFilterChipsProps = {
|
|
14
|
+
activeFilters: FilterValue[];
|
|
15
|
+
filterOptions: FilterOption[];
|
|
16
|
+
onFilterRemove: (filter: FilterValue) => void;
|
|
17
|
+
classNames?: ActiveFilterChipsClassNames;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* ClassNames for styling the `ElementsRoot` component
|
|
22
|
+
*/
|
|
4
23
|
export declare type ElementsClassNames = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
propositionCard?: PropositionCardClassNames;
|
|
8
|
-
filterSidebar?: FilterSidebarClassNames;
|
|
9
|
-
rangeFilter?: RangeFilterClassNames;
|
|
10
|
-
selectFilter?: SelectFilterClassNames;
|
|
24
|
+
/** The only slot */
|
|
25
|
+
base?: string;
|
|
11
26
|
};
|
|
12
27
|
|
|
13
28
|
export declare function ElementsRoot({ children, classNames }: ElementsRootProps): JSX.Element;
|
|
14
29
|
|
|
15
30
|
export declare type ElementsRootProps = {
|
|
31
|
+
/** The content to be rendered within the ElementsRoot component */
|
|
16
32
|
children: ReactNode;
|
|
33
|
+
/** Class slots for styling */
|
|
17
34
|
classNames?: ElementsClassNames;
|
|
18
35
|
};
|
|
19
36
|
|
|
37
|
+
export declare function FilterChip({ filter, filterOption, onRemove, classNames, }: FilterChipProps): JSX.Element;
|
|
38
|
+
|
|
39
|
+
declare type FilterChipClassNames = {
|
|
40
|
+
base?: string;
|
|
41
|
+
content?: string;
|
|
42
|
+
dot?: string;
|
|
43
|
+
avatar?: string;
|
|
44
|
+
closeButton?: string;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
declare type FilterChipProps = {
|
|
48
|
+
filter: FilterValue;
|
|
49
|
+
filterOption: FilterOption;
|
|
50
|
+
onRemove: (filter: FilterValue) => void;
|
|
51
|
+
classNames?: FilterChipClassNames;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export declare function FilterModal({ filters, activeFilters, onFilterChange, classNames, }: FilterModalProps): JSX.Element;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* ClassNames for styling different parts of the `FilterModal` component
|
|
58
|
+
*/
|
|
59
|
+
export declare type FilterModalClassNames = {
|
|
60
|
+
/** Trigger button that opens the modal
|
|
61
|
+
* @example "Filters" */
|
|
62
|
+
button?: string;
|
|
63
|
+
/** Modal dialog class styling slots - see type `ModalClassNames` */
|
|
64
|
+
modal?: ModalClassNames;
|
|
65
|
+
/** Filters component class styling slots - see type `FiltersClassNames` */
|
|
66
|
+
filters?: FiltersClassNames;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export declare type FilterModalProps = Omit<FiltersProps, 'classNames'> & {
|
|
70
|
+
/** Class slots for styling */
|
|
71
|
+
classNames?: FilterModalClassNames;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Configuration for a single filter option
|
|
76
|
+
*/
|
|
20
77
|
declare type FilterOption = {
|
|
78
|
+
/** Unique identifier for the filter */
|
|
21
79
|
id: string;
|
|
80
|
+
/** Display label for the filter
|
|
81
|
+
* @example "Prijs per maand" */
|
|
22
82
|
label: string;
|
|
23
|
-
|
|
24
|
-
|
|
83
|
+
/** Type of filter control to render */
|
|
84
|
+
type: 'range' | 'select' | 'radio' | 'hidden';
|
|
85
|
+
/** Available options for select-type filters
|
|
86
|
+
* @example ["1 jaar", "2 jaar", "Onbepaalde tijd"] */
|
|
87
|
+
options?: string[] | number[];
|
|
88
|
+
/** Minimum value for range-type filters */
|
|
25
89
|
min?: number;
|
|
90
|
+
/** Maximum value for range-type filters */
|
|
26
91
|
max?: number;
|
|
92
|
+
/** Step increment for range-type filters
|
|
93
|
+
* @example 5 */
|
|
27
94
|
step?: number;
|
|
95
|
+
/** Unit to display with range values
|
|
96
|
+
* @example "€" or "GB" */
|
|
28
97
|
unit?: string;
|
|
98
|
+
/** Format type for the filter value */
|
|
99
|
+
formatType?: 'currency' | 'percentage' | 'decimal' | 'integer' | string;
|
|
29
100
|
};
|
|
30
101
|
|
|
31
|
-
export declare function
|
|
102
|
+
export declare function Filters({ filters, activeFilters, onFilterChange, classNames, }: FiltersProps): JSX.Element;
|
|
32
103
|
|
|
33
|
-
|
|
104
|
+
/**
|
|
105
|
+
* ClassNames for styling different parts of the `Filters` component
|
|
106
|
+
*/
|
|
107
|
+
export declare type FiltersClassNames = {
|
|
108
|
+
/** The foundational slot, encompassing all other slots and elements
|
|
109
|
+
*
|
|
110
|
+
* It serves as the primary container */
|
|
34
111
|
base?: string;
|
|
35
|
-
|
|
112
|
+
/** Container wrapping all filter groups */
|
|
113
|
+
filterWrapper?: string;
|
|
114
|
+
/** Individual filter group container */
|
|
36
115
|
filterGroup?: string;
|
|
116
|
+
/** Filter group label/heading
|
|
117
|
+
* @example "Prijs per maand" */
|
|
37
118
|
filterLabel?: string;
|
|
38
|
-
|
|
119
|
+
/** Range filter class styling slots - see type `RangeFilterClassNames` */
|
|
120
|
+
rangeFilter?: RangeFilterClassNames;
|
|
121
|
+
/** Select filter class styling slots - see type `SelectFilterClassNames` */
|
|
122
|
+
selectFilter?: SelectFilterClassNames;
|
|
123
|
+
/** Radio filter class styling slots - see type `RadioFilterClassNames` */
|
|
124
|
+
radioFilter?: RadioFilterClassNames;
|
|
39
125
|
};
|
|
40
126
|
|
|
41
|
-
export declare type
|
|
127
|
+
export declare type FiltersProps = {
|
|
128
|
+
/** Available filter options to display */
|
|
42
129
|
filters: FilterOption[];
|
|
130
|
+
/** Currently active filter values */
|
|
43
131
|
activeFilters: FilterValue[];
|
|
132
|
+
/** Callback when a filter value changes */
|
|
44
133
|
onFilterChange: (filter: FilterValue) => void;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
classNames?: FilterSidebarClassNames;
|
|
134
|
+
/** Class slots for styling */
|
|
135
|
+
classNames?: FiltersClassNames;
|
|
48
136
|
};
|
|
49
137
|
|
|
138
|
+
/**
|
|
139
|
+
* Represents an active filter value selected by the user
|
|
140
|
+
*/
|
|
50
141
|
declare type FilterValue = {
|
|
142
|
+
/** Identifier matching the corresponding `FilterOption[id]` */
|
|
51
143
|
id: string;
|
|
144
|
+
/** The selected value(s) - type depends on filter type:
|
|
145
|
+
* - string: single text value
|
|
146
|
+
* - number: single numeric value
|
|
147
|
+
* - [number, number]: range values [min, max]
|
|
148
|
+
* - string[]: multiple selected options */
|
|
52
149
|
value: string | number | [number, number] | string[];
|
|
53
150
|
};
|
|
54
151
|
|
|
152
|
+
/**
|
|
153
|
+
* ClassNames for styling the `FooterInfo` component within `PropositionCard`
|
|
154
|
+
*/
|
|
55
155
|
export declare type FooterInfoClassNames = {
|
|
156
|
+
/** Wrapper container for the footer info section */
|
|
56
157
|
base?: string;
|
|
158
|
+
/** tcoPerMonth/average price text
|
|
159
|
+
* @example "gem. 10,- /mnd" */
|
|
57
160
|
averagePrice?: string;
|
|
161
|
+
/** Device discount text
|
|
162
|
+
* @example "100,- toestelkorting" */
|
|
58
163
|
deviceDiscount?: string;
|
|
59
164
|
};
|
|
60
165
|
|
|
61
166
|
export declare type FooterInfoProps = {
|
|
62
|
-
|
|
63
|
-
|
|
167
|
+
/** Device discount text
|
|
168
|
+
* @example "100,- toestelkorting" */
|
|
169
|
+
deviceDiscount?: string;
|
|
170
|
+
/** Average total cost per month text
|
|
171
|
+
* @example "gem. 10,- /mnd" */
|
|
172
|
+
tcoPerMonth?: string;
|
|
173
|
+
/** Class slots for styling */
|
|
64
174
|
classNames?: FooterInfoClassNames;
|
|
175
|
+
/** Whether the PropositionCard is horizontal */
|
|
176
|
+
horizontal?: boolean;
|
|
177
|
+
/** Whether the footer info is for a proposition with a product */
|
|
178
|
+
hasProduct?: boolean;
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
declare type ListBoxClassNames = {
|
|
182
|
+
base?: string;
|
|
183
|
+
wrapper?: string;
|
|
184
|
+
title?: string;
|
|
185
|
+
description?: string;
|
|
186
|
+
selectedIcon?: string;
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
declare type ModalClassNames = {
|
|
190
|
+
/** The backdrop slot, it is displayed behind the modal */
|
|
191
|
+
backdrop?: string;
|
|
192
|
+
/** The wrapper slot of the modal. It wraps the base and the backdrop slots */
|
|
193
|
+
wrapper?: string;
|
|
194
|
+
/** The main slot of the modal content */
|
|
195
|
+
base?: string;
|
|
196
|
+
/** The header of the modal, it is displayed at the top of the modal
|
|
197
|
+
* @example "Filters" */
|
|
198
|
+
header?: string;
|
|
199
|
+
/** The body of the modal, it is displayed in the middle of the modal */
|
|
200
|
+
body?: string;
|
|
201
|
+
/** The footer of the modal, it is displayed at the bottom of the modal */
|
|
202
|
+
footer?: string;
|
|
203
|
+
/** The close button (X) of the modal in top-right corner */
|
|
204
|
+
closeButton?: string;
|
|
205
|
+
/** The primary button of the modal, it is displayed at the bottom of the modal
|
|
206
|
+
* @example "Toon resultaten" */
|
|
207
|
+
primaryButton?: string;
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
declare type PopoverContentClassNames = {
|
|
211
|
+
base?: string;
|
|
212
|
+
trigger?: string;
|
|
213
|
+
backdrop?: string;
|
|
214
|
+
content?: string;
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
declare type PostcodeCheckLoadingClassNames = {
|
|
218
|
+
/** Base wrapper */
|
|
219
|
+
base?: string;
|
|
220
|
+
/** Search icon */
|
|
221
|
+
icon?: string;
|
|
222
|
+
/** Wrapper container for the text */
|
|
223
|
+
textWrapper?: string;
|
|
224
|
+
/** Heading text */
|
|
225
|
+
heading?: string;
|
|
226
|
+
/** Address text */
|
|
227
|
+
addressText?: string;
|
|
65
228
|
};
|
|
66
229
|
|
|
230
|
+
/**
|
|
231
|
+
* ClassNames for styling the `PricingSection` component within `PropositionCard`
|
|
232
|
+
*/
|
|
67
233
|
export declare type PricingSectionClassNames = {
|
|
234
|
+
/** Wrapper container for the pricing section */
|
|
68
235
|
base?: string;
|
|
236
|
+
/** Product price text (one-time payment - only visible for phone propositions)
|
|
237
|
+
* @example "+ 100,- eenmalig" */
|
|
69
238
|
productPrice?: string;
|
|
239
|
+
/** Monthly fee container */
|
|
70
240
|
monthlyFee?: string;
|
|
241
|
+
/** Monthly fee value text (price per month)
|
|
242
|
+
* @example "10,-" */
|
|
71
243
|
monthlyFeeValue?: string;
|
|
244
|
+
/** Monthly fee label text
|
|
245
|
+
* @example "/mnd" */
|
|
72
246
|
monthlyFeeLabel?: string;
|
|
247
|
+
/** Promotion text for monthly fee
|
|
248
|
+
* @example "12 mnd van 10,- voor:" */
|
|
73
249
|
promotionText?: string;
|
|
74
250
|
};
|
|
75
251
|
|
|
76
252
|
export declare type PricingSectionProps = {
|
|
253
|
+
/** Promotion text for monthly fee
|
|
254
|
+
* @example "12 mnd van 10,- voor:" */
|
|
77
255
|
monthlyFeePromotionText?: string;
|
|
256
|
+
/** Monthly fee text
|
|
257
|
+
* @example "10,-" */
|
|
78
258
|
monthlyFee: string;
|
|
79
|
-
|
|
259
|
+
/** Product price text (one-time payment - only visible for phone propositions)
|
|
260
|
+
* @example "+ 100,- eenmalig" */
|
|
261
|
+
productPrice?: string;
|
|
262
|
+
/** Class slots for styling */
|
|
80
263
|
classNames?: PricingSectionClassNames;
|
|
81
264
|
};
|
|
82
265
|
|
|
83
|
-
|
|
266
|
+
declare type ProductCategory = 'sim-only-proposition' | 'smartphone-proposition' | 'phone-and-subscription' | 'fixed-proposition';
|
|
267
|
+
|
|
268
|
+
export declare function ProductResults({ productCategory, filterOptions, initialSelectedFilters, limit, propositionCardLayout, classNames, profile, onProfileChange, }: ProductResultsProps): JSX.Element;
|
|
84
269
|
|
|
270
|
+
/**
|
|
271
|
+
* ClassNames for styling different parts of the `ProductResults` component
|
|
272
|
+
*/
|
|
85
273
|
export declare type ProductResultsClassNames = {
|
|
274
|
+
/** Wrapper container for the entire product results */
|
|
86
275
|
base?: string;
|
|
87
|
-
|
|
88
|
-
|
|
276
|
+
/** Active filters component class styling slots - see type `ActiveFilterChipsClassNames` */
|
|
277
|
+
activeFilterChips?: ActiveFilterChipsClassNames;
|
|
278
|
+
/** SortSelect component class styling slots - see type `SortSelectClassNames` */
|
|
279
|
+
sortSelect?: SortSelectClassNames;
|
|
280
|
+
/** Filters component class styling slots (both filters in sidebar and in modal) - see type `FiltersClassNames` */
|
|
281
|
+
filters?: FiltersClassNames;
|
|
282
|
+
/** Filter button (only on mobile & tablet screens) */
|
|
283
|
+
filterButton?: string;
|
|
284
|
+
/** Filter modal class styling slots - see type `ModalClassNames` */
|
|
285
|
+
modal?: ModalClassNames;
|
|
286
|
+
/** Grid wrapper of the results */
|
|
89
287
|
resultsGrid?: string;
|
|
288
|
+
/** Proposition card class styling slots - see type `PropositionCardClassNames` */
|
|
90
289
|
propositionCard?: PropositionCardClassNames;
|
|
290
|
+
/** PostcodeCheck loading card class styling slots (only for fixed propositions) - see type `PostcodeCheckLoadingClassNames` */
|
|
291
|
+
postcodeCheckLoading?: PostcodeCheckLoadingClassNames;
|
|
91
292
|
};
|
|
92
293
|
|
|
93
294
|
export declare type ProductResultsProps = {
|
|
295
|
+
/** Product type of the results */
|
|
296
|
+
productCategory: ProductCategory;
|
|
297
|
+
/** Filter options to display */
|
|
94
298
|
filterOptions?: FilterOption[];
|
|
299
|
+
/** Initial selected filters */
|
|
300
|
+
initialSelectedFilters?: FilterValue[];
|
|
301
|
+
/** Limit the number of propositions to display */
|
|
95
302
|
limit?: number;
|
|
303
|
+
/** Layout of the proposition cards */
|
|
304
|
+
propositionCardLayout?: 'vertical' | 'horizontal';
|
|
305
|
+
/** Class slots for styling */
|
|
96
306
|
classNames?: ProductResultsClassNames;
|
|
307
|
+
/** User profile */
|
|
308
|
+
profile?: Profile;
|
|
309
|
+
/** Callback function to handle profile changes */
|
|
310
|
+
onProfileChange?: (profile: Partial<Profile>) => void;
|
|
97
311
|
};
|
|
98
312
|
|
|
313
|
+
/**
|
|
314
|
+
* ClassNames for styling the `ProductSection` component within `PropositionCard`
|
|
315
|
+
*/
|
|
99
316
|
export declare type ProductSectionClassNames = {
|
|
317
|
+
/** Wrapper container for the entire product section */
|
|
100
318
|
base?: string;
|
|
319
|
+
/** Image wrapper, it handles alignment, placement, and general appearance for the product image */
|
|
320
|
+
imageWrapper?: string;
|
|
321
|
+
/** Product image element */
|
|
101
322
|
image?: string;
|
|
323
|
+
/** Product title text
|
|
324
|
+
* @example "iPhone 17" */
|
|
102
325
|
title?: string;
|
|
326
|
+
/** Product subtitle/brand text
|
|
327
|
+
* @example "Apple" */
|
|
103
328
|
subtitle?: string;
|
|
329
|
+
/** Stock status badge
|
|
330
|
+
* @example "Op voorraad" */
|
|
104
331
|
stockStatus?: string;
|
|
332
|
+
/** Average review score text
|
|
333
|
+
* @example "9.5" */
|
|
105
334
|
reviewScore?: string;
|
|
335
|
+
/** Amount of reviews text
|
|
336
|
+
* @example "(100)" */
|
|
106
337
|
reviewCount?: string;
|
|
338
|
+
/** Product specifications list container
|
|
339
|
+
* @example "6.3 inch • 256GB opslag • 5 kleuren" */
|
|
107
340
|
specifications?: string;
|
|
108
341
|
};
|
|
109
342
|
|
|
110
343
|
export declare type ProductSectionProps = {
|
|
344
|
+
/** Product title text
|
|
345
|
+
* @example "iPhone 17" */
|
|
111
346
|
title: string;
|
|
347
|
+
/** Product subtitle/brand text
|
|
348
|
+
* @example "Apple" */
|
|
112
349
|
subtitle: string;
|
|
350
|
+
/** Product image URL */
|
|
113
351
|
imageUrl: string;
|
|
352
|
+
/** Product image alt text */
|
|
114
353
|
imageAlt: string;
|
|
115
|
-
specifications
|
|
354
|
+
/** Product specifications */
|
|
355
|
+
specifications?: {
|
|
356
|
+
title: string;
|
|
357
|
+
}[];
|
|
358
|
+
/** Stock status
|
|
359
|
+
* @example "Op voorraad" */
|
|
116
360
|
stockStatus?: string;
|
|
361
|
+
/** Amount of reviews
|
|
362
|
+
* @example 100 */
|
|
117
363
|
reviewCount?: number;
|
|
364
|
+
/** Average review score
|
|
365
|
+
* @example 9.5 */
|
|
118
366
|
reviewScore?: number;
|
|
367
|
+
/** Class slots for styling */
|
|
119
368
|
classNames?: ProductSectionClassNames;
|
|
369
|
+
horizontal?: boolean;
|
|
120
370
|
};
|
|
121
371
|
|
|
122
|
-
declare
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
372
|
+
declare type Profile = z.infer<typeof profileSchema>;
|
|
373
|
+
|
|
374
|
+
declare const profileSchema: z_2.ZodObject<{
|
|
375
|
+
keepCurrentMsisdn: z_2.ZodOptional<z_2.ZodBoolean>;
|
|
376
|
+
currentSubscriptionType: z_2.ZodOptional<z_2.ZodEnum<{
|
|
377
|
+
subscription: "subscription";
|
|
378
|
+
prepaid: "prepaid";
|
|
379
|
+
}>>;
|
|
380
|
+
currentProviderSlug: z_2.ZodOptional<z_2.ZodString>;
|
|
381
|
+
currentFixedProviderScope: z_2.ZodOptional<z_2.ZodString>;
|
|
382
|
+
currentMobileProviders: z_2.ZodOptional<z_2.ZodArray<z_2.ZodObject<{
|
|
383
|
+
scope: z_2.ZodString;
|
|
384
|
+
value: z_2.ZodString;
|
|
385
|
+
}, z_2.core.$strip>>>;
|
|
386
|
+
customerSegment: z_2.ZodOptional<z_2.ZodNullable<z_2.ZodString>>;
|
|
387
|
+
address: z_2.ZodOptional<z_2.ZodObject<{
|
|
388
|
+
postcode: z_2.ZodString;
|
|
389
|
+
number: z_2.ZodString;
|
|
390
|
+
numberAddon: z_2.ZodPipe<z_2.ZodOptional<z_2.ZodString>, z_2.ZodTransform<string | undefined, string | undefined>>;
|
|
391
|
+
street: z_2.ZodString;
|
|
392
|
+
city: z_2.ZodString;
|
|
393
|
+
}, z_2.core.$strip>>;
|
|
394
|
+
}, z_2.core.$strip>;
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* ClassNames for styling the `PromotionsList` component within `PropositionCard`
|
|
398
|
+
*/
|
|
126
399
|
export declare type PromotionsListClassNames = {
|
|
400
|
+
/** Wrapper container for the promotions list */
|
|
127
401
|
base?: string;
|
|
402
|
+
/** Individual special/modification promotion item
|
|
403
|
+
* @example "€4,50 korting per maand" */
|
|
128
404
|
item?: string;
|
|
129
|
-
icon
|
|
405
|
+
/** Checkmark icon for each special promotion item */
|
|
406
|
+
specialPromotionIcon?: string;
|
|
407
|
+
/** Checkmark icon for each modification promotion item */
|
|
408
|
+
modificationPromotionIcon?: string;
|
|
130
409
|
};
|
|
131
410
|
|
|
132
411
|
export declare type PromotionsListProps = {
|
|
133
|
-
promotions
|
|
134
|
-
|
|
412
|
+
/** Special promotions to display */
|
|
413
|
+
specialPromotions: string[];
|
|
414
|
+
/** Modification promotions to display */
|
|
415
|
+
modificationPromotions: string[];
|
|
416
|
+
/** Class slots for styling */
|
|
135
417
|
classNames?: PromotionsListClassNames;
|
|
136
418
|
};
|
|
137
419
|
|
|
138
|
-
export declare function PropositionCard({
|
|
420
|
+
export declare function PropositionCard({ horizontal, ...props }: PropositionCardProps): JSX.Element;
|
|
139
421
|
|
|
422
|
+
/**
|
|
423
|
+
* ClassNames for styling different parts of the `PropositionCard` component
|
|
424
|
+
*/
|
|
140
425
|
export declare type PropositionCardClassNames = {
|
|
426
|
+
/** Main card wrapper */
|
|
141
427
|
card?: string;
|
|
428
|
+
/** Card header wrapper around `productSection` and `propositionHeader` */
|
|
142
429
|
header?: string;
|
|
430
|
+
/** Card body wrapper around `specifications`, `urgentChip` and `promotionsList` */
|
|
143
431
|
body?: string;
|
|
432
|
+
/** Card footer wrapper around `deliveryText`, `pricingSection` and `button` */
|
|
144
433
|
footer?: string;
|
|
434
|
+
/** Image wrapper for main product or proposition image on Horizontal card
|
|
435
|
+
*
|
|
436
|
+
* It handles alignment, placement, and general appearance for the product image */
|
|
437
|
+
imageWrapper?: string;
|
|
438
|
+
/** Main product or proposition image on Horizontal card */
|
|
439
|
+
image?: string;
|
|
440
|
+
/** Product section (only visible for phone propositions) class styling slots - see type `ProductSectionClassNames` */
|
|
145
441
|
productSection?: ProductSectionClassNames;
|
|
442
|
+
/** Proposition header class styling slots - see type `PropositionHeaderClassNames` */
|
|
146
443
|
propositionHeader?: PropositionHeaderClassNames;
|
|
444
|
+
/** Pricing section class styling slots - see type `PricingSectionClassNames` */
|
|
147
445
|
pricingSection?: PricingSectionClassNames;
|
|
446
|
+
/** Promotions list class styling slots - see type `PromotionsListClassNames` */
|
|
148
447
|
promotionsList?: PromotionsListClassNames;
|
|
448
|
+
/** Footer info (tcoPerMonth/average price and device discount) class styling slots - see type `FooterInfoClassNames` */
|
|
149
449
|
footerInfo?: FooterInfoClassNames;
|
|
450
|
+
/** Specifications grid (only visible for sim only and fixed propositions)
|
|
451
|
+
* @example
|
|
452
|
+
* - "2 jaar"
|
|
453
|
+
* - "350 / 400 Mb/s"
|
|
454
|
+
* - "66 (60 HD)"
|
|
455
|
+
* - "Via TV app" */
|
|
150
456
|
specifications?: string;
|
|
457
|
+
/** Urgent text chip (only visible when promotion is urgent)
|
|
458
|
+
* @example "Actie nog 6 dagen" */
|
|
151
459
|
urgentChip?: string;
|
|
460
|
+
/** Delivery promise text
|
|
461
|
+
* @example "Voor 23:59 besteld, morgen in huis" */
|
|
152
462
|
deliveryText?: string;
|
|
463
|
+
/** Call To Action button
|
|
464
|
+
* @example "Bekijk" */
|
|
153
465
|
button?: string;
|
|
154
466
|
};
|
|
155
467
|
|
|
156
468
|
export declare type PropositionCardProps = {
|
|
157
|
-
|
|
469
|
+
/** Whether the proposition is disabled */
|
|
470
|
+
disabled?: boolean;
|
|
471
|
+
/** Link to the proposition page */
|
|
158
472
|
href: string;
|
|
473
|
+
/** Product title
|
|
474
|
+
* @example "iPhone 17" */
|
|
159
475
|
productTitle?: string;
|
|
476
|
+
/** Product subtitle (brand)
|
|
477
|
+
* @example "Apple" */
|
|
160
478
|
productSubtitle?: string;
|
|
479
|
+
/** Product image URL */
|
|
161
480
|
productImageUrl?: string;
|
|
481
|
+
/** Product image alt text */
|
|
162
482
|
productImageAlt?: string;
|
|
483
|
+
/** Product specifications */
|
|
163
484
|
productSpecifications?: {
|
|
164
485
|
title: string;
|
|
165
486
|
}[];
|
|
487
|
+
/** Product stock status
|
|
488
|
+
* @example "in_stock" */
|
|
166
489
|
productStockStatus?: string;
|
|
490
|
+
/** Product review count
|
|
491
|
+
* @example 100 */
|
|
167
492
|
productReviewCount?: number;
|
|
493
|
+
/** Product review score
|
|
494
|
+
* @example 9.5 */
|
|
168
495
|
productReviewScore?: number;
|
|
169
|
-
|
|
496
|
+
/** Product price
|
|
497
|
+
* @example "100,-" */
|
|
498
|
+
productPrice?: string;
|
|
499
|
+
/** Proposition title
|
|
500
|
+
* @example "30 GB" */
|
|
170
501
|
propositionTitle: string;
|
|
502
|
+
/** Proposition subtitle
|
|
503
|
+
* @example "Onbp min / sms" */
|
|
171
504
|
propositionSubtitle: string;
|
|
505
|
+
/** Proposition image URL */
|
|
172
506
|
propositionImageUrl: string;
|
|
507
|
+
/** Proposition image alt text */
|
|
173
508
|
propositionImageAlt: string;
|
|
509
|
+
/** Proposition specifications */
|
|
174
510
|
propositionSpecifications?: {
|
|
511
|
+
slug: string;
|
|
175
512
|
title: string;
|
|
176
|
-
icon: ReactNode;
|
|
177
513
|
}[];
|
|
514
|
+
/** Monthly fee for subscription
|
|
515
|
+
* @example "10,-" */
|
|
178
516
|
monthlyFee: string;
|
|
517
|
+
/** Average total cost per month
|
|
518
|
+
* @example "10,-" */
|
|
179
519
|
tcoPerMonth: string;
|
|
520
|
+
/** Special promotions
|
|
521
|
+
* @example ["Geen aansluitingskosten"] */
|
|
180
522
|
specialPromotions: string[];
|
|
523
|
+
/** Modification promotions
|
|
524
|
+
* @example ["€ 4,50 korting per maand"] */
|
|
181
525
|
modificationPromotions: string[];
|
|
526
|
+
/** Monthly fee promotion text
|
|
527
|
+
* @example "12 mnd van 10,- voor:" */
|
|
182
528
|
monthlyFeePromotionText?: string;
|
|
183
|
-
|
|
184
|
-
|
|
529
|
+
/** Device discount
|
|
530
|
+
* @example "100,-" */
|
|
531
|
+
deviceDiscount?: string;
|
|
532
|
+
/** Delivery text
|
|
533
|
+
* @example "Voor 23:59 besteld, morgen in huis" */
|
|
534
|
+
deliveryText?: string | null;
|
|
535
|
+
/** Urgent text for urgent special promotion
|
|
536
|
+
* @example "Actie nog 6 dagen" */
|
|
185
537
|
urgentText?: string;
|
|
538
|
+
/** Class slots for styling */
|
|
186
539
|
classNames?: PropositionCardClassNames;
|
|
540
|
+
horizontal?: boolean;
|
|
187
541
|
};
|
|
188
542
|
|
|
543
|
+
/**
|
|
544
|
+
* ClassNames for styling the `PropositionHeader` component within `PropositionCard`
|
|
545
|
+
*/
|
|
189
546
|
export declare type PropositionHeaderClassNames = {
|
|
547
|
+
/** Wrapper container for the proposition header */
|
|
190
548
|
base?: string;
|
|
549
|
+
/** Image wrapper, it handles alignment, placement, and general appearance for the proposition provider image */
|
|
550
|
+
imageWrapper?: string;
|
|
551
|
+
/** Proposition provider image element*/
|
|
191
552
|
image?: string;
|
|
553
|
+
/** Proposition title text
|
|
554
|
+
* @example "30 GB"
|
|
555
|
+
* @example "100 Mb/s" */
|
|
192
556
|
title?: string;
|
|
557
|
+
/** Proposition subtitle text
|
|
558
|
+
* @example "Onbp min / sms"
|
|
559
|
+
* @example "Glasvezel" */
|
|
193
560
|
subtitle?: string;
|
|
194
561
|
};
|
|
195
562
|
|
|
196
563
|
export declare type PropositionHeaderProps = {
|
|
564
|
+
/** Proposition title text
|
|
565
|
+
* @example "30 GB"
|
|
566
|
+
* @example "100 Mb/s" */
|
|
197
567
|
title: string;
|
|
568
|
+
/** Proposition subtitle text
|
|
569
|
+
* @example "Onbp min / sms"
|
|
570
|
+
* @example "Glasvezel" */
|
|
198
571
|
subtitle: string;
|
|
572
|
+
/** Proposition image URL */
|
|
199
573
|
imageUrl: string;
|
|
574
|
+
/** Proposition image alt text */
|
|
200
575
|
imageAlt: string;
|
|
576
|
+
/** Whether the proposition has a product/phone */
|
|
201
577
|
hasProduct: boolean;
|
|
578
|
+
/** Class slots for styling */
|
|
202
579
|
classNames?: PropositionHeaderClassNames;
|
|
580
|
+
horizontal?: boolean;
|
|
581
|
+
};
|
|
582
|
+
|
|
583
|
+
export declare function RadioFilter({ id, options, value, onChange, classNames, }: RadioFilterProps): JSX.Element;
|
|
584
|
+
|
|
585
|
+
/**
|
|
586
|
+
* ClassNames for styling different parts of the `RadioFilter` component
|
|
587
|
+
*/
|
|
588
|
+
export declare type RadioFilterClassNames = {
|
|
589
|
+
/** Radio group */
|
|
590
|
+
radioGroup: {
|
|
591
|
+
/** Radio group root wrapper, it wraps the label and the wrapper */
|
|
592
|
+
base?: string;
|
|
593
|
+
/** Radio group wrapper, it wraps all radio items */
|
|
594
|
+
wrapper?: string;
|
|
595
|
+
/** Radio group label, it is placed before the wrapper */
|
|
596
|
+
label?: string;
|
|
597
|
+
/** Description slot for the radio group */
|
|
598
|
+
description?: string;
|
|
599
|
+
/** Error message slot for the radio group */
|
|
600
|
+
errorMessage?: string;
|
|
601
|
+
};
|
|
602
|
+
/** Individual radio located within `radioGroup` */
|
|
603
|
+
radio: {
|
|
604
|
+
/** Radio root wrapper, it wraps all elements */
|
|
605
|
+
base?: string;
|
|
606
|
+
/** Radio wrapper, it wraps the control element */
|
|
607
|
+
wrapper?: string;
|
|
608
|
+
/** The hidden input element that is used to handle the radio state */
|
|
609
|
+
hiddenInput?: string;
|
|
610
|
+
/** Label and description wrapper */
|
|
611
|
+
labelWrapper?: string;
|
|
612
|
+
/** The label text associated with the radio */
|
|
613
|
+
label?: string;
|
|
614
|
+
/** Control element, it is the circle element */
|
|
615
|
+
control?: string;
|
|
616
|
+
/** Description slot for the radio */
|
|
617
|
+
description?: string;
|
|
618
|
+
};
|
|
619
|
+
};
|
|
620
|
+
|
|
621
|
+
export declare type RadioFilterProps = {
|
|
622
|
+
/** Unique identifier for this filter */
|
|
623
|
+
id: string;
|
|
624
|
+
/** Available options to display as radio options
|
|
625
|
+
* @example ["1 jaar", "2 jaar", "Onbepaalde tijd"] */
|
|
626
|
+
options: string[] | number[];
|
|
627
|
+
/** Currently selected value */
|
|
628
|
+
value?: string | number;
|
|
629
|
+
/** Callback when selection changes */
|
|
630
|
+
onChange: (value: string) => void;
|
|
631
|
+
/** Class slots for styling */
|
|
632
|
+
classNames?: RadioFilterClassNames;
|
|
203
633
|
};
|
|
204
634
|
|
|
205
635
|
export declare function RangeFilter({ min, max, step, unit, value, onChange, classNames, }: RangeFilterProps): JSX.Element;
|
|
206
636
|
|
|
637
|
+
/**
|
|
638
|
+
* ClassNames for styling different parts of the `RangeFilter` component
|
|
639
|
+
*/
|
|
207
640
|
export declare type RangeFilterClassNames = {
|
|
641
|
+
/** The foundational slot, encompassing all other slots and elements
|
|
642
|
+
*
|
|
643
|
+
* It serves as the primary container */
|
|
208
644
|
base?: string;
|
|
209
|
-
|
|
645
|
+
/** The container for the Slider's label and value
|
|
646
|
+
*
|
|
647
|
+
* It aligns these elements and ensures a consistent layout */
|
|
648
|
+
labelWrapper?: string;
|
|
649
|
+
/** A dedicated slot to display the Slider's label
|
|
650
|
+
* @example "€ 0 - € 100" */
|
|
210
651
|
label?: string;
|
|
211
|
-
|
|
652
|
+
/** Displays the current value of the Slider
|
|
653
|
+
*
|
|
654
|
+
* Located within the `labelWrapper` */
|
|
655
|
+
value?: string;
|
|
656
|
+
/** Represents individual steps or intervals on the Slider */
|
|
657
|
+
step?: string;
|
|
658
|
+
/** Denotes specific values or intervals along the Slider */
|
|
659
|
+
mark?: string;
|
|
660
|
+
/** A container for the slider's track, ensuring it is consistently aligned and positioned */
|
|
661
|
+
trackWrapper?: string;
|
|
662
|
+
/** The base bar of the Slider, along which the thumb moves */
|
|
663
|
+
track?: string;
|
|
664
|
+
/** A visual representation of the selected value, filling the track from the start point to the current thumb position */
|
|
665
|
+
filler?: string;
|
|
666
|
+
/** The interactive element that users drag along the track to select a value on the Slider */
|
|
667
|
+
thumb?: string;
|
|
212
668
|
};
|
|
213
669
|
|
|
214
670
|
export declare type RangeFilterProps = {
|
|
671
|
+
/** Unique identifier for this filter */
|
|
215
672
|
id: string;
|
|
673
|
+
/** Minimum value of the range */
|
|
216
674
|
min: number;
|
|
675
|
+
/** Maximum value of the range */
|
|
217
676
|
max: number;
|
|
677
|
+
/** Step increment for the slider
|
|
678
|
+
* @example 5 */
|
|
218
679
|
step?: number;
|
|
680
|
+
/** Unit to display with values
|
|
681
|
+
* @example "€" or "GB" */
|
|
219
682
|
unit?: string;
|
|
683
|
+
/** Currently selected range [min, max] */
|
|
220
684
|
value?: [number, number];
|
|
685
|
+
/** Callback when range changes */
|
|
221
686
|
onChange: (value: [number, number]) => void;
|
|
687
|
+
/** Class slots for styling */
|
|
222
688
|
classNames?: RangeFilterClassNames;
|
|
223
689
|
};
|
|
224
690
|
|
|
225
|
-
export declare function SelectFilter({ options, values, onChange, classNames, }: SelectFilterProps): JSX.Element;
|
|
691
|
+
export declare function SelectFilter({ id, options, values, onChange, classNames, }: SelectFilterProps): JSX.Element;
|
|
226
692
|
|
|
693
|
+
/**
|
|
694
|
+
* ClassNames for styling different parts of the `SelectFilter` component
|
|
695
|
+
*/
|
|
227
696
|
export declare type SelectFilterClassNames = {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
697
|
+
/** Checkbox group */
|
|
698
|
+
checkboxGroup: {
|
|
699
|
+
/** Checkbox group root wrapper, it wraps the label and the wrapper */
|
|
700
|
+
base?: string;
|
|
701
|
+
/** Checkbox group wrapper, it wraps all checkboxes */
|
|
702
|
+
wrapper?: string;
|
|
703
|
+
/** Checkbox group label, it is placed before the wrapper */
|
|
704
|
+
label?: string;
|
|
705
|
+
/** The description of the checkbox group */
|
|
706
|
+
description?: string;
|
|
707
|
+
/** The error message of the checkbox group */
|
|
708
|
+
errorMessage?: string;
|
|
709
|
+
};
|
|
710
|
+
/** Individual checkboxes located within `checkboxGroup` */
|
|
711
|
+
checkbox: {
|
|
712
|
+
/** Checkbox wrapper, it handles alignment, placement, and general appearance */
|
|
713
|
+
base?: string;
|
|
714
|
+
/** An inner container that includes styles for relative positioning, flex properties, overflow handling and managing hover and selected states */
|
|
715
|
+
wrapper?: string;
|
|
716
|
+
/** The hidden input element that is used to handle the checkbox state */
|
|
717
|
+
hiddenInput?: string;
|
|
718
|
+
/** Icon within the checkbox, controlling size, visibility, and changes when checked */
|
|
719
|
+
icon?: string;
|
|
720
|
+
/** The text associated with the checkbox */
|
|
721
|
+
label?: string;
|
|
722
|
+
};
|
|
233
723
|
};
|
|
234
724
|
|
|
235
725
|
export declare type SelectFilterProps = {
|
|
726
|
+
/** Unique identifier for this filter */
|
|
236
727
|
id: string;
|
|
237
|
-
options
|
|
238
|
-
|
|
728
|
+
/** Available options to display as checkboxes
|
|
729
|
+
* @example ["1 jaar", "2 jaar", "Onbepaalde tijd"] */
|
|
730
|
+
options: string[] | number[];
|
|
731
|
+
/** Currently selected values */
|
|
732
|
+
values?: string[] | number[];
|
|
733
|
+
/** Callback when selection changes */
|
|
239
734
|
onChange: (values: string[]) => void;
|
|
735
|
+
/** Class slots for styling */
|
|
240
736
|
classNames?: SelectFilterClassNames;
|
|
241
737
|
};
|
|
242
738
|
|
|
739
|
+
declare type SortSelectClassNames = {
|
|
740
|
+
description?: string;
|
|
741
|
+
errorMessage?: string;
|
|
742
|
+
label?: string;
|
|
743
|
+
base?: string;
|
|
744
|
+
value?: string;
|
|
745
|
+
selectorIcon?: string;
|
|
746
|
+
endContent?: string;
|
|
747
|
+
trigger?: string;
|
|
748
|
+
mainWrapper?: string;
|
|
749
|
+
innerWrapper?: string;
|
|
750
|
+
spinner?: string;
|
|
751
|
+
listboxWrapper?: string;
|
|
752
|
+
listbox?: ListBoxClassNames;
|
|
753
|
+
popoverContent?: PopoverContentClassNames;
|
|
754
|
+
helperWrapper?: string;
|
|
755
|
+
endWrapper?: string;
|
|
756
|
+
};
|
|
757
|
+
|
|
243
758
|
export { }
|