@mobielnl/elements 0.6.1 → 0.7.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/dist/elements.css +1 -1
- package/dist/elements.js +1 -1
- package/dist/elements.umd.cjs +70 -70
- package/dist/{index-DAyzaGWL.js → index-C4M3Nf9p.js} +8856 -8518
- package/dist/{index-DkHYB7u1.js → index-D-uHa1PI.js} +1 -1
- package/dist/index.d.ts +153 -19
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { r as pt, t as Z, i as Re, a as q, n as De, p as mt, b as fn, c as Ve, d as pn, v as mn, e as gn, f as x, g as le, s as vn, h as yn, j as Ie, k as H, l as gt, m as Y, o as bn, q as Tn, u as te, w as ue, x as I, y as ne, z as Vn, A as An, B as vt, C as Ne, D as Sn, E as wn, F as Pn, G as D, H as yt, I as bt, J as Tt, K as je, L as Vt, M as xn, N as Cn, O as Mn, P as ze, Q as Fn, R as On, S as Rn, T as Dn, U as In, V as Nn, W as Kn, X as En, Y as Bn, Z as Ln, _ as kn } from "./index-
|
|
2
|
+
import { r as pt, t as Z, i as Re, a as q, n as De, p as mt, b as fn, c as Ve, d as pn, v as mn, e as gn, f as x, g as le, s as vn, h as yn, j as Ie, k as H, l as gt, m as Y, o as bn, q as Tn, u as te, w as ue, x as I, y as ne, z as Vn, A as An, B as vt, C as Ne, D as Sn, E as wn, F as Pn, G as D, H as yt, I as bt, J as Tt, K as je, L as Vt, M as xn, N as Cn, O as Mn, P as ze, Q as Fn, R as On, S as Rn, T as Dn, U as In, V as Nn, W as Kn, X as En, Y as Bn, Z as Ln, _ as kn } from "./index-C4M3Nf9p.js";
|
|
3
3
|
import { Fragment as _n } from "react";
|
|
4
4
|
var ae = typeof globalThis < "u" && globalThis.process ? globalThis.process : { env: { NODE_ENV: "production" } };
|
|
5
5
|
function At(t, e) {
|
package/dist/index.d.ts
CHANGED
|
@@ -290,6 +290,11 @@ declare type GetPageByPathQuery = {
|
|
|
290
290
|
} | null;
|
|
291
291
|
};
|
|
292
292
|
|
|
293
|
+
declare type LabelClassNames = {
|
|
294
|
+
wrapper?: string;
|
|
295
|
+
text?: string;
|
|
296
|
+
};
|
|
297
|
+
|
|
293
298
|
declare type ListBoxClassNames = {
|
|
294
299
|
base?: string;
|
|
295
300
|
wrapper?: string;
|
|
@@ -338,6 +343,97 @@ declare type ModalClassNames_2 = {
|
|
|
338
343
|
closeButton?: string;
|
|
339
344
|
};
|
|
340
345
|
|
|
346
|
+
declare type ModalClassNames_3 = {
|
|
347
|
+
/** The backdrop slot, it is displayed behind the modal */
|
|
348
|
+
backdrop?: string;
|
|
349
|
+
/** The wrapper slot of the modal. It wraps the base and the backdrop slots */
|
|
350
|
+
wrapper?: string;
|
|
351
|
+
/** The main slot of the modal content */
|
|
352
|
+
base?: string;
|
|
353
|
+
/** The header of the modal, it is displayed at the top of the modal */
|
|
354
|
+
header?: string;
|
|
355
|
+
/** The body of the modal, it is displayed in the middle of the modal */
|
|
356
|
+
body?: string;
|
|
357
|
+
/** The footer of the modal, it is displayed at the bottom of the modal */
|
|
358
|
+
footer?: string;
|
|
359
|
+
/** The close button (X) of the modal in top-right corner */
|
|
360
|
+
closeButton?: string;
|
|
361
|
+
};
|
|
362
|
+
|
|
363
|
+
declare type NumberPreservationModalClassNames = {
|
|
364
|
+
/** Modal dialog class styling slots - see type `ModalClassNames` */
|
|
365
|
+
modal?: ModalClassNames_3;
|
|
366
|
+
/** Header section containing icon and title */
|
|
367
|
+
header?: {
|
|
368
|
+
/** Container wrapping the header content */
|
|
369
|
+
container?: string;
|
|
370
|
+
/** Icon wrapper with background (contains "06" text) */
|
|
371
|
+
iconWrapper?: string;
|
|
372
|
+
/** Main title text */
|
|
373
|
+
title?: string;
|
|
374
|
+
/** Description text below title */
|
|
375
|
+
description?: string;
|
|
376
|
+
};
|
|
377
|
+
/** Form section for number input */
|
|
378
|
+
form?: {
|
|
379
|
+
/** Form element container */
|
|
380
|
+
container?: string;
|
|
381
|
+
/** Input field styling slots */
|
|
382
|
+
input?: {
|
|
383
|
+
/** Input wrapper styling */
|
|
384
|
+
inputWrapper?: string;
|
|
385
|
+
/** Input element styling */
|
|
386
|
+
input?: string;
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
/** Provider selection section */
|
|
390
|
+
provider?: {
|
|
391
|
+
/** Select component styling */
|
|
392
|
+
select?: {
|
|
393
|
+
/** Select label styling */
|
|
394
|
+
label?: string;
|
|
395
|
+
/** Select trigger button styling */
|
|
396
|
+
trigger?: string;
|
|
397
|
+
/** Provider item container in select */
|
|
398
|
+
itemContainer?: string;
|
|
399
|
+
/** Provider icon styling */
|
|
400
|
+
icon?: string;
|
|
401
|
+
};
|
|
402
|
+
};
|
|
403
|
+
/** Options section (Ja/Nee buttons) */
|
|
404
|
+
options?: {
|
|
405
|
+
/** Container for the option buttons */
|
|
406
|
+
container?: string;
|
|
407
|
+
/** Option button styling */
|
|
408
|
+
button?: string;
|
|
409
|
+
/** Button content wrapper */
|
|
410
|
+
buttonContent?: string;
|
|
411
|
+
/** Button label text */
|
|
412
|
+
buttonLabel?: string;
|
|
413
|
+
/** Button description text */
|
|
414
|
+
buttonDescription?: string;
|
|
415
|
+
/** Button icon styling */
|
|
416
|
+
buttonIcon?: string;
|
|
417
|
+
};
|
|
418
|
+
/** Radio group for subscription type selection */
|
|
419
|
+
radioGroup?: {
|
|
420
|
+
/** Radio group base styling */
|
|
421
|
+
base?: string;
|
|
422
|
+
/** Radio group wrapper styling */
|
|
423
|
+
wrapper?: string;
|
|
424
|
+
/** Radio group label styling */
|
|
425
|
+
label?: string;
|
|
426
|
+
/** Radio group description styling */
|
|
427
|
+
description?: string;
|
|
428
|
+
/** Radio group error message styling */
|
|
429
|
+
errorMessage?: string;
|
|
430
|
+
/** Radio styling */
|
|
431
|
+
radio?: string;
|
|
432
|
+
};
|
|
433
|
+
/** Submit button styling */
|
|
434
|
+
submitButton?: string;
|
|
435
|
+
};
|
|
436
|
+
|
|
341
437
|
declare type PhoneListContainerClassNames = {
|
|
342
438
|
base?: string;
|
|
343
439
|
wrapper?: string;
|
|
@@ -501,7 +597,7 @@ export declare type PricingSectionProps = Pick<PropositionCardProps, 'onInfoClic
|
|
|
501
597
|
|
|
502
598
|
declare type ProductCategory = 'sim-only-proposition' | 'fixed-proposition' | 'smartphone-proposition' | 'smartphone-proposition-extended';
|
|
503
599
|
|
|
504
|
-
export declare function ProductResults({ productCategory, initialSelectedFilters, limit, classNames, initialProfile, onProfileChange, onError, }: ProductResultsProps): JSX.Element;
|
|
600
|
+
export declare function ProductResults({ productCategory, initialSelectedFilters, limit, classNames, initialProfile, texts, showTopPropositions, onProfileChange, onError, }: ProductResultsProps): JSX.Element;
|
|
505
601
|
|
|
506
602
|
/**
|
|
507
603
|
* ClassNames for styling different parts of the `ProductResults` component
|
|
@@ -518,26 +614,31 @@ export declare type ProductResultsClassNames = {
|
|
|
518
614
|
/** Filter button (only on mobile & tablet screens) */
|
|
519
615
|
filterButton?: string;
|
|
520
616
|
/** Filter modal class styling slots - see type `ModalClassNames` */
|
|
521
|
-
|
|
522
|
-
/** Grid wrapper of the results */
|
|
523
|
-
resultsGrid?: string;
|
|
524
|
-
/** Credit info component class styling slots - see type `CreditInfoClassNames` */
|
|
525
|
-
creditInfo?: CreditInfoClassNames;
|
|
526
|
-
/** Load more button */
|
|
527
|
-
loadMoreButton?: string;
|
|
528
|
-
/** Results not found component class styling slots - see type `ResultsNotFoundClassNames` */
|
|
529
|
-
resultsNotFound?: ResultsNotFoundClassNames;
|
|
530
|
-
/** Proposition card class styling slots - see type `PropositionCardClassNames` */
|
|
531
|
-
propositionCard?: PropositionCardClassNames;
|
|
532
|
-
/** PostcodeCheck loading card class styling slots (only for fixed propositions) - see type `PostcodeCheckLoadingClassNames` */
|
|
533
|
-
postcodeCheckLoading?: PostcodeCheckLoadingClassNames;
|
|
617
|
+
filterModal?: ModalClassNames;
|
|
534
618
|
/** Postcode check modal class styling slots - see type `PostcodeCheckModalClassNames` */
|
|
535
619
|
postcodeCheckModal?: PostcodeCheckModalClassNames;
|
|
620
|
+
/** Number preservation modal class styling slots - see type `NumberPreservationModalClassNames` */
|
|
621
|
+
numberPreservationModal?: NumberPreservationModalClassNames;
|
|
622
|
+
/** Results class styling slots - see type `ResultsClassNames` */
|
|
623
|
+
results?: ResultsClassNames;
|
|
536
624
|
};
|
|
537
625
|
|
|
538
626
|
export declare type ProductResultsProps = {
|
|
539
627
|
/** Product type of the results */
|
|
540
628
|
productCategory: Exclude<ProductCategory, 'smartphone-proposition-extended'>;
|
|
629
|
+
/** Whether to show the dynamic top 3 propositions based on the user's profile
|
|
630
|
+
*
|
|
631
|
+
* Not available for smartphone propositions when no phone is selected */
|
|
632
|
+
showTopPropositions?: boolean;
|
|
633
|
+
/** Customize texts */
|
|
634
|
+
texts?: {
|
|
635
|
+
/** Title above top propositions (only shown when `showTopPropositions` is set to `true`)
|
|
636
|
+
* @default "Beste providers voor jou" */
|
|
637
|
+
topPropositionsTitle: string;
|
|
638
|
+
/** Title above all propositions (only shown when `showTopPropositions` is set to `true`)
|
|
639
|
+
* @default "Alle providers op een rijtje" */
|
|
640
|
+
allPropositionsTitle: string;
|
|
641
|
+
};
|
|
541
642
|
/** Initial selected filters */
|
|
542
643
|
initialSelectedFilters?: FilterValue[];
|
|
543
644
|
/** Limit the number of propositions to display */
|
|
@@ -662,8 +763,8 @@ export declare type PropositionCardClassNames = {
|
|
|
662
763
|
button?: string;
|
|
663
764
|
/** Card wrapper (container for the label and card) */
|
|
664
765
|
cardWrapper?: string;
|
|
665
|
-
/** Label
|
|
666
|
-
label?:
|
|
766
|
+
/** Label class styling slots - see type `LabelClassNames` */
|
|
767
|
+
label?: LabelClassNames;
|
|
667
768
|
};
|
|
668
769
|
|
|
669
770
|
export declare type PropositionCardProps = {
|
|
@@ -724,9 +825,8 @@ export declare type PropositionCardProps = {
|
|
|
724
825
|
/** Urgent text for urgent special promotion
|
|
725
826
|
* @example "Actie nog 6 dagen" */
|
|
726
827
|
urgentText?: string;
|
|
727
|
-
/** Label
|
|
728
|
-
|
|
729
|
-
label?: string;
|
|
828
|
+
/** Label properties to display above the card */
|
|
829
|
+
label?: Pick<PropositionLabel, 'displayName' | 'color'>;
|
|
730
830
|
/** Class slots for styling */
|
|
731
831
|
classNames?: PropositionCardClassNames;
|
|
732
832
|
horizontal?: boolean;
|
|
@@ -784,6 +884,17 @@ export declare type PropositionHeaderProps = {
|
|
|
784
884
|
horizontal?: boolean;
|
|
785
885
|
};
|
|
786
886
|
|
|
887
|
+
declare type PropositionLabel = {
|
|
888
|
+
type: PropositionLabelType;
|
|
889
|
+
displayName: string;
|
|
890
|
+
rank: number;
|
|
891
|
+
color: PropositionLabelColor;
|
|
892
|
+
};
|
|
893
|
+
|
|
894
|
+
declare type PropositionLabelColor = 'primary' | 'secondary' | 'default';
|
|
895
|
+
|
|
896
|
+
declare type PropositionLabelType = 'isRetention' | 'isCheapestPhone' | 'isBudget' | 'isBudgetFiber' | 'isCombi' | 'isFastestInternet' | 'isBudgetOwnNetwork' | 'isBudgetNetwork';
|
|
897
|
+
|
|
787
898
|
export declare function RadioFilter({ id, options, value, onChange, classNames, }: RadioFilterProps): JSX.Element;
|
|
788
899
|
|
|
789
900
|
/**
|
|
@@ -837,6 +948,29 @@ export declare type RadioFilterProps = {
|
|
|
837
948
|
|
|
838
949
|
export declare function RangeFilter({ min, max, step, value, options, maxOptionValue, marks, formatType, onChange, classNames, }: SliderFilterProps): JSX.Element;
|
|
839
950
|
|
|
951
|
+
declare type ResultsClassNames = {
|
|
952
|
+
/** Title above top propositions (only shown when `showTopPropositions` is set to `true`)
|
|
953
|
+
* @example "Beste providers voor jou" */
|
|
954
|
+
topPropositionsTitle?: string;
|
|
955
|
+
/** Title above all propositions (only shown when `showTopPropositions` is set to `true`)
|
|
956
|
+
* @example "Alle providers op een rijtje" */
|
|
957
|
+
allPropositionsTitle?: string;
|
|
958
|
+
/** Grid wrapper of the top propositions */
|
|
959
|
+
topPropositionsGrid?: string;
|
|
960
|
+
/** Grid wrapper of the all propositions */
|
|
961
|
+
allPropositionsGrid?: string;
|
|
962
|
+
/** Results not found component class styling slots - see type `ResultsNotFoundClassNames` */
|
|
963
|
+
resultsNotFound?: ResultsNotFoundClassNames;
|
|
964
|
+
/** Credit info component class styling slots - see type `CreditInfoClassNames` */
|
|
965
|
+
creditInfo?: CreditInfoClassNames;
|
|
966
|
+
/** Load more button */
|
|
967
|
+
loadMoreButton?: string;
|
|
968
|
+
/** Proposition card class styling slots - see type `PropositionCardClassNames` */
|
|
969
|
+
propositionCard?: PropositionCardClassNames;
|
|
970
|
+
/** PostcodeCheck loading card class styling slots (only for fixed propositions) - see type `PostcodeCheckLoadingClassNames` */
|
|
971
|
+
postcodeCheckLoading?: PostcodeCheckLoadingClassNames;
|
|
972
|
+
};
|
|
973
|
+
|
|
840
974
|
declare type ResultsNotFoundClassNames = {
|
|
841
975
|
filterChips?: ActiveFilterChipsClassNames & {
|
|
842
976
|
/** The title element above the filter chips
|